You are not logged in.

#1 2015-06-24 18:52:03

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 307

What's the rationale for 'makepkg --nodeps' etc.

PKGBUILD can contain two sets of dependencies: build-time dependencies and install-time dependencies. If the build-time dependencies aren't met, the build is most likely going to fail (otherwise, what's the point). If the run-time dependencies aren't met, an installed package is most likely going to fail running (otherwise, what's the point). At least that's my understanding.

Q1: why does makepkg insist (without --nodeps) that the run-time dependencies are met at build time? If there's a build-time dependency, why not simply list it there?

Q2: why does --nodeps affect both run-time and build-time dependencies? I can understand that being able to turn off run-time dependencies at build time makes sense, but switching off build-time dependencies at the same time seems like throwing out the baby with the run-time dependencies...

The background of my question is trying to figure out how to build packages without having to install run-time dependencies, in order to avoid "polluting" the build machine with lots of packages that aren't actually needed for the build (nor for run-time, because it's a build-only machine).

Offline

#2 2015-06-24 20:02:45

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

Re: What's the rationale for 'makepkg --nodeps' etc.

makepkg does not have a concept of run-time only dependencies.  If you want run-time only dependencies you can add them to the depends list in the package() function.

Last edited by apg (2015-06-24 20:08:12)

Offline

#3 2015-06-24 21:57:30

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: What's the rationale for 'makepkg --nodeps' etc.

If a dependency is both a run-time and a make-time dependency it is only listed in the "depends" array. All run-time dependencies are thus considered make-time dependencies even if they are not. It's just a matter of simplicity and laziness.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2015-06-24 23:20:27

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

Re: What's the rationale for 'makepkg --nodeps' etc.

For your second question, I often use the -d (--nodeps) flag with makepkg when I just want to investigate the source code for a project.  To help other users troubleshoot something, often that is sufficient - and when this troubleshooting is on packages that may have a load of dependencies that I don't have installed (even sometimes a cascade of dependencies also in the AUR only) then installing all those dependencies just to pull in the source code is ridiculous.  I could manually curl/pull the source code, but `makepkg -od` is so much easier.

So it may not be a 'typical' use of makepkg - but I for one am quite glad that flag is there to allow for the occasional atypical use.

EDIT: I suppose "--allsource" could probably also accomplish this, but `-od` is shorter.


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

Offline

#5 2015-06-25 10:54:06

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,086

Re: What's the rationale for 'makepkg --nodeps' etc.

jernst wrote:

in order to avoid "polluting" the build machine with lots of packages that aren't actually needed for the build

I tend to use makepkg -rs  (makepkg --rmdeps --syncdeps ) for that purpose.

Last edited by Lone_Wolf (2015-06-25 10:54:20)


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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2015-06-25 16:48:59

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 307

Re: What's the rationale for 'makepkg --nodeps' etc.

This conversation tells me that perhaps makepkg should be extended with something like --no-runtime-deps. It would allow builds to be faster (less download and install), use less disk space (fewer packages to install) and potentially be more reliable (what isn't installed cannot create a conflict).

Offline

#7 2015-06-25 17:42:34

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

Re: What's the rationale for 'makepkg --nodeps' etc.

jernst wrote:

This conversation tells me that perhaps makepkg should be extended with something like --no-runtime-deps. It would allow builds to be faster (less download and install), use less disk space (fewer packages to install) and potentially be more reliable (what isn't installed cannot create a conflict).

Arch does not have special development or header packages, so in most cases you need all dependencies to build a package. Can you give an example where it is not required? (Except repackaging binary releases)
As apg said, if something is really not needed, then add the dependency in the package() function.


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

Online

#8 2015-06-25 18:07:43

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 307

Re: What's the rationale for 'makepkg --nodeps' etc.

progandy: Assume an app that requires a local mail server. To compile / package it, no mail server needs to be installed if all the app does is read/write smtp / pop / imap sockets. It should list a mail server as a dependency though so one gets installed automatically.

Offline

#9 2015-06-25 19:28:39

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: What's the rationale for 'makepkg --nodeps' etc.

jernst wrote:

progandy: Assume an app that requires a local mail server. To compile / package it, no mail server needs to be installed if all the app does is read/write smtp / pop / imap sockets. It should list a mail server as a dependency though so one gets installed automatically.

In those cases, the package will list a number of servers as optdepends. Take a look at wordpress and owncloud for examples (although this is for webservers). Installing things like that is not really the way Arch usually does things.

Last edited by runical (2015-06-25 19:29:50)

Offline

#10 2015-06-25 23:52:31

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 307

Re: What's the rationale for 'makepkg --nodeps' etc.

As Groucho said, if you don't like my examples, I have others :-)

Take a Wordpress (or, better, Mediawiki) plug-in. To package it in its own package, I don't need Mediawiki around. But clearly a Mediawiki plug-in is useless to run without Mediawiki being installed.

(But I don't want to prolong this thread indefinitely. I now understand people's points of view, which is why I asked in the first place; some I agree with, some I don't, but that's okay.)

Offline

#11 2015-06-26 03:24:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: What's the rationale for 'makepkg --nodeps' etc.

progandy wrote:
jernst wrote:

This conversation tells me that perhaps makepkg should be extended with something like --no-runtime-deps. It would allow builds to be faster (less download and install), use less disk space (fewer packages to install) and potentially be more reliable (what isn't installed cannot create a conflict).

Arch does not have special development or header packages, so in most cases you need all dependencies to build a package. Can you give an example where it is not required? (Except repackaging binary releases)
As apg said, if something is really not needed, then add the dependency in the package() function.

Python (and other script) packages.

Offline

Board footer

Powered by FluxBB