Shawn Walker wrote: > On 07/26/11 15:27, Shawn Walker wrote: > >On 07/26/11 13:48, Danek Duvall wrote: > >>Shawn Walker wrote: > ... > >>api.py: > >> > >>- line 4639: "may not actually be valid" probably needs a touch more > >>explanation. Why should a client use an invalid root as a default > >>location? Would they be expected to do an upwards search, or is it > >>that find_root() will simply handle that? (If so, we might mention > >>that it -- or the Image constructor -- will correct it.) > > > >find_root() handles that, I've expanded the docstring there with this: > > > >The ImageInterface object will use the root provided as a starting point > >to find an image, searching upwards through each parent directory until > >'/' is reached. The '/' may not be a valid image on systems such as > >Solaris 10. > > Urgh, that text was not great in retrospect, see attached diff instead. > > -Shawn
> def get_default_image_root(orig_cwd=None): > """Returns a tuple of (root, exact_match) where 'root' is the > absolute > - path of the default image root based on current environment, given > client > + path of the default image root based on current environment given > client > working directory, and platform defaults, and 'exact_match' is a > boolean "the" before "client", and no comma after "directory". > specifying how the default should be treated by ImageInterface. Note > - that the root returned may not actually be the valid root of an > image; it > - is merely the default location a client should use when initializing > - an ImageInterface. > + that the root returned may not actually be the valid root of an > image; > + it is merely the default location a client should use when > initializing > + an ImageInterface (e.g. '/' is not a valid image on Solaris 10). > + > + The ImageInterface object will use the root provided as a starting > point > + to find an image, searching upwards through each parent directory > until > + '/' is reached based on the value of exact_match. Sure. Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
