as the code of lb_chroot_sources in "live build 3.0 a4" has changed I
have prepared a new patch
regards
Mark
--
IT-Infrastrukturen.ORG
m...@it-infrastrukturen.org
+++ Free infrastructure software for all. +++
--- lb_chroot_sources_ORIG_NEW 2010-10-03 14:34:14.000000000 +0200
+++ lb_chroot_sources 2010-10-03 14:57:15.000000000 +0200
@@ -238,6 +238,11 @@
if Find_files chroot/root/local-packages/*.deb
then
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^\(deb[-]*[a-z]* file:/live/image/debian\)|#...@lb bu...@#\1|' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
# If we bootstrapped a minimal chroot, we need
# to install apt-utils before we have have
# completed all the indices.
@@ -246,6 +251,11 @@
Chroot chroot "apt-get update"
;;
esac
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^...@lb bu...@#||' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
# Check depends
Check_package chroot/usr/bin/apt-ftparchive apt-utils
@@ -419,11 +429,31 @@
# Installing aptitude
if [ "${LB_APT}" = "aptitude" ] && [ ! -x /usr/bin/aptitude ]
then
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^\(deb[-]*[a-z]* file:/live/image/debian\)|#...@lb bu...@#\1|' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
Chroot chroot "apt-get ${APT_OPTIONS} update"
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^...@lb bu...@#||' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
Chroot chroot "apt-get ${APT_OPTIONS} install aptitude"
fi
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^\(deb[-]*[a-z]* file:/live/image/debian\)|#...@lb bu...@#\1|' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
Apt update
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^...@lb bu...@#||' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
Apt upgrade
Apt dist-upgrade
@@ -431,7 +461,17 @@
if [ -n "${LB_KEYRING_PACKAGES}" ]
then
Chroot chroot "apt-get --yes --force-yes install ${LB_KEYRING_PACKAGES}"
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^\(deb[-]*[a-z]* file:/live/image/debian\)|#...@lb bu...@#\1|' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
Apt update
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^...@lb bu...@#||' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
fi
if [ "${LB_CACHE_INDICES}" = "true" ]
@@ -649,8 +689,18 @@
fi
# Updating indices
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^\(deb[-]*[a-z]* file:/live/image/debian\)|#...@lb bu...@#\1|' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
Apt update
+ if [ -f chroot/etc/apt/sources.list.d/live-media.list ]
+ then
+ sed -i 's|^...@lb bu...@#||' chroot/etc/apt/sources.list.d/live-media.list
+ fi
+
# Cleaning apt package cache
rm -rf chroot/var/cache/apt
mkdir -p chroot/var/cache/apt/archives/partial