WIP: Trying to rewrite to use libdnf5 #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It appears there is no direct variable assignment available. You have to use .set() and .get_value() which makes this really awkward.
When using .set() it needs a priority, with RUNTIME having the highest precedence. Otherwise the new config setting won't take effect.
Managed to get it to download metadata and show the NEVRA of the packages selected on the cmdline.
It seems to run the transaction -- goal.resolve() takes a long time and the CPU is busy.
But I cannot figure out how to do anything with the transaction. It returns a memory leak error and I cannot iterate the result.
(Pdb) trx.get_transaction_packages()
<Swig Object of type 'std::vector< libdnf::base::TransactionPackage,std::allocator< libdnf::base::TransactionPackage > > *' at 0x7f5b257d83c0> swig/python detected a memory leak of type 'std::vector< libdnf::base::TransactionPackage,std::allocator< libdnf::base::TransactionPackage > > *', no destructor found.