+2007-11-22 Guillem Jover <guillem@debian.org>
+
+ * scripts/dpkg-name.sh (getname): Get the package extension from the
+ Package-Type field, or fallback to deb if not present.
+
2007-11-22 Raphael Hertzog <hertzog@debian.org>
* scripts/dpkg-shlibdeps.pl: Add more debug messages. Accept empty
orig.tar.{gz,bz2,lzma} file and won't unexpectedly create "Format: 2.0"
.dsc files.
+ [ Guillem Jover ]
+ * Add support for Package-Type in dpkg-name.
+
[ Updated man pages translations ]
* Swedish (Peter Karlsson)
+2007-11-22 Guillem Jover <guillem@debian.org>
+
+ * dpkg-name.1: Document that the Package-Type field is now supported.
+
2007-11-02 Peter Karlsson <peterk@debian.org>
* po/sv.po: Updated to 1344t.
.\"
.\" This is free software; see the GNU General Public Licence version 2
.\" or later for copying conditions. There is NO warranty.
-.TH dpkg\-name 1 "2007-07-18" "Debian Project" "dpkg utilities"
+.TH dpkg\-name 1 "2007-11-22" "Debian Project" "dpkg utilities"
.SH NAME
dpkg\-name \- rename Debian packages to full package names
.
program which provides an easy way to rename
.B Debian
packages into their full package names. A full package name consists
-of \fI<package>_<version>_<architecture>.deb\fP as specified in the control
-file of the package. The \fI<version>\fP part of the filename consists of
-the upstream version information optionally followed by a hyphen and
-the revision information.
+of \fI<package>_<version>_<architecture>.<package_type>\fP as specified in
+the control file of the package. The \fI<version>\fP part of the filename
+consists of the upstream version information optionally followed by a
+hyphen and the revision information. The \fI<package_type>\fP part comes
+from that field if present or fallbacks to \fBdeb\fP.
.
.SH OPTIONS
.TP
echo "Usage: ${prog} <file>...
${purpose}
-file.deb changes to <package>_<version>_<architecture>.deb
+file.deb changes to <package>_<version>_<architecture>.<package_type>
according to the ``underscores convention''.
Options:
a=`dpkg --print-architecture`;
stderr "assuming architecture \`"$a"' for \`"$1"'";
fi
+ t=`dpkg-deb -f -- "$1" package-type`
+ if [ -z "$t" ];
+ then
+ t=deb
+ fi
if [ -z "$noarchitecture" ];
then
- tname=$p\_$v\_$a.deb;
+ tname=$p\_$v\_$a.$t;
else
- tname=$p\_$v.deb
+ tname=$p\_$v.$t
fi
name=`echo $tname|sed -e 's/ //g'`