public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - add support for Requires(posttrans) dependencies
Date: Mon, 23 Nov 2026 09:26:52 GMT [thread overview]
Message-ID: <179542601292.1.8780405702184809643.rpms-rpm-637e6c8e3610@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 637e6c8e3610decb744684ac1294e73e4179b07d
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2011-01-25T15:33:09+02:00
Stats : +93/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/637e6c8e3610decb744684ac1294e73e4179b07d?branch=pmatilai-v6
Log:
- add support for Requires(posttrans) dependencies
---
diff --git a/rpm-4.9.0-beta1-posttrans-deps.patch b/rpm-4.9.0-beta1-posttrans-deps.patch
new file mode 100644
index 0000000..f20cd75
--- /dev/null
+++ b/rpm-4.9.0-beta1-posttrans-deps.patch
@@ -0,0 +1,87 @@
+commit d7e2a04d68dea4d1c7dbaf457b5b4210dfa452f2
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Tue Jan 25 15:27:28 2011 +0200
+
+ Teach rpm about post-transaction dependencies
+ - %posttrans dependencies have their own peculiar semantics, they're
+ install-only dependencies which have no implications on ordering.
+
+diff --git a/build/parsePreamble.c b/build/parsePreamble.c
+index 3d8b859..e4f4e0a 100644
+--- a/build/parsePreamble.c
++++ b/build/parsePreamble.c
+@@ -309,6 +309,7 @@ static struct tokenBits_s const installScriptBits[] = {
+ { "rpmlib", RPMSENSE_RPMLIB },
+ { "verify", RPMSENSE_SCRIPT_VERIFY },
+ { "pretrans", RPMSENSE_PRETRANS },
++ { "posttrans", RPMSENSE_POSTTRANS },
+ { NULL, 0 }
+ };
+
+diff --git a/build/parseScript.c b/build/parseScript.c
+index d4b2293..87b3d58 100644
+--- a/build/parseScript.c
++++ b/build/parseScript.c
+@@ -139,7 +139,7 @@ int parseScript(rpmSpec spec, int parsePart)
+ break;
+ case PART_POSTTRANS:
+ tag = RPMTAG_POSTTRANS;
+- tagflags = 0;
++ tagflags = RPMSENSE_POSTTRANS;
+ progtag = RPMTAG_POSTTRANSPROG;
+ flagtag = RPMTAG_POSTTRANSFLAGS;
+ partname = "%posttrans";
+diff --git a/lib/formats.c b/lib/formats.c
+index 386bdd3..7ce4608 100644
+--- a/lib/formats.c
++++ b/lib/formats.c
+@@ -251,6 +251,8 @@ static char * deptypeFormat(rpmtd td, char * formatPrefix)
+ argvAdd(&sdeps, "prereq");
+ if (item & RPMSENSE_PRETRANS)
+ argvAdd(&sdeps, "pretrans");
++ if (item & RPMSENSE_POSTTRANS)
++ argvAdd(&sdeps, "posttrans");
+
+ if (sdeps) {
+ val = argvJoin(sdeps, ",");
+diff --git a/lib/order.c b/lib/order.c
+index 9cda649..3b0849d 100644
+--- a/lib/order.c
++++ b/lib/order.c
+@@ -149,7 +149,7 @@ static inline int addRelation(rpmts ts,
+ dsflags = rpmdsFlags(requires);
+
+ /* Avoid dependendencies which are not relevant for ordering */
+- if (dsflags & (RPMSENSE_RPMLIB|RPMSENSE_CONFIG|RPMSENSE_PRETRANS))
++ if (dsflags & (RPMSENSE_RPMLIB|RPMSENSE_CONFIG|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS))
+ return 0;
+
+ q = rpmalSatisfiesDepend(al, requires);
+diff --git a/lib/rpmds.h b/lib/rpmds.h
+index 75c1541..bf3ee2c 100644
+--- a/lib/rpmds.h
++++ b/lib/rpmds.h
+@@ -27,7 +27,8 @@ enum rpmsenseFlags_e {
+ RPMSENSE_LESS = (1 << 1),
+ RPMSENSE_GREATER = (1 << 2),
+ RPMSENSE_EQUAL = (1 << 3),
+- /* bits 4-5 unused */
++ /* bit 4 unused */
++ RPMSENSE_POSTTRANS = (1 << 5), /*!< %posttrans dependency */
+ RPMSENSE_PREREQ = (1 << 6), /* legacy prereq dependency */
+ RPMSENSE_PRETRANS = (1 << 7), /*!< Pre-transaction dependency. */
+ RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet. */
+@@ -70,11 +71,12 @@ typedef rpmFlags rpmsenseFlags;
+ RPMSENSE_RPMLIB | \
+ RPMSENSE_KEYRING | \
+ RPMSENSE_PRETRANS | \
++ RPMSENSE_POSTTRANS | \
+ RPMSENSE_PREREQ)
+
+ #define _notpre(_x) ((_x) & ~RPMSENSE_PREREQ)
+ #define _INSTALL_ONLY_MASK \
+- _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING|RPMSENSE_PRETRANS)
++ _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS)
+ #define _ERASE_ONLY_MASK \
+ _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN)
+
diff --git a/rpm.spec b/rpm.spec
index 10744bd..1e41822 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -22,7 +22,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}3%{?dist}
+Release: %{?snapver:0.%{snapver}.}4%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/rpm-4.8.x/%{name}-%{srcver}.tar.bz2
@@ -45,6 +45,7 @@ Patch100: rpm-4.9.0-beta1-rofs-rpmdb.patch
Patch101: rpm-4.9.0-beta1-index-rebuild.patch
Patch102: rpm-4.9.0-beta1-index-iteration.patch
Patch103: rpm-4.9.0-beta1-rpmdb-dsi.patch
+Patch104: rpm-4.9.0-beta1-posttrans-deps.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -213,6 +214,7 @@ packages on a system.
%patch101 -p1 -b .index-rebuild
%patch102 -p1 -b .index-iteration
%patch103 -p1 -b .rpmdb-dsi
+%patch104 -p1 -b .posttrans-deps
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -423,6 +425,9 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
+* Tue Jan 25 2011 Panu Matilainen <pmatilai@redhat.com> - 4.9.0-0.beta1.4
+- add support for Requires(posttrans) dependencies
+
* Fri Jan 21 2011 Panu Matilainen <pmatilai@redhat.com> - 4.9.0-0.beta1.3
- avoid division by zero in rpmdb size calculation (#671056)
- fix secondary index iteration returing duplicate at end (#671149)
reply other threads:[~2026-11-23 9:26 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=179542601292.1.8780405702184809643.rpms-rpm-637e6c8e3610@fedoraproject.org \
--to=pmatilai@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