Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(tue-env) fix switching #729

Merged
merged 7 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ This will rename the old targets folder with a timestamp and clone the new targe

#### Custom repository list

Various utility commands use `_tue-repos-do` to execute a command in all repositories. By default, this command will execute the command in all repositories in the `tue-env` workspace. This can be changed by setting the `TUE_REPOS_DO_DIRS` environment variable to a list of repositories folders. This can be done by adding the setting it with:
Various utility commands use `_tue-repos-do` to execute a command in all repositories. By default, this command will execute the command in all repositories in the `tue-env` workspace. This can be changed by setting the `TUE_ENV_REPOS_DO_DIRS` environment variable to a list of repositories folders. This can be done by adding the setting it with:

```bash
tue-env config [environment] set TUE_REPOS_DO_DIRS PATH1:PATH2:PATH3
tue-env config [environment] set TUE_ENV_REPOS_DO_DIRS PATH1:PATH2:PATH3
# Also possible to use variables in the paths, the variable needs to be single quoted
tue-env config [environment] set TUE_REPOS_DO_DIRS '${TUE_REPOS_DIR}'/some/path:'${HOME}'some/other/path
tue-env config [environment] set TUE_ENV_REPOS_DO_DIRS '${TUE_ENV_REPOS_DIR}'/some/path:'${HOME}'some/other/path
```

#### Add an SSH key to GitHub to gain access to this repository
Expand Down Expand Up @@ -349,6 +349,7 @@ Add an APT source including the key which it is signed with.
The use of the following variables is prohibited in `install.bash`:

- `TUE_APT_GET_UPDATED_FILE`
- `TUE_ENV*`
- `TUE_INSTALL_*`
- `install_file`
- `now`
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.26.0
1.27.0
12 changes: 6 additions & 6 deletions ci/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,29 @@ then
ADDITIONAL_ARGS_CATKIN+=("--verbose")
fi
echo -e "\e[35;1mCompile the package (catkin build ${ADDITIONAL_ARGS_CATKIN[*]} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=OFF)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}"/src/"${PACKAGE}" && /usr/bin/python3 "$(command -v catkin)" build --this --no-status '"${ADDITIONAL_ARGS_CATKIN[*]}"' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=OFF'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}"/src/"${PACKAGE}" && /usr/bin/python3 "$(command -v catkin)" build --this --no-status '"${ADDITIONAL_ARGS_CATKIN[*]}"' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=OFF'
else
ADDITIONAL_ARGS_COLCON=()
if [[ ${DEBUG} == "true" ]]
then
ADDITIONAL_ARGS_COLCON+=("--log-level" "debug")
fi
echo -e "\e[35;1mCheck for default mixin repo (colcon ${ADDITIONAL_ARGS_COLCON[*]} mixin list)\e[0m"
MIXIN_REPOS=$(docker exec tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' mixin list | grep -v "^- "' | tr -d '\r' | awk -F ": " '{print $1}')
MIXIN_REPOS=$(docker exec tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' mixin list | grep -v "^- "' | tr -d '\r' | awk -F ": " '{print $1}')
if ! echo -e "${MIXIN_REPOS}" | grep "^default$" -q
then
echo -e "\e[35;1mAdd the default mixin repo (colcon ${ADDITIONAL_ARGS_COLCON[*]} mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml'
else
echo -e "\e[35;1mDefault mixin repo already exists\e[0m"
fi

echo -e "\e[35;1mUpdate colcon mixins (colcon ${ADDITIONAL_ARGS_COLCON[*]} mixin update)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' mixin update'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' mixin update'

echo -e "\e[35;1mDeleting the merged install directory\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && rm -rf install'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && rm -rf install'

