Skip to content

Commit c879297

Browse files
committed
Remove broken pacman command for installing packages
This is a regression from 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.
1 parent 06a56b6 commit c879297

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

lib/puppet/provider/package/pacman.rb

-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def install_from_file
248248
else
249249
fail _("Source %{source} is not supported by pacman") % { source: source }
250250
end
251-
pacman "--noconfirm", "--noprogressbar", "-S"
252251
pacman "--noconfirm", "--noprogressbar", "-U", source
253252
end
254253

spec/unit/provider/package/pacman_spec.rb

-11
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@
9797
it "should install #{source} directly" do
9898
resource[:source] = source
9999

100-
expect(executor).to receive(:execute).
101-
with(include("-S") & include("--noprogressbar"), no_extra_options).
102-
ordered.
103-
and_return("")
104-
105100
expect(executor).to receive(:execute).
106101
with(include("-U") & include(source), no_extra_options).
107102
ordered.
@@ -120,12 +115,6 @@
120115
end
121116

122117
it "should install from the path segment of the URL" do
123-
expect(executor).to receive(:execute).
124-
with(include("-S") & include("--noprogressbar") & include("--noconfirm"),
125-
no_extra_options).
126-
ordered.
127-
and_return("")
128-
129118
expect(executor).to receive(:execute).
130119
with(include("-U") & include(actual_file_path), no_extra_options).
131120
ordered.

0 commit comments

Comments
 (0)