[buildbot] phase1: simplify feeds host override with SDK cleanup
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 13 00:01:37 PST 2026
ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/4bace77250fc67c776f0cd3aa2d6ce4b5ce021bd
commit 4bace77250fc67c776f0cd3aa2d6ce4b5ce021bd
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Sun Jan 11 07:48:41 2026 +0100
phase1: simplify feeds host override with SDK cleanup
Write to feeds.conf instead of modifying feeds.conf.default in place as
the `feeds update` checks feeds.conf first, so no backup/restore dance
is needed.
Fixes: 057e8adc9d49 ("phase1: add support for overriding feeds host")
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
phase1/master.cfg | 49 ++++++++++++++++---------------------------------
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/phase1/master.cfg b/phase1/master.cfg
index c045120..6f2b406 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -1011,32 +1011,15 @@ def prepareFactory(target):
)
)
- factory.addStep(
- ShellCommand(
- name="feeds-backup",
- description="Backing up feeds.conf.default",
- descriptionDone="feeds.conf.default backed up",
- command=["cp", "-p", "feeds.conf.default", "feeds.conf.default.bak"],
- doStepIf=IsFeedsHostOverrideEnabled,
- haltOnFailure=True,
- )
- )
-
factory.addStep(
ShellCommand(
name="feeds-override",
- description="Overriding feeds host",
- descriptionDone="Feeds host overridden",
- command=[
- "sed",
- "-i",
- "-E",
- Interpolate(
- "s;git.openwrt.org/(feed|project);%(kw:host)s;",
- host=GetFeedsHostOverride,
- ),
- "feeds.conf.default",
- ],
+ description="Creating feeds.conf with host override",
+ descriptionDone="feeds.conf with override created",
+ command=Interpolate(
+ "sed -E 's;git.openwrt.org/(feed|project);%(kw:host)s;' feeds.conf.default > feeds.conf",
+ host=GetFeedsHostOverride,
+ ),
doStepIf=IsFeedsHostOverrideEnabled,
haltOnFailure=True,
)
@@ -1054,24 +1037,24 @@ def prepareFactory(target):
)
)
+ # feed
factory.addStep(
ShellCommand(
- name="feeds-restore",
- description="Restoring feeds.conf.default",
- descriptionDone="feeds.conf.default restored",
- command="test -f feeds.conf.default.bak && mv -f feeds.conf.default.bak feeds.conf.default || true",
- doStepIf=IsFeedsHostOverrideEnabled,
+ name="installfeeds",
+ description="Installing feeds",
+ command=["./scripts/feeds", "install", "-a"],
+ env=MakeEnv(tryccache=True),
haltOnFailure=True,
)
)
- # feed
factory.addStep(
ShellCommand(
- name="installfeeds",
- description="Installing feeds",
- command=["./scripts/feeds", "install", "-a"],
- env=MakeEnv(tryccache=True),
+ name="feeds-cleanup",
+ description="Removing feeds.conf override",
+ descriptionDone="feeds.conf override removed",
+ command=["rm", "-f", "feeds.conf"],
+ doStepIf=IsFeedsHostOverrideEnabled,
haltOnFailure=True,
)
)
More information about the lede-commits
mailing list