Re: rhpl update problem and rpmdb problem(s) (was Re: What is the current F14 state?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 04, 2010 at 02:51:04PM -0700, Adam Williamson wrote:
> On Mon, 2010-10-04 at 11:18 -0600, Michal Jaegermann wrote:
> > 
> > Running 'package-cleanup --cleandupes' would likely help.  After
> 
> I'd highly recommend being very cautious about that, because what this
> seems to do is actually remove the package. That is, if you have
> foobar-1.1 installed and foobar-1.0 as a 'ghost' in the RPM database,
> after doing package-cleanup --cleandupes , you will have no 'foobar'
> package installed at all.

Eh?  On all occasions I was using that (a number of times after
botched updates for one reason or another) it was always removing
specifically foobar-1.0 and not foobar-1.1.  One caveat though.
If some dependencies for foobar-1.1 would be missing it _may_ grab
foobar-1.1 due to removal of dependencies.  It asks for a
confirmation if you are not running '-y' and it is indeed a good
idea to pay attention. 'yum-complete-transaction' is likely the best
when it can be applied but it may get confused as well.

> I comprehensively screwed over a system by
> using --cleandupes once.

Maybe something was buggy or maybe you did have dependency problems?
No way to tell now.

> 
> What's better to do in the case of having a 'ghost' package in the
> database - it's not really 'installed' in the sense of the files being
> there on the disk, but it's in the database - is 'rpm -e --justdb
> --noscripts' .

If there are still files which belong to foobar-1.0 and not foobar-1.1
(/usr/share/doc/foobar-1.0/ is the most obvious example but this is
not the only possibility) then they will be left on your system and
now not claimed by any package.  Cleaning that up "by hand" is a long
and error prone process.  OTOH if you will do
'rpm -e --noscripts foobar-1.0' then you may loose files which are
common to foobar-1.0 and foobar-1.1.  Hopefuly nothing crucial.  It
did happen to me.  You may recover with 'rpm -Uvh --force foobar-1.1'
but you have to watch for that.  Sometimes that has to be done from
a rescue boot.

In my experience --cleandupes works the most reliably and with the
least fuss.

> It may be that --cleandupes usually does the right thing and I just got
> unlucky, but I'd be careful with it :)

It always pays to be careful when you are messing up with a system -
especially when it is not exactly healthy. :-)

   Michal
-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test


[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux