Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKGBUILDs with multiple pkgnames can cause other builds to fail #148

Open
eevee opened this issue Apr 14, 2016 · 0 comments
Open

PKGBUILDs with multiple pkgnames can cause other builds to fail #148

eevee opened this issue Apr 14, 2016 · 0 comments

Comments

@eevee
Copy link

eevee commented Apr 14, 2016

Consider two packages, foo and bar. foo's PKGBUILD contains:

pkgname=foo

whereas bar's contains:

pkgname=(bar baz)

I run packer -S foo bar.

Before packer does anything else, it scrapes dependencies from the various packages' PKGBUILDs by sourcing them. After doing this, pkgname will be an array: (bar baz).

Now packer builds foo, and the first thing it does is source foo's PKGBUILD, which contains pkgname=foo. Unfortunately, bash is terrible, and this leaves pkgname still as an array, but now containing (foo baz).

$ pkgname=(bar baz)
$ echo "${pkgname[@]}"
bar baz
$ pkgname=foo
$ echo "${pkgname[@]}"
foo baz

The foo build will continue, and only at the very end will packer abort the installation with the infuriatingly nonsensical message:

error: 'baz-*.pkg.tar.xz': could not find or read package

This happens to me with mozc, which names itself (mozc ibus-mozc), producing errors about ibus-mozc-*.pkg.tar.xz not being found. This is particularly confusing because ibus-mozc is itself a separate package, so I've tried simply not installing it at the same time, which of course didn't help. (Come to think of it, if mozc can produce ibus-mozc as part of its build, why does packer end up building both?)

packer should take care to completely erase pkgname before a build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant