Package: debian-installer Severity: normal Tags: patch Usertags: gsoc2010 Hello,
(my earlier email to debian-boot did not attract any comment, I'm resubmitting this as a bug so as to document and keep track of it) The get-packages script from installer/build/util/ uses "sort | tail -1" to get the most recent version of a given udeb from apt.udeb/cache. This may cause images to be built with outdated udebs. The attached patch makes it use 'dpkg --compare-versions' instead. Thanks, -- Jeremie Koenig <j...@jk.fr.eu.org> http://jk.fr.eu.org
Index: debian/changelog =================================================================== --- debian/changelog (revision 63446) +++ debian/changelog (working copy) @@ -69,8 +69,11 @@ [ Otavio Salvador ] * Move hppa, ia64, powerpc and s390 to linux 2.6.32 (ABI 5). - -- Christian Perrier <bubu...@debian.org> Sun, 14 Feb 2010 17:06:27 +0100 + [ Jeremie Koenig ] + * util/get-packages: fix selection of the most recent packages. + -- Jeremie Koenig <j...@jk.fr.eu.org> Thu, 17 Jun 2010 17:01:14 +0200 + debian-installer (20100211) unstable; urgency=low [ Frans Pop ] Index: build/util/get-packages =================================================================== --- build/util/get-packages (revision 63446) +++ build/util/get-packages (working copy) @@ -186,7 +186,13 @@ lnpkg() { local pkg=$1; local dir=$2 debdir=$3 - local L="`find $dir -name "${pkg}_*" 2>/dev/null | sort | tail -n 1`" + local L LV l lv + for l in `find $dir -name "${pkg}_*" 2>/dev/null`; do + lv=${l%_*}; lv=${lv##*_}; + if dpkg --compare-versions "$lv" gt "$LV"; then + L=$l LV=$lv + fi + done if [ -e "$L" ]; then ln -f $L $debdir/$pkg.$TYPE fi