public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] patch, fix broken seed stage update
@ 2013-02-26 16:20 Brian Dolbec
  2013-02-26 16:37 ` W. Trevor King
                   ` (3 more replies)
  0 siblings, 4 replies; 76+ messages in thread
From: Brian Dolbec @ 2013-02-26 16:20 UTC (permalink / raw
  To: gentoo-catalyst@lists.gentoo.org; +Cc: zmedico, fuzzyray

The git branch is located at http://dev.gentoo.org/~dolsen/catalyst/
git checkout the rewrite branch.

For those of you that have already cloned it, use --force in your pull.
I've condensed, rearranged the changes into more logical complete
changes.  Still, I wouldn't think you could cherrypick any single commit
in general.  Some fixes could be cherrypicked to apply to current
master, some would likely have to be hand applied due to other changes.

Next on my todo list, fix doc's creation, create a setup.py and make the
code installable via ebuild.  

I think also development should continue in a branch on the main
catalyst repo on g.o.g.o.  Possibly name it catalyst3b so it does not
conflict with the catalyst3 branch started.  I looked at rebasing my
work on it, but decided against it.  There were far too many changes in
master since it was last updated.

There are far too many patches to individually list them in this mail
list.  Please checkout the branch from my repo to review the changes.
It would also be easier to use gitweb to view them online if it was
pushed to the main repo.


Anyway the latest patch...

======================================================================

Fix broken seed stage update...

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.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From 9ffa5b8812403bf20f17eba58543fc4b7c04bc33 Mon Sep 17 00:00:00 2001
From: Brian Dolbec <dolsen@gentoo.org>
Date: Mon, 25 Feb 2013 23:31:41 -0800
Subject: [PATCH] Fix broken seed stage update...

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.
---
 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





^ permalink raw reply related	[flat|nested] 76+ messages in thread
* [gentoo-catalyst] More proposed Catalyst changes
@ 2013-01-08  8:32 Brian Dolbec
  2013-01-08 18:08 ` Peter Stuge
  2013-01-12  8:55 ` Brian Dolbec
  0 siblings, 2 replies; 76+ messages in thread
From: Brian Dolbec @ 2013-01-08  8:32 UTC (permalink / raw
  To: gentoo-catalyst@lists.gentoo.org

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

While making changes to catalyst for the tree move I noticed that there
is in my view a serious design flaw in the way the python modules for it
are laid out.

The modules directory has no __init__.py so is not automatically
recognized by python as a directory containing python code...  So, there
is code in the main catalyst script to insert that path to it's modules
so that they are found.

Inside that modules directory is the main catalyst python package
directory.

These two directories are reversed.  The modules directory should be
nested inside the catalyst directory and have an __init__.py file so
that they are properly and automatically inside the catalyst namespace. 

The same is true of the arch directory and it's python files, which it
too should be a sub-package of the catalyst namespace.

The main catalyst start script. 
  I am a firm believer that the start script should be a minimal script
which imports code from the main package and runs it.  I would like to
move the current script into the catalyst directory (some editing
required) and add a minimal start script to a bin directory to avoid
confusion with the catalyst python package dir.  I would also split out
the confdefaults to a separate defaults file, so that any and all
defaults are in one central location.  This would make it easy to edit
for any future changes rather than chasing through all the code.  So all
of the current catalyst python code would be moved to files inside the
catalyst python package directory.


The long term benefit of this restructure is easier maintenance, and the
flexibility to create other front-ends to run it.  I know most/all of
you guys are cli junkies, but with all the working code inside the main
catalyst python package, a web interface could be made for it as well as
gtk, qt, etc. quis.  I'm not saying we would, but the option to is.
From what little I know of the releng teams work.  A web frontend might
be the most logical alternate interface.  It would be setup to run on
one or more of gentoo's build servers.  And with a few more extensions
to the code, be able to provide progress status of the build run.

For examples of this structure, have a look at current gentoolkit's
eclean, enalyze code, layman, mirrorselect, and the emaint rewrite now
included in portage.
-- 
Brian Dolbec <dolsen@gentoo.org>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2013-12-14  5:41 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-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
2013-03-08 17:27 ` [gentoo-catalyst] [PATCH v2] Remove update_seed_command and strengthen update_seed W. Trevor King
2013-03-08 18:34   ` Rick "Zero_Chaos" Farina
2013-03-08 18:47     ` [gentoo-catalyst] [PATCH v3] Strengthen update_seed to update @system and @world with dependencies W. Trevor King
2013-03-08 20:14       ` Matt Turner
2013-03-09 12:10         ` [gentoo-catalyst] " W. Trevor King
2013-04-11 17:09           ` [gentoo-catalyst] Binary package dependencies and update_seed W. Trevor King
2013-04-11 17:39             ` Rick "Zero_Chaos" Farina
2013-04-11 17:52               ` W. Trevor King
2013-04-12 15:12                 ` [gentoo-catalyst] [PATCH] files/catalyst.conf: Document linking issues with binary packages W. Trevor King
2013-04-12 15:21                   ` Rick "Zero_Chaos" Farina
2013-04-12 15:33                     ` W. Trevor King
2013-04-12 16:11                       ` Rick "Zero_Chaos" Farina
2013-04-12 18:21                         ` [gentoo-catalyst] [PATCH v2 0/2] pkgcache warning in catalyst-config(5) W. Trevor King
2013-04-12 18:21                           ` [gentoo-catalyst] [PATCH v2 1/2] doc/catalyst-config.5.txt: Add man page for catalyst.conf W. Trevor King
2013-04-12 18:27                             ` [gentoo-catalyst] " W. Trevor King
2013-04-12 18:47                             ` [gentoo-catalyst] " Rick "Zero_Chaos" Farina
2013-04-12 19:05                               ` W. Trevor King
2013-04-12 19:30                                 ` Rick "Zero_Chaos" Farina
2013-04-16  1:33                                   ` [gentoo-catalyst] [PATCH v3 0/2] pkgcache warning in catalyst-config(5) W. Trevor King
2013-04-16  1:33                                     ` [gentoo-catalyst] [PATCH v3 1/2] doc/catalyst-config.5.txt: Add man page for catalyst.conf W. Trevor King
2013-04-16  1:33                                     ` [gentoo-catalyst] [PATCH v3 2/2] doc/catalyst-config.5.txt: Document linking issues with binary packages W. Trevor King
2013-12-14  5:41                                     ` [gentoo-catalyst] Re: [PATCH v3 0/2] pkgcache warning in catalyst-config(5) W. Trevor King
2013-04-12 18:21                           ` [gentoo-catalyst] [PATCH v2 2/2] doc/catalyst-config.5.txt: Document linking issues with binary packages W. Trevor King
2013-04-11 18:20               ` [gentoo-catalyst] Binary package dependencies and update_seed Matt Turner
2013-04-11 18:22             ` Matt Turner
2013-04-11 18:53               ` Rick "Zero_Chaos" Farina
2013-04-11 19:00                 ` W. Trevor King
2013-04-11 19:03                 ` Matt Turner
2013-04-11 19:18                   ` Rick "Zero_Chaos" Farina
2013-04-11 20:24                     ` Matt Turner
2013-04-11 20:34                       ` W. Trevor King
2013-04-12  1:11                         ` W. Trevor King
2013-04-11 20:37                       ` Rick "Zero_Chaos" Farina
2013-04-11 18:53               ` W. Trevor King
2013-04-12  6:57                 ` Brian Dolbec
2013-04-16 19:42           ` [gentoo-catalyst] [PATCH 0/2] Blacklisting binary packages W. Trevor King
2013-04-16 19:42             ` [gentoo-catalyst] [PATCH 1/2] spec: Add binpkg_blacklist option for troublesome packages W. Trevor King
2013-04-16 19:42             ` [gentoo-catalyst] [PATCH 2/2] Revert "don't build packages during update_seed" W. Trevor King
2013-04-16 20:35             ` [gentoo-catalyst] [PATCH 0/2] Blacklisting binary packages Matt Turner
2013-04-16 20:59               ` W. Trevor King
     [not found]                 ` <516DD074.3090906@gentoo.org>
2013-04-16 22:53                   ` W. Trevor King
2013-04-17  4:18                     ` Brian Dolbec
2013-04-17 11:30                       ` W. Trevor King
2013-04-17 14:57                         ` Matt Turner
2013-04-19 14:11             ` Rick "Zero_Chaos" Farina
2013-04-19 16:18               ` W. Trevor King
2013-04-19 16:32                 ` Rick "Zero_Chaos" Farina
2013-04-19 16:36                   ` W. Trevor King
  -- strict thread matches above, loose matches on Subject: below --
2013-01-08  8:32 [gentoo-catalyst] More proposed Catalyst changes Brian Dolbec
2013-01-08 18:08 ` Peter Stuge
2013-01-12  8:55 ` Brian Dolbec
2013-01-31 18:39   ` W. Trevor King
2013-01-31 19:46     ` W. Trevor King
2013-02-02 20:41       ` Brian Dolbec
2013-02-03 12:44         ` W. Trevor King
2013-04-11  2:06       ` [gentoo-catalyst] chmod +x all sh scripts so they can run from the git checkout W. Trevor King
2013-02-02 18:45     ` [gentoo-catalyst] More proposed Catalyst changes Brian Dolbec
2013-02-03 12:20       ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox