Following Russ Allbery's advice and using the Candidate field in the apt-cache output. Apparently I'm blind.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2312 980ebf18-57e1-0310-9a29-db15c13687c0
This commit is contained in:
Родитель
3606482b27
Коммит
80dac92b3a
|
@ -78,7 +78,7 @@ Puppet::Type.type(:package).provide :apt, :parent => :dpkg do
|
|||
def latest
|
||||
output = aptcache :policy, @model[:name]
|
||||
|
||||
if output =~ /\*\*\*\s+(\S+)\s/
|
||||
if output =~ /Candidate:\s+(\S+)\s/
|
||||
return $1
|
||||
else
|
||||
self.err "Could not find latest version"
|
||||
|
|
Загрузка…
Ссылка в новой задаче