1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 09:16:16 +02:00

- ignore all dot files (the buildservice doesn't handle them)

- fix Project class (used by the "package tracking" code path)
  to use fnmatch.fnmatch() on the list of exclude expressions
This commit is contained in:
Dr. Peter Poeml 2008-03-31 14:42:11 +00:00
parent a20e354d07
commit 11fa192b33

View File

@ -24,7 +24,7 @@ except ImportError:
BUFSIZE = 1024*1024
store = '.osc'
exclude_stuff = [store, '.svn', 'CVS', '.git', '.gitignore', '.pc', '*~', '.*.swp', '.swp']
exclude_stuff = [store, 'CVS', '*~', '.*']
new_project_templ = """\
@ -215,6 +215,7 @@ class Linkinfo:
class Project:
"""represent a project directory, holding packages"""
def __init__(self, dir, getPackageList=True):
import fnmatch
self.dir = dir
self.absdir = os.path.abspath(dir)
@ -229,7 +230,10 @@ class Project:
if conf.config['do_package_tracking']:
self.pac_root = self.read_packages().getroot()
self.pacs_have = [ pac.get('name') for pac in self.pac_root.findall('package') ]
self.pacs_unvers = [ i for i in os.listdir(self.dir) if i not in self.pacs_have and i not in exclude_stuff ]
self.pacs_excluded = [ i for i in os.listdir(self.dir)
for j in exclude_stuff
if fnmatch.fnmatch(i, j) ]
self.pacs_unvers = [ i for i in os.listdir(self.dir) if i not in self.pacs_have and i not in self.pacs_excluded ]
# store all broken packages (e.g. packages which where removed by a non-osc cmd)
# in the self.pacs_broken list
self.pacs_broken = []