From 8fd4c5df34a5b5497584cde7787ef04b5b69aed7 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 22 Nov 2007 04:12:16 +0200 Subject: [PATCH] dpkg-name: Add support for Package-Type --- ChangeLog | 5 +++++ debian/changelog | 3 +++ man/ChangeLog | 4 ++++ man/dpkg-name.1 | 11 ++++++----- scripts/dpkg-name.sh | 11 ++++++++--- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc4bb345..ec356cef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-22 Guillem Jover + + * 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 * scripts/dpkg-shlibdeps.pl: Add more debug messages. Accept empty diff --git a/debian/changelog b/debian/changelog index 6b64d0fa..5b3a911e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ dpkg (1.14.10) UNRELEASED; urgency=low 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) diff --git a/man/ChangeLog b/man/ChangeLog index 78eb221d..deeaece9 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2007-11-22 Guillem Jover + + * dpkg-name.1: Document that the Package-Type field is now supported. + 2007-11-02 Peter Karlsson * po/sv.po: Updated to 1344t. diff --git a/man/dpkg-name.1 b/man/dpkg-name.1 index 140baff8..eb415737 100644 --- a/man/dpkg-name.1 +++ b/man/dpkg-name.1 @@ -3,7 +3,7 @@ .\" .\" 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 . @@ -20,10 +20,11 @@ This manual page documents the program which provides an easy way to rename .B Debian packages into their full package names. A full package name consists -of \fI__.deb\fP as specified in the control -file of the package. The \fI\fP part of the filename consists of -the upstream version information optionally followed by a hyphen and -the revision information. +of \fI__.\fP as specified in +the control file of the package. The \fI\fP part of the filename +consists of the upstream version information optionally followed by a +hyphen and the revision information. The \fI\fP part comes +from that field if present or fallbacks to \fBdeb\fP. . .SH OPTIONS .TP diff --git a/scripts/dpkg-name.sh b/scripts/dpkg-name.sh index 76286931..f2d4922a 100755 --- a/scripts/dpkg-name.sh +++ b/scripts/dpkg-name.sh @@ -34,7 +34,7 @@ usage () { echo "Usage: ${prog} ... ${purpose} -file.deb changes to __.deb +file.deb changes to __. according to the ``underscores convention''. Options: @@ -80,11 +80,16 @@ getname () { 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'` -- 2.39.5