[PATCH] Enable implicitobsoleteusescolors flag.
authorMihai Moldovan <ionic@ionic.de>
Tue, 29 Sep 2020 16:30:16 +0000 (18:30 +0200)
committerFrédéric Pierret <frederic.pierret@qubes-os.org>
Wed, 14 Apr 2021 19:26:57 +0000 (20:26 +0100)
This flag is normally enabled by default in libsolv if compiled on Fedora or
Mageia systems, but disabled for all others. Since we explicitly want to
support Fedora (and CentOS/RHEL) repositories with DNF, enable this feature for
correct resolution.

Gbp-Pq: Name 0004-Enable-implicitobsoleteusescolors-flag.patch

libdnf/dnf-sack.cpp
tests/hawkey/test_iutil.cpp

index 36f4a92bf29b5301dec58ac2fd34e90a29aed2e7..2384fccb2a66c77ff83a549cb500693b00cb8601 100644 (file)
@@ -187,6 +187,7 @@ dnf_sack_init(DnfSack *sack)
     priv->pool = pool_create();
     pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1);
     pool_setdisttype(priv->pool, DISTTYPE_RPM);
+    pool_set_flag(priv->pool, POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS, 1);
     priv->running_kernel_id = -1;
     priv->running_kernel_fn = running_kernel;
     priv->considered_uptodate = TRUE;
index 0ca12800719d45adc5a9552757404d68e4ee37c5..8ce75bfbccd5a37c457b73aa67ee6f733ccf9c3d 100644 (file)
@@ -157,6 +157,15 @@ START_TEST(test_version_split)
      */
     fail_if(-1 == pool_setdisttype(pool, DISTTYPE_RPM));
 
+    /*
+     * On "foreign" systems, the implicitobsoleteusescolors
+     * flag is turned off by default.
+     * This leads to unexpected results when working with
+     * Fedora, Mageia or CentOS repositories, so enable it
+     * forcefully.
+     */
+    pool_set_flag(pool, POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS, 1);
+
     char evr[] = "1:5.9.3-8";
     char *epoch, *version, *release;