- # search e.g. vserver-planetflow.post in config.<pldistro> or in config.planetlab otherwise
- postfile=$(pl_locateDistroFile ../build/ ${pldistro} vserver-${NAME}.post || : )
+ # running pip or gem requires connectivity, and DNS
+ # so we expose the build-vm's /etc/resolv.conf to the current vdir
+ mkdir -p ${vdir}/etc
+ cp /etc/resolv.conf ${vdir}/etc
+
+ # this requires pip to be available in sliceimage at that point
+ # fedora and debian -> python-pip
+ # on fedora the command is called pip-python (sigh.)
+ for pip in $systempips; do
+ echo " * pip installing $pip"
+ chroot ${vdir} pip -v install $pip || chroot ${vdir} pip-python -v $pip || \
+ echo " * WARNING image $systemslice - pip install $pip failed"
+ done
+
+ # same for gems; comes with ruby in fedora but ruby-devel is most likely a good thing
+ # we add --no-rdoc --no-ri to keep it low
+ for gem in $systemgems; do
+ echo " * gem installing $gem"
+ chroot ${vdir} gem install --no-rdoc --no-ri $gem || \
+ echo " * WARNING image $systemslice - gem install $gem failed"
+ done
+
+ # search e.g. sliceimage-planetflow.post in config.<pldistro> or in config.planetlab otherwise
+ postfile=$(pl_locateDistroFile ../build/ ${pldistro} sliceimage-${NAME}.post || : )