[PATCH] [RFC] Allow to search packages by "*depends" fields

Baptiste Jonglez baptiste at bitsofnetworks.org
Sun Jan 28 21:34:28 UTC 2018


Hi Lukas,

Thanks for the positive feedback!

On 28-01-18, Lukas Fleischer wrote:
> I like the overall idea and given the implementation is pretty simple
> and straightforward, I do not see anything speaking against it.

Actually, there was a mistake in the code I sent: the additional SQL JOIN
causes the RPC to return duplicate results for the other types of search
(name, name-desc and maintainer).  Unfortunately, this makes the new code
less straightforward.

I have sent a new patch, can you please review the updated part?

> The documentation definitely needs to be updated, preferably in the same
> patch.

Done in the new patch.

> > @@ -407,6 +412,15 @@ class AurJSON {
> >                                 $keyword_string = $this->dbh->quote($keyword_string);
> >                                 $where_condition = "Users.Username = $keyword_string ";
> >                         }
> > +               } else if ($search_by === 'depends' || $search_by === 'makedepends' || $search_by === 'checkdepends' || $search_by === 'optdepends') {
> 
> This can be written in a more compact way, using in_array().

Updated in the new patch.

> Everything else looks good to me!

Thanks!
Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20180128/32de4ee4/attachment.asc>


More information about the aur-dev mailing list