#11940 closed defect (fixed)
p7zip: 7za gives "No such file or directory" error
Reported by: | macfreek (Freek Dijkstra) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | macfreek (Freek Dijkstra), boeyms@…, pipping@… | |
Port: |
Description
Hi,
I just installed p7zip, with:
- sudo port sync
- sudo port -v install p7zip
then, using 7za gives an error:
% 7za
/opt/local/bin/7za: line 2: /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.macports.org_dpupdate_dports_archivers_p7zip/work/destroot/opt/local/lib/p7zip/7za: No such file or directory
Regression:
It seems that 7za is not actually an application, but a short shell script installed by install.sh, which is called by "make install" by macports. There is actually a working 7za application made and installed at /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.macports.org_dpupdate_dports_archivers_p7zip/work/destroot/opt/local/lib/p7zip/7za, but this whole folder is removed during the "cleaning" stage.
Technically, install.sh creates a shell script pointing to ${DEST_SHARE}/7za. ${DEST_SHARE} is set to this value by the makefile (using the 3rd argument when calling install.sh). It is derived by the makefile from ${DEST_HOME}, which is set in the Portfile to DEST_HOME=${destroot}${prefix}.
I think the easiest solution is to change the following line in the Portfile:
destroot.destdir DEST_HOME=${destroot}${prefix}
to
destroot.destdir DEST_HOME=${prefix} DEST_DIR=${destroot}
<sarcasm>However, all this mess wouldn't be needed if the upstream provider wouldn't have chosen for the retarded way to create a shell script for 7za on the fly in install.sh, but simply copied the application 7za to that place right away. Perhaps you can fix install.sh, and offer that to the upstream providers. Perhaps they learn how UNIX is supposed to work. ;-)</sarcasm>
Attachments (2)
Change History (5)
Changed 18 years ago by macfreek (Freek Dijkstra)
Attachment: | p7zip.diff added |
---|
Changed 18 years ago by macfreek (Freek Dijkstra)
Installation log with error (Added in case you can't replicate the bug)
comment:1 Changed 18 years ago by pipping@…
Milestone: | → Port Bugs |
---|
comment:2 Changed 17 years ago by boeyms@…
Cc: | software@… boeyms@… pipping@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This has been fixed (at least as of r25665, but probably earlier than that).
Diff with fix for Portfile (note: you also want to upgrade the version number for it to have any effect)