diff --git a/.github/workflows/build-tdnf-rpms.yml b/.github/workflows/build-tdnf-rpms.yml index 94d7192c..7bffab8c 100644 --- a/.github/workflows/build-tdnf-rpms.yml +++ b/.github/workflows/build-tdnf-rpms.yml @@ -18,7 +18,7 @@ jobs: run: | docker run --rm -e DIST -v$(pwd):/build -w/build ${DIST}/tdnf-build ./ci/build-rpms.sh - name: upload RPMs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: tdnf-rpms path: rpms diff --git a/CMakeLists.txt b/CMakeLists.txt index 037080b8..01c173e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR) -project(tdnf VERSION 3.3.11 LANGUAGES C) +project(tdnf VERSION 3.3.12 LANGUAGES C) set(VERSION ${PROJECT_VERSION}) set(PROJECT_YEAR 2023) diff --git a/client/packageutils.c b/client/packageutils.c index b7f5d38a..8c0d1b73 100644 --- a/client/packageutils.c +++ b/client/packageutils.c @@ -405,6 +405,7 @@ TDNFPkgInfoFilterNewest( { pPkgInfo->pNext = ppPkgInfos[i]; pPkgInfo = ppPkgInfos[i]; + pPkgInfo->pNext = NULL; } } diff --git a/pytests/tests/test_reposync.py b/pytests/tests/test_reposync.py index 1073e172..e2ea597f 100644 --- a/pytests/tests/test_reposync.py +++ b/pytests/tests/test_reposync.py @@ -432,3 +432,18 @@ def test_reposync_newest(utils): assert mulversion_pkgname_found shutil.rmtree(synced_dir) + + +# reposync with --newest-only option caused an infinite loop +def test_reposync_newest_multiplerepos(utils): + reponame = "photon-srpms" + workdir = WORKDIR + utils.makedirs(workdir) + + ret = utils.run(['tdnf', + '--enablerepo={}'.format(reponame), + '--newest-only', + '--urls', + 'reposync'], + cwd=workdir) + assert ret['retval'] == 0