Skip to content

Commit

Permalink
Build plan
Browse files Browse the repository at this point in the history
  • Loading branch information
alarcher committed Jan 11, 2021
1 parent 6e834f3 commit 29fe436
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions components/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ print-dependents-plan: dependencies.json
@$(WS_TOOLS)/userland-bump --plan --rebuild-dependents --fmri $(FMRI)

print-plan: dependencies.json
echo $(FMRI)
$(WS_TOOLS)/userland-bump --plan --fmri $(FMRI)
@$(WS_TOOLS)/userland-bump --plan --fmri $(FMRI)

print-full-plan: dependencies.json
@$(WS_TOOLS)/userland-bump --plan --fmri '*'
Expand Down
6 changes: 3 additions & 3 deletions make-rules/ips.mk
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ PKG_INSTALL_FMRIS = $(shell awk '{gsub(/\\n/," ")}1' $(MANIFEST_BASE)-*.fmri)


install-packages: publish
@$(PFEXEC) $(PKG_INSTALL) $(PKG_INSTALL_OPTIONS) $(PKG_INSTALL_FMRIS) || [ $$? -eq 4 ] || \
( $(PKGREPO) refresh --no-index -s $(WS_REPO) && \
( $(PFEXEC) $(PKG_INSTALL) $(PKG_INSTALL_OPTIONS) $(PKG_INSTALL_FMRIS) || [ $$? -eq 4 ] ) )
@( /usr/bin/pkgrepo list -H -s $(WS_REPO) $(PKG_INSTALL_FMRIS) > /dev/null || \
$(PKGREPO) refresh --no-index -s $(WS_REPO) ) && \
( $(PFEXEC) $(PKG_INSTALL) $(PKG_INSTALL_OPTIONS) $(PKG_INSTALL_FMRIS) || [ $$? -eq 4 ] )

$(RESOLVED): install

Expand Down
7 changes: 3 additions & 4 deletions tools/userland-bump
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def build_plan(paths, data=None, verbose=False):
putbacks = []
while graph:
order = len(graph)
#print("{0:6}...".format(order))

if putbacks:
for v,e in graph.iteritems():
Expand All @@ -174,7 +173,6 @@ def build_plan(paths, data=None, verbose=False):

stage = []
for v,e in graph.iteritems():
# print(">{0:32} {1}".format(v, e))
if not e:
stage.append(v)
for i in stage:
Expand Down Expand Up @@ -214,7 +212,7 @@ def build_plan(paths, data=None, verbose=False):
break


return plan
return plan, required


def rebuild_dependent_fmris(fmris, db_path=None, workspace=None, subdir='components', verbose=False, dry_run=False):
Expand Down Expand Up @@ -290,11 +288,12 @@ def main():
paths.append(path)
if rebuild_dependents:
paths += locate_dependents(path=path, data=data)
plan = build_plan(paths=paths, data=data, verbose=verbose)
plan, required = build_plan(paths=paths, data=data, verbose=verbose)
for stage in plan:
for p in stage:
print("{0}".format(p))
print("--")
print("Required installation: {0}".format(required))
elif rebuild_dependents:
rebuild_dependent_fmris(fmris=fmris, db_path=db_path, workspace=workspace, subdir=subdir, verbose=verbose, dry_run=dry_run)

Expand Down

0 comments on commit 29fe436

Please sign in to comment.