[gentoo-commits] proj/catalyst:pending commit in: doc/

2017-11-22 Thread Brian Dolbec
commit: f997e53273fd214aa16536024c4e2be0dd60db72
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat Mar 11 07:55:50 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Wed Nov 22 01:16:22 2017 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f997e532

doc/cataylst-config.5.txt: Update for the new variables

 doc/catalyst-config.5.txt | 56 +--
 1 file changed, 49 insertions(+), 7 deletions(-)

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index f778a804..5c5ad293 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -24,12 +24,23 @@ and empty lines are interpreted as comments.  For example:
 
 -
 # /etc/catalyst/catalyst.conf
+
 digests="auto"
 contents="auto"
-distdir="/usr/portage/distfiles"
 envscript="/etc/catalyst/catalystrc"
 options="autoresume bindist kerncache pkgcache seedcache snapcache"
+
+# source repo settings
+distdir="/usr/portage/distfiles"
 portdir="/usr/portage"
+
+# target repo info
+repo_basedir="/usr"
+repo_name="portage"
+target_distdir="/usr/portage/distfiles"
+target_pkgdir="/usr/portage/packages"
+
+# other catalyst settings
 sharedir="/usr/share/catalyst"
 snapshot_cache="/var/tmp/catalyst/snapshot_cache"
 storedir="/var/tmp/catalyst"
@@ -72,10 +83,6 @@ Do `isoinfo -f -i FILE`.  'isoinfo-f' is the only option not 
chosen
 by the automatic algorithm.
 --
 
-*distdir*::
-Distfiles location.  `/usr/portage/distfiles` should work for most
-default installations.
-
 *envscript*::
 Environment script location, which allows users to set options such as
 HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
@@ -140,9 +147,44 @@ break your cache.  The cache is unlinked before any empty 
or rm
 processing.
 --
 
+Repository settings
+~~~
+
+*distdir*::
+Source distfiles location used in generation of the stages.  This is usually 
the
+hosts distfiles location.  `/usr/portage/distfiles` should work for most
+default installations, but it should be set to match your hosts configuration.
+
 *portdir*::
-Portage tree location.  `/usr/portage/` should work for most default
-installations.
+Source Gentoo tree location (primary repo). `/usr/portage/` should work for 
most
+default installations.
+
+*repo_basedir*::
+The target repository directory to contain the rimary repo (gentoo repo) and
+any overlays.  `/usr` is the historical location. But that is in the process of
+changing.  `/var/gentoo/repos` is an option.
+
+*repo_name*::
+The name of the main repository (ie: gentoo).  This has had a directory name
+of `portage` in the past.  But it has an internal name of `gentoo`, which is
+what its directory name should be.  This name is used in the snapshot name
+generated and also the directory name of the repository created with the
+snapshot target.  The new general rule is that the directory name and its
+internal repo_name value should be the same.
+
+*target_distdir*::
+This is the target distfiles directory location for the stage being created.
+This is important because this value will be stored in the stage's make.conf
+and will become the default location used if it is not edited by users.
+The default location is `/usr/portage/distfiles`.
+
+*target_pkgdir*::
+This is the target packages directory for storing binpkgs in the stage being
+built.  This location is stored in the make.conf of the stage being built.
+The default location for this has typically been `/usr/portage/packages`
+
+Other settings
+~~
 
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for



[gentoo-commits] proj/catalyst:pending commit in: doc/

2017-03-19 Thread Brian Dolbec
commit: 5552874ba5c3d23a1a2b11d8b245dcd5c598b16e
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat Mar 11 07:55:50 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Sun Mar 19 16:42:51 2017 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5552874b

doc/cataylst-config.5.txt: Update for the new variables

 doc/catalyst-config.5.txt | 56 +--
 1 file changed, 49 insertions(+), 7 deletions(-)

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index f778a804..5c5ad293 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -24,12 +24,23 @@ and empty lines are interpreted as comments.  For example:
 
 -
 # /etc/catalyst/catalyst.conf
+
 digests="auto"
 contents="auto"
-distdir="/usr/portage/distfiles"
 envscript="/etc/catalyst/catalystrc"
 options="autoresume bindist kerncache pkgcache seedcache snapcache"
+
+# source repo settings
+distdir="/usr/portage/distfiles"
 portdir="/usr/portage"
+
+# target repo info
+repo_basedir="/usr"
+repo_name="portage"
+target_distdir="/usr/portage/distfiles"
+target_pkgdir="/usr/portage/packages"
+
+# other catalyst settings
 sharedir="/usr/share/catalyst"
 snapshot_cache="/var/tmp/catalyst/snapshot_cache"
 storedir="/var/tmp/catalyst"
