You are not logged in.

#1 2013-01-19 12:28:09

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

The --needed default seems so weird to me... What is the reason?

There is a reason why pacman installs an non-updated package by default?
I can understand this behavior with the -U option, but with the -S seems strange.

Why this design decision?

(edit, typo)

Last edited by ezzetabi (2013-01-19 15:27:59)

Offline

#2 2013-01-19 13:15:38

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: The --needed default seems so weird to me... What is the reason?

Pardon?

Pacman installs updates because Arch is a rolling release distro. Partial upgrades are not supported. I don't understand where the --needed flag comes into your question.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2013-01-19 13:23:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: The --needed default seems so weird to me... What is the reason?

I have to suspect there was a typo and the question may be why does pacman install non-updated packages.

If one has foo-10.1-1 installed and that is the current version then they do a `pacman -S widget foo bar` pacman will *reinstall* the same version of foo.

I don't know the design decisions behind this, but it is useful as - on occassion - something will go wrong such that one does not actually have a package properly installed even though it is in their package database.  It is easier to do `pacman -S borked-package` than to remove it then reinstall it.

Last edited by Trilby (2013-01-19 13:24:25)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2013-01-19 13:40:30

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: The --needed default seems so weird to me... What is the reason?

Trilby wrote:

If one has foo-10.1-1 installed and that is the current version then they do a `pacman -S widget foo bar` pacman will *reinstall* the same version of foo.

Afaik -S just always installs the version that is in the sync db, so this could mean an updated version if one has done an -Sy before.


ᶘ ᵒᴥᵒᶅ

Offline

#5 2013-01-19 13:45:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: The --needed default seems so weird to me... What is the reason?

My example was not great - if one did a `pacman -Syu widget foo bar` and the currently installed version of foo was already the most up to date version, pacman would still reinstall it.  I'm guessing this is what the question is about.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2013-01-19 15:29:30

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: The --needed default seems so weird to me... What is the reason?

Sorry, It is  indeed  a typo. My question was about why --needed is not the default. It is seldom useful reinstall a package, but in most of the cases I experienced if I type "pacman -S a b c d e" I mean: install the missing packages.

Last edited by ezzetabi (2013-01-19 15:34:20)

Offline

#7 2013-01-19 16:09:19

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

Re: The --needed default seems so weird to me... What is the reason?

Because pacman does what you tell it to do. If you tell it to install a package, it's going to install the package. The deviating behavior is that if you tell it to install a package, don't install it if it's already installed.

I tend to think it's a sane default that presents no real harm.

Offline

#8 2013-01-19 17:02:48

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: The --needed default seems so weird to me... What is the reason?

falconindy wrote:

Because pacman does what you tell it to do.

Exactly.  I think it would be more problematic if it didn't do what you explicitly told it to do.  Besides, it does warn you that it is a reinstall and not a new install and seeks your permission before performing the operation.  Can't ask for better functionality than that.


I laugh, yet the joke is on me

Offline

#9 2013-01-19 17:31:30

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: The --needed default seems so weird to me... What is the reason?

I see your point. But even if I also use the word "install" what you are asking is to "Synchronize packages." But... oh well. It is not a big deal. When I install packages I use --needed and that's it.

Offline

#10 2013-01-20 06:02:04

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: The --needed default seems so weird to me... What is the reason?

Why do you install packages that you have already installed?

Offline

#11 2013-01-20 10:31:35

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: The --needed default seems so weird to me... What is the reason?

It usually happen when I am following the Wiki for something and I read: Ensure you have the following packages: A B C D and so I type pacman -S A B C D without checking if any of them were actually already installed.

It also happen when I am trying to compile something a package because I need different options or yaourt failed for some reason. I want to install the deps and write pacman --asdep -S A B C D.

Offline

#12 2013-01-20 11:49:13

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: The --needed default seems so weird to me... What is the reason?

Simple scenario: Major update of kde, you don't know if the kde group has changed to include more packages now. So you do pacman -S kde --needed, because you don't want to reinstall every single kde package.


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

Board footer

Powered by FluxBB