From: Daan De Meyer Date: Mon, 3 Jan 2022 10:09:09 +0000 (+0100) Subject: action: Fix libsolv in combination with rpm 4.17.0 X-Git-Tag: v13~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01ea953fd2af738f974b228991c768c12b50db95;p=thirdparty%2Fmkosi.git action: Fix libsolv in combination with rpm 4.17.0 This applies the patch from https://github.com/systemd/mkosi/issues/861#issuecomment-1003624115 until the issue is fixed upstream and the fix is released. --- diff --git a/action/setup-github-actions.sh b/action/setup-github-actions.sh index a347c353d..49be038ee 100755 --- a/action/setup-github-actions.sh +++ b/action/setup-github-actions.sh @@ -210,6 +210,21 @@ DESTDIR="" meson install -C libmodulemd-$LIBMODULEMD_VERSION-build if [ ! -f $LIBSOLV_VERSION.tar.gz ]; then wget https://github.com/openSUSE/libsolv/archive/$LIBSOLV_VERSION.tar.gz tar xf $LIBSOLV_VERSION.tar.gz + patch -d libsolv-$LIBSOLV_VERSION -p1 <<'EOF' +diff --git a/ext/repo_rpmdb_librpm.h b/ext/repo_rpmdb_librpm.h +index 3f9798c2..e1b30a0f 100644 +--- a/ext/repo_rpmdb_librpm.h ++++ b/ext/repo_rpmdb_librpm.h +@@ -136,7 +136,7 @@ opendbenv(struct rpmdbstate *state) + return 0; + } + #ifndef HAVE_RPMDBNEXTITERATORHEADERBLOB +- if (!strcmp(RPMVERSION, "4.16.0")) ++ if (!strcmp(RPMVERSION, "4.16.0") || !strcmp(RPMVERSION, "4.17.0")) + set_db_backend(); + #endif + if (rpmtsOpenDB(ts, O_RDONLY)) +EOF fi if [ ! -f libsolv-$LIBSOLV_VERSION-build/build.ninja ]; then