On 04/15/10 03:28 PM, Danek Duvall wrote:
Shawn Walker wrote:However, I think this will work intead: parent_path = os.path.dirname(final_path) real_parent_path = os.path.realpath(parent_path) if parent_path != real_parent_path: # Now test each component of the parent path until one is found # to be a link. When found, that's the parent that has been # redirected to some other location. tmp = parent_path while 1:I would compare tmp to "/" or to the image root. Otherwise you might not ever exit the loop.if os.path.islink(tmp): # We've found the parent that changed locations. break # Drop the final component. tmp = os.path.split(tmp)[0]You need an "else" here that skips the message if it falls off the end, signifying that you got up to the top without finding a link. Note that the image root might itself be a link and that's probably okay.
I've addressed all of your concerns I think. updated webrev (diff against 2nd webrev): http://cr.opensolaris.org/~swalker/pkg-529-3/ Cheers, -Shawn _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
