Pamac doesn't detect new updates in Unstable branch

Noticed a little oddity since switching to the Unstable branch: Pamac is no longer able to detect updates, if I check for new packages from it I’m instantly told there are none. Using sudo pacman -Syu does however reveal a few new packages every few hours. Is this a bug or did I forget to do something?

When you switch branches, make sure that you sync the mirrors from Pamac Preferences and then you Refresh database.

Experienced the same the last days. Pamac didn’t discover updates after boot with the automatic checkupdates. Pacman did it. It’s unrelated to unstable branch I think.
After switching to a different mirror in the region it works again as far as I observed. Will observe longer.

I followed the instructions on the wiki page and should have done that from what I’m aware.

pacman-mirrors --api --set-branch unstable
pacman-mirrors --fasttrack 5
pacman -Syyuu

There might be the case of the packages cache … clean it with
sudo pacman -Scc
or from Pamac and then check again.

No matter the branch in use - the keys to stable system

  1. always sync and update when adding new packages
  2. do not sync your system too frequently
    (unless required otherwise - once or twice a week is usually sufficient)

This will steer you clear of 99% of all issues

1 Like

I’d suggest following the Mirror Check Service link - you can click to sort them.
You’ll notice that Unstable is last in line for synchronisation…

I found the best method for me was to delete the config, then select a

Global server.

Also a couple of alias:

alias mirror='pacman-mirrors' # List my mirrors
alias set-unstable='sudo pacman-mirrors --country all --api --protocols all 
alias mirrors='sudo pacman-mirrors --interactive && sudo pacman -Syyu'
alias mirrorset=' sudo pacman-mirrors --fasttrack '

However, you should only do this once if you’re having a real problem (Thailand was just tooooo far behind on Unstable).

I messed up my system and ended up doing a fresh build, but I did find that Global mirrors are best on unstable.

Just a guess but I’m pretty sure pacman -Syyuu should be pacman -Syyu.

I’ve also experienced this for a month. I’ve been on Unstable for well over a year.
Hitting Refresh databases has partially fixed the issue. Now pamac notifies me of updates (if there are any) at the set check interval (6 hours), but just pressing the Refresh button in the Updates tab doesn’t seem to do anything; the last check timestamp doesn’t change.

For me there was also no discovery when using pamac checkupdates. No updates on unstable made me suspicious. It came after an update a few days ago.
Executing Pacman -Syy right after pamac checkupdates showed the updates. Both go to the same mirrors, so I doubt it’s mirrors either.

Yesterday and today after changing mirrors it seems ok again.

Could it be related to this:

[2022-07-17T18:31:24+0200] [ALPM] upgraded snapd (2.56.2-1 -> 2.56.3-1)

I set it up like that to allow downgrade when switching back to Stable.

And indeed pamac checkupdates won’t notice them but sudo pacman -Syu right after will.

    ~  pamac checkupdates                                                                                          ✔ 
Your system is up to date.
    ~  sudo pacman -Syu                                                                                            ✔ 
