Parcourir la source

dpkg-gencontrol: Use -c argument as a fallback lock file

If the default debian/control file does not exist, try to use the one
specified with the -c option, as most probably we are being run from
a different directory than the source tree.

Closes: #667008
Guillem Jover il y a 13 ans
Parent
commit
3bcb4e42f4
2 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 2 0
      debian/changelog
  2. 2 0
      scripts/dpkg-gencontrol.pl

+ 2 - 0
debian/changelog

@@ -23,6 +23,8 @@ dpkg (1.17.2) UNRELEASED; urgency=low
     currently applicable. Reported by Pedro Ribeiro <pedrib@gmail.com>.
   * Add ppc64el support to cputable. Closes: #718945
     Thanks to Jeff Bailey <jeffbailey@google.com>.
+  * Use dpkg-gencontrol -c argument as a fallback lock file in case
+    debian/control does not exist. Closes: #667008
 
   [ Updated programs translations ]
   * Vietnamese (Trần Ngọc Quân).

+ 2 - 0
scripts/dpkg-gencontrol.pl

@@ -357,6 +357,8 @@ for my $f (keys %remove) {
 # of debian/files when parallel building is in use
 my $lockfh;
 my $lockfile = 'debian/control';
+$lockfile = $controlfile if not -e $lockfile;
+
 sysopen($lockfh, $lockfile, O_WRONLY) ||
     syserr(_g('cannot write %s'), $lockfile);
 file_lock($lockfh, $lockfile);