|
|
|
"""
|
|
|
|
Contains GentooPortage class
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
from project import Project
|
|
|
|
|
|
|
|
|
|
|
|
class GentooPortage(Project):
|
|
|
|
"""GentooPortage class"""
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def check(data, project):
|
|
|
|
rsync_command = "rsync -q {}{} {}"
|
|
|
|
os.system(rsync_command.format(data[project]["csc"],
|
|
|
|
data[project]["file"],
|
|
|
|
"csc_manifest"))
|
|
|
|
os.system(rsync_command.format(data[project]["upstream1"],
|
|
|
|
data[project]["file"],
|
|
|
|
"upstream_manifest1"))
|
|
|
|
os.system(rsync_command.format(data[project]["upstream2"],
|
|
|
|
data[project]["file"],
|
|
|
|
"upstream_manifest2"))
|
|
|
|
stream1 = os.popen("diff csc_manifest upstream_manifest1")
|
|
|
|
output1 = stream1.read()
|
|
|
|
stream2 = os.popen("diff csc_manifest upstream_manifest2")
|
|
|
|
output2 = stream2.read()
|
|
|
|
os.system("rm csc_manifest")
|
|
|
|
os.system("rm upstream_manifest1")
|
|
|
|
os.system("rm upstream_manifest2")
|
|
|
|
return 0 in [len(output1), len(output2)]
|