Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,7 @@ func (p *Package) PrepYpkg(notif PidNotifier, usr *UserInfo, pman *EopkgManager,
wdir := p.GetWorkDirInternal()
ymlFile := filepath.Join(wdir, filepath.Base(p.Path))

var cmd string
if PathExists("/usr/bin/ypkg-install-deps") {
cmd = fmt.Sprintf("ypkg-install-deps --eopkg-cmd='%s' -f %s", installCommand, ymlFile)
} else {
cmd = fmt.Sprintf("ypkg install-deps --eopkg-cmd '%s' -f %s", installCommand, ymlFile)
}
cmd := fmt.Sprintf("%s install-deps --eopkg-cmd '%s' -f %s", ypkgBin, installCommand, ymlFile)

if DisableColors {
cmd += " -n"
Expand Down Expand Up @@ -333,16 +328,7 @@ func (p *Package) BuildYpkg(notif PidNotifier, usr *UserInfo, pman *EopkgManager
buildDir := filepath.Join(BuildUserHome, "YPKG")

// Now build the package

if ypkgBuildCommand == "" {
if PathExists("/usr/bin/ypkg-build") {
ypkgBuildCommand = "ypkg-build"
} else {
ypkgBuildCommand = "ypkg build"
}
}

cmd := fmt.Sprintf("%s -D %s -B %s %s", ypkgBuildCommand, workDir, buildDir, ymlFile)
cmd := fmt.Sprintf("%s build -D %s -B %s %s", ypkgBin, workDir, buildDir, ymlFile)
if DisableColors {
cmd += " -n"
}
Expand Down
6 changes: 3 additions & 3 deletions builder/eopkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
)

var (
installCommand = "eopkg.bin" // Command used for installing packages
ypkgBuildCommand = "" // Command used for building package.yml recipes
xmlBuildCommand = "eopkg.py2" // Command used for building pspec.xml recipes
installCommand = "eopkg.bin" // Command used for installing packages
ypkgBin = "ypkg" // Binary used for ypkg recipes
xmlBuildCommand = "eopkg.py2" // Command used for building pspec.xml recipes
)

// eopkgCommand utility wraps all eopkg calls to autodisable colours
Expand Down
4 changes: 2 additions & 2 deletions builder/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ func (m *Manager) SetCommands(eopkg string, ypkg string) {
}

if ypkg != "" {
ypkgBuildCommand = ypkg
ypkgBin = ypkg
}

slog.Debug("Set binaries",
"eopkg", installCommand,
"eopkg_xml", xmlBuildCommand,
"ypkg", ypkgBuildCommand)
"ypkg", ypkgBin)
}

// SetProfile will attempt to initialise the manager with a given profile
Expand Down