FS#12902 - Check availability of package in binary repos before accepting the upload
Attached to Project:
AUR web interface
Opened by Greg (dolby) - Friday, 23 January 2009, 09:10 GMT
Last edited by Lukas Fleischer (lfleischer) - Monday, 21 February 2011, 09:50 GMT
Opened by Greg (dolby) - Friday, 23 January 2009, 09:10 GMT
Last edited by Lukas Fleischer (lfleischer) - Monday, 21 February 2011, 09:50 GMT
|
Details
It would be very useful and would save time from TUs, if
when a user uploaded a script, the upload was not allowed if
a package with the same name exists in binary repositories.
|
This task depends upon
Closed by Lukas Fleischer (lfleischer)
Monday, 21 February 2011, 09:50 GMT
Reason for closing: Implemented
Additional comments about closing: Fixed in 1.8.0.
Monday, 21 February 2011, 09:50 GMT
Reason for closing: Implemented
Additional comments about closing: Fixed in 1.8.0.
As a TU, I'd find this somewhat useful, but most of the package duplication is from people uploading "foopkg-nonbroken" type pkgnames.
If this interface could be established, more facilities could be improved, like dependency showing from the official repositories, e.g.
At a first glance I'd say it's quite easy to read package databases directly using PHP. Since we use Archive_Tar anyways, this could be implemented in about 10 lines of PHP using Archive_Tar's listContent() function. Only thing that we need to think about is how package databases are kept in sync. Maybe a cron job? I'll see if I can implement a patch quickly and will send it to aur-dev.
[1] https://aur.archlinux.org/packages.php?ID=40869
It would probably be best to access the DB via libalpm.
https://projects.archlinux.de/www.archlinux.de.git/tree/cronjobs/Package.php
https://projects.archlinux.de/www.archlinux.de.git/tree/cronjobs/PackageDB.php
and here the cron that updates the mysql db incrementally:
https://projects.archlinux.de/www.archlinux.de.git/tree/cronjobs/UpdatePKGDB.php
There is a lot of stuff you wont need for the AUR so this can be stripped down. (e.g. depends etc.)
Not sure if you'd want to build that directly into the AUR web code. Hey, whatever works though!
[1] http://projects.archlinux.org/aur.git/commit/?id=b69f548065e78d14afcdc91548d73539762f8d93
[2] http://projects.archlinux.org/aur.git/commit/?id=400d7845e4c959660edf4cbeb1a390c6590cc4fc