Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Disable AOSC for permanent HTTP/500" #1418

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion repology/parsers/parsers/aosc.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from typing import Iterable

from repology.logger import Logger
from repology.package import PackageFlags
from repology.package import LinkType, PackageFlags
from repology.packagemaker import NameType, PackageFactory, PackageMaker
from repology.parsers import Parser
from repology.parsers.json import iter_json_list
Expand All @@ -31,6 +31,12 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake
normalize_version = VersionStripper().strip_left(':')

for pkgdata in iter_json_list(path, ('packages', None)):
if pkgdata['category'] == 'meta' and pkgdata['section'] == 'bases':
# skip dummy packages in meta-bases section
continue
if pkgdata['category'] == 'core' and pkgdata['section'] == 'misc':
# skip core-misc, which includes only the aosc-aaa package
continue
with factory.begin() as pkg:
pkg.add_name(pkgdata['name'], NameType.AOSC_NAME)
pkg.add_name(pkgdata['directory'], NameType.AOSC_DIRECTORY)
Expand All @@ -56,6 +62,12 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake
pkg.add_categories(pkgdata['pkg_section'], pkgdata['section'])
pkg.set_summary(pkgdata['description'])

srctype = pkgdata['srctype']
if srctype == 'Git' or srctype == 'Svn' or srctype == 'Bzr':
pkg.add_links(LinkType.UPSTREAM_REPOSITORY, pkgdata['srcurl'])
elif srctype == 'Tarball':
pkg.add_links(LinkType.UPSTREAM_DOWNLOAD, pkgdata['srcurl'])

# just a committer, doesn't seem suitable
#pkg.add_maintainers(extract_maintainers(pkgdata['committer']))

Expand Down
2 changes: 1 addition & 1 deletion repos.d/aosc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
# url: 'https://github.com/AOSC-Dev/{tree}/blob/{branch}/{srcname}/autobuild/build'
#- type: PACKAGE_RECIPE_RAW
# url: 'https://raw.githubusercontent.com/AOSC-Dev/{tree}/{branch}/{srcname}/autobuild/build'
groups: [ all ] # https://packages.aosc.io returns 500 for more than a month
groups: [ all, production ]
Loading