Age | Commit message (Collapse) | Author |
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This works better in most cases since we need the architecture and
repository objects at some point during the view process.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Because some attributes are optional or otherwise not auto-magically
picked up by Django, we can help the performance of loading these pages
a lot by forcing a select_related() on the queryset used by the admin.
For something like signoff_specifications, this drops the query count
from ~107 to 9 queries.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Now that we are using a database that doesn't stink, it makes more sense
to do all of the stuff we need to do down at the database level. This
helps a lot when 500+ packages are in play at a given time, such as
some of our larger rebuild todo lists.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If we implement the __eq__ and __hash__ methods, we can use a set to
gather package difference objects and make deduplication of objects a
lot more efficient.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Bug #16519 in Django deprecates mimetype, so update our code
accordingly.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We were peppering the database with a bunch of queries here; using
prefetch_related and attach_maintainers can cut down the count
significantly.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Django doesn't attach the parent object to the child objects, even when
queried through the related manager. This causes up to 3 extra queries:
one to retrieve the package again, and one each for arch and repo
retrieval.
For a package like archboot, this drops the number of necessary queries
for the package page from 805 to 222 (yes, this is still too high) and
cuts the time spent waiting on the database from 505ms to 262ms.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
For todolist packages that have had their package removed, this will
allow the package name to continue to appear even after the linked
package has been deleted.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These are super-simple, but it is also trivial to test.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Rather than the old idiom of dict((k, v) for <> in <>).
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
* 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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is for users that aren't logged in; developers will still see them.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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.
|
|
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>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Things like ' ', '-', '.', etc. will no longer be accepted in this
field.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
This overrides the base class __unicode__ method.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is now completely replaced by the deptype column.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Very little dealt directly with this field.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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.
|