- Turn expandMacros() into a wrapper around internal doExpandMacros()
which returns the expanded string in a newly allocated buffer, use
the internal version for rpmExpand() too.
- In the cases where expandT() was called with strlen(source) we can
now just bypass it and call expandMacro() directly, avoiding an
unnecessary string copy.
- This matches ffread() and read() much better, avoiding pile of casts.
- By some stroke of genious, glibc cookie interfaces disagree with the
other file stream protos by using char * for buf. Argh. Add explicit
cast for the schizophrenia.
- Enums are fine for defining the bitfield flags, but the bitfield
itself is not an enumeration. Add a separate typedef on "rpmFlags"
type (presenting a bitfield of flags) for all of these. Compilers
hardly care, but the typedefs give a nice visual clue for
us humans using these flags far away from ho^H^H definitions.
- These are internal helpers only, all refcount users need to use
fooFree() or similar for correct operation. Add fwd declarations
where necessary to avoid moving code around unnecessarily.
- We could add these back later as aliases to fooFree() but for now,
just get them out of the way.
- Commit 05b2d979e8 caused the
_USE_LIBIO test in rpmio.c to always fail as <stdio.h> wasn't included
yet at the time of the check, causing silent fallback to not
using libio even if actually available. Which in turn revealed
funky other little bugs, addressed in commits
d960e8c187 and
be3c34dd15. Ptooey.
- We were adding a trailing newline to urlhelper command line passed
to execvp(), with the newline ending up in the URL passed to curl.
Many servers dont seem to mind the extra newline, but some do. Oh well...
- RFC-4880 doesn't requires unix-style line-endings, we shouldn't either.
This is probably still oversly strict as RFC-4880 appears to permit
any whitespace to follow armor headers but ... shrug.
- The equivalent used to be possible in 4.4.x era as the value tables
were all exported, but this way we need to export far less
and the implementation details stay internal.
- Returns the newly created argv instead of useless "this always returns 0"
- By default make a "real" split, including empty strings
- Flags argument allows controlling behavior, for now only flag is to
preserve argvSplit() behavior but leaves room for future enhancements
such as quoted splitting etc
- Elf dependency extraction code code lifted from rpmfcELF() and refactored
to saner pieces. Having it in separate executable also frees librpmbuild
of libelf dependency, clean up the unnecessary linkage etc from
autofoo
- This lets internal dependency generator for elf files be
overridden without losing file coloring (which is required for
correct multilib handling). It also permits non-native elf files
(eg when cross-building) to be handled by providing a custom
elf dependency helper
- On the flip side, this inevitably slows down builds somewhat as
two fork-exec's are needed for every elf file, but unlike invoking
something like the python interpreter, this is a slim helper...
- All dependency extractors of the internal dependency generator are now
external helpers (how twisted is that, huh? :) and thus can be customized
and filtered through %__foo_provides|requires macros
- the "fix" breaks seemingly legitimate use in fedora font package
macros, possibly some funky interaction with %{lua: } macros or something
- this reverts commit f895acd285.
- this has been masked by system.h including <netdb.h> which apparently
brought in <stdint.h> as a side-effect
- commit 5c084f842a broke compilation
without capability support as <sys/capability.h> also happens to bring
in <stdint.h>
- just two places where needed, dont pollute system.h needlessly
- include depending on HAVE_MMAP instead of separately checking for
sys/mman.h, if sys/mman.h doesn't exist or is broken HAVE_MMAP wont be set
- move the includes out of system.h, not commonly needed
- <poll.h> is conditional as we actually provide a fallback through select(),
but for <sys/select.h> missing there's no fallback so doesn't make
much sense to test for (and both poll.h and sys/select.h are posix anyway...)