summaryrefslogtreecommitdiff
path: root/lib/rpmps.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-17Fix couple of incorrect sizeof() usesPanu Matilainen1-1/+1
2010-09-13Eliminate all fooUnlink() functions out of the APIPanu Matilainen1-1/+1
- These are internal helpers only, all refcount users need to use fooFree() or similar for correct operation. Add fwd declarations where necessary to avoid moving code around unnecessarily. - We could add these back later as aliases to fooFree() but for now, just get them out of the way.
2010-05-07Plug dumb memleak in rpmpsMerge()Panu Matilainen1-0/+1
2010-04-21Eliminate unused "known problems" based filtering from rpmtsRun()Rakesh Pandit1-37/+0
- This mechanism has never been used by anything at all, which suggests its not a particularly useful feature - Removing unused rpmpsTrim() from rpmps - Marking okProbs parameter of rpmtsRun() function as unused to avoid unnecessary breakage
2010-03-26Filter out duplicate problems when adding to element problem setsPanu Matilainen1-30/+10
- Problems associated with a transaction element are necessarily unique to that element, so when filtered there we don't have to worry about skipping dupes elsewhere like in merged sets. This can actually lead to apparent duplicates in the current problem report output (eg in cases where multiple packages provide the same dependency which would be removed, like multilib packages), but this is only an artifact of they way the problems are currently printed out. - While this is still a dumb linear search, it can be several seconds faster than the previous filtering in rpmpsPrint(), which is now just a dumb convenience function.
2010-03-26Eliminate rpmpsAppend() from the APIPanu Matilainen1-12/+0
- This was only a convenience function that shouldn't really have been exported to begin with, and is not necessary at all - bury it inside rpmte.c for now to hide lazy problem set allocation - In the other news of the day... According to git, this happens to be the 10000th commit to the master branch of this codebase. Happy anniversary to rpm :P
2010-03-26Push problem creation argument sanitation to the level belowPanu Matilainen1-4/+3
- rpmpsAppend() and rpmProblemCreate() have no use for fn/dn either, its just stored in one string internally - this is kinda unnecessary API break but these aren't used outside rpm so it doesn't make much difference
2010-03-26Add a simple and dumb rpmpsMerge() function to merge two problem setsPanu Matilainen1-0/+16
2010-03-26Add a saner rpmps iteration interfacePanu Matilainen1-8/+13
- simply return the actual problem objects from the iterator instead of "index" which is not usable for anything outside rpmps.c - implement rpmpsNexIterator() on top of the new rpmpsiNext() as backwards compatibility for now
2010-03-25Split rpm problem type + its "methods" to separate source + headerPanu Matilainen1-208/+0
- rpmps is just something that stores rpm problems, problems themselves are individual and opaque "objects", deserving their own module
2010-03-25Add public function for testing problem equalityPanu Matilainen1-20/+22
- turn around sameProblem() return, pay more attention to details and make it public - use it in rpmpsTrim() too
2010-03-25Lose unused ignoreProblem from rpmProblem structPanu Matilainen1-10/+0
- this is an artifact from rpm 4.4.x-times, and even back then nothing used it, the only api to set it was in python bindings and.. eww - also killing this makes rpmpsTrim() do something semi-useful again
2010-03-25Minor cleanup to rpmpsGetProblem()Panu Matilainen1-3/+3
- avoid dumb pointer fiddles, ps->probs is just a bleeping array
2010-03-25Minor cleanup to rpmpsAppendProblem()Panu Matilainen1-4/+2
- dont bother adding NULL problems - avoid dumb pointer fiddles, ps->probs is just a bleeping array
2010-03-25Minor cleanup to rpmpsFreeIterator()Panu Matilainen1-2/+1
2010-03-25Dont bother allocating iterator if there's no data to iteratePanu Matilainen1-1/+1
2010-03-22Lose the useless rpmps refcounting debug junkPanu Matilainen1-8/+6
- get the debug messages out of API, this is what should've been in commit dbdbe8010cd944f026a5a4e5d071eb31d29d81c4
2010-03-18Add a new problem type for obsoletesPanu Matilainen1-0/+5
2010-01-05Include <stdlib.h> as necessary instead of system.hPanu Matilainen1-0/+1
- also loose the related ancient compatibility goo
2009-08-31Replace equal/not equal uses of str[n]cmp() with rstreq[n] in main ts codePanu Matilainen1-4/+4
2009-08-31sameProblem() return value is illogical, reverse itPanu Matilainen1-7/+7
2009-07-23Kill off lclint remnants everywherePanu Matilainen1-1/+0
- remove ancient and likely irrelevant LCL comments and bogus NULL checks
2009-07-09Make rpmpsUnlink() behave the other fooUnlink() functionsPanu Matilainen1-10/+10
- pretty much everything else in rpm returns NULL from unreference functions, make be more consistent here... - also tolerate NULL in both reference and unreference
2009-07-09Add reference counting to rpmProblemsPanu Matilainen1-3/+26
2009-01-22Return NULL instead of blowing up on invalid rpmpsGetProblem()Panu Matilainen1-1/+1
- thanks to Pixel for spotting
2008-10-14Use PRIu64 for 64bit value formatting instead of castingPanu Matilainen1-3/+5
2008-08-26Fix type in format string to avoid segfault (rhbz#460146)Jindrich Novy1-1/+1
2008-06-11Make rpmps generic number field 64bit, rename getter methodPanu Matilainen1-16/+16
- rename the parameters + internal use to more generic "number" - rename ugly and dumb rpmProblemGetLong() to rpmProblemGetDiskNeed() and return rpm_loff_t - the number field is used for some other purposes too (whether dep problem is for installed package), work around this for now by just defining rpmProblemGetDiskNeed() result value as undefined on non-disk related problems ;)
2008-03-18Use rasprintf() in rpmps to properly fix mdvbz#31680Panu Matilainen1-18/+14
2008-03-07Stop insecurely covering up for lack of snprintf and vsnprintfPanu Matilainen1-19/+0
- we require C99 anyway - snprintf is used unconditionally all around the tree - if absolutely needed for portability, having insecure wrappers littered over the source is not the best way
2008-01-30Remove bunch of unnecessary rpmlib.h includesPanu Matilainen1-2/+0
- replace with rpmtypes.h where needed
2008-01-25Bandaid patch for truncated error message in russian (mdvbz#31680)Panu Matilainen1-1/+1
Just up the stupid static reservation "high enuff" for now. asprintf() would be nice here but it's not at all portable, revisit later.
2007-12-15Remove bogus const from rpmProblemString() return typePanu Matilainen1-1/+1
- its malloced so it needs to be freed - fix all users to actually free
2007-12-14Another bunch of bogus const removalsPanu Matilainen1-1/+1
2007-12-14Oops, rpmpsi index needs to be signed typePanu Matilainen1-2/+2
2007-12-08Switch to <rpm/foo.h> style for public headersPanu Matilainen1-2/+2
- adjust include paths accordingly
2007-12-04Eliminate debug junk from the APIPanu Matilainen1-10/+8
- add some helper macros to accomplish the same, easy to enable / disable as needed
2007-11-23Use #include <x.h> syntax to include public headers.Ralf Corsépius1-2/+2
2007-11-07Remove bunch of unnecessary misc.h includes, document othersPanu Matilainen1-1/+0
2007-10-28Include "rpmlib.h" instead of <rpmlib.h>.Ralf Corsépius1-1/+1
2007-10-19Rename rpmpsProblem() -> rpmpsGetProblem() to make purpose clearerPanu Matilainen1-4/+4
2007-10-19Make rpmProblem standalone "object"Panu Matilainen1-39/+66
- problem set contains array of pointers to problems, not problems themselves - add functions for creating and destroying problems - use iterators for freeing the problems in rpmpsFree() - new rpmpsAppendProblem() API for appending existing problem item to problem set - implement rpmpsAppend using the new methods
2007-10-19Eliminate rpmps and rpmProblem structure details from the APIPanu Matilainen1-0/+26
2007-10-19Add methods for accessing rpmProblem dataPanu Matilainen1-0/+30
2007-10-18Use iterators for rpmpsPrint()Panu Matilainen1-6/+9
2007-10-18Add API for iterating over rpmps problemsPanu Matilainen1-0/+44
2007-10-16Remove unimplemented, unused RPMPROB_BADPRETRANSPanu Matilainen1-5/+0
- leftover from pretrans syscall hack before %pretrans script days
2007-09-11Remove splint tags.Ralf Corsépius1-27/+5
2003-12-30- spelling corrections (#112728).jbj1-1/+1
CVS patchset: 7047 CVS date: 2003/12/30 13:14:49
2002-08-19- add --with-efence to configure, check install/upgrade with efence.jbj1-4/+4
- beecrypt: short hex string conversion overflows target buffer. - mark "successors only" packages in transaction. - reap scriptlets with SIGCHLD handler. - rename PSM_t to rpmpsm, add methods and refcounts to manage. - remove %%configure/%%makeinstall from arch-os/macros, default is OK. - don't export MALLOC_CHECK_ to scriptlets. - squeaky clean memory leak checking. - always malloc rpmfi structure, refcounts are correct in rpmtsRun(). - skip redundant /sbin/ldconfig scripts on upgrade (if possible). CVS patchset: 5645 CVS date: 2002/08/19 22:27:44