forked from Jguer/yay
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for multiple 'Architecture' values
This allows architecture to be multivalued. On x86-64 machines, this could be something like: Architecture = x86-64-v3 x86-64 We use the first specified Architecture value in mirrorlist $arch variable replacement, as this is backwards-compatible and sane. More info: https://git.archlinux.org/pacman.git/commit/?id=3179db108a83104d9de6d1d607f55f8118e92160 Signed-off-by: x1b6e6 <ftdabcde@gmail.com>
- Loading branch information
Showing
8 changed files
with
60 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// +build !six | ||
|
||
package ialpm | ||
|
||
import ( | ||
alpm "github.com/Jguer/go-alpm/v2" | ||
) | ||
|
||
func alpmSetArchitecture(alpmHandle *alpm.Handle, arch []string) error { | ||
return alpmHandle.SetArch(arch[0]) | ||
} | ||
|
||
func (ae *AlpmExecutor) AlpmArchitectures() ([]string, error) { | ||
arch, err := ae.handle.Arch() | ||
|
||
return []string{arch}, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// +build six | ||
|
||
package ialpm | ||
|
||
import ( | ||
alpm "github.com/Jguer/go-alpm/v2" | ||
) | ||
|
||
func alpmSetArchitecture(alpmHandle *alpm.Handle, arch []string) error { | ||
return alpmHandle.SetArchitectures(arch) | ||
} | ||
|
||
func (ae *AlpmExecutor) AlpmArchitectures() ([]string, error) { | ||
architectures, err := ae.handle.GetArchitectures() | ||
|
||
return architectures.Slice(), err | ||
} |