]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
action: Fix libsolv in combination with rpm 4.17.0
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 3 Jan 2022 10:09:09 +0000 (11:09 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 3 Jan 2022 12:02:14 +0000 (13:02 +0100)
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.

action/setup-github-actions.sh

index a347c353d869dba8865ee7f1a1019da36e7b3e36..49be038ee4210b479a010d02fe88746c71d6f565 100755 (executable)
@@ -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