Opened 14 years ago
Last modified 13 years ago
#26623 closed defect
couchdb @1.0.1 may corrupt launchctl files for "re-install" — at Initial Version
Reported by: | llyodall@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.1 |
Keywords: | Cc: | ||
Port: | couchdb |
Description
This is bad because in general I have been able to uninstall and install other MacPort efficiently and effectively. I didn't expect my /Library/LaunchDaemons directory to completely disappear on the Uninstall of couchdb @1.0.1
This is what I tried:
shell > sudo port install couchdb
shell > sudo port uninstall couchdb
shell > sudo port install couchdb
ERROR strings that print on "re-install" ...... Error: reinplace: couldn't read file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_couchdb/work/destroot/opt/local/Library/LaunchDaemons/org.apache.couchdb.plist": no such file or directory .....
WORKAROUND
shell > sudo mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_couchdb/work/destroot/opt/local/Library/LaunchDaemons
shell > sudo touch /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_couchdb/work/destroot/opt/local/Library/LaunchDaemons/org.apache.couchdb.plist
shell > sudo port install couchdb
/* this will succeed, however DO NOT run the launchctl yet /
NOTE: the org.apache.couchdb.plist is created but there is no data. We need to add the PLIST data for launchctl.
shell > sudo vi /Library/LaunchDaemons/org.apache.couchdb.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-Apple ComputerDTD PLIST 1.0EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>
<key>Label</key> <string>org.apache.couchdb</string> <key>EnvironmentVariables</key> <dict>
<key>HOME</key> <string>~</string>
</dict> <key>ProgramArguments</key> <array>
<string>/opt/local/bin/couchdb</string>
</array> <key>UserName</key> <string>couchdb</string> <key>StandardOutPath</key> <string>/dev/null</string> <key>StandardErrorPath</key> <string>/dev/null</string> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/>
</dict> </plist>
NOTE: Now execute the launchtctl command from the message of the couchdb successful install.
shell > sudo launchctl load -w /Library/LaunchDaemons/org.apache.couchdb.plist
shell > curl http://127.0.0.1:5984
{"couchdb":"Welcome","version":"1.0.1"}
Perhaps the install procedure needs to be a little bit proactive in creating directories if they do not exist.
{ :-) (happy (coding)) }
Jonathan