Gentoo Forums
Gentoo Forums
Quick Search: in
cvs-based vs vanilla ebuilds
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dsomers
n00b
n00b


Joined: 25 Dec 2004
Posts: 48
Location: Luxembourg

PostPosted: Sun Feb 26, 2006 4:45 pm    Post subject: cvs-based vs vanilla ebuilds Reply with quote

I've written an ebuild to grab a package from cvs (since working on the bleeding edge is so much fun)... however, I noticed that the cvs-based ebuild did not unmerge the existing vanilla-based package... is that normal?

e.g. if I emerge wibble-1.0, and then I emerge wibble-cvs-2.0, I would have expected wibble-1.0 to be unmerged when wibble-cvs-2.0 merges itself (as it has a higher version number).
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Sun Feb 26, 2006 4:58 pm    Post subject: Re: cvs-based vs vanilla ebuilds Reply with quote

dsomers wrote:
e.g. if I emerge wibble-1.0, and then I emerge wibble-cvs-2.0, I would have expected wibble-1.0 to be unmerged when wibble-cvs-2.0 merges itself (as it has a higher version number).

As far as portage is concerned, wibble and wibble-cvs are completely different packages. If you put collision-protect in your FEATURES portage will complain when asked to overwrite files belonging to another package, but that's not a default setting.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
dsomers
n00b
n00b


Joined: 25 Dec 2004
Posts: 48
Location: Luxembourg

PostPosted: Sun Feb 26, 2006 5:05 pm    Post subject: Re: cvs-based vs vanilla ebuilds Reply with quote

Maedhros wrote:
dsomers wrote:
e.g. if I emerge wibble-1.0, and then I emerge wibble-cvs-2.0, I would have expected wibble-1.0 to be unmerged when wibble-cvs-2.0 merges itself (as it has a higher version number).

As far as portage is concerned, wibble and wibble-cvs are completely different packages. If you put collision-protect in your FEATURES portage will complain when asked to overwrite files belonging to another package, but that's not a default setting.


I was afraid that was how things worked.

Sure, wibble and wibble-cvs are different, but they are also the same... its just the former gets the source from distfiles, whilst the later just gets the source from a cvs respository.

It would be nice if portage didn't see them as different (i.e. it just ignored that -cvs tag).
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8656
Location: beyond the rim

PostPosted: Mon Feb 27, 2006 12:03 am    Post subject: Reply with quote

As you like to live on the really bleeding edge, you might just try the new cvs versioning code in portage-2.1, which would mean you'd have the following ebuilds:
Code:
wibble/wibble-1.0.ebuild
wibble/wibble-cvs.2.0.ebuild

Yes, they are both in the same directory and yes, that's a dot between the "cvs" and the "2.0", not a dash. Portage will treat those both as different versions of the same package (and btw, the version number behind the -cvs doesn't actually matter, -cvs versions will always be ranked higher than non-cvs versions)
Back to top
View user's profile Send private message
dsomers
n00b
n00b


Joined: 25 Dec 2004
Posts: 48
Location: Luxembourg

PostPosted: Mon Feb 27, 2006 10:21 am    Post subject: Reply with quote

Genone wrote:
As you like to live on the really bleeding edge, you might just try the new cvs versioning code in portage-2.1, which would mean you'd have the following ebuilds:
Code:
wibble/wibble-1.0.ebuild
wibble/wibble-cvs.2.0.ebuild

Yes, they are both in the same directory and yes, that's a dot between the "cvs" and the "2.0", not a dash. Portage will treat those both as different versions of the same package (and btw, the version number behind the -cvs doesn't actually matter, -cvs versions will always be ranked higher than non-cvs versions)


Ah great. That works a treat. However, it looks like the cvs prefix is now treated as if it was part of the version number (instead of being silently ignored)... so I now have to add
Code:
MY_P=$(get_version_component_range 2-9)
to strip it.

Yes, I like to live on the really bleeding edge - especially when doing thing like installing freetype from cvs (and the 2.2 release is looking really good!).

BTW, is there a way to attempt to get the source from an alternate cvs repository? I maintain a local mirror of some repositories and would rather my ebuilds attempts to hit them first before falling back to the downstream ones? cvs_src_unpack seems to die directly when it has an error so I'm unable to trap that it failed and reset ECVS_SERVER to an alternative server and try again.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 6506

PostPosted: Mon Feb 27, 2006 11:39 am    Post subject: Reply with quote

Genone wrote:
wibble/wibble-cvs.2.0.ebuild

Is that preferred instead of:
Code:
wibble/wibble-9999.ebuild
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Mon Feb 27, 2006 11:54 am    Post subject: Reply with quote

dsomers wrote:
BTW, is there a way to attempt to get the source from an alternate cvs repository? I maintain a local mirror of some repositories and would rather my ebuilds attempts to hit them first before falling back to the downstream ones? cvs_src_unpack seems to die directly when it has an error so I'm unable to trap that it failed and reset ECVS_SERVER to an alternative server and try again.


Utterly nasty, but you could alias die="return 1" while calling cvs_src_unpack.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8656
Location: beyond the rim

PostPosted: Mon Feb 27, 2006 8:37 pm    Post subject: Reply with quote

PaulBredbury wrote:
Genone wrote:
wibble/wibble-cvs.2.0.ebuild

Is that preferred instead of:
Code:
wibble/wibble-9999.ebuild

If it is a live cvs ebuild, yes, however you can't use the syntax I described in any public repository yet as it will cause problems for portage-2.0 users.
Back to top
View user's profile Send private message
dsomers
n00b
n00b


Joined: 25 Dec 2004
Posts: 48
Location: Luxembourg

PostPosted: Wed Mar 01, 2006 11:08 pm    Post subject: Reply with quote

One slight oddity...

If I have wibble-cvs.0.ebuild to build from HEAD and wibble-cvs.123.ebuild to build release 123, then it appears that 123 is considered higher than 0 (HEAD) - but this is wrong as the HEAD is always newer than a tagged version.

So after emerging wibble-cvs.0 (HEAD), if I do emerge wibble-cvs.123 portage thinks its upgrading the package whereas in reality its downgrading it.

Also, if wibble-cvs.0 is installed, if I do an emerge wibble, portage then thinks it should upgrade to wibble-cvs.123, which is actually a downgrade.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8656
Location: beyond the rim

PostPosted: Thu Mar 02, 2006 7:43 pm    Post subject: Reply with quote

Well, if you have two cvs versions than thwy will be compared by normal versioning rules, and 0 is lower than 123.
Back to top
View user's profile Send private message
dsomers
n00b
n00b


Joined: 25 Dec 2004
Posts: 48
Location: Luxembourg

PostPosted: Sat Mar 04, 2006 9:22 pm    Post subject: Reply with quote

Genone wrote:
Well, if you have two cvs versions than thwy will be compared by normal versioning rules, and 0 is lower than 123.


Yeah.... but if 0 is used for HEAD (which is what I think the generally accepted convention is), then it is logically higher than other builds, even if numerically it is lower.
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sat Mar 04, 2006 9:37 pm    Post subject: Reply with quote

If 123 is a fixed release then it may as well take a normal version number. The cvs versioning scheme is for branches, not for releases.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum