public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/, lib/portage/tests/resolver/
Date: Fri, 16 Jun 2023 03:34:54 +0000 (UTC)	[thread overview]
Message-ID: <1686886486.44afa8445dc46464200fe46c1e09e0c7475067bf.sam@gentoo> (raw)

commit:     44afa8445dc46464200fe46c1e09e0c7475067bf
Author:     YiFei Zhu <zhuyifei1999 <AT> gmail <DOT> com>
AuthorDate: Mon Jun 12 02:23:09 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 03:34:46 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=44afa844

depgraph: Don't ignore downgrades as missed_updates

Missed updates can also come in the form of package downgrades,
when, for example, there are keyword changes. They can cause
rebuilds, and these rebuilds may be not possible due to reasons such
as keywords or masks. In this case, prior to this patch, portage
would cancel the downgrade, but the rebuilds would be requested
endlessly, because bug 439688's backtrack code does not trigger.

To reproduce, on an ACCEPT_KEYWORDS=~amd64 machine, emerge
=dev-libs/openssl=3.0.9, dev-util/rustup, and something else that
depends on openssl. Then un-accept ~amd64 for openssl and rustup.
Prior to this patch, a @world upgrade would cause:

  These are the packages that would be merged, in order:

  Calculating dependencies... done!

  [ebuild  rR    ] dev-libs/libevent-2.1.12-r1:0/2.1-7::gentoo
  [ebuild  rR    ] net-misc/rsync-3.2.7-r2::gentoo
  [...]

  Total: 71 packages (71 reinstalls), Size of downloads: 0 KiB

There are no packages marked "R", only "rR". There are no section
labeled "The following packages are causing rebuilds:" either.

After this patch, we have:

  These are the packages that would be merged, in order:

  Calculating dependencies... done!

  Total: 0 packages, Size of downloads: 0 KiB

  WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

  dev-libs/openssl:0

    (dev-libs/openssl-1.1.1u:0/1.1::gentoo, ebuild scheduled for merge)
      dev-libs/openssl:0/3= required by (dev-util/rustup-1.25.2:0/0::gentoo, installed)

I also updated the test from the previous patch to account for
this change. No other tests seems affected.

Bug: https://bugs.gentoo.org/439688
Bug: https://bugs.gentoo.org/622270
Signed-off-by: YiFei Zhu <zhuyifei1999 <AT> gmail.com>
Closes: https://github.com/gentoo/portage/pull/1053
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/_emerge/depgraph.py                                        | 4 +---
 lib/portage/tests/resolver/test_slot_conflict_blocked_prune.py | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 77133e99c..60e57b226 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -1287,9 +1287,7 @@ class depgraph:
                 pkg.root, pkg.slot_atom
             ):
                 any_selected = True
-                if chosen_pkg > pkg or (
-                    not chosen_pkg.installed and chosen_pkg.version == pkg.version
-                ):
+                if not chosen_pkg.installed and chosen_pkg.version == pkg.version:
                     missed_update = False
                     break
             if any_selected and missed_update:

diff --git a/lib/portage/tests/resolver/test_slot_conflict_blocked_prune.py b/lib/portage/tests/resolver/test_slot_conflict_blocked_prune.py
index 14e98cd00..b23126d5f 100644
--- a/lib/portage/tests/resolver/test_slot_conflict_blocked_prune.py
+++ b/lib/portage/tests/resolver/test_slot_conflict_blocked_prune.py
@@ -63,7 +63,7 @@ class SlotConflictBlockedPruneTestCase(TestCase):
                 ["@world"],
                 options={"--deep": True, "--update": True, "--verbose": True},
                 success=True,
-                mergelist=["x11-base/xwayland-23.1.1"],
+                mergelist=[],
             ),
         )
 


             reply	other threads:[~2023-06-16  3:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16  3:34 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-26 18:48 [gentoo-commits] proj/portage:master commit in: lib/_emerge/, lib/portage/tests/resolver/ Zac Medico
2023-12-24 19:30 Zac Medico
2023-12-06 20:29 Zac Medico
2023-11-28 22:42 Zac Medico
2023-11-28 22:26 Sam James
2023-11-28  4:20 Zac Medico
2023-11-19 17:56 Zac Medico
2023-06-16  3:34 Sam James
2020-11-22  6:13 Zac Medico
2020-09-21  5:39 Zac Medico
2020-02-15  0:05 Zac Medico
2019-09-12  1:51 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1686886486.44afa8445dc46464200fe46c1e09e0c7475067bf.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox