Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix xbstrap prereqs xbps #76

Merged
merged 3 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.11'
- name: Install the test requirements
run: "pip install '.[test]'"
- uses: psf/black@stable
Expand Down
2 changes: 1 addition & 1 deletion xbstrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def do_prereqs(args):
tar.extract(info, bin_dir)
os.chmod(os.path.join(bin_dir, "cbuildrt"), 0o755)
if "xbps" in comps:
url = "https://alpha.de.repo.voidlinux.org/static"
url = "https://repo-default.voidlinux.org/static"
url += "/xbps-static-static-0.59_5.x86_64-musl.tar.xz"
tar_path = os.path.join(home, "xbps.tar.xz")

Expand Down
14 changes: 7 additions & 7 deletions xbstrap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2836,7 +2836,7 @@ def add_source_dependencies(s):
item.require_edges.add((action.PATCH_SRC, dep_source))

def add_tool_dependencies(s):
for (tool_name, stage_name) in s.tool_stage_dependencies:
for tool_name, stage_name in s.tool_stage_dependencies:
dep_tool = self._cfg.get_tool_pkg(tool_name)
if self.build_scope is not None and dep_tool not in self.build_scope:
item.require_edges.add((action.WANT_TOOL, dep_tool))
Expand Down Expand Up @@ -3073,14 +3073,14 @@ def activate(root_action, root_subject):
visit(item.require_edges)

# Activate wanted items.
for (action, subject) in self.wanted:
for action, subject in self.wanted:
item = self._items[(action, subject)]
item.build_span = True
if not self.check or item.is_missing:
activate(action, subject)

# Discover all items reachable by build edges.
for (action, subject) in reversed(self._order):
for action, subject in reversed(self._order):
item = self._items[(action, subject)]
if not item.build_span:
continue
Expand All @@ -3098,7 +3098,7 @@ def is_outdated(item, dep_item):
return False
return dep_ts > ts

for (action, subject) in self._order:
for action, subject in self._order:
item = self._items[(action, subject)]
# Unless we're doing a recursive update, we only follow check items
# that are reachable by build edges.
Expand Down Expand Up @@ -3160,7 +3160,7 @@ def run_plan(self):
_util.log_info("Running the following plan:")
else:
_util.log_info("Nothing to do")
for (action, subject) in scheduled:
for action, subject in scheduled:
if isinstance(subject, HostStage):
if subject.stage_name:
eprint(
Expand Down Expand Up @@ -3199,7 +3199,7 @@ def run_plan(self):
return

any_failed_items = False
for (n, (action, subject)) in enumerate(scheduled):
for n, (action, subject) in enumerate(scheduled):
item = self._items[(action, subject)]

# Check if any prerequisites failed; this can generally only happen with --keep-going.
Expand Down Expand Up @@ -3329,7 +3329,7 @@ def emit_progress(status):

if any_failed_items:
_util.log_info("The following steps failed:")
for (action, subject) in scheduled:
for action, subject in scheduled:
item = self._items[(action, subject)]
assert item.exec_status != ExecutionStatus.NULL
if item.exec_status == ExecutionStatus.SUCCESS:
Expand Down
4 changes: 2 additions & 2 deletions xbstrap/pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def do_compute_graph(args):
"architecture": af.architecture,
}
)
for (action, subject) in plan.materialized_steps():
for action, subject in plan.materialized_steps():
if action == xbstrap.base.Action.WANT_TOOL:
if subject in job.tools:
continue
Expand Down Expand Up @@ -237,7 +237,7 @@ def do_compute_graph(args):
plan.wanted.update([(xbstrap.base.Action.RUN, task)])
plan.compute_plan(no_ordering=True)

for (action, subject) in plan.materialized_steps():
for action, subject in plan.materialized_steps():
if action == xbstrap.base.Action.WANT_TOOL:
if subject in item.job.tools:
continue
Expand Down
1 change: 0 additions & 1 deletion xbstrap/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def build_environ_paths(environ, varname, prepend):


def interactive_download(url, path):

istty = os.isatty(1) # This is stdout.
if istty:
eprint("...", end="") # This will become the status line.
Expand Down
Loading