summaryrefslogtreecommitdiffstats
path: root/scripts/git-integration
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2015-01-08 09:16:35 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2015-01-08 09:18:40 +0100
commit2d96b51cb5dafec5b8db4a0d0f8aa3e540669cc0 (patch)
tree8776db4db067ba16754c9f4e6c637210be8941c9 /scripts/git-integration
parented7fb91f41241f62b22faf355aa0d00b3c980342 (diff)
downloadaur-2d96b51cb5dafec5b8db4a0d0f8aa3e540669cc0.tar.gz
aur-2d96b51cb5dafec5b8db4a0d0f8aa3e540669cc0.tar.xz
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>
Diffstat (limited to 'scripts/git-integration')
-rwxr-xr-xscripts/git-integration/git-update.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/git-integration/git-update.py b/scripts/git-integration/git-update.py
index 15a731c6..3d2742a2 100755
--- a/scripts/git-integration/git-update.py
+++ b/scripts/git-integration/git-update.py
@@ -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])
- f.write(pkginfo['pkgdesc'])
+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'])