Accepting request 955873 from Base:System

- Fix minimize_writes not minimizing writes since 4.15 regression

OBS-URL: https://build.opensuse.org/request/show/955873
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=294
This commit is contained in:
Dominique Leuenberger 2022-02-22 20:17:35 +00:00 committed by Git OBS Bridge
commit 56d9c69514
3 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,31 @@
commit 03f146e955e099c24f7a49eff461645e1c0a0fd7
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Thu Jan 13 11:25:30 2022 +0200
Fix minimize_writes not minimizing writes since 4.15 regression
Commit 13f70e3710b2df49a923cc6450ff4a8f86e65666 caused minimize_writes
to actually not minimize anything since fsmVerify() only "verifies"
the thing does NOT exist anymore when it exist. Sigh.
FA_TOUCH needs different kind of verification, stat the file instead
to see if it needs creating afterall. This is all soooo broken...
Fixes: #1881
--- lib/fsm.c.orig
+++ lib/fsm.c
@@ -945,7 +945,12 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
}
/* Assume file does't exist when tmp suffix is in use */
if (!fp->suffix) {
- rc = fsmVerify(fp->fpath, fi);
+ if (fp->action == FA_TOUCH) {
+ struct stat sb;
+ rc = fsmStat(fp->fpath, 1, &sb);
+ } else {
+ rc = fsmVerify(fp->fpath, fi);
+ }
} else {
rc = RPMERR_ENOENT;
}

View File

@ -3,6 +3,12 @@ Tue Feb 1 12:47:02 UTC 2022 - Dirk Müller <dmueller@suse.com>
- invoke find-lang.sh with bash, it is a bash script (bsc#1195391)
-------------------------------------------------------------------
Fri Jan 28 17:00:15 CEST 2022 - simon.vogl@gmx.net
- Fix minimize_writes not minimizing writes since 4.15 regression
new patch: 0001-fix-minimize_writes.patch
-------------------------------------------------------------------
Fri Jan 28 14:19:02 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -118,6 +118,7 @@ Patch132: verbosearg.diff
Patch133: zstdpool.diff
Patch134: zstdthreaded.diff
Patch135: ocaml-cmxs.diff
Patch136: 0001-fix-minimize_writes.patch
Patch200: finddebuginfo.diff
Patch201: finddebuginfo-absolute-links.diff
Patch202: debugsubpkg.diff
@ -246,7 +247,7 @@ rm -rf sqlite
%patch -P 100 -P 102 -P 103
%patch -P 117
%patch -P 122 -P 123 -P 131 -P 132 -P 133 -P 134
%patch -P 135
%patch -P 135 -P 136
# debugedit patches
pushd debugedit-5.0