Commit Graph

49 Commits

Author SHA1 Message Date
Panu Matilainen 3d97c19c6e Remove leading directories from doxygen notation
These don't represent the exported include structure so they're
probably more harmful than anything else.
2022-03-10 08:40:07 +02:00
Panu Matilainen 0b75075a8d Shut up bogus Doxygen warnings about undocumented parameters
As of Doxygen >= 1.8.20 it started complaining about anything marked
as @retval being undocumented. As this is widely used in rpm...
Mass-replace all @retval uses with @param[out] to silence. Some of
these are actually in/out parameters but combing through all of them
is a bit too much...

Also escape <CR><LF> in rpmpgp.h to shut up yet another new warning.
2020-10-28 10:40:41 +02:00
Michael Schroeder e2f0fbcc29 Add fingerprint lookup/compare variants that take ids
This will be used to get rid of unneeded id->str->id roundtrips.
2020-02-24 11:54:22 +02:00
Panu Matilainen 5bad56b4ab Allow passing a shared pool for finger print cache
- Both callers updated to still use a private pool so no practical
  change here.
2012-09-14 14:21:10 +03:00
Panu Matilainen c66656052d Remove scareMemory remnants from the internal API, fixup callers 2012-09-14 14:19:32 +03:00
Panu Matilainen 3d65369920 Make fingerprint struct opaque outside fprint.c
- rpmfi cannot know anything about the storage, so rpmfiFpxIndex()
  cannot be... change it to rpmfiFps() which only returns the pointer
  we got from fpLookupList()
- Change fpCacheGetByFp() to assume it gets passed an array of fps,
  and take an additional index argument. Return the fingerprint
  pointer on success, NULL on not found to allow further operations
  on the fp without knowing its internals.
2012-09-14 13:41:41 +03:00
Panu Matilainen 9e7adb8f14 Change fpLookup() to return malloced memory (on first call)
- If the fingerprint pointer passed to it is NULL then allocate space
  for a new fingerprint, otherwise reuse the previous space. This should
  allow optimizing the case where repeatedly calling and directory
  doesn't change inside fpc so callers dont need special-case code
  for this. For now, we dont care about optimizations, other than
  making it possible later.
2012-09-14 13:40:24 +03:00
Panu Matilainen ab180dacb9 Make fingerprint cache entry opaque, add some kind of API for the needed bits
- Only disk-space calculations need the actual entry contents, add
  getter for dir name and device. We're passing the cache to these
  getters too: its not currently unusedd but will be needed for
  directory name pool id->string translation once we get there...
2012-09-14 13:38:52 +03:00
Panu Matilainen 5bbd07c696 Hide away the FP_EQUAL macros 2012-09-14 13:37:32 +03:00
Panu Matilainen 3b492620fb Change fpLookupList() to return malloced memory
- Eliminates one place where knowledge about fingerprint internals
  has been needed, now rpmfi just gets (an supposedly) opaque blob back.
2012-09-14 13:37:03 +03:00
Panu Matilainen 5d89aac5d2 Add internal API for fingerprint lookup-and-compare
- Replace the direct hackery in rpmdb internals with a little less
  direct hackery...
2012-09-14 13:36:42 +03:00
Panu Matilainen ae38f0a977 Bury the fingerprint hash-types into fprint.c, clean up
- fprint.h only needs rpmtypes.h now, remove historical leftovers
- Avoids having to define the hash types multiple times as they're
  now buried out of sight
- fpHashFunction() and fpLookupSubdir() can now be made static, do so...
2012-09-14 13:34:47 +03:00
Panu Matilainen d3de5120b7 Move the entire fingerprint cache population into fprint.c
- Rename addFingerprints() to fpCachePopulate() and move into fprint.c.
  This doesn't really belong here as it requires fprint becoming aware
  of transactions and all, but at least these are all controlled API
  accesses unlike where in transaction.c this was messing with somebody
  elses data structures directly.
- Move the by-fingerprint creation to fpCachePopulate() so it gets
  lazily done as needed and copy the original hash-size heuristics
  back here.
2012-09-14 13:32:58 +03:00
Panu Matilainen 33b900fc03 Hide by-fingerprint hash into fingerprint cache, add minimal API bits
- For now, always create the by-fingerprint hash although rpmdb usage
  doesn't need it. Next steps will fix...
