Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed Apr 1, 2024
1 parent cdfa818 commit 5262683
Show file tree
Hide file tree
Showing 5 changed files with 10,776 additions and 12,176 deletions.
2 changes: 1 addition & 1 deletion src/fetchcode/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ class UtilLinuxDirectoryListedSource(DirectoryListedSource):
source_url = "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/"
is_nested = True
# Source archive ex: util-linux-1.2.3.tar.gz
source_archive_regex = re.compile(r"^(util-linux-)(?P<version>[\w.-]*)(.tar.gz)$")
source_archive_regex = re.compile(r"^(util-linux-|util-linux-ng-)(?P<version>[\w.-]*)(.tar.gz)$")
ignored_files_and_dir = []


Expand Down
6 changes: 5 additions & 1 deletion src/fetchcode/package_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ def _get_github_packages(purl, version_regex, ignored_tag_regex, default_package
else:
version = tag

version = version.strip("Vv").strip().replace("_", ".")
version = version.strip("Vv").strip()
if "+" in version:
first, last = version.split("+")
first.replace("_", ".")
version = f"{first}+{last}"
if not version or not version[0].isdigit():
continue

Expand Down
Loading

0 comments on commit 5262683

Please sign in to comment.