RE: New bug fix release
Eugene Zolenko <EugeneZolenko-XYgkjQFSZqy1Z/[email protected]> Tue, 16 Dec 2008 14:56:32 -0700
| Newsgroups | gmane.comp.autopackage.devel |
|---|---|
| Message-ID | <[email protected]> |
> You could just upload them to the ftp as an RC and then we can have a > wider testing. Then people can test by setting > AUTOPACKAGE_RUNTIME_VERSION=1.2.6 etc. Sure, I can do that. I don't have access though. And before that we'll need to bring the branch up to date (I attached the patch). BTW, I never could make AUTOPACKAGE_RUNTIME_VERSION to work. Running package with it exported just proceeds installing as normal. I usually set target version in the package stub directly, or uninstall support code altogether. > Unfortunately, i'm no longer running linux (long story involving my > computer finally throwing in the towel) so I'm unable to do any > autopackage work for some time. I hope to install ubuntu or something > during the holidays Ubuntu is overrated :). --------------------------------------------------------------------- To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected] For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]
apkg-1.2.6.patch
(application/octet-stream, 5 KB)
Index: share/apkg-script-utils
===================================================================
--- share/apkg-script-utils (revision 2535)
+++ share/apkg-script-utils (working copy)
@@ -552,6 +552,7 @@
function _prepareScriptFinished() {
trace called
echo "$ROOTNAME" >> "$WORKING_DIRECTORY/prepared-rootnames"
+ echo "$SHORTNAME" >> "$WORKING_DIRECTORY/prepared-shortnames"
}
##
Index: share/apkg-funclib
===================================================================
--- share/apkg-funclib (revision 2535)
+++ share/apkg-funclib (working copy)
@@ -315,7 +315,7 @@
export "PATH=$PATH:/opt/gnome/bin"
trace updated PATH to include /opt/gnome/bin
fi
-
+
# gentoo has KDE installed into /usr/kde/<version>, figure out what
# kde they're running, and add it to $PATH.
#
@@ -331,7 +331,7 @@
trace updated PATH to include $kde_path
fi
fi
-
+
# determine package database location which could be either the
# global db or user-specific DB in the home directory
_initializePackageDB
@@ -443,14 +443,14 @@
# compatibility. Unfortunately, due to the C++ template inlining bug,
# we have to treat each new STL version as a separate ABI as otherwise
# incompatible symbols could be mis-bound to each other.
-
+
_checkCxxLibs
if [[ "$CXX_ABI" == "0" ]]; then
# this might be gentoo, who doesn't keep libstdc++.so in /usr/lib
# Instead, gentoo keeps its different libstdc++.so's in
# /usr/lib/gcc/<comp-str>/<comp-ver>/libstdc++.so.<ver>
# the command gcc-config -c can give useful information, e.g.,:
- # i686-pc-linux-gnu-3.4.6, which means look in
+ # i686-pc-linux-gnu-3.4.6, which means look in
# /usr/lib/gcc/i686-pc-linux-gnu/3.4.6.
if locateCommand gcc-config -c; then
trace "working around gentoo libstdc++ breakage"
@@ -1244,7 +1244,11 @@
out
! "$autopackage_silent" && out "Installing graphical interface, please wait... "
chmod +x "$filename"
- "$filename"
+ (
+ export AUTOPACKAGE_FRONTEND=apkg-ttyfe
+ "$filename"
+ )
+
retval="$?"
if [[ "$retval" != "0" ]]; then
_finishWindow
@@ -1379,7 +1383,7 @@
# Don't use autosu if we're already root, or
# if $autopackage_no_autosu is set, or if --local-only was passed
# on the command line
-
+
# If /etc/autopackage/config was not found, then that means the user
# installed autopackage itself as non-root. In that case, never ask
# for the root password, because root will not be able to find the
@@ -1971,13 +1975,13 @@
function _userPrefix() {
local prefix
trace autopackage_default_prefix=$autopackage_default_prefix
-
+
if [[ "$_PLATFORM" == "KDE" ]] && [[ "$AUTOPACKAGETARGET" != "1.0" ]]; then
# bash thinks that an unset variable is true, so only check post-1.0 packages
# ($_PLATFORM was introduced in 1.1)
if [[ `id -u` != "0" ]]; then
local kdeconfigPrefix="`locateCommand -o kde-config --localprefix`"
-
+
if [ -n "$KDEHOME" ]; then
prefix=$KDEHOME
elif [ -n "$kdeconfigPrefix" ]; then
@@ -1989,7 +1993,7 @@
fi
else
prefix=`getKdePrefix`
-
+
if ! haveWriteAccess "$prefix"; then
prefix="$HOME/.kde"
fi
@@ -2100,7 +2104,7 @@
export _payload_dir="$WORKING_DIRECTORY/payload/$1"
# restore environment
_loadPackageEnvironment "$WORKING_DIRECTORY/meta/$1"
-
+
# determine package installation prefix, if not passed in as an argument
# mainly for cases where package meta data is used in prefix like $SHORTNAME
trace _prefix=$_prefix
@@ -2124,7 +2128,7 @@
else
trace PACKAGEREPORTING=$PACKAGEREPORTING so skip recording the event
fi
-
+
return 0
}
@@ -2310,13 +2314,36 @@
trace proceeding with removal
- if isNameKnown "$SHORTNAME"; then
- # needs to be in subshell to protect the package environment
- (
- uninstallPackage "$SHORTNAME"; exit $?
- )
- if [[ "$?" != "0" ]]; then
- _installerFinish 1
+ if [ -e "$WORKING_DIRECTORY/prepared-shortnames" ]
+ then
+ old_IFS="$IFS"; IFS=$'\n'
+ prepared_names=( $(cat "$WORKING_DIRECTORY/prepared-shortnames") )
+ IFS="$old_IFS"
+
+ local i="${#prepared_names[@]}"
+ while(( i--, i >= 0 )) # uninstalling in reverse order, although force below will handle dependencies
+ do
+ if isNameKnown "${prepared_names[$i]}"
+ then
+ # needs to be in subshell to protect the package environment
+ (
+ export force="true"
+ uninstallPackage "${prepared_names[$i]}"
+ exit $?
+ )
+ if [[ "$?" != "0" ]]; then
+ _installerFinish 1
+ fi
+ fi
+ done
+ else # at least uninstall main package
+ if isNameKnown "$SHORTNAME"
+ then
+ (
+ export force="true"
+ uninstallPackage "$SHORTNAME"
+ exit $?
+ )
fi
fi