blob: 6c0be73ae7786949898e38119ae43d5d6f78ca9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/python3
import os
import subprocess
import sisyphus.getenv
def root():
return True if os.getuid() == 0 else False
def sanity():
act_brch = sisyphus.getenv.sys_brch()
bh_addr = sisyphus.getenv.bh_addr()
is_sane = int()
if "packages-next" in bh_addr:
if act_brch == "next":
is_sane = int(1)
else:
is_sane = int(0)
else:
if act_brch == "master":
is_sane = int(1)
else:
is_sane = int(0)
return is_sane
|