deb-pkg: move setting debarch for a separate function
deb-pkg: move setting debarch for a separate function

create_package() function tries to resolve used architecture
for everry package. Split the setting the architecture to a
new function, set_debarch(), called once on startup.

This allows using debarch from other parts of script as
needed.

v2: Follow Michals suggestion on setting variables at
top scope and also setting the fallback $debarch in the
new function

Signed-off-by: Riku Voipio <1b2b12f1a98b3f96608883bfc38852bb84b0d6c5@linaro.org>
Signed-off-by: Michal Marek <0c835876a532a476f30fdb1f6e963bae6c5a1a04@suse.cz>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs