]> git.donarmstrong.com Git - debhelper.git/commitdiff
r2003: * Add some checks for attempts to act on packages not defined in the control
authorjoeyh <joeyh>
Mon, 28 May 2007 02:29:34 +0000 (02:29 +0000)
committerjoeyh <joeyh>
Mon, 28 May 2007 02:29:34 +0000 (02:29 +0000)
  file.

Debian/Debhelper/Dh_Lib.pm
debian/changelog

index c72e559f44e676d69586e8373cf233d6b7955f88..80f563870da68a57b2ef2d23477b5b4061dcb319 100644 (file)
@@ -656,6 +656,10 @@ sub getpackages {
 sub package_arch {
        my $package=shift;
        
+       if (! exists $package_arches{$package}) {
+               warning "package $package is not in control info";
+               return buildarch();
+       }
        return $package_arches{$package} eq 'all' ? "all" : buildarch();
 }
 
@@ -663,6 +667,10 @@ sub package_arch {
 sub is_udeb {
        my $package=shift;
        
+       if (! exists $package_types{$package}) {
+               warning "package $package is not in control info";
+               return 0;
+       }
        return $package_types{$package} eq 'udeb';
 }
 
index 4c036d153b6fe01954ee75945664865b1e8b89b5..8a72f9b7ad76ca4b2fa3bc879ee5688bed34e908 100644 (file)
@@ -3,8 +3,10 @@ debhelper (5.0.50) UNRELEASED; urgency=low
   * dh_installwm: If a path is not given, assume the file is in usr/bin, since
     usr/X11R6/bin now points to there.
   * Update urls to web page.
+  * Add some checks for attempts to act on packages not defined in the control
+    file.
 
- -- Joey Hess <joeyh@debian.org>  Thu, 17 May 2007 00:17:43 -0400
+ -- Joey Hess <joeyh@debian.org>  Sun, 27 May 2007 22:27:59 -0400
 
 debhelper (5.0.49) unstable; urgency=low