Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Mask overlay by default
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
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 753
Location: Glasgow, UK

PostPosted: Mon Mar 17, 2014 11:28 am    Post subject: [Solved]Mask overlay by default Reply with quote

Hello all,

Apologies if this is answered somewhere obvious, but I haven't been able to turn up the answer I want yet.

I want to use an overlay but select only specific packages from it, defaulting to selecting from the main tree rather than the overlay. I don't mind if that means masking the overlay and selectively unmasking, but I don't want to use overlay packages if it is already in the main tree. Is there a way to do this, hackish or otherwise?

-Telemin-
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post


Last edited by Telemin on Mon Mar 17, 2014 12:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Mon Mar 17, 2014 11:38 am    Post subject: Reply with quote

Why not a local overlay without any others.
I copy interesting ebuilds there.
But may be symlinking directories from layman is possible also to get the updates ...
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6186
Location: Dallas area

PostPosted: Mon Mar 17, 2014 11:55 am    Post subject: Re: Mask overlay by default Reply with quote

Telemin wrote:
Hello all,

Apologies if this is answered somewhere obvious, but I haven't been able to turn up the answer I want yet.

I want to use an overlay but select only specific packages from it, defaulting to selecting from the main tree rather than the overlay. I don't mind if that means masking the overlay and selectively unmasking, but I don't want to use overlay packages if it is already in the main tree. Is there a way to do this, hackish or otherwise?


Set PORTDIR_OVERLAY with PORTDIR as the first entry.

In other words if PORTDIR_OVERLAY="/usr/local/portage" and you want gentoo repository to be seen 1st then do this
PORTDIR_OVERLAY="${PORTDIR} /usr/local/portage"

http://wiki.gentoo.org/wiki/Overlay

You can also mask specific packages with <pkg name>::<repository> in package.mask
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 231
Location: Brazil

PostPosted: Mon Mar 17, 2014 12:34 pm    Post subject: Reply with quote

