Skip to content

Commit 29fe436

Browse files
committed
Build plan
1 parent 6e834f3 commit 29fe436

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎components/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ print-dependents-plan: dependencies.json
6767
@$(WS_TOOLS)/userland-bump --plan --rebuild-dependents --fmri $(FMRI)
6868

6969
print-plan: dependencies.json
70-
echo $(FMRI)
71-
$(WS_TOOLS)/userland-bump --plan --fmri $(FMRI)
70+
@$(WS_TOOLS)/userland-bump --plan --fmri $(FMRI)
7271

7372
print-full-plan: dependencies.json
7473
@$(WS_TOOLS)/userland-bump --plan --fmri '*'

‎make-rules/ips.mk‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,9 @@ PKG_INSTALL_FMRIS = $(shell awk '{gsub(/\\n/," ")}1' $(MANIFEST_BASE)-*.fmri)
563563

564564

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

570570
$(RESOLVED): install
571571

‎tools/userland-bump‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ def build_plan(paths, data=None, verbose=False):
160160
putbacks = []
161161
while graph:
162162
order = len(graph)
163-
#print("{0:6}...".format(order))
164163

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

175174
stage = []
176175
for v,e in graph.iteritems():
177-
# print(">{0:32} {1}".format(v, e))
178176
if not e:
179177
stage.append(v)
180178
for i in stage:
@@ -214,7 +212,7 @@ def build_plan(paths, data=None, verbose=False):
214212
break
215213

216214

217-
return plan
215+
return plan, required
218216

219217

220218
def rebuild_dependent_fmris(fmris, db_path=None, workspace=None, subdir='components', verbose=False, dry_run=False):
@@ -290,11 +288,12 @@ def main():
290288
paths.append(path)
291289
if rebuild_dependents:
292290
paths += locate_dependents(path=path, data=data)
293-
plan = build_plan(paths=paths, data=data, verbose=verbose)
291+
plan, required = build_plan(paths=paths, data=data, verbose=verbose)
294292
for stage in plan:
295293
for p in stage:
296294
print("{0}".format(p))
297295
print("--")
296+
print("Required installation: {0}".format(required))
298297
elif rebuild_dependents:
299298
rebuild_dependent_fmris(fmris=fmris, db_path=db_path, workspace=workspace, subdir=subdir, verbose=verbose, dry_run=dry_run)
300299

0 commit comments

Comments
 (0)