Opened 14 years ago

Last modified 13 years ago

#26623 closed defect

couchdb @1.0.1 may corrupt launchctl files for "re-install" — at Version 1

Reported by: llyodall@… Owned by: jwa@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc:
Port: couchdb

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

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 Computer//DTD PLIST 1.0//EN"
"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

Change History (1)

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

Description: modified (diff)
Owner: changed from macports-tickets@… to jwa@…
Port: couchdb added

Please remember to use WikiFormatting and to fill in the Port and Cc fields.

AFAIK the install procedure is plenty proactive about creating all needed directories. Not sure yet what went wrong in your case.

Note: See TracTickets for help on using tickets.