Fix more rpmlint issues

This commit is contained in:
rdb 2009-04-02 06:04:49 +00:00
parent 08a51055d2
commit dc543662be
2 changed files with 5 additions and 3 deletions

View File

@ -58,7 +58,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
#compileall.compile_dir(destdir+prefix+"/share/panda3d/Pmw") #compileall.compile_dir(destdir+prefix+"/share/panda3d/Pmw")
DeleteCVS(destdir) DeleteCVS(destdir)
# rpmlint doesn't like these files, for some reason. # 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")): if (os.path.isfile(destdir+"/usr/share/panda3d/direct/leveleditor/copyfiles.pl")):
os.remove(destdir+"/usr/share/panda3d/direct/leveleditor/copyfiles.pl") os.remove(destdir+"/usr/share/panda3d/direct/leveleditor/copyfiles.pl")

View File

@ -544,12 +544,14 @@ def DeleteCVS(dir):
elif (os.path.isfile(subdir) and entry == ".cvsignore"): elif (os.path.isfile(subdir) and entry == ".cvsignore"):
os.remove(subdir) os.remove(subdir)
def DeleteCXX(dir): def DeleteBuildFiles(dir):
for entry in os.listdir(dir): for entry in os.listdir(dir):
if (entry != ".") and (entry != ".."): if (entry != ".") and (entry != ".."):
subdir = dir + "/" + 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) os.remove(subdir)
elif (os.path.isdir(subdir)):
DeleteBuildFiles(subdir)
def CreateFile(file): def CreateFile(file):
if (os.path.exists(file)==0): if (os.path.exists(file)==0):