@@ -72,10 +83,6 @@ Do `isoinfo -f -i FILE`.  'isoinfo-f' is the only option not 
chosen
 by the automatic algorithm.
 --
 
-*distdir*::
-Distfiles location.  `/usr/portage/distfiles` should work for most
-default installations.
-
 *envscript*::
 Environment script location, which allows users to set options such as
 HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
@@ -140,9 +147,44 @@ break your cache.  The cache is unlinked before any empty 
or rm
 processing.
 --
 
+Repository settings
+~~~
+
+*distdir*::
+Source distfiles location used in generation of the stages.  This is usually 
the
+hosts distfiles location.  `/usr/portage/distfiles` should work for most
+default installations, but it should be set to match your hosts configuration.
+
 *portdir*::
-Portage tree location.  `/usr/portage/` should work for most default
-installations.
+Source Gentoo tree location (primary repo). `/usr/portage/` should work for 
most
+default installations.
+
+*repo_basedir*::
+The target repository directory to contain the rimary repo (gentoo repo) and
+any overlays.  `/usr` is the historical location. But that is in the process of
+changing.  `/var/gentoo/repos` is an option.
+
+*repo_name*::
+The name of the main repository (ie: gentoo).  This has had a directory name
+of `portage` in the past.  But it has an internal name of `gentoo`, which is
+what its directory name should be.  This name is used in the snapshot name
+generated and also the directory name of the repository created with the
+snapshot target.  The new general rule is that the directory name and its
+internal repo_name value should be the same.
+
+*target_distdir*::
+This is the target distfiles directory location for the stage being created.
+This is important because this value will be stored in the stage's make.conf
+and will become the default location used if it is not edited by users.
+The default location is `/usr/portage/distfiles`.
+
+*target_pkgdir*::
+This is the target packages directory for storing binpkgs in the stage being
+built.  This location is stored in the make.conf of the stage being built.
+The default location for this has typically been `/usr/portage/packages`
+
+Other settings
+~~
 
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for



[gentoo-commits] proj/catalyst:pending commit in: doc/

2017-03-16 Thread Brian Dolbec
commit: af58a12ae62fb795c44034be49011d75f7b58bdb
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat Mar 11 07:55:50 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Thu Mar 16 22:56:12 2017 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=af58a12a

doc/cataylst-config.5.txt: Update for the new variables

 doc/catalyst-config.5.txt | 52 ---
 1 file changed, 45 insertions(+), 7 deletions(-)

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index f778a80..727d0f9 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -24,12 +24,23 @@ and empty lines are interpreted as comments.  For example:
 
 -
 # /etc/catalyst/catalyst.conf
+
 digests="auto"
 contents="auto"
-distdir="/usr/portage/distfiles"
 envscript="/etc/catalyst/catalystrc"
 options="autoresume bindist kerncache pkgcache seedcache snapcache"
+
+# source repo settings
+distdir="/usr/portage/distfiles"
 portdir="/usr/portage"
+
+# target repo info
+repo_basedir="/usr"
+repo_name="portage"
+target_distdir="/usr/portage/distfiles"
+target_pkgdir="/usr/portage/packages"
+
+# other catalyst settings
 sharedir="/usr/share/catalyst"
 snapshot_cache="/var/tmp/catalyst/snapshot_cache"
 storedir="/var/tmp/catalyst"
@@ -72,10 +83,6 @@ Do `isoinfo -f -i FILE`.  'isoinfo-f' is the only option not 
chosen
 by the automatic algorithm.
 --
 
-*distdir*::
-Distfiles location.  `/usr/portage/distfiles` should work for most
-default installations.
-
 *envscript*::
 Environment script location, which allows users to set options such as
 HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
@@ -140,9 +147,40 @@ break your cache.  The cache is unlinked before any empty 
or rm
 processing.
 --
 
+**repository settings*::
+*distdir*::
+Source distfiles location used in generation of the stages.  This is usually 
the
+hosts distfiles location.  `/usr/portage/distfiles` should work for most
+default installations, but it should be set to match your hosts configuration.
+
 *portdir*::
-Portage tree location.  `/usr/portage/` should work for most default
-installations.
+Source Gentoo tree location (primary repo). `/usr/portage/` should work for 
most
+default installations.
+
+*repo_basedir*::
+The target repository directory to contain the rimary repo (gentoo repo) and
+any overlays.  `/usr` is the historical location. But that is in the process of
+changing.  `/var/gentoo/repos` is an option.
+
+*repo_name*::
+The name of the main repository (ie: gentoo).  This has had a directory name
+of `portage` in the past.  But it has an internal name of `gentoo`, which is
+what its directory name should be.  This name is used in the snapshot name
+generated and also the directory name of the repository created with the
+snapshot target.  The new general rule is that the directory name and its
+internal repo_name value should be the same.
+
+*target_distdir*::
+This is the target distfiles directory location for the stage being created.
+This is important because this value will be stored in the stage's make.conf
+and will become the default location used if it is not edited by users.
+The default location is `/usr/portage/distfiles`.
+
+*target_pkgdir*::
+This is the target packages directory for storing binpkgs in the stage being
+built.  This location is stored in the make.conf of the stage being built.
+The default location for this has typically been `/usr/portage/packages`
+--
 
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for



