desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #15940
[Bug 666449] Re: "History" screen spins forever if /var/log/apt/history.log is corrupt
** Summary changed:
- Software-center fails to launch because of "time data" does not match
+ "History" screen spins forever if /var/log/apt/history.log is corrupt
** Description changed:
- Binary package hint: software-center
+ Ubuntu Software Center 3.0.5, Ubuntu 10.10
+ software-center trunk r2328, Ubuntu 11.10 beta 1
- Expected to happen: Software-center would launch
- What happens instead: Software-center fails to launch
+ 1. Make a backup copy of /var/log/apt/history.log.
+ 2. In the original file, munge one of the timestamps, e.g. change "2011-09-02 19:03:18" to "2011-09-02 1".
+ 3. Launch USC.
+ 4. Choose "History".
+ 5. Close USC and restore history.log from the backup.
- Ubuntu 10.10
+ What happens:
+ 4. The "History" screen forever shows a spinner. And at the console, this traceback appears:
+ ------------
+ Traceback (most recent call last):
+ File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 107, in _rescan
+ self._scan(self.history_file)
+ File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 125, in _scan
+ trans = Transaction(stanza)
+ File "/home/mpt/hacking/software-center/softwarecenter/db/history.py", line 45, in __init__
+ "%Y-%m-%d %H:%M:%S")
+ File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
+ (data_string, format))
+ ValueError: time data '2011-09-02 2' does not match format '%Y-%m-%d %H:%M:%S'
+ ------------
- software-center:
- Installed: 3.0.5
- Candidate: 3.0.5
- Version table:
- *** 3.0.5 0
- 500 http://ca.archive.ubuntu.com/ubuntu/ maverick-updates/main amd64 Packages
- 100 /var/lib/dpkg/status
- 3.0.4 0
- 500 http://ca.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
-
- If run in terminal:
-
- ~$ software-center
- Traceback (most recent call last):
- File "/usr/bin/software-center", line 90, in <module>
- app = SoftwareCenterApp(datadir, xapian_base_path, options, args)
- File "/usr/share/software-center/softwarecenter/app.py", line 149, in __init__
- self.history = get_apt_history()
- File "/usr/share/software-center/softwarecenter/apt/apthistory.py", line 178, in get_apt_history
- apt_history = AptHistory()
- File "/usr/share/software-center/softwarecenter/apt/apthistory.py", line 83, in __init__
- self.rescan()
- File "/usr/share/software-center/softwarecenter/apt/apthistory.py", line 99, in rescan
- self._scan(self.history_file)
- File "/usr/share/software-center/softwarecenter/apt/apthistory.py", line 116, in _scan
- trans = Transaction(stanza)
- File "/usr/share/software-center/softwarecenter/apt/apthistory.py", line 59, in __init__
- "%Y-%m-%d %H:%M:%S")
- File "/usr/lib/python2.6/_strptime.py", line 325, in _strptime
- (data_string, format))
- ValueError: time data '2' does not match format '%Y-%m-%d %H:%M:%S'
+ What should happen: The "History" screen should show as many
+ transactions as it can read. Any unparseable values should be shown as
+ "unknown" or something like that.
** Tags removed: data format match mismatch software-center time
** Changed in: software-center (Ubuntu)
Status: New => Triaged
** Changed in: software-center (Ubuntu)
Importance: Undecided => Medium
** Description changed:
Ubuntu Software Center 3.0.5, Ubuntu 10.10
software-center trunk r2328, Ubuntu 11.10 beta 1
1. Make a backup copy of /var/log/apt/history.log.
2. In the original file, munge one of the timestamps, e.g. change "2011-09-02 19:03:18" to "2011-09-02 1".
3. Launch USC.
4. Choose "History".
5. Close USC and restore history.log from the backup.
What happens:
- 4. The "History" screen forever shows a spinner. And at the console, this traceback appears:
+ 3. USC 3.0.5 fails to launch at all.
+ 4. USC r2338 launches, but the "History" screen forever shows a spinner, and produces this traceback at the console:
------------
Traceback (most recent call last):
- File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 107, in _rescan
- self._scan(self.history_file)
- File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 125, in _scan
- trans = Transaction(stanza)
- File "/home/mpt/hacking/software-center/softwarecenter/db/history.py", line 45, in __init__
- "%Y-%m-%d %H:%M:%S")
- File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
- (data_string, format))
+ File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 107, in _rescan
+ self._scan(self.history_file)
+ File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 125, in _scan
+ trans = Transaction(stanza)
+ File "/home/mpt/hacking/software-center/softwarecenter/db/history.py", line 45, in __init__
+ "%Y-%m-%d %H:%M:%S")
+ File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
+ (data_string, format))
ValueError: time data '2011-09-02 2' does not match format '%Y-%m-%d %H:%M:%S'
------------
What should happen: The "History" screen should show as many
transactions as it can read. Any unparseable values should be shown as
"unknown" or something like that.
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to software-center in Ubuntu.
https://bugs.launchpad.net/bugs/666449
Title:
"History" screen spins forever if /var/log/apt/history.log is corrupt
Status in “software-center” package in Ubuntu:
Triaged
Bug description:
Ubuntu Software Center 3.0.5, Ubuntu 10.10
software-center trunk r2328, Ubuntu 11.10 beta 1
1. Make a backup copy of /var/log/apt/history.log.
2. In the original file, munge one of the timestamps, e.g. change "2011-09-02 19:03:18" to "2011-09-02 1".
3. Launch USC.
4. Choose "History".
5. Close USC and restore history.log from the backup.
What happens:
3. USC 3.0.5 fails to launch at all.
4. USC r2338 launches, but the "History" screen forever shows a spinner, and produces this traceback at the console:
------------
Traceback (most recent call last):
File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 107, in _rescan
self._scan(self.history_file)
File "/home/mpt/hacking/software-center/softwarecenter/db/history_impl/apthistory.py", line 125, in _scan
trans = Transaction(stanza)
File "/home/mpt/hacking/software-center/softwarecenter/db/history.py", line 45, in __init__
"%Y-%m-%d %H:%M:%S")
File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2011-09-02 2' does not match format '%Y-%m-%d %H:%M:%S'
------------
What should happen: The "History" screen should show as many
transactions as it can read. Any unparseable values should be shown as
"unknown" or something like that.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/666449/+subscriptions