- update to rpm-4.8.0

* updated python bindings
  * new transaction ordering code

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=40
This commit is contained in:
Michael Schröder 2010-03-26 10:56:28 +00:00 committed by Git OBS Bridge
parent 3de0fb7483
commit a6846b83ca
30 changed files with 960 additions and 1166 deletions

View File

@ -1,19 +1,17 @@
Index: build/pack.c
===================================================================
--- build/pack.c.orig
+++ build/pack.c
@@ -379,7 +379,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
--- ./build/pack.c.orig 2010-03-25 15:18:23.000000000 +0000
+++ ./build/pack.c 2010-03-25 15:23:54.000000000 +0000
@@ -375,7 +375,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
const char *compr = NULL;
headerPutString(h, RPMTAG_PAYLOADFORMAT, "cpio");
- if (strcmp(s+1, "gzdio") == 0) {
+ if (strcmp(s+1, "ufdio") == 0) {
- if (rstreq(s+1, "gzdio")) {
+ if (rstreq(s+1, "ufdio")) {
+ compr = NULL;
+ } else if (strcmp(s+1, "gzdio") == 0) {
+ } else if (rstreq(s+1, "gzdio")) {
compr = "gzip";
#if HAVE_BZLIB_H
} else if (strcmp(s+1, "bzdio") == 0) {
@@ -402,7 +404,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
} else if (rstreq(s+1, "bzdio")) {
@@ -398,7 +400,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
goto exit;
}

View File

@ -1,8 +1,11 @@
make brp-compress deal correctly with hardlinked man pages
--- ./scripts/brp-compress.orig 2004-10-17 18:49:52.000000000 +0000
+++ ./scripts/brp-compress 2005-12-15 14:03:58.000000000 +0000
@@ -5,12 +5,38 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD
--- ./scripts/brp-compress.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./scripts/brp-compress 2010-03-25 15:11:29.000000000 +0000
@@ -1,16 +1,43 @@
-#!/bin/sh
+#!/bin/bash
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
exit 0
fi
@ -20,7 +23,6 @@ make brp-compress deal correctly with hardlinked man pages
+{
+ dir=$1
+ b=$2
+ type=$3
+
+ inode=`ls -i $b | awk '{ print $1 }'`
+ others=`find $dir -type f -inum $inode`
@ -28,11 +30,13 @@ make brp-compress deal correctly with hardlinked man pages
+ [ "$afile" != "$b" ] && rm -f $afile
+ done
+
+ case $type in
+ Z|gz) gunzip $b ;;
+ bz2) bunzip2 $b ;;
+ case $b in
+ *.Z|*.gz) gunzip $b ;;
+ *.bz2) bunzip2 $b ;;
+ *.xz|*.lzma) unxz $b ;;
+ esac
+
+ type=${b##*.}
+ for afile in $others ; do
+ [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type}
+ done
@ -41,16 +45,16 @@ make brp-compress deal correctly with hardlinked man pages
for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \
./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \
@@ -23,9 +49,9 @@ do
@@ -23,9 +50,9 @@ do
[ "`basename $f`" = "dir" ] && continue
case "$f" in
- *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;;
- *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;;
- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.Z) gunzip $f || check_for_hard_link $d $f Z; b=`echo $f | sed -e 's/\.Z$//'`;;
+ *.gz) gunzip $f || check_for_hard_link $d $f gz; b=`echo $f | sed -e 's/\.gz$//'`;;
+ *.bz2) bunzip2 $f || check_for_hard_link $d $f bz2; b=`echo $f | sed -e 's/\.bz2$//'`;;
- *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
- *.xz|*.lzma) unxz $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
+ *.gz|*.Z) gunzip $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
+ *.bz2) bunzip2 $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.xz|*.lzma) unxz $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
*) b=$f;;
esac

View File

@ -1,25 +1,9 @@
Many changes to Makefiles/autogen and the like to make it build
on SUSE systems.
---
autogen.sh | 16 +++--
build/Makefile.am | 2
configure.ac | 153 ++++++++++++++++++++++++++++++++-------------------
db3/configure | 6 +-
file/src/Makefile.am | 2
installplatform | 9 ++-
lib/Makefile.am | 2
popt/autogen.sh | 2
rpmdb/Makefile.am | 4 -
rpmio/Makefile.am | 10 +--
scripts/Makefile.am | 8 ++
11 files changed, 132 insertions(+), 82 deletions(-)
Index: configure.ac
===================================================================
--- configure.ac.orig
+++ configure.ac
@@ -1009,6 +1009,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm
--- ./configure.ac.orig 2010-03-24 16:35:40.000000000 +0000
+++ ./configure.ac 2010-03-25 15:16:21.000000000 +0000
@@ -1006,6 +1006,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm
mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
@ -27,7 +11,7 @@ Index: configure.ac
sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;;
sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;;
*) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
@@ -1019,6 +1020,7 @@ esac
@@ -1016,6 +1017,7 @@ esac
RPMCANONVENDOR="$build_vendor"
case "${build_vendor}" in
unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse)
@ -35,7 +19,7 @@ Index: configure.ac
test -f /etc/redhat-release && RPMCANONVENDOR=redhat
test -f /etc/SuSE-release && RPMCANONVENDOR=suse
test -f /etc/pld-release && RPMCANONVENDOR=pld
@@ -1031,6 +1033,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec
@@ -1028,6 +1030,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec
esac
RPMCANONOS="$host_os_noversion"
RPMCANONGNU="$host_os_gnu"
@ -45,28 +29,23 @@ Index: configure.ac
AC_SUBST(RPMCANONCOLOR)
AC_SUBST(RPMCANONARCH)
AC_SUBST(RPMCANONVENDOR)
Index: db3/configure
===================================================================
--- db3/configure.orig
+++ db3/configure
--- ./db3/configure.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./db3/configure 2010-03-25 15:17:41.000000000 +0000
@@ -10,9 +10,9 @@ rm -f config.cache
# XXX edit CFLAGS= ... out of invocation args ???
ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"
-CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
- --enable-shared --enable-static --enable-rpc \
- --with-uniquename=_rpmdb --srcdir=$db_dist
+CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \
+ --enable-shared --enable-static --enable-rpc \
--enable-shared --enable-static \
- --with-uniquename=_rpmdb --srcdir=$db_dist
+ --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS
mv Makefile Makefile.orig
cat Makefile.orig | sed -e '/^install[:-]/c\
Index: installplatform
===================================================================
--- installplatform.orig
+++ installplatform
@@ -54,9 +54,9 @@ for SUBST in $SUBSTS ; do
--- ./installplatform.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./installplatform 2010-03-25 15:16:21.000000000 +0000
@@ -47,9 +47,9 @@ for SUBST in $SUBSTS ; do
ARCH_INSTALL_POST='%{nil}'
case "${ARCH}-${OS}" in
sparc64*-linux) LIB=lib64 ;;
@ -79,7 +58,7 @@ Index: installplatform
*) LIB=lib;;
esac
@@ -136,6 +136,9 @@ for SUBST in $SUBSTS ; do
@@ -129,6 +129,9 @@ for SUBST in $SUBSTS ; do
apple)
VENDORSED='-e s,^@apple@,,'
;;

View File

