Bug 56536 - Adjust univention.lib.package_manager for upstream removed "install_protect()"
Summary: Adjust univention.lib.package_manager for upstream removed "install_protect()"
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: univention-lib
Version: UCS 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.1
Assignee: Florian Best
QA Contact: Marius Meschter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-05 14:12 CEST by Florian Best
Modified: 2025-02-05 15:08 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2023-09-05 14:12:09 CEST
We have to adjust univention.lib.package_manager to this upstream commit:

    commit 324b2d49f16b307e7b365645591ebfd9ff71aba4
    Author: Julian Andres Klode <jak@debian.org>
    Date:   Mon Jun 24 13:49:55 2019 +0200
    
        Remove install_protect() methods
    
        They were dropped in apt 1.9, and do nothing.

Otherwise the following exception happens:

    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/univention/management/console/modules/setup/setup_script.py", line 323, in run
        success = self.inner_run()
      File "/usr/lib/univention-system-setup/scripts/05_role/10role", line 89, in inner_run
        success = self.install(wanted_server_role_package)
      File "/usr/lib/python3/dist-packages/univention/management/console/modules/setup/setup_script.py", line 437, in install
        return self.package_manager.install(*pkg_names)
      File "/usr/lib/python3/dist-packages/univention/lib/package_manager.py", line 1118, in install
        return self.commit(install=pkg_names)
      File "/usr/lib/python3/dist-packages/univention/lib/package_manager.py", line 904, in commit
        to_be_installed, to_be_removed, broken = self.mark(install, remove, dry_run=True)
      File "/usr/lib/python3/dist-packages/univention/lib/package_manager.py", line 809, in mark
        fixer.install_protect()
    AttributeError: 'ProblemResolver' object has no attribute 'install_protect'
Comment 2 Florian Best univentionstaff 2023-10-05 14:01:43 CEST
This is already the case in UCS 5.1.
UCS 5.0: apt            1.8.2.3
UCS 5.1: apt            2.2.4
UCS 5.2: apt            2.6.0
Comment 3 Marius Meschter univentionstaff 2023-10-13 13:55:38 CEST
QA:
changelog: OK
mark package using PackageManager: OK
no more calls to install_protect() anywhere: OK
Comment 4 Marius Meschter univentionstaff 2023-10-13 13:57:29 CEST
QA:
both in 5.2 and 5.1: OK
Comment 5 Florian Best univentionstaff 2024-03-08 10:43:25 CET
univention-lib (10.0.4)
b8fc3e6271b1 | fix(lib): adapt package mangager to python-apt changes