""" Contains GentooPortage class """ import os from distro import Distro class GentooPortage(Distro): """GentooPortage class""" @staticmethod def check(data, distro): rsync_command = "rsync -q {}{} {}" os.system(rsync_command.format(data[distro]["csc"], data[distro]["file"], "csc_manifest")) os.system(rsync_command.format(data[distro]["upstream1"], data[distro]["file"], "upstream_manifest1")) os.system(rsync_command.format(data[distro]["upstream2"], data[distro]["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)]