Re: SUG: Automatic RPM database verification and repair

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

 




On Nov 30, 2006, at 9:53 PM, Tony Nelson wrote:

At 6:24 PM -0500 11/29/06, Jeff Johnson wrote:
On Nov 29, 2006, at 6:20 PM, seth vidal wrote:


I'm not saying yum does guarantee those. I'm asking why does the above
cause the rpmdb to have errors?


Dunno (yet), there are likely several intersecting causes.

No matter what, yum should go back to last known good. It's easier
debugging,
and seemed to work at some point in time.

The only reason that I've heard for the open-extract-close change is
to handle
signals within yum, and that can easily be achieved in other ways.
Nasrat has
details.

If handling of Ctl-C is the main reason for yum's new repeated RPM database
opens / closes, I have a suggestion or two.

RPM wants to catch the signals so it can be sure to close the RPM database properly in all cases. Yum also tries to close the RPM database properly
in all instances.  It should be enough if yum does it.

1) Yum could steal back the SIGINT handler, as I do in my Stablemirror yum plugin <http://georgeanelson.com/stablemirror.htm> (for FC5 yum, not really
needed anymore with the mirrorlist improvements).  It calls

    signal.signal(signal.SIGINT, signal.default_int_handler)

in an override of _mirror_try() in a subclass of MirrorGroup, to repeatedly steal back the SIGINT signal. Yum could do the same right after opening
the RPM database, but also in other places, as I think that RPM will
sometimes take the signals again later just to be "safe". This can be done
now.


What does signal.default_int_handler do? Exit?

If so, that explains why your database is in need of so much verification.

2) RPM's developers could be asked for a new API to tell RPM not to take
certain signals.  This could be done for FC7.

You ought to make the suggestion on <fedora-devel> and on <rpm-devel> mailing lists.

While you're at it, why don't you create bugzilla reports for every Red Hat, SuSE
and Mandrive product as well.

73 de Jeff

_______________________________________________
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