[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#293489: if debian/control is not found, attempt to generate it



Package: dpkg
Version: 1.10.26+kbsd
Severity: wishlist
Tags: patch

With this patch, if debian/control is not found when building a package,
dpkg-checkbuilddeps will attempt to generate it by running
"debian/rules debian/control".  If that doesn't work, fails as usual.

Note: "debian/rules debian/control" is supported by (at least) cdbs when
its control-file autogeneration feature is enabled.  I intend to push this
target as standard for other build systems that autogenerate debian/control
(and at some point formalise it in policy).

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i386)
Kernel: GNU/kFreeBSD 5.3-2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages dpkg depends on:
ii  dselect                     1.10.26+kbsd a user tool to manage Debian packa
ii  libc0.1                     2.3-1+kbsd.8 GNU C Library: Shared libraries an

-- no debconf information
diff -ur dpkg-1.13.1.old/scripts/controllib.pl dpkg-1.13.1/scripts/controllib.pl
--- dpkg-1.13.1.old/scripts/controllib.pl	2005-02-03 21:19:15.000000000 +0100
+++ dpkg-1.13.1/scripts/controllib.pl	2005-02-03 21:26:04.000000000 +0100
@@ -131,6 +131,10 @@
 sub parsecontrolfile {
     $controlfile="./$controlfile" if $controlfile =~ m/^\s/;
 
+    if (!stat("$controlfile")) {
+      printf (" debian/rules debian/control\n");
+      system ("debian/rules", "debian/control");
+    }
     open(CDATA,"< $controlfile") || &error("cannot read control file $controlfile: $!");
     binmode(CDATA);
     $indices= &parsecdata('C',1,"control file $controlfile");

Reply to: