From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/, bin/, pym/portage/
Date: Sat, 15 Oct 2011 21:40:41 +0000 (UTC) [thread overview]
Message-ID: <2859965bb164f322d2e169d8534cdc535a3f9901.zmedico@gentoo> (raw)
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
reply other threads:[~2011-10-15 21:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2859965bb164f322d2e169d8534cdc535a3f9901.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox