Bug 1168807 - Tracer fails to start with the error "OSerror[errno 5] no such file or directory:'/var/lib/dnf/history' "
Summary: Tracer fails to start with the error "OSerror[errno 5] no such file or direct...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tracer
Version: 21
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-28 06:02 UTC by amrithakalliyat
Modified: 2015-01-10 02:58 UTC (History)
2 users (show)

Fixed In Version: tracer-0.5.6-1.fc20
Clone Of:
Environment:
Last Closed: 2015-01-06 06:18:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description amrithakalliyat 2014-11-28 06:02:44 UTC
Description of problem:
Tracer fails to start with the error  "OSerror[errno 5] no such file or directory:'/var/lib/dnf/history' "

Version-Release number of selected component (if applicable):
tracer-0.5.4-1.fc21.x86_64

How reproducible:
Login as root and run "tracer" from terminal 

Steps to Reproduce:
1.Install fedora 21
2.install tracer from updates testing repository.
  su -c'yum update --enablerepo=updates-testing tracer-0.5.4-1.fc21.x86_64'.
3.run tracer from terminal

Actual results:

It's showing error.
[root@localhost ~]# tracer
Traceback (most recent call last):
  File "/bin/tracer", line 34, in <module>
    tracer.main.run()
  File "/usr/lib/python2.7/site-packages/tracer/main.py", line 42, in run
    return router.dispatch()
  File "/usr/lib/python2.7/site-packages/tracer/resources/router.py", line 49, in dispatch
    controller = DefaultController(self.args, self.packages)
  File "/usr/lib/python2.7/site-packages/tracer/controllers/default.py", line 41, in __init__
    self.applications = self.tracer.trace_affected(self._user(args.user))
  File "/usr/lib/python2.7/site-packages/tracer/resources/tracer.py", line 73, in trace_affected
    packages = self._modified_packages()
  File "/usr/lib/python2.7/site-packages/tracer/resources/tracer.py", line 59, in _modified_packages
    packages = self._PACKAGE_MANAGER.packages_newer_than(timestamp)
  File "/usr/lib/python2.7/site-packages/tracer/packageManagers/rpm.py", line 64, in packages_newer_than
    sqlite = self._database_file()
  File "/usr/lib/python2.7/site-packages/tracer/packageManagers/rpm.py", line 180, in _database_file
    for file in listdir(self.history_path):
OSError: [Errno 2] No such file or directory: '/var/lib/dnf/history/'

Expected results:
Finds outdated running applications in your system

Additional info:

Comment 1 Jakub Kadlčík 2014-11-28 09:04:25 UTC
Thank you for your reply.
I will try to fix it soon.

Comment 2 Jakub Kadlčík 2014-12-17 00:28:33 UTC
I am sorry for such a long delay, but I had some problems with installing F21 to virtualbox.

The issue seems a bit strange to me, actually. How can be possible that you dont have /var/lib/dnf/history folder? At first I thought that this directory was just renamed on F21, but my fresh install has it.

Maybe you don't even have dnf installed?

Comment 3 amrithakalliyat 2014-12-22 17:54:08 UTC
Hi,

dnf is installed, but there are no /var/lib/dnf/history by default. I have been testing this using Fedora 21 Workstation.

Comment 4 Jakub Kadlčík 2014-12-23 23:11:32 UTC
Ok, thank you very much.

I tried F21 Xfce spin, cause Workstation didn't work for me in virtualbox. Probably because of 3D acceleration.

I will try it on real HW though. It will surely be fixed within holidays.

Comment 5 Jakub Kadlčík 2014-12-29 16:13:20 UTC
Found the problem,

> but there are no /var/lib/dnf/history by default

You are right. This directory is created when you (re)install/update some package via DNF for the first time. After that, tracer works fine. Thank you for discovering this, I will catch the traceback.

It follows that you want to use tracer with YUM right? Tracer can do it, but DNF is configured as default and there is no switching mechanism at this moment.

There are few possibilities:
1. I can implement some switching based configuration file
2. I can get list of packages modified via DNF and via YUM and merge them, so it wouldn't matter which one who use.
3. Switching to DNF. AFAIK DNF will be default package manager for F22 and its pretty good package manager with backward compatible API to YUM. Also, tracer has plugin for DNF which prints what applications should be restarted after every transaction.

I can see no problem to implement option 1 or 2 if someone really wants to use it with YUM.

Comment 6 Fedora Update System 2014-12-31 20:55:02 UTC
tracer-0.5.5-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/tracer-0.5.5-1.fc21

Comment 7 Fedora Update System 2014-12-31 20:55:41 UTC
tracer-0.5.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/tracer-0.5.5-1.fc20

Comment 8 Jakub Kadlčík 2014-12-31 21:00:52 UTC
Please try update to tracer-0.5.5-1 . I have implemented option 2 mentioned above

> 2. I can get list of packages modified via DNF and via YUM and merge them, so it wouldn't matter which one who use.

Comment 9 Fedora Update System 2015-01-01 08:53:17 UTC
Package tracer-0.5.5-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 tracer-0.5.5-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0004/tracer-0.5.5-1.fc21
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2015-01-01 15:11:52 UTC
tracer-0.5.6-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/tracer-0.5.6-1.fc20

Comment 11 Fedora Update System 2015-01-01 15:12:03 UTC
tracer-0.5.6-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/tracer-0.5.6-1.fc21

Comment 12 Fedora Update System 2015-01-06 06:18:16 UTC
tracer-0.5.6-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-01-10 02:58:58 UTC
tracer-0.5.6-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.