@ -1,10 +1,8 @@
Support a database-local fsync setting. Needs berkeley db patch.
Index: lib/backend/db3.c
===================================================================
--- lib/backend/db3.c.orig
+++ lib/backend/db3.c
@@ -191,10 +191,12 @@ static int db_fini(dbiIndex dbi, const c
--- ./lib/backend/db3.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/backend/db3.c 2010-03-25 14:35:39.000000000 +0000
@@ -62,10 +62,12 @@ static int db_fini(dbiIndex dbi, const c
return rc;
}
@ -17,9 +15,9 @@ Index: lib/backend/db3.c
#if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 5)
/*
@@ -357,10 +359,12 @@ static int db_init(dbiIndex dbi, const c
/* dbenv->set_rep_transport(???) */
/* dbenv->set_rep_limit(???) */
@@ -168,10 +170,12 @@ static int db_init(dbiIndex dbi, const c
xx = cvtdberr(dbi, "dbenv->set_cachesize", xx, _debug);
}
+#if 0
if (dbi->dbi_no_fsync) {
@ -30,11 +28,9 @@ Index: lib/backend/db3.c
if (dbi->dbi_shmkey) {
xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey);
Index: lib/backend/dbconfig.c
===================================================================
--- lib/backend/dbconfig.c.orig
+++ lib/backend/dbconfig.c
@@ -94,6 +94,8 @@ struct poptOption rdbOptions[] = {
--- ./lib/backend/dbconfig.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/backend/dbconfig.c 2010-03-25 14:35:39.000000000 +0000
@@ -72,6 +72,8 @@ static const struct poptOption rdbOption
NULL, NULL },
{ "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING,
NULL, NULL },
@ -43,7 +39,7 @@ Index: lib/backend/dbconfig.c
{ "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE,
NULL, NULL },
@@ -140,8 +142,6 @@ struct poptOption rdbOptions[] = {
@@ -101,8 +103,6 @@ static const struct poptOption rdbOption
NULL, NULL },
{ "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0,
NULL, NULL },

View File

@ -1,7 +1,5 @@
Index: build/files.c
===================================================================
--- build/files.c.orig
+++ build/files.c
--- ./build/files.c.orig 2010-03-25 15:18:05.000000000 +0000
+++ ./build/files.c 2010-03-25 15:21:26.000000000 +0000
@@ -17,6 +17,10 @@
#include <rpm/rpmfileutil.h> /* rpmDoDigest() */
#include <rpm/rpmlog.h>
@ -13,7 +11,7 @@ Index: build/files.c
#include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */
#include "rpmio/base64.h"
#include "rpmio/fts.h"
@@ -2220,12 +2224,136 @@ exit:
@@ -2230,12 +2234,136 @@ exit:
return rc;
}
@ -150,9 +148,9 @@ Index: build/files.c
genSourceRpmName(spec);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
@@ -2238,8 +2366,109 @@ int processBinaryFiles(rpmSpec spec, int
(void) headerNEVRA(pkg->header, &n, NULL, &v, &r, &a);
rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s.%s\n"), n, v, r, a);
@@ -2250,8 +2378,110 @@ int processBinaryFiles(rpmSpec spec, int
rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr);
free(nvr);
- if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK ||
- (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
@ -162,6 +160,7 @@ Index: build/files.c
+ /* BEGIN DEBUGPKG */
+#if HAVE_GELF_H && HAVE_LIBELF
+ elf_version(EV_CURRENT);
+ a = headerGetString(pkg->header, RPMTAG_ARCH);
+ if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0)
+ {
+ Package dbg;
@ -261,11 +260,9 @@ Index: build/files.c
+ if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
goto exit;
if (strcmp(a, "noarch") == 0 && headerGetColor(pkg->header) != 0) {
Index: macros.in
===================================================================
--- macros.in.orig
+++ macros.in
a = headerGetString(pkg->header, RPMTAG_ARCH);
--- ./macros.in.orig 2010-03-25 15:21:20.000000000 +0000
+++ ./macros.in 2010-03-25 15:21:26.000000000 +0000
@@ -176,24 +176,10 @@
# Template for debug information sub-package.
%debug_package \
@ -291,11 +288,9 @@ Index: macros.in
%description debugsource\
This package provides debug sources for package %{name}.\
Debug sources are useful when developing applications that use this\
Index: scripts/find-debuginfo.sh
===================================================================
--- scripts/find-debuginfo.sh.orig
+++ scripts/find-debuginfo.sh
@@ -274,19 +274,11 @@ while read nlinks inum f; do
--- ./scripts/find-debuginfo.sh.orig 2010-03-25 15:19:04.000000000 +0000
+++ ./scripts/find-debuginfo.sh 2010-03-25 15:21:26.000000000 +0000
@@ -275,19 +275,11 @@ while read nlinks inum f; do
fi
done || exit

View File

@ -1,10 +1,8 @@
Index: build/parseSpec.c
===================================================================
--- build/parseSpec.c.orig
+++ build/parseSpec.c
@@ -569,6 +569,13 @@ int parseSpec(rpmts ts, const char *spec
--- ./build/parseSpec.c.orig 2010-03-25 15:19:16.000000000 +0000
+++ ./build/parseSpec.c 2010-03-25 15:45:25.000000000 +0000
@@ -562,6 +562,13 @@ int parseSpec(rpmts ts, const char *spec
free(body);
}
/* LCL: parsePart is modified @*/
+ if (spec->clean == NULL) {
+ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL);

View File

@ -2,24 +2,23 @@ Make the numbers reported for diskspace problems more user
friendly. Probably a bad idea, as it changes the semantics. Instead,
the messages should be changed.
Index: lib/rpmts.c
===================================================================
--- lib/rpmts.c.orig
+++ lib/rpmts.c
@@ -924,14 +924,14 @@ void rpmtsCheckDSIProblems(const rpmts t
rpmpsAppend(ps, RPMPROB_DISKSPACE,
--- ./lib/transaction.c.orig 2010-03-25 14:37:50.000000000 +0000
+++ ./lib/transaction.c 2010-03-25 14:38:27.000000000 +0000
@@ -212,7 +212,7 @@ static void rpmtsCheckDSIProblems(const
rpmpsAppend(ps, RPMPROB_DISKSPACE,
rpmteNEVRA(te), rpmteKey(te),
ts->filesystems[i], NULL, NULL,
- (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize);
+ (adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
- (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize);
+ (adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
dsi->obneeded = dsi->bneeded;
}
}
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
rpmpsAppend(ps, RPMPROB_DISKNODES,
@@ -222,7 +222,7 @@ static void rpmtsCheckDSIProblems(const
rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmteNEVRA(te), rpmteKey(te),
ts->filesystems[i], NULL, NULL,
- (adj_fs_blocks(dsi->ineeded) - dsi->iavail));
+ (adj_fs_blocks(dsi->ineeded)));
- (adj_fs_blocks(dsi->ineeded) - dsi->iavail));
+ (adj_fs_blocks(dsi->ineeded)));
dsi->oineeded = dsi->ineeded;
}
}
}
ps = rpmpsFree(ps);

View File

@ -1,22 +1,18 @@
Index: build/parsePreamble.c
===================================================================
--- build/parsePreamble.c.orig
+++ build/parsePreamble.c
@@ -311,6 +311,7 @@ static struct optionalTag {
--- ./build/parsePreamble.c.orig 2010-03-25 14:56:24.000000000 +0000
+++ ./build/parsePreamble.c 2010-03-25 15:20:35.000000000 +0000
@@ -312,6 +312,7 @@ static struct optionalTag {
{ RPMTAG_PACKAGER, "%{packager}" },
{ RPMTAG_DISTRIBUTION, "%{distribution}" },
{ RPMTAG_DISTURL, "%{disturl}" },
+ { RPMTAG_DISTTAG, "%{disttag}" },
{ RPMTAG_BUGURL, "%{bugurl}" },
{ -1, NULL }
};
Index: macros.in
===================================================================
--- macros.in.orig
+++ macros.in
@@ -276,6 +276,16 @@ package or when debugging this package.\
--- ./macros.in.orig 2010-03-25 15:18:50.000000000 +0000
+++ ./macros.in 2010-03-25 15:19:25.000000000 +0000
@@ -279,6 +279,16 @@ package or when debugging this package.\
#
#%disturl
#%bugurl
+# Configurable distribution tag, same as Disttag: tag in a specfile.
+# The tag will be used to supply reliable information to tools like

View File

@ -1,14 +1,25 @@
SUSE specific kernel provides/requires scripts
---
scripts/find-provides.ksyms | 41 +++++++++++++++++++++++++++++++
scripts/find-requires.ksyms | 57 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
Index: scripts/find-provides.ksyms
===================================================================
--- /dev/null
+++ scripts/find-provides.ksyms
--- ./scripts/Makefile.am.orig 2010-03-25 16:39:30.000000000 +0000
+++ ./scripts/Makefile.am 2010-03-25 16:39:56.000000000 +0000
@@ -18,6 +18,7 @@ EXTRA_DIST = \
rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
tcl.req tgpg vpkg-provides.sh \
find-requires.php find-provides.php \
+ find-requires.ksyms find-provides.ksyms \
find-php-provides find-php-requires \
mono-find-requires mono-find-provides \
ocaml-find-requires.sh ocaml-find-provides.sh \
@@ -34,6 +35,7 @@ rpmconfig_SCRIPTS = \
check-buildroot check-rpaths check-rpaths-worker \
find-lang.sh \
perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \
+ find-requires.ksyms find-provides.ksyms \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \
--- ./scripts/find-provides.ksyms.orig 2010-03-25 16:39:56.000000000 +0000
+++ ./scripts/find-provides.ksyms 2010-03-25 16:39:56.000000000 +0000
@@ -0,0 +1,41 @@
+#! /bin/sh
+
@ -51,10 +62,8 @@ Index: scripts/find-provides.ksyms
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
+done \
+| sort -u
Index: scripts/find-requires.ksyms
===================================================================
--- /dev/null
+++ scripts/find-requires.ksyms
--- ./scripts/find-requires.ksyms.orig 2010-03-25 16:39:56.000000000 +0000
+++ ./scripts/find-requires.ksyms 2010-03-25 16:39:56.000000000 +0000
@@ -0,0 +1,57 @@
+#! /bin/bash
+
@ -113,23 +122,3 @@ Index: scripts/find-requires.ksyms
+ { print "ksym(" flavor ":" arr[3] ") = " arr[2] }
+ '
+fi
Index: scripts/Makefile.am
===================================================================
--- scripts/Makefile.am.orig
+++ scripts/Makefile.am
@@ -19,6 +19,7 @@ EXTRA_DIST = \
tcl.req tgpg u_pkg.sh \
vpkg-provides.sh vpkg-provides2.sh \
find-requires.php find-provides.php \
+ find-requires.ksyms find-provides.ksyms \
find-php-provides find-php-requires \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh
@@ -33,6 +34,7 @@ rpmconfig_SCRIPTS = \
check-buildroot check-rpaths check-rpaths-worker \
find-lang.sh \
perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \
+ find-requires.ksyms find-provides.ksyms \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh \
rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg

View File

@ -1,21 +0,0 @@
Index: build/files.c
===================================================================
--- build/files.c.orig
+++ build/files.c
@@ -1742,9 +1742,13 @@ static rpmRC processPackageFiles(rpmSpec
argvSplit(&filelists, getStringBuf(pkg->fileFile), "\n");
for (fp = filelists; *fp != NULL; fp++) {
- ffn = rpmGetPath("%{_builddir}/",
- (spec->buildSubdir ? spec->buildSubdir : "") ,
- "/", *fp, NULL);
+ if (**fp == '/') {
+ ffn = rpmGetPath(*fp, NULL);
+ } else {
+ ffn = rpmGetPath("%{_builddir}/",
+ (spec->buildSubdir ? spec->buildSubdir : "") ,
+ "/", *fp, NULL);
+ }
fd = fopen(ffn, "r");
if (fd == NULL || ferror(fd)) {

View File

@ -1,13 +0,0 @@
Index: lib/query.c
===================================================================
--- lib/query.c.orig
+++ lib/query.c
@@ -283,7 +283,7 @@ static int rpmgiShowMatches(QVA_t qva, r
if (qva->qva_source == RPMQV_DBOFFSET)
break;
}
- return rpmgiNumErrors(gi);
+ return ec + rpmgiNumErrors(gi);
}
int rpmcliShowMatches(QVA_t qva, rpmts ts)

View File

@ -1,257 +1,6 @@
Index: lib/rpmts.c
===================================================================
--- lib/rpmts.c.orig
+++ lib/rpmts.c
@@ -779,83 +779,102 @@ rpmdb rpmtsGetRdb(rpmts ts)
int rpmtsInitDSI(const rpmts ts)
{
- rpmDiskSpaceInfo dsi;
- struct stat sb;
- int rc;
- int i;
-
if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE)
return 0;
-
- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n");
- rpmlog(RPMLOG_DEBUG,
- " i dev bsize bavail iavail mount point\n");
-
- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0)
- return rc;
-
- /* Get available space on mounted file systems. */
-
ts->dsi = _free(ts->dsi);
- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi));
+ ts->dsi = xcalloc(1, sizeof(*ts->dsi));
+ return 0;
+}
- dsi = ts->dsi;
+static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count)
+{
+ rpmDiskSpaceInfo dsi;
+ struct stat sb;
+ int rc;
- if (dsi != NULL)
- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) {
#if STATFS_IN_SYS_STATVFS
- struct statvfs sfb;
- memset(&sfb, 0, sizeof(sfb));
- rc = statvfs(ts->filesystems[i], &sfb);
+ struct statvfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
+ rc = statvfs(dirName, &sfb);
#else
- struct statfs sfb;
- memset(&sfb, 0, sizeof(sfb));
+ struct statfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
# if STAT_STATFS4
/* This platform has the 4-argument version of the statfs call. The last two
* should be the size of struct statfs and 0, respectively. The 0 is the
* filesystem type, and is always 0 when statfs is called on a mounted
* filesystem, as we're doing.
*/
- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0);
+ rc = statfs(dirName, &sfb, sizeof(sfb), 0);
# else
- rc = statfs(ts->filesystems[i], &sfb);
+ rc = statfs(dirName, &sfb);
# endif
#endif
- if (rc)
- break;
-
- rc = stat(ts->filesystems[i], &sb);
- if (rc)
- break;
- dsi->dev = sb.st_dev;
+ if (rc)
+ return NULL;
- dsi->bsize = sfb.f_bsize;
- dsi->bneeded = 0;
- dsi->ineeded = 0;
+ rc = stat(dirName, &sb);
+ if (rc)
+ return NULL;
+ if (sb.st_dev != dev)
+ return NULL;
+
+ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi));
+ dsi = ts->dsi + count;
+ memset(dsi, 0, 2 * sizeof(*dsi));
+ dsi->dev = dev;
+ dsi->bsize = sfb.f_bsize;
+ if (!dsi->bsize)
+ dsi->bsize = 512; /* we need a bsize */
+ dsi->bneeded = 0;
+ dsi->ineeded = 0;
#ifdef STATFS_HAS_F_BAVAIL
- dsi->bavail = sfb.f_bavail;
+ dsi->bavail = sfb.f_bavail;
#else
/* FIXME: the statfs struct doesn't have a member to tell how many blocks are
* available for non-superusers. f_blocks - f_bfree is probably too big, but
* it's about all we can do.
*/
- dsi->bavail = sfb.f_blocks - sfb.f_bfree;
+ dsi->bavail = sfb.f_blocks - sfb.f_bfree;
#endif
- /* XXX Avoid FAT and other file systems that have not inodes. */
- /* XXX assigning negative value to unsigned type */
- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
- ? sfb.f_ffree : -1;
- rpmlog(RPMLOG_DEBUG,
- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n",
- i, (unsigned) dsi->dev, dsi->bsize,
- dsi->bavail, dsi->iavail,
- ts->filesystems[i]);
+ /* XXX Avoid FAT and other file systems that have not inodes. */
+ /* XXX assigning negative value to unsigned type */
+ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
+ ? sfb.f_ffree : -1;
+
+ return dsi;
+}
+
+static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi)
+{
+ int i;
+ struct stat sb;
+
+ /* must leave chroot for this */
+ if (rpmtsChrootDone(ts)) {
+ chroot(".");
+ }
+ if (!ts->filesystemCount)
+ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
+ for (i = 0; i < ts->filesystemCount; i++) {
+ if (stat(ts->filesystems[i], &sb))
+ continue;
+ if (sb.st_dev == dsi->dev) {
+ dsi->mntPoint = ts->filesystems[i];
+ break;
+ }
+ }
+ if (i == ts->filesystemCount) {
+ /* file system not found, create something to display */
+ dsi->mntPoint = xmalloc(20);
+ sprintf(dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev);
+ }
+ if (rpmtsChrootDone(ts)) {
+ chroot(ts->rootDir);
}
- return rc;
}
-void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
+void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize,
rpmFileAction action)
{
@@ -866,8 +885,10 @@ void rpmtsUpdateDSI(const rpmts ts, dev_
if (dsi) {
while (dsi->bsize && dsi->dev != dev)
dsi++;
- if (dsi->bsize == 0)
- dsi = NULL;
+ if (dsi->bsize == 0) {
+ /* create new entry */
+ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi);
+ }
}
if (dsi == NULL)
return;
@@ -910,32 +931,32 @@ void rpmtsCheckDSIProblems(const rpmts t
rpmDiskSpaceInfo dsi;
rpmps ps;
int fc;
- int i;
-
- if (ts->filesystems == NULL || ts->filesystemCount <= 0)
- return;
dsi = ts->dsi;
- if (dsi == NULL)
+ if (dsi == NULL || !dsi->bsize)
return;
fc = rpmfiFC(rpmteFI(te));
if (fc <= 0)
return;
ps = rpmtsProblems(ts);
- for (i = 0; i < ts->filesystemCount; i++, dsi++) {
+ for (; dsi->bsize; dsi++) {
if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKSPACE,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
}
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->ineeded)));
}
}
Index: lib/rpmts.h
===================================================================
--- lib/rpmts.h.orig
+++ lib/rpmts.h
@@ -485,7 +485,7 @@ int rpmtsSuspendResumeDBLock(rpmts ts, i
* @param fixupSize long size difference
* @param action file disposition
*/
-void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
+void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize,
rpmFileAction action);
Index: lib/rpmts_internal.h
===================================================================
--- lib/rpmts_internal.h.orig
+++ lib/rpmts_internal.h
@@ -14,6 +14,7 @@ typedef struct diskspaceInfo_s * rpmDisk
/** \ingroup rpmts
*/
struct diskspaceInfo_s {
+ const char *mntPoint; /*!< File system mount point */
dev_t dev; /*!< File system device number. */
int64_t bneeded; /*!< No. of blocks needed. */
int64_t ineeded; /*!< No. of inodes needed. */
Index: lib/transaction.c
===================================================================
--- lib/transaction.c.orig
+++ lib/transaction.c
@@ -343,7 +343,7 @@ assert(otherFi != NULL);
}
/* Update disk space info for a file. */
- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi),
+ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi),
rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i));
}
Index: configure.ac
===================================================================
--- configure.ac.orig
+++ configure.ac
@@ -511,25 +511,25 @@ dnl
--- ./configure.ac.orig 2010-03-25 15:16:21.000000000 +0000
+++ ./configure.ac 2010-03-25 15:27:47.000000000 +0000
@@ -510,25 +510,25 @@ dnl
found_struct_statfs=no
if test X$found_struct_statfs = Xno ; then
@ -284,3 +33,242 @@ Index: configure.ac
found_struct_statfs=yes],[])
fi
--- ./lib/transaction.c.orig 2010-03-25 15:14:38.000000000 +0000
+++ ./lib/transaction.c 2010-03-25 15:44:25.000000000 +0000
@@ -45,6 +45,7 @@
#include "debug.h"
struct diskspaceInfo_s {
+ const char *mntPoint; /*!< File system mount point */
dev_t dev; /*!< File system device number. */
int64_t bneeded; /*!< No. of blocks needed. */
int64_t ineeded; /*!< No. of inodes needed. */
@@ -61,83 +62,78 @@ struct diskspaceInfo_s {
static int rpmtsInitDSI(const rpmts ts)
{
- rpmDiskSpaceInfo dsi;
- struct stat sb;
- int rc;
- int i;
-
if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE)
return 0;
- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n");
- rpmlog(RPMLOG_DEBUG,
- " i dev bsize bavail iavail mount point\n");
-
- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0)
- return rc;
-
- /* Get available space on mounted file systems. */
-
ts->dsi = _free(ts->dsi);
- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi));
+ ts->dsi = xcalloc(1, sizeof(*ts->dsi));
+ return 0;
+}
- dsi = ts->dsi;
+static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count)
+{
+ rpmDiskSpaceInfo dsi;
+ struct stat sb;
+ int rc;
- if (dsi != NULL)
- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) {
#if STATFS_IN_SYS_STATVFS
- struct statvfs sfb;
- memset(&sfb, 0, sizeof(sfb));
- rc = statvfs(ts->filesystems[i], &sfb);
+ struct statvfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
+ rc = statvfs(ts->filesystems[i], &sfb);
#else
- struct statfs sfb;
- memset(&sfb, 0, sizeof(sfb));
+ struct statfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
# if STAT_STATFS4
/* This platform has the 4-argument version of the statfs call. The last two
* should be the size of struct statfs and 0, respectively. The 0 is the
* filesystem type, and is always 0 when statfs is called on a mounted
* filesystem, as we're doing.
*/
- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0);
+ rc = statfs(dirName, &sfb, sizeof(sfb), 0);
# else
- rc = statfs(ts->filesystems[i], &sfb);
+ rc = statfs(dirName, &sfb);
# endif
#endif
- if (rc)
- break;
+ if (rc)
+ return NULL;
- rc = stat(ts->filesystems[i], &sb);
- if (rc)
- break;
- dsi->dev = sb.st_dev;
+ rc = stat(dirName, &sb);
+ if (rc)
+ return NULL;
+ if (sb.st_dev != dev)
+ return NULL;
- dsi->bsize = sfb.f_bsize;
- dsi->bneeded = 0;
- dsi->ineeded = 0;
+ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi));
+ dsi = ts->dsi + count;
+ memset(dsi, 0, 2 * sizeof(*dsi));
+
+ dsi->dev = sb.st_dev;
+ dsi->bsize = sfb.f_bsize;
+ if (!dsi->bsize)
+ dsi->bsize = 512; /* we need a bsize */
+ dsi->bneeded = 0;
+ dsi->ineeded = 0;
#ifdef STATFS_HAS_F_BAVAIL
- dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail;
+# ifdef ST_RDONLY
+ dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail;
+# else
+ dsi->bavail = sfb.f_bavail;
+# endif
#else
/* FIXME: the statfs struct doesn't have a member to tell how many blocks are
* available for non-superusers. f_blocks - f_bfree is probably too big, but
* it's about all we can do.
*/
- dsi->bavail = sfb.f_blocks - sfb.f_bfree;
+ dsi->bavail = sfb.f_blocks - sfb.f_bfree;
#endif
- /* XXX Avoid FAT and other file systems that have not inodes. */
- /* XXX assigning negative value to unsigned type */
- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
- ? sfb.f_ffree : -1;
- rpmlog(RPMLOG_DEBUG,
- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n",
- i, (unsigned) dsi->dev, dsi->bsize,
- dsi->bavail, dsi->iavail,
- ts->filesystems[i]);
- }
- return rc;
+ /* XXX Avoid FAT and other file systems that have not inodes. */
+ /* XXX assigning negative value to unsigned type */
+ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
+ ? sfb.f_ffree : -1;
+ return dsi;
}
-static void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
+static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize,
rpmFileAction action)
{
@@ -148,8 +140,10 @@ static void rpmtsUpdateDSI(const rpmts t
if (dsi) {
while (dsi->bsize && dsi->dev != dev)
dsi++;
- if (dsi->bsize == 0)
- dsi = NULL;
+ if (dsi->bsize == 0) {
+ /* create new entry */
+ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi);
+ }
}
if (dsi == NULL)
return;
@@ -187,31 +181,58 @@ static void rpmtsUpdateDSI(const rpmts t
dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize);
}
+static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi)
+{
+ int i;
+ struct stat sb;
+
+ /* must leave chroot for this */
+ if (rpmtsChrootDone(ts)) {
+ chroot(".");
+ }
+ if (!ts->filesystemCount)
+ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
+ for (i = 0; i < ts->filesystemCount; i++) {
+ if (stat(ts->filesystems[i], &sb))
+ continue;
+ if (sb.st_dev == dsi->dev) {
+ dsi->mntPoint = ts->filesystems[i];
+ break;
+ }
+ }
+ if (i == ts->filesystemCount) {
+ /* file system not found, create something to display */
+ dsi->mntPoint = xmalloc(20);
+ sprintf((char *)dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev);
+ }
+ if (rpmtsChrootDone(ts)) {
+ chroot(ts->rootDir);
+ }
+}
+
static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
{
rpmDiskSpaceInfo dsi;
rpmps ps;
int fc;
- int i;
-
- if (ts->filesystems == NULL || ts->filesystemCount <= 0)
- return;
dsi = ts->dsi;
- if (dsi == NULL)
+ if (dsi == NULL || !dsi->bsize)
return;
fc = rpmfiFC(rpmteFI(te));
if (fc <= 0)
return;
ps = rpmtsProblems(ts);
- for (i = 0; i < ts->filesystemCount; i++, dsi++) {
+ for (; dsi->bsize; dsi++) {
if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
if (dsi->bneeded != dsi->obneeded) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKSPACE,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
dsi->obneeded = dsi->bneeded;
}
@@ -219,9 +240,11 @@ static void rpmtsCheckDSIProblems(const
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
if (dsi->ineeded != dsi->oineeded) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->ineeded)));
dsi->oineeded = dsi->ineeded;
}
@@ -543,7 +566,7 @@ assert(otherFi != NULL);
}
/* Update disk space info for a file. */
- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi),
+ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi),
rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i));
}

