You are not logged in.

#1 2019-06-24 22:14:16

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

[Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

I have created an AUR package that requires that the version of the installed kernel be greater than or equal to 5.1: https://aur.archlinux.org/packages/gosearch-git/

...
depends=('linux>=5.1')
...

The problem is that if I have installed linux-ck and/or linux-zen but no linux (the default kernel of Arch), when I try to install this package, it wants to install the default kernel (linux) and it doesn't recognize linux-ck or linux-zen.
What's wrong?

Last edited by j1simon (2019-06-25 11:55:09)

Offline

#2 2019-06-24 22:29:27

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

Why do you think linux-ck and linux-zen should match depends=('linux>=5.1') ?

Offline

#3 2019-06-25 07:45:27

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

Because are linux kernel too?
In any case, the problem is that "provides" in both packages (linux-zen and linux-ck) doesn't provides "linux". But "depends" doesn't allow "OR" dependencies.
I think there is no solution for this problem.

Last edited by j1simon (2019-06-25 07:48:48)

Offline

#4 2019-06-25 07:47:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

That depends array matches package names, not classes...

man PKGBUILD

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2019-06-25 07:51:46

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

jasonwryan wrote:

That depends array matches package names, not classes...

man PKGBUILD

This isn't true at all. depends matches with provides.
By that when I put depends=('linux>=5.1') matches with all these kernels:

linux>=5.1 (linux-surface3-git, linux-xanmod-git, linux-galliumos, linux-ryzen-amd-staging-drm-next-git, linux-ryzen-git, linux-surfacepro3-git, linux-aarch64-rock64-bin, linux-ec2, linux-pf-lts, linux-git, linux-bfq-mq, linux-asus-aura, linux-bfq-mq-git, linux-dragon, linux-ck-reiser4, linux-libre, linux-linode, linux-aarch64-raspberrypi-bin, linux-lts316, linux-amd-raven, linux-xanmod, linux-lts414, linux-lts49, linux-slim, linux-new, linux-lts44)

Last edited by j1simon (2019-06-25 07:55:03)

Offline

#6 2019-06-25 07:56:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

I have no idea what you are trying to say...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2019-06-25 08:06:45

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

$ pacman -Qi linux-ck-skylake
Name            : linux-ck-skylake
Version         : 5.1.14-1
...
Provides        : linux-ck=5.1.14
...

$ pacman -Qi linux-zen       
Name            : linux-zen
Version         : 5.1.14.zen1-2
...
Provides        : None
...

If a package does not specify a provides the package name is that provides.

In this case I don't find any valid solution with the current limitations of PKGBUILD. This is not allowed:

....
depends=('linux>=5.1' OR 'linux-zen>=5.1' OR 'linux-ck>=5.1')
....

Offline

#8 2019-06-25 09:18:34

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

As you correctly noted, neiher of the common Linux kernel packages provide a common meta package via provides.
I you really need such a thing, you can ask the maintainers of the respective linux packages whether they are willing to provide such a common meta package via a feature request on the bug tracker.

Offline

#9 2019-06-25 09:52:21

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

schard wrote:

As you correctly noted, neiher of the common Linux kernel packages provide a common meta package via provides.
I you really need such a thing, you can ask the maintainers of the respective linux packages whether they are willing to provide such a common meta package via a feature request on the bug tracker.

If they did that, you could only have one kernel installed. In my case, for example, I have linux-zen and linux-ck. With that change you propose they would be mutually exclusive.
The solution would be to expand the depends to allow the conditional OR.
I'm not the only one who missed that functionality.. Doing a search in the forums reveals several messages about it. In some cases it can be solved in another way but in others, as in this one, there is no possible solution.

Offline

#10 2019-06-25 09:57:00

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

Provides != conflicts.

Offline

#11 2019-06-25 10:34:02

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

schard wrote:

Provides != conflicts.

https://wiki.archlinux.org/index.php/PKGBUILD#conflicts

Offline

#12 2019-06-25 10:48:27

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

Have you considered adding a ConditionKernelVersion requirement to the service file instead of the uname check you switched to in the .install file?
Please consider not enabling the service in the .install file but leave that to the user.

Offline

#13 2019-06-25 10:55:32

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

j1simon wrote:

This is the exact opposite of

Wiki wrote:

Packages providing the same item can be installed side-by-side, unless at least one of them uses a conflicts array.

https://wiki.archlinux.org/index.php/PKGBUILD#provides
Only one of these statements can be true.
And since neither of the linux packages uses a conflicts array, this should work as described by me.

Last edited by schard (2019-06-25 10:58:22)

Offline

#14 2019-06-25 11:40:08

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

Thank you both. I had the wrong concepts.
I'll look into adding ConditionKernelVersion to the .service file.

Offline

#15 2019-06-25 14:47:08

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

loqs wrote:

Have you considered adding a ConditionKernelVersion requirement to the service file instead of the uname check you switched to in the .install file?
Please consider not enabling the service in the .install file but leave that to the user.

I'm trying to use this option (I've read https://www.freedesktop.org/software/sy … hitecture= ):

[Unit]
Description=gosearch file indexing server
ConditionKernelVersion=">=5.1"

[Service]
Type=simple
ExecStart=/usr/bin/gosearchServer

[Install]
WantedBy=multi-user.target

But it refuses to start:

$ sc-status gosearch.service
● gosearch.service - gosearch file indexing server
   Loaded: loaded (/etc/systemd/system/gosearch.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
Condition: start condition failed at Tue 2019-06-25 16:42:15 CEST; 2s ago
           └─ ConditionKernelVersion=">=5.1" was not met

My kernel is 5.1.14-1-ck-skylake

I have searched but I don't find any examples of using this variable so I don't know what I'm doing wrong. Any help?

Offline

#16 2019-06-25 16:32:00

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

Please try removing the quotes from the test

ConditionKernelVersion=>=5.1

Offline

#17 2019-06-25 16:34:50

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [Solved]depends=('linux>=5.1') doesn't recognize linux-ck or linux-zen

loqs wrote:

Please try removing the quotes from the test

ConditionKernelVersion=>=5.1

Thank you too much. It was that.

Offline

Board footer

Powered by FluxBB