Skip to content

Commit 298e821

Browse files
committed
Add metadata support for linux kernel
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 2a1704a commit 298e821

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/fetchcode/package.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,24 @@ class BareboxDirectoryListedSource(DirectoryListedSource):
574574
is_nested = False
575575
ignored_files_and_dir = []
576576

577+
class LinuxDirectoryListedSource(DirectoryListedSource):
578+
source_url = "https://cdn.kernel.org/pub/linux/kernel/"
579+
source_archive_regex = re.compile(r"^(linux-)(?P<version>[\w.-]*)(.tar.gz)$")
580+
is_nested = True
581+
ignored_files_and_dir = [
582+
"Historic/",
583+
"SillySounds/",
584+
"crypto/",
585+
"firmware/",
586+
"next/",
587+
"people/",
588+
"ports/",
589+
"projects/",
590+
"testing/",
591+
"tools/",
592+
"uemacs/",
593+
]
594+
577595

578596
DIR_SUPPORTED_PURLS = [
579597
"pkg:generic/busybox.*",
@@ -599,6 +617,7 @@ class BareboxDirectoryListedSource(DirectoryListedSource):
599617
"pkg:generic/ipkg.*",
600618
"pkg:generic/mtd-utils.*",
601619
"pkg:generic/barebox.*",
620+
"pkg:generic/linux.*"
602621
]
603622

604623
DIR_LISTED_SOURCE_BY_PACKAGE_NAME = {
@@ -624,6 +643,7 @@ class BareboxDirectoryListedSource(DirectoryListedSource):
624643
"ipkg": IpkgDirectoryListedSource,
625644
"mtd-utils": MtdUtilsDirectoryListedSource,
626645
"barebox": BareboxDirectoryListedSource,
646+
"linux": LinuxDirectoryListedSource,
627647
}
628648

629649

0 commit comments

Comments
 (0)