From 6403b96cc7241cc9d9a22fc7d87ef99a4d7a82cd Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Fri, 12 Oct 2007 13:39:30 +0000 Subject: [PATCH] Portage and quickpkg generate slightly different tarballs (the former makes paths like ./usr/bin/bla whereas the latter makes paths like usr/bin/bla), hack Portage such that it can deal with its own format as well. (quickpkg format used to work before) svn path=/main/branches/prefix/; revision=8084 --- pym/portage/__init__.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index fc5da4ba1..9bda7bd6a 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5403,9 +5403,16 @@ def pkgmerge(mytbz2, myroot, mysettings, mydbapi=None, vartree=None, prev_mtimes # the extracted package put everything in buildprefix, so we # just have to move it to the right EPREFIX if buildprefix != EPREFIX: - shutil.copytree(os.path.join(pkgloc, - buildprefix.lstrip(os.path.sep)), os.path.join(pkgloc, - EPREFIX_LSTRIP), symlinks=True) + try: + shutil.copytree(os.path.join(pkgloc, + buildprefix.lstrip(os.path.sep)), os.path.join(pkgloc, + EPREFIX_LSTRIP), symlinks=True) + except OSError: + if not os.path.exists(os.path.join(pkgloc, EPREFIX_LSTRIP)): + writemsg("!!! Package was was built in a wrong way, " + + "please rebuild the package with a recent " + + "Portage\n", noiselevel=-1) + return os.EX_OSERR mylink = dblink(mycat, mypkg, myroot, mysettings, vartree=vartree, treetype="bintree") -- 2.26.2