echo -e "\e[35;1mCompile the package (colcon ${ADDITIONAL_ARGS_COLCON[*]} build --mixin rel-with-deb-info build-testing-off)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' build --packages-up-to "${PACKAGE}" --mixin rel-with-deb-info build-testing-off --event-handlers desktop_notification- status- terminal_title-'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && colcon '"${ADDITIONAL_ARGS_COLCON[*]}"' build --packages-up-to "${PACKAGE}" --mixin rel-with-deb-info build-testing-off --event-handlers desktop_notification- status- terminal_title-'
fi
14 changes: 7 additions & 7 deletions ci/install-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fi
ROS_DISTRO=$(docker exec tue-env bash -c 'source ~/.bashrc; echo "${ROS_DISTRO}"' | tr -d '\r')
echo -e "\e[35;1mROS_DISTRO = ${ROS_DISTRO}\e[0m"

TUE_SYSTEM_DIR=$(docker exec tue-env bash -c 'source ~/.bashrc; echo "${TUE_SYSTEM_DIR}"' | tr -d '\r')
TUE_ENV_WS_DIR=$(docker exec tue-env bash -c 'source ~/.bashrc; echo "${TUE_ENV_WS_DIR}"' | tr -d '\r')

# First install only the git repo of the package so that appropriate branch can be checked out later
echo -e "\e[35;1mtue-get install ros-${PACKAGE} --no-ros-deps ${ADDITIONAL_ARGS_TUE_GET[*]}\e[0m"
Expand All @@ -265,17 +265,17 @@ then
# After a tue-get run, we checkout forced, just to be sure.

# Fetch the merged branch
echo -e "\e[35;1mgit -C ~${TUE_SYSTEM_DIR#"${DOCKER_HOME}"}/src/${PACKAGE} fetch origin ${REF_NAME}/${PULL_REQUEST}/merge:PULLREQUEST\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; git -C "$TUE_SYSTEM_DIR"/src/"$PACKAGE" fetch origin "$REF_NAME"/"$PULL_REQUEST"/merge:PULLREQUEST'
echo -e "\e[35;1mgit -C ~${TUE_ENV_WS_DIR#"${DOCKER_HOME}"}/src/${PACKAGE} fetch origin ${REF_NAME}/${PULL_REQUEST}/merge:PULLREQUEST\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; git -C "${TUE_ENV_WS_DIR}"/src/"${PACKAGE}" fetch origin "${REF_NAME}"/"${PULL_REQUEST}"/merge:PULLREQUEST'

# Install the package completely
branch_string=${BRANCH:+" --try-branch=${BRANCH}"}
echo -e "\e[35;1mtue-get install ros-${PACKAGE} --test-depend${branch_string} --try-branch=PULLREQUEST ${ADDITIONAL_ARGS_TUE_GET[*]}\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; tue-get install ros-"${PACKAGE}" --test-depend --try-branch="${BRANCH}" --try-branch=PULLREQUEST '"${ADDITIONAL_ARGS_TUE_GET[*]}"

# Checkout -f to be really sure
echo -e "\e[35;1mgit -C ~${TUE_SYSTEM_DIR#"${DOCKER_HOME}"}/src/${PACKAGE} checkout -f PULLREQUEST --\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; git -C "$TUE_SYSTEM_DIR"/src/"$PACKAGE" checkout -f PULLREQUEST --'
echo -e "\e[35;1mgit -C ~${TUE_ENV_WS_DIR#"${DOCKER_HOME}"}/src/${PACKAGE} checkout -f PULLREQUEST --\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; git -C "${TUE_ENV_WS_DIR}"/src/"${PACKAGE}" checkout -f PULLREQUEST --'
else
# Install the package
branch_string=${BRANCH:+" --try-branch=${BRANCH}"}
Expand All @@ -284,8 +284,8 @@ else

# Set the package to the right commit
echo -e "\e[35;1mReset package to this commit\e[0m"
echo -e "\e[35;1mgit -C ~${TUE_SYSTEM_DIR#"${DOCKER_HOME}"}/src/${PACKAGE} reset --hard ${COMMIT}\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; git -C "${TUE_SYSTEM_DIR}"/src/"${PACKAGE}" reset --hard "${COMMIT}"'
echo -e "\e[35;1mgit -C ~${TUE_ENV_WS_DIR#"${DOCKER_HOME}"}/src/${PACKAGE} reset --hard ${COMMIT}\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; git -C "${TUE_ENV_WS_DIR}"/src/"${PACKAGE}" reset --hard "${COMMIT}"'
fi

