rpm-build/scripts
Alexey Tourbin 844f420037 scripts/functions: implemented SetupMethods() and RunMethods()
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.
2007-03-11 14:59:44 +03:00
..
.cvsignore re-added .lclintrc and .cvsignore files from CVS 2002-03-25 20:27:37 +00:00
brp-adjust_libraries.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
brp-alt.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
brp-bytecompile_python.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
brp-cleanup.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
brp-compress.in scripts/brp-compress.in: 2006-09-16 22:20:03 +00:00
brp-fix-perms.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
brp-fixup.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
brp-strip.in scripts/brp-compress.in: 2006-09-16 22:20:03 +00:00
brp-verify_elf.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
check-files.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
compress_files.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
convertrpmrc.sh added cvsid 2003-11-08 19:52:04 +00:00
cpanflute sync with rpm4 branch: s/redhat/altlinux/g 2002-03-25 21:48:59 +00:00
cpanflute2 sync with rpm4 branch: s/redhat/altlinux/g 2002-03-25 21:48:59 +00:00
cross-build sync with rpm4 branch: s/redhat/RPM/g 2002-03-25 21:50:17 +00:00
delayed_rebuilddb sync with rpm4 branch: added new files 2002-03-25 20:37:46 +00:00
files.req.list scripts/files.req.list: Add /etc/udev/rules.d 2007-02-11 21:26:45 +00:00
find-lang.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
find-package.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
find-prov.pl Initial revision 2002-03-25 20:16:26 +00:00
find-provides.perl Initial revision 2002-03-25 20:16:26 +00:00
find-req.pl Initial revision 2002-03-25 20:16:26 +00:00
find-requires.perl Initial revision 2002-03-25 20:16:26 +00:00
fixup-binconfig.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
fixup-libraries Removed cvsid tags. 2006-05-14 17:05:34 +04:00
fixup-libtool.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
fixup-pkgconfig.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
functions scripts/functions: implemented SetupMethods() and RunMethods() 2007-03-11 14:59:44 +03:00
get_magic.pl Initial revision 2002-03-25 20:16:26 +00:00
getpo.sh Initial revision 2002-03-25 20:16:26 +00:00
http.req Initial revision 2002-03-25 20:16:26 +00:00
javadeps.c sync with rpm4 branch: added new files 2002-03-25 20:37:46 +00:00
ldd.in enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels 2007-03-06 17:23:41 +03:00
magic.prov Initial revision 2002-03-25 20:16:26 +00:00
magic.req Initial revision 2002-03-25 20:16:26 +00:00
Makefile.am Implemented pkgconfig reqprov support and enabled it by default. 2006-02-02 01:51:38 +00:00
pam.prov.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
pam.req.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
perl.prov updated version from at@ 2003-09-12 16:27:18 +00:00
perl.req fix parser from perl maintainer 2003-09-22 13:56:20 +00:00
pkgconfig.prov.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
pkgconfig.req.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
rpm2cpio.sh Initial revision 2002-03-25 20:16:26 +00:00
rpm.daily sync with rpm4 branch 2002-03-25 21:51:30 +00:00
rpm.log Initial revision 2002-03-25 20:16:26 +00:00
rpm.xinetd Initial revision 2002-03-25 20:16:26 +00:00
rpmdiff Initial revision 2002-03-25 20:16:26 +00:00
rpmdiff.cgi Initial revision 2002-03-25 20:16:26 +00:00
shell.prov.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
shell.req.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
shlib.req.awk Add shlib.req.awk 2006-01-11 00:39:39 +00:00
Specfile.pm Initial revision 2002-03-25 20:16:26 +00:00
sql.prov Initial revision 2002-03-25 20:16:26 +00:00
sql.req Initial revision 2002-03-25 20:16:26 +00:00
strip_files.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
tcl.req fixed perl syntax 2003-09-22 13:54:41 +00:00
trpm Initial revision 2002-03-25 20:16:26 +00:00
u_pkg.sh Initial revision 2002-03-25 20:16:26 +00:00
verify-elf.in Removed cvsid tags. 2006-05-14 17:05:34 +04:00
vpkg-provides2.sh Initial revision 2002-03-25 20:16:26 +00:00
vpkg-provides.sh Initial revision 2002-03-25 20:16:26 +00:00