However if the Augeas lens happens to contain that path already,
things go wrong:
augtool> transform passwd incl /etc/passwd
augtool> load
# /etc/passwd is not parsed by the passwd lens
augtool> get /augeas/files/etc/passwd/error/message
/augeas/files/etc/passwd/error/message = Lenses @Passwd and passwd.lns could be used to load this file
This is specifically a problem when libguestfs adds a call to
aug_transform to cater for a file that is not covered by an existing
lens, but then Augeas adds that file, and then we get the error above
until libguestfs removes the call to aug_transform. We cannot control
when Augeas and libguestfs are released in different Linux distros.
There are workarounds for this involving fishing out the existing
transform and working out if it covers the file or not, but that's
pretty tedious.
It seems to be that Augeas could be cleverer here and could just
ignore the case where two identical transforms apply to the same file
and DWIM.