X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=appliance%2Fdebian%2Fmodules%2Fy0_install-guestfsd;h=2d895a05e5d5cf0290cf1d8e9b019806716ff212;hp=3eb8ba9fa5736e73c96f46c59a6056958fdd906a;hb=4312988e0e3acc1f641b70072141916d03623570;hpb=2954491e73d8da7a57eeded2037ae98d1055b3c6 diff --git a/appliance/debian/modules/y0_install-guestfsd b/appliance/debian/modules/y0_install-guestfsd index 3eb8ba9..2d895a0 100755 --- a/appliance/debian/modules/y0_install-guestfsd +++ b/appliance/debian/modules/y0_install-guestfsd @@ -13,8 +13,16 @@ exec 5<&- echo "Module whitelist: $whitelist" find $DEBIRF_ROOT/lib/modules/*/kernel -name '*.ko' $whitelist -a -exec rm '{}' \; -# install additional packages: -PKGLIST=$(< packagelist) +# install additional packages from the package list, but +# only ones which exist in the repository +PKGLIST= +for pkg in $(< packagelist); do + if [ "$(debirf_exec apt-get -s install $pkg 3>&1 1>&2 2>&3 1>&- | grep '^E:' | wc -l)" -gt 0 ]; then + echo "Ignoring package $pkg, because it was not found in this repository." + else + PKGLIST="$PKGLIST $pkg" + fi +done echo "Will add $PKGLIST" debirf_exec apt-get --assume-yes install $PKGLIST debirf_exec apt-get --assume-yes remove vim-tiny dhcp3-client iptables