You are not logged in.

#1 2011-08-19 14:00:10

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

When to --force, when not to --force

https://bbs.archlinux.org/viewtopic.php … 09#p833409 v. https://bbs.archlinux.org/viewtopic.php … 26#p965126

Does filesystem package need a special treatment? Or is it a case where the experts don't agree on what's right?

Offline

#2 2011-08-19 14:06:26

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,071

Re: When to --force, when not to --force

I think it depends on the package in question. Forcing packages like initscripts is bad because it will overwrite inittab rendering your system unable to boot. filesystem as well  since fstab will be changed and it might not reflect the partition scheme or mounting scheme that you need to be able to boot in.

however, if I have messed up my window manager for some reason -- I can force install it to get back to default. I can then always log into CLI mode and change the wm configuration the way I want.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-08-19 15:13:43

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

Re: When to --force, when not to --force

If I understand it correctly, when using --force, pacman doesn't create .pacnew files, but simply overwrites the existing files, right? This means I have to make a copy of the files in question first and edit the new files accordingly.


Any idea how e.g. /var/lib/pacman/local/gnutls-2.12.7-1/files file might have gone missing? Does this constitute pacman database corruption?

Offline

#4 2011-08-19 18:47:48

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,094
Website

Re: When to --force, when not to --force

No, we still honor backup files on a force operation. That's if, of course, the files metadata fragment still exists.

Offline

#5 2011-08-19 19:39:52

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

Re: When to --force, when not to --force

falconindy wrote:

No, we still honor backup files on a force operation. That's if, of course, the files metadata fragment still exists.

Ah, so that's why using '--force' on e.g. filesystem package when the 'files' part of metadata is missing would be ... unfortunate :-)
Now I get it, thank you very much.

Offline

#6 2011-08-19 21:12:25

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,406
Website

Re: When to --force, when not to --force

My answer is never use --force.

Offline

#7 2011-08-19 21:22:09

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: When to --force, when not to --force

Allan wrote:

My answer is never use --force.

I believe you mean that as a general rule to people (especially users unfamiliar with the system), correct? In my opinion, there are plenty of acceptable situations to pass the force option, and to implement something and then condemn its use seems a bit odd to me.

Offline

#8 2011-08-19 21:30:40

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

Re: When to --force, when not to --force

I've seen a few people having problems with /var/lib/pacman/local/<somepackage>/files missing - can anyone explain how could this happen on its own? I know that Pacman is a hungry beast, but ...

Offline

#9 2011-08-19 21:35:38

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: When to --force, when not to --force

karol wrote:

I've seen a few people having problems with /var/lib/pacman/local/<somepackage>/files missing - can anyone explain how could this happen on its own? I know that Pacman is a hungry beast, but ...

Hmm, files missing from the local db? That has to be some sort of pacman bug (or just user error, before we go off blaming Allan). Where did you see people having those types of problems?

EDIT: You were probably expecting an answer from Allan, but now you get to deal with me instead. tongue

Last edited by itsbrad212 (2011-08-19 21:36:34)

Offline

#10 2011-08-19 21:40:22

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,406
Website

Re: When to --force, when not to --force

itsbrad212 wrote:
Allan wrote:

My answer is never use --force.

I believe you mean that as a general rule to people (especially users unfamiliar with the system), correct? In my opinion, there are plenty of acceptable situations to pass the force option, and to implement something and then condemn its use seems a bit odd to me.

My opinion is there is never a good time to use --force. If you think you have to use force, then there is probably another issue that you should be fixing first.

Offline

#11 2011-08-19 21:41:15

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

Re: When to --force, when not to --force

itsbrad212 wrote:

Where did you see people having those types of problems?

See the links in my first post.

Last edited by karol (2011-08-19 21:42:17)

Offline

#12 2011-08-19 21:41:19

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,406
Website

Re: When to --force, when not to --force

itsbrad212 wrote:
karol wrote:

I've seen a few people having problems with /var/lib/pacman/local/<somepackage>/files missing - can anyone explain how could this happen on its own? I know that Pacman is a hungry beast, but ...

Hmm, files missing from the local db? That has to be some sort of pacman bug (or just user error, before we go off blaming Allan). Where did you see people having those types of problems?

Most (all?) of these are from people losing power during an update or having some sort of filesystem corruption.

Offline

#13 2011-08-19 22:07:19

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: When to --force, when not to --force

Allan wrote:

My opinion is there is never a good time to use --force. If you think you have to use force, then there is probably another issue that you should be fixing first.

I can agree with there most likely being an underlying issue when --force is used, but if it can fix the problem without any ramifications, I see no reason not to use it (when used wisely, of course).

Allan wrote:
itsbrad212 wrote:

Hmm, files missing from the local db? That has to be some sort of pacman bug (or just user error, before we go off blaming Allan). Where did you see people having those types of problems?

Most (all?) of these are from people losing power during an update or having some sort of filesystem corruption.

I would consider that a bug then. Not an entirely important one, as it occurs fairly scarcely, but still one worth addressing. Being able to recover from interruption without a single moment's notice is a critical part of software design. I know, I know, "patches welcome."

karol wrote:
itsbrad212 wrote:

Where did you see people having those types of problems?

See the links in my first post.

Ah, apologies, I see now. smile

Last edited by itsbrad212 (2011-08-19 22:08:49)

Offline

#14 2011-08-24 13:29:46

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

Offline

Board footer

Powered by FluxBB