[TriLUG] Updating via RPM

Janyne Kizer janyne_kizer at ncsu.edu
Thu Mar 6 14:45:27 EST 2003


I created the RPM a few weeks back.  It contains about a dozen files. 
One of the files needs to be updated.  I updated the source and when I
do rpm -Uvh rpmname, the file is not updated.  If I remove the old
version and then do rpm -ivh rpmname the file *is* updated.  

Yes, there is a post section.  It pretty much just sets the file
permissons to ensure that they are correct:

%post
chown sa /home/sa/*
mkdir /home/sa/Desktop
chown sa /home/sa/Desktop
chmod 444 /home/sa/Desktop

rpm -qa does show that the RPM was installed, however, using the -U
option one the one file that was suppsed to change is not, in fact,
changed.  

I used --force as part of the troubleshooting process because I wanted
to see under what circumstances the RPM worked as expected and under
what circumstances if failed to work as expected.  It works as expected
if:

No previous version installed:
rpm -ivh rpmname 

Previous version installed:

rpm -ivh rpmname --force

rpm -e rpmname
rpm -ivh rpmname

It does not work as expected in the following case:

rpm -Uvh rpmname


Jeremy Portzer wrote:
> 
> On Thu, 2003-03-06 at 14:18, Janyne Kizer wrote:
> > I have a simple RPM that I created a few weeks ago.  I created a new
> > version of it and I would like to update it using our Current server to
> > distribute it via up2date.  I am having a problem, though, that if the
> > new version is installed using that -U command by hand or from the
> > Current server, it doesn't seem to work.  If it installed with the -i
> > command after the previous version is removed with the -e, it works fine
> > (or with --force).  From what I can tell, -U should be doing the same
> > thing...  Anyway, since I can get the RPM to work under some
> > circumstances, I know that the file that is being replaced is really
> > there, I just don't understand why update doesn't update it!
> >
> > Any pointers that would help me get to the bottom of this would be
> > appreciated...
> 
> Does the .rpm have %post scripts or other things that modify the
> system?  Or does it just install files?  It's possible that there are
> bugs in some of the scripts in the .rpm -- sometimes different scripts
> are run in different circumstances, depending on the .rpm's
> construction.  (By the way, "-U" and "-i" *should* yield identical
> results if the RPM wasn't previously installed.)
> 
> Also, what do you mean by "[the program] doesn't seem to work" -- are
> the files there?  Does "rpm -q [packagename]" show it as installed ?
> What about it doesn't work?
> 
> By the way, you should never use --force or --nodeps.  If you're having
> problems, you've got to fix the dependencies, or fix the RPMs, if you
> want a consistent database.  (Those options should come with a warning
> of "don't blame RPM if everything's messed up!")
> 
> Hope this helps,
> Jeremy
> 

-- 

Janyne Kizer
Systems Programmer Administrator
NC State University, College of Agriculture & Life Sciences
Extension Information Technology



More information about the TriLUG mailing list