Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#42038 closed defect (fixed)

tao @6.2.3 Failed to install pre-built binary

Reported by: lockhart (Thomas Lockhart) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: maintainer Cc: ryandesign (Ryan Carsten Schmidt)
Port: tao

Description

afaik this is the first time I've installed TAO from the pre-built MacPorts repo. After uninstalling the previous version(s), the installation of the prebuilt binary failed with a problem deleting a (non-existent) plist script from a (possible) previous installation:

aerie$ sudo port install tao
--->  Computing dependencies for tao
--->  Fetching archive for tao
--->  Attempting to fetch tao-6.2.3_1+server.darwin_12.x86_64.tbz2 from http://packages.macports.org/tao
--->  Attempting to fetch tao-6.2.3_1+server.darwin_12.x86_64.tbz2.rmd160 from http://packages.macports.org/tao
--->  Installing tao @6.2.3_1+server
Error: org.macports.install for port tao returned: /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_tao/tao/work/destroot/opt/local/etc/LaunchDaemons/org.macports.tao_cosnaming/org.macports.tao_cosnaming.plist: no such file or directory
Please see the log file for port tao for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_tao/tao/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port tao failed

Will look at armoring the Portfile to look for files before trying to delete. I would welcome suggestions for "best practices" on this.

Attachments (1)

Portfile.diff (1.5 KB) - added by lockhart (Thomas Lockhart) 10 years ago.
Patch to use "file delete" rather than the similar but broken "delete" command. This one builds and installs without errors.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by lockhart (Thomas Lockhart)

Hmm. The MacPorts docs seem to imply that "delete filename" is about the same as the TCL "file delete -force" command. But the TCL docs say that "file delete filename" on a non-existent file is not considered an error. I see that some Portfiles use "delete filename", others use "file delete filename", and some using "delete filename" guard that line with a check for file existence. Whether the docs are right or not, it seems that running "delete filename" does produce an error, and that this line should be guarded. Or should I rely on the TCL documented behavior of "file delete filename" to do this without needing a guard?

Last edited 10 years ago by lockhart (Thomas Lockhart) (previous) (diff)

comment:2 Changed 10 years ago by lockhart (Thomas Lockhart)

This would seem to be unrelated to code explicitly present in the TAO Portfile. The error is over removal of the .plist file in the installation area, not in the destroot packaging area used in the Portfile itself. Text from the log file is:

version:1
:debug:main Executing org.macports.main (tao)
:debug:unload unload phase started at Mon Jan  6 16:02:33 PST 2014
:debug:unload Executing org.macports.unload (tao)
:error:unload org.macports.unload for port tao returned: Launchd plist /Library/LaunchDaemons/org.macports.tao_cosnaming.plist was not found
:debug:unload Error code: NONE
:debug:unload Backtrace: Launchd plist /Library/LaunchDaemons/org.macports.tao_cosnaming.plist was not found
    while executing
"$procedure $targetname"
:info:unload Warning: targets not executed for tao: org.macports.unload
:notice:unload Please see the log file for port tao for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_tao/tao/main.log

comment:3 Changed 10 years ago by lockhart (Thomas Lockhart)

Oh nevermind. One error message omits the leading parts of the path indicating that the failure is actually in destroot. The script starts working again if I use "file delete" rather than "delete". Is this a regression in MacPorts?

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

If "delete" does not do everything "file delete" does, then "delete" needs to be fixed.

"delete" includes compatibility code for pre-Tiger systems. MacPorts does not build on pre-Tiger systems anymore so that compatibility code could be removed, possibly thereby fixing the issue.

comment:5 in reply to:  4 Changed 10 years ago by lockhart (Thomas Lockhart)

Replying to ryandesign@…:

If "delete" does not do everything "file delete" does, then "delete" needs to be fixed.

"delete" includes compatibility code for pre-Tiger systems. MacPorts does not build on pre-Tiger systems anymore so that compatibility code could be removed, possibly thereby fixing the issue.

This is the first failure I've seen with this issue and I've been building this package very recently in conjunction with recent work on the MacPorts packaging. I do not have other MacPorts which involve a .plist file and a server, so this would be the only example where code has this "delete" or "file delete" as part of pre-installation.

Changing to "file delete" clearly fixes the immediate issue for my machine. I do not have any insight into the history of the MacPorts delete command or why it might be failing just in the last few days on my stable Mountain Lion machine. Will post a patch to use "file delete" and let me know if you would like any additional information.

Will do another full build from source to confirm that "file delete" results in a clean build and then post the patch with a revision bump on the Portfile.

comment:6 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I've confirmed that "file delete" ignores missing files while "delete" considers this an error condition. I can't imagine that difference being intentional, and am fixing it.

comment:7 in reply to:  6 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

I've confirmed that "file delete" ignores missing files while "delete" considers this an error condition. I can't imagine that difference being intentional, and am fixing it.

See #42047.

Changed 10 years ago by lockhart (Thomas Lockhart)

Attachment: Portfile.diff added

Patch to use "file delete" rather than the similar but broken "delete" command. This one builds and installs without errors.

comment:8 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

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

Port: tao added
Note: See TracTickets for help on using tickets.