Commit Graph

10869 Commits

Author SHA1 Message Date
Jindrich Novy b159519d9d Remove checks of unused things from configure.ac 2011-03-23 13:37:44 +01:00
Jindrich Novy b03685d320 Don't use mtrace(3), muntrace(3) and don't check for mcheck.h
- valgrind is good for these things without touching the code
2011-03-23 12:37:25 +01:00
Jindrich Novy 3ab3a931b4 Avoid timedRead() usage
- it is to be removed in the next soname bump
2011-03-23 11:25:06 +01:00
Jindrich Novy c61391e647 Remove libio support to suppress timedRead() 2011-03-23 11:25:06 +01:00
Panu Matilainen f0fa14db95 Eliminate pointless isSource member from eiu struct, duh 2011-03-23 12:15:50 +02:00
Panu Matilainen 3e70d901e5 Eliminate header from eiu struct, its just a local temp variable really 2011-03-23 12:15:07 +02:00
Panu Matilainen 8b4e66d357 Reduce vsflags flip-flop
- Transaction set vsflags gets set early in rpmInstall(), remove
  redundant set + restore on tryReadHeader()
2011-03-23 12:14:23 +02:00
Panu Matilainen 850fe79da6 checkFreshenStatus() only needs a header, not the entire eiu struct 2011-03-23 12:13:25 +02:00
Panu Matilainen 6eba5dc468 Fix classification of ELF binaries with sticky bit (RhBug:689182) 2011-03-22 08:36:35 +02:00
Panu Matilainen f974288ea1 Fix a small memleak in rpmsign tool 2011-03-17 15:49:57 +02:00
Panu Matilainen 1817ac020e Plug memory leaks on macro definition error cases 2011-03-17 15:35:42 +02:00
Panu Matilainen 8ec147d322 Fix couple of incorrect sizeof() uses 2011-03-17 14:08:54 +02:00
Panu Matilainen 5caa0a5191 Missing va_end() call 2011-03-17 13:24:47 +02:00
Jindrich Novy 88a3950fd8 Avoid freeing an unallocated variable (RhBug:688091) 2011-03-16 15:07:55 +01:00
Jindrich Novy 9ba7b7a178 Fix cpio_doio()
- do not propagate incompatible error codes to cpioStrerror()
- plug possible memleak while creating transaction set
- clean up
2011-03-15 17:58:31 +01:00
Jindrich Novy cc23fdcaaa Clean up rpmfcClassify()
- don't check return values of functions that cannot fail
- remove "can't happen" asserts
- fail in case of empty file classifier
2011-03-14 15:37:00 +01:00
Panu Matilainen 01fc1efc3c Update librpm doxygen module list
- rpmgi is gone, rpmprob is a "new" item
2011-03-11 14:25:45 +02:00
Panu Matilainen 0eca826cb8 Mark htonll() as "const" function
- htonll() is a pure "const" function as it only manipulates the
  value passed to it and only calls htonl() functions which are
  also const.
- Also fix up the function prototype formatting
2011-03-11 14:25:45 +02:00
Jindrich Novy eb7be49dfa Clean up rpmfcApply() and rpmfcHelper() 2011-03-10 16:46:22 +01:00
Florian Festi e6d66aab71 Fix whitespace in Python doc string 2011-03-10 13:37:25 +01:00
Panu Matilainen 805f7fd5af Move string hash function to librpmio and rename for namespacing
- There are places in rpmio and build that would benefit from hashing, but
  hashFunctionString() being internal to librpm has prevented that. Rename
  to rstrhash() to resemble the other foo in rpmstring.h for
  minimal namespacing as its now public function and update callers.
- Also mark the function as "pure" - it only looks at its arguments.
  This is one of the busiest functions in entire rpm so any optimization
  no matter how minor is well worth it.
- Hereby awarding hashFunctionString() with the grand prize for
  the Most Moved Around Function in rpm ;)
2011-03-10 10:17:39 +02:00
Panu Matilainen ba38b2551f Fix the PyBytes vs PyString compatibility defines
- Oops. Quite obviously nobody has even tried to build this with
  python < 2.6. Whether it'd actually work is another question...
2011-03-09 16:13:34 +02:00
Panu Matilainen cb61d8a89c Python 3 fixups
- PyString is gone, use PyBytes instead
- Add compatibility defines to paper over
  PyInt/PyLong_JustHowLongFunctionNamesYouCanComeUpWith()
2011-03-09 16:08:59 +02:00
Panu Matilainen 16aea81dc7 Preliminary distutils support for the python bindings
- Steps towards separating rpm-python from the main rpm tarball even
  though developed within the rpm repository.
- Having the bindings in a separate tarball makes it simpler to build
  them for different python versions, notably python 3 (RhBug:531543)
2011-03-09 15:37:07 +02:00
Panu Matilainen 9aef00d341 Cut the remaining ties python bindings have to main rpm sources
- Include what little we need from standard headers instead
  of relying on rpm source tree system.h for anything.
- Remove non-public includes from python binding include paths
2011-03-09 15:31:25 +02:00
Panu Matilainen 32ffdfae8f Don't bother with the callback die-die-die error translation 2011-03-09 15:28:48 +02:00
Panu Matilainen f104306f59 Eliminate unnecessary _free() usages in python 2011-03-09 15:26:54 +02:00
Panu Matilainen 99f9c67ad4 Python bindings dont need our debug.h for anything 2011-03-09 15:06:11 +02:00
Panu Matilainen ee0ae58b44 Verify some properties of replaced and wrong-colored files (RhBug:528383)
- We can't verify any properties of replaced files, but we can and
  should still see if it exists at all.
