1Dpkg::Vendor(3perl)              libdpkg-perl              Dpkg::Vendor(3perl)
2
3
4

NAME

6       Dpkg::Vendor - get access to some vendor specific information
7

DESCRIPTION

9       The files in $Dpkg::CONFDIR/origins/ can provide information about
10       various vendors who are providing Debian packages. Currently those
11       files look like this:
12
13         Vendor: Debian
14         Vendor-URL: https://www.debian.org/
15         Bugs: debbugs://bugs.debian.org
16
17       If the vendor derives from another vendor, the file should document the
18       relationship by listing the base distribution in the Parent field:
19
20         Parent: Debian
21
22       The file should be named according to the vendor name. The usual
23       convention is to name the vendor file using the vendor name in all
24       lowercase, but some variation is permitted. Namely, spaces are mapped
25       to dashes ('-'), and the file can have the same casing as the Vendor
26       field, or it can be capitalized.
27

FUNCTIONS

29       $dir = get_vendor_dir()
30           Returns the current dpkg origins directory name, where the vendor
31           files are stored.
32
33       $fields = get_vendor_info($name)
34           Returns a Dpkg::Control object with the information parsed from the
35           corresponding vendor file in $Dpkg::CONFDIR/origins/. If $name is
36           omitted, it will use $Dpkg::CONFDIR/origins/default which is
37           supposed to be a symlink to the vendor of the currently installed
38           operating system. Returns undef if there's no file for the given
39           vendor.
40
41       $name = get_vendor_file($name)
42           Check if there's a file for the given vendor and returns its name.
43
44           The vendor filename will be derived from the vendor name, by
45           replacing any number of non-alphanumeric characters (that is
46           [^A-Za-z0-9]) into "-", then the resulting name will be tried in
47           sequence by lower-casing it, keeping it as is, lower-casing then
48           capitalizing it, and capitalizing it.
49
50           In addition, for historical and backwards compatibility, the name
51           will be tried keeping it as is without non-alphanumeric characters
52           remapping, then the resulting name will be tried in sequence by
53           lower-casing it, keeping it as is, lower-casing then capitalizing
54           it, and capitalizing it.  And finally the name will be tried by
55           replacing only spaces to "-", then the resulting name will be tried
56           in sequence by lower-casing it, keeping it as is, lower-casing then
57           capitalizing it, and capitalizing it.
58
59           But these backwards compatible name lookups will be removed during
60           the dpkg 1.22.x release cycle.
61
62       $name = get_current_vendor()
63           Returns the name of the current vendor. If DEB_VENDOR is set, it
64           uses that first, otherwise it falls back to parsing
65           $Dpkg::CONFDIR/origins/default.  If that file doesn't exist, it
66           returns undef.
67
68       $object = get_vendor_object($name)
69           Return the Dpkg::Vendor::* object of the corresponding vendor.  If
70           $name is omitted, return the object of the current vendor.  If no
71           vendor can be identified, then return the Dpkg::Vendor::Default
72           object.
73
74           The module name will be derived from the vendor name, by splitting
75           parts around groups of non alphanumeric character (that is
76           [^A-Za-z0-9]) separators, by either capitalizing or lower-casing
77           and capitalizing each part and then joining them without the
78           separators. So the expected casing is based on the one from the
79           Vendor field in the origins file.
80
81           In addition, for historical and backwards compatibility, the module
82           name will also be looked up without non-alphanumeric character
83           stripping, by capitalizing, lower-casing then capitalizing, as-is
84           or lower-casing.  But these name lookups will be removed during the
85           1.22.x release cycle.
86
87       run_vendor_hook($hookid, @params)
88           Run a hook implemented by the current vendor object.
89

CHANGES

91   Version 1.02 (dpkg 1.21.10)
92       Deprecated behavior: get_vendor_file() loading vendor files with no
93       special characters remapping. get_vendor_object() loading vendor module
94       names with no special character stripping.
95
96   Version 1.01 (dpkg 1.17.0)
97       New function: get_vendor_dir().
98
99   Version 1.00 (dpkg 1.16.1)
100       Mark the module as public.
101

SEE ALSO

103       deb-origin(5).
104
105
106
1071.21.21                           2023-03-28               Dpkg::Vendor(3perl)
Impressum