Greetings all,

I recently did an update to some bits I'd built from pkg-nightly. I was a bit surprised that pkg update -v suggested that 500MB of stuff would be consumed on my system. Here's the command and the result:
# pkg update -Inv pkg://pkg5-nightly/*
            Packages to update:         8
     Estimated space available: 741.59 GB
Estimated space to be consumed: 508.26 MB
       Create boot environment:        No
          Rebuild boot archive:        No

Changed packages:
pkg5-nightly
  consolidation/ips/ips-incorporation
0.5.11,5.11-0.172:20110811T003015Z -> 0.5.11,5.11-0.172:20110811T014839Z
  developer/opensolaris/pkg5
0.5.11,5.11-0.172:20110811T003015Z -> 0.5.11,5.11-0.172:20110811T014839Z
  group/system/solaris-desktop
0.5.11,5.11-0.172:20110811T003016Z -> 0.5.11,5.11-0.172:20110811T014841Z
  package/pkg
0.5.11,5.11-0.172:20110811T003020Z -> 0.5.11,5.11-0.172:20110811T014844Z
  package/pkg/package-manager
0.5.11,5.11-0.172:20110811T003017Z -> 0.5.11,5.11-0.172:20110811T014842Z
  package/pkg/system-repository
0.5.11,5.11-0.172:20110811T003019Z -> 0.5.11,5.11-0.172:20110811T014843Z
  package/pkg/update-manager
0.5.11,5.11-0.172:20110811T003019Z -> 0.5.11,5.11-0.172:20110811T014843Z
  package/pkg/zones-proxy
0.5.11,5.11-0.172:20110811T003019Z -> 0.5.11,5.11-0.172:20110811T014844Z


After discovering that 405+MB of this estimate was because twice the state dir would be used, and talking w/ Shawn to make sure that the code was working as expected, I wanted to bring this up more broadly because I'm not sure that this is how we want things to work. I think there are two issues here. First, most users, I think, only really care about one issue: "Is there enough disk space to complete this operation, and if not, how much am I short?" That's a question about peak disk usage during the operation. That question can be answered by silently proceeding without displaying any information at all, unless the operation won't succeed, in which case an appropriate error message can be presented.

The other question I think we're trying to answer for users is "How much disk space is doing this update/install going to consume after the operation is done?" (Or do put it a different way, what's the permanent effect on disk space that this operation is going to cause.) Here, the number matters, but the number we're showing isn't the number they want to see. For their purposes, that we copy the image state directory temporarily, move it around, then replace the original info isn't relevant, only the difference in size between the two states is.

My preferred solution would be to simply remove the numbers from the output period, of if we show them, only show the final amount of disk space consumed, rather than the peak during pkg processing.

If neither of those is acceptable, then perhaps we could change the output slightly so that the line becomes "Estimated peak disk consumption during pkg operation: 508.26MB", and add another line which says something like:
"Estimated permanent disk space impact:10MB"

Does anyone else find the current state of the world confusing at best?
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to