[gentoo-commits] proj/catalyst:pending commit in: doc/

2017-03-11 Thread Brian Dolbec
commit: 5bdd4a6d7032ea6c8ce18c94627b1fd78082e36c
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat Mar 11 07:55:50 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Sat Mar 11 09:01:07 2017 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5bdd4a6d

doc/cataylst-config.5.txt: Update for the new variables

 doc/catalyst-config.5.txt | 52 ---
 1 file changed, 45 insertions(+), 7 deletions(-)

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index f778a80..727d0f9 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -24,12 +24,23 @@ and empty lines are interpreted as comments.  For example:
 
 -
 # /etc/catalyst/catalyst.conf
+
 digests="auto"
 contents="auto"
-distdir="/usr/portage/distfiles"
 envscript="/etc/catalyst/catalystrc"
 options="autoresume bindist kerncache pkgcache seedcache snapcache"
+
+# source repo settings
+distdir="/usr/portage/distfiles"
 portdir="/usr/portage"
+
+# target repo info
+repo_basedir="/usr"
+repo_name="portage"
+target_distdir="/usr/portage/distfiles"
+target_pkgdir="/usr/portage/packages"
+
+# other catalyst settings
 sharedir="/usr/share/catalyst"
 snapshot_cache="/var/tmp/catalyst/snapshot_cache"
 storedir="/var/tmp/catalyst"
@@ -72,10 +83,6 @@ Do `isoinfo -f -i FILE`.  'isoinfo-f' is the only option not 
chosen
 by the automatic algorithm.
 --
 
-*distdir*::
-Distfiles location.  `/usr/portage/distfiles` should work for most
-default installations.
-
 *envscript*::
 Environment script location, which allows users to set options such as
 HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
@@ -140,9 +147,40 @@ break your cache.  The cache is unlinked before any empty 
or rm
 processing.
 --
 
+**repository settings*::
+*distdir*::
+Source distfiles location used in generation of the stages.  This is usually 
the
+hosts distfiles location.  `/usr/portage/distfiles` should work for most
+default installations, but it should be set to match your hosts configuration.
+
 *portdir*::
-Portage tree location.  `/usr/portage/` should work for most default
-installations.
+Source Gentoo tree location (primary repo). `/usr/portage/` should work for 
most
+default installations.
+
+*repo_basedir*::
+The target repository directory to contain the rimary repo (gentoo repo) and
+any overlays.  `/usr` is the historical location. But that is in the process of
+changing.  `/var/gentoo/repos` is an option.
+
+*repo_name*::
+The name of the main repository (ie: gentoo).  This has had a directory name
+of `portage` in the past.  But it has an internal name of `gentoo`, which is
+what its directory name should be.  This name is used in the snapshot name
+generated and also the directory name of the repository created with the
+snapshot target.  The new general rule is that the directory name and its
+internal repo_name value should be the same.
+
+*target_distdir*::
+This is the target distfiles directory location for the stage being created.
+This is important because this value will be stored in the stage's make.conf
+and will become the default location used if it is not edited by users.
+The default location is `/usr/portage/distfiles`.
+
+*target_pkgdir*::
+This is the target packages directory for storing binpkgs in the stage being
+built.  This location is stored in the make.conf of the stage being built.
+The default location for this has typically been `/usr/portage/packages`
+--
 
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for



[gentoo-commits] proj/catalyst:pending commit in: doc/

2017-03-10 Thread Brian Dolbec
commit: 6ab48e3904ac008f7a2019fba0053c86bcefbb49
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat Mar 11 07:55:50 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Sat Mar 11 07:55:50 2017 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6ab48e39

doc/cataylst-config.5.txt: Update for the new variables

 doc/catalyst-config.5.txt | 52 ---
 1 file changed, 45 insertions(+), 7 deletions(-)

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index f778a80..727d0f9 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -24,12 +24,23 @@ and empty lines are interpreted as comments.  For example:
 
 -
 # /etc/catalyst/catalyst.conf
+
 digests="auto"
 contents="auto"
-distdir="/usr/portage/distfiles"
 envscript="/etc/catalyst/catalystrc"
 options="autoresume bindist kerncache pkgcache seedcache snapcache"
+
+# source repo settings
+distdir="/usr/portage/distfiles"
 portdir="/usr/portage"
