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: 12-Jul-2007 12:01:21
Branch: rpm-4_5 Handle: 2007071211012100
Modified files: (Branch: rpm-4_5)
rpm CHANGES
rpm/lib transaction.c
Log:
- insure that RPMFILE_EXISTS is set for %config files.
Summary:
Revision Changes Path
1.1360.2.25 +1 -0 rpm/CHANGES
1.322.2.3 +12 -20 rpm/lib/transaction.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1360.2.24 -r1.1360.2.25 CHANGES
--- rpm/CHANGES 18 Jun 2007 19:41:29 -0000 1.1360.2.24
+++ rpm/CHANGES 12 Jul 2007 10:01:21 -0000 1.1360.2.25
@@ -1,4 +1,5 @@
4.4.9 -> 4.5:
+ - jbj: insure that RPMFILE_EXISTS is set for %config files.
- jbj: fix ptr alignment problem seen on pld/sparc64.
- jbj: re-add /usr/bin/rpmbuild for now, poptBT option wiring needs fixing.
- jbj: pass -F fnum to patch (#243720).
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/transaction.c
============================================================================
$ cvs diff -u -r1.322.2.2 -r1.322.2.3 transaction.c
--- rpm/lib/transaction.c 9 Jun 2007 19:08:50 -0000 1.322.2.2
+++ rpm/lib/transaction.c 12 Jul 2007 10:01:21 -0000 1.322.2.3
@@ -104,7 +104,6 @@
uint_32 otecolor, tecolor;
uint_32 oFColor, FColor;
uint_32 oFFlags, FFlags;
- struct stat sb, *st = &sb;
const char * altNEVRA = NULL;
rpmfi otherFi = NULL;
int numReplaced = 0;
@@ -177,24 +176,6 @@
if (((FFlags | oFFlags) & RPMFILE_GHOST))
continue;
- /* Check for shared %config files that are installed and sparse. */
- if ((FFlags | oFFlags) & RPMFILE_CONFIG) {
- if (!Lstat(rpmfiFN(fi), st)) {
- if (FFlags & RPMFILE_CONFIG) {
- FFlags |= RPMFILE_EXISTS;
- if ((512 * st->st_blocks) < st->st_size)
- FFlags |= RPMFILE_SPARSE;
- (void) rpmfiSetFFlags(fi, FFlags);
- }
- if (oFFlags & RPMFILE_CONFIG) {
- oFFlags |= RPMFILE_EXISTS;
- if ((512 * st->st_blocks) < st->st_size)
- oFFlags |= RPMFILE_SPARSE;
- (void) rpmfiSetFFlags(otherFi, oFFlags);
- }
- }
- }
-
if (rpmfiCompare(otherFi, fi)) {
int rConflicts;
@@ -1518,8 +1499,19 @@
numShared = 0;
fi = rpmfiInit(fi, 0);
- while ((i = rpmfiNext(fi)) >= 0)
+ while ((i = rpmfiNext(fi)) >= 0) {
+ struct stat sb, *st = &sb;
+ uint_32 FFlags = rpmfiFFlags(fi);
numShared += dbiIndexSetCount(matches[i]);
+ if (!(FFlags & RPMFILE_CONFIG))
+ continue;
+ if (!Lstat(rpmfiFN(fi), st)) {
+ FFlags |= RPMFILE_EXISTS;
+ if ((512 * st->st_blocks) < st->st_size)
+ FFlags |= RPMFILE_SPARSE;
+ (void) rpmfiSetFFlags(fi, FFlags);
+ }
+ }
/* Build sorted file info list for this package. */
shared = sharedList = xcalloc((numShared + 1), sizeof(*sharedList));
@@ .
Received on Thu Jul 12 12:01:22 2007