Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libdnf for openSUSE:Factory checked in at 2024-04-04 22:24:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdnf (Old) and /work/SRC/openSUSE:Factory/.libdnf.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdnf" Thu Apr 4 22:24:06 2024 rev:37 rq:1164325 version:0.73.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libdnf/libdnf.changes 2024-02-23 16:41:16.158506431 +0100 +++ /work/SRC/openSUSE:Factory/.libdnf.new.1905/libdnf.changes 2024-04-04 22:24:20.375071827 +0200 @@ -1,0 +2,12 @@ +Wed Apr 3 07:19:28 UTC 2024 - pgaj...@suse.com + +- version update to 0.73.1 + * Bug fixes: + - Fix https://issues.redhat.com/browse/RHEL-27657 + - subject-py: Fix memory leak + * Others: + - MergedTransaction: Calculate RPM difference between two same versions as no-op + - Onboard packit tests + - Add virtual destructor to TransactionItem + +------------------------------------------------------------------- Old: ---- libdnf-0.73.0.tar.gz New: ---- libdnf-0.73.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdnf.spec ++++++ --- /var/tmp/diff_new_pack.Fdtfnx/_old 2024-04-04 22:24:21.171101134 +0200 +++ /var/tmp/diff_new_pack.Fdtfnx/_new 2024-04-04 22:24:21.171101134 +0200 @@ -34,7 +34,7 @@ %define devname %{name}-devel Name: libdnf -Version: 0.73.0 +Version: 0.73.1 Release: 0 Summary: Library providing C and Python APIs atop libsolv License: LGPL-2.1-or-later ++++++ libdnf-0.73.0.tar.gz -> libdnf-0.73.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/.packit.yaml new/libdnf-0.73.1/.packit.yaml --- old/libdnf-0.73.0/.packit.yaml 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/.packit.yaml 2024-03-28 18:45:46.000000000 +0100 @@ -8,3 +8,12 @@ trigger: pull_request targets: - fedora-all + - job: tests + trigger: pull_request + identifier: "dnf-tests" + targets: + - fedora-all + fmf_url: https://github.com/rpm-software-management/ci-dnf-stack.git + fmf_ref: enable-tmt-dnf-4-stack + tmt_plan: "^/plans/integration/behave-dnf$" + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/VERSION.cmake new/libdnf-0.73.1/VERSION.cmake --- old/libdnf-0.73.0/VERSION.cmake 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/VERSION.cmake 2024-03-28 18:45:46.000000000 +0100 @@ -1,6 +1,6 @@ set (DEFAULT_LIBDNF_MAJOR_VERSION 0) set (DEFAULT_LIBDNF_MINOR_VERSION 73) -set (DEFAULT_LIBDNF_MICRO_VERSION 0) +set (DEFAULT_LIBDNF_MICRO_VERSION 1) if(DEFINED LIBDNF_MAJOR_VERSION) if(NOT ${DEFAULT_LIBDNF_MAJOR_VERSION} STREQUAL ${LIBDNF_MAJOR_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/docs/release_notes.rst new/libdnf-0.73.1/docs/release_notes.rst --- old/libdnf-0.73.0/docs/release_notes.rst 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/docs/release_notes.rst 2024-03-28 18:45:46.000000000 +0100 @@ -20,6 +20,19 @@ ###################### ==================== +0.73.1 Release Notes +==================== + +- Bug fixes: + - Fix https://issues.redhat.com/browse/RHEL-27657 + - subject-py: Fix memory leak + +- Others: + - MergedTransaction: Calculate RPM difference between two same versions as no-op + - Onboard packit tests + - Add virtual destructor to TransactionItem + +==================== 0.73.0 Release Notes ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/libdnf/sack/query.cpp new/libdnf-0.73.1/libdnf/sack/query.cpp --- old/libdnf-0.73.0/libdnf/sack/query.cpp 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/libdnf/sack/query.cpp 2024-03-28 18:45:46.000000000 +0100 @@ -2313,7 +2313,7 @@ if (!result) initResult(); map_init(&m, pool->nsolvables); - assert(m.size == result->getMap()->size); + map_grow(result->getMap(), pool->nsolvables); for (auto f : filters) { map_empty(&m); switch (f.getKeyname()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/libdnf/transaction/MergedTransaction.cpp new/libdnf-0.73.1/libdnf/transaction/MergedTransaction.cpp --- old/libdnf-0.73.0/libdnf/transaction/MergedTransaction.cpp 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/libdnf/transaction/MergedTransaction.cpp 2024-03-28 18:45:46.000000000 +0100 @@ -192,7 +192,7 @@ * Actions are merged using following rules: * (old action) -> (new action) = (merged action) * - * Erase/Obsolete -> Install/Obsoleting = Reinstall/Downgrade/Upgrade + * Erase/Obsolete -> Install/Obsoleting = Downgrade/Upgrade * * Reinstall/Reason change -> (new action) = (new action) * @@ -210,6 +210,9 @@ * * With complete transaction pair we need to get a new Upgrade/Downgrade package and * compare versions with original package from pair. + * + * Additionally, if a package is installed both before and after the list of transactions + * with the same version, no action will be taken. */ std::vector< TransactionItemBasePtr > MergedTransaction::getItems() @@ -261,13 +264,16 @@ /** * Resolve the difference between RPMs in the first and second transaction item - * and create a ItemPair of Upgrade, Downgrade or reinstall. + * and create a ItemPair of Upgrade, Downgrade or drop the item from the merged + * transaction set in case of both packages are of the same version. * Method is called when original package is being removed and than installed again. + * \param itemPairMap merged transaction set * \param previousItemPair original item pair * \param mTransItem new transaction item */ void -MergedTransaction::resolveRPMDifference(ItemPair &previousItemPair, +MergedTransaction::resolveRPMDifference(ItemPairMap &itemPairMap, + ItemPair &previousItemPair, TransactionItemBasePtr mTransItem) { auto firstItem = previousItemPair.first->getItem(); @@ -277,11 +283,10 @@ auto secondRPM = std::dynamic_pointer_cast< RPMItem >(secondItem); if (firstRPM->getVersion() == secondRPM->getVersion() && - firstRPM->getEpoch() == secondRPM->getEpoch()) { - // reinstall - mTransItem->setAction(TransactionItemAction::REINSTALL); - previousItemPair.first = mTransItem; - previousItemPair.second = nullptr; + firstRPM->getEpoch() == secondRPM->getEpoch() && + firstRPM->getRelease() == secondRPM->getRelease()) { + // Drop the item from merged transaction + itemPairMap.erase(getItemIdentifier(firstItem)); return; } else if ((*firstRPM) < (*secondRPM)) { // Upgrade to secondRPM @@ -296,7 +301,9 @@ } void -MergedTransaction::resolveErase(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem) +MergedTransaction::resolveErase(ItemPairMap &itemPairMap, + ItemPair &previousItemPair, + TransactionItemBasePtr mTransItem) { /* * The original item has been removed - it has to be installed now unless the rpmdb @@ -306,7 +313,7 @@ if (mTransItem->getAction() == TransactionItemAction::INSTALL) { if (mTransItem->getItem()->getItemType() == ItemType::RPM) { // resolve the difference between RPM packages - resolveRPMDifference(previousItemPair, mTransItem); + resolveRPMDifference(itemPairMap, previousItemPair, mTransItem); } else { // difference between comps can't be resolved mTransItem->setAction(TransactionItemAction::REINSTALL); @@ -323,11 +330,14 @@ * transaction - new package is used to complete the pair. Items are stored in pairs (Upgrade, * Upgrade) or (Downgraded, Downgrade). With complete transaction pair we need to get the new * Upgrade/Downgrade item and compare its version with the original item from the pair. + * \param itemPairMap merged transaction set * \param previousItemPair original item pair * \param mTransItem new transaction item */ void -MergedTransaction::resolveAltered(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem) +MergedTransaction::resolveAltered(ItemPairMap &itemPairMap, + ItemPair &previousItemPair, + TransactionItemBasePtr mTransItem) { auto newState = mTransItem->getAction(); auto firstState = previousItemPair.first->getAction(); @@ -369,7 +379,7 @@ } else { if (mTransItem->getItem()->getItemType() == ItemType::RPM) { // resolve the difference between RPM packages - resolveRPMDifference(previousItemPair, mTransItem); + resolveRPMDifference(itemPairMap, previousItemPair, mTransItem); } else { // difference between comps can't be resolved previousItemPair.second->setAction(TransactionItemAction::REINSTALL); @@ -405,7 +415,7 @@ switch (firstState) { case TransactionItemAction::REMOVE: case TransactionItemAction::OBSOLETED: - resolveErase(previousItemPair, mTransItem); + resolveErase(itemPairMap, previousItemPair, mTransItem); break; case TransactionItemAction::INSTALL: // the original package has been installed -> it may be either Removed, or altered @@ -432,7 +442,7 @@ case TransactionItemAction::UPGRADE: case TransactionItemAction::UPGRADED: case TransactionItemAction::OBSOLETE: - resolveAltered(previousItemPair, mTransItem); + resolveAltered(itemPairMap, previousItemPair, mTransItem); break; case TransactionItemAction::REINSTALLED: break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/libdnf/transaction/MergedTransaction.hpp new/libdnf-0.73.1/libdnf/transaction/MergedTransaction.hpp --- old/libdnf-0.73.0/libdnf/transaction/MergedTransaction.hpp 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/libdnf/transaction/MergedTransaction.hpp 2024-03-28 18:45:46.000000000 +0100 @@ -76,9 +76,9 @@ typedef std::map< std::string, ItemPair > ItemPairMap; void mergeItem(ItemPairMap &itemPairMap, TransactionItemBasePtr transItem); - void resolveRPMDifference(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); - void resolveErase(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); - void resolveAltered(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); + void resolveRPMDifference(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); + void resolveErase(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); + void resolveAltered(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); }; } // namespace libdnf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/libdnf/transaction/TransactionItem.hpp new/libdnf-0.73.1/libdnf/transaction/TransactionItem.hpp --- old/libdnf-0.73.0/libdnf/transaction/TransactionItem.hpp 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/libdnf/transaction/TransactionItem.hpp 2024-03-28 18:45:46.000000000 +0100 @@ -43,6 +43,8 @@ class TransactionItemBase { public: + virtual ~TransactionItemBase() = default; + ItemPtr getItem() const noexcept { return item; } void setItem(ItemPtr value) { item = value; } @@ -101,6 +103,7 @@ explicit TransactionItem(Transaction *trans); TransactionItem(SQLite3Ptr conn, int64_t transID); + virtual ~TransactionItem() = default; int64_t getId() const noexcept { return id; } void setId(int64_t value) { id = value; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/libdnf.spec new/libdnf-0.73.1/libdnf.spec --- old/libdnf-0.73.0/libdnf.spec 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/libdnf.spec 2024-03-28 18:45:46.000000000 +0100 @@ -5,7 +5,7 @@ %global swig_version 3.0.12 %global libdnf_major_version 0 %global libdnf_minor_version 73 -%global libdnf_micro_version 0 +%global libdnf_micro_version 1 %define __cmake_in_source_build 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/python/hawkey/subject-py.cpp new/libdnf-0.73.1/python/hawkey/subject-py.cpp --- old/libdnf-0.73.0/python/hawkey/subject-py.cpp 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/python/hawkey/subject-py.cpp 2024-03-28 18:45:46.000000000 +0100 @@ -361,8 +361,10 @@ HyNevra nevra{nullptr}; UniquePtrPyObject q(get_solution(self, args, kwds, &nevra)); - if (!q) + if (!q) { + delete nevra; return NULL; + } PyObject *ret_dict = PyDict_New(); PyDict_SetItem(ret_dict, PyString_FromString("query"), q.get()); if (nevra) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.0/tests/libdnf/transaction/MergedTransactionTest.cpp new/libdnf-0.73.1/tests/libdnf/transaction/MergedTransactionTest.cpp --- old/libdnf-0.73.0/tests/libdnf/transaction/MergedTransactionTest.cpp 2024-02-08 15:39:11.000000000 +0100 +++ new/libdnf-0.73.1/tests/libdnf/transaction/MergedTransactionTest.cpp 2024-03-28 18:45:46.000000000 +0100 @@ -822,12 +822,7 @@ // test merging trans1, trans2 merged.merge(trans2); auto items2 = merged.getItems(); - CPPUNIT_ASSERT_EQUAL(1, (int)items2.size()); - auto item2 = items2.at(0); - CPPUNIT_ASSERT_EQUAL(std::string("tour-4.8-1.noarch"), item2->getItem()->toStr()); - CPPUNIT_ASSERT_EQUAL(std::string("repo1"), item2->getRepoid()); - CPPUNIT_ASSERT_EQUAL(TransactionItemAction::REINSTALL, item2->getAction()); - CPPUNIT_ASSERT_EQUAL(TransactionItemReason::USER, item2->getReason()); + CPPUNIT_ASSERT_EQUAL(0, (int)items2.size()); // test merging trans1, trans2, trans3 merged.merge(trans3);