[MacPorts] #13742: Installation with the package did not run the postflight script

MacPorts trac at macosforge.org
Thu Apr 3 12:09:58 PDT 2008


#13742: Installation with the package did not run the postflight script
-------------------------------------+--------------------------------------
  Reporter:  mellonjasper at gmail.com  |       Owner:  jmpp at macports.org      
      Type:  defect                  |      Status:  new                    
  Priority:  Normal                  |   Milestone:  MacPorts base bugs     
 Component:  base                    |     Version:  1.6.0                  
Resolution:                          |    Keywords:  installation postflight
-------------------------------------+--------------------------------------
Comment (by sidney at sidney.com):

 I may have stumbled on a clue and a workaround.

 I am seeing the same problem on a close to fresh install of Leopard. I
 don't know exactly how it was installed because it is a new machine with
 my IT dept's standard Mac image. When I downloaded and ran the Macports
 installer there was no .profile in my home directory and no ports
 environment. I downloaded the postflight script and ran it, forgetting to
 use "sudo". That successfully created a ~/.profile that sets PATH and
 MANPATH and then died trying to run the rsync because it did not have
 permissions.

 When I then used sudo to run the postflight it produced the following
 output with errors:

 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

 Then the rsync got run ok. The end result of running postflight first as
 user then with sudo seemed to be a working installation.

 Running 'sudo su' does end up with an sh prompt, not bash.

 I'm not sure if it is relevant but I have noticed that one change in
 Leopard is that by default sudo is configured to not pass through most
 environment variables from the user environment to root's shell
 environment. So if postflight is checking the environment it will not see
 the right things when run under sudo.

 Actually, how does postflight deal with making changes to the user's
 .profile but having to run as root in order to do the rsync?

-- 
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:15>
MacPorts </projects/macports>
Ports system for Mac OS


More information about the macports-tickets mailing list