Bonjour,
La fonction update_package du paquet tis-virtviewer n'est pas correct. Elle ne récupère pas la dernière version. Serait-il possible à l'équipe tis de mettre à jour le paquet ?
La fonction actuelle : def update_package():
proxies = {} if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')): proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy') if proxywapt : proxies = {'http':proxywapt,'https':proxywapt}
filemsi = wgets('https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies).split(%...'
for msi in glob.glob('*.msi'): if msi != filemsi: remove_file(msi)
if not isfile(filemsi): wget('https://releases.pagure.org/virt-viewer/' + filemsi,filemsi,proxies=proxies) else: print('Already up to date, skipped')
version = get_msi_properties(filemsi)['ProductVersion']
pe = PackageEntry() pe.load_control_from_wapt(os.getcwd())
pe.version = version + '-0' pe.save_control_to_wapt(os.getcwd())
if __name__ == '__main__': update_package()
Pour ceux que cela peut intéresser, voici une proposition fonctionnelle. def update_package():
proxies = {} if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')): proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy') if proxywapt : proxies = {'http':proxywapt,'https':proxywapt} try: import bs4 as BeautifulSoup except: import BeautifulSoup import requests import re
page = requests.get('https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies,headers=... (Windows NT 6.1; Win64; x64)'}).text bs = BeautifulSoup.BeautifulSoup(page, "html.parser") reg = "virt-viewer-x64.*.msi$" link = bs.find(href=re.compile(reg, re.IGNORECASE)) filemsi = link.get('href')
for msi in glob.glob('*.msi'): if msi != filemsi: remove_file(msi)
if not isfile(filemsi): wget('https://releases.pagure.org/virt-viewer/' +filemsi,filemsi,proxies=proxies) else: print('Already up to date, skipped')
version = get_msi_properties(filemsi)['ProductVersion']
pe = PackageEntry() pe.load_control_from_wapt(os.getcwd())
pe.version = version + '-0' pe.save_control_to_wapt(os.getcwd())
if __name__ == '__main__': update_package()
Bon confinement,
Frédéric GARESCHÉ Équipe Assistance et Exploitation Direction du Système d'Information (D.S.I) Correspondant Département EII et laboratoire IETR Tél. : +33 (0)2 23 2 3 82 81 20 avenue des Buttes de Coësmes CS 70839 - 35 708 RENNES Cedex 7
Fait ;)
https://wapt.tranquil.it/store/details-tis-virtviewer_8.0.256-1_x64_a8c05301...
Simon
Le 02/04/2020 à 11:22, Frederic Garesche a écrit :
Bonjour,
La fonction update_package du paquet tis-virtviewer n'est pas correct. Elle ne récupère pas la dernière version. Serait-il possible à l'équipe tis de mettre à jour le paquet ?
La fonction actuelle : /def update_package():/
/ proxies = {}/ / if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):/ / proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')/ / if proxywapt :/ / proxies = {'http':proxywapt,'https':proxywapt}/
/ filemsi = wgets('https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies).split(%...
/ for msi in glob.glob('*.msi'):/ / if msi != filemsi:/ / remove_file(msi)/
/ if not isfile(filemsi):/ / wget('https://releases.pagure.org/virt-viewer/' + filemsi,filemsi,proxies=proxies)/ / else:/ / print('Already up to date, skipped')/
/ version = get_msi_properties(filemsi)['ProductVersion']/
/ pe = PackageEntry()/ / pe.load_control_from_wapt(os.getcwd())/
/ pe.version = version + '-0'/ / pe.save_control_to_wapt(os.getcwd())/
/if __name__ == '__main__':/ / update_package()/
Pour ceux que cela peut intéresser, voici une proposition fonctionnelle. /def update_package():/
/ proxies = {}/ / if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):/ / proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')/ / if proxywapt :/ / proxies = {'http':proxywapt,'https':proxywapt}/ / try:/ / import bs4 as BeautifulSoup/ / except:/ / import BeautifulSoup/ / import requests/ / import re/
/ page = requests.get('https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies,headers=... (Windows NT 6.1; Win64; x64)'}).text/ / bs = BeautifulSoup.BeautifulSoup(page, "html.parser")/ / reg = "virt-viewer-x64.*.msi$"/ / link = bs.find(href=re.compile(reg, re.IGNORECASE))/ / filemsi = link.get('href')/
/ for msi in glob.glob('*.msi'):/ / if msi != filemsi:/ / remove_file(msi)/
/ if not isfile(filemsi):/ / wget('https://releases.pagure.org/virt-viewer/' +filemsi,filemsi,proxies=proxies)/ / else:/ / print('Already up to date, skipped')/
/ version = get_msi_properties(filemsi)['ProductVersion']/
/ pe = PackageEntry()/ / pe.load_control_from_wapt(os.getcwd())/
/ pe.version = version + '-0'/ / pe.save_control_to_wapt(os.getcwd())/
/if __name__ == '__main__':/ / update_package()/
Bon confinement,
*Frédéric GARESCHÉ
*Équipe Assistance et Exploitation
*Direction du Système d'Information (D.S.I)* *Correspondant Département EII et laboratoire IETR *Tél. : +33 (0)2 23 2*3 82 81* 20 avenue des Buttes de Coësmes CS 70839 - 35 708 RENNES Cedex 7
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
Super rapide !
Merci et bonne soirée,
Frédéric GARESCHÉ Équipe Assistance et Exploitation Direction du Système d'Information (D.S.I) Correspondant Département EII et laboratoire IETR Tél. : +33 (0)2 23 2 3 82 81 20 avenue des Buttes de Coësmes CS 70839 - 35 708 RENNES Cedex 7
[ https://www.insa-rennes.fr/ ]
De: "Simon Fonteneau" sfonteneau@tranquil.it À: "wapt" wapt@lists.tranquil.it Envoyé: Jeudi 2 Avril 2020 13:02:41 Objet: Re: [Wapt] Paquet
Fait ;)
[ https://wapt.tranquil.it/store/details-tis-virtviewer_8.0.256-1_x64_a8c05301... | https://wapt.tranquil.it/store/details-tis-virtviewer_8.0.256-1_x64_a8c05301... ]
Simon Le 02/04/2020 à 11:22, Frederic Garesche a écrit :
Bonjour,
La fonction update_package du paquet tis-virtviewer n'est pas correct. Elle ne récupère pas la dernière version. Serait-il possible à l'équipe tis de mettre à jour le paquet ?
La fonction actuelle : def update_package():
proxies = {} if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')): proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy') if proxywapt : proxies = {'http':proxywapt,'https':proxywapt}
filemsi = wgets(' [ https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies | https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies ] ).split('.msi')[-2].split('>')[1]+'.msi'
for msi in glob.glob('*.msi'): if msi != filemsi: remove_file(msi)
if not isfile(filemsi): wget(' [ https://releases.pagure.org/virt-viewer/ | https://releases.pagure.org/virt-viewer/ ] ' + filemsi,filemsi,proxies=proxies) else: print('Already up to date, skipped')
version = get_msi_properties(filemsi)['ProductVersion']
pe = PackageEntry() pe.load_control_from_wapt(os.getcwd())
pe.version = version + '-0' pe.save_control_to_wapt(os.getcwd())
if __name__ == '__main__': update_package()
Pour ceux que cela peut intéresser, voici une proposition fonctionnelle. def update_package():
proxies = {} if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')): proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy') if proxywapt : proxies = {'http':proxywapt,'https':proxywapt} try: import bs4 as BeautifulSoup except: import BeautifulSoup import requests import re
page = requests.get(' [ https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies,headers= | https://releases.pagure.org/virt-viewer/?C=M;O=D%27,proxies=proxies,headers= ] {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}).text bs = BeautifulSoup.BeautifulSoup(page, "html.parser") reg = "virt-viewer-x64.*.msi$" link = bs.find(href=re.compile(reg, re.IGNORECASE)) filemsi = link.get('href')
for msi in glob.glob('*.msi'): if msi != filemsi: remove_file(msi)
if not isfile(filemsi): wget(' [ https://releases.pagure.org/virt-viewer/ | https://releases.pagure.org/virt-viewer/ ] ' +filemsi,filemsi,proxies=proxies) else: print('Already up to date, skipped')
version = get_msi_properties(filemsi)['ProductVersion']
pe = PackageEntry() pe.load_control_from_wapt(os.getcwd())
pe.version = version + '-0' pe.save_control_to_wapt(os.getcwd())
if __name__ == '__main__': update_package()
Bon confinement,
Frédéric GARESCHÉ Équipe Assistance et Exploitation Direction du Système d'Information (D.S.I) Correspondant Département EII et laboratoire IETR Tél. : +33 (0)2 23 2 3 82 81 20 avenue des Buttes de Coësmes CS 70839 - 35 708 RENNES Cedex 7
[ https://www.insa-rennes.fr/ ]
_______________________________________________ WAPT mailing list [ mailto:WAPT@lists.tranquil.it | WAPT@lists.tranquil.it ] [ http://lists.tranquil.it/listinfo/wapt | http://lists.tranquil.it/listinfo/wapt ]
_______________________________________________ WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt