-
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
Arch Linux: Properly invoke pacman with the correct flags. #472
Arch Linux: Properly invoke pacman with the correct flags. #472
Conversation
eaa1b56
to
529d46f
Compare
I forgot:
I also folded it all into a single pacman invocation, although I'm not sure what the reasoning was for putting it in multiple invocations. A single invocation has the advantage of possibly reducing the number of times hooks are invoked. |
It probably made multiple calls to pacman because that way you can more easily narrow down which rosdep rule was causing which pacman package to get installed. I don't know if that's necessary to preserve or not. |
It's still the same call to |
You don't call rosdep for each rosdep rule you want to resolve, you call it on a package (which has zero to many deps) or many packages. So sometimes it's not clear why rosdep tried to install some particular package. It's the mapping from the rosdep rule to the pacman command I'm talking about, not whether or not pacman is clear which pacman package is getting installed. Most of the time the rosdep rules mapping are obvious, but not always. I'm not 100% certain it helps, it's just my guess as to why it used to call it many times. I don't see any problem with making one call instead. |
|
||
if not interactive: command.append('--noconfirm') | ||
if not reinstall: command.append('--needed') | ||
if quiet: command.append('-q') |
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.
nitpick: this repository's files do not follow PEP8, but with additions we can try to follow it where it is not at odds with the files existing style. This isn't PEP8, please put the contents of the if block on new lines.
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.
Fair enough, will do
Other than a small comment, lgtm. |
529d46f
to
d724f04
Compare
Adjusted for code style. Also removed |
Thanks! |
Thanks for the quick merge :) |
This PR fixes the invocation of pacman.
It addresses the following issues:
pacman -Sy
, which can perform a partial upgrade. This is very much not what you should do on Arch Linux [1].interactive
argument was ignored, meaning pacman would always ask for confirmation and rosdep fails when invoked in non-interactive context.-q
ifquiet == true
, although I believe this currently does not affect the output ofpacman -S
.[1] https://wiki.archlinux.org/index.php?title=System_maintenance&redirect=no#Partial_upgrades_are_unsupported