public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Rick \"Zero_Chaos\" Farina" <zerochaos@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH 1/4] Add more configured defaults
Date: Fri, 13 Dec 2013 23:12:15 -0500	[thread overview]
Message-ID: <52ABDA9F.9090304@gentoo.org> (raw)
In-Reply-To: <1386990436-9198-2-git-send-email-dolsen@gentoo.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/13/2013 10:07 PM, Brian Dolbec wrote:
> Use the new configured snapshot_name and portdir settings
> Use the portdir setting rather than hard-coded path
> ---
>  catalyst                        | 14 +++++++++-----
>  modules/generic_stage_target.py |  6 ++++--
>  modules/snapshot_target.py      | 14 +++++++++-----
>  modules/tinderbox_target.py     |  4 ++--
>  4 files changed, 24 insertions(+), 14 deletions(-)
> 
> diff --git a/catalyst b/catalyst
> index ba26f3c..19ec77e 100755
> --- a/catalyst
> +++ b/catalyst
> @@ -61,11 +61,15 @@ def parse_config(myconfig):
>  	myconf={}
>  	config_file=""
>  
> -	confdefaults={ "storedir":"/var/tmp/catalyst",\
> -		"sharedir":"/usr/share/catalyst","distdir":"/usr/portage/distfiles",\
> -		"portdir":"/usr/portage","options":"",\
> -		"snapshot_cache":"/var/tmp/catalyst/snapshot_cache",\
> -		"hash_function":"crc32"}
> +	confdefaults={
> +		"hash_function": "crc32",
> +		"portdir": "/usr/portage",
> +		"repo_name": "portage",
> +		"sharedir": "/usr/lib/catalyst",
> +		"snapshot_name": "portage-",
> +		"snapshot_cache": "/var/tmp/catalyst/snapshot_cache",
> +		"storedir": "/var/tmp/catalyst",
> +		}
>  
>  	# first, try the one passed (presumably from the cmdline)
>  	if myconfig:
> diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
> index 848aca2..c2888b6 100644
> --- a/modules/generic_stage_target.py
> +++ b/modules/generic_stage_target.py
> @@ -410,7 +410,8 @@ class generic_stage_target(generic_target):
>  
>  	def set_snapshot_path(self):
>  		self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
> -			"/snapshots/portage-"+self.settings["snapshot"]+".tar.xz")
> +			"/snapshots/" + self.settings["snapshot_name"] +
Do we really need a "snapshot_name" variable to store "portage-" for the
part before the date? Are so many people complaining about calling the
portage snapshots "portage-$DATE.tar.xz" ?
> +			self.settings["snapshot"]+".tar.xz")
>  
>  		if os.path.exists(self.settings["snapshot_path"]):
>  			self.settings["snapshot_path_hash"]=\
> @@ -418,7 +419,8 @@ class generic_stage_target(generic_target):
>  				hash_function=self.settings["hash_function"],verbose=False)
>  		else:
>  			self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
> -				"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2")
> +				"/snapshots/" + self.settings["snapshot_name"] +
same as above
> +				self.settings["snapshot"]+".tar.bz2")
>  
>  			if os.path.exists(self.settings["snapshot_path"]):
>  				self.settings["snapshot_path_hash"]=\
> diff --git a/modules/snapshot_target.py b/modules/snapshot_target.py
> index e93a86a..29d6e87 100644
> --- a/modules/snapshot_target.py
> +++ b/modules/snapshot_target.py
> @@ -18,8 +18,9 @@ class snapshot_target(generic_stage_target):
>  		self.settings=myspec
>  		self.settings["target_subpath"]="portage"
>  		st=self.settings["storedir"]
> -		self.settings["snapshot_path"]=normpath(st+"/snapshots/portage-"+self.settings["version_stamp"]\
> -			+".tar.bz2")
> +		self.settings["snapshot_path"]=normpath(st + "/snapshots/"
> +			+ self.settings["snapshot_name"]
> +			+ self.settings["version_stamp"] + ".tar.bz2")
>  		self.settings["tmp_path"]=normpath(st+"/tmp/"+self.settings["target_subpath"])
>  
>  	def setup(self):
> @@ -46,11 +47,14 @@ class snapshot_target(generic_stage_target):
>  		if not os.path.exists(mytmp):
>  			os.makedirs(mytmp)
>  
> -		cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ --exclude /local/ --exclude CVS/ --exclude .svn --filter=H_**/files/digest-* "+\
> -			self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env)
> +		cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ " +
> +			"--exclude /local/ --exclude CVS/ --exclude .svn --filter=H_**/files/digest-* " +
> +			self.settings["portdir"] + "/ " + mytmp + "/%s/" % self.settings["repo_name"],
> +			"Snapshot failure",env=self.env)
>  
>  		print "Compressing Portage snapshot tarball..."
> -		cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
> +		cmd("tar -I lbzip2 -cf " + self.settings["snapshot_path"] + " -C " +
> +			mytmp + " %s" % self.settings["repo_name"],
>  			"Snapshot creation failure",env=self.env)
>  
>  		self.gen_contents_file(self.settings["snapshot_path"])
> diff --git a/modules/tinderbox_target.py b/modules/tinderbox_target.py
> index 46fe082..d6d3ea3 100644
> --- a/modules/tinderbox_target.py
> +++ b/modules/tinderbox_target.py
> @@ -29,8 +29,8 @@ class tinderbox_target(generic_stage_target):
>  			raise CatalystError,"Tinderbox aborting due to error."
>  
>  	def set_cleanables(self):
> -	    self.settings["cleanables"]=["/etc/resolv.conf","/var/tmp/*","/root/*",\
> -					"/usr/portage"]
> +	    self.settings["cleanables"]=["/etc/resolv.conf","/var/tmp/*","/root/*",
> +					self.settings['portdir']]
>  
>  	def set_action_sequence(self):
>  		#Default action sequence for run method
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSq9qfAAoJEKXdFCfdEflK8ksP/AxrW/r+czmWFR2Ve2QLWqwT
em+AqJMsmaPFXSCas0aiTwEb5K/Ef63shx02NmvDILU08zKtTeAbbw5aD0hkmFfe
MADN22MCz4ohFkKL3SJUKVFa87EiveCh2s6L1YMR35zb1egVmGUTyyrrwY+MELsq
1/TV5w8388DmLAvG+pBQTZZO5rrueZ/bOTzS9BJT3OcIYPy92mxHBGLWsHKKuTgH
2/k42r6PFe8G99PpnL6B6W9ThZAq1hQZP/Wkx7tCtsLtXZOPcU7IdzpTj1m6095d
RzkmmTuAKDjTWdslMYQzjUGSe3WGQjMkspz+EMaFNk0e71OzYGyW8im1u02jhL9n
zforS/3ztXceLnjsUHd5+Cu+caIJnzLEdOjCbpdq84WvBBGGJ7BkeFMUu0NNQNSG
q24srI0qXXhiNOH32ExJ1rwlP5zy9FFz4B3IydVT+3bf51Nt33zehglmpR+BAEml
FfI+3txIaXhRSI7uRGXG8SLGsRm4062f1eE/lr1cTW63kNoWut5U7VJ0BHW5y33G
pu5IzADjIaWnNOY8+3FldAUrBtXxEi+M5lbVk86xsK5FLS1RFsBLrLgDD3W+6w7A
YyQayTBVXRTGw8VowLzvqvjQzJHufSDwhDeau2UpjNrP3PmcVp+DMWbl7qbr2DS/
TCgv4XUmkgFdmcuHPLgD
=eQmL
-----END PGP SIGNATURE-----


  reply	other threads:[~2013-12-14  4:10 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-14  3:07 [gentoo-catalyst] rewrite-on-master patches Brian Dolbec
2013-12-14  3:07 ` [gentoo-catalyst] [PATCH 1/4] Add more configured defaults Brian Dolbec
2013-12-14  4:12   ` Rick "Zero_Chaos" Farina [this message]
2013-12-14  4:51   ` Matt Turner
2013-12-14 11:54     ` Brian Dolbec
2013-12-14 14:33   ` Dylan Baker
2013-12-14 16:31     ` W. Trevor King
2013-12-15  0:05     ` W. Trevor King
2013-12-14  3:07 ` [gentoo-catalyst] [PATCH 2/4] Remove self.mounts and self.mountmap's use of paths for keys and paths Brian Dolbec
2013-12-14  4:26   ` Rick "Zero_Chaos" Farina
2013-12-14  5:08   ` Matt Turner
2013-12-14 11:15     ` Brian Dolbec
2013-12-14 16:37       ` W. Trevor King
2013-12-14 18:05         ` W. Trevor King
2013-12-14 18:44           ` Matt Turner
2013-12-14 22:24             ` [gentoo-catalyst] [PATCH v2 00/21] rewrite-on-master patches (part 1) W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 01/21] modules/tinderbox_target.py: Use 'portdir' instead of hard-coding '/usr/portage' W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 02/21] modules/generic_stage_target.py: " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 03/21] " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 04/21] modules/generic_stage_target.py: Use 'distdir' instead of hard-coding '${PORTAGE}/distfiles' W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 05/21] modules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding '/usr/local/portage' W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 06/21] catalyst: Split confdefaults into line-per-entry W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 07/21] catalyst: Add 'repo_name' default W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 08/21] catalyst: Add 'snapshot_name' default W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 09/21] catalyst: Add 'packagedir' default instead of hard-coding '/usr/portage/packages' W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 10/21] catalyst: Add 'port_tmpdir' default instead of hard-coding '/var/tmp/portage' W. Trevor King
2013-12-15  2:56                 ` Brian Dolbec
2013-12-15  3:07                   ` W. Trevor King
2013-12-15  3:22                     ` W. Trevor King
2013-12-15  4:00                       ` [gentoo-catalyst] [PATCH v3 00/19] rewrite-on-master patches (part 1) W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 01/19] modules/tinderbox_target.py: Use 'portdir' instead of hard-coding '/usr/portage' W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 02/19] modules/generic_stage_target.py: " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 03/19] " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 04/19] modules/generic_stage_target.py: Use 'distdir' instead of hard-coding '${PORTAGE}/distfiles' W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 05/19] modules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding '/usr/local/portage' W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 06/19] catalyst: Split confdefaults into line-per-entry W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 07/19] catalyst: Add 'repo_name' default W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 08/19] catalyst: Add 'snapshot_name' default W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 09/19] catalyst: Add 'packagedir' default instead of hard-coding '/usr/portage/packages' W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 10/19] modules/generic_stage_target.py: Don't use paths as mountmap keys W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 11/19] modules/generic_stage_target.py: Use 'proc' instead of '/proc' as the mountmap key W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 12/19] modules/generic_stage_target.py: Use 'dev' instead of '/dev' " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 13/19] modules/generic_stage_target.py: Use 'distdir' instead of '/usr/portage/distfiles' " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 14/19] modules/generic_stage_target.py: Use 'port_tmpdir' instead of '/var/tmp/portage' " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 15/19] modules/generic_stage_target.py: Use 'devpts' instead of '/dev/pts' " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 16/19] modules/generic_stage_target.py: Use 'packagedir' instead of '/usr/portage/packages' " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 17/19] modules/generic_stage_target.py: Use 'kerncache' instead of '/tmp/kerncache' " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 18/19] modules/generic_stage_target.py: Use 'ccache' instead of '/var/tmp/ccache' " W. Trevor King
2013-12-15  4:00                         ` [gentoo-catalyst] [PATCH v3 19/19] catalst: improve usage() output formatting slightly W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 11/21] modules/generic_stage_target.py: Don't use paths as mountmap keys W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 12/21] modules/generic_stage_target.py: Use 'proc' instead of '/proc' as the mountmap key W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 13/21] modules/generic_stage_target.py: Use 'dev' instead of '/dev' " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 14/21] modules/generic_stage_target.py: Use 'distdir' instead of '/usr/portage/distfiles' " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 15/21] modules/generic_stage_target.py: Use 'port_tmpdir' instead of '/var/tmp/portage' " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 16/21] modules/generic_stage_target.py: Use 'devpts' instead of '/dev/pts' " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 17/21] modules/generic_stage_target.py: Use 'packagedir' instead of '/usr/portage/packages' " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 18/21] modules/generic_stage_target.py: Use 'kerncache' instead of '/tmp/kerncache' " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 19/21] modules/generic_stage_target.py: Use 'ccache' instead of '/var/tmp/ccache' " W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 20/21] catalst: improve usage() output formatting slightly W. Trevor King
2013-12-14 22:24               ` [gentoo-catalyst] [PATCH v2 21/21] catalyst: cleanup long lines W. Trevor King
2013-12-14 22:29               ` [gentoo-catalyst] Re: [PATCH v2 00/21] rewrite-on-master patches (part 1) W. Trevor King
2013-12-14 23:10                 ` W. Trevor King
2013-12-15  0:24               ` [gentoo-catalyst] " Matt Turner
2013-12-15  1:40                 ` W. Trevor King
2013-12-14 14:51   ` [gentoo-catalyst] [PATCH 2/4] Remove self.mounts and self.mountmap's use of paths for keys and paths Dylan Baker
2013-12-14 16:42     ` W. Trevor King
2013-12-14 21:31       ` Dustin C. Hatch
2013-12-14  3:07 ` [gentoo-catalyst] [PATCH 3/4] Adapt commit c52962b6bd2 to use the new configured settings values Brian Dolbec
2013-12-14  4:59   ` Dustin C. Hatch
2013-12-14  6:12     ` Brian Dolbec
2013-12-14 14:54   ` Dylan Baker
2013-12-14 16:07     ` Dylan Baker
2013-12-14 16:22     ` Brian Dolbec
2013-12-14  3:07 ` [gentoo-catalyst] [PATCH 4/4] cleanup long lines, improve usage() output formatting slightly Brian Dolbec
2013-12-14  5:14   ` Matt Turner
2013-12-14  5:22     ` W. Trevor King
2013-12-14  6:21     ` Brian Dolbec
2013-12-14 14:56       ` Dylan Baker
2013-12-14 16:02         ` 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=52ABDA9F.9090304@gentoo.org \
    --to=zerochaos@gentoo.org \
    --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