Merge lp://qastaging/~ken-vandine/desktopcouch/desktopcouch-lsof-karmic into lp://qastaging/desktopcouch

Proposed by Ken VanDine
Status: Superseded
Proposed branch: lp://qastaging/~ken-vandine/desktopcouch/desktopcouch-lsof-karmic
Merge into: lp://qastaging/desktopcouch
Diff against target: None lines
To merge this branch: bzr merge lp://qastaging/~ken-vandine/desktopcouch/desktopcouch-lsof-karmic
Reviewer Review Type Date Requested Status
Ken VanDine Needs Resubmitting
Tim Cole (community) Needs Information
Review via email: mp+9150@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2009-07-23.

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Change to handle the output of lsof in karmic, perhaps it is different from jaunty

Revision history for this message
Tim Cole (tcole) wrote :

Isn't there another branch in somewhere to get rid of the use of lsof?

review: Needs Information
Revision history for this message
Ken VanDine (ken-vandine) wrote :

> Isn't there another branch in somewhere to get rid of the use of lsof?

Yeah, you had a branch that dropped it from advertisePort.py, which I had missed. That is merged, but lsof is used in the start script too. I am currently working on revising it a bit to use a common method for checking the port (using your code).

Revision history for this message
Ken VanDine (ken-vandine) wrote :

I updated my branch to include some refactoring adding a find_pid and find_port method

16. By Ken VanDine

Refactor a bit to move port and pid lookups to a common method

17. By Ken VanDine

Added start and stop script

Revision history for this message
Ken VanDine (ken-vandine) :
review: Needs Resubmitting
18. By Ken VanDine

Don't set shell=True for subprocess, it causes strange results and isn't needed

19. By Ken VanDine

moved the commit about lsof vs. /proc digging to the find_port method

20. By Ken VanDine

* reorganized a little to work better as an installed service
* added org.desktopcouch.CouchDB.service for dbus activation

21. By Ken VanDine

moved to data, it only contains the template now

22. By Ken VanDine

Moved pair.py to bin/desktopcouch-pair since this is an executable used on the desktop

23. By Ken VanDine

added packaging

24. By Ken VanDine

Cleanup after some packaging

25. By Ken VanDine

fixed the license

26. By Ken VanDine

* Don't use lsof to determine port, use the find_port method in desktopcouch.
* Don't fall back to the system couch

27. By Ken VanDine

use xdg to find the path for the bookmark template

28. By Ken VanDine

specify the python interpretor

29. By Ken VanDine

specify the copyright

30. By Ken VanDine

added a . to Description

31. By Ken VanDine

Split the package into desktopcouch, python-desktopcouch and python-desktopcouch-records

32. By Ken VanDine

desktop file for the pairing utility

33. By Ken VanDine

added pycompat

34. By Ken VanDine

removed packaging, we will add that to another branch

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utilities/start_local_couchdb.py'
2--- utilities/start_local_couchdb.py 2009-07-21 19:14:38 +0000
3+++ utilities/start_local_couchdb.py 2009-07-22 18:21:51 +0000
4@@ -110,9 +110,9 @@
5 # work out port number the horrible lsof way
6 import time
7 time.sleep(1)
8- lsofcmd = 'lsof -i4TCP@localhost | grep $(couchdb -C %s -p %s -s | ' + \
9+ lsofcmd = 'lsof -i4TCP@localhost | grep $(couchdb -a %s -p %s -s | ' + \
10 'cut -d" " -f7 | cut -d "," -f1) | grep "TCP " | ' + \
11- 'grep LISTEN | awk \'{print $8}\' | cut -d":" -f2'
12+ 'grep LISTEN | awk \'{print $9}\' | cut -d":" -f2'
13 actual_lsof_cmd = lsofcmd % (local_files.FILE_INI, local_files.FILE_PID)
14 stdout, stderr = subprocess.Popen(actual_lsof_cmd, shell=True,
15 stdout=subprocess.PIPE).communicate()

Subscribers

People subscribed via source and target branches