Blame SOURCES/BZ-1463723-repotrack-copy-local-packages.patch

085af2
commit 18acdb310b0d55467cbf403c91cceb35a44ef125
085af2
Author: Michal Domonkos <mdomonko@redhat.com>
085af2
Date:   Tue Sep 10 18:48:19 2019 +0200
085af2
085af2
    repotrack: copy local packages. BZ 1463723
085af2
    
085af2
    While we correctly set the target localpath on the package object, we
085af2
    don't actually fetch (copy) the package itself if it's local.  This
085af2
    fixes it.
085af2
    
085af2
    Note that, for remote packages (without file://), this change has no
085af2
    effect (see UrlGrabber.urlgrab() for the context).
085af2
085af2
diff --git a/repotrack.py b/repotrack.py
085af2
index 79b761f..66e5b89 100755
085af2
--- a/repotrack.py
085af2
+++ b/repotrack.py
085af2
@@ -266,7 +266,7 @@ def main():
085af2
         if not opts.quiet:        
085af2
             my.logger.info('Downloading %s' % os.path.basename(remote))
085af2
         pkg.localpath = local # Hack: to set the localpath to what we want.
085af2
-        path = repo.getPackage(pkg)
085af2
+        path = repo.getPackage(pkg, copy_local=1)
085af2
 
085af2
         if not os.path.exists(local) or not os.path.samefile(path, local):
085af2
             shutil.copy2(path, local)