Skip to content

Commit 06b2f69

Browse files
author
ignis
committed
reorganized code, package version bump
1 parent da3abe6 commit 06b2f69

File tree

7 files changed

+23
-24
lines changed

7 files changed

+23
-24
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "gardenlinux"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
description = "Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames"
55
authors = ["Garden Linux Maintainers <[email protected]>"]
66
license = "Apache-2.0"
@@ -37,6 +37,7 @@ gl-features-parse = "gardenlinux.features.__main__:main"
3737
gl-flavors-parse = "gardenlinux.flavors.__main__:main"
3838
gl-oci = "gardenlinux.oci.__main__:main"
3939
gl-s3 = "gardenlinux.s3.__main__:main"
40+
gl-gh = "gardenlinux.github.__main__:main"
4041

4142
[tool.pytest.ini_options]
4243
pythonpath = ["src"]

src/gardenlinux/github/get_kernelurls.py

Whitespace-only changes.

src/gardenlinux/sources/__init__.py

Whitespace-only changes.

src/gardenlinux/release_note/get_kernelurls.py renamed to src/gardenlinux/sources/debian.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,6 @@ def get_pkg_attr(package_name, attribute_key, packages_per_repo):
3030
found_package = True
3131

3232

33-
def get_kernel_urls(gardenlinux_version):
34-
if not gardenlinux_version:
35-
print("You need to specify gardenlinux_version")
36-
repositories = [f'http://packages.gardenlinux.io/gardenlinux {gardenlinux_version} main']
37-
38-
# Temporary for as long as we need to perform releases for versions < 1443
39-
if "1312" in gardenlinux_version:
40-
repositories = [f'http://repo.gardenlinux.io/gardenlinux {gardenlinux_version} main']
41-
42-
architecture = ["arm64", "amd64"]
43-
packages = get_package_list(repositories, architecture)
44-
45-
# find all Linux kernel versions available for the specified Gardenlinux version
46-
47-
# We want to only list the packages for the specific kernel used for a given release
48-
# GL uses always the latest available kernel in the given repo, even if older kernel versions would be available.
49-
# Ideally we would parse the version of the package linux-headers-${arch}, which specifies the actual version.
50-
# Here, it is safe enough for the release notes to take the highest version available.
51-
latest_version = get_pkg_attr("linux-headers-amd64", "Version", packages)
52-
package_urls = check_urls([latest_version], get_package_urls(packages, 'linux-headers'), architecture)
53-
return output_urls(package_urls)
54-
55-
5633
def get_package_list(repositories, architecture):
5734
'''Get Packages lists from repository and return it as dictionary.
5835
'''

src/gardenlinux/sources/kernel.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
def get_kernel_urls(gardenlinux_version):
2+
if not gardenlinux_version:
3+
print("You need to specify gardenlinux_version")
4+
repositories = [f'http://packages.gardenlinux.io/gardenlinux {gardenlinux_version} main']
5+
6+
# Temporary for as long as we need to perform releases for versions < 1443
7+
if "1312" in gardenlinux_version:
8+
repositories = [f'http://repo.gardenlinux.io/gardenlinux {gardenlinux_version} main']
9+
10+
architecture = ["arm64", "amd64"]
11+
packages = get_package_list(repositories, architecture)
12+
13+
# find all Linux kernel versions available for the specified Gardenlinux version
14+
15+
# We want to only list the packages for the specific kernel used for a given release
16+
# GL uses always the latest available kernel in the given repo, even if older kernel versions would be available.
17+
# Ideally we would parse the version of the package linux-headers-${arch}, which specifies the actual version.
18+
# Here, it is safe enough for the release notes to take the highest version available.
19+
latest_version = get_pkg_attr("linux-headers-amd64", "Version", packages)
20+
package_urls = check_urls([latest_version], get_package_urls(packages, 'linux-headers'), architecture)
21+
return output_urls(package_urls)

0 commit comments

Comments
 (0)