Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
A) use RPMTAG_SUGGESTS and RPMTAG_ENHANCES to store them.
This is different to upstream, which uses RPMSENSE_MISSINGOK
and RPMTAG_REQUIRES/RPMTAG_PROVIDES instead. I chose different
tags because I wanted to be compatible. The point is that
applications that don't know about the new MISSINGOK semantics
will mis-interpret the provides/requires otherwise, which
I deemed to risky.
B) use RPMSENSE_STRONG to support a "strong" version, "Recommends"
instead of "Suggests" and "Supplements" instead of "Enhances".
|
|
- Memory use isn't typically that critical during build, but saving
a little bit of it doesn't hurt anyway...
|
|
- argiAdd() isn't as costly as argvAdd(), but it still involves unnecessary
reallocation on every addition as the number of files is predetermined,
and each file has an associated class index.
- Additionally fixes a mostly harmless glitch introduced in commit
65e616cc9fdd00f523939088fab1070021b9f742: the pool id's are one larger
than the indexes we store in headers, take this into account in the
debug output.
|
|
- argiAdd() isn't as costly as argvAdd(), but it still involves unnecessary
reallocation on every addition as the number of files is predetermined,
and each file has an associated color (whether its zero or something else)
|
|
- argvAdd() gets more and more costly as the number of files increase,
use a plain old string array where one is called for: the size
is predetermined (from another argv) and we're just copying the
strings for internal storage here. We do need to pay a little bit
more attention to details now though.
|
|
- The pool is mostly just a dumb storage space for this case, but
insertion to pool is far more efficient than argv search, add,
sort operation. The order does not matter as the actual information
is encoded in the string and then painfully parsed out again. This
could really use a special-purpose data structure for sanity but...
|
|
- The string pool is a natural fit for this and much more efficient
when the number of files (and classes) is large.
- This does have an effect on the generated classdict array: it's no
longer sorted, and we no longer always (possibly unnecessarily)
insert an empty string and "directory" in it, but only when they
actually exist. Neither change makes any difference for usage,
unless some 3rd party software is making assumptions about the
classdict contents they shouldn't be making (very unlikely anyway)
|
|
|
|
- There's no (relevant) additional information to be gained from passing
directories to libmagic and we already have this info available in the
file mode. This permits nice and easy handling of %ghost directories
(related to RhBug:839656)
|
|
- Previously packages which had no files or for which automatic
dependency generation was partially or fully disabled didn't get
any of their dependencies printed out at build-time. This doesn't
affect the actual recorded dependencies, only the "debugging"
output during package builds.
|
|
- The previous code was violating the "golden rules of select()" by
possibly skipping processing of fd's that were included in the
select() set. Also restarting the entire loop should not be
necessary in case of EINTR select(), our conditions do not change
in that situation.
|
|
- As we're not actually /doing/ anything with signals here, the self-pipe
is not needed: select() will get interrupted and re-evaluated when the
child exits so we can't get stuck there.
- Free "I spotted a classic dailywtf overcomplication" t-shirt goes to
Michael Schroeder for pointing this out.
|
|
- There could, at least in theory, still be data to read after
we receive SIGCHLD. Stop the loop on EOF on read instead.
Thanks to Michael Schroeder for pointing this out.
|
|
- Remove redundant NULL check, rpmfiNext() handles it
- Move variables to local scope(s) from function scope where
appropriate, remove dead NULL-assignments on free
- Log the "Finding ..." messages /before/ executing the (possibly
long-running) dependency generation helpers
- rpmExpand() never returns NULL, don't bother testing for it
|
|
- No real chance of accidental misuse of freed data here...
|
|
- Replace umphteen dead NULL-assignments with a trash-n-burn memset()
- Since we're already testing for NULL, dont free NULL fc (not
that it matters)
|
|
- remove redundant xav re-initialization
- dont bother NULL'ing local variables on exit
|
|
- init genConfigDeps on declaration
- remove redundant NULL-checks: rpmfiNext() and rpmdsNext() check
for and handle NULL cleanly, no need to test here.
- remove pointless local fileattr variable
|
|
- Move ds declaration to local scope so there's no chance of
accidental use of already freed data, ds is not needed at
function scope.
|
|
|
|
- If runCmd() returns NULL there's no point in further processing,
rearrange things to avoid extra work in that case. As a side-effect
this also silences a false-positive NULL-deference warning from clang.
|
|
- This allows automatically wrapping generated dependencies into
macro-expanded namespaces, eg foo(depname) by specifying
__attr_namespace in the file attribute definition.
- Current generator scripts hardcode their namespaces but doing this
on rpm-level gives extra flexibility eg when building for alternative
versions/environments and frees generators from having to take care of
the formatting.
|
|
|
|
- Handling both rule-types identically not only makes things more
consistent but also adds exclude_flags support practically for free:
"exeonly" and "magic_and_path" are usable for excludes too now, ditto
for any other flags that might be added in the future.
|
|
- Allow "magic_and_path" flag to configure that files must
match both regexpes to be sent to the dependency generator.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
|
|
- don't check return values of functions that cannot fail
- remove "can't happen" asserts
- fail in case of empty file classifier
|
|
|
|
|
|
|
|
- Read any remaining data before exiting on SIGCHLD
- Only perform one read() per loop, otherwise it could block
- Handle EINTR while read()'ing
|
|
- This allows both excluding entire paths from dependency generation
and also excluding individual generated dependencies by regexes
settable from spec or other configuration.
- %__(provides|requires)_exclude regex controls is matched against
generated dependencies, %__(provides|requires)_exclude_from is
matched against the currently processed path, with buildroot
stripped out.
- We'll probably want some "higher level" macros to go with this,
but the mechanism is usable as-is already.
|
|
- Add a helper function for freeing regex pointers
- Move regMatch() to top of rpmfc.c, we'll need it shortly
|
|
- Split the macro name generation and grabbing of argv-style output
into yet another helper to reduce the clutter in rpmfcHelper()
before adding more stuff in there.
|
|
- 4.9 alpha used "pattern" but better fix the stupid name now than
have to live with the non-obvious name forever
|
|
- %__foo_exclude_pattern and %__foo_exclude_magic regex'es now allow
excluding attributes that would otherwise match.
|
|
- Every single package since rpm >= 3.0.4 or so has a versioned provide
through the automatically added N = VR provide, which hasn't gotten
tracked in all these years. Drop the useless dependency.
|
|
- Many of the scripts need to know the buildroot in order to figure
out correct resulting paths. This permits unifying the current
adhoc methods of passing the data to the scripts.
|
|
- New constructor rpmfcCreate() which takes buildroot as an argument,
and "flags" argument for future use. Calculate brlen at initialization
now that we can.
- Preserve rpmfcNew() as a compatibility wrapper as it's something
somebody could, in theory, have used legitimately.
|
|
|
|
- Many of these cases would be true enums from preambleList & similar,
except for the list terminating sentinel. Just switch all the
remaining rpmTag's to rpmTagVals to bring our enum-whacking to
a grande finale.
|
|
- Allows for more precise globbing, avoiding potential issues from
leftover / accidentally placed files in the fileattrs directory.
|
|
- Use a list of text keyword tokens to allow for more flags without
requiring adding special processing for every new flag we make
|
|
|
|
|
|
- Eliminate remaining (hopefully) C++ reserved keywords in librpmbuild
|
|
|
|
|
|
|
|
- Yank everything qualifying as "internal helper function" into
internal-only headers, loosely grouped as follows:
1) Everything involving spec-manipulation goes into rpmbuild_internal.h
2) All other miscellaneous helpers go into rpmbuild_misc.h
- This leaves us a rather minimal, and nearly useful API into librpmbuild:
Users need to be able to parse a spec, query or build (parts of) it
and free up the spec structure when done. This is what we have now,
various still exposed structures not counting.
|