[packages/poldek] Added patch to fix update of orphaned packages. Release 12
megabajt
megabajt at pld-linux.org
Sun Nov 29 21:52:59 CET 2015
commit d20073caaea3a9c354a9d21f7725029f98c6b062
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date: Sun Nov 29 21:50:59 2015 +0100
Added patch to fix update of orphaned packages. Release 12
poldek-upgrade-orphan.patch | 73 +++++++++++++++++++++++++++++++++++++++++++++
poldek.spec | 4 ++-
2 files changed, 76 insertions(+), 1 deletion(-)
---
diff --git a/poldek.spec b/poldek.spec
index 0e761fa..bde1e31 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -31,7 +31,7 @@
%define ver_rpm 5.4.10
%endif
-%define rel 11
+%define rel 12
Summary: RPM packages management helper tool
Summary(hu.UTF-8): RPM csomagkezelést segítő eszköz
Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
@@ -61,6 +61,7 @@ Patch2: %{name}-missing-include.patch
Patch3: pm-hooks.patch
Patch4: %{name}-setenv-null.patch
Patch5: %{name}-assert-sigint.patch
+Patch6: %{name}-upgrade-orphan.patch
URL: http://poldek.pld-linux.org/
BuildRequires: %{db_pkg}-devel >= %{ver_db}-%{ver_db_rel}
BuildRequires: autoconf
@@ -227,6 +228,7 @@ Moduły języka Python dla poldka.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%{__rm} m4/libtool.m4 m4/lt*.m4
diff --git a/poldek-upgrade-orphan.patch b/poldek-upgrade-orphan.patch
new file mode 100644
index 0000000..1c03dd9
--- /dev/null
+++ b/poldek-upgrade-orphan.patch
@@ -0,0 +1,73 @@
+commit 7769cc05f6060d3b2ed10a042aae82f4a8644bfb
+Author: Marcin Banasiak <marcin.banasiak at gmail.com>
+Date: Sun Nov 29 20:47:25 2015 +0100
+
+ Always try to update orphaned package if successor is available.
+
+ Fixes issue described on:
+ http://lists.pld-linux.org/mailman/pipermail/pld-users-pl/2015-November/078844.html
+
+diff --git a/install3/requirements.c b/install3/requirements.c
+index f78f398..781af67 100644
+--- a/install3/requirements.c
++++ b/install3/requirements.c
+@@ -300,7 +300,7 @@ static int try_to_upgrade_orphan(int indent, struct i3ctx *ictx,
+ struct successor succ;
+ struct pkg *sucpkg;
+ char *message = NULL;
+- int install = 0;
++ struct i3pkg *i3tomark = NULL;
+
+ tracef(indent, "%s req: %s (satisfied=%s)", pkg_id(pkg),
+ capreq_stra(req), req_satisfier ? "yes": "no");
+@@ -314,40 +314,21 @@ static int try_to_upgrade_orphan(int indent, struct i3ctx *ictx,
+ }
+
+ /* already in inset or will be there soon */
+- if (i3_is_marked(ictx, sucpkg) || pkg_is_marked_i(ictx->ts->pms, sucpkg)) {
++ if (i3_is_marked(ictx, sucpkg) || pkg_is_marked_i(ictx->ts->pms, sucpkg))
+ message = "already marked";
+- install = 1;
+- goto l_end;
+- }
+-
+- if (pkg_requires_cap(sucpkg, req)) {
+- message = "successor requires req too";
+- install = 0;
+-
+- } else {
+- if (succ.by_obsoletes)
+- message = "by Obsoletes tag";
++ else if (succ.by_obsoletes)
++ message = "by Obsoletes tag";
++ else if (ictx->ts->getop(ictx->ts, POLDEK_OP_GREEDY))
++ message = "upgrade resolves req";
+
+- else if (ictx->ts->getop(ictx->ts, POLDEK_OP_GREEDY))
+- message = "upgrade resolves req";
++ i3tomark = i3pkg_new(sucpkg, 0, pkg, req, I3PKGBY_GREEDY);
+
+- install = 1;
+- }
++ tracef(indent, "- %s: upgrading orphan%s%s%s", pkg_id(sucpkg),
++ message ? " (":"", message ? message:"", message ? ")":"");
+
+-l_end:
+- if (!install) {
+- tracef(indent, "- %s: do not upgrading orphan%s%s%s", pkg_id(sucpkg),
+- message ? " (":"", message ? message:"", message ? ")":"");
+-
+- } else {
+- struct i3pkg *i3tomark = i3pkg_new(sucpkg, 0, pkg, req, I3PKGBY_GREEDY);
++ i3_process_package(indent, ictx, i3tomark);
+
+- tracef(indent, "- %s: upgrading orphan%s%s%s", pkg_id(sucpkg),
+- message ? " (":"", message ? message:"", message ? ")":"");
+- i3_process_package(indent, ictx, i3tomark);
+- }
+-
+- return install;
++ return 1;
+ }
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/d20073caaea3a9c354a9d21f7725029f98c6b062
More information about the pld-cvs-commit
mailing list