Fixes #45079
authorkarltk <karltk@gentoo.org>
Fri, 10 Sep 2004 09:29:11 +0000 (09:29 -0000)
committerkarltk <karltk@gentoo.org>
Fri, 10 Sep 2004 09:29:11 +0000 (09:29 -0000)
svn path=/; revision=129

trunk/src/gensync/ChangeLog
trunk/src/gensync/gensync

index 35928fbb15def8c9de5953bb83dbfe1e44e079ef..266346b489c57eb5c3e194e5053714927488b808 100644 (file)
@@ -1,5 +1,8 @@
 2004-09-10 Karl Trygve Kalleberg <karltk@gentoo.org>
-       * Fixed portage import.
+       * Fixed portage import, fixes #45079.
+       * Added all sources sync patch from Adam Ashley
+        <adam_ashley@softhome.net>, fixes #45079.
+
 
 2004-02-08 Karl Trygve Kalleberg <karltk@gentoo.org>
        * Initial import
index 9d40be85815d935835730c22541ab852b2742612..177665f5d196dcff86b7f1bcb1262d03f9438217 100755 (executable)
@@ -130,6 +130,8 @@ class SyncSourceManager:
                        if x.id == source_id:
                                return x
                return None
+       def get_all_sync_sources(self):
+               return self.sources
                
 def print_version():
        print __productname__ + "(" + __version__ + ") - " + \
@@ -140,6 +142,7 @@ def print_usage():
        print white("Usage: ") + turquoise(__productname__) + \
              yellow(" <options> ") + green("repo-id-1 repo-id-2 ...")
        print "where " + yellow("<options>") + " is one of"
+       print yellow(" -a, --all-sources") + "  - sync all know sources"
        print yellow(" -l, --list-sources") + " - list known rsync sources"
        print yellow(" -C, --no-color") + "      - turn off colours"
        print yellow(" -h, --help") + "         - this help screen"
@@ -164,6 +167,8 @@ def parse_args(cliargs):
                        break
                elif x in ["-l", "--list-sources"]:
                        cmd = "list-sources"
+               elif x in ["-a", "--all-sources"]:
+                       cmd = "all-sources"
                else:
                        args.append(x)
        return (cmd, args, options)
@@ -199,6 +204,11 @@ def main():
                                print "Syncing '%s' into '%s'" % \
                                      (repo.id, repo.overlay)
                                repo.perform_sync()
+       elif cmd == "all-sources":
+               for repo in ssmgr.get_all_sync_sources():
+                       print "Syncing '%s' into '%s'" % \
+                             (repo.id, repo.overlay)
+                       repo.perform_sync()
        else:
                print red("Unknown command '" + cmd + "'")