-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Remove broken pacman command for installing packages #9442
Conversation
Can one of the admins verify this patch? |
This bug is also present in 7.x, so it would be awesome if it could be backported as well. |
aab75a2
to
7fa4a1f
Compare
This is a regression from puppetlabs@d23d6db During some cleanup, the command ``` pacman pacman --noconfirm --noprogressbar -Sy ``` got modified to: ``` pacman pacman --noconfirm --noprogressbar -S ``` But this isn't a valid command anymore: ``` root@bastelfreak-nb ~ # pacman --noconfirm --noprogressbar -S error: no targets specified (use -h for help) root@bastelfreak-nb ~ # ``` The idea was to prevent partial system upgrades while installing new packages. To do this, the `sync` option was removed from the installation routine. The correct fix is to remove the command completely.
I think the long command options makes it a bit easier to understand what's actually happening. ``` usage: pacman <operation> [...] operations: pacman {-h --help} pacman {-V --version} pacman {-D --database} <options> <package(s)> pacman {-F --files} [options] [file(s)] pacman {-Q --query} [options] [package(s)] pacman {-R --remove} [options] <package(s)> pacman {-S --sync} [options] [package(s)] pacman {-T --deptest} [options] [package(s)] pacman {-U --upgrade} [options] <file(s)> use 'pacman {-h --help}' with an operation for available options ``` ``` usage: pacman {-Q --query} [options] [package(s)] options: -b, --dbpath <path> set an alternate database location -c, --changelog view the changelog of a package -d, --deps list packages installed as dependencies [filter] -e, --explicit list packages explicitly installed [filter] -g, --groups view all members of a package group -i, --info view package information (-ii for backup files) -k, --check check that package files exist (-kk for file properties) -l, --list list the files owned by the queried package -m, --foreign list installed packages not found in sync db(s) [filter] -n, --native list installed packages only found in sync db(s) [filter] -o, --owns <file> query the package that owns <file> -p, --file <package> query a package file instead of the database -q, --quiet show less information for query and search -r, --root <path> set an alternate installation root -s, --search <regex> search locally-installed packages for matching strings -t, --unrequired list packages not (optionally) required by any package (-tt to ignore optdepends) [filter] -u, --upgrades list outdated packages [filter] -v, --verbose be verbose --arch <arch> set an alternate architecture --cachedir <dir> set an alternate package cache location --color <when> colorize the output --config <path> set an alternate configuration file --confirm always ask for confirmation --debug display debug messages --disable-download-timeout use relaxed timeouts for download --gpgdir <path> set an alternate home directory for GnuPG --hookdir <dir> set an alternate hook location --logfile <path> set an alternate log file --noconfirm do not ask for any confirmation --sysroot operate on a mounted guest system (root-only) ``` ``` usage: pacman {-S --sync} [options] [package(s)] options: -b, --dbpath <path> set an alternate database location -c, --clean remove old packages from cache directory (-cc for all) -d, --nodeps skip dependency version checks (-dd to skip all checks) -g, --groups view all members of a package group (-gg to view all groups and members) -i, --info view package information (-ii for extended information) -l, --list <repo> view a list of packages in a repo -p, --print print the targets instead of performing the operation -q, --quiet show less information for query and search -r, --root <path> set an alternate installation root -s, --search <regex> search remote repositories for matching strings -u, --sysupgrade upgrade installed packages (-uu enables downgrades) -v, --verbose be verbose -w, --downloadonly download packages but do not install/upgrade anything -y, --refresh download fresh package databases from the server (-yy to force a refresh even if up to date) --arch <arch> set an alternate architecture --asdeps install packages as non-explicitly installed --asexplicit install packages as explicitly installed --assume-installed <package=version> add a virtual package to satisfy dependencies --cachedir <dir> set an alternate package cache location --color <when> colorize the output --config <path> set an alternate configuration file --confirm always ask for confirmation --dbonly only modify database entries, not package files --debug display debug messages --disable-download-timeout use relaxed timeouts for download --gpgdir <path> set an alternate home directory for GnuPG --hookdir <dir> set an alternate hook location --ignore <pkg> ignore a package upgrade (can be used more than once) --ignoregroup <grp> ignore a group upgrade (can be used more than once) --logfile <path> set an alternate log file --needed do not reinstall up to date packages --noconfirm do not ask for any confirmation --noprogressbar do not show a progress bar when downloading files --noscriptlet do not execute the install scriptlet if one exists --overwrite <glob> overwrite conflicting files (can be used more than once) --print-format <string> specify how the targets should be printed --sysroot operate on a mounted guest system (root-only) ``` ``` usage: pacman {-R --remove} [options] <package(s)> options: -b, --dbpath <path> set an alternate database location -c, --cascade remove packages and all packages that depend on them -d, --nodeps skip dependency version checks (-dd to skip all checks) -n, --nosave remove configuration files -p, --print print the targets instead of performing the operation -r, --root <path> set an alternate installation root -s, --recursive remove unnecessary dependencies (-ss includes explicitly installed dependencies) -u, --unneeded remove unneeded packages -v, --verbose be verbose --arch <arch> set an alternate architecture --assume-installed <package=version> add a virtual package to satisfy dependencies --cachedir <dir> set an alternate package cache location --color <when> colorize the output --config <path> set an alternate configuration file --confirm always ask for confirmation --dbonly only modify database entries, not package files --debug display debug messages --disable-download-timeout use relaxed timeouts for download --gpgdir <path> set an alternate home directory for GnuPG --hookdir <dir> set an alternate hook location --logfile <path> set an alternate log file --noconfirm do not ask for any confirmation --noprogressbar do not show a progress bar when downloading files --noscriptlet do not execute the install scriptlet if one exists --print-format <string> specify how the targets should be printed --sysroot operate on a mounted guest system (root-only) ```
Thanks @bastelfreak! So this has been broken for 4+ years and no one noticed? |
I was surprised as well. I guess installing local files + Arch Linux is rather uncommon combination. I use Puppet on Arch since 2014 and didn't notice this bug. Another user pointed it out to me last week. |
@joshcooper thanks a lot! I would love to see this in 7.x as well. If required/desired I can provide a PR for 7.x as well. |
Backport failed for Please cherry-pick the changes locally. git fetch origin 7.x
git worktree add -d .worktree/backport-9442-to-7.x origin/7.x
cd .worktree/backport-9442-to-7.x
git checkout -b backport-9442-to-7.x
ancref=$(git merge-base 06a56b6908b452d952410bb51224c85aa83831ca cf789b7a708f51eb6f6d7db1294eaa543b7805c7)
git cherry-pick -x $ancref..cf789b7a708f51eb6f6d7db1294eaa543b7805c7 |
Auto backport failed so please do file a PR against 7.x |
This is a regression from d23d6db
During some cleanup, the command
got modified to:
But this isn't a valid command anymore:
The idea was to prevent partial system upgrades while installing new packages. To do this, the
sync
option was removed from the installation routine. The correct fix is to remove the command completely.