Author: schoenfeld
Date: 2010-01-11 14:36:41 +0000 (Mon, 11 Jan 2010)
New Revision: 2083

Modified:
   trunk/debian/changelog
   trunk/scripts/build-rdeps.pl
Log:
* build-rdeps:
  + Add a proper argument passing to test_for_valid_component() so that
    it really gets the filename and not the Release file entry.
  + Add a check to test_for_valid_component() to test if a given Sources
    file actually exists and otherwise print a more meaningful warning.
    (Closes: #564443)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2010-01-11 11:46:52 UTC (rev 2082)
+++ trunk/debian/changelog      2010-01-11 14:36:41 UTC (rev 2083)
@@ -23,11 +23,16 @@
   [ Patrick Schoenfeld ]
   * nmudiff: Fix "[nmudiff] please include --tagpending option" by applying the
     patch from Gregor Herrmann. Thanks. (Closes: #559549)
-  * build-rdeps: Add some documentation to the manpage, which emphasizes on
-    the fact that the tool has some external dependencies (namely apt Sources
-    files)
+  * build-rdeps:
+    + Add some documentation to the manpage, which emphasizes on the fact that
+      the tool has some external dependencies (namely apt Sources files)
+    + Add a proper argument passing to test_for_valid_component() so that
+      it really gets the filename and not the Release file entry.
+    + Add a check to test_for_valid_component() to test if a given Sources
+      file actually exists and otherwise print a more meaningful warning.
+      (Closes: #564443)
 
- -- Patrick Schoenfeld <[email protected]>  Mon, 11 Jan 2010 12:46:00 +0100
+ -- Patrick Schoenfeld <[email protected]>  Mon, 11 Jan 2010 15:32:59 +0100
 
 devscripts (2.10.61) unstable; urgency=low
 

Modified: trunk/scripts/build-rdeps.pl
===================================================================
--- trunk/scripts/build-rdeps.pl        2010-01-11 11:46:52 UTC (rev 2082)
+++ trunk/scripts/build-rdeps.pl        2010-01-11 14:36:41 UTC (rev 2083)
@@ -153,15 +153,22 @@
 
 # Sub to test if a given section shall be included in the result
 sub test_for_valid_component {
-    if ($opt_mainonly and /(contrib|non-free)/) {
+    my $filebase = shift;
+
+    if ($opt_mainonly and $filebase =~ /(contrib|non-free)/) {
        return -1;
     }
     foreach my $component (@opt_exclude_components) {
-       if ($_ =~ /$component/) {
+       if ($filebase =~ /$component/) {
            return -1;
        }
     }
 
+    if (! -e "$sources_path/$filebase") {
+       print STDERR "Warning: Ignoring missing sources file $filebase. 
(Missing component in sources.list?)\n";
+       return -1;
+    }
+
     print STDERR "DEBUG: Component ($_) may not be excluded.\n" if 
($opt_debug);
     return 0;
 }



-- 
To unsubscribe, send mail to [email protected].

Reply via email to