* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/, bin/, pym/portage/
@ 2011-10-15 21:40 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2011-10-15 21:40 UTC (permalink / raw
To: gentoo-commits
commit: 2859965bb164f322d2e169d8534cdc535a3f9901
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 15 21:40:28 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Oct 15 21:40:28 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2859965b
fixpackages: don't use PORTAGE_CALLER
---
bin/fixpackages | 9 +++++----
pym/portage/_global_updates.py | 8 ++++----
pym/portage/tests/emerge/test_simple.py | 8 +++++++-
3 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/bin/fixpackages b/bin/fixpackages
index 5e1df70..dc43ed2 100755
--- a/bin/fixpackages
+++ b/bin/fixpackages
@@ -1,11 +1,12 @@
#!/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:
@@ -38,7 +39,7 @@ except (OSError, ValueError) as e:
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.")
diff --git a/pym/portage/_global_updates.py b/pym/portage/_global_updates.py
index be8a734..72fd5c4 100644
--- a/pym/portage/_global_updates.py
+++ b/pym/portage/_global_updates.py
@@ -15,7 +15,7 @@ from portage.update import grab_updates, parse_updates, update_config_files, upd
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).
@@ -73,10 +73,10 @@ def _global_updates(trees, prev_mtimes, quiet=False):
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 = []
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 134d889..70d4918 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -249,7 +249,8 @@ src_install() {
"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")
@@ -271,6 +272,11 @@ src_install() {
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-15 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15 21:40 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/, bin/, pym/portage/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox