Milliways
Posts: 426
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Why did update suggest removing Thonny

Thu Aug 15, 2019 7:10 am

I just ran update on my Pi4 which suggested 'sudo apt autoremove' - which I did without thinking.

This removed Thonny from the Programming Menu.

I don't actually use Thonny but why was removal suggested?

I was more confused by the following:-

Code: Select all

Installed systemd unit for VNC Server in Service Mode daemon
Start or stop the service with:
  systemctl (start|stop) vncserver-x11-serviced.service
Mark or unmark the service to be started at boot time with:
  systemctl (enable|disable) vncserver-x11-serviced.service

Installed systemd unit for VNC Server in Virtual Mode daemon
Start or stop the service with:
  systemctl (start|stop) vncserver-virtuald.service
Mark or unmark the service to be started at boot time with:
  systemctl (enable|disable) vncserver-virtuald.service
My VNC seems to be working as normal - is there any explanation for change?

Heater
Posts: 12974
Joined: Tue Jul 17, 2012 3:02 pm

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 8:15 am

apt is all about dependencies. If package A is required by package B (say A is a library that B uses or some such relationship) then when you install package B then package A will also be installed automatically. When you uninstall B apt notices that A is no longer used and will suggest autoremove to remove it.

Presumably nothing in your system claims to need Thonny so it suggests autoremove.

The VNC thing is just saying that VNC is started and stopped by systemd on boot up and shutdoen respectively. I guess it was not done by systemd previously. It's only telling you how you can enable and disable vnc if you like. If it's working no need to do anything.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 375
Joined: Fri Dec 26, 2014 11:02 am

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 8:27 am

The new version of Thonny (3.2) which has just been released has been moved to a new package. Previously, thonny was in the package "python3-thonny", and it is now in a package called "thonny", which is in line with how it is packaged in vanilla Debian.

In order to enable people who have the old version installed to get the update, we use what is called a transitional package. So the new package, "thonny", contains Thonny itself, and the new version of the "python3-thonny" package is a dummy package which includes "thonny" as a dependency but doesn't include the Thonny app itself.

So what should happen is that if you had "python3-thonny" installed before, and you do a dist-upgrade, that package will update to the newest version and it will install the "thonny" package. If you then do an autoremove, it should remove the "python3-thonny" package but leave the "thonny" package installed.

That's how it *ought* to work, and indeed how it did work just now when I tested on a clean image here. So I'm a bit worried that it behaved differently on yours - I can't think why it would...

Milliways
Posts: 426
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 8:28 am

Heater wrote:
Thu Aug 15, 2019 8:15 am
apt is all about dependencies. If package A is required by package B (say A is a library that B uses or some such relationship) then when you install package B then package A will also be installed automatically. When you uninstall B apt notices that A is no longer used and will suggest autoremove to remove it.

Presumably nothing in your system claims to need Thonny so it suggests autoremove.
So why did it not the last few times (at least 6) I did an update.
Thonny is included in the downloaded Raspbian with Desktop image as a standard tool
Heater wrote:
Thu Aug 15, 2019 8:15 am
The VNC thing is just saying that VNC is started and stopped by systemd on boot up and shutdoen respectively. I guess it was not done by systemd previously. It's only telling you how you can enable and disable vnc if you like. If it's working no need to do anything.
vncserver-virtuald.service seems to be a new service; certainly this is not mentioned in the Foundation instructions Creating a virtual desktop

Milliways
Posts: 426
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 8:32 am

spl23 wrote:
Thu Aug 15, 2019 8:27 am
The new version of Thonny (3.2) which has just been released has been moved to a new package. Previously, thonny was in the package "python3-thonny", and it is now in a package called "thonny", which is in line with how it is packaged in vanilla Debian.

In order to enable people who have the old version installed to get the update, we use what is called a transitional package. So the new package, "thonny", contains Thonny itself, and the new version of the "python3-thonny" package is a dummy package which includes "thonny" as a dependency but doesn't include the Thonny app itself.

So what should happen is that if you had "python3-thonny" installed before, and you do a dist-upgrade, that package will update to the newest version and it will install the "thonny" package. If you then do an autoremove, it should remove the "python3-thonny" package but leave the "thonny" package installed.

