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. A full package name consists of
39 I<package>B<_>I<version>B<_>I<architecture>B<.>I<package-type>
40 as specified in the control file of the package. The I<version> part
42 consists of the upstream version information optionally followed by a
43 hyphen and the revision information. The I<package-type> part comes
44 from that field if present or fallbacks to B<deb>.
50 =item B<-a>, B<--no-architecture>
52 The destination filename will not have the architecture information.
54 =item B<-k>, B<--symlink>
56 Create a symlink, instead of moving.
58 =item B<-o>, B<--overwrite>
60 Existing files will be overwritten if they have the same name as the
63 =item B<-s>, B<--subdir> [I<dir>]
65 Files will be moved into a subdirectory. If the directory given as argument exists
66 the files will be moved into that directory otherwise the name of
67 the target directory is extracted from the section field in the
68 control part of the package. The target directory will be
69 «unstable/binary-I<architecture>/I<section>».
70 If the section is not found in the control, then B<no-section> is assumed,
71 and in this case, as well as for sections B<non-free> and B<contrib>
72 the target directory is «I<section>/binary-I<architecture>».
73 The section field is not required so a lot of packages will find their way
74 to the B<no-section> area.
76 B<Warning>: Use this option with care, it is messy.
78 =item B<-c>, B<--create-dir>
80 This option can used together with the B<-s> option. If a target
81 directory isn't found it will be created automatically.
83 B<Warning>: Use this option with care.
85 =item B<-?>, B<--help>
87 Show the usage message and exit.
89 =item B<-v>, B<--version>
91 Show the version and exit.
101 Sets the color mode (since dpkg 1.18.5).
102 The currently accepted values are: B<auto> (default), B<always> and
107 If set, it will be used to decide whether to activate Native Language Support,
108 also known as internationalization (or i18n) support (since dpkg 1.19.0).
109 The accepted values are: B<0> and B<1> (default).
115 Some packages don't follow the name structure
116 I<package>B<_>I<version>B<_>I<architecture>B<.deb>.
117 Packages renamed by B<dpkg-name>
118 will follow this structure. Generally this will have no impact on how
119 packages are installed by
120 B<dselect>(1)/B<dpkg>(1),
121 but other installation tools
122 might depend on this naming structure.
128 =item B<dpkg-name bar-foo.deb>
130 The file B<bar-foo.deb> will be renamed to bar-foo_1.0-2_i386.deb or
131 something similar (depending on whatever information is in the control
132 part of B<bar-foo.deb>).
134 =item B<find /root/debian/ -name '*.deb' | xargs -n 1 dpkg-name -a>
136 All files with the extension B<deb> in the directory /root/debian and its
137 subdirectory's will be renamed by B<dpkg-name> if required into names
138 with no architecture information.
140 =item B<find -name '*.deb' | xargs -n 1 dpkg-name -a -o -s -c>
143 Your archive will be messed up completely because a lot of packages
144 don't come with section information.
147 =item B<dpkg-deb --build debian-tmp && dpkg-name -o -s .. debian-tmp.deb>
149 This can be used when building new packages.