← Back to team overview

sts-sponsors team mailing list archive

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

 

You have been subscribed to a public bug by Eric Desrochers (slashd):

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

** Affects: landscape-client
     Importance: High
     Assignee: Simon Poirier (simpoir)
         Status: Fix Committed

** Affects: landscape-client (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: landscape-client (Ubuntu Eoan)
     Importance: Medium
     Assignee: Simon Poirier (simpoir)
         Status: In Progress

** Affects: landscape-client (Ubuntu Focal)
     Importance: Undecided
         Status: Fix Released


** Tags: sts
-- 
AttributeError: module 'apt_pkg' has no attribute 'rewrite_section'
https://bugs.launchpad.net/bugs/1850205
You received this bug notification because you are a member of STS Sponsors, which is subscribed to the bug report.