]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
fix support for multiple patterns in apt-cache search
[apt.git] / test / integration / framework
index 31b12e8bfb90985310c65f531765c46763456fc4..e3e868d45246940709ef24ec561eec7f44cc283b 100644 (file)
@@ -483,6 +483,7 @@ insertpackage() {
        local VERSION="$4"
        local DEPENDENCIES="$5"
        local PRIORITY="${6:-optional}"
+       local DESCRIPTION="${7}"
        local ARCHS=""
        for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do
                if [ "$arch" = 'all' -o "$arch" = 'none' ]; then
@@ -504,11 +505,16 @@ Maintainer: Joe Sixpack <joe@example.org>" >> $FILE
                        echo "Version: $VERSION
 Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" >> $FILE
                        test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
-                       echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE}
+                       echo -n 'Description: ' >> $FILE
+                       if [ -z "$DESCRIPTION" ]; then
+                               echo "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
+ und used only by testcases for APT and surf no other proposeā€¦" >> $FILE
+                       else
+                               echo "$DESCRIPTION" >> $FILE
+                       fi
+                       echo >> $FILE
                done
        done
 }