[CentOS] rpm --freshen issue

Todd Denniston Todd.Denniston at tsb.cranrdte.navy.mil
Wed Oct 21 14:27:39 UTC 2009

ken wrote, On 10/21/2009 05:12 AM:
> On 10/20/2009 12:15 PM Benjamin Franz wrote:
>> ken wrote:
>>> 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.

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
name=expedient update dir
#assume the machine already has gpg key for all rpms you have
yum update --disablerepo=\* --enablerepo=expedient

alternatively if the problem is not really the shell length, then
yum localupdate /install
yum localupdate /install/*
might work.

Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter

More information about the CentOS mailing list