Cross Reference: build_status
xref
: /
solaris-desktop
/
scripts
/
build_status
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
16742
N/A
#!/
usr
/
bin
/
python2.4
16742
N/A
16742
N/A
import
subprocess
16742
N/A
16742
N/A
SPECTOOL
=
"/
jds
/
cbe
/
bin
/
spectool
"
16742
N/A
16742
N/A
def
cmd
(
execute
,
get_ret
=
True
,
get_err
=
True
)
:
16742
N/A
cmd_p
=
subprocess.Popen
(
execute
,
16742
N/A
shell
=
True
,
stdout
=
subprocess.PIPE
,
stderr
=
subprocess.PIPE
)
16742
N/A
16742
N/A
if
get_err
:
16742
N/A
cmd_err
=
cmd_p.stderr.read
()
16742
N/A
else
:
16742
N/A
cmd_err
=
""
16742
N/A
16742
N/A
cmd_out
=
cmd_p.stdout.read
()
16742
N/A
outp
=
cmd_out
16742
N/A
cmd_out
=
""
16742
N/A
for
o
in
outp.split
(
"\n"
)
:
16742
N/A
if
o !=
""
and
o !=
"\n"
:
16742
N/A
cmd_out
=
cmd_out
+ o +
"\n"
16742
N/A
16742
N/A
if
get_ret
:
16742
N/A
return_code
=
cmd_p.wait
()
16742
N/A
else
:
16742
N/A
return_code
=
0
16742
N/A
16742
N/A
return
return_code
,
cmd_out
,
cmd_err
16742
N/A
16742
N/A
16742
N/A
(
ret
,
out
,
err
)
=
cmd
(
"ls closed/*.spec *.spec"
)
16742
N/A
16742
N/A
uninstalled
=
0
16742
N/A
installed
=
0
16742
N/A
16742
N/A
for
spec
in
out.rstrip
(
"\n"
)
.
split
(
"\n"
)
:
16742
N/A
(
ret
,
out
,
err
)
=
cmd
(
"%s get_package_names %s"
%
(
SPECTOOL
,
spec
)
)
16742
N/A
packages
=
out.rstrip
(
"\n"
)
.
split
(
"\n"
)
16742
N/A
(
ret
,
out
,
err
)
=
cmd
(
"pkginfo -q %s"
%
packages
[
0
])
16742
N/A
if
ret
!=
0
:
16742
N/A
uninstalled
+=
1
16742
N/A
else
:
16742
N/A
installed
+=
1
16742
N/A
16742
N/A
print
"Installed %s"
%
installed
16742
N/A
print
"Uninstalled %s"
%
uninstalled