You are not logged in.

#1 2023-05-12 22:49:06

Sandalwood42
Member
Registered: 2023-05-12
Posts: 6

Could one have pacman automatically ignore packages on update?

I have the chaotic-aur mirrorlist enabled in pacman, but my work wifi blocks packages from being updated from the chaotic-aur mirrorlist for a couple of reasons. So when I run

pacman -Syu

on my work wifi and pacman attempts to update packages from the chaotic-aur, it cancels the whole update operation (due to a "self-signed certificate" error). Is there a way to have pacman proceed with the update despite a couple of packages not being able to be downloaded? I've been adding individual packages to the "ignore" list, but it's a bit of a band-aid fix (plus, I have to comment that when I want to update them at home).

I thought this question belongs in the newbie section because it seems like it should be a relatively simple fix.

Offline

#2 2023-05-12 22:58:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,471
Website

Re: Could one have pacman automatically ignore packages on update?

You'd likely be best just having two pacman.conf files, e.g, your regular /etc/pacman.conf but without the chaotic-aur section, then another, perhaps /etc/pacman-chaotic.conf, with the following:

Include = /etc/pacman.conf

[chaotic-aur]
Server=<fill-in-url-here>

Then update at work (or anywhere else) as normal, but occasionally include the chaotic packages when at home:

pacman --config /etc/pacman-chaotic.conf -Syu

Note that strictly speaking this would be doing partial upgrades.  But the only thing that could break would be the chaotic-aur packages when the main repo packages are updated but they are not.  Though this assumes you are not replacing any main repo packages with a chaotic-aur version.  If that is the case, there is not safe approach to this.

If you wanted you could also likely automate this with a wrapper script so you can just run the same command anywhere and it will determine which config to use.  For example, something like the following:

#!/bin/sh

conf=

ping -c 1 <chaotic-url-here> >/dev/null 2>&1 && conf=-chaotic

pacman --config /etc/pacman${conf}.conf $@

Last edited by Trilby (2023-05-12 23:06:33)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB