diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2023-08-01 13:59:09 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2023-08-02 12:04:32 +0200 |
commit | 5576e7f76da73f3f5217f90d816cc19b6c0a5a77 (patch) | |
tree | b5caa7891f49ae697bd1b8fb0db18f2d8a1a1831 /test/integration/framework | |
parent | 2a8830218bef1fa5fb01a387bddf7d76087eea58 (diff) |
Compare SHA256 to check if versions are really the same
If we know both SHA256, and they're different, the packages are. This
approach stores the SHA256 only at runtime, avoiding the overhead of
storing it on-disk, because when we update repositories we update all
of them anyhow.
Note that pkgCacheGenerator is hidden, so we can just modify its
ABI, hooray.
Closes: #931175
LP: #2029268
Diffstat (limited to 'test/integration/framework')
-rw-r--r-- | test/integration/framework | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/integration/framework b/test/integration/framework index 264c228d0..3bf8a3fec 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1022,9 +1022,13 @@ insertpackage() { Priority: $PRIORITY Section: $SECTION Installed-Size: 42 -Size: 42 -SHA256: 0000000000000000000000000000000000000000000000000000000000000000 -Maintainer: Joe Sixpack <joe@example.org>" +Size: 42" + if echo "$DEPENDENCIES" | grep -q SHA256:; then + : + else + echo "SHA256: 0000000000000000000000000000000000000000000000000000000000000000" + fi + echo "Maintainer: Joe Sixpack <joe@example.org>" test "$arch" = 'none' || echo "Architecture: $arch" echo "Version: $VERSION Filename: pool/${DISTSECTION}/${NAME}/${NAME}_${VERSION}_${arch}.deb" |