*** emerge Fri Mar 12 22:12:01 2004 --- emerge.local Wed Mar 3 06:34:33 2004 *************** *** 98,103 **** --- 98,104 ---- "--onlydeps", "--pretend", "--quiet", "--resume", "--searchdesc", "--selective", + "--syncinstalled", "--skipfirst", "--tree", "--update", "--upgradeonly", *************** *** 2030,2038 **** else: print "!!! RSYNC_EXCLUDEFROM specified, but file does not exist." if portage.settings.has_key("RSYNC_RATELIMIT"): rsync_flags.append("--bwlimit="+portage.settings["RSYNC_RATELIMIT"]) - rsynccommand = "/usr/bin/rsync " + string.join(rsync_flags, " ") servertimestampdir = portage.settings["PORTAGE_CACHEDIR"]+"/" --- 2031,2055 ---- else: print "!!! RSYNC_EXCLUDEFROM specified, but file does not exist." + if "--syncinstalled" in myopts: + rs_tmp = "/tmp/rsync_include" + dirs_only = portage.db["/"]["vartree"].getallnodes() + # ending "/**" will match all of the files in the + # directory and any subdirectories. + dirs_only = ["/" + x + "/**" for x in dirs_only] + # write the file of directories to update + f = open(rs_tmp, "w") + for dir in dirs_only: + f.write(dir + "\n") + f.close() + # add rsync flags + rsync_flags.append("--include='*/'") + rsync_flags.append("--include='timestamp.chk'") + rsync_flags.append("--include-from=%s" % (rs_tmp)) + rsync_flags.append("--exclude='*'") + if portage.settings.has_key("RSYNC_RATELIMIT"): rsync_flags.append("--bwlimit="+portage.settings["RSYNC_RATELIMIT"]) rsynccommand = "/usr/bin/rsync " + string.join(rsync_flags, " ") servertimestampdir = portage.settings["PORTAGE_CACHEDIR"]+"/"