[pacman-dev] [PATCH 1/1] makepkg: Handle dependencies that contain spaces

Eli Schwartz eschwartz at archlinux.org
Fri Feb 23 03:43:39 UTC 2018

On 02/22/2018 10:09 PM, Morgan Adamiec wrote:
>> I do apologise for the bad patch. I'm not proficient in bash at all. I
>> basically wrote this patch out of frustration after having spent an
>> hour trying to figure out why a package on the AUR would not install
>> and it ended up being this exact problem. I looked through the code
>> and saw sometimes depends are quoted and sometimes they are not.
>> Adding the quotes fixed the problem so that was that.
>> I probably should have submitted a bug report instead of trying my
>> hand at this myself but seeing the backlog it does sometimes feel
>> pointless. That said I can program fine, maybe I should look up some
>> bash and try my hand at this properly. I tend to find it hacky for
>> extended use which is why I've always shied away from it.
>> And I do agree linting the depends is probably a way better solution,
>> maybe slit it on =|>|<|>=|<= and use lint_pkgname on the name and
>> lint_pkgver on the version. I'll have to take a look.
>> Thanks for the feedback though I greatly appreciate it.

Well, certainly we all have to start somewhere. :) bash is a neat
language for many uses, you might want to learn it anyway... though
maybe not fast enough to fix this here and now, I guess.

As for the backlog, I'm hoping we can resolve most of the low-hanging
fruit (which this seems to be). :)

A good number of the pacman bugs are feature requests that also require
us to decide *what* we want to do in addition to implementing it... it's
not quite as bad as it looks.

> It seems as though lint_pkgname is hard coded to check $pkgname
> instead of $1 so calling lint_pkgname from lint_depends would require
> some reworking there. I'm not familiar enough with bash or the code
> base to do this to a decent standard to so I'll leave this here. I'll
> probably report it on the bug tracker but that's about it for me.

Yeah, this is a good point. It should be easy to rework it into a
utility function though.

This is on second thought complicated by the fact that a dependency,
unlike a pkgname, can include >=${dep_version}

optdepends already does some linting for this, but not nearly as much as
pkgname does. We might want to consolidate some of that logic as well,
or emulate it by doing a stripped-down check.

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20180222/d41beb0c/attachment.asc>

More information about the pacman-dev mailing list