# Allow everyone to read ~/.cache/pip folder for caching inside CI pipelines
Expand Down
10 changes: 5 additions & 5 deletions ci/test-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ then
fi
# Build test targets
echo -e "\e[35;1mBuild test targets of this package (catkin build --this --no-deps ${CATKIN_ADDITIONAL_ARGS[*]} -DCATKIN_ENABLE_TESTING=ON)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}"/src/"${PACKAGE}" && /usr/bin/python3 "$(command -v catkin)" build --this --no-status --no-deps '"${CATKIN_ADDITIONAL_ARGS[*]}"' -DCATKIN_ENABLE_TESTING=ON'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}"/src/"${PACKAGE}" && /usr/bin/python3 "$(command -v catkin)" build --this --no-status --no-deps '"${CATKIN_ADDITIONAL_ARGS[*]}"' -DCATKIN_ENABLE_TESTING=ON'

# Run unit tests
echo -e "\e[35;1mRun tests on this package (catkin test --this --no-deps ${CATKIN_ADDITIONAL_ARGS[*]} -DCATKIN_ENABLE_TESTING=ON)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}"/src/"${PACKAGE}" && /usr/bin/python3 "$(command -v catkin)" test --this --no-status --no-deps '"${CATKIN_ADDITIONAL_ARGS[*]}"' -DCATKIN_ENABLE_TESTING=ON'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}"/src/"${PACKAGE}" && /usr/bin/python3 "$(command -v catkin)" test --this --no-status --no-deps '"${CATKIN_ADDITIONAL_ARGS[*]}"' -DCATKIN_ENABLE_TESTING=ON'
else
COLCON_ADDITIONAL_ARGS=()
if [[ ${DEBUG} == "true" ]]
Expand All @@ -72,13 +72,13 @@ else
fi
# Build test targets
echo -e "\e[35;1mBuild test targets of this package (colcon ${COLCON_ADDITIONAL_ARGS[*]} build --packages-select ${PACKAGE} --mixin rel-with-deb-info build-testing-on)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && colcon '"${COLCON_ADDITIONAL_ARGS[*]}"' build --packages-select "${PACKAGE}" --mixin rel-with-deb-info build-testing-on --event-handlers desktop_notification- status- terminal_title-'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && colcon '"${COLCON_ADDITIONAL_ARGS[*]}"' build --packages-select "${PACKAGE}" --mixin rel-with-deb-info build-testing-on --event-handlers desktop_notification- status- terminal_title-'

# Run unit tests
echo -e "\e[35;1mRun tests on this package (colcon ${COLCON_ADDITIONAL_ARGS[*]} test --packages-select ${PACKAGE} --executor sequential)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && colcon '"${COLCON_ADDITIONAL_ARGS[*]}"' test --packages-select "${PACKAGE}" --executor sequential --event-handlers desktop_notification- status- terminal_title- console_cohesion+'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && colcon '"${COLCON_ADDITIONAL_ARGS[*]}"' test --packages-select "${PACKAGE}" --executor sequential --event-handlers desktop_notification- status- terminal_title- console_cohesion+'

# Check test results
echo -e "\e[35;1mCheck test results (colcon ${COLCON_ADDITIONAL_ARGS[*]} test-result --verbose)\e[0m"
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_SYSTEM_DIR}" && colcon '"${COLCON_ADDITIONAL_ARGS[*]}"' test-result --verbose'
docker exec -t tue-env bash -c 'source ~/.bashrc; cd "${TUE_ENV_WS_DIR}" && colcon '"${COLCON_ADDITIONAL_ARGS[*]}"' test-result --verbose'
fi
56 changes: 30 additions & 26 deletions installer/bootstrap.bash
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function main
fi

# Initialize variables
local create_venv targets_repo tue_ros_distro tue_ros_version venv_include_system_site
local create_venv targets_repo tue_env_ros_distro tue_env_ros_version venv_include_system_site

