diff --git a/euscan b/euscan index ff54642..4905187 100755 --- a/euscan +++ b/euscan @@ -45,10 +45,13 @@ from gentoolkit.eclean.search import (port_settings) QUERY_OPTS = {"include_masked": True} +BLACKLIST_PACKAGES = ['sys-kernel/usermode-sources', 'sys-kernel/xbox-sources', + 'sys-kernel/cell-sources', 'sys-libs/libstdc++-v3'] + SCANDIR_BLACKLIST_URLS = ['mirror://rubygems/(.*)', 'mirror://gentoo/(.*)'] BRUTEFORCE_BLACKLIST_PACKAGES = ['dev-util/patchelf', 'net-zope/plonepopoll'] -BRUTEFORCE_BLACKLIST_URLS = ['http://www.dockapps.org/download.php/id/(.*)'] +BRUTEFORCE_BLACKLIST_URLS = ['http://(.*)dockapps.org/download.php/id/(.*)'] # ========= # Functions @@ -282,11 +285,16 @@ def scan_directory_recursive(url, steps, vmin, vmax, output): for version, path in results: ver = parse_version(version) + if vmin and ver <= vmin: continue if vmax and ver >= vmax: continue + # Try to skip nightly builds when not wanted (www-apps/moodle) + if len(vmin) != len(ver) and len(ver) == 2 and len(ver[0]) == len('yyyymmdd'): + continue + if not url.endswith('/') and not path.startswith('/'): path = url + '/' + path else: @@ -576,6 +584,7 @@ def scanUpstream(options, package, output): matches = sorted(matches) pkg = matches.pop() + if pkg.version == '9999': if len(matches) == 0: sys.stderr.write(pp.warn("Package '%s' only have a dev version (9999)" % pp.pkgquery(package))) @@ -583,6 +592,10 @@ def scanUpstream(options, package, output): else: pkg = matches.pop() + if pkg.cp in BLACKLIST_PACKAGES: + sys.stderr.write(pp.warn("Package '%s' is blacklisted" % pp.pkgquery(package))) + sys.exit(errno.ENOENT) + pp.uprint(" * %s [%s]" % (pp.cpv(pkg.cpv), pp.section(pkg.repo_name()))) pp.uprint() diff --git a/euscanwww/annoying/__init__.pyc b/euscanwww/annoying/__init__.pyc deleted file mode 100644 index 6915190..0000000 Binary files a/euscanwww/annoying/__init__.pyc and /dev/null differ diff --git a/euscanwww/annoying/decorators.pyc b/euscanwww/annoying/decorators.pyc deleted file mode 100644 index 2ed3c22..0000000 Binary files a/euscanwww/annoying/decorators.pyc and /dev/null differ diff --git a/euscanwww/euscan/__init__.pyc b/euscanwww/euscan/__init__.pyc deleted file mode 100644 index 6c1ec8b..0000000 Binary files a/euscanwww/euscan/__init__.pyc and /dev/null differ diff --git a/euscanwww/euscan/admin.pyc b/euscanwww/euscan/admin.pyc deleted file mode 100644 index 451e331..0000000 Binary files a/euscanwww/euscan/admin.pyc and /dev/null differ diff --git a/euscanwww/euscan/forms.py b/euscanwww/euscan/forms.py new file mode 100644 index 0000000..5dc0bb1 --- /dev/null +++ b/euscanwww/euscan/forms.py @@ -0,0 +1,7 @@ +from django import forms + +class WorldFileForm(forms.Form): + world_file = forms.FileField() + +class WorldForm(forms.Form): + world = forms.CharField(widget=forms.Textarea) diff --git a/euscanwww/euscan/management/commands/list-packages.py b/euscanwww/euscan/management/commands/list-packages.py index 8233966..842e24a 100644 --- a/euscanwww/euscan/management/commands/list-packages.py +++ b/euscanwww/euscan/management/commands/list-packages.py @@ -1,3 +1,5 @@ +from optparse import make_option + from django.core.management.base import BaseCommand, CommandError from euscanwww.euscan.models import Package @@ -5,6 +7,49 @@ class Command(BaseCommand): _overlays = {} help = 'List packages' + option_list = BaseCommand.option_list + ( + make_option('--after', + action='store', + dest='after', + default=False, + help='After package'), + make_option('--before', + action='store', + dest='before', + default=False, + help='Before package'), + make_option('--limit', + action='store', + dest='limit', + default=False, + help='limit'), + ) + def handle(self, *args, **options): - for pkg in Package.objects.all(): + after = None + before = None + + if options['after']: + category, name = options['after'].split('/') + after = Package.objects.get(category=category, name=name) + + if options['before']: + category, name = options['before'].split('/') + before = Package.objects.get(category=category, name=name) + + packages = Package.objects + + if after or before: + if after: + packages = packages.filter(id__gte=after.id) + if before: + packages = packages.filter(id__lte=before.id) + else: + packages = packages.all() + + if options['limit']: + packages = packages[:int(options['limit'])] + + for pkg in packages: self.stdout.write('%s/%s\n' % (pkg.category, pkg.name)) + self.stdout.close() diff --git a/euscanwww/euscan/management/commands/scan-metadata.py b/euscanwww/euscan/management/commands/scan-metadata.py index 1a92ebc..f6d0bd0 100644 --- a/euscanwww/euscan/management/commands/scan-metadata.py +++ b/euscanwww/euscan/management/commands/scan-metadata.py @@ -74,6 +74,9 @@ class Command(BaseCommand): sys.stderr.write(self.style.ERROR("Gentoolkit fatal error: '%s'\n" % str(err))) if pkg.metadata: + obj.herds.clear() + obj.maintainers.clear() + for herd in pkg.metadata.herds(True): herd = self.store_herd(options, herd[0], herd[1]) obj.herds.add(herd) @@ -88,6 +91,10 @@ class Command(BaseCommand): obj.save() def store_herd(self, options, name, email): + if not name: + name = '{nil}' + name = name.strip("\r").strip("\n").strip("\t").strip() + herd, created = Herd.objects.get_or_create(herd=name) if created or herd.email != email: @@ -102,13 +109,16 @@ class Command(BaseCommand): def store_maintainer(self, options, name, email): if not name: name = email + if not name: + name = '{nil}' - maintainer, created = Maintainer.objects.get_or_create(name=name, email=email) + maintainer, created = Maintainer.objects.get_or_create(email=email) if created: if not options['quiet']: sys.stdout.write('[m] %s <%s>\n' % (name.encode('utf-8'), email)) + maintainer.name = name maintainer.save() return maintainer diff --git a/euscanwww/euscan/management/commands/scan-portage.py b/euscanwww/euscan/management/commands/scan-portage.py index f08fcd8..d276742 100644 --- a/euscanwww/euscan/management/commands/scan-portage.py +++ b/euscanwww/euscan/management/commands/scan-portage.py @@ -120,6 +120,7 @@ class Command(BaseCommand): # Delete previous versions to handle incremental scan correctly Version.objects.filter(package=obj, packaged=True).delete() + obj.n_packaged = 0 obj.n_versions = Version.objects.filter(package=obj).count() obj.save() diff --git a/euscanwww/euscan/migrations/0002_auto__add_unique_maintainer_email__del_unique_maintainer_name_email.py b/euscanwww/euscan/migrations/0002_auto__add_unique_maintainer_email__del_unique_maintainer_name_email.py new file mode 100644 index 0000000..8c8b720 --- /dev/null +++ b/euscanwww/euscan/migrations/0002_auto__add_unique_maintainer_email__del_unique_maintainer_name_email.py @@ -0,0 +1,99 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Removing unique constraint on 'Maintainer', fields ['name', 'email'] + db.delete_unique('euscan_maintainer', ['name', 'email']) + + # Adding unique constraint on 'Maintainer', fields ['email'] + db.create_unique('euscan_maintainer', ['email']) + + + def backwards(self, orm): + + # Removing unique constraint on 'Maintainer', fields ['email'] + db.delete_unique('euscan_maintainer', ['email']) + + # Adding unique constraint on 'Maintainer', fields ['name', 'email'] + db.create_unique('euscan_maintainer', ['name', 'email']) + + + models = { + 'euscan.categorylog': { + 'Meta': {'object_name': 'CategoryLog'}, + 'category': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'datetime': ('django.db.models.fields.DateTimeField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'n_packaged': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'n_packages': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'n_versions': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + 'euscan.euscanresult': { + 'Meta': {'object_name': 'EuscanResult'}, + 'datetime': ('django.db.models.fields.DateTimeField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'package': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['euscan.Package']"}), + 'result': ('django.db.models.fields.TextField', [], {'blank': 'True'}) + }, + 'euscan.herd': { + 'Meta': {'object_name': 'Herd'}, + 'email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'herd': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'euscan.herdlog': { + 'Meta': {'object_name': 'HerdLog'}, + 'datetime': ('django.db.models.fields.DateTimeField', [], {}), + 'herd': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['euscan.Herd']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'n_packaged': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'n_packages': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'n_versions': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + 'euscan.maintainer': { + 'Meta': {'object_name': 'Maintainer'}, + 'email': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}) + }, + 'euscan.maintainerlog': { + 'Meta': {'object_name': 'MaintainerLog'}, + 'datetime': ('django.db.models.fields.DateTimeField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'maintainer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['euscan.Maintainer']"}), + 'n_packaged': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'n_packages': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'n_versions': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + 'euscan.package': { + 'Meta': {'unique_together': "(['category', 'name'],)", 'object_name': 'Package'}, + 'category': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'herds': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['euscan.Herd']", 'symmetrical': 'False', 'blank': 'True'}), + 'homepage': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'maintainers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['euscan.Maintainer']", 'symmetrical': 'False', 'blank': 'True'}), + 'n_packaged': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'n_versions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}) + }, + 'euscan.version': { + 'Meta': {'unique_together': "(['package', 'slot', 'revision', 'version', 'overlay'],)", 'object_name': 'Version'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'overlay': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'package': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['euscan.Package']"}), + 'packaged': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revision': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'slot': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'urls': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'version': ('django.db.models.fields.CharField', [], {'max_length': '128'}) + } + } + + complete_apps = ['euscan'] diff --git a/euscanwww/euscan/models.py b/euscanwww/euscan/models.py index 04e46dc..7d34b63 100644 --- a/euscanwww/euscan/models.py +++ b/euscanwww/euscan/models.py @@ -11,14 +11,11 @@ class Herd(models.Model): class Maintainer(models.Model): name = models.CharField(max_length=128) - email = models.CharField(max_length=128) + email = models.CharField(max_length=128, unique=True) def __unicode__(self): return '%s <%s>' % (self.name, self.email) - class Meta: - unique_together = ['name', 'email'] - class Package(models.Model): category = models.CharField(max_length=128) name = models.CharField(max_length=128) diff --git a/euscanwww/euscan/templatetags/packages.py b/euscanwww/euscan/templatetags/packages.py new file mode 100644 index 0000000..81fb2a3 --- /dev/null +++ b/euscanwww/euscan/templatetags/packages.py @@ -0,0 +1,7 @@ +from django import template + +register = template.Library() + +@register.inclusion_tag('euscan/_packages.html') +def packages(packages): + return { 'packages' : packages } diff --git a/euscanwww/euscan/urls.py b/euscanwww/euscan/urls.py index 08c3873..3b026c4 100644 --- a/euscanwww/euscan/urls.py +++ b/euscanwww/euscan/urls.py @@ -3,11 +3,13 @@ from django.conf.urls.defaults import * urlpatterns = patterns('euscan.views', (r'^$', 'index'), (r'^logs/$', 'logs'), + (r'^world/$', 'world'), + (r'^world/scan/$', 'world_scan'), (r'^categories/$', 'categories'), - (r'^category/(?P[\w+][\w+.-]*)/packages/$', 'category'), + (r'^categories/(?P[\w+][\w+.-]*)/view/$', 'category'), (r'^herds/$', 'herds'), - (r'^herd/(?P[\w+][\w+.-]*)/packages/$', 'herd'), + (r'^herds/(?P[\{\}\w+.-]*)/view/$', 'herd'), (r'^maintainers/$', 'maintainers'), - (r'^maintainer/(?P\d+)/packages/$', 'maintainer'), + (r'^maintainers/(?P\d+)/view/$', 'maintainer'), (r'^package/(?P[\w+][\w+.-]*)/(?P[\w+][\w+.-]*)/$', 'package'), ) diff --git a/euscanwww/euscan/urls.pyc b/euscanwww/euscan/urls.pyc deleted file mode 100644 index c63d84b..0000000 Binary files a/euscanwww/euscan/urls.pyc and /dev/null differ diff --git a/euscanwww/euscan/views.py b/euscanwww/euscan/views.py index 523496b..0609453 100644 --- a/euscanwww/euscan/views.py +++ b/euscanwww/euscan/views.py @@ -4,13 +4,14 @@ from django.shortcuts import get_object_or_404 from django.db.models import Sum, Max from euscan.models import Version, Package, Herd, Maintainer, EuscanResult +from euscan.forms import WorldForm, WorldFileForm @render_to('euscan/index.html') def index(request): ctx = {} ctx['n_packaged'] = Package.objects.aggregate(Sum('n_packaged'))['n_packaged__sum'] ctx['n_versions'] = Package.objects.aggregate(Sum('n_versions'))['n_versions__sum'] - if ctx['n_versions'] is not None and ctx['n_pacaged'] is not None: + if ctx['n_versions'] is not None and ctx['n_packaged'] is not None: ctx['n_upstream'] = ctx['n_versions'] - ctx['n_packaged'] ctx['n_packages'] = Package.objects.count() ctx['n_herds'] = Herd.objects.count() @@ -36,19 +37,26 @@ def category(request, category): @render_to('euscan/herds.html') def herds(request): - return {} + # FIXME: optimize the query, it uses 'LEFT OUTER JOIN' instead of 'INNER JOIN' + herds = Package.objects.filter(herds__isnull=False).values('herds__herd').annotate(n_packaged=Sum('n_packaged'), n_versions=Sum('n_versions')) + return { 'herds' : herds } @render_to('euscan/herd.html') def herd(request, herd): - return {} + herd = get_object_or_404(Herd, herd=herd) + packages = Package.objects.filter(herds__id=herd.id) + return { 'herd' : herd, 'packages' : packages } @render_to('euscan/maintainers.html') def maintainers(request): - return {} + maintainers = Package.objects.filter(maintainers__isnull=False).values('maintainers__id', 'maintainers__name').annotate(n_packaged=Sum('n_packaged'), n_versions=Sum('n_versions')) + return { 'maintainers' : maintainers } @render_to('euscan/maintainer.html') def maintainer(request, maintainer_id): - return {} + maintainer = get_object_or_404(Maintainer, id=maintainer_id) + packages = Package.objects.filter(maintainers__id=maintainer.id) + return { 'maintainer' : maintainer, 'packages' : packages } @render_to('euscan/package.html') def package(request, category, package): @@ -56,3 +64,33 @@ def package(request, category, package): packaged = Version.objects.filter(package=package, packaged=True) upstream = Version.objects.filter(package=package, packaged=False) return { 'package' : package, 'packaged' : packaged, 'upstream' : upstream } + +@render_to('euscan/world.html') +def world(request): + form = WorldForm() + file_form = WorldFileForm() + + return { 'form' : form , 'file_form' : file_form } + +@render_to('euscan/world_scan.html') +def world_scan(request): + packages = [] + + # FIXME + if 'world_file' in request.FILES: + data = request.FILES['world_file'].read() + elif 'world' in request.POST: + data = request.POST['world'] + else: + data = "" + + for pkg in data.split('\n'): + try: + cat, pkg = pkg.split('/') + packages.append(Package.objects.get(category=cat, name=pkg)) + except: + pass + + return { 'packages' : packages } + + diff --git a/euscanwww/euscan/views.pyc b/euscanwww/euscan/views.pyc deleted file mode 100644 index ca2b0f7..0000000 Binary files a/euscanwww/euscan/views.pyc and /dev/null differ diff --git a/euscanwww/settings.py b/euscanwww/settings.py index 9dc5906..30783ee 100644 --- a/euscanwww/settings.py +++ b/euscanwww/settings.py @@ -13,12 +13,17 @@ MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': os.path.join(os.path.dirname( __file__ ), 'euscan.db'), # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. +# 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. +# 'NAME': os.path.join(os.path.dirname( __file__ ), 'euscan.db'), # Or path to database file if using sqlite3. + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'euscan', + 'USER': 'euscan', # Not used with sqlite3. + 'PASSWORD': 'w7RGZVQx6edAMaDE', # Not used with sqlite3. + 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. + 'OPTIONS': { + 'init_command': 'SET storage_engine=INNODB', + } } } @@ -79,6 +84,8 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'euscanwww.urls' +FORCE_SCRIPT_NAME="" + TEMPLATE_DIRS = ( os.path.join(os.path.dirname( __file__ ), 'templates'), ) diff --git a/euscanwww/templates/_base.html b/euscanwww/templates/_base.html index cdd6c3c..993e70e 100644 --- a/euscanwww/templates/_base.html +++ b/euscanwww/templates/_base.html @@ -21,9 +21,15 @@ diff --git a/euscanwww/templates/euscan/_base.html b/euscanwww/templates/euscan/_base.html deleted file mode 100644 index 586ec90..0000000 --- a/euscanwww/templates/euscan/_base.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - {% block title %}euscan{% endblock %} - - {% block css %} - - {% endblock %} - {% block javascript %} - {% endblock %} - - - -
- {% block content %} - {% endblock %} -
- - - - diff --git a/euscanwww/templates/euscan/_packages.html b/euscanwww/templates/euscan/_packages.html new file mode 100644 index 0000000..27ebb23 --- /dev/null +++ b/euscanwww/templates/euscan/_packages.html @@ -0,0 +1,29 @@ +{% load sub %} +{% load mul %} + + + + + + + + + {% for package in packages %} + {% if package.n_versions == package.n_packaged %} + + {% else %}{% if package.n_versions < package.n_packaged|mul:2 %} + + {% else %} + + {% endif %}{% endif %} + + + + + {% endfor %} + +
PackageEbuildsUnpackaged
+ + {{ package.category }}/{{ package.name }} + + {{ package.n_packaged }}{{ package.n_versions|sub:package.n_packaged }}
diff --git a/euscanwww/templates/euscan/category.html b/euscanwww/templates/euscan/category.html index 1319fe7..ecbef56 100644 --- a/euscanwww/templates/euscan/category.html +++ b/euscanwww/templates/euscan/category.html @@ -1,38 +1,12 @@ {% extends "euscan/_datatable.html" %} -{% load sub %} -{% load mul %} +{% load packages %} {% block title %} -{{ block.super }} - {{ category }} +{{ block.super }} - Category: {{ category }} {% endblock %} {% block content %}

