diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 7608f70d080..55d4b584e51 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -80,7 +80,7 @@ host_env() { enable_ccache } -packagesdb="${DESTDIR}/usr/Ports/packages.db" +installedpackagesdb="${DESTDIR}/usr/Ports/installed.db" makeopts=("-j${MAKEJOBS}") installopts=() @@ -454,27 +454,27 @@ addtodb() { return fi if [ "${1:-}" = "--auto" ]; then - echo "auto $port $version" >> "$packagesdb" + echo "auto $port $version" >> "$installedpackagesdb" else - echo "manual $port $version" >> "$packagesdb" + echo "manual $port $version" >> "$installedpackagesdb" fi if [ "${#depends[@]}" -gt 0 ]; then - echo "dependency $port ${depends[@]}" >> "$packagesdb" + echo "dependency $port ${depends[@]}" >> "$installedpackagesdb" fi echo "Successfully installed $port $version." } -ensure_packagesdb() { - if [ ! -f "$packagesdb" ]; then - mkdir -p "$(dirname $packagesdb)" - touch "$packagesdb" +ensure_installedpackagesdb() { + if [ ! -f "$installedpackagesdb" ]; then + mkdir -p "$(dirname $installedpackagesdb)" + touch "$installedpackagesdb" fi } package_install_state() { local port=$1 local version=${2:-} - ensure_packagesdb - grep -E "^(auto|manual) $port $version" "$packagesdb" | cut -d' ' -f1 + ensure_installedpackagesdb + grep -E "^(auto|manual) $port $version" "$installedpackagesdb" | cut -d' ' -f1 } installdepends() { for depend in "${depends[@]}"; do @@ -514,8 +514,8 @@ uninstall() { esac done # Without || true, mv will not be executed if you are uninstalling your only remaining port. - grep -v "^manual $port " "$packagesdb" > packages.db.tmp || true - mv packages.db.tmp "$packagesdb" + grep -v "^manual $port " "$installedpackagesdb" > installed.db.tmp || true + mv installed.db.tmp "$installedpackagesdb" } do_installdepends() { buildstep_intro "Installing dependencies of $port..." diff --git a/Ports/README.md b/Ports/README.md index de69c8d54ee..c3fac6bf106 100644 --- a/Ports/README.md +++ b/Ports/README.md @@ -37,7 +37,7 @@ configuration/compilation options, and some other things (see script in this directory. This is sometimes required when LibC changes, for example. Pass `clean` as first argument to remove old build files beforehand. -Installed ports are being tracked in `Build/x86_64/Root/usr/Ports/packages.db` (a simple text file). +Installed ports are being tracked in `Build/x86_64/Root/usr/Ports/installed.db` (a simple text file). You can delete this file at any time, in fact it must be edited or removed when clearing the build directory as port dependencies may not be installed again otherwise. diff --git a/Ports/build_installed.sh b/Ports/build_installed.sh index 8df89e097f2..39beea19140 100755 --- a/Ports/build_installed.sh +++ b/Ports/build_installed.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash . ".hosted_defs.sh" -packagesdb="${SERENITY_INSTALL_ROOT}/usr/Ports/packages.db" +installedpackagesdb="${SERENITY_INSTALL_ROOT}/usr/Ports/installed.db" clean=false case "$1" in @@ -33,7 +33,7 @@ while IFS= read -r line; do echo "ERROR: Previously installed port $port doesn't exist!" some_failed=true fi -done < <(grep -E "^(auto|manual)" "$packagesdb") +done < <(grep -E "^(auto|manual)" "$installedpackagesdb") if [ "$some_failed" == false ]; then exit 0