From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 914051382C5 for ; Fri, 16 Mar 2018 17:07:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 10C6CE0882; Fri, 16 Mar 2018 17:07:12 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AE3F0E087D for ; Fri, 16 Mar 2018 17:07:11 +0000 (UTC) Received: from [192.168.0.29] (ip68-4-233-67.oc.oc.cox.net [68.4.233.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 153EC335C09; Fri, 16 Mar 2018 17:07:09 +0000 (UTC) Subject: Re: [gentoo-portage-dev] [PATCH 0/3] INSTALL_MASK refurbishing resubmit To: gentoo-portage-dev@lists.gentoo.org, =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= References: <20180315192212.13454-1-mgorny@gentoo.org> <00e6fab0-ee21-f67d-5d9e-b5196ce48074@gentoo.org> <1521194919.1183.4.camel@gentoo.org> From: Zac Medico Message-ID: Date: Fri, 16 Mar 2018 10:07:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <1521194919.1183.4.camel@gentoo.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YWNogjEfxrZ70z91EZ1Yij9YYuxpToyDE" X-Archives-Salt: 85fafb7a-e1e4-414d-bb4b-3a0331ab2449 X-Archives-Hash: dc2a19d6f22fb9186e8b657316daa463 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --YWNogjEfxrZ70z91EZ1Yij9YYuxpToyDE Content-Type: multipart/mixed; boundary="j0jhjSlrF4W3GsiCrEiUD1gmfMxbjFG73"; protected-headers="v1" From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org, =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Message-ID: Subject: Re: [gentoo-portage-dev] [PATCH 0/3] INSTALL_MASK refurbishing resubmit References: <20180315192212.13454-1-mgorny@gentoo.org> <00e6fab0-ee21-f67d-5d9e-b5196ce48074@gentoo.org> <1521194919.1183.4.camel@gentoo.org> In-Reply-To: <1521194919.1183.4.camel@gentoo.org> --j0jhjSlrF4W3GsiCrEiUD1gmfMxbjFG73 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 03/16/2018 03:08 AM, Micha=C5=82 G=C3=B3rny wrote: > W dniu czw, 15.03.2018 o godzinie 22=E2=88=B610=E2=80=89-0700, u=C5=BCy= tkownik Zac Medico > napisa=C5=82: >> On 03/15/2018 12:22 PM, Micha=C5=82 G=C3=B3rny wrote: >>> Hi, >>> >>> Here are three of four INSTALL_MASK updates I've sent long time ago >>> which were not really reviewed. The fourth patch added support >>> for repo-defined install-mask.conf and I'll do that separately. >>> >>> Those patches focus on smaller changes. What they change, in order: >>> >>> 1. Removes explicit file removal code for FEATURES=3Dno*. Instead, th= ose >>> values are converted into additional INSTALL_MASK entries >>> and handled directly via INSTALL_MASK processing. >>> >>> 2. Rework INSTALL_MASK to filter files while installing instead of >>> pre-stripping them. In other words, before: INSTALL_MASK removes >>> files from ${D} before merge. After: ${D} contains all the files, >>> Portage just skip INSTALL_MASK-ed stuff, verbosely indicating that= =2E >>> >>> 3. Adds support for exclusions in INSTALL_MASK. In other words, you >>> can do stuff like: >>> >>> INSTALL_MASK=3D"/usr/share/locale -/usr/share/locale/en_US" >>> >>> I have been using this via user patches since the last submission. >>> Guessing by 'git log', this means almost 2 years now. >>> >>> -- >>> Best regards, >>> Micha=C5=82 G=C3=B3rny >>> >>> Micha=C5=82 G=C3=B3rny (3): >>> portage.package.ebuild.config: Move FEATURES=3Dno* handling there >>> portage.dbapi.vartree: Move INSTALL_MASK handling into merging >>> portage.dbapi.vartree: Support exclusions in INSTALL_MASK >>> >>> bin/misc-functions.sh | 30 ---------- >>> pym/portage/dbapi/vartree.py | 104 ++++++++++++++++++++++---= ---------- >>> pym/portage/package/ebuild/config.py | 11 ++++ >>> 3 files changed, 77 insertions(+), 68 deletions(-) >> >> I like this patch set but here are some important things that I want i= t >> to do differently: >> >> 1) For the unmerge code, it needs to read the appropriate >> /var/db/pkg/*/*/{PKG,}INSTALL_MASK file in order to account for the >> {PKG,}INSTALL_MASK settings that existed when the package was built >> (PKG_INSTALL_MASK) and merged (INSTALL_MASK). A binary package should >> use the value of INSTALL_MASK that existed at build time. >=20 >> 2) In order to support bashrc {PKG,}INSTALL_MASK settings, we need to >> write the values from the environment to >> ${PORTAGE_BUILDDIR}/build-info/{PKG,}INSTALL_MASK and read them from >> there (we do this for many other variables including QA_PREBUILT). >=20 > I presume bin/phase-functions.sh __dyn_install is where I'm supposed to= > write them. Could you suggest where is the best place to read them back= ? We can read them back just when they are needed. PKG_INSTALL_MASK should be handled in the EbuildPhase class when self.phase is "package". In order to preserve behavior, EbuildPhase will have to create a temporary copy of ${D} and apply PKG_INSTALL_MASK to it, for __dyn_package to use. INSTALL_MASK should be handled in the dblink treewalk method like it is n= ow. > Should the merge code do that explicitly while handling INSTALL_MASK, o= r > should some of the config classes do that? The config class only needs to be involved if we want to expose some API related to {PKG,}INSTALL_MASK there, but the config class is bloated enough as it is so it's better to expose a helper class like the ConfigProtect class. --=20 Thanks, Zac --j0jhjSlrF4W3GsiCrEiUD1gmfMxbjFG73-- --YWNogjEfxrZ70z91EZ1Yij9YYuxpToyDE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHEEARECADEWIQSG5RNTeMgVEruefzL96O+FrlcZowUCWqv5uxMcem1lZGljb0Bn ZW50b28ub3JnAAoJEP3o74WuVxmj3vsAoIQ5BOaQf6Sly0C315n4B4yfsmdXAJwI +6iJ/S+3CgjcZAJ2dpmHzkS4dw== =6p2b -----END PGP SIGNATURE----- --YWNogjEfxrZ70z91EZ1Yij9YYuxpToyDE--