Bug opsi-winst 4.12.3.1 (testing)

Antworten
thomas.besser
Beiträge: 455
Registriert: 09 Sep 2009, 09:40

Bug opsi-winst 4.12.3.1 (testing)

Beitrag von thomas.besser »

Hallo,

bin in opsi-winst 4.12.3.1 aus "testing" über einen Bug bzgl. Konstanten in Sub-Aufrufen gestolpert. In nachfolgendem Mini-Skript wird %CommonProgramsDir% innerhalb von delsub.opsiscript falsch aufgelöst. Konkret werden die Backslashes maskiert.

setup.opsiscript

Code: Alles auswählen

[Actions]
DefVar $Constant$
Sub "%ScriptPath%\delsub.opsiscript"
Set $Constant$ = "%CommonProgramsDir%"
delsub.opsiscript

Code: Alles auswählen

Set $Constant$ = "%CommonProgramsDir%"
Auszüge aus Logfile mit opsi-winst 4.12.3.1 (aus testing):

Code: Alles auswählen

[1] [Jan 23 08:09:16:082] [test_constant-bug] ============ Version 4.12.3.1 script "p:\test_constant-bug\setup.opsiscript"
[...]
[7] [Jan 23 08:09:16:259] [test_constant-bug] Loaded sub from: p:\test_constant-bug\delsub.opsiscript with encoding: cp1252
[6] [Jan 23 08:09:16:259] [test_constant-bug] 
[6] [Jan 23 08:09:16:260] [test_constant-bug] ~~~~~~~ Start Sub ~~~~~~~  Sub "p:\test_constant-bug\delsub.opsiscript"
[7] [Jan 23 08:09:16:260] [test_constant-bug] Switch window state to: bwmMaximized
[6] [Jan 23 08:09:16:261] [test_constant-bug] Set  $Constant$ = "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs"
[6] [Jan 23 08:09:16:261] [test_constant-bug]   The value of the variable "$Constant$" is now: "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs"
[6] [Jan 23 08:09:16:261] [test_constant-bug] 
[6] [Jan 23 08:09:16:261] [test_constant-bug] ~~~~~~~ End Sub   ~~~~~~~  Sub "p:\test_constant-bug\delsub.opsiscript"
[6] [Jan 23 08:09:16:261] [test_constant-bug] 
[6] [Jan 23 08:09:16:261] [test_constant-bug] Set  $Constant$ = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
[6] [Jan 23 08:09:16:262] [test_constant-bug]   The value of the variable "$Constant$" is now: "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
Mit opsi-winst 4.12.1.5 (aus stable) ist alles wie es sein soll:

Code: Alles auswählen

[1] [Jan 23 07:59:29:586] [test_constant-bug] ============ Version 4.12.1.5 script "p:\test_constant-bug\setup.opsiscript"
[...]
[7] [Jan 23 07:59:29:758] [test_constant-bug] Loaded sub from: p:\test_constant-bug\delsub.opsiscript with encoding: cp1252
[6] [Jan 23 07:59:29:758] [test_constant-bug] 
[6] [Jan 23 07:59:29:758] [test_constant-bug] ~~~~~~~ Start Sub ~~~~~~~  Sub "p:\test_constant-bug\delsub.opsiscript"
[6] [Jan 23 07:59:29:759] [test_constant-bug] Set  $Constant$ = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
[6] [Jan 23 07:59:29:759] [test_constant-bug]   The value of the variable "$Constant$" is now: "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
[6] [Jan 23 07:59:29:759] [test_constant-bug] 
[6] [Jan 23 07:59:29:759] [test_constant-bug] ~~~~~~~ End Sub   ~~~~~~~  Sub "p:\test_constant-bug\delsub.opsiscript"
[6] [Jan 23 07:59:29:759] [test_constant-bug] 
[6] [Jan 23 07:59:29:760] [test_constant-bug] Set  $Constant$ = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
[6] [Jan 23 07:59:29:768] [test_constant-bug]   The value of the variable "$Constant$" is now: "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
Gruß
Thomas
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Bug opsi-winst 4.12.3.1 (testing)

Beitrag von d.oertel »

Hi Thomas,

danke für den Hinweis.
Yep - das ist ein Fehler, der bei der Behebung eines anderen Fehlers in 4.12.2.3 enstanden ist.

Hier ist der Fix:
https://download.uib.de/opsi4.1/experim ... 3.8-1.opsi
Hier ist der dazugehörige opsi-script-test:
https://download.uib.de/opsi4.1/experim ... 3.6-1.opsi

gruß
detlef oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
thomas.besser
Beiträge: 455
Registriert: 09 Sep 2009, 09:40

Re: Bug opsi-winst 4.12.3.1 (testing)

Beitrag von thomas.besser »

Hallo Detlef,
d.oertel hat geschrieben: Hier ist der Fix:
https://download.uib.de/opsi4.1/experim ... 3.8-1.opsi
Ist auf unserem OPSI-Test-Server eingespielt und ja das Paket, an dem ich drüber gestolpert bin, läuft erwartungsgemäß wieder durch. Schön, dass sich die Verwendung des "testing"-Zweiges mal gelohnt hat ;-)

Danke und Gruß
Thomas
Antworten