This commit is contained in:
parent
3c349e9165
commit
946e135c38
23
noprovides.diff
Normal file
23
noprovides.diff
Normal file
@ -0,0 +1,23 @@
|
||||
Revert upstream change that uses package provides when searching
|
||||
for obsoleted packages. It's just too dangerous.
|
||||
|
||||
--- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000
|
||||
+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000
|
||||
@@ -294,7 +313,7 @@ addheader:
|
||||
|
||||
/* On upgrade, erase older packages of same color (if any). */
|
||||
|
||||
- mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, rpmteN(p), 0);
|
||||
+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(p), 0);
|
||||
while((oh = rpmdbNextIterator(mi)) != NULL) {
|
||||
|
||||
/* Ignore colored packages not in our rainbow. */
|
||||
@@ -336,7 +355,7 @@ addheader:
|
||||
if (Name[0] == '/')
|
||||
mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, Name, 0);
|
||||
else
|
||||
- mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0);
|
||||
+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0);
|
||||
|
||||
xx = rpmdbPruneIterator(mi,
|
||||
ts->removedPackages, ts->numRemovedPackages, 1);
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package rpm-python (Version 4.4.2)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
@ -16,7 +16,7 @@ License: GNU General Public License (GPL)
|
||||
Group: System/Packages
|
||||
Summary: Python Bindings for Manipulating RPM Packages
|
||||
Version: 4.4.2
|
||||
Release: 76
|
||||
Release: 88
|
||||
Requires: rpm = %{version}
|
||||
|
||||
%py_requires
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 26 16:55:15 CET 2007 - mls@suse.de
|
||||
|
||||
- create /var/spool/repackage directory [#230866]
|
||||
- do not run pre/posttrans scripts in test mode [#235361]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 30 14:04:56 CET 2006 - mls@suse.de
|
||||
|
||||
|
21
rpm.spec
21
rpm.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package rpm (Version 4.4.2)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission
|
||||
Autoreqprov: on
|
||||
Summary: The RPM Package Manager
|
||||
Version: 4.4.2
|
||||
Release: 76
|
||||
Release: 82
|
||||
Source: rpm-%{version}.tar.bz2
|
||||
Source1: RPM-HOWTO.tar.bz2
|
||||
Source2: RPM-Tips.html.tar.bz2
|
||||
@ -87,7 +87,7 @@ Patch57: nodefattr.diff
|
||||
Patch58: nolua.diff
|
||||
Patch59: luaroot.diff
|
||||
Patch60: noneon.diff
|
||||
#Patch61: noprovides.diff
|
||||
Patch61: noprovides.diff
|
||||
Patch62: openallbuttemp.diff
|
||||
Patch63: refreshtestarch.diff
|
||||
Patch64: rpmrctests.diff
|
||||
@ -116,6 +116,7 @@ Patch86: convertdb1static.diff
|
||||
Patch87: build.diff
|
||||
Patch88: modalias-kernel_module.diff
|
||||
Patch89: querybuffer.diff
|
||||
Patch90: testmode.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#
|
||||
|
||||
@ -185,6 +186,7 @@ rm -f rpmdb/db.h
|
||||
%patch -P 60 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
|
||||
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
|
||||
%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89
|
||||
%patch -P 90
|
||||
chmod 755 scripts/find-supplements{,.ksyms}
|
||||
chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
|
||||
tar -xjvf %{SOURCE1}
|
||||
@ -231,6 +233,7 @@ ln -sf ../../etc/init.d/rpmconfigcheck $RPM_BUILD_ROOT/usr/sbin/rcrpmconfigcheck
|
||||
cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm
|
||||
mv $RPM_BUILD_ROOT/usr/src/* $RPM_BUILD_ROOT/usr/src/packages
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
|
||||
mkdir -p $RPM_BUILD_ROOT/var/spool/repackage
|
||||
rm -rf $RPM_BUILD_ROOT/usr/include/beecrypt $RPM_BUILD_ROOT/usr/include/libelf $RPM_BUILD_ROOT/%{_libdir}/libbeecrypt* $RPM_BUILD_ROOT/usr/lib/libelf*
|
||||
gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18]
|
||||
export RPM_BUILD_ROOT
|
||||
@ -288,6 +291,7 @@ fi
|
||||
#%doc %{_mandir}/*/man[18]/*.[18]*
|
||||
/usr/share/locale/*/LC_MESSAGES/rpm.mo
|
||||
%dir /var/lib/rpm
|
||||
%dir /var/spool/repackage
|
||||
%verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD
|
||||
%verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SPECS
|
||||
%verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SOURCES
|
||||
@ -307,10 +311,10 @@ fi
|
||||
%{_libdir}/librpmio.so
|
||||
%package -n popt
|
||||
Summary: A C library for parsing command line parameters
|
||||
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package
|
||||
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
|
||||
Group: System/Libraries
|
||||
Version: 1.7
|
||||
Release: 304
|
||||
Release: 310
|
||||
#
|
||||
|
||||
%description -n popt
|
||||
@ -330,10 +334,10 @@ Authors:
|
||||
|
||||
%package -n popt-devel
|
||||
Summary: C Library for Parsing Command Line Parameters
|
||||
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package
|
||||
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
|
||||
Group: System/Libraries
|
||||
Version: 1.7
|
||||
Release: 304
|
||||
Release: 310
|
||||
Requires: popt = 1.7
|
||||
Requires: glibc-devel
|
||||
|
||||
@ -371,6 +375,9 @@ Authors:
|
||||
%doc %{_mandir}/man3/popt.3*
|
||||
|
||||
%changelog -n rpm
|
||||
* Fri Jan 26 2007 - mls@suse.de
|
||||
- create /var/spool/repackage directory [#230866]
|
||||
- do not run pre/posttrans scripts in test mode [#235361]
|
||||
* Thu Nov 30 2006 - mls@suse.de
|
||||
- disable noprovides patch [#224824]
|
||||
* Fri Nov 24 2006 - mls@suse.de
|
||||
|
134
testmode.diff
Normal file
134
testmode.diff
Normal file
@ -0,0 +1,134 @@
|
||||
Do not run pre/posttrans scripts in test mode
|
||||
|
||||
Index: lib/transaction.c
|
||||
===================================================================
|
||||
--- lib/transaction.c.orig
|
||||
+++ lib/transaction.c
|
||||
@@ -1747,7 +1747,7 @@ rpmMessage(RPMMESS_DEBUG, _("sanity chec
|
||||
|
||||
/* Run pre-transaction scripts, but only if there are no known
|
||||
* problems up to this point. */
|
||||
- if (!((rpmtsFlags(ts) & RPMTRANS_FLAG_BUILD_PROBS)
|
||||
+ if (!((rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_TEST))
|
||||
|| (ts->probs->numProblems &&
|
||||
(okProbs == NULL || rpmpsTrim(ts->probs, okProbs))))) {
|
||||
rpmMessage(RPMMESS_DEBUG, _("running pre-transaction scripts\n"));
|
||||
@@ -2476,68 +2476,70 @@ assert(psm != NULL);
|
||||
if (rollbackOnFailure && rollbackTransaction != NULL)
|
||||
rollbackTransaction = rpmtsFree(rollbackTransaction);
|
||||
|
||||
- rpmMessage(RPMMESS_DEBUG, _("running post-transaction scripts\n"));
|
||||
- pi = rpmtsiInit(ts);
|
||||
- while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
|
||||
- int haspostscript;
|
||||
+ if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)) {
|
||||
+ rpmMessage(RPMMESS_DEBUG, _("running post-transaction scripts\n"));
|
||||
+ pi = rpmtsiInit(ts);
|
||||
+ while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
|
||||
+ int haspostscript;
|
||||
|
||||
- if ((fi = rpmtsiFi(pi)) == NULL)
|
||||
- continue; /* XXX can't happen */
|
||||
+ if ((fi = rpmtsiFi(pi)) == NULL)
|
||||
+ continue; /* XXX can't happen */
|
||||
|
||||
- haspostscript = (fi->posttrans != NULL ? 1 : 0);
|
||||
- p->fi = rpmfiFree(p->fi);
|
||||
+ haspostscript = (fi->posttrans != NULL ? 1 : 0);
|
||||
+ p->fi = rpmfiFree(p->fi);
|
||||
|
||||
- /* If no post-transaction script, then don't bother. */
|
||||
- if (!haspostscript)
|
||||
- continue;
|
||||
+ /* If no post-transaction script, then don't bother. */
|
||||
+ if (!haspostscript)
|
||||
+ continue;
|
||||
|
||||
- p->fd = ts->notify(p->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0,
|
||||
- rpmteKey(p), ts->notifyData);
|
||||
- p->h = NULL;
|
||||
- if (rpmteFd(p) != NULL) {
|
||||
- rpmVSFlags ovsflags = rpmtsVSFlags(ts);
|
||||
- rpmVSFlags vsflags = ovsflags | RPMVSF_NEEDPAYLOAD;
|
||||
- rpmRC rpmrc;
|
||||
- ovsflags = rpmtsSetVSFlags(ts, vsflags);
|
||||
- rpmrc = rpmReadPackageFile(ts, rpmteFd(p),
|
||||
- rpmteNEVR(p), &p->h);
|
||||
- vsflags = rpmtsSetVSFlags(ts, ovsflags);
|
||||
- switch (rpmrc) {
|
||||
- default:
|
||||
- p->fd = ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE,
|
||||
- 0, 0, rpmteKey(p), ts->notifyData);
|
||||
- p->fd = NULL;
|
||||
- /*@switchbreak@*/ break;
|
||||
- case RPMRC_NOTTRUSTED:
|
||||
- case RPMRC_NOKEY:
|
||||
- case RPMRC_OK:
|
||||
- /*@switchbreak@*/ break;
|
||||
+ p->fd = ts->notify(p->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0,
|
||||
+ rpmteKey(p), ts->notifyData);
|
||||
+ p->h = NULL;
|
||||
+ if (rpmteFd(p) != NULL) {
|
||||
+ rpmVSFlags ovsflags = rpmtsVSFlags(ts);
|
||||
+ rpmVSFlags vsflags = ovsflags | RPMVSF_NEEDPAYLOAD;
|
||||
+ rpmRC rpmrc;
|
||||
+ ovsflags = rpmtsSetVSFlags(ts, vsflags);
|
||||
+ rpmrc = rpmReadPackageFile(ts, rpmteFd(p),
|
||||
+ rpmteNEVR(p), &p->h);
|
||||
+ vsflags = rpmtsSetVSFlags(ts, ovsflags);
|
||||
+ switch (rpmrc) {
|
||||
+ default:
|
||||
+ p->fd = ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE,
|
||||
+ 0, 0, rpmteKey(p), ts->notifyData);
|
||||
+ p->fd = NULL;
|
||||
+ /*@switchbreak@*/ break;
|
||||
+ case RPMRC_NOTTRUSTED:
|
||||
+ case RPMRC_NOKEY:
|
||||
+ case RPMRC_OK:
|
||||
+ /*@switchbreak@*/ break;
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
|
||||
- if (rpmteFd(p) != NULL) {
|
||||
- p->fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1);
|
||||
- if (p->fi != NULL) /* XXX can't happen */
|
||||
- p->fi->te = p;
|
||||
+ if (rpmteFd(p) != NULL) {
|
||||
+ p->fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1);
|
||||
+ if (p->fi != NULL) /* XXX can't happen */
|
||||
+ p->fi->te = p;
|
||||
/*@-compdef -usereleased@*/ /* p->fi->te undefined */
|
||||
- psm = rpmpsmNew(ts, p, p->fi);
|
||||
+ psm = rpmpsmNew(ts, p, p->fi);
|
||||
/*@=compdef =usereleased@*/
|
||||
assert(psm != NULL);
|
||||
- psm->scriptTag = RPMTAG_POSTTRANS;
|
||||
- psm->progTag = RPMTAG_POSTTRANSPROG;
|
||||
- xx = rpmpsmStage(psm, PSM_SCRIPT);
|
||||
- psm = rpmpsmFree(psm);
|
||||
+ psm->scriptTag = RPMTAG_POSTTRANS;
|
||||
+ psm->progTag = RPMTAG_POSTTRANSPROG;
|
||||
+ xx = rpmpsmStage(psm, PSM_SCRIPT);
|
||||
+ psm = rpmpsmFree(psm);
|
||||
|
||||
/*@-noeffectuncon -compdef -usereleased @*/
|
||||
- (void) ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,
|
||||
- rpmteKey(p), ts->notifyData);
|
||||
+ (void) ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,
|
||||
+ rpmteKey(p), ts->notifyData);
|
||||
/*@=noeffectuncon =compdef =usereleased @*/
|
||||
- p->fd = NULL;
|
||||
- p->fi = rpmfiFree(p->fi);
|
||||
- p->h = headerFree(p->h);
|
||||
+ p->fd = NULL;
|
||||
+ p->fi = rpmfiFree(p->fi);
|
||||
+ p->h = headerFree(p->h);
|
||||
+ }
|
||||
}
|
||||
+ pi = rpmtsiFree(pi);
|
||||
}
|
||||
- pi = rpmtsiFree(pi);
|
||||
|
||||
rpmtsFreeLock(lock);
|
||||
|
Loading…
Reference in New Issue
Block a user