summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-04-25 12:17:19 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-04-29 11:25:35 +0300
commit2cfbbc2728346d02dd2eb334f2cef46d85953e30 (patch)
treeeab657b17880a9d36d1d1159f315966dc7cbb5f2
parent329e2ec47f6cd3bc7ecf85abd9f2ab179c59914f (diff)
downloadrpm-2cfbbc2728346d02dd2eb334f2cef46d85953e30.tar.gz
Revert "Fix shared colored files not removed on erasure regression in >= 4.14.0"
This causes a worse regression by removing files on update, revert for further investigation. This reverts commit 9e4caf0fc536d1244b298abd9dc4c535b6560d69.
-rw-r--r--lib/transaction.c34
-rw-r--r--tests/rpme.at2
2 files changed, 5 insertions, 31 deletions
diff --git a/lib/transaction.c b/lib/transaction.c
index ee3552c48..456c0c6de 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -516,28 +516,6 @@ static void handleInstInstalledFile(const rpmts ts, rpmte p, rpmfiles fi, int fx
}
}
-static rpmFileAction getSkipAction(rpmfiles files, int i)
-{
- rpmFileAction action = FA_UNKNOWN;
-
- switch (rpmfilesFState(files, i)) {
- case RPMFILE_STATE_REPLACED:
- case RPMFILE_STATE_NOTINSTALLED:
- action = FA_SKIPNSTATE;
- break;
- case RPMFILE_STATE_NETSHARED:
- action = FA_SKIPNETSHARED;
- break;
- case RPMFILE_STATE_WRONGCOLOR:
- action = FA_SKIPCOLOR;
- break;
- default:
- break;
- }
-
- return action;
-}
-
/**
* Update disk space needs on each partition for this package's files.
*/
@@ -706,22 +684,16 @@ assert(otherFi != NULL);
/* Here is an overlapped added file we don't want to nuke. */
if (rpmfsGetAction(otherFs, otherFileNum) != FA_ERASE) {
/* On updates, don't remove files. */
- if (!getSkipAction(otherFi, otherFileNum)) {
- rpmfsSetAction(fs, i, FA_SKIP);
- break;
- }
+ rpmfsSetAction(fs, i, FA_SKIP);
+ break;
}
/* Here is an overlapped removed file: skip in previous. */
rpmfsSetAction(otherFs, otherFileNum, FA_SKIP);
}
if (XFA_SKIPPING(rpmfsGetAction(fs, i)))
break;
-
if (rpmfilesFState(fi, i) != RPMFILE_STATE_NORMAL) {
- rpmFileAction skip = getSkipAction(fi, i);
- if (skip) {
- rpmfsSetAction(fs, i, skip);
- }
+ rpmfsSetAction(fs, i, FA_SKIP);
break;
}
diff --git a/tests/rpme.at b/tests/rpme.at
index ec73700c3..f46d64a6b 100644
--- a/tests/rpme.at
+++ b/tests/rpme.at
@@ -167,6 +167,7 @@ AT_CLEANUP
# Test that shared colored files actually get removed regardless of order 1
AT_SETUP([rpm -e and verify colored files removed 2.1])
+AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
@@ -191,6 +192,7 @@ AT_CLEANUP
# Test that shared colored files actually get removed regardless of order 2
AT_SETUP([rpm -e and verify colored files removed 2.2])
+AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([