[Bug 1612948] Re: axi-cache conversion to python3 broke the script

Norbert 1612948 at bugs.launchpad.net
Fri Aug 11 20:07:06 UTC 2017


My patch may be applied as
sudo sed -i 's/from ConfigParser import RawConfigParser/from configparser import RawConfigParser/' /usr/bin/axi-cache
but this is not enough.

What is wrong with version from Debian Stretch
(https://packages.debian.org/stretch/apt-xapian-index)? Why you migrated
to python3? I can't understand.

Manually installed version from Debian do not crash and works as expected.
(
$ axi-cache search brasero
4 results found.
Results 1-4:
100% brasero-common - Common files for the Brasero CD burning application and library
98% brasero-cdrkit - cdrkit extensions for the Brasero burning application
74% gir1.2-brasero-3.0 - CD/DVD burning library for GNOME - GObject introspection data
69% brasero - CD/DVD burning application for GNOME
More terms: burning application cdrkit gnome introspection gir1.2 extensions
More tags: 

$ axi-cache again
4 results found.
Results 1-4:
100% brasero-common - Common files for the Brasero CD burning application and library
98% brasero-cdrkit - cdrkit extensions for the Brasero burning application
74% gir1.2-brasero-3.0 - CD/DVD burning library for GNOME - GObject introspection data
69% brasero - CD/DVD burning application for GNOME
More terms: brasero burning application cdrkit gnome introspection gir1.2
More tags: 

$ axi-cache last
4 results found.
Results 1-4:
100% brasero-common - Common files for the Brasero CD burning application and library
98% brasero-cdrkit - cdrkit extensions for the Brasero burning application
74% gir1.2-brasero-3.0 - CD/DVD burning library for GNOME - GObject introspection data
69% brasero - CD/DVD burning application for GNOME
More terms: brasero burning application cdrkit gnome introspection gir1.2
More tags: 

$ axi-cache more
4 results found.
No more results to show
`axi-cache again' will restart the search

$ axi-cache rdetails brasero
brasero dep gnome ubuntu-gnome-desktop ubuntu-mate-desktop
brasero rec ubuntustudio-video aptoncd banshee cinnamon-desktop-environment
brasero sug furiusisomount exfalso sound-juicer uck nautilus fotoxx
brasero bre brasero-common
)

-- 
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