You are not logged in.

#1 2023-10-05 01:54:39

callmejoe
Member
Registered: 2019-03-06
Posts: 84

[SOLVED] help with vcs PKGBUILD - no such file or directory error

Hello All, trying to create a PKGBUILD and it doesn't want to create a directory in src.  I followed the example in PKGBUILD-vcs.proto.  This is my first vcs package.

Appreciate any help. thanks

PKGBUILD here:  https://dpaste.com//EQWMUWHZ3

error here:
way@wayland wstroke-git$ makepkg
==> Making package: wstroke-git 0.r1.e7a0041-1 (Wed 04 Oct 2023 09:51:11 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning $pkgname git repo...
Cloning into bare repository '/home/way/wstroke-git/$pkgname'...
remote: Enumerating objects: 447, done.
remote: Counting objects: 100% (93/93), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 447 (delta 60), reused 62 (delta 38), pack-reused 354
Receiving objects: 100% (447/447), 437.82 KiB | 7.55 MiB/s, done.
Resolving deltas: 100% (275/275), done.
==> Validating source files with sha256sums...
    $pkgname ... Skipped
==> Extracting sources...
  -> Creating working copy of $pkgname git repo...
Cloning into '$pkgname'...
done.
==> Starting pkgver()...
/home/way/wstroke-git/PKGBUILD: line 19: cd: /home/way/wstroke-git/src/wstroke: No such file or directory
==> ERROR: A failure occurred in pkgver().
    Aborting...

Last edited by callmejoe (2023-10-05 03:46:12)

Offline

#2 2023-10-05 02:53:05

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

Re: [SOLVED] help with vcs PKGBUILD - no such file or directory error

A quick 'ls' in your working directory would reveal the problem.  The cause of the problem is the single quotes around the source which results in $pkgname not being expanded but instead being treated as a literal name of the source.  That's not the same as what you try to 'cd' into later, which is why there is no such directory.

EDIT: you'd actually have a similar problem even without the single quotes as you've used $pkgname for the source, but you try to cd into ${pkgname%-git}, so that's also different.  I'd recommend using the following:

_pkgname=wstroke
pkgname=$pkgname-git
...

Then just use $_pkgname everywhere else in the PKGBUILD

Last edited by Trilby (2023-10-05 02:54:48)


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

Offline

#3 2023-10-05 03:45:46

callmejoe
Member
Registered: 2019-03-06
Posts: 84

Re: [SOLVED] help with vcs PKGBUILD - no such file or directory error

Thanks Trilby.  Got it sorted it out now.  Package built successfully.

Offline

Board footer

Powered by FluxBB