Skip to content

Conversation

annaborn
Copy link

@annaborn annaborn commented Feb 8, 2018

there is a bug with deep nesting package name, e.g. gui/osgviz/osgviz. since it took just the last split, the repository path was wrong. /gui-osgviz, but right is /gui-osgviz-osgviz
so this patch allows deeper nesting package name.

@annaborn
Copy link
Author

annaborn commented Feb 8, 2018

@AlexanderFabisch please check the pull request

@malter
Copy link
Member

malter commented Feb 8, 2018

Maybe, we should only print the output in case of an error?
I don't know exactly how autoproj behaves, so I assume the rule for the other commit is always correct?

info["basename"] = info["gitPackage"]
info["gitPackage"] = info["gitPackage"].replace("$PACKAGE_BASENAME",
package.split("/")[-1])
'-'.join((package.split("/")[1:])))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are too many brackets.

Copy link
Author

@annaborn annaborn Mar 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexanderFabisch do you mean readability of the line?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(package.split("/")[1:]) is not necessary.

cmd += ["-b", branch]
execute.do(cmd, cfg)
out, err, r = execute.do(cmd, cfg)
print out
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexanderFabisch it is usefull to have output message for debug purposes. is there any debug mode?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. @malter should know this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexanderFabisch
what is the reason not to have output message for debug purpose?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, this would be the only command that actually prints output to stdout. If we added a debug mode, that would be OK but that should be done in another pull request.

execute.do(cmd, cfg)
out, err, r = execute.do(cmd, cfg)
print out
print err
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @malter suggested:

if err:
    print(err)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants