diff options
-rw-r--r-- | gbp/deb_utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gbp/deb_utils.py b/gbp/deb_utils.py index b586aabb..28794596 100644 --- a/gbp/deb_utils.py +++ b/gbp/deb_utils.py @@ -8,6 +8,7 @@ import email import os import re import shutil +import subprocess import sys import glob import command_wrappers as gbpc @@ -209,6 +210,12 @@ def tar_toplevel(dir): return dir +def get_arch(): + pipe = subprocess.Popen(["dpkg", "--print-architecture"], shell=False, stdout=subprocess.PIPE) + arch = pipe.stdout.readline().strip() + return arch + + def _test(): import doctest doctest.testmod() |