Wykres commitów

17 commits

Autor SHA1 Wiadomość Data
juniorsysadmin
b737557e31 (MODULES-1231) Fix apt::force locale issues
The current $install_check variable greps for 'Installed' or
'Candidate', which means that it will give the wrong result
when a non-English locale is used. This patch ensures that the
check will work properly for non-English locales by setting the
environment parameters for the exec to LC_ALL=C LANG=C
2014-12-15 23:31:09 +11:00
Raoul Bhatia
15fad7ec11 Fix "WARNING: case statement without a default case on line ..." 2014-10-24 12:59:15 +02:00
Martin Seener
93567aef4a apt::force: Added 2 parameters for automatic configuration file handling; fixes #modules-1306
when updating or installing newer packages with apt::force and you have changed previous
configuration files aptitude or apt-get will prompt what to do. You can suppress that
by pre-define the action with cfg_files parameter (new, old or unchanged and its backward
compatible if not defined). With a second optional parameter cfg_missing you can force
your provider to install missing configuration files as well.

Signed-off-by: Martin Seener <martin@seener.de>

apt::force: Changed selectors used in force.pp to case statements; refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>

apt::force: rspec: fixed the failing tests and added validate_re for cfg_files and validate_bool for cfg_missing. Also removed default values for both case statements and only allow pre-defined values or true/false. Furthermore enhanced the README refs #module-1306

Was able to fix the failing rspec tests for the patch.
Thanks to Morgan Haskel.

Signed-off-by: Martin Seener <martin@seener.de>

Despite the puppetlabs-stdlib documentation says validation_re supports 3 arguments the tests failed telling that only 2 are supported. Fixed this by removing the 3 optional argument; refs #modules-1306

Signed-off-by: Martin Seener <martin.seener@barzahlen.de>

apt::force: updated readme refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>
2014-09-22 19:53:45 +02:00
Hunter Haugen
4b8aa9e55a Revert "Undo backwards-incompatible changes and features."
This reverts commit f9e2fe2a7c.
2014-02-14 14:49:43 -08:00
Hunter Haugen
f9e2fe2a7c Undo backwards-incompatible changes and features.
Undoes the parameter changes in #140 and #184
2014-02-14 14:33:30 -08:00
Andreas Teuchert
5f618da4bd Don't use hardcoded provider in force manifest.
Use $apt::params::provider instead.
2013-07-03 10:36:48 -07:00
Andreas Teuchert
9a968bbead Handle release parameter more sensibly in force manifest.
Use release parameter to construct $release_string.

The release parameter may also be set to false to use the system's
default release (so just force a specific version). Use false as the
default setting instead of 'testing'.

Change $install_check to also check if package is installed from the
right release, instead of just checking the version.
2013-07-03 10:36:15 -07:00
Thomas Spalinger
7b5d30ed18 replace aptitude with apt in apt::force 2013-02-26 21:35:49 +01:00
sathlan
fcb90f7b6c Add a way to specify a timeout for the apt::force define. 2012-07-09 05:24:49 +03:00
Nan Liu
2dcec036ca Add logoutput on_failure for all exec resources.
We need more information to debug issues on exec failure. This change
enables logouput => on_failure.
2012-06-07 14:53:41 -07:00
Cody Herriges
e5f2dfe294 Adds apt::{conf,backports} and variable style.
With the addition of this patch two new defines will be added; one to
  manage APT configuration files (apt::conf) and one that abstracts out the
  requirements needed to turn on backport repositories (apt::backports).

  In addition, the patch takes the opportunity to clean up variable
  definitions so they follow a consistent pattern of setting local
  variables to the fully qualified value stored in the apt::params
  class.  Previously all variable used within a class directly addressed
  the apt::params namespace when ever the variable was used.  In the
  pattern they now adhere to we can more easily switch the namespace
  data lives in or externalize it even more using hiera.
2012-04-20 13:35:27 -07:00
Ken Barber
a758247f26 (#13289) Clean up style violations and fix corresponding tests 2012-03-21 13:21:11 +00:00
Matthaus Litteken
f759bc039a (#11953) Apt::force passes $version to aptitude
Previously, even if $version were passed to apt::force, aptitude would just
install the default version of the package available. This updates the aptitude
call to use the version string if it exists. If no version is passed, or if it
is false, no version is added to the aptitude call.  This also updates the
rspec-puppet tests for the define, to reflect the changes to the exec.
2012-01-13 15:29:47 -08:00
Matthias Pigulla
2f5d317177 (#11413) Update dpkg query used by apt::force
This patch fixes the query used by apt::force to
determine rather or not the package is installed.

Previously, the expression was not specific enough and
could not lead to false positives in cases where a package
name is contained within another package name (puppet could be
incorrectly determined as being installed if puppet-common is
installed)

This commit resolves that by improving the query expression.
2012-01-13 11:59:24 -08:00
Dan Bode
77d2b0dd05 reformatted whitespace to match recommended style
of 2 space indentation.
2011-05-30 10:25:11 -07:00
Ben Godfrey
71fc425176 Abs paths for all commands 2011-03-11 17:02:50 +00:00
Jeff Wallace
f848bac607 First commit 2010-04-27 16:38:28 -04:00