diff --git a/yum-fix-skip-broken-with-post-depsolve-change.patch b/yum-fix-skip-broken-with-post-depsolve-change.patch new file mode 100644 index 0000000..97f8d5b --- /dev/null +++ b/yum-fix-skip-broken-with-post-depsolve-change.patch @@ -0,0 +1,67 @@ +commit 359ae828b915101116bb57fbe2645eae056c158b +Author: Tim Lauridsen +Date: Tue Mar 2 16:47:45 2010 +0100 + + Make skipbroken run again if packages has been added to transaction by a postresolve plugin + +diff --git a/yum/__init__.py b/yum/__init__.py +index f21001d..69af7ba 100644 +--- a/yum/__init__.py ++++ b/yum/__init__.py +@@ -866,20 +866,16 @@ class YumBase(depsolve.Depsolve): + # works for downloads / mirror failover etc. + self.rpmdb.ts = None + +- # if depsolve failed and skipbroken is enabled +- # The remove the broken packages from the transactions and +- # Try another depsolve +- if self.conf.skip_broken and rescode==1: +- self.skipped_packages = [] # reset the public list of skipped packages. +- sb_st = time.time() +- rescode, restring = self._skipPackagesWithProblems(rescode, restring) +- self._printTransaction() +- self.verbose_logger.debug('Skip-Broken time: %0.3f' % (time.time() - sb_st)) ++ # do the skip broken magic, if enabled and problems exist ++ (rescode, restring) = self._doSkipBroken(rescode, restring) + + self.plugins.run('postresolve', rescode=rescode, restring=restring) + + if self.tsInfo.changed: + (rescode, restring) = self.resolveDeps(rescode == 1) ++ # If transaction was changed by postresolve plugins then we should run skipbroken again ++ (rescode, restring) = self._doSkipBroken(rescode, restring, clear_skipped=False ) ++ + if self.tsInfo.pkgSack is not None: # rm Transactions don't have pkgSack + self.tsInfo.pkgSack.dropCachedData() + self.rpmdb.dropCachedData() +@@ -887,6 +883,21 @@ class YumBase(depsolve.Depsolve): + self.verbose_logger.debug('Depsolve time: %0.3f' % (time.time() - ds_st)) + return rescode, restring + ++ def _doSkipBroken(self,rescode, restring, clear_skipped=True): ++ ''' do skip broken if it is enabled ''' ++ # if depsolve failed and skipbroken is enabled ++ # The remove the broken packages from the transactions and ++ # Try another depsolve ++ if self.conf.skip_broken and rescode==1: ++ if clear_skipped: ++ self.skipped_packages = [] # reset the public list of skipped packages. ++ sb_st = time.time() ++ rescode, restring = self._skipPackagesWithProblems(rescode, restring) ++ self._printTransaction() ++ self.verbose_logger.debug('Skip-Broken time: %0.3f' % (time.time() - sb_st)) ++ return (rescode, restring) ++ ++ + def _skipPackagesWithProblems(self, rescode, restring): + ''' Remove the packages with depsolve errors and depsolve again ''' + +@@ -983,7 +994,7 @@ class YumBase(depsolve.Depsolve): + for po in skipped_list: + msg = _(" %s from %s") % (str(po),po.repo.id) + self.verbose_logger.info(msg) +- self.skipped_packages = skipped_list # make the skipped packages public ++ self.skipped_packages.extend(skipped_list) # make the skipped packages public + else: + # If we cant solve the problems the show the original error messages. + self.verbose_logger.info("Skip-broken could not solve problems") diff --git a/yum.spec b/yum.spec index 419941f..22fc023 100644 --- a/yum.spec +++ b/yum.spec @@ -3,7 +3,7 @@ Summary: RPM installer/updater Name: yum Version: 3.2.26 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz @@ -16,6 +16,7 @@ Patch3: yum-multilib-policy-best.patch Patch4: no-more-exactarchlist.patch Patch5: geode-arch.patch Patch6: yum-HEAD.patch +Patch7: yum-fix-skip-broken-with-post-depsolve-change.patch URL: http://yum.baseurl.org/ BuildArch: noarch @@ -60,6 +61,7 @@ can notify you when they are available via email, syslog or dbus. %patch4 -p0 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build make @@ -110,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/lib/yum-plugins %changelog +* Wed Mar 3 2010 Seth Vidal - 3.2.26-5 +- patch to fix rhbug 567346 + * Wed Feb 17 2010 Seth Vidal - 3.2.26-4 - new HEAD to fix the fix to the fix