summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-11-15 18:47:13 +0100
committerMichał Górny <mgorny@gentoo.org>2017-11-15 18:47:13 +0100
commit16125d4aaddda503468639d3632e79aecaa46839 (patch)
tree70c9e225c69e67bea6e174d1772d881bc572efca
parent23aed48b4c43cc7373d84054b43b607cc9b6e0fb (diff)
downloadgemato-16125d4aaddda503468639d3632e79aecaa46839.tar.gz
profile: Ignore all metadata/timestamp* files
-rw-r--r--gemato/profile.py3
-rw-r--r--tests/test_profile.py15
2 files changed, 13 insertions, 5 deletions
diff --git a/gemato/profile.py b/gemato/profile.py
index cf4d66c..8f6266c 100644
--- a/gemato/profile.py
+++ b/gemato/profile.py
@@ -107,6 +107,9 @@ class EbuildRepositoryProfile(DefaultProfile):
if relpath == '':
# traditionally present in /usr/portage
return ('distfiles', 'local', 'packages')
+ elif relpath == 'metadata':
+ return ('timestamp', 'timestamp.chk', 'timestamp.commit',
+ 'timestamp.x')
return ()
def set_loader_options(self, loader):
diff --git a/tests/test_profile.py b/tests/test_profile.py
index 0a7e4d9..bf4156f 100644
--- a/tests/test_profile.py
+++ b/tests/test_profile.py
@@ -67,10 +67,6 @@ class EbuildRepositoryTests(TempDirTestCase):
'metadata/layout.conf': 'DATA',
'metadata/projects.xml': 'DATA',
'metadata/pkg_desc_index': 'DATA',
- 'metadata/timestamp': 'DATA',
- 'metadata/timestamp.chk': 'DATA',
- 'metadata/timestamp.commit': 'DATA',
- 'metadata/timestamp.x': 'DATA',
'metadata/dtd/foo.dtd': 'DATA',
'metadata/glsa/glsa-202001-01.xml': 'DATA',
'metadata/install-qa-check.d/50foo': 'DATA',
@@ -95,12 +91,21 @@ class EbuildRepositoryTests(TempDirTestCase):
'profiles/desc/foo.desc': 'DATA',
'profiles/updates/1Q-2020': 'DATA',
}
- FILES = dict.fromkeys(EXPECTED_TYPES, u'')
+ FILES = dict.fromkeys(list(EXPECTED_TYPES) + [
+ 'metadata/timestamp',
+ 'metadata/timestamp.chk',
+ 'metadata/timestamp.commit',
+ 'metadata/timestamp.x',
+ ], u'')
EXPECTED_IGNORE = [
'distfiles',
'local',
'packages',
+ 'metadata/timestamp',
+ 'metadata/timestamp.chk',
+ 'metadata/timestamp.commit',
+ 'metadata/timestamp.x',
]
def test_get_entry_type_for_path(self):