844f420037
I want some rpm scripts to be modular, so that e.g. adding new automatic dependencies does not require ad hoc modifications. The plan is as follows: I am going to manage methods. Methods are scripts which e.g. implement particular dependency detection. The set of methods is defined by its suffix, so that /usr/lib/rpm/*.req are all "req" methods (the "req" method set). Hereby I provide two functions which abstract the usage of method sets. 1) methods=$(SetupMethods SETID WANTED_METHODS) Returns (prints) the list of active methods identified by SETID. The SETID argument, according to the above, should be filename suffix. Performs a check if all WANTED_METHODS are available. WANTED_METHODS is a space and/or comma separated list of method basenames, e.g. "perl" for /usr/lib/rpm/perl.req. The list of WANTED_METHODS is also interpreted according to AutoReqProv tag rules, i.e. "yes" to enable all methods, "no" to disable all methods, "noperl" to exclude "perl" etc. When no methods are active, the output string is guaranteed to be empty. 2) RunMethods SETID "$methods" [CMD...] Executes method set scripts identified by SETID; the list of methods "$methods" must be obtained from SetupMethods. CMD can warp method script execution. |
||
---|---|---|
.. | ||
.cvsignore | ||
brp-adjust_libraries.in | ||
brp-alt.in | ||
brp-bytecompile_python.in | ||
brp-cleanup.in | ||
brp-compress.in | ||
brp-fix-perms.in | ||
brp-fixup.in | ||
brp-strip.in | ||
brp-verify_elf.in | ||
check-files.in | ||
compress_files.in | ||
convertrpmrc.sh | ||
cpanflute | ||
cpanflute2 | ||
cross-build | ||
delayed_rebuilddb | ||
files.req.list | ||
find-lang.in | ||
find-package.in | ||
find-prov.pl | ||
find-provides.perl | ||
find-req.pl | ||
find-requires.perl | ||
fixup-binconfig.in | ||
fixup-libraries | ||
fixup-libtool.in | ||
fixup-pkgconfig.in | ||
functions | ||
get_magic.pl | ||
getpo.sh | ||
http.req | ||
javadeps.c | ||
ldd.in | ||
magic.prov | ||
magic.req | ||
Makefile.am | ||
pam.prov.in | ||
pam.req.in | ||
perl.prov | ||
perl.req | ||
pkgconfig.prov.in | ||
pkgconfig.req.in | ||
rpm2cpio.sh | ||
rpm.daily | ||
rpm.log | ||
rpm.xinetd | ||
rpmdiff | ||
rpmdiff.cgi | ||
shell.prov.in | ||
shell.req.in | ||
shlib.req.awk | ||
Specfile.pm | ||
sql.prov | ||
sql.req | ||
strip_files.in | ||
tcl.req | ||
trpm | ||
u_pkg.sh | ||
verify-elf.in | ||
vpkg-provides2.sh | ||
vpkg-provides.sh |