public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
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)
Date: Wed, 15 Jun 2016 17:12:24 -0400	[thread overview]
Message-ID: <20160615211224.GW4053@vapier.lan> (raw)
In-Reply-To: <alpine.LNX.2.00.1606051959380.22943@woodpecker.gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 3097 bytes --]

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 and 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:
==================
some short summary of the issue

A longer explanation down here with multiple sentences.
==================

> --- 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"]=\
> +				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"]=""
> +		if isinstance(self.settings['catalyst_use'], str):
> +			self.settings["catalyst_use"]=self.settings["catalyst_use"].split()

there should be spaces around the assignment.
	self.settings['catalyst_use'] = ''

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=\"${USE} -build\"/d" ${clst_make_conf}
> 
>   # Now, we install our packages
>   if [ -e ${clst_make_conf} ]; then
> -	echo "USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${clst_make_conf}
> +	echo "CATALYST_USE=\"-* build ${clst_CATALYST_USE}\"" >> ${clst_make_conf}
> +	echo "USE=\"${CATALYST_USE} ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${clst_make_conf}
>   	for useexpand in ${clst_HOSTUSEEXPAND}; do
>   		x="clst_${useexpand}"
>   		echo "${useexpand}=\"${!x}\"" \
> @@ -62,8 +63,12 @@ if [ -e ${clst_make_conf} ]; then
>   fi
> 
>   run_merge "--oneshot ${clst_buildpkgs}"
> -sed -i "/USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \
> +sed -i "/USE=\"/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=/s:=.*:="":' \
		${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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-06-15 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-05 20:00 [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) Jorge Manuel B. S. Vicetto
2016-06-15 21:12 ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160615211224.GW4053@vapier.lan \
    --to=vapier@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    --cc=jmbsvicetto@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox