From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5DFCA138247 for ; Sat, 14 Dec 2013 22:29:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6628BE0ACA; Sat, 14 Dec 2013 22:29:44 +0000 (UTC) Received: from QMTA11.westchester.pa.mail.comcast.net (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) by pigeon.gentoo.org (Postfix) with ESMTP id B6E0AE0AA9 for ; Sat, 14 Dec 2013 22:29:43 +0000 (UTC) Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by QMTA11.westchester.pa.mail.comcast.net with comcast id 1aCo1n0010mv7h05BaVj5q; Sat, 14 Dec 2013 22:29:43 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta11.westchester.pa.mail.comcast.net with comcast id 1aVi1n00R152l3L3XaViyH; Sat, 14 Dec 2013 22:29:43 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id EED33D68C6F; Sat, 14 Dec 2013 14:29:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1387060181; bh=ZLOyUxQJYpLGoy4Ws1AmrMGJqIQvE5ZkUX+ioh63UJU=; h=Date:From:To:Subject:References:In-Reply-To; b=TROYzMSdFV/eDs9tmUsBgchkmyNeotZV42cYKCq0tYZgw7TOmiRFUrmTlcEAnSqaI Bu1DemCX92erLAl9vll00Gh5b2dyI4egVY9GyKXzvLmnnTGjkHFW19dZ+nFCol4cPO NBfwEnvUnzYVABnEsdqvuDugylncJuuNaohTOjSE= Date: Sat, 14 Dec 2013 14:29:41 -0800 From: "W. Trevor King" To: Catalyst Subject: [gentoo-catalyst] Re: [PATCH v2 00/21] rewrite-on-master patches (part 1) Message-ID: <20131214222941.GB25409@odin.tremily.us> References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="c/UxJciryulPFo89" Content-Disposition: inline In-Reply-To: OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; url=http://tremily.us/pubkey.txt User-Agent: Mutt/1.5.22 (2013-10-16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1387060183; bh=dn7GxG5KRBSA3TYlCCvDqvLviOeEmpgPuJFeA2A48oY=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=WIZ8+fudCdqTjNR4OFddN7UmFkGzuCFkk0993PYM77v/TApZpgs9AGrPeE0QgU7Zn LaMFdd1FtmLKIuo5lWmq5jAi1mACjSqsMtT3jHvQk1PeRPkGdYvUyqFxX+KKUcJ1qc f2vgDEhX4ulSExbxZZ2qsGPOQxxa3byWv40r2w3YD43qqoUd0AriX2n03g8ktQf746 KmtYBTDhH8MwfYoqa4RaYgDUAvgT3yRbnL4y2ihsmn1ud9Weqd2R9CdAiBWQzFT3/r qgeENFqqhVvGnXrIGZLE1X4OFVzHhtuxJOgaP8ttX9dQmJlgFRXk9JNzroED29jX3M gg6TZxgb71Vpg== X-Archives-Salt: 3b9b0409-6a96-4da2-8e2d-16e9bf926006 X-Archives-Hash: 99f0049da028c5b374cc265282f9d9a5 --c/UxJciryulPFo89 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Oops, I meant to include a diff from v1 in the v2 cover letter. Here it is now: diff --git a/catalyst b/catalyst index a68a2ba..3983155 100755 --- a/catalyst +++ b/catalyst @@ -63,14 +63,15 @@ def parse_config(myconfig): myconf=3D{} config_file=3D"" =20 - confdefaults=3D{ + confdefaults =3D { "distdir": "/usr/portage/distfiles", "hash_function": "crc32", + "options": "", "packagedir": "/usr/portage/packages", "portdir": "/usr/portage", "port_tmpdir": "/var/tmp/portage", "repo_name": "portage", - "sharedir": "/usr/lib/catalyst", + "sharedir": "/usr/share/catalyst", "snapshot_name": "portage-", "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", "storedir": "/var/tmp/catalyst", @@ -79,7 +80,7 @@ def parse_config(myconfig): # first, try the one passed (presumably from the cmdline) if myconfig: if os.path.exists(myconfig): - print "Using command line specified Catalyst configuration file, "+\ + print "Using command line specified Catalyst configuration file, " + \ myconfig config_file=3Dmyconfig =20 @@ -195,7 +196,7 @@ def import_modules(): for x in required_build_targets: try: fh=3Dopen(conf_values["sharedir"]+"/modules/"+x+".py") - module=3Dimp.load_module(x,fh,"modules/"+x+".py", + module =3D imp.load_module(x,fh,"modules/" + x + ".py", (".py","r",imp.PY_SOURCE)) fh.close() =20 @@ -206,7 +207,7 @@ def import_modules(): for x in valid_build_targets: try: fh=3Dopen(conf_values["sharedir"]+"/modules/"+x+".py") - module=3Dimp.load_module(x,fh,"modules/"+x+".py", + module =3D imp.load_module(x,fh,"modules/" + x + ".py", (".py","r",imp.PY_SOURCE)) module.register(targetmap) fh.close() diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target= =2Epy index 1fbc733..8c983e1 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -179,11 +179,11 @@ class generic_stage_target(generic_target): "/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\ "/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"= tmpfs"} else: - self.mounts=3D["proc","dev", "distdir", "port_tmpdir"] - self.mountmap=3D{"proc":"/proc", "dev":"/dev", "pts":"/dev/pts", + self.mounts =3D ["proc", "dev", "distdir", "port_tmpdir"] + self.mountmap =3D {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts", "distdir":self.settings["distdir"], "port_tmpdir":"tmpfs"} if os.uname()[0] =3D=3D "Linux": - self.mounts.append("pts") + self.mounts.append("devpts") =20 self.set_mounts() =20 @@ -203,7 +203,7 @@ class generic_stage_target(generic_target): print "Location of the kerncache is "+\ self.settings["kerncache_path"] self.mounts.append("kerncache") - self.mountmap["kerncache"]=3Dself.settings["kerncache_path"] + self.mountmap["kerncache"] =3D self.settings["kerncache_path"] =20 if "CCACHE" in self.settings: if "CCACHE_DIR" in os.environ: @@ -216,7 +216,7 @@ class generic_stage_target(generic_target): "Compiler cache support can't be enabled (can't find "+\ ccdir+")" self.mounts.append("ccache") - self.mountmap["ccache"]=3Dccdir + self.mountmap["ccache"] =3D ccdir """ for the chroot: """ self.env["CCACHE_DIR"]=3D"/var/tmp/ccache" =20 @@ -410,7 +410,7 @@ class generic_stage_target(generic_target): def set_snapshot_path(self): self.settings["snapshot_path"]=3Dnormpath(self.settings["storedir"]+\ "/snapshots/" + self.settings["snapshot_name"] + - self.settings["snapshot"]+".tar.xz") + self.settings["snapshot"] + ".tar.xz") =20 if os.path.exists(self.settings["snapshot_path"]): self.settings["snapshot_path_hash"]=3D\ @@ -419,7 +419,7 @@ class generic_stage_target(generic_target): else: self.settings["snapshot_path"]=3Dnormpath(self.settings["storedir"]+\ "/snapshots/" + self.settings["snapshot_name"] + - self.settings["snapshot"]+".tar.bz2") + self.settings["snapshot"] + ".tar.bz2") =20 if os.path.exists(self.settings["snapshot_path"]): self.settings["snapshot_path_hash"]=3D\ @@ -617,7 +617,7 @@ class generic_stage_target(generic_target): if not os.path.exists(mypath + self.mountmap[x]): continue =20 - if ismount(mypath +self.mountmap[x]): + if ismount(mypath + self.mountmap[x]): """ Something is still mounted "" """ try: print self.mountmap[x] + " is still mounted; performing auto-bind-umo= unt...", @@ -786,7 +786,7 @@ class generic_stage_target(generic_target): print "Valid snapshot cache, skipping unpack of portage tree..." unpack=3DFalse else: - destdir=3Dnormpath(self.settings["chroot_path"] + self.settings["portdi= r"]) + destdir =3D normpath(self.settings["chroot_path"] + self.settings["port= dir"]) cleanup_errmsg=3D"Error removing existing snapshot directory." cleanup_msg=3D\ "Cleaning up existing portage tree (This can take a long time)..." @@ -847,7 +847,7 @@ class generic_stage_target(generic_target): cmd("rm -f "+self.settings["chroot_path"]+"/etc/portage/make.profile",\ "Error zapping profile link",env=3Dself.env) cmd("mkdir -p "+self.settings["chroot_path"]+"/etc/portage/") - cmd("ln -sf ../.." + self.settings["portdir"] + "/profiles/"+\ + cmd("ln -sf ../.." + self.settings["portdir"] + "/profiles/" + \ self.settings["target_profile"]+" "+\ self.settings["chroot_path"]+"/etc/portage/make.profile",\ "Error creating profile link",env=3Dself.env) @@ -908,10 +908,10 @@ class generic_stage_target(generic_target): self.snapshot_lock_object.read_lock() if os.uname()[0] =3D=3D "FreeBSD": if src =3D=3D "/dev": - retval=3Dos.system("mount -t devfs none " + + retval =3D os.system("mount -t devfs none " + self.settings["chroot_path"] + src) else: - retval=3Dos.system("mount_nullfs " + src + " " + + retval =3D os.system("mount_nullfs " + src + " " + self.settings["chroot_path"] + src) else: if src =3D=3D "tmpfs": @@ -920,7 +920,7 @@ class generic_stage_target(generic_target): self.settings["var_tmpfs_portage"]+"G "+src+" "+\ self.settings["chroot_path"]+x) else: - retval=3Dos.system("mount --bind " + src + " " + + retval =3D os.system("mount --bind " + src + " " + self.settings["chroot_path"] + src) if retval!=3D0: self.unbind() @@ -949,7 +949,7 @@ class generic_stage_target(generic_target): =20 self.kill_chroot_pids() =20 - retval2=3Dos.system("umount " + mypath + self.mountmap[x]) + retval2 =3D os.system("umount " + mypath + self.mountmap[x]) if retval2!=3D0: ouch=3D1 warn("Couldn't umount bind mount: " + mypath + self.mountmap[x]) diff --git a/modules/snapshot_target.py b/modules/snapshot_target.py index 29d6e87..ba1bab5 100644 --- a/modules/snapshot_target.py +++ b/modules/snapshot_target.py @@ -18,7 +18,7 @@ class snapshot_target(generic_stage_target): self.settings=3Dmyspec self.settings["target_subpath"]=3D"portage" st=3Dself.settings["storedir"] - self.settings["snapshot_path"]=3Dnormpath(st + "/snapshots/" + self.settings["snapshot_path"] =3D normpath(st + "/snapshots/" + self.settings["snapshot_name"] + self.settings["version_stamp"] + ".tar.bz2") self.settings["tmp_path"]=3Dnormpath(st+"/tmp/"+self.settings["target_su= bpath"]) @@ -50,11 +50,11 @@ class snapshot_target(generic_stage_target): cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ " + "--exclude /local/ --exclude CVS/ --exclude .svn --filter=3DH_**/files/= digest-* " + self.settings["portdir"] + "/ " + mytmp + "/%s/" % self.settings["repo_= name"], - "Snapshot failure",env=3Dself.env) + "Snapshot failure", env=3Dself.env) =20 print "Compressing Portage snapshot tarball..." cmd("tar -I lbzip2 -cf " + self.settings["snapshot_path"] + " -C " + - mytmp + " %s" % self.settings["repo_name"], + mytmp + " " + self.settings["repo_name"], "Snapshot creation failure",env=3Dself.env) =20 self.gen_contents_file(self.settings["snapshot_path"]) diff --git a/modules/tinderbox_target.py b/modules/tinderbox_target.py index d6d3ea3..ca55610 100644 --- a/modules/tinderbox_target.py +++ b/modules/tinderbox_target.py @@ -29,8 +29,12 @@ class tinderbox_target(generic_stage_target): raise CatalystError,"Tinderbox aborting due to error." =20 def set_cleanables(self): - self.settings["cleanables"]=3D["/etc/resolv.conf","/var/tmp/*","/root= /*", - self.settings['portdir']] + self.settings['cleanables'] =3D [ + '/etc/resolv.conf', + '/var/tmp/*', + '/root/*', + self.settings['portdir'], + ] =20 def set_action_sequence(self): #Default action sequence for run method --=20 This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy --c/UxJciryulPFo89 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSrNvTAAoJEKKfehoaNkbtwOIP/0zkWvHLTJN/ywOECNndgI20 ytLWCFb19x+wFqr9hglR1iPSE8B8ZXHP1Zgf0R4zIjuaOo2PQqbZsnIXu7oIgELC QRlzBBhnEbZ8a2kVtJ0KQMqg7lrpAPmtgTXZY5FOVU7Nzmw2zKnPusqwtcqxUeVv JZdccaupMHp4X2dAR2K5+fedsHZSPnp1HbM7l/E7jFQLzY8GJlmPA7YQv/pWztaR hoN8RKPBQybGxNMOXT/T6djr6OTNNCIch+8pj0NXMmMOlNxA2oiJQ/bAMR+UOI6J sAkl9/da4eg4UAtBRoE3ZWh/DOX6VUHD6Y4z/C7gP5sgbviRqWdZFYfBC4Eetax0 lmvR2EnuC9dyxBch9JGdJPr4JgtbiVImJit3oXzhPd6y7Ql/Ov9CXyDt8u+bV1/O ja9oQszT4+Xcr/PDb6cFOF7ayIvocvCO7wd3ci+rcuHT+eCN415NRze0FcTiE6os b42KwqA6NP282RnCLHyGgq2VcREIqy58MdedLQCY11F4bLtUCHXOC99YTMVRjiC5 UpntNDV2NMCb8JJeQanFaNVCEY5MDRY/mcIth6W0O/eTZZFNiEeQHcg7aObjGoKZ 9zptdZxYhK7MBsARPbwixFCxD0JXprV9yH+w4FTgRLUows1WZYvUuPs5ZlcNqtV0 cjeucpouic2TSYElyKay =q0ey -----END PGP SIGNATURE----- --c/UxJciryulPFo89--