Fedora Account System
Red Hat Associate
Red Hat Customer
So, rpm 4.10 added RPMCALLBACK_SCRIPT_START and RPMCALLBACK_SCRIPT_STOP (see bug 606239). Yum supported them, but DNF doesn't. I'd like to add support for them to DNF, but the DNF team would rather not use these "new" callbacks unless they are documented as part of the public RPM API. It turns out the RPM API documentation actually has very little to say about callbacks at all; http://rpm.org/api/4.12.0.1/rpmcallback_8h_source.html is basically the only thing I can find. So: 1) Is rpmcallback.h part of RPM's public API? 2) If so, would you be willing to clarify that in the code/docs? 3) Would you write (or accept/publish) documentation on RPM's callback API?
Also, here's my understanding of how the RPMCALLBACK_SCRIPT_* callbacks work; could you verify this, or correct me if I'm wrong? Assuming the normal rpmCallbackFunction signature: (const void *h, const rpmCallbackType what, const rpm_loff_t amount, const rpm_loff_t total, fnpyKey key, rpmCallbackData data) If "what" is RPMCALLBACK_SCRIPT_{START,STOP,ERROR}: "amount" is the scriptlet tag (RPMTAG_PREIN, RPMTAG_POSTTRANS, etc.) "total" is the scriptlet exit value (see below) The ordering is START; STOP; then ERROR if script exit value != RPMRC_OK (0). For START, total is ignored. For STOP, RPMRC_OK (0) indicates success, RPMRC_NOTFOUND (1) indicates a non-fatal error (warning), any other value indicates a fatal error which prevented install/erase (this only happens for PREIN/PREUN/PRETRANS). For ERROR, RPMRC_OK (0) indicates a non-fatal scriptlet failure, any other value indicates a fatal error which prevented install/erase (as above) Is that correct?
BZ is not a support forum. Please ask your question on the rpm-maint list [1] and which you should be subscribed[2] anyway, if you are working on such an endeavour. The rpm callback is an old, ugly and long to be replaced[3] piece of code. Unfortunately replacement has never happened - to a good degree due a lack of pressure of the API users. It also is scattered all over the place. While some definitions are in rpmcallback.h the important functions are in rpmts.h: rpmtsNotify() rpmtsSetNotifyCallback() Here some very rough hints on the signature of the callback... (const void *h, /* header or NULL */ const rpmCallbackType what, /* one of the RPMCALLBACK_* constants */ const rpm_loff_t amount, /* amount of data processed (e.g. for install) const rpm_loff_t total, /* total amount of data to be processed */ fnpyKey key, /* rpmdbkey of package or tag of script or ... */ rpmCallbackData data) /* data passed as notifyData to rpmtsSetNotifyCallback */ Florian [1] rpm-maint.org [2] http://lists.rpm.org/mailman/listinfo/rpm-maint [3] http://rpm.org/ticket/183
So, users have to choose whether to use an undocumented feature or wait years for an implementation of an RFE? I don't understand how you can close this as NOTABUG...
I closed this as NOTABUG because BZ is not the best way to get this resolved. This does in no way mean we are not going to address this issue and it does not mean that we will not update the documentation. Keeping this bug open will not get this fixed any faster. As I already wrote everyone is invited to ask questions on rpm-maint and work with us on improvements of both the documentation and may be even a better callback API.
But if it helps you sleep...
since RHBZ seems to be one of places where users request features... reopening.
This bug is currently reported against a Fedora version which is already unsuported. I am changing the version to '27', the latest supported release. Please check whether this bug is still an issue on the '27' release. If you find this bug not being applicable on this release, please close it.
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.