diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-06-15 23:06:56 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-06-15 23:35:55 +0200 |
commit | 9d2a8a7388cf3b0bbbe92f6b0b30a533e1167f40 (patch) | |
tree | 7cd6b13d7f0f8f26850cb44a88e70935ee86e68f /test/integration/framework | |
parent | 1eb1836f4b5397497bd34f0cf516e6e4e73117bf (diff) |
condense parallel requests with the same hashes to one
It shouldn't be too common, but sometimes people have multiple mirrors
in the sources or otherwise repositories with the same content. Now that
we gracefully can handle multiple requests to the same URI, we can also
fold multiple requests with the same expected hashes into one. Note that
this isn't trying to find oppertunities for merging, but just merges if
it happens to encounter the oppertunity for it.
This is most obvious in the new testcase actually as it needs to delay
the action to give the acquire system enough time to figure out that
they can be merged.
Diffstat (limited to 'test/integration/framework')
-rw-r--r-- | test/integration/framework | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/integration/framework b/test/integration/framework index 1b99929e2..d8f7567d9 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -245,7 +245,7 @@ setupenvironment() { echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf - echo "Dir::Bin::Methods \"${METHODSDIR}\";" >> aptconfig.conf + echo "Dir::Bin::Methods \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/methods\";" >> aptconfig.conf # store apt-key were we can access it, even if we run it as a different user # destroys coverage reporting though, so just do it for root for now if [ "$(id -u)" = '0' ]; then @@ -786,6 +786,8 @@ insertsource() { local SPATH="aptarchive/dists/${RELEASE}/main/source" mkdir -p $SPATH local FILE="${SPATH}/Sources" + local DSCFILE="${NAME}_${VERSION}.dsc" + local TARFILE="${NAME}_${VERSION}.tar.gz" echo "Package: $NAME Binary: $NAME Version: $VERSION @@ -793,8 +795,8 @@ Maintainer: Joe Sixpack <joe@example.org> Architecture: $ARCH" >> $FILE test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE echo "Files: - d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.dsc - d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.tar.gz + $(echo -n "$DSCFILE" | md5sum | cut -d' ' -f 1) $(echo -n "$DSCFILE" | wc -c) $DSCFILE + $(echo -n "$TARFILE" | md5sum | cut -d' ' -f 1) $(echo -n "$TARFILE" | wc -c) $TARFILE " >> $FILE } |