瀏覽代碼

Fix more rpmlint issues

rdb 16 年之前
父節點
當前提交
dc543662be
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 1 1
      makepanda/installpanda.py
  2. 4 2
      makepanda/makepandacore.py

+ 1 - 1
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")
 

+ 4 - 2
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):