- Add wrapper API for retrieving the records, adjust callers
- No functional changes, at least intended ones... just first steps
  towards eliminating the hash-jungle and forcing a single API
  through which this stuff gets handled
2012-09-14 13:31:33 +03:00
Panu Matilainen 56ba2dc3ac Make fingerprint cache opaque outside fprint.c
- Not that it matters much when everything else is wide open but gotta
  start with something...
2012-09-14 13:31:27 +03:00
Panu Matilainen 7dc5ca2da1 Switch file info set base- and dirnames storage to string pool
- Always push base and dir names into file info sets string pool,
  whether private or shared. For basenames, this can save significant
  space even in a private pool, for dirnames private pool is moot
  as the names are already unique, shared pool is quite another story.
- Adjust fpLookupList() to take a pool and id's as arguments.
- This introduces a fair amount of overhead, so things will be somewhat
  slower until the transition to pool id's is (more) complete. Sometimes
  things have to get worse before they get better... Other than that,
  this should be entirely invisible to callers.
2012-09-08 11:25:16 +03:00
Panu Matilainen cffdbc7aec Return fingerprint lookups through retval pointer, not struct
- Returning structs by value is a bit icky, pass in a fp pointer
  for fpLookup() to fill in instead. This leaves the actual return code
  free for handling errors (but ignoring that for now as we always have)
  The other option would be always mallocing the return, and we dont
  want to do that...
- Shouldn't change any actual functionality.
2012-09-06 12:53:05 +03:00
Panu Matilainen 45a75f31f9 A few missing internal markers on librpm side too 2010-10-01 11:46:00 +03:00
Panu Matilainen 4231321f0c Eliminate unnecessary rpmts_internal.h include 2009-04-22 16:22:54 +03:00
Florian Festi feaad9829a Do only add symlinks the the first rpmFpHash as these are the only one we really need in there.
Also reduce the hash size.
2008-12-18 16:22:13 +01:00
Florian Festi 17f2cbe6e6 Delete rpmdbFindFpList and skipDir
as those are replaced by rpmFindBaseNamesInDB
and parts of checkInstalledFiles
2008-11-28 11:14:41 +01:00
Panu Matilainen 2494b26f01 Fix up couple of missed pieces rpmffi_s fi->te switchover 2008-11-26 17:41:22 +02:00
Florian Festi 504b2cf8a7 Change rpmffi_s to contain a rpmte instead of rpmfi to be able to get rid of fi->te 2008-11-26 16:32:32 +01:00
Florian Festi af80c3de47 Use only one, global fingerPrintCache to save a lot of stat calls 2008-10-24 10:34:25 +02:00
Florian Festi c6ccc90d7f Detect to be installed symlinks for file fingerprinting (file conflicts) 2008-10-24 10:34:25 +02:00
Florian Festi c65019affc Change both hashes to a typed version 2008-10-24 10:34:25 +02:00
Florian Festi 832909b4a7 Make rpmhash a generic datatype using macros and includes 2008-10-24 10:34:25 +02:00
Panu Matilainen 0d48ac0aaa Mark fingerprinting stuff internal 2008-10-09 15:48:46 +03:00
Panu Matilainen 90e10708f8 Fixup paths and Makefiles for rpmdb/ elimination 2008-05-12 12:28:12 +03:00
Panu Matilainen a68a5a049e Start (re-)joining librpmdb and librpm
- the split is largely arbitrary and mostly just causes, well, arbitrary
  issues and limitations
- just move content from rpmdb/ to lib/ for now
2008-05-12 12:17:01 +03:00
jbj c7ee573367 - rpm database has rpm.rpm g+w permissions to share db3 mutexes.
- expose more db3 macro configuration tokens.
- move fprint.[ch] and hash.[ch] to rpmdb directory.
- detect and fiddle incompatible mixtures of db3 env/open flags.
- add DBI_WRITECURSOR to map to db3 flags with CDB database model.
- add rpmdbSetIteratorRewrite to warn of pending lazy (re-)writes.

CVS patchset: 4765
CVS date: 2001/05/11 04:01:04
2001-05-11 04:01:04 +00:00
jbj f75a3f71ab Doxygen annotations for config files.
Doxygen annotations for rpmdep section.
Add manifests for install modes.