That's how it *ought* to work, and indeed how it did work just now when I tested on a clean image here. So I'm a bit worried that it behaved differently on yours - I can't think why it would...
I am using Raspberry Pi reference 2019-06-20 regularly updated. I just did update not dist-upgrade.

The upgrade did say

Code: Select all

The following packages have been kept back:
  python3-thonny

fruitoftheloom
Posts: 20172
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 9:39 am

Milliways wrote:
Thu Aug 15, 2019 8:32 am
spl23 wrote:
Thu Aug 15, 2019 8:27 am
The new version of Thonny (3.2) which has just been released has been moved to a new package. Previously, thonny was in the package "python3-thonny", and it is now in a package called "thonny", which is in line with how it is packaged in vanilla Debian.

In order to enable people who have the old version installed to get the update, we use what is called a transitional package. So the new package, "thonny", contains Thonny itself, and the new version of the "python3-thonny" package is a dummy package which includes "thonny" as a dependency but doesn't include the Thonny app itself.

So what should happen is that if you had "python3-thonny" installed before, and you do a dist-upgrade, that package will update to the newest version and it will install the "thonny" package. If you then do an autoremove, it should remove the "python3-thonny" package but leave the "thonny" package installed.

That's how it *ought* to work, and indeed how it did work just now when I tested on a clean image here. So I'm a bit worried that it behaved differently on yours - I can't think why it would...
I am using Raspberry Pi reference 2019-06-20 regularly updated. I just did update not dist-upgrade.

The upgrade did say

Code: Select all

The following packages have been kept back:
  python3-thonny


Try:

Code: Select all

sudo apt update
sudo apt full-upgrade
sudo reboot
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

hippy
Posts: 5607
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 2:28 pm

Milliways wrote:
Thu Aug 15, 2019 8:32 am
The upgrade did say

Code: Select all

The following packages have been kept back:
  python3-thonny
I saw the same. A "sudo apt-get dist-upgrade" has worked for me when "upgrade" reports things held back, and did here. I still have a thonny link in my desktop menu which works as expected.

I guessed the 'odd things' related to 'thonny' involved some sort of renaming or repackaging so just let it get on and do things, sort itself out, which it appears to have done.

User avatar
bensimmo
Posts: 4128
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 2:43 pm

I stopped my update when I saw a bunch in the auto-remove and the package being held back.
Is there an easier way to do this (and inform via the blog the change they need to do?)

I's quite alarming seeing it suddenly wanting to disappear.

in add/remove software, refresh list and I can see it as transitional software. When I tried yesterday there was no thonny-3.2.0.... package*, just a held back python3-thonny one. Seems to be better today and went well.


*I used plain apt then, but I'm now doing it via desktop menu.
Last edited by bensimmo on Thu Aug 15, 2019 2:52 pm, edited 2 times in total.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5789
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 2:47 pm

Could you post your /var/log/apt/history.log (particularly the chunks containing thonny)?

User avatar
bensimmo
Posts: 4128
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 2:52 pm

ShiftPlusOne wrote:
Thu Aug 15, 2019 2:47 pm
Could you post your /var/log/apt/history.log (particularly the chunks containing thonny)?
Me, see above, it seems to be fine today and work well.

Before that there was no upgrade actually happen, just it wanting to remove a load and holding part of it back. So I quit before anything else.
(with intention to leave it a day and com check on the forum just now)

Perhaps the desktop part just shows it nicer to me so I'm not alarmed, but it did show it wanting to install thonny as well as remove python3-thonny this time.


Ah, is it the difference that most normal people use 'upgrade' and not 'full-upgrade/dist-upgrade' with apt.
Could you test with people who rightly use just 'upgrade' and see if it removes it for you, or at least half removes it ?

hippy
Posts: 5607
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 3:12 pm

For me ...

I believe that was the usual "sudo apt-get update", "upgrade", saw something held back so did "dist-upgrade", saw autoremove suggested, so "autoremove".

That it was 'install thonny', 'upgrade python3-thonny', 'remove python3-thonny-pi' which made me think 'renaming'. The 'remove python3-thonny' after upgrading seemed odd but, ho hum. What 'python3-pyperclip' had been intrigued me most :)

Code: Select all

