Skip to content

Commit

Permalink
Add metadata support for RPM
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed Mar 26, 2024
1 parent 38c65fa commit dde2e87
Show file tree
Hide file tree
Showing 7 changed files with 5,065 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/fetchcode/package_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ class LlvmGitHubSource(GitHubSource):
ignored_tag_regex = None


class RpmGitHubSource(GitHubSource):
version_regex = re.compile(r"rpm-(?P<version>[^-]+(?:-(?!release).*)?|-release)")
ignored_tag_regex = None


GITHUB_SOURCE_BY_PACKAGE = {
"avahi/avahi": GitHubSource,
"bestouff/genext2fs": Genext2fsGitHubSource,
Expand All @@ -198,6 +203,7 @@ class LlvmGitHubSource(GitHubSource):
"nixos/nix": GitHubSource,
"plougher/squashfs-tools": SquashfsToolsGitHubSource,
"pupnp/pupnp": PupnpGitHubSource,
"rpm-software-management/rpm": RpmGitHubSource,
"shadow-maint/shadow": GitHubSource,
"sqlite/sqlite": SqliteGitHubSource,
"u-boot/u-boot": UBootGitHubSource,
Expand Down
1 change: 1 addition & 0 deletions tests/data/package/github/regenerate_mock_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def fetch_github_mock_data(owner, name, subdir):
("llvm", "llvm-project", "llvm-project"),
("nixos", "nix", "nix"),
("miniupnp", "miniupnp", "miniupnp"),
("rpm-software-management", "rpm", "rpm"),
]


Expand Down
Loading

0 comments on commit dde2e87

Please sign in to comment.