All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libdnf: Backport bugfix for upgrade calc
@ 2021-11-24  3:14 Jate Sujjavanich
  2021-11-24  3:14 ` [PATCH 2/2] dnf: Backport bugfix for upgrade Jate Sujjavanich
  2021-11-24  3:20 ` [PATCH 1/2] libdnf: Backport bugfix for upgrade calc Jate Sujjavanich
  0 siblings, 2 replies; 5+ messages in thread
From: Jate Sujjavanich @ 2021-11-24  3:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: steve

Mark goal.upgrade with sltr as targeted

This allows a bugfix in dnf to work

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
---
 ...job-goal.upgrade-with-sltr-as-target.patch | 58 +++++++++++++++++++
 .../libdnf/libdnf_0.28.1.bbappend             |  3 +
 2 files changed, 61 insertions(+)
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf_0.28.1.bbappend

diff --git a/meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch b/meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch
new file mode 100644
index 0000000000..61d255581b
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch
@@ -0,0 +1,58 @@
+From b4c5a3312287f31a2075a235db846ff611586d2c Mon Sep 17 00:00:00 2001
+From: Jaroslav Mracek <jmracek@redhat.com>
+Date: Tue, 3 Sep 2019 11:01:23 +0200
+Subject: [PATCH] Mark job goal.upgrade with sltr as targeted
+
+It allows to keep installed packages in upgrade set.
+
+It also prevents from reinstalling of modified packages with same NEVRA.
+
+
+Backport commit b4c5a3312287f31a2075a235db846ff611586d2c from
+https://github.com/rpm-software-management/libdnf
+
+This bug is present in oe-core's dnf
+
+Remove changes to spec file from upstream
+
+Upstream-Status: Backport
+Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
+---
+ libdnf.spec          | 4 ++--
+ libdnf/goal/Goal.cpp | 2 +-
+ libdnf/goal/Goal.hpp | 6 ++++--
+ 3 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/libdnf/goal/Goal.cpp b/libdnf/goal/Goal.cpp
+index b69be19..a38cbb4 100644
+--- a/libdnf/goal/Goal.cpp
++++ b/libdnf/goal/Goal.cpp
+@@ -767,7 +767,7 @@ void
+ Goal::upgrade(HySelector sltr)
+ {
+     pImpl->actions = static_cast<DnfGoalActions>(pImpl->actions | DNF_UPGRADE);
+-    sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE);
++    sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE|SOLVER_TARGETED);
+ }
+ 
+ void
+diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp
+index f33dfa2..d701317 100644
+--- a/libdnf/goal/Goal.hpp
++++ b/libdnf/goal/Goal.hpp
+@@ -86,8 +86,10 @@ public:
+     /**
+     * @brief If selector ill formed, it rises std::runtime_error()
+     *
+-    * @param sltr p_sltr: It should contain only upgrades with obsoletes otherwise it can try to
+-    * reinstall installonly packages.
++    * @param sltr p_sltr: It contains upgrade-to packages and obsoletes. The presence of installed
++    * packages prevents reinstalling packages with the same NEVRA but changed contant. To honor repo
++    * priority all relevant packages must be present. To upgrade package foo from priority repo, all
++    * installed and available packages of the foo must be in selector plus obsoletes of foo.
+     */
+     void upgrade(HySelector sltr);
+     void userInstalled(DnfPackage *pkg);
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bbappend b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bbappend
new file mode 100644
index 0000000000..569a77496d
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://0040-Mark-job-goal.upgrade-with-sltr-as-target.patch"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] dnf: Backport bugfix for upgrade
  2021-11-24  3:14 [PATCH 1/2] libdnf: Backport bugfix for upgrade calc Jate Sujjavanich
