[Pm-utils] [patch review request] Remove hardcoded /usr/lib/pm-utils/functions dependence
Stefan Seyfried
seife at suse.de
Wed Jan 30 05:14:04 PST 2008
On Tue, Jan 29, 2008 at 09:21:08PM -0600, Victor Lowther wrote:
> The attached patch removes our depencence on a hardcoded path to
> pm/functions. It modifies Makefile.am in the src and pm/sleep.d
> directories to have make install rewrite the installed scripts to
> source the final installation location of pm/functions, not the
> hardcoded path.
>
> One interesting thing to note is that the scripts are considered data
> by the autotools process, so all that install-exec-(local|hook) stuff
> has been incorrect for the lifetime of pm-utils so far.
>
> I would like some review and testing -- it Works For Me, but I am an
> autotools n00b and probably missed something.
> diff --git a/pm/sleep.d/00clear b/pm/sleep.d/00clear
> index b96e0a7..fac3496 100755
> --- a/pm/sleep.d/00clear
> +++ b/pm/sleep.d/00clear
> @@ -1,6 +1,6 @@
> #!/bin/sh
>
> -. /usr/lib/pm-utils/functions
> +. @PM-UTILS-LIBDIR@/functions
I hate that, since i cannot just use the source files for testing but always
need to do make install"
Can't we just export some variable up in the stack (like PM_DIR or something
like that) and then just use that in the hooks.
And think twice before changing that location.
1) User's hooks are already using the old location (we already changed once
from /etc/ to /usr/lib and it was a PITA for users)
2) it is pretty important that everyone (across distributions) uses the same
location, so that all the tutorials and hooks out there in the internet
are useful for everyone.
Where do you actually want to put the functions?
--
Stefan Seyfried
R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
This footer brought to you by insane German lawmakers:
SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
More information about the Pm-utils
mailing list