lah7 / gtk3-classic

Patches to bring back a traditional experience for GTK+3
Other
339 stars 24 forks source link

Errors when using ppa-purge to remove in Linux Mint #116

Closed ra50 closed 1 month ago

ra50 commented 1 month ago

I'm trying ppa-purge to remove gtk3-classic following instructions in readme. However when I run the command I receive a lot of errors. This is on Mint 21.3 Xfce.

Updating packages lists
PPA to be removed: lah7 gtk3-classic
Package revert list generated:
 gir1.2-gtk-3.0:amd64- gtk-update-icon-cache- libgail-3-0:amd64- libgtk-3-0:amd64- libgtk-3-bin- libgtk-3-common- libgtk-3-dev:amd64-

Disabling lah7 PPA from /etc/apt/sources.list.d/lah7-gtk3-classic-jammy.list
Updating packages lists
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mintsources : Depends: mint-common (>= 2) but it is not going to be installed
               Depends: gir1.2-gtk-3.0 but it is not going to be installed
               Depends: gir1.2-vte-2.91 but it is not going to be installed
               Depends: gir1.2-xapp-1.0 but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
The following packages will be REMOVED:  
  gir1.2-gtk-3.0 gtk-update-icon-cache icu-devtools{u} libatk-bridge2.0-dev{u} libatk1.0-dev{u} libatspi2.0-dev{u} libbrotli-dev{u} libcairo-script-interpreter2{u} libcairo2-dev{u} libdatrie-dev{u} libdbus-1-dev{u} libegl-dev{u} libegl1-mesa-dev{u} libepoxy-dev{u} libexpat1-dev{u} libfontconfig-dev{u} 
  libfontconfig1-dev{u} libfreetype-dev{u} libfreetype6-dev{u} libfribidi-dev{u} libgail-3-0 libgl-dev{u} libgles-dev{u} libgles1{u} libglvnd-core-dev{u} libglvnd-dev{u} libglx-dev{u} libgraphite2-dev{u} libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk-3-dev libharfbuzz-dev{u} libharfbuzz-gobject0{u} libice-dev{u} 
  libicu-dev{u} libopengl-dev{u} libpango1.0-dev{u} libpixman-1-dev{u} libpthread-stubs0-dev{u} libsm-dev{u} libthai-dev{u} libwayland-bin{u} libwayland-dev{u} libx11-dev{u} libxau-dev{u} libxcb-render0-dev{u} libxcb-shm0-dev{u} libxcb1-dev{u} libxcomposite-dev{u} libxcursor-dev{u} libxdamage-dev{u} 
  libxdmcp-dev{u} libxext-dev{u} libxfixes-dev{u} libxft-dev{u} libxi-dev{u} libxinerama-dev{u} libxkbcommon-dev{u} libxrandr-dev{u} libxrender-dev{u} libxtst-dev{u} pango1.0-tools{u} wayland-protocols{u} x11proto-dev{u} xorg-sgml-doctools{u} xtrans-dev{u} 
0 packages upgraded, 0 newly installed, 67 to remove and 6 not upgraded.
Need to get 0 B of archives. After unpacking 132 MB will be freed.
The following packages have unmet dependencies:
<package name> : Depends: libgtk-3-0 (>= 3.9.10) but it is not going to be installed
<package name> : Depends: gir1.2-gtk-3.0 (>= 3.6.2) but it is not going to be installed
...lists lots of other packages with same message...

The following actions will resolve these dependencies:

      Remove the following packages:                                                     
1)      libexo-2-dev [4.18.0-1~bpo22.04 (now, virginia)]                                 
2)      libxfce4panel-2.0-dev [4.18.2-1~bpo22.04 (now, virginia)]                        
3)      libxfce4ui-2-dev [4.18.2-2~bpo22.04 (now, virginia)]                             
4)      libxreaderview3 [4.0.2+virginia (now, virginia)]                                 
5)      thingy [1.1.6 (now, virginia)]                                                   
6)      xreader [4.0.2+virginia (now, virginia)]                                         
7)      xreader-dbg [4.0.2+virginia (now, virginia)]                                     

      Install the following packages:                                                    
8)      gtk-update-icon-cache:i386 [3.24.33-1ubuntu2.2 (jammy-security, jammy-updates)]  
9)      libdeflate0:i386 [1.10-2 (jammy)]                                                
10)     libgdk-pixbuf-2.0-0:i386 [2.42.8+dfsg-1ubuntu0.3 (jammy-security, jammy-updates)]
11)     libjbig0:i386 [2.1-3.1ubuntu0.22.04.1 (jammy-security, jammy-updates)]           
12)     libjpeg-turbo8:i386 [2.1.2-0ubuntu1 (jammy)]                                     
13)     libjpeg8:i386 [8c-2ubuntu10 (jammy)]                                             
14)     libtiff5:i386 [4.3.0-6ubuntu0.10 (jammy-security, jammy-updates)]                
15)     libwebp7:i386 [1.2.2-2ubuntu0.22.04.2 (jammy-security, jammy-updates)]           

      Keep the following packages at their current version:                              
16)     gir1.2-gtk-3.0 [3.24.33-3~classic~22.04 (now)]                                   
17)     libgtk-3-0 [3.24.33-3~classic~22.04 (now)]                                       
18)     libgtk-3-common [3.24.33-3~classic~22.04 (now)]                                  

      Leave the following dependencies unresolved:                                       
19)     mint-meta-core recommends thingy                                                 
20)     libgtk-3-0 recommends libgtk-3-bin                                               

Accept this solution? [Y/n/q/?] 

