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 0345B138247 for ; Sat, 14 Dec 2013 23:10:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71E22E0CEC; Sat, 14 Dec 2013 23:10:31 +0000 (UTC) Received: from qmta04.westchester.pa.mail.comcast.net (qmta04.westchester.pa.mail.comcast.net [76.96.62.40]) by pigeon.gentoo.org (Postfix) with ESMTP id CFA76E0CEC for ; Sat, 14 Dec 2013 23:10:30 +0000 (UTC) Received: from omta18.westchester.pa.mail.comcast.net ([76.96.62.90]) by qmta04.westchester.pa.mail.comcast.net with comcast id 1b291n0011wpRvQ54bAWSf; Sat, 14 Dec 2013 23:10:30 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta18.westchester.pa.mail.comcast.net with comcast id 1bAV1n008152l3L3ebAVtE; Sat, 14 Dec 2013 23:10:30 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id B0C1DD68DE7; Sat, 14 Dec 2013 15:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1387062628; bh=gwUtNoSbTPyo0G8IkHNxzydXyuZta6CzYYO0+yP9pBE=; h=Date:From:To:Subject:References:In-Reply-To; b=Gz655wHjBGZ4esDleNlrJuYN6LTRYIvuqaqPZ5k5pctyQ8k91ePotUHxdcc9fb5k3 DnXZcMY9FO+kV5d0SvKkszQuSD9N/jH9VYXabvuwEYZdSHQgxuwLnpqVTay439xqM5 t3rk0kGTyBHf2SUssTQcJXLJyzkQp+qIkwf7Bhmw= Date: Sat, 14 Dec 2013 15:10:28 -0800 From: "W. Trevor King" To: Catalyst Subject: [gentoo-catalyst] Re: [PATCH v2 00/21] rewrite-on-master patches (part 1) Message-ID: <20131214231028.GC25409@odin.tremily.us> References: <20131214222941.GB25409@odin.tremily.us> 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="MR0szId23pLNtImL" Content-Disposition: inline In-Reply-To: <20131214222941.GB25409@odin.tremily.us> 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=1387062630; bh=hiPux7fDXzHMFX7rzFJfLxRkasqxmjVh+M2KD3Iatcg=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=h0iEyCDgERAz1L96vwFUp9+XG77jM277v9fj1x4rHqQAC3ER7bWlseCdcyd2lYKNE LRu+96JZ4ZWmcn0Vh/A0Gie/Z7pxZTbSLAZprZAZb2LIik/7RlvDXmcHKpzTd0on7O P+aqV40Vh0GNIP87XUyKdpobwViy8EUrotAmpj3nuc/Mjkaomk5VwXqTy35YZf2AZd 63gWtu7jjnVWr1UY8fk3rASn8cuayFmt0aJ012Ds5RyFLaPL24SY3DOxGZPSeP+3Wl Pg2gLN7HaK2L2bt26deFrLrlDYNZYdz3nqnj4D6PKvFno574IDKhsO+Tk0P1ioJcms 0JK+55f0yewEQ== X-Archives-Salt: ed91fa7f-82a0-4eac-9c34-c2e4c2787cb7 X-Archives-Hash: 3563a90e8b2808378bd1e1d295b93cd4 --MR0szId23pLNtImL Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 14, 2013 at 02:29:41PM -0800, W. Trevor King wrote: > Oops, I meant to include a diff from v1 in the v2 cover letter. Here > it is now: I've also rebased origin/rewrite-on-master onto the top of this series, so we know where we stand: The following changes since commit e7dade2e894ba56ad75d308e3531ac1656282f62: catalyst: cleanup long lines (2013-12-14 14:16:28 -0800) are available in the git repository at: git://tremily.us/catalyst.git rewrite-without-wtk for you to fetch changes up to c021dbf9703d4b00bc609b27fd805284325b0a57: Strip trailing slash from subpath's if they exist when creating filenames= =2E (2013-12-14 14:50:25 -0800) ---------------------------------------------------------------- Brian Dolbec (60): Initial rearrangement of the python directories move catalyst_support, builder, catalyst_lock out of modules, into th= e catalyst's base namespace rename the modules subpkg to targets, it better reflects what it cont= ains rename files directory to etc to better reflect the directories conte= nts Remove unused urllib import. Remove unused variable new and an undefined variable s. Fix undefined variable: RLIMIT_NOFILE Initial creation of a defaults file and Split up support.py Move confdefaults out of main.py Some options cleanup, unifying their use, reducing redundancy. Move LockInUse from support.py to lock.py, fix bad execption raising,= pyflakes cleanup Massive pyflakes import cleanup and broken CatalystError calls. Begin splitting up generic_stage_target into smaller code blocks. some spacing and comment and indent cleanup, etc. remove redundant /bin/bash additions in cmd() calls Move base stage and target files to thier own sub-pkg Update module loading for the new python structure, rename snapshot_t= arget to snapshot fix options being reset by a config file Fix mounts, mountmap hardcoding removal... Use normpath from support chmod +x all sh scripts so they can run from the git checkout Rename all target .py files and classes without _target in them. FIXME! Comment out a small code block causing TypeError. Break out more repeated (path1 + path2)'s... reduce 2 operations into one simpler one Extend ParserBase to do variable substitution. Make shdir a complete path to ease it's use. Add '--- 'to at the start of all echo messages to aid debugging Fix a relative path bug Remove trailing slash for consistency in variables FIXME! Add a forced debug print statement in cmd() for better debug o= utput Commit my testpath file with instructions to run the git checkout cod= e directly without being installed. Add archdir to settings Fix a bug that portage didn't get rebuilt with the build use flag Migrate hardcoded /etc/portage paths mixed spaces/tabs and indent cleanup. update gitignore Fix typo in error message, clean up useless tracebacks Fix broken seed stage update... fix indent. update version to identify the rewite-git code is being run Make the use of preserved_libs optional by setting the options variab= le. Migrate version to use snakeoil's format_version() to append git comm= it info. Initial creation of fileops.py Refactor ClearBase code to remove code duplication. Create AutoResume class to handle all file creation, deletion... Fix some paths/normpath usage. Use pjoin to join paths. Use os.p= ath.dirname() instead of splitting and rejoining without the filename. Remove some dead code Fix a long line. Rename local unpack var to _unpack temp set shebang to python2 until py3 compatibilty is done update doc scripts for the new structure Make testpath automagic via dwfeed's tweak fix '-' in stage names for python imports Add set_version command to setup.py. Streamline data_files generation with additional keys main.py, lock.py, fileops.py remove shebangs Fix livecd source and target paths not ending with a slash Add my outgoing directory to ignore Strip trailing slash from subpath's if they exist when creating filen= ames. Ra=FAl Porcel (1): Add support for m68k W. Trevor King (4): setup.py: Add disutils-based packaging Makefiles: create files directory before populating it Makefile: Set PYTHONPATH=3D. for make_target_table.py version: Remove shebang (Python modules are not scripts) .gitignore | 10 + MANIFEST.in | 6 + Makefile | 19 +- bin/catalyst | 46 ++ catalyst/__init__.py | 8 + catalyst/arch/__init__.py | 1 + {arch =3D> catalyst/arch}/alpha.py | 5 +- {arch =3D> catalyst/arch}/amd64.py | 2 +- {arch =3D> catalyst/arch}/arm.py | 4 +- {arch =3D> catalyst/arch}/hppa.py | 3 +- {arch =3D> catalyst/arch}/ia64.py | 3 +- catalyst/arch/m68k.py | 21 + {arch =3D> catalyst/arch}/mips.py | 3 +- {arch =3D> catalyst/arch}/powerpc.py | 9 +- {arch =3D> catalyst/arch}/s390.py | 3 +- {arch =3D> catalyst/arch}/sh.py | 3 +- {arch =3D> catalyst/arch}/sparc.py | 9 +- {arch =3D> catalyst/arch}/x86.py | 9 +- catalyst/base/__init__.py | 1 + catalyst/base/clearbase.py | 83 +++ catalyst/base/genbase.py | 58 ++ catalyst/base/resume.py | 166 +++++ .../base/stagebase.py | 784 +++++++++--------= ---- catalyst/base/targetbase.py | 13 + {modules =3D> catalyst}/builder.py | 0 {modules/catalyst =3D> catalyst}/config.py | 19 +- catalyst/contents.py | 72 ++ catalyst/defaults.py | 111 +++ catalyst/fileops.py | 44 ++ catalyst/hash_utils.py | 106 +++ modules/catalyst_lock.py =3D> catalyst/lock.py | 95 ++- catalyst =3D> catalyst/main.py | 258 +++---- catalyst/support.py | 319 +++++++++ catalyst/targets/__init__.py | 1 + .../targets/embedded.py | 16 +- modules/grp_target.py =3D> catalyst/targets/grp.py | 54 +- .../targets/livecd_stage1.py | 44 +- .../targets/livecd_stage2.py | 85 +-- .../targets/netboot.py | 53 +- .../targets/netboot2.py | 82 ++- .../targets/snapshot.py | 32 +- .../stage1_target.py =3D> catalyst/targets/stage1.py | 40 +- .../stage2_target.py =3D> catalyst/targets/stage2.py | 33 +- .../stage3_target.py =3D> catalyst/targets/stage3.py | 17 +- catalyst/targets/stage4.py | 39 + .../targets/tinderbox.py | 28 +- {modules/catalyst =3D> catalyst}/util.py | 0 catalyst/version.py | 59 ++ doc/HOWTO.txt | 10 +- doc/catalyst-spec.5.txt | 4 +- doc/make_subarch_table_guidexml.py | 5 +- doc/make_target_table.py | 13 +- {files =3D> etc}/.gitignore | 0 {files =3D> etc}/catalyst.conf | 22 +- {files =3D> etc}/catalystrc | 0 modules/catalyst/__init__.py | 0 modules/catalyst_support.py | 718 -----------------= -- modules/generic_target.py | 11 - modules/stage4_target.py | 43 -- setup.py | 123 ++++ targets/embedded/embedded-chroot.sh | 0 targets/embedded/embedded-controller.sh | 22 +- targets/embedded/embedded-fs-runscript.sh | 0 targets/embedded/embedded-preclean-chroot.sh | 0 targets/embedded/unmerge.sh | 0 targets/grp/grp-chroot.sh | 0 targets/grp/grp-controller.sh | 6 +- targets/grp/grp-preclean-chroot.sh | 0 targets/livecd-stage1/livecd-stage1-chroot.sh | 0 targets/livecd-stage1/livecd-stage1-controller.sh | 4 +- .../livecd-stage1/livecd-stage1-preclean-chroot.sh | 0 targets/livecd-stage2/livecd-stage2-controller.sh | 22 +- targets/netboot/netboot-chroot.sh | 0 targets/netboot/netboot-combine.sh | 6 +- targets/netboot/netboot-controller.sh | 24 +- targets/netboot/netboot-image.sh | 0 targets/netboot2/netboot2-controller.sh | 16 +- targets/netboot2/netboot2-copyfile.sh | 0 targets/netboot2/netboot2-pkg.sh | 0 targets/stage1/build.py | 4 +- targets/stage1/stage1-chroot.sh | 25 +- targets/stage1/stage1-controller.sh | 12 +- targets/stage1/stage1-preclean-chroot.sh | 0 targets/stage2/stage2-chroot.sh | 0 targets/stage2/stage2-controller.sh | 6 +- targets/stage2/stage2-preclean-chroot.sh | 0 targets/stage3/stage3-chroot.sh | 0 targets/stage3/stage3-controller.sh | 6 +- targets/stage3/stage3-preclean-chroot.sh | 0 targets/stage4/stage4-chroot.sh | 0 targets/stage4/stage4-controller.sh | 22 +- targets/stage4/stage4-preclean-chroot.sh | 0 targets/support/bootloader-setup.sh | 6 +- targets/support/chroot-functions.sh | 29 +- targets/support/create-iso.sh | 4 +- targets/support/filesystem-functions.sh | 0 targets/support/functions.sh | 18 +- targets/support/kill-chroot-pids.sh | 0 targets/support/kmerge.sh | 20 +- targets/support/livecdfs-update.sh | 12 +- targets/support/mips-arcload_conf.sh | 0 targets/support/netboot2-final.sh | 4 +- targets/support/post-kmerge.sh | 0 targets/support/pre-kmerge.sh | 0 targets/support/rc-update.sh | 0 targets/support/target_image_setup.sh | 4 +- targets/support/unmerge.sh | 0 targets/tinderbox/tinderbox-chroot.sh | 0 targets/tinderbox/tinderbox-controller.sh | 6 +- targets/tinderbox/tinderbox-preclean-chroot.sh | 0 testpath | 18 + 111 files changed, 2277 insertions(+), 1844 deletions(-) create mode 100644 MANIFEST.in create mode 100755 bin/catalyst create mode 100644 catalyst/__init__.py create mode 100644 catalyst/arch/__init__.py rename {arch =3D> catalyst/arch}/alpha.py (98%) rename {arch =3D> catalyst/arch}/amd64.py (99%) rename {arch =3D> catalyst/arch}/arm.py (98%) rename {arch =3D> catalyst/arch}/hppa.py (95%) rename {arch =3D> catalyst/arch}/ia64.py (89%) create mode 100644 catalyst/arch/m68k.py rename {arch =3D> catalyst/arch}/mips.py (99%) rename {arch =3D> catalyst/arch}/powerpc.py (95%) rename {arch =3D> catalyst/arch}/s390.py (95%) rename {arch =3D> catalyst/arch}/sh.py (98%) rename {arch =3D> catalyst/arch}/sparc.py (85%) rename {arch =3D> catalyst/arch}/x86.py (95%) create mode 100644 catalyst/base/__init__.py create mode 100644 catalyst/base/clearbase.py create mode 100644 catalyst/base/genbase.py create mode 100644 catalyst/base/resume.py rename modules/generic_stage_target.py =3D> catalyst/base/stagebase.py (69= %) create mode 100644 catalyst/base/targetbase.py rename {modules =3D> catalyst}/builder.py (100%) rename {modules/catalyst =3D> catalyst}/config.py (87%) create mode 100644 catalyst/contents.py create mode 100644 catalyst/defaults.py create mode 100644 catalyst/fileops.py create mode 100644 catalyst/hash_utils.py rename modules/catalyst_lock.py =3D> catalyst/lock.py (87%) rename catalyst =3D> catalyst/main.py (55%) create mode 100644 catalyst/support.py create mode 100644 catalyst/targets/__init__.py rename modules/embedded_target.py =3D> catalyst/targets/embedded.py (85%) rename modules/grp_target.py =3D> catalyst/targets/grp.py (73%) rename modules/livecd_stage1_target.py =3D> catalyst/targets/livecd_stage1= =2Epy (71%) rename modules/livecd_stage2_target.py =3D> catalyst/targets/livecd_stage2= =2Epy (66%) rename modules/netboot_target.py =3D> catalyst/targets/netboot.py (69%) rename modules/netboot2_target.py =3D> catalyst/targets/netboot2.py (69%) rename modules/snapshot_target.py =3D> catalyst/targets/snapshot.py (79%) rename modules/stage1_target.py =3D> catalyst/targets/stage1.py (75%) rename modules/stage2_target.py =3D> catalyst/targets/stage2.py (70%) rename modules/stage3_target.py =3D> catalyst/targets/stage3.py (65%) create mode 100644 catalyst/targets/stage4.py rename modules/tinderbox_target.py =3D> catalyst/targets/tinderbox.py (61%) rename {modules/catalyst =3D> catalyst}/util.py (100%) create mode 100644 catalyst/version.py rename {files =3D> etc}/.gitignore (100%) rename {files =3D> etc}/catalyst.conf (90%) rename {files =3D> etc}/catalystrc (100%) delete mode 100644 modules/catalyst/__init__.py delete mode 100644 modules/catalyst_support.py delete mode 100644 modules/generic_target.py delete mode 100644 modules/stage4_target.py create mode 100755 setup.py mode change 100644 =3D> 100755 targets/embedded/embedded-chroot.sh mode change 100644 =3D> 100755 targets/embedded/embedded-controller.sh mode change 100644 =3D> 100755 targets/embedded/embedded-fs-runscript.sh mode change 100644 =3D> 100755 targets/embedded/embedded-preclean-chroot.sh mode change 100644 =3D> 100755 targets/embedded/unmerge.sh mode change 100644 =3D> 100755 targets/grp/grp-chroot.sh mode change 100644 =3D> 100755 targets/grp/grp-controller.sh mode change 100644 =3D> 100755 targets/grp/grp-preclean-chroot.sh mode change 100644 =3D> 100755 targets/livecd-stage1/livecd-stage1-chroot.= sh mode change 100644 =3D> 100755 targets/livecd-stage1/livecd-stage1-control= ler.sh mode change 100644 =3D> 100755 targets/livecd-stage1/livecd-stage1-preclea= n-chroot.sh mode change 100644 =3D> 100755 targets/livecd-stage2/livecd-stage2-control= ler.sh mode change 100644 =3D> 100755 targets/netboot/netboot-chroot.sh mode change 100644 =3D> 100755 targets/netboot/netboot-combine.sh mode change 100644 =3D> 100755 targets/netboot/netboot-controller.sh mode change 100644 =3D> 100755 targets/netboot/netboot-image.sh mode change 100644 =3D> 100755 targets/netboot2/netboot2-controller.sh mode change 100644 =3D> 100755 targets/netboot2/netboot2-copyfile.sh mode change 100644 =3D> 100755 targets/netboot2/netboot2-pkg.sh mode change 100644 =3D> 100755 targets/stage1/build.py mode change 100644 =3D> 100755 targets/stage1/stage1-chroot.sh mode change 100644 =3D> 100755 targets/stage1/stage1-controller.sh mode change 100644 =3D> 100755 targets/stage1/stage1-preclean-chroot.sh mode change 100644 =3D> 100755 targets/stage2/stage2-chroot.sh mode change 100644 =3D> 100755 targets/stage2/stage2-controller.sh mode change 100644 =3D> 100755 targets/stage2/stage2-preclean-chroot.sh mode change 100644 =3D> 100755 targets/stage3/stage3-chroot.sh mode change 100644 =3D> 100755 targets/stage3/stage3-controller.sh mode change 100644 =3D> 100755 targets/stage3/stage3-preclean-chroot.sh mode change 100644 =3D> 100755 targets/stage4/stage4-chroot.sh mode change 100644 =3D> 100755 targets/stage4/stage4-controller.sh mode change 100644 =3D> 100755 targets/stage4/stage4-preclean-chroot.sh mode change 100644 =3D> 100755 targets/support/bootloader-setup.sh mode change 100644 =3D> 100755 targets/support/chroot-functions.sh mode change 100644 =3D> 100755 targets/support/create-iso.sh mode change 100644 =3D> 100755 targets/support/filesystem-functions.sh mode change 100644 =3D> 100755 targets/support/functions.sh mode change 100644 =3D> 100755 targets/support/kill-chroot-pids.sh mode change 100644 =3D> 100755 targets/support/kmerge.sh mode change 100644 =3D> 100755 targets/support/livecdfs-update.sh mode change 100644 =3D> 100755 targets/support/mips-arcload_conf.sh mode change 100644 =3D> 100755 targets/support/netboot2-final.sh mode change 100644 =3D> 100755 targets/support/post-kmerge.sh mode change 100644 =3D> 100755 targets/support/pre-kmerge.sh mode change 100644 =3D> 100755 targets/support/rc-update.sh mode change 100644 =3D> 100755 targets/support/target_image_setup.sh mode change 100644 =3D> 100755 targets/support/unmerge.sh mode change 100644 =3D> 100755 targets/tinderbox/tinderbox-chroot.sh mode change 100644 =3D> 100755 targets/tinderbox/tinderbox-controller.sh mode change 100644 =3D> 100755 targets/tinderbox/tinderbox-preclean-chroot= =2Esh create mode 100644 testpath Each of my branches (bugs, releng-link, spec-comments, xsession, pkgcache-warning, sshd-tweak) apply on either side of this series without conflicts, after which the diff vs. origin/rewrite-on-master is: diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py sindex 4ace63d..99f4015 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -198,11 +198,11 @@ class StageBase(TargetBase, ClearBase, GenBase): "portdir":normpath(self.settings["snapshot_cache_path"]+"/" + self.set= tings["repo_name"]), "distdir":self.settings["distdir"],"port_tmpdir":"tmpfs"} else: - self.mounts =3D ["proc", "dev", "distdir", "port_tmpdir"] - self.mountmap =3D {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts", + self.mounts=3D["proc","dev", "distdir", "port_tmpdir"] + self.mountmap=3D{"proc":"/proc", "dev":"/dev", "pts":"/dev/pts", "distdir":self.settings["distdir"], "port_tmpdir":"tmpfs"} if os.uname()[0] =3D=3D "Linux": - self.mounts.append("devpts") + self.mounts.append("pts") =20 self.set_mounts() =20 @@ -222,7 +222,7 @@ class StageBase(TargetBase, ClearBase, GenBase): print "Location of the kerncache is "+\ self.settings["kerncache_path"] self.mounts.append("kerncache") - self.mountmap["kerncache"] =3D self.settings["kerncache_path"] + self.mountmap["kerncache"]=3Dself.settings["kerncache_path"] =20 if "ccache" in self.settings["options"]: if "CCACHE_DIR" in os.environ: @@ -235,7 +235,7 @@ class StageBase(TargetBase, ClearBase, GenBase): "Compiler cache support can't be enabled (can't find "+\ ccdir+")") self.mounts.append("ccache") - self.mountmap["ccache"] =3D ccdir + self.mountmap["ccache"]=3Dccdir """ for the chroot: """ self.env["CCACHE_DIR"] =3D self.target_mounts["ccache"] =20 @@ -429,7 +429,7 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_snapshot_path(self): self.settings["snapshot_path"]=3Dnormpath(self.settings["storedir"]+\ "/snapshots/" + self.settings["snapshot_name"] + - self.settings["snapshot"].rstrip('/') + ".tar.xz") + self.settings["snapshot"].rstrip('/')+".tar.xz") =20 if os.path.exists(self.settings["snapshot_path"]): self.settings["snapshot_path_hash"]=3D\ @@ -440,7 +440,7 @@ class StageBase(TargetBase, ClearBase, GenBase): else: self.settings["snapshot_path"]=3Dnormpath(self.settings["storedir"]+\ "/snapshots/" + self.settings["snapshot_name"] + - self.settings["snapshot"].rstrip('/') + ".tar.bz2") + self.settings["snapshot"].rstrip('/')+".tar.bz2") =20 if os.path.exists(self.settings["snapshot_path"]): self.settings["snapshot_path_hash"]=3D\ @@ -806,7 +806,7 @@ class StageBase(TargetBase, ClearBase, GenBase): print "Valid snapshot cache, skipping unpack of portage tree..." unpack=3DFalse else: - destdir =3D normpath(self.settings["chroot_path"] + self.settings["port= dir"]) + destdir=3Dnormpath(self.settings["chroot_path"] + self.settings["portdi= r"]) cleanup_errmsg=3D"Error removing existing snapshot directory." cleanup_msg=3D\ "Cleaning up existing portage tree (This can take a long time)..." @@ -930,10 +930,10 @@ class StageBase(TargetBase, ClearBase, GenBase): if os.uname()[0] =3D=3D "FreeBSD": if src =3D=3D "/dev": cmd =3D "mount -t devfs none " + target - retval =3D os.system(cmd) + retval=3Dos.system(cmd) else: cmd =3D "mount_nullfs " + src + " " + target - retval =3D os.system(cmd) + retval=3Dos.system(cmd) else: if src =3D=3D "tmpfs": if "var_tmpfs_portage" in self.settings: @@ -944,7 +944,7 @@ class StageBase(TargetBase, ClearBase, GenBase): else: cmd =3D "mount --bind " + src + " " + target #print "bind(); cmd =3D", cmd - retval =3D os.system(cmd) + retval=3Dos.system(cmd) if retval!=3D0: self.unbind() raise CatalystError("Couldn't bind mount " + src + "\n" + cmd) @@ -971,7 +971,7 @@ class StageBase(TargetBase, ClearBase, GenBase): =20 self.kill_chroot_pids() =20 - retval2 =3D os.system("umount " + target) + retval2=3Dos.system("umount " + target) if retval2!=3D0: ouch=3D1 warn("Couldn't umount bind mount: " + target) diff --git a/catalyst/defaults.py b/catalyst/defaults.py index 78ce29f..58c44c8 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -57,8 +57,7 @@ contents_definitions =3D { } =20 =20 -confdefaults =3D { +confdefaults=3D{ "archdir": "%(PythonDir)s/arch", "distdir": "/usr/portage/distfiles", "hash_function": "crc32", @@ -71,11 +70,10 @@ confdefaults =3D { "port_tmpdir": "/var/tmp/portage", "PythonDir": "./catalyst", "repo_name": "portage", - "sharedir": "/usr/share/catalyst", + "sharedir": "/usr/lib/catalyst", "shdir": "/usr/lib/catalyst/targets/", "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", "snapshot_name": "portage-", - "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", "storedir": "/var/tmp/catalyst", } =20 diff --git a/catalyst/main.py b/catalyst/main.py old mode 100755 new mode 100644 index 9bac6ce..8546810 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -71,7 +71,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 diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py index 1887110..98cae14 100644 --- a/catalyst/targets/snapshot.py +++ b/catalyst/targets/snapshot.py @@ -24,7 +24,7 @@ class snapshot(TargetBase, GenBase): #self.settings=3Dmyspec self.settings["target_subpath"]=3D"portage" st=3Dself.settings["storedir"] - self.settings["snapshot_path"] =3D normpath(st + "/snapshots/" + self.settings["snapshot_path"]=3Dnormpath(st + "/snapshots/" + self.settings["snapshot_name"] + self.settings["version_stamp"] + ".tar.bz2") self.settings["tmp_path"]=3Dnormpath(st+"/tmp/"+self.settings["target_su= bpath"]) @@ -54,11 +54,11 @@ class snapshot(TargetBase, GenBase): 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 + " " + self.settings["repo_name"], + mytmp + " %s" % self.settings["repo_name"], "Snapshot creation failure",env=3Dself.env) =20 self.gen_contents_file(self.settings["snapshot_path"]) diff --git a/catalyst/targets/tinderbox.py b/catalyst/targets/tinderbox.py index ed1bc95..2cebaa8 100644 --- a/catalyst/targets/tinderbox.py +++ b/catalyst/targets/tinderbox.py @@ -35,12 +35,8 @@ class tinderbox(StageBase): print_traceback=3DTrue) =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 If that looks ok, I suggest we drop origin/rewrite-on-master in favor of wking/rewrite-without-wtk. Cheers, Trevor --=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 --MR0szId23pLNtImL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSrOViAAoJEKKfehoaNkbtEPIP+gL8hVmjxSoxIxYNftGAIO+c mn/PDtiK5+Pt+JXC2G4tWiQ+S9sp1PtsyXnm4bQSxjd43j46vacE0zQwzIQYfScP qSQ3BnWQ/Trbc7biiFAfl4ugZp94H+bxs+9nIbONaj+2+GtYWh5EAgPTLFFnYR60 DqUhp9GdWw1qGouQFUkxCnVPOSlPQie0ur8u9i+ZbGn3489KTSrkU+Y7ZIcNnAXD j3TMt90uSZH+h/J+kiF2SzzxIxcijNU5BVaFz5vT1SGFMMAYXG6KtiBDgqNXrouK 06O5zVGBAYGJg9G8mD/wXiMdzJ8BxrTlu5DInHcLvpw9z0wHKSKXUgLUDRBHWuyE A5wAxOgarn0aL8ifdl8wGW6tf2snc1JjGw0DAOz7yt9k5p7CwfhfQrXW+XxUjjxa xcZ95MbAQHGd7K3AwYfNGk6czpdByhUJg98kEPKFp+q57XyVzvFvKgHph0h+vyo3 1VS2B3AujUb0gnaeupwcVK35RvYrhFgqoeioNV2inYhB2ZlgZfdcKIf+Grp5f457 burH2tgh/k5UaeUWsJXsZSAJuGSrqoNWfS51AvZvCyX5+B2ck6IfT1LNOEaRGW3Z vK4HECA8U/+TzUkvCtIXzPiYK5+dQOKxaLlWzMipdRs9ZffvNGb82AAJ2fg/mfpg /kRiI/HrlIRtosDwPwqZ =zV2E -----END PGP SIGNATURE----- --MR0szId23pLNtImL--