mirror of
https://github.com/clearlinux/clr-installer.git
synced 2026-10-04 07:58:35 +00:00
swupd: Remove depreciated code
Update and BundleAdd are no longer in use once we switched to a single swupd verify for the OS install. Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This commit is contained in:
@@ -329,26 +329,6 @@ func (s *SoftwareUpdater) VerifyWithBundles(version string, mirror string, bundl
|
||||
return nil
|
||||
}
|
||||
|
||||
// Update executes the "swupd update" operation
|
||||
func (s *SoftwareUpdater) Update() error {
|
||||
args := []string{
|
||||
"swupd",
|
||||
"update",
|
||||
"--keepcache",
|
||||
fmt.Sprintf("--path=%s", s.rootDir),
|
||||
fmt.Sprintf("--statedir=%s", s.stateDir),
|
||||
}
|
||||
|
||||
log.Info("Checking for swupd updates")
|
||||
|
||||
err := cmd.RunAndLog(args...)
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DisableUpdate executes the "systemctl" to disable auto update operation
|
||||
// "swupd autoupdate" currently does not --path
|
||||
// See Issue https://github.com/clearlinux/swupd-client/issues/527
|
||||
@@ -542,33 +522,6 @@ func parseSwupdMirror(data []byte) (string, error) {
|
||||
return string(match[1]), nil
|
||||
}
|
||||
|
||||
// BundleAdd executes the "swupd bundle-add" operation for a single bundle
|
||||
func (s *SoftwareUpdater) BundleAdd(bundle string) error {
|
||||
args := []string{
|
||||
"swupd",
|
||||
"bundle-add",
|
||||
}
|
||||
|
||||
if s.skipDiskSpaceCheck {
|
||||
args = append(args, "--skip-diskspace-check")
|
||||
}
|
||||
|
||||
args = s.setExtraFlags(args)
|
||||
|
||||
args = append(args,
|
||||
fmt.Sprintf("--path=%s", s.rootDir),
|
||||
fmt.Sprintf("--statedir=%s", s.stateDir),
|
||||
bundle,
|
||||
)
|
||||
|
||||
err := cmd.RunAndLog(args...)
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// LoadBundleList loads the bundle definitions
|
||||
func LoadBundleList(model *model.SystemInstall) ([]*Bundle, error) {
|
||||
path, err := conf.LookupBundleListFile()
|
||||
|
||||
Reference in New Issue
Block a user