projects
/
tools
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abe7de4
)
add get_arch
author
Guido Günther
<agx@sigxcpu.org>
Sat, 4 Apr 2009 17:02:42 +0000
(19:02 +0200)
committer
Guido Günther
<agx@sigxcpu.org>
Sat, 4 Apr 2009 17:02:42 +0000
(19:02 +0200)
returns dpkg's notion of the architecture
gbp/deb_utils.py
patch
|
blob
|
history
diff --git
a/gbp/deb_utils.py
b/gbp/deb_utils.py
index
b586aab
..
2879459
100644
(file)
--- 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()