Commit Graph

406 Commits

Author SHA1 Message Date
Panu Matilainen 1de6c1eb12 Make all transaction callback notifications go through rpmtsNotify()
- single point to control how callbacks are made
2008-07-03 15:30:04 +03:00
Panu Matilainen ae177457c8 Fix handling of "%posttrans -p /xxx" with no body (Pascal Rigaux) 2008-06-25 10:59:20 +03:00
Panu Matilainen 669af8b842 Minimally convert handleInstInstalledFiles() to new headerGet()
- fi->hge style doesn't matter as otherStates is just local temp variable,
  use MINMEM always to avoid unnecessary copy (DEFAULT wouldn't copy either
  atm but..)
2008-06-13 10:21:40 +03:00
Panu Matilainen 7dc709b517 Make rpmfiFSize() return rpm_loff_t type, fixup callers
- Internally file sizes are still stored as 32bit, going to 64bit wouldn't
  make much sense (would only waste memory for nothing) as long as we're
  bound by cpio's 32bit per-file limit. Being "64bit ready" for filesizes
  doesn't hurt anything though...
2008-06-12 16:41:31 +03:00
Panu Matilainen e1724c3d4a On a second thought, rename rpmfiDigest() to rpmfiFDigest() for consistency
- it operates on current file of the set, not on the entire set so while
  changing API, name it similarly to other things that operate on current file
2008-06-02 09:50:48 +03:00
Panu Matilainen ea134adf81 Make handleOverlappedFiles() honor rpmfi digest algorithm 2008-06-02 09:50:48 +03:00
Panu Matilainen 62f53dbc66 Dumb segfault in %posttrans 2008-05-15 18:52:18 +03:00
Panu Matilainen 90e10708f8 Fixup paths and Makefiles for rpmdb/ elimination 2008-05-12 12:28:12 +03:00
Panu Matilainen e5972a715a Check for arch compatibility on multilib too 2008-05-02 11:48:27 +03:00
Jindrich Novy b28bea588b Don't use alloca() in fpsCompare() 2008-04-30 10:32:33 +02:00
Panu Matilainen d49aaeb3b9 Replace alloca() + memset() with xcalloc() in skipFiles() 2008-04-25 15:29:27 +03:00
Panu Matilainen f4d12868e2 Add rpmteEVR() function
- seems like a useful thing to have
- use in ensureOlder()
2008-04-24 14:56:27 +03:00
Panu Matilainen 4d35eeca1a I'm out of words for this one. 2008-04-24 14:51:58 +03:00
Panu Matilainen 90ca5e5989 Check for chroot() result in rpmtsRun()
- bail out early if it fails instead of blindly continuing and potentially
  messing in real root (chroot can fail for priviledged user too)
2008-04-24 13:23:22 +03:00
Panu Matilainen 94ff22b129 Eliminate splitString() and freeSplitString()
- use ARGV_t instead, it does the same and more...
2008-04-17 21:56:54 +03:00
Panu Matilainen a5a3cfc3ed Rename currentDirectory() to rpmGetCwd() and move to librpmio 2008-04-04 09:53:17 +03:00
Panu Matilainen 5cde7cac96 Refactor running of pre/post scriptlets out of rpmtsRun() 2008-03-17 16:03:51 +02:00
Panu Matilainen d89482a7c7 Remove repackage support to finish off with rollback
The two main classes of rollback/repackage need are
1) Gimme back the previous version, this broke XYZ on my system.
   This is better handled by downgrading to the previous version of original
   package instead of repackaged garbage. We should maintain real package
   (version) history somewhere.

2) Upgrade messed up my configuration.
   Instead of repackaging everything we could be far more intelligent
   wrt config files, stick them into real version control or at least have
   hooks to do so.

RPMCALLBACK_REPACKAGE_* and RPMTRANS_FLAG_REPACKAGE definitions left around
to avoid needlessly breaking everybodys callbacks (for now)
2008-03-17 14:10:11 +02:00
Panu Matilainen 37543ee040 Remove rollback support
- not possible to do reliably within rpm
- effort is better wasted on investigating fs-level snapshots, which
  is way beyond rpm scope except for hooks to interact with the snapshot
  mechanism to communicate beginning/end of transaction and such
2008-03-17 11:53:27 +02:00
Panu Matilainen ed78cef2c3 Remove support for automatic rollback on failure
- doing this reliably from rpm is simply not possible as there's no way
  to undo script actions, might as well not pretend we can
- for a feature that's not generally usable it complicates mainline code
  way too much
2008-03-17 12:04:39 +02:00
Panu Matilainen a08ececd83 Log message adjustments
- dont waste translator time by having them translate obscure debug messages
- adjust some suspect looking logging levels
- mark some non-debug messages for translation where missing..
2008-03-07 09:47:51 +02:00
Panu Matilainen 9f8aa63490 Fix a bunch of string format mismatches found by gcc's variadic checks
Patch from Michal Marek
2008-02-14 13:10:51 +02:00
Panu Matilainen 36e9f885e1 Yet another typedef for transaction ID, use where spotted
- most remaining [u]int16|32 uses are indexes and such, ie actual numbers
2008-02-05 15:29:37 +02:00
Panu Matilainen ceb96638f6 Use rpm_flag_t for header generic bitfields (file flags etc)
- additionally use rpmfileAtts / rpmVerifyFlags consistently where
  appropriate
