public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r15737 - in main/branches/prefix: . pym/portage/package/ebuild pym/portage/sets pym/portage/util
@ 2010-03-03 18:47 Fabian Groffen (grobian)
  0 siblings, 0 replies; only message in thread
From: Fabian Groffen (grobian) @ 2010-03-03 18:47 UTC (permalink / raw
  To: gentoo-commits

Author: grobian
Date: 2010-03-03 18:47:30 +0000 (Wed, 03 Mar 2010)
New Revision: 15737

Modified:
   main/branches/prefix/RELEASE-NOTES
   main/branches/prefix/pym/portage/package/ebuild/fetch.py
   main/branches/prefix/pym/portage/sets/base.py
   main/branches/prefix/pym/portage/util/__init__.py
Log:
   Merged from trunk -r15517:15717

   | 15633   | Add section for portage-2.1.8.                               |
   | zmedico |                                                              |
   
   | 15714   | Clean up imports.                                            |
   | zmedico |                                                              |
   
   | 15715   | Move imports to top.                                         |
   | zmedico |                                                              |
   
   | 15716   | Clean up imports and unused variables.                       |
   | zmedico |                                                              |


Modified: main/branches/prefix/RELEASE-NOTES
===================================================================
--- main/branches/prefix/RELEASE-NOTES	2010-03-03 18:46:26 UTC (rev 15736)
+++ main/branches/prefix/RELEASE-NOTES	2010-03-03 18:47:30 UTC (rev 15737)
@@ -21,6 +21,9 @@
 * "world" now includes separate "selected" and "system" sets, where the
   "selected" set includes packages listed in /var/lib/portage/world and nested
   sets that may be listed /var/lib/portage/world_sets.
+
+portage-2.1.8
+==================================
 * The new --rebuilt-binaries option will replace installed packages with binary
   packages that have been rebuilt. Rebuilds are detected by comparison of
   BUILD_TIME package metadata. This option is enabled automatically when using

Modified: main/branches/prefix/pym/portage/package/ebuild/fetch.py
===================================================================
--- main/branches/prefix/pym/portage/package/ebuild/fetch.py	2010-03-03 18:46:26 UTC (rev 15736)
+++ main/branches/prefix/pym/portage/package/ebuild/fetch.py	2010-03-03 18:47:30 UTC (rev 15737)
@@ -14,6 +14,7 @@
 import shutil
 import stat
 import sys
+import tempfile
 
 
 import portage
@@ -140,8 +141,8 @@
 			os.unlink(filename)
 			return temp_filename
 
-	from tempfile import mkstemp
-	fd, temp_filename = mkstemp("", basename + "._checksum_failure_.", distdir)
+	fd, temp_filename = \
+		tempfile.mkstemp("", basename + "._checksum_failure_.", distdir)
 	os.close(fd)
 	os.rename(filename, temp_filename)
 	return temp_filename
@@ -1064,9 +1065,8 @@
 					# Use a temporary config instance to avoid altering
 					# the state of the one that's been passed in.
 					mysettings = config(clone=mysettings)
-					from tempfile import mkdtemp
 					try:
-						private_tmpdir = mkdtemp("", "._portage_fetch_.",
+						private_tmpdir = tempfile.mkdtemp("", "._portage_fetch_.",
 							global_tmpdir)
 					except OSError as e:
 						if e.errno != PermissionDenied.errno:

Modified: main/branches/prefix/pym/portage/sets/base.py
===================================================================
--- main/branches/prefix/pym/portage/sets/base.py	2010-03-03 18:46:26 UTC (rev 15736)
+++ main/branches/prefix/pym/portage/sets/base.py	2010-03-03 18:47:30 UTC (rev 15737)
@@ -3,10 +3,9 @@
 # $Id$
 
 import sys
-from portage import cpv_getkey, flatten
-from portage.dep import Atom, isvalidatom, match_from_list, \
-     best_match_to_list, use_reduce, paren_reduce
+from portage.dep import Atom, best_match_to_list, match_from_list
 from portage.exception import InvalidAtom
+from portage.versions import cpv_getkey
 
 if sys.hexversion >= 0x3000000:
 	basestring = str

Modified: main/branches/prefix/pym/portage/util/__init__.py
===================================================================
--- main/branches/prefix/pym/portage/util/__init__.py	2010-03-03 18:46:26 UTC (rev 15736)
+++ main/branches/prefix/pym/portage/util/__init__.py	2010-03-03 18:47:30 UTC (rev 15737)
@@ -12,11 +12,8 @@
 	'stack_dicts', 'stack_lists', 'unique_array', 'varexpand', 'write_atomic',
 	'writedict', 'writemsg', 'writemsg_level', 'writemsg_stdout']
 
-try:
-	from subprocess import getstatusoutput as subprocess_getstatusoutput
-except ImportError:
-	from commands import getstatusoutput as subprocess_getstatusoutput
 import codecs
+from copy import deepcopy
 import errno
 import logging
 import re
@@ -24,27 +21,25 @@
 import stat
 import string
 import sys
+import traceback
 
 import portage
 from portage import StringIO
 from portage import os
+from portage import pickle
+from portage import subprocess_getstatusoutput
 from portage import _encodings
 from portage import _os_merge
 from portage import _unicode_encode
 from portage import _unicode_decode
 from portage.exception import InvalidAtom, PortageException, FileNotFound, \
        OperationNotPermitted, PermissionDenied, ReadOnlyFileSystem
-from portage.dep import Atom, isvalidatom
+from portage.dep import Atom
 from portage.localization import _
 from portage.proxy.objectproxy import ObjectProxy
 from portage.cache.mappings import UserDict
 from portage.const import EPREFIX, EPREFIX_LSTRIP
 
-try:
-	import cPickle as pickle
-except ImportError:
-	import pickle
-
 noiselimit = 0
 
 def initialize_logger(level=logging.WARN):
@@ -612,7 +607,6 @@
 pickle_write = None
 
 def pickle_read(filename,default=None,debug=0):
-	import os
 	if not os.access(filename, os.R_OK):
 		writemsg(_("pickle_read(): File not readable. '")+filename+"'\n",1)
 		return default
@@ -633,7 +627,6 @@
 	return data
 
 def dump_traceback(msg, noiselevel=1):
-	import sys, traceback
 	info = sys.exc_info()
 	if not info[2]:
 		stack = traceback.extract_stack()[:-1]
@@ -752,7 +745,6 @@
 			if follow_links:
 				os.chown(filename, uid, gid)
 			else:
-				import portage.data
 				portage.data.lchown(filename, uid, gid)
 			modified = True
 		except OSError as oe:
@@ -902,7 +894,6 @@
 
 	all_applied = True
 
-	import portage.data # not imported globally because of circular dep
 	if portage.data.secpass < 2:
 
 		if uid != -1 and \
@@ -1178,7 +1169,6 @@
 		"""
 		if memo is None:
 			memo = {}
-		from copy import deepcopy
 		result = self.__class__()
 		memo[id(self)] = result
 		for k in self:
@@ -1225,7 +1215,6 @@
 			"""
 			if memo is None:
 				memo = {}
-			from copy import deepcopy
 			result = self.__copy__()
 			memo[id(self)] = result
 			result.func = deepcopy(self.func, memo)
@@ -1252,7 +1241,6 @@
 		for x in self.protect_list:
 			ppath = normalize_path(
 				os.path.join(self.myroot + EPREFIX_LSTRIP, x.lstrip(os.path.sep)))
-			mystat = None
 			try:
 				if stat.S_ISDIR(os.stat(ppath).st_mode):
 					self._dirs.add(ppath)
@@ -1265,7 +1253,6 @@
 		for x in self.mask_list:
 			ppath = normalize_path(
 				os.path.join(self.myroot + EPREFIX_LSTRIP, x.lstrip(os.path.sep)))
-			mystat = None
 			try:
 				"""Use lstat so that anything, even a broken symlink can be
 				protected."""
@@ -1352,7 +1339,6 @@
 		"._cfg" + str(prot_num).zfill(4) + "_" + real_filename))
 	old_pfile = normalize_path(os.path.join(real_dirname, last_pfile))
 	if last_pfile and newmd5:
-		import portage.checksum
 		try:
 			last_pfile_md5 = portage.checksum._perform_md5_merge(old_pfile)
 		except FileNotFound:




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-03 18:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03 18:47 [gentoo-commits] portage r15737 - in main/branches/prefix: . pym/portage/package/ebuild pym/portage/sets pym/portage/util Fabian Groffen (grobian)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox