From f29be80495b2b098613f6753a5c6ea586d158b4a Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 28 Jul 2010 08:07:58 +0000 Subject: [PATCH] We need to specify -R to cp on OSX and BSD in order not to follow symlinks --- makepanda/installpanda.py | 3 ++- makepanda/makepanda.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/makepanda/installpanda.py b/makepanda/installpanda.py index f7531ed2c4..201754880a 100644 --- a/makepanda/installpanda.py +++ b/makepanda/installpanda.py @@ -154,7 +154,8 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"): oscmd("cp "+outputdir+"/bin/* "+destdir+prefix+"/bin/") for base in os.listdir(outputdir+"/lib"): if (not base.endswith(".a")): - oscmd("cp -P "+outputdir+"/lib/"+base+" "+destdir+prefix+libdir+"/panda3d/"+base) + # We really need to specify -R in order not to follow symlinks on non-GNU + oscmd("cp -R -P "+outputdir+"/lib/"+base+" "+destdir+prefix+libdir+"/panda3d/"+base) # rpmlint doesn't like it if we compile pyc. #for base in os.listdir(destdir+prefix+"/share/panda3d/direct"): # if ((base != "extensions") and (base != "extensions_native")): diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 08eb49053d..b6da427c09 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -5037,7 +5037,9 @@ def MakeInstallerOSX(): for base in os.listdir(GetOutputDir()+"/lib"): if (not base.endswith(".a")): libname = "dstroot/base/Developer/Panda3D/lib/" + base - oscmd("cp -P " + GetOutputDir() + "/lib/" + base + " " + libname) + # We really need to specify -R in order not to follow symlinks + # On OSX, just specifying -P is not enough to do that. + oscmd("cp -R -P " + GetOutputDir() + "/lib/" + base + " " + libname) # Execute install_name_tool to make them reference an absolute path if (libname.endswith(".dylib") and not os.path.islink(libname)):