Bug 1067156 - [api] introspecting transaction
[api] introspecting transaction
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1111855
  Show dependency treegraph
 
Reported: 2014-02-19 15:07 EST by Jakub Kadlčík
Modified: 2014-07-08 22:29 EDT (History)
6 users (show)

See Also:
Fixed In Version: dnf-plugins-core-0.1.1-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-08 22:29:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jakub Kadlčík 2014-02-19 15:07:35 EST
Hi, I hope its right place to posting it, but on IRC it was recommended me to do this.

I work on DNF plugin and I had to use undocummented properties, which probably isn't in API.

There is skeleton of my code:

class Tracer(dnf.Plugin):
    def transaction(self):
        for transaction_item in  self.base.transaction:
            print transaction_item.installed.name


Can you please consider including some apparatus for accessing self.base.transaction and transaction_item.installed.name to API?
Comment 1 Ales Kozumplik 2014-02-19 15:14:19 EST
Definitely, we'll look at this. What excatly is your use case, what do you want to do with the transaction items, what functionality is the plugin going to offer?
Comment 2 Jakub Kadlčík 2014-02-19 15:37:24 EST
Thank you for looking at this.

I am working on application that I called tracer. When the time comes, it will be my bachelor's thesis. That application will find running applications affected by update and gives you a list of them. For daemons it will say, how you can restart them, etc.

Now that important part for you. I work on DNF plugin that will call tracer after successful transactions and gives him list of modified packages.

Please see https://thesis-managementsystem.rhcloud.com/topic/show/111/determine-applications-affected-by-upgrade

You can also see my git repository https://github.com/FrostyX/tracer/tree/develop if you want to.
Comment 3 Ales Kozumplik 2014-02-20 02:11:07 EST
Thanks for the spec. We'll see how to provide this.
Comment 4 Jan Zeleny 2014-02-20 03:07:22 EST
(In reply to Jakub Kadlčík from comment #2)
> Thank you for looking at this.
> 
> I am working on application that I called tracer. When the time comes, it
> will be my bachelor's thesis. That application will find running
> applications affected by update and gives you a list of them. For daemons it
> will say, how you can restart them, etc.
> 
> Now that important part for you. I work on DNF plugin that will call tracer
> after successful transactions and gives him list of modified packages.
> 
> Please see
> https://thesis-managementsystem.rhcloud.com/topic/show/111/determine-
> applications-affected-by-upgrade
> 
> You can also see my git repository
> https://github.com/FrostyX/tracer/tree/develop if you want to.

Just out of curiosity, isn't that exactly what yum-plugin-ps does? Just trying to prevent duplication of work here, cause most of the plugins from yum-utils will be ported to dnf in the future.
Comment 5 Jakub Kadlčík 2014-02-24 03:44:58 EST
(In reply to Jan Zeleny from comment #4)
> (In reply to Jakub Kadlčík from comment #2)
> Just out of curiosity, isn't that exactly what yum-plugin-ps does? Just
> trying to prevent duplication of work here, cause most of the plugins from
> yum-utils will be ported to dnf in the future.

From the http://fedora.12.x6.nabble.com/difference-between-output-of-yum-ps-and-needs-restarting-tp5002649p5002660.html

> yum ps - tells you what packages are associated with which processes. Can be 
> used before the fact to determine if doing that update is a good idea. 
>
> needs-restarting identifies (after update) processes using packages (typically 
> libraries) which have been updated. 

So my project has more common with needs-restarting than yum-plugin-ps. But thank you, I didnt know any of them.
Comment 6 Ales Kozumplik 2014-07-01 11:58:57 EDT
Provided by upstream commit 46b6b83.
Comment 7 Jakub Kadlčík 2014-07-01 16:10:52 EDT
Thank you, Aleš
Comment 8 Fedora Update System 2014-07-07 05:11:36 EDT
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20
Comment 9 Fedora Update System 2014-07-07 21:03:54 EDT
Package dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.1-2.fc20 dnf-0.5.3-1.fc20 hawkey-0.4.17-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8167/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20
then log in and leave karma (feedback).
Comment 10 Fedora Update System 2014-07-08 22:29:46 EDT
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.