You are not logged in.

#1 2020-11-06 08:12:58

veronikazaglotova
Member
Registered: 2020-07-08
Posts: 12

[SOLVED]Why update before installing a package?

So I've been using Arch for a while and didn't have any issues yet. Today I stumbled upon this Archwiki article https://wiki.archlinux.org/index.php/Sy … nsupported I see

Always upgrade (with pacman -Syu) before installing a package

I don't understand why. I understand that updating package databases (e.g. -Sy) can lead to partial upgrades in the future, but I don't get why I should always -Syu instead of just -S. As far as I know, pacman -S doesn't update package databases and simply uses the existing ones. Thus, if the last time I did pacman -Syu was 4th of November, then all the packages on my system (including the ones that I install after 4th of November) will be newest as of 4th of November. So, what's the problem, then, if pacman -S doesn't result in partial upgrades? Or am I simply wrong in how pacman manages downloading packages? I always thought that Fedora is the only distribution that updates package databases every time you install a package. What exactly happens when I pacman -S?
Feel free to ask for more information if you couldn't understand my broken English.

Last edited by veronikazaglotova (2020-11-06 08:46:22)

Offline

#2 2020-11-06 08:40:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,363

Re: [SOLVED]Why update before installing a package?

you're right pacman -S  itself is "safe". That section really intends to drive the point that if you see a package download error and then fix it with -Sy you're in trouble. One could argue one should add an explicit mention of "-S" being safe, but people are primarily linked to that section once the fuckup has already happened. And I feel that you could lose some clarity by dancing around semantics that aren't really that relevant to the section at hand.

Offline

#3 2020-11-06 08:45:56

veronikazaglotova
Member
Registered: 2020-07-08
Posts: 12

Re: [SOLVED]Why update before installing a package?

Oh ok. Solved I guess? Thx for helping again based V1del

Offline

#4 2020-11-06 10:22:44

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]Why update before installing a package?

Nice touch on the wiki, being noob friendly to leave some nice hardwirings to avoid issues.

“Always -Syu before installing package” is quite heavy, but with the learning curve after a while you realize that you only need to REALLY avoid nonsense like “-Sy foo”, or -S after -Sy without -Su (and probably other cases that I haven’t mentioned), and you safely avoided doing partial upgrades thanks to that hardwiring in the meantime.

...

If you really want to be able to install even if it’s not in the repos anymore some ALA trick could be done (don’t ask me, I don’t have a clue on the howto), I see some cases, like “next update breaks everything, I don’t have time for that, but I want foo”, unless it’s really needed I wouldn’t recommend stalling on old packages tho...1 year and even less is enough to cause trouble.


My reposSome snippets

Heisenberg might have been here.

Offline

Board footer

Powered by FluxBB