# Default values
create_venv="true"
Expand Down Expand Up @@ -113,36 +113,36 @@ function main
"20.04")
if [[ "${ros_version}" -eq 2 ]]
then
tue_ros_version=2
tue_env_ros_version=2
if [[ "${ros_distro}" == "foxy" ]]
then
tue_ros_distro="foxy"
tue_env_ros_distro="foxy"
elif [[ "${ros_distro}" == "galactic" ]]
then
tue_ros_distro="galactic"
tue_env_ros_distro="galactic"
elif [[ "${ros_distro}" == "rolling" ]]
then
tue_ros_distro="rolling"
tue_env_ros_distro="rolling"
elif [[ -n "${ros_distro}" ]]
then
echo "[tue-env](bootstrap) Error! ROS ${ros_distro} is unsupported with tue-env."
return 1
else
tue_ros_distro="galactic"
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_ros_distro}' with ROS_VERSION '${tue_ros_version}'"
tue_env_ros_distro="galactic"
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_env_ros_distro}' with ROS_VERSION '${tue_env_ros_version}'"
fi
elif [[ "${ros_version}" -eq 1 ]]
then
tue_ros_distro="noetic"
tue_ros_version=1
tue_env_ros_distro="noetic"
tue_env_ros_version=1
elif [[ -n "${ros_version}" ]]
then
echo "[tue-env](bootstrap) Error! ROS ${ros_version} is unsupported with tue-env."
return 1
else
tue_ros_distro="noetic"
tue_ros_version=1
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_ros_distro}' with ROS_VERSION '${tue_ros_version}'"
tue_env_ros_distro="noetic"
tue_env_ros_version=1
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_env_ros_distro}' with ROS_VERSION '${tue_env_ros_version}'"
fi
;;
"22.04")
Expand All @@ -151,21 +151,21 @@ function main
echo "[tue-env](bootstrap) Error! Only ROS version 2 is supported with ubuntu 22.04 and newer"
return 1
fi
tue_ros_version=2
tue_env_ros_version=2

if [[ "${ros_distro}" == "humble" ]]
then
tue_ros_distro="humble"
tue_env_ros_distro="humble"
elif [[ "${ros_distro}" == "rolling" ]]
then
tue_ros_distro="rolling"
tue_env_ros_distro="rolling"
elif [[ -n "${ros_distro}" ]]
then
echo "[tue-env](bootstrap) Error! ROS ${ros_distro} is unsupported with tue-env."
return 1
else
tue_ros_distro="humble"
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_ros_distro}' with ROS_VERSION '${tue_ros_version}'"
tue_env_ros_distro="humble"
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_env_ros_distro}' with ROS_VERSION '${tue_env_ros_version}'"
fi
;;
"24.04")
Expand All @@ -174,21 +174,21 @@ function main
echo "[tue-env](bootstrap) Error! Only ROS version 2 is supported with ubuntu 22.04 and newer"
return 1
fi
tue_ros_version=2
tue_env_ros_version=2

if [[ "${ros_distro}" == "jazzy" ]]
then
tue_ros_distro="jazzy"
tue_env_ros_distro="jazzy"
elif [[ "${ros_distro}" == "rolling" ]]
then
tue_ros_distro="rolling"
tue_env_ros_distro="rolling"
elif [[ -n "${ros_distro}" ]]
then
echo "[tue-env](bootstrap) Error! ROS ${ros_distro} is unsupported with tue-env."
return 1
else
tue_ros_distro="jazzy"
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_ros_distro}' with ROS_VERSION '${tue_ros_version}'"
tue_env_ros_distro="jazzy"
echo "[tue-env](bootstrap) Using default ROS_DISTRO '${tue_env_ros_distro}' with ROS_VERSION '${tue_env_ros_version}'"
fi
;;
*)
Expand All @@ -203,8 +203,8 @@ function main
{ [[ -n "${targets_repo}" ]] && env_targets_url="${targets_repo}"; } || env_targets_url="https://github.com/tue-robotics/tue-env-targets.git"
[[ -n "${create_virtualenv}" ]] || create_virtualenv="true"
env_dir="${HOME}/.tue"
workspace="ros-${tue_ros_distro}"
workspace_dir="${HOME}/ros/${tue_ros_distro}"
workspace="ros-${tue_env_ros_distro}"
workspace_dir="${HOME}/ros/${tue_env_ros_distro}"

