public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - fix disk space checking with erasures present in transaction (#561160)
Date: Mon, 23 Nov 2026 09:26:28 GMT	[thread overview]
Message-ID: <179542598891.1.5232138382101645655.rpms-rpm-eb0cb89c6394@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : eb0cb89c63948340ed666760d824a0529c86668b
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date   : 2010-02-06T10:12:44+00:00
Stats  : +49/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/eb0cb89c63948340ed666760d824a0529c86668b?branch=pmatilai-v6

Log:
- fix disk space checking with erasures present in transaction (#561160)

---
diff --git a/rpm-4.8.0-erasure-dsi.patch b/rpm-4.8.0-erasure-dsi.patch
new file mode 100644
index 0000000..b4ca608
--- /dev/null
+++ b/rpm-4.8.0-erasure-dsi.patch
@@ -0,0 +1,46 @@
+commit 4e4aec28c544f2884cb76be37d508f376db5cb7c
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date:   Thu Feb 4 15:55:16 2010 +0200
+
+    Handle erased packages wrt disk-space problem reporting (RhBug:561160)
+    - erased packages in the transaction cause space needs to shrink, which
+      commit 2222e81e1cf74bbf78acb9969592ab06e2289929 failed to take into
+      account, causing false disk space errors from unaffected packages
+    - adjust obneeded and oineeded when the requirements shrink
+    - new disk space problems can only occur when the requirements grow,
+      change the pmtsCheckDSIProblems() check to reflect that (although not
+      strictly necessary)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index d913258..7d12eeb 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -219,6 +219,10 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
+ 
+     if (fixupSize)
+ 	dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize);
++
++    /* adjust bookkeeping when requirements shrink */
++    if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded;
++    if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded;
+ }
+ 
+ static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
+@@ -238,7 +242,7 @@ static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
+     for (; dsi->bsize; dsi++) {
+ 
+ 	if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
+-	    if (dsi->bneeded != dsi->obneeded) {
++	    if (dsi->bneeded > dsi->obneeded) {
+ 		rpmpsAppend(ps, RPMPROB_DISKSPACE,
+ 			rpmteNEVRA(te), rpmteKey(te),
+ 			dsi->mntPoint, NULL, NULL,
+@@ -248,7 +252,7 @@ static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
+ 	}
+ 
+ 	if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
+-	    if (dsi->ineeded != dsi->oineeded) {
++	    if (dsi->ineeded > dsi->oineeded) {
+ 		rpmpsAppend(ps, RPMPROB_DISKNODES,
+ 			rpmteNEVRA(te), rpmteKey(te),
+ 			dsi->mntPoint, NULL, NULL,

diff --git a/rpm.spec b/rpm.spec
index 29696e5..827ca8c 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -47,6 +47,7 @@ Patch201: rpm-4.8.0-verify-exitcode.patch
 Patch202: rpm-4.8.0-pythondeps-parallel.patch
 Patch203: rpm-4.8.0-python-bytecompile.patch
 Patch204: rpm-4.8.0-lazy-statfs.patch
+Patch205: rpm-4.8.0-erasure-dsi.patch
 
 # These are not yet upstream
 Patch301: rpm-4.6.0-niagara.patch
@@ -199,6 +200,7 @@ packages on a system.
 %patch202 -p1 -b .pythondeps-parallel
 %patch203 -p1 -b .python-bytecompile
 %patch204 -p1 -b .lazy-statfs
+%patch205 -p1 -b .erasure-dsi
 
 %patch301 -p1 -b .niagara
 %patch302 -p1 -b .geode
@@ -418,6 +420,7 @@ exit 0
 * Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-8
 - more fixes to postscript provides extractor (#562228)
 - avoid accessing unrelated mount points in disk space checking (#547548)
+- fix disk space checking with erasures present in transaction (#561160)
 
 * Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-7
 - couple of fixes to the postscript provides extractor (#538101)

                 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=179542598891.1.5232138382101645655.rpms-rpm-eb0cb89c6394@fedoraproject.org \
    --to=pmatilai@fedoraproject.org \
    --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