Skip to content

Commit 1e653d1

Browse files
committed
apt: ignore cache for "apt update"
"apt update" should never be cached. This also shouldn't break caching for anything run after it unless the rootfs changed (ie. apt cache was actually updated). Signed-off-by: Brian Goff <[email protected]>
1 parent 949d6c2 commit 1e653d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/pkgmgr/dpkg.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ func (dm *dpkgManager) unpackAndMergeUpdates(ctx context.Context, updates types.
237237
)
238238

239239
// Run apt update && apt download list of updates to target folder
240-
updated := toolingBase.Run(llb.Shlex("apt update"), llb.WithProxy(utils.GetProxy())).Root()
240+
updated := toolingBase.Run(
241+
llb.Shlex("apt update"),
242+
llb.WithProxy(utils.GetProxy()),
243+
llb.IgnoreCache,
244+
).Root()
241245

242246
// Download all requested update packages without specifying the version. This works around:
243247
// - Reports being slightly out of date, where a newer security revision has displaced the one specified leading to not found errors.

0 commit comments

Comments
 (0)