Ticket #3789: remove faulty test in rpm helper to detect CONFLICTS tag

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
Yury V. Zaytsev 2018-05-27 14:42:25 +02:00
parent b692136645
commit b44bfee6bf
3 changed files with 2 additions and 33 deletions

View File

@ -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().

View File

@ -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

View File

@ -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 <TEMPLATE> <PACKAGE_FILE>'.
#