Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 317948 Details for
Bug 464472
[PATCH] Puppet doesn't deal with RPM provides correctly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Add support for RPM provides
puppet-0.24.4-rpmprovides.patch (text/plain), 2.17 KB, created by
Lubomir Rintel
on 2008-09-29 10:43:04 UTC
(
hide
)
Description:
Add support for RPM provides
Filename:
MIME Type:
Creator:
Lubomir Rintel
Created:
2008-09-29 10:43:04 UTC
Size:
2.17 KB
patch
obsolete
>Fix support of package provides. All package management systems (apt-rpm, >yum, up2date) would grab the package, without puppet noticing it. > >This adds package objects both versioned and unversioned provides of >a package. > >Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> > >--- puppet-0.24.4/lib/puppet/provider/package/rpm.rb.rpmprovides 2008-09-29 12:35:33.000000000 +0200 >+++ puppet-0.24.4/lib/puppet/provider/package/rpm.rb 2008-09-29 12:36:36.000000000 +0200 >@@ -25,11 +25,26 @@ > > # list out all of the packages > begin >- execpipe("#{command(:rpm)} -qa --nosignature --nodigest --qf '#{NEVRAFORMAT}\n'") { |process| >+ execpipe("#{command(:rpm)} -qa --nosignature --nodigest --provides --qf '-pkg #{NEVRAFORMAT}\n'") { |process| > # now turn each returned line into a package object > process.each { |line| >- hash = nevra_to_hash(line) >- packages << new(hash) >+ if line =~ /^-pkg (.*)/ >+ # A package >+ pkghash = nevra_to_hash($1) >+ packages << new(pkghash) >+ else >+ # A package provide >+ providehash = pkghash; >+ line.chomp! >+ if line =~ /(.*) = (.*)/ >+ providehash[:name] = $1; >+ providehash[:version] = $2; >+ else >+ providehash[:name] = line; >+ end >+ providehash[:ensure] = "#{hash[:version]}-#{hash[:release]}" >+ packages << new(providehash) >+ end > } > } > rescue Puppet::ExecutionFailure >@@ -44,7 +59,7 @@ > # :ensure => version-release > def query > unless @property_hash[:epoch] >- cmd = ["-q", @resource[:name], "--nosignature", "--nodigest", "--qf", "#{NEVRAFORMAT}\n"] >+ cmd = ["-q", "--whatprovides", @resource[:name], "--nosignature", "--nodigest", "--qf", "#{NEVRAFORMAT}\n"] > > begin > output = rpm(*cmd)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 464472
: 317948