mirror/centos: improve handling of the conflicting packages
current version of mirror/centos/repo.mk has a couple of serious bugs:
- error handling is flaky and incomplete, that is, the exit status of
yumdownloader is ignored (due to misuse of shell pipeline). Instead
the errors are detected by parsing the yumdownloader log which is
unreliable (and adds a lot of extra code for no gain at all).
- Inconsistent dependencies/conflicts are handled in an extremely flaky
manner: the error code of yumdownloader is ignored, instead the total
number of conflicts (or rather the number of "conflicts with" strings in
the yumdownloader log) is compared with some magic number. No attempts
are made to check which packages were conflicting, also the magic number
should be adjusted whenever a new package is added into the repository
(requirements-rpm.txt).
- Current code uses the default RPM database and thus is unusable on RPM
based systems.
To solve these problems
- process packages one by one, ask yumdownloader to print the URLs
- use a separate RPM database to not interfere with the system one
- use the error code returned by yumdownloader to check for errors
- download the actual packages with wget
- make sure the independent tasks can run in parallel
Reviewed: https:/ /review. openstack. org/147817 /git.openstack. org/cgit/ stackforge/ fuel-main/ commit/ ?id=0d6abfd4cdf db71aa2005c050d 93177a8d77dca8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0d6abfd4cdfdb71 aa2005c050d9317 7a8d77dca8
Author: Alexei Sheplyakov <email address hidden>
Date: Thu Jan 15 22:19:59 2015 +0300
mirror/centos: improve handling of the conflicting packages
current version of mirror/ centos/ repo.mk has a couple of serious bugs:
- error handling is flaky and incomplete, that is, the exit status of
yumdownloader is ignored (due to misuse of shell pipeline). Instead
the errors are detected by parsing the yumdownloader log which is
unreliable (and adds a lot of extra code for no gain at all).
- Inconsistent dependencies/ conflicts are handled in an extremely flaky requirements- rpm.txt) .
manner: the error code of yumdownloader is ignored, instead the total
number of conflicts (or rather the number of "conflicts with" strings in
the yumdownloader log) is compared with some magic number. No attempts
are made to check which packages were conflicting, also the magic number
should be adjusted whenever a new package is added into the repository
(
- Current code uses the default RPM database and thus is unusable on RPM
based systems.
To solve these problems
- process packages one by one, ask yumdownloader to print the URLs
- use a separate RPM database to not interfere with the system one
- use the error code returned by yumdownloader to check for errors
- download the actual packages with wget
- make sure the independent tasks can run in parallel
As a side effect yum bug https:/ /bugzilla. redhat. com/show_ bug.cgi? id=1004089
no longer affects building the ISO
Closes-Bug: #1411526
Partial-Bug: #1396618
Change-Id: I9e7bd1461ef0a2 8a28397c1ba3cb5 6e8409f5e49