a >h @s8ddlmZddlmZddlmZGdddeZdS)) DebianPlugin) LinuxPolicy)DpkgPackageManagerc sxeZdZdZdgZdZdZdZdZe gZ dZ dZ d d d d d dddddd Z dfdd ZddZddZddZZS) DebianPolicyzthe Debian project)zCommunity Websitezhttps://www.debian.org/ZDebianz/etc/debian_versionz/var/tmpZfriendlyzX/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/sbin:/usr/local/binZ sosreport ) ZsqueezeZwheezyZjessieZstretchZbusterZbullseyeZbookwormZtrixieZforkyZdukeNTcs8tj||||dt|j|d|_|jtg7_dS)N)sysrootinit probe_runtime remote_exec)chrootr)super__init__rrZpackage_managervalid_subclassesr)selfrrrr __class__?/usr/lib/python3.9/site-packages/sos/policies/distros/debian.pyr's zDebianPolicy.__init__cCsddi||S)Nxzzxz-utils)get)rZbinaryrrr_get_pkg_name_for_binary0sz%DebianPolicy._get_pkg_name_for_binarycCsztddddh}d}|}|D]"}d|vr"|dd}qFq"||jvrj|j|WdWSWdn1s~0YWd StyYd S0dS) Nz/etc/os-releaserzutf-8)encodingZVERSION_CODENAME=F)open readlinessplitstrip deb_versionsIOError)rfpZ rel_stringlineslinerrr dist_version6s 8 zDebianPolicy.dist_versioncCs|s |jS|S)N)_tmp_dir)rZ opt_tmp_dirrrr get_tmp_dirEszDebianPolicy.get_tmp_dir)NNTN)__name__ __module__ __qualname__ZvendorZ vendor_urlsZos_release_nameZos_release_filer/Z name_patternrrPATHZ sos_pkg_namer)rrr.r0 __classcell__rrrrrs4  rN)Zsos.report.pluginsrZsos.policies.distrosrZ"sos.policies.package_managers.dpkgrrrrrr s