MATE version detection/get_wallpaper is broken with MATE >= 1.10

Bug #1673925 reported by James Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Variety
Fix Released
Medium
James Lu

Bug Description

Using Variety 0.6.0 / Ubuntu 16.04.

The problematic comparison is here: https://bazaar.launchpad.net/~peterlevi/variety/trunk/view/head:/data/scripts/get_wallpaper#L29

Version strings of "1.12.0", "1.10.0", etc. are not greater than "1.6.0" when doing string comparison, so newer versions of MATE cause Variety to fall back to mateconftool-2. This in turn makes get_wallpaper fail with a "command not found" error.

Some solutions would be to replace the simple string comparison with more in-depth version checking (though granted, there isn't an extremely clean way of doing this: https://stackoverflow.com/questions/4023830/), or to simply drop support for MATE versions < 1.6.

More specifically, I get errors like this in the console:
/home/james/.config/variety/scripts/get_wallpaper: line 32: mateconftool-2: command not found
ERROR: 2017-03-17 22:11:42,803: get_desktop_wallpaper() 'Exception when calling get_wallpaper script'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/variety/VarietyWindow.py", line 2301, in get_desktop_wallpaper
    output = subprocess.check_output(script).strip()
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '/home/james/.config/variety/scripts/get_wallpaper' returned non-zero exit status 127

James Lu (jlu5)
Changed in variety:
importance: Undecided → Medium
James Lu (jlu5)
Changed in variety:
status: Triaged → Fix Committed
James Lu (jlu5)
Changed in variety:
status: Fix Committed → Fix Released
milestone: none → 0.6.5
James Lu (jlu5)
Changed in variety:
assignee: nobody → James Lu (tacocat)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.