Bug #2043
up2date provider should split off architecture to --arch parameter
| Status: | Tests Insufficient | Start date: | 03/03/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | package | |||
| Target version: | 2.7.x | |||
| Affected Puppet version: | 0.24.7 | Branch: | https://github.com/jamtur01/puppet/tree/ticket/master/2043 | |
| Keywords: | communitypatch | |||
| Votes: | 2 |
Description
Re: http://groups.google.com/group/puppet-dev/browse_thread/thread/5ce44b1541a1df8b
Just came across an issue where I had to install pam.i386 as well as pam.x86_64 on a RHEL4 machine (via up2date). With the yum provider you can simply
package { “pam.i386”: }
Because the underlying command is understood by yum yum -y install pam.i386
With up to date this fails up2date-nox -i pam.i386
You need to up2date —arch=i386 pam
There has been a lot of discussion in the past (including myself) about this, none of which came to a satisfactory conclusion. Packages are inherently tricky as you have “pam”, “pam.i386” and “pam.x86_64” which doesn’t sit comfortably with Puppet’s concept of unique resources.
So what I propose is something much simpler, rather than solve that problem simply permit the same kludge within up2date as within yum, i.e. this patch.
The provider will determine if the name end in an architecture by way of a long regexp of known architectures. Splitting off via the dots is unreliable as some package names do have a dot in them.
Regards, Derek
History
Updated by Derek Whayman about 3 years ago
- File up2date.rb.udiff2 added
Sorry, should have used spaces instead of tabs. New diff up2date.rb.udiff2
Updated by Derek Whayman about 3 years ago
- File up2date.rb.udiff3 added
Sorry guys… missed noarch. Let’s try again with v4.
Updated by James Turnbull about 3 years ago
- Status changed from Unreviewed to Needs Decision
shrugs Luke?
Updated by Luke Kanies about 3 years ago
- Status changed from Needs Decision to Accepted
This can’t be done until we support multiple primary keys, but once we do, sure.
Updated by Derek Whayman about 3 years ago
Luke, re the primary key issue I agree that will unlock a huge amount of new functionality. However, this was simply designed to bring the current functionality for up2date in line with yum. You have different names for each package, e.g. “pam.i386” and “pam.x86_64”, and you don’t have a package “pam”. Give me a buzz on IRC if you need to.
Many thanks, Derek
Updated by Luke Kanies about 3 years ago
whaymand wrote:
Luke, re the primary key issue I agree that will unlock a huge amount of new functionality. However, this was simply designed to bring the current functionality for up2date in line with yum. You have different names for each package, e.g. “pam.i386” and “pam.x86_64”, and you don’t have a package “pam”. Give me a buzz on IRC if you need to.
Many thanks, Derek
I see.
I’m ok with this, then, but the patch could be made simpler.
I’d put the architectures in an array (probably as a constant), split the package name on ‘.’, and then see if the last field in that array is in your architecture list.
And, of course, tests. :)
Updated by James Cammarata about 2 years ago
Has anyone looked at this patch in the last 11 months? I am running into the same issue (posted to puppet-users about it) and would like to have this functionality added. If we’re still waiting on the proposed changes to the patch proposed above, I can try and pick it up, but I thought I’d ask to see if anyone had taken this on first.
Updated by James Cammarata about 2 years ago
Patch sent to DEV mailing list.
Updated by Markus Roberts about 2 years ago
- Target version set to 0.25.5
Updated by James Turnbull about 2 years ago
- Target version changed from 0.25.5 to 49
Updated by Matt Robinson over 1 year ago
- Status changed from Accepted to In Topic Branch Pending Review
- Keywords set to communitypatch
Updated by Markus Roberts over 1 year ago
- Target version changed from 49 to 2.7.x
Updated by James Turnbull 9 months ago
- Status changed from In Topic Branch Pending Review to Requires CLA to be signed
Hi James – I’m just going through and cleaning up some old patches with a view to merging them. Can you please sign a Contributor License Agreement (click on top right menu) and we’ll see about getting this reviewed and merged. My apologies this has taken so long.
Updated by James Turnbull 9 months ago
- Assignee set to James Cammarata
Updated by James Cammarata 9 months ago
CLA done.
Updated by James Turnbull 9 months ago
- Status changed from Requires CLA to be signed to In Topic Branch Pending Review
- Branch set to https://github.com/jamtur01/puppet/tree/ticket/master/2043
Pull request sent.
Updated by James Turnbull 9 months ago
- Category set to package
Updated by Daniel Pittman 4 months ago
- Status changed from In Topic Branch Pending Review to Tests Insufficient