On 12/06/12 10:15, Danek Duvall wrote:
Danek Duvall wrote:

Craig Mohrman wrote:

I don't see anything wrong.

http://jurassic.us.oracle.com/net/mogo/builds3/cmohrman/userland_perl516_s12-V3/webrev/
Look at perl-516.p5m.

All intermediate files under the build directory look correct.

Looks like "manifest.mediatorcache" is incorrect at runtime.

Hm.  I'll bet that we don't handle two different mediator implementations
(or versions) in the same package properly.  A normal mediatorcache file
doesn't have a trailing newline, so that's probably what's going on.

Indeed, in _gen_mediators_to_str(), we have

     a = "set name=pkg.mediator " \
         "value=%s %s %s\n".rstrip() % (mediation[0],

It's not clear to me why that rstrip() is there, but it'll strip that
newline right off ...

If you want to test the fix, edit
/usr/lib/python2.6/vendor-packages/pkg/manifest.py on line 345 to remove
the ".rstrip()", remove perl-516, add it again, and see if it works as it
should.

Yes, the rstrip() is bogus (see _gen_dirs_to_str). And I just checked all of our unit tests, while some of them do have packages with multiple mediator versions, they're not actually used with pkg(1), so this doesn't get triggered.

Not sure how that slipped by since it seems silly to have a "\n" embedded in the string and an rstrip() in use. I think what happened is that when I moved around the cache generation code in manifest.py (a long time ago now) I may have confused myself with the rstrip() calls used on the return value of _gen_*_to_str in the get_directories() and gen_mediators() functions.

Specifically, this breaks __storebytype() in manifest.py:

1107 create_cache("manifest.dircache", self._gen_dirs_to_str)
1108                 create_cache("manifest.mediatorcache",
1109                     self._gen_mediators_to_str)

-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to