Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: Zac Medico <zmedico@g.o>, gentoo-portage-dev@l.g.o, "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] Support disabling docompress for binary package builds
Date: Sat, 03 Nov 2018 23:16:35
Message-Id: efcb4419-a5a7-59c7-9fba-ad51c5c6d360@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] Support disabling docompress for binary package builds by Zac Medico
1 On 11/03/2018 03:44 PM, Zac Medico wrote:
2 > On 11/03/2018 01:10 AM, Michał Górny wrote:
3 >> On Fri, 2018-11-02 at 19:35 -0700, Zac Medico wrote:
4 >>> On 11/02/2018 12:35 PM, Michał Górny wrote:
5 >>>> On Fri, 2018-11-02 at 12:22 -0700, Zac Medico wrote:
6 >>>>> On 11/02/2018 12:16 PM, Michał Górny wrote:
7 >>>>>> On Fri, 2018-11-02 at 11:49 -0700, Zac Medico wrote:
8 >>>>>>> On 11/01/2018 02:50 AM, Michał Górny wrote:
9 >>>>>>>> diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py
10 >>>>>>>> index 9706de422..d7b535698 100644
11 >>>>>>>> --- a/lib/portage/package/ebuild/doebuild.py
12 >>>>>>>> +++ b/lib/portage/package/ebuild/doebuild.py
13 >>>>>>>> @@ -674,7 +674,7 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
14 >>>>>>>> "config", "info", "setup", "depend", "pretend",
15 >>>>>>>> "fetch", "fetchall", "digest",
16 >>>>>>>> "unpack", "prepare", "configure", "compile", "test",
17 >>>>>>>> - "install", "rpm", "qmerge", "merge",
18 >>>>>>>> + "install", "instprep", "rpm", "qmerge", "merge",
19 >>>>>>>> "package", "unmerge", "manifest", "nofetch"]
20 >>>>>>>>
21 >>>>>>>> if mydo not in validcommands:
22 >>>>>>>> @@ -1402,6 +1402,7 @@ def _spawn_actionmap(settings):
23 >>>>>>>> "compile": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}},
24 >>>>>>>> "test": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}},
25 >>>>>>>> "install": {"cmd":ebuild_sh, "args":{"droppriv":0, "free":0, "sesandbox":sesandbox, "fakeroot":fakeroot}},
26 >>>>>>>> +"instprep": {"cmd":misc_sh, "args":{"droppriv":0, "free":0, "sesandbox":sesandbox, "fakeroot":fakeroot}},
27 >>>>>>>> "rpm": {"cmd":misc_sh, "args":{"droppriv":0, "free":0, "sesandbox":0, "fakeroot":fakeroot}},
28 >>>>>>>> "package": {"cmd":misc_sh, "args":{"droppriv":0, "free":0, "sesandbox":0, "fakeroot":fakeroot}},
29 >>>>>>>> }
30 >>>>>>>
31 >>>>>>> The feature seems find but the instprep phase is not needed if we use
32 >>>>>>> MiscFunctionsProcess instead of EbuildPhase. Here's a list of odd things
33 >>>>>>> about the instprep ebuild phase implementation as it is:
34 >>>>>>>
35 >>>>>>> 1) You can call instprep explicitly via the ebuild(1) command, but I
36 >>>>>>> doubt that we really want or need to allow that.
37 >>>>>>
38 >>>>>> I was actually wondering about that. I suppose it might be useful for
39 >>>>>> debugging purposes.
40 >>
41 >> Ok, I've rechecked it and ebuild(1) currently rejects it as not a valid
42 >> phase name.
43 >
44 > I have your patches applied, and for me it treats 'instprep' as a valid
45 > phase which I'm able to call. It also lists it in the list of available
46 > phases if I choose an invalid phase named 'foo', since 'instprep' is
47 > listed in validcommands:
48 >
49 > !!! doebuild: 'foo' is not one of the following valid commands:
50 > !!! clean cleanrm compile config configure depend
51 > !!! digest fetch fetchall help info install
52 > !!! instprep manifest merge nofetch package postinst
53 > !!! postrm preinst prepare prerm pretend qmerge
54 > !!! rpm setup test unmerge unpack
55 >
56 >> So we can either ignore the problem until somebody finds it
57 >> useful to call it directly, or work on it. Would the existing patch be
58 >> ok, provided that ebuild(1) doesn't allow calling prepinst manually?
59 >
60 > Lets clarify our intention here, since apparently it works for me but
61 > not for you when you tested. I think it's fine as-is, but let's make
62 > sure that the behavior is what we collectively intend.
63
64 If we allow the 'instprep' phase to be directly invoked, then we should
65 also document it in man/ebuild.1.
66 --
67 Thanks,
68 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature