Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#2931 - Install scripts fails if /bin/sh is not linked to bash.

Attached to Project: Pacman
Opened by Andrew Fyfe (mort) - Friday, 08 July 2005, 01:00 GMT
Task Type Bug Report
Category
Status Closed
Assigned To No-one
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

On my system /bin/sh points to ash, when I install a package that contains an install script I get an error because pacman uses 'source' to include the install script. 'source' is bash specific and isn't supported by sh compliant shells.

Below is a patch that fixes the problem by calling /bin/bash instead. The patch is against pacman-2.9.6.

--- pacman-2.9.6/src/pacman.c.orig 2005-07-08 00:35:57.000000000 +0000
+++ pacman-2.9.6/src/pacman.c 2005-07-08 00:37:34.000000000 +0000
@@ -3374,10 +3374,10 @@

vprint("Executing %s script...\n", script);
if(oldver) {
- snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s %s\" | /usr/sbin/chroot %s /bin/sh",
+ snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s %s\" | /usr/sbin/chroot %s /bin/bash",
scriptpath, script, ver, oldver, pmo_root);
} else {
- snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s\" | /usr/sbin/chroot %s /bin/sh",
+ snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s\" | /usr/sbin/chroot %s /bin/bash",
scriptpath, script, ver, pmo_root);
}
vprint("%s\n", cmdline);
This task depends upon

Closed by  Judd Vinet (judd)
Friday, 08 July 2005, 01:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in CVS, Thanks.

Loading...