You are not logged in.

#1 2019-11-15 09:09:20

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 546
Website

pacman -Syu downgrades

So, today my repo was out of sync and I encountered this:

$ LANG=C sudo pacman -Syu repotool
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                                                                                           4.7 MiB  5.20 MiB/s 00:01 [#############################################################################] 100%
 homeinfo                                                                                            8.8 KiB  2.16 MiB/s 00:00 [#############################################################################] 100%
 homeinfo.sig                                                                                      310.0   B  0.00   B/s 00:00 [#############################################################################] 100%
warning: downgrading package repotool (1.1.6-2 => 1.1.6-1)
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) repotool-1.1.6-1

Total Installed Size:  0.02 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 

The man page says

man pacman wrote:

       -u, --sysupgrade
           Upgrades all packages that are out-of-date. Each currently-installed package will be examined and upgraded if a newer package exists. A report of all packages to upgrade will be presented, and
           the operation will not proceed without user confirmation. Dependencies are automatically resolved at this level and will be installed/upgraded if necessary.

           Pass this option twice to enable package downgrades; in this case, pacman will select sync packages whose versions do not match with the local versions. This can be useful when the user switches
           from a testing repository to a stable one.

           Additional targets can also be specified manually, so that -Su foo will do a system upgrade and install/upgrade the "foo" package in the same operation.

I did not specify -u twice and yet pacman wants to downgrade.
It does only happen, when I specify a package.

$ LANG=C sudo pacman -Syu 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 homeinfo is up to date
:: Starting full system upgrade...
warning: repotool: local (1.1.6-2) is newer than homeinfo (1.1.6-1)
 there is nothing to do

The last line on the man excerpt only states "install" and "upgrade" and does not suggest a downgrade beahviour. Is this a bug or an undocumented feature?

Last edited by schard (2019-11-15 09:10:04)

Offline

#2 2019-11-15 09:15:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 7,973

Re: pacman -Syu downgrades

Explicitly specifying the package applies the -S (as in install) operation to that package, the upgrading logic only holds for non explicitly defined packages afaik. But yes maybe the wording could be clarified here.

Last edited by V1del (2019-11-15 09:18:42)

Offline

#3 2019-11-16 00:34:59

apg
Developer
Registered: 2012-11-10
Posts: 192

Re: pacman -Syu downgrades

`pacman -S $pkg` syncs $pkg to the current repo version; adding -u does not affect that.

Offline

Board footer

Powered by FluxBB