View File

@ -1,10 +1,5 @@
Convert changelog and i18n header elements to current locale.
[#43347], rh#140050
Index: lib/tagexts.c
===================================================================
--- lib/tagexts.c.orig
+++ lib/tagexts.c
--- ./lib/tagexts.c.orig 2010-01-08 08:14:37.000000000 +0000
+++ ./lib/tagexts.c 2010-03-24 16:46:03.000000000 +0000
@@ -2,6 +2,7 @@
* \file lib/formats.c
*/
@ -13,7 +8,7 @@ Index: lib/tagexts.c
#include "system.h"
#include <rpm/rpmtypes.h>
@@ -156,6 +157,114 @@ exit:
@@ -157,6 +158,114 @@ exit:
return rc;
}
@ -128,31 +123,27 @@ Index: lib/tagexts.c
/**
* Retrieve mounted file system paths.
* @param h header
@@ -534,9 +643,43 @@ static int i18nTag(Header h, rpmTag tag,
@@ -533,10 +642,41 @@ static int i18nTag(Header h, rpmTag tag,
dstring = _free(dstring);
rc = headerGet(h, tag, td, HEADERGET_DEFAULT);
rc = headerGet(h, tag, td, HEADERGET_ALLOC);
+ if (rc && td->data) {
+ td->data = xstrdup(td->data);
+ td->data = strtolocale(td->data);
+ td->flags = RPMTD_ALLOCED;
+ }
+ return rc;
+}
+
+/**
return rc;
}
/**
+ * Retrieve text and convert to locale.
+ */
+static int localeTag(Header h, rpmTag tag, rpmtd td)
+{
+ int rc;
+ rc = headerGet(h, tag, td, HEADERGET_DEFAULT);
+ rc = headerGet(h, tag, td, HEADERGET_ALLOC);
+ if (!rc)
+ return 0;
+ if (td->type == RPM_STRING_TYPE) {
+ td->data = xstrdup(td->data);
+ td->data = strtolocale(td->data);
+ td->flags = RPMTD_ALLOCED;
+ td->count = 1;
+ } else if (td->type == RPM_STRING_ARRAY_TYPE) {
+ char **arr;
@ -162,18 +153,20 @@ Index: lib/tagexts.c
+ arr[i] = xstrdup(((char **)td->data)[i]);
+ arr[i] = strtolocale(arr[i]);
+ }
+ _free(td->data);
+ td->data = arr;
+ td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED;
+ }
return rc;
}
+ return rc;
+}
+
/**
+
+/**
* Retrieve summary text.
* @param h header
@@ -559,6 +702,16 @@ static int descriptionTag(Header h, rpmt
return i18nTag(h, RPMTAG_DESCRIPTION, td);
* @retval td tag data container
@@ -558,6 +698,16 @@ static int descriptionTag(Header h, rpmt
return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags);
}
+static int changelognameTag(Header h, rpmtd td)
@ -189,12 +182,12 @@ Index: lib/tagexts.c
/**
* Retrieve group text.
* @param h header
@@ -663,6 +816,8 @@ static const struct headerTagFunc_s rpmH
@@ -791,6 +941,8 @@ static const struct headerTagFunc_s rpmH
{ RPMTAG_LONGARCHIVESIZE, longarchivesizeTag },
{ RPMTAG_LONGSIZE, longsizeTag },
{ RPMTAG_LONGSIGSIZE, longsigsizeTag },
+ { RPMTAG_CHANGELOGNAME, changelognameTag },
+ { RPMTAG_CHANGELOGTEXT, changelogtextTag },
{ 0, NULL }
};
{ RPMTAG_DBINSTANCE, dbinstanceTag },
{ RPMTAG_EVR, evrTag },
{ RPMTAG_NVR, nvrTag },

View File

@ -1,8 +1,6 @@
Index: lib/psm.c
===================================================================
--- lib/psm.c.orig
+++ lib/psm.c
@@ -441,6 +441,8 @@ static rpmRC runLuaScript(rpmpsm psm, He
--- ./lib/psm.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/psm.c 2010-03-25 14:42:52.000000000 +0000
@@ -455,6 +455,8 @@ static rpmRC runLuaScript(rpmpsm psm, He
#ifdef WITH_LUA
char *sname = NULL;
int rootFd = -1;
@ -11,16 +9,10 @@ Index: lib/psm.c
int xx;
rpmlua lua = NULL; /* Global state. */
rpmluav var;
@@ -449,16 +451,21 @@ static rpmRC runLuaScript(rpmpsm psm, He
@@ -463,6 +465,22 @@ static rpmRC runLuaScript(rpmpsm psm, He
rpmlog(RPMLOG_DEBUG, "%s: %s running <lua> scriptlet.\n",
psm->stepName, sname);
- if (!rpmtsChrootDone(ts)) {
- const char *rootDir = rpmtsRootDir(ts);
- xx = chdir("/");
- rootFd = open(".", O_RDONLY, 0);
- if (rootFd >= 0) {
- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
+ chroot_done = rpmtsChrootDone(ts);
+ rootDir = rpmtsRootDir(ts);
+ if (!chroot_done) {
@ -28,26 +20,26 @@ Index: lib/psm.c
+ xx = chdir("/");
+ rootFd = open(".", O_RDONLY, 0);
+ if (rootFd >= 0) {
xx = chroot(rootDir);
- xx = rpmtsSetChrootDone(ts, 1);
+ xx = chroot(rootDir);
+ xx = rpmtsSetChrootDone(ts, 1);
+ }
}
+ }
+ } else {
+ rootFd = open(".", O_RDONLY, 0);
}
+ }
+ xx = chdir("/");
/* Create arg variable */
rpmluaPushTable(lua, "arg");
@@ -491,12 +498,17 @@ static rpmRC runLuaScript(rpmpsm psm, He
+
if (!rpmtsChrootDone(ts)) {
const char *rootDir = rpmtsRootDir(ts);
xx = chdir("/");
@@ -505,12 +523,17 @@ static rpmRC runLuaScript(rpmpsm psm, He
rpmluaDelVar(lua, "arg");
if (rootFd >= 0) {
- const char *rootDir = rpmtsRootDir(ts);
xx = fchdir(rootFd);
xx = close(rootFd);
- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
- if (rootDir != NULL && !rstreq(rootDir, "/") && *rootDir == '/')
+ if (!chroot_done) {
xx = chroot(".");
- xx = rpmtsSetChrootDone(ts, 0);

View File

@ -1,9 +1,5 @@
SUSE specific macro changes.
Index: macros.in
===================================================================
--- macros.in.orig
+++ macros.in
--- ./macros.in.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./macros.in 2010-03-25 15:13:43.000000000 +0000
@@ -175,22 +175,22 @@
# Template for debug information sub-package.
@ -33,7 +29,7 @@ Index: macros.in
# The path to the gzip executable (legacy, use %{__gzip} instead).
%_gzipbin %{__gzip}
@@ -233,7 +233,7 @@ package or when debugging this package.\
@@ -230,7 +230,7 @@ package or when debugging this package.\
%_tmppath %{_var}/tmp
# Path to top of build area.
@ -42,7 +38,7 @@ Index: macros.in
# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}
@@ -330,7 +330,7 @@ package or when debugging this package.\
@@ -333,7 +333,7 @@ package or when debugging this package.\
# "w7.lzdio" lzma-alone level 7, lzma's default
#
#%_source_payload w9.gzdio
@ -51,7 +47,7 @@ Index: macros.in
# Algorithm to use for generating file checksum digests on build.
# If not specified or 0, MD5 is used.
@@ -420,7 +420,7 @@ package or when debugging this package.\
@@ -417,7 +417,7 @@ package or when debugging this package.\
#
# Use internal dependency generator rather than external helpers?
@ -60,7 +56,7 @@ Index: macros.in
#
# Filter GLIBC_PRIVATE Provides: and Requires:
@@ -466,16 +466,22 @@ print (t)\
@@ -463,16 +463,22 @@ print (t)\
# Undefined, missing or %{nil} will use package content (if available).
%_verify_file_context_path %{__file_context_path}
@ -84,8 +80,8 @@ Index: macros.in
+#%__find_enhances ???
#
# Path to scripts to autogenerate per-interpreter package dependencies,
@@ -638,15 +644,15 @@ print (t)\
# Path to scripts to autogenerate per-interpreter package dependencies.
@@ -644,15 +650,15 @@ print (t)\
%_dbi_config_Packages %{_dbi_htconfig} lockdbfd
# "Depends" is a per-transaction cache of known dependency resolutions.
@ -108,7 +104,7 @@ Index: macros.in
# XXX legacy configuration.
# Choose db interface:
@@ -1008,7 +1014,7 @@ print (t)\
@@ -991,7 +997,7 @@ print (t)\
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host @host@
@ -117,9 +113,9 @@ Index: macros.in
%_host_cpu @host_cpu@
%_host_vendor @host_vendor@
%_host_os @host_os@
@@ -1168,6 +1174,181 @@ done \
%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
@@ -1154,6 +1160,181 @@ done \
%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
%python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")
+# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
+#
@ -299,7 +295,7 @@ Index: macros.in
#------------------------------------------------------------------------------
# arch macro for all Intel i?86 compatibile processors
# (Note: This macro (and it's analogues) will probably be obsoleted when
@@ -1178,7 +1359,9 @@ done \
@@ -1164,7 +1345,9 @@ done \
#------------------------------------------------------------------------------
# arch macro for all supported ARM processors
@ -310,7 +306,7 @@ Index: macros.in
#------------------------------------------------------------------------------
# arch macro for all supported Sparc processors
@@ -1207,3 +1390,26 @@ done \
@@ -1197,3 +1380,26 @@ done \
# \endverbatim
#*/

View File

@ -1,10 +1,6 @@
Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7.
Index: lib/depends.c
===================================================================
--- lib/depends.c.orig
+++ lib/depends.c
@@ -518,8 +518,13 @@ retry:
--- ./lib/depends.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/depends.c 2010-03-24 16:47:28.000000000 +0000
@@ -450,8 +450,13 @@ retry:
}
unsatisfied:
@ -19,20 +15,9 @@ Index: lib/depends.c
+ }
exit:
/*
@@ -827,6 +832,8 @@ static inline const char * identifyDepen
return "Requires(postun):";
if (f & RPMSENSE_SCRIPT_VERIFY)
return "Requires(verify):";
+ if (f & RPMSENSE_MISSINGOK)
+ return "Requires(hint):";
if (f & RPMSENSE_FIND_REQUIRES)
return "Requires(auto):";
return "Requires:";
Index: lib/rpmds.h
===================================================================
--- lib/rpmds.h.orig
+++ lib/rpmds.h
if (cacheThis) {
--- ./lib/rpmds.h.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/rpmds.h 2010-03-24 16:47:28.000000000 +0000
@@ -73,6 +73,7 @@ typedef enum rpmsenseFlags_e {
RPMSENSE_SCRIPT_POSTUN | \
RPMSENSE_SCRIPT_VERIFY | \

16
modemuncher.diff Normal file
View File

@ -0,0 +1,16 @@
--- luaext/modemuncher.c.orig 2010-03-26 09:43:45.000000000 +0000
+++ luaext/modemuncher.c 2010-03-26 09:44:54.000000000 +0000
@@ -245,11 +245,11 @@ printf("modemuncher: doneflag = %u\n", d
if (ch_mode) switch (op)
{
case '+':
- *mode = *mode |= ch_mode & affected_bits;
+ *mode |= ch_mode & affected_bits;
break;
case '-':
- *mode = *mode &= ~(ch_mode & affected_bits);
+ *mode &= ~(ch_mode & affected_bits);
break;
case '=':

View File

@ -1,11 +1,9 @@
Also compare the name and not only the version when checking if
two packages are the same. rh#104066
Index: lib/depends.c
===================================================================
--- lib/depends.c.orig
+++ lib/depends.c
@@ -102,6 +102,24 @@ static int removePackage(rpmts ts, Heade
--- ./lib/depends.c.orig 2010-03-24 16:47:28.000000000 +0000
+++ ./lib/depends.c 2010-03-24 16:52:00.000000000 +0000
@@ -100,6 +100,24 @@ static int removePackage(rpmts ts, Heade
return 0;
}
@ -30,7 +28,7 @@ Index: lib/depends.c
int rpmtsAddInstallElement(rpmts ts, Header h,
fnpyKey key, int upgrade, rpmRelocation * relocs)
{
@@ -291,7 +309,7 @@ addheader:
@@ -275,7 +293,7 @@ addheader:
continue;
/* Skip packages that contain identical NEVR. */
@ -38,18 +36,18 @@ Index: lib/depends.c
+ if (rpmNameVersionCompare(h, oh) == 0)
continue;
xx = removePackage(ts, oh, pkgKey);
@@ -342,11 +360,9 @@ addheader:
xx = removePackage(ts, oh, p);
@@ -316,11 +334,9 @@ addheader:
* If no obsoletes version info is available, match all names.
*/
if (rpmdsEVR(obsoletes) == NULL
- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
char * ohNEVRA = headerGetNEVRA(oh, NULL);
char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA);
-#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */
- if (rpmVersionCompare(h, oh))
-#endif
+ if (rpmNameVersionCompare(h, oh))
xx = removePackage(ts, oh, pkgKey);
xx = removePackage(ts, oh, p);
rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n",
rpmdsDNEVR(obsoletes)+2, ohNEVRA);

10
readlineofi.diff Normal file
View File

@ -0,0 +1,10 @@
--- build/parseSpec.c.orig 2010-02-15 11:49:29.000000000 +0000
+++ build/parseSpec.c 2010-02-24 10:38:25.000000000 +0000
@@ -283,6 +283,7 @@ int readLine(rpmSpec spec, int strip)
retry:
if ((rc = readLineFromOFI(spec, ofi)) != 0)
return rc;
+ ofi = spec->fileStack;
/* Copy next file line into the spec line buffer */
rc = copyNextLineFromOFI(spec, ofi);

0
ready
View File

3
rpm-4.8.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3b4bb2d78eaf1f5200fdcd51372ca9cedce64e030046372e6a13e361cb82b64
size 3692408

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ License: GPLv2+
Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages
Version: 4.7.1
Release: 8
Release: 9
Requires: rpm = %{version}
%py_requires
Source99: rpm.spec

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Mar 26 11:49:59 CET 2010 - mls@suse.de
- update to rpm-4.8.0
* updated python bindings
* new transaction ordering code
-------------------------------------------------------------------
Wed Feb 24 11:57:30 CET 2010 - mls@suse.de
- fix readLine segfault [bnc#582599]
-------------------------------------------------------------------
Sat Dec 12 23:42:26 CET 2009 - jengelh@medozas.de

View File

@ -1,5 +1,5 @@
#
# spec file for package rpm (Version 4.7.1)
# spec file for package rpm (Version 4.8.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -27,8 +27,8 @@ Provides: rpminst
PreReq: %insserv_prereq %fillup_prereq permissions
AutoReqProv: on
Summary: The RPM Package Manager
Version: 4.7.1
Release: 8
Version: 4.8.0
Release: 1
Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
@ -98,10 +98,11 @@ Patch61: debugsubpkg.diff
Patch62: debuglink.diff
Patch63: debuginfo-mono.patch
Patch64: allowufdio.diff
Patch65: fixabsfilelists.diff
Patch66: fixqueryreturn.diff
Patch67: lazystatfs.diff
Patch68: defclean.diff
Patch65: lazystatfs.diff
Patch66: defclean.diff
Patch67: readlineofi.diff
Patch68: rpmdb-no-svc.diff
Patch69: modemuncher.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@ -161,7 +162,7 @@ rm -f rpmdb/db.h
%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39
%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
#chmod 755 scripts/find-supplements{,.ksyms}
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
#chmod 755 scripts/firmware.prov
@ -179,7 +180,7 @@ export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections"
%ifarch alpha
export CFLAGS="-g -O0 -fno-strict-aliasing"
%endif
cp /usr/share/gettext/config.rpath .
#cp -p /usr/share/gettext/config.rpath .
cp autogen.sh beecrypt
pushd beecrypt
./autogen.sh --with-pic

19
rpmdb-no-svc.diff Normal file
View File

@ -0,0 +1,19 @@
--- lib/Makefile.am.orig 2010-03-26 09:34:16.000000000 +0000
+++ lib/Makefile.am 2010-03-26 09:34:39.000000000 +0000
@@ -148,16 +148,6 @@ rpmdb_stat_LDADD = \
$(top_builddir)/db3/util_sig.o \
librpm.la
-rpmlibexec_PROGRAMS += rpmdb_svc
-rpmdb_svc_SOURCES =
-rpmdb_svc_LDADD = \
- $(top_builddir)/db3/db_server_proc.o \
- $(top_builddir)/db3/db_server_svc.o \
- $(top_builddir)/db3/db_server_util.o \
- $(top_builddir)/db3/gen_db_server.o \
- $(top_builddir)/db3/util_log.o \
- librpm.la
-
rpmlibexec_PROGRAMS += rpmdb_upgrade
rpmdb_upgrade_SOURCES =
rpmdb_upgrade_LDADD = \

View File

@ -5,64 +5,9 @@ locking.
I hijacked the dbiSync function for this because I did not want
to change the ABI.
Index: lib/psm.c
===================================================================
--- lib/psm.c.orig
+++ lib/psm.c
@@ -756,6 +756,8 @@ static rpmRC runScript(rpmpsm psm, Heade
goto exit;
}
+ rpmtsSuspendResumeDBLock(psm->ts, 0);
+
xx = rpmsqFork(&psm->sq);
if (psm->sq.child == 0) {
rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n",
@@ -770,6 +772,8 @@ static rpmRC runScript(rpmpsm psm, Heade
(void) psmWait(psm);
+ rpmtsSuspendResumeDBLock(psm->ts, 1);
+
if (psm->sq.reaped < 0) {
rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"),
sname, psm->sq.child, psm->sq.reaped, strerror(errno));
Index: lib/rpmts.c
===================================================================
--- lib/rpmts.c.orig
+++ lib/rpmts.c
@@ -108,6 +108,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode)
return rc;
}
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+{
+ return rpmdbSuspendResumeDBLock(ts->rdb, mode);
+}
+
int rpmtsInitDB(rpmts ts, int dbmode)
{
void *lock = rpmtsAcquireLock(ts);
Index: lib/rpmts.h
===================================================================
--- lib/rpmts.h.orig
+++ lib/rpmts.h
@@ -472,6 +472,10 @@ rpmdb rpmtsGetRdb(rpmts ts);
*/
int rpmtsInitDSI(const rpmts ts);
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/;
+
/** \ingroup rpmts
* Update disk space info for a file.
* @param ts transaction set
Index: lib/backend/db3.c
===================================================================
--- lib/backend/db3.c.orig
+++ lib/backend/db3.c
@@ -398,12 +398,18 @@ errxit:
--- ./lib/backend/db3.c.orig 2010-03-25 14:35:39.000000000 +0000
+++ ./lib/backend/db3.c 2010-03-25 14:44:42.000000000 +0000
@@ -208,11 +208,17 @@ errxit:
return rc;
}
@ -72,16 +17,15 @@ Index: lib/backend/db3.c
{
DB * db = dbi->dbi_db;
int rc = 0;
int _printit;
+ if (flags == (unsigned int)-1)
+ return db3SuspendResumeLock(dbi, 0);
+ if (flags == (unsigned int)-2)
+ return db3SuspendResumeLock(dbi, 1);
if (db != NULL)
if (db != NULL) {
rc = db->sync(db, flags);
/* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */
@@ -1122,6 +1128,50 @@ static int db3open(rpmdb rpmdb, rpmTag r
rc = cvtdberr(dbi, "db->sync", rc, _debug);
@@ -848,6 +854,48 @@ static int db3open(rpmdb rpmdb, rpmTag r
return rc;
}
@ -97,8 +41,6 @@ Index: lib/backend/db3.c
+ return 0;
+ if (!(dbi->dbi_mode & (O_RDWR|O_WRONLY)))
+ return 0;
+ if ((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host)
+ return 0;
+ if (dbi->dbi_use_dbenv && _lockdbfd == 0)
+ return 0;
+ if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0))
@ -132,11 +74,29 @@ Index: lib/backend/db3.c
/** \ingroup db3
*/
RPM_GNUC_INTERNAL
Index: lib/rpmdb.c
===================================================================
--- lib/rpmdb.c.orig
+++ lib/rpmdb.c
@@ -886,6 +886,21 @@ int rpmdbSync(rpmdb db)
--- ./lib/psm.c.orig 2010-03-25 14:43:29.000000000 +0000
+++ ./lib/psm.c 2010-03-25 14:43:41.000000000 +0000
@@ -754,6 +754,8 @@ static rpmRC runScript(rpmpsm psm, Heade
goto exit;
}
+ rpmtsSuspendResumeDBLock(psm->ts, 0);
+
xx = rpmsqFork(&psm->sq);
if (psm->sq.child == 0) {
rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n",
@@ -768,6 +770,8 @@ static rpmRC runScript(rpmpsm psm, Heade
(void) psmWait(psm);
+ rpmtsSuspendResumeDBLock(psm->ts, 1);
+
if (psm->sq.reaped < 0) {
rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"),
sname, psm->sq.child, psm->sq.reaped, strerror(errno));
--- ./lib/rpmdb.c.orig 2010-03-25 14:36:57.000000000 +0000
+++ ./lib/rpmdb.c 2010-03-25 14:43:41.000000000 +0000
@@ -903,6 +903,21 @@ int rpmdbSync(rpmdb db)
return rc;
}
@ -158,3 +118,30 @@ Index: lib/rpmdb.c
/* FIX: dbTemplate structure assignment */
static
rpmdb newRpmdb(const char * root,
--- ./lib/rpmts.c.orig 2009-12-17 09:05:37.000000000 +0000
+++ ./lib/rpmts.c 2010-03-25 14:43:41.000000000 +0000
@@ -89,6 +89,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode)
return rc;
}
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+{
+ return rpmdbSuspendResumeDBLock(ts->rdb, mode);
+}
+
int rpmtsInitDB(rpmts ts, int dbmode)
{
void *lock = rpmtsAcquireLock(ts);
--- ./lib/rpmts.h.orig 2009-12-17 09:05:37.000000000 +0000
+++ ./lib/rpmts.h 2010-03-25 14:43:41.000000000 +0000
@@ -469,6 +469,10 @@ rpmdb rpmtsGetRdb(rpmts ts);
void * rpmtsNotify(rpmts ts, rpmte te,
rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total);
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/;
+
/** \ingroup rpmts
* Return number of (ordered) transaction set elements.
* @param ts transaction set

View File

@ -2,11 +2,9 @@ The taggedfileindex patch. Speeds up database searches, but breaks
fingerprint semantics.
rh#103204
Index: lib/rpmdb.c
===================================================================
--- lib/rpmdb.c.orig
+++ lib/rpmdb.c
@@ -1107,6 +1107,16 @@ int rpmdbVerify(const char * prefix)
--- ./lib/rpmdb.c.orig 2010-03-25 14:43:41.000000000 +0000
+++ ./lib/rpmdb.c 2010-03-25 15:15:14.000000000 +0000
@@ -1122,6 +1122,16 @@ int rpmdbVerify(const char * prefix)
return rc;
}
@ -23,7 +21,7 @@ Index: lib/rpmdb.c
/**
* Find file matches in database.
* @param db rpm database
@@ -1169,6 +1179,11 @@ static int rpmdbFindByFile(rpmdb db, con
@@ -1181,6 +1191,11 @@ static int rpmdbFindByFile(rpmdb db, con
if (rc == 0)
(void) dbt2set(dbi, data, &allMatches);
@ -35,16 +33,16 @@ Index: lib/rpmdb.c
xx = dbiCclose(dbi, dbcursor, 0);
dbcursor = NULL;
} else
@@ -2172,7 +2187,7 @@ void rpmdbSortIterator(rpmdbMatchIterato
@@ -2182,7 +2197,7 @@ void rpmdbSortIterator(rpmdbMatchIterato
}
}
/* LCL: segfault */
-static int rpmdbGrowIterator(rpmdbMatchIterator mi)
+static int rpmdbGrowIterator(rpmdbMatchIterator mi, unsigned int tag)
{
DBC * dbcursor;
DBT * key;
@@ -2222,6 +2237,27 @@ static int rpmdbGrowIterator(rpmdbMatchI
@@ -2232,6 +2247,27 @@ static int rpmdbGrowIterator(rpmdbMatchI
dbcursor = NULL;
#endif
@ -72,7 +70,7 @@ Index: lib/rpmdb.c
if (mi->mi_set == NULL) {
mi->mi_set = set;
} else {
@@ -2403,7 +2439,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat
@@ -2413,7 +2449,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat
{
mi->mi_key.data = (void *) keyp;
mi->mi_key.size = keylen ? keylen : strlen(keyp);
@ -89,7 +87,7 @@ Index: lib/rpmdb.c
}
/*
@@ -2798,8 +2842,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h
@@ -2808,8 +2852,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h
if (hdrNum)
{
@ -106,7 +104,7 @@ Index: lib/rpmdb.c
if (dbiTags.tags != NULL)
for (dbix = 0; dbix < dbiTags.max; dbix++) {
rpmTag rpmtag;
@@ -2891,6 +2943,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h
@@ -2901,6 +2953,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h
*/
i = rec->tagNum = rpmtdGetIndex(&tagdata);
switch (rpmtag) {
@ -117,7 +115,7 @@ Index: lib/rpmdb.c
case RPMTAG_REQUIRENAME: {
/* Filter out install prerequisites. */
rpm_flag_t *rflag = rpmtdNextUint32(&reqflags);
@@ -2976,6 +3032,9 @@ cont:
@@ -2986,6 +3042,9 @@ cont:
if (ret == 0) {
headerSetInstance(h, hdrNum);
}
@ -127,11 +125,9 @@ Index: lib/rpmdb.c
}
exit:
Index: lib/rpmdb_internal.h
===================================================================
--- lib/rpmdb_internal.h.orig
+++ lib/rpmdb_internal.h
@@ -540,6 +540,9 @@ unsigned int dbiIndexRecordFileNumber(db
--- ./lib/rpmdb_internal.h.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/rpmdb_internal.h 2010-03-25 15:14:38.000000000 +0000
@@ -542,6 +542,9 @@ const char *rpmdbHome(rpmdb db);
int rpmdbExtendIterator(rpmdbMatchIterator mi,
const void * keyp, size_t keylen);
@ -141,13 +137,11 @@ Index: lib/rpmdb_internal.h
/** \ingroup rpmdb
* sort the iterator by (recnum, filenum)
* Return database iterator.
Index: lib/transaction.c
===================================================================
--- lib/transaction.c.orig
+++ lib/transaction.c
@@ -609,9 +609,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(
--- ./lib/transaction.c.orig 2010-03-25 14:38:27.000000000 +0000
+++ ./lib/transaction.c 2010-03-25 15:14:38.000000000 +0000
@@ -848,9 +848,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(
rpmdbMatchIterator mi;
int i, xx;
int xx;
const char * baseName;
+ const char * dirName;
@ -158,8 +152,8 @@ Index: lib/transaction.c
mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_BASENAMES, NULL, 0);
@@ -629,18 +632,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(
while ((i = rpmfiNext(fi)) >= 0) {
@@ -868,18 +871,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(
while (rpmfiNext(fi) >= 0) {
size_t keylen;
baseName = rpmfiBN(fi);
+ dirName = rpmfiDN(fi);

View File

@ -1,10 +1,9 @@
Fix global (DB_PRIVATE) lock code: fix recursion counter, retry
failed lock operations for up to 3 minutes.
Index: lib/backend/db3.c
===================================================================
--- lib/backend/db3.c.orig
+++ lib/backend/db3.c
@@ -586,6 +586,8 @@ static int db3stat(dbiIndex dbi, unsigne
--- ./lib/backend/db3.c.orig 2010-03-25 14:44:42.000000000 +0000
+++ ./lib/backend/db3.c 2010-03-25 14:52:05.000000000 +0000
@@ -394,6 +394,8 @@ static int db3stat(dbiIndex dbi, unsigne
return rc;
}
@ -13,18 +12,17 @@ Index: lib/backend/db3.c
static int db3close(dbiIndex dbi, unsigned int flags)
{
rpmdb rpmdb = dbi->dbi_rpmdb;
@@ -632,6 +634,10 @@ static int db3close(dbiIndex dbi, unsign
@@ -414,6 +416,9 @@ static int db3close(dbiIndex dbi, unsign
rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n",
dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)));
dbhome, dbi->dbi_file);
+ if (dbi->dbi_lockdbfd &&
+ !((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) &&
+ _lockdbfd)
+ _lockdbfd--;
}
if (rpmdb->db_dbenv != NULL && dbi->dbi_use_dbenv) {
@@ -899,8 +905,6 @@ static int db3open(rpmdb rpmdb, rpmTag r
@@ -645,8 +651,6 @@ static int db3open(rpmdb rpmdb, rpmTag r
}
if (rc == 0) {
@ -33,7 +31,7 @@ Index: lib/backend/db3.c
rc = db_create(&db, dbenv, dbi->dbi_cflags);
rc = cvtdberr(dbi, "db_create", rc, _debug);
if (rc == 0 && db != NULL) {
@@ -1082,6 +1086,7 @@ static int db3open(rpmdb rpmdb, rpmTag r
@@ -810,6 +814,7 @@ static int db3open(rpmdb rpmdb, rpmTag r
if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) {
rc = 1;
} else {
@ -41,7 +39,7 @@ Index: lib/backend/db3.c
struct flock l;
memset(&l, 0, sizeof(l));
l.l_whence = 0;
@@ -1091,24 +1096,40 @@ static int db3open(rpmdb rpmdb, rpmTag r
@@ -819,24 +824,39 @@ static int db3open(rpmdb rpmdb, rpmTag r
? F_RDLCK : F_WRLCK;
l.l_pid = 0;
@ -49,27 +47,29 @@ Index: lib/backend/db3.c
- if (rc) {
- /* Warning iff using non-private CDB locking. */
- rc = ((dbi->dbi_use_dbenv &&
+ for (tries = 0; ; tries++) {
+ rc = fcntl(fdno, F_SETLK, (void *) &l);
+ if (rc) {
+ rc = ((dbi->dbi_use_dbenv &&
(dbi->dbi_eflags & DB_INIT_CDB) &&
!(dbi->dbi_eflags & DB_PRIVATE))
- (dbi->dbi_eflags & DB_INIT_CDB) &&
- !(dbi->dbi_eflags & DB_PRIVATE))
- ? 0 : 1);
- rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING),
- _("cannot get %s lock on %s/%s\n"),
- ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY)
- ? _("shared") : _("exclusive"),
- dbhome, (dbfile ? dbfile : ""));
- } else if (dbfile) {
- dbhome, dbi->dbi_file);
- } else {
- rpmlog(RPMLOG_DEBUG,
- "locked db index %s/%s\n",
- dbhome, dbfile);
- dbhome, dbi->dbi_file);
+ for (tries = 0; ; tries++) {
+ rc = fcntl(fdno, F_SETLK, (void *) &l);
+ if (rc) {
+ rc = ((dbi->dbi_use_dbenv &&
+ (dbi->dbi_eflags & DB_INIT_CDB) &&
+ !(dbi->dbi_eflags & DB_PRIVATE))
+ ? 0 : 1);
+ if (errno == EAGAIN && rc) {
+ struct timespec ts;
+ if (tries == 0)
+ rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, (dbfile ? dbfile : ""));
+ rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, dbi->dbi_file);
+ ts.tv_sec = (time_t)0;
+ ts.tv_nsec = 100000000;
+ if (tries < 10*60*3) {
@ -81,14 +81,13 @@ Index: lib/backend/db3.c
+ _("cannot get %s lock on %s/%s\n"),
+ ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY)
+ ? _("shared") : _("exclusive"),
+ dbhome, (dbfile ? dbfile : ""));
+ } else if (dbfile) {
+ dbhome, dbi->dbi_file);
+ } else {
+ rpmlog(RPMLOG_DEBUG,
+ "locked db index %s/%s\n",
+ dbhome, dbfile);
+ break;
+ dbhome, dbi->dbi_file);
+ }
+
+ break;
}
}
+ if (rc && dbi->dbi_use_dbenv)

View File

@ -14,11 +14,9 @@ B) use RPMSENSE_STRONG to support a "strong" version, "Recommends"
Needs extcond.diff for query operations.
Index: build/parsePreamble.c
===================================================================
--- build/parsePreamble.c.orig
+++ build/parsePreamble.c
@@ -122,6 +122,8 @@ static struct tokenBits_s const installS
--- ./build/parsePreamble.c.orig 2009-12-17 09:05:55.000000000 +0000
+++ ./build/parsePreamble.c 2010-03-25 14:56:24.000000000 +0000
@@ -124,6 +124,8 @@ static struct tokenBits_s const installS
{ "post", RPMSENSE_SCRIPT_POST },
{ "rpmlib", RPMSENSE_RPMLIB },
{ "verify", RPMSENSE_SCRIPT_VERIFY },
@ -27,7 +25,7 @@ Index: build/parsePreamble.c
{ NULL, 0 }
};
@@ -132,6 +134,8 @@ static const struct tokenBits_s const bu
@@ -134,6 +136,8 @@ static const struct tokenBits_s const bu
{ "build", RPMSENSE_SCRIPT_BUILD },
{ "install", RPMSENSE_SCRIPT_INSTALL },
{ "clean", RPMSENSE_SCRIPT_CLEAN },
@ -36,7 +34,7 @@ Index: build/parsePreamble.c
{ NULL, 0 }
};
@@ -637,6 +641,18 @@ static int handlePreambleTag(rpmSpec spe
@@ -649,6 +653,18 @@ static int handlePreambleTag(rpmSpec spe
if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags)))
return rc;
break;
@ -55,26 +53,24 @@ Index: build/parsePreamble.c
case RPMTAG_EXCLUDEARCH:
case RPMTAG_EXCLUSIVEARCH:
case RPMTAG_EXCLUDEOS:
@@ -734,6 +750,14 @@ static struct PreambleRec_s preambleList
{RPMTAG_AUTOPROV, 0, 0, 0, "autoprov"},
{RPMTAG_DOCDIR, 0, 0, 0, "docdir"},
{RPMTAG_DISTTAG, 0, 0, 0, "disttag"},
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "recommends"},
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "suggests"},
+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "supplements"},
+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "enhances"},
+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildrecommends"},
+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildsuggests"},
+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildsupplements"},
+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildenhances"},
/* LCL: can't add null annotation */
{0, 0, 0, 0, 0}
@@ -748,6 +764,14 @@ static struct PreambleRec_s const preamb
{RPMTAG_DOCDIR, 0, 0, LEN_AND_STR("docdir")},
{RPMTAG_DISTTAG, 0, 0, LEN_AND_STR("disttag")},
{RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")},
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("recommends")},
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("suggests")},
+ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("supplements")},
+ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("enhances")},
+ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildrecommends")},
+ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildsuggests")},
+ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildsupplements")},
+ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildenhances")},
{0, 0, 0, 0}
};
Index: build/parseReqs.c
===================================================================
--- build/parseReqs.c.orig
+++ build/parseReqs.c
@@ -84,6 +84,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
--- ./build/parseReqs.c.orig 2009-12-17 09:05:55.000000000 +0000
+++ ./build/parseReqs.c 2010-03-25 14:53:47.000000000 +0000
@@ -85,6 +85,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
tagflags |= RPMSENSE_ANY;
h = spec->buildRestrictions;
break;
@ -89,11 +85,9 @@ Index: build/parseReqs.c
default:
case RPMTAG_REQUIREFLAGS:
tagflags |= RPMSENSE_ANY;
Index: build/reqprov.c
===================================================================
--- build/reqprov.c.orig
+++ build/reqprov.c
@@ -43,6 +43,16 @@ int addReqProv(rpmSpec spec, Header h, r
--- ./build/reqprov.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./build/reqprov.c 2010-03-25 14:53:47.000000000 +0000
@@ -75,6 +75,16 @@ int addReqProv(rpmSpec spec, Header h, r
flagtag = RPMTAG_TRIGGERFLAGS;
indextag = RPMTAG_TRIGGERINDEX;
extra = Flags & RPMSENSE_TRIGGER;
@ -110,11 +104,9 @@ Index: build/reqprov.c
} else {
nametag = RPMTAG_REQUIRENAME;
versiontag = RPMTAG_REQUIREVERSION;
Index: build/rpmfc.c
===================================================================
--- build/rpmfc.c.orig
+++ build/rpmfc.c
@@ -1377,6 +1377,12 @@ static struct DepMsg_s depMsgs[] = {
--- ./build/rpmfc.c.orig 2009-12-09 13:37:25.000000000 +0000
+++ ./build/rpmfc.c 2010-03-25 14:53:47.000000000 +0000
@@ -1405,6 +1405,12 @@ static struct DepMsg_s depMsgs[] = {
{ "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL },
RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS,
0, -1 },
@ -127,7 +119,7 @@ Index: build/rpmfc.c
{ NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 }
};
@@ -1467,6 +1473,14 @@ static int rpmfcGenerateDependsHelper(co
@@ -1490,6 +1496,14 @@ static int rpmfcGenerateDependsHelper(co
failnonzero = 0;
tagflags = RPMSENSE_FIND_REQUIRES;
break;
@ -142,66 +134,9 @@ Index: build/rpmfc.c
default:
continue;
break;
Index: python/rpmmodule.c
===================================================================
--- python/rpmmodule.c.orig
+++ python/rpmmodule.c
@@ -387,7 +387,7 @@ void init_rpm(void)
REGISTER_ENUM(RPMSENSE_RPMLIB);
REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
REGISTER_ENUM(RPMSENSE_KEYRING);
- REGISTER_ENUM(RPMSENSE_PATCHES);
+ REGISTER_ENUM(RPMSENSE_STRONG);
REGISTER_ENUM(RPMSENSE_CONFIG);
REGISTER_ENUM(RPMTRANS_FLAG_TEST);
Index: lib/rpmds.c
===================================================================
--- lib/rpmds.c.orig
+++ lib/rpmds.c
@@ -73,6 +73,10 @@ static int dsType(rpmTag tag,
t = "Trigger";
evr = RPMTAG_TRIGGERVERSION;
f = RPMTAG_TRIGGERFLAGS;
+ } else if (tag == RPMTAG_ENHANCESNAME) {
+ t = "Enhances";
+ evr = RPMTAG_ENHANCESVERSION;
+ f = RPMTAG_ENHANCESFLAGS;
} else {
rc = 1;
}
Index: rpmpopt.in
===================================================================
--- rpmpopt.in.orig
+++ rpmpopt.in
@@ -65,6 +65,22 @@ rpm alias --requires --qf \
--POPTdesc=$"list capabilities required by package(s)"
rpm alias -R --requires
+rpm alias --suggests --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package suggests"
+
+rpm alias --recommends --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package recommends"
+
+rpm alias --enhances --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package enhances"
+
+rpm alias --supplements --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package supplements"
+
rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
Index: lib/formats.c
===================================================================
--- lib/formats.c.orig
+++ lib/formats.c
@@ -601,6 +601,25 @@ static char * depflagsFormat(rpmtd td, c
--- ./lib/formats.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/formats.c 2010-03-25 15:00:15.000000000 +0000
@@ -601,6 +601,24 @@ static char * depflagsFormat(rpmtd td, c
return val;
}
@ -220,24 +155,34 @@ Index: lib/formats.c
+ strcat(formatPrefix, "s");
+ rasprintf(&val, formatPrefix, buf);
+ }
+
+ return val;
+}
+
/**
* Return tag container array size.
* @param td tag data container
@@ -661,5 +680,6 @@ static const struct headerFormatFunc_s r
{ RPMTD_FORMAT_DAY, "day", dayFormat },
{ RPMTD_FORMAT_SHESCAPE, "shescape", shescapeFormat },
@@ -738,5 +756,6 @@ static const struct headerFormatFunc_s r
{ RPMTD_FORMAT_ARRAYSIZE, "arraysize", arraysizeFormat },
+ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", { depflag_strongFormat } },
{ RPMTD_FORMAT_FSTATE, "fstate", fstateFormat },
{ RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat },
+ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", depflag_strongFormat },
{ -1, NULL, NULL }
};
Index: lib/rpmds.h
===================================================================
--- lib/rpmds.h.orig
+++ lib/rpmds.h
--- ./lib/rpmds.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/rpmds.c 2010-03-25 14:53:47.000000000 +0000
@@ -66,6 +66,10 @@ static int dsType(rpmTag tag,
t = "Trigger";
evr = RPMTAG_TRIGGERVERSION;
f = RPMTAG_TRIGGERFLAGS;
+ } else if (tag == RPMTAG_ENHANCESNAME) {
+ t = "Enhances";
+ evr = RPMTAG_ENHANCESVERSION;
+ f = RPMTAG_ENHANCESFLAGS;
} else {
rc = 1;
}
--- ./lib/rpmds.h.orig 2010-03-24 16:47:28.000000000 +0000
+++ ./lib/rpmds.h 2010-03-25 14:53:47.000000000 +0000
@@ -55,7 +55,7 @@ typedef enum rpmsenseFlags_e {
RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */
RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */
@ -255,22 +200,8 @@ Index: lib/rpmds.h
RPMSENSE_SCRIPT_PREP | \
RPMSENSE_SCRIPT_BUILD | \
RPMSENSE_SCRIPT_INSTALL | \
Index: lib/rpmtd.h
===================================================================
--- lib/rpmtd.h.orig
+++ lib/rpmtd.h
@@ -214,6 +214,7 @@ typedef enum rpmtdFormats_e {
RPMTD_FORMAT_SHESCAPE = 13, /* shell escaped (any type) */
RPMTD_FORMAT_ARRAYSIZE = 14, /* size of contained array (any type) */
RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int32 types) */
+ RPMTD_FORMAT_DEPFLAG_STRONG = 16, /* strong dependency */
} rpmtdFormats;
/** \ingroup rpmtd
Index: lib/rpmtag.h
===================================================================
--- lib/rpmtag.h.orig
+++ lib/rpmtag.h
--- ./lib/rpmtag.h.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/rpmtag.h 2010-03-25 14:53:47.000000000 +0000
@@ -228,14 +228,14 @@ typedef enum rpmTag_e {
RPMTAG_PRETRANSPROG = 1153, /* s */
RPMTAG_POSTTRANSPROG = 1154, /* s */
@ -294,3 +225,49 @@ Index: lib/rpmtag.h
RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */
RPMTAG_CVSID = 1163, /* s (unimplemented) */
#define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */
--- ./lib/rpmtd.h.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/rpmtd.h 2010-03-25 14:58:31.000000000 +0000
@@ -216,6 +216,7 @@ typedef enum rpmtdFormats_e {
RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int types) */
RPMTD_FORMAT_FSTATE = 16, /* file states (int types) */
RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */
+ RPMTD_FORMAT_DEPFLAG_STRONG = 18, /* strong dependency */
} rpmtdFormats;
/** \ingroup rpmtd
--- ./python/rpmmodule.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./python/rpmmodule.c 2010-03-25 14:53:47.000000000 +0000
@@ -373,7 +373,7 @@ static int initModule(PyObject *m)
REGISTER_ENUM(RPMSENSE_RPMLIB);
REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
REGISTER_ENUM(RPMSENSE_KEYRING);
- REGISTER_ENUM(RPMSENSE_PATCHES);
+ REGISTER_ENUM(RPMSENSE_STRONG);
REGISTER_ENUM(RPMSENSE_CONFIG);
REGISTER_ENUM(RPMTRANS_FLAG_TEST);
--- ./rpmpopt.in.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./rpmpopt.in 2010-03-25 14:53:47.000000000 +0000
@@ -65,6 +65,22 @@ rpm alias --requires --qf \
--POPTdesc=$"list capabilities required by package(s)"
rpm alias -R --requires
+rpm alias --suggests --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package suggests"
+
+rpm alias --recommends --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package recommends"
+
+rpm alias --enhances --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package enhances"
+
+rpm alias --supplements --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package supplements"
+
rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\