summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-04-23 18:13:58 +0200
committerDaniel Baumann <daniel@debian.org>2011-04-23 18:58:34 +0200
commitb494afa3841a496e612cc7afe010dfe6dd80d3c9 (patch)
treedc96fc0200b248293bb4634e44d8f4d6eaf3dbe6 /scripts
parentf4370639f9a8caab6974412ac9e5981158e518c4 (diff)
downloadvyos-live-build-b494afa3841a496e612cc7afe010dfe6dd80d3c9.tar.gz
vyos-live-build-b494afa3841a496e612cc7afe010dfe6dd80d3c9.zip
Moving apt pinning workaround to the correct place.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_chroot_apt8
-rwxr-xr-xscripts/build/lb_chroot_sources27
2 files changed, 18 insertions, 17 deletions
diff --git a/scripts/build/lb_chroot_apt b/scripts/build/lb_chroot_apt
index aa1db74bf..240fcecd1 100755
--- a/scripts/build/lb_chroot_apt
+++ b/scripts/build/lb_chroot_apt
@@ -133,14 +133,6 @@ case "${1}" in
esac
fi
- # Rebuild apt indices from scratch.
- # Due to the fact that apt doesn't understand pinning on the
- # fly, we need to manuall remove the cached indices and fetch
- # them again.
- rm -f chroot/var/cache/apt/* > /dev/null 2>&1 || true
- rm -f chroot/var/lib/apt/lists/* > /dev/null 2>&1 || true
- Apt chroot update
-
# Creating stage file
Create_stagefile .stage/chroot_apt
;;
diff --git a/scripts/build/lb_chroot_sources b/scripts/build/lb_chroot_sources
index a4b3dcd0a..a864361a3 100755
--- a/scripts/build/lb_chroot_sources
+++ b/scripts/build/lb_chroot_sources
@@ -461,30 +461,39 @@ EOF
done
fi
- # Installing aptitude
+ # Installing aptitude (FIXME)
if [ "${LB_APT}" = "aptitude" ] && [ ! -x /usr/bin/aptitude ]
then
Chroot chroot "apt-get ${APT_OPTIONS} update"
Chroot chroot "apt-get ${APT_OPTIONS} install aptitude"
fi
- # Temporary hack (FIXME)
- if [ "${LB_DERIVATIVE}" = "true" ]
- then
- _APT="--force-yes"
- fi
+ # Rebuild apt indices from scratch.
+ # Due to the fact that apt doesn't understand
+ # pinning on the fly, we need to manually remove
+ # the cached indices and rebuild them again.
+ rm -rf chroot/var/cache/apt/*.bin
Apt chroot update
- Apt chroot "upgrade ${_APT}"
- Apt chroot "dist-upgrade ${_APT}"
# Installing keyring packages
if [ -n "${LB_KEYRING_PACKAGES}" ]
then
+ # Temporary hack (FIXME)
+ if [ "${LB_DERIVATIVE}" = "true" ]
+ then
+ _APT="--force-yes"
+ fi
+
Apt chroot "--force-yes install ${LB_KEYRING_PACKAGES}"
- Apt chroot update
fi
+ rm -rf chroot/var/cache/apt/*.bin
+
+ Apt chroot update
+ Apt chroot "upgrade"
+ Apt chroot "dist-upgrade"
+
if [ "${LB_CACHE_INDICES}" = "true" ]
then
mkdir -p cache/indices_bootstrap