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 2F783138247 for ; Wed, 18 Dec 2013 05:35:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D353E0B1D; Wed, 18 Dec 2013 05:35:50 +0000 (UTC) Received: from qmta07.westchester.pa.mail.comcast.net (qmta07.westchester.pa.mail.comcast.net [76.96.62.64]) by pigeon.gentoo.org (Postfix) with ESMTP id 960D1E0B1D for ; Wed, 18 Dec 2013 05:35:49 +0000 (UTC) Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) by qmta07.westchester.pa.mail.comcast.net with comcast id 2tUE1n0020ldTLk57tbob2; Wed, 18 Dec 2013 05:35:48 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta04.westchester.pa.mail.comcast.net with comcast id 2tbn1n00Y152l3L01tbo6s; Wed, 18 Dec 2013 05:35:48 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id 3F40AD8C5B0; Tue, 17 Dec 2013 21:35:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1387344947; bh=jxGT/JeXqZrBQJpQHVeToeulgUhHxxW4qfRu4+7qY0U=; h=Date:From:To:Subject:References:In-Reply-To; b=QWmvSDSHvk+RDQAvCjFUj4nK2Y8lOMzPxQw8YvEN6ljUYL53igcBMmqVg8kh5afjm 6Vrck5U76tyiqB0DF8O6omCoTQbuE9CtsAlLQWipYxYN9+dqUYzLEmGqsz1IIyXh0Z +Ty0fWjayMiTfOTtm2sMxeiP6eHbGzo15H4Loxt0= Date: Tue, 17 Dec 2013 21:35:47 -0800 From: "W. Trevor King" To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH 2/2] modules/generic_stage_target.py, modules/stage1_target.py: Add a target_mounts dictionary Message-ID: <20131218053547.GL25409@odin.tremily.us> References: <1387328847-25840-1-git-send-email-dolsen@gentoo.org> <1387328847-25840-3-git-send-email-dolsen@gentoo.org> <20131218032857.GD25409@odin.tremily.us> <1387343884.3897.204.camel@big_daddy.dol-sen.ca> 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="g1cW1JWKKdZvhqKU" Content-Disposition: inline In-Reply-To: <1387343884.3897.204.camel@big_daddy.dol-sen.ca> 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=1387344948; bh=fsJvrJNQHbUjdRQykcFTjmo+JacLVZ1C1pRtU2c7sB4=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=N7MBGUFLtmn9hsZF0S/QU6ocZJjTw2dkGoqOsOej+PekL6jbaspZG5sMdPR0hjdoX t3jGb75F2Yo82hTLOi+Ve5b0Of68VCFs0+Q1o2QtLihFQVHPKBKQCQm/yuECh1kyqv 971QV7/0PiHqludSqOgu1TGZx7KkTLppbzV9xU1XSO074TQbfX0REKIdLLPe0dYr/U uVo8EM4+DNSNezDs/8qY70YS56umjhZ3qWBNJWAm7MbqbUxsqaobKzon8yxtIAObER QpsTe5ZRbYFvqdxnyZh6Di8N7ox3RhGdovksi0X2/yFOEdMgs/ZG22Z4RS/ncoc6Gs tBb4jaMOGDwHA== X-Archives-Salt: ce9ca9ec-fad4-4659-95cb-63beb29f6a5c X-Archives-Hash: ae3b24d8f53f874352c2e5302f2bbae5 --g1cW1JWKKdZvhqKU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 17, 2013 at 09:18:04PM -0800, Brian Dolbec wrote: > On Tue, 2013-12-17 at 19:28 -0800, W. Trevor King wrote: > > On Tue, Dec 17, 2013 at 05:07:27PM -0800, Brian Dolbec wrote: > > > - "portdir":self.settings["snapshot_cache_path"]+"/portage",\ > > > - "distdir":self.settings["distdir"],"port_tmpdir":"tmpfs"} > > > + "portdir":normpath(self.settings["snapshot_cache_path"]+"/" + se= lf.settings["repo_name"]), > > > + "distdir":self.settings["distdir"],"port_tmpdir":"tmpfs"} > >=20 > > Can we do this for the mountmap defaults too, and just override the > > mountmap special cases in the SNAPCACHE branch? I think this would be > > a good commit for that (or we can do it in a commit after this). > >=20 > > I don't think the 'portage' =E2=86=92 self.settings["repo_name"] replac= ement > > should go in this commit. =20 >=20 > repo_name variable is already defined. This one got missed in the > change. You want it in the next commit by itself? Can do. That's what I want ;). Just to avoid making this one more complicated than it needs to be. > > > - self.mounts.append("/var/log/portage") > > > - self.mountmap["/var/log/portage"]=3Dself.settings["port_logdir"] > > > - self.env["PORT_LOGDIR"]=3D"/var/log/portage" > > > + self.mounts.append("port_logdir") > > > + self.mountmap["port_logdir"]=3Dself.settings["port_logdir"] > > > + self.env["PORT_LOGDIR"]=3Dself.settings["port_logdir"] > >=20 > > I don't know where we stand on 'x=3Dy' vs 'x =3D y', but I'd prefer the > > latter here.=20 >=20 > I do too, but I thought it was agreed to fix all that separately > later :/ Matt had me work some ' =3D ' spacing into the last series, but later works for me. > > I also think that the PORT_LOGDIR environment variable > > should be: > >=20 > > self.env["PORT_LOGDIR"] =3D self.target_mounts["port_logdir"] >=20 > meh, but I also prefer some uniformity. I prefer all-caps for > constants. In this case, the end result later in a new defaults.py > file... since it is internal, why mix case in keys. They are also > pushed into the bash environment for the chroot scripts to use. So, > again, uniformity can be your friend when making changes. > Especially with a large complex app like catalyst. I don't care about caps, I was trying to fix settings =E2=86=92 target_moun= ts, since settings holds the mount source ;). > > Nothing in the chroot should care where the source comes from ;). > > I'd considering renaming mountmap =E2=86=92 source_mounts for clarity, > > using existing settings to override source_mounts at > > initialization, and using source_mounts thereafter. >=20 > mounts and mountmap were existing variable names. With some of the > flack I've gotten over my choice of variable name already, now you > want me to go through even more??? Do it in a separate commit. > (after the rewrite patches are done for.) Fair enough ;). > > > + #print "bind(); cmd =3D", cmd > >=20 > > If it's not useful enough to print, I don't think we should commit it > > ;). =20 >=20 > There are various of these added to the code. They are EXTREMELY > helpful and even necessary to debug major code changes. Of which the > mounts, mountmap changes were one of the toughest to debug. >=20 > Both you and I have already stated that we want to convert to using > python's logging. These are just a first step towards that goal. All > that is needed is to search out the #print's and replace them with teh > proper logging statement. Ok. 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 --g1cW1JWKKdZvhqKU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSsTQxAAoJEKKfehoaNkbtKCIP/j0oEC7/1AU838GoUqCSoCFz Xqd1wMC1QpmNtFouci+lkyp2YLgc/4n5R9fbQuqM09rA+/lERSNC6auBnVSUhcfx Wg/D7CT5uIxPHDUmbKCrVmLsl8Vh7DgykMFfczZcG8YQgv7tO97QF9S5EjSLgoGW cCqSN/qC2CorwINnvDRIC19RurKr71LwRQGcl2NVXqsMN1nK7JIh6hvdojBbA4DF 1/FLh64+pTcoQrbXZemPazNdVxTcLxLLzEN3PYc7z80r99vgv6XmY/Mpt4wAN8WK /8sJPFh3XPkuyKWa/iF0iWwzQZ8fzkFYmoej+9tMwBCfXfmUg8aPDG1a9j56q/+n yvBTwSqGcKWrt6ylBC2XKTZa10U7zahVa0YpO2QXa5BPrSn8iqp2ZSfPC8TI9LEA NXuC8urMctjl42J/oXG7fBoW3UntFos2fujhsEd7fhzwWI1j2p+VRriilC5pHFTy x6/YgOB3tjzdj4mHGK7fejyGe0FQITS1b2aKEn+aePcSHu3JFXkn5Dk2HejVK4LZ hbzUStf19OTdQ9LpsEbzOQ0JxIiThFS9XWU6cA7iH4pfzKQCOnXcmXhZtfT+JXDy 0DztrMXTt8OmzPLP0ByeBKwI/Ca49oh4rTOLfRU7xI6CWSGtuKhkROyJ35hdttw4 hT1EnMqDExDBYHF20h+9 =V0g2 -----END PGP SIGNATURE----- --g1cW1JWKKdZvhqKU--