You are not logged in.

#1 2005-12-27 17:49:05

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Why can you uninstall things when they're still running?

I'm aware that apps run in RAM, but what happens if you uninstall an app while it's running and then select an option it that would make it change one of its config files... would it then crash? Or would the file (assuming you have permissions) be rewritten, and left as a remnant when you close the now-deleted program?


.oO Komodo Dave Oo.

Offline

#2 2005-12-27 18:05:59

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Why can you uninstall things when they're still running?

It would probably not crash. Local config files (you know, ~/.foo) would stick around, or get rewritten if removed. If it depended on system config files that were removed, I suppose you might get some errors about such files not being found.

Generally I would not recommend uninstalling a running program, just as a matter of caution, but sometimes it has to be done... Like, for example, with the kernel.

Offline

#3 2005-12-27 18:25:40

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Why can you uninstall things when they're still running?

Yeah, I never thought about the kernel...


.oO Komodo Dave Oo.

Offline

#4 2005-12-27 19:10:58

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: Why can you uninstall things when they're still running?

hm i updated wine once when i had a win-program running with wine and IIRC, the update wasn't done properly...the bin still was the old i think but am not too sure now...

Offline

#5 2005-12-27 19:17:52

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Why can you uninstall things when they're still running?

That's the sort of thing that I'm concerned about, hellwoofa... surely there should be some sort of check  when you uninstall something, to see if it's an active process.


.oO Komodo Dave Oo.

Offline

#6 2005-12-27 20:08:50

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,681

Re: Why can you uninstall things when they're still running?

Generally speaking, I do an "init 3" to get out of X before doing any upgrading, or simply boot into runlevel 3 to do it.  It's rare that upgrade issues have cropped up, but certainly still possible.


oz

Offline

#7 2005-12-27 20:26:45

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Why can you uninstall things when they're still running?

Heh, I've seen init 3 when editing inittab to change it to 5, but it didn't 'click' that it's a bash command.

Worth knowing, cheers Ozar big_smile


.oO Komodo Dave Oo.

Offline

#8 2005-12-27 21:09:04

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Why can you uninstall things when they're still running?

As for the whole config file thing, it's going to depend entierly on the app itself.  I know of three off the top of my head (snownews, supybot, weechat) which maintain working copies of the entire config structure in memory, and flush it all to a file, overwriting the entire contents regardless of changes made.

As for damage done while a program is running, it's only happened to me once... pacman was in the middle of a bash upgrade, and some timed script kicked in, which fires off a bash process, couldn't find bash, and crashed screen, which also killed the pacman update process... it was rather messy, but entirely my fault.

Offline

#9 2005-12-27 21:25:42

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Why can you uninstall things when they're still running?

It's worrying that things like that are able to happen... I hope that in years to come everything will have  been worked on sufficiently that crashing your system is nigh-on impossible. I'm aware that it's impossible to make things flawless, but I never consider what crontab events I have scheduled when doing a system update...


.oO Komodo Dave Oo.

Offline

#10 2005-12-27 23:27:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,237

Re: Why can you uninstall things when they're still running?

The same for me, Komodo.
Maybe pacman could disable crontab jobs temporarily when it starts ?


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#11 2005-12-27 23:31:22

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Why can you uninstall things when they're still running?

Yeah, that'd be a great idea Lone_Wolf.

Phrakture, do you think the devs (i.e. you now tongue) would be interested in implementing this in the future? Because it seems like a fairly major issue that your system undergoes meltdown if something's in use when it's being updated. There really ought to be some sort of check for what's running at the time of update...


.oO Komodo Dave Oo.

Offline

#12 2005-12-27 23:42:49

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Why can you uninstall things when they're still running?

Komodo wrote:

Because it seems like a fairly major issue that your system undergoes meltdown if something's in use when it's being updated. There really ought to be some sort of check for what's running at the time of update...

Hmm, well, it rarely has the potential to happen - mine wasn't caused by cron, but by a screen status script, and even then it only caused problems because I was running pacman inside screen.  If I had been running pacman in it's own terminal, yes, screen would have crashed, but pacman would not have.

Also, I don't think it's entirely the dev's jobs to prevent users from screwing things up in an update.  I mean, if you want it as safe as possible, we can always go the windows route: "Please reboot now, updates will continue when you reboot" and fully upgrade things via init or something dumb.

I haven't put alot of thought into this, but basically, as long as the terminal you're running pacman in does not crash, it will be fine... I'll try and see if there's any straight forward ways to make sure things are really secure and all, but I'd rather not have to take control over a user machine while upgrading...

Offline

#13 2005-12-28 00:05:14

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Why can you uninstall things when they're still running?

phrakture wrote:

I'd rather not have to take control over a user machine while upgrading...

An admirable decision, but nonetheless it'd be good to know exactly what conditions could cause pacman to throw a wobbly.


.oO Komodo Dave Oo.

Offline

Board footer

Powered by FluxBB