+
+# target repo info
+repo_basedir="/usr"
+repo_name="portage"
+target_distdir="/usr/portage/distfiles"
+target_pkgdir="/usr/portage/packages"
+
+# other catalyst settings
 sharedir="/usr/share/catalyst"
 snapshot_cache="/var/tmp/catalyst/snapshot_cache"
 storedir="/var/tmp/catalyst"
@@ -72,10 +83,6 @@ Do `isoinfo -f -i FILE`.  'isoinfo-f' is the only option not 
chosen
 by the automatic algorithm.
 --
 
-*distdir*::
-Distfiles location.  `/usr/portage/distfiles` should work for most
-default installations.
-
 *envscript*::
 Environment script location, which allows users to set options such as
 HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
@@ -140,9 +147,40 @@ break your cache.  The cache is unlinked before any empty 
or rm
 processing.
 --
 
+**repository settings*::
+*distdir*::
+Source distfiles location used in generation of the stages.  This is usually 
the
+hosts distfiles location.  `/usr/portage/distfiles` should work for most
+default installations, but it should be set to match your hosts configuration.
+
 *portdir*::
-Portage tree location.  `/usr/portage/` should work for most default
-installations.
+Source Gentoo tree location (primary repo). `/usr/portage/` should work for 
most
+default installations.
+
+*repo_basedir*::
+The target repository directory to contain the rimary repo (gentoo repo) and
+any overlays.  `/usr` is the historical location. But that is in the process of
+changing.  `/var/gentoo/repos` is an option.
+
+*repo_name*::
+The name of the main repository (ie: gentoo).  This has had a directory name
+of `portage` in the past.  But it has an internal name of `gentoo`, which is
+what its directory name should be.  This name is used in the snapshot name
+generated and also the directory name of the repository created with the
+snapshot target.  The new general rule is that the directory name and its
+internal repo_name value should be the same.
+
+*target_distdir*::
+This is the target distfiles directory location for the stage being created.
+This is important because this value will be stored in the stage's make.conf
+and will become the default location used if it is not edited by users.
+The default location is `/usr/portage/distfiles`.
+
+*target_pkgdir*::
+This is the target packages directory for storing binpkgs in the stage being
+built.  This location is stored in the make.conf of the stage being built.
+The default location for this has typically been `/usr/portage/packages`
+--
 
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for



[gentoo-commits] proj/catalyst:pending commit in: doc/

2017-03-10 Thread Brian Dolbec
commit: d7dbe6e1b2fd3148a652843ef43ab80415959842
Author: Rick Farina (Zero_Chaos)  gentoo  org>
AuthorDate: Sat Mar 11 02:35:39 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Sat Mar 11 02:35:39 2017 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d7dbe6e1

would be nice if the ebuild worked again

 doc/make_subarch_table_guidexml.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/make_subarch_table_guidexml.py 
b/doc/make_subarch_table_guidexml.py
index 0699d2a..f571e00 100755
--- a/doc/make_subarch_table_guidexml.py
+++ b/doc/make_subarch_table_guidexml.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2
+#!/usr/bin/python
 # Copyright (C) 2011 Sebastian Pipping 
 # Copyright (C) 2013 Brian dolbec 
 # Licensed under GPL v2 or later



[gentoo-commits] proj/catalyst:pending commit in: doc/

2017-03-10 Thread Brian Dolbec
commit: 9145a72ed2f741a1cdc364314561f4a88fbb1baf
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Mar 10 18:49:43 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Fri Mar 10 18:50:10 2017 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9145a72e

doc/make_subarch_table_guidexml.py: Fix shebang

Signed-off-by: Brian Dolbec  gentoo.org>

 doc/make_subarch_table_guidexml.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/make_subarch_table_guidexml.py 
b/doc/make_subarch_table_guidexml.py
index 0699d2a..f571e00 100755
--- a/doc/make_subarch_table_guidexml.py
+++ b/doc/make_subarch_table_guidexml.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2
+#!/usr/bin/python
 # Copyright (C) 2011 Sebastian Pipping 
 # Copyright (C) 2013 Brian dolbec 
 # Licensed under GPL v2 or later



[gentoo-commits] proj/catalyst:pending commit in: doc/, /, catalyst/

2015-11-20 Thread Brian Dolbec
commit: b3cfe6e0c7754a9e17b681581b2a317b7861b486
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Oct 12 03:59:28 2015 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Wed Oct 28 16:49:56 2015 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b3cfe6e0

lint: fix redefined-outer-name warnings

The doc module just needs a main func to hold all the variables
instead of coding it all in global scope.

 .pylintrc  | 3 +--
 catalyst/log.py| 4 
 doc/make_subarch_table_guidexml.py | 9 +++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.pylintrc b/.pylintrc
