On Thu, 2009-04-02 at 04:48 -0700, Danek Duvall wrote: > On Thu, Apr 02, 2009 at 12:36:50AM -0500, Shawn Walker wrote: > > > > > It surprises me that it works ok with the importer. > > > > > > The line > > > > > > action.attrs["pkg.size"] = str(os.stat(fname).st_size) > > > > > > seems to do the trick. Perhaps pkgsend could be enhanced to do the same. > > > > It shouldn't have to; modules/actions/generic.py already does the same > > thing, except it uses os.lstat instead of os.stat. > > Are you saying that you shouldn't have been surprised originally, because > pkg.size should be set automatically?
Err, um, sure? But yes, I would not expect pkg.size to have to be provided for /dev/null if an os.stat() works. > I remember having to add it. I don't remember exactly how it blew up, but > it did. lstat() is probably the wrong thing, since it'll then get the size > of the symlink, rather than the target file. Yes, lstat is the wrong thing. I'll file a bug for that. -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
