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

Sebastien Bacher seb128 at ubuntu.com
Thu Jul 11 09:06:56 UTC 2019


** Changed in: apt-xapian-index (Ubuntu)
   Importance: Medium => High

** Tags added: rls-ee-incoming

** Tags added: rls-bb-incoming

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