CVS patchset: 4675
CVS date: 2001/04/10 12:36:45
2001-04-10 12:36:45 +00:00
jbj d07437babb - cpio mappings carry dirname/basename, not absolute path.
CVS patchset: 4474
CVS date: 2001/01/21 15:43:32
2001-01-21 15:43:32 +00:00
jbj 3ad99fcba5 - add cscope/ctags (Rodrigo Barbosa<rodrigob@conectiva.com.br>).
- remove getMacroBody() from rpmio API.
- hide libio lossage in prototype, not API.
lclint annotations.

CVS patchset: 4230
CVS date: 2000/10/28 17:16:25
2000-10-28 17:16:25 +00:00
jbj e62a4131e4 lclint annotations.
CVS patchset: 4104
CVS date: 2000/08/23 12:59:48
2000-08-23 12:59:48 +00:00
jbj 913d116d71 - add pre-transaction syscall's to handle /etc/init.d change.
- don't bother saving '/' as fingerprint subdir.

CVS patchset: 3926
CVS date: 2000/07/09 04:42:12
2000-07-09 04:42:12 +00:00
jbj 9fb2e0a01b - fix: resurrect symlink unique'ifying property of finger prints.
CVS patchset: 3856
CVS date: 2000/06/16 19:12:09
2000-06-16 19:12:09 +00:00
jbj 6a63a1472b Doxygen.
CVS patchset: 3539
CVS date: 2000/01/28 22:55:42
2000-01-28 22:55:42 +00:00
jbj ca5882b322 Makefile.am: Add RPM-GPG-KEY to the package.
Use fdLink/fdFree for fd/scriptFd references in transaction set/availableList.
fprint.h: Permit (and check for) subDir = NULL in fingerPrints.
More lclint annotations.

CVS patchset: 3462
CVS date: 1999/12/07 21:14:51
1999-12-07 21:14:51 +00:00
jbj 8289346751 Add underscore in front of (possibly) non-supported FDIO_t vectors.
Make buildFileList() part of rpmlib API as rpmBuildFileList().
lib/rpmdb.c: Compare fingerprints from different caches by value.

CVS patchset: 3448
CVS date: 1999/12/01 19:57:17
1999-12-01 19:57:17 +00:00
jbj 06aedc29ca lib/depends.c: Fix minor memory leak.
lib/fprint.c: Pass both dirName/baseName to fpLookup() to avoid memory leaks.
lib/rpmdb.c: ditto, and use scaremem=1.
lib/transaction.c: Fix minor memory leak.

CVS patchset: 3443
CVS date: 1999/11/30 18:07:08
1999-11-30 18:07:08 +00:00
jbj f202d104d0 Consistent usage for fileNames, baseNames, dirNames and dirIndexes throughout.
rpm.c: Add --nodirtokens and --dirtokens to control file list compression.
lib/misc.c: Default (conservative) valuse _noDirTokens is TRUE.
lib/misc.c: Add expandFileList analogue to compressFileList.
build/pack.c: Compress file list only if compression is requested.
lib/rpmdb.c: Expand file list before headerWrite if compression not requested.

CVS patchset: 3436
CVS date: 1999/11/26 21:58:42
1999-11-26 21:58:42 +00:00
ewt 1bcfa7ac60 got installs/removes working with new file lists
CVS patchset: 3389
CVS date: 1999/10/21 02:40:57
1999-10-21 02:40:57 +00:00
ewt 925c8130d5 another batch of changes for new file list format -- one more to go
CVS patchset: 3383
CVS date: 1999/10/20 10:22:46
1999-10-20 10:22:46 +00:00
jbj 8bd997f2e0 Perl bindings need
#include <foo.h>
not
	#include "foo.h"

CVS patchset: 3143
CVS date: 1999/07/13 21:37:57
1999-07-13 21:37:57 +00:00
jbj bd626d134d propagate "const char *" into rpmlib prototypes.
CVS patchset: 2663
CVS date: 1999/01/06 17:33:50
1999-01-06 17:33:50 +00:00
ewt d7ad76b4fc added fpLookupList()
CVS patchset: 2623
CVS date: 1998/12/30 16:56:28
1998-12-30 16:56:28 +00:00
ewt 008d124000 added fpHashFunction() and fpEqual()
CVS patchset: 2615
CVS date: 1998/12/26 18:29:32
1998-12-26 18:29:32 +00:00
ewt 1319828529 added simple fingerprinting
CVS patchset: 2612
CVS date: 1998/12/26 17:12:50
1998-12-26 17:12:50 +00:00