:: Synchronizing package databases...
 core                                         164.1 KiB  1007 KiB/s 00:00 [##########################################] 100%
 extra                                       1863.9 KiB  5.64 MiB/s 00:00 [##########################################] 100%
 community                                      7.1 MiB  10.4 MiB/s 00:01 [##########################################] 100%
 multilib                                     175.8 KiB   403 KiB/s 00:00 [##########################################] 100%
:: Starting full system upgrade...
:: Replace go-ipfs with community/kubo? [Y/n] Y
resolving dependencies...
looking for conflicting packages...

Packages (8) electron-19.0.9-1  fwupd-1.8.3-1  go-ipfs-0.13.1-1 [removal]  kubo-0.14.0-1  libbpf-0.8.1-1
             mumble-1.4.230-13  poco-1.12.1-1  xapp-2.2.14-1

HHhHhhmmm interesting.

Do you see any errors, warnings or failures in the output from the following:

systemctl status pamac-daemon
journalctl -b -g pamac-daemon

Regarding repos, thus updates, in general:

  • I disabled/masked the systemd timer pamac-mirrorlist.
  • I only update the mirrorlist after there is an Announcement. I run both pacman-mirrors -c and pacman-mirrors -f, and then pacman-mirrors --status.
Examine pacman-mirrors data files

The purpose of this script was to examine the various data files used by pacman-mirrors. jq is used to process the json data. The default country is United_States, but can be changed on the command line. As is, this script only handles a single country name.

#!/bin/bash
#
# Examine pacman-mirrors data files
#
declare -- country="${1:-United_States}" 
declare -- global='/usr/share/pacman-mirrors/mirrors.json'
declare -- globalStatus='/var/lib/pacman-mirrors/status.json'
declare -- custom='/var/lib/pacman-mirrors/custom-mirrors.json'
declare -- runtime='/etc/pacman.d/mirrorlist'
declare -- globalCnt="$( jq --arg country "${country}" '[.[] | select(.country == $country)] | length'   "${global}" )"
declare -- globalStatusCnt="$( jq --arg country "${country}" '[.[] | select(.country == $country)] | length'  "${globalStatus}" )"
declare -- customCnt="$( jq --arg country "${country}" '[.[] | select(.country == $country)] | length'  "${custom}" )"
declare -- runtimeCnt="$( grep -E -c -e '^[^ #]' "${runtime}" )"
declare -- rc=0

diff -b  <( jq -r '.[] | "\(.country) \(.url)"'  "${globalStatus}" | sort )  \
         <( jq -r '.[] | "\(.country) \(.url)"'  "${global}"  | sort ) 2>/dev/null 1>&2
rc=$?

printf -- 'Global and Status mirror pools are '
(( rc == 0 )) && printf -- 'the same\n' || printf -- 'different\n'

printf -- '  %s [cnt: %s]\n  %s [cnt: %s]\n  %s [cnt: %s]\n  %s [cnt: %s]\n' \
  "${global}" "${globalCnt}" "${globalStatus}" "${globalStatusCnt}" \
  "${custom}" "${customCnt}" "${runtime}" "${runtimeCnt}"

printf -- '\nContent of files, filtered by country [%s]:\n  %s\n  %s\n  %s\n\n' \
"${country}" "${global}" "${globalStatus}" "${custom}"

jq --raw-output --arg country "${country}" '.[] |
  select( .country == $country ) |
    map( tostring )|join( "," )' \
    "${global}" "${globalStatus}" "${custom}" |
    nl --number-width=4 --number-separator=' ' --number-format=rn
pacman-mirrors --status

If you don’t have the latest database - e.g. your primary mirror has not yet synced - then you will see no update.

If you run pacman -Syu - you will see if updates are available - as the y argument syncs the database if newer exist - using double yy will force sync of database even if they are the same.

The reason you have this issue is likely due to the pamac-mirrorlist.timer which rewrites the mirrorlist every Thursday at 7 (A.M. for the 12 hour people) - but the databases is not updated accordingly - thus even you may have an up-to-date primary mirror - the databases does not match - thus no updates in pamac.

2 Likes

Interesting… I’d already put an alias for my current ‘mirror’ check, however I’d put in a redundant sudo, I guess only needed if you’re writing mirrors…

alias mirror='pacman-mirrors' # List my mirrors

It appears the ‘–status’ flag is redundant.

1 Like

Aha: There are issues with a few mirrors there.

    ~  pacman-mirrors --status                                                                                     ✔ 
Local mirror status for unstable branch
Mirror #1   OK  00:09   Global         https://mirrors.manjaro.org/repo/
Mirror #2   OK  00:07   Austria        https://mirror.easyname.at/manjaro/
Mirror #3   --  00:27   Belgium        https://mirror.futureweb.be/manjaro/
Mirror #4   --  00:41   Switzerland    https://mirror.init7.net/manjaro/
Mirror #5   OK  00:14   Germany        https://mirror.moson.org/manjaro/
Mirror #6   OK  00:11   United_States  https://mirror2.sandyriver.net/pub/manjaro/
Mirror #7   --  00:23   Canada         https://osmirror.org/manjaro/
Mirror #8   --  20:41   Taiwan         http://free.nchc.org.tw/manjaro/

Is it a problem on their end? Did my transition perhaps catch them during a time when some servers weren’t up to date? What command should I use exactly to resolve such incomplete sync?

Mirrors sync at different times - the command shows how the mirror’s status is compared to the status registered at the mother ship.

There is nothing wrong with the mirrors - they just sync at different times.

2 Likes

Got it. So that explains my issue too correct? Pamac only detects updates when whichever mirror it decided is the main one has been updated, and if that happens to sync more slowly it won’t see updates. Or it only accepts there are updates if all mirrors agree?

According to the Manjaro Mirror wiki page, mirrors should sync every 6 hours. I suspect that is a suggestion. It’s important to either look at the Manjaro repo webpage or run pacman-mirrors. As @Ben mentioned --status is the default. This command should show the exact same info (when last synced) as the repo webpage (when filtered the same as pacman-mirrors).

pacman-mirrors -f shows access time and writes the mirrors in fastest first to /etc/pacman.d/mirrorlist. I ran pacman -Syy --debug and the first mirror in /etc/pacman.d/mirrorlist was used.

I mangled the url for the first, ran pacman -Syy --debug and the second mirror in /etc/pacman.d/mirrorlist was used.

Any version of pacman-mirrors that creates a custom mirror list (i.e., --country) is then used in pacman-mirrors -f. So in the directory /var/lib/pacman-mirrors, either custom-mirrors.json or
status.json is going to be used to create /etc/pacman.d/mirrorlist.

1 Like

Found the cause why Pamac did not discover packages to update automatically or with pamac checkupdates in my case.
For some reason multilib.db.sig.part got stuck last time and kept the db.lck remaining in /var/tmp/pamac/dbs/db.lck. pamac upgrade of course returned a sync error due to existing lock. Renaming/deleting db.lck is the way to go. Therefore, no issue updating with pacman.

1 Like

Wow.
Maybe add an alias for that :wink: at least extend your history to let it linger in memory for a while.