[RESOLVED] Adding dependency (package) is not taken into account
Published: 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
Here is the code
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.
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
Moreover, this typo problem is very frustrating since you told me it should read "force installation" after[/b] the"Force installation before: 2024/05/20 07:00:00
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)
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.