Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#48207 closed defect (worksforme)

Yosemite MacPort intallation file does not work

Reported by: avalade@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.3.3
Keywords: Cc: Ionic (Mihai Moldovan)
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I have re-imaged my laptop as per company policy and I am trying to install MacPort. It does not fail per say, but it does not seem to complete properly also. This is the information of my system:

MAC OS: OS X Yosemite version 10.10.3
Xcode: Version 6.3.2
xcode-select version 2339

I also have agreed to the licence for Xcode.

After the installation, the environment variable are not even set. If I open a new terminal, /opt/local/bin is not added to the path.

-bash: port: command not found
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/munki

I am not sure if there's a log file for the installation that I could look at to see is something went wrong.

Change History (10)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase
Description: modified (diff)

I believe the Installer might record a log somewhere? Maybe /var/log/install.log?

In any case, if the only problem is that the installer did not add the MacPorts paths to your PATH environment variable, then you can easily do that step yourself by editing the appropriate shell startup file.

comment:2 Changed 9 years ago by Ionic (Mihai Moldovan)

FWIW, MacPorts changes your ~/.profile to add the path.

bash reads the following files if you are using an interactive login shell: ~/.bash_profile, ~/.bash_login, and ~/.profile. The first one is executed, all others are ignored.

It may well be that you're not using a login shell at all (check your terminal emulator's settings), in which case neither file is being read.

Last edited 9 years ago by Ionic (Mihai Moldovan) (previous) (diff)

comment:3 Changed 9 years ago by Ionic (Mihai Moldovan)

Cc: ionic@… added

comment:4 Changed 9 years ago by Ionic (Mihai Moldovan)

I didn't notice it before, but obviously something else is adding /usr/local/munki to your $PATH. I thus strongly assume that you may have a ~/.bash_profile or ~/.bash_login file around doing that. In that case, you need to add something like this to your ~/.bash_profile:

if [ -f ~/.profile ]; then
     . ~/.profile
fi

Make sure that ~/.profile does not source any other file that might source ~/.bash_profile or your shell will loop indefinitely on startup.

comment:5 Changed 9 years ago by avalade@…

I didn't find any log files that could give me a clue on what went wrong with my installation. /var/log/install.log was not present. I do not use the ~/.bash_profile or ~/.bash_login. My expectation would have been to find something like:

# MacPorts Installer addition on 2013-12-19_at_11:05:21: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.

to be added to my ~/.profile. That what happened to my previous installation (I was using MAC OS Mountain Lion then).

Also, for the default location to get ports, you are using rsync.macports.org/release/tarballs/ports.tar (Got this from sources.conf). It seems that rsync.macports.org/release does not even exit...

I used the workaroud where I added myself the environment variable to my ~/.profile but the selfupdate will fail because of connection timeout. I have contacted my IT service to enquire for any firewall or server setting that would prevent the connection to rsync.macports.org and they are the one who mentionned that rsync.macports.org/release seems to be unavailable. Is it possible that it has change location?

As per documentation, it is my undestanding that the installer for MAC is the one setting the environment variable and doing the fist selfupdate. If either of those fail, should the user at least be notified?

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 9 years ago by Ionic (Mihai Moldovan)

rsync.macports.org/release does exists, but not on the HTTP server.

By default, MacPorts fetches the ports tree and base (source code of itself) via rsync - which uses port 873. If this port is blocked, you will be unable to do the initial sync.

Either let your IT department allow outgoing connections to port 873 or switch over to HTTP fetching. The howto/PortTreeTarball wiki page documents how to do this (for the ports tarball.)

I'll have to look up how to change base fetching to HTTP.

comment:7 Changed 9 years ago by avalade@…

I have sent a request to my IT department to investigate the outgoing connections to port 873. In the meanwhile, I will try the http fetching to see if that will give me what I need.

Thank for the help!

comment:8 Changed 9 years ago by Ionic (Mihai Moldovan)

We seem to have no way to switch base fetching to HTTPS.

That means two things:

  1. you'll have to use "sync" instead of "selfupdate" (or else selfupdate will hang and in the end not work at all because it can't fetch a new base tarball via rsync)
  2. you'll need to update MacPorts manually by running the installer again once a new version is released

Luckily, base isn't updated very often, so it's not a big hurdle.

I agree that the installer shouldn't bail out from creating a ~/.profile file when selfupdate fails, though...

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 in reply to:  8 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: newclosed

Replying to ionic@…:

I agree that the installer shouldn't bail out from creating a ~/.profile file when selfupdate fails, though...

It doesn't. It first tries to modify the shell startup file; it prints (to the log) a message to say whether that worked or failed. Then, in either case, it runs selfupdate. Here is the script:

browser:trunk/base/portmgr/dmg/postflight.in

If you see anything wrong, please let us know.

comment:10 Changed 9 years ago by Ionic (Mihai Moldovan)

This script only creates ~/.profile or the like if the user's default shell is bash or tcsh. Other shells (like zsh) are ignored. Maybe that's the problem here?

Note: See TracTickets for help on using tickets.