In regard to: Re: rpm did not remove previous version, Matt Hall said (at...:
It's probably the - in the upstream version. I think that's a reserved
character and it changes the n-v-r matching such that the names are no
longer the same.
I think you are correct. I found the yum-util Œpackage-cleanup¹ which
correctly found the dupe, but also failed to remove it.
So now that I have an entry in my rpmdb with a malformed V that breaks the
NVR matching, is there a way to selectively remove that one in particular?
My only workaround seems to be
³rpm -ev rpmone-version-release² # remove good package
³rpm -ev ‹noscripts rpmone² # remove bad package
³rpm -Uvh rpmone-version-release.rpm² # put good package back
Interestingly enough, I /can¹t/ remove the package via erase unless I
specify the noscripts option. ?
If both the bad package and the good package have exactly the same file
contents, meaning there weren't changes to what %files were included
between bad and good, then wouldn't
rpm --erase --justdb --allmatches rpmone
rpm -Uvh --justdb rpmone-version-release
do what you need? It's kind of ugly, but any time you are resorting to
'--justdb', you've implicitly acknowledged that you have a problem.
Alternately, if you have a newer version of rpmone, or even an updated
release, *and* you're confident that any %pre/%post/%preun/%postun etc.
scripts are upgrade safe, then the safest thing might be
rpm --erase --justdb --allmatches rpmone
rpm -Uvh rpmone-version-release
If you have any config files, especially ones that get customized, you
will want to carefully test what happens to them no match which route
you choose.
Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, Quentin Burdick Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164