Start-Date: 2019-08-13  22:47:18
Commandline: apt-get upgrade
Requested-By: pi (1000)
Upgrade: libgs9:armhf (9.27~dfsg-2, 9.27~dfsg-2+deb10u1), rpi-chromium-mods:armhf (20190708, 20190812), libgs9-common:armhf (9.27~dfsg-2, 9.27~dfsg-2+deb10u1)
End-Date: 2019-08-13  22:47:30

Start-Date: 2019-08-13  22:59:10
Commandline: apt-get dist-upgrade
Requested-By: pi (1000)
Install: python3-send2trash:armhf (1.5.0-1, automatic), thonny:armhf (3.2.0-1+rpt1)
Upgrade: python3-thonny:armhf (3.1.0-1+rpt2, 3.2.0-1+rpt1)
Remove: python3-thonny-pi:armhf (1.2)
End-Date: 2019-08-13  22:59:18

Start-Date: 2019-08-13  22:59:37
Commandline: apt-get autoremove
Requested-By: pi (1000)
Remove: python3-thonny:armhf (3.2.0-1+rpt1), python3-pyperclip:armhf (1.6.4-1)
End-Date: 2019-08-13  22:59:39

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5789
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Why did update suggest removing Thonny

Thu Aug 15, 2019 3:45 pm

Found the cause and an update should come out later.

The new behaviour is that just using 'upgrade' will hold the package back without removing anything, but dist-upgrade will result in the old packages getting removed and the new thonny package being installed. The solution was to also add 'python3-thonny-pi' as a transitional package.

Milliways
Posts: 426
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Why did update suggest removing Thonny

Fri Aug 16, 2019 12:27 am

ShiftPlusOne wrote:
Thu Aug 15, 2019 2:47 pm
Could you post your /var/log/apt/history.log (particularly the chunks containing thonny)?
Not sure if this was directed at me or others.

Code: Select all

Start-Date: 2019-08-15  16:33:58
Commandline: apt upgrade
Requested-By: pi (1000)
Upgrade: libgs9:armhf (9.27~dfsg-2, 9.27~dfsg-2+deb10u1), realvnc-vnc-server:armhf (6.4.1.40826, 6.5.0.41730), rpi-chromium-mods:armhf (20190708, 20190812), libgs9-common:armhf (9.27~dfsg-2, 9.27~dfsg-2+deb10u1), tzdata:armhf (2019a-1, 2019b-0+deb10u1)
End-Date: 2019-08-15  16:34:40

Start-Date: 2019-08-15  16:56:13
Commandline: apt autoremove
Requested-By: pi (1000)
Remove: python3-roman:armhf (2.0.0-3), python3-jedi:armhf (0.13.2-1), python3-mypy-extensions:armhf (0.4.1-1), mypy:armhf (0.670-2), sgml-base:armhf (1.29), docutils-common:armhf (0.14+dfsg-4), python3-astroid:armhf (2.1.0-2), pylint3:armhf (2.2.2-1), libgnutls-openssl27:armhf (3.6.7-4), python3-lazy-object-proxy:armhf (1.3.1-1+b1), python3-thonny-pi:armhf (1.2), python3-parso:armhf (0.3.1-1), python3-thonny:armhf (3.1.0-1+rpt2), python3-wrapt:armhf (1.10.11-1+b1), rpi.gpio-common:armhf (0.6.5-1), python3-asttokens:armhf (1.1.13-2), xml-core:armhf (0.18+nmu1), python3-typed-ast:armhf (1.3.1-1), python3-docutils:armhf (0.14+dfsg-4), python3-isort:armhf (4.3.4+ds1-1.1), python3-mypy:armhf (0.670-2), python3-mccabe:armhf (0.6.1-2), python3-pyperclip:armhf (1.6.4-1), xsel:armhf (1.2.0+git9bfc13d.20180109-1), python3-pygments:armhf (2.3.1+dfsg-1), python3-logilab-common:armhf (1.4.2-1)
End-Date: 2019-08-15  16:56:37

User avatar
aivarannamaa
Posts: 14
Joined: Wed Dec 12, 2012 1:58 pm
Contact: Website Twitter

Re: Why did update suggest removing Thonny

Mon Aug 19, 2019 12:41 pm

Hi!

Thonny 3.2 does not depend on `python3-pyperclip` anymore. At the same time it has a new dependency: `python3-send2trash`.

Best regards,
Aivar

Return to “Raspbian”