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 4446C138247 for ; Thu, 19 Dec 2013 17:20:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9A05E0B81; Thu, 19 Dec 2013 17:20:40 +0000 (UTC) Received: from qmta09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by pigeon.gentoo.org (Postfix) with ESMTP id 3E4ECE0B81 for ; Thu, 19 Dec 2013 17:20:39 +0000 (UTC) Received: from omta19.westchester.pa.mail.comcast.net ([76.96.62.98]) by qmta09.westchester.pa.mail.comcast.net with comcast id 3Rvm1n00927AodY59VLfVm; Thu, 19 Dec 2013 17:20:39 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta19.westchester.pa.mail.comcast.net with comcast id 3VLe1n00n152l3L3fVLf7M; Thu, 19 Dec 2013 17:20:39 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id 98FBDD988C8; Thu, 19 Dec 2013 09:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1387473637; bh=nTyTrPiKtav+mSSf3txe1Bcyz3DkIZreweCwMW1lCH8=; h=Date:From:To:Subject:References:In-Reply-To; b=qgWd1VSdzOyhQjYqTCsxNrdOwGAany57ZqyFUdNzTAsq9JhxYwUcJ73Rik9iu/wtX 5oeQVfh6/02aC1n8caHlq+4nCONOepO+81o/qFkBvAK2rTHxrYY6I0lACx5agbSm3z H4sAVmpLVjV4AOphYVL2T85Y2eIohUArrouCkwRo= Date: Thu, 19 Dec 2013 09:20:37 -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: <20131219172037.GS25409@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> <20131218053547.GL25409@odin.tremily.us> <1387438476.3897.222.camel@big_daddy.dol-sen.ca> <1387439245.3897.227.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="T1pDwMrgk3Qb9uHN" Content-Disposition: inline In-Reply-To: <1387439245.3897.227.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=1387473639; bh=qwh6A1i1RmewM09HCkcASNAPEVashzvloaz2rhw+Fc0=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=hwCHQXfF29rUND5Ox+++D1UurkXPKTatV2M5yf6NuUpcIYzYixiSIaudDRX/FKMHu Nh6APpyc6TBPDlHxLLz6ugoNbsyA3ZWIX2+hi6r9l391jdJHjZBod+LC0v4ZB8Cuxt hWttcRt0kmlwigzyl9G0zXV3fI+9B5u8oOhtCJ0Vfe+Ko9Mc2WgIENG3gAlPizMtkZ Rlfwan42yE7+XIvIkSFUjOK6JAJDswlbHUq8syuSrjQssr6hb8nwrDU+BIo/41g8Mp gk67szBngKKPamO8h7EK+yFv967mcxdPvbY/lNrNjKLd6RQ1IYbowHbo+/vP0Su13Z hGVb30Yxn8cyQ== X-Archives-Salt: 2c05e656-ab4f-4878-8ab7-a73df9eb6470 X-Archives-Hash: 22ddb28ce88e1d85cf50c06382cbea11 --T1pDwMrgk3Qb9uHN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 18, 2013 at 11:47:25PM -0800, Brian Dolbec wrote: > On Wed, 2013-12-18 at 23:34 -0800, Brian Dolbec wrote: > > On Tue, 2013-12-17 at 21:35 -0800, W. Trevor King wrote: > > > 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: > > > > > > - self.mounts.append("/var/log/portage") > > > > > > - self.mountmap["/var/log/portage"]=3Dself.settings["port_log= dir"] > > > > > > - 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 also think that the PORT_LOGDIR environment variable > > > > > should be: > > > > >=20 > > > > > self.env["PORT_LOGDIR"] =3D self.target_mounts["port_logdir"] > > > > > > I don't care about caps, I was trying to fix settings =E2=86=92 targe= t_mounts, > > > since settings holds the mount source ;). > >=20 > > No, this code block is adding it to the environment if defined in > > settings. This patch was just removing the hard coded paths. > >=20 > > This is the full if block: > >=20 > > if "port_logdir" in self.settings: > > self.mounts.append("port_logdir") > > self.mountmap["port_logdir"]=3Dself.settings["port_logdir"] > > self.env["PORT_LOGDIR"]=3Dself.settings["port_logdir"] > > self.env["PORT_LOGDIR_CLEAN"]=3D'find "${PORT_LOGDIR}" -type f ! -na= me "summary.log*" -mtime +30 -delete' > >=20 > > So far it is not used from the new TARGET_MOUNTS_DEFAULTS. =20 > > It is so far only enabled if uncommented and defined in catalyst.conf or > > from the cli. > >=20 > > Should I remove it from the TARGET_MOUNTS_DEFAULTS for the time being? >=20 > What we could do is add a "PortageLog" to the options setting which > would turn on and use the defaults unless otherwise overridden by > setting the port_logdir config option. But that would be something to > add later. >=20 > This patch is to fix/complete the mounts, mountmap changes from the > hard-coded paths and paths as keys. Who is consuming the env dict? I thought it was for scripts running in the chroot, in which case it can't possibly care about the mount source, but might conceivably care about the mount target. In any case, current usage in your pending branch is inconsistent: $ git grep 'self\.env\[.*\] *=3D' origin/pending -- origin/pending:modules/generic_stage_target.py: self.env["CCACHE_DIR"]= =3D self.target_mounts["ccache"] origin/pending:modules/generic_stage_target.py: self.env["PATH"]=3D"/u= sr/lib/icecc/bin:"+self.env["PATH"] origin/pending:modules/generic_stage_target.py: self.env["PORT_LOGDIR"= ]=3Dself.settings["port_logdir"] origin/pending:modules/generic_stage_target.py: self.env["PORT_LOGDIR_= CLEAN"]=3D'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 = -delete' origin/pending:modules/generic_stage_target.py: self.env[varname]=3Dse= lf.settings[x] origin/pending:modules/generic_stage_target.py: self.env[varname]=3Dst= ring.join(self.settings[x]) origin/pending:modules/generic_stage_target.py: self.env[varname]=3D"t= rue" origin/pending:modules/generic_stage_target.py: self.env[varname]=3D"f= alse" origin/pending:modules/generic_stage_target.py: self.env["MAKEOPTS"]= =3Dself.settings["makeopts"] origin/pending:modules/generic_stage_target.py: self.env[kname+"_kerne= lopts"]=3Dmyopts origin/pending:modules/generic_stage_target.py: self.env[kname+"_kerne= lopts"]=3D"" origin/pending:modules/generic_stage_target.py: self.env["clst_kextrav= ersion"]=3D\ origin/pending:modules/generic_target.py: self.env["PATH"]=3D"/bin:/sb= in:/usr/bin:/usr/sbin" CCACHE_DIR is set using target_mounts (which makes sense to me), but PORT_LOGDIR is set using settings (which does not make sense to me). For example, if I decide to configure port_logdir (via my Catalyst settings) to /some/wonky/path/on/the/host/system, I want Catalyst to bind-mount that to /var/tmp/portage (TARGET_MOUNTS_DEFAULTS['port_logdir']) and then have emerges in the chroot use /var/tmp/portage. If emerges in the chroot try to use /some/wonky/path/on/the/host/system thinks are not going to work. 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 --T1pDwMrgk3Qb9uHN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSsyrjAAoJEKKfehoaNkbtsWUP/R+zqqrQlZQOQ3j87b8nO4uH HpmNkXQJg3bL0QN6jwAMqyOX8SpfQCPSc5XrsV+kP5sRkAb/nfVdR+uDX7wUC4cP TAnVJmidTB5jMrObRftViXbs0XJb6CQlhSpXYQjGPtouXFJSvAMzVwRN4cTfkN9e OR6iJB37pUO+wMJ/c6YR2irlPUtaWx4YmRn8te2fi5vv2q4iSWkffjkXgkXr4EWk odIqqCw1ldLzSqyQUufGXGpveC94HQ/xGmqLdgzXCY0H/YuoHY9zzvYujQRN6FD8 OUWyvgx9kNxUfUQGqPAn0uGX6kDEB9CWOVmD0MALYD84pKtpmaUrBuCgwFemGFOm pudpSVBCFLErmha7Yd4XPIO5K44t26/r3GP0tgw/vGkmqXh15Z8afBrr+jY5xE9O qQaBYiKqnaqcPYqeN/ff95w4yElh9ni0kQYAFWtInnpmbPE5MUsIOPlxzTBBZP+J ERoFlBzo1Wg58fKqu2AyKG1REuiGSiXyaEGE8GU24SnoWv70H4WgFI3gnMFh0GCR RnWxcpLDNYpJpZDk7piqzjyTPf996IaXk9bpuZLhxPiUqVlSEzLu83A6dBdm3oyL 9YBlk5pZRcPHNpvK6OnhQbPVcc11MCBOud2OLqVc39u7hiiAUis62YBH4AMzvsy0 l6Y3Vhka+81E+ARsMdea =x45t -----END PGP SIGNATURE----- --T1pDwMrgk3Qb9uHN--