Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571236 - postfix[*] in _p (patch) in package.accept_keywords
Summary: postfix[*] in _p (patch) in package.accept_keywords
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-08 01:48 UTC by Anton Bolshakov
Modified: 2016-01-08 16:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2016-01-08 01:48:35 UTC
Hi,

I'm trying to unmask a package which has the following template:
name-1.0_p20160101

It was possible to keyword such packages with the following line in the previous releases:
=category/name-1.0_p2016*

However, it stopped working with the latest stable portage.

I am not able to find a relevant documentation. Could you help to clarify is that a bug? If not, how the asterisk sign can be used in this case?

I really want to keywords such packages based on a year or month.

Thank you.
Comment 1 Zac Medico gentoo-dev 2016-01-08 02:10:41 UTC
(In reply to Anton Bolshakov from comment #0)
> I am not able to find a relevant documentation. Could you help to clarify is
> that a bug?

It's a result of the "fix" for bug 560466, which cause the operator to only match on boundaries between version parts.

> If not, how the asterisk sign can be used in this case?

The closest thing would be >=category/name-1.0_p20160101

> I really want to keywords such packages based on a year or month.

You could ask the ebuild maintainer to split the versions like _p2016_p0101 or something like that, so there's a boundary there.
Comment 2 Anton Bolshakov 2016-01-08 04:16:03 UTC
interesting. First of all, the suggested _p2016_p0101 looks completely weird, so let's not go there.

I think the main problem is that "*" operates with a string but it is getting applied against a number which is basically a hack.

The bug #560466 changed that behaviour and it acts more like "~>" operator in ruby:

Gentoo: (=2.3*)
Ruby "~>2.3.0" "equal to 2.3.0 or greater than 2.3.0, but less than 2.4.0"

However, it will not allow to specify ~>2.3.2 logic.
Comment 3 Martin Väth 2016-01-08 16:37:21 UTC
(In reply to Anton Bolshakov from comment #2)
> I think the main problem is that "*" operates with a string

"*" is only a mnemonic to shell globbing. It operates as the implementation defines it to operate.

> but it is getting applied against a number which is basically a hack.

Even worse, it is applied on a _version_ number which in general can be written as various different string representations. The previous implementation was a not officially documented huge list of hacks and exception and was not useful in many cases.

I am very glad that this is now standardized officially (and in a manner appropriate for a version number instead of a string, even if it violates some expectation; but every agreement will violate some expectation).

> Gentoo: (=2.3*)
> Ruby "~>2.3.0" "equal to 2.3.0 or greater than 2.3.0, but less than 2.4.0"

Not exactly: 2.3_alpha would also be matched, although it is lower than 2.3
(not to mention that 2.3.0 is _strictly_ greater than 2.3; even 2.3.0_alpha lies strictly in-between.)