Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
(FM-7316) - i18n Process implemented and .pot file generated
[puppet-modules/puppetlabs-apt.git]
/
manifests
/
backports.pp
diff --git
a/manifests/backports.pp
b/manifests/backports.pp
index 4faad6157a7f31664555471071c211e177e56ce2..8555cb0f7a2c68455fbab71b18ee122f5a14bc67 100644
(file)
--- a/
manifests/backports.pp
+++ b/
manifests/backports.pp
@@
-1,3
+1,4
@@
+# Defining backports for the apt class
class apt::backports (
Optional[String] $location = undef,
Optional[String] $release = undef,
class apt::backports (
Optional[String] $location = undef,
Optional[String] $release = undef,
@@
-32,13
+33,13
@@
class apt::backports (
}
} else {
unless $location and $release and $repos and $key {
}
} else {
unless $location and $release and $repos and $key {
- fail(
'If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key'
)
+ fail(
translate('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key')
)
}
}
}
}
- if
is_hash($pin)
{
+ if
$pin =~ Hash
{
$_pin = $pin
$_pin = $pin
- } elsif
is_numeric($pin) or is_string($pin)
{
+ } elsif
$pin =~ Numeric or $pin =~ String
{
# apt::source defaults to pinning to origin, but we should pin to release
# for backports
$_pin = {
# apt::source defaults to pinning to origin, but we should pin to release
# for backports
$_pin = {
@@
-46,7
+47,7
@@
class apt::backports (
'release' => $_release,
}
} else {
'release' => $_release,
}
} else {
- fail(
'pin must be either a string, number or hash'
)
+ fail(
translate('pin must be either a string, number or hash')
)
}
apt::source { 'backports':
}
apt::source { 'backports':