[pacman-dev] [PATCH] Make selecting scriptlet shell work

Dave Reisner d at falconindy.com
Fri Mar 23 10:47:43 EDT 2012


On Sat, Mar 24, 2012 at 12:14:01AM +1000, Allan McRae wrote:
> The initial patch to implement this achieved nothing apart from
> adding a configure option.  This patch makes that configure option
> do what it advertises.

Should we not alter the configure option's help text and default value
as well? It needs to be an absolute path since we pass to execv, not
execvp.

> Bug-found-by: Dave Reisner <dreisner at archlinux.org>
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
>  lib/libalpm/trans.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
> index fe89e40..4309c07 100644
> --- a/lib/libalpm/trans.c
> +++ b/lib/libalpm/trans.c
> @@ -343,7 +343,7 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
>  
>  	_alpm_log(handle, ALPM_LOG_DEBUG, "executing \"%s\"\n", cmdline);
>  
> -	retval = _alpm_run_chroot(handle, "/bin/sh", argv);
> +	retval = _alpm_run_chroot(handle, SCRIPTLET_SHELL, argv);
>  
>  cleanup:
>  	if(scriptfn && unlink(scriptfn)) {
> -- 
> 1.7.9.4
> 
> 


More information about the pacman-dev mailing list