index 2a03f23..e657daf 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -32,10 +32,9 @@ load-plugins=
 # bad-continuation -- might be hard with tab indentation policy
 # invalid-name -- need to manage constants better
 # line-too-long -- figure out a length and stick to it
-# redefined-outer-name -- clean up code to not do this
 # super-init-not-called -- fix the classes __init__ structure
 # no-init -- update classes w/missing __init__ functions
-disable=missing-docstring, too-many-lines, too-many-branches, 
too-many-statements, too-few-public-methods, too-many-instance-attributes, 
too-many-public-methods, too-many-locals, too-many-arguments, locally-enabled, 
locally-disabled, fixme, broad-except, bad-whitespace, bad-continuation, 
invalid-name, line-too-long, redefined-outer-name, super-init-not-called, 
no-init
+disable=missing-docstring, too-many-lines, too-many-branches, 
too-many-statements, too-few-public-methods, too-many-instance-attributes, 
too-many-public-methods, too-many-locals, too-many-arguments, locally-enabled, 
locally-disabled, fixme, broad-except, bad-whitespace, bad-continuation, 
invalid-name, line-too-long, super-init-not-called, no-init
 
 
 [REPORTS]

diff --git a/catalyst/log.py b/catalyst/log.py
index 5938199..d640dec 100644
--- a/catalyst/log.py
+++ b/catalyst/log.py
@@ -98,6 +98,10 @@ class CatalystFormatter(logging.Formatter):
return msg
 
 
+# We define |debug| in global scope so people can call log.debug(), but it
+# makes the linter complain when we have a |debug| keyword.  Since we don't
+# use that func in here, it's not a problem, so silence the warning.
+# pylint: disable=redefined-outer-name
 def setup_logging(level, output=None, debug=False, color=None):
"""Initialize the logging module using the |level| level"""
# The incoming level will be things like "info", but setLevel wants

diff --git a/doc/make_subarch_table_guidexml.py 
b/doc/make_subarch_table_guidexml.py
index a6a9022..0699d2a 100755
--- a/doc/make_subarch_table_guidexml.py
+++ b/doc/make_subarch_table_guidexml.py
@@ -6,6 +6,7 @@
 
 import os
 import re
+import sys
 import textwrap
 
 
@@ -99,11 +100,11 @@ def dump(subarch_title_to_subarch_id, 
subarch_id_to_pattern_arch_genericrch_id):
f.close()
 
 
-if __name__ == '__main__':
+def main(_argv):
subarch_title_to_subarch_id = dict()
subarch_id_to_pattern_arch_genericrch_id = dict()
 
-   for (dirpath, dirnames, filenames) in os.walk('catalyst/arch'):
+   for dirpath, _dirnames, filenames in os.walk('catalyst/arch'):
for _fn in filenames:
if not _fn.endswith('.py'):
continue
@@ -114,3 +115,7 @@ if __name__ == '__main__':
handle_file(fn, subarch_title_to_subarch_id, 
subarch_id_to_pattern_arch_genericrch_id)
 
dump(subarch_title_to_subarch_id, 
subarch_id_to_pattern_arch_genericrch_id)
+
+
+if __name__ == '__main__':
+   main(sys.argv[1:])



[gentoo-commits] proj/catalyst:pending commit in: doc/

2015-11-20 Thread Brian Dolbec
commit: 6a38e62e143df9bda84da1ce8a54948c57e833fa
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Oct 12 00:55:05 2015 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Wed Oct 28 16:49:56 2015 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6a38e62e

make_target_table: rewrite for py3/stability

 doc/make_target_table.py | 32 ++--
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/doc/make_target_table.py b/doc/make_target_table.py
index f127c37..9eb072b 100755
--- a/doc/make_target_table.py
+++ b/doc/make_target_table.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/python
 # Copyright (C) 2012 W. Trevor King 
 # Copyright (C) 2012 Sebastian Pipping 
 # Copyright (C) 2013 Brian dolbec 
@@ -10,34 +10,38 @@
 
 from __future__ import print_function
 
-import sys as _sys
-
 import glob
-import re
+import locale
+import os
+import sys
 
 
-def key_netboot_before_netboot2((target_name, _module)):
-   return target_name + '1'
+def main(_argv):
+   source_root = 
os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
 
+   # Force consistent sorting order.
+   locale.setlocale(locale.LC_COLLATE, 'C')
 
-if __name__ == '__main__':
-   extractor = re.compile('^catalyst/targets/(([^ ]+)).py$')
targets = list()
-   for filename in sorted(glob.glob('catalyst/targets/*.py')):
+   for filename in glob.glob(os.path.join(source_root, 
'catalyst/targets/*.py')):
if '__init__' in filename:
continue
 
