From: Mihai Moldovan Date: Tue, 29 Sep 2020 16:30:16 +0000 (+0200) Subject: [PATCH] Enable implicitobsoleteusescolors flag. X-Git-Tag: archive/raspbian/0.73.1-3+rpi1^2^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c8d94d78ca35865cfc99a4e6b83136a43bdd8fff;p=libdnf.git [PATCH] Enable implicitobsoleteusescolors flag. 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 --- diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp index caef198..e62ccff 100644 --- a/libdnf/dnf-sack.cpp +++ b/libdnf/dnf-sack.cpp @@ -186,6 +186,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; diff --git a/tests/hawkey/test_iutil.cpp b/tests/hawkey/test_iutil.cpp index 81048a4..4954f9c 100644 --- a/tests/hawkey/test_iutil.cpp +++ b/tests/hawkey/test_iutil.cpp @@ -169,6 +169,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;