You are not logged in.

#1 2024-10-03 12:21:50

earch
Member
Registered: 2024-10-03
Posts: 4

Allow repo specification in pacman's --ignore option

Currently, we can install packages from specific repos like this:

pacman -S repo/package

Proposal: Apply the same logic to the --ignore option.

Example use:

pacman -Syu --ignore=repo/package

Why?

  • Allows for quick fixes without disabling entire repos

  • More control over updates and troubleshooting

For example, I have enabled a third-party repository that has compiled version of the extra repository for v3 CPUs. While it generally works great and provides improved performance, sometimes you might encounter a broken package.
When I run pacman -Syu, I will update to a broken package from this third-party repo.
My proposal would be particularly useful in this scenario, allowing users to ignore problematic packages from specific repos during system updates.
On the next day you could file an issue for the third-party repo, but right now you want to get the thing working,

And in general I think it should work that way because -S does.

Thoughts?

Last edited by earch (2024-10-03 12:24:16)

Offline

#2 2024-10-03 12:44:26

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,484
Website

Re: Allow repo specification in pacman's --ignore option

earch wrote:

Thoughts?

Meh.

Offline

#3 2024-10-03 12:46:34

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

Re: Allow repo specification in pacman's --ignore option

Following from your example, what good would this option do?  If you are doing a full system upgrade and you want to ignore "package" entirely, then you'd just pass --ignore=package.  In contrast, if you wanted to do the full system upgrade but get "package" from the regular [extra] repo rather than your v3 repo, you should be able to use `pacman -Syu extra/package`.


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

Offline

#4 2024-10-05 11:09:06

earch
Member
Registered: 2024-10-03
Posts: 4

Re: Allow repo specification in pacman's --ignore option

I don't want to ignore the package entirely. I just want to ignore the broken package from the v3 repository for now, until the fix arrives.
I can add it to the pacman.conf in the form of an IgnorePkg line and forget about it until the package is fixed.

 IgnorePkg = repo/package 

That way I would still get updates for the package, from the official extra repository.

Again, this seems logical anyway, since I can do pacman -S repo/package, so why can't I do it with ignore? Consistency is great

Last edited by earch (2024-10-05 11:13:15)

Offline

#5 2024-10-05 11:26:48

Awebb
Member
Registered: 2010-05-06
Posts: 6,653

Re: Allow repo specification in pacman's --ignore option

It already behaves that way for IgnorePkg and not for --ignore?

Offline

#6 2024-10-05 12:51:06

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

Re: Allow repo specification in pacman's --ignore option

And ... did you read the second half of my post?  What's wrong with `pacman -Syu extra/package`?  Does this not get the package from extra?

Last edited by Trilby (2024-10-05 12:51:30)


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

Offline

#7 2024-10-05 12:56:18

earch
Member
Registered: 2024-10-03
Posts: 4

Re: Allow repo specification in pacman's --ignore option

Trilby wrote:

And ... did you read the second half of my post?  What's wrong with `pacman -Syu extra/package`?  Does this not get the package from extra?

It does, but when you run pacman -Syu again (without ignore option), it automatically gets the v3 package because the v3 repo has a higher priority.


Awebb wrote:

It already behaves that way for IgnorePkg and not for --ignore?

No, no repo specification for both.

Last edited by earch (2024-10-05 12:57:49)

Offline

#8 2024-10-05 13:16:11

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

Re: Allow repo specification in pacman's --ignore option

Why would you run it again?  I'm proposing an alternative to the ignore option that's the point.


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

Offline

#9 2024-10-05 13:59:26

seth
Member
Registered: 2012-09-03
Posts: 60,073

Offline

#10 2024-10-05 15:34:22

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

Re: Allow repo specification in pacman's --ignore option

I thought this sounded familiar.


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

Offline

#11 2024-10-05 16:38:17

Awebb
Member
Registered: 2010-05-06
Posts: 6,653

Re: Allow repo specification in pacman's --ignore option

Trilby wrote:

Why would you run it again?  I'm proposing an alternative to the ignore option that's the point.

