Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Re: [PATCH] unprivileged mode: generate PORTAGE_DEPCACHEDIR
Date: Mon, 10 Nov 2014 05:28:19
Message-Id: 54604CEF.2090507@gentoo.org
In Reply to: [gentoo-portage-dev] Re: [PATCH] unprivileged mode: generate PORTAGE_DEPCACHEDIR by Duncan <1i5t5.duncan@cox.net>
1 On 11/09/2014 08:58 PM, Duncan wrote:
2 > Zac Medico posted on Sun, 09 Nov 2014 15:24:40 -0800 as excerpted:
3 >
4 >> [...] then automatically make PORTAGE_DEPCACHEDIR relative to
5 >> the current target root (which should always be writable for
6 >> unprivileged mode).
7 >
8 > Why?
9
10 The "unprivileged mode" is similar to existing prefix support. The
11 "unprivileged mode" is basically useless unless your target root is
12 writable. Therefore, it's a sane assumption. It won't affect you unless
13 you use the new "unprivileged mode". If you do happen to use it, then
14 you will probably appreciate this patch.
15
16 As far as I can tell, the following discussion is about a bug that is
17 essentially unrelated to my proposed patch:
18
19 > Why does emerge --pretend need a writable target root in the first place,
20 > or it dies a horrible death (traceback)?
21 >
22 > I keep root read-only by default, making it writable when I'm updating.
23 > When I'm simply doing an emerge --pretend, however, whether simply to
24 > satisfy my own curiosity or because I'm posting a reply to some other
25 > user where the output from emerge --pretend would be useful, why does
26 > emerge die a horrible death and traceback, when all I wanted was
27 > --pretend output that shouldn't be changing the target root at all and
28 > thus shouldn't /need/ a writable target root in the first place?
29 >
30 > https://bugs.gentoo.org/show_bug.cgi?id=490732
31 >
32 > FWIW, $PORTAGE_TMPDIR is writable, as is /run/lock (and thus
33 > /var/run/lock). In both tracebacks in the bug, it's a *.portage_lockfile
34 > that's not writable. Why are those not in (possibly some subdir of)
35 > /run/lock in the first place, or in $PORTAGE_TMPDIR, given the temporary
36 > nature of the files? At least for --pretend.
37
38 That bug should be easy to fix. We just need to handle the readonly case.
39 --
40 Thanks,
41 Zac

Replies