Documentation ¶
Overview ¶
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2020 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019-2021 Ettore Di Giacinto <mudler@gentoo.org>
Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 Ettore Di Giacinto <mudler@mocaccino.org>
Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2020-2021 Ettore Di Giacinto <mudler@mocaccino.org>
Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2020 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019 Ettore Di Giacinto <mudler@gentoo.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Copyright © 2019-2021 Ettore Di Giacinto <mudler@gentoo.org>
Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
const ( LuetEnvPrefix = "LUET" LuetForkVersion = "geaaru" )
Variables ¶
var ( BuildTime string BuildCommit string BuildGoVersion string )
Build time and commit information.
⚠️ WARNING: should only be set by "-ldflags".
var LockedCommands = []string{"install", "uninstall", "upgrade"}
var RootCmd = &cobra.Command{ Use: "luet", Short: "Container based package manager", Long: `Luet is a single-binary package manager based on containers to build packages. To install a package: $ luet install package To search for a package in the repositories: $ luet search package To list all packages installed in the system: $ luet search --installed . To show hidden packages: $ luet search --hidden package To build a package, from a tree definition: $ luet build --tree tree/path package `, Version: version(), PersistentPreRun: func(cmd *cobra.Command, args []string) { err := LoadConfig(config.LuetCfg) if err != nil { Fatal("failed to load configuration:", err.Error()) } err = config.LuetCfg.GetSystem().InitTmpDir() if err != nil { Fatal("failed on init tmp basedir:", err.Error()) } viper.BindPFlag("plugin", cmd.Flags().Lookup("plugin")) plugin := viper.GetStringSlice("plugin") bus.Manager.Initialize(plugin...) if len(bus.Manager.Plugins) != 0 { Info(":lollipop:Enabled plugins:") for _, p := range bus.Manager.Plugins { Info("\t:arrow_right:", p.Name) } } }, PersistentPostRun: func(cmd *cobra.Command, args []string) { err := config.LuetCfg.GetSystem().CleanupTmpDir() if err != nil { Warning("failed on cleanup tmpdir:", err.Error()) } systemDB := config.LuetCfg.GetSystemDB() err = systemDB.Close() if err != nil { Warning("failed on close database:", err.Error()) } }, SilenceErrors: true, }
RootCmd represents the base command when called without any subcommands
var Verbose bool
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func LoadConfig ¶
func LoadConfig(c *config.LuetConfig) error
func NewUnpackCommand ¶
Types ¶
type PackageResult ¶
type PackageResult struct { Name string `json:"name"` Category string `json:"category"` Version string `json:"version"` License string `json:"License"` Repository string `json:"repository"` Target string `json:"target"` Hidden bool `json:"hidden"` Files []string `json:"files"` }
func (PackageResult) String ¶
func (r PackageResult) String() string
type Results ¶
type Results struct {
Packages []PackageResult `json:"packages"`
}
func (*Results) AddPackage ¶
func (r *Results) AddPackage(p *PackageResult)