2008-02-05 15:15:41 +02:00
Panu Matilainen e7ac5fb183 Add rpm_mode_t type, use where spotted
- bring the types under some sort of control, previously mixture of
  int16_t, uint16_t and unsigned short was used..
2008-02-05 12:31:32 +02:00
Panu Matilainen 630a5a4c1a Add rpm_color_t type for rpm color bits, use where spotted 2008-02-05 12:12:31 +02:00
Panu Matilainen eb5dc35c19 Include spring-cleaning
- put some consistency into include ordering
- everything (apart from bits missed ;) is now ordered like this
  1. "system.h"
  2. other system includes
  3. rpm public headers
  4. rpm private headers
  5. "debug.h"
2008-01-30 17:05:29 +02:00
Panu Matilainen d2efb5d77c Use rpmsenseFlags type for dependency flags everywhere (hopefully) 2008-01-30 16:04:40 +02:00
Panu Matilainen 99faa2735b rpmlib.h mass eviction
- explicitly include what's really needed instead
- document remaining uses
2008-01-30 13:53:51 +02:00
Panu Matilainen 519eaaf236 Assorted int -> size_t corrections for string lengths 2008-01-02 13:55:16 +02:00
Panu Matilainen addac6a86b Add rpm_data_t (and _constdata_t) for header data, use everywhere
- consistent, easy to grep for and change...
- bogus consts removed where spotted
2007-12-19 12:05:56 +02:00
Panu Matilainen 44c90ce3f0 Const-pedantry here and there... 2007-12-19 14:13:34 +02:00
Panu Matilainen f1df7a59b8 Make psm opaque, add minimal methods to cover internal needs 2007-12-17 14:58:02 +02:00
Panu Matilainen 898d2cc867 transaction.c doesn't need fsm.h, rpmfi_internal does 2007-12-17 13:50:11 +02:00
Panu Matilainen b6a663ec0a Remove bogus const from rpmGetPath() temporary targets 2007-12-15 10:39:15 +02:00
Panu Matilainen 55cb2ff128 Bogus const removal continued... 2007-12-14 19:52:11 +02:00
Panu Matilainen 8946859700 More size_t type pedantry 2007-12-14 11:38:20 +02:00
Panu Matilainen 9ce13e09ef Switch to <rpm/foo.h> style for public headers
- adjust include paths accordingly
2007-12-08 14:02:32 +02:00
Panu Matilainen dbdbe8010c Eliminate debug junk from the API
- add some helper macros to accomplish the same, easy to enable / disable
  as needed
2007-12-04 11:25:46 +02:00
Panu Matilainen 6bdbbefbec Split rpmte internals to separate header
- avoid unnecessary include-order issues
- stop define-games for internals access
2007-12-03 10:15:46 +02:00
Panu Matilainen 2c3ce0c8b0 Split rpmfi internals to separate header 2007-12-03 09:46:51 +02:00
Panu Matilainen 82a9632d4f Move hGet*() funcs from rpmts, rename to headerGet*() 2007-12-01 10:29:44 +02:00
Panu Matilainen 89527785bb Move logging related macros rpmlog, adjust includes 2007-11-30 23:08:38 +02:00
Ralf Corsépius 60939d6985 Expand private include file names to be relative to $(top_srcdir) 2007-11-23 11:39:29 +01:00
Panu Matilainen e063854e11 Calculating file checksums aint legacy activity
- move the checksumming into librpmio
- rename domd5() to rpmDoDigest() with future expansion for specifying
  digest algorithm type (ignored for now)
- rearrange parameters to leave return types last
- one less rpmio_internal outside rpmio/, whee...
- used all over the rpm tree, and it knows about handling prelinked files
  so potentially useful for outside users, might as well export it
- new public header rpmfilutil.h for collecting this sort of stuff
2007-11-22 16:06:11 +02:00
Panu Matilainen 115d698252 Move string helpers from lib/misc.h to rpmio/rpmstring.h
- splitString, freeSplitString, stripTrailingChar
2007-11-23 08:21:23 +02:00
Ralf Corsépius abeea80a38 Use #include <x.h> syntax to include public headers. 2007-11-23 06:46:19 +01:00
Panu Matilainen 8239d0b74b Remove bunch of unnecessary misc.h includes, document others 2007-11-07 10:17:10 +02:00
Panu Matilainen e1cc5871a0 Document RPMFI_INTERNAL uses 2007-10-31 12:48:43 +02:00
Panu Matilainen bb976c2f57 Document _RPMTE_INTERNAL needs 2007-10-31 12:39:23 +02:00