[MacPorts] #16199: MacPorts-1-1.6.0 postflight shell recognition failure
#16199: MacPorts-1-1.6.0 postflight shell recognition failure -----------------------------------------------------------+---------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Keywords: MacPorts-1-1.6.0 shell recognition postflight | -----------------------------------------------------------+---------------- {{{ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7254 100 7254 0 0 8476 0 --:--:-- --:--:-- --:--:-- 19737 The MacPorts Project, postflight script version 1.6.1: checking the shell environment for user "root". '''Unknown shell (sh)! Please set your MacPorts compatible environment manually.''' Synchronizing the MacPorts installation with the project's rsync server... Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/ receiving file list ... done sent 32 bytes received 323800 bytes 23987.56 bytes/sec total size is 18646973 speedup is 57.58 MacPorts base version 1.600 installed receiving file list ... done sent 32 bytes received 6472 bytes 1858.29 bytes/sec total size is 3962384 speedup is 609.22 Downloaded MacPorts base version 1.600 The MacPorts installation is not outdated and so was not updated selfupdate done! Successful! }}} I ran basename $SHELL and it returned bash. -- Ticket URL: <http://trac.macports.org/ticket/16199> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by raimue@macports.org): Did you switch to the root user by using su? You should use sudo because otherwise the script can't determine for which user it should setup the .profile. -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by nick.colclasure@mac.com): yes, and it still doesn't work. -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by raimue@macports.org): The postflight script is not using the SHELL environment variable, because in Installer.app it is always run with the same shell. The following command is used to determine the ''login'' shell for the current user. {{{ dscl . -read /users/${USER} shell }}} Probably your login shell is set to something different than what your terminal starts? -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by nick.colclasure@mac.com): dscl . -read /users/${USER} shell shell: /bin/bash -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by raimue@macports.org): Could you please show how you ran the command? -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by nick.colclasure@mac.com): $ dscl . -read /users/${USER} shell a direct copy of yours above. I also changed the preferences and chose the option "Execute this command (specify complete path) with the path specified as /bin/bash -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by raimue@macports.org): No, sorry. I meant how you invoked the postflight script. But after some testing I was now able to reproduce the issue anyway. A simple reproduction recipe for the problem: {{{ echo 'echo $USER $SUDO_USER' > foo.sh chmod +x foo.sh sudo ./foo.sh }}} This gives for me {{{ root raim }}} The postflight script reads $USER which is set to 'root' when running with sudo. But in Installer.app $USER is probably exported to the installing user. Maybe it should just respect $SUDO_USER, if available. Workaround: {{{ bash postflight sudo port -v selfupdate }}} No sudo for postflight this time, most probably you will see an error message that selfupdate failed. But that's no big deal and we just do it afterwards. -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@mac.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: MacPorts-1-1.6.0 shell recognition postflight --------------------------------------+------------------------------------- Comment (by nick.colclasure@mac.com): Thanks, problem solved. -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 1.6.0 Resolution: fixed | Keywords: MacPorts-1-1.6.0 shell recognition postflight Port: | --------------------------------------+------------------------------------- Changes (by mcalhoun@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:8 nick.colclasure@…]:
Thanks, problem solved. Since the problem seems to have been resolved, this ticket will be closed.[[BR]] If it was closed in error, please reopen.
-- Ticket URL: <http://trac.macports.org/ticket/16199#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16199: MacPorts-1-1.6.0 postflight shell recognition failure --------------------------------------+------------------------------------- Reporter: nick.colclasure@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: base | Version: 1.6.0 Resolution: fixed | Keywords: MacPorts-1-1.6.0 shell recognition postflight Port: | --------------------------------------+------------------------------------- Changes (by jmr@…): * milestone: MacPorts Future => Old description:
{{{ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7254 100 7254 0 0 8476 0 --:--:-- --:--:-- --:--:-- 19737 The MacPorts Project, postflight script version 1.6.1: checking the shell environment for user "root". '''Unknown shell (sh)! Please set your MacPorts compatible environment manually.''' Synchronizing the MacPorts installation with the project's rsync server... Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/ receiving file list ... done
sent 32 bytes received 323800 bytes 23987.56 bytes/sec total size is 18646973 speedup is 57.58
MacPorts base version 1.600 installed receiving file list ... done
sent 32 bytes received 6472 bytes 1858.29 bytes/sec total size is 3962384 speedup is 609.22
Downloaded MacPorts base version 1.600
The MacPorts installation is not outdated and so was not updated selfupdate done! Successful! }}}
I ran basename $SHELL and it returned bash.
New description: {{{ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7254 100 7254 0 0 8476 0 --:--:-- --:--:-- --:--:-- 19737 The MacPorts Project, postflight script version 1.6.1: checking the shell environment for user "root". '''Unknown shell (sh)! Please set your MacPorts compatible environment manually.''' Synchronizing the MacPorts installation with the project's rsync server... Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/ receiving file list ... done sent 32 bytes received 323800 bytes 23987.56 bytes/sec total size is 18646973 speedup is 57.58 MacPorts base version 1.600 installed receiving file list ... done sent 32 bytes received 6472 bytes 1858.29 bytes/sec total size is 3962384 speedup is 609.22 Downloaded MacPorts base version 1.600 The MacPorts installation is not outdated and so was not updated selfupdate done! Successful! }}} I ran basename $SHELL and it returned bash. -- -- Ticket URL: <http://trac.macports.org/ticket/16199#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts