Reintroduced accidentally removed functions #4695

This commit is contained in:
Nick Bolton 2015-05-25 15:17:18 +01:00
parent 6ba2ddeb7d
commit 74dda188dc
3 changed files with 2059 additions and 5 deletions

View File

@ -1439,14 +1439,37 @@ class InternalCommands:
self.getGitBranchName(), self.getGitRevision()) self.getGitBranchName(), self.getGitRevision())
return re.sub(pattern, replace, self.dist_name(type)) return re.sub(pattern, replace, self.dist_name(type))
def getDebianArch(self): def getDebianArch(self):
if os.uname()[4][:3] == 'arm': if os.uname()[4][:3] == 'arm':
return 'armhf' return 'armhf'
# os_bits should be loaded with '32bit' or '64bit'
import platform
(os_bits, other) = platform.architecture()
# get platform based on current platform
if os_bits == '32bit':
return 'i386'
elif os_bits == '64bit':
return 'amd64'
else:
raise Exception("unknown os bits: " + os_bits)
if os.uname()[4][:3] == 'arm': def getLinuxPlatform(self):
return 'Linux-armv6l' if os.uname()[4][:3] == 'arm':
return 'Linux-armv6l'
# os_bits should be loaded with '32bit' or '64bit'
import platform
(os_bits, other) = platform.architecture()
# get platform based on current platform
if os_bits == '32bit':
return 'Linux-i686'
elif os_bits == '64bit':
return 'Linux-x86_64'
else:
raise Exception("unknown os bits: " + os_bits)
def dist_usage(self): def dist_usage(self):
print ('Usage: %s package [package-type]\n' print ('Usage: %s package [package-type]\n'

2000
ext/toolchain/fuckfuck.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
def getDebianArch(self):
if os.uname()[4][:3] == 'arm':
return 'armhf'
# os_bits should be loaded with '32bit' or '64bit'
import platform
(os_bits, other) = platform.architecture()
# get platform based on current platform
if os_bits == '32bit':
return 'i386'
elif os_bits == '64bit':
return 'amd64'
else:
raise Exception("unknown os bits: " + os_bits)
def getLinuxPlatform(self):
if os.uname()[4][:3] == 'arm':
return 'Linux-armv6l'
# os_bits should be loaded with '32bit' or '64bit'
import platform
(os_bits, other) = platform.architecture()
# get platform based on current platform
if os_bits == '32bit':
return 'Linux-i686'
elif os_bits == '64bit':
return 'Linux-x86_64'
else:
raise Exception("unknown os bits: " + os_bits)