euscan: shake the code
- add custom site handlers - use a custom user agent - fix some bugs in management commands Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
@ -120,12 +120,11 @@ class Command(BaseCommand):
|
||||
|
||||
herd, created = Herd.objects.get_or_create(herd=name)
|
||||
|
||||
if created or herd.email != email:
|
||||
if not options['quiet']:
|
||||
sys.stdout.write('+ [h] %s <%s>\n' % (name, email))
|
||||
if created and not options['quiet']:
|
||||
sys.stdout.write('+ [h] %s <%s>\n' % (name, email))
|
||||
|
||||
herd.email = email
|
||||
herd.save()
|
||||
herd.email = email
|
||||
herd.save()
|
||||
|
||||
return herd
|
||||
|
||||
|
@ -154,11 +154,6 @@ class Command(BaseCommand):
|
||||
' Set all versions dead, then set found versions alive and delete old versions '
|
||||
Version.objects.filter(package=obj, packaged=True).update(alive=False)
|
||||
|
||||
obj.n_packaged = 0
|
||||
obj.n_overlay = 0
|
||||
obj.n_versions = Version.objects.filter(package=obj).count()
|
||||
obj.save()
|
||||
|
||||
return obj
|
||||
|
||||
def store_version(self, options, package, cpv, slot, overlay):
|
||||
|
@ -136,9 +136,6 @@ class Command(BaseCommand):
|
||||
' Set all versions dead, then set found versions alive and delete old versions '
|
||||
Version.objects.filter(package=obj, packaged=False).update(alive=False)
|
||||
|
||||
obj.n_versions = Version.objects.filter(package=obj).count()
|
||||
obj.save()
|
||||
|
||||
return obj
|
||||
|
||||
def store_version(self, options, package, ver, url):
|
||||
|
@ -17,14 +17,14 @@
|
||||
# eix-update
|
||||
|
||||
## Scan portage (packages, versions)
|
||||
# python manage.py scan-portage --all --purge
|
||||
# python manage.py scan-portage --all --purge-versions --purge-packages
|
||||
|
||||
## Scan metadata (herds, maintainers, homepages, ...)
|
||||
# python manage.py scan-metadata --all
|
||||
|
||||
## Scan uptsream packages
|
||||
# python manage.py scan-upstream --all
|
||||
# eix --only-names -x | gparallel --jobs 400% euscan | python manage.py scan-upstream --feed
|
||||
# eix --only-names -x | gparallel --jobs 400% euscan | python manage.py scan-upstream --feed --purge-versions
|
||||
|
||||
## Update counters
|
||||
# python manage.py update-counters
|
Reference in New Issue
Block a user