Commit graph

4 commits

Author SHA1 Message Date
W. Trevor King
72ac04e7ca vendor: Replace Sirupsen/logrus with sirupsen/logrus
With:

  $ git mv vendor/github.com/{S,s}irupsen
  $ sed -i 's/Sirupsen/sirupsen/g' $(git grep -l Sirupsen)

catching up with the upstream lowercasing [1,2,3,4].  Because of the
compatibility issues discussed in [3], some consumers may prefer to
use the old uppercase version until they have time to update their
other Logrus consumers to the new lowercase form.

[1]: https://github.com/sirupsen/logrus/blame/v1.0.3/README.md#L6
[2]: https://github.com/sirupsen/logrus/pull/384
[3]: https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276
[4]: https://github.com/sirupsen/logrus/issues/553
2017-11-03 12:19:19 -07:00
73be830998
*: update -u behavior
Fixes #16

In attempt to close https://github.com/vbatts/go-mtree/issues/16 I've
uncovered that the update was missing a function for symlink.
Additionally the update was not even opperating on the correct directory
hierarchy.

I've uncovered that os.Chtimes follows the symlink, and presumably only
Linux has an obscure way to set the mtime/atime on a symlink itself. So
I've made a custom lchtimes().

Also Mode follows through the symlink, and symlinks only ever have a
mode of 0777, so don't set them.

Lastly, directories need to have their mtime/atime set in a reverse
order after all other updates have been done. This is going to require
something like a `container/heap` to be unwound.

Also, each updateFunc will _only_ perform the update if it is needed. Much less
invasive this way.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-30 15:34:44 -04:00
ed464af779
*: xattr can Update()
This is a gnarly patchset that has been mashed together.
It uncovered that some aspects of Check were never really working
correctly for `xattr` keywords, but also the `Update()` had been left
undone for a while.

This includes some API changes around the `Keyword` and `KeyVal` types.

Also I would like to update the signature for the `UpdateKeywordFunc` to
just accept a `KeyVal` as an argugment, rather than a keyword AND the
value. with this context there would be no need to guess on the value of
what's passed to the xattr update function of whether it needs or
already is base64 encoded.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-24 15:05:24 -04:00
fc5450ed71
*: add an update/restore functionality
This allows for restoring some attributes of files from the state in an
mtree Manifest

Reported-by: Matthew Garrett <Matthewgarrett@google.com>
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-03-17 12:42:57 -04:00