forked from Mirror/pmbootstrap
* Write custom os-release (closes #324) * Return empty string instead of crashing when the directory is not a git repository * Use https in homepage URL
This commit is contained in:
parent
ad17254e86
commit
3954883547
3 changed files with 55 additions and 0 deletions
|
@ -33,3 +33,14 @@ def clone(args, repo_name):
|
|||
logging.info("(native) git clone " + pmb.config.git_repos[repo_name])
|
||||
pmb.chroot.user(args, ["git", "clone", "--depth=1",
|
||||
pmb.config.git_repos[repo_name], repo_name], working_dir="/home/user/git/")
|
||||
|
||||
|
||||
def rev_parse(args, revision="HEAD"):
|
||||
rev = pmb.helpers.run.user(args, ["git", "rev-parse", revision],
|
||||
working_dir=args.aports,
|
||||
return_stdout=True,
|
||||
check=False)
|
||||
if rev is None:
|
||||
logging.warning("WARNING: Failed to determine revision of git repository at " + args.aports)
|
||||
return ""
|
||||
return rev.rstrip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue