VectorLinux
October 21, 2014, 08:42:16 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Uninstalling packages with gslapt can be dangerous  (Read 2062 times)
Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« on: December 12, 2008, 01:58:22 pm »

Just a little warning here for the unwary:

I don't use gslapt all that much, except for installing some upgrades from the repo when I can't be bothered to download them manually for offline install. However, while doing some cleanup due to low space in the VL partition (don't want to hazard using gparted to resize partitions just yet due to ongoing development work), I checked the installed packages list in gslapt and marked some for removal. After clicking on execute, I checked the list of packages that were going to be removed and saw that there were way too many (including all of KDE, lol). I quickly realized it was going to remove anything that depended on the packages I had marked manually, but there is no way to unmark any of those auto-selected packages that I can see. The biggest culprit seems to be mysql, as all the KDE packages, as well as gambas2 and a lot of other stuff have a dependency on it. I am pretty sure all or most of those would work without it though, but some components of them required mysql to be present at build time.

Maybe we need to look more closely at what the real deps are and move stuff to suggests. The problem then is that gslapt ignores suggests AFAIK. Also, I wish Jaos would implement a switch to disallow auto-selection for uninstall, or at least allow manual deselection of the list after execute is clicked.



EDIT: Ok, things are even more interesting. It's marking stuff that isn't even installed! And some installed stuff doesn't show up as marked until after execute is pressed.
« Last Edit: December 12, 2008, 02:04:18 pm by Joe1962 » Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #1 on: December 12, 2008, 02:04:33 pm »

I think this has been a huge problem in 5.9....
I always feel safer running "removepkg".
It would be great if this could be turned off.
Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #2 on: December 12, 2008, 08:27:10 pm »

I learned that the hard way back with 5.9 or maybe earlier with whatever VL used to use for managing packages (other than removepkg). I've used nothing but removepkg since that bad experience. I'm sorry to hear it's still as bad as ever--or worse.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
sledgehammer
Vectorian
****
Posts: 1425



« Reply #3 on: December 12, 2008, 08:40:59 pm »

If one installs a package via gslapt and later wants to remove it using removepkg, how to find the package name?

John
Logged

VL7.0 xfce4 Samsung RF511
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #4 on: December 13, 2008, 04:39:06 am »

You can do slapt-get --search to find the name of the package.

I would think a simple way of putting this in gslapt would be simply to pass the --no-dep switch to slapt-get, when removing a package.

Unfortunately, I don't know if this would produce the desired effect, as I always get a segmentation fault when using --remove and --no-dep in slapt-get. Oh, well...
Logged
Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« Reply #5 on: December 13, 2008, 06:40:20 am »

The problem with removepkg (which is what I normally use, BTW) is that when removing a package, you need to know what deps (or acompanying packages) to remove, or they will be left lying around useless. Ideally, the package manager should let you remove deps if no other package depends on them, but even then it should offer a choice, just in case KDE is a dep, lol. Anyway, the current issue was actually the other way around, I wanted to remove a dep and it wants to remove anything that depends on it, assuming they would stop working anyway. The logic of that is debatable, I guess, and maybe packagers should manually fine-tune deps, but it should really offer a way to unselect them, plus a way to turn off the behaviour altogether.
Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
sledgehammer
Vectorian
****
Posts: 1425



« Reply #6 on: December 13, 2008, 08:16:30 am »

All this looks a bit complicated for me.  I think I will continue to use g-slapt (or, what I think may be the same thing: slapt-get --remove).  I have not had problems to speak of with G-slapt.  G-slapt has on one or two occasions (as you suggest) told me it is going to delete a huge number of files if I delete an offending program.  In such cases, I just leave the offending file on my drive. 

Logged

VL7.0 xfce4 Samsung RF511
jaos
Member
*
Posts: 3


« Reply #7 on: December 13, 2008, 01:59:26 pm »

EDIT: Ok, things are even more interesting. It's marking stuff that isn't even installed! And some installed stuff doesn't show up as marked until after execute is pressed.

VSpike pointed this out in #vectorlinux and it is fixed in the newly released 0.5.0.
Logged
Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« Reply #8 on: December 13, 2008, 02:17:29 pm »

That's great news jaos... Keep up the good work!

PS: Are you thinking of adding package categories to gslapt at some point? This would mean adding something to the slack-desc, I suppose? But it would be really cool.
Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #9 on: December 13, 2008, 04:02:53 pm »

Quote
It is fixed in the newly released 0.5.0.
Great! Thank you.
Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #10 on: December 14, 2008, 04:46:11 pm »

If one installs a package via gslapt and later wants to remove it using removepkg, how to find the package name?

Slapt-get is too command line-ish for me to remember what modifiers to put in, so if I want to find a package name, I look in /var/log/packages. Granted, I'd have to remember *something* about the name, but I haven't found it difficult to take a quick look through the list in /var/log/packages. I also look there when I want to find out other details, such as where the package's stuff was installed, what was included, etc.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!