1
Upgrade Warnings / Re: Python 3 upgrade forces removal of hplip & friends
« Last post by Teriarch on Today at 02:16:59 »Please,please check the script first on the live shine-on iso image before you proceed.
If something fails you can always restart and report the failure. Be sure to have sudo
configured for the current user and don't worry if the hplip packages will get removed in
the process, you will get them back in a blink of an eye even before the script ends.
Have fun!
If something fails you can always restart and report the failure. Be sure to have sudo
configured for the current user and don't worry if the hplip packages will get removed in
the process, you will get them back in a blink of an eye even before the script ends.
Have fun!
Code: [Select]
#!/usr/bin/bash
pushd .
sudo apt-get update
mkdir /tmp/hplip
mkdir /tmp/hptmp
cd /tmp/hplip
sudo apt-get install python3 python3.12
apt-get download python3
dpkg-deb -x /tmp/hplip/python3_3.13.1-2_amd64.deb /tmp/hptmp
dpkg-deb --control python3_3.13.1-2_amd64.deb /tmp/hptmp/DEBIAN
sed -i -e 's/python3-profiler/python3 (= 3.12), python3-profiler/g' /tmp/hptmp/DEBIAN/control
sed -i -e 's/Version: 3.13.1-2/Version: 3.13.1-2b/g' /tmp/hptmp/DEBIAN/control
dpkg-deb --root-owner-group -b /tmp/hptmp /tmp/hplip/python3_3.13.1-2b_amd64.deb
rm /tmp/hplip/python3_3.13.1-2_amd64.deb
sudo dpkg -i /tmp/hplip/*.deb
cd /tmp
rm -rf /tmp/hptmp /tmp/hplip
sudo apt-get install hplip hplip-data hplip-gui
grep -r '#!/usr/bin/python3' /usr/share/hplip /usr/lib/cups/backend 2>/dev/null|sed -e 's/:#!\/usr\/bin\/python3//g'|xargs -n1 sudo sed -i -e 's/\#\!\/usr\/bin\/python3/\#\!\/usr\/bin\/python3.12/g'
# grep -r '#!/usr/bin/python3' /usr/share/hplip /usr/lib/cups/backend 2>/dev/null|sed -e 's/:#!\/usr\/bin\/python3.12//g'|xargs -n1 sudo sed -i -e 's/\#\!\/usr\/bin\/python3.12/\#\!\/usr\/bin\/python3/g'
/usr/bin/hp-systray -x&
popd