diff --git a/build.sh b/build.sh
index 4730866023845420a364e771833e778bfda50ff1..7ea67b28d4a011602ebeebfe3d4d6bd93f537e47 100755
--- a/build.sh
+++ b/build.sh
@@ -146,13 +146,6 @@ build()
   local variant="$1"
   if $build_viewer
   then
-    if [ "$arch" = "Linux" ]
-    then
-        ## something about the additional_packages mechanism messes up buildscripts results.py
-        ## since we don't care about those packages on Linux, just zero it out, yes - a HACK
-        export additional_packages=""
-    fi
-
     "$autobuild" build --quiet --no-configure -c $variant
     build_ok=$?
 
@@ -213,6 +206,13 @@ fi
 # load autobuild provided shell functions and variables
 eval "$("$autobuild" source_environment)"
 
+# something about the additional_packages mechanism messes up buildscripts results.py on Linux
+# since we don't care about those packages on Linux, just zero it out, yes - a HACK
+if [ "$arch" = "Linux" ]
+then
+    export additional_packages=
+fi
+
 # dump environment variables for debugging
 begin_section "Environment"
 env|sort