A new user interface for you! Read more...

File catkin-0.5.63-remove-marker-check.patch of Package catkin

From 484dfcf39525c7967aea029f6e61b02d8dd58a61 Mon Sep 17 00:00:00 2001
From: Spencer Jackson <spencerandrewjackson@yahoo.com>
Date: Mon, 21 Jan 2013 10:17:11 -0500
Subject: [PATCH] Remove check for .catkin marker in /usr

---
 cmake/all.cmake                            |    2 +-
 cmake/list_insert_in_workspace_order.cmake |    8 +++++---
 cmake/toplevel.cmake                       |    2 +-
 python/catkin/workspace.py                 |   15 +++++++++------
 4 files changed, 16 insertions(+), 11 deletions(-)

diff --git catkin/cmake/all.cmake catkin.new/cmake/all.cmake
index ad6bbbd..b7e29ac 100644
--- catkin/cmake/all.cmake
+++ catkin.new/cmake/all.cmake
@@ -46,7 +46,7 @@ endif()
 # list of unique catkin workspaces based on CMAKE_PREFIX_PATH
 set(CATKIN_WORKSPACES "")
 foreach(path ${CMAKE_PREFIX_PATH})
-  if(EXISTS "${path}/.catkin")
+  if(EXISTS "${path}/.catkin" OR ${path} MATCHES "/usr")
     list(FIND CATKIN_WORKSPACES ${path} _index)
     if(_index EQUAL -1)
       list(APPEND CATKIN_WORKSPACES ${path})

diff --git catkin/cmake/list_insert_in_workspace_order.cmake catkin.new/cmake/list_insert_in_workspace_order.cmake
index 57ade4a..c9cf959 100644
--- catkin/cmake/list_insert_in_workspace_order.cmake
+++ catkin.new/cmake/list_insert_in_workspace_order.cmake
@@ -4,12 +4,14 @@
 set(CATKIN_ORDERED_SPACES "")
 foreach(_space ${CATKIN_DEVEL_PREFIX} ${CATKIN_WORKSPACES})
   list(APPEND CATKIN_ORDERED_SPACES ${_space})
-  if(NOT EXISTS "${_space}/.catkin")
+  if(NOT EXISTS "${_space}/.catkin" AND NOT ${_space} MATCHES "/usr")
     message(FATAL_ERROR "The path '${_space}' is in CATKIN_WORKSPACES but does not have a .catkin file")
   endif()
   # prepend to existing list of sourcespaces
-  file(READ "${_space}/.catkin" _sourcespaces)
-  list(APPEND CATKIN_ORDERED_SPACES ${_sourcespaces})
+  if(NOT ${_space} MATCHES "/usr")
+    file(READ "${_space}/.catkin" _sourcespaces)
+    list(APPEND CATKIN_ORDERED_SPACES ${_sourcespaces})
+  endif()
 endforeach()
 
 debug_message(10 "CATKIN_ORDERED_SPACES ${CATKIN_ORDERED_SPACES}")
diff --git catkin/cmake/toplevel.cmake catkin.new/cmake/toplevel.cmake
index 8929174..524c9fb 100644
--- catkin/cmake/toplevel.cmake
+++ catkin.new/cmake/toplevel.cmake
@@ -27,7 +27,7 @@ else()
   # list of catkin workspaces
   set(catkin_search_path "")
   foreach(path ${CMAKE_PREFIX_PATH})
-    if(EXISTS "${path}/.catkin")
+    if(EXISTS "${path}/.catkin" OR ${path} MATCHES "/usr")
       list(FIND catkin_search_path ${path} _index)
       if(_index EQUAL -1)
         list(APPEND catkin_search_path ${path})
diff --git a/python/catkin/workspace.py b/python/catkin/workspace.py
index 7359894..8f24005 100644
--- catkin/python/catkin/workspace.py
+++ catkin.new/python/catkin/workspace.py
@@ -46,7 +46,7 @@ def get_workspaces():
     env_name = 'CMAKE_PREFIX_PATH'
     paths = [path for path in os.environ.get(env_name, '').split(os.pathsep) if path]
     # remove non-workspace paths
-    workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
+    workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or path == "/usr" or path == "/usr/"]
     return workspaces
 
 
@@ -59,11 +59,14 @@ def get_source_paths(workspace):
     """
     # determine source spaces
     data = ''
-    filename = os.path.join(workspace, CATKIN_MARKER_FILE)
-    if not os.path.isfile(filename):
-        raise ValueError('Not a catkin workspace: "%s", missing file %s' % (workspace, filename))
-    with open(filename) as f:
-        data = f.read()
+    if not (workspace == "/usr" or workspace == "/usr/"):
+      filename = os.path.join(workspace, CATKIN_MARKER_FILE)
+      if not os.path.isfile(filename):
+          raise ValueError('Not a catkin workspace: "%s", missing file %s' % (workspace, filename))
+      with open(filename) as f:
+          data = f.read()
+    else:
+      date = ''
 
     if data == '':
         source_paths = []
-- 
1.7.10.4