|
|
@@ -259,6 +259,10 @@ getarchitectures() {
|
|
|
echo "$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')"
|
|
|
}
|
|
|
|
|
|
+getarchitecturesfromcommalist() {
|
|
|
+ echo "$1" | sed -e 's#,#\n#g' | sed -e "s/^native\$/$(getarchitecture 'native')/"
|
|
|
+}
|
|
|
+
|
|
|
configarchitecture() {
|
|
|
{
|
|
|
echo "APT::Architecture \"$(getarchitecture $1)\";"
|
|
|
@@ -432,7 +436,7 @@ Package: $NAME" >> ${BUILDDIR}/debian/control
|
|
|
# fi
|
|
|
done
|
|
|
|
|
|
- for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do
|
|
|
+ for arch in $(getarchitecturesfromcommalist "$ARCH"); do
|
|
|
rm -rf ${BUILDDIR}/debian/tmp
|
|
|
mkdir -p ${BUILDDIR}/debian/tmp/DEBIAN ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} ${BUILDDIR}/debian/tmp/usr/bin
|
|
|
cp ${BUILDDIR}/debian/copyright ${BUILDDIR}/debian/changelog ${BUILDDIR}/FEATURES ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME}
|
|
|
@@ -587,7 +591,7 @@ insertpackage() {
|
|
|
something went horribly wrong! They are autogenerated
|
|
|
und used only by testcases and surf no other propose…"}"
|
|
|
local ARCHS=""
|
|
|
- for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do
|
|
|
+ for arch in $(getarchitecturesfromcommalist "$ARCH"); do
|
|
|
if [ "$arch" = 'all' -o "$arch" = 'none' ]; then
|
|
|
ARCHS="$(getarchitectures)"
|
|
|
else
|
|
|
@@ -649,7 +653,7 @@ insertinstalledpackage() {
|
|
|
|
|
|
local FILE='rootdir/var/lib/dpkg/status'
|
|
|
local INFO='rootdir/var/lib/dpkg/info'
|
|
|
- for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do
|
|
|
+ for arch in $(getarchitecturesfromcommalist "$ARCH"); do
|
|
|
echo "Package: $NAME
|
|
|
Status: $STATUS
|
|
|
Priority: $PRIORITY
|
|
|
@@ -943,8 +947,7 @@ acquire::cdrom::autodetect 0;" > rootdir/etc/apt/apt.conf.d/00cdrom
|
|
|
|
|
|
downloadfile() {
|
|
|
local PROTO="$(echo "$1" | cut -d':' -f 1 )"
|
|
|
- apthelper -o Acquire::https::CaInfo=${TESTDIR}/apt.pem \
|
|
|
- -o Debug::Acquire::${PROTO}=1 \
|
|
|
+ apthelper -o Debug::Acquire::${PROTO}=1 \
|
|
|
download-file "$1" "$2" 2>&1 || true
|
|
|
# only if the file exists the download was successful
|
|
|
if [ -e "$2" ]; then
|