eb0cb8
- fix disk space checking with erasures present in transaction (#561160)
@@ -0,0 +1,46 @@
|
|
1
|
+
commit 4e4aec28c544f2884cb76be37d508f376db5cb7c
|
2
|
+
Author: Panu Matilainen <pmatilai@redhat.com>
|
3
|
+
Date: Thu Feb 4 15:55:16 2010 +0200
|
4
|
+
|
5
|
+
Handle erased packages wrt disk-space problem reporting (RhBug:561160)
|
6
|
+
- erased packages in the transaction cause space needs to shrink, which
|
7
|
+
commit 2222e81e1cf74bbf78acb9969592ab06e2289929 failed to take into
|
8
|
+
account, causing false disk space errors from unaffected packages
|
9
|
+
- adjust obneeded and oineeded when the requirements shrink
|
10
|
+
- new disk space problems can only occur when the requirements grow,
|
11
|
+
change the pmtsCheckDSIProblems() check to reflect that (although not
|
12
|
+
strictly necessary)
|
13
|
+
|
14
|
+
diff --git a/lib/transaction.c b/lib/transaction.c
|
15
|
+
index d913258..7d12eeb 100644
|
16
|
+
--- a/lib/transaction.c
|
17
|
+
+++ b/lib/transaction.c
|
18
|
+
@@ -219,6 +219,10 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
|
19
|
+
|
20
|
+
if (fixupSize)
|
21
|
+
dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize);
|
22
|
+
+
|
23
|
+
+ /* adjust bookkeeping when requirements shrink */
|
24
|
+
+ if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded;
|
25
|
+
+ if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded;
|
26
|
+
}
|
27
|
+
|
28
|
+
static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
|
29
|
+
@@ -238,7 +242,7 @@ static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
|
30
|
+
for (; dsi->bsize; dsi++) {
|
31
|
+
|
32
|
+
if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
|
33
|
+
- if (dsi->bneeded != dsi->obneeded) {
|
34
|
+
+ if (dsi->bneeded > dsi->obneeded) {
|
35
|
+
rpmpsAppend(ps, RPMPROB_DISKSPACE,
|
36
|
+
rpmteNEVRA(te), rpmteKey(te),
|
37
|
+
dsi->mntPoint, NULL, NULL,
|
38
|
+
@@ -248,7 +252,7 @@ static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
|
39
|
+
}
|
40
|
+
|
41
|
+
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
|
42
|
+
- if (dsi->ineeded != dsi->oineeded) {
|
43
|
+
+ if (dsi->ineeded > dsi->oineeded) {
|
44
|
+
rpmpsAppend(ps, RPMPROB_DISKNODES,
|
45
|
+
rpmteNEVRA(te), rpmteKey(te),
|
46
|
+
dsi->mntPoint, NULL, NULL,
|
@@ -47,6 +47,7 @@ Patch201: rpm-4.8.0-verify-exitcode.patch
|
|
47
47
|
Patch202: rpm-4.8.0-pythondeps-parallel.patch
|
48
48
|
Patch203: rpm-4.8.0-python-bytecompile.patch
|
49
49
|
Patch204: rpm-4.8.0-lazy-statfs.patch
|
50
|
+
Patch205: rpm-4.8.0-erasure-dsi.patch
|
50
51
|
|
51
52
|
# These are not yet upstream
|
52
53
|
Patch301: rpm-4.6.0-niagara.patch
|
@@ -199,6 +200,7 @@ packages on a system.
|
|
199
200
|
%patch202 -p1 -b .pythondeps-parallel
|
200
201
|
%patch203 -p1 -b .python-bytecompile
|
201
202
|
%patch204 -p1 -b .lazy-statfs
|
203
|
+
%patch205 -p1 -b .erasure-dsi
|
202
204
|
|
203
205
|
%patch301 -p1 -b .niagara
|
204
206
|
%patch302 -p1 -b .geode
|
@@ -418,6 +420,7 @@ exit 0
|
|
418
420
|
* Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-8
|
419
421
|
- more fixes to postscript provides extractor (#562228)
|
420
422
|
- avoid accessing unrelated mount points in disk space checking (#547548)
|
423
|
+
- fix disk space checking with erasures present in transaction (#561160)
|
421
424
|
|
422
425
|
* Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-7
|
423
426
|
- couple of fixes to the postscript provides extractor (#538101)
|