Adds new tag for testonly packages in package lists
Also introduces a new parameter INSTALL_TESTONLY_PACKAGES in the stackrc with False as default value. Setting it to True stack.sh will install all packages tagged with the tag testonly in the package lists. Includes needed packages for Ubuntu and Fedora fixes bug #1203680 Change-Id: I911a6601819a34262853bba0658f6751148bfbec
This commit is contained in:
parent
55181d2cfb
commit
71d5630c4a
@ -1,5 +1,10 @@
|
|||||||
gcc
|
gcc
|
||||||
|
libffi-dev # testonly
|
||||||
|
libmysqlclient-dev # testonly
|
||||||
|
libpq-dev # testonly
|
||||||
|
libssl-dev # testonly
|
||||||
libxml2-dev
|
libxml2-dev
|
||||||
|
libxslt1-dev # testonly
|
||||||
python-dev
|
python-dev
|
||||||
python-eventlet
|
python-eventlet
|
||||||
python-routes
|
python-routes
|
||||||
@ -10,3 +15,4 @@ python-wsgiref
|
|||||||
python-pastedeploy
|
python-pastedeploy
|
||||||
python-xattr
|
python-xattr
|
||||||
python-iso8601
|
python-iso8601
|
||||||
|
zlib1g-dev # testonly
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
gcc
|
gcc
|
||||||
|
libffi-devel # testonly
|
||||||
libxml2-devel
|
libxml2-devel
|
||||||
|
libxslt-devel # testonly
|
||||||
|
mysql-devel # testonly
|
||||||
|
openssl-devel # testonly
|
||||||
|
postgresql-devel # testonly
|
||||||
python-argparse
|
python-argparse
|
||||||
python-devel
|
python-devel
|
||||||
python-eventlet
|
python-eventlet
|
||||||
@ -9,3 +14,4 @@ python-routes
|
|||||||
python-sqlalchemy
|
python-sqlalchemy
|
||||||
python-wsgiref
|
python-wsgiref
|
||||||
pyxattr
|
pyxattr
|
||||||
|
zlib-devel # testonly
|
||||||
|
26
functions
26
functions
@ -317,16 +317,36 @@ function get_packages() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Assume we want this package
|
||||||
|
package=${line%#*}
|
||||||
|
inst_pkg=1
|
||||||
|
|
||||||
|
# Look for # dist:xxx in comment
|
||||||
if [[ $line =~ (.*)#.*dist:([^ ]*) ]]; then
|
if [[ $line =~ (.*)#.*dist:([^ ]*) ]]; then
|
||||||
# We are using BASH regexp matching feature.
|
# We are using BASH regexp matching feature.
|
||||||
package=${BASH_REMATCH[1]}
|
package=${BASH_REMATCH[1]}
|
||||||
distros=${BASH_REMATCH[2]}
|
distros=${BASH_REMATCH[2]}
|
||||||
# In bash ${VAR,,} will lowecase VAR
|
# In bash ${VAR,,} will lowecase VAR
|
||||||
[[ ${distros,,} =~ ${DISTRO,,} ]] && echo $package
|
# Look for a match in the distro list
|
||||||
continue
|
if [[ ! ${distros,,} =~ ${DISTRO,,} ]]; then
|
||||||
|
# If no match then skip this package
|
||||||
|
inst_pkg=0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ${line%#*}
|
# Look for # testonly in comment
|
||||||
|
if [[ $line =~ (.*)#.*testonly.* ]]; then
|
||||||
|
package=${BASH_REMATCH[1]}
|
||||||
|
# Are we installing test packages? (test for the default value)
|
||||||
|
if [[ $INSTALL_TESTONLY_PACKAGES = "False" ]]; then
|
||||||
|
# If not installing test packages the skip this package
|
||||||
|
inst_pkg=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $inst_pkg = 1 ]]; then
|
||||||
|
echo $package
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
IFS=$OIFS
|
IFS=$OIFS
|
||||||
done
|
done
|
||||||
|
3
stackrc
3
stackrc
@ -275,6 +275,9 @@ USE_SCREEN=${SCREEN_DEV:-$USE_SCREEN}
|
|||||||
# Set default screen name
|
# Set default screen name
|
||||||
SCREEN_NAME=${SCREEN_NAME:-stack}
|
SCREEN_NAME=${SCREEN_NAME:-stack}
|
||||||
|
|
||||||
|
# Do not install packages tagged with 'testonly' by default
|
||||||
|
INSTALL_TESTONLY_PACKAGES=${INSTALL_TESTONLY_PACKAGES:-False}
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
# End:
|
# End:
|
||||||
|
Loading…
Reference in New Issue
Block a user