Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163824
D2531.id9038.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2531.id9038.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 4:14 PM (2 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221402
Attached To
D2531: cran.lister: Version uid so we can list new package versions
Event Timeline
Log In to Comment