patch for reposync to have a real destdir... its still using repo.id as default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



patch for reposync to have a real destdir... its still using repo.id as default
apply with: -p0

"no repo to setup" should also in my eyes have a different exit state than 0

if reposync is called the intention of the user is to sync a specific
repo. exit 0 in my eyes means a repo is succesfully synced. if it cant
setup a repo there should definitely be a different exit state.

regards,
Rudolf Kastl

p.s. probably needs still some tweaking
--- reposync	2006-05-18 21:29:47.000000000 +0200
+++ reposync.old	2006-05-18 21:35:03.000000000 +0200
@@ -82,8 +82,6 @@
         help="Use a temp dir for storing/accessing yum-cache")
     parser.add_option("-p", "--download_path", dest='destdir', 
         default=os.getcwd(), help="Path to download packages to: defaults to current dir")
-    parser.add_option("-o", "--override-repodest", dest='repodest',
-	help="Path to override the default behaviour of downloading all files into the repoid dir")
     parser.add_option("-u", "--urls", default=False, action="store_true", 
         help="Just list urls of what would be downloaded, don't download")
     parser.add_option("-n", "--newest-only", dest='newest', default=False, action="store_true", 
@@ -147,11 +145,8 @@
     
 
     for repo in my.repos.listEnabled():
-        if opts.repodest == None:
-            opts.repodest=repo.id
-        local_repo_path = opts.destdir + '/' + str(opts.repodest)
-        print local_repo_path
-	
+        local_repo_path = opts.destdir + '/' + repo.id
+            
         reposack = ListPackageSack(my.pkgSack.returnPackages(repoid=repo.id))
             
         if opts.newest:
@@ -163,8 +158,8 @@
         for pkg in download_list:
             repo = my.repos.getRepo(pkg.repoid)
             remote = pkg.returnSimple('relativepath')
-            local = local_repo_path + "/" + remote
-            localdir = os.path.dirname(local_repo_path)
+            local = local_repo_path + '/' + remote
+            localdir = os.path.dirname(local)
             if not os.path.exists(localdir):
                 os.makedirs(localdir)
 
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux