New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #25174 (closed defect: fixed)

Opened 20 months ago

Last modified 10 months ago

relocation should be disabled in pkgs

Reported by: tonymaher@… Owned by: mcalhoun@…
Priority: Normal Milestone: MacPorts 2.0.0
Component: base Version: 1.8.2
Keywords: snowleopard Cc: emanuel@…, snc@…, layer@…, sk-public@…
Port: python26

Description

Created a python2.6 mdmg on Snow Leopard but when trying to install on another Snow Leopard machine get the following install error

...
...
python26-2.6.5.mpkg/Contents/Packages/zlib-1.2.5.pkg/Contents/Archive.pax.gz (destination=/var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-/PKInstallSandbox-tmp/Root, uid=0)
installer[1345]: PackageKit: Extracting /Volumes/python26-2.6.5-1/python26-2.6.5.mpkg/Contents/Packages/python26-2.6.5.pkg/Contents/Archive.pax.gz (destination=/var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-/PKInstallSandbox-tmp/Root, uid=0)
installer[1345]: Applications/MacPorts/Python 2.6/Python Launcher.app relocated to System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python Launcher.app
installer[1345]: PackageKit: Install Failed: (null)
Error Domain=NSCocoaErrorDomain Code=512 UserInfo=0x1004583c0 "“Python” couldn’t be moved to “Frameworks”." {
    NSDestinationFilePath = "/var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-/PKInstallSandbox-tmp/Root/System/Library/Frameworks/Python.framework";
    NSFilePath = "/var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-/PKInstallSandbox-tmp/Root/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app";
    NSUserStringVariant = Move;
}
installer[1345]: install:didFailWithError:Error Domain=NSCocoaErrorDomain Code=512 UserInfo=0x1004583c0 "“Python” couldn’t be moved to “Frameworks”."
installer[1345]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
installer: Package name is python26
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)

Change History

  Changed 20 months ago by jmr@…

  • owner changed from macports-tickets@… to blb@…
  • cc mcalhoun@… added
  • port set to python26

  Changed 20 months ago by blb@…

installer[1345]: Applications/MacPorts/Python 2.6/Python Launcher.app relocated to System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python Launcher.app

It definitely shouldn't be messing with anything in /System/Library... at all. I think this may have something to do with the IFPkgPathMappings key added to python26's pkg (in the Info.plist) which from what I can tell is done automatically by PackageMaker.

So far no googling has turned up any clues as to how to avoid this.

  Changed 17 months ago by blb@…

  • owner changed from blb@… to mcalhoun@…
  • cc mcalhoun@… removed

  Changed 16 months ago by emanuel@…

  • cc emanuel@… added

Cc Me!

  Changed 14 months ago by snc@…

  • cc snc@… added

Cc Me!

  Changed 14 months ago by snc@…

Is this something we can handle in a post-pkg phase (is there such a thing)?

follow-ups: ↓ 9 ↓ 12   Changed 14 months ago by snc@…

The key to avoiding the issue is to delete the TokenDefinitions file in the packaging phase, before it goes to the disk image:

sudo port mpkg pspp-devel
sudo find /opt/local/var/macports/build -type f -name TokenDefintions.plist -delete
sudo port mdmg pspp-devel

in reply to: ↑ 8 ; follow-up: ↓ 11   Changed 14 months ago by tonymaher@…

Replying to snc@…:

The key to avoiding the issue is to delete the TokenDefinitions file in the packaging phase, before it goes to the disk image:

Thanks - I will try this once I get back to work next week.

cheers
--
tonym

  Changed 12 months ago by layer@…

  • cc layer@… added

Cc Me!

in reply to: ↑ 9   Changed 12 months ago by layer@…

This is a serious bug. Any chance of getting it fixed soon? Thanks.

in reply to: ↑ 8   Changed 11 months ago by tonymaher@…

Replying to snc@…:

The key to avoiding the issue is to delete the TokenDefinitions file in the packaging phase, before it goes to the disk image: {{{ sudo port mpkg pspp-devel sudo find /opt/local/var/macports/build -type f -name TokenDefintions.plist -delete sudo port mdmg pspp-devel }}}

Sorry got distracted and forgot about this. Just tried it and it appeared to work fine. I do not have a spare test machine so I installed the package from the dmg file on the same machine that built the dmg file so it was overwriting already installed packages so not 100% sure it has solved all the problems.

follow-up: ↓ 15   Changed 11 months ago by snc@…

You might try temporarily moving your /opt folder to something else, installing and testing, delete the new /opt, and then restoring the old /opt directory.

From the DMGs I've published this seems to be what is necessary to make it work. I've also not come across an instance where removing the file causes issues. Could we have the removal of the files done automatically in the [m]pkg phase?

  Changed 11 months ago by snc@…

Sorry about being ambiguous; that second paragraph was referencing the TokenDefinitions.plist file.

in reply to: ↑ 13   Changed 11 months ago by tonymaher@…

Replying to snc@…:

You might try temporarily moving your /opt folder to something else, installing and testing, delete the new /opt, and then restoring the old /opt directory. From the DMGs I've published this seems to be what is necessary to make it work. I've also not come across an instance where removing the file causes issues. Could we have the removal of the files done automatically in the [m]pkg phase?

I got a colleague who does not have any macports installed to test the dmg file. The installation went fine but

cd /opt/local/bin
./python2.6
python2.6: execv: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or directory

Having a little look around

ls /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/
Info.plist
ls -lrt /opt/local/Library/Frameworks/Python.framework/Versions/2.6
total 4144
drwxr-xr-x   3 root  wheel      102 Mar  7 14:00 share
-rwxr-xr-x   1 root  wheel  2117472 Mar  7 14:00 Python
drwxr-xr-x   3 root  wheel      102 Mar  7 14:00 lib
drwxr-xr-x   3 root  wheel      102 Mar  7 14:00 include
lrwxr-xr-x   1 root  wheel       17 Mar  7 15:44 Headers -> include/python2.6
drwxr-xr-x  15 root  wheel      510 Mar  7 15:44 bin
drwxr-xr-x   3 root  wheel      102 Mar  7 15:44 Resources

On my build machine with MacPorts

ls -lrt /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/
total 24
-rwxr-xr-x  1 root  wheel  8576  7 Mar 14:00 Python*

So that it does not appear to be the full solution.

  Changed 11 months ago by sk-public@…

  • cc sk-public@… added

Cc Me!

  Changed 10 months ago by jmr@…

  • status changed from new to closed
  • component changed from ports to base
  • summary changed from Python2.6 mpkg fails to install to relocation should be disabled in pkgs
  • milestone set to MacPorts 2.0.0
  • keywords snowleopard added
  • resolution set to fixed
Note: See TracTickets for help on using tickets.