Skip to content

Commit

Permalink
No longer use existing installs by default and change commands accord…
Browse files Browse the repository at this point in the history
…ingly

Changes ignore-existing flag to use-existing and inverts default behavior.
Also adds this to docs.

Refs #5336

Change-Id: I1f3f68160673321e92307c9aacc7ff361b1d1a48
  • Loading branch information
awlane committed Nov 13, 2024
1 parent 2672471 commit eda7e07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Some notable flags are:
- ``--ppa`` prefers installing NDN software from `named-data PPA <https://launchpad.net/~named-data/+archive/ubuntu/ppa>`_.
This shortens installation time by downloading binary packages, but is only available on Ubuntu.
- ``--source`` prefers installing NDN software from source code.
- ``--use-existing`` will only install dependencies not already in the executable path.

IMPORTANT: For now, Mininet-WiFi only works with ``--source`` installation because the current NFD release (0.7.1) doesn't
incorporate `issue 5155 <https://redmine.named-data.net/issues/5155>`, a required patch for WiFi module to work properly.
Expand Down
12 changes: 7 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fi
PREFER_FROM=ppa
PPA_PKGS=()

ARGS=$(getopt -o 'hy' -l 'help,dir:,jobs:,no-wifi,ppa,source,release:,cxx:,dummy-keychain,nfd:,psync:,nlsr:,tools:,traffic:,infoedit:,mininet:,mnwifi:,dl-only,ignore-existing' -- "$@")
ARGS=$(getopt -o 'hy' -l 'help,dir:,jobs:,no-wifi,ppa,source,release:,cxx:,dummy-keychain,nfd:,psync:,nlsr:,tools:,traffic:,infoedit:,mininet:,mnwifi:,dl-only,use-existing' -- "$@")
eval set -- "$ARGS"
while true; do
case $1 in
Expand All @@ -95,7 +95,7 @@ while true; do
--mininet) MININET_VERSION=$2; shift 2;;
--mnwifi) MNWIFI_VERSION=$2; shift 2;;
--dl-only) DL_ONLY=1; shift;;
--ignore-existing) IGNORE_EXISTING=1; shift;;
--use-existing) USE_EXISTING=1; shift;;
--) shift; break;;
*) exit 1;;
esac
Expand Down Expand Up @@ -166,9 +166,11 @@ Misc options:
--dl-only
Download the source code only.
You may modify the code in ${CODEROOT} and then rerun this script to install them.
--ignore-existing
Ignore already installed binaries and libraries, and attempt to reinstall.
This is useful if you have modified source code checkout and want to install again.
--use-existing
Use already installed dependency binaries and libraries, rather than attempting to
reinstall. This is useful if you have modified source code checkout for some
repositories but still want to install any remaining dependencies or are
reinstalling Mini-NDN.
EOT
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion util/pkgdep/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ DEP_WAFOPTS=(

# return whether dep is installed
dep_exists() {
if [[ $IGNORE_EXISTING -eq 1 ]]; then
if [[ $USE_EXISTING -eq 0 ]]; then
return 2
fi
local DETECT="${DEP_DETECT[$1]}"
Expand Down

0 comments on commit eda7e07

Please sign in to comment.