summaryrefslogtreecommitdiffstats
path: root/packages
AgeCommit message (Collapse)AuthorFilesLines
2012-12-11Fix FS#32018, provides links always go to [testing] packagesDan McGee1-18/+6
Remove some of the smarts and do less, but be better about properly sorting the items as one might expect. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use python set comprehension syntax supported in 2.7Dan McGee3-7/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee3-9/+6
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-10-26Cleanup meta model attributesDan McGee1-2/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-10-26Extract some common architecture grabbing logicDan McGee1-6/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-10-14Refactor signoff-grabbing queriesDan McGee1-22/+18
Make them a bit more efficient by adding an explicit condition on both the packages and signoff table for the repo ID, and move the common code into a shared function both can use. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-10-12Make wrong permissions query more efficientDan McGee1-5/+6
This removes the subplan and per-row query in favor of a LEFT JOIN where we look for non-matching rows. Tested in sqlite3 and PostgreSQL. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30pkg_details_link template tag enhancementsDan McGee1-2/+6
* Output the blank string when passed None for pkg argument * Allow override of the link text if optional argument passed Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30Fix usage of naïve datetime objectDan McGee1-2/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30Hide staging packages in search resultsDan McGee1-3/+12
This is for users that aren't logged in; developers will still see them. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-25Don't show staging in package search repo listingDan McGee1-1/+2
This is temporary or at least a quick way to ensure regular users aren't confused by staging packages; later updates should re-enable display of this for logged in developers and trusted users. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-15Remove now unnecessary importrelease_2012-09-15Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-08p/v/flag: Add reply-to to out-of-date notificationsFlorian Pritz1-3/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-21Fix scm_link in a way that doesn't make cgit barfDan McGee1-1/+1
This does what commit cd51842ce86 set out to do in a way that doesn't break cgit's not-so-hit query string parsing. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-21Style cleanups in package_extrasDan McGee1-1/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-21Revert "Fix scm_link for Unicode characters"Dan McGee1-6/+5
This reverts commit cd51842ce86c44eef4e3c3d5334aca13e234151a. It turns out cgit doesn't like it if you escape the '/' in the URL parameter when viewing the log (a clear upstream bug), but we need to be able to work around this. Example: 'extra%2Fkdelibs' and 'extra/kdelibs' are handled differently.
2012-08-20Fix scm_link for Unicode charactersDan McGee1-5/+6
This blew up with non-ASCII due to us trying to stuff 8-bit characters into the URL parameters where they aren't allowed. Tested with a package entered via the admin with pkgname and pkgbase set to 'αναζήτη'. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-20Use case-insensitive search in opensearch suggestionsDan McGee1-2/+8
There is no real good reason not to do this, since our packages are lowercased by convention. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-15Ensure created is set when creating flag request via adminDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-15Fix signoffs SQL queryDan McGee1-1/+2
Although the old query returned the same results, the repos IN clause should really be a part of the WHERE, not the JOIN condition. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-13Attempt to screen for useless out-of-date messagesDan McGee1-1/+11
Things like ' ', '-', '.', etc. will no longer be accepted in this field. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Drop old flag request version columnDan McGee2-1/+213
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Migrate flag request version info to new formatDan McGee3-6/+226
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08PEP8 cleanups in package utilsDan McGee1-6/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Extract parse_version function from reporead logicDan McGee1-0/+18
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Begin split of flag request version column into partsDan McGee2-0/+236
Not sure why on only this one I decided to put all three parts in the same column. We don't do this anywhere else. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Fix alpm ctypes interface on systems not having alpmDan McGee1-5/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-07Push more default values down into the databaseDan McGee1-1/+1
This makes it easier to do manual manipulation/insertion/etc. at the database level, as well as just making things act more sane from an overall software stack perspective. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-07Make use of new ctypes ALPM APIDan McGee1-0/+23
We can use this when filtering down lists of depends, required by, conflicts, etc. to ensure we are honoring the version specifications the same way pacman would. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-07Add ctypes-based wrapper to ALPM vercmp APIDan McGee1-0/+68
This will allow us to do some additional stuff on systems that have libalpm available; namely we can use the version comparison logic it provides to do smarter filtering etc. of fields that use comparsion operations. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04Include description in Depend unicode() outputDan McGee1-0/+7
This overrides the base class __unicode__ method. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04Remove optional package depends columnDan McGee2-1/+211
This is now completely replaced by the deptype column. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04Make adjustments for optional -> deptype conversionDan McGee1-0/+210
Very little dealt directly with this field. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Add new deptype column to package dependsDan McGee2-0/+221
This is more flexible than our existing 'optional' boolean and will allow us to import check and make depends into the database as well as what we are already doing. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Use a raw ID field for package Update packageDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Declare 'enums' at class scopeDan McGee1-7/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Revert "Fall back to 410 Gone for package files view as well"release_2012-07-31Dan McGee1-10/+2
This reverts commit 9ab460c53a1ac4c79da6f05f2850ee21beedbab2. This seemed like the right thing to do, but it doesn't really play well with our more general dispatch framework we now do on the package details pages. Just let it 404 like it always did, as these pages are less essential. We can perhaps add a full dispatcher later if we really feel the need.
2012-07-31Reuse removed template for packages with multiple replacementsDan McGee1-4/+20
For example, bitcoin-git in the Arch repos is currently marked replaced by both bitcoin-qt and bitcoin-daemon. This allows us to show a page with both options listed instead of a blank 404 page. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Add package details redirect for package replacementsDan McGee1-1/+13
This makes sense if there is only one available replacement. We could get more sophisticated and show the removed page if there are multiple replacements available. Additionally, automatically redirect if there was only one matching package for a given package update deletion object. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Rework package details dispatch codeDan McGee1-37/+45
We had a variety of fallback paths that we took if a details page didn't exist for the combination of URL parts passed in. Before I go adding a few more possibilities, rework this so it is more flexible. It is now as simple as adding a method to the dispatch options list in order to have further fallback options. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Fix broken hidden input sort field on search formDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Replace deprecated list_detail usage in search with class-based viewDan McGee3-42/+45
We can convert the entire search view to a generic class-based ListView. This is still one of the more disgusting views in the application and has a ton of logic scattered buckshot across several methods, but this commit is not meant to address all of that in one go. This is the last of the deprecated pieces I know of we are still using in the codebase, so we should be relatively safe in the long run now for an upgrade to the eventual next major Django release. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Replace deprecated direct_to_template() with render() shortcutDan McGee4-24/+17
Now that Django actually provides a concise way to use a RequestContext object without instantiating it, we can use that rather than the old function-based generic view that worked well to do the same. Additionally, these function-based generic views will be gone in Django 1.5, so might as well make the move now. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Remove custom utc_now() function, use django.utils.timezone.now()Dan McGee3-10/+10
This was around from the time when we handled timezones sanely and Django did not; now that we are on 1.4 we no longer need our own code to handle this. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Add index on package updates pkgname fieldDan McGee2-1/+209
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-23Fall back to 410 Gone for package files view as wellDan McGee1-2/+10
This is another thing that Google and other search engines try to crawl that no longer exists at times, so we should handle it gracefully. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-23Ensure package files JS can support corner casesDan McGee1-0/+6
We should handle the cases dealing with no filelist available, outdated filelist, or a package without files, just as the HTML server-side page does. Add a bit more info to the JSON returned so we can do so. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-23Remove files list AJAX conditionalsDan McGee1-4/+0
Now that we just generate this list in JS, we don't need this separate code. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-23Add '410 Gone' support for packages moved out of repositoriesDan McGee2-5/+44
This allows us to do better than a generic 404 handler when we know a package previously existed in a given repository, and should also make things a bit nicer when getting sent in from a search engine to a page that no longer exists. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-21Split details/display package views into new moduleDan McGee2-147/+167
This moves a lot of the package and group display logic into a new view module, similar to what we already did earlier with a bunch of other views. Signed-off-by: Dan McGee <dan@archlinux.org>