This commit makes sure to empty RPM macros files are created during
the build. Additionally it also ensures that no needless `rm` and `mkdir`
calls are done.
Fixes#1316
This commit adds to Path utility a couple of methods to manipulate
paths. One to rebase given paths to a new root and another one to
trim the given root path. In addition a new option in Path.which
is added to allow searches into chroot evironments.
Fixes#1276
This function calls os.access, but first checks whether the input parameters are
sane, instead of simply returning false when the file in question does not exist
or an invalid mode was specified.
When an iso file is used as repo, this iso will be loop mounted on
the host and bind mounted into the image root as long as the image
builds. When the mount is released a recursive cleanup of the complete
path happens. This is done by calling Path.remove_hierarchy. However
if a sub path of the mount path contains a system root directory
which is mandatory for the Linux root system it is not allowed
to be deleted even if it is empty at the time of the mount cleanup.
Thus this patch adds a lookup for protected directory names and
only runs the recursive deletion as long as no protected member
is part of the path. This fixes bsc#1080301
Command.run and Command.call now make use of Path.which in order
to test if the command is available or not. Also Path.which has
been extended in order to support custom environments and to be
able to test file permissions (read. write, execute)
nose is no longer maintained, thus we have to move to another
testing system. This commit updates the tox setup and all tests
to use pytest instead of nose.