[Yum-devel] [PATCH] Making package removal easier to test

Florian Festi ffesti at redhat.com
Wed Nov 28 11:20:00 UTC 2007


Tim Lauridsen wrote:
> Tim Lauridsen wrote:
>> James Bowes wrote:
>>> While fiddling with some test cases for package removal, I ran into some
>>> problems with transactioninfo. It looks at the class of a package to
>>> determine if its from the rpmdb, from a repo, or a local rpm. This makes
>>> testing with fake packages hard.
>>>
>>> The attached patch switches from looking at the class type to adding a
>>> package_state variable to packages, which can be easily set for testing.
>>> I don't think it will break any code using yum out in the wild.
>>>
>>> Thoughts?
>>>
>>> -James
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Yum-devel mailing list
>>> Yum-devel at linux.duke.edu
>>> https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
>>
>> Looks sane to me
>>
>> Tim
>> _______________________________________________
>> Yum-devel mailing list
>> Yum-devel at linux.duke.edu
>> https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
> 
> Since nobody have complained loudly :)
> Can you then please commit it, it is very usefull for some of my 
> skip-broken testcases.

Ehm, sorry. I should have spoken up on the list earlier...

I have an alternative fix for this problem. My solution has the advantage 
that we don't need another Package class so we can use POs more flexible in 
the test code while James Bowes' solution is a bit less hacky. I did not yet 
manage to discuss with James which solution to choose - so I put that issue 
on the list now.

Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Packages-that-are-to-be-removed-can-t-be-local-packa.patch
Type: text/x-patch
Size: 2691 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20071128/0ada5418/attachment.bin 


More information about the Yum-devel mailing list