The following commit has been merged in the master branch:
commit 012ac74f876b7031165a782dbfeb3f43692bf382
Author: Raphael Hertzog <[email protected]>
Date:   Sun Jun 21 00:27:44 2009 +0200

    Dpkg::Vendor::get_vendor_file(): replaces spaces by dashes
    
    Also lookup filenames with dashes replacing spaces in the name
    of the vendor.

diff --git a/debian/changelog b/debian/changelog
index c23eb40..6b0932c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -34,6 +34,8 @@ dpkg (1.15.3) UNRELEASED; urgency=low
   * In dpkg-source, explicitely pass --keyring ~/.gnupg/trustedkeys.gpg to
     gpgv as it does not use it if other --keyring parameters are given.
     Closes: #530769
+  * In dpkg-vendor, allow to use dashes instead of spaces in vendor
+    filenames. Closes: #532222
 
   [ Joachim Breitner ]
   * Warn about unused substvars in dpkg-gencontrol. Closes: #532760
diff --git a/scripts/Dpkg/Vendor.pm b/scripts/Dpkg/Vendor.pm
index f0062fa..3df1c1e 100644
--- a/scripts/Dpkg/Vendor.pm
+++ b/scripts/Dpkg/Vendor.pm
@@ -78,7 +78,11 @@ name.
 sub get_vendor_file(;$) {
     my $vendor = shift || "default";
     my $file;
-    foreach my $name ($vendor, lc($vendor), ucfirst($vendor), 
ucfirst(lc($vendor))) {
+    my @tries = ($vendor, lc($vendor), ucfirst($vendor), ucfirst(lc($vendor)));
+    if ($vendor =~ s/\s+/-/) {
+        push @tries, $vendor, lc($vendor), ucfirst($vendor), 
ucfirst(lc($vendor));
+    }
+    foreach my $name (@tries) {
         $file = "/etc/dpkg/origins/$name" if -e "/etc/dpkg/origins/$name";
     }
     return $file;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to