]> git.saurik.com Git - apt.git/commitdiff
Add support for providing and autocopying Sources files along the way
authorAndres Mejia <mcitadel@gmail.com>
Tue, 30 Nov 2010 18:25:39 +0000 (19:25 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 30 Nov 2010 18:25:39 +0000 (19:25 +0100)
of status and Packages files with a testcase

test/integration/framework

index 8abefc814abc358c582df95ffb36a9594bf1f76e..7af59deb01ad17599859faaaef1b3df0def0ddee 100644 (file)
@@ -119,6 +119,12 @@ setupenvironment() {
        else
                touch aptarchive/Packages
        fi
        else
                touch aptarchive/Packages
        fi
+       local SOURCESSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Sources-/' -e 's/^skip-/Sources-/')
+       if [ -f "${TESTDIR}/${SOURCESSFILE}" ]; then
+               cp "${TESTDIR}/${SOURCESSFILE}" aptarchive/Sources
+       else
+               touch aptarchive/Sources
+       fi
        cp $(find $TESTDIR -name '*.pub' -o -name '*.sec') keys/
        ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
        echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf
        cp $(find $TESTDIR -name '*.pub' -o -name '*.sec') keys/
        ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
        echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf