djeuscan: fix alive / packaged updates

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
Corentin Chary 2012-06-04 10:28:06 +02:00
parent 83f5df4daf
commit 5b1884ead7
2 changed files with 5 additions and 5 deletions

View File

@ -207,10 +207,10 @@ class ScanPortage(object):
overlay=overlay,
defaults={"alive": True, "packaged": True}
)
if not created:
obj.alive = True
obj.packaged = True
obj.save()
if not created: # Created objects have defaults values
obj.alive = True
obj.packaged = True
obj.save()
if created:
self.cache_store_version(obj)

View File

@ -57,7 +57,7 @@ class ScanUpstream(object):
def store_version(self, package, ver, url):
obj, created = Version.objects.get_or_create(
package=package, slot='', revision='r0', version=ver, overlay='',
defaults={"alive": True, "urls": url, "packaged": True}
defaults={"alive": True, "urls": url, "packaged": False}
)
if not created:
obj.alive = True