# Move old environments and installer
if [[ -d "${env_dir}" ]] && [[ -z "${CI}" ]]
Expand Down Expand Up @@ -269,8 +269,12 @@ function main
"--targets-url=${env_targets_url}"

# Configure environment
tue-env config "${workspace}" set "TUE_ROS_DISTRO" "${tue_ros_distro}"
tue-env config "${workspace}" set "TUE_ROS_VERSION" "${tue_ros_version}"
# TODO(anyone): Remove the use of TUE_XXX, when migration to TUE_ENV_XXX is complete
tue-env config "${workspace}" set "TUE_ROS_DISTRO" "${tue_env_ros_distro}"
tue-env config "${workspace}" set "TUE_ROS_VERSION" "${tue_env_ros_version}"

tue-env config "${workspace}" set "TUE_ENV_ROS_DISTRO" "${tue_env_ros_distro}"
tue-env config "${workspace}" set "TUE_ENV_ROS_VERSION" "${tue_env_ros_version}"

# Add loading of TU/e tools (tue-env, tue-get, etc) to bashrc
# shellcheck disable=SC2088
Expand Down
4 changes: 2 additions & 2 deletions installer/generate_deb_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


TUE_ENV_TARGETS_DIR = os.environ["TUE_ENV_TARGETS_DIR"]
TUE_ROS_DISTRO = os.environ["TUE_ROS_DISTRO"]
TUE_ENV_ROS_DISTRO = os.environ["TUE_ENV_ROS_DISTRO"]
ARCHITECTURES = {"x86_64": "amd64", "aarch64": "arm64"}
CONTROL_FILE_TEMPLATE = """
Package: {package}
Expand Down Expand Up @@ -55,7 +55,7 @@ def generate_control_file(path: str) -> Mapping:
package = list(parsed["name"])[0]
package = package.replace("_", "-")
if "ament_cmake" in build_type:
package = f"ros-{TUE_ROS_DISTRO}-{package}"
package = f"ros-{TUE_ENV_ROS_DISTRO}-{package}"

control_file = CONTROL_FILE_TEMPLATE.format(
package=package,
Expand Down
10 changes: 9 additions & 1 deletion installer/parse_install_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,15 @@ def get_distro_item(
return {"system_packages": system_packages, "commands": " ".join(commands)}

elif install_type == "ros" or install_type == "ros-remove-source":
ros_release = environ["TUE_ROS_DISTRO"]
# TODO(anyone): Remove the use of TUE_XXX, when migration to TUE_ENV_XXX is complete
try:
ros_release = environ["TUE_ENV_ROS_DISTRO"]
except KeyError as e:
try:
ros_release = environ["TUE_ROS_DISTRO"]
except KeyError:
raise KeyError("TUE_ENV_ROS_DISTRO and TUE_ROS_DISTRO not set in environment variables")

try:
source: Optional[Mapping[str, str]] = get_distro_item(install_item, "source", ros_release, "ROS")
except ValueError as e:
Expand Down
6 changes: 3 additions & 3 deletions installer/parse_package_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def packagexml_parser(path: str) -> Mapping:
fields = ["name", "version", "description", "maintainer", "export"]
parsed = {}

if os.getenv("TUE_INSTALL_SKIP_ROS_DEPS", "false") == "false":
if os.getenv("TUE_ENV_INSTALL_SKIP_ROS_DEPS", "false") == "false":
dep_types.extend(
[
"build_depend",
Expand All @@ -40,10 +40,10 @@ def packagexml_parser(path: str) -> Mapping:
]
)

if os.getenv("TUE_INSTALL_TEST_DEPEND", "false") == "true":
if os.getenv("TUE_ENV_INSTALL_TEST_DEPEND", "false") == "true":
dep_types.append("test_depend")

if os.getenv("TUE_INSTALL_DOC_DEPEND", "false") == "true":
if os.getenv("TUE_ENV_INSTALL_DOC_DEPEND", "false") == "true":
dep_types.append("doc_depend")

for types in fields + dep_types:
Expand Down
Loading