Skip to content

Commit

Permalink
Change approach to handling different kinds of packages in terra
Browse files Browse the repository at this point in the history
Instead of using linkformatter getter which returns bin or srcname
with fallback, take more explicit approach and split src and binary
package sets into different sources, use different packagelink
patterns for these.
  • Loading branch information
AMDmi3 committed Aug 29, 2023
1 parent f7774ee commit 2ad3573
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
2 changes: 0 additions & 2 deletions repology/linkformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ def __getitem__(self, key: str) -> str:
value = self._package.srcname
elif field == 'binname':
value = self._package.binname
elif field == 'binorsrcname':
value = self._package.binname or self._package.srcname
elif field == 'subrepo':
value = self._package.subrepo
elif field == 'rawversion':
Expand Down
38 changes: 28 additions & 10 deletions repos.d/rpm/terra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,47 @@
ruleset: [fedora, rpm]
minpackages: {{minpackages}}
sources:
- name: repo.xml
# Note: terra contains packages build in different ways, see
# https://github.com/repology/repology-updater/issues/1307 for some details
# There are two distinctive types of packages, which may be distinguinsed by
# arch. At least packagelinks differ for these.
- name: repo.xml.src
fetcher:
class: RepodataFetcher
url: https://repos.fyralabs.com/terra{{version}}/
parser:
class: RepodataParser
src: true
binary: false
vertags: fc
packagelinks:
- type: PACKAGE_SOURCES
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{srcname}'
- type: PACKAGE_RECIPE
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{srcname}/spec'
- type: PACKAGE_RECIPE_RAW
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{srcname}/spec/raw'
- name: repo.xml.bin
fetcher:
class: RepodataFetcher
url: https://repos.fyralabs.com/terra{{version}}/
parser:
class: RepodataParser
src: false
binary: true
vertags: fc
packagelinks:
- type: PACKAGE_SOURCES
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{binname}'
- type: PACKAGE_RECIPE
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{binname}/spec'
- type: PACKAGE_RECIPE_RAW
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{binname}/spec/raw'
repolinks:
- desc: Terra home
url: https://terra.fyralabs.com/
- desc: GitHub organization
url: https://github.com/terrapkg
packagelinks:
- type: PACKAGE_SOURCES
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{binorsrcname}'
- type: PACKAGE_RECIPE
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{binorsrcname}/spec'
- type: PACKAGE_RECIPE_RAW
url: 'https://madoguchi.fyralabs.com/redirect/terra{{version}}/packages/{binorsrcname}/spec/raw'
# XXX: not all packages are built from spec files, see
# https://github.com/repology/repology-updater/issues/1307#issuecomment-1503339868
groups: [ all, production, terra ]
{% endmacro %}

Expand Down

0 comments on commit 2ad3573

Please sign in to comment.