Bug 56924 - check for /usr/bin/pkaction should use $PATH
Summary: check for /usr/bin/pkaction should use $PATH
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-09 14:43 UTC by Allison Lortie (desrt)
Modified: 2012-11-11 14:51 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
build: simplify check for polkit (1.03 KB, patch)
2012-11-09 15:18 UTC, Allison Lortie (desrt)
Details | Splinter Review

Description Allison Lortie (desrt) 2012-11-09 14:43:49 UTC
PackageKit has this in configure.ac:

# try and guess this if nothing is listed
if test x$with_security_framework = x; then
        if test -f /usr/bin/pkaction ; then
                with_security_framework=polkit
        else
                AC_MSG_ERROR([--with-security-framework explicitly required when not using PolicyKit or RBAC])
        fi
fi


which fails if pkaction is not in /usr/bin but somewhere else in the PATH.
Comment 1 Allison Lortie (desrt) 2012-11-09 15:18:53 UTC
Created attachment 69820 [details] [review]
build: simplify check for polkit

So the old logic was approximately like this:

if security framework not explicitly specified:
    if (broken check) polkit installed:
        use it
    else:
        fail

if using polkit:
    pkg-config polkit, possibly failing


In other words (assuming the broken check was working) the logic is that if you don't specify an explicit security framework and polkit is not installed, the build will fail.

There's a much more direct way of doing that: just go ahead and assume that we should use polkit if nobody explicitly specified another option.  The build will fail just as well when we hit the pkgconfig check if polkit is not installed.
Comment 2 Richard Hughes 2012-11-11 14:51:18 UTC
Pushed to master, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.