- Files skipped due to wrong color are supposed to share some of
  the attributes with the file that got actually installed, such
  as permissions and whether it exists at all. Verify what we can
  instead of silently ignoring.
2011-03-09 10:30:51 +02:00
Panu Matilainen 566a15c9c0 Take file state into account for file dependencies
- Files which are not installed, have been replaced or are of wrong
  color can not actually satisfy a dependency despite what the package's
  file list says.
- This prevents breaking the system despite seemingly correct dependencies
  in some situations, such as on multilib systems where a colored
  files can appear to be shared between primary and secondary architecture
  packages, but only the file from primary arch package is physically
  present, and removing the primary arch package would remove the
  file and silently break any dependencies on such files in practise.
  Similarly replaced files become owned by the replacing package in
  practise, so the original package whose files were replaced can no
  longer satisfy dependency on those files.
2011-03-09 09:57:43 +02:00
Jindrich Novy 842c987486 Clean up rpmfcExec() 2011-03-09 08:16:46 +01:00
Panu Matilainen fa7b4dbb4e Improve the dependency loop debug message a bit
- Fix one-off in the SCC numbering
- Fix wording to talk about number of external dependencies, not packages
- Show number of members in the SCC
2011-03-08 16:20:20 +02:00
Panu Matilainen 4a16d55f1f Preferred color pkgs should be erased last
- On install we need to queue preferred colored pkgs before others
  to account for the way colored files get laid on disk. On erase,
  we need to revert this for the same reason. Most of the time
  dependencies take care of this, but the queue placement matters in
  cases such as RhBug:680261 where the order is not dependency-driven.
2011-03-08 13:28:32 +02:00
Panu Matilainen e0ddd28203 Clean up rpmgiGlobArgv() a bit
- Check for NULL early once to avoid having to deal with it later
- Check for rpmGlob() return code and only append on success
- Count args centrally on exit
2011-03-07 09:03:04 +02:00
Panu Matilainen 584b9d4f5a Make peace with autoconf-2.68 2011-03-04 18:34:01 +02:00
Panu Matilainen d0c6d74f3d Merge branch 'master' of ssh://rpm.org/srv/projects/rpm/git/rpm 2011-03-04 18:21:29 +02:00
Panu Matilainen 586a30c77a Remove unused return code variable
- The return codes from these iteratator functions aren't interesting
  in this context, don't bother saving them either.
2011-03-04 16:00:29 +02:00
Panu Matilainen 695342bb19 Don't bother storing irrelevant return codes
- PSM_NOTIFY doesn't return anything of interest, rpmdbSetIteratorRE()
  doesn't return errors for RPMMIRE_STRCMP and Fclose() errors we
  just can't do anything about (and we were throwing all these
  away anyhow)
2011-03-04 15:52:21 +02:00
Panu Matilainen b925a084ed Remove unused variable in debugedit 2011-03-04 14:50:30 +02:00
Panu Matilainen 10ed98db01 Don't bother checking for rasprintf() return codes in rpmProblemString()
- We dont check them elsewhere either and there's little that could
  actually fail here
2011-03-04 14:43:54 +02:00
Panu Matilainen d69ebf18f1 Throw an exception from Fseek() errors in python rpmfd.seek() 2011-03-04 14:43:54 +02:00
Jindrich Novy a1da07e60d Yet remove some unused variables to suppress warnings 2011-03-04 13:34:38 +01:00
Panu Matilainen ecead75632 Remove unused return code variable
- rpmdsRpmlib() can return errors but not really applicaple here
2011-03-04 13:49:16 +02:00
Panu Matilainen 3632294483 Remove pointless return code from handleInstInstalledFiles()
- There are no errors to return here... so it might as well be void
2011-03-04 13:46:06 +02:00
Panu Matilainen 9db2544707 Remove unused return code variable
- None of the error exits from rpmdbSetIteratorRE() apply to the
  use in rpmtsInitIterator() so there's no point storing or checking
  its return
2011-03-04 13:38:34 +02:00
Panu Matilainen 79a81f9bea Eliminate unused variable
- We're not expecting anything in return from rpmtsNotify() in
  fsm either, so just ignore the returns...
2011-03-04 13:27:15 +02:00
Panu Matilainen 62369bf149 Eliminate unused variables
- We're not expecting anything in return from rpmtsNotify() in psm,
  so just ignore the returns...
2011-03-04 13:24:38 +02:00
Panu Matilainen cf04f4400f Eliminate pointless xx unused error code variable in rpmShowRC()
- An error here from rpmdsRpmlib() would be very much a "can't happen"
  situtation, and there's no point handling it in any special way,
  the loop will silently fall through anyway.
2011-03-04 13:11:22 +02:00
Panu Matilainen ddc47f4cfe Return error codes from rpmdsRpmlib()
- It can fail with eg NULL dsp passed, might as well return something
  which also silences gcc
2011-03-04 13:08:17 +02:00
Panu Matilainen 53f8ce9ff0 Make rpmspecQuery() return match the description
- It's supposed to return the number of errors, instead of silently
  ignoring errors from qva->qva_showPackage() to unused variable,
  count them. That qva->qva_showPackage() currently never returns
  errors is another story...
2011-03-04 12:52:59 +02:00