Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
specifying package atoms
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
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1740

PostPosted: Fri Feb 08, 2013 2:29 am    Post subject: specifying package atoms Reply with quote

In /etc/portage/package.mask, I am trying to specify that I will accept any version (revision) of foo-1.2.3, but want to mask anything greater than that.

I tried:

Code:

>~some-category/foo-1.2.3


but all that did was get me a "--- Invalid atom in /etc/portage/package.mask:" error message.

Is there a proper way of specifying this?

Thank you in advance.
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Fri Feb 08, 2013 2:40 am    Post subject: Reply with quote

What about
Code:

>=some-category/foo-1.2.4


Any 1.2.3-r? will be less than 1.2.4, but anything 1.2.4 or higher
will be masked. (It does not matter if foo-1.2.4 actually exists
or not.)
_________________
TIA
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1740

PostPosted: Sat Feb 09, 2013 9:24 am    Post subject: Reply with quote

wcg wrote:
What about
Code:

>=some-category/foo-1.2.4


Any 1.2.3-r? will be less than 1.2.4, but anything 1.2.4 or higher
will be masked. (It does not matter if foo-1.2.4 actually exists
or not.)


The problem with that (which I don't believe would occur in this case, but it could happen) is that it wouldn't work if a 1.2.3.1 comes out. I believe that 1.2.3.1 is not a member of the ~1.2.3 set, which means that I want to mask it, but the expression you suggested would not do that.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2551
Location: Here and Away Again

PostPosted: Sat Feb 09, 2013 1:03 pm    Post subject: Re: specifying package atoms Reply with quote

Teegrins, curmudgeon!

As far as I know,

Code:

>~some-category/foo-1.2.3

indeed is an invalid atom due to the ~ symbol.
Right now I can't think of a more proper way, but how about:

Code:

>some-category/foo-1.2.3-r99

Apologies if I misunderstood your wants. ^^;


Just some thoughts~
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Feb 09, 2013 2:38 pm    Post subject: Re: specifying package atoms Reply with quote

Chiitoo wrote:
Code:

>some-category/foo-1.2.3-r99
is not optimal because 1.2.3.1 > 1.2.3-r99. There is no perfect solution with today's syntax. About the best you can do is choose the first version that is greater than the one you want to keep (whether it exists or not) and do a >= mask on that. For instance, in this hypothetical example, I would choose
Code:
>=foo-1.2.4
- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1740

PostPosted: Sat Feb 09, 2013 10:04 pm    Post subject: Re: specifying package atoms Reply with quote

Chiitoo wrote:

Right now I can't think of a more proper way, but how about:

Code:

>some-category/foo-1.2.3-r99


That does seem like the best way (well, maybe -r9999) of accomplishing what I want.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2551
Location: Here and Away Again

PostPosted: Sun Feb 10, 2013 12:38 am    Post subject: Re: specifying package atoms Reply with quote

John R. Graham wrote:
Chiitoo wrote:
Code:

>some-category/foo-1.2.3-r99
is not optimal because 1.2.3.1 > 1.2.3-r99. There is no perfect solution with today's syntax. About the best you can do is choose the first version that is greater than the one you want to keep (whether it exists or not) and do a >= mask on that. For instance, in this hypothetical example, I would choose
Code:
>=foo-1.2.4
- John

Thanks; I wasn't sure if 1.2.3.1 was wanted or not, and also thanks for the confirmation that there isn't a perfect solution at the time as I was going to dig into it. :)

curmudgeon wrote:
Chiitoo wrote:

Right now I can't think of a more proper way, but how about:

Code:

>some-category/foo-1.2.3-r99


That does seem like the best way (well, maybe -r9999) of accomplishing what I want.

So I guess I read it right, 1.2.3.1 was not wanted. Yeah, the r99 was just an example without knowing the package, and its versioning scheme at all.

If I'm right, that should keep you within the boundaries of the one version, and its revisions, until they go higher.
_________________
Kindest of regardses.
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