On Jan 7, 2008 8:03 AM, Lucas C. Villa Real <[EMAIL PROTECTED]> wrote: > On Jan 6, 2008 11:26 PM, Carlo Calica <[EMAIL PROTECTED]> wrote: > > On 1/6/08, Jonas Karlsson <[EMAIL PROTECTED]> wrote: > > > 2008/1/7, Lucas C. Villa Real <[EMAIL PROTECTED]>: > > > I'd still want a warning if any action fails, as it could be critical > > > for the operation of the application that a group or user exist. Maybe > > > grep group/passwd for the group/user to erify that it was really > > > added? > > > > > > > Checking group/passwd is a good check. How about SymlinkProgram > > exiting in a failure? Or write an error log (R/Errors??) in case the > > error msg scrolls off screan, then the admin can fix the problem by > > hand. bloat bloat bloat > > Well, I've just added a Log_Error for now. Since there's only one more > operation after scanning Resources/Requirements (and that's > RemoveBroken), I don't think it'll be the case of having console > flood.
Remember that SymlinkProgram is also called by things like Freshen and Manager. In any case, error catching in SymlinkProgram is basically nonexistant, so that's an open problem that should be treated as a whole, eventually. I just filed a bug (#239) to remind us of that so it doesn't go mentioned-then-forgotten. > > > it feels as if it only loops existing gids/uids and returns the last, > > > but not looking for a available slot. Then if a gid/uid is found that > > > (+1) is returned, which means that the code below that, that tries to > > > find next available slot, is never reached. > > > > > > > Exactly, the idea is max+1 is more orderly. Most recent is highest. > > But the fear is someone may add an entry by hand (say 999). In that > > case, it falls back to first available slot. > > Right. I've added a missing check now (couldn't sleep thinking of > that, damn), and the patch finds attached again. I'll collect more > reviews tomorrow in the day, if any, otherwise will commit it as-is, > as further improvements can always be added later. Two suggestions: * Instead of "Added by Scripts" as the comment field, use something more informative such as "Added by $package $version" * It could be a good idea to move all this stuff into a new module file such as Functions/Requirements and Import that, instead of making SymlinkProgram even longer. -- Hisham _______________________________________________ gobolinux-devel mailing list gobolinux-devel@lists.gobolinux.org http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel