]> git.saurik.com Git - apt.git/commitdiff
add a method to insert packages into dpkg's status file
authorDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 23 Mar 2011 00:50:32 +0000 (01:50 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 23 Mar 2011 00:50:32 +0000 (01:50 +0100)
test/integration/framework

index 4b1b98c4e8060c13038f479b06475806ff45a418..013a71ec02cbcf0515ecd449e64ba015f70401e7 100644 (file)
@@ -422,6 +422,29 @@ Filename: pool/main/${NAME}/${NAME}_${VERSION}_${ARCH}.deb" >> $FILE
        done
 }
 
+insertinstalledpackage() {
+       local NAME="$1"
+       local ARCH="$2"
+       local VERSION="$3"
+       local DEPENDENCIES="$4"
+       local FILE="rootdir/var/lib/dpkg/status"
+       echo "Package: $NAME
+Status: install ok installed
+Priority: optional
+Section: other
+Installed-Size: 42
+Maintainer: Joe Sixpack <joe@example.org>
+Architecture: $ARCH
+Version: $VERSION" >> $FILE
+       test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
+       echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE}
+ If you find such a package installed on your system,
+ YOU did something horribly wrong! They are autogenerated
+ und used only by testcases for APT and surf no other proposeā€¦
+" >> $FILE
+}
+
+
 buildaptarchivefromincoming() {
        msginfo "Build APT archive for ${CCMD}$(basename $0)${CINFO} based on incoming packagesā€¦"
        cd aptarchive