I'll help, I'm fluent in disorganized. He meant to say: Next time you -Syu until the actual issue has been resolved, it'll grab the package from the wrong repo or skip it entirely, because you can't specify a repo/package hierarchy in the pacman.conf. That's why I was asking if that's already the case. OP's initial focus was on --ignore, hence the misunderstanding. Your solution is a valid replacement for --ignore, but there is none for the ignore array in pacman.conf.

Last edited by Awebb (2024-10-05 16:39:27)

Offline

#12 2024-10-05 18:08:04

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

Re: Allow repo specification in pacman's --ignore option

The pacman config option came up quite late in this thread.  The --ignore flag even on the command line will not get the intended result, but passing extra/package will.  An alias / function could just as easily (arguably more easily) make this automatic as a pacman config option.  The OP wanted "pacman -Syu --ignore=v3repo/package" to result in package coming from the extra repo, but that flag/option doesn't work that way - but "pacman -Syu extra/package" does get the result the OP was seeking ... and it's shorter!

Last edited by Trilby (2024-10-05 18:09:38)


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

Offline

#13 2024-10-05 19:39:42

progandy
Member
Registered: 2012-05-17
Posts: 5,274

Re: Allow repo specification in pacman's --ignore option

Trilby wrote:

The pacman config option came up quite late in this thread.  The --ignore flag even on the command line will not get the intended result, but passing extra/package will.  An alias / function could just as easily (arguably more easily) make this automatic as a pacman config option.  The OP wanted "pacman -Syu --ignore=v3repo/package" to result in package coming from the extra repo, but that flag/option doesn't work that way - but "pacman -Syu extra/package" does get the result the OP was seeking ... and it's shorter!

In that case you also want to add --needed so the package will not be reinstalled if the version does not change. This can then be wrapped into an alias or a custom update script.

pacman -Syu --needed extra/package

Last edited by progandy (2024-10-05 19:40:29)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#14 2024-10-06 19:22:01

earch
Member
Registered: 2024-10-03
Posts: 4

Re: Allow repo specification in pacman's --ignore option

It would work just as well! But why is this approach better?
I'm not saying it isn't, I just don't know, both achieve the same result in different way, and I'm just curious.


Trilby wrote:

The pacman config option came up quite late in this thread.  The --ignore flag even on the command line will not get the intended result, but passing extra/package will.  An alias / function could just as easily (arguably more easily) make this automatic as a pacman config option.  The OP wanted "pacman -Syu --ignore=v3repo/package" to result in package coming from the extra repo, but that flag/option doesn't work that way - but "pacman -Syu extra/package" does get the result the OP was seeking ... and it's shorter!


I suggested a change for the entire ignore system - both the --ignore option and IgnorePkg.
I assume under the hood they use the same ignore system, and if you modify it, both --ignore and IgnorePkg would get repo specification feature.

Offline

#15 2024-10-06 19:41:10

seth
Member
Registered: 2012-09-03
Posts: 60,073

Re: Allow repo specification in pacman's --ignore option

I merely meant to point out that the topic had been brought up and elaborate on Allans rather brief "Meh" comment (cause we've been there)
Functionally both threads (and the bug) should be the exact same (you want to "ignore" a repo to "prefer" another - tomato/potato…)

Offline

#16 2024-10-07 01:36:33

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,484
Website

Re: Allow repo specification in pacman's --ignore option

The "meh" is more my willingness to implement this in pacman big_smile

Offline

#17 2024-10-07 07:28:01

seth
Member
Registered: 2012-09-03
Posts: 60,073

Re: Allow repo specification in pacman's --ignore option

Have you considered that it's an opportunity to break something? tongue

At a glance, a feature to "sub-structure repos by package" to mix-and-match your custom repo sounds nice.
Cherry-pick package A from repo α, but generally repo β over repo α.

This will come back to bite you once the involved repos don't only hold leaf packages.
If package A depends on package A' from repo α that's also provided by repo β, but as incompatible build (eg. lacking a feature switch), package A now resides on a broken dependency.

This can generally be a problem when using multiple 3rd party repos (and intersecting dependencies), but you're now putting the the responsibility onto every single user, basically re-creating the AUR situation within the pacman context.
Manually selecting the repo for each package (--needed extra/package) would then be akin to the makepkg situation while abstracting it in a config to create a repo-blend is more like the behavior of pacman wrapping AUR helpers (yay, paru, etc.)

Offline

Board footer

Powered by FluxBB