X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.common;h=7a09d86f6266d7bf2ee2dfd5c0f42eae6ea629ee;hb=refs%2Ftags%2F5.3.8;hp=08b8feae7ef2106f63a3e2aa351c6365616be2e7;hpb=8e35c394f7bdbfc14e24c0a56d5b90373e65a6bc;p=build.git diff --git a/build.common b/build.common index 08b8feae..7a09d86f 100644 --- a/build.common +++ b/build.common @@ -13,21 +13,6 @@ # for locating pkgs.py export PATH=.:$PATH -# old guests have e.g. mount in /bin but this is no longer part of -# the standard PATH in recent hosts after usrmove, so let's keep it simple -export PATH=$PATH:/bin:/sbin - -# would be much simpler if enter-lxc-namespace was looking along a PATH... -function bin_in_container () { - lxc=$1; shift - binary=$1; shift - for path in $(echo $PATH | sed -e s,:, ); do - [ -f /vservers/$lxc/$path/$binary ] && { echo $path/$binary; return; } - [ -f /vservers/$lxc/rootfs/$path/$binary ] && { echo $path/$binary; return; } - done - echo bin_in_container_cannot_find_$binary -} - # returns 'Fedora' or 'CentOS' for now function pl_getDistro() { if [ -f "/etc/redhat-release" ] ; then @@ -35,12 +20,14 @@ function pl_getDistro() { case $distro in Scientific*) distro="SL" ; esac elif [ -f /etc/lsb-release ] ; then . /etc/lsb-release - echo $DISTRIB_CODENAME + distro=$DISTRIB_CODENAME elif [ -f /etc/debian_version ] ; then case $(cat /etc/debian_version) in 6.*) distro=squeeze ;; - 7.*) distro=wheezy ;; - *) distro=unknown.debian.in.build.common ;; + 7.*) distro=wheezy ;; + # might be that I'm getting 'jessie'sid' just because it's still testing.. + 8.*|jessie*) distro=jessie ;; + *) distro=unknown.debian.in.build.common ;; esac fi [ -z "$distro" ] && { echo "build.common.pl_getDistro-unknown"; exit 1; } @@ -79,7 +66,7 @@ function pl_getReleaseName () { [Ss]L*) releasename=sl$release ;; - squeeze|wheezy|oneiric|precise|quantal|raring|saucy) + squeeze|wheezy|jessie|oneiric|precise|quantal|raring|saucy|trusty|utopic) releasename=$distro ;; *) @@ -586,6 +573,8 @@ function pl_parsePkgs () { # usage: pl_getPackages [-a arch] fcdistro pldistro pkg-file[..s] function pl_getPackages() { pl_parsePkgs package "$@" ; } function pl_getGroups() { pl_parsePkgs group "$@" ; } +function pl_getPips() { pl_parsePkgs pip "$@" ; } +function pl_getGems() { pl_parsePkgs gem "$@" ; } ##############################