From b44bfee6bf04ad2aa3742db00f8775895820c4f3 Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Sun, 27 May 2018 14:42:25 +0200 Subject: [PATCH] Ticket #3789: remove faulty test in rpm helper to detect CONFLICTS tag Signed-off-by: Yury V. Zaytsev --- src/vfs/extfs/helpers/rpm | 14 +------------ .../extfs/helpers-list/data/rpm.custom.output | 1 + .../extfs/helpers-list/data/rpm.rewrite.sh | 20 ------------------- 3 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/vfs/extfs/helpers/rpm b/src/vfs/extfs/helpers/rpm index cf17ac9bf..b8e0f5f13 100755 --- a/src/vfs/extfs/helpers/rpm +++ b/src/vfs/extfs/helpers/rpm @@ -76,11 +76,6 @@ rpm_filename=$1; shift FILEPREF="-r--r--r-- 1 root root " -mcrpmfs_getSupportedTags() -{ - rpm --querytags -} - mcrpmfs_getDesription() { $RPM -qip "${rpm_filename}" @@ -88,13 +83,6 @@ mcrpmfs_getDesription() mcrpmfs_getAllNeededTags() { - supportedTags=`mcrpmfs_getSupportedTags` - if test "`echo supportedTags | grep -c CONFLICTS`" -eq 1; then - tag_CONFLICTS="|CONFLICTS=%{CONFLICTS}" - else - tag_CONFLICTS="" - fi - $RPM_QUERY_FMT \ "|NAME=%{NAME}"\ "|VERSION=%{VERSION}"\ @@ -109,7 +97,7 @@ mcrpmfs_getAllNeededTags() "|REQUIRES=%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}"\ "|OBSOLETES=%{OBSOLETES}"\ "|PROVIDES=%{PROVIDES} %{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}"\ -${tag_CONFLICTS}\ +"|CONFLICTS=%{CONFLICTS}"\ "|PACKAGER=%{PACKAGER}" \ "${rpm_filename}" \ | tr '\n' ' ' # The newlines in DESCRIPTION mess with the sed script in mcrpmfs_getOneTag(). diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.custom.output b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.output index e743a9465..c4f7b7bd9 100644 --- a/tests/src/vfs/extfs/helpers-list/data/rpm.custom.output +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.output @@ -36,5 +36,6 @@ dr-xr-xr-x 3 0 0 0 2017-01-05 00:00:00 INFO -r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/REQUIRES -r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/OBSOLETES -r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/PROVIDES +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/CONFLICTS -r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/CHANGELOG -r--r--r-- 1 0 0 0 2017-01-05 00:00:00 CONTENTS.cpio diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh b/tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh index 78280380f..08867fadd 100644 --- a/tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh @@ -11,26 +11,6 @@ TAGSF="$MC_TEST_EXTFS_INPUT" # ---------------------------------------------------------------------------- -# -# Overrides helper's. -# -# Imitates 'rpm --querytags'. -# -# @Mock -# -mcrpmfs_getSupportedTags() -{ - $PERL -e ' - $tagsf = $ARGV[0]; - - do $tagsf or die("$tagsf: $!"); - print join("\n", keys %$tags); - ' \ - "$TAGSF" -} - -# ---------------------------------------------------------------------------- - # # Imitates 'rpm -qp --qf