Gentoo Archives: gentoo-catalyst

From: "W. Trevor King" <wking@×××××××.us>
To: Catalyst <gentoo-catalyst@l.g.o>
Cc: "W. Trevor King" <wking@×××××××.us>
Subject: [gentoo-catalyst] [PATCH v2] Remove update_seed_command and strengthen update_seed
Date: Fri, 08 Mar 2013 17:28:20
Message-Id: d768d7f7da2a671dd518ed0f1dd787cb255a7ecb.1362763446.git.wking@tremily.us
In Reply to: [gentoo-catalyst] patch, fix broken seed stage update by Brian Dolbec
1 From: "W. Trevor King" <wking@×××××××.us>
2
3 When using `update_seed` to get a 20121213 stage3 from
4 libmpc.so.2 to libmpc.so.3, stage2 failed with:
5
6 /usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/cc1:
7 error while loading shared libraries: libmpc.so.2:
8 cannot open shared object file: No such file or directory
9
10 This was due to an mpc version bump in the Portage tree that was not
11 present in the stage3 I used to seed stage1. Stage1 wasn't
12 recompiling GCC against the new mpc, so it ended up with GCC linking
13 against the old mpc. Heading into stage2, the old mpc (from the seed
14 stage3) was no longer present, so compilation crashed and burned.
15
16 To fix this, we should be extra agressive about rebuilding packages
17 when their dependencies change in stage1. The earlier update_seed
18 command was not catching the bumped mpc, so add:
19
20 --complete-graph --with-bdeps=y --rebuild-if-new-ver
21
22 to toughen things up.
23
24 This is a general dependency problem (not GCC specific), so I also
25 replaced the gcc target with:
26
27 @world @system
28
29 This leads to a lot of rebuilding, but it should be a stable and
30 general fix. With a general fix there's no more need to allow
31 user-specific overrides with update_seed_command, and that option was
32 removed.
33
34 Based-on-patch-by: Brian Dolbec <dolsen@g.o>
35 ---
36 I wrote this trimmed-down version up after talking to Brian and Rick
37 on IRC this morning. The test run is still running, but I'll post
38 if/when I get through stage3.
39
40 doc/catalyst-spec.5.txt | 6 ------
41 modules/stage1_target.py | 2 +-
42 targets/stage1/stage1-chroot.sh | 9 +++------
43 3 files changed, 4 insertions(+), 13 deletions(-)
44
45 diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
46 index 4a6e06c..a928557 100644
47 --- a/doc/catalyst-spec.5.txt
48 +++ b/doc/catalyst-spec.5.txt
49 @@ -135,12 +135,6 @@ one CD, this defines the layout for the directories under
50 This is an optional setting supported by stage1 to tell catalyst if
51 it should update the seed stage or not (valid values: `yes no`).
52
53 -*update_seed_command*::
54 -This is an optional command to pass to emerge for updating the seed
55 -stage (example: `--update dev-libs/mpfr dev-libs/mpc dev-libs/gmp`)
56 -If not specified, catalyst will update gcc deps.
57 -This setting requires enabling update_seed.
58 -
59 Compilation
60 ~~~~~~~~~~~
61
62 diff --git a/modules/stage1_target.py b/modules/stage1_target.py
63 index aa43926..7a6c860 100644
64 --- a/modules/stage1_target.py
65 +++ b/modules/stage1_target.py
66 @@ -13,7 +13,7 @@ class stage1_target(generic_stage_target):
67 def __init__(self,spec,addlargs):
68 self.required_values=[]
69 self.valid_values=["chost"]
70 - self.valid_values.extend(["update_seed","update_seed_command"])
71 + self.valid_values.extend(["update_seed"])
72 generic_stage_target.__init__(self,spec,addlargs)
73
74 def set_stage_path(self):
75 diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
76 index 3f628c2..3dad53d 100644
77 --- a/targets/stage1/stage1-chroot.sh
78 +++ b/targets/stage1/stage1-chroot.sh
79 @@ -26,12 +26,9 @@ clst_root_path=/ setup_pkgmgr
80 # Update stage3
81 if [ -n "${clst_update_seed}" ]; then
82 if [ "${clst_update_seed}" == "yes" ]; then
83 - echo "Updating seed stage..."
84 - if [ -n "${clst_update_seed_command}" ]; then
85 - clst_root_path=/ run_merge "--buildpkg=n ${clst_update_seed_command}"
86 - else
87 - clst_root_path=/ run_merge "--buildpkg=n --update --deep --newuse --onlydeps gcc"
88 - fi
89 + update_cmd="--update --deep --complete-graph --with-bdeps=y --rebuild-if-new-ver @world @system"
90 + echo "--- Updating seed stage with: ${update_cmd}"
91 + clst_root_path=/ run_merge "${update_cmd}"
92 elif [ "${clst_update_seed}" != "no" ]; then
93 echo "Invalid setting for update_seed: ${clst_update_seed}"
94 exit 1
95 --
96 1.8.2.rc0.16.g20a599e

Replies

Subject Author
Re: [gentoo-catalyst] [PATCH v2] Remove update_seed_command and strengthen update_seed "Rick \\\"Zero_Chaos\\\" Farina" <zerochaos@g.o>