Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252823 - portage-utils-0.1.29: qfile -R mixes up ROOT and EROOT
Summary: portage-utils-0.1.29: qfile -R mixes up ROOT and EROOT
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 252826
  Show dependency tree
 
Reported: 2008-12-28 15:10 UTC by MATSUI Tetsushi
Modified: 2009-01-18 11:04 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MATSUI Tetsushi 2008-12-28 15:10:24 UTC
qfile -R behaves confusingly on prefix, as if EPREFIX is included in ROOT.

% printenv ROOT
% printenv EPREFIX
/Users/tetsushi/Gentoo
% qfile -qC /Users/tetsushi/Gentoo/usr/share/emacs/site-lisp/wl/wl.elc
app-emacs/wanderlust
% qfile -qCR /Users/tetsushi/Gentoo/usr/share/emacs/site-lisp/wl/wl.elc
% qfile -qCR /Users/tetsushi/Gentoo/Users/tetsushi/Gentoo/usr/share/emacs/site-lisp/wl/wl.elc
app-emacs/wanderlust
% ls /Users/tetsushi/Gentoo/Users
ls: cannot access /Users/tetsushi/Gentoo/Users: No such file or directory

As descibed in "Gentoo Prefix Techdocs", ROOT is ROOT and there's another variable EROOT = ${ROOT}${EPREFIX} to include EPREFIX.  Then, I think
qfile -R should not consider about EPREFIX, but only ROOT.

The expected behavior is:
% qfile -qCR /Users/tetsushi/Gentoo/usr/share/emacs/site-lisp/wl/wl.elc
app-emacs/wanderlust
It's same with the result of qfile -qC because I'm not setting ROOT.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-12-30 15:18:38 UTC
I think this title describes the bug better, but it is rather confusing.

I guess..try digging around in the portage-utils source and see if there is anything obvious.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-01-02 15:15:01 UTC
Removing portage-utils@g.o from CC per request until this gets resolved and may need to go back to them.
Comment 3 MATSUI Tetsushi 2009-01-05 02:23:52 UTC
It seems the prefix patch is misusing @GENTOO_PORTAGE_EPREFIX@:

 char portvdb[] = "var/db/pkg";
 char portcachedir[] = "metadata/cache";
-char portroot[_Q_PATH_MAX] = "/";
-char config_protect[_Q_PATH_MAX] = "/etc/";
+char portroot[_Q_PATH_MAX] = "@GENTOO_PORTAGE_EPREFIX@";
+char config_protect[_Q_PATH_MAX] = "@GENTOO_PORTAGE_EPREFIX@/etc/";

should be

-char portvdb[] = "var/db/pkg";
+char portvdb[] = "@GENTOO_PORTAGE_EPREFIX@/var/db/pkg";
 char portcachedir[] = "metadata/cache";
 char portroot[_Q_PATH_MAX] = "/";
-char config_protect[_Q_PATH_MAX] = "/etc/";
+char config_protect[_Q_PATH_MAX] = "@GENTOO_PORTAGE_EPREFIX@/etc/";

Then, qfile works, at least for this case.
Comment 4 Fabian Groffen gentoo-dev 2009-01-18 11:04:23 UTC
fixed, thanks!