code
stringlengths
3
6.57k
override_properties.iteritems()
extract_organization(self, source)
if (not "git" in source)
or ("http" in source)
W(\w+)
re.search(pattern, source)
match.group(1)
Exception("Cannot determine organization for %s" % source)
try_get_version(self, source_dir)
os.path.join(source_dir, 'configure.ac')
os.path.exists(configure_ac)
open(configure_ac)
range(40)
file.readline()
re.search(pattern, line)
match.group(1)
trace(self, message)
trace(message, skip=1)
resolve_version(self, source_dir)
expand_macros(self.version, self)
self.try_get_version(source_dir)
trace('%s: Using found version %s' % (self.name, found_version)
fetch(self, dest)
os.path.lexists(dest)
os.path.join(scratch, '%s.workspace' % self.name)
self.rm_if_exists(scratch_workspace)
os.path.lexists(dest)
os.path.islink(dest)
delete(dest)
os.path.isdir(dest)
shutil.move(dest, scratch_workspace)
error ('Unexpected workspace found at %s' % dest)
checkout(self, source_url, cache_dir, workspace_dir)
clean_git_workspace(dir)
trace('Cleaning git workspace: ' + self.name)
self.git('reset --hard', dir, hazard = True)
self.git('clean -xffd', dir, hazard = True)
warn('iterative')
clean_local_git_workspace(dir)
self.git('clean -xffd', dir)
create_cache()
os.path.exists(workspace_dir)
self.rm(workspace_dir)
progress('Cloning git repo: %s' % source_url)
update_cache()
trace('Updating cache: ' + cache_dir)
self.git('fetch --all --prune', cache_dir)
self.git('fetch origin %s' % self.git_branch, cache_dir)
create_workspace()
update_workspace()
trace('Updating workspace')
self.git('fetch --all --prune', workspace_dir)
resolve()
git_rootdir(self, os.path.realpath (workspace_dir)
is_modifiable_repo(root)
git_get_revision(self, workspace_dir)
self.git('checkout %s' % self.git_branch, workspace_dir)
git_get_revision(self, workspace_dir)
and (current_revision != target_revision)
self.git('submodule update --recursive', workspace_dir)
git_get_revision(self, workspace_dir)
if (self.revision is not None and self.revision != current_revision)
define()
self.resolve_version(workspace_dir)
git_shortid(self, workspace_dir)
self.rm_if_exists(workspace_dir)
git_is_dirty (self, source_url)
error ('Release builds cannot have uncommitted local changes!')
info ('The repository is dirty, your changes will be committed.')
WIP (auto-committed by bockbuild)
git_get_commit_msg (self, source_url)
self.git ('commit -a --allow-empty --amend -m', source_url, options = [bockbuild_commit_msg])
self.git('commit -a --allow-empty -m', source_url, options = [bockbuild_commit_msg])
self.shadow_copy (source_url, workspace_dir)
self.git ('reset HEAD~1', source_url)
os.path.exists(cache_dir)
update_cache()
create_cache()
os.path.exists(workspace_dir)
clean_git_workspace(workspace_dir)
update_workspace()
create_workspace()
resolve()
define()
checkout_archive(archive, cache_dest, workspace_dir)
create_cache()
progress('Downloading: %s' % archive)
MyUrlOpener()
retrieve(archive, cache_dest)
update_cache()
create_workspace(dir)
get_filetype(cache_dest)
lower()
filetype.startswith(('gzip', 'xz', 'zip', 'bzip2')
self.extract_archive(cache_dest, scratch, validate_only=False)
os.path.join(scratch, self.source_dir_name)
os.path.exists(expected_path)
shutil.move(expected_path, dir)
ensure_dir(scratch_workspace)
shutil.copy(cache_dest, scratch_workspace)