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
add .pref extension, which according to apt_preferences(5) may or may not be present...
[puppet-modules/puppetlabs-apt.git]
/
manifests
/
source.pp
diff --git
a/manifests/source.pp
b/manifests/source.pp
index f3fc7b995aa91c3f9c881b2a53302772dc045ab0..ce801bc76c90c793230ae874c89bb7b86c2ca5d6 100644
(file)
--- a/
manifests/source.pp
+++ b/
manifests/source.pp
@@
-35,10
+35,17
@@
define apt::source(
notify => Exec['apt_update'],
}
notify => Exec['apt_update'],
}
- if ($pin != false) and ($ensure == 'present') {
- apt::pin { $release:
+
+ if ($pin != false) {
+ # Get the host portion out of the url so we can pin to origin
+ $url_split = split($location, '/')
+ $host = $url_split[2]
+
+ apt::pin { $name:
+ ensure => $ensure,
priority => $pin,
priority => $pin,
- before => File["${name}.list"]
+ before => File["${name}.list"],
+ origin => $host,
}
}
}
}