Skip to content

Commit dde2e87

Browse files
committed
Add metadata support for RPM
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 38c65fa commit dde2e87

File tree

7 files changed

+5065
-1
lines changed

7 files changed

+5065
-1
lines changed

src/fetchcode/package_util.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ class LlvmGitHubSource(GitHubSource):
186186
ignored_tag_regex = None
187187

188188

189+
class RpmGitHubSource(GitHubSource):
190+
version_regex = re.compile(r"rpm-(?P<version>[^-]+(?:-(?!release).*)?|-release)")
191+
ignored_tag_regex = None
192+
193+
189194
GITHUB_SOURCE_BY_PACKAGE = {
190195
"avahi/avahi": GitHubSource,
191196
"bestouff/genext2fs": Genext2fsGitHubSource,
@@ -198,6 +203,7 @@ class LlvmGitHubSource(GitHubSource):
198203
"nixos/nix": GitHubSource,
199204
"plougher/squashfs-tools": SquashfsToolsGitHubSource,
200205
"pupnp/pupnp": PupnpGitHubSource,
206+
"rpm-software-management/rpm": RpmGitHubSource,
201207
"shadow-maint/shadow": GitHubSource,
202208
"sqlite/sqlite": SqliteGitHubSource,
203209
"u-boot/u-boot": UBootGitHubSource,

tests/data/package/github/regenerate_mock_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def fetch_github_mock_data(owner, name, subdir):
6969
("llvm", "llvm-project", "llvm-project"),
7070
("nixos", "nix", "nix"),
7171
("miniupnp", "miniupnp", "miniupnp"),
72+
("rpm-software-management", "rpm", "rpm"),
7273
]
7374

7475

0 commit comments

Comments
 (0)