View previous topic :: View next topic |
Author |
Message |
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Jun 07, 2012 10:52 pm Post subject: [TIP] masking a package from an overlay (only) |
|
|
This is a recent discovery of mine, and came about due to pentoo's overlay having packages that essencially compete for inclusion when using '--newuse'.
A number of their packages have a 'pentoo' useflag (openrc, and acpid to give two examples), but are the same revisions as those provided by gentoo, so, if using '--newuse' these then want to be inlcuded in the list of packages to be re-merged. As I don't emerge anything from their overlay, but simply want it around for comparisons sake, with the one or two packages from their tree I've merged being replicated into a local PACKAGE_OVERLAY, I was getting a bit tired of it, and was about ready have layman --delete the whole thing.
I've been using gentoo for years, but wasn't really getting my head around how to go about prioritising one package over another, something I've done, only on a grand scale with 'package' as a target, using package.mask. I was sure there was probably some simple method of doing this but after perusing the manpages, and various searches, I was none the wiser, but thought, OK, its just a mask, and so I can probably provide the overlay ... bingo, as the old folks say.
/etc/portage/package.mask or /etc/portage/package.mask/<package>
Code: | sys-apps/openrc::pentoo |
This masks the overlay version only ... ta da!
I'm sure that this is old news to some, but I wasn't aware of it, hopefully its of some use to someone.
best ... khayyam |
|
Back to top |
|
|
olek Apprentice
Joined: 22 Oct 2011 Posts: 173
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat Jun 09, 2012 2:36 am Post subject: |
|
|
olek ...
could you provide an example, the link doesn't work for me in either in ff (w/ noscript), or elinks.
thanks in advance ... khay |
|
Back to top |
|
|
olek Apprentice
Joined: 22 Oct 2011 Posts: 173
|
Posted: Sat Jun 09, 2012 6:23 pm Post subject: |
|
|
Layman and portage are still missing features like giving package sources like overlays and the portage tree priorities, so that packages out of the portage tree are chosen above versions in unofficial overlays, which one only added for one specific package for example.
But there is a way to work around that feature lack. Actually, portage prioritizes some config files over others, so:
First
Make sources be chosen above others.
Mask all packages of the source, which shall has lower priority. Create a file in /etc/portage/package.mask/ , let's name it "lowprio". Write:
Quote: | */*::<NAME_OF_SOME_OVERLAY>
*/*::<NAME_OF_SOME_OTHER_OVERLAY>
[...]
*/*::sabayon |
i.e.
Now, all packages in that overlay are masked. They are all blocked and one will not be able to emerge them, they wouldn't show up in portage as long one calls for them, but still they are blocked. So all the version of a package in the overlays/sources one didn't put into that file, will be chosen above the versions in the overlays/sources still available.
Second
Make the wanted packages available again.
One didn't add overlays for no reason, there are still packages, one wants to emerge. We unmask those special packages, after all packages of it's overlay were masked.
Create a file in /etc/portage/package.unmask/ , let's call this one "wanted". Write:
Quote: | <SOME_CATEGORY>/<SOME_PACKAGE>::<SOME_OVERLAY>
[...]
x11-misc/gpaste::sabayon
media-sound/tuxguitar::sabayon |
i.e.
Those packages are now available in the versions those overlays provide again. And this packages only. _________________ https://plaintext.blog |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Sat Jun 09, 2012 8:13 pm Post subject: |
|
|
olek, you've got some nice Gentoo material on your blog! You should consider getting it added to Planet Larry. _________________ “And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010 |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Jun 10, 2012 2:09 pm Post subject: |
|
|
olek ...
thanks for the clarification, right after posting I figured it'd be '*/*::overlay' as it follows the same logic, but thought it better to leave you to reply incase you has some other method in mind.
olek wrote: | [...] They are all blocked and one will not be able to emerge them, they wouldn't show up in portage as long one calls for them, but still they are blocked. |
I assume that "wouldn't" is a typo, and it should read: "[...] they will show up in portage if one calls for them, but they will be blocked."
thanks again & best
khay |
|
Back to top |
|
|
olek Apprentice
Joined: 22 Oct 2011 Posts: 173
|
|
Back to top |
|
|
|
|
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
|
|