Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.86k stars 451 forks source link

V8.0.3 did not import the database or the dlcheckpoints files from V7.14 #8247

Closed Davem734 closed 1 week ago

Davem734 commented 2 weeks ago

I Installed V8.0.3 on Ubuntu 22.04. It did not import the database or the dlcheckpoints files from V7.14

qstokkink commented 2 weeks ago

You should be able to import your old downloads by going into the Settings / Versions tab and then clicking "IMPORT" on your old version.

screenshot

Davem734 commented 2 weeks ago

Thank you. Since the earlier versions did this automatically, it may make sense during install or during first time execution, to prompt the user to import from the previous install.

Davem734 commented 2 weeks ago

I tried to do the import and the import buttons are missing from the versions page. Only the remove buttons are showing.

qstokkink commented 2 weeks ago

The import button should only be visible if:

If either of these is not true, you will also not see the button. However, if you are upgrading from 7.14 and you do not have the .upgraded file, you have found a bug.

Davem734 commented 2 weeks ago

Maybe a bug. My previous version was 7.14 and no .upgraded file exists in ~/.Tribler/8.0/

If I copy a .conf file from ~/.Tribler/7.14/dlcheckpoints/ to ~/.Tribler/8.0/dlcheckpoints/ Tribler will recognize the file and resume.

qstokkink commented 2 weeks ago

Thanks for checking. That is indeed a bug then: your setup should work.


For debugging: the can_upgrade determines whether or not a version can be upgraded from. In this function FROM is "7.14" and TO is "8.0".

https://github.com/Tribler/tribler/blob/b8b2563898194b601ddc9d05f92da41a009e8168/src/tribler/core/versioning/manager.py#L86-L98

The logic here seems fine. There might be some intermediate step that is causing the result not to propagate correctly.

qstokkink commented 1 week ago

I can reproduce this with 8.0.3. I'll have a look.

EDIT: Looking at the code I posed before, I can spot the issue: get_current_version() returns the current release version not the current database version.