public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Lubos Kardos <lkardos@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - Add RPMCALLBACK_ELEM_PROGRESS callback type (needed by dnf)
Date: Mon, 23 Nov 2026 09:30:01 GMT [thread overview]
Message-ID: <179542620132.1.15570038509276601355.rpms-rpm-761a0d9ec720@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 761a0d9ec72098aa61ed536856e6a7b94704af85
Author : Lubos Kardos <lkardos@redhat.com>
Date : 2016-04-12T16:49:54+02:00
Stats : +80/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/761a0d9ec72098aa61ed536856e6a7b94704af85?branch=pmatilai-v6
Log:
- Add RPMCALLBACK_ELEM_PROGRESS callback type (needed by dnf)
---
diff --git a/rpm-4.13.0-elem-progress-callback.patch b/rpm-4.13.0-elem-progress-callback.patch
new file mode 100644
index 0000000..d24585e
--- /dev/null
+++ b/rpm-4.13.0-elem-progress-callback.patch
@@ -0,0 +1,75 @@
+From 448db68ceb5be3c7171b7ec0ea908d905792dc2f Mon Sep 17 00:00:00 2001
+From: Michal Domonkos <mdomonko@redhat.com>
+Date: Mon, 7 Dec 2015 17:13:26 +0100
+Subject: [PATCH] Add RPMCALLBACK_ELEM_PROGRESS callback type
+
+Currently, there's no callback type that would be issued per each
+transaction element. RPMCALLBACK_TRANS_PROGRESS is only issued during
+the prepare phase but not when packages are actually installed or
+erased. Likewise, RPMCALLBACK_INST_ST* and RPMCALLBACK_UNINST_ST* won't
+be issued if an install or erase operation is skipped for some reason (a
+script or package upgrade failure).
+
+Having such a callback would allow the Python API consumers to always
+know upfront which element is about to be processed, before any other
+callbacks are issued. This is important since not every callback type
+carries enough data about the subject package; while the INST types
+provide the user object passed to a former addInstall call, the UNINST
+types only provide the package name (which may not be unique within the
+transaction set).
+
+This commit adds such a callback.
+---
+ lib/rpmcallback.h | 1 +
+ lib/transaction.c | 4 ++++
+ python/rpmmodule.c | 1 +
+ 3 files changed, 6 insertions(+)
+
+diff --git a/lib/rpmcallback.h b/lib/rpmcallback.h
+index dfc22ab..f07892d 100644
+--- a/lib/rpmcallback.h
++++ b/lib/rpmcallback.h
+@@ -37,6 +37,7 @@ typedef enum rpmCallbackType_e {
+ RPMCALLBACK_SCRIPT_START = (1 << 16),
+ RPMCALLBACK_SCRIPT_STOP = (1 << 17),
+ RPMCALLBACK_INST_STOP = (1 << 18),
++ RPMCALLBACK_ELEM_PROGRESS = (1 << 19),
+ } rpmCallbackType;
+
+ /** \ingroup rpmts
+diff --git a/lib/transaction.c b/lib/transaction.c
+index 66888af..4f90782 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -1345,12 +1345,16 @@ exit:
+ static int rpmtsProcess(rpmts ts)
+ {
+ rpmtsi pi; rpmte p;
++ tsMembers tsmem = rpmtsMembers(ts);
+ int rc = 0;
++ int i = 0;
+
+ pi = rpmtsiInit(ts);
+ while ((p = rpmtsiNext(pi, 0)) != NULL) {
+ int failed;
+
++ rpmtsNotify(ts, NULL, RPMCALLBACK_ELEM_PROGRESS, i++,
++ tsmem->orderCount);
+ rpmlog(RPMLOG_DEBUG, "========== +++ %s %s-%s 0x%x\n",
+ rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
+
+diff --git a/python/rpmmodule.c b/python/rpmmodule.c
+index 0e3ab18..29753fd 100644
+--- a/python/rpmmodule.c
++++ b/python/rpmmodule.c
+@@ -512,6 +512,7 @@ static int initModule(PyObject *m)
+ REGISTER_ENUM(RPMCALLBACK_SCRIPT_START);
+ REGISTER_ENUM(RPMCALLBACK_SCRIPT_STOP);
+ REGISTER_ENUM(RPMCALLBACK_INST_STOP);
++ REGISTER_ENUM(RPMCALLBACK_ELEM_PROGRESS);
+
+ REGISTER_ENUM(RPMPROB_BADARCH);
+ REGISTER_ENUM(RPMPROB_BADOS);
+--
+1.9.3
+
diff --git a/rpm.spec b/rpm.spec
index ce91baf..b960b85 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -29,7 +29,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}28%{?dist}
+Release: %{?snapver:0.%{snapver}.}29%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2
@@ -74,6 +74,7 @@ Patch118: rpm-4.13.0-Use-pkg-dpaths-during-dependency-generation.patch
Patch119: rpm-4.13.0-Noarch-ExclusiveArch.patch
Patch120: rpm-4.13.0-redirect2null.patch
Patch121: rpm-4.13.0-lang-doc-directives.patch
+Patch122: rpm-4.13.0-elem-progress-callback.patch
# These are not yet upstream
Patch302: rpm-4.7.1-geode-i686.patch
@@ -585,6 +586,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Tue Apr 12 2016 Lubos Kardos <lkardos@redhat.com> 4.13.0-0.rc1.29
+- Add RPMCALLBACK_ELEM_PROGRESS callback type (needed by dnf)
+
* Wed Apr 06 2016 Lubos Kardos <lkardos@redhat.com> 4.13.0-0.rc1.28
- Fix non-working combination of %%lang and %%doc directive (#1254483)
reply other threads:[~2026-11-23 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542620132.1.15570038509276601355.rpms-rpm-761a0d9ec720@fedoraproject.org \
--to=lkardos@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox