FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-30-2008, 03:55 AM
"Dan McGee"
 
Default The official pacman repository branch, master, updated. v3.1.4-182-gb48f703

On Thu, May 29, 2008 at 10:42 PM, Allan McRae <mcrae_allan@hotmail.com> wrote:
> Dan McGee wrote:
>> One currently known issue I am working on: my versioncmp change a
>> while back definitely broke something, and I've written a short vercmp
>> test script that I plan on incorporating into our codebase. You can
>> see that on my working branch.
>>
>
> You probably should add the mirror cases for these -1 return situations.
>
> +# with pkgrel, simple
> +runtest 1.5.0-1 1.5.0-1 0
> +runtest 1.5.0-1 1.5.0-2 -1
> +runtest 1.5.0-1 1.5.1-1 -1
> +runtest 1.5.0-2 1.5.1-1 -1
> +
> +# with pkgrel, mixed lengths
> +runtest 1.5-1 1.5.1-1 -1
> +runtest 1.5-2 1.5.1-1 -1
> +runtest 1.5-2 1.5.1-2 -1
>
> I've been bitten by bugs not picked up because of missing test cases too
> many times in the past not to include them.

I know what you mean. I've already added another two test cases
tonight after I got all the existing ones to pass and there were still
problems. I made this script super easy to add test cases to
though, so no real excuse to not include them.

-Dan

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-30-2008, 04:59 AM
"Dan McGee"
 
Default The official pacman repository branch, master, updated. v3.1.4-182-gb48f703

On Thu, May 29, 2008 at 11:50 PM, Allan McRae <mcrae_allan@hotmail.com> wrote:
> Dan McGee wrote:
>>
>> On Thu, May 29, 2008 at 10:55 PM, Dan McGee <dpmcgee@gmail.com> wrote:
>>
>> Let me know what you think of my latest working branch commit, this
>> solves the original problem as well as makes the vercmptest.sh script
>> a bit more powerful.
>>
>> http://code.toofishes.net/gitweb.cgi?p=pacman.git;a=commitdiff;h=c574bfd8e3a ae0e791e3a15f0d35554b157d91c8
>>
>
> Are these comparison really what is wanted?
> runtest 1.5 1.5-1 0
> runtest 1.5-1 1.5 0
> runtest 1.1-1 1.1 0

Yes, quite sure. First off, we have the old behavior, which matches
the above. Second, we have the reason for the old behavior, which is
that a depend can be specified as such:
foobar<=1.5
and foobar 1.5-13 needs to meet this requirement (aka 1.5 cmp 1.5-13
should yield 0). So a pkgrel is no sign of being newer, only a sign of
something different to compare, and not to be compared until the
versions are identical.

> I would have assumed the package with the pkgrel is newer. In the current
> situation version 1.5 is equivalent to 1.5-1, 1.5-2, 1.5-3, etc. I think
> this would be better:
>
> } else if(*ptr1 == '-') {
> /* ptr1 has hit the pkgrel and ptr2 has not.
> * version 2 is newer iff we are not at the end of ptr2
> */
> - ret = *ptr2 ? -1 : 0;
> + ret = *ptr2 ? -1 : 1;
> goto cleanup;
> } else if(*ptr2 == '-') {
> /* ptr2 has hit the pkgrel and ptr1 has not.
> * version 1 is newer iff we are not at the end of ptr1
> */
> - ret = *ptr1 ? 1 : 0;
> + ret = *ptr1 ? 1 : -1;
> goto cleanup;
> }
>
> Allan

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-30-2008, 11:51 AM
Xavier
 
Default The official pacman repository branch, master, updated. v3.1.4-182-gb48f703

On Fri, May 30, 2008 at 5:42 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
>
> You probably should add the mirror cases for these -1 return situations.
>

That makes perfect sense, I was thinking the same.
But it is much better to automate the mirror cases, as Dan did with
his last patch

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-30-2008, 11:59 AM
Xavier
 
Default The official pacman repository branch, master, updated. v3.1.4-182-gb48f703

On Fri, May 30, 2008 at 6:59 AM, Dan McGee <dpmcgee@gmail.com> wrote:
>
> Yes, quite sure. First off, we have the old behavior, which matches
> the above. Second, we have the reason for the old behavior, which is
> that a depend can be specified as such:
> foobar<=1.5
> and foobar 1.5-13 needs to meet this requirement (aka 1.5 cmp 1.5-13
> should yield 0). So a pkgrel is no sign of being newer, only a sign of
> something different to compare, and not to be compared until the
> versions are identical.
>

That is all correct, but to be honest, I don't like much the
ambiguity, obscurity and confusion caused by this, which would not
happen if we only used versioned deps like : foobar <= 1.5-1 or foobar
< 1.6-1

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 09:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org