[Yum-devel] [yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/__init__.py yum/rpmsack.py

Tim Lauridsen tim.lauridsen at googlemail.com
Mon May 4 17:52:36 UTC 2009


On 05/04/2009 08:06 AM, James Antill wrote:
> On Sat, 2009-05-02 at 08:15 +0200, Tim Lauridsen wrote:
>    
>> On 05/01/2009 10:44 PM, James Antill wrote:
>>      
>>> New commits:
>>> commit 88a89c661c3856b38f7f01c79622a2d5411c9ca0
>>> Author: James Antill<james at and.org>
>>> Date:   Fri May 1 16:41:43 2009 -0400
>>>
>>>       Do skip-broken before we run postresolve callback, etc.
>>>
>>> diff --git a/yum/__init__.py b/yum/__init__.py
>>> index dc80da2..4ab674d 100644
>>> --- a/yum/__init__.py
>>> +++ b/yum/__init__.py
>>> @@ -716,14 +716,7 @@ class YumBase(depsolve.Depsolve):
>>>
>>>            (rescode, restring) = self.resolveDeps()
>>>            self._limit_installonly_pkgs()
>>> -        self.plugins.run('postresolve', rescode=rescode, restring=restring)
>>>
>>> -        if self.tsInfo.changed:
>>> -            (rescode, restring) = self.resolveDeps(rescode == 1)
>>> -        if self.tsInfo.pkgSack is not None: # rm Transactions don't have pkgSack
>>> -            self.tsInfo.pkgSack.dropCachedData()
>>> -        self.rpmdb.dropCachedData()
>>> -
>>>            #  We_must_  get rid of all the used tses before we go on, so that C-c
>>>            # works for downloads / mirror failover etc.
>>>            self.rpmdb.ts = None
>>> @@ -738,6 +731,14 @@ class YumBase(depsolve.Depsolve):
>>>                self._printTransaction()
>>>                self.verbose_logger.debug('Skip-Broken time: %0.3f' % (time.time() - sb_st))
>>>
>>> +        self.plugins.run('postresolve', rescode=rescode, restring=restring)
>>> +
>>> +        if self.tsInfo.changed:
>>> +            (rescode, restring) = self.resolveDeps(rescode == 1)
>>> +        if self.tsInfo.pkgSack is not None: # rm Transactions don't have pkgSack
>>> +            self.tsInfo.pkgSack.dropCachedData()
>>> +        self.rpmdb.dropCachedData()
>>> +
>>>            self.verbose_logger.debug('Depsolve time: %0.3f' % (time.time() - ds_st))
>>>            return rescode, restring
>>>
>>>        
>> Just curious, why do skip-broken before postresolve, post resolve can
>> change the transaction and the idea was to
>> run skip-broken, when the transaction is no longer changing.
>>      
>
>   So the big problem here is that some plugins which run in postresolve
> expect that the transaction to be read-only (ie. done) so for example if
> "rescode == 1" then the transaction is going to fail, and skip-broken
> breaks that assumption.
>   It also seemed like a bad idea to call it "post resolve" when we still
> have stuff to do to resolve.
>
>   Doing a quick "grep postresolve_hook" in yum-utils, I see:
>
> allowdowngrade == dead, would have been better in preresolve
> changelog == wants a read-only transaction (the reason I did the change)
> fedorakmod == dead, probably wants to be "last" writable
> protect-packages == wants a read-only transaction
> remove-with-leaves == wants to be "last" writable
>
> ...so it looks like the new behaviour is closer to expected ... I can
> change it back, for compatibility, except that openssl and flash have
> conflicted for about 3 months on rawhide so it sucks to never get
> changelogs there.
>   Another way to go would be to add more hooks to true and fine tune the
> behaviour everyone "wants".
>
>    
I have no problem with the changes, just want to know the background :)

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20090504/f408956f/attachment.htm>


More information about the Yum-devel mailing list