Skip to content

Commit

Permalink
Quick fix for failing builds (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebQ42 authored Dec 23, 2020
1 parent f4ff888 commit 63c5c54
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/probonopd/go-appimage
go 1.13

require (
github.com/CalebQ42/copy v1.4.1
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249
github.com/adrg/xdg v0.2.1
Expand All @@ -16,7 +17,6 @@ require (
github.com/grandcat/zeroconf v1.0.0
github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c
github.com/hashicorp/go-version v1.2.0
github.com/otiai10/copy v1.1.1
github.com/probonopd/go-zsyncmake v0.0.0-20181008012426-5db478ac2be7
github.com/prometheus/procfs v0.0.10
github.com/rjeczalik/notify v0.9.2
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/CalebQ42/copy v1.4.1 h1:ve5gOqZ7nrzQfjktAWvDyqTC98cWr9bvk4b1Sx0zjMA=
github.com/CalebQ42/copy v1.4.1/go.mod h1:LxvtMRiP3tmXL7l7v76EQlCyMTWkGsBfvKUkrT7kNhk=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249 h1:fMi9ZZ/it4orHj3xWrM6cLkVFcCbkXQALFUiNtHtCPs=
Expand Down Expand Up @@ -70,14 +72,12 @@ github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM=
github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/otiai10/copy v1.1.1 h1:PH7IFlRQ6Fv9vYmuXbDRLdgTHoP1w483kPNUP2bskpo=
github.com/otiai10/copy v1.1.1/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc=
github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E=
github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down
14 changes: 6 additions & 8 deletions src/appimagetool/appdirtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)
import "debug/elf"
import "github.com/probonopd/go-appimage/internal/helpers"
import "github.com/otiai10/copy"
import "github.com/CalebQ42/copy"

//go:generate go run genexclude.go

Expand Down Expand Up @@ -166,17 +166,15 @@ var packagesContainingFiles = make(map[string]string) // Need to use 'make', oth
/usr/lib64.) If the binary was linked with the -z nodeflib linker option, this step is skipped.
*/


type DeployOptions struct {
standalone bool
standalone bool
libAppRunHooks bool
}

// this is the public options instance
// which need to be set before the function is called
var options DeployOptions


func AppDirDeploy(path string) {
appdir, err := helpers.NewAppDir(path)
if err != nil {
Expand Down Expand Up @@ -407,12 +405,12 @@ func deployInterpreter(appdir helpers.AppDir) (string, error) {
// if it is not on the exclude list and it is not yet at the target location
func deployElf(lib string, appdir helpers.AppDir, err error) {
for _, excludePrefix := range ExcludedLibraries {
if strings.HasPrefix(filepath.Base(lib), excludePrefix) == true && ! options.standalone {
if strings.HasPrefix(filepath.Base(lib), excludePrefix) == true && !options.standalone {
log.Println("Skipping", lib, "because it is on the excludelist")
return
}
}

log.Println("Working on", lib, "(TODO: Remove this message)")
if strings.HasPrefix(lib, appdir.Path) == false { // Do not copy if it is already in the AppDir
libTargetPath := appdir.Path + "/" + lib
Expand Down Expand Up @@ -796,7 +794,7 @@ func deployGtkDirectory(appdir helpers.AppDir, gtkVersion int) {
func appendLib(path string) {

for _, excludedlib := range ExcludedLibraries {
if filepath.Base(path) == excludedlib && ! options.standalone {
if filepath.Base(path) == excludedlib && !options.standalone {
// log.Println("Skipping", excludedlib, "because it is on the excludelist")
return
}
Expand Down Expand Up @@ -1435,7 +1433,7 @@ func checkWhetherPartOfLibc(thisfile string) bool {

for _, prefix := range prefixes {
if strings.HasPrefix(filepath.Base(thisfile), prefix+"-") || strings.HasPrefix(filepath.Base(thisfile), prefix+".") || strings.HasPrefix(filepath.Base(thisfile), prefix+"_") {
return true
return true
}
}

Expand Down

0 comments on commit 63c5c54

Please sign in to comment.