[CentOS] rpm --freshen issue

ken gebser at mousecar.com
Thu Oct 22 01:21:40 UTC 2009


War is a failure of the imagination.
        --William Blake



On 10/21/2009 10:27 AM Todd Denniston wrote:
> ken wrote, On 10/21/2009 05:12 AM:
>> On 10/20/2009 12:15 PM Benjamin Franz wrote:
>>> ken wrote:
> <SNIP>
>>>> Yeah, this directory contains 1507 rpms (IIRC)... which is a lot, but it
>>>> should still work.  This is Linux, after all.  And there's plenty enough
>>>> memory and cpu to handle it.
>>>>   
>>> Running
>>>
>>> rpm --freshen --repackage * 
>>>
>>> for 1500+ rpms  probably exceeds the maximum character length for some 
>>> part of the system after expansion of the '*'  by the shell.
> <SNIP understanding shell command length>
> 
> <SNIP drawn out scripting>
>> Benjamin, thanks for your constructive response.  Any further such (from
>> you or anyone else) will be much appreciated.
>>
>> Best,
>> ken
>>
>>> Alternatively, use 'createrepo' to create a Yum repository of the RPMs 
>>> and use yum to handle it for you.
>>>
> 
> Ken,
> please let me second the idea for using createrepo on the collection so that you can then use yum to 
> resolve everything.
> 
> Assuming "/install" is where the rpms are at and createrepo is installed from base(at least on 5. it 
> is in base), running the following commands should get the system going:
> 
> createrepo /install
> cat >> /etc/yum.repos.d/quickupdate.repo << END_EOF
> [expedient]
> name=expedient update dir
> baseurl=file:///install
> enabled=0
> #assume the machine already has gpg key for all rpms you have
> gpgcheck=1
> END_EOF
> yum update --disablerepo=\* --enablerepo=expedient
> 
> 
> 
> alternatively if the problem is not really the shell length, then
> yum localupdate /install
> or
> yum localupdate /install/*
> might work.
> https://www.centos.org/modules/news/article.php?storyid=118#comment90
> http://fedoraforum.org/forum/archive/index.php/t-140404.html
> 

Todd, I like your idea and love all the details you provide.  I use yum
at home (on the machine I'm hitting on now and one other one) and love
it.  One of the first things I did when I got handed this rh v.4.5
machine was to check for yum.  It's not there.  I looked around redhat's
site for a version of it to run on 4.5, but couldn't find it.  It did
exist for 4.5, but for some reason my predecessor didn't install it.

I'll hunt around for it some more, but if anyone knows a place on the
web, a link would be great.  Until then, it looks like I might have to
use up2date.  For some reason I don't feel a lot of joy in that prospect.

Thanks for the great yum info.




More information about the CentOS mailing list