Skip to content

Commit 6e834f3

Browse files
committed
ips.mk: fix install packages target
1 parent 851ab6d commit 6e834f3

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

‎make-rules/ips.mk‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -557,16 +557,15 @@ print-package-paths: canonical-manifests
557557
sed -e '/^$$/d' -e '/^#.*$$/d' | \
558558
LANG=C LC_ALL=C sort -u
559559

560+
PKG_INSTALL = /usr/bin/pkg install
561+
PKG_INSTALL_OPTIONS = --no-refresh --no-backup-be --no-index --accept -v -g $(WS_REPO)
562+
PKG_INSTALL_FMRIS = $(shell awk '{gsub(/\\n/," ")}1' $(MANIFEST_BASE)-*.fmri)
563+
564+
560565
install-packages: publish
561-
@if [ $(IS_GLOBAL_ZONE) = 0 -o x$(ROOT) != x ]; then \
562-
cat $(VERSIONED_MANIFESTS) $(WS_TOP)/transforms/print-paths | \
563-
$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 | \
564-
sed -e '/^$$/d' -e '/^#.*$$/d' -e 's;/;;' | \
565-
LANG=C LC_ALL=C sort -u | \
566-
(cd $(PROTO_DIR) ; pfexec /bin/cpio -dump $(ROOT)) ; \
567-
else ; \
568-
echo "unsafe to install package(s) automatically" ; \
569-
fi
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 ] ) )
570569

571570
$(RESOLVED): install
572571

0 commit comments

Comments
 (0)