| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Parsing a spec, even unsuccessfully, will affect the global macro
state in any number of ways that may affect the following operations
in unpredictable ways. Lacking any saner way to do this, reset the
entire global macro state after each spec parse in rpmspec and spec
query code (rpmbuild already does this) while maintaining possible
cli-specified target and rcfile.
|
|
|
|
|
|
|
|
| |
Commit d2f48e93d32e222d4727b9684d2032f9bb9fc498 moved the --target
argument to be global, but didn't completely remove the local target
variable from rpmspec.c, or the code that used it to trigger re-loading
the rpm configuration files (which is now handled by the global argument
callback in poptALL.c).
|
|
|
|
|
|
|
|
|
|
| |
As specifying target will load & set macro definitions according to
target specified, it's still useful to provide it anywhere where ie.
--eval may be used, as by specifying --target first, it'll change the
target specific macros to load which is perfectly sane and useful for
checking macro specific definitions.
Remove now redundant --target= argument for rpmspec as it's now global.
|
|
|
|
|
|
|
| |
When --builtrpms is used then rpmspec operates only on the binary
package headers of packages which would be built from spec. That means
ignoring package headers of packages that won't be built from spec
i. e. ignoring package headers of packages without file section.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The RPM code contains setprogname()/getprogname() support implemented through compatiblity layer with very old GLIBC (internals supported back to '95 and earlier), before stabilization of the GNU C library. This compatiblity layer (__progname, __assert_progname, setprogname()) is supposed to support well archaic GLIBC, but on the other hand it pollutes the library namespace and introduces unpredicable compillation errors on BSD systems.
The functions setprogname() and getprogname() are natively supported in NetBSD and work the same way as __progname from the GNU C library (they are even implemented in the same way - but with a slightly changed logic). The support for very old (20 years and older) GNU C Library is obfuscating the code, because it uses defines over defines without a word of explaination why to do so.
It's important to note that the setprogname()/getprogname() was inconstiently implemented in the codebase, duplicating the code and/or functionality.
Add new generic functions getprogname() and setprogname() and bind it to:
- the current and for two decades stable GNU LIB C implementation,
- the current NetBSD implementation (introduces to NetBSD in 2002),
- fallback reimplementation functions of the setprogname() and getprogname() functionality for other systems.
Don't support anymore old GNU Lib C internals and don't support older NetBSD systems, as they aren't supported for many years.
Add to the codebase comments explaining the relevant codeparts.
|
|
|
|
|
|
|
|
|
|
| |
In the query mode, rpmspecQuery puts the parser into non-build mode
by invoking rpmSpecParse with (RPMSPEC_ANYARCH|RPMSPEC_FORCE) flags.
The same flags should be applied in the parse mode, so that it is
possible to preprocess specfiles separately, i.e. without also
installing sources and patches.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
|
| |
|
|
|
|
|
| |
- This is somewhat like 'gcc -E', useful for analyzing/troubleshooting
what happens inside the preprocessing.
|
| |
|
|
|
|
|
| |
- Use a separate table for the tool-specific options, include that from
the "master" option table to get option group summary in --help.
|
| |
|
|
|
|
|
| |
- Instead of including the entire rpmQueryPoptTable in rpmspec and
showing several bogus options, support --qf/--queryformat "manually"
|
| |
|
| |
|
|
- Avoids having to link /bin/rpm with librpmbuild and everything it
might bring in (eg libmagic) which are not needed for core operation.
- Minimally preserve backwards compatibility with popt exec alias
|