From 1ec0bc014a1a64a4f82bca011672a66be16e8f08 Mon Sep 17 00:00:00 2001 From: samlhuillier1 Date: Tue, 23 May 2023 18:19:24 +0000 Subject: [PATCH] Revert "implement retries for dpkg err" This reverts commit 9e6c438216164f89cc5c5610e8b5d3bb02d42207. --- pkg/autostartconf/aptbinary.go | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/pkg/autostartconf/aptbinary.go b/pkg/autostartconf/aptbinary.go index dc4e5cef..eb1080aa 100644 --- a/pkg/autostartconf/aptbinary.go +++ b/pkg/autostartconf/aptbinary.go @@ -17,17 +17,11 @@ type AptBinaryConfigurer struct { func (abc AptBinaryConfigurer) Install() error { _ = abc.UnInstall() // best effort - var err error - for i := 0; i < 3; i++ { - err = ExecCommands([][]string{ - {"apt-get", "update"}, - append([]string{"apt-get", "install", "-y"}, abc.aptDependencies...), - }) - if err == nil { - break - } - } - + // install apt dependencies + err := ExecCommands([][]string{ + {"apt-get", "update"}, + append([]string{"apt-get", "install", "-y"}, abc.aptDependencies...), + }) if err != nil { if strings.Contains(err.Error(), "dpkg --configure -a") { err = ExecCommands([][]string{{"sudo dpkg --configure -a"}})