Re: SUG: Automatic RPM database verification and repair

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

 



At 7:52 PM +0800 11/24/06, Nerazzurri wrote:
>> From: Tony Nelson <tonynelson@xxxxxxxxxxxxxxxxx>
 ...
>> I propose that the RPM database should be verified on a regular basis.  I
>> have written a utility, rpm_verify_db, to automatically verify and repair
>> the RPM database, via a daily cron job.  Reports of errors are syslog'd,
>> emailed to root, and shown by logwatch.  It could be incorporated into the
>> RPM package, or even Yum.  It can be found at
>> <http://georgeanelson.com/rpm-verifydb.htm>.
>>
>> I propose that Anaconda should check the RPM database before starting an
>> upgrade to an existing installation.  Checking takes under a minute on my
>> system, so it should not be objectionable.  Anaconda should offer to repair
>> a damaged RPM database (if the Package file is OK) before proceeding with
>> the installation.
>>
>> I suggest that the --verifydb command should not be undocumented in RPM and
>> its manpage.  This seems to be on purpose, but I think it is a mistake.
>>
>> I would like some feedback about these proposals.  If they are acceptable I
>> will file RFE bugs on them.
>>
>> My knowlege of things RPM is superficial.  It would be a good idea to have
>> my proposed verification and repair methods criticised by authentic RPM
>> developers.
>
>
>your idea is good.
>
>but do you test the scripts?

Yes.

>it seems that the return value of "rpm
>--verifydb" has some problem.
>
>whether your rpmdb is broken or not, the return value is same(all is 0),
>so the scripts will not work well
>
>
>i remove my rpmdb directory(rm -rf /var/lib/rpm), the return value is
>still 0, same with right rpmdb

Rpm does something odd when it is given a non-existent or non-full path to
a RPM database: it creates a new RPM database there.  If it is given a full
path (or a proper relative path) to a broken RPM database it will report
the errors.  For proper operation, the script requires a full path to a
real RPM database.  Arguably this is a deficiency in rpm's "--verifydb"
option.
-- 
____________________________________________________________________
TonyN.:'    The Great Writ     <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
      '      is no more.             <http://www.georgeanelson.com/>

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux