From bc22f7d43c12c5f79c71b0319666e71f29d61322 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= <kuba@kadziolka.net>
Date: Mon, 25 May 2020 18:53:04 +0200
Subject: [PATCH] Disable self-update.

Based on a Fedora patch by Elliott Sales de Andrade.
---
 cli/cli.go | 44 +-------------------------------------------
 1 file changed, 1 insertion(+), 43 deletions(-)

diff --git a/cli/cli.go b/cli/cli.go
index 4312eb0..5f62297 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -10,13 +10,10 @@ import (
 	"io"
 	"io/ioutil"
 	"net/http"
-	"runtime"
 	"strings"
 	"time"
 
 	"github.com/blang/semver"
-	"github.com/exercism/cli/debug"
-	update "github.com/inconshreveable/go-update"
 )
 
 var (
@@ -95,46 +92,7 @@ func (c *CLI) IsUpToDate() (bool, error) {
 
 // Upgrade allows the user to upgrade to the latest version of the CLI.
 func (c *CLI) Upgrade() error {
-	var (
-		OS   = osMap[runtime.GOOS]
-		ARCH = archMap[runtime.GOARCH]
-	)
-
-	if OS == "" || ARCH == "" {
-		return fmt.Errorf("unable to upgrade: OS %s ARCH %s", OS, ARCH)
-	}
-
-	buildName := fmt.Sprintf("%s-%s", OS, ARCH)
-	if BuildARCH == "arm" {
-		if BuildARM == "" {
-			return fmt.Errorf("unable to upgrade: arm version not found")
-		}
-		buildName = fmt.Sprintf("%s-v%s", buildName, BuildARM)
-	}
-
-	var downloadRC *bytes.Reader
-	for _, a := range c.LatestRelease.Assets {
-		if strings.Contains(a.Name, buildName) {
-			debug.Printf("Downloading %s\n", a.Name)
-			var err error
-			downloadRC, err = a.download()
-			if err != nil {
-				return fmt.Errorf("error downloading executable: %s", err)
-			}
-			break
-		}
-	}
-	if downloadRC == nil {
-		return fmt.Errorf("no executable found for %s/%s%s", BuildOS, BuildARCH, BuildARM)
-	}
-
-	bin, err := extractBinary(downloadRC, OS)
-	if err != nil {
-		return err
-	}
-	defer bin.Close()
-
-	return update.Apply(bin, update.Options{})
+	return fmt.Errorf("Please use Guix to update Exercism")
 }
 
 func (c *CLI) fetchLatestRelease() error {
-- 
2.26.2

ref='/guix/log/.patman?id=6a2f1863e7707fc958efa417285161c7eced4904'>.patman</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/guix/log/.patman?id=6a2f1863e7707fc958efa417285161c7eced4904&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th></tr>
<tr><td><span title='2023-10-22 16:09:04 -0400'>2023-10-22</span></td><td><a href='/guix/commit/.patman?id=f44fa21c3ec1d9bf1b9da009e1c795942bf654eb'>gnu: patman: Apply patch for new Change-Id setting.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/bootloaders.scm (u-boot) [source]: Apply patch.
* gnu/packages/patches/u-boot-patman-change-id.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* .patman (keep_change_id): Use it.

Series-changes: 3
 - New commit
Change-Id: I33c03013f6a260b5f5d80212b7b6ebe8a3f97efa
</span></span></td><td>Maxim Cournoyer</td></tr>
<tr><td><span title='2023-05-01 12:39:11 -0400'>2023-05-01</span></td><td><a href='/guix/commit/.patman?id=f21007ce4aceeacf5bbfc7cd45d526073141f194'>.patman: Remove get_maintainer_script option.</a><span class='msg-avail'>...<span class='msg-tooltip'>This is now handled at the level of git via its new '--header-cmd' option,
which produces X-Debbugs-CC headers.

* .patman (get_maintainer_script): Delete option.
</span></span></td><td>Maxim Cournoyer</td></tr>
<tr><td><span title='2023-02-25 23:10:59 -0500'>2023-02-25</span></td><td><a href='/guix/commit/.patman?id=cb0d8100b288b5b0d130820207db17764b7d2140'>.patman: Ignore bad tags.</a><span class='msg-avail'>...<span class='msg-tooltip'>The feature is not used in Guix, and it produces extraneous warnings.

* .patman (ignore_bad_tags): Set option to True.
</span></span></td><td>Maxim Cournoyer</td></tr>
<tr><td><span title='2022-12-28 15:36:33 -0500'>2022-12-28</span></td><td><a href='/guix/commit/.patman?id=fde5af3962c8fafc5d20e5d742cc7aea907f3563'>.patman: New configuration file.</a><span class='msg-avail'>...<span class='msg-tooltip'>* .patman: New file.

Series-to: 60218@debbugs.gnu.org
Series-cc: rekado@elephly.net, othacehe@gnu.org
Series-version: 2
</span></span></td><td>Maxim Cournoyer</td></tr>