Skip to main content
  1. My Blog posts/

Odd LMDE upgrade tool bug

·189 words·1 min·
tech linux linux-mint floss
Víctor (Bit-Man) Rodríguez
Author
Víctor (Bit-Man) Rodríguez
Algorithm Junkie, Data Structures lover, Open Source enthusiast

February 5, 2024 update: new simplest solution

Upgrading to LMDE 6 found a bug. Dunno how to reproduce it but here it goes

At some point after backup with timeshift the next error popped :

Setting up sticky (1.19) ...
File "/usr/lib/sticky/sticky.py", line 765
match method_name:
      ^
SyntaxError: invalid syntax

Source code for sticky.py follows:

764>     def dbus_method_callback(self, connection, sender, path, iface_name, method_name, params, invocation, user_data=None):
765>         match method_name:
766>
767>             case "ShowNotes":
768>                 self.activate_notes(0)
769>
770>             case "NewNote":
771>                 x, y = self.find_note_location(40, 40)
772>
773>                 self.add_note({'text': params.unpack()[0], 'x': x, 'y': y})
774>
775>             case "NewNoteBlank":
776>                 self.new_note()
777>

No syntax error, what happened?

Seems that upgrade tool uses Python 3.9 or lower and is what causes this error is that match/case was no implemented up to Python 3.10

Workaround: Just commented the method and because the upgrade tool didn´t used it the upgrade ended flawlessly

Thanks to jmh79 for a simpler solution : remove sticky package before running mintupgrade. Seems that LMDE 5 uses Python 3.9 and before upgrade to LMDE 6 with Python 3.11 tries to run sticky and fails 😕

Here goes the reported bug