summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xserver/debuginfofs-mirror6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/debuginfofs-mirror b/server/debuginfofs-mirror
index 4ad110f..9dbcac3 100755
--- a/server/debuginfofs-mirror
+++ b/server/debuginfofs-mirror
@@ -82,6 +82,8 @@ class DebuginfoFSDownloader(YumUtilBase):
help="download RPMs but don't bother unpacking them")
o.add_option("--keep-src", default=False, action="store_true",
help="keep the contents of /usr/src/debug from each package")
+ o.add_option("--keep-lib", default=False, action="store_true",
+ help="keep the contents of /usr/lib/debug from each package")
#o.add_option("--update-mtimes", default=False, action="store_true",
# help="update the mtime of all files from the given repos")
@@ -334,6 +336,7 @@ def main():
# Download, unpack, and hardlink debuginfo data
excludepat=None
if not opt.keep_src:
+ # Rather than extracting and then deleting, just don't extract it
excludepat="*/usr/src/debug/*"
for p in unpack_packages + download_packages:
if p in download_packages:
@@ -360,6 +363,9 @@ def 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 not opt.keep_lib:
+ # TODO: it'd be good to nuke all of the extra dirs
+ shutil.rmtree(os.path.join(targetdir,"usr/lib/debug"))
if __name__ == '__main__':
try: