From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4C3F91382BD for ; Wed, 15 Jun 2016 21:12:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16FD0E09F9; Wed, 15 Jun 2016 21:12:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 83101E09F9 for ; Wed, 15 Jun 2016 21:12:25 +0000 (UTC) Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id E217D340662; Wed, 15 Jun 2016 21:12:23 +0000 (UTC) Date: Wed, 15 Jun 2016 17:12:24 -0400 From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Cc: jmbsvicetto@gentoo.org Subject: Re: [gentoo-catalyst] [PATCH] Fix USE not "sticking" between stage runs and allow set USE flags just for building - CATALYST_USE. This should fix bug 473332 and avoid the current issue of catalyst-3 stages being built with (fwd) Message-ID: <20160615211224.GW4053@vapier.lan> Mail-Followup-To: gentoo-catalyst@lists.gentoo.org, jmbsvicetto@gentoo.org References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3r7l8wyqcGaKA095" Content-Disposition: inline In-Reply-To: X-Archives-Salt: cf5e3df1-8421-46a8-8fae-8e6a1fa5b788 X-Archives-Hash: 47ea4ffd12cfd05c1ab86058561934bd --3r7l8wyqcGaKA095 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 05 Jun 2016 20:00, Jorge Manuel B. S. Vicetto wrote: > Subject: [PATCH] Fix USE not "sticking" between stage runs and allow set = USE > flags just for building - CATALYST_USE. This should fix bug 473332 a= nd avoid > the current issue of catalyst-3 stages being built without BINDIST.= These > changes don't allow setting USE flags for stage 1, > 2 and 3 and don't touch other stages (TODO). looks like the commit message was crammed into one line. when making a commit in git, it should look something like: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D some short summary of the issue A longer explanation down here with multiple sentences. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- a/catalyst/base/stagebase.py > +++ b/catalyst/base/stagebase.py > @@ -173,6 +173,7 @@ class StageBase(TargetBase, ClearBase, GenBase): > self.set_controller_file() > self.set_default_action_sequence() > self.set_use() > + self.set_catalyst_use() looks like leading whitespace is broken here, or at least weird. maybe use `git send-email` instead ? > + def set_catalyst_use(self): > + if self.settings["spec_prefix"]+"/catalyst_use" in self.settings: > + self.settings["catalyst_use"]=3D\ > + self.settings[self.settings["spec_prefix"]+"/catalyst_use"] > + del self.settings[self.settings["spec_prefix"]+"/catalyst_use"] create a variable named "key" to hold this string so you don't have to copy & paste it three times. > + if "catalyst_use" not in self.settings: > + self.settings["catalyst_use"]=3D"" > + if isinstance(self.settings['catalyst_use'], str): > + self.settings["catalyst_use"]=3Dself.settings["catalyst_use"].split() there should be spaces around the assignment. self.settings['catalyst_use'] =3D '' the code base might not do this everywhere, but it's moving that way > --- a/targets/stage1/stage1-chroot.sh > +++ b/targets/stage1/stage1-chroot.sh > @@ -53,7 +53,8 @@ sed -i "/USE=3D\"${USE} -build\"/d" ${clst_make_conf} >=20 > # Now, we install our packages > if [ -e ${clst_make_conf} ]; then > - echo "USE=3D\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${clst_ma= ke_conf} > + echo "CATALYST_USE=3D\"-* build ${clst_CATALYST_USE}\"" >> ${clst_make_= conf} > + echo "USE=3D\"${CATALYST_USE} ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${= clst_make_conf} > for useexpand in ${clst_HOSTUSEEXPAND}; do > x=3D"clst_${useexpand}" > echo "${useexpand}=3D\"${!x}\"" \ > @@ -62,8 +63,12 @@ if [ -e ${clst_make_conf} ]; then > fi >=20 > run_merge "--oneshot ${clst_buildpkgs}" > -sed -i "/USE=3D\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \ > +sed -i "/USE=3D\"/s/\${CATALYST_USE} //" \ > ${clst_make_conf} > +sed -i "/CATALYST_USE/d" \ > + ${clist_make_conf} rather than run sed twice on the same file, use the -e option to specify multiple expressions that said, rather than mess with CATALYST_USE, how about just white it out ? sed -i \ -e '/^CATALYST_USE=3D/s:=3D.*:=3D"":' \ ${clist_make_conf} > +# Why are we removing these? Don't we need them for final make.conf? not a big fan of doing this ... -mike --3r7l8wyqcGaKA095 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXYcS3AAoJEEFjO5/oN/WBc8QP/iSQwWUUk3gfEZoXiupaiOrD s02/iru7OUjntdJayr4d9Cdaf2/soUihO+shE00FwRODkDqXzGIFSLeFyUrBILM7 RDE7etaSMwbhv7mG4s86KUVW5+VxZN0Iqi7VuNp44Any2gmzRE4ZgvC2AtbtC0Io lAAet3MJKLLpAEip6SzOoCBX2663wy9lthgrSNw8Xrd7P/oApSn7nFEigR1LRwUL OJ28RwTsA4PNuqjy/j2fMtGs7T6u7yQt37sYpe93l6vkXEJh1TNptQ8tHlUxIpQW FfzH2UvOXXjLixXgNlkvvTrpQjqqE34EPRZ0wa0pX9ycOgeA/xWACPiVJiFv1Zyv QiMhT/TReS8/WuPy58vtfXr17ddYb2/k8E+N0ONIyriz0Lb86jm2G8xJbZHvcv9C 99Gzs3XdpyQd3Em/qVjxG/XftQX+6tIEXYUq6NM6KJPZ1n9w2IY0f6a416UlctuA p30Yo6WSMcCBskIu0We2r0cUtmbOGSKM4AIQECvrYMLvR58vaICGs23BtrMAn0qU YsR8nR1QxAp4SzPJFgBLzXkyElpQ033SJAMlJZG+SsTMGkKcXa6ZMO8iPnJCbCyd zPcrDA6qXyfiQOTnwhMhhOj8jKfVdp27x/vxZF98wDCb+eFhJZtNq3eznXBhAQTm 4HPdNHloBdsKUOoSUcV7 =D6VF -----END PGP SIGNATURE----- --3r7l8wyqcGaKA095--