Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 4/6] Fix mounts and mountmap port_logdir code block.
Date: Mon, 30 Dec 2013 05:46:34
Message-Id: 1388382369.24088.76.camel@big_daddy.dol-sen.ca
In Reply to: Re: [gentoo-catalyst] [PATCH 4/6] Fix mounts and mountmap port_logdir code block. by "W. Trevor King"
1 On Sun, 2013-12-29 at 20:09 -0800, W. Trevor King wrote:
2 > On Sun, Dec 29, 2013 at 05:50:51PM -0800, Brian Dolbec wrote:
3 > > +PORT_LOGDIR_CLEAN = \
4 > > + 'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
5 >
6 > Pulling out this global variable is new for v2. I don't think I'm a
7 > fan. I think it should either be hard-coded where we setup
8 > env["PORT_LOGDIR_CLEAN"] (as it was before) or pulled out of
9 > self.settings (like PORT_LOGDIR).
10 >
11 > > - self.mounts.append("/var/log/portage")
12 > > - self.mountmap["/var/log/portage"]=self.settings["port_logdir"]
13 > > - self.env["PORT_LOGDIR"]="/var/log/portage"
14 > > - self.env["PORT_LOGDIR_CLEAN"]='find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
15 > > + self.mounts.append("port_logdir")
16 > > + self.mountmap["port_logdir"] = self.settings["port_logdir"]
17 > > + self.env["PORT_LOGDIR"] = self.settings["port_logdir"]
18 > > + self.env["PORT_LOGDIR_CLEAN"] = PORT_LOGDIR_CLEAN
19 >
20 > Other than the newly-global PORT_LOGDIR_CLEAN, this looks good to me.
21 >
22 > Cheers,
23 > Trevor
24 >
25
26 PORT_LOGDIR_CLEAN is a copy of the setting directly from portage. I
27 fully intend on importing it later when it makes more sense to actually
28 make use of some of portage's api. In the meantime this moves it out of
29 a long line situation in the code block that would have meant cutting
30 and splicing it back together. When the commit that makes the new
31 defaults.py file is merged. It will be moved there. Later when we
32 import some info/code from portage. We can assign it accordingly.

Attachments

File name MIME type
signature.asc application/pgp-signature