← Back to team overview

sts-sponsors team mailing list archive

[Bug 1850205] Re: AttributeError: module 'apt_pkg' has no attribute 'rewrite_section'

 

Sponsored in Eoan

Thanks Simon !

** Tags removed: sts-sponsor-slashd

-- 
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1850205

Title:
  AttributeError: module 'apt_pkg' has no attribute 'rewrite_section'

Status in Landscape Client:
  Fix Committed
Status in landscape-client package in Ubuntu:
  Fix Released
Status in landscape-client source package in Eoan:
  In Progress
Status in landscape-client source package in Focal:
  Fix Released

Bug description:
  [Impact]

   * Regression when applying a package profile through landscape on
     ubuntu-19.10. Process will stack-trace.
     
   * The issue is caused by removal of some obsolete methods from
     python-apt.

   * The backported patch replaces old rewrite_section() by 
     TagSection.write()

  [Test Case]

   * On ubuntu 19.10 (eoan) install landscape-client, run landscape-config,
     and create a package profile on the account.

   * check /var/log/landscape/package-changer.log for exceptions.

  [Regression Potential]

   * The change has already been published for ubuntu 20.04 and is
  verified.

   * Patched callsites are only used by package profiles, which would limit
     the effect of regressions.

   * One possible regression could be in encoding errors,
     as the new methods handle binary files directly instead of receiving
     strings. This would imply an issue with python-apt.

  [original description]
  There has been an API change in focal/eoan for python3-apt >= 1.9, and the package changer now raises exceptions:

  AttributeError: module 'apt_pkg' has no attribute 'rewrite_section'

To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape-client/+bug/1850205/+subscriptions