Before this commit, rpm simply did not take hardlinks into account
when calculating disk space requirements. This made it fail
spectaculary for packages that contain a high number of hardlinks,
like glibc-locale.
We now "bind" the file size to the last hardlink member. This
is still not 100% correct as the last file may not get installed
in some cases or only the last file may be replaced. But it is
still much better than what rpm did before.
Files that are not actually being installed (or removed) should not
fire triggers. Look at the file states on installed packages and file
actions on transaction elements to determine this.
This can be used to differentiate files that are not natural parts of
packages but created as by-products of our processing so they're easy
to filter out of queries.
Possible candidates include build-ids, byte compiled files etc, but this
nothing is automatically marked as artifact in this commit.
Turn rpmVerifyFile() into indexed rpmfilesVerify() method but
drop the unnecessary double return code which also "fixes" the
oddball argument order where return value is not last, add
thin wrapper for rpmfi iteration. Mark rpmVerifyFile() deprecated
due to the strange calling conventions and unused arguments.
Leaving the code in verify.c to make it clearer what changed, looks
a bit out of place but doesn't matter as it doesn't need access
to rpmfi(les) internals.
Verification functionality as such is supposed to be unchanged by this.
This patch adds file signatures and file signature length to rpmfiles.
These new members are set in rpmfilesPopulate, and they can be accessed
with rpmfiFSignature.
Changelog:
- simplified logic in rpmfilesPopulate
- removed empty line
Signed-off-by: Lubos Kardos <lkardos@redhat.com>
- Rename the file index argument for rpmfnDI(), rpmfilesDI() and
rpmfilesODI() to ix for consistency with other file index arguments
- Document rpmfilesDI() and rpmfilesODI() and its usage with rpmfilesDN()
and rpmfilesODN()
- rpmfiles API is mostly a copy-paste of rpmfi with index argument
added
- clarify rpmfi.h docs to speak about "file info set iterator",
rpmfiles.h is the "file info set" thing now
- All the public rpmfiFoo() accessors have an indexed rpmfilesFoo()
counterpart, make the rpmfiles-versions public too.
- The noteworty exceptions are rpmfiDecideFate() and rpmfiConfigConflict()
which shouldn't have been public in the first place, and are to be
removed from the API in the next API break. So we're not adding
new rpmfiles-counterparts for functions that are to be removed
from the (public) API. Actually document the issue by deprecating
both rpmfi-functions.
- The iterator types need to be in rpmfiles.h as the iterator
constructor is there (otherwise there'd be a cyclic include
between rpmfiles.h and rpmfi.h, which wont do...)
- Preparation for making the indexed rpmfiles API public, API users
are not affected as rpmfiles.h is included from rpmfi.h now. rpmfi.h
is for the iterator part only.