I trying to install for example Qt5. But I want to install Qt-5.4 instead of Qt-5.5. So I edit the package.keywords =dev-qt/*-*5.4* ~amd64 But it didn't work. Works only =dev-qt/*-*4* ~amd64 Please make that version can be specified precisely.
Please make sane entries in your configuration files ? But lets see what will the maintainers say...
(In reply to Maksym from comment #0) > I trying to install for example Qt5. But I want to install Qt-5.4 instead of > Qt-5.5. > > So I edit the package.keywords > =dev-qt/*-*5.4* ~amd64 It would work if you removed the wildcard before the 5. Of course, we could add support for the syntax that you have used, though it wouldn't match exactly what I think you intended to match. > But it didn't work. > Works only > =dev-qt/*-*4* ~amd64 This works because of the extension added for bug 402197.
Created attachment 407362 [details] emerge-info
(In reply to Zac Medico from comment #2) > (In reply to Maksym from comment #0) > > I trying to install for example Qt5. But I want to install Qt-5.4 instead of > > Qt-5.5. > > > > So I edit the package.keywords > > =dev-qt/*-*5.4* ~amd64 > > It would work if you removed the wildcard before the 5. Still didn't work. I removed wildcard before 5 and got: --- Invalid atom in /etc/portage/package.keywords: =dev-qt/*-5.4*
(In reply to Maksym from comment #4) > Still didn't work. I removed wildcard before 5 and got: > --- Invalid atom in /etc/portage/package.keywords: =dev-qt/*-5.4* That's right, now I remember that operators are not currently supported with wildcard atoms, except for the specific case which is supported since bug 402197 (where the version part contains 2 wildcards with digits in between).
Just now stumbled across this old bug when trying to select a range of atom versions... Can this be fixed to work with for example: =abc/xyz-*.*.2 and =abc/xyz-*.*.2* Thanks, Martin
https://projects.gentoo.org/pms/6/pms.html#x1-860008.2.6.1 Quote from that chapter on operators, and in particular the '=': = Exactly equal to the specified version. Special exception: if the version specified has an asterisk immediately following it, then only the given number of version components is used for comparison, i. e. the asterisk acts as a wildcard for any further components. When an asterisk is used, the specification must remain valid if the asterisk were removed. (An asterisk used with any other operator is illegal.) So, the '*' is only valid for '='-based atoms, and it doesn't quite act as a glob or something. It basically means "ignore the remainder when comparing this atom". While I wonder if what you want is useful (perhaps you can use SLOT/SUBSLOT or something?) if you really want this to work, a change to PMS is necessary to allow and properly define the (new) behaviour.
(In reply to Fabian Groffen from comment #7) > https://projects.gentoo.org/pms/6/pms.html#x1-860008.2.6.1 > > Quote from that chapter on operators, and in particular the '=': > > = > Exactly equal to the specified version. Special exception: if the > version specified has an asterisk immediately following it, then only the > given number of version components is used for comparison, i. e. the > asterisk acts as a wildcard for any further components... > So, the '*' is only valid for '='-based atoms, and it doesn't quite act as a > glob or something. It basically means "ignore the remainder when comparing > this atom". > > While I wonder if what you want is useful... My use cases are: 1: Only install sys-kernel/gentoo-sources for kernel versions >= release v10. For that, I would naively expect the 'globbing' description to be ">=sys-kernel/gentoo-sources-*.*.10" (or alternatively: "sys-kernel/gentoo-sources-*.*.??*") emerge gives a warning for that example: --- Invalid atom in /etc/portage/package.accept_keywords: >=sys-kernel/gentoo-sources-*.*.10 2: Install the latest versions of media-libs/mesa and any "-r?" versions but not any "rc?" (or "rc??") versions... Thanks kindly for your explanation. (However, is there not a strange exception for "*9999*"?...) That explanation suggests the emerge versions comparison is truncated at the first "*" character... However... The examples given in the "GLOSSARY" section of https://dev.gentoo.org/~zmedico/portage/doc/man/portage.5.html strongly suggests that the "*" is used in the same way as 'globbing' in bash. (There is also the inconsistency for "emerge --search" that offers a regex search but not the "*" globbing search.) This is an old 'feature' that has good scope to unexpectedly break old configs if changed... Hence: Keep the existing behaviour for the use of a single "*" in the version field, and implement bash-like globbing with "*" and "?" only for accept/mask entries that do not use any comparison operators? eg: "sys-kernel/gentoo-sources-*.*.??*" Regards, Martin
> Only install sys-kernel/gentoo-sources for kernel versions >= release v10. > > For that, I would naively expect the 'globbing' description to be ">=sys-kernel/gentoo-sources-*.*.10" *.*.10 matches 0.0.10, right? so 1.0.0 > 0.0.10 Now if there's a usecase for this corner case, I don't know. It does demonstrate why only = is supported here. I believe it's clear you want a selection of versions here that can only be expressed by creating multiple masks. > Install the latest versions of media-libs/mesa and any "-r?" versions but not any "rc?" (or "rc??") versions... Again, I believe the only thing you can currently do is add masks, but they will all be version based. So, it appears you have a good point that perhaps for expressing masks, a more powerful matching scheme could be allowed. I've got no idea though how to get there. I guess this would be up to portage and/or pms teams.