I'd like to see this patch included in the next testing/release cycle, and the code looks okay, but it's going to need unit tests for the new functionality. Would you be interested in writing those?
~Jesse Wolfe On Tue, Feb 23, 2010 at 11:19 AM, James Cammarata <[email protected]> wrote: > On Tue, 23 Feb 2010 09:47:02 -0600, James Cammarata <[email protected]> wrote: > > I started looking into finishing this patch > > http://projects.reductivelabs.com/issues/2043, which apparently was > never > > completed or included. I got it working, with one caveat: it doesn't > > install an RPM if one with the same name but different arch is installed. > > > For example, I can install libacl.i386 specifically, but not if > > libacl.x86_64 is installed. > > > > I think the issue is in provider/package.rb, in properties(). Earlier, > in > > self.prefetch() the information about all installed packages is grabbed, > so > > in properties() it passes the first if test because some package is > > installed with that name. So it looks like for this to work properly, > it'd > > be a bit more of an invasive change, which would have to be done in > rpm.rb > > so that all RPM derivatives would pay attention to arch. I'm still new > to > > ruby and puppet, so maybe I'm missing an easier way to do this. > > > > Any thoughts and/or suggestions? > > I think I got it figured out, just quit trying to go down a bad path. I > believe I've taken the original suggestion to put the arch values in an > array even further: with my patch the compatible archs are pulled from the > "rpm --showrc" command itself, so there's no hard-coding of values at all. > > I corrected one thing in rpm.rb, which I feel is an error. If an empty > string is passed to the nevra_to_hash() function, the resulting hash > returned had "-" set for the ensure field, which is incorrect. I added a > quick check at the top of the function after the strip() to return the > empty hash in this case (which causes package.rb to set the ensure field to > absent, as it should). > > Comments/suggestions/criticisms always welcome. > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<puppet-dev%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