@ 2021-11-24  3:14 ` Jate Sujjavanich
  2021-11-24  3:20   ` Jate Sujjavanich
  2021-11-24  3:20 ` [PATCH 1/2] libdnf: Backport bugfix for upgrade calc Jate Sujjavanich
  1 sibling, 1 reply; 5+ messages in thread
From: Jate Sujjavanich @ 2021-11-24  3:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: steve

Keep installed packages in upgrade job

This prevents duplicate identical packages from being reinstalled
with each upgrade

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
---
 ...ackages-in-upgrade-job-RhBug-1728252.patch | 60 +++++++++++++++++++
 meta/recipes-devtools/dnf/dnf_4.2.2.bbappend  |  3 +
 2 files changed, 63 insertions(+)
 create mode 100644 meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf_4.2.2.bbappend

diff --git a/meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch b/meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch
new file mode 100644
index 0000000000..57c2375a54
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch
@@ -0,0 +1,60 @@
+From c88a77198c0156e425c2725f30e481207de5162f Mon Sep 17 00:00:00 2001
+From: Jaroslav Mracek <jmracek@redhat.com>
+Date: Tue, 3 Sep 2019 11:01:51 +0200
+Subject: [PATCH] Keep installed packages in upgrade job
+ (RhBug:1728252,1644241,1741381)
+
+In combination with marking of job as TARGETED it prevents from
+reinstalling of modified packages with same NEVRA.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1728252
+https://bugzilla.redhat.com/show_bug.cgi?id=1644241
+https://bugzilla.redhat.com/show_bug.cgi?id=1741381
+
+Closes: #1474
+Approved by: m-blaha
+
+
+Backport to fix bug in dnf in oe-core
+from https://github.com/rpm-software-management/dnf
+
+Removed spec file portion of patch
+
+Upstream-Status: Backport
+Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
+---
+ dnf.spec                  | 4 ++--
+ dnf/base.py               | 3 ---
+ dnf/module/module_base.py | 2 +-
+ 3 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/dnf/base.py b/dnf/base.py
+index b2ced61..628c154 100644
+--- a/dnf/base.py
++++ b/dnf/base.py
+@@ -1968,9 +1968,6 @@ class Base(object):
+                 obsoletes=q.installed().union(q.upgrades()))
+             # add obsoletes into transaction
+             q = q.union(obsoletes)
+-        # provide only available packages to solver otherwise selection of available
+-        # possibilities will be ignored
+-        q = q.available()
+         if reponame is not None:
+             q.filterm(reponame=reponame)
+         q = self._merge_update_filters(q, pkg_spec=pkg_spec)
+diff --git a/dnf/module/module_base.py b/dnf/module/module_base.py
+index 976d730..ce70f63 100644
+--- a/dnf/module/module_base.py
++++ b/dnf/module/module_base.py
+@@ -214,7 +214,7 @@ class ModuleBase(object):
+ 
+             if not upgrade_package_set:
+                 logger.error(_("Unable to match profile in argument {}").format(spec))
+-            query = self.base.sack.query().available().filterm(name=upgrade_package_set)
++            query = self.base.sack.query().filterm(name=upgrade_package_set)
+             if query:
+                 sltr = dnf.selector.Selector(self.base.sack)
+                 sltr.set(pkg=query)
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/dnf/dnf_4.2.2.bbappend b/meta/recipes-devtools/dnf/dnf_4.2.2.bbappend
new file mode 100644
index 0000000000..3811db604b
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf_4.2.2.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] libdnf: Backport bugfix for upgrade calc
  2021-11-24  3:14 [PATCH 1/2] libdnf: Backport bugfix for upgrade calc Jate Sujjavanich
  2021-11-24  3:14 ` [PATCH 2/2] dnf: Backport bugfix for upgrade Jate Sujjavanich
@ 2021-11-24  3:20 ` Jate Sujjavanich
  2021-11-24 14:41   ` [OE-core] " Steve Sakoman
  1 sibling, 1 reply; 5+ messages in thread
From: Jate Sujjavanich @ 2021-11-24  3:20 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 42 bytes --]

Meant to add a [dunfell] to the subject.

[-- Attachment #2: Type: text/html, Size: 42 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] dnf: Backport bugfix for upgrade
  2021-11-24  3:14 ` [PATCH 2/2] dnf: Backport bugfix for upgrade Jate Sujjavanich
@ 2021-11-24  3:20   ` Jate Sujjavanich
  0 siblings, 0 replies; 5+ messages in thread
From: Jate Sujjavanich @ 2021-11-24  3:20 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 42 bytes --]

Meant to add a [dunfell] to the subject.

[-- Attachment #2: Type: text/html, Size: 42 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH 1/2] libdnf: Backport bugfix for upgrade calc
  2021-11-24  3:20 ` [PATCH 1/2] libdnf: Backport bugfix for upgrade calc Jate Sujjavanich
@ 2021-11-24 14:41   ` Steve Sakoman
  0 siblings, 0 replies; 5+ messages in thread
From: Steve Sakoman @ 2021-11-24 14:41 UTC (permalink / raw)
  To: Jate Sujjavanich; +Cc: Patches and discussions about the oe-core layer

On Tue, Nov 23, 2021 at 5:20 PM Jate Sujjavanich <jatedev@gmail.com> wrote:
>
> Meant to add a [dunfell] to the subject.

Got it!  Thanks.

Steve
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#158652): https://lists.openembedded.org/g/openembedded-core/message/158652
> Mute This Topic: https://lists.openembedded.org/mt/87274565/3617601
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [sakoman@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-24 14:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  3:14 [PATCH 1/2] libdnf: Backport bugfix for upgrade calc Jate Sujjavanich
2021-11-24  3:14 ` [PATCH 2/2] dnf: Backport bugfix for upgrade Jate Sujjavanich
2021-11-24  3:20   ` Jate Sujjavanich
2021-11-24  3:20 ` [PATCH 1/2] libdnf: Backport bugfix for upgrade calc Jate Sujjavanich
2021-11-24 14:41   ` [OE-core] " Steve Sakoman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.