2 # This file gets source'd into our rpm helper.
4 # It imitates the 'rpm' program by overriding a few functions.
8 TAGSF
="$MC_TEST_EXTFS_INPUT"
10 .
"$MC_TEST_EXTFS_CONFIG_SH" # Gain access to $PERL.
12 # ----------------------------------------------------------------------------
15 # Imitates 'rpm -qp --qf <TEMPLATE> <PACKAGE_FILE>'.
17 # (It ignores <PACKAGE_FILE>, using our input instead.)
19 # E.g.: given "Name: %{NAME} Ver: %{VERSION}",
20 # prints "Name: php-pear-Twig Ver: 1.0.0".
28 do $tagsf or die("$tagsf: $!");
30 $tmplt =~ s/%\{(.*?)\}/
31 (my $tag = $1) =~ s,^RPMTAG_,,; # Tag names may be specified with or without this prefix.
32 exists $tags->{$tag} ? $tags->{$tag} : "(none)"
38 RPM_QUERY_FMT
=rpm_qf
# Tell the helper to use it instead of the 'rpm' binary.
40 # ----------------------------------------------------------------------------
47 mcrpmfs_getDesription
()
52 # ----------------------------------------------------------------------------