Jindrich Novy [Fri, 25 Mar 2011 09:25:03 +0000 (10:25 +0100)]
Remove unused variables from db3.c
Panu Matilainen [Mon, 28 Mar 2011 09:47:34 +0000 (12:47 +0300)]
Use pkg-config to find Lua + determine flags (ticket #88)
- Additionally clean up the logic a bit and dont bother building
any lua-related bits if disabled
Panu Matilainen [Fri, 25 Mar 2011 13:20:26 +0000 (15:20 +0200)]
Drop the unused + unmaintained javadeps helper
- It contains piles of buffer overflow etc material and AFAIK this
has been unused for its entire lifespan of > 10 years, fixing
an unused piece of code seems like a waste of time. If somebody
shows interest later on it can be resurrected, but in the meanwhile...
Panu Matilainen [Fri, 25 Mar 2011 12:56:16 +0000 (14:56 +0200)]
Oops, lib/misc.c is no more, remove from POTFILES.in
Panu Matilainen [Fri, 25 Mar 2011 12:45:11 +0000 (14:45 +0200)]
Use canoncolor to determine lib vs lib64
Panu Matilainen [Fri, 25 Mar 2011 12:39:36 +0000 (14:39 +0200)]
Push platform config out of main rpm macros file
- canon arch & color stuff is now calculated per each known arch in
installplatform, and just a single place where arch name mangling
is done
Panu Matilainen [Fri, 25 Mar 2011 12:03:23 +0000 (14:03 +0200)]
Generate platform configuration for all known architectures
- loop over all archs known by rpmrc but only generate the platform config
if all necessary parameters (such as ISA information) are known, this
gives a reasonable idea of what archs are *really* in use and supported
- at least in theory, the platform configuration could now move to
$datadir as the contents no longer depend on which are rpm was built on
- also gets rid of the big sed-monster in install-platform
Panu Matilainen [Fri, 25 Mar 2011 11:22:53 +0000 (13:22 +0200)]
Simplify the hysterical per-platform vendor-sed thing
Panu Matilainen [Fri, 25 Mar 2011 11:16:32 +0000 (13:16 +0200)]
Create platform specific config on all OS'es
Panu Matilainen [Fri, 25 Mar 2011 11:08:09 +0000 (13:08 +0200)]
Move %_fixperms to main macro config
- Fixing broken permissions in sources isn't exactly platform/vendor
specific in nature (at least Suse adds this this to their own "platform"
separately, kinda proving the point)
- Kick out the remaining unused RH-pecific platform.in section
Panu Matilainen [Fri, 25 Mar 2011 10:45:36 +0000 (12:45 +0200)]
Yank out 2001 vintage Mandrake-specific macros
- Its unlikely these were ever actually used by Mandrake, but in
any case they switched to different setup long ago, and since
then the company + distribution has seen more than a few renames etc..
Panu Matilainen [Fri, 25 Mar 2011 09:25:47 +0000 (11:25 +0200)]
Replace distro/vendor autodetection with a configure switch
- it's not rpm's job, not is it possible for rpm to know about
distribution/vendor names and preferences
- use build_vendor as the canonical vendor (affecting %{_vendor} default
and macro + rpmrc paths) unless overridden by --with-vendor=name
Florian Festi [Mon, 21 Mar 2011 13:39:10 +0000 (14:39 +0100)]
Move find-provides and find-requires link to autodeps/
Implement link reaction with less copied code
Jindrich Novy [Thu, 24 Mar 2011 11:48:46 +0000 (12:48 +0100)]
Clean up headerRead()
Jindrich Novy [Wed, 23 Mar 2011 12:37:44 +0000 (13:37 +0100)]
Remove checks of unused things from configure.ac
Jindrich Novy [Wed, 23 Mar 2011 11:37:25 +0000 (12:37 +0100)]
Don't use mtrace(3), muntrace(3) and don't check for mcheck.h
- valgrind is good for these things without touching the code
Jindrich Novy [Wed, 23 Mar 2011 10:18:08 +0000 (11:18 +0100)]
Avoid timedRead() usage
- it is to be removed in the next soname bump
Jindrich Novy [Wed, 23 Mar 2011 10:11:33 +0000 (11:11 +0100)]
Remove libio support to suppress timedRead()
Panu Matilainen [Wed, 23 Mar 2011 10:15:50 +0000 (12:15 +0200)]
Eliminate pointless isSource member from eiu struct, duh
Panu Matilainen [Wed, 23 Mar 2011 10:15:07 +0000 (12:15 +0200)]
Eliminate header from eiu struct, its just a local temp variable really
Panu Matilainen [Wed, 23 Mar 2011 10:14:23 +0000 (12:14 +0200)]
Reduce vsflags flip-flop
- Transaction set vsflags gets set early in rpmInstall(), remove
redundant set + restore on tryReadHeader()
Panu Matilainen [Wed, 23 Mar 2011 10:13:25 +0000 (12:13 +0200)]
checkFreshenStatus() only needs a header, not the entire eiu struct
Panu Matilainen [Tue, 22 Mar 2011 06:36:35 +0000 (08:36 +0200)]
Fix classification of ELF binaries with sticky bit (RhBug:689182)
Panu Matilainen [Thu, 17 Mar 2011 13:49:57 +0000 (15:49 +0200)]
Fix a small memleak in rpmsign tool
Panu Matilainen [Thu, 17 Mar 2011 13:35:42 +0000 (15:35 +0200)]
Plug memory leaks on macro definition error cases
Panu Matilainen [Thu, 17 Mar 2011 12:08:54 +0000 (14:08 +0200)]
Fix couple of incorrect sizeof() uses
Panu Matilainen [Thu, 17 Mar 2011 11:24:47 +0000 (13:24 +0200)]
Missing va_end() call
Jindrich Novy [Wed, 16 Mar 2011 14:07:55 +0000 (15:07 +0100)]
Avoid freeing an unallocated variable (RhBug:688091)
Jindrich Novy [Tue, 15 Mar 2011 16:58:31 +0000 (17:58 +0100)]
Fix cpio_doio()
- do not propagate incompatible error codes to cpioStrerror()
- plug possible memleak while creating transaction set
- clean up
Jindrich Novy [Mon, 14 Mar 2011 14:37:00 +0000 (15:37 +0100)]
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
Panu Matilainen [Fri, 11 Mar 2011 12:24:38 +0000 (14:24 +0200)]
Update librpm doxygen module list
- rpmgi is gone, rpmprob is a "new" item
Panu Matilainen [Thu, 10 Mar 2011 11:36:51 +0000 (13:36 +0200)]
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
Jindrich Novy [Thu, 10 Mar 2011 15:45:49 +0000 (16:45 +0100)]
Clean up rpmfcApply() and rpmfcHelper()
Florian Festi [Mon, 7 Mar 2011 19:53:15 +0000 (20:53 +0100)]
Fix whitespace in Python doc string
Panu Matilainen [Thu, 10 Mar 2011 07:00:07 +0000 (09:00 +0200)]
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 ;)
Panu Matilainen [Wed, 9 Mar 2011 14:13:34 +0000 (16:13 +0200)]
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...
Panu Matilainen [Wed, 9 Mar 2011 14:08:59 +0000 (16:08 +0200)]
Python 3 fixups
- PyString is gone, use PyBytes instead
- Add compatibility defines to paper over
PyInt/PyLong_JustHowLongFunctionNamesYouCanComeUpWith()
Panu Matilainen [Wed, 9 Mar 2011 13:37:07 +0000 (15:37 +0200)]
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)
Panu Matilainen [Wed, 9 Mar 2011 13:31:25 +0000 (15:31 +0200)]
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
Panu Matilainen [Wed, 9 Mar 2011 13:28:48 +0000 (15:28 +0200)]
Don't bother with the callback die-die-die error translation
Panu Matilainen [Wed, 9 Mar 2011 13:26:54 +0000 (15:26 +0200)]
Eliminate unnecessary _free() usages in python
Panu Matilainen [Wed, 9 Mar 2011 13:06:11 +0000 (15:06 +0200)]
Python bindings dont need our debug.h for anything
Panu Matilainen [Wed, 9 Mar 2011 08:25:29 +0000 (10:25 +0200)]
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.
Panu Matilainen [Wed, 9 Mar 2011 07:39:32 +0000 (09:39 +0200)]
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.
Jindrich Novy [Wed, 9 Mar 2011 07:16:46 +0000 (08:16 +0100)]
Clean up rpmfcExec()
Panu Matilainen [Tue, 8 Mar 2011 14:20:20 +0000 (16:20 +0200)]
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
Panu Matilainen [Tue, 8 Mar 2011 11:28:32 +0000 (13:28 +0200)]
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.
Panu Matilainen [Mon, 7 Mar 2011 07:03:04 +0000 (09:03 +0200)]
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
Panu Matilainen [Fri, 4 Mar 2011 16:34:01 +0000 (18:34 +0200)]
Make peace with autoconf-2.68
Panu Matilainen [Fri, 4 Mar 2011 16:21:29 +0000 (18:21 +0200)]
Merge branch 'master' of ssh://rpm.org/srv/projects/rpm/git/rpm
Panu Matilainen [Fri, 4 Mar 2011 14:00:29 +0000 (16:00 +0200)]
Remove unused return code variable
- The return codes from these iteratator functions aren't interesting
in this context, don't bother saving them either.
Panu Matilainen [Fri, 4 Mar 2011 13:51:16 +0000 (15:51 +0200)]
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)
Panu Matilainen [Fri, 4 Mar 2011 12:50:30 +0000 (14:50 +0200)]
Remove unused variable in debugedit
Panu Matilainen [Fri, 4 Mar 2011 12:42:38 +0000 (14:42 +0200)]
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
Panu Matilainen [Fri, 4 Mar 2011 12:33:35 +0000 (14:33 +0200)]
Throw an exception from Fseek() errors in python rpmfd.seek()
Jindrich Novy [Fri, 4 Mar 2011 12:34:29 +0000 (13:34 +0100)]
Yet remove some unused variables to suppress warnings
Panu Matilainen [Fri, 4 Mar 2011 11:49:16 +0000 (13:49 +0200)]
Remove unused return code variable
- rpmdsRpmlib() can return errors but not really applicaple here
Panu Matilainen [Fri, 4 Mar 2011 11:46:06 +0000 (13:46 +0200)]
Remove pointless return code from handleInstInstalledFiles()
- There are no errors to return here... so it might as well be void
Panu Matilainen [Fri, 4 Mar 2011 11:38:34 +0000 (13:38 +0200)]
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
Panu Matilainen [Fri, 4 Mar 2011 11:27:15 +0000 (13:27 +0200)]
Eliminate unused variable
- We're not expecting anything in return from rpmtsNotify() in
fsm either, so just ignore the returns...
Panu Matilainen [Fri, 4 Mar 2011 11:24:38 +0000 (13:24 +0200)]
Eliminate unused variables
- We're not expecting anything in return from rpmtsNotify() in psm,
so just ignore the returns...
Panu Matilainen [Fri, 4 Mar 2011 11:11:22 +0000 (13:11 +0200)]
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.
Panu Matilainen [Fri, 4 Mar 2011 11:08:17 +0000 (13:08 +0200)]
Return error codes from rpmdsRpmlib()
- It can fail with eg NULL dsp passed, might as well return something
which also silences gcc
Panu Matilainen [Fri, 4 Mar 2011 10:51:32 +0000 (12:51 +0200)]
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...
Panu Matilainen [Fri, 4 Mar 2011 10:45:06 +0000 (12:45 +0200)]
Remove unused xx error code variable
- headerDel() only fails if the tag doesn't exist in the header, which
is not an error here. Nor could we return an error if it was...
Panu Matilainen [Fri, 4 Mar 2011 10:32:49 +0000 (12:32 +0200)]
Remove unused nowtm variable
Panu Matilainen [Fri, 4 Mar 2011 09:33:24 +0000 (11:33 +0200)]
Eliminate popt wtf'ery in rpmcliInit()
- In order to get inside the loop, rc has to be non-zero so the
switch-case is just very very pointless (the whole check seems
dubious but .. shrug)
- Remove unused optArg - if we don't look at it then no point
retrieving it either
Jindrich Novy [Fri, 4 Mar 2011 04:38:32 +0000 (05:38 +0100)]
Actually propagare failure when addOrAppendListEntry() fails,
add missing headerGet() check.
Jindrich Novy [Fri, 4 Mar 2011 03:56:26 +0000 (04:56 +0100)]
Define variables in processBinaryPolicies() only if they are needed
Jindrich Novy [Fri, 4 Mar 2011 03:43:32 +0000 (04:43 +0100)]
Add missing exit status check for waitpid() while executing scriptlets
Panu Matilainen [Thu, 3 Mar 2011 16:50:52 +0000 (18:50 +0200)]
Remove leftover error case from the nineties
- rpmtsAddInstallElement() doesn't check for rpmlib() dependencies
or anything like that, nor does it return 2 ever (anymore)
Panu Matilainen [Thu, 3 Mar 2011 15:44:28 +0000 (17:44 +0200)]
Eliminate unused-but-set warning from gcc on hashes without datatype
- b_addr is unused if HTDATATYPE isn't defined, more ifdef's yay
- Initialize the local variables on declaration to save one ifdef
Panu Matilainen [Thu, 3 Mar 2011 14:20:34 +0000 (16:20 +0200)]
Eliminate useless 'I dont care about the return code' variables in tagnames
Panu Matilainen [Thu, 3 Mar 2011 13:32:24 +0000 (15:32 +0200)]
Eliminate unused variable + calculations in pgpPubkeyFingerprint()
Tero Aho [Wed, 2 Mar 2011 06:43:46 +0000 (08:43 +0200)]
Fix uninitialized variable in fsm
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Wed, 2 Mar 2011 06:28:35 +0000 (08:28 +0200)]
Silence error callback during from BDB during environment open
- EACCES from actually opening the environment is returned only
through dbenv->open() return code, but annoyingly the EACCESS
from trying to create a missing environment is "leaked" to the
errcall, causing pesky "permission denied" errors for regular users
if the environment doesn't (yet) exist. Enable errcall in time
for dbenv->failchk() though to get all the details if something
goes wrong there.
Panu Matilainen [Tue, 1 Mar 2011 10:10:23 +0000 (12:10 +0200)]
Tag reservation for MeeGo's security framework (from Tero Aho)
- As per http://lists.rpm.org/pipermail/rpm-maint/2011-January/002988.html,
reserving the MSSF tags (but marked unimplemented for now)
Ville Skyttä [Fri, 18 Feb 2011 20:12:43 +0000 (22:12 +0200)]
Mention %bcond_with* in conditional build doc.
Ville Skyttä [Tue, 22 Feb 2011 20:07:18 +0000 (22:07 +0200)]
Man page syntax fixes.
Ville Skyttä [Fri, 18 Feb 2011 20:22:07 +0000 (22:22 +0200)]
Documentation spelling fixes.
Panu Matilainen [Mon, 21 Feb 2011 08:55:02 +0000 (10:55 +0200)]
Fix db cursor double-open, causing yum to hang on reinstall (RhBug:678644)
- A refactoring error in commit
475391dc581bf5ba72b6d59d16d875505b45bd51
causes us to open a double cursor on the Package db. This doesn't
seem to affect much in rpm context, but Yum is being naughty and holding
two different handles to the same db simultaneously, which causes
to deadlock on trying to lock the same record twice from two different
handles .. or something to that effect.
Panu Matilainen [Mon, 21 Feb 2011 06:47:52 +0000 (08:47 +0200)]
Fix braindamage in the depgen helper collector loop (RhBug:675002)
- Read any remaining data before exiting on SIGCHLD
- Only perform one read() per loop, otherwise it could block
- Handle EINTR while read()'ing
Panu Matilainen [Sun, 20 Feb 2011 20:33:47 +0000 (22:33 +0200)]
Allow both string + unicode in python addInstall() / addErase()
Panu Matilainen [Tue, 15 Feb 2011 13:07:02 +0000 (15:07 +0200)]
Allow installation of self-conflicting packages (ticket #806, RhBug:651951)
- Besides fixing the stupid situation where we happily create package(s)
that can under no circumstances be installed, this makes it possible
to create "singleton" packages which can be useful in some cases, eg
http://lists.rpm.org/pipermail/rpm-maint/2010-April/002719.html
Michael Schroeder [Tue, 15 Feb 2011 12:55:55 +0000 (14:55 +0200)]
Fix corner-case behavior on dependency matching when release not present
- The idea behind the patch is that a missing release is handled
as "all/any release". Nothing changes for "foo < 1.2" or
"foo > 1.2", it still just compares the version. But "foo = 1.2"
means "everything with version 1.2". Thus, any match against
a package with version "1.2" a any non-empty release must
return true.
- Update test-suite expectations to the new behavior.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Michael Schroeder [Tue, 15 Feb 2011 12:39:29 +0000 (14:39 +0200)]
Allow uncompressed payload in packages
- An example of a package where uncompressed payload is useful is
out "installation-images" package. It's a meta package that is
not shipped to customers, but used for image creation purposes.
Compression just slows down the build process.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Tue, 15 Feb 2011 11:49:44 +0000 (13:49 +0200)]
Import the C-level ts python object as TransactionSetCore
- The previous _rpmts name suggests its some scary internal stuff
that shouldn't be used when that's not the case, it's just a
lower level interface to the same thing.
Ville Skyttä [Sat, 12 Feb 2011 10:24:50 +0000 (12:24 +0200)]
Avoid emitting empty perl() module deps.
Test case from DOM.pm (perl-CSS-DOM 0.13):
use # to keep CPANTS happy :-)
strict;
use # same here
warnings;
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Mon, 7 Feb 2011 10:28:30 +0000 (12:28 +0200)]
Callback argument mismatch from previous commit, meh
Panu Matilainen [Mon, 7 Feb 2011 08:43:03 +0000 (10:43 +0200)]
Add + use a db error callback function
- Commit
7309f7498134f7b62f27624a4cdb91e1c6b82578 caused loss of
some BDB error messages due misreading the docs: we used to explicitly
set errfile to stderr through some hoops, and errcall to what
always was NULL. But calling set_errcall() disables any output to
the db errfile, and since we're no longer calling errfile...
- Removing the set_errcall() would restore output on stderr, but
making it go through rpmlog() seems more consistent and lets
API users catch it through rpmlog callback (in theory at least)
Panu Matilainen [Mon, 7 Feb 2011 07:15:29 +0000 (09:15 +0200)]
Fix segfault when building more than one rpm (RhBug:675565)
- Remember to set the static string cache pointer to NULL on free, duh
Panu Matilainen [Sun, 6 Feb 2011 07:57:03 +0000 (09:57 +0200)]
Adjust OCaml detection rule for libmagic 5.04 -> 5.05 string change
Panu Matilainen [Mon, 31 Jan 2011 11:01:26 +0000 (13:01 +0200)]
Mark the identical signature warning as translatable
Panu Matilainen [Mon, 31 Jan 2011 08:14:57 +0000 (10:14 +0200)]
Argh, yet more mono dependency generation braindamage
- Unlike some other scripts, mono-find-foo do not have .sh suffix, meh
Panu Matilainen [Mon, 31 Jan 2011 07:21:32 +0000 (09:21 +0200)]
Eww, mono rules both buggy AND missing from tarballs, doh.
Ville Skyttä [Sun, 23 Jan 2011 20:35:24 +0000 (22:35 +0200)]
Comment spelling fix.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Fri, 28 Jan 2011 11:15:09 +0000 (13:15 +0200)]
Add an error message + comments on open(".") behavior (RhBug:672576)
- Bail out early and complain if current directory can't be open()'ed,
as we'll need it for reliable cwd restoration after running Lua
scripts.
- Technically we'd only need open(".") succeeding for chroot operations
and running Lua-scripts, but there's no easy way to determine whether
a transaction will run Lua-scripts. They could be in-db triggers
which will only be evaluated in the middle of transaction, better
to fail early for consistent behavior.
Panu Matilainen [Tue, 25 Jan 2011 13:27:28 +0000 (15:27 +0200)]
Teach rpm about post-transaction dependencies
- %posttrans dependencies have their own peculiar semantics, they're
install-only dependencies which have no implications on ordering.
Panu Matilainen [Fri, 21 Jan 2011 13:20:01 +0000 (15:20 +0200)]
Don't try to remove existing environment when using private environment
Panu Matilainen [Fri, 21 Jan 2011 12:02:28 +0000 (14:02 +0200)]
Plug potential division by zero in the rpmdb size calculation (RhBug:671056)
- This smells like treating the symptom instead of the disease, add
a reminder comment to figure out what's going on here...