[RESOLVED] Adding dependency (package) is not taken into account

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Answer
yann83
Messages: 40
Registration: Apr 22, 2021 - 07:54

May 21, 2024 - 08:28

Good morning

This is a WAPT Enterprise 2.5.4 server, version 15342
On a CentOS 7 server with Windows 10 22H2 clients

Big problem this morning with a major package that we were supposed to install today.
This package was installed on a few machines, but not on all of them.
I didn't see anything conclusive in the server or workstation logs.

The package was supposed to be installed today, but I prepared it last Friday, so I opted to put
Force installation before: 2024/05/20 07:00:00
Moreover, this typo problem is very frustrating since you told me it should read "force installation" after[/b] the"

Here is the code

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables
# are not persistent between calls
import collections
import os


def count_lines(filename, maxlines=10):
    with open(filename, 'r') as file:
        lines = file.readlines()
    ilines = len(lines)
    if 0 < ilines < maxlines:
        return ilines
    elif ilines > maxlines:
        return maxlines
    else:
        return 0


def read_last_n_lines(filename, n=10):
    with open(filename, 'r') as file:
        lines = collections.deque(file, n)
    return list(lines)


# -------- A modifier --------
Nom_du_programme = 'Proweb'
setup_exe = 'Setup_XXXXX_02.02.00.exe'
version = '02.02.00'
exe_a_tuer = 'XXXXX.exe'
chemin_exe_deinstall = 'C:\\APP\\XXXXX\\unins000.exe'
cle_registre = '{8FB44C2D-8A13-4529-8544-54BFF7D76D9A}_is1'
log_installation = 'C:\\LOG\\WAPT_Install_' + Nom_du_programme + '.log'
log_desinstallation = 'C:\\LOG\\WAPT_Uninstall_' + Nom_du_programme + '.log'
parametres_installation = '/SP- /VERYSILENT /SUPPRESSMSGBOXES /LOG=' + log_installation
parametres_desinstallation = '/VERYSILENT /SUPPRESSMSGBOXES /LOG=' + log_desinstallation
fichier_verification ='C:\\APP\\XXXXX\\XXXXX.exe'

def install():
    # Declaring local variables

    # Proweb est il déjà installé ?
    if os.path.exists(fichier_verification):

        # Installing the software
        print("Installing: " + Nom_du_programme)
        install_exe_if_needed(setup_exe,
                              silentflags=parametres_installation,
                              key=cle_registre,
                              min_version=version,
                              killbefore=[exe_a_tuer]
                              )

        if os.path.exists(log_installation):
            nbLines = count_lines(log_installation)
            if nbLines > 0:
                for line in read_last_n_lines(log_installation, 25):
                    print(line.strip())
        else:
            print('pas de log ici : ' + log_installation)
    else:
        print('logiciel ' + Nom_du_programme + ' non présent pas de mise à jour.')
        exit(1)


def uninstall():
    run(r'"' + chemin_exe_deinstall + '" ' + parametres_desinstallation)

    if os.path.exists(log_desinstallation):
        nbLines = count_lines(log_desinstallation)
        if nbLines > 0:
            for line in read_last_n_lines(log_desinstallation, nbLines):
                print(line.strip())
    else:
        print('pas de log ici : ' + log_desinstallation)
So I logged onto that particular computer.
What immediately struck me was that in the section General It was empty (it appeared much later)
I tried restarting the service and performing an audit, but without success
I modified the package to remove the "force the installation before the"

I launched the following command line:
wapt-get install 118301-XXXXX-2.2.0

The program installed successfully.

I then tried it differently on another computer.
I removed the package, then clicked "Save and apply," then reinstalled the package and clicked "Save and apply."
So it's an old package (Firefox) that's showing as NEED INSTALL.
After installing the latter, my package of the day 118301-XXXXX-2.2.0 then appeared and went into NEED INSTALL.
I had to do that on a few positions.

This is a pretty catastrophic situation, so I'm really counting on you to help me, please.

If needed, I have the logs and videos that I can send you privately.
yann83
Messages: 40
Registration: Apr 22, 2021 - 07:54

May 23, 2024 - 07:14

Technical support helped me:

It was a problem with the increment between the version numbers of the machine packages.
During the migration, the machine packages must not have been carried over, causing the version numbers to reset to 0.
Since the new versions of the machine packages were no longer higher than the installed version, the workstations were not installing the new dependencies.
Answer