- fix disk space checking with erasures present in transaction (#561160)
This commit is contained in:
parent
459c2d0f81
commit
eb0cb89c63
46
rpm-4.8.0-erasure-dsi.patch
Normal file
46
rpm-4.8.0-erasure-dsi.patch
Normal file
@ -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,
|
3
rpm.spec
3
rpm.spec
@ -47,6 +47,7 @@ Patch201: rpm-4.8.0-verify-exitcode.patch
|
|||||||
Patch202: rpm-4.8.0-pythondeps-parallel.patch
|
Patch202: rpm-4.8.0-pythondeps-parallel.patch
|
||||||
Patch203: rpm-4.8.0-python-bytecompile.patch
|
Patch203: rpm-4.8.0-python-bytecompile.patch
|
||||||
Patch204: rpm-4.8.0-lazy-statfs.patch
|
Patch204: rpm-4.8.0-lazy-statfs.patch
|
||||||
|
Patch205: rpm-4.8.0-erasure-dsi.patch
|
||||||
|
|
||||||
# These are not yet upstream
|
# These are not yet upstream
|
||||||
Patch301: rpm-4.6.0-niagara.patch
|
Patch301: rpm-4.6.0-niagara.patch
|
||||||
@ -199,6 +200,7 @@ packages on a system.
|
|||||||
%patch202 -p1 -b .pythondeps-parallel
|
%patch202 -p1 -b .pythondeps-parallel
|
||||||
%patch203 -p1 -b .python-bytecompile
|
%patch203 -p1 -b .python-bytecompile
|
||||||
%patch204 -p1 -b .lazy-statfs
|
%patch204 -p1 -b .lazy-statfs
|
||||||
|
%patch205 -p1 -b .erasure-dsi
|
||||||
|
|
||||||
%patch301 -p1 -b .niagara
|
%patch301 -p1 -b .niagara
|
||||||
%patch302 -p1 -b .geode
|
%patch302 -p1 -b .geode
|
||||||
@ -418,6 +420,7 @@ exit 0
|
|||||||
* Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-8
|
* Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-8
|
||||||
- more fixes to postscript provides extractor (#562228)
|
- more fixes to postscript provides extractor (#562228)
|
||||||
- avoid accessing unrelated mount points in disk space checking (#547548)
|
- 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
|
* Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-7
|
||||||
- couple of fixes to the postscript provides extractor (#538101)
|
- couple of fixes to the postscript provides extractor (#538101)
|
||||||
|
Loading…
Reference in New Issue
Block a user