From: Brian Dolbec <dolsen@gentoo.org>
To: brian.dolbec@gmail.com, gentoo-catalyst@lists.gentoo.org
Cc: Brian Dolbec <dolsen@gentoo.org>
Subject: [gentoo-catalyst] [PATCH] Fix broken seed stage update...
Date: Wed, 27 Feb 2013 13:56:49 -0800 [thread overview]
Message-ID: <1362002209-24825-1-git-send-email-dolsen@gentoo.org> (raw)
Strip --usepkg and --buildpkg from emerge options for user defined update_seed_command.
Add a check for the update_seed option to set the correct update options.
Fix default seed stage update command to properly update gcc and it's deps.
Add a seed stage update system command and option.
Add --binpkg-respect-use=y for all cases --usepkg is enabled.
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
---
catalyst/targets/stage1.py | 3 ++-
doc/catalyst-spec.5.txt | 12 +++++++++++-
targets/stage1/stage1-chroot.sh | 17 ++++++++++++++---
targets/support/chroot-functions.sh | 11 ++++++++++-
4 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index e936929..e067c8c 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -18,7 +18,8 @@ class stage1(StageBase):
def __init__(self,spec,addlargs):
self.required_values=[]
self.valid_values=["chost"]
- self.valid_values.extend(["update_seed","update_seed_command"])
+ self.valid_values.extend(["update_seed","update_seed_command",
+ "update_seed_system"])
StageBase.__init__(self,spec,addlargs)
def set_stage_path(self):
diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index 4a6e06c..196bdc3 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -138,9 +138,19 @@ it should update the seed stage or not (valid values: `yes no`).
*update_seed_command*::
This is an optional command to pass to emerge for updating the seed
stage (example: `--update dev-libs/mpfr dev-libs/mpc dev-libs/gmp`)
-If not specified, catalyst will update gcc deps.
+If not specified, catalyst will update gcc's deps, and rebuild gcc if any of
+it's deps are updated with a new version. Even if it itself is not updated.
+This prevents gcc breakage when it's dependency lib sonames have changed.
This setting requires enabling update_seed.
+*update_seed_system*::
+This is an optional setting supported by stage1 to tell catalyst if
+it should update the seed's system packages or not (valid values: `yes no`).
+This is run after any update_seed_command, updating any remaining upgradable
+system packages.
+This setting requires enabling update_seed.
+
+
Compilation
~~~~~~~~~~~
diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
index 97aef7f..65c2d81 100755
--- a/targets/stage1/stage1-chroot.sh
+++ b/targets/stage1/stage1-chroot.sh
@@ -26,12 +26,23 @@ clst_root_path=/ setup_pkgmgr
# Update stage3
if [ -n "${clst_update_seed}" ]; then
if [ "${clst_update_seed}" == "yes" ]; then
- echo "Updating seed stage..."
if [ -n "${clst_update_seed_command}" ]; then
- clst_root_path=/ run_merge "--buildpkg=n ${clst_update_seed_command}"
+ echo "--- Updating seed stage with USER defined update_seed_command"
+ update_cmd=${clst_update_seed_command/--usepkg /}
+ update_cmd=${clst_update_seed_command/--buildpkg /}
+ clst_root_path=/ run_merge "${update_cmd}"
else
- clst_root_path=/ run_merge "--buildpkg=n --update --deep --newuse --onlydeps gcc"
+ echo "--- Updating seed stage with DEFAULT update_seed_command"
+ update_cmd="--update --deep --complete-graph --rebuild-if-new-ver gcc"
+ clst_root_path=/ run_merge ${update_cmd}
fi
+ if [ "${clst_update_seed_system}" == "yes" ]; then
+ echo "--- Updating seed stage system packages"
+ update_cmd="--update --deep --complete-graph @system"
+ clst_root_path=/ run_merge ${update_cmd}
+ fi
+ # now reset the emerge options for the target
+ clst_update_seed=no setup_myemergeopts
elif [ "${clst_update_seed}" != "no" ]; then
echo "Invalid setting for update_seed: ${clst_update_seed}"
exit 1
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2524b4f..69d2923 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -133,9 +133,18 @@ setup_myemergeopts(){
then
export bootstrap_opts="${bootstrap_opts} -f"
export clst_myemergeopts="${clst_myemergeopts} -f"
+ # now intercept normal target options if we're updating the seed
+ # to update the seed we do not want binpkgs that may have links to
+ # sonames no longer installed, due to dependency updates.
+ # this function will be re-run later with clst_update_seed=no
+ elif [ "${clst_update_seed}" == "yes" ]
+ then
+ export clst_myemergeopts="${clst_myemergeopts} --newuse"
+ export bootstrap_opts="${bootstrap_opts} -r"
elif [ -n "${clst_PKGCACHE}" ]
then
- export clst_myemergeopts="${clst_myemergeopts} --usepkg --buildpkg --newuse"
+ # if you add --usepkg, then also add --binpkg-respect-use=y
+ export clst_myemergeopts="${clst_myemergeopts} --usepkg --binpkg-respect-use=y --buildpkg --newuse"
export bootstrap_opts="${bootstrap_opts} -r"
fi
}
--
1.8.1.2
next reply other threads:[~2013-02-27 21:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 21:56 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-02-26 16:20 [gentoo-catalyst] patch, fix broken seed stage update Brian Dolbec
2013-02-26 16:37 ` W. Trevor King
2013-02-26 16:47 ` Brian Dolbec
2013-02-03 12:44 ` [gentoo-catalyst] More proposed Catalyst changes W. Trevor King
2013-01-31 19:46 ` W. Trevor King
2013-02-03 12:20 ` W. Trevor King
2013-01-31 18:39 ` W. Trevor King
2013-02-26 18:04 ` [gentoo-catalyst] patch, fix broken seed stage update W. Trevor King
2013-02-27 1:30 ` Brian Dolbec
2013-02-27 1:40 ` W. Trevor King
2013-02-27 2:35 ` Brian Dolbec
2013-02-27 2:41 ` Matt Turner
2013-02-26 16:48 ` Peter Stuge
2013-02-26 17:29 ` Rick "Zero_Chaos" Farina
2013-02-26 19:39 ` Matt Turner
2013-02-27 2:04 ` Brian Dolbec
2013-02-27 2:37 ` Matt Turner
2013-02-27 12:12 ` W. Trevor King
2013-02-27 2:37 ` Matt Turner
2013-02-27 3:03 ` Brian Dolbec
2013-02-27 3:22 ` Matt Turner
2013-02-27 3:49 ` Brian Dolbec
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=1362002209-24825-1-git-send-email-dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=brian.dolbec@gmail.com \
--cc=gentoo-catalyst@lists.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