distgit: Add some logs when hardlinks are made
This commit is contained in:
parent
bd10dee3c1
commit
8ecd6b0fd0
1 changed files with 5 additions and 3 deletions
|
@ -66,7 +66,7 @@ def check_auth(username):
|
|||
return authenticated
|
||||
|
||||
|
||||
def hardlink(src, dest):
|
||||
def hardlink(src, dest, username):
|
||||
try:
|
||||
os.makedirs(os.path.dirname(dest))
|
||||
|
||||
|
@ -85,6 +85,8 @@ def hardlink(src, dest):
|
|||
os.unlink(dest)
|
||||
os.link(src, dest)
|
||||
|
||||
print >> sys.stderr, "[username=%s] ln %s %s" % (username, src, dest)
|
||||
|
||||
|
||||
def main():
|
||||
os.umask(002)
|
||||
|
@ -169,7 +171,7 @@ def main():
|
|||
elif action == 'check':
|
||||
if os.path.exists(old_path):
|
||||
# The file had been uploaded at the old path
|
||||
hardlink(old_path, dest_file)
|
||||
hardlink(old_path, dest_file, username)
|
||||
print 'Available'
|
||||
else:
|
||||
print 'Missing'
|
||||
|
@ -217,7 +219,7 @@ def main():
|
|||
|
||||
# Add the file to the old path, where fedpkg is currently looking for it
|
||||
if hash_type == "md5":
|
||||
hardlink(dest_file, old_path)
|
||||
hardlink(dest_file, old_path, username)
|
||||
|
||||
# Emit a fedmsg message. Load the config to talk to the fedmsg-relay.
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue