The following commit has been merged in the master branch:
commit 56d6ca8827ba3cf3d44f652243bfda2cc8074484
Author: Guillem Jover <[email protected]>
Date:   Mon Oct 29 17:43:50 2012 +0100

    Dpkg::Vendor: Add a new get_vendor_dir function
    
    This makes the overridable directory accessible to code that might need
    to print the vendor directory location.

diff --git a/debian/changelog b/debian/changelog
index 5d97c96..7af823d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -84,6 +84,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     packages with versions lesser than 0-0 (like 0~0-0). Closes: #676664
   * Fix Dpkg::Control::Hash set_options() to take a hash as argument instead
     of two scalars.
+  * Add a new Dpkg::Vendor get_vendor_dir() function.
 
   [ Updated manpages translations ]
   * Fix incorrect translation of "fortify" in French manpage for 
dpkg-buildflags
diff --git a/scripts/Dpkg/Vendor.pm b/scripts/Dpkg/Vendor.pm
index 1f654a1..2b7c5a4 100644
--- a/scripts/Dpkg/Vendor.pm
+++ b/scripts/Dpkg/Vendor.pm
@@ -18,7 +18,7 @@ package Dpkg::Vendor;
 use strict;
 use warnings;
 
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 
 use Dpkg::ErrorHandling;
 use Dpkg::Gettext;
@@ -27,7 +27,7 @@ use Dpkg::Control::Hash;
 
 use base qw(Exporter);
 our @EXPORT_OK = qw(get_vendor_info get_current_vendor get_vendor_file
-                    get_vendor_object run_vendor_hook);
+                    get_vendor_dir get_vendor_object run_vendor_hook);
 
 my $origins = '/etc/dpkg/origins';
 $origins = $ENV{DPKG_ORIGINS_DIR} if $ENV{DPKG_ORIGINS_DIR};
@@ -59,6 +59,17 @@ The file should be named according to the vendor name.
 
 =over 4
 
+=item $dir = Dpkg::Vendor::get_vendor_dir()
+
+Returns the current dpkg origins directory name, where the vendor files
+are stored.
+
+=cut
+
+sub get_vendor_dir {
+    return $origins;
+}
+
 =item $fields = Dpkg::Vendor::get_vendor_info($name)
 
 Returns a Dpkg::Control object with the information parsed from the
@@ -159,6 +170,12 @@ sub run_vendor_hook {
 
 =back
 
+=head1 CHANGES
+
+=head2 Version 1.01
+
+New function: get_vendor_dir().
+
 =cut
 
 1;

-- 
dpkg's main repository


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

Reply via email to