rpms/rpm/devel rpm-4.4.2-exclude.patch, NONE, 1.1 rpm.spec, 1.186, 1.187
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Nov 29 17:02:04 UTC 2005
Author: pnasrat
Update of /cvs/dist/rpms/rpm/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20108
Modified Files:
rpm.spec
Added Files:
rpm-4.4.2-exclude.patch
Log Message:
New version
rpm-4.4.2-exclude.patch:
lib/transaction.c | 2 +-
rpmdb/fprint.h | 6 ++++++
rpmdb/rpmdb.c | 15 ++++++++++++---
3 files changed, 19 insertions(+), 4 deletions(-)
--- NEW FILE rpm-4.4.2-exclude.patch ---
--- rpm-4.4.2/rpmdb/fprint.h.exclude 2003-05-08 16:39:31.000000000 -0400
+++ rpm-4.4.2/rpmdb/fprint.h 2005-11-29 11:40:29.000000000 -0500
@@ -79,6 +79,12 @@
/*@modifies db, *matchList, rpmGlobalMacroContext,
fileSystem, internalState @*/;
+int rpmdbFindFpListExclude(/*@null@*/ rpmdb db, fingerPrint * fpList,
+ /*@out@*/ dbiIndexSet * matchList, int numItems, unsigned int exclude)
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies db, *matchList, rpmGlobalMacroContext,
+ fileSystem, internalState @*/;
+
/* Be carefull with the memory... assert(*fullName == '/' || !scareMemory) */
/**
--- rpm-4.4.2/rpmdb/rpmdb.c.exclude 2005-02-15 22:18:19.000000000 -0500
+++ rpm-4.4.2/rpmdb/rpmdb.c 2005-11-29 11:47:10.000000000 -0500
@@ -3388,11 +3388,17 @@
return 0;
}
-/* XXX transaction.c */
-/*@-compmempass@*/
int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList,
int numItems)
{
+ return rpmdbFindFpListExclude(db, fpList, matchList, numItems, 0);
+}
+
+/* XXX transaction.c */
+/*@-compmempass@*/
+int rpmdbFindFpListExclude(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList,
+ int numItems, unsigned int exclude)
+{
DBT * key;
DBT * data;
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
@@ -3424,7 +3430,10 @@
key->size = strlen((char *)key->data);
if (key->size == 0) key->size++; /* XXX "/" fixup. */
- if (skipDir(fpList[i].entry->dirName))
+ /* HACK HACK HACK: don't skip dirs while removing
+ * packages as we will loose files on conflicts.
+ * exclude is not zero when removing */
+ if (!exclude && skipDir(fpList[i].entry->dirName))
continue;
xx = rpmdbGrowIterator(mi, i);
--- rpm-4.4.2/lib/transaction.c.exclude 2005-11-29 11:40:29.000000000 -0500
+++ rpm-4.4.2/lib/transaction.c 2005-11-29 11:40:29.000000000 -0500
@@ -1750,7 +1750,7 @@
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0);
/* Extract file info for all files in this package from the database. */
matches = xcalloc(fc, sizeof(*matches));
- if (rpmdbFindFpList(rpmtsGetRdb(ts), fi->fps, matches, fc)) {
+ if (rpmdbFindFpListExclude(rpmtsGetRdb(ts), fi->fps, matches, fc, rpmteType(p) == TR_REMOVED ? fi->record : 0)) {
ps = rpmpsFree(ps);
rpmtsFreeLock(lock);
return 1; /* XXX WTFO? */
Index: rpm.spec
===================================================================
RCS file: /cvs/dist/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -r1.186 -r1.187
--- rpm.spec 29 Nov 2005 15:40:59 -0000 1.186
+++ rpm.spec 29 Nov 2005 17:01:59 -0000 1.187
@@ -20,7 +20,7 @@
%define version 4.4.2
Version: %{version}
%{expand: %%define rpm_version %{version}}
-Release: 8
+Release: 9
Group: System Environment/Base
Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz
Patch0: rpm-4.4.1-hkp-disable.patch
@@ -35,6 +35,7 @@
Patch9: rpm-4.4.2-contextverify.patch
Patch10: rpm-4.4.2-popt-charset.patch
Patch11: rpm-4.4.2-ghost-conflicts.patch
+Patch12: rpm-4.4.2-exclude.patch
License: GPL
Conflicts: patch < 2.5
%ifos linux
@@ -158,6 +159,7 @@
%patch9 -p1 -b .contextverify
%patch10 -p1 -b .charset
%patch11 -p1 -b .ghostconflicts
+%patch12 -p1 -b .exclude
%build
@@ -550,6 +552,9 @@
%{__includedir}/popt.h
%changelog
+* Tue Nov 29 2005 Paul Nasrat <pnasrat at redhat.com> - 4.4.2-9
+- Don't skipDirs on erasures (#140055)
+
* Mon Nov 28 2005 Paul Nasrat <pnasrat at redhat.com> - 4.4.2-8
- Add elfutils Build Requires to rpmbuild (#155129)
- Don't do conflicts if both files %ghost(#155256)
More information about the fedora-cvs-commits
mailing list