(MODULES-4118) Set dpkg option NoLocking in apt_updates fact
authorjustin.cattle <j@ocado.com>
Tue, 22 Nov 2016 17:34:01 +0000 (17:34 +0000)
committerjustin.cattle <j@ocado.com>
Tue, 22 Nov 2016 17:34:01 +0000 (17:34 +0000)
commit86f654a13baec042b6d249c3f6fb875a00351f98
treecbab37242548f68f6267dddca961bf4999838717
parent2298cb2b473a1d554abd343ad18943d1a879d500
(MODULES-4118) Set dpkg option NoLocking in apt_updates fact

Although the man page for apt-get indicates the --simluate means locking
will be disabled, testing indicates it isn't.
Indeed, regulary collecting facts causes it to clash with the apt_update
Exec occasionally, resulting in failures to lock /var/lib/dpkg
Spefically setting the NoLocking option fixes the issue.
lib/facter/apt_updates.rb
spec/unit/facter/apt_has_updates_spec.rb
spec/unit/facter/apt_package_updates_spec.rb
spec/unit/facter/apt_security_updates_spec.rb
spec/unit/facter/apt_updates_spec.rb