On 11/10/11 04:14, Enda o'Connor - Oracle Ireland - Software Engineer wrote:
Hi
On one box i had SRU1 build 03 installed on topof 175b, I ran pkg update
and hit CR 7110134, fair enough, on another box that had vanilla 175b
though, with SRU publisher repo set, I tried a pkg update as well and it
went though fine, but turns out it only took me to SRU1 build 03, when
build 04 is available in the repo.
pkg update neever mentioned that it was taking me to a version of entire
I did not want, I explicitly wanted 04 build of SRU 1.

If you explicitly want a specific version of a package, you must explicitly request it on the command line.

For example:

pkg update [email protected],5.11-0.151.0.1.4

If it is unable to upgrade to what you requested, it will attempt to tell you why.

It was only after I rebooted and chekcked entire I saw that I had a
version that I did not want, only then when I ran pkg update again did I
see the error message telling me about the data/xml-common dependency
issue.

Only the fact that I was expecting the error initially made me double
check what pkg had done and discover that it had done something very
much against my wishes without me knowing, I had rebooted etc by this
stage.

Surely a packaging system that makes arbitrary decisions with out
telling me is at best a bug?

No. By design, if you type 'pkg update' without any arguments, the package system will update whatever packages it can to the latest version based on the constraints placed on your system.

This behaviour is necessary so that IDRs and package freezes work as expected, among other things.

If it had at least told me there was a problem with going to latest and
still done the update to say build 03 I would have been somewhat
happier, I would have seen it was 7110134 and just removed the new BE
without doing a reboot.

Are customers/end users seriously expected to double check before a
reboot every time?
Is it documented that end users need to double check things like this?

If you always explicitly request what you expect, you don't have to double check.

The very first paragraph in the man page for the update subcommand explains this.

A warning after pkg update had completed that there was an issue going
to latest is the very minimum I'd have expected.

A warning would be incorrect in the event that a user had intentionally constrained their system in some way.

I can log a CR to get pkg update to at least inform user of why it has
made a decision about what version it has determined is the latest it
can go to if there is later available.

Please do not log a CR, the system is working as intended.

If you want to update to a specific version, explicitly request that version. If you want to update to whatever the latest version is, you can use:

pkg update '*@latest'

The man page documents the 'latest' keyword.

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

Reply via email to