rpms/rpm/devel rpm-4.8.0-erasure-dsi.patch, NONE, 1.1 rpm.spec, 1.385, 1.386
Panu Matilainen
pmatilai at fedoraproject.org
Sat Feb 6 10:12:44 UTC 2010
Author: pmatilai
Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8782
Modified Files:
rpm.spec
Added Files:
rpm-4.8.0-erasure-dsi.patch
Log Message:
- fix disk space checking with erasures present in transaction (#561160)
rpm-4.8.0-erasure-dsi.patch:
transaction.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- NEW FILE rpm-4.8.0-erasure-dsi.patch ---
commit 4e4aec28c544f2884cb76be37d508f376db5cb7c
Author: Panu Matilainen <pmatilai at 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,
Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.385
retrieving revision 1.386
diff -u -p -r1.385 -r1.386
--- rpm.spec 6 Feb 2010 10:09:15 -0000 1.385
+++ rpm.spec 6 Feb 2010 10:12:44 -0000 1.386
@@ -47,6 +47,7 @@ Patch201: rpm-4.8.0-verify-exitcode.patc
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 at 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 at redhat.com> - 4.8.0-7
- couple of fixes to the postscript provides extractor (#538101)
More information about the scm-commits
mailing list