You are not logged in.

#1 2024-03-23 16:42:35

Simmanz
Member
Registered: 2024-02-28
Posts: 5

Why did pacman -Syy work instead of -S and is it bad ?

Hi, I was trying to download cmake and it lacked the gui. Forums showed the use of qt, which didn't work for me so I tried installing qt5.

When installing qt5 using pacman -S qt5-base, each mirror would have an error 404.

I tried to ping after the first failed attempts and internet was fine. Later, I tried with pacman -Syy and it worked fine.

I found a forum with someone telling never to use pacman -Sy as-is without the 'u' parameter.

I looked into the manual and found that 'y' parameter :

-y, --refresh
           Download a fresh copy of the master package databases (repo.db)
           from the server(s) defined in pacman.conf(5). This should typically
           be used each time you use --sysupgrade or -u. Passing two --refresh
           or -y flags will force a refresh of all package databases, even if
           they appear to be up-to-date.

Why could it be bad to do so ? Here is the whole message :

The difference is `pacman -S <package>` is a valid command that will either succeed in installing the package, or fail gracefully if it is no longer available (in which case you should use `pacman -Syu <package>).  In contrast neither `pacman -Sy` nor `pacman -Sy <package>` should ever be used.  They will cause problems.  Add a 'u' to either one of those, though, and you'd be fine.

EDIT: to address your follow-up: `pacman -Su` is harmless, but pointless.  There should never be a need for that command.  The only valid use for it is if you just ran `pacman -Sy` (which you should never do) then `pacman -Su` would leave you in a safe state (of course just running `pacman -Syu` at that time would have the same result).

The reason -Su is (or should be) pointless, is that it will only update packages to the versions already in your local copy of the databases.  You should, however, never be in a position where your installed packages do not match the versions in your local copy of the sync databases.  So unless you already did something wrong, `pacman -Su` will always simply reply that there is nothing to do.
`pacman -Syu` will first download the newest sync databases, then upgrade all packages to the version specified in the new databases.

Source : https://bbs.archlinux.org/viewtopic.php?id=265286

The initial failed attempt :

➜  ~ doas pacman -S qt5

:: There are 39 members in group qt5:
:: Repository extra
   1) qt5-3d  2) qt5-base  3) qt5-charts  4) qt5-connectivity  5) qt5-datavis3d
   6) qt5-declarative  7) qt5-doc  8) qt5-examples  9) qt5-gamepad
   10) qt5-graphicaleffects  11) qt5-imageformats  12) qt5-location
   13) qt5-lottie  14) qt5-multimedia  15) qt5-networkauth  16) qt5-purchasing
   17) qt5-quick3d  18) qt5-quickcontrols  19) qt5-quickcontrols2
   20) qt5-quicktimeline  21) qt5-remoteobjects  22) qt5-script  23) qt5-scxml
   24) qt5-sensors  25) qt5-serialbus  26) qt5-serialport  27) qt5-speech
   28) qt5-svg  29) qt5-tools  30) qt5-translations  31) qt5-virtualkeyboard
   32) qt5-wayland  33) qt5-webchannel  34) qt5-webengine  35) qt5-webglplugin
   36) qt5-websockets  37) qt5-webview  38) qt5-x11extras  39) qt5-xmlpatterns

Enter a selection (default=all): 2
resolving dependencies...
looking for conflicting packages...

Packages (6) double-conversion-3.3.0-1  md4c-0.5.2-1
             qt5-translations-5.15.13-1  tslib-1.23-1  xdg-utils-1.2.1-1
             qt5-base-5.15.13+kde+r138-1

Total Download Size:   15.19 MiB
Total Installed Size:  78.62 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 qt5-base-5.15.13+kde+r138-1-x86_64.pkg.tar.zst failed to download
 Total (1/6)            15.2 MiB  9.32 MiB/s 00:02 [######################] 100%
error: failed retrieving file 'qt5-base-5.15.13+kde+r138-1-x86_64.pkg.tar.zst' from mirror.f4st.host : The requested URL returned error: 404
error: failed retrieving file 'qt5-base-5.15.13+kde+r138-1-x86_64.pkg.tar.zst' from mirror.moson.org : The requested URL returned error: 404
error: failed retrieving file 'qt5-base-5.15.13+kde+r138-1-x86_64.pkg.tar.zst' from mirror.dkm.cz : The requested URL returned error: 404
error: failed retrieving file 'qt5-base-5.15.13+kde+r138-1-x86_64.pkg.tar.zst' from ftp.sh.cvut.cz : The requested URL returned error: 404
error: failed retrieving file 'qt5-base-5.15.13+kde+r138-1-x86_64.pkg.tar.zst' from america.mirror.pkgbuild.com : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

The attempt with -Syy :

➜  ~ doas pacman -Syy qt5
:: Synchronizing package databases...
 core                  128.5 KiB   419 KiB/s 00:00 [######################] 100%
 extra                   8.3 MiB  11.2 MiB/s 00:01 [######################] 100%
:: There are 39 members in group qt5:
:: Repository extra
   1) qt5-3d  2) qt5-base  3) qt5-charts  4) qt5-connectivity  5) qt5-datavis3d
   6) qt5-declarative  7) qt5-doc  8) qt5-examples  9) qt5-gamepad
   10) qt5-graphicaleffects  11) qt5-imageformats  12) qt5-location
   13) qt5-lottie  14) qt5-multimedia  15) qt5-networkauth  16) qt5-purchasing
   17) qt5-quick3d  18) qt5-quickcontrols  19) qt5-quickcontrols2
   20) qt5-quicktimeline  21) qt5-remoteobjects  22) qt5-script  23) qt5-scxml
   24) qt5-sensors  25) qt5-serialbus  26) qt5-serialport  27) qt5-speech
   28) qt5-svg  29) qt5-tools  30) qt5-translations  31) qt5-virtualkeyboard
   32) qt5-wayland  33) qt5-webchannel  34) qt5-webengine  35) qt5-webglplugin
   36) qt5-websockets  37) qt5-webview  38) qt5-x11extras  39) qt5-xmlpatterns

Enter a selection (default=all): 2
resolving dependencies...
looking for conflicting packages...

Packages (6) double-conversion-3.3.0-1  md4c-0.5.2-1
             qt5-translations-5.15.13-1  tslib-1.23-1  xdg-utils-1.2.1-1
             qt5-base-5.15.13+kde+r142-1

Total Download Size:   15.12 MiB
Total Installed Size:  78.61 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 qt5-base-5.15.13...    13.0 MiB  10.9 MiB/s 00:01 [######################] 100%
 qt5-translations...  1928.3 KiB  10.3 MiB/s 00:00 [######################] 100%
 tslib-1.23-1-x86_64   101.1 KiB  2021 KiB/s 00:00 [######################] 100%
 md4c-0.5.2-1-x86_64    79.3 KiB  2.98 MiB/s 00:00 [######################] 100%
 xdg-utils-1.2.1-...    60.1 KiB  2.26 MiB/s 00:00 [######################] 100%
 double-conversio...    56.6 KiB  1317 KiB/s 00:00 [######################] 100%
 Total (6/6)            15.1 MiB  8.83 MiB/s 00:02 [######################] 100%
(6/6) checking keys in keyring                     [######################] 100%
(6/6) checking package integrity                   [######################] 100%
(6/6) loading package files                        [######################] 100%
(6/6) checking for file conflicts                  [######################] 100%
(6/6) checking available disk space                [######################] 100%
:: Processing package changes...
(1/6) installing xdg-utils                         [######################] 100%
Optional dependencies for xdg-utils
    kde-cli-tools: for KDE Plasma5 support in xdg-open
    exo: for Xfce support in xdg-open [installed]
    pcmanfm: for LXDE support in xdg-open
    perl-file-mimeinfo: for generic support in xdg-open
    perl-net-dbus: Perl extension to dbus used in xdg-screensaver
    perl-x11-protocol: Perl X11 protocol used in xdg-screensaver
(2/6) installing tslib                             [######################] 100%
(3/6) installing double-conversion                 [######################] 100%
(4/6) installing md4c                              [######################] 100%
(5/6) installing qt5-translations                  [######################] 100%
(6/6) installing qt5-base                          [######################] 100%
Optional dependencies for qt5-base
    qt5-svg: to use SVG icon themes
    qt5-wayland: to run Qt applications in a Wayland session
    postgresql-libs: PostgreSQL driver
    mariadb-libs: MariaDB driver
    unixodbc: ODBC driver
    libfbclient: Firebird/iBase driver
    freetds: MS SQL driver
    gtk3: GTK platform plugin [installed]
    perl: for fixqt4headers and syncqt [installed]
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
➜  ~ doas pacman -Syy qt5
:: Synchronizing package databases...
 core                  128.5 KiB   514 KiB/s 00:00 [######################] 100%
 extra                   8.3 MiB  11.3 MiB/s 00:01 [######################] 100%
:: There are 39 members in group qt5:
:: Repository extra
   1) qt5-3d  2) qt5-base  3) qt5-charts  4) qt5-connectivity  5) qt5-datavis3d
   6) qt5-declarative  7) qt5-doc  8) qt5-examples  9) qt5-gamepad
   10) qt5-graphicaleffects  11) qt5-imageformats  12) qt5-location
   13) qt5-lottie  14) qt5-multimedia  15) qt5-networkauth  16) qt5-purchasing
   17) qt5-quick3d  18) qt5-quickcontrols  19) qt5-quickcontrols2
   20) qt5-quicktimeline  21) qt5-remoteobjects  22) qt5-script  23) qt5-scxml
   24) qt5-sensors  25) qt5-serialbus  26) qt5-serialport  27) qt5-speech
   28) qt5-svg  29) qt5-tools  30) qt5-translations  31) qt5-virtualkeyboard
   32) qt5-wayland  33) qt5-webchannel  34) qt5-webengine  35) qt5-webglplugin
   36) qt5-websockets  37) qt5-webview  38) qt5-x11extras  39) qt5-xmlpatterns

Enter a selection (default=all): 7
resolving dependencies...
looking for conflicting packages...

Packages (1) qt5-doc-5.15.13-1

Total Installed Size:  462.60 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) installing qt5-doc                           [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

New to arch --I was thinking that it was a great idea to follow my friends advice and give it a try even though the sole OS I used before was windows smile))))))
I shall persist and try a lot I guess xD

Offline

#2 2024-03-23 16:45:23

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,550
Website

Re: Why did pacman -Syy work instead of -S and is it bad ?


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 2024-03-23 16:46:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: Why did pacman -Syy work instead of -S and is it bad ?

-S didn't work because you were trying to install an old version that's not on the mirror anymore. This means you MUST update the system. By updating the databases without updating the packages on the system, you're now installing newer versions that are not made to work with the rest of the system. You can even make your system unbootable this way.

Offline

#4 2024-03-23 22:16:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,642

Re: Why did pacman -Syy work instead of -S and is it bad ?

So, you almost always want to use -Syu instead of -Sy


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2024-03-24 09:57:19

Simmanz
Member
Registered: 2024-02-28
Posts: 5

Re: Why did pacman -Syy work instead of -S and is it bad ?

Thank you for the valuable information.

If I understand correctly in case I did a partial upgrade/install (which I should never do) using pacman -Sy I should run pacman -Syu as soon as possible to upgrade the packages to prevent the system from not working anymore due to dependencies no longer being in working versions ?

In my case I did run pacman -Syu after downloading my stuff and did not encounter problems. Can I consider my system safe if pacman -Syu did not upgrade anything (everything up to date) after doing the pacman -Sy command ?


New to arch --I was thinking that it was a great idea to follow my friends advice and give it a try even though the sole OS I used before was windows smile))))))
I shall persist and try a lot I guess xD

Offline

Board footer

Powered by FluxBB