The recommended actions don't seem right at all. Is this due to some specific configuration with my system that prevents ppa-purge from simply downgrading libgtk-3-0? Is it recommend to instead delete the PPA and reinstall libgtk-3-0 manually?

lah7 commented 1 month ago

Yikes, that has something to do with Linux Mint. I can replicate that here under Mint 21.3 too.

Under regular Ubuntu 22.04, that command would work with no issue:

Updating packages lists
PPA to be removed: lah7 gtk3-classic
Package revert list generated:
 gir1.2-gtk-3.0:amd64/jammy gtk-update-icon-cache/jammy libgtk-3-0:amd64/jammy libgtk-3-bin/jammy libgtk-3-common/jammy

Disabling lah7 PPA from /etc/apt/sources.list.d/lah7-ubuntu-gtk3-classic-jammy.list
Updating packages lists
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '3.24.33-1ubuntu2.2' (Ubuntu:22.04/jammy-updates, Ubuntu:22.04/jammy-security [amd64]) for 'gir1.2-gtk-3.0'
Selected version '3.24.33-1ubuntu2.2' (Ubuntu:22.04/jammy-updates, Ubuntu:22.04/jammy-security [amd64]) for 'gtk-update-icon-cache'
Selected version '3.24.33-1ubuntu2.2' (Ubuntu:22.04/jammy-updates, Ubuntu:22.04/jammy-security [amd64]) for 'libgtk-3-0'
Selected version '3.24.33-1ubuntu2.2' (Ubuntu:22.04/jammy-updates, Ubuntu:22.04/jammy-security [amd64]) for 'libgtk-3-bin'
Selected version '3.24.33-1ubuntu2.2' (Ubuntu:22.04/jammy-updates, Ubuntu:22.04/jammy-security [all]) for 'libgtk-3-common'
The following packages will be DOWNGRADED:
  gir1.2-gtk-3.0 gtk-update-icon-cache libgtk-3-0 libgtk-3-bin libgtk-3-common
0 to upgrade, 0 to newly install, 5 to downgrade, 0 to remove and 0 not to upgrade.
Need to get 3,633 kB of archives.
After this operation, 26.2 MB disk space will be freed.
Do you want to continue? [Y/n] 

Correct, the way to go would be to remove the PPA using Software Sources, refresh the cache (or sudo apt update) and then replace the ~classic version of packages.

To get a list of all the packages:

dpkg -l | grep '~classic'

To get the versions available to the system:

apt-cache show libgtk-3-common | grep Version

In this case:

Version: 3.24.33-3~classic~22.04
Version: 3.24.33-1ubuntu2.2       <---
Version: 3.24.33-1ubuntu1

To downgrade to the original version, specify the version = for each GTK 3 package you have:

sudo apt install \
    gir1.2-gtk-3.0=3.24.33-1ubuntu2.2 \
    gtk-update-icon-cache=3.24.33-1ubuntu2.2 \
    libgail-3-0=3.24.33-1ubuntu2.2 \
    libgtk-3-0=3.24.33-1ubuntu2.2 \
    libgtk-3-bin=3.24.33-1ubuntu2.2 \
    libgtk-3-common=3.24.33-1ubuntu2.2

⚠️ Caution: Check there are no remains as mismatching versions or missing packages could break the desktop on your next login! Do not pass --reinstall (took me 3 attempts to realise that!)

Confirmed with Linux Mint 21.3. I'll add something to the README to warn other users. Thanks for raising this!

ra50 commented 1 month ago

Thanks for the quick investigation and response. Good to confirm this is related to Mint. I'm curious why a straightforward --reinstall on libgtk-3-0 or similar doesn't work, I guess it doesn't handle the dependencies right. Thanks for updating the readme for other users!

lah7 commented 1 month ago

--reinstall was surprising to me, I thought adding it would help. It performs similarly since it would appear the package version rolled back to its original version (3.24.33-1ubuntu2.2). Except, upon reboot there's only a very basic dialog saying it couldn't start the Mint desktop, so very likely it did [something else] and broke GTK 3 in some way.

The manual just says:

--reinstall Re-install packages that are already installed and at the newest version. Configuration Item: APT::Get::ReInstall.

Hmm, there's probably a logical explanation to what that parameter does. :) Either way, installing with a forced version did the trick. Hope this solves it for you. If not, feel free to re-open.

If you have any feedback on your motivations to try (and later uninstall) this patched GTK 3 experience, I'd be happy to hear!

ra50 commented 1 month ago

Thanks, I appreciate the instructions and the warning about --reinstall, as that's likely what I would've tried first! I hesitated to open the issue but glad I did.

Sure I can give feedback, I tried this out since I dislike CSD and apps not having my desired title bar, it works well but the double window controls looks like it will be more prominent now (e.g. gnome-calculator and gnome-disks), however, I'm still interested in trying the libhandy edit that I mentioned in that issue to see if it could work!

lah7 commented 1 month ago

Good to know, thanks. I was just wondering, since the patched experience might vary by OS.

As a suggestion, you could try downgrading packages - I do this on Arch so GNOME Disks stays on something 'good enough' until it breaks (if ever, same 3.38.2 version since 2021), but I find that's easier to do under Arch. In Debian/Ubuntu, packages can be held from upgrades, and downgraded too, but it could get messy if they're split up or built/packaged differently. Could be an option.

Good luck tinkering with libhandy (#32). Hopefully it could be as simple as patching the library and rebuilding the package. That would be good for the newer versions. 🤞🏼

ra50 commented 1 month ago

Good call on downgrading! Might make more sense than fighting with apps. Will have to explore the Arch way of doing things someday. I appreciate you fighting the good fight for classic styled desktops.