git-update.py: Do not wipe repository descriptions

Only update repository descriptions if there is at least one package in
the package base meta data.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2015-01-08 09:16:35 +01:00
parent ed7fb91f41
commit 2d96b51cb5

View file

@ -239,6 +239,8 @@ save_srcinfo(srcinfo, db, cur, user)
db.close()
with open(git_dir + '/description', 'w') as f:
pkginfo = srcinfo.GetMergedPackage(list(srcinfo.GetPackageNames())[0])
pkglist = list(srcinfo.GetPackageNames())
if len(pkglist) > 0:
with open(git_dir + '/description', 'w') as f:
pkginfo = srcinfo.GetMergedPackage(pkglist[0])
f.write(pkginfo['pkgdesc'])