Skip to main content
Topic: How to partially block Archlinux repositories (Read 485 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to partially block Archlinux repositories

Hello,

Firefox appears in both Artix (firefox 108) and Arch (firefox 109) repositories. As I am also using some firefox-i18n-** packages that are only present in the Arch repositories, I got firefox 109 installed by the last upgrade. In this cas, it is not really a problem but I would like to know if there is a possibility to prevent an upgrade from the Arch repositories in the case a package is offered by both (Arch & Artix) repositories?

Have a nice day

Re: How to partially block Archlinux repositories

Reply #1
I assume you added arch repos in pacman.conf at the end
Create problems which don't have solution

Re: How to partially block Archlinux repositories

Reply #2
I assume you added arch repos in pacman.conf at the end
Yes, I did  :)

Code: [Select]
...
#[gremlins]
#Include = /etc/pacman.d/mirrorlist

[system]
Include = /etc/pacman.d/mirrorlist

[world]
Include = /etc/pacman.d/mirrorlist

#[galaxy-gremlins]
#Include = /etc/pacman.d/mirrorlist

[galaxy]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the lib32 repositories as required here.

#[lib32-gremlins]
#Include = /etc/pacman.d/mirrorlist

[lib32]
Include = /etc/pacman.d/mirrorlist

[universe]
Server = https://universe.artixlinux.org/$arch
Server = https://mirror1.artixlinux.org/universe/$arch
Server = https://mirror.pascalpuffke.de/artix-universe/$arch
Server = https://artixlinux.gontinuum.space/artixlinux/universe/os/$arch
Server = https://mirror1.cl.netactuate.com/artix/universe/$arch
Server = https://ftp.crifo.org/artix-universe/

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

# ARCH REPOSITORIES
[extra]
Include = /etc/pacman.d/mirrorlist-arch

[community]
Include = /etc/pacman.d/mirrorlist-arch

[multilib]
Include = /etc/pacman.d/mirrorlist-arch


Re: How to partially block Archlinux repositories

Reply #3
The "problem" might come from the fact that the firefox-i18n-** packages are only available in the Arch repositories. And so, if one of thiese packages has to be upgraded, pacman will look at the dependencies and decide to install the Arch-package while the Artix-package cannot yet be upgraded. (?)

Re: How to partially block Archlinux repositories

Reply #4
To fix this from a user perspective, you could stop them from being automatically upgraded with -Syu by adding a line in /etc/pacman.conf:
IgnorePkg   = pkg1 pkg2 pkg3
Then when you see you do want to upgrade you specify them with -S (perhaps you could make a script or alias if there were a lot) and they will upgrade with a warning they are listed as  IgnorePkg.

In terms of the distro packaging it should be possible to add versions to the dependency list:

man PKGBUILD:
 depends (array)
 An array of packages this package depends on to run. Entries in this list should be surrounded with single quotes and contain at least the package name. Entries can also include a version requirement of the form name<>version, where <> is one of five comparisons: >= (greater than or equal to), <= (less than or equal to), = (equal to), > (greater than), or < (less than).

Edit: However, checking on this, it has already been done, at least in firefox-i18n-ach which I looked at, so the problem you describe shouldn't occur ?

  depends=("firefox>=$pkgver")

Is this not working, and if not, for what packages?

Re: How to partially block Archlinux repositories

Reply #5
...

  depends=("firefox>=$pkgver")

Is this not working, and if not, for what packages?
The "problem" is that it is working. firefox-i18n-xx can be upgraded to version 109. Version 109 appears in the Arch repositories, and so, it upgrades both  firefox-i18n-xx and firefox from the arch repositories, while the firefox version in de Artix repositories is 108.
In this case, it is not really a problem but it could be annoying with other packages (for example those linked to a dinit/openrc/runit/s6-package)

Re: How to partially block Archlinux repositories

Reply #6
You shouldn't get a version mismatch:
Code: [Select]
/var/cache/pacman/pkg$ sudo pacman -U firefox-108.0.2-1-x86_64.pkg.tar.zst
$ pacman -Qi firefox |grep Version
Version         : 108.0.2-1
$ sudo pacman -S firefox-i18n-ach
resolving dependencies...
looking for conflicting packages...

Packages (2) firefox-109.0-1.1  firefox-i18n-ach-109.0-1

Total Installed Size:  239.84 MiB
Net Upgrade Size:        2.13 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                                                                            [---------------------------------------------------------------] 100%
(2/2) checking package integrity                                                                          [---------------------------------------------------------------] 100%
(2/2) loading package files                                                                               [---------------------------------------------------------------] 100%
(2/2) checking for file conflicts                                                                         [---------------------------------------------------------------] 100%
(2/2) checking available disk space                                                                       [---------------------------------------------------------------] 100%
:: Processing package changes...
(1/2) upgrading firefox                                                                                   [---------------------------------------------------------------] 100%
(2/2) installing firefox-i18n-ach                                                                         [---------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/2) Updating icon theme caches...
(2/2) Updating the desktop file MIME type cache...
So when I deliberately downgrade firefox then install firefox-i18n-ach, it sees the version dependency and automatically upgrades Firefox too so it matches! But now it seems what you are describing is a situation where it takes Firefox from extra and not the Artix repos due to the temporary version mismatch, because it cannot find the correct version elsewhere? I initially thought you were worried about getting the newer version of the i18n packages alongside the older firefox, which the version dependency should block.
I suppose enabling gremlins might at least cut the time between packages appearing in Arch vs Artix repos, although that's probably not much of a fix!