1 |
W dniu pią, 16.03.2018 o godzinie 10∶07 -0700, użytkownik Zac Medico |
2 |
napisał: |
3 |
> On 03/16/2018 03:08 AM, Michał Górny wrote: |
4 |
> > W dniu czw, 15.03.2018 o godzinie 22∶10 -0700, użytkownik Zac Medico |
5 |
> > napisał: |
6 |
> > > On 03/15/2018 12:22 PM, Michał Górny wrote: |
7 |
> > > > Hi, |
8 |
> > > > |
9 |
> > > > Here are three of four INSTALL_MASK updates I've sent long time ago |
10 |
> > > > which were not really reviewed. The fourth patch added support |
11 |
> > > > for repo-defined install-mask.conf and I'll do that separately. |
12 |
> > > > |
13 |
> > > > Those patches focus on smaller changes. What they change, in order: |
14 |
> > > > |
15 |
> > > > 1. Removes explicit file removal code for FEATURES=no*. Instead, those |
16 |
> > > > values are converted into additional INSTALL_MASK entries |
17 |
> > > > and handled directly via INSTALL_MASK processing. |
18 |
> > > > |
19 |
> > > > 2. Rework INSTALL_MASK to filter files while installing instead of |
20 |
> > > > pre-stripping them. In other words, before: INSTALL_MASK removes |
21 |
> > > > files from ${D} before merge. After: ${D} contains all the files, |
22 |
> > > > Portage just skip INSTALL_MASK-ed stuff, verbosely indicating that. |
23 |
> > > > |
24 |
> > > > 3. Adds support for exclusions in INSTALL_MASK. In other words, you |
25 |
> > > > can do stuff like: |
26 |
> > > > |
27 |
> > > > INSTALL_MASK="/usr/share/locale -/usr/share/locale/en_US" |
28 |
> > > > |
29 |
> > > > I have been using this via user patches since the last submission. |
30 |
> > > > Guessing by 'git log', this means almost 2 years now. |
31 |
> > > > |
32 |
> > > > -- |
33 |
> > > > Best regards, |
34 |
> > > > Michał Górny |
35 |
> > > > |
36 |
> > > > Michał Górny (3): |
37 |
> > > > portage.package.ebuild.config: Move FEATURES=no* handling there |
38 |
> > > > portage.dbapi.vartree: Move INSTALL_MASK handling into merging |
39 |
> > > > portage.dbapi.vartree: Support exclusions in INSTALL_MASK |
40 |
> > > > |
41 |
> > > > bin/misc-functions.sh | 30 ---------- |
42 |
> > > > pym/portage/dbapi/vartree.py | 104 ++++++++++++++++++++++------------- |
43 |
> > > > pym/portage/package/ebuild/config.py | 11 ++++ |
44 |
> > > > 3 files changed, 77 insertions(+), 68 deletions(-) |
45 |
> > > |
46 |
> > > I like this patch set but here are some important things that I want it |
47 |
> > > to do differently: |
48 |
> > > |
49 |
> > > 1) For the unmerge code, it needs to read the appropriate |
50 |
> > > /var/db/pkg/*/*/{PKG,}INSTALL_MASK file in order to account for the |
51 |
> > > {PKG,}INSTALL_MASK settings that existed when the package was built |
52 |
> > > (PKG_INSTALL_MASK) and merged (INSTALL_MASK). A binary package should |
53 |
> > > use the value of INSTALL_MASK that existed at build time. |
54 |
> > > 2) In order to support bashrc {PKG,}INSTALL_MASK settings, we need to |
55 |
> > > write the values from the environment to |
56 |
> > > ${PORTAGE_BUILDDIR}/build-info/{PKG,}INSTALL_MASK and read them from |
57 |
> > > there (we do this for many other variables including QA_PREBUILT). |
58 |
> > |
59 |
> > I presume bin/phase-functions.sh __dyn_install is where I'm supposed to |
60 |
> > write them. Could you suggest where is the best place to read them back? |
61 |
> |
62 |
> We can read them back just when they are needed. |
63 |
> |
64 |
> PKG_INSTALL_MASK should be handled in the EbuildPhase class when |
65 |
> self.phase is "package". In order to preserve behavior, EbuildPhase will |
66 |
> have to create a temporary copy of ${D} and apply PKG_INSTALL_MASK to |
67 |
> it, for __dyn_package to use. |
68 |
|
69 |
But do I need to change anything for PKG_INSTALL_MASK? My original patch |
70 |
did not touch that, so it can just continue happening as it is now. |
71 |
|
72 |
> INSTALL_MASK should be handled in the dblink treewalk method like it is now. |
73 |
|
74 |
But we also need to read it for unmerge, correct? |
75 |
|
76 |
> > Should the merge code do that explicitly while handling INSTALL_MASK, or |
77 |
> > should some of the config classes do that? |
78 |
> |
79 |
> The config class only needs to be involved if we want to expose some API |
80 |
> related to {PKG,}INSTALL_MASK there, but the config class is bloated |
81 |
> enough as it is so it's better to expose a helper class like the |
82 |
> ConfigProtect class. |
83 |
|
84 |
-- |
85 |
Best regards, |
86 |
Michał Górny |