mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
selfupdate: dont detect FUSE if build is static
Before this patch selfupdate detected ANY build with cmount tag as a build having libFUSE capabilities. However, only dynamic builds really have it. The official linux builds are static and have the cmount tag as of the time of this writing. This results in inability to update official linux binaries. This patch fixes that. The build can be fixed independently.
This commit is contained in:
@@ -143,14 +143,9 @@ func InstallUpdate(ctx context.Context, opt *Options) error {
|
||||
return errors.New("--stable and --beta are mutually exclusive")
|
||||
}
|
||||
|
||||
gotCmount := false
|
||||
for _, tag := range buildinfo.Tags {
|
||||
if tag == "cmount" {
|
||||
gotCmount = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if gotCmount && !cmount.ProvidedBy(runtime.GOOS) {
|
||||
// The `cmount` tag is added by cmd/cmount/mount.go only if build is static.
|
||||
_, tags := buildinfo.GetLinkingAndTags()
|
||||
if strings.Contains(" "+tags+" ", " cmount ") && !cmount.ProvidedBy(runtime.GOOS) {
|
||||
return errors.New("updating would discard the mount FUSE capability, aborting")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user