[arch-projects] [AUR] Querying package ID from main repo

eliott eliott at cactuswax.net
Thu Oct 25 03:15:11 EDT 2007


On 10/24/07, tardo <tardo at nagi-fanboi.net> wrote:
> I'd really like to be able to pull package ID numbers from the main site
> DB and put that in the AUR. From what I see, it seems like a simple
> SELECT statement (prefixed by a db_connect() or select_db() if on the
> same host). It's pretty trivial, and since handing out dumps of the main
> repo db just seems to be a no-no, how about someone look through the
> main site's code and finding that statement and throwing it in?

Are you suggesting we grant the aur access to the primary site
database so it can pull package data itself?
I really don't like that idea, and for two reasons.
1. It is too tightly coupled. If the aur were ever to move to another
host, it would fail.
2. From a security standpoint, it isn't optimal.

> For the record, I don't care about searching for packages on the search
> page, just being able to pull the ID of the package so I can provide a
> good link to the dependencies is enough (current method just searches,
> seems kinda half-assed).

What are you talking about?
Just getting a link on the aur page for the upstream package depends?

> that should give a numerical result which I can link directly to on the
> package page, eg http://archlinux.org/packages/13418
> If anyone can pull out the package ID, i can show what to change in the
> AUR (trivial really).

That would only be a one time solution. A single DB dump is probably
not the answer.

*thinking out loud*
Maybe something similar to the aurjson functionality I wrote for the
aur that is in my aur devel branch. A name goes in, and some very
simple package data comes out (id being one of them)....hmm..but that
would be more requests, since it would happen on page load instead of
when(if) the user clicks the link.

I say we just stick with the current search mechanism for now, and
just think about this one some more.




More information about the arch-projects mailing list