[Bug 1019] Precedence of ROS packages over regular files when using the import function

Peter Soetens <[email protected]>
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <[email protected]>
http://bugs.orocos.org/show_bug.cgi?id=1019

Peter Soetens <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |[email protected]

--- Comment #1 from Peter Soetens <[email protected]> 2013-01-24 00:46:04 CET ---
(In reply to comment #0)
> Created attachment 851 [details]
> swapping the different checks in RTT::ComponentLoader::import()
> 
> I would like to propose the attached patch for the RTT::ComponentLoader class
> which solves the following problem when using the import(package) operation in
> the deployer: If there is a file in the current working directory with the same
> name as the package I would like to import, the old behaviour was to load that
> file directly and abort with an error without trying the other variants (ROS
> package or installed package).
> 
> A simple example: I have a ROS package named "foo" with some dependencies
> defined in its manifest.xml file and a script bin/foo which launches the
> executable bin/foo-gnulinux with a proper environment and a couple of command
> line options. In the deployer script I call import("foo") to load component
> libraries in package foo and all dependent packages. Without the patch, the
> method call fails with an error message saying that "foo" is not a valid
> component library.
> 
> In theory, the is_regular_file check in ComponentLoader.cpp should be moved
> after the importInstalledPackage() call to also be able to import installed
> packages named "foo" in the example case, but importInstalledPackage() does not
> fail silently, causing ugly error message if you really want to import regular
> files.

I understand, but it's quite an ambiguity to have a package name in your path
and the same file name in your CWD. The same holds for the ROS case imo, but I
agree that the patch is an improvement from a usability perspective.

> 
> By the way, which is the correct git branch to work on for 2.6? master or
> toolchain-2.6?

toolchain-2.6. Once Charles' work is done, I'll merge his work to master, merge
some other queued patches which change the ABI and then release 2.7.

Peter

-- 
Configure bugmail: http://bugs.orocos.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.
-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.