Puppet: System Administration Automated

Support

Ticket #1217 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

urpmi backend can't check if the latest release of a package is installed

Reported by: roudoud0u Assigned to: luke
Priority: normal Milestone:
Component: package Version: 0.24.4
Severity: normal Keywords: urpmi
Cc: Triage Stage: Ready for checkin
Attached Patches: Code Complexity: Easy

Description

Hi, it seems that the puppet urpmi backend is invoquing a wrong command when checking if the latest release of a package is installed. Here is the error message i get: -- err: //Node[kde]/kde-desktop/install-kde-theme-polyester/Package[kde-style-polyester]: Failed to retrieve current state of resource: Could not get latest version: Execution of '/usr/sbin/urpmi -S available kde-style-polyester' returned 256: Unknown option: S No package named available --

I just don't speak ruby so i can really help here but may be you're looking for this urpmq command. For information , here is the output of 'urpmq -S' when several release of the same package are present on different repository: -- urpmq -S puppet puppet : System Automation and Configuration Management Software ( 0.24.4-1custom2008.1 ) puppet : System Automation and Configuration Management Software ( 0.23.2-1mdv2008.1 ) -- But may be there's a better to lookup for this information ?

Bug reproduced on Mandriva 2008.1 with puppet-0.24.4-1mdv2008.1

HTH, Thanks.

Attachments

patch.diff (1.0 kB) - added by jamtur01 on 05/11/08 11:09:19.
Patch to fix urmpi provider

Change History

05/10/08 16:53:03 changed by jamtur01

I don't have a Mandrake install - are you able to provide a host I can do some testing on?

05/10/08 17:16:30 changed by roudoud0u

Hi, Thanks for help ! Well i could setup an ssh server and manage to open an access to it on my personnal box if you really want to but i was wondering first if you could just download a Mandriva One Live Cd ( http://mandriva.com/en/download/free - Please, choose "Mandriva Linux One 2008 Spring" ) and boot it inside virtualbox or any other virtual machine :-) ?

HTH, Thanks.

05/10/08 17:49:28 changed by jamtur01

Did this work in older Mandriva versions?

05/10/08 19:03:15 changed by roudoud0u

nope, at least for mandriva 2008.0 ! I really doubt that there is a '-S' option for urpmi because: * urpmq is the dedicated tool for query (rpm -i vs rpm -q) * i didn't find any information related to this option in the changelog of the urpmi package ?

I've uploaded the urpm{i,q,f,e} man pages on http://download.tuxfamily.org/magnum/doc/man/ HTH, Thanks.

05/11/08 11:09:19 changed by jamtur01

  • attachment patch.diff added.

Patch to fix urmpi provider

05/11/08 11:10:27 changed by jamtur01

  • owner changed from community to jamtur01.
  • status changed from new to assigned.
  • complexity changed from Unknown to Easy.
  • stage changed from Unreviewed to Accepted.

I've added a patch to fix this. Can you please test - simply patch the urmpi.rb file in the /usr/lib/ruby/site_ruby/1.8/puppet/provider/package directory.

05/11/08 13:16:46 changed by roudoud0u

It works ! Thanks a lot for your fix ! Here is how i've tested it (applying your patch to puppet-0.24.4) :

* cd /usr/lib/ruby/site_ruby/1.8/puppet/provider

* patch -p0 package/urpmi.rb patch.diff

* puppetd --test --waitforcert 60

* result:

-- notice: //Node[kde]/kde-desktop/install-kde-theme-polyester/Package[kde-style-polyester]/ensure: created -- Bug resolved for me !

Thanks for your help :-)

05/11/08 13:24:40 changed by jamtur01

  • owner changed from jamtur01 to luke.
  • status changed from assigned to new.
  • stage changed from Accepted to Ready for checkin.
  • patch changed from None to Code.

Excellent - fix pushed in commit [ae842ea8214a846624f89711d34f7481d5a8d01a] in branch 0.24.x

05/12/08 23:19:50 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

Pushed.