Skip to content

Commit 641f82a

Browse files
xmlqiuzhiqian
authored andcommitted
fix: Remove logic that affects process startup
Link: https://gerrit.uniontech.com/c/lastore-daemon/+/306001
1 parent 838aeda commit 641f82a

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

src/lastore-daemon/manager.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ type Manager struct {
106106
checkDpkgCapabilityOnce sync.Once
107107
supportDpkgScriptIgnore bool
108108

109-
envIsValid bool
110-
111109
logFds []*os.File
112110
logFdsMu sync.Mutex
113111
logTmpFile *os.File
@@ -139,7 +137,6 @@ func NewManager(service *dbusutil.Service, updateApi system.System, c *config.Co
139137
sysPower: power.NewPower(service.Conn()),
140138
securitySourceConfig: make(UpdateSourceConfig),
141139
systemSourceConfig: make(UpdateSourceConfig),
142-
envIsValid: true,
143140
}
144141
m.reloadOemConfig(true)
145142
m.signalLoop.Start()

src/lastore-daemon/manager_update.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,6 @@ func (m *Manager) updateSource(sender dbus.Sender) (*Job, error) {
178178
m.updateSourceOnce = true
179179
m.PropsMu.Unlock()
180180
if len(m.UpgradableApps) > 0 {
181-
if !m.envIsValid {
182-
job.retry = 0
183-
return &system.JobError{
184-
ErrType: system.ErrorDpkgError,
185-
ErrDetail: "before update env check failed",
186-
}
187-
}
188181
go m.reportLog(updateStatusReport, true, "")
189182
// 开启自动下载时触发自动下载,发自动下载通知,不发送可更新通知;
190183
// 关闭自动下载时,发可更新的通知;
@@ -604,21 +597,6 @@ func (m *Manager) refreshUpdateInfos(sync bool) {
604597
}
605598
m.updateUpdatableProp(m.updater.ClassifiedUpdatablePackages)
606599
m.statusManager.SetFrontForceUpdate(m.updatePlatform.Tp == updateplatform.UpdateShutdown)
607-
if len(m.UpgradableApps) > 0 {
608-
if !m.beforeUpdateSourceEnvCheck() {
609-
logger.Warning("before update env check failed")
610-
m.envIsValid = false
611-
return
612-
}
613-
m.envIsValid = true
614-
procEvent := updateplatform.ProcessEvent{
615-
TaskID: 1,
616-
EventType: updateplatform.GetUpdateEvent,
617-
EventStatus: true,
618-
EventContent: "update source success",
619-
}
620-
m.updatePlatform.PostProcessEventMessage(procEvent)
621-
}
622600
if updateplatform.IsForceUpdate(m.updatePlatform.Tp) {
623601
go func() {
624602
m.inhibitAutoQuitCountAdd()

0 commit comments

Comments
 (0)