Page MenuHomeSoftware Heritage

D8747.id31527.diff
No OneTemporary

D8747.id31527.diff

diff --git a/swh/lister/conda/lister.py b/swh/lister/conda/lister.py
--- a/swh/lister/conda/lister.py
+++ b/swh/lister/conda/lister.py
@@ -71,7 +71,9 @@
assert self.lister_obj.id is not None
arch, packages = page
+ package_names = set()
for filename, package_metadata in packages.items():
+ package_names.add(package_metadata["name"])
version_key = (
f"{arch}/{package_metadata['version']}-{package_metadata['build']}"
)
@@ -102,22 +104,22 @@
elif "date" in package_metadata:
package_date = iso8601.parse_date(package_metadata["date"])
- last_update = None
if package_date:
artifact["date"] = package_date.isoformat()
self.package_dates[package_metadata["name"]].append(package_date)
- last_update = max(self.package_dates[package_metadata["name"]])
+ for package_name in package_names:
+ package_dates = self.package_dates[package_name]
yield ListedOrigin(
lister_id=self.lister_obj.id,
visit_type=self.VISIT_TYPE,
url=self.ORIGIN_URL_PATTERN.format(
- channel=self.channel, pkgname=package_metadata["name"]
+ channel=self.channel, pkgname=package_name
),
- last_update=last_update,
+ last_update=max(package_dates) if package_dates else None,
extra_loader_arguments={
"artifacts": [
- v for k, v in self.packages[package_metadata["name"]].items()
+ artifact for artifact in self.packages[package_name].values()
],
},
)

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 12:20 PM (18 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223492

Event Timeline