diff options
author | Julien Dessaux | 2024-02-29 23:55:01 +0100 |
---|---|---|
committer | Julien Dessaux | 2024-03-07 01:02:07 +0100 |
commit | 9d68556f0ea9fa451510060f6dc24495f1b1ec21 (patch) | |
tree | 97b0909e06a8faf52679ceca908354e0fc16b826 /stdlib | |
parent | feat(packages): finished implementing packages install promises (diff) | |
download | gonf-9d68556f0ea9fa451510060f6dc24495f1b1ec21.tar.gz gonf-9d68556f0ea9fa451510060f6dc24495f1b1ec21.tar.bz2 gonf-9d68556f0ea9fa451510060f6dc24495f1b1ec21.zip |
fix(stdlib): fixed apt package promises
The installed packages list failed to recognise packages when the
architecture name is part of the package's name
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/os/debian/apt.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stdlib/os/debian/apt.go b/stdlib/os/debian/apt.go index 2eb58fa..848294b 100644 --- a/stdlib/os/debian/apt.go +++ b/stdlib/os/debian/apt.go @@ -64,6 +64,9 @@ func packages_list() { slog.Error("dpkg-query", "error", "parsing error: no version after name") os.Exit(1) } + if strings.Contains(name, ":") { // some packages are named with the arch like something:amd64 + name = strings.Split(name, ":")[0] // in this case we want only the name + } packages[name] = s.Text() } } |