You are not logged in.

#1 2013-04-07 15:46:39

vwyodajl
Member
Registered: 2012-01-21
Posts: 183

[Solved] Question on a PKGBUILD that no longer is building

Everything for my package[1] was building fine until the most recent changes with GCC, or at least that is the best I can track it down to, as I built it just before the change, now it no longer builds with no modifications to the package. The PKGBUILD[2] is listed below as well.

The error I am getting is:

==> Starting package()...
/home/user/abs/MyAUR/pacmanager/PKGBUILD: line 37: cd: ../../pkg/usr/share/pacmanager/: No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...

the last line is line 37:

package() {
  cd $srcdir/pac
  mkdir -p $pkgdir/usr/{share/pacmanager/{lib,res,utils},bin}
  /bin/tar cf - lib/* | ( cd ../../pkg/usr/share/pacmanager/; tar xfp - )

It is the tar cf - lib/* portion, it seems to make the directories. Is there a proper way to debug an issue like that that I am missing? Can anyone point out what the issue is with it?

Thanks for any help.

[1] https://aur.archlinux.org/packages/pa/pacmanager/
[2] https://aur.archlinux.org/packages/pa/p … r/PKGBUILD

Last edited by vwyodajl (2013-04-07 17:51:00)

Offline

#2 2013-04-07 16:00:23

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: [Solved] Question on a PKGBUILD that no longer is building

Why cd ../../pkg/ instead of cd $pkgdir? That's why those variables exist; use them instead of navigating manually.
If you place echo $pkgdir before line 37 you'll see why it's failing. Or just go to pkg/ and see what is in there.

Offline

#3 2013-04-07 16:02:55

progandy
Member
Registered: 2012-05-17
Posts: 2,152

Re: [Solved] Question on a PKGBUILD that no longer is building

I think you should try to replace this strange tar-line with a copy:

  mkdir -p $pkgdir/usr/{share/pacmanager/{lib,res,utils},bin}
  cp -af lib "$pkgdir"/usr/share/pacmanager/
  install -D -m 644 res/*png $pkgdir/usr/share/pacmanager/res

Offline

#4 2013-04-07 16:05:54

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,728
Website

Re: [Solved] Question on a PKGBUILD that no longer is building

Why are you using "../../pkg" instead of "$pkgdir"?
I suspect that you should also be using tar's "--directory" option instead of invoking a subshell and using "cd".

Then there's also the problem that you're using tar to begin with instead of installing files with utilities such as "install", "cp", etc.

Offline

#5 2013-04-07 17:50:42

vwyodajl
Member
Registered: 2012-01-21
Posts: 183

Re: [Solved] Question on a PKGBUILD that no longer is building

progandy wrote:

I think you should try to replace this strange tar-line with a copy:

  mkdir -p $pkgdir/usr/{share/pacmanager/{lib,res,utils},bin}
  cp -af lib "$pkgdir"/usr/share/pacmanager/
  install -D -m 644 res/*png $pkgdir/usr/share/pacmanager/res

Thank you doing it that way worked.

Honestly I took the package over and had not really dug into the PKGBUILD until this issue. My fault I know. But I do thank you for pointing out the issues it currently has. I am going to go over the rest now to make sure it conforms properly.

Thanks.

Offline

Board footer

Powered by FluxBB