On 06/26/12 20:30, Tim Foster wrote:
Hi there,

I'm doing a bit of spring (er, winter) cleaning and found that I hadn't putback this wad.

We originally talked about it here:

http://mail.opensolaris.org/pipermail/pkg-discuss/2011-September/027917.html

and it got a LGTM at the time.

There was a question as to why it was an error to rename to an obsolete package. This would spot the following (somewhat zany) case, where we try to do a fresh install of a now-renamed package, and that renamed package erroneously depended on an obsolete package:

$ pkg -R image install an-old-name
Creating Plan -
pkg install: No matching version of an-old-name can be installed:
Reject: pkg://opensolaris.org/an-old-name@0.5.11,5.11-0.141:20120627T021008Z Reason: All acceptable versions of 'require' dependency on pkg:/system/obsolete are obsolete


working around 7180019, pkglint would spot this as:

$ pkglint mf\-rename mf\-obsolete
Lint engine setup...
Starting lint run...
ERROR pkglint.manifest002.5 package pkg://opensolaris.org/an-old-name@0.5.11,5.11-0.141 was renamed to an obsolete package pkg://opensolaris.org/system/obsolete@1.0,5.11

The webrev hasn't changed at all since we looked at it originally, I've just merged and migrated the bugid - that's at:

https://cr.opensolaris.org/action/browse/pkg/timf/pkglint_fix_dep_obsolete/webrev

    cheers,
            tim
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
The changes still lgtm.
I did have a couple of question though. Will this prevent us from ever obsoleting a package that another package has been renamed too? I think this would work at publication time since we'd only be evaluating the obsolete package, and not the renamed package (which would be part of the reference repo). However, wouldn't these packages, when linted all together in a repo, fail?

I guess I'm imagining the following scenario where each separate publication/pkglint run is separated by ----:
A@1 is published.
----
A@2 is published with a rename to B (or B@2)
B@2 is published normally.
----
B@3 is obsoleted.

Each of these publications, I think, would pass pkglint, but when I do pkglint over the repository, it lints (I think) the latest version of each package so A@2 and B@3 would be linted. Since B@3 is now obsolete, A@2 would trigger a lint error, right?

If what I've outlined above is how things would work, then I'm concerned. I'd think either we'd need to not make this an error at all, or have the publication of B@3 fail pkglint since something has been renamed to B (which would in theory prevent us from obsoleting a package that's been renamed to, also something I think isn't a great outcome).

What have I misunderstood?

Thanks,
Brock
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to