Print this page
Change entire requirement to optional.

Split Close
Expand all
Collapse all
          --- old/lib/functions.sh
          +++ new/lib/functions.sh
↓ open down ↓ 648 lines elided ↑ open up ↑
 649  649      fi
 650  650      if [[ -f $SRCDIR/local.mog ]]; then
 651  651          LOCAL_MOG_FILE=$SRCDIR/local.mog
 652  652      fi
 653  653      logmsg "--- Applying transforms"
 654  654      $PKGMOGRIFY $P5M_INT $MY_MOG_FILE $GLOBAL_MOG_FILE $LOCAL_MOG_FILE $* > $P5M_INT.stage1
 655  655      if [[ -z "$NO_AUTO_DEPENDS" ]]; then
 656  656          $PKGDEPEND generate -d $DESTDIR $P5M_INT.stage1 > $P5M_INT.dep
 657  657          $PKGDEPEND resolve $P5M_INT.dep
 658  658          cat $P5M_INT.dep.res >> $P5M_INT.stage1
 659      -        # Use a "require" dependency on the 'entire' metapackage so that
      659 +        # Use an "optional" dependency on the 'entire' metapackage so that
 660  660          # we don't let a later version for an unsupported early OmniOS install.
 661  661          # For example:
 662  662          #     foo@1.9-0.151006   exists.
 663  663          # We update it to:
 664  664          #     foo@1.10-0.151014
 665      -        # and in both cases make it *require* entire@11-0.151XXX as appropriate.
      665 +        # and in both cases make it *lock* to entire@11-0.151XXX as appropriate.
 666  666          # So foo@1.10 won't install on any OmniOS older than r151014.
 667  667          # This used to be *incorporate* but that put both a floor AND a ceiling
 668  668          # on the revision of OmniOS, and having just a floor is sufficient
 669  669          # thanks to illumos's versioned libraries and backward compatibility.
 670      -        echo "depend fmri=pkg:/entire@11-$PVER type=require" >> $P5M_INT.stage1
      670 +        # If a user uninstalls "entire", they go beyond the realm of support.
      671 +        # Some users can do this safely (developers who use onu(1ONBLD), e.g.).
      672 +        echo "depend fmri=pkg:/entire@11-$PVER type=optional" >> $P5M_INT.stage1
 671  673      fi
 672  674      $PKGFMT -u < $P5M_INT.stage1 > $P5M_FINAL
 673  675      logmsg "--- Publishing package to $PKGSRVR"
 674  676      if [[ -z "$BATCH" ]]; then
 675  677          ask_to_continue "Last chance to sanity-check before publication! "
 676  678      fi
 677  679      if [[ -n "$DESTDIR" ]]; then
 678  680          logcmd $PKGSEND -s $PKGSRVR publish -d $DESTDIR -d $TMPDIR/$BUILDDIR \
 679  681              -d $SRCDIR -T \*.py $P5M_FINAL || \
 680  682              logerr "------ Failed to publish package"
↓ open down ↓ 469 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX