[Wapt] Firefox installation with ini file

MBP Oświęcim - Informatyk informatyk at mbp-oswiecim.pl
Tue May 17 20:08:39 CEST 2016


Hi,

I tried to fork tis-firefox-esr and modify setup.py.
I added install.ini file to sources (alongside .exe and other files).
Content of install.ini file is as below:
| [Install]
| InstallDirectoryName=Firefox
| QuickLaunchShortcut=true
| DesktopShortcut=true
| StartMenuShortcuts=true
| MaintenanceService=false

According to mozilla doc[1], usage should be easy as:
| Firefox_installer.exe /INI=install.ini

So I modified setup.py with following content:
|install_exe_if_needed(exe,silentflags='/INI=install.ini',key=ukey,min_version=version,killbefore='firefox.exe')

Second parameter is passed as silentflags and it should do it's job. But 
when I try to deploy such package, installation fails with timeout.

Main part of install function:
|version = control.version.split('-',1)[0]
|ukey = 'Mozilla Firefox %s ESR (x86 pl)'%version
|exe = 'Firefox Setup %sesr.exe'%version
|install_ini = os.path.abspath('install.ini')
|install_exe_if_needed(exe,silentflags='/INI'+install_ini,key=ukey,min_version=version,killbefore='firefox.exe',timeout=30)

And log output looks like[2]:
2016-05-17 20:05:01,052 INFO Status : Downloading mbp-firefox-esr : 
http://wapt.mbp/wapt/mbp-firefox-esr_45.1.1-31_all.wapt : 44515008 / 
44515008 (100%) (11336 KB/s)

2016-05-17 20:05:01,052 INFO Status :
2016-05-17 20:05:01,062 INFO Package issued by C=PL, 
L=O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, O=MBP 
O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, OU=wapt-get, 
CN=wapt.mbp/emailAddress=informatyk at mbp-oswiecim.pl
2016-05-17 20:05:01,062 INFO Register start of install C:\Program 
Files\wapt\cache\mbp-firefox-esr_45.1.1-31_all.wapt as user SYSTEM to 
local DB with params {}
2016-05-17 20:05:01,062 INFO Interactive user:SYSTEM, usergroups None
2016-05-17 20:05:01,163 INFO Status : Installing package mbp-firefox-esr 
version 45.1.1-31 ...
2016-05-17 20:05:01,173 INFO Installing package C:\Program 
Files\wapt\cache\mbp-firefox-esr_45.1.1-31_all.wapt
2016-05-17 20:05:01,173 INFO   unzipping C:\Program 
Files\wapt\cache\mbp-firefox-esr_45.1.1-31_all.wapt to temporary 
c:\windows\temp\wapttdmtol
2016-05-17 20:05:01,344 INFO Package issued by C=PL, 
L=O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, O=MBP 
O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, OU=wapt-get, 
CN=wapt.mbp/emailAddress=informatyk at mbp-oswiecim.pl
2016-05-17 20:05:01,444 INFO   sourcing install file 
c:\windows\temp\wapttdmtol\setup.py
2016-05-17 20:05:01,444 INFO Install parameters : {}
2016-05-17 20:05:01,453 INFO   executing install script
2016-05-17 20:05:01,453 INFO Run "(u'"Firefox Setup 45.1.1esr.exe" 
/INI="c:\\windows\\temp\\wapttdmtol\\install.ini"',)"
2016-05-17 20:05:07,072 INFO 192.168.0.191 - "GET 
/tasks.json?uuid=BACCF0D7-CBD5-324D-84C4-8D9C0014E82D HTTP/1.1" - 200 113866
2016-05-17 20:05:07,272 INFO (u'"Firefox Setup 45.1.1esr.exe" 
/INI="c:\\windows\\temp\\wapttdmtol\\install.ini"',) command returns code 0
Mozilla Firefox 45.1.1 ESR (x86 pl)
2016-05-17 20:05:07,282 CRITICAL Fatal error in install script: 
EWaptSetupException: Fatal error : Setup Firefox Setup 45.1.1esr.exe has 
been ran but the uninstall key Mozilla Firefox 45.1.1 ESR (x86 pl) can 
not be found:
Traceback (most recent call last):
   File "C:\Program Files\wapt\common.py", line 3178, in install_wapt
     exitstatus = setup.install()
   File "c:\windows\temp\wapttdmtol\setup.py", line 84, in install
 
install_exe_if_needed(exe,silentflags='/INI='+'"'+install_ini+'"',key=ukey,min_version=version,killbefore='firefox.exe')
   File "c:\windows\temp\wapttdmtol\setup.py", line 68, in 
install_exe_if_needed
     error('Setup %s has been ran but the uninstall key %s can not be 
found' % (exe,key))
   File "C:\Program Files\wapt\setuphelpers.py", line 3437, in error
     raise EWaptSetupException(u'Fatal error : %s' % reason)
EWaptSetupException: Fatal error : Setup Firefox Setup 45.1.1esr.exe has 
been ran but the uninstall key Mozilla Firefox 45.1.1 ESR (x86 pl) can 
not be found

2016-05-17 20:05:07,441 INFO Status :
2016-05-17 20:05:07,441 CRITICAL Package mbp-firefox-esr (=45.1.1-31) 
not installed due to errors : EWaptSetupException: Fatal error : Setup 
Firefox Setup 45.1.1esr.exe has been ran but the uninstall key Mozilla 
Firefox 45.1.1 ESR (x86 pl) can not be found
2016-05-17 20:05:07,441 CRITICAL Exception: Error during install of 
mbp-firefox-esr (=45.1.1-31): errors in packages mbp-firefox-esr
2016-05-17 20:05:07,453 INFO Status : Done: Update packages installed on 
host

Any ideas what I'm doing wrong?

[1] - https://wiki.mozilla.org/Installer:Command_Line_Arguments
[2] - http://wklej.org/hash/2e439fdd419/
-- 
Pozdrowienia,
Mariusz Fik

==============================
Miejska Biblioteka Publiczna
im. Ł. Górnickiego
GALERIA KSIĄŻKI
w Oświęcimiu
32-600 Oświęcim, ul. Nojego 2B
Tel.: (33) 84-798-09; (33) 843-01-65 wew. 111
e-mail: informatyk at mbp-oswiecim.pl
http://www.mbp-oswiecim.pl


More information about the WAPT mailing list