On 09/16/10 06:02 PM, Danek Duvall wrote:
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.

I wasn't clear to me that looking at sys.argv[0] at any place other than near the beginning of programming execution was safe. For example, if we were discussing sys.path instead, that might well be changed during program execution. If it's safe to grab sys.argv[0] at any arbitrary point, I'm happy to stop handing it around all over the place, and just use it in a few places where we need it.
   - 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.
And if the trust anchor dir is set to be a nfs path?
That said, if that's what's preferred, I'll shift to that approach.

Brock
Danek

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to