-   match = extractor.match(filename)
-   target_name = match.group(2).replace('_', '-')
-   module_name = 'catalyst.targets.' + match.group(1)
+   name = os.path.basename(filename)[0:-3]
+   target_name = name.replace('_', '-')
+   module_name = 'catalyst.targets.' + name
 
__import__(module_name)
-   module = _sys.modules[module_name]
+   module = sys.modules[module_name]
 
targets.append((target_name, module))
 
-   for target_name, module in sorted(targets, 
key=key_netboot_before_netboot2):
+   for target_name, module in sorted(targets, key=lambda x: x[0]):
print('`%s`;;' % target_name)
# Replace blank lines with `+` (asciidoc list item continuation)
print(module.__doc__.strip().replace('\n\n', '\n+\n'))
print('')
+
+
+if __name__ == '__main__':
+   main(sys.argv[1:])



[gentoo-commits] proj/catalyst:pending commit in: doc/

2015-02-26 Thread Brian Dolbec
commit: de8d4332d2ffbe1f627a2e97d582650c80c87cd1
Author: W. Trevor King wking AT tremily DOT us
AuthorDate: Fri Apr 12 18:13:57 2013 +
Commit: Brian Dolbec dolsen AT gentoo DOT org
CommitDate: Thu Feb 26 19:15:21 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=de8d4332

doc/catalyst-config.5.txt: Document linking issues with binary packages

This gives users a heads up explaining why they might see linking
errors when pkgcache is enabled.  I first saw this when I build a
stage1 without update_seed.  Because my seed stage3 linked against
libmpc.so.2, some of my stage1 files linked against the older mpc.
However, the mpc-1.0.1 built for the stage1 installed libmpc.so.3.
When I tried to use this stage1 to build a stage2, it died with:

  /usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/cc1:
error while loading shared libraries: libmpc.so.2:
cannot open shared object file: No such file or directory

To fix this, I enabled update_seed, but binary packages built during
my first pass were used to populate the stage1, so even though I'd
updated the seed stage3 toolchain, I still had a stage1 with cc1
linked against libmpc.so.2.

After clearing the binary package cache, I got a stage1 *built* with
the updated seed stage3, which gave a cc1 linked against libmpc.so.3
(hurray!).

This commit adds a warning in the pkgcache documentation that should
help people understand what might be going wrong if they see similar
linking errors.  For more details, see the thread following
http://thread.gmane.org/gmane.linux.gentoo.catalyst/2137/focus=2193

---
 doc/catalyst-config.5.txt | 44 +++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 27bc0bb..63a015f 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -126,7 +126,8 @@ build dies during `livecd-stage2`.
 pkgcache::
 Enable `--usepkg` and `--buildpkg` for most *emerge(1)* runs.  This is
 useful if your build dies prematurely.  However, you may experience
-linking problems.
+linking problems.  See the *BINARY PACKAGE DEPENDENCIES* section for
+details.
 
 seedcache::
 Use the build output of a previous target if it exists to speed up the
@@ -174,6 +175,47 @@ ripemd256, ripemd320, sha1, sha224, sha256, sha384, 
sha512, snefru128,
 snefru256, tiger, tiger128, tiger160, whirlpool.
 
 
+BINARY PACKAGE DEPENDENCIES
+---
+This section is only important if you are using binary packages to
+build your stages (by enabling the `pkgcache` option and restarting
+incomplete builds).
+
+Before EAPI-5 introduced ABI sub-slots, the build-time compatibility
+of packages was not recorded.  This leads to problems such as binary
+GCC packages built against mpc-0.8.2 (which installs libmpc.so.2)
+being installed on systems that only have mpc-1.0.1 (which installs
+libmpc.so.3), resulting in:
+
+-
+/usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/cc1:
+  error while loading shared libraries: libmpc.so.2:
+  cannot open shared object file: No such file or directory
+-
+
+As long as there are packages in your stage that don't use ABI
+sub-slots, you may experience errors like this due to untracked ABI
+missmatches in binary packages.  Packages generated by catalyst builds
+are currently namespaced:
+
+-
+.../packages/rel_type/target-subarch-version_stamp/Packages
+-
+
+so running into these out-of-date packages is unlikely.  You may run
+into problems if:
+
+* you enable `update_seed` in your stage1 spec after a previous run
+  which generated packages linking against out-of-date seed libraries
+  or
+* you update your snapshot and an untracked ABI dependency is bumped
+  without a similar bump in the dependent package.
+
+without also bumping any of the package namespace variables in your
+spec.  If you do make such a change, it's a good idea to clear the
+package cache in question and rebuild the packages from scratch.
+
+
 FILES
 -
 An example configuration file can be found at



[gentoo-commits] proj/catalyst:pending commit in: doc/, /