Category: {{ category }}

- - - - - - - - {% for package in packages %} - {% if package.n_versions == package.n_packaged %} - - {% else %}{% if package.n_versions < package.n_packaged|mul:2 %} - - {% else %} - - {% endif %}{% endif %} - - - - - {% endfor %} - -
PackageEbuildsUnpackaged
- - {{ package.category }}/{{ package.name }} - - {{ package.n_packaged }}{{ package.n_versions|sub:package.n_packaged }}
+{% packages packages %} {% endblock %} diff --git a/euscanwww/templates/euscan/herd.html b/euscanwww/templates/euscan/herd.html new file mode 100644 index 0000000..60bc50d --- /dev/null +++ b/euscanwww/templates/euscan/herd.html @@ -0,0 +1,12 @@ +{% extends "euscan/_datatable.html" %} + +{% load packages %} + +{% block title %} +{{ block.super }} - Herd: {{ herd.herd }} +{% endblock %} + +{% block content %} +

Herd: {{ herd.herd }}

+{% packages packages %} +{% endblock %} diff --git a/euscanwww/templates/euscan/herds.html b/euscanwww/templates/euscan/herds.html new file mode 100644 index 0000000..6dfbb35 --- /dev/null +++ b/euscanwww/templates/euscan/herds.html @@ -0,0 +1,38 @@ +{% extends "euscan/_datatable.html" %} + +{% load sub %} +{% load mul %} + +{% block title %} +{{ block.super }} - herds +{% endblock %} + +{% block content %} +

