The package libvirt-bin is a transitional package in Debian and should
not be used anymore.
Ubuntu Xenial is an exception here.
Because of that this change also adds the possibility to use "not:" to
exclude distros in files/debs/* just as "dist:" limits distros.
Depends-On: Icc59ea79f54d4ff8751f2e353ee3530fff3d961e
Closes-Bug: #1673840
Change-Id: I3998a7178d14ec40eae5cb199d66da9546cd6ccf
... | ... |
@@ -10,7 +10,9 @@ iputils-arping |
10 | 10 |
kpartx |
11 | 11 |
libjs-jquery-tablesorter # Needed for coverage html reports |
12 | 12 |
libmysqlclient-dev |
13 |
-libvirt-bin # NOPRIME |
|
13 |
+libvirt-bin # dist:xenial NOPRIME |
|
14 |
+libvirt-clients # not:xenial NOPRIME |
|
15 |
+libvirt-daemon-system # not:xenial NOPRIME |
|
14 | 16 |
libvirt-dev # NOPRIME |
15 | 17 |
mysql-server # NOPRIME |
16 | 18 |
parted |
... | ... |
@@ -1148,6 +1148,19 @@ function _parse_package_files { |
1148 | 1148 |
fi |
1149 | 1149 |
fi |
1150 | 1150 |
|
1151 |
+ # Look for # not:xxx in comment |
|
1152 |
+ if [[ $line =~ (.*)#.*not:([^ ]*) ]]; then |
|
1153 |
+ # We are using BASH regexp matching feature. |
|
1154 |
+ package=${BASH_REMATCH[1]} |
|
1155 |
+ distros=${BASH_REMATCH[2]} |
|
1156 |
+ # In bash ${VAR,,} will lowercase VAR |
|
1157 |
+ # Look for a match in the distro list |
|
1158 |
+ if [[ ${distros,,} =~ ${DISTRO,,} ]]; then |
|
1159 |
+ # If match then skip this package |
|
1160 |
+ inst_pkg=0 |
|
1161 |
+ fi |
|
1162 |
+ fi |
|
1163 |
+ |
|
1151 | 1164 |
if [[ $inst_pkg = 1 ]]; then |
1152 | 1165 |
echo $package |
1153 | 1166 |
fi |
... | ... |
@@ -1166,6 +1179,8 @@ function _parse_package_files { |
1166 | 1166 |
# - ``# NOPRIME`` defers installation to be performed later in `stack.sh` |
1167 | 1167 |
# - ``# dist:DISTRO`` or ``dist:DISTRO1,DISTRO2`` limits the selection |
1168 | 1168 |
# of the package to the distros listed. The distro names are case insensitive. |
1169 |
+# - ``# not:DISTRO`` or ``not:DISTRO1,DISTRO2`` limits the selection |
|
1170 |
+# of the package to the distros not listed. The distro names are case insensitive. |
|
1169 | 1171 |
function get_packages { |
1170 | 1172 |
local xtrace |
1171 | 1173 |
xtrace=$(set +o | grep xtrace) |
... | ... |
@@ -24,7 +24,11 @@ DEBUG_LIBVIRT=$(trueorfalse True DEBUG_LIBVIRT) |
24 | 24 |
function install_libvirt { |
25 | 25 |
if is_ubuntu; then |
26 | 26 |
install_package qemu-system |
27 |
- install_package libvirt-bin libvirt-dev |
|
27 |
+ if [[ ${DISTRO} == "xenial" ]]; then |
|
28 |
+ install_package libvirt-bin libvirt-dev |
|
29 |
+ else |
|
30 |
+ install_package libvirt-clients libvirt-daemon-system libvirt-dev |
|
31 |
+ fi |
|
28 | 32 |
pip_install_gr libvirt-python |
29 | 33 |
if [[ ${DISTRO} == "trusty" && ${EBTABLES_RACE_FIX} == "True" ]]; then |
30 | 34 |
# Work around for bug #1501558. We can remove this once we |