Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#42339 closed defect (duplicate)

Extract fails when MacPorts prefix is a symlink

Reported by: daniel.miau@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.2.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), jul_bsd@…
Port:

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

I was not able to install ghostscript (using the command sudo port install ghostscript) on two Macs (both OSX 10.9.1). I checked the error log and find the following line strange (please also see the attached error log):

:debug:extract Executing command line:  cd "/opt/local/var/macports/build/_private_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_print_ghostscript/ghostscript/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/ghostscript/ghostscript-9.10.tar.gz' | /usr/bin/tar -xf -

The -dc option of gzip seems to decompress the package to standard output as opposed to the file system, is it something expected?

I have tried to manually decompressed the package located at '/opt/local/var/macports/distfiles/ghostscript/ghostscript-9.10.tar.gz' and the package seems to be ok.

The sudo command gives the permission to write to the directory '/opt/local/var/macports/build/_private_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_print_ghostscript/ghostscript/work' too.

Attachments (2)

main.log (552.7 KB) - added by daniel.miau@… 11 years ago.
main.2.log (856.9 KB) - added by daniel.miau@… 11 years ago.

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by daniel.miau@…

Attachment: main.log added

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

Cc: takanori@… added
Description: modified (diff)

Yes, MacPorts is designed to decompress archives to stdout, which is then fed via a pipe (|) to tar which extracts the files. This is the same for most ports.

Something unique is happening on your system that's causing the problem you're experiencing. I have no problem extracting ghostscript on Mavericks, and the port doesn't do anything special at extract time.

Do other ports exhibit the same failure for you or just ghostscript?

The log you attached is not from a clean attempt; as it says at the very top of our ticket filing instructions, that could very well cause problems. Clean ghostscript and try again.

If that doesn't help, check that the /usr/bin/tar and /usr/bin/gzip programs function correctly.

Changed 11 years ago by daniel.miau@…

Attachment: main.2.log added

comment:2 Changed 11 years ago by daniel.miau@…

Thanks for helping look into this!

Yes, I did try sudo port clean ghostscript and other things before filing this ticket. Sorry I didn't attach the log after a clean start (attached another log after clean). tar and gzip seem function normally.

I manually changed the dir and tried to execute the problematic line "sudo /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/ghostscript/ghostscript-9.10.tar.gz' | /usr/bin/tar -xf -" but received the following message "Can't create 'ghostscript-9.10'", but I was able to manually create a dir, e.g., sudo mkdir temp.

Not sure what when wrong. Anything I can to do help investigate?

comment:3 in reply to:  description Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; takanori@… removed
Component: portsbase
Port: ghostscript removed
Summary: Failed to install ghostscriptExtract fails when MacPorts prefix is a symlink

Replying to daniel.miau@…:

:debug:extract Executing command line:  cd "/opt/local/var/macports/build/_private_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_print_ghostscript/ghostscript/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/ghostscript/ghostscript-9.10.tar.gz' | /usr/bin/tar -xf -

I neglected to notice originally that this line shows that MacPorts is in /private/opt/local instead of just /opt/local, presumably with /opt being a symlink to /private/opt. This could happen if you installed an ancient version of Cisco VPN. We had a FAQ entry for this problem, but removed it from the FAQ over 7 years ago because at that time it was already old news (Cisco had already fixed the problem in newer versions of their installer), but you can follow those instructions to set things right to put MacPorts back into /opt proper:

wiki:FAQ?version=1#IjustinstalledMacPorts1.2fromthe.dmgandIseemtohavelostallmyinstalledportsakaCiscoVPNatemyMacPorts

The reason this situation is now an actual problem is that recent versions of MacPorts have a bug when the configured prefix is a symlink. I can't find the ticket about that at the moment. It may already have been fixed in trunk (which will become MacPorts 2.3).

comment:4 Changed 11 years ago by neverpanic (Clemens Lang)

Yes, this will be fixed in 2.3. The ticket is #39850.

comment:5 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: newclosed

comment:6 Changed 11 years ago by jul_bsd@…

Cc: jul_bsd@… added

Cc Me!

Note: See TracTickets for help on using tickets.