Herds

+ + + + + + + + {% for herd in herds %} + {% if herd.n_versions == herd.n_packaged %} + + {% else %}{% if herd.n_versions < herd.n_packaged|mul:2 %} + + {% else %} + + {% endif %}{% endif %} + + + + + {% endfor %} + +
HerdEbuildsUnpackaged
+ + {{ herd.herds__herd }} + + {{ herd.n_packaged }}{{ herd.n_versions|sub:herd.n_packaged }}
+{% endblock %} diff --git a/euscanwww/templates/euscan/maintainer.html b/euscanwww/templates/euscan/maintainer.html new file mode 100644 index 0000000..2c4c76e --- /dev/null +++ b/euscanwww/templates/euscan/maintainer.html @@ -0,0 +1,12 @@ +{% extends "euscan/_datatable.html" %} + +{% load packages %} + +{% block title %} +{{ block.super }} - Maintainer: {{ maintainer.name }} +{% endblock %} + +{% block content %} +

Maintainer: {{ maintainer.name }} <{{ maintainer.email }}>

+{% packages packages %} +{% endblock %} diff --git a/euscanwww/templates/euscan/maintainers.html b/euscanwww/templates/euscan/maintainers.html new file mode 100644 index 0000000..569630d --- /dev/null +++ b/euscanwww/templates/euscan/maintainers.html @@ -0,0 +1,38 @@ +{% extends "euscan/_datatable.html" %} + +{% load sub %} +{% load mul %} + +{% block title %} +{{ block.super }} - maintainers +{% endblock %} + +{% block content %} +

