aboutsummaryrefslogtreecommitdiff
path: root/linaro-hwpack-install
diff options
context:
space:
mode:
authorMichael Hudson <michael.hudson@linaro.org>2010-12-14 12:18:22 +1300
committerMichael Hudson <michael.hudson@linaro.org>2010-12-14 12:18:22 +1300
commitc2feff2e8b0ee801af0ae7e30ec52d0b26cd770d (patch)
tree6b428cbfdcfac0e0e8a9f614774ddb6b0603b5cd /linaro-hwpack-install
parent1fa3c72abad563180f1317372fb16b07f1426630 (diff)
add a small essay to linaro-hwpack-install explaining why it does what it does
Diffstat (limited to 'linaro-hwpack-install')
-rwxr-xr-xlinaro-hwpack-install20
1 files changed, 18 insertions, 2 deletions
diff --git a/linaro-hwpack-install b/linaro-hwpack-install
index b03c253..c07406b 100755
--- a/linaro-hwpack-install
+++ b/linaro-hwpack-install
@@ -147,6 +147,22 @@ else
FORCE_OPTIONS=""
fi
+# "newer" hwpacks contain a dependency package whose Depends is the
+# same as the packages config setting from the file the hwpack was
+# build from. But if we just installed that, a newer version of a
+# package than that in the hwpack might have made it to the main
+# archive and apt-get would install that instead. So we install the
+# specific package versions that make up the hwpack. /That/ however
+# would leave all the packages from the hwpack marked as manually
+# installed, so if a newer hwpack was installed over the top which no
+# longer depended on one of the packages the older one did, the
+# package would not be eligible for autoremoval. So we mark all the
+# other packages in the hwpack apart from the dependency package as
+# automatically installed with apt-get markauto.
+#
+# For "older" hwpacks that don't have a dependency package, we just
+# manually install the contents of the hwpack.
+
HWPACK_NAME=`grep NAME "${HWPACK_DIR}/metadata" | cut -d "=" -f2`
HWPACK_VERSION=`grep VERSION "${HWPACK_DIR}/metadata" | cut -d "=" -f2`
dependency_package="hwpack-${HWPACK_NAME}"
@@ -157,7 +173,7 @@ else
fi
if [ "$INSTALL_LATEST" == "yes" ]; then
- packages=`sed -e 's/=.*//' "${HWPACK_DIR}"/manifest`
+ packages=`sed 's/=.*//' "${HWPACK_DIR}"/manifest`
else
packages=`cat "${HWPACK_DIR}"/manifest`
fi
@@ -165,7 +181,7 @@ fi
sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" install ${packages}
if [ "$DEP_PACKAGE_PRESENT" == "yes" ]; then
- auto_packages=`sed -e 's/=.*//' "${HWPACK_DIR}"/manifest | grep -v "^${dependency_package}"`
+ auto_packages=`sed 's/=.*//' "${HWPACK_DIR}"/manifest | grep -v "^${dependency_package}"`
sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" markauto ${auto_packages}
fi