Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/debian/lister.py
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | def get_origins_from_page(self, page: DebianPageType) -> Iterator[ListedOrigin]: | ||||
# this is the first time a package is listed | # this is the first time a package is listed | ||||
if origin_url not in self.listed_origins: | if origin_url not in self.listed_origins: | ||||
# create a ListedOrigin object for it that can be later | # create a ListedOrigin object for it that can be later | ||||
# updated with new package versions info | # updated with new package versions info | ||||
self.listed_origins[origin_url] = ListedOrigin( | self.listed_origins[origin_url] = ListedOrigin( | ||||
lister_id=self.lister_obj.id, | lister_id=self.lister_obj.id, | ||||
url=origin_url, | url=origin_url, | ||||
visit_type="deb", | visit_type="deb", | ||||
extra_loader_arguments={"date": None, "packages": {}}, | extra_loader_arguments={"packages": {}}, | ||||
) | ) | ||||
# origin will be yielded at the end of that method | # origin will be yielded at the end of that method | ||||
origins_to_send[origin_url] = self.listed_origins[origin_url] | origins_to_send[origin_url] = self.listed_origins[origin_url] | ||||
# init set that will contain all listed package versions | # init set that will contain all listed package versions | ||||
self.package_versions[package_name] = set() | self.package_versions[package_name] = set() | ||||
# package has already been listed in a previous page or current page | # package has already been listed in a previous page or current page | ||||
elif origin_url not in origins_to_send: | elif origin_url not in origins_to_send: | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |