Use realpath instead of abspath to ensure that symlinks are correctly accounted for.
authorJason Stubbs <jstubbs@gentoo.org>
Thu, 13 Oct 2005 12:40:55 +0000 (12:40 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Thu, 13 Oct 2005 12:40:55 +0000 (12:40 -0000)
svn path=/main/branches/2.0/; revision=2129

bin/ebuild

index 45f2442e6d1892f05377f11ad536718c370f06c2..559d4af3480808a8574eefc4ab0c027d4b04ae24 100755 (executable)
@@ -25,7 +25,7 @@ import portage, portage_util
 
 
 root = os.path.normpath(os.environ.get("ROOT", "") + "/")
-ebuild = os.path.abspath(pargs.pop(0))
+ebuild = os.path.realpath(pargs.pop(0))
 
 if not os.path.exists(ebuild):
        print "'%s' does not exist." % ebuild
@@ -37,7 +37,7 @@ cpv = "/".join(ebuild_split[-2:])[:-7]
 
 portage_ebuild = portage.portdb.findname(cpv)
 
-if not portage_ebuild or os.path.abspath(portage_ebuild) != ebuild:
+if not portage_ebuild or os.path.realpath(portage_ebuild) != ebuild:
        os.environ["PORTDIR_OVERLAY"] = "/".join(ebuild_split[:-2])
        print "Adjusting PORTDIR_OVERLAY to '%s'..." % os.environ["PORTDIR_OVERLAY"]
        reload(portage)