You are not logged in.

#1 2019-06-18 08:59:32

Ashark
Member
Registered: 2017-06-01
Posts: 31

How to force install conflicting packages with pacman?

I am in situation that I need to install a package, which conflicts with another package that is installed.
I know what I am doing and want to force install my package. But I cannot see such possibility.

There is --overwrite option, but it is irrelevant to my case. And there are no actually conflicting files in conflicting packages that I am talking about.
I want something like --assume-uninstalled or --ignore-conflicts option.
Is there a way to do so? Or should I create a feature request for pacman project?

Offline

#2 2019-06-18 09:07:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,716

Re: How to force install conflicting packages with pacman?

Fix the packages, if they are not actually conflicting then their PKGBUILDs should be fixed to not be conflicting.

Also post a tangible actual real word example, questions like these without context often miss the bigger picture.

Online

#3 2019-06-18 09:08:16

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: How to force install conflicting packages with pacman?

Ashark wrote:

I know what I am doing

But we don't know what you are doing. Why do you want to force it? If it conflicts, why can't you just uninstall the other package? If it is a dependency for another package, will uninstalling it not break that dependency?


pkgshackscfgblag

Offline

#4 2019-06-18 09:22:50

Ashark
Member
Registered: 2017-06-01
Posts: 31

Re: How to force install conflicting packages with pacman?

The real world example is the following: previously I have installed amdvlk package, which contained the following array: conflicts=('amdvlk-git' 'amdvlk-deb' 'vulkan-amdgpu-pro' 'amdgpu-pro-vulkan').
Now I am preparing amdgpu-pro for arch. And there is a proprietary implementation there. I have created a vulkan-amdgpu-pro package (locally, not yet in aur) which is not conflicting and will not be conflicting with amdvlk. I wanted to install it to be able to test two implementations.

Yes, the PKGBUILD of amdvlk package should definitely be fixed. I will ask a maintainer. Of course I can rebuild amdvlk with edited conflicts array. But I was just wondering if it is possible to force install conflicting packages with pacman.

Offline

#5 2019-06-18 10:05:59

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,858
Website

Re: How to force install conflicting packages with pacman?

It used to be, but that option (--force) was removed because it was misused and caused more problems than it solved.

If you "know what you are doing", you could remove the %CONFLICTS% declaration from the installed package's database entry, but that's a hacky workaround. The correct solution is to fix the package(s).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#6 2019-06-18 10:16:59

Ashark
Member
Registered: 2017-06-01
Posts: 31

Re: How to force install conflicting packages with pacman?

@WorMzy I see, it warns that --force is deprecated and instead of force installation asks if I want remove previous package.
Thanks for idea. But yeah, in my case it's easier to just rebuild a package.

Offline

#7 2019-06-23 18:35:20

NuSkool
Member
Registered: 2015-03-23
Posts: 141

Re: How to force install conflicting packages with pacman?

A little late but curious if (-dd to skip all checks) would work for this? I've never used (needed) dd with -S, only -R.

pacman -Sdd <package> 
$ pacman -Sh
usage:  pacman {-S --sync} [options] [package(s)]
options:
  -b, --dbpath <path>  set an alternate database location
  -c, --clean          remove old packages from cache directory (-cc for all)
  -d, --nodeps         skip dependency version checks (-dd to skip all checks)
...
...

Edit: Not to imply this would be a better solution than fixing the actual issue here.

Last edited by NuSkool (2019-06-23 18:39:28)

Offline

#8 2019-06-23 19:38:58

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

Re: How to force install conflicting packages with pacman?

NuSkool, the -d flag is for skipping dependency checks, it has no impact on checking for conflicting packages.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2019-06-24 00:52:59

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: How to force install conflicting packages with pacman?

There is no way to ignore conflicts, nor has there ever been.  --force had nothing to do with conflicting packages.

Offline

#10 2022-03-04 17:01:03

xerus
Member
Registered: 2021-05-11
Posts: 34

Re: How to force install conflicting packages with pacman?

I had the issue of a self-created AUR package which had wrong conflicts declarations but also failed to compile now.
If you are really sure what you are doing, this can be fixed by editing `/var/lib/pacman/local/<package>/desc`

Offline

#11 2022-03-04 17:05:39

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,858
Website

Re: How to force install conflicting packages with pacman?

Mod note: Closing this old topic.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB