Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
- parseForAttr() doesn't know whether it's dealing with a directory or
a file, so it can't know which defaults it should use.
Move all the decision making on which of the explicit/default/implicit
attributes into addFile() where we do know what kind of entry we're
dealing with, and only parse in parseForAttr().
- Update the test-case status to expect success now.
|
|
- Currently this fails expectedly due to RhBug:681540 on the last
directory of the test rpm.
|
|
|
|
- Preserve trailing slash if it exists, and also add one on explicit
%dir entires. This lets rpmGlob() and friends to skip any matching
files that might be present, fixing both test-cases in RhBug:505995.
|
|
- Only return directories if a pattern contains a trailing slash.
Use GLOB_ONLYDIR hint if available but as this is unreliable,
we need to stat the paths to be sure.
- Hysterically enough, rpm bundles its own copy of glob() which does
have GLOB_ONLYDIR but ATM it doesn't get build because HAVE_D_TYPE
isn't defined outside glibc build environment which is where our glob
originally came from...
|
|
- We know if we're already fts-walking by the way addFile() gets called,
dont corrupt fl->isDir for no good reason.
|
|
- In the unlikely event of filelist line being longer than BUFSIZ
we'd previously end up truncating the line, which is stupid
since we can just as easily make the buffer large enough.
|
|
- Avoids having to manually do search, sort, join, free etc for
no good reason. Could be further simplified with argvSplit() etc
and sanitized overall but leaving that for another day...
|
|
- Since the only thing where globs are not permitted are %dev entires,
check for device explicitcly in the glob part. Doh.
|
|
|
|
|
|
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
|
|
|
|
- This is somewhat like 'gcc -E', useful for analyzing/troubleshooting
what happens inside the preprocessing.
|
|
- Collect the preprocessed (conditionals, macros etc evaluated)
lines to a separate stringbuf, make rpmSpecGetSection() return
that on RPMBUILD_NONE "section" (hack, but so is abusing RPMBUILD_FOO
for the section here so shrug)
|
|
- Track the starting line in case copyNextLineFromOFI() indicates
a multiline-construct. If we get an EOF from readLineFromOFI()
while inside multiline read, its an illegal construct of some kind
and we can even spit out a reasonably meaningful error pointing
out the starting line number of the bad construct.
|
|
- For non-regular files we can easily generate this information based
on file mode + in case of symlinks, the link target is available
in the header elsewhere. This also means --fileclass will return
at least partial data for packages built with the external depgen.
- Clean up fileclassTag() a bit while at it, removing redundant fluff.
- Arguably this "magic" should be done inside rpmfiFClass() instead, but
that'd require changing the API to return malloced data.
|
|
- Kinda related to RhBug:661962, yum relies on callbacks to catch
install/erase errors but this is not accurate: on erase the
element can be ambiguous as the callback only gives a name (sigh).
In addition, elements can be skipped entirely if "parent" element
fails, in which case no callbacks are issued so these cases would go
completely unnoticed when relying on callbacks alone. te.Failed()
gives users such as yum a chance to have a look at the real status
of elements (after the transaction).
|
|
- Some software installs its own documentation and if you try to
combine it with %doc, rpmbuild will abort with mysterious
"cpio bad magic" or such errors because what was assumed to be
there was not, as %doc would 'rm -rf' the docdir upon first
invocation. I don't see any good reason to disallow sharing the
same directory for %doc and documentation installed by software
"make install" - the other alternative would be forcing %doc to
go to some other location, only making docs harder to find.
- Also at least Mageia (and prior to that Mandriva) has been doing
this for quite some time now.
|
|
- Somewhere between file 5.05 and 5.07 it started adding encoding
to script descriptions, eg "<mumble> script text executable" became
"<mumble> script, <encoding> text executable" breaking what had
been working for 10+ years in the case of old find-requires.
- Permit either comma or space after "script", this works for both
old and new file.
|
|
|
|
- ...means its been broken all along, sigh
|
|
- This would've caught the breakage introduced in commit
7e4415fcc5e11cfd4cd9d0dfe19568be73f15d74, but better late than never...
|
|
- Handle double [] "escaping" at RPM_PYRUN to avoid surprises when
its used on its own
- Spin python-wrapped AT_CHECK into a macro of its own (RPMPY_CHECK)
- What formerly was RPMPY_CHECK is now RPMPY_TEST: this represents
one entire testcase with all its setup and cleanup, whereas
RPMPY_CHECK (the new one) might be used several times within a
single test
|
|
- This broke in commit 7e4415fcc5e11cfd4cd9d0dfe19568be73f15d74,
the cases are not identical afterall: With non-keyed cursor
retrievals DB_NOTFOUND is returned when there's nothing more to
get, this is not an error situation.
|
|
|
|
- If called with an existing set, results are appended. Otherwise
return a newly allocated set.
|
|
|
|
|
|
- All current callers always supply non-NULL keyp, and requiring
this gives useful possibilities elsewhere
|
|
|
|
|
|
- Reduces the number of arguments to somewhat saner level and
eliminates another reincarnation of the dbt2set() + error handling
code littered all over the place.
|
|
- Allows multiple retrieves on a single cursor instance, dbiGetToSet()
is just a convenience wrapper around dbiCursorGetToSet() now.
- Creating and tearing down cursors isn't exactly terrifyingly
expensive but still measurable when lots of lookups are done.
|
|
|
|
|
|
|
|
|
|
- Use the new dbiGetToSet() for doing the actual work, reducing
fluff considerably
- Don't bother checking for NULLs where the lower levels do it
already (mi and keyp NULL-checks are necessary here though)
|
|
- Use the new dbiGetToSet() for doing the actual work, reducing
fluff considerably
- Dont bother checking for NULL db, rpmdbOpenIndex() does this anyway
- Return an error, not 0 (ie "not found") for NULL db and name
- Remove redundant dbtag variable, this is always RPMDBI_NAME
|
|
- This stuff is repeated in rpmdb.c all over the place, to some
this suggests making it into a function:
- Hide the DBTs inside the function
- Handle keylen fixups, set conversions and error logging centrally
|
|
|
|
- Pass the dbi we already opened in rpmdbInitIterator() as argument
instead of unnecessarily reopening in rpmdbFindByFile()
- Adjust the argument order to match that of dbiFindByLabel()
for consistency
- Remove redundant error code assignment, we are already assuming error
|
|
- The cursor is fully local to dbiFindByLabel() so there's no
point passing it as an argument
|
|
- 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.
|
|
- Explicit NULL is much more obvious here, also eliminate the (now)
dead NULL-assignments and add a trash-n-burn memset() just in case
|