You are not logged in.
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
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
Apart from the dotfiles, maybe .pyc (compiled python) and the like.
Offline
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
). 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
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
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
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
@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
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
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. ![]()
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. ![]()
joe@trusktr.io - joe at true skater dot io.
Offline
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.Network • GitLab
The Life and Times of Miblo del Carpio
Offline
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. ![]()
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 vimLast edited by cesura (2010-10-27 01:05:11)
Offline
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.
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.
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
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