According to this line https://github.com/jesseadams/reprepro/blob/master/recipes/default.rb#L92
not_if "GNUPGHOME=/root/.gnupg gpg --list-secret-keys --fingerprint #{node['reprepro']['pgp_email']} | egrep -qx '.*Key fingerprint = #{node['reprepro']['pgp_fingerprint']}'"
It should not happen if your databag is set up properly, the quality sounds out of cause in your problem.
Blaming the code quality with so few debugging information is unlikely to get you a return from the authors.
Run with -l debug to see why the guard does not apply and give some insight on what give the guard if you try it in a vagrant ssh session, tell us which distribution you're using, well give insight on your platform so we don't have to guess.
Le 2015-06-19 16:31, Douglas Garstang a écrit :
DougDisappointing quality from something with Opscode's name on it. Can someone recommend a cookbook for setting up a Debian package repository of better quality? Alternatively I concede I might be doing something wrong in the way I'm implementing it, but I don't think so.I was trying to use the Debian Reprepro cookbook located here:It runs fine on the first run, and then fails on subsequent runs (ie a simple 'vagrant provision') due to the logic that imports the gpg key not being handled idempotently.
https://github.com/jesseadams/reprepro
==> default: ================================================================================
==> default: Error executing action `run` on resource 'execute[import packaging key]'
==> default: ================================================================================
==> default:
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '2'
==> default: ---- Begin output of /bin/echo -e '-----BEGIN PGP PRIVATE KEY BLOCK-----
==> default: Version: GnuPG v1
==> default:
==> default: <redacted>
==> default: -----END PGP PRIVATE KEY BLOCK-----
==> default: ' | gpg --import - ----
==> default: STDOUT:
==> default: STDERR: gpg: key 18DB12D8: already in secret keyring
==> default: gpg: Total number processed: 1
==> default: gpg: secret keys read: 1
==> default: gpg: secret keys unchanged: 1
Archive powered by MHonArc 2.6.16.