Patch for cross-install
Hello.
I've found two problems while using cross-install:
* There is no ftp.de.debian.org/pub/debian anymore, the current location
is now just ftp.de.debian.org/debian. Fortunately, this is very easy to fix.
* The code for getting packages from a "hierarchical repository" worked
very well when it was possible to point it to the binary-hurd-i386 directory
containing the actual packages, but now that we have the pool, if you
point it to a local mirror containing both i386 and hurd-i386
packages, it may happen that cross-install chooses a i386 package
instead of a hurd-i386 one, which should never happen.
In the Packages.gz file for hurd-i386 there are still some packages
having a Filename field saying dists/potato/[...] but none of them
are in the ${plist} or ${oplist} so it should be safe enough to look
for packages of the form _hurd-i386.deb or _all.deb.
The following patch fixes these two problems for me:
--- cross-install.orig 2002-09-04 11:49:29.000000000 +0200
+++ cross-install 2002-09-04 11:49:29.000000000 +0200
@@ -181,7 +181,7 @@
dpkghurdoptions="--force-depends --force-overwrite"
nativeinstall="`pwd`/native-install"
log="`pwd`/install.log"
-download="ftp://ftp.de.debian.org/pub/debian"
+download="ftp://ftp.de.debian.org/debian"
dist="sid"
arch="hurd-i386"
dest=""
@@ -263,8 +263,8 @@
pname=$1
whatifnot=$2
- package=`find ${repository} -name "${pname}_*.deb" 2> /dev/null | tail -n 1`
- matches=`find ${repository} -name "${pname}_*.deb" 2> /dev/null | wc -l`
+ package=`find ${repository} -name "${pname}_*_${arch}.deb" -o -name "${pname}_*_all.deb" 2> /dev/null | tail -n 1`
+ matches=`find ${repository} -name "${pname}_*_${arch}.deb" -o -name "${pname}_*_all.deb" 2> /dev/null | wc -l`
if [ ${matches} = 0 ] ; then
if ! [ -z "$download" ]; then
echo "- ${pname} not found, downloading from ${download}."
@@ -276,8 +276,8 @@
$0 ~ "^Package:" { package = $2 }
$0 ~ "^Filename:" && p == package { print $2 }'`
wget --retr-symlinks -cP ${repository}/partial ${download}/$filename
- package=`find ${repository} -name "${pname}_*.deb" 2> /dev/null | tail -n 1`
- matches=`find ${repository} -name "${pname}_*.deb" 2> /dev/null | wc -l`
+ package=`find ${repository} -name "${pname}_*_${arch}.deb" -o -name "${pname}_*_all.deb" 2> /dev/null | tail -n 1`
+ matches=`find ${repository} -name "${pname}_*_${arch}.deb" -o -name "${pname}_*_all.deb" 2> /dev/null | wc -l`
fi
fi
This solution is not perfect, of course, since you can still retrieve
packages from experimental instead of unstable, but it should be
better than nothing.
Thanks.
Reply to: