addition for adding the universe feed to ubuntu for python-rpm that is crucially...
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 23 Jan 2014 13:46:31 +0000 (14:46 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 23 Jan 2014 13:46:31 +0000 (14:46 +0100)
lbuild-initvm.sh

index 2cb3dc2..45fdb8d 100755 (executable)
@@ -720,6 +720,14 @@ function devel_or_vtest_tools () {
            chroot $rootfs_path rpm -aq > $rootfs_path/init-lxc.rpms
            ;;
        debootstrap)
+           # for ubuntu
+           if grep -iq ubuntu /vservers/$vserver/rootfs/etc/lsb-release 2> /dev/null; then
+               # on ubuntu, at this point we end up with a single feed in /etc/apt/sources.list
+               # we need at least to add the 'universe' feed for python-rpm
+               ( cd /vservers/$vserver/rootfs/etc/apt ; head -1 sources.list | sed -e s,main,universe, > sources.list.d/universe.list )
+               # also adding a link to updates sounds about right
+               ( cd /vservers/$vserver/rootfs/etc/apt ; head -1 sources.list | sed -e 's, main,-updates main,' > sources.list.d/updates.list )
+           fi
            chroot $rootfs_path apt-get update
            for package in $packages ; do
                # close stdin in an attempt to avoid this hanging