Ignore OBS service generated files

_service: files should not be imported. They are created
by OBS service and will be re-created by OBS during scm sync

Also, not allowed in Factory by policy anyway. So this affects
devel and home projects only
This commit is contained in:
2025-03-25 14:28:54 +01:00
parent 7684388193
commit 32d1924a0d

View File

@@ -204,6 +204,11 @@ class DBRevision:
and self.package == "_project"
):
continue
# do not import _service:* files as those are created by OBS on source imports
if entry.get("name")[0:9] == "_service:":
continue
cur.execute(
"""INSERT INTO files (name, md5, size, mtime, revision_id)
VALUES (%s,%s,%s,%s,%s)""",