You are not logged in.

#1 2018-02-16 16:14:02

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 170

[solved] makepkg - skip dependency check, but do a makedep check

I want to defer dependency check to pacman at install time. But I still want to be able to build a package. I've tried searching through `man makepkg` and as far as I can tell, there's only `--nodeps` which skips dependency check alltogether. Is there a way to perform build-time dependency check for makepkg, but skip install-time dependency check?

Last edited by JonnyRobbie (2018-02-17 13:50:27)

Offline

#2 2018-02-16 16:27:52

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

Re: [solved] makepkg - skip dependency check, but do a makedep check

makepkg is a building tool, it does build time dependency checks. Non makedep dependencies are usually both runtime and buildtime dependencies.

However this reads like a XY, what is your actual issue? What end goal do you seek? Which software/environment brings you to ask this question?

Offline

#3 2018-02-16 16:38:27

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

Re: [solved] makepkg - skip dependency check, but do a makedep check

And I suspect the answer to the unasked 'X' question is the -r flag.


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

Offline

#4 2018-02-17 10:55:05

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 170

Re: [solved] makepkg - skip dependency check, but do a makedep check

V1del wrote:

Non makedep dependencies are usually both runtime and buildtime dependencies.

I guess this kinda answers the question.

My point was that I'm writing a script that automates aur builds. But I wanted to defer any dependency checks that would not be necessary for build to the pacman. So I'd have as little dependency resolutions during build time as possible.

But If those runtime dependencies are mostly build dependencies as well, I guess I won't be able to skim them much.

Offline

#5 2018-02-17 12:18:10

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

Re: [solved] makepkg - skip dependency check, but do a makedep check

In the rare case that a dependency is not required during the build process, I believe the maintainer can declare the dependency in the package() function instead of globally. There is no way to do it in an automated way for all packages, though.


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

Offline

#6 2018-02-17 12:20:28

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

Re: [solved] makepkg - skip dependency check, but do a makedep check

progandy, for such packages, is there any invocation of makepkg that would prevent installing those dependencies while installing the globally declared ones?


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

Offline

#7 2018-02-17 12:34:51

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

Re: [solved] makepkg - skip dependency check, but do a makedep check

That is the normal behaviour of makepkg. It disregards all dependencies specified in the package() function during the build.

pkgname=example
pkgver=1
pkgrel=1
arch=(any)
depends=(crda)

build() {
	echo "building..."
}

package() {
	depends+=(xinetd)
}
$ CUTF makepkg -si
==> Making package: example 1-1 (2018-02-17 13:32:37 +0100)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (2) wireless-regdb-2017.03.07-1  crda-3.18-1

Total Download Size:   0.06 MiB
Total Installed Size:  0.22 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 wireless-regdb-2017...     6.3 KiB  0.00B/s 00:00 [######################] 100%
 crda-3.18-1-x86_64        57.0 KiB  62.2K/s 00:01 [######################] 100%
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
(2/2) checking available disk space                [######################] 100%
:: Running pre-transaction hooks...
(1/1) Preparing to detect new optional dependencies...
:: Processing package changes...
(1/2) installing wireless-regdb                    [######################] 100%
(2/2) installing crda                              [######################] 100%
Uncomment the right regulatory domain in /etc/conf.d/wireless-regdom.
It will automatically be set on boot.
:: Running post-transaction hooks...
(1/2) Detecting new optional dependencies...
(2/2) Arming ConditionNeedsUpdate...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Starting build()...
building...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "example"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: example 1-1 (2018-02-17 13:32:47 +0100)
==> Installing package example with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (2) xinetd-2.3.15-4  example-1-1

Total Download Size:   0.09 MiB
Total Installed Size:  0.26 MiB

:: Proceed with installation? [Y/n] n
==> WARNING: Failed to install built package(s).

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

Offline

#8 2018-02-17 12:39:51

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

Re: [solved] makepkg - skip dependency check, but do a makedep check

Ah, thanks - I didn't know that: perhps because such packages are relatively rare I've not really encountered it.


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

Offline

#9 2018-02-18 03:14:27

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [solved] makepkg - skip dependency check, but do a makedep check

Or because dependencies declared in the package step are usually for split packages, for which it is of course inappropriate to use a single global list of dependencies. Single packages that use runtime only dependencies declared in package() aren't just rare, they're almost unheard of I think.

There is little motivation for it anyway -- most people build on the same machine that will install the package, the rest build in a clean chroot and it costs nothing but a bit of time. And if you use extra-x86_64-build then the package itself gets installed in the chroot in order to check that the package works without immediately obvious breakage (alongside running namcap)...

So going to the extra effort of calculating what is only a runtime dependency is kind of a waste of effort, especially as most will be both.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB