import portage from portage import os from portage import shutil from portage import _encodings from portage import _unicode_decode from portage import _unicode_encode from portage import output from portage.const import BASH_BINARY from portage.localization import _ from portage.output import red, green from portage.process import find_binary from portage import exception from portage import util normalize_path = util.normalize_path util.initialize_logger() if sys.hexversion >= 0x3000000: basestring = str def detect_vcs_conflicts(options, vcs): """Determine if the checkout has problems like cvs conflicts. If you want more vcs support here just keep adding if blocks... This could be better. TODO(antarus): Also this should probably not call sys.exit() as repoman is run on >1 packages and one failure should not cause subsequent packages to fail. Args:
from portage import os from portage import shutil from portage import _encodings from portage import _unicode_decode from portage import _unicode_encode from portage import util from portage.localization import _ from portage.process import find_binary from portage.output import green from repoman.copyrights import update_copyright, update_copyright_year normalize_path = util.normalize_path util.initialize_logger() if sys.hexversion >= 0x3000000: basestring = str def have_profile_dir(path, maxdepth=3, filename="profiles.desc"): """ Try to figure out if 'path' has a profiles/ dir in it by checking for the given filename. """ while path != "/" and maxdepth: if os.path.exists(os.path.join(path, "profiles", filename)): return normalize_path(path) path = normalize_path(path + "/..") maxdepth -= 1