summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-07-09Work around bulk_create limitations in sqlite3 in reporeadDan McGee1-6/+28
Given the 999 SQL statement variable limit, we can easily hit it when updating a package with thousands of files or a few hundred depends. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09Make collapseDependsList() a bit smarterDan McGee1-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09mirrorcheck: Don't use bulk_create on sqlite3Dan McGee1-2/+6
It isn't worth it, as we run into the 999 max SQL statement variables issue when using it on any significant amount of mirrors. Since this is just a development database setup, and it isn't a command we need to run especially fast, we can ditch it. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09reporead: disable FULL synchronous writes for sqlite3Dan McGee1-0/+6
At least on Linux, we hit a huge bottleneck waiting for the FULL commit to happen for each added package during reporead operations. It makes much more sense to back this off to FULL level instead, which trades some possible loss of durability for speedier operation. Additionally, no one would possibly be running their production version of this site on sqlite3, right? Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09Get multilib package differences query working on sqlite3Dan McGee1-9/+22
Thank you database engines for all implementing such simple operations as substring() and length() in different ways. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09Don't include StdDev on sqlite3 mirror status queryDan McGee1-3/+9
Because this function isn't shipped by default, it makes more sense to just omit it completely from the query we do to build the tables on this page when in development. Substitute 0.0 for the value so the rest of the calculations and display work as expected. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09Don't log package updates in Python when we have DB trigger supportDan McGee2-2/+24
This adds a helper method to find the database engine in use, and then skips code we shouldn't execute if we are doing this another way. Note that this helper method could be useful for backend-specific code paths elsewhere, such as custom SQL being called or lack of StdDev() in sqlite3 out of the box. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09Add triggers for adding package update rowsDan McGee2-0/+75
This will be done instead of doing this logic at the application level, which has some subtle race conditions. When two simultaneous threads attempt to delete the same package, two update rows for the delete action are inserted. When done at the database level, we can ensure a one-to-one mapping between row operations and entries in this table. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09Handle HTTPException being thrown in mirrorcheckDan McGee1-0/+6
Managed to see this bubble up today when running the mirrorcheck command on a less than ideal connection that was experiencing timeouts at the wrong time. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-09Use a set instead of list when gathering package IDs to fetchDan McGee1-1/+1
If we have duplicates in this list, it makes no sense to include them in the list we send to the database. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-06Collapse the dependencies and required by lists when they are longDan McGee2-5/+31
For now, this happens when the lists are over 20 items. Using JS, hide the 21st and following packages listed in the list and replace them with a 'Show More...' link that users can click to get the full list. For a package such as glibc with 444 'Required By' entries, this can make quite a visual difference. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-06reporead: don't append slash to empty (root) directoryDan McGee1-1/+2
Add the slash only if we have a directory name, and not otherwise. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-05reporead: handle files in root directory properlyDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-05reporead: properly handle cases where last_update == files_last_updateDan McGee1-2/+2
We should assume the filelists are up to date in this case, not out of date. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-02Update flag out of date verbiage when orphans are involvedDan McGee1-1/+2
From FS#29922, indicate what happens if the package is unmaintained. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-02Add indexes on 'created' field to several package-related modelsDan McGee2-3/+217
These models regularly sort by or limit by the created field, so adding a index on the created database column makes sense. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-02Log package updates during reporead invocationDan McGee2-1/+42
This adds a Manager and log_update method to help log all updates made to the packages table during reporead runs. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-02Add new package Update modelDan McGee3-2/+302
This will be used to track updates to package as we do them during reporead. By storing enough relevant fields from the package object, we should be able to produce a useful report on a regular basis of what has been happening in the repositories. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-02Remove no-longer necessary delayed imports of PackageDan McGee1-10/+7
Since commit 158be107e4ad6, we have been importing the Package model at the top-level in this file, so we can kill this code that was never updated. This should also give us back any performance hit we were seeing from the delayed imports. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-21Add a last_modified field to user profilesDan McGee2-1/+125
A behind the scenes field that might be slightly useful. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-08Use 3 decimal places for showing compression ratioDan McGee1-1/+1
Otherwise there are too many grouped under each value. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-08Fix a few minor markup errorsDan McGee2-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20Ensure we use last_modified date from News in headersDan McGee2-5/+6
We were actually using the postdate attribute rather than last_modified, which means any News objects that get edited would not trigger an update of the feed. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Add RSS links to /news/ and /packages/ URLsDan McGee2-0/+5
These were available only from the home page, but it makes sense to advertise them on the corresponding index pages too. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19reporead: fix copy/paste issueDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Drop old PackageDepend modelDan McGee3-72/+136
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Switch to usage of new Depend objectDan McGee7-25/+54
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Migrate package depends data into new modelDan McGee1-0/+246
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Add new depends modelDan McGee2-0/+206
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19mirrors: add an alternate_email columnDan McGee3-2/+71
We have a lot of these in the freeform text area in the mirror notes; attempt to make this data usable as necessary if we want to do some sort of mirror notification automation in the future. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Issue redirects from non-agnostic to agnostic URLs if unambiguousDan McGee1-0/+10
For something like "/extra/i686/apache-ant/", we can redirect to "/extra/any/apache-ant/" without ambiguity. Previously this redirected to the split packages listing with a single package, which was neither correct nor really expected. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Link to provides/conflicts/replacements if we can in details templateDan McGee2-6/+16
Use the newly implemented get_best_satisfier() method that is in the abstract base class for all of these types. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Add a get_best_satisfier method to RelatedToBaseDan McGee1-1/+35
This is basically what we do in PackageDepend already. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Simplify get_best_satisfier and get_providersDan McGee1-27/+24
We always passed values in that came off the containing package object; we can access these directly in the methods themselves. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Refactor an abstract base class out of conflicts/provides/replacesDan McGee1-24/+17
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-14Add ability to restrict status report to single tierDan McGee4-6/+20
This should make it easier to catch errors in our Tier 1 mirrors. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-14Add rsync support to mirrorcheck and other small improvementsDan McGee2-43/+91
The main changes in this patch implement rsync:// protocol checking support by calling the rsync binary, requested in FS#29878. We track and log much of the same things as we already do for FTP and HTTP URLs- check time, last sync, total check duration, etc. Also added in this patch is a configurable timeout value which defaults to the previous hardcoded value of 10 seconds; this can be passed as an option to the mirrorcheck command. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-14Use linebreaksbr filter on log error message textDan McGee1-1/+1
If we get a multi-line message in, we should show line breaks at the appropriate places. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-14Change mirror log error text to unlimited lengthDan McGee2-1/+71
Use TextField rather than a limited-length CharField; leave it up to the code filling this field to determine an appropriate length. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-14Don't limit protocols returned by mirror status functionDan McGee1-2/+0
If results weren't available for certain URLs, they won't show up anyway in this list, and if we start to check rsync URLs, then we want their values to come back in this status list. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12Use python json module directly in place of simplejsonDan McGee6-23/+18
As of Python 2.6, this is a builtin module that has all the same functions and capabilities of the Django simplejson module. Additionally simplejson is deprecated in the upcoming Django 1.5 release. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12Change to new time access methods in pgpdump codeDan McGee2-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12Update requirements.txtDan McGee2-4/+4
Bump to a new South bugfix release as well as bumping the pgpdump library requirement to a more performant version. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-06Update SevenL sponsor verbiageDan McGee2-13/+15
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-05Fix suggestion caching again for non-ASCII charactersDan McGee1-1/+2
This is why you should test this stuff with random input before rolling it out. Whoops. URL that caught this problem: /opensearch/packages/suggest?q=%D7%A0%D7%9F%D7%92%D7%9F aka /opensearch/packages/suggest?q=נןגן Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-04Fix search suggestions for invalid cache keysDan McGee1-2/+3
Unfortunately, "invalid" in this case includes spaces, which is a bit crazy. MD5 the provided search term before using it as a cache key to be safe. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02Add a smart protocol filter to mirrorlist generatorDan McGee2-15/+41
This will only list FTP mirrors for a given country if there are no HTTP mirrors available, since FTP must die. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02Allow mirrorlist generator pattern to match any protocolDan McGee2-9/+14
Add a helper method that checks if we know about the protocol; if so, we can spit out a URL for it. This allows (if you are insane) generation of an rsync mirrorlist, for instance. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02Flagging related cleanups and improvementsDan McGee2-21/+33
Touch up the style slightly on the flag help popup to match the main site style more closely. When a logged-in user is flagging a package out of date, we have no need for them to fill in the email field since we already have an email address on file. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02rematch_developers: do mass updates instead of single savesDan McGee1-31/+30
When updating a lot of objects, it makes much more sense to perform targeted update queries rather than one-row-at-a-time saves. Signed-off-by: Dan McGee <dan@archlinux.org>