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

Bug#235068: Improvement patch



The attached patch does not fix this issue but it, at least, provides a 
better error message for human operators.

I'm not sure if the package should auto-extract the sources himself (even 
if in the local dir) since it's not that easy to determine that you are 
using the proper kernel sources for an NMU upload (that depends on the 
kernel-images used by the default kernel installed by d-i, IIRC)

In any case, having it extract the Makefiles and the Configure.help of a 
kernel-source tar in a local build directory might be even better.

Regards

Javier
--- modconf-0.2.45/debian/mkkerneldesc.pl	2004-03-20 13:18:41.000000000 +0100
+++ modconf-0.2.45.1/debian/mkkerneldesc.pl	2004-03-20 13:55:52.000000000 +0100
@@ -6,6 +6,8 @@
 
 use strict;
 use File::Basename;
+# Enable/Disable debugging here
+my $opt_d = 1;
 
 my $linux = '';
 my @linux = glob ("/usr/src/kernel-source-*/");
@@ -17,7 +19,9 @@
     last;
   }
 }
-die "Cannot find kernel source." if ($linux eq '');
+my @sources = glob ("/usr/src/kernel-source-*tar.{bz2,gz}");
+warn "E: You need to install a kernel-source package and unpack the tar it provides!\n" if ( $linux eq '' && scalar(@sources) > 0 ) ;
+die "Cannot find kernel source" if ($linux eq '');
 warn "I: Using \"$linux\" for kernel Makefile's to parse.\n";
 if(open(fh, "<$linux/Makefile") && grep(/PATCHLEVEL.*=.*6/, <fh>)) {
    warn "I: Using Kernel 2.6 extraction method.\n";
@@ -49,7 +53,7 @@
       my $cfg = $1;
       foreach (split(/\s+/,$2)) {
         push(@{$objs{$cfg}},$_) if ($_ !~ /[\$\\]/);
-	# DEBUG printf "%s - %s\n", $cfg, $_ if ($_ !~ /[\$\\]/);
+	printf "%s - %s\n", $cfg, $_ if ($_ !~ /[\$\\]/) && $opt_d;
       }
       $lastline = $_;
       next;

Attachment: signature.asc
Description: Digital signature


Reply to: