[pacman-dev] [PATCH] Add test case for the perl 5.20 dependency breakage

Allan McRae allan at archlinux.org
Mon Jun 9 07:25:53 EDT 2014


On 07/06/14 22:38, Andrew Gregory wrote:
> On 06/02/14 at 09:39am, Allan McRae wrote:
>> On 01/06/14 22:21, Florian Pritz wrote:
>>> This test currently fails.
>>>
>>
>> Is this not the same as sync406.py?
> 
> Not quite.  They're very similar, but sync406.py deals with packages
> in the active transaction, which requires smarter dependency
> resolution.  This involves installed packages not part of the
> transaction, requiring us to change what is now just a check that the
> transaction doesn't break local packages to actually fixing those
> breakages.
> 

Great - thanks for looking into this.

>>> Signed-off-by: Florian Pritz <bluewind at xinu.at>
>>> ---
>>>  test/pacman/tests/sync-perl520-breakage.py | 21 +++++++++++++++++++++
>>>  1 file changed, 21 insertions(+)
>>>  create mode 100644 test/pacman/tests/sync-perl520-breakage.py

Not convince about the name including perl520 in it.  But I do agree
with Dan about the need to rename most of our tests to be more
descriptive.  How about:

sync-update-package-removing-required-provides

>>>
>>> diff --git a/test/pacman/tests/sync-perl520-breakage.py b/test/pacman/tests/sync-perl520-breakage.py
>>> new file mode 100644
>>> index 0000000..3c1c145
>>> --- /dev/null
>>> +++ b/test/pacman/tests/sync-perl520-breakage.py
>>> @@ -0,0 +1,21 @@
>>> +self.description = "Upgrade a package that loose a provides entry which moves to a dedicated package"
>>> +
>>> +lp1 = pmpkg("perl", "5.18-1")

I know using real package names is useful when constructing a test, but
keeping them simple improves understanding when reading them later

"pkg1", "1-1"

>>> +lp1.provides = ["perl-scalar-list-utils=1.27"]

"provide=1"

>>> +lp2 = pmpkg("perl-data-optlist")

"pkg2"

etc...

>>> +lp2.depends = ["perl-scalar-list-utils"]
>>> +
>>> +for p in lp1, lp2:
>>> +	self.addpkg2db("local", p)
>>> +
>>> +p1 = pmpkg("perl", "5.20-1")
>>> +p2 = pmpkg("perl-scalar-list-utils", "1.38-1")
>>> +
>>> +for p in p1, p2:
>>> +	self.addpkg2db("sync", p)
>>> +
>>> +self.args = "-Su"
>>> +
>>> +self.addrule("PACMAN_RETCODE=0")
>>> +self.addrule("PKG_VERSION=perl-scalar-list-utils|1.38-1")
>>> +self.addrule("PKG_VERSION=perl|5.20-1")
>>>
> 
> 
> 



More information about the pacman-dev mailing list