Skip to content

Commit

Permalink
Remove broken pacman command for installing packages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bastelfreak committed Aug 4, 2024
1 parent 06a56b6 commit c879297
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion lib/puppet/provider/package/pacman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ def install_from_file
else
fail _("Source %{source} is not supported by pacman") % { source: source }
end
pacman "--noconfirm", "--noprogressbar", "-S"
pacman "--noconfirm", "--noprogressbar", "-U", source
end

Expand Down
11 changes: 0 additions & 11 deletions spec/unit/provider/package/pacman_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@
it "should install #{source} directly" do
resource[:source] = source

expect(executor).to receive(:execute).
with(include("-S") & include("--noprogressbar"), no_extra_options).
ordered.
and_return("")

expect(executor).to receive(:execute).
with(include("-U") & include(source), no_extra_options).
ordered.
Expand All @@ -120,12 +115,6 @@
end

it "should install from the path segment of the URL" do
expect(executor).to receive(:execute).
with(include("-S") & include("--noprogressbar") & include("--noconfirm"),
no_extra_options).
ordered.
and_return("")

expect(executor).to receive(:execute).
with(include("-U") & include(actual_file_path), no_extra_options).
ordered.
Expand Down

0 comments on commit c879297

Please sign in to comment.