Danek Duvall wrote: > On Mon, Sep 08, 2008 at 06:13:58PM -0500, Shawn Walker wrote: > >> Danek Duvall wrote: >>> On Sun, Sep 07, 2008 at 06:45:32PM -0500, Shawn Walker wrote: >>> os_unix.py: >>> >>> - line 61, 67: ImportError? >> os.getlogin() doesn't exist on all platforms, so if I call it, and it >> doesn't exist, we should get an ImportError exception, right? > > Uh, I'd expect you'd get a AttributeError. I think you get an ImportError > only when an import statement fails. > > And why is os.getlogin() better than the getpwuid() call?
Because os.getlogin() returns the actual, current username based on environment variables, etc. In short, it makes it possible for history to record the user that did "pfexec pkg install foo". getuid(), etc. work off the current/effective user id which is always 0 with pfexec on a default osol 2008.05 install. >>> - line 150: this seems like a risky assumption. If you're not going >>> to implement a stack (one possibility), perhaps at least dump out all >>> that you've gathered for the previous operation, with a end state of >>> "incomplete". >> It was a risky, but intentional assumption. Currently, none of our >> clients perform multiple operations synchronously. > > Not on purpose. But as soon as someone puts two of these operations > together in a way you didn't anticipate, we lose data. A stack doesn't solve all the problem either though. A stack only solves the situation where: A starts, B starts B ends, A ends ...if B ends after A ends, a stack doesn't work. At least if I understand what you mean by stack here. -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
