summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2010-05-24Fix null field issues exposed by Django 1.1.2Dan McGee
Apparently Django 1.1.1 let null fields pass right through but this now causes reporead to blow up in 1.1.2. Fix the issue and get things working again by allowing nulls where it probably makes sense and including a migration to fix the issue, which for the real database will be a no-op. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-14Make CDN not dependent on DEBUG settingDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Add a hacked version of Django UpdateCacheMiddlewarerelease_2010-05-04Dan McGee
This is to address a rather large issue with caching of feed objects in Django. Because they are built up using an XML library that does multiple writes on a file-like object, a single feed object, even when pulled from memcached, generates 1582 writes to the open socket rather than the optimal one it could do. Some version of this fix will be making it upstream, but I need to figure out how to approach that before I do so and for now this will address one of our larger performance issues on the live site since the packages feed is hit as often as it is. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-27Dedupe entries in required by listDan McGee
Use distinct() on a query. Fixes FS#19195. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Migration to remove external projectsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Remove Arch-Based ProjectsDan McGee
Add a link to the wiki instead. Also remove ExternalProject model and associated dealings. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Migration to delete AltForum modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Remove International CommunitiesDan McGee
Add link to wiki instead. Also remove AltForum model and associated dealings. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Migration to remove press modelrelease_2010-04-18Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Remove Press model and adminDan McGee
A link to the wiki was already present, but the model and admin had not been removed. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-17Maintainer doesn't exist on package anymoreDan McGee
So remove it from the select_related() call on todo lists. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Simplify code now that pkgbase is always definedrelease_2010-03-28Dan McGee
This allows some of our queries to get a lot simpler as well as removing the pkgbase_safe property added earlier. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Make pkgbase non-null and indexedDan McGee
Now that we always populate it, this change will make it a lot easier to use when relating to other tables, such as our maintainer relations. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Make reporead always populate pkgbaseDan McGee
And also add a data migration to add the value retroactively for anything already in our database. We simply fall back to pkgname if pkgbase isn't available. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Drop maintainer column off packages modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Move package maintainer off of package modelDan McGee
This is an attempt to fix our long-standing problems dealing with maintainer information. Move the actual maintainer information off of the package model into a PackageRelation object, which has some flexibility to later represent more than just maintainership. This solves multiple problems: * If a package gets accidentally deleted, so did the maintainer info * Testing packages have always shown up as orphans * With split packages, it was easy to miss some of the sub-packages This commit does not include the deletion of the original maintainer column; that will come at a later time when I feel more confident that the data was migrated correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-20Make rsync fields on mirrors optionalrelease_2010-03-20Dan McGee
I think I bumbled this up a while back, but make sure they aren't required and we use the empty string for all of those that don't provide a value. Fixes FS#18763. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-10Make the new 'testing' flag on repo a bit clearerrelease_2010-03-10Dan McGee
Since at least two repositories currently fall under this flag, add some help text and visibility to this column. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Fix up get_depends logic a bitDan McGee
We were not handing depends of 'any' packages correctly if they depended on arch-dependent packages; we labeled them all as virtual. If we have an 'any' package, drop the arch screening and just pick one to link to. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Use repo.testing flag instead of test-based checksDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Add a flag to the repo to indicate its 'testing' statusDan McGee
This will eventually lead into a cleanup where we don't do checks on the repo name all over the place like we currently do. There are two migrations involved here; one to add the column and one to deduce the correct value from the existing names of the repos. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Fix get_depends() method descriptionDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Make mirror notes a text fieldrelease_2010-03-06Dan McGee
Rather than a short 255 character field. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Kill rsync IP hostname fieldDan McGee
This wasn't strictly necessary and was more hassle than it was worth. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Add mirror rsync credentials dataDan McGee
Allow this to be stored in the database for later use by an external generation script for the rsyncd secrets file. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Mirror tiering enhancementsDan McGee
Add ability to track tier and upstream mirror in the database. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-03Merge branch 'master' into cdn-jqueryDan McGee
Conflicts: templates/todolists/view.html
2010-02-27Upgrade jQuery to 1.4.2Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Add CDN templatetag packageDan McGee
For now, this contains one new template tag- 'jquery'. This will allow us to use the Google AJAX CDN in non-debug environments, since there is really no need for us to be the source of this common file. In the future this package may gain other static media resource tags as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Add a files_last_update columnDan McGee
This is necessary to keep all of our junk in sync since we aren't guaranteed to have an up to date files database all the time. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-26Add some additional fields to package importDan McGee
We can capture the build date, compressed size, and installed size when reporead runs. Even if we don't show all of it, we should pull it in. FS#14270 is requesting that the package size be shown on the website. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-10Remove archweb prefix from all importsDan McGee
Unnecessary, and lets us standardize on not using it everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-09Fix the get_user middleware stuffDan McGee
First off, the copyright notice is from the other middleware previously removed, so all of that can go, along with some stragglers in the import list. Next, as stated on http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser, you need to be sure to have the import in the model class be the same as the import used in the middleware declaration, which was not true. Whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-08Make sure we use orm in migrationsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-05Make the maintainer migration less stupidrelease_2010-02-07Evangelos Foutras
Why issue lots of UPDATE queries when you can only issue one? My fail. Signed-off-by: Evangelos Foutras <foutrelis@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-05Make recent updates group multiple architecturesDan McGee
It isn't the most elegant operation in the world, but attempt to only show one line per package, grouping by architecture if multiple were updated in the same go. This makes the recent packages view a bit more useful as a heads up view. Implements FS#17304. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Provide SVN links to trunk/ for each packageDan McGee
This is, at least for me, more useful than the link to a specific build of a package. We provide both so no one should lose here. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Make looking up a package with many required by entries fasterDan McGee
We were doing a 2 queries for each 'Required By' entry- arch and repo as usual. Add it to the original query so we don't waste time. Noticed while looking at the glibc description page. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Handle empty pkgdesc and url a bit betterDan McGee
Put an actual NULL in the database and handle it for both display and import. Also add a migration to clean up any bad data we currently have in there. Fixes FS#17144. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Make bugs link more usefulDan McGee
Link directly to the right project in Flyspray instead of whatever the user looked at last. Fixes FS#13166. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Kill a no longer necessary hack in the adminDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Use select_related() to make a few more places more performantDan McGee
Especially when looking at packages, we always want the arch and repo. Another big hunk of changes deals with the very inefficient signoffs code. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Add a pkgname indexDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Reintroduce optimized code for Todo listingsEvangelos Foutras
Now that maintainer is nullable, Django will use a LEFT OUTER JOIN with this code, so orphan packages won't be omitted. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Adjust models and views for nullable maintainerEvangelos Foutras
Signed-off-by: Evangelos Foutras <foutrelis@gmail.com> [Dan: made a few other small touchups] Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Add migrations for nullable Package.maintainerEvangelos Foutras
Signed-off-by: Evangelos Foutras <foutrelis@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Add initial South migration for 'main' appDan McGee
Thanks to Evangelos Foutras for the inspiration. Recreated from scratch only to make sure everything is in sync. From this point on, you will need to have the 'south' Django/Python package installed to use archweb. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-30Fix todolist bug with select_related()Dan McGee
Hey, what do you know? Using a relational DB in a non-relational way can come back to bite you. Go foreign keys! Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-30Drastically reduce loading time of Todo listsEvangelos Foutras
Use Django's select_related() on the TodolistPkg QuerySet to avoid making 4 database queries per package. This way we're making just one query, regardless of the number of packages in the Todo list. Local testing with 1000 entries in a Todo list show that the loading time has been reduced from 2675 ms to around 560 ms, while the number of queries has been cut down from 8005, to only 5. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-09removed RequireLoginMiddlewareIsmael Carnales