Mark dependencies to be skipped even if we skip the packages installation.

We have to loop over the dependencies and their packages to know which
dependency we may skip.

So we must not skip the install_packages step too early.
This commit is contained in:
Matthieu Gautier 2017-01-31 17:34:27 +01:00
parent 1d94429947
commit 7246d81aa1
1 changed files with 3 additions and 4 deletions

View File

@ -302,10 +302,6 @@ class BuildEnv:
def install_packages(self): def install_packages(self):
autoskip_file = pj(self.build_dir, ".install_packages_ok") autoskip_file = pj(self.build_dir, ".install_packages_ok")
if os.path.exists(autoskip_file):
print("SKIP")
return
if self.distname in ('fedora', 'redhat', 'centos'): if self.distname in ('fedora', 'redhat', 'centos'):
package_installer = 'dnf' package_installer = 'dnf'
elif self.distname in ('debian', 'ubuntu'): elif self.distname in ('debian', 'ubuntu'):
@ -321,6 +317,9 @@ class BuildEnv:
if packages: if packages:
packages_list += packages packages_list += packages
dep.skip = True dep.skip = True
if os.path.exists(autoskip_file):
print("SKIP")
return
if packages_list: if packages_list:
command = "sudo {package_installer} install {packages_list}".format( command = "sudo {package_installer} install {packages_list}".format(
package_installer = package_installer, package_installer = package_installer,