[MacPorts] #13742: Installation with the package did not run the postflight script
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Keywords: installation postflight | -------------------------------------+-------------------------------------- I installed MacPorts on my iMac with leopard. I downloaded the package MacPorts-1.6.0.pkg and installed. The installation created the directories under /opt/local, but no .profile was create in my homedir. Therefore the port command did not work in a shell. I had to create a .profile myself. After that MacPorts worked fine. The manual creation of a .profile file should not be necessary. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Changes (by jmpp@macports.org): * owner: macports-tickets@lists.macosforge.org => jmpp@macports.org Comment: Can you please provide me with some information about your shell environment? * are you using bash? If so, * what does your `/etc/profile` file look like? * how about `/etc/bashrc`? * or, do you have a `~/.bash_profile` file by any chance? What are its contents? The `postflight` script is only supposed to tweak the user environment under a limited set of conditions in order to intervene as least as possible. And though I believe it has been successful at that, I have heard a couple of times already that it has failed to add our settings to the environment when encountered with an allegedly legitimate scenario. I'd like to gather as much information about this failure as possible, in order to try and spot a pattern. Thanks for your help! -jmpp -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:1> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by mellonjasper@gmail.com): I'm working on a new iMac with a clean install of leopard (I received it with tiger and a leopard upgrade disc). All prerequisites are installed (X11, Xcode 3.0 and X11 sdk). I use bash. I have not changed /etc/profile and /etc/bashrc but have attached them nevertheless. At the time of installation, I didn't have a .profile nor a .bash_profile in my user dir. The hidden files in my home dir are the following: .CFUserTextEncoding .DS_Store .Trash .Xcode .bash_history .cups .eclipse_keyring .lesshst .macports .netbeans .profile .ssh .subversion .viminfo -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:2> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by mellonjasper@gmail.com): I have added the ~/.profile file I have manually created. Have I missed something I need for successfully working with MacPorts (for now I have not included anything that is used for X11)? If this is enough, my direct problem is solved. However I will try to help solving this, so don't hesitate to ask more questions. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:3> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by pburleson@gmail.com): I just reported this with #13762 . I didn't see this report first. I swear I searched before and didn't see this reported. You can close #13762, but please add me to the CC of this. I have had this happen on two machines with clean Leopard installs upgraded to 10.5.1, a Core2Duo MacBook and a 20" Core2Duo iMac. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:4> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by carsten.sinz@gmail.com): I had the same problem when I tried to install MacPorts 1.6.0. It seems to be caused (at least in my case) by the fact that the installer tries to make an rsync-connection. This might fail when you are using an HTTP-proxy. (Therefore I think the postflight script should be modified to take this into account). For me the installation worked fine, when I tried it from another location without an HTTP-proxy. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:5> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by mellonjasper@gmail.com): I am not behind an HTTP-proxy, so that is not the problem in my case. A "sudo port selfupdate" works without problems. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:6> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Changes (by jmpp@macports.org): * cc: pburleson@gmail.com (added) -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:7> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by jmpp@macports.org): I am unable to reproduce this bug: when I run the script on a virgin account with no MacPorts settings, they are properly added to the `~/.profile` file (which is properly created if it doesn't already exist). Any more info anyone in this ticket can provide me with? If you can, please create a virgin account (if on Leopard, the Guest account might suffice) and confirm that it doesn't have any MacPorts Terminal settings through the following: * the output of the `env` command; * the output of the `printenv PATH`, `printenv MANPATH` and `printenv DISPLAY` commands; Once that's established, try running the postflight script manually (which you can download from [source:/branches/release_1_6/base/portmgr/dmg/postflight here]) and tell me if there are any errors; or, on the other hand, if the settings are properly added. Setting `set -x` (debugging mode for bash) might help. If pasting any terminal output, please enclose it within the `{{{ }}}` wrappers for proper Trac formatting (read WikiFormatting for more info). Lastly, any info that might have been output to the `/var/log/install` file about the failed run of the `postfligth` script might also help (hint: the log might have been already rotated, so also look into `/var/log/install.log.0.bz2` and possibly higher numbered files). -jmpp PS: Do any of you happen to have the `/etc/paths.d/macports` and `/etc/manpaths.d/macports` files installed? -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:8> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by mellonjasper@gmail.com): I created a new account with no administrator rights and checked the PATH, MANPATH, DISPLAY and env. No MacPorts paths where present. After running the postflight script ran (withoud sudo), a .profile was created. After opening a new shell the PATH, MANPATH, DISPLAY and env where correct (several /opt/ paths added). The output of postflight contained some error, but they where al related to not running as administrator. The install.log indicates a problem: {{{ Dec 28 22:58:36 mac-name Installer[66086]: run postflight script for MacPorts-1.6.0 Dec 28 22:58:36 mac-name Installer[66086]: Localized installer script postflight found in the MacPorts-1.6.0 package. Using compatibility mode. Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Unknown shell! Please set your MacPorts compatible environment manually. Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Dec 28 22:58:36: --- last message repeated 1 time --- Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Checking the shell environment for user "USERNAM"... Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Dec 28 22:58:36: --- last message repeated 2 times --- Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: /Users/jester/Downloads/MacPorts-1.6.0.pkg/Contents/Resources/English.lproj/postflight: line 71: /Users/jester/.: Is a directory Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: /Users/jester/Downloads/MacPorts-1.6.0.pkg/Contents/Resources/English.lproj/postflight: line 96: /Users/jester/.: Is a directory Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Your shell already has the right MANPATH environment variable for use with MacPorts! Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Your shell already has the right DISPLAY environment variable for use with MacPorts! Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Dec 28 22:58:36: --- last message repeated 1 time --- Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Synchronizing the MacPorts installation with the project's rsync server... Dec 28 22:58:36 mac-name runner[66089]: postflight[66099]: Dec 28 22:58:37: --- last message repeated 1 time --- Dec 28 22:58:37 mac-name runner[66089]: postflight[66099]: Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/ }}} The /etc/paths.d and /etc/manpaths.d/only contain an X11 file. I hope this helps. Jasper. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:9> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by matrixm@gmail.com): I just installed macports onto Leopard today. This was a brand new machine. In fact, it was so new, that the only thing I'd done before installing macports was to go through the apple pre-install that configured and set the machine up for the first time, install 10.5.1 update, installed XCode tools off the DVD that came with the machine, then download and install macports via the dmg image located at http://svn.macports.org/repository/macports/downloads/MacPorts-1.6.0/MacPort... After completeing the install, I found the X11.app and opened it up, and began to search for ports. The first thing I got was a file not found error regarding 'port.' So I checked my path, and no /opt directories in any PATH variable. I discovered that this default user did not have a .profile, .bash_profile, nor a .bashrc file in the home directory. I'm not sure if this had any impact on the setting of the PATH/MANPATH variables or not though. I grep'd the install log for anythin referring to path, and the only line that was mentioned during the postflight portion of the log file was that the MANPATH was already configured correctly for macports, even though it wasn't. I did discover that the /etc/paths and /etc/manpaths files existed (which I hadn't known about until I read through the /etc/profile script). I added /opt/local/bin and /opt/local/sbin to the /etc/paths file, and then put /opt/local/man in /etc/manpaths. I'm not sure how the /etc/paths.d and /etc/manpaths.d files are loaded, but would it be possible to have the postflight script add the macports directories to either /etc/paths and /etc/manpaths or do something with a /etc/paths.d/macports and /etc/manpaths.d/macports file somehow to include those directories? I'm not sure of the process, but could I be added as a CC for this ticket? -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:10> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by jmpp@macports.org): Replying to [comment:9 mellonjasper@gmail.com]: The errors in the log file are similar to a group I recently [http://lists.macosforge.org/pipermail/macports- users/2008-January/008215.html dealt with] on the MacPorts-Users mailing list, so I'm inclined to believe this particular case is already corrected. Anyhow, can you still tell me the output of the `basename $SHELL` command? Thanks! -jmpp -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:11> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by jmpp@macports.org): Replying to [comment:10 matrixm@gmail.com]: Please tell me the relevant errors that are shown in `/var/log/installer` so that I can have an idea of what went wrong in your case. As for your other comments, I already [http://lists.macosforge.org/pipermail/macports- users/2008-January/008206.html dealt with] most of them on the MacPorts- Users mailing list, so lets please try to keep this ticket clean for the debugging of the `postflight` script, thanks! -jmpp -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:12> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by rui@marinheiro.org): I'm having the exact same problem. No .profile shows up after installing Macports on Leopard, using MacPorts-1.6.0.pkg. Before reading this Ticket, I have tried to reinstall Macport again, and no luck. Replying directly to your request:
Anyhow, can you still tell me the output of the `basename $SHELL` command? I also obtained the expected:[[BR]] {{{ bash }}}
In the /var/log/installer.log I could find the following output:[[BR]] {{{ Jan 25 02:24:48 Maresia Installer[148]: Finishing receipt Jan 25 02:24:48 Maresia Installer[148]: run postflight script for MacPorts-1.6.0 Jan 25 02:24:48 Maresia Installer[148]: Localized installer script postflight found in the MacPorts-1.6.0 package. Using compatibility mode. Jan 25 02:24:49 Maresia runner[152]: postflight[160]: Unknown shell! Please set your MacPorts compatible environment manually. Jan 25 02:24:49 Maresia runner[152]: postflight[160]: Jan 25 02:24:49: --- last message repeated 1 time --- }}} I don't know if this output is expected, but for some reason the script can't determine which shell is being used. Is there any thing else I can do to fix this problem? Rui -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:13> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.6.0 Resolution: | Keywords: installation postflight -------------------------------------+-------------------------------------- Comment (by rui@marinheiro.org): I have just added my last install.log.0.bz2 file. Maybe you can find there something that can help. Rui -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13742#comment:14> MacPorts </projects/macports> Ports system for Mac OS
#13742: Installation with the package did not run the postflight script -------------------------------------+-------------------------------------- Reporter: mellonjasper@gmail.com | Owner: jmpp@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@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
participants (1)
-
MacPorts