Commit Graph

9224 Commits

Author SHA1 Message Date
Panu Matilainen 666e26bd7a Oops, missing include for dirname() 2009-07-09 15:07:38 +03:00
Panu Matilainen 17f9073278 Create the directory used for transaction lock if necessary
- otherwise at least rpm --initdb can fail due to transaction locking failing
2009-07-09 14:40:17 +03:00
Panu Matilainen bcb71f69d2 Fix package relocatability checking, broken since forever
- 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-09 14:01:13 +03:00
Panu Matilainen 7c512db912 Make rpmpsUnlink() behave the other fooUnlink() functions
- 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-09 13:43:10 +03:00
Panu Matilainen 6ffeec9d7f Add reference counting to rpmProblems 2009-07-09 13:39:55 +03:00
Panu Matilainen cb8241dda7 Unbreak --excludepath (RhBug:409637)
- excluded paths aren't counted as actual relocations, dont bother
  checkig addPrefixes() return
2009-07-09 11:03:54 +03:00
Panu Matilainen 2db564a85a Fix compiler warning on const free
- we dont need popt to set the file variable as we manually process
2009-07-09 09:28:45 +03:00
Panu Matilainen 6649c23cac Make verify result not depend on verbosity level, uff... (RhBug:510213) 2009-07-08 16:20:06 +03:00
Panu Matilainen 33d829d362 Add an index for obsoletes (RhBug:507702) 2009-07-03 15:12:07 +03:00
Panu Matilainen 683d308586 Unify extension + header data getter calling conventions
- simplifies headerGet() & friends a bit and reduces redundancy
- also just return an error instead of dying with assert on NULL td argument
2009-07-03 14:46:06 +03:00
Panu Matilainen e18aedbf97 Pass headerGet flags to extensions too (unused for now) 2009-07-03 14:21:01 +03:00
Panu Matilainen 4d0d54492c Eliminate unused calculations originating from the "8/98 bug"
- the tl calculation has been unused since commit
  5994a308bc in 2001 and we dont even
  read rpm 2.x packages anyway...
2009-07-03 13:11:35 +03:00
Panu Matilainen 5dfb57ba3c Re-enable rdlen vs dl header check
- we dont even read packages from the "8/98 bug" era anymore, hardly relevant
2009-07-03 12:13:54 +03:00
Panu Matilainen c685667475 Band-aid to dependency caching misbehaving with chrooted verify (RhBug:508074)
- 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-07-01 13:59:53 +03:00
Panu Matilainen d3956140c2 Handle hook unregistering itself 2009-06-26 16:24:55 +03:00
Panu Matilainen d1b399761f Fix rpm.unregister() Lua extension
- hook data is userdata, not light userdata
2009-06-26 16:07:50 +03:00
Panu Matilainen 02f9f3fbdd Add base64 encode and decode extensions to the lua interface 2009-06-26 15:39:20 +03:00
Panu Matilainen edbc9ead96 Base64-encode %policy files to ensure it can be presented as strings
- RPMTAG_POLICIES is a string array but there's no guarantee that
  something marked %policy is a plaintext file that can be represented
  as \0-terminated string, base64-encoding them fixes that. Baby steps
  towards making %policy remotely usable, related to RhBug:505066.
- Also remove unnecessary failure code setting, processMetadataFile()
  assumes failure already, and dont try to insert NULL strings in case
  b64encode() or pgpArmorWrap() fails
2009-06-26 12:31:57 +03:00
Panu Matilainen 8c5437b379 Kick out silly constfree() use 2009-06-25 17:17:16 +03:00
Panu Matilainen 271069f900 Simplify logging a bit
- precalculate the message length, relying on C99 vsnprintf() semantics
- generate the log message and rest of the record in rpmlog() already,
  and just pass the record to lower level to do actual logging
- also something was wrong in the old version as valgrind complained
  about illegal reads, that is also cured here
