tis-fix-wapt-packages

0.2.0-4
Allow you to fix incorrect (greater) package version deployed on host
1477 downloads
Download
See build result See VirusTotal scan
tis-fix-wapt-packages icon
  • package : tis-fix-wapt-packages
  • name : Fix WAPT Packages
  • version : 0.2.0-4
  • categories : System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor : Tranquil IT
  • licence :
  • locale : all
  • target_os : all
  • impacted_process :
  • architecture : all
  • signature_date : 2022-09-27 21:07
  • size : 7.98 Ko
package           : tis-fix-wapt-packages
version           : 0.2.0-4
architecture      : all
section           : base
priority          : optional
name              : Fix WAPT Packages
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : Allow you to fix incorrect (greater) package version deployed on host
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : all
min_wapt_version  : 2.0
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Permet de corriger une version incorrecte (supérieure) du paquet déployé sur l'hôte
description_pl    : Pozwala naprawić niepoprawną (większą) wersję pakietu wdrożonego na hoście
description_de    : Ermöglicht die Korrektur einer falschen (größeren) Paketversion, die auf dem Host bereitgestellt wird
description_es    : Permitir que se corrija la versión incorrecta (mayor) del paquete desplegado en el host
description_pt    : Permitir a correcção de versões incorrectas (maiores) do pacote implantado no anfitrião
description_it    : Consente di correggere la versione errata (maggiore) del pacchetto distribuito sull'host
description_nl    : Laat u toe om een onjuiste (grotere) pakketversie te herstellen die op de host is ingezet
description_ru    : Позволяет исправить неправильную (большую) версию пакета, развернутую на хосте
audit_schedule    : 
editor            : Tranquil IT
keywords          : 
licence           : 
homepage          : 
package_uuid      : ab02f8ea-d728-44cf-b42d-bf8ee03ee5b5
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : d642b35ce6441158dc071677fb958ad01830271d373c332d64e48dec67f80834
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : ESMjitKp095IeS3ZG/mPORez3LjGRVk3AfltGlree1cLcRhexqXiQNVTIf8wKiCavDMI76/n89TJHoWbi91XeUQjx6hAcPDSntNoTmf7OFMSiNyKS+4GZFmy91OqN/7tCw4dv4HCJoe3AJfygBCd9VORqJRxkl8rs7E6I5X1om4KyDCev20njbB2SgsufZN0PmFx4ZdvzjWr7chuBL86VL5gjaYwihHC+W3aWHHTyb4wSjfL7lH1d9YGqbO9zIW7dn687d99yk6Kf48C3nMa2y34I9gurEAWa3RLYP94L19JrIA03QOZHE5gdPqcSSRj7lTilkwmOmMnSMf1/3ZKRQ==
signature_date    : 2022-09-27T21:07:55.988378
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
# -*- coding: utf-8 -*-
from setuphelpers import *


""" 
"remove_newer": False,      ### Allow you to forget a specific incorrect version
"remove_newer": True,       ### Allow you to return on an older version

"""

packages_to_fix = [
    {
        "package": "tis-adobereader",
        "version": "2021.1.200150",
        "remove_newer": False,
    },
    # {
    #     "package": "tis-pdfcreator",
    #     "version": "3.2.0",
    #     "remove_newer": True,
    # },
]


def install():
    package_prefix = control.package.split("-", 1)[0]
    for pkg_fix in packages_to_fix:
        pkg_name = pkg_fix["package"]
        if pkg_name.startswith("tis-"):
            pkg_name = package_prefix.replace("tis-", package_prefix + "-")
        read_package = WAPT.is_installed(pkg_name)
        to_fix = False
        if read_package:
            if pkg_fix["remove_newer"]:
                if Version(read_package.get_software_version()) > Version(pkg_fix["version"]):
                    to_fix = True
            else:
                if Version(read_package.get_software_version()) == Version(pkg_fix["version"]):
                    to_fix = True
            if to_fix:
                WAPT.forget_packages(pkg_fix["package"])
                WAPT.install(pkg_fix["package"])
fcb8977cf810919ad48bd346891d1c0a738e7dfa7d533ab7a2c27c4f554782f9 : setup.py
d642b35ce6441158dc071677fb958ad01830271d373c332d64e48dec67f80834 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
342a9cc71a7e9215f210c70af8ec078389739b81c7823f9748b9373b3b1a984c : WAPT/changelog.txt
53bc83f1926d49cde1e9ea5e8fced23bd88471782b4da3d97d2b62fd8a10ff11 : luti.json
f385188d5d2213f4abd4af6ba87e5acd07c4c5fbac0bcda3b730463a63248560 : WAPT/control
0.2.0-4

The package was ambigous in multiple aspect, it should now be clearer