diff options
author | Daniel Baumann <daniel@debian.org> | 2011-09-30 15:42:51 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-09-30 15:42:51 +0200 |
commit | fc0d34a31bbdad97344b2fc783c2cb80ff666aec (patch) | |
tree | aa6c269cfeff19c1b7b0080b97db53c721ea8949 /scripts | |
parent | cf4f1c8acef06bce4b026e6b7be255fe44401b59 (diff) | |
download | vyos-live-build-fc0d34a31bbdad97344b2fc783c2cb80ff666aec.tar.gz vyos-live-build-fc0d34a31bbdad97344b2fc783c2cb80ff666aec.zip |
Making top sources.list conditional, not everyone necessarily always uses that.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/lb_chroot_archives | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives index 200b20da7..7e029d7f9 100755 --- a/scripts/build/lb_chroot_archives +++ b/scripts/build/lb_chroot_archives @@ -432,7 +432,10 @@ EOF echo "deb file:/root/packages ./" > chroot/etc/apt/sources.list.d/packages.list # Move top-level sources away, otherwise apt always preferes it, even for local packages - mv chroot/etc/apt/sources.list chroot/etc/apt/sources.list.d/zz-sources.list + if [ -e chroot/etc/apt/sources.list ] + then + mv chroot/etc/apt/sources.list chroot/etc/apt/sources.list.d/zz-sources.list + fi # Removing depends Remove_package @@ -593,7 +596,10 @@ EOF Create_lockfile .lock # Restore top-level sources - mv chroot/etc/apt/sources.list.d/zz-sources.list chroot/etc/apt/sources.list + if [ -e chroot/etc/apt/sources.list.d/zz-sources.list ] + then + mv chroot/etc/apt/sources.list.d/zz-sources.list chroot/etc/apt/sources.list + fi # Configure generic indices # Don't do anything if it's not required |