mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #3751: extfs: rpm: introduce the $RPM_QUERY_FMT variable.
This minor refactoring will enable us to make this helper testable. Instead of doing: $RPM -qp --qf a b c we are now doing: $RPM_QUERY_FMT a b c In a future patch we'll then be able to point $RPM_QUERY_FMT to some mock program. Signed-off-by: Mooffie <mooffie@gmail.com>
This commit is contained in:
parent
3078e74afe
commit
65ebc83f88
@ -64,6 +64,7 @@ if rpm --nosignature --version >/dev/null 2>&1; then
|
||||
else
|
||||
RPM="rpm"
|
||||
fi
|
||||
RPM_QUERY_FMT="$RPM -qp --qf"
|
||||
RPM2CPIO="rpm2cpio"
|
||||
|
||||
SED="sed"
|
||||
@ -92,7 +93,7 @@ mcrpmfs_getAllNeededTags()
|
||||
tag_CONFLICTS=""
|
||||
fi
|
||||
|
||||
$RPM -qp --qf \
|
||||
$RPM_QUERY_FMT \
|
||||
"|NAME=%{NAME}"\
|
||||
"|VERSION=%{VERSION}"\
|
||||
"|RELEASE=%{RELEASE}"\
|
||||
@ -113,7 +114,7 @@ ${tag_CONFLICTS}\
|
||||
|
||||
mcrpmfs_getRawOneTag()
|
||||
{
|
||||
$RPM -qp --qf "$1" "${rpm_filename}"
|
||||
$RPM_QUERY_FMT "$1" "${rpm_filename}"
|
||||
}
|
||||
|
||||
mcrpmfs_getOneTag()
|
||||
|
Loading…
Reference in New Issue
Block a user