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
signature.asc
Description: Digital signature
