summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-08-28Eliminate unused result code from psm structPanu Matilainen1-3/+1
2009-08-28Eliminate payload file handle from psm structPanu Matilainen1-8/+7
- it's only needed locally inside PSM_PROCESS on PSM_INSTALL
2009-08-28Don't try to incref NULL dsPanu Matilainen1-4/+1
2009-08-17Eliminate unused code (leftover from ordering rewrite)Panu Matilainen1-18/+0
2009-08-17Don't bother relocating packages no filesPanu Matilainen1-1/+1
- fixes a small memleak
2009-08-13Add an option bug reporting URL tag to packages (RhBug:512774)Panu Matilainen1-0/+1
2009-07-23Kill off lclint remnants everywherePanu Matilainen12-18/+1
- remove ancient and likely irrelevant LCL comments and bogus NULL checks
2009-07-14Fix memory allocation for token arrayLubomir Rintel1-1/+1
This fixes a memory corruption due to write access out of bounds of token array, whose size was computed incorrectly. It was assumed that only '%' characters separate tokens, which could lead to crashes on useless uses of '[' tokens, such as "rpm -qa --qf '[]lalala'".
2009-07-14Log an error on short lead (RhBug:511101)Panu Matilainen1-1/+3
- if lead read returns short without it being an IO error, treat it as a case of "not an rpm package"
2009-07-14Honor --nofiledigest on install too (RhBug:508021)Panu Matilainen1-5/+3
- query and install options clash, use popt callback to enable processing
2009-07-14Dont accept '-' in manifests (RhBug:461353)Panu Matilainen1-2/+2
2009-07-09Oops, missing include for dirname()Panu Matilainen1-0/+2
2009-07-09Create the directory used for transaction lock if necessaryPanu Matilainen1-0/+1
- otherwise at least rpm --initdb can fail due to transaction locking failing
2009-07-09Fix package relocatability checking, broken since foreverPanu Matilainen3-6/+25
- at the time relocation problems are added, ts problem set is NULL and rpmtsCheck() wipes it out anyway so the problems from relocation are never seen anywhere - The header isn't available at transaction prepare stage where most problems are checked for, so we can't validate the prefixes at that point. Add a per-element problem set to carry the problem data and merge it to ts problem set when checking for other problem types.
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 Matilainen2-3/+40
2009-07-09Unbreak --excludepath (RhBug:409637)Panu Matilainen1-2/+1
- excluded paths aren't counted as actual relocations, dont bother checkig addPrefixes() return
2009-07-08Make verify result not depend on verbosity level, uff... (RhBug:510213)Panu Matilainen1-1/+1
2009-07-03Add an index for obsoletes (RhBug:507702)Panu Matilainen1-1/+1
2009-07-03Unify extension + header data getter calling conventionsPanu Matilainen1-29/+10
- simplifies headerGet() & friends a bit and reduces redundancy - also just return an error instead of dying with assert on NULL td argument
2009-07-03Pass headerGet flags to extensions too (unused for now)Panu Matilainen2-26/+27
2009-07-03Eliminate unused calculations originating from the "8/98 bug"Panu Matilainen1-44/+3
- the tl calculation has been unused since commit 5994a308bc062fff53ff0184b8dea15d19fcfb63 in 2001 and we dont even read rpm 2.x packages anyway...
2009-07-03Re-enable rdlen vs dl header checkPanu Matilainen1-2/+0
- we dont even read packages from the "8/98 bug" era anymore, hardly relevant
2009-07-01Band-aid to dependency caching misbehaving with chrooted verify (RhBug:508074)Panu Matilainen2-1/+6
- disable dependency caching on chrooted verify to avoid ugly spew from paths containing outside paths while we're actually inside the root during verification - correct fix would be to fix the temporary db path calculation
2009-06-23Set HEADERFLAGS_ALLOCATED centrally from headerLoad()Panu Matilainen4-18/+9
- requiring every caller to handle this separately, violating header type opaqueness in the process, doesn't seem that bright an idea - also fix a memleak on signature header read in case of failure
2009-06-17Delay fingerprint cache init + lookup until we know there are some matchesPanu Matilainen1-6/+5
- no point going to fs if there are no matching files in the rpmdb - use allMatches count as size hint to fingerprint cache instead of arbitrary 20
2009-06-17Permit NULL in fpCacheFree()Panu Matilainen1-2/+4
2009-06-17Fix invalid memory access from freeing dirName too earlyPanu Matilainen1-16/+14
- if it doesn't crash, it can cause rpmdb provided file not seen in chroot, the other half of RhBug:506323 - streamline exit points to enable freeing allocated resources sanely
2009-06-16Fix Segfault for to be installed symlinks pointing to existing locationsFlorian Festi1-4/+4
fixes rhbz#505777
2009-06-16Eliminate now unnecessary artifacts of rpmdsNext() side-effectsPanu Matilainen1-3/+2
2009-06-16Generate DNEVR string lazily on rpmdsDNEVR() callsPanu Matilainen1-15/+13
- avoids useless string churning on rpmdsNext() when most paths dont actually use the DNEVR string for anything - make sure DNEVR is freed whenever iterator index changes
2009-06-16Eliminate epoch promotion debug cruftPanu Matilainen2-19/+0
- might've been useful back in the day but...
2009-06-16Determine rpmlib deps from flags instead of comparing stringsPanu Matilainen1-1/+1
2009-06-16Validate rpmlib dependencies on src.rpm install (RhBug:490613)Panu Matilainen1-0/+29
- other src.rpm dependencies are only relevant for building, but rpmlib features can affect src.rpm "install" too, such as unsupported file digests, payload compressors etc
2009-06-15Rip hardcoded libgcc + glibc static helper kludgesPanu Matilainen1-6/+2
- shouldn't be needed anyway anymore as package of preferred color should get always installed first, and the issue is solvable in packaging anyway
2009-06-12Fix out of source directory build (ticket #65)Panu Matilainen2-3/+5
2009-06-12Add parentheses (as kindly suggested by new gcc...)Panu Matilainen1-1/+1
2009-06-11Make rpmalSatisfiesDepend() smarterPanu Matilainen1-7/+24
- Instead of blindly picking the first match, try to pick the best provider for the dependency: for colored dependencies, try to find a provider of matching color. For non-colored dependencies, prefer providers of transaction preferred color. - This avoids creating bogus and loopy relations between 32- and 64-bit packages where they dont exist, and makes behavior with things like /sbin/ldconfig consistent by returning the preferred colored element.
2009-06-11Add preferred color to rpmalPanu Matilainen4-4/+7
2009-06-10Split ordering code to separate source filePanu Matilainen3-693/+709
2009-06-08rpmdsInit() and rpmdsNext() can handle NULL ds, no need to separately testPanu Matilainen1-7/+2
2009-06-08Minor rpmtsOrder() cleanupPanu Matilainen1-7/+1
- initialize on declaration - remove unused code
2009-06-08Clean up relation recording a bitPanu Matilainen1-17/+5
- rpmdsInit() and rpmdsNext() can handle NULL ds correctly, dont bother separately checking here - te type doesn't change inside rpmdsNext() iteration - added vs installed difference is handled inside addRelation(), otherwise the cases here are identical except for the al
2009-06-08Dont bother adding dependencies to self, everPanu Matilainen1-1/+2
2009-06-08Determine rpmlib and config deps from flags instead of comparing stringsPanu Matilainen1-6/+3
2009-06-05Map legacy PreReq into pre and preun scriptlet dependencies in orderingPanu Matilainen1-3/+10
- this gives close enough semantics for packages that rely on old PreReq behavior (eg RHEL 4-5 package set ordering is completely broken without such mapping)
2009-06-05Unbreak isLegacyPreReq()Panu Matilainen1-1/+2
- long long time ago the PREREQ bit was also turned on for scriptlet dependencies etc, this is no longer the case so the old mask doesn't work - build part is not affected by the mask change as we never set PREREQ bit by ourselves
2009-06-05Use specific types for sense flags + te type instead of generic intPanu Matilainen2-3/+4
2009-06-04Rewrite orderingFlorian Festi3-395/+432
- Detect strongly connected components (SCCs) using Tarjan's SCC algorithm - Use Dijkstra's algorithm to find the best relations to zap - Add forward relations for the Dijkstra's algorithm - Separate the per package ordering data and the relations
2009-06-02Removing extra useless 'break' statement lines and unhandled FTS_FOO cases.Rakesh Pandit1-17/+1