-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative patch to support REP-143 #365
Conversation
There does not appear to be an InvalidSourceFile exception defined anywhere in rosdep...
LGTM |
@@ -319,7 +320,7 @@ def download_default_sources_list(url=DEFAULT_SOURCES_LIST_URL): | |||
data = f.read().decode() | |||
f.close() | |||
if not data: | |||
raise InvalidSourceFile("cannot download defaults file: empty contents") | |||
raise RuntimeError("cannot download defaults file: empty contents") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't exist, it would be better maybe to create the exception, but this only slightly better than the current behavior which is NameError
.
+1 |
I've run into an issue testing this branch inside catkin_support module. I have a test rosdistro here with a dual entry: https://raw.githubusercontent.com/tfoote/rosdistro/test_deployment/index.yaml It passes fine on the command line.
|
Yeah, so contrary to the comments in the rosdep source code that file is read again, but I'm not sure it actually being used. Either way I'll have to find a way to work around this real quick. |
Ok, I pushed a new commit that joins the urls by |
So, now the cache index looks like this:
|
+1 on merging this and releasing rosdep 0.11.0. |
Alternative patch to support REP-143
This patch just changes the hashing function to support lists of strings rather than just a single string. This allows the cache to be hashed on a list of urls rather than a single one.
The list of urls is also passed to the internal
self.url
in the DataSource object, but this isn't a problem in any code paths which use the rosdistro files as a source from what I can tell. Theself.url
seems to only be used for debug output, including theindex
file at the root of the cache which lists the files that make up the cache. In this case you get something like this:Which I think is ok. I can optionally change it so that for the
self.url
it just takes the first url, but my opinion is that this patch is good as it stands.