RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 07-Feb-2008 20:29:33
Branch: HEAD Handle: 2008020719293201
Modified files:
rpm CHANGES macros.in rpm.spec.in
rpm/lib rpmgi.c
rpm/rpmio rpmrpc.c
rpm/tools rpmcache.c
Log:
- jbj: rpm.spec: nuke the xar.1 man page.
- jbj: rpmrpc: split stat(2) prints so valgrind can detect uninitialized.
- jbj: rpmcache: fix: don't check fo ".i386" suffix if name is too short.
- jbj: rpmcache: use file:///, not clunkier file://localhost/, url.
- jbj: rpmcache: add --cache opt-in, rather than --nocache opt-out, for now.
Summary:
Revision Changes Path
1.2141 +5 -0 rpm/CHANGES
2.51 +2 -0 rpm/lib/rpmgi.c
1.234 +3 -3 rpm/macros.in
2.451 +1 -0 rpm/rpm.spec.in
2.64 +18 -10 rpm/rpmio/rpmrpc.c
2.28 +9 -4 rpm/tools/rpmcache.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2140 -r1.2141 CHANGES
--- rpm/CHANGES 7 Feb 2008 05:25:18 -0000 1.2140
+++ rpm/CHANGES 7 Feb 2008 19:29:32 -0000 1.2141
@@ -1,4 +1,9 @@
5.0.0 -> 5.1a1:
+ - jbj: rpm.spec: nuke the xar.1 man page.
+ - jbj: rpmrpc: split stat(2) prints so valgrind can detect uninitialized.
+ - jbj: rpmcache: fix: don't check fo ".i386" suffix if name is too short.
+ - jbj: rpmcache: use file:///, not clunkier file://localhost/, url.
+ - jbj: rpmcache: add --cache opt-in, rather than --nocache opt-out, for now.
- proyvind: add sparcv9v2 (Niagara 2) architecture
- proyvind: add arch macros for alpha and sparc
- afb: workaround for "uuid_t" type conflict, between <unistd.h> and "uuid.h"
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmgi.c
============================================================================
$ cvs diff -u -r2.50 -r2.51 rpmgi.c
--- rpm/lib/rpmgi.c 2 Feb 2008 21:45:18 -0000 2.50
+++ rpm/lib/rpmgi.c 7 Feb 2008 19:29:33 -0000 2.51
@@ -250,6 +250,8 @@
case FTS_DP: /* postorder directory */
break;
case FTS_F: /* regular file */
+ if (fts->fts_namelen <= sizeof(".rpm"))
+ break;
/* Ignore all but *.rpm files. */
s = fts->fts_name + fts->fts_namelen + 1 - sizeof(".rpm");
if (strcmp(s, ".rpm"))
@@ .
patch -p0 <<'@@ .'
Index: rpm/macros.in
============================================================================
$ cvs diff -u -r1.233 -r1.234 macros.in
--- rpm/macros.in 7 Feb 2008 05:22:40 -0000 1.233
+++ rpm/macros.in 7 Feb 2008 19:29:32 -0000 1.234
@@ -1,7 +1,7 @@
#/*! \page config_macros Default configuration: @USRLIBRPM@/macros
# \verbatim
#
-# $Id: macros.in,v 1.233 2008/02/07 05:22:40 pkarlsen Exp $
+# $Id: macros.in,v 1.234 2008/02/07 19:29:32 jbj Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
@@ -1036,8 +1036,8 @@
#%_bhA RPMS
#
-# A configuration to build an rpmdb from yum package
-%_bhpath file://localhost/var/cache/yum
+# A configuration to build an rpmdb from yum package hierarchy
+%_bhpath file:///var/cache/yum
%_bhcoll @(updates)
%_bhN @(packages)
%_bhVR %{nil}
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpm.spec.in
============================================================================
$ cvs diff -u -r2.450 -r2.451 rpm.spec.in
--- rpm/rpm.spec.in 22 Jan 2008 21:52:44 -0000 2.450
+++ rpm/rpm.spec.in 7 Feb 2008 19:29:32 -0000 2.451
@@ -274,6 +274,7 @@
rm -rf .%{_mandir}/pl/man8/rpmcache.8*
rm -rf .%{_mandir}/pl/man8/rpmgraph.8*
rm -rf .%{_mandir}/{fr,ko}
+ rm -rf .%{_mandir}/man1/xar.1*
rm -rf .%{_bindir}/xar
rm -rf .%{_includedir}/xar
rm -rf .%{_libdir}/libxar*
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmrpc.c
============================================================================
$ cvs diff -u -r2.63 -r2.64 rpmrpc.c
--- rpm/rpmio/rpmrpc.c 25 Jan 2008 16:39:26 -0000 2.63
+++ rpm/rpmio/rpmrpc.c 7 Feb 2008 19:29:33 -0000 2.64
@@ -1136,16 +1136,24 @@
/*@returned@*/ /*@out@*/ char * buf)
/*@modifies *buf @*/
{
- sprintf(buf,
- "*** dev %x ino %x mode %0o nlink %d uid %d gid %d rdev %x size %x\n",
- (unsigned int)st->st_dev,
- (unsigned int)st->st_ino,
- (unsigned int)st->st_mode,
- (unsigned int)st->st_nlink,
- (unsigned int)st->st_uid,
- (unsigned int)st->st_gid,
- (unsigned int)st->st_rdev,
- (unsigned int)st->st_size);
+ char * t = buf;
+ sprintf(t, "*** dev %x", (unsigned int)st->st_dev);
+ t += strlen(t);
+ sprintf(t, " ino %x", (unsigned int)st->st_ino);
+ t += strlen(t);
+ sprintf(t, " mode %0o", (unsigned int)st->st_mode);
+ t += strlen(t);
+ sprintf(t, " nlink %d", (unsigned int)st->st_nlink);
+ t += strlen(t);
+ sprintf(t, " uid %d", (unsigned int)st->st_uid);
+ t += strlen(t);
+ sprintf(t, " gid %d", (unsigned int)st->st_gid);
+ t += strlen(t);
+ sprintf(t, " rdev %x", (unsigned int)st->st_rdev);
+ t += strlen(t);
+ sprintf(t, " size %x", (unsigned int)st->st_size);
+ t += strlen(t);
+ sprintf(t, "\n");
return buf;
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/tools/rpmcache.c
============================================================================
$ cvs diff -u -r2.27 -r2.28 rpmcache.c
--- rpm/tools/rpmcache.c 26 Nov 2007 05:16:53 -0000 2.27
+++ rpm/tools/rpmcache.c 7 Feb 2008 19:29:33 -0000 2.28
@@ -24,7 +24,7 @@
static int _debug = 0;
/* XXX should be flag in ts */
-static int noCache = 0;
+static int noCache = -1;
static ARGV_t ftsSet;
@@ -202,6 +202,7 @@
struct stat sb, * st;
int ec = -1; /* assume not found */
int i = 0;
+ int xx;
rpmlog(RPMLOG_DEBUG, "============== %s\n", fts->fts_accpath);
@@ -252,8 +253,11 @@
items[i] = newItem();
items[i]->path = xstrdup(fts->fts_path);
st = fts->fts_statp;
- if (st == NULL && Stat(fts->fts_accpath, &sb) == 0)
+ if (st == NULL || ((long)st & 0xffff0000) == 0L) {
st = &sb;
+ memset(st, 0, sizeof(*st));
+ xx = Stat(fts->fts_accpath, &sb);
+ }
if (st != NULL) {
items[i]->size = st->st_size;
@@ -516,6 +520,8 @@
{ "nolegacy", '\0', POPT_BIT_SET, &vsflags, RPMVSF_NEEDPAYLOAD,
N_("don't verify header+payload signature"), NULL },
+ { "cache", '\0', POPT_ARG_VAL, &noCache, 0,
+ N_("update cache database"), NULL },
{ "nocache", '\0', POPT_ARG_VAL, &noCache, -1,
N_("don't update cache database, only print package paths"), NULL },
@@ -535,15 +541,14 @@
int
main(int argc, char *argv[])
{
+ poptContext optCon = rpmcliInit(argc, argv, optionsTable);
rpmts ts = NULL;
rpmgi gi = NULL;
- poptContext optCon;
const char * s;
int ec = 1;
rpmRC rpmrc;
int xx;
- optCon = rpmcliInit(argc, argv, optionsTable);
if (optCon == NULL)
exit(EXIT_FAILURE);
@@ .
Received on Thu Feb 7 20:29:33 2008