mirror of
https://github.com/mudler/luet.git
synced 2025-09-09 19:19:49 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fdba8dea71 | ||
|
a1453b7242 | ||
|
7d4b612173 | ||
|
9eef7e5c6d | ||
|
332824fd42 | ||
|
737fbdbdc1 | ||
|
f109bab2b4 |
@@ -22,6 +22,7 @@ It is written entirely in Golang and where used as package manager, it can run i
|
|||||||
- [It uses SAT solving techniques to solve the deptree](https://luet-lab.github.io/docs/docs/concepts/constraints/) ( Inspired by [OPIUM](https://ranjitjhala.github.io/static/opium.pdf) )
|
- [It uses SAT solving techniques to solve the deptree](https://luet-lab.github.io/docs/docs/concepts/constraints/) ( Inspired by [OPIUM](https://ranjitjhala.github.io/static/opium.pdf) )
|
||||||
- Support for [collections](https://luet-lab.github.io/docs/docs/concepts/packages/collections/) and [templated package definitions](https://luet-lab.github.io/docs/docs/concepts/packages/templates/)
|
- Support for [collections](https://luet-lab.github.io/docs/docs/concepts/packages/collections/) and [templated package definitions](https://luet-lab.github.io/docs/docs/concepts/packages/templates/)
|
||||||
- [Can be extended with Plugins and Extensions](https://luet-lab.github.io/docs/docs/concepts/plugins-and-extensions/)
|
- [Can be extended with Plugins and Extensions](https://luet-lab.github.io/docs/docs/concepts/plugins-and-extensions/)
|
||||||
|
- [Can build packages in Kubernetes (experimental)](https://github.com/mudler/luet-k8s)
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@ var Verbose bool
|
|||||||
var LockedCommands = []string{"install", "uninstall", "upgrade"}
|
var LockedCommands = []string{"install", "uninstall", "upgrade"}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LuetCLIVersion = "0.9.14"
|
LuetCLIVersion = "0.9.15"
|
||||||
LuetEnvPrefix = "LUET"
|
LuetEnvPrefix = "LUET"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -89,6 +89,7 @@ var uninstallCmd = &cobra.Command{
|
|||||||
FullCleanUninstall: fullClean,
|
FullCleanUninstall: fullClean,
|
||||||
CheckConflicts: checkconflicts,
|
CheckConflicts: checkconflicts,
|
||||||
Ask: !yes,
|
Ask: !yes,
|
||||||
|
PreserveSystemEssentialData: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
if LuetCfg.GetSystem().DatabaseEngine == "boltdb" {
|
if LuetCfg.GetSystem().DatabaseEngine == "boltdb" {
|
||||||
|
@@ -92,6 +92,7 @@ var upgradeCmd = &cobra.Command{
|
|||||||
SolverUpgrade: universe,
|
SolverUpgrade: universe,
|
||||||
RemoveUnavailableOnUpgrade: clean,
|
RemoveUnavailableOnUpgrade: clean,
|
||||||
UpgradeNewRevisions: sync,
|
UpgradeNewRevisions: sync,
|
||||||
|
PreserveSystemEssentialData: true,
|
||||||
Ask: !yes,
|
Ask: !yes,
|
||||||
})
|
})
|
||||||
inst.Repositories(repos)
|
inst.Repositories(repos)
|
||||||
|
@@ -59,7 +59,7 @@ func (*SimpleImg) RemoveImage(opts compiler.CompilerBackendOptions) error {
|
|||||||
defer SpinnerStop()
|
defer SpinnerStop()
|
||||||
out, err := exec.Command("img", buildarg...).CombinedOutput()
|
out, err := exec.Command("img", buildarg...).CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Failed building image: "+string(out))
|
return errors.Wrap(err, "Failed removing image: "+string(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
Info(":tea: Image " + name + " removed")
|
Info(":tea: Image " + name + " removed")
|
||||||
@@ -75,7 +75,7 @@ func (*SimpleImg) DownloadImage(opts compiler.CompilerBackendOptions) error {
|
|||||||
cmd := exec.Command("img", buildarg...)
|
cmd := exec.Command("img", buildarg...)
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Failed building image: "+string(out))
|
return errors.Wrap(err, "Failed downloading image: "+string(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
Info(":tea: Image " + name + " downloaded")
|
Info(":tea: Image " + name + " downloaded")
|
||||||
@@ -124,7 +124,7 @@ func (*SimpleImg) ExportImage(opts compiler.CompilerBackendOptions) error {
|
|||||||
Debug(":tea: Saving image " + name)
|
Debug(":tea: Saving image " + name)
|
||||||
out, err := exec.Command("img", buildarg...).CombinedOutput()
|
out, err := exec.Command("img", buildarg...).CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Failed building image: "+string(out))
|
return errors.Wrap(err, "Failed exporting image: "+string(out))
|
||||||
}
|
}
|
||||||
Info(":tea: Image " + name + " saved")
|
Info(":tea: Image " + name + " saved")
|
||||||
return nil
|
return nil
|
||||||
|
@@ -587,7 +587,7 @@ func (l *LuetInstaller) downloadPackage(a ArtifactMatch) (compiler.Artifact, err
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = artifact.Verify()
|
err = artifact.Verify()
|
||||||
if err != nil && !l.Options.Force {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "Artifact integrity check failure")
|
return nil, errors.Wrap(err, "Artifact integrity check failure")
|
||||||
}
|
}
|
||||||
return artifact, nil
|
return artifact, nil
|
||||||
@@ -621,15 +621,11 @@ func (l *LuetInstaller) downloadWorker(i int, wg *sync.WaitGroup, c <-chan Artif
|
|||||||
for p := range c {
|
for p := range c {
|
||||||
// TODO: Keep trace of what was added from the tar, and save it into system
|
// TODO: Keep trace of what was added from the tar, and save it into system
|
||||||
_, err := l.downloadPackage(p)
|
_, err := l.downloadPackage(p)
|
||||||
if err != nil && !l.Options.Force {
|
if err != nil {
|
||||||
//TODO: Uninstall, rollback.
|
Fatal("Failed downloading package "+p.Package.GetName(), err.Error())
|
||||||
Fatal("Failed installing package "+p.Package.GetName(), err.Error())
|
return errors.Wrap(err, "Failed downloading package "+p.Package.GetName())
|
||||||
return errors.Wrap(err, "Failed installing package "+p.Package.GetName())
|
} else {
|
||||||
}
|
Info(":package: Package ", p.Package.HumanReadableString(), "downloaded")
|
||||||
if err == nil {
|
|
||||||
Info("\n:package: Package ", p.Package.HumanReadableString(), "downloaded")
|
|
||||||
} else if err != nil && l.Options.Force {
|
|
||||||
Info("\n:package: ", p.Package.HumanReadableString(), "downloaded with failures (force download)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user