Fakechroot returns -ENOENT for such paths:
$ FAKECHROOT_BASE=$PWD/tests/testing fakechroot ls /not_an.rpm
/not_an.rpm
$ FAKECHROOT_BASE=$PWD/tests/testing fakechroot ls $PWD/not_an.rpm
ls: cannot access /home/mmarek/GIT/rpm/not_an.rpm: No such file or directory
Signed-off-by: Michal Marek <mmarek@suse.com>
- Unless the file does not exist on disk, we cannot determine the
correct action for config files and symlinks before we actually
check them. Those are also the only types that *can* result in
FA_ALTNAME/FA_SAVE action, anything else we can just create.
Besides making the logic a whole lot easier to follow, it also
fixes our remaining test-case failures. Who would've thought?
- Might be worth noting that this requires the pile of fsm fixes
from previous commits to work.
- Replacing a directory with something else is more complicated than
other cases and deserves tests of its own. For simplicity in
the config cases, remove the "and back" part of the test, and
now this test actually succeeds.
- Several (expected) breakages here too, some backups missing, and
some redundant backups taken
- This is by no means complete set of the possible changes but
gotta start someplace...