From 7a3d9020c187c659c327bc4dc3a7aeb1d4857c66 Mon Sep 17 00:00:00 2001 From: karltk Date: Fri, 10 Sep 2004 09:29:11 +0000 Subject: [PATCH] Fixes #45079 svn path=/; revision=129 --- trunk/src/gensync/ChangeLog | 5 ++++- trunk/src/gensync/gensync | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/trunk/src/gensync/ChangeLog b/trunk/src/gensync/ChangeLog index 35928fb..266346b 100644 --- a/trunk/src/gensync/ChangeLog +++ b/trunk/src/gensync/ChangeLog @@ -1,5 +1,8 @@ 2004-09-10 Karl Trygve Kalleberg - * Fixed portage import. + * Fixed portage import, fixes #45079. + * Added all sources sync patch from Adam Ashley + , fixes #45079. + 2004-02-08 Karl Trygve Kalleberg * Initial import diff --git a/trunk/src/gensync/gensync b/trunk/src/gensync/gensync index 9d40be8..177665f 100755 --- a/trunk/src/gensync/gensync +++ b/trunk/src/gensync/gensync @@ -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(" ") + green("repo-id-1 repo-id-2 ...") print "where " + yellow("") + " 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 + "'") -- 2.26.2