New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #14809 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

MacPorts-1.6.0 installer postflight script

Reported by: lailoken3@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.8.0
Component: base Version: 1.6.0
Keywords: installer postflight Cc: raimue@…, ryandesign@…, blb@…
Port:

Description

this is Leopard 10.5.2

1) line 36 assumes that the install is to the boot drive,

it does not take the selected installation drive into account

2) if there is no .profile &c

the script does not recognize the shell, an appropriate error message would be helpful.

3) saying to set up the environment manually isn't meaningful to a lot of people.

Change History

  Changed 4 years ago by jmr@…

The failure when there is no .profile is fixed in the updated script that will ship in  1.6.1. Could you please check whether the other points apply to the  trunk version?

follow-up: ↓ 3   Changed 4 years ago by raimue@…

postflight in trunk is still broken. It was fixed on release_1_6 but not merged back into trunk.

in reply to: ↑ 2   Changed 3 years ago by ryandesign@…

  • cc raimue@… added

Replying to raimue@…:

postflight in trunk is still broken. It was fixed on release_1_6 but not merged back into trunk.

Rainer copied postflight from the 1.6 branch to trunk in r38037.

in reply to: ↑ description   Changed 3 years ago by ryandesign@…

  • cc ryandesign@… added

Replying to lailoken3@…:

1) line 36 assumes that the install is to the boot drive, it does not take the selected installation drive into account

Line 36 of postflight in 1.6.0 is:

BINPATH=$PREFIX/bin

That is correct, since that's what we want to write into the .profile. The part that may appear incorrect is where we later use that to set the path to run port selfupdate:

export PATH=$BINPATH:$PATH
port -v selfupdate || {
    echo "An attempt to synchronize your recent MacPorts installation with the project's rsync server failed!"
    echo "Please run 'port -d selfupdate' manually to find out the cause of the error."
    exit 1
}

This has changed substantially in the postflight that's now in trunk. Now we have a function update_macports which does this:

    if ! ${BINPATH}/port -v selfupdate; then 
        echo "An attempt to synchronize your recent MacPorts installation with the project's rsync server failed!"
        echo "Please run 'sudo port -d selfupdate' manually to find out the cause of the error."
    else
        echo "Successful!"
    fi

This would be just as unsuccessful if you're not installing MacPorts on the boot drive.

Even if we change it at this point to prepend "$2" to ${BINPATH} to use the selected install drive instead of the boot drive, the selfupdate wouldn't work. There's no abstraction in port that would let it know to prepend some prefix to its own during install time. Even if there were, the selfupdate may download and compile a new version of MacPorts. If so, we would want that compilation to run on the destination operating system.

So in conclusion, the simplest correct thing to do at this point would be to prevent the disk image installer from installing on anything other than the boot drive.

  Changed 3 years ago by ryandesign@…

  • milestone changed from MacPorts base bugs to MacPorts 1.7.0

  Changed 3 years ago by blb@…

  • cc blb@… added
  • milestone changed from MacPorts 1.7.0 to MacPorts 1.8.0

Unless done manually, this will require some work to package1.0/portpkg.tcl as it currently just sets various values (proc write_info_plist) in the package's Info.plist (IFPkgFlagRootVolumeOnly being the one we want set to true). The best method being to allow some kind of pkg.flag RootVolumeOnly=true in the Portfile, or something to that effect.

  Changed 3 years ago by jmr@…

  • status changed from new to closed
  • resolution set to fixed

Changed IFPkgFlagRootVolumeOnly to always be true in r53250. I think the rest of this has been addressed now.

Note: See TracTickets for help on using tickets.