[ros-users] rosdep + macports

Benjamin Charrow bcharrow at seas.upenn.edu
Mon Nov 14 16:51:45 UTC 2011

Hi all.

I've been experiencing a slight problem with rosdep and macports.  Basically, after I run rosdep, a macports process consumes 100% of my CPU and commands I enter in the terminal aren't displayed (stdin is stolen).  I have macports 2.0.3 and am using the ros-1.6.6 tagged version of ros.  Has anyone else had this problem?

Looking at the source, the issue seems to be a check for whether or not macports exists in the constructor of rosdep.installers.MacportsInstaller.  There's a popen command which opens up a macports session, but the process doesn't look like it's being killed.  This would explain why I/O is being stolen, though I'm not sure why my CPU usage spikes.  My quick fix was to just change the command to be "port help" (see diff bellow).

Should I file a bug report?


SVN URL: https://code.ros.org/svn/ros/stacks/ros/tags/ros-1.6.6/tools/rosdep/src/rosdep

bcharrow at amateur:/opt/ros/electric/ros/tools/rosdep/src/rosdep
$ svn diff
Index: installers.py
--- installers.py       (revision 15358)
+++ installers.py       (working copy)
@@ -424,7 +424,7 @@
             packages = packages.split()
-            pop = subprocess.Popen(['port'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+            pop = subprocess.Popen(['port', 'help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         except OSError:
             import traceback; traceback.print_exc()
             print("There was an error running macports, make sure it is installed properly.", file=sys.stderr)

More information about the ros-users mailing list