2009-06-24 15:16:25 +03:00
Panu Matilainen 51520de1d3 Set HEADERFLAGS_ALLOCATED centrally from headerLoad()
- 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-23 17:50:08 +03:00
Jindrich Novy b028930925 Teach %files to accept multiple filelists (ticket #70, rhbz#475359) 2009-06-23 11:05:06 +02:00
Jindrich Novy 27263f94bd Allow ':' character in EVR, it's needed for Epoch separation 2009-06-23 11:02:51 +02:00
Jindrich Novy 194b6a5c2a Check arg in argvJoin() before dereferencing 2009-06-23 11:02:51 +02:00
Panu Matilainen 215607caa5 Updated Polish translation (ticket #74) 2009-06-23 10:03:58 +03:00
Panu Matilainen 0975d1e2c0 Fix some typos in javadeps usage message (ticket #72) 2009-06-23 09:56:04 +03:00
Panu Matilainen 6b6e82f8e9 Add -h/--help to rpm2cpio (ticket #63)
- patch originally from Debian, with slight adjustments to indentation
2009-06-18 14:52:45 +03:00
Panu Matilainen 4abfb4c186 Updated German translation from Micha Pietsch (RhBug:506607) 2009-06-18 14:19:59 +03:00
Panu Matilainen 31301b579f Updated German translation from Micha Pietsch (RhBug:506607) 2009-06-18 14:16:46 +03:00
Panu Matilainen 7417cd283a Pile of OSGi dependency generator fixes from Alphonse Van Assche (ticket #39)
- use Temp perl module to provide temp dir
- re-enable deps solving in Require-Bundle, Import-Package, Export-Package
  OSGI properties
- remove uses bundle of Export-Package OSGI property
- use RPM '>=' as version operator to match OSGI '='
- remove all .0 at the end of the version string
- typo fixes
2009-06-18 13:06:42 +03:00
Panu Matilainen d5f6d18540 Delay fingerprint cache init + lookup until we know there are some matches
- 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-17 15:06:06 +03:00
Panu Matilainen 71475e314a Permit NULL in fpCacheFree() 2009-06-17 15:04:41 +03:00
Panu Matilainen 0055fecfde Fix invalid memory access from freeing dirName too early
- 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-17 13:09:25 +03:00
Florian Festi 1b9e6d7f48 Fix Segfault for to be installed symlinks pointing to existing locations
fixes rhbz#505777
2009-06-16 17:39:14 +02:00
Panu Matilainen 5f57e21251 Eliminate now unnecessary artifacts of rpmdsNext() side-effects 2009-06-16 18:19:40 +03:00
Panu Matilainen 7fd95d099f Generate DNEVR string lazily on rpmdsDNEVR() calls
- 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-16 18:15:31 +03:00
Panu Matilainen 61acdba023 Eliminate epoch promotion debug cruft
- might've been useful back in the day but...
2009-06-16 17:49:44 +03:00
Panu Matilainen 90b70ebd34 Determine rpmlib deps from flags instead of comparing strings 2009-06-16 17:36:21 +03:00
Panu Matilainen a4ac4e48ec Validate rpmlib dependencies on src.rpm install (RhBug:490613)
- 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-16 17:23:17 +03:00
Jindrich Novy 8f44f9159c Don't check Provides/Requires for bad characters, they could be UTF-8
- don't check Name but EVR in parseRCPOT()
- use rpm namespacing for charCheck()
- remove unused variable
2009-06-16 13:53:42 +02:00
Panu Matilainen 71a7dd8b7a Add debugedit support for DWARF-3 (RhBug:505774)
- patch from Jakub Jelinek
2009-06-16 13:52:43 +03:00
Panu Matilainen 83513ded75 Rip hardcoded libgcc + glibc static helper kludges
- 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-15 15:21:27 +03:00
Jindrich Novy ad53979f9a Check for valid chars in Requires/Provides as well 2009-06-15 08:47:55 +02:00
Panu Matilainen 8d79668a13 Fix out of source directory build (ticket #65) 2009-06-12 08:52:38 +03:00
Panu Matilainen a86291ff77 Add parentheses (as kindly suggested by new gcc...) 2009-06-12 08:33:29 +03:00
Panu Matilainen 17d66c47b1 Make peace with newer git 2009-06-12 08:29:02 +03:00
Panu Matilainen af0ea37a91 Make rpmalSatisfiesDepend() smarter
- 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-11 17:22:59 +03:00
Panu Matilainen 31f0d94df1 Add preferred color to rpmal 2009-06-11 17:16:03 +03:00
Panu Matilainen 85f9df3c0d Update translations for a change (due to depends.c -> order.c split) 2009-06-10 17:22:03 +03:00
Panu Matilainen 57884ba0d3 Split ordering code to separate source file 2009-06-10 17:19:27 +03:00