From dc543662be0f57a8a5ef302d9f20af645987e888 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 2 Apr 2009 06:04:49 +0000 Subject: [PATCH] Fix more rpmlint issues --- makepanda/installpanda.py | 2 +- makepanda/makepandacore.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/makepanda/installpanda.py b/makepanda/installpanda.py index 3aac27f46d..275e076c48 100644 --- a/makepanda/installpanda.py +++ b/makepanda/installpanda.py @@ -58,7 +58,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"): #compileall.compile_dir(destdir+prefix+"/share/panda3d/Pmw") DeleteCVS(destdir) # rpmlint doesn't like these files, for some reason. - DeleteCXX(destdir+"/usr/share/panda3d") + DeleteBuildFiles(destdir+"/usr/share/panda3d") if (os.path.isfile(destdir+"/usr/share/panda3d/direct/leveleditor/copyfiles.pl")): os.remove(destdir+"/usr/share/panda3d/direct/leveleditor/copyfiles.pl") diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 7abd34c7da..2ba7939724 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -544,12 +544,14 @@ def DeleteCVS(dir): elif (os.path.isfile(subdir) and entry == ".cvsignore"): os.remove(subdir) -def DeleteCXX(dir): +def DeleteBuildFiles(dir): for entry in os.listdir(dir): if (entry != ".") and (entry != ".."): subdir = dir + "/" + entry - if (os.path.isfile(subdir) and os.path.splitext(subdir)[-1] in [".h", ".I", ".c", ".cxx", ".cpp"]): + if (os.path.isfile(subdir) and os.path.splitext(subdir)[-1] in [".h", ".I", ".c", ".cxx", ".cpp", ".pp"]): os.remove(subdir) + elif (os.path.isdir(subdir)): + DeleteBuildFiles(subdir) def CreateFile(file): if (os.path.exists(file)==0):