[Bug 257512] print/hplip hp-toolbox problem

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 30 Jul 2021 19:49:09 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257512

            Bug ID: 257512
           Summary: print/hplip hp-toolbox problem
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: tijl_at_FreeBSD.org
          Reporter: vladimir.mishev_at_gmail.com
          Assignee: tijl_at_FreeBSD.org
             Flags: maintainer-feedback?(tijl_at_FreeBSD.org)
 Attachment #226807 text/plain
         mime type:

Created attachment 226807
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=226807&action=edit
replace platform.dist with platform.libc_ver()

print/hplip pkg installs ok, printing works, but hp-toolbox crashes.

Problem is in base/password.py which calls depreciated/non-existent
platform.dist()

Changing that to platform.libc_vers() makes hp-tools start without problem.

I’m not sure should distro.linux_distribution() be removed as well.

patch-password.py 
--- base/password.py.orig       2021-07-30 21:24:44.609836000 +0200
+++ base/password.py
_at__at_ -82,7 +82,7 _at__at_
         os_name = None

     try:
-        os_name = platform.dist()[0]
+        os_name = platform.libc_ver()[0]
     except AttributeError:
         import distro
         os_name = distro.linux_distribution()[0]

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Fri Jul 30 2021 - 19:49:09 UTC

Original text of this message