summaryrefslogtreecommitdiffstats
path: root/devel
AgeCommit message (Collapse)AuthorFilesLines
2012-04-27Incomplete-only todolists optimizationDan McGee1-2/+1
We can push this down to the database if we know in advance we only need the incomplete lists. This helps our call on the developer dashboard quite a bit; the time of the single query in question drops from >1300ms to around 40ms. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26Add migration to auto-populate developer countries, display flagsDan McGee1-0/+157
Add a quick and dirty migration to derive country info from the developer-provided timezone, and display the flag next to the location if we have it available on the clocks and developer profiles pages. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26Add country attribute to developer profileDan McGee2-0/+109
We can then show little flag icons later on in relevant places based off of this, such as on the developer profile, clocks page, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20UserProfile model and fields shuffleDan McGee10-18/+235
Move this model into the devel/ application, and move the PGPKeyField which is used only by these models into the application as well. This involves updating some old migrations along the way to ensure we don't reference a field class that no longer exists. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-09Change old packages report from two years to one yearDan McGee1-2/+2
Now that all packages are getting more attention, we can shorten the time period on the report to a shorter date range. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Add a mismatched signatures developer reportDan McGee2-2/+38
This finds odd signatures in our repositories, which includes signature times not matching with build dates, different signer and packager, etc. We enhance our user lookup helper class to look up users by PGP key. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-26Rename 'packagedepend_set' attribute to 'depends'Dan McGee1-1/+1
We do this for every other related package attribute, so do it here too. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24reporead: use bulk_create() for more propertiesDan McGee1-13/+17
Depends, conflicts, provides, etc. can all be done via bulk_create. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24Merge branch 'django14'Dan McGee3-44/+27
Conflicts: templates/releng/result_section.html
2012-03-24Make all datetime objects fully timezone awareDan McGee2-24/+21
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to ensure we don't mix aware and non-aware datetime objects when dealing with datetimes in the code. Add a utc_now() helper method that we can use most places, and ensure there is always a timezone attached when necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24Change Django urls.py importDan McGee1-1/+1
Until Django 1.3, the functions include(), patterns() and url() plus handler404, handler500 were located in a django.conf.urls.defaults module. In Django 1.4, they live in django.conf.urls. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24reporead: use Django 1.4 bulk_create() for package filesDan McGee1-4/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24reporead: use Django 1.4 select_for_update()Dan McGee1-15/+2
As per TODO comments in the existing code. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24reporead: blow up when package found with wrong architectureDan McGee1-2/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-21Ensure clocks Expires header works in 59th minute of hourDan McGee1-2/+2
This was a rather careless oversight on my part. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-21Add number of keys signed to master keys pageDan McGee1-4/+2
This really just makes me look bad, but an interesting fact none the less for people to look at. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-16reporead: rename Pkg to RepoPackageDan McGee1-3/+4
The bytes saved on the shorter name aren't worth it. Also ensure 'desc' is always initialized to None in case packages do not provide one. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-08Exclude all compressed manpagesDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-22import_signatures: code cleanup and ensure we update validity statusDan McGee1-10/+29
This adds a namedtuple so we aren't using magic numbers when processing our 'edges' (signatures). We also ensure we update any existing signature objects with their validity if they were later revoked. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-13Reduce false positives returned by uncompressed manpages reportDan McGee1-4/+6
Explicitly exclude '.html' files from the report. This fixes the issue noted in FS#28372. We also add `is_directory=False` to both the manpage and info page queries; this could help the database come up with a better plan. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-12reporead: only reset flag date if upstream version changesDan McGee1-1/+7
This preserves the flag date if only a simple pkgrel bump occurred, which makes sense more often than not for rebuilds. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-07Make rematch command do a bit moreDan McGee2-7/+61
Now that we have a few objects that can potentially link back to developers, allow flag requests to also be rematched. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-29Remove ambiguity in PGPSignature verbose field namesDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19reporead: simplify and fix transaction management in update_common()Dan McGee1-15/+16
We can use the easier transaction.commit_on_success() decorator if we be sure to explicitly mark the transaction dirty. This fixes the issue where a raised exception in this code called neither commit nor rollback. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05Adjust page and content caching lengths and decoratorsDan McGee1-4/+10
Remove never_cache from many places now that we don't actually need it since we aren't caching by default. Adjust our cache_function decorator times be shorter values, and also randomize them a bit to make cache invalidations not all line up. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-22Fix mismatched URL keyword argDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12reporead: more efficient deletion of filesDan McGee1-1/+9
Rather than delegating to Django and batch deletion by ID, force issuing of a single delete query to clear out all existing file objects when necessary. This should speed up the deletion and update of packages with a lot of files by a non-trivial amount. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12PyLint suggested cleanupsDan McGee3-11/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-09Prefilter packages when looking up uncompressed man/info pagesDan McGee1-19/+23
This vastly speeds up the reports if you just want to look at your own packages and not the complete list, especially if the list of packages you maintain is relatively short. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-07Convert master key datetimes to datesDan McGee2-2/+76
The extra precision is not necessary and just makes entry of the data harder anyway.
2011-12-07Enhance devel model adminDan McGee2-2/+19
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-06Add a stub admin command to help fix permissions/content typesDan McGee1-0/+25
I needed this today to get the application working from scratch on another host. Probably not all there yet, but we'll see how far it gets us. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-06Add import signatures management commandDan McGee1-0/+104
This allow importing signatures from a provided gpg keyring, such as that produced by the generate_keyring management command that already exists. These will eventually be used for producing stats involving developer signing keys and their certification by master keys. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05Add new PGPSignature modelDan McGee2-0/+94
This will be used to track cross-developer and master key signatures to build a visualization in the web interface of key signatures, as well as be able to provide info on who is verified, who is not, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-03reporead: don't update timestamp on --forceDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-03reporead: fix --force flagDan McGee1-5/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-03Exclude Latin Name from developer profile formDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-01reporead: fix not defined variableDan McGee1-0/+2
Way to fail at refactoring, Dan. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30Master keys: reduce query count, add default orderingDan McGee1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30Allow generation of an ownertrust fileDan McGee1-3/+26
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30Integrate master key into rest of siteDan McGee1-0/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30Add master key model and admin integrationDan McGee3-0/+105
2011-11-30Add initial migration for devel appDan McGee2-0/+18
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30reporead: split out filesonly update methodDan McGee1-75/+95
This removes a bunch of the conditional logic at a slight cost of some code duplication. However, the methods and madness is now much easier to follow. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30reporead: fix filesonly needs update checksDan McGee1-3/+5
This was broken after the select for update changes. We really should split the whole filesonly update into another method instead of the current shotgun approach with conditionals everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21Better support for non-latin full namesDan McGee1-1/+1
Add a 'latin_name' field to the user profile so we can better support those developers with names in non-Latin scripts, and yet still show a Latin name as necessary on the developer profile page. This field only shows up if populated. Also, use consistent sorting everywhere- rather than using username, always use first_name and last_name fields. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17reporead: don't trim pkgdesc lengthDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17Ensure reporead is protected against simultaneous runsDan McGee1-100/+106
This adds a bunch of transaction magic and SELECT FOR UPDATE stuff to reporead to cope with the now-concurrent runs of reporead we get when invoked from our inotify-based updater. The collision occurs with 'any' architecture packages as both repo databases contain the new version, and the updates occur at exactly the same time. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17reporead_inotify: nice the spawned subprocessesDan McGee1-4/+9
This prevents the reporead job from taking over time from more important processes; this is not a rush task. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-16reporead_inotify: close connection once we are done with itDan McGee1-0/+6
This prevents an otherwise idle connection from sitting around and being totally useless. Signed-off-by: Dan McGee <dan@archlinux.org>