Have compatibility also notice when min_glibc is too high for a package. (#10318)

* Have compatibility also show when min_glibc is too high for a package.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* suggested changes

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2024-08-18 02:41:27 -04:00
committed by GitHub
parent c6b102fece
commit d551323e06
4 changed files with 4 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ Where available commands are:
| files | display installed files of package(s) |
| help | get information about command usage |
| install | install package(s) along with dependencies after prompting for confirmation |
| list | available, installed, compatible or incompatible packages |
| list | available, compatible, incompatible, essential, installed packages |
| postinstall | display postinstall messages of package(s) |
| prop | display all package boolean properties |
| reinstall | remove and install package(s) |

View File

@@ -1616,7 +1616,7 @@ def build_command(args)
resolve_dependencies_and_build
else
puts 'Unable to build a fake package. Skipping build.'.lightred if @pkg.is_fake?
puts "Package #{@pkg.name} is not compatible with your device architecture (#{ARCH}). Skipping build.".lightred unless PackageUtils.compatible?(@pkg)
puts "Package #{@pkg.name} is not compatible with your device. Skipping build.".lightred unless PackageUtils.compatible?(@pkg)
puts 'Unable to build without source. Skipping build.'.lightred unless @pkg.source?(ARCH) && @pkg.source_url.to_s.upcase != 'SKIP'
puts 'Compile not needed. Skipping build.'.lightred if @pkg.no_compile_needed?
end

View File

@@ -2,7 +2,7 @@
# Defines common constants used in different parts of crew
require 'etc'
CREW_VERSION = '1.50.4'
CREW_VERSION = '1.50.5'
# Kernel architecture.
KERN_ARCH = Etc.uname[:machine]

View File

@@ -25,7 +25,7 @@ class PackageUtils
end
def self.compatible?(pkg)
return pkg.compatibility.casecmp?('all') || pkg.compatibility.include?(ARCH)
return (pkg.compatibility.casecmp?('all') || pkg.compatibility.include?(ARCH)) && (pkg.min_glibc.nil? || (pkg.min_glibc <= LIBC_VERSION))
end
def self.get_url(pkg, build_from_source: false)