RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: [EMAIL PROTECTED]
Module: rpm Date: 07-Oct-2008 22:49:53
Branch: HEAD Handle: 2008100720495201
Modified files:
rpm CHANGES
rpm/lib depends.c rpmts.c
Log:
- jbj: print last problem added w platform affinity failure.
- jbj: lazily create ts problem set.
Summary:
Revision Changes Path
1.2587 +2 -0 rpm/CHANGES
1.420 +6 -5 rpm/lib/depends.c
2.156 +16 -3 rpm/lib/rpmts.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2586 -r1.2587 CHANGES
--- rpm/CHANGES 6 Oct 2008 19:05:31 -0000 1.2586
+++ rpm/CHANGES 7 Oct 2008 20:49:52 -0000 1.2587
@@ -1,5 +1,7 @@
5.1.0 -> 5.2a0:
+ - jbj: print last problem added w platform affinity failure.
+ - jbj: lazily create ts problem set.
- jbj: selinux: resurrect lsetfilecon using libselinux API.
- jbj: use macro, not /bin/bash, in scriptlet_requires.
- jbj: don't run empty transactions, avoiding obscure error msg.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/depends.c
============================================================================
$ cvs diff -u -r1.419 -r1.420 depends.c
--- rpm/lib/depends.c 4 Oct 2008 18:12:35 -0000 1.419
+++ rpm/lib/depends.c 7 Oct 2008 20:49:53 -0000 1.420
@@ -600,11 +600,12 @@
rpmpsAppend(ps, RPMPROB_BADPLATFORM, he->p.str, key,
platform, NULL, NULL, 0);
- /* XXX this should be done elsewhere. */
- if (rpmIsVerbose())
- rpmlog(RPMLOG_WARNING,
- _("package %s is intended for a %s platform\n"),
- he->p.str, platform);
+ /* XXX problem string should be printed by caller instead. */
+ if (rpmIsVerbose()) {
+ const char * msg = rpmProblemString(rpmpsGetProblem(ps, -1));
+ rpmlog(RPMLOG_WARNING, "%s\n", msg);
+ msg = _free(msg);
+ }
ps = rpmpsFree(ps);
he->p.ptr = _free(he->p.ptr);
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmts.c
============================================================================
$ cvs diff -u -r2.155 -r2.156 rpmts.c
--- rpm/lib/rpmts.c 6 Oct 2008 19:05:32 -0000 2.155
+++ rpm/lib/rpmts.c 7 Oct 2008 20:49:53 -0000 2.156
@@ -520,8 +520,9 @@
{
rpmps ps = NULL;
if (ts) {
- if (ts->probs)
- ps = rpmpsLink(ts->probs, "rpmtsProblems");
+ if (ts->probs == NULL)
+ ts->probs = rpmpsCreate();
+ ps = rpmpsLink(ts->probs, "rpmtsProblems");
}
return ps;
}
@@ -1235,7 +1236,15 @@
rpmtransFlags rpmtsFlags(rpmts ts)
{
- return (ts != NULL ? ts->transFlags : 0);
+ rpmtransFlags transFlags = 0;
+ if (ts != NULL) {
+ transFlags = ts->transFlags;
+ if (rpmtsSELinuxEnabled(ts) > 0)
+ transFlags |= RPMTRANS_FLAG_NOCONTEXTS;
+ else
+ transFlags &= ~RPMTRANS_FLAG_NOCONTEXTS;
+ }
+ return transFlags;
}
rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
@@ -1243,6 +1252,10 @@
rpmtransFlags otransFlags = 0;
if (ts != NULL) {
otransFlags = ts->transFlags;
+ if (rpmtsSELinuxEnabled(ts) > 0)
+ transFlags |= RPMTRANS_FLAG_NOCONTEXTS;
+ else
+ transFlags &= ~RPMTRANS_FLAG_NOCONTEXTS;
ts->transFlags = transFlags;
}
return otransFlags;
@@ .
______________________________________________________________________
RPM Package Manager http://rpm5.org
CVS Sources Repository [email protected]