Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1067156 - [api] introspecting transaction
Summary: [api] introspecting transaction
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1111855
TreeView+ depends on / blocked
 
Reported: 2014-02-19 20:07 UTC by Jakub Kadlčík
Modified: 2014-07-09 02:29 UTC (History)
6 users (show)

Fixed In Version: dnf-plugins-core-0.1.1-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-09 02:29:46 UTC


Attachments (Terms of Use)

Description Jakub Kadlčík 2014-02-19 20:07:35 UTC
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 20:14:19 UTC
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 20:37:24 UTC
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 07:11:07 UTC
Thanks for the spec. We'll see how to provide this.

Comment 4 Jan Zeleny 2014-02-20 08:07:22 UTC
(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 08:44:58 UTC
(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 15:58:57 UTC
Provided by upstream commit 46b6b83.

Comment 7 Jakub Kadlčík 2014-07-01 20:10:52 UTC
Thank you, Aleš

Comment 8 Fedora Update System 2014-07-07 09:11:36 UTC
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-08 01:03:54 UTC
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-09 02:29:46 UTC
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.