Skip to content

Commit 034f35d

Browse files
committed
fix: Remove logic that may slow down lastore-daemon startup
During startup, lastore-daemon invokes the build_system_info script, which in turn fetches a specific property from lastore-daemon's D-Bus service Link: https://gerrit.uniontech.com/c/lastore-daemon/+/274039
1 parent 52f922e commit 034f35d

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

src/lastore-daemon/manager_update.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ func (m *Manager) updateSource(sender dbus.Sender) (*Job, error) {
221221
},
222222
string(system.FailedStatus): func() error {
223223
// 网络问题检查更新失败和空间不足下载索引失败,需要发通知
224-
if system.IsPrivateLastore {
225-
cacheFile := "/tmp/checkpolicy.cache"
226-
_ = os.RemoveAll(cacheFile)
227-
}
228224
var errorContent system.JobError
229225
err = json.Unmarshal([]byte(job.Description), &errorContent)
230226
if err == nil {
@@ -552,13 +548,6 @@ const TimeOnly = "15:04:05"
552548
func (m *Manager) refreshUpdateInfos(sync bool) {
553549
// 检查更新时,同步修改canUpgrade状态;检查更新时需要同步操作
554550
if sync {
555-
// TODO 是否有必要?
556-
if system.IsPrivateLastore {
557-
err := exec.Command("/var/lib/lastore/scripts/build_system_info", "-now").Run()
558-
if err != nil {
559-
logger.Warning(err)
560-
}
561-
}
562551
// 检查更新后,先下载解析coreList,获取必装清单
563552
m.coreList = m.getCoreList(true)
564553
logger.Debug("generateUpdateInfo get coreList:", m.coreList)

0 commit comments

Comments
 (0)