Maintainers

+ + + + + + + + {% for maintainer in maintainers %} + {% if maintainer.n_versions == maintainer.n_packaged %} + + {% else %}{% if maintainer.n_versions < maintainer.n_packaged|mul:2 %} + + {% else %} + + {% endif %}{% endif %} + + + + + {% endfor %} + +
MaintainerEbuildsUnpackaged
+ + {{ maintainer.maintainers__name }} + + {{ maintainer.n_packaged }}{{ maintainer.n_versions|sub:maintainer.n_packaged }}
+{% endblock %} diff --git a/euscanwww/templates/euscan/package.html b/euscanwww/templates/euscan/package.html index 70bd110..4851931 100644 --- a/euscanwww/templates/euscan/package.html +++ b/euscanwww/templates/euscan/package.html @@ -63,7 +63,7 @@
    {% for version in upstream %}
  • - {{ version.version }} - {{ version.url }} + {{ version.version }} - {{ version.urls }}
  • {% endfor %}
diff --git a/euscanwww/templates/euscan/world.html b/euscanwww/templates/euscan/world.html new file mode 100644 index 0000000..a7c7da2 --- /dev/null +++ b/euscanwww/templates/euscan/world.html @@ -0,0 +1,28 @@ +{% extends "_base.html" %} + +{% block title %} +{{ block.super }} - World scan +{% endblock %} + +{% block content %} +

Scan your packages

+ +
+ +

Import your /var/lib/portage/world file

+ +
{% csrf_token %} +{{ file_form.as_p }} + +
+ +
+ +

Or just list some packages

+ +
{% csrf_token %} +{{ form.as_p }} + +
+ +{% endblock %} diff --git a/euscanwww/templates/euscan/world_scan.html b/euscanwww/templates/euscan/world_scan.html new file mode 100644 index 0000000..ebb6561 --- /dev/null +++ b/euscanwww/templates/euscan/world_scan.html @@ -0,0 +1,12 @@ +{% extends "euscan/_datatable.html" %} + +{% load packages %} + +{% block title %} +{{ block.super }} - World Scan +{% endblock %} + +{% block content %} +

World scan:

+{% packages packages %} +{% endblock %}