Hello, I would like to ask you about considering to include Transaction properties install_set and remove_set into API. I would like to use them like this: installed = set([package.name for package in self.base.transaction.install_set]) erased = set([package.name for package in self.base.transaction.remove_set]) and then work with those sets. Some time ago I asked for similar thing in https://bugzilla.redhat.com/show_bug.cgi?id=1067156 Thank you
Hello, is there a good reason why "set(itertools.chain.from_iterable(item.installs() for item in transaction))" is not enough for you? I understand that since the method you want is in the code base already, it should be easy too add it to API. But if we want to keep DNF maintainable we need to carefully consider every API extension.
Hello Radek, thank you for the reply. It's not entirely necessary, but the installed = set([package.name for package in self.base.transaction.install_set]) is much more straightforward than installed = set([p.name for p in chain.from_iterable([i.installs() for i in self.base.transaction])]) It is a complicated because when you are iterating Transaction you are getting the TransactionItem. For getting packages (I actually want package names) you must iterate over every item in installs(). Unlike this, install_set is straight access directly to the packages. > the method you want is in the code base already, it should be easy too add it to API. That was the point why I asked for considering about adding it to API, but if there are some plans for changing the actual state, I would wait for that reimplementation. > But if we want to keep DNF maintainable we need to carefully consider every API extension. I understand this, so I will not trying to force you to it or something :-). My goal is achievable with actual API.
I see. Such a method would even more useful because anyone who writes a DNF extension that installs some packages needs to download them first and that would require "base.download_packages(list(itertools.chain.from_iterable(item.installs() for item in base.transaction)))" in every such extension. Not very painful but not very comfortable. And why should we force people to duplicate code, right? Maybe we can wait for more interested people. I don't know. Let's see what is the opinion of the rest of the team.
It could be added to API.
dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21
Package hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing hawkey-0.5.3-2.fc21 dnf-plugins-core-0.1.5-1.fc21 dnf-0.6.4-1.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-2139/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 then log in and leave karma (feedback).
hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.