Page 1 of 1

downgrad Thunderbird

Published: May 3, 2017 - 10:55 AM
by Dylan
Hello,

We've been using WAPT for a while now. I recently updated our computer fleet with the latest version of Thunderbird (version 52). Unfortunately, during this update, I didn't notice a problem with a SOGO connector.
I'm looking for a way to revert the workstations to Thunderbird 45 without losing profiles.
Is this possible with WAPT?

Thanks in advance.

Dylan

Re: Downgrading Thunderbird

Published: May 3, 2017 - 12:24
by agauvrit
It is possible to create a package that uninstalls all versions of Thunderbird (keeping profiles) and reinstalls the desired version.

In order:
  • - Remove Thunderbird version 52 from the repository
    - Create a package that uninstalls Thunderbird 52
    - Install Thunderbird 45
However, it is necessary to qualify this package on a workstation in order to verify the profiles; it is possible that things have been modified between versions 45 and 52

Sincerely,

Alexander

Re: Downgrading Thunderbird

Published: May 7, 2017 - 8:09 PM
by sfonteneau
First, remove version 52.1.0 from your repository, then create a Wapt fix package:

tis-fixupwapt

Code: Select all


def install():
    prefixpkg = control.package.split('-',1)[0]
    thunderbird = WAPT.is_installed('%s-thunderbird'% prefixpkg)
    if reader and Version(thunderbird.version) == Version('52.1.0-67'):
        WAPT.remove(thunderbird.package)
        WAPT.install('%s-thunderbird'% prefixpkg)


This package can be kept because it allows you to send Wapt configurations later

Re: Downgrading Thunderbird

Published: May 9, 2017 - 9:50 AM
by Dylan
Hello and thank you for the reply.

I'll test it right away.

Dylan

Re: Downgrading Thunderbird

Published: May 9, 2017 - 10:10 AM
by Dylan
Okay, I just tested it but I'm getting an error, here are the logs:

2017-05-09 10:02:23,572 CRITICAL Package sitic-fixupwapt (=17-17) not installed due to errors: NameError: global name 'reader' is not defined
2017-05-09 10:02:23,575 CRITICAL Exception: Error during install of sitic-fixupwapt (=17-17): errors in packages [[u'sitic-fixupwapt (=17-17)', PackageEntry('sitic-fixupwapt','17-17')]]

For your information, here's what I put in my fixup:

Code: Select all

def install():
    prefixpkg = control.package.split('-',1)[0]
    thunderbird = WAPT.is_installed('%s-thunderbird'% prefixpkg)
    if reader and Version(thunderbird.version) == Version('52.0-5'):
        WAPT.remove(thunderbird.package)
        WAPT.install('%s-thunderbird'% prefixpkg)

Re: Downgrading Thunderbird

Published: May 9, 2017 - 10:14 AM
by sfonteneau
Oops

Code: Select all

def install():
    prefixpkg = control.package.split('-',1)[0]
    thunderbird = WAPT.is_installed('%s-thunderbird'% prefixpkg)
    if thunderbird and Version(thunderbird.version) == Version('52.1.0-67'):
        WAPT.remove(thunderbird.package)
        WAPT.install('%s-thunderbird'% prefixpkg)
  

Re: Downgrading Thunderbird

Published: May 9, 2017 - 10:39
by Dylan
Thanks Simon, it works perfectly. Silly :D

question, but can I use this kind of code to remove older Java versions, for example, when upgrading from 8.121 to 8.131 :?:

? Dylan

Re: Downgrading Thunderbird

Published: May 9, 2017 - 11:49
by sfonteneau
Yes, you just need to adapt the code. ;)

It's also possible to integrate the uninstallation of older Java versions directly into the Java package.

- Simon

Re: Downgrading Thunderbird

Published: May 9, 2017 - 1:53 PM
by Dylan
Okay, I can confirm it works well. However, I have a problem with the Lightning component, which is now in a higher version and not supported by Thunderbird 45

I've run some tests and apparently simply deleting the following directory is enough:
C:\Program Files (x86)\Mozilla Thunderbird\distribution\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}

So, a question: is it possible to add a line of code that, after uninstalling Thunderbird 52, would delete the directory before reinstalling Thunderbird 45?

Something like:

Code: Select all

def install():
    prefixpkg = control.package.split('-',1)[0]
    thunderbird = WAPT.is_installed('%s-thunderbird'% prefixpkg)
    if thunderbird and Version(thunderbird.version) == Version('52.0-5'):
        WAPT.remove(thunderbird.package)
        shutil.rmtree('C:\Program Files (x86)\Mozilla Thunderbird\distribution\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}')
WAPT.install('%s-thunderbird'% prefixpkg)