From 91d89bb99b5f307e25ceedfef3fa9af3d17e7b6d Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Thu, 23 Oct 2008 14:22:15 -0400 Subject: [PATCH] make a latest link in repoDone --- hub/kojihub.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hub/kojihub.py b/hub/kojihub.py index aa4867a7..3df57478 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -6228,6 +6228,17 @@ class HostExports(object): os.unlink(src) repo_ready(repo_id) repo_expire_older(rinfo['tag_id'], rinfo['create_event']) + #make a latest link + latestrepolink = koji.pathinfo.repo('latest', rinfo['tag_name']) + #XXX - this is a slight abuse of pathinfo + try: + if os.path.lexists(latestrepolink): + os.unlink(latestrepolink) + os.symlink(repodir, latestrepolink) + except OSError: + #making this link is nonessential + log_error("Unable to create latest link for repo: %s" % repodir) + def isEnabled(self): host = Host()