switch tests to Translation-en usage
authorDavid Kalnischkies <david@kalnischkies.de>
Thu, 23 Oct 2014 09:29:31 +0000 (11:29 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Thu, 23 Oct 2014 14:54:27 +0000 (16:54 +0200)
We can use either and some tests exercise this, but the default should
be what we want to use and that is a split out long description file
which is properly mentioned in the Release file.

Git-Dch: Ignore

test/integration/framework

index fcaa4ddd348216521ea927dfe024158ab425e911..ea3903056f6f0782baffd53051929bcf0994fd7c 100644 (file)
@@ -683,8 +683,7 @@ insertpackage() {
                fi
                for BUILDARCH in $ARCHS; do
                        local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}"
-                       mkdir -p $PPATH aptarchive/dists/${RELEASE}/main/source
-                       touch aptarchive/dists/${RELEASE}/main/source/Sources
+                       mkdir -p $PPATH
                        local FILE="${PPATH}/Packages"
                        echo "Package: $NAME
 Priority: $PRIORITY
@@ -695,10 +694,17 @@ 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: $DESCRIPTION" >> $FILE
+                       echo "Description: $(printf '%s' "$DESCRIPTION" | head -n 1)" >> $FILE
+                       echo "Description-md5: $(printf '%s' "$DESCRIPTION" | md5sum | cut -d' ' -f 1)" >> $FILE
                        echo >> $FILE
                done
        done
+       mkdir -p aptarchive/dists/${RELEASE}/main/source aptarchive/dists/${RELEASE}/main/i18n
+       touch aptarchive/dists/${RELEASE}/main/source/Sources
+       echo "Package: $NAME
+Description-md5: $(printf '%s' "$DESCRIPTION" | md5sum | cut -d' ' -f 1)
+Description-en: $DESCRIPTION
+" >> aptarchive/dists/${RELEASE}/main/i18n/Translation-en
 }
 
 insertsource() {
@@ -773,7 +779,7 @@ buildaptarchivefromincoming() {
 
 buildaptarchivefromfiles() {
        msginfo "Build APT archive for ${CCMD}$(basename $0)${CINFO} based on prebuild files…"
-       find aptarchive -name 'Packages' -o -name 'Sources' | while read line; do
+       find aptarchive -name 'Packages' -o -name 'Sources' -o -name 'Translation-*' | while read line; do
                msgninfo "\t${line} file… "
                compressfile "$line" "$1"
                msgdone "info"