Don't create ACL objects until they're needed.
Don't create ACL objects until they're needed.

Previously bup would store the POSIX1e ACL information in metadata
objects as pylibacl objects.  That meant bup would have to be able to
create those objects immediately when loading the metadata record.

Aside from being unnecessary, that was causing top-level crashes in
cases where the ACL object creation failed.  That's because bup would
throw an exception (deferred via add_error()) without skipping the ACL
metadata record content.  After that, all metadata reads would be out
of sync, resulting in erroneous reads, and an eventual EOFError.

To fix the problem, don't convert the encoded ACL data to pylibacl
objects until necessary (i.e. unless trying to apply the ACLs to the
filesystem via bup restore).  With that change bup should no longer
get out of sync when reading the metadata, and in cases where it would
be impossible to create the pylibacl objects (i.e. the local machine's
user/groups won't allow it), bup won't just drop the metadata.  For
example,

  bup meta --edit --set-user rlb < metadata.old > metadata.new

will no longer silently drop ACL information in metadata.old on error.

Thanks to Anton Eliasson <devel@antoneliasson.se> for reporting the
problem and helping track it down.

Signed-off-by: Rob Browning <1dc5917c2adeeba13d1ef33dbb40691a1b67cc65@defaultvalue.org>

jbaber/bup,tjanez/bup,pombredanne/bup,gevaerts/bup,ToxicFrog/bup,mhoeher/bup,tjanez/bup,mhoeher/bup,mhoeher/bup,tjanez/bup,jbaber/bup,gevaerts/bup,gevaerts/bup,ToxicFrog/bup,gevaerts/bup,mhoeher/bup,jbaber/bup,pombredanne/bup,pombredanne/bup,tjanez/bup,jbaber/bup,tjanez/bup,jbaber/bup,gevaerts/bup,mhoeher/bup,pombredanne/bup,ToxicFrog/bup,pombredanne/bup,mhoeher/bup,tjanez/bup,pombredanne/bup,jbaber/bup,ToxicFrog/bup,ToxicFrog/bup