You are not logged in.

#1 2010-10-15 07:13:56

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

[solved] Any packages leave system changed after uninstall?

Do packages ever fail to return your system back to it's original state as it was before install when uninstalling?

Last edited by trusktr (2013-08-31 04:49:13)


joe@trusktr.io - joe at true skater dot io.

Offline

#2 2010-10-15 07:26:52

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [solved] Any packages leave system changed after uninstall?

Well yes, if the package runs rm -rf ~/ on installation or uninstallation then of course.

Pacman just keeps track of the files belonging to each package. Applications can create other files at run-time (or in pre/post-install scripts), those are not kept track of by pacman. You're to keep track of those yourself.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2010-10-15 10:03:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] Any packages leave system changed after uninstall?

Apart from the dotfiles, maybe .pyc (compiled python) and the like.

Offline

#4 2010-10-15 16:59:37

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [solved] Any packages leave system changed after uninstall?

Well i was just wondering because I'm making a package for the AUR (my first one) and so it just got me thinking. It would seem good practice to make sure that as a packager you know exactly what changes a program does to the system, so that it can be uninstalled later. For example, i know some programs create files in the user's home folder, which is usually not a problem because i snoop through my hidden files and make sure there's nothing i don't need, but some people might not be on the same level and might not delete things. And also, those .pyc files (or any other files that's added) should definitely be removed on un-install.

so... I just want to make sure that with my package i provide the most detailed uninstall script in case someone un-installs the package (if they even install it hehe big_smile). In my uninstall script, is it possible to prompt the user if he wishes to delete related personal content from his home folder after pacman removes non-home files? Any other content not located in a user's home should always be deleted, no questions asked. That would be leave un-known stuff on a user's computer.

In my case, i am only adding files to a usr/share folder and installing a python module with a setup.py script.

How would I go about uninstalling the python module if the command i used to install it was sudo python setup.py install?
This is the contents of setup.py:

#!/usr/bin/env python

from distutils.core import setup

setup (name = "SnipplrPy",
    version = "0.4",
    description = "Snipplr service xml-rpc wrapper",
    author = "Francisco Jesus Jordano Jimenez",
    author_email = "arcturus@ardeenelinfierno.com",
    url = "http://www.ardeenelinfierno.com/wordpress/code/snipplrpy/",
    py_modules = ["SnipplrPy"]
    )

I did find this advice on ubuntu forums, perhaps it works with Arch too?

EDIT: I'm gunna post this info in the Python page in the wiki since it doesn't have this info yet!

Last edited by trusktr (2010-10-15 17:07:30)


joe@trusktr.io - joe at true skater dot io.

Offline

#5 2010-10-15 17:32:00

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: [solved] Any packages leave system changed after uninstall?

It's a really bad idea to delete things in users' home directories.  Imagine if I accidentally uninstall it, then reinstall it.  Suddenly all my config files/etc. are gone.

pacman -R takes care of everything itself, there's no need to do more that that in almost all cases.  It's actually recommended to preserve config files, even global ones, when you uninstall a package; to do this, add the file to the backup=() array in the PKGBUILD.

Offline

#6 2010-10-15 18:03:24

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [solved] Any packages leave system changed after uninstall?

trusktr wrote:

For example, i know some programs create files in the user's home folder, which is usually not a problem because i snoop through my hidden files and make sure there's nothing i don't need, but some people might not be on the same level and might not delete things.

Why would leaving the config files in a user's home directory ever be a problem?

Offline

#7 2010-10-16 02:44:45

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [solved] Any packages leave system changed after uninstall?

If you are making a package of a python module, install it into $pkgdir and pacman will handle it.

As others have said, never ever delete anything from the user's home directory. Let the user decide, don't decide for him. At most you could just echo a message in post-install "you may want to consider removing ~/.some_useless_directory after this"


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2010-10-25 03:06:10

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [solved] Any packages leave system changed after uninstall?

@tavianator and @ngoonee Agreed. I'll leave the ~/$home files alone. But how do I determine exactly what system files are installed when running the command as i described above (sudo python setup.py install)? The install script doesn't leave it obvious and perhaps I also need more experience with python (i have none).

@drcouzelis You'd be surprised! I can name plenty of people i know in person who'd not be able to manage even their *unhidden* home-folder files. hehe


joe@trusktr.io - joe at true skater dot io.

Offline

#9 2010-10-25 06:53:40

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [solved] Any packages leave system changed after uninstall?

Please read my message again. You should NOT install with 'sudo anything'. There's a reason we have PKGBUILDs.

sudo python setup.py install is just as bad as sudo make install. You're relying on sudo make uninstall, which may do nothing for all you know. setup.py uninstall may not even exist.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#10 2010-10-27 00:24:22

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [solved] Any packages leave system changed after uninstall?

Exactly, I get that part ngoonee. I have kept track of the changes i've made to my system so when I get some free time I can learn how to use ABS and PKGBUILDs to re-install them correctly. smile

I was simply wondering about the other stuff because the stuff i installed i want to make available in the AUR since it doesn't exist, so i was just wondering for procedural purposes. I've never made a package in my life. This will my first time. wink


joe@trusktr.io - joe at true skater dot io.

Offline

#11 2010-10-27 00:53:36

Miblo
Member
From: Manchester, UK
Registered: 2010-07-05
Posts: 160
Website

Re: [solved] Any packages leave system changed after uninstall?

Just want to say I admire your diligence and consideration, trusktr. I'm not a packager myself, and am not entirely sure whether such concerns as yours are universally felt by packagers or not; I wouldn't doubt that they are, but even if that is the case it's nice to see the sentiment vocalised and I'm sure you'll make a great packager.


@archun: Intel® Core™ i5-4210M • [GPU] Intel® HD Graphics 4600 • [Kernel] linux-ck-haswell
Handmade.NetworkGitLab
The Life and Times of Miblo del Carpio

Offline

#12 2010-10-27 01:04:55

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [solved] Any packages leave system changed after uninstall?

trusktr wrote:

It would seem good practice to make sure that as a packager you know exactly what changes a program does to the system, so that it can be uninstalled later.

Actually, that sounds like HORRIBLE practice. smile

Let's say pacman were to monitor all files created by a piece of installed software. Let's take a look at the problems...
1) Too slow. In fact, extremely slow!

