Portage and quickpkg generate slightly different tarballs (the former
authorFabian Groffen <grobian@gentoo.org>
Fri, 12 Oct 2007 13:39:30 +0000 (13:39 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 12 Oct 2007 13:39:30 +0000 (13:39 -0000)
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

index fc5da4ba112f0c8f74f7a3f4fe6c4961fcc42a89..9bda7bd6abc3daeac4581040d9e7bc16a943261e 100644 (file)
@@ -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")