1 # dpkg manual page - dpkg-name(1)
3 # Copyright © 1995-1996 Erick Branderhorst
4 # Copyright © 2007-2013, 2015 Guillem Jover <guillem@debian.org>
6 # This is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
23 dpkg-name - rename Debian packages to full package names
34 This manual page documents the
36 program which provides an easy way to rename
38 packages into their full package names.
39 A full package name consists of
40 I<package>B<_>I<version>B<_>I<architecture>B<.>I<package-type>
41 as specified in the control file of the package.
44 consists of the upstream version information optionally followed by a
45 hyphen and the revision information.
46 The I<package-type> part comes
47 from that field if present or will fall back to B<deb>.
53 =item B<-a>, B<--no-architecture>
55 The destination filename will not have the architecture information.
57 =item B<-k>, B<--symlink>
59 Create a symlink, instead of moving.
61 =item B<-o>, B<--overwrite>
63 Existing files will be overwritten if they have the same name as the
66 =item B<-s>, B<--subdir> [I<dir>]
68 Files will be moved into a subdirectory.
69 If the directory given as argument exists
70 the files will be moved into that directory otherwise the name of
71 the target directory is extracted from the section field in the
72 control part of the package.
73 The target directory will be
74 «unstable/binary-I<architecture>/I<section>».
75 If the section is not found in the control, then B<no-section> is assumed,
76 and in this case, as well as for sections B<non-free> and B<contrib>
77 the target directory is «I<section>/binary-I<architecture>».
78 The section field is not required so a lot of packages will find their way
79 to the B<no-section> area.
81 B<Warning>: Use this option with care, it is messy.
83 =item B<-c>, B<--create-dir>
85 This option can used together with the B<-s> option.
87 directory isn't found it will be created automatically.
89 B<Warning>: Use this option with care.
91 =item B<-?>, B<--help>
93 Show the usage message and exit.
95 =item B<-v>, B<--version>
97 Show the version and exit.
105 =item B<DEB_HOST_ARCH>
107 Sets the host architecture.
108 This affects the architecture name used in the package filename.
112 Sets the color mode (since dpkg 1.18.5).
113 The currently accepted values are: B<auto> (default), B<always> and
118 If set, it will be used to decide whether to activate Native Language Support,
119 also known as internationalization (or i18n) support (since dpkg 1.19.0).
120 The accepted values are: B<0> and B<1> (default).
126 Some packages don't follow the name structure
127 I<package>B<_>I<version>B<_>I<architecture>B<.deb>.
128 Packages renamed by B<dpkg-name>
129 will follow this structure.
130 Generally this will have no impact on how
131 packages are installed by
132 L<dselect(1)>/L<dpkg(1)>,
133 but other installation tools
134 might depend on this naming structure.
140 =item B<dpkg-name bar-foo.deb>
142 The file B<bar-foo.deb> will be renamed to bar-foo_1.0-2_i386.deb or
143 something similar (depending on whatever information is in the control
144 part of B<bar-foo.deb>).
146 =item B<find /root/debian/ -name '*.deb' | xargs -n 1 dpkg-name -a>
148 All files with the extension B<deb> in the directory /root/debian and its
149 subdirectory's will be renamed by B<dpkg-name> if required into names
150 with no architecture information.
152 =item B<find -name '*.deb' | xargs -n 1 dpkg-name -a -o -s -c>
155 Your archive will be messed up completely because a lot of packages
156 don't come with section information.
159 =item B<dpkg-deb --build debian-tmp && dpkg-name -o -s .. debian-tmp.deb>
161 This can be used when building new packages.