Elided comments fixed as suggested.....

Dan Price wrote:
On Mon 30 Nov 2009 at 07:05PM, Bart Smaalders wrote:
http://cr.opensolaris.org/~barts/pkgdiff/


So I played with it...

file path=usr/sbin/zdump elfarch=i386 elfbits=32 
elfhash=fc3a8d192ee7cfe2c298e4dcb3e05cccf8e7b9d6 group=bin mode=0555 owner=root 
pkg.csize=6618 pkg.size=17320 variant.arch=i386
  + 534bb9298fb90fb524de6e44b43de1e60a1e54bb
  - 55f3143492a9dff1719b377255670c97ae6ca8b7
  + chash=84957b2e38ed7b75b49fa51edd85ef35457be4e8
  - chash=6e2e712708fc0a16f5106fa9e43c6d08fbafe544

So I realize the first thing is the hash-- should it be labelled somehow
as such?


Perhaps; I'll likely leave this for now... we're considering making the
hash less special in lots of places.


---
Do you think that you need to print the remaining (not-changed)
attributes of an action?  It seems like if you printed the
key_attr, that might be enough?  In other words, would this:

file path=usr/bin/alias elfarch=sparc group=bin mode=0555 owner=root 
variant.arch=sparc
  + 35de0e560c8158285f9ffbb8f072e5560fb0747d
  - d43bf93c2315def3653b5c55504d510be255ca31
  + chash=6d0586fdb13509f412ee349dd6d143a357baf81d
  - chash=2fa3d4622c81d73556a4f7e8a50f3c476522a7d5
  + elfbits=64
  - elfbits=32
  + elfhash=df1275379c6a60d41ebfdf317f960599295b0955
  - elfhash=92702d2194831f11ef804d02f40e03d3a3feccce
  + pkg.csize=5507
  - pkg.csize=3901
  + pkg.size=25528
  - pkg.size=12424

Be better as follows?  I don't know.

file path=usr/bin/alias
  - d43bf93c2315def3653b5c55504d510be255ca31
  + 35de0e560c8158285f9ffbb8f072e5560fb0747d
  - chash=2fa3d4622c81d73556a4f7e8a50f3c476522a7d5
  + chash=6d0586fdb13509f412ee349dd6d143a357baf81d
  - elfbits=32
  + elfbits=64
  - elfhash=92702d2194831f11ef804d02f40e03d3a3feccce
  + elfhash=df1275379c6a60d41ebfdf317f960599295b0955
  - pkg.csize=3901
  + pkg.csize=5507
  - pkg.size=12424
  + pkg.size=25528

It would certainly make the output more compact and more focused on
what changed.


I did this originally; it was immediately clear I needed to include variants... whether the rest belongs is a good question. I think
it's more useful to get the full output, actually, which is why I
switcherd.

---
A complement to -i which acts as a whitelist (-o for
*only*?) would be nice.  Then I could ask: "What mode changes were
there in this build?".

-o has been added to pkgdiff, man pages and synopsis...

I've changed the behavior of -i and -o to affect the key action as well;
thus, specifying -i path will cause action changes that differ only in path to be elided, just as adding -o version will cause all action
changes that don't affect an attribute named version to be removed.


---
A command line option which represented:

-i hash -i chash -i pkg.size -i pkg.csize -i elfhash -i pkg.elfhash

(or which could collapse all of these into a single:

  * contents changed

would be nice.  My assumption is that most humans will be diffing
to work out changes which are not about the contents.


I'll pass on this for now; our publication stuff isn't stable enough
for that at present as we're like to change hash tags, etc.  Perhaps
we should define this in the actions themselves, but we've not done so
yet.

- Bart

--
Bart Smaalders                  Solaris Kernel Performance
[email protected]         http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to