2) Too hard to regulate. As an example, something like cp technically creates a new file, so by removing coreutils, you have (in theory) deleted all files that you have copied using the cp command.

3) Just not logical...

# vim /new/document/for/class
# pacman -R vim

Last edited by cesura (2010-10-27 01:05:11)

Offline

#13 2010-10-27 03:29:21

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [solved] Any packages leave system changed after uninstall?

trusktr wrote:

Exactly, I get that part ngoonee. I have kept track of the changes i've made to my system so when I get some free time I can learn how to use ABS and PKGBUILDs to re-install them correctly. smile

I was simply wondering about the other stuff because the stuff i installed i want to make available in the AUR since it doesn't exist, so i was just wondering for procedural purposes. I've never made a package in my life. This will my first time. wink

I'd suggest first learning how to create PKGBUILDs before concerning yourself with matters such as these (in fact considering the time you've been around I thought you already knew how). It WILL make things easier for you.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#14 2010-10-27 14:29:20

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [solved] Any packages leave system changed after uninstall?

trusktr wrote:
drcouzelis wrote:

Why would leaving the config files in a user's home directory ever be a problem?

You'd be surprised! I can name plenty of people i know in person who'd not be able to manage even their *unhidden* home-folder files.

Sooo... Why would leaving the hidden config files in a user's home directory ever be a problem? Do you think it would be a problem because the files would use too much disk space? Do you think there would be some other problem?

In order to upgrade the "xulrunner" package I have to temporarily uninstall the "firefox-branded" package. If the package manager deleted my Firefox settings every time I did that, I would be pretty upset.

Offline

Board footer

Powered by FluxBB