[Bug 1612948] Re: axi-cache conversion to python3 broke the script
Norbert
1612948 at bugs.launchpad.net
Sun Jun 24 10:22:47 UTC 2018
For 16.04 LTS we can use
`sudo cp /usr/lib/python3.5/configparser.py
/usr/lib/python3.5/ConfigParser.py`
And please note that problem is also seen on AskUbuntu -
https://askubuntu.com/a/1049264/66509 .
But it is not enough - search is broken:
$ sudo rm -rf /var/lib/apt-xapian-index/
$ sudo apt-get update
$ sudo update-apt-xapian-index -f
$ axi-cache info
Main data directory: /var/lib/apt-xapian-index
Update timestamp: /var/lib/apt-xapian-index/update-timestamp (last updated: Sun Jun 24 13:20:47 2018)
Index location: /var/lib/apt-xapian-index/index (pointing to /var/cache/apt-xapian-index/index.2)
Documentation of index contents: /var/lib/apt-xapian-index/README
Documentation of available prefixes: /var/lib/apt-xapian-index/prefixes
Documentation of available values: /var/lib/apt-xapian-index/values
Plugin directory: /usr/share/apt-xapian-index/plugins
Plugin status:
aliases enabled, up to date (114 days, 15:36:31.425668 older than index)
app-install enabled, up to date (1018 days, 2:46:20.425668 older than index)
apttags enabled, up to date (0:00:00 older than index)
cataloged_time enabled, up to date (0:00:00 older than index)
debtags disabled
descriptions enabled, up to date (0:00:00 older than index)
relations enabled, up to date (0:00:00 older than index)
sections enabled, up to date (0:00:00 older than index)
sizes enabled, up to date (0:00:00 older than index)
template enabled, up to date
translated-desc enabled, up to date (4 days, 4:00:57.425668 older than index)
Values:
Value Code Provided by
app-popcon 3 app-install
catalogedtime 4 cataloged_time
installedsize 1 sizes
packagesize 2 sizes
version 0 update-apt-xapian-index
Data sources:
Source Description Used by
/var/lib/apt-xapian-index/cataloged_times.p first-seen information for every package cataloged_time
/usr/share/apt-xapian-index/aliases/popular-apps Aliases expanding names of popular applications aliases
/var/cache/apt/pkgcache.bin APT index apttags, descriptions, relations, sections, sizes
/usr/share/app-install/desktop/ .desktop files provided by app-install-data app-install
$ axi-cache search app
277 results found.
Results 1-20:
100% b'address-book-app-dbg' - (unknown by apt)
99% b'mediaplayer-app-autopilot' - (unknown by apt)
98% b'python-app-catalog-ui' - (unknown by apt)
98% b'ubuntu-app-test' - (unknown by apt)
98% b'gir1.2-ubuntu-app-launch-2' - (unknown by apt)
97% b'notes-app-autopilot' - (unknown by apt)
96% b'messaging-app-autopilot' - (unknown by apt)
96% b'camera-app-autopilot' - (unknown by apt)
95% b'dialer-app-autopilot' - (unknown by apt)
95% b'libghc-wai-app-file-cgi-doc' - (unknown by apt)
95% b'libubuntu-app-launch2-dev' - (unknown by apt)
94% b'reminders-app-autopilot' - (unknown by apt)
94% b'address-book-app-autopilot' - (unknown by apt)
94% b'libplack-app-proxy-perl' - (unknown by apt)
94% b'libubuntu-app-launch2' - (unknown by apt)
93% b'libmoosex-app-cmd-perl' - (unknown by apt)
92% b'libmoosex-app-perl' - (unknown by apt)
92% b'lynkeos.app' - (unknown by apt)
89% b'python-zope.app.appsetup' - (unknown by apt)
82% b'phoneui-apps' - (unknown by apt)
Did you mean: b'api' ?
Traceback (most recent call last):
File "/usr/bin/axi-cache", line 852, in <module>
sys.exit(ui.perform())
File "/usr/bin/axi-cache", line 847, in perform
return f(self.args)
File "/usr/bin/axi-cache", line 547, in do_search
self.print_matches(self.db.get_matches())
File "/usr/bin/axi-cache", line 808, in print_matches
sugg = self.clean_suggestions(self.db.get_suggestions(count=7, filter=DB.TermFilter(stemmer=self.db.stem, exclude=self.args)))
File "/usr/bin/axi-cache", line 310, in get_suggestions
return self.enquire.get_eset(count, rset, filter)
File "/usr/bin/axi-cache", line 118, in __call__
return term[0].islower()
AttributeError: 'int' object has no attribute 'islower'
So the axi-cache is still broken.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt-xapian-index in Ubuntu.
https://bugs.launchpad.net/bugs/1612948
Title:
axi-cache conversion to python3 broke the script
Status in apt-xapian-index package in Ubuntu:
Confirmed
Bug description:
axi-cache, the script command line in apt-xapian-index, is now converted to python3.
In python3 afaik module ConfigParser is now renamed in configparser.
running axi-cache, throw an error:
mizio at sammiz:~$ axi-cache
No module named 'ConfigParser': only help functions are implemented, for the sake of help2man
if I edit axi-cache, fixing the module name (row 50, "from
configparser import RawConfigParser" instead of "from ConfigParser..."
all seems ok:
mizio at sammiz:~$ axi-cache
Usage: axi-cache [options] command [args]
Query the Apt Xapian index.
Commands:
<...>
But this fix isn't sufficient. The script not seems to me really
python3 compatible, ie:
mizio at sammiz:~$ axi-cache search brasero
4 results found.
Results 1-4:
100% b'brasero-cdrkit' - (unknown by apt)
98% b'brasero-common' - (unknown by apt)
77% b'gir1.2-brasero-3.0' - (unknown by apt)
71% b'brasero' - (unknown by apt)
Traceback (most recent call last):
File "/usr/bin/axi-cache", line 852, in <module>
sys.exit(ui.perform())
File "/usr/bin/axi-cache", line 847, in perform
return f(self.args)
File "/usr/bin/axi-cache", line 547, in do_search
self.print_matches(self.db.get_matches())
File "/usr/bin/axi-cache", line 808, in print_matches
sugg = self.clean_suggestions(self.db.get_suggestions(count=7, filter=DB.TermFilter(stemmer=self.db.stem, exclude=self.args)))
File "/usr/bin/axi-cache", line 310, in get_suggestions
return self.enquire.get_eset(count, rset, filter)
File "/usr/bin/axi-cache", line 118, in __call__
return term[0].islower()
AttributeError: 'int' object has no attribute 'islower'
for this reason I suggest to revert the "python3 conversion" or ask
the upstream to convert the script.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apt-xapian-index 0.47ubuntu8.1 [modified: usr/bin/axi-cache]
ProcVersionSignature: Ubuntu 4.4.0-35.54-generic 4.4.16
Uname: Linux 4.4.0-35-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: GNOME
Date: Sat Aug 13 14:39:38 2016
InstallationDate: Installed on 2010-05-06 (2290 days ago)
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
PackageArchitecture: all
SourcePackage: apt-xapian-index
UpgradeStatus: Upgraded to xenial on 2016-08-12 (0 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt-xapian-index/+bug/1612948/+subscriptions
More information about the foundations-bugs
mailing list