if ini.has_option("repo", "branch"):
repo_branch = ini.get("repo", "branch")
+if feeds_host_override:
+ repo_url = re.sub(r"git\.openwrt\.org/openwrt", feeds_host_override, repo_url)
+
usign_key = None
usign_comment = "untrusted comment: " + repo_branch.replace("-", " ").title() + " key"
if not os.path.isdir(work_dir+'/source.git'):
subprocess.call(["git", "clone", "--depth=1", "--branch="+repo_branch, repo_url, work_dir+'/source.git'])
else:
+ subprocess.call(["git", "remote", "set-url", "origin", repo_url], cwd = work_dir+'/source.git')
subprocess.call(["git", "pull"], cwd = work_dir+'/source.git')
os.makedirs(work_dir+'/source.git/tmp', exist_ok=True)
IsUsignEnabled(step) or IsApkSigningEnabled(step) or IsGpgSigningEnabled(step)
)
+def IsFeedsHostOverrideEnabled(step):
+ return bool(feeds_host_override)
+
+@util.renderer
+def GetFeedsHostOverride(props):
+ return feeds_host_override
+
@defer.inlineCallbacks
def getNewestCompleteTime(bldr):
"""Returns the complete_at of the latest completed and not SKIPPED
command = ["./ccache.sh"],
haltOnFailure = True))
+ factory.addStep(ShellCommand(
+ name = "feeds-override",
+ description = "Creating feeds.conf with host override",
+ descriptionDone = "feeds.conf with override created",
+ workdir = "build/sdk",
+ command = Interpolate(
+ "sed -E 's;git.openwrt.org/(feed|project);%(kw:host)s;' feeds.conf.default > feeds.conf",
+ host=GetFeedsHostOverride,
+ ),
+ doStepIf = IsFeedsHostOverrideEnabled,
+ haltOnFailure = True))
+
factory.addStep(ShellCommand(
name = "updatefeeds",
description = "Updating feeds",
command = ["./scripts/feeds", "install", "-a"],
haltOnFailure = True))
+ factory.addStep(ShellCommand(
+ name = "feeds-cleanup",
+ description = "Removing feeds.conf override",
+ descriptionDone = "feeds.conf override removed",
+ workdir = "build/sdk",
+ command = ["rm", "-f", "feeds.conf"],
+ doStepIf = IsFeedsHostOverrideEnabled,
+ haltOnFailure = True))
+
factory.addStep(ShellCommand(
name = "logclear",
description = "Clearing failure logs",