You are not logged in.
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
-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 (2020-02-11 13:53:16)
Offline
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
`pacman -S $pkg` syncs $pkg to the current repo version; adding -u does not affect that.
Offline