jesseadams/pacman — pull request #2 by dvolker (2014-01-01 02:48:48+00:00)
Title: Add --noconfirm to makepkg call to suppress dependency prompt

package_aur provider fails to build a package with makepkg if the package has dependencies.

Adding --noconfirm to makepkg options solves this problem.

Here's a failed run via test-kitchen:
```

================================================================================
Error executing action `build` on resource 'pacman_aur[redis-git]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[makepkg -s --asroot] (/tmp/kitchen/cookbooks/pacman/providers/aur.rb line 89) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of makepkg -s --asroot ----
STDOUT: resolving dependencies...
looking for inter-conflicts...

Packages (2): perl-error-0.17021-1 git-1.8.5.2-1

Total Download Size: 3.68 MiB
Total Installed Size: 20.89 MiB
STDERR: ==> Making package: redis-git 20111002-1 (Wed Jan 1 02:15:59 UTC 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
:: Proceed with installation? [Y/n] ==> ERROR: 'pacman' failed to install missing dependencies.
---- End output of makepkg -s --asroot ----
Ran makepkg -s --asroot returned 1

Cookbook Trace:
---------------
/tmp/kitchen/cookbooks/pacman/providers/aur.rb:94:in `block in class_from_file'

Resource Declaration:
---------------------
# In /tmp/kitchen/cookbooks/redacted/recipes/default.rb

17: pacman_aur 'redis-git' do
18: action [:build, :install]
19: end
20:

Compiled Resource:
------------------
# Declared in /tmp/kitchen/cookbooks/redacted/recipes/default.rb:17:in `from_file'

pacman_aur("redis-git") do
action [:build, :install]
retries 0
retry_delay 2
cookbook_name :"redacted"
recipe_name "default"
package_name "redis-git"
builddir "/tmp/kitchen/cache/builds"
end

```

After the fix makepkg prompts but does not wait for confirmation:

```
* execute[makepkg -s --asroot --noconfirm] action run[2014-01-01T02:12:17+00:00] INFO: Processing execute[makepkg -s --asroot --noconfirm] action run (/tmp/kitchen/cookbooks/pacman/providers/aur.rb line 89)
resolving dependencies...
looking for inter-conflicts...

Packages (2): perl-error-0.17021-1 git-1.8.5.2-1

Total Download Size: 3.68 MiB
Total Installed Size: 20.89 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages ...
downloading perl-error-0.17021-1-any.pkg.tar.xz...
downloading git-1.8.5.2-1-x86_64.pkg.tar.xz...
checking keyring...
checking package integrity...
loading package files...

...
```