- htonll() is a pure "const" function as it only manipulates the
value passed to it and only calls htonl() functions which are
also const.
- Also fix up the function prototype formatting
- There are places in rpmio and build that would benefit from hashing, but
hashFunctionString() being internal to librpm has prevented that. Rename
to rstrhash() to resemble the other foo in rpmstring.h for
minimal namespacing as its now public function and update callers.
- Also mark the function as "pure" - it only looks at its arguments.
This is one of the busiest functions in entire rpm so any optimization
no matter how minor is well worth it.
- Hereby awarding hashFunctionString() with the grand prize for
the Most Moved Around Function in rpm ;)
- Steps towards separating rpm-python from the main rpm tarball even
though developed within the rpm repository.
- Having the bindings in a separate tarball makes it simpler to build
them for different python versions, notably python 3 (RhBug:531543)
- Include what little we need from standard headers instead
of relying on rpm source tree system.h for anything.
- Remove non-public includes from python binding include paths
- We can't verify any properties of replaced files, but we can and
should still see if it exists at all.
- Files skipped due to wrong color are supposed to share some of
the attributes with the file that got actually installed, such
as permissions and whether it exists at all. Verify what we can
instead of silently ignoring.
- Files which are not installed, have been replaced or are of wrong
color can not actually satisfy a dependency despite what the package's
file list says.
- This prevents breaking the system despite seemingly correct dependencies
in some situations, such as on multilib systems where a colored
files can appear to be shared between primary and secondary architecture
packages, but only the file from primary arch package is physically
present, and removing the primary arch package would remove the
file and silently break any dependencies on such files in practise.
Similarly replaced files become owned by the replacing package in
practise, so the original package whose files were replaced can no
longer satisfy dependency on those files.
- On install we need to queue preferred colored pkgs before others
to account for the way colored files get laid on disk. On erase,
we need to revert this for the same reason. Most of the time
dependencies take care of this, but the queue placement matters in
cases such as RhBug:680261 where the order is not dependency-driven.
- Check for NULL early once to avoid having to deal with it later
- Check for rpmGlob() return code and only append on success
- Count args centrally on exit
- PSM_NOTIFY doesn't return anything of interest, rpmdbSetIteratorRE()
doesn't return errors for RPMMIRE_STRCMP and Fclose() errors we
just can't do anything about (and we were throwing all these
away anyhow)
- An error here from rpmdsRpmlib() would be very much a "can't happen"
situtation, and there's no point handling it in any special way,
the loop will silently fall through anyway.
- It's supposed to return the number of errors, instead of silently
ignoring errors from qva->qva_showPackage() to unused variable,
count them. That qva->qva_showPackage() currently never returns
errors is another story...