[pacman-dev] [PATCH] pmtest: resolve path to scriptlet shell
Allan McRae
allan at archlinux.org
Thu Nov 29 01:14:07 EST 2012
On 26/11/12 14:05, Dave Reisner wrote:
> On Sun, Nov 25, 2012 at 05:12:13PM -0500, Dave Reisner wrote:
>> In order to support a variety of values for the --with-scriptlet-shell
>> configure flag, pmtest has to be aware of what kind of path was passed,
>> be it an absolute path or a fragment for a path lookup. For absolute
>> paths, leave the path alone. For fragments, search the PATH environment
>> var for the resolved path to the binary. In both cases, join the
>> resultant path to the root directory defined for the test, not a
>> pre-determined bin directory.
>>
>> Signed-off-by: Dave Reisner <dreisner at archlinux.org>
>> ---
>> This applies to allan's working branch.
>>
>> test/pacman/pmtest.py | 18 ++++++++++++++++--
>> 1 file changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
>> index b69275b..a644860 100644
>> --- a/test/pacman/pmtest.py
>> +++ b/test/pacman/pmtest.py
>> @@ -103,6 +103,17 @@ def load(self):
>> else:
>> raise IOError("file %s does not exist!" % self.name)
>>
>> + def resolve_binary(self, binary):
>> + if binary[0] == '/':
>
> Bah, if we're going to bother with os.path.join(), we might as well use
> os.path.isabs() here as well. We're plotting to drop support for cygwin,
> so this doesn't technically matter a whole lot...
>
The plot to drop cygwin is fully approved so this is ok.
Allan
More information about the pacman-dev
mailing list