tis-virtio

0.1.185-3
VirtIO Drivers
1293 downloads
Download

  Description 

  • package : tis-virtio
  • version : 0.1.185-3
  • architecture : x64
  • categories : Drivers
  • maintainer : WAPT Team,Jimmy PELÉ
  • description : VirtIO Drivers
  • locale :
  • target_os : windows
  • min_wapt_version : 1.5
  • sources :
  • installed_size :
  • impacted_process :
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Red Hat, Inc.
  • licence :
  • signature_date : 2020-06-17T14:25:03.072000

  Setup.py 

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

uninstallkey = []

# Declaring specific app values (TO CHANGE)
real_bin_name = 'virtio-win-gt-x64.msi'
bin_name_string = 'virtio-win-gt-x64-%s.msi'


def install():
    # Specific app values
    package_version = control.version.split('-')[0]
    bin_name = bin_name_string % package_version

    # Add "Red Hat, Inc." to Trusted Publishers
    with disable_file_system_redirection():
        run('"%s" -addstore TrustedPublisher "%s"' % (makepath(system32,'certutil.exe'),makepath(basedir,'redhat-drivers.cer')))

    # Installing the package
    install_msi_if_needed(bin_name)


def update_package():
    print('Download/Update package content from upstream binary sources')

    # Getting proxy informations from WAPT settings
    proxy = {}
    if platform.system()=='Windows' and isfile(makepath(user_local_appdata(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}

    # Specific app values
    url_dl = 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/%s' % real_bin_name

    # Downloading latest binaries
    if isfile(real_bin_name):
        remove_file(real_bin_name)
    if not isfile(real_bin_name):
        print('Downloading: ' + real_bin_name)
        wget(url_dl,real_bin_name,proxies=proxy)

        # Get version from file
        version = get_msi_properties(real_bin_name)['ProductVersion']
        os.rename(real_bin_name,bin_name_string % version)
		# Change version of the package
        pe = PackageEntry().load_control_from_wapt('.')
        pe.version = '%s-%s'%(version,int(pe.version.split('-',1)[1])+1)
        pe.save_control_to_wapt('.')
        print('Changing version to ' + pe.version + ' in WAPT\\control')
        print('Update package done. You can now build-upload your package')
    else:
        print('This package is already up-to-date')    


										

  Changelog 



No changelog.txt.
									
  manifest.sha256