Page MenuHomeSoftware Heritage

D2531.id9038.diff
No OneTemporary

D2531.id9038.diff

diff --git a/swh/lister/cran/lister.py b/swh/lister/cran/lister.py
--- a/swh/lister/cran/lister.py
+++ b/swh/lister/cran/lister.py
@@ -97,11 +97,12 @@
logger.debug('repo: %s', repo)
project_url = compute_package_url(repo)
package = repo['Package']
+ version = repo['Version']
return {
- 'uid': package,
+ 'uid': f'{package}-{version}',
'name': package,
'full_name': repo['Title'],
- 'version': repo['Version'],
+ 'version': version,
'html_url': project_url,
'origin_url': project_url,
'origin_type': 'tar',
diff --git a/swh/lister/cran/tests/test_lister.py b/swh/lister/cran/tests/test_lister.py
--- a/swh/lister/cran/tests/test_lister.py
+++ b/swh/lister/cran/tests/test_lister.py
@@ -55,3 +55,10 @@
assert row['policy'] == 'oneshot'
assert row['retries_left'] == 3
+
+ origin_url = kwargs['url']
+ record = lister.db_session \
+ .query(lister.MODEL) \
+ .filter(origin_url == origin_url).first()
+ assert record
+ assert record.uid == f'{record.name}-{record.version}'

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 4:14 PM (6 h, 17 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221402

Event Timeline