Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] masking a package from an overlay (only)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Jun 07, 2012 10:52 pm    Post subject: [TIP] masking a package from an overlay (only) Reply with quote

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
View user's profile Send private message
olek
Apprentice
Apprentice


Joined: 22 Oct 2011
Posts: 173

PostPosted: Fri Jun 08, 2012 12:03 pm    Post subject: Reply with quote

You can even mask a whole overlay and unmask only some it's packages you really want.
http://oleeekchoff.blogspot.de/2012/06/use-overlay-for-specific-packages-only.html
_________________
https://plaintext.blog
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Jun 09, 2012 2:36 am    Post subject: Reply with quote

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
View user's profile Send private message
olek
Apprentice
Apprentice


Joined: 22 Oct 2011
Posts: 173

PostPosted: Sat Jun 09, 2012 6:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Sat Jun 09, 2012 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun Jun 10, 2012 2:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
olek
Apprentice
Apprentice


Joined: 22 Oct 2011
Posts: 173

PostPosted: Mon Jun 11, 2012 12:52 pm    Post subject: Reply with quote

You're right, thanks ;)
_________________
https://plaintext.blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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