On 12/22/11 17:46, Shawn Walker wrote:
This is a proposal (primarily) to change the output of pkg(1) when -v is
not used for package operations. When -v is not used, an 'update
summary' would be displayed instead at the install-hold level. It also
attempts to improve messaging in the 'No updates available' case.
...
I've updated the examples based on feedback so far. Here's a summary of
the changes made:
* version fields now have a ':' delimiter for readability
* if a pkg provides pkg.human-version, it is shown first with the
actual version in parentheses
* version shown no longer include build_release (since it will likely
always be ",5.11")
* version timestamps aren't shown unless that is the only component of
the version changing
* when showing the actual version in parentheses, it will be shown on
the same line unless there isn't enough room to fit in 80 columns in
which case it will be shown on the following line at the same
position the pkg.human-version is (for readability)
* "UPDATE SUMMARY" -> "PACKAGE CHANGE SUMMARY" (to reflect that this
applies to more than just 'pkg update')
Some additional notes:
* the proposed changes apply to all operations that modify packages
when "-v" is not used or when an operation cannot update packages
because of constraints (i.e. "No updates available.")
* the "human" versions shown are not automatically generated; whatever
is set in pkg.human-version is what is shown; this means that they
are not localised
* I remain unconvinced that adding "Publisher" and "Package" labels
to the output would improve readability, especially considering most
users will only see a single entry for "entire"
* The "Latest" version shown in the summary is identical to that
returned by "pkg list <pkg_name>@latest". In other words, publisher
search order, etc. dictates what is considered the latest version.
This is quite helpful to developers that have project gates behind
newer versions found in the 'solaris' publisher's /dev repository.
END-USER EXAMPLES
=================
These examples assume 'entire' is installed and nothing has been
version-unlocked:
# pkg update -n
...
PACKAGE CHANGE SUMMARY
solaris
entire
Installed: FCS Build 2 (0.5.11-0.175.0.0.0.2.0)
Proposed: SRU 2 Build 3 (0.5.11-0.175.0.2.0.3.0)
...
Shows an update from S11 release to the latest SRU. 'entire' is shown
because it is the top-level of the install-hold chain (in this case,
'core-os'). The other incorporations are hidden even though they are
changing because they are incorporated by the package delivering the
'core-os' install hold.
# pkg update -n
...
PACKAGE CHANGE SUMMARY
solaris
entire
Installed: FCS Build 2 (0.5.11-0.175.0.0.0.2.0)
Proposed: SRU 1 Build 4 (0.5.11-0.175.0.1.0.4.0)
Latest: SRU 2 Build 3 (0.5.11-0.175.0.2.0.3.0)
...
Shows an update from release to a newer SRU, but not the latest which
has been blocked by a pkg freeze, unbundled product, or some other
package. 'entire' is shown because it is the top-level of the
install-hold chain (in this case, 'core-os'). The other incorporations
are hidden even though they are changing because they are incorporated
by the package delivering the 'core-os' install hold. The Latest
version is only shown if the proposed version is older.
# pkg update -n
...
PACKAGE CHANGE SUMMARY
solaris
consolidation/ips/ips-incorporation
Installed: FCS Build 2 (0.5.11,5.11-0.175.0.0.0.2.0)
Proposed: SRU 2 Build 3 (0.5.11,5.11-0.175.0.2.0.3.0)
...
Shows an update of a single consolidation's incorporation to a newer
version under the theory that it is not incorporated by 'entire' or is
allowed by 'entire'. 'ips-incorporation' is shown because it is
changing and 'entire' is not.
# pkg update -n
...
PACKAGE CHANGE SUMMARY
solaris
entire
Installed: FCS Build 2 (0.5.11,5.11-0.175.0.0.0.2.0)
Latest: SRU 2 Build 3 (0.5.11,5.11-0.175.0.2.0.3.0)
No updates possible. If updates were expected, execute the command
again and specify each package listed above with the desired version for
more information.
...
Shows a case where newer packages are available, but cannot be updated
to because they have been blocked by a pkg freeze, unbundled product, or
some other package. 'entire' is shown because it is the top-level of
the install-hold chain (in this case, 'core-os') of the installed
incorporations. (This failure to update is not considered an error
because it is impossible to determine whether the result is intentional
without explicit user input.)
Also note that it says 'possible' instead of 'available' and that pkg(1)
would exit with code 6 in this case (a new code used to indicate that no
changes were made but potential updates are available). Currently,
pkg(1) would only show the message 'No updates available.' and then exit
with code 4.
I considered having pkg(1) display the example command line for a user
to execute for the above case, but I think the more text we print, the
more likely the user is to simply ignore it. I really don't want them
to simply copy and paste what's printed without reading the message --
they need to think about what they type next.
DEVELOPER EXAMPLES
==================
These examples assume 'entire' has been removed:
# pkg update -n
...
PACKAGE CHANGE SUMMARY
on-nightly
consolidation/osnet/osnet-incorporation
Installed: Update 1 Build 6 Nightly 18318
(0.5.11-0.175.1.0.0.6.18318)
Proposed: Update 1 Build 6 Nightly 18339
(0.5.11-0.175.1.0.0.6.18339)
pkg5-nightly
consolidation/ips/ips-incorporation
Installed: 0.5.11-0.175.1.0.0.0.2603:20111220T130654Z
Proposed: 0.5.11-0.175.1.0.0.0.2603:20111222T130712Z
...
Shows an update from a previous nightly to a newer one.
'osnet-incorporation' is shown because it is the top-level of the
install-hold chain (in this case, 'core-os.os-net') and
'ips-incorporation' because it is also at the top-level ('core-os.ips').
No other incorporations are changing so they are not listed.
# pkg update -n
...
PACKAGE CHANGE SUMMARY
on-nightly
consolidation/osnet/osnet-incorporation
Installed: Update 1 Build 6 Nightly 18318
(0.5.11-0.175.1.0.0.6.18318)
Proposed: Update 1 Build 6 Nightly 18320
(0.5.11-0.175.1.0.0.6.18320)
Latest: Update 1 Build 6 Nightly 18339
(0.5.11-0.175.1.0.0.6.18339)
pkg5-nightly
consolidation/ips/ips-incorporation
Installed: 0.5.11-0.175.1.0.0.0.2603:20111220T130654Z
Proposed: 0.5.11-0.175.1.0.0.0.2603:20111221T130623Z
Latest: 0.5.11-0.175.1.0.0.0.2603:20111222T130712Z
...
Shows an update from a previous nightly to a newer one in the case where
an update to the latest version of each incorporation has been
prevented. The Latest version is only shown if the proposed version is
older. Only the packages delivering the top-level
pkg.depend.install-holds that are changing are shown. (In this case,
'core-os.osnet' and 'core-os.ips'.)
MORE DEVELOPER EXAMPLES
=======================
These examples assume 'entire' is installed and 'osnet-incorporation' is
version-unlocked:
# pkg update -n
...
PACKAGE CHANGE SUMMARY
on-nightly
consolidation/osnet/osnet-incorporation
Installed: Update 1 Build 6 Nightly 18318
(0.5.11-0.175.1.0.0.6.18318)
Proposed: Update 1 Build 6 Nightly 18339
(0.5.11-0.175.1.0.0.6.18339)
...
Shows an update from a previous nightly to the latest nightly.
'osnet-incorporation' is shown because it is not incorporated by the
top-level install-hold package (because of the facet version unlock) and
delivers an install-hold that is changing. Other incorporations are not
shown because they are not changing and they are incorporated by 'entire'.
# pkg update -n
...
PACKAGE CHANGE SUMMARY
on-nightly
consolidation/osnet/osnet-incorporation
Installed: Update 1 Build 6 Nightly 18318
(0.5.11-0.175.1.0.0.6.18318)
Proposed: Update 1 Build 6 Nightly 18339
(0.5.11-0.175.1.0.0.6.18339)
pkg5-nightly
consolidation/ips/ips-incorporation
Installed: 0.5.11-0.175.1.0.0.0.2603:20111220T130654Z
Proposed: 0.5.11-0.175.1.0.0.0.2603:20111222T130712Z
...
Shows an update from a previous nightly to the latest nightly.
'osnet-incorporation' is shown because it is not incorporated by the
top-level install-hold package (because of the facet version unlock) and
delivers an install-hold that is changing. 'ips-incorporation' is shown
because 'entire' is not changing and it delivers an install-hold
('core-os.ips').
# pkg update -n
...
PACKAGE CHANGE SUMMARY
solaris
entire
Installed: FCS Build 2 (0.5.11-0.175.0.0.0.2.0)
Proposed: SRU 2 Build 3 (0.5.11-0.175.0.2.0.3.0)
on-nightly
consolidation/osnet/osnet-incorporation
Installed: Update 1 Build 6 Nightly 18318
(0.5.11-0.175.1.0.0.6.18318)
Proposed: Update 1 Build 6 Nightly 18320
(0.5.11-0.175.1.0.0.6.18320)
Latest: Update 1 Build 6 Nightly 18339
(0.5.11-0.175.1.0.0.6.18339)
...
Shows an update from a previous nightly to a newer nightly, but not the
latest which has been blocked by a pkg freeze, unbundled product, or
some other package. 'entire' is shown because it is the top-level of
the install-hold structure (in this case, 'core-os'). The other
incorporations are hidden even though they are changing because they are
incorporated by the package delivering the 'core-os' install hold. The
Latest version is only shown if the proposed version is older.
Thanks,
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss