#!/usr/bin/python
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
-import os,sys
-os.environ["PORTAGE_CALLER"]="fixpackages"
+import os
+import sys
+
try:
import portage
except ImportError:
portage.writemsg("!!! %s\n" % str(e))
del e
-_global_updates(mytrees, mtimedb["updates"])
+_global_updates(mytrees, mtimedb["updates"], if_mtime_changed=False)
print()
print("Done.")
from portage.util import grabfile, shlex_split, \
writemsg, writemsg_stdout, write_atomic
-def _global_updates(trees, prev_mtimes, quiet=False):
+def _global_updates(trees, prev_mtimes, quiet=False, if_mtime_changed=True):
"""
Perform new global updates if they exist in 'profiles/updates/'
subdirectories of all active repositories (PORTDIR + PORTDIR_OVERLAY).
continue
try:
- if mysettings.get("PORTAGE_CALLER") == "fixpackages":
- update_data = grab_updates(updpath)
+ if if_mtime_changed:
+ update_data = grab_updates(updpath, prev_mtimes=prev_mtimes)
else:
- update_data = grab_updates(updpath, prev_mtimes)
+ update_data = grab_updates(updpath)
except DirectoryNotFound:
continue
myupd = []
"PYTHONPATH" : pythonpath,
}
- dirs = [distdir, fake_bin, portage_tmpdir,
+ updates_dir = os.path.join(portdir, "profiles", "updates")
+ dirs = [distdir, fake_bin, portage_tmpdir, updates_dir,
user_config_dir, var_cache_edb]
true_symlinks = ["chown", "chgrp"]
true_binary = find_binary("true")
for cp, xml_data in metadata_xml_files:
with open(os.path.join(portdir, cp, "metadata.xml"), 'w') as f:
f.write(playground.metadata_xml_template % xml_data)
+ with open(os.path.join(updates_dir, "1Q-2010"), 'w') as f:
+ f.write("""
+slotmove =app-doc/pms-3 2 3
+move dev-util/git dev-vcs/git
+""")
if debug:
# The subprocess inherits both stdout and stderr, for