2015-02-26 Thread Brian Dolbec
commit: 3ec4d246bcca3b0cb6dcfbaf404e55bd241976d7
Author: Brian Dolbec dolsen AT gentoo DOT org
AuthorDate: Wed Jun  5 17:38:44 2013 +
Commit: Brian Dolbec dolsen AT gentoo DOT org
CommitDate: Thu Feb 26 19:15:21 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3ec4d246

update doc scripts for the new structure

---
 Makefile   |  4 ++--
 doc/make_subarch_table_guidexml.py |  5 -
 doc/make_target_table.py   | 13 +++--
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 757113c..d2f17f7 100644
--- a/Makefile
+++ b/Makefile
@@ -24,10 +24,10 @@ $(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile 
catalyst
 files/catalyst.1: doc/subarches.generated.txt
 files/catalyst-spec.5: doc/subarches.generated.txt doc/targets.generated.txt
 
-doc/subarches.generated.txt: $(wildcard arch/*.py) 
doc/make_subarch_table_guidexml.py
+doc/subarches.generated.txt: $(wildcard catalyst/arch/*.py) 
doc/make_subarch_table_guidexml.py
./doc/make_subarch_table_guidexml.py
 
-doc/targets.generated.txt: doc/make_target_table.py $(wildcard 
modules/*_target.py)
+doc/targets.generated.txt: doc/make_target_table.py $(wildcard 
catalyst/targets/*.py)
./$  $@
 
 $(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile

diff --git a/doc/make_subarch_table_guidexml.py 
b/doc/make_subarch_table_guidexml.py
index 16c8776..54e0a4a 100755
--- a/doc/make_subarch_table_guidexml.py
+++ b/doc/make_subarch_table_guidexml.py
@@ -1,5 +1,6 @@
 #! /usr/bin/env python2
 # Copyright (C) 2011 Sebastian Pipping sebast...@pipping.org
+# Copyright (C) 2013 Brian dolbec dol...@gentoo.org
 # Licensed under GPL v2 or later
 
 
@@ -102,10 +103,12 @@ if __name__ == '__main__':
subarch_title_to_subarch_id = dict()
subarch_id_to_pattern_arch_genericrch_id = dict()
 
-   for (dirpath, dirnames, filenames) in os.walk('arch'):
+   for (dirpath, dirnames, filenames) in os.walk('catalyst/arch'):
for _fn in filenames:
if not _fn.endswith('.py'):
continue
+   if _fn == '__init__.py':
+   continue
 
fn = os.path.join(dirpath, _fn)
handle_file(fn, subarch_title_to_subarch_id, 
subarch_id_to_pattern_arch_genericrch_id)

diff --git a/doc/make_target_table.py b/doc/make_target_table.py
index ad4d292..9e7ebe8 100755
--- a/doc/make_target_table.py
+++ b/doc/make_target_table.py
@@ -1,16 +1,17 @@
 #!/usr/bin/env python2
 # Copyright (C) 2012 W. Trevor King wk...@drexel.edu
 # Copyright (C) 2012 Sebastian Pipping sebast...@pipping.org
+# Copyright (C) 2013 Brian dolbec dol...@gentoo.org
 # Licensed under GPL v2 or later
 
 # This script should be run from the root of the catalyst source.
+# source the testpath file then run doc/make_target_table.py
+
 
 from __future__ import print_function
 
 import sys as _sys
 
-_sys.path.insert(0, 'modules')  # so we can find the `catalyst` module
-
 import glob
 import re
 
@@ -20,15 +21,15 @@ def key_netboot_before_netboot2((target_name, module)):
 
 
 if __name__ == '__main__':
-   extractor = re.compile('^modules/(([^ ]+)_target).py$')
+   extractor = re.compile('^catalyst/targets/(([^ ]+)).py$')
targets = list()
-   for filename in sorted(glob.glob('modules/*_target.py')):
-   if 'generic' in filename:
+   for filename in sorted(glob.glob('catalyst/targets/*.py')):
+   if '__init__' in filename:
continue
 
match = extractor.match(filename)
target_name = match.group(2).replace('_', '-')
-   module_name = match.group(1)
+   module_name = 'catalyst.targets.' + match.group(1)
 
__import__(module_name)
module = _sys.modules[module_name]



[gentoo-commits] proj/catalyst:pending commit in: doc/, files/

2015-02-26 Thread Brian Dolbec
commit: c7688c6665678f5653beb37fcc20e0fc9d4711b4
Author: W. Trevor King wking AT tremily DOT us
AuthorDate: Thu Apr 11 17:41:43 2013 +
Commit: Brian Dolbec dolsen AT gentoo DOT org
CommitDate: Thu Feb 26 19:15:21 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c7688c66

doc/catalyst-config.5.txt: Add man page for catalyst.conf

This mostly translates the inline comments from files/catalyst.conf
into asciidoc.  While it's nice to have that as stand-alone
documentation, it also makes it easier to refer to longer descriptions
of any tricky issues.  This gives us a place to distill the collected
wisdom of current users for the benefit of others.

---
 doc/catalyst-config.5.txt | 192 ++
 doc/catalyst-spec.5.txt   |   2 +-
 doc/catalyst.1.txt|   1 +
 files/.gitignore  |   1 +
 4 files changed, 195 insertions(+), 1 deletion(-)

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
new file mode 100644
index 000..27bc0bb
--- /dev/null
+++ b/doc/catalyst-config.5.txt
@@ -0,0 +1,192 @@
+CATALYST-CONFIG(5)
+
+:man source:   catalyst {catalystversion}
+:man manual:   catalyst {catalystversion}
+
+
+NAME
+
+catalyst-config - Catalyst configuration files
+
+
+SYNOPSIS
+
+*catalyst* ['OPTIONS'] *-c* 'FILE'
+
+
+DESCRIPTION
+---
+
+*catalyst(1)* reads the configuration file given with `-c` or
+`--config` on the command line.  The file contains keyword-argument
+pairs using a POSIX Shell variable syntax.  Lines starting with `#`
+and empty lines are interpreted as comments.  For example:
+
+-
+# /etc/catalyst/catalyst.conf
+digests=md5 sha1 sha512 whirlpool
+contents=auto
+distdir=/usr/portage/distfiles
+envscript=/etc/catalyst/catalystrc
+options=autoresume bindist kerncache pkgcache seedcache snapcache
+portdir=/usr/portage
+sharedir=/usr/lib/catalyst
+snapshot_cache=/var/tmp/catalyst/snapshot_cache
+storedir=/var/tmp/catalyst
+-
+
+The possible keywords and their meanings are as follows:
+
+Basic configuration
+~~~
+
+*digests*::
+Create a `.DIGESTS` file containing the hash output from any of the
+supported options below.  Adding them all may take a long time.
+(example: `md5 sha1 sha512 whirlpool`).  See the *SUPPORTED HASHES*
+section for a list of supported hashes.
+
+*contents*::
+Create a `.CONTENTS` file listing the contents of the file.  If this
+variable is empty, no `.CONTENTS` will be generated at all.  Supported
+values:
++
+--
+auto::
+Strongly recommended
+
+tar-tv::
+Do `tar tvf FILE`
+
+tar-tvz::
+Do `tar tvzf FILE`
+
+tar-tvy::
+Do `tar tvyf FILE`
+
+isoinfo-l::
+Do `isoinfo -l -i FILE`
+
+isoinfo-f::
+Do `isoinfo -f -i FILE`.  'isoinfo-f' is the only option not chosen
+by the automatic algorithm.
+--
+
+*distdir*::
+Distfiles location.  `/usr/portage/distfiles` should work for most
+default installations.
+
+*envscript*::
+Environment script location, which allows users to set options such as
+HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
+variables needed for building.  The envscript file sets environment
+variables using POSIX shell notation:
++
+-
+export FOO=bar
+-
+
+*hash_function*::
+Internal hash function catalyst should use for things like autoresume,
+seedcache, etc.  The default and fastest is `crc32`.  You should not
+ever need to change this unless your OS does not support it.  See the
+*SUPPORTED HASHES* section for a list of supported hashes.
+
+**options*::
+Set different build-time options (example: `autoresume bindist
+kerncache pkgcache seedcache snapcache`).  Supported values:
++
+--
+autoresume::
+Attempt to resume a failed build.  Clear the autoresume flags with the
+`-a` option to the catalyst command line.  `-p` will clear the
+autoresume flags as well as your pkgcache and kerncache.
+
+bindist::
+Enable the `bindist` `USE` flag.  This is recommended if you will be
+redistributing builds, but see the package specific definitions for
+details.
+
+ccache::
+Enable build time ccache support.  WARNING: ccache has been known to
+cause random build failures and bugs reported with ccache enabled may
+be closed invalid.
+
+distcc::
+Enable distcc support for building. You have to set distcc_hosts in
+your spec file.
+
+icecream::
+Enable icecream compiler cluster support for building.
+
+kerncache::
+Keep a copy of the built kernel and modules.  This is useful if your
+build dies during `livecd-stage2`.
+
+pkgcache::
+Enable `--usepkg` and `--buildpkg` for most *emerge(1)* runs.  This is
+useful if your build dies prematurely.  However, you may experience
+linking problems.
+
+seedcache::
+Use the build output of a previous target if it exists to speed up the
+creation of a new stage.  This avoids unpacking the seed tarball.
+
+snapcache::
+Cache the