You are not logged in.

#1 2021-12-16 11:04:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

[Solved] Would renaming depends array be a good idea ? Answer : No

Makepkg implicitly treats everything in depends array as makedepends and installs them when building.
Pacman however treats everything in depends as needed at run time .

For me runtime dependencies are a entirely different beast then buildtime dependencies and this inconsistency has bugged me for a long time.

A possible solution is to rename depends to runtimedepends and let makepkg treat runtimedepends as informational only.
Makedepends would then be required to include everything needed for building[1] .

Do others feel  this would be a good idea ?

Does other packagemanagement software use a strict separation between build and runtime depends ?


Lone_Wolf



[1] for consistency reasons this would also mean adding base-devel or its individual members to makedepends becomes mandatory

Last edited by Lone_Wolf (2021-12-19 13:33:42)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2021-12-16 11:15:31

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

Re: [Solved] Would renaming depends array be a good idea ? Answer : No

A workaround is to declare the depends inside the package() function, so they only get picked up by makepkg during the packaging step (which essentially makes those runtime dependencies).


pkgshackscfgblag

Offline

#3 2021-12-17 20:42:01

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Would renaming depends array be a good idea ? Answer : No

I hadn't realised that method works for PKGBUILDs with just one package() function but it does.

Thanks for this tip, Ayekat.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2021-12-18 03:23:10

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

Re: [Solved] Would renaming depends array be a good idea ? Answer : No

That is the work around for people who really want this.  The vast majority of the time depends are also needed while building, so specifying them twice (as rundepends and makedepends) becomes redundant.

Offline

#5 2021-12-19 13:33:02

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Would renaming depends array be a good idea ? Answer : No

Redundancy can be a good thing.

To answer my oriignal question :
No.
renaming depends has downsides and there is  a workaround that doesn't require changes to pacman / makepkg .

marking as Solved.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2021-12-19 14:02:01

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

Re: [Solved] Would renaming depends array be a good idea ? Answer : No

It was already renamed to depends.  It used to be adult_diaper. tongue


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

Offline

Board footer

Powered by FluxBB