You are not logged in.

#1 2024-10-23 01:57:39

wlsdx
Member
Registered: 2024-10-23
Posts: 1

source file not found in the build directory

I'm building a local python package. I've copied a PKGBUILD from an existing python package. That PKGBUILD expects a .tar.gz in the same directory as PKGBUILD. In my project, the .tar.gz produced by python-build is in dist/, so I modify the PKGBUILD to refer to dist/file.tar.gz. But makepkg reports "Retrieving sources... ERROR: file.tar.gz was not found in the build directory and is not a URL". I've added some debugging messages in prepare() but they are not printed. How to make makepkg use sources in other directory? Also how to see the messages in the PKGBUILD script? Thanks very much!

source=("${srcdir}/dist/${_realname}-${pkgver}.tar.gz")
noextract=("${srcdir}/dist/${_realname}-${pkgver}.tar.gz")

prepare() {
  echo "prepare() echo ${srcdir}/dist/${_realname}-$pkgver.tar.gz"
  msg "prepare() msg ${srcdir}/dist/${_realname}-$pkgver.tar.gz"
  [[ -d ${_realname}-${pkgver} ]] && rm -rf ${_realname}-${pkgver}
  tar zxf "${srcdir}/dist/${_realname}-$pkgver.tar.gz"
}

Last edited by wlsdx (2024-10-23 01:59:31)

Offline

#2 2024-10-23 02:10:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,064

Re: source file not found in the build directory

Because ${srcdir} isn't where you think it is. You want ${startdir}, but that's deprecated and shouldn't generally be used, but for a local-only PKGBUILD, whatever.

Offline

#3 2024-10-23 02:52:52

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

Re: source file not found in the build directory

Why would you make a tarball locally to only untar it again locally to then use the contents of it?

Just write your PKGBUILD to use the original content.


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

Offline

Board footer

Powered by FluxBB