Commit Graph

18 Commits

Author SHA1 Message Date
Michael Schroeder ae0347cfb2 Improve hardlink handling in the disk space calculation
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.
2018-02-19 13:24:58 +02:00
Panu Matilainen b22f9609d8 Don't fire file triggers on non-installed files
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.
2017-12-15 16:24:50 +02:00
Panu Matilainen 3c0bdacc3f Move rpmVerifyAttrs enumeration to rpmfiles.h where it belongs
These are exported file verify attributes in packages and also
used for rpmfilesVerify(), separate rpmvf.h makes little sense.
2017-11-13 14:44:37 +02:00
Panu Matilainen 6f1e75ddd2 Add support for new virtual file attribute "%artifact"
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.
2017-11-08 11:02:10 +02:00
Pavlina Moravcova Varekova 79ca74e15e Add file disposition FA_TOUCH
Installation of FA_TOUCH item only upgrades its metadata.
2017-03-17 13:50:33 +02:00
Panu Matilainen 9a8ebe523e Fix missing @param in rpmfilesVerify() and rpmfiVerify() doxygen doco 2016-12-01 11:39:04 +02:00
Panu Matilainen 591f95a849 Export file verification as a rpmfiles/rpmfi method
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.
2016-10-27 15:38:09 +03:00
Florian Festi a2826033be Fix doc strings and though doxygen warnings 2015-09-01 10:48:08 +02:00
fin@linux.vnet.ibm.com ab5c6243a6 Add support for file signatures to rpmfi and rpmfiles
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>
2015-08-12 13:58:27 +02:00
Florian Festi b151b5297b Fix doxygen warnings
Make shure parameter descriptions in doc strings match the functions
2015-02-17 15:31:22 +01:00
Lubos Kardos ec78eea7fe Add support for executing file triggers.
Supported file triggers:
%filetriggerin
%filetriggerun
%filetriggerpostun
%transfiletriggerin
%transfiletriggerun
2015-02-05 08:08:12 +01:00
Lubos Kardos c53158a6f6 Add rpmfilesFindPrefix() to find files with given prefix. 2015-02-05 08:08:12 +01:00
Panu Matilainen 86e07db8d5 Add rpmfilesStat() and iterator counterpart API
- Maps file info set data into struct stat as lstat() would return it.
- Needs sane flags to be defined...
2014-03-18 13:30:52 +02:00
Florian Festi df2f6e64f1 Add iterator to loop over the hard linked files in several different ways 2014-03-11 10:49:55 +01:00
Panu Matilainen d26511005f Clarify + document rpmfiles directory vs file index
- 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()
2013-12-12 11:21:02 +02:00
Panu Matilainen 6c165f507d Document rpmfiles API, tweak rpmfi docs a bit to differentiate
- 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
2013-12-11 17:21:37 +02:00
Panu Matilainen c61c2e00f7 Make the relevant rpmfiles accessor functions public
- 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...)
2013-12-11 16:47:35 +02:00
Panu Matilainen 05eeece43a Move file related defines and typedefs to a new public rpmfiles.h header
- 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.
2013-12-11 16:00:34 +02:00