| View previous topic :: View next topic |
| Author |
Message |
dsomers n00b

Joined: 25 Dec 2004 Posts: 48 Location: Luxembourg
|
Posted: Sun Feb 26, 2006 4:45 pm Post subject: cvs-based vs vanilla ebuilds |
|
|
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 |
|
 |
Maedhros Bodhisattva


Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
Posted: Sun Feb 26, 2006 4:58 pm Post subject: Re: cvs-based vs vanilla ebuilds |
|
|
| 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 |
|
 |
dsomers n00b

Joined: 25 Dec 2004 Posts: 48 Location: Luxembourg
|
Posted: Sun Feb 26, 2006 5:05 pm Post subject: Re: cvs-based vs vanilla ebuilds |
|
|
| 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 |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8656 Location: beyond the rim
|
Posted: Mon Feb 27, 2006 12:03 am Post subject: |
|
|
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 |
|
 |
dsomers n00b

Joined: 25 Dec 2004 Posts: 48 Location: Luxembourg
|
Posted: Mon Feb 27, 2006 10:21 am Post subject: |
|
|
| 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 |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 6506
|
Posted: Mon Feb 27, 2006 11:39 am Post subject: |
|
|
| Genone wrote: | | wibble/wibble-cvs.2.0.ebuild |
Is that preferred instead of:
| Code: | | wibble/wibble-9999.ebuild |
|
|
| Back to top |
|
 |
ecatmur Advocate


Joined: 20 Oct 2003 Posts: 3595 Location: Edinburgh
|
Posted: Mon Feb 27, 2006 11:54 am Post subject: |
|
|
| 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 |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8656 Location: beyond the rim
|
Posted: Mon Feb 27, 2006 8:37 pm Post subject: |
|
|
| 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 |
|
 |
dsomers n00b

Joined: 25 Dec 2004 Posts: 48 Location: Luxembourg
|
Posted: Wed Mar 01, 2006 11:08 pm Post subject: |
|
|
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 |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8656 Location: beyond the rim
|
Posted: Thu Mar 02, 2006 7:43 pm Post subject: |
|
|
| 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 |
|
 |
dsomers n00b

Joined: 25 Dec 2004 Posts: 48 Location: Luxembourg
|
Posted: Sat Mar 04, 2006 9:22 pm Post subject: |
|
|
| 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 |
|
 |
ecatmur Advocate


Joined: 20 Oct 2003 Posts: 3595 Location: Edinburgh
|
|
| Back to top |
|
 |
|