1) Well, to mask all packages of an overlay the syntax in /etc/portage/package.mask is:
*/*::overlay_name

2) To unmask a package from specific overlay the syntax in /etc/portage/package.unmask is:
package_name::overlay_name

Obs.: if you put just package_name in package.unmask, it's by default considered the official Gentoo tree. Which is equivalent to package_name:: gentoo. In other words, writing sys-kernel/gentoo-sources or sys-kernel/gentoo-sources::gentoo is quite the same.


3) My configuration files:
I have four overlays and use just one package of which one of them.

My /etc/portage/package.mask:
*/*::rion
*/*::sunrise
*/*::poly-c
*/*::x11

My /etc/portage/package.unmask:
dev-util/eclipse-sdk-bin::poly-c
sci-geosciences/qgis::rion
media-video/periscope::sunrise
dev-libs/weston::gentoo ## official tree weston unmasked, instead of the x11 overlay one

This way, I have all packages of a specific overlay masked but the one I need.
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 753
Location: Glasgow, UK

PostPosted: Mon Mar 17, 2014 12:34 pm    Post subject: Reply with quote

Thanks Anon-E-Moose, that's exactly what I'm looking for

I had found reference to that before but it must have been an old post as I hadn't realised the ordering had changed, explaining why it didn't work for me.

-Telemin-
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6186
Location: Dallas area

PostPosted: Mon Mar 17, 2014 12:39 pm    Post subject: Reply with quote

rudregues wrote:
This way, I have all packages of a specific overlay masked but the one I need.


Yep, that's also a valid way to do it. I do that with the two overlays that I have rather than adding PORTDIR to PORTDIR_OVERLAY

ulenrich's suggestion also works.

It just depends on what the user wants to do.

Telemin, glad it works for you.
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 231
Location: Brazil

PostPosted: Mon Mar 17, 2014 1:04 pm    Post subject: Reply with quote

Anon-E-moose wrote:

Yep, that's also a valid way to do it. I do that with the two overlays that I have rather than adding PORTDIR to PORTDIR_OVERLAY

Anon-E-moose, I had problems with weston. I wanted Gentoo's tree weston, but portage installed the version in x11 overlay (which was newer). That's why I mask all overlay and unmask package by package. Is it possible to make this using that method you describe?
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6186
Location: Dallas area

PostPosted: Mon Mar 17, 2014 1:38 pm    Post subject: Reply with quote

rudregues wrote:
Anon-E-moose wrote:

Yep, that's also a valid way to do it. I do that with the two overlays that I have rather than adding PORTDIR to PORTDIR_OVERLAY

Anon-E-moose, I had problems with weston. I wanted Gentoo's tree weston, but portage installed the version in x11 overlay (which was newer). That's why I mask all overlay and unmask package by package. Is it possible to make this using that method you describe?


It should work.

From the link about overlays that I posted
Quote:
Unless the PORTDIR_OVERLAY variable has been modified as described below, the default gentoo portage tree will have a priority of -1000. That means that all other overlays take precedence. That is the default behavior, because overlays are designed to "lie over/on top" of the portage tree.


But by putting PORTDIR first in the overlay ordering it should take gentoo first then overlays.

Note: I don't have my system set up this way, so I haven't tested it.

Note 2: There is a make.conf in the layman directory, where it puts the overlays in order of searching, but I'm unsure if it overrides /etc/make.conf or is searched after. A simple test would probably give a definitive answer.
I'll probably try it later and see what the results are.
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6186
Location: Dallas area

PostPosted: Mon Mar 17, 2014 3:30 pm    Post subject: Reply with quote

Ok the docs aren't the easiest to make sense of (or I'm too thick headed)

Original lines from /etc/make.conf (or /etc/portage/make.conf)
Code:
PORTDIR=/usr/portage
PORTDIR_OVERLAY="/usr/local/portage"
source /usr/local/portage/layman/make.conf


with these from my layman make.conf
Code:
PORTDIR_OVERLAY="
/usr/local/portage/layman/xmw
/usr/local/portage/layman/init6
/usr/local/portage/layman/poly-c
$PORTDIR_OVERLAY
"


Yields this
Code:
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/xmw /usr/local/portage/layman/init6 /usr/local/portage/layman/poly-c /usr/local/portage

when "emerge --info |grep PORTDIR" is run.

Running "emerge -pv mesa" gives me
Code:
[ebuild   R   ~] media-libs/mesa-10.1.0::init6 [10.1.0::gentoo]

It tries to pull from ::init6 instead of ::gentoo

------

Changing the lines quoted above for /etc/make.conf to
Code:
source /usr/local/portage/layman/make.conf
PORTDIR=/usr/portage
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage ${PORTDIR}"


Yields this
Code:
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/xmw /usr/local/portage/layman/init6 /usr/local/portage/layman/poly-c /usr/local/portage /usr/portage"

when "emerge --info |grep PORTDIR" is run.

Running "emerge -pv mesa" gives me
Code:
[ebuild   R   ~] media-libs/mesa-10.1.0

Notice it comes from ::gentoo not ::init6


So the highest number wins in PORTAGE_OVERLAY, first one listed is 1, second one is 2, etc.

Sorry Telemin, I told you wrong above. This is the correct way to do it.


Edit to add: In my case I want it to look at my local portage 1st, then gentoo, then overlays so I have PORTDIR_OVERLAY like this
Code:
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} ${PORTDIR} /usr/local/portage"

_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 231
Location: Brazil

PostPosted: Mon Mar 17, 2014 6:05 pm    Post subject: Reply with quote

Anon-E-moose, nice explanation! It should be this way in the wiki (I don't understand very well the way it's written on the wiki).
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6186
Location: Dallas area

PostPosted: Mon Mar 17, 2014 7:20 pm    Post subject: Reply with quote

One more thing, like I said, I want it to look at my local portage 1st, then gentoo, then overlays

But if you want something from init6 such as mesa and regular portage is overriding it
you can override that with "emerge <whatever flags> mesa::init6"


Edit to add: This is how mine is set right now (from make.conf)
Code:
source /usr/local/portage/layman/make.conf
PORTDIR=/usr/portage
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} ${PORTDIR} /usr/local/portage"


which yields this
Code:
PORTDIR_OVERLAY="/usr/local/portage/layman/xmw /usr/local/portage/layman/init6 /usr/local/portage/layman/poly-c /usr/portage /usr/local/portage"


Highest priority is end of line working backwards.

One could also comment out the source command, and set PORTDIR_OVERLAY directly with whatever order one wants.
Note: If you add new overlays then you would need to hand edit PORTDIR_OVERLAY to add it. But it gives fine grained control.
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
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