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

d-i building broken?



Hi,
Today, I updated my repo and build-system, then tried to build d-i again.
It failed miserably with "dpkg: version '1%3a1.17.1-2' has bad syntax: invalid character in version number".
I think it's due to dpkg upgrade, and especially because of the commit 662d97913fe8d9f4aa784ca7595c415c65202148 which introduce stricter (but correct) parsing,
and the fact that installer/build/util/get_packages get its package versions from the filename, which are escaped ("a:b" becomes "a%3ab").

I've not seen any complaint out there, so, maybe I'm the only one affected? Weird.

Anyway, if that's not the case, I've attached a patch, which implements the easiest, and maybe most "secure" way of getting the version string, but is obviously slower: ask dpkg.

Regards,
Thibaut Girka.
diff --git a/installer/build/util/get-packages b/installer/build/util/get-packages
index 47b5aa9..a80fe16 100755
--- a/installer/build/util/get-packages
+++ b/installer/build/util/get-packages
@@ -189,7 +189,7 @@ lnpkg() {
 	local pkg=$1; local dir=$2 debdir=$3
 	local L LV l lv
 	for l in `find $dir -name "${pkg}_*" 2>/dev/null`; do
-		lv=${l%_*}; lv=${lv##*_};
+		lv=$(dpkg -f "$l" Version); lv=${lv%"Version: "}
 		if dpkg --compare-versions "$lv" gt "$LV"; then
 			L=$l LV=$lv
 		fi

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: