Bug 56924

Summary: check for /usr/bin/pkaction should use $PATH
Product: PackageKit Reporter: Allison Lortie (desrt) <desrt>
Component: GeneralAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: build: simplify check for polkit

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.