Brock Pytlik wrote: > On 09/16/10 03:59 PM, Danek Duvall wrote: > >Brock Pytlik wrote: > > > >>http://cr.opensolaris.org/~bpytlik/ips-16852-v2/ > >What are the cases where actual_cmd is not set to sys.argv[0]? > Currently, it's either set to sys.argv[0] or None. It's set to None > when an image is created during the trust anchor calculation. > > Does that clear things up?
What I'm trying to determine is why we pass actual_cmd around everywhere rather than just looking at sys.argv[0] in the places where we use it. It seems like you've made the common case more complicated and the rare case simple, which is backwards. > > - line 307: I'm a bit confused by the logic here. Does > > cfg_cache.properties return a path prepended with the image root > > automatically? If not, then it looks to me like this doesn't look > > in the image if the image isn't mounted at / and has > > trust-anchor-directory set, unless the path happens to be set > > correctly for wherever it happens to be mounted. Perhaps the join > > with self.root should happen first? Remember the problem with > > os.path.join when the second argument starts with a slash ... > > If trust-anchor-directory is set in an image, it's an absolute path. If > it's not set, then we want to look in the image relative default path. I > think that clears things up? If not, then I'm not sure what the issue is > here. If I set trust-anchor-directory in a BE to /etc/trustanchors, and then mount the BE at /mnt, you're saying that operating on that BE would look in /etc/trustanchors and not in /mnt/etc/trustanchors. I think that the value of trust-anchor-directory, if set, should always be relative to the image -- it's more properly self-contained this way. Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
