On Mon, Feb 7, 2011 at 3:06 AM, Lukas Fleischer <archlinux@cryptocrack.de> wrote:
Hi!
I recently started working on a package blacklist for the official AUR which can e.g. be used to prevent people from uploading packages in the official repos to [unsupported] (cf. FS#12902 [1]). Patches can be found in the "pkg-blacklist" branch of my working tree [2]. They currently include some code that adds a "PackageBlacklist" table and a hacky helper utility that can be used to update that table by sync'ing it with some binary repos.
Constructive criticism and suggestions welcome!
[1] https://bugs.archlinux.org/task/12902 [2] http://git.cryptocrack.de/aur.git/log/?h=pkg-blacklist
AUR side: * Using CHAR as a datatype is absolutely silly in new code, use VARCHAR, and why do anything shorter than 255 or 512? * On that note, almost all CHAR usages in the current schema are silly and should be using VARCHAR- anything on the Packages table, PackageCategories, PackageSources, TU_VoteInfo, AccountTypes, Username/Email/Passwd/IRCNick on Users. * Why not just make "Name" your primary key? The ID column is never used. * This is a slight step toward removing DummyPkg stuff from the Packages table- I'm trying to think out how to restructure that data to make things work and still be slightly sound from a relational and keys point of view. Blacklist helper side: * I won't lie, I think this is over-engineered a tad. This can be done in a much shorter and easier to hack shell script since all you need is package names- just pipe bsdtar output through some magic and you have package names. I've attached a sample starter script I use for archweb updates. I'd probably have it call bsdtar and then who knows what. * Oh my, I forgot we are still on MyISAM for the AUR. Please to god switch to InnoDB and use transactions instead. -Dan