summaryrefslogtreecommitdiffstats
path: root/debuginfofs-mirror
diff options
context:
space:
mode:
Diffstat (limited to 'debuginfofs-mirror')
-rwxr-xr-xdebuginfofs-mirror11
1 files changed, 9 insertions, 2 deletions
diff --git a/debuginfofs-mirror b/debuginfofs-mirror
index 935719e..6c7fdb0 100755
--- a/debuginfofs-mirror
+++ b/debuginfofs-mirror
@@ -74,6 +74,7 @@ class DebuginfoFSDownloader(YumUtilBase):
help="download debuginfo for this version of the distro.")
o.add_option("--basearch", default="i386",
help="download debuginfo for this arch")
+ # TODO: --skip-download, --force-unpack
def setup(self):
self.modify_options()
@@ -178,10 +179,10 @@ def mkdebuginfolinks(sourcedir, targetdir):
count += 1
return count
-if __name__ == '__main__':
+# TODO: break this up into more logical chunks
+def main():
y = DebuginfoFSDownloader()
opt = y.setup()
- # FIXME handle KeyboardInterrupt
# FIXME this is stupid - figure out how --verbose works
if opt.verbose:
y.logger = y.verbose_logger
@@ -320,3 +321,9 @@ if __name__ == '__main__':
# Make hardlinks
r = mkdebuginfolinks(targetdir, os.path.join(opt.exportdir,'build-id'))
y.logger.info("Linked %3i debuginfo file%s" % (r, r != 1 and "s" or ""))
+
+if __name__ == '__main__':
+ try:
+ main()
+ except KeyboardInterrupt:
+ print "Exiting on keyboard interrupt"