* [gentoo-commits] portage r11793 - in main/branches/prefix: bin pym/portage pym/portage/dbapi
@ 2008-11-02 7:55 Fabian Groffen (grobian)
0 siblings, 0 replies; only message in thread
From: Fabian Groffen (grobian) @ 2008-11-02 7:55 UTC (permalink / raw
To: gentoo-commits
Author: grobian
Date: 2008-11-02 07:55:50 +0000 (Sun, 02 Nov 2008)
New Revision: 11793
Modified:
main/branches/prefix/bin/emake
main/branches/prefix/pym/portage/__init__.py
main/branches/prefix/pym/portage/dbapi/vartree.py
main/branches/prefix/pym/portage/util.py
Log:
Merged from trunk -r11776:11784
| 11777 | Rename "object" variable to avoid name collision with the |
| zmedico | builtin class. |
| 11778 | Before returning from PreservedLibsRegistry.store(), update |
| zmedico | self._data_orig. |
| 11779 | Explicitly load the preserved libs registry after obtaining |
| zmedico | a lock for merge or unmerge, in case the registry has been |
| | changed by a parallel emerge instance. |
| 11780 | Also call PreservedLibsRegistry.pruneNonExisting() after |
| zmedico | obtaining a lock and loading it for merge or unmerge. |
| 11781 | Remove unnecessary handler for plain "Exception" from |
| zmedico | lstat() call in dblink.mergeme(). |
| 11782 | * In fetch(), ensure that pkg_nofetch is never called more |
| zmedico | than once. * In _validate_deps(), revert back to using |
| | aux_get since the config instance does not cache SRC_URI. |
| 11783 | Remove broken pickle_write() since it can't possibly be |
| zmedico | used. |
| 11784 | When echoing the emake command, redirect to stderr since |
| zmedico | otherwise it breaks the gcc ebuild because of the way that |
| | the get_make_var() function from toolchain.eclass is used. |
Modified: main/branches/prefix/bin/emake
===================================================================
--- main/branches/prefix/bin/emake 2008-11-02 00:46:48 UTC (rev 11792)
+++ main/branches/prefix/bin/emake 2008-11-02 07:55:50 UTC (rev 11793)
@@ -11,6 +11,6 @@
# /etc/make.globals here because emake is only called from an
# ebuild.
-[[ $PORTAGE_QUIET = 1 ]] || echo ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
+[[ $PORTAGE_QUIET = 1 ]] || echo ${MAKE:-make} $MAKEOPTS $EXTRA_EMAKE "$@" >&2
exec ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
Modified: main/branches/prefix/pym/portage/__init__.py
===================================================================
--- main/branches/prefix/pym/portage/__init__.py 2008-11-02 00:46:48 UTC (rev 11792)
+++ main/branches/prefix/pym/portage/__init__.py 2008-11-02 07:55:50 UTC (rev 11793)
@@ -3677,6 +3677,7 @@
distdir_writable = can_fetch and not fetch_to_ro
failed_files = set()
+ restrict_fetch_msg = False
for myfile in filedict:
"""
@@ -4119,7 +4120,8 @@
if listonly:
writemsg_stdout("\n", noiselevel=-1)
if fetched != 2:
- if restrict_fetch:
+ if restrict_fetch and not restrict_fetch_msg:
+ restrict_fetch_msg = True
msg = ("\n!!! %s/%s" + \
" has fetch restriction turned on.\n" + \
"!!! This probably means that this " + \
@@ -4155,17 +4157,21 @@
mysettings.pop("EBUILD_PHASE", None)
else:
mysettings["EBUILD_PHASE"] = ebuild_phase
- if listonly:
- continue
+
+ elif restrict_fetch:
+ pass
elif listonly:
- continue
+ pass
elif not filedict[myfile]:
writemsg("Warning: No mirrors available for file" + \
" '%s'\n" % (myfile), noiselevel=-1)
else:
writemsg("!!! Couldn't download '%s'. Aborting.\n" % myfile,
noiselevel=-1)
- if fetchonly and not restrict_fetch:
+
+ if listonly:
+ continue
+ elif fetchonly:
failed_files.add(myfile)
continue
return 0
@@ -5895,7 +5901,8 @@
misc_keys = ["LICENSE", "PROPERTIES", "PROVIDE", "RESTRICT", "SRC_URI"]
other_keys = ["SLOT"]
all_keys = dep_keys + misc_keys + other_keys
- metadata = mysettings.configdict["pkg"]
+ metadata = dict(izip(all_keys,
+ mydbapi.aux_get(mysettings.mycpv, all_keys)))
class FakeTree(object):
def __init__(self, mydb):
@@ -6114,6 +6121,8 @@
try:
mylink.lockdb()
if mylink.exists():
+ vartree.dbapi.plib_registry.load()
+ vartree.dbapi.plib_registry.pruneNonExisting()
retval = mylink.unmerge(trimworld=mytrimworld, cleanup=1,
ldpath_mtimes=ldpath_mtimes)
if retval == os.EX_OK:
Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
===================================================================
--- main/branches/prefix/pym/portage/dbapi/vartree.py 2008-11-02 00:46:48 UTC (rev 11792)
+++ main/branches/prefix/pym/portage/dbapi/vartree.py 2008-11-02 07:55:50 UTC (rev 11793)
@@ -79,6 +79,8 @@
except EnvironmentError, e:
if e.errno != PermissionDenied.errno:
writemsg("!!! %s %s\n" % (e, self._filename), noiselevel=-1)
+ else:
+ self._data_orig = self._data.copy()
def register(self, cpv, slot, counter, paths):
""" Register new objects in the registry. If there is a record with the
@@ -156,7 +158,7 @@
__slots__ = ("__weakref__", "_key")
- def __init__(self, object, root):
+ def __init__(self, obj, root):
"""
This takes a path to an object.
@@ -164,7 +166,7 @@
@type object: string (example: '/usr/bin/bar')
"""
- self._key = self._generate_object_key(object, root)
+ self._key = self._generate_object_key(obj, root)
def __hash__(self):
return hash(self._key)
@@ -172,7 +174,7 @@
def __eq__(self, other):
return self._key == other._key
- def _generate_object_key(self, object, root):
+ def _generate_object_key(self, obj, root):
"""
Generate object key for a given object.
@@ -186,7 +188,7 @@
2. realpath of object if object does not exist.
"""
- abs_path = os.path.join(root, object.lstrip(os.path.sep))
+ abs_path = os.path.join(root, obj.lstrip(os.sep))
try:
object_stat = os.stat(abs_path)
except OSError:
@@ -3937,17 +3939,7 @@
writemsg(red("!!! File: ")+str(mysrc)+"\n", noiselevel=-1)
writemsg(red("!!! Error: ")+str(e)+"\n", noiselevel=-1)
return 1
- except Exception, e:
- writemsg("\n")
- writemsg(red("!!! ERROR: An unknown error has occurred during the merge process.\n"))
- writemsg(red("!!! A stat call returned the following error for the following file:"))
- writemsg( "!!! Please ensure that your filesystem is intact, otherwise report\n")
- writemsg( "!!! this as a portage bug at bugs.gentoo.org. Append 'emerge info'.\n")
- writemsg( "!!! File: "+str(mysrc)+"\n", noiselevel=-1)
- writemsg( "!!! Error: "+str(e)+"\n", noiselevel=-1)
- return 1
-
mymode = mystat[stat.ST_MODE]
# handy variables; mydest is the target object on the live filesystems;
# mysrc is the source object in the temporary install dir
@@ -4199,6 +4191,8 @@
retval = -1
self.lockdb()
try:
+ self.vartree.dbapi.plib_registry.load()
+ self.vartree.dbapi.plib_registry.pruneNonExisting()
retval = self.treewalk(mergeroot, myroot, inforoot, myebuild,
cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
# undo registrations of preserved libraries, bug #210501
Modified: main/branches/prefix/pym/portage/util.py
===================================================================
--- main/branches/prefix/pym/portage/util.py 2008-11-02 00:46:48 UTC (rev 11792)
+++ main/branches/prefix/pym/portage/util.py 2008-11-02 07:55:50 UTC (rev 11793)
@@ -565,21 +565,8 @@
cexpand[mystring]=newstring[1:]
return newstring[1:]
-def pickle_write(data,filename,debug=0):
- import os
- try:
- myf=open(filename,"w")
- pickle.dump(data,myf,-1)
- myf.flush()
- myf.close()
- writemsg("Wrote pickle: "+str(filename)+"\n",1)
- os.chown(myefn,uid,portage_gid)
- os.chmod(myefn,0664)
- except SystemExit, e:
- raise
- except Exception, e:
- return 0
- return 1
+# broken and removed, but can still be imported
+pickle_write = None
def pickle_read(filename,default=None,debug=0):
import os
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-02 7:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 7:55 [gentoo-commits] portage r11793 - in main/branches/prefix: bin pym/portage pym/portage/dbapi 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