Skip to content

Fix agent not able to install esptool after 1.6.0 #986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix link
  • Loading branch information
umbynos committed Aug 5, 2024
commit cf0b8e41d217424e6c23c380660a858b69d93db6
8 changes: 4 additions & 4 deletions v2/pkgs/pkgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type System struct {
Checksum string `json:"checksum"`
}

// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L129-L142
// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L129-L142
var (
regexpLinuxArm = regexp.MustCompile("arm.*-linux-gnueabihf")
regexpLinuxArm64 = regexp.MustCompile("(aarch64|arm64)-linux-gnu")
Expand All @@ -66,7 +66,7 @@ var (
regexpFreeBSD64 = regexp.MustCompile("amd64-freebsd[0-9]*")
)

// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L144-L176
// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L144-L176
func (s *System) isExactMatchWith(osName, osArch string) bool {
if s.Host == "all" {
return true
Expand Down Expand Up @@ -101,7 +101,7 @@ func (s *System) isExactMatchWith(osName, osArch string) bool {
return false
}

// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L178-L198
// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L178-L198
func (s *System) isCompatibleWith(osName, osArch string) (bool, int) {
if s.isExactMatchWith(osName, osArch) {
return true, 1000
Expand All @@ -125,7 +125,7 @@ func (s *System) isCompatibleWith(osName, osArch string) (bool, int) {
}

// GetFlavourCompatibleWith returns the downloadable resource (System) compatible with the specified OS/Arch
// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L206-L216
// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L206-L216
func (t *Tool) GetFlavourCompatibleWith(osName, osArch string) System {
var correctSystem System
maxSimilarity := -1
Expand Down