[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#24621: dpkg-dev: dpkg-name should handle new sections properly



Package: dpkg-dev
Version: 1.4.0.22
Severity: wishlist

The dpkg-name utility does not currently handle the new section
layout (non-free/sound, etc) properly. Here is a patch to fix this:-

--- /usr/bin/dpkg-name	Sun Apr  5 18:01:25 1998
+++ dpkg-name	Wed Jul 15 10:37:48 1998
@@ -102,12 +103,19 @@
 				s="no-section";
 				stderr "assuming section \`"no-section"' for \`"$1"'";
 			fi
-			if [ "$s" != "non-free" -a "$s" != "contrib" -a "$s" != "no-section" ];
-			then
-				dir=`echo unstable/binary-$a/$s`;
-			else
-				dir=`echo $s/binary-$a`;
-			fi
+ 			case "$s" in
+				non-free/*|contrib/*|non-us/*)
+				ns=`echo $s | sed -e 's:[a-z]\+/::'`
+				fs=`echo $s | sed -e 's:\([a-z]\+\)/.*:\1:'`
+				dir=`echo $fs/binary-$a/$ns`
+				;;
+				non-free|contrib|non-us|no-section)
+				dir=`echo $s/binary-$a`
+				;;
+				*)
+				dir=`echo main/binary-$a/$s`
+				;;
+			esac
 		fi
 	else
 		dir=$destinationdir;

-- System Information
Debian Release: 2.0
Kernel Version: Linux lpsg 2.1.101 #19 Fri Jun 5 18:24:04 BST 1998 i686 unknown


--  
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: