Skip to content

Commit 6d50f2c

Browse files
committed
feat: Adjust download size calculation for incremental updates
Currently, the download size for packages in incremental update mode is set to half of the original size. This is a temporary measure and will be improved in future updates.
1 parent 10b5170 commit 6d50f2c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/lastore-daemon/manager_ifc.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,11 @@ func (m *Manager) QueryAllSizeWithSource(mode system.UpdateType) (int64, *dbus.E
490490
logger.Infof("%v size is:%v M", strings.Join(sourcePathList, " and "), int64(allSize/(1000*1000)))
491491
}
492492

493+
// TODO: Currently, just use half of the original size. This needs to be improved in the future.
494+
if m.config.IncrementalUpdate {
495+
allSize = allSize / 2
496+
}
497+
493498
return int64(allSize), dbusutil.ToError(err)
494499
}
495500

0 commit comments

Comments
 (0)