Skip to content

Commit

Permalink
Add metadata support for linux kernel
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 27, 2024
1 parent 2a1704a commit 298e821
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/fetchcode/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,24 @@ class BareboxDirectoryListedSource(DirectoryListedSource):
is_nested = False
ignored_files_and_dir = []

class LinuxDirectoryListedSource(DirectoryListedSource):
source_url = "https://cdn.kernel.org/pub/linux/kernel/"
source_archive_regex = re.compile(r"^(linux-)(?P<version>[\w.-]*)(.tar.gz)$")
is_nested = True
ignored_files_and_dir = [
"Historic/",
"SillySounds/",
"crypto/",
"firmware/",
"next/",
"people/",
"ports/",
"projects/",
"testing/",
"tools/",
"uemacs/",
]


DIR_SUPPORTED_PURLS = [
"pkg:generic/busybox.*",
Expand All @@ -599,6 +617,7 @@ class BareboxDirectoryListedSource(DirectoryListedSource):
"pkg:generic/ipkg.*",
"pkg:generic/mtd-utils.*",
"pkg:generic/barebox.*",
"pkg:generic/linux.*"
]

DIR_LISTED_SOURCE_BY_PACKAGE_NAME = {
Expand All @@ -624,6 +643,7 @@ class BareboxDirectoryListedSource(DirectoryListedSource):
"ipkg": IpkgDirectoryListedSource,
"mtd-utils": MtdUtilsDirectoryListedSource,
"barebox": BareboxDirectoryListedSource,
"linux": LinuxDirectoryListedSource,
}


Expand Down

0 comments on commit 298e821

Please sign in to comment.