Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46982 - euse fails with stackable/cascading profiles
Summary: euse fails with stackable/cascading profiles
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 70571 71493 71722 72223 72852 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-06 11:11 UTC by Mike Nerone
Modified: 2004-12-08 03:35 UTC (History)
16 users (show)

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


Attachments
euse.patch (euse.patch,570 bytes, patch)
2004-09-21 13:44 UTC, Elan Ruusamäe
Details | Diff
replacement written in bash (euse.new,11.51 KB, text/plain)
2004-10-16 19:19 UTC, Marius Mauch (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Nerone 2004-04-06 11:11:10 UTC
I'm using the new cascading profiles:

  # ls -l /etc/make.profile 
  lrwxrwxrwx    1 root     root           48 Apr  6 03:31 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2004.0

euse's search for package descriptions needs to be massaged to work with cascading profiles. Here's the error:

  # euse -i lcms           
  EUSE exiting with following errors: 
  requires read permissions for /etc/make.profile/../use.desc. 
  requires read permissions for /etc/make.profile/../use.local.desc.

Reproducible: Always
Steps to Reproduce:
1. Symlink /etc/make.profile to a cascading profile
2. Execute euse (-i, -c, -d, or -e)
Actual Results:  
EUSE exiting with following errors: 
requires read permissions for /etc/make.profile/../use.desc. 
requires read permissions for /etc/make.profile/../use.local.desc.

Expected Results:  
euse should locate the use.desc and use.local.desc files and succeed.
Comment 1 Mike Nerone 2004-04-06 11:21:07 UTC
Oops..BTW, I'm using app-portage/gentoolkit-0.2.0_pre8. Should have included that info. Sorry. *blush*
Comment 2 Michael van Bracht 2004-08-04 23:01:41 UTC
I also have this problem, it is caused by two line in the euse perlscript

our $FUse_desc      = "/etc/make.profile/../use.desc";
our $FUse_local     = "/etc/make.profile/../use.local.desc";

For a normal profile, this simply looks in /usr/prortage/profile/ for use description files, but if you use a cascaded profile, the path /etc/make.profile links to, can be unexpectedly deep and euse won't find the file by simply going one step back in the directory tree.

I do not know if there are plan to give every cascaded profile own use.desc files to stack them, too. If not the solution is imho very simple, because in the past, with flat profiles, euse always got its files from /usr/portage/profile/, just get it from there, without traversal or any fancy stuff, just the get_portdir function from ufed schould be built into euse, in case someone changes it in /etc/make.conf
Comment 3 Lance Albertson (RETIRED) gentoo-dev 2004-09-17 05:48:27 UTC
I just encountered this when I changed to the new cascading profile for hardened. where it points to:

ln -s ../usr/portage/profiles/hardened/x86 make.profile

And recieve these errors:

ignite root # euse -i tcpd
EUSE exiting with following errors:
requires read permissions for /etc/make.profile/../use.desc.
requires read permissions for /etc/make.profile/../use.local.desc.

Someone told me that karltk really works on this package, but according to his away on dev.g.o, he won't be around much this month. More and more cascading profiles will be appearing, so, there's going to be more need for this fix soon! I'd do it, but I'm swamped as it is!
Comment 4 Elan Ruusamäe 2004-09-21 13:41:28 UTC
wanted to say, also hit to this bug.

lrwxrwxrwx  1 root root 48 Sep 19 22:33 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2004.2/
Comment 5 Elan Ruusamäe 2004-09-21 13:44:45 UTC
Created attachment 40123 [details, diff]
euse.patch

here's the way i resolved the issue.
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2004-10-06 07:27:52 UTC
You want the perl equiv of this:

PORTAGE_TREE="$(portageq portdir)/profiles"
Comment 7 Nicholas Jones (RETIRED) gentoo-dev 2004-10-06 07:33:43 UTC
Looking at it, euse is going to become quite difficult to manage
due to cascades. Would probably be best to acquire the USE flags
from 'portageq env USE'. Just remember that changing environment
vars that portage uses will cause changes to the results... Which
could be used to determine the final results of a change.

There is no good interface to masked variables though.

If someone wants to outline a set of 'required' and 'desireable'
attributes to look up in an API of some sort, it'd be cool if you'd
assign a bug to dev-portage@gentoo.org in the Portage Development
project with all the info.
Comment 8 Daniel Webert 2004-10-06 07:41:58 UTC
btw: ufed has also probs w/ the profiles ...

<snip>
couldn't open use.defaults at /usr/sbin/ufed line 513.
</snip>
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2004-10-16 19:19:07 UTC
Created attachment 42000 [details]
replacement written in bash

Ok, here is a new euse written in bash that fixes this problem (and probably a
few others). Please test and see if I've forgotten something important.
Comment 10 Aaron Walker (RETIRED) gentoo-dev 2004-10-16 19:42:18 UTC
Looks good from what I can tell ; all the options seem to work as intended.  Has my thumbs up.
Comment 11 Robin Smidsrød 2004-11-03 23:19:19 UTC
Just wanted to say I have the problem too. Changing to a non-stacked profile solved the problem (default-x86-2004.2 in my situation).

Please don't remove euse unless some other adequate solution comes up. It's very handy to have around.

It's the "vi /etc/sudoers" vs "visudo" discussion all over again. :)
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2004-11-09 19:24:25 UTC
*** Bug 70571 has been marked as a duplicate of this bug. ***
Comment 13 Marius Mauch (RETIRED) gentoo-dev 2004-11-17 07:15:57 UTC
*** Bug 71493 has been marked as a duplicate of this bug. ***
Comment 14 Marius Mauch (RETIRED) gentoo-dev 2004-11-18 23:22:04 UTC
*** Bug 71722 has been marked as a duplicate of this bug. ***
Comment 15 Henrik Brix Andersen 2004-11-24 13:15:46 UTC
*** Bug 72223 has been marked as a duplicate of this bug. ***
Comment 16 Lance Albertson (RETIRED) gentoo-dev 2004-11-27 23:07:59 UTC
Has this new version been keyworded or put into cvs yet? I'd like to test it out in a packaged form or at least get it in there.
Comment 17 Marius Mauch (RETIRED) gentoo-dev 2004-11-30 03:00:21 UTC
*** Bug 72852 has been marked as a duplicate of this bug. ***
Comment 18 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 03:35:07 UTC
in 0.2.0_rc1