Re: Autopackage installation systemwide/local
"Hylke Donker" <[email protected]>
| Newsgroups | gmane.comp.autopackage.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, It turned out that I was doing alot of stupid things, and it was actually easier than I thought at first. Here's the patch. Hylke On Wed, Apr 16, 2008 at 3:06 PM, Hylke Donker <[email protected]> wrote: > I've added support for local installation(no password) in autosu-gtk and > autosu-tui, but now I need to pass the arguments passed from the autopackage > to autosu-gtk/autosu-tui. But I still can't exactly find where those > programs are called(in which file). > Is it correct that the script package simply loops through the lines from > the package and executes it, for example: When you do: package install > bla.package, it loops through the lines of bla.package and executes it? Does > that mean all the autosu-gtk/autosu-tui code is actually in the autopackage > file(bla.package) itself? > Hylke > > > On Wed, Apr 16, 2008 at 1:53 PM, Hylke Donker <[email protected]> > wrote: > > > > > > > On Tue, Apr 15, 2008 at 3:48 PM, Isak Savo <[email protected]> wrote: > > > > > On Tue, Apr 15, 2008 at 2:04 PM, Hylke Donker <[email protected]> > > > wrote: > > > > Has anyone started the command-line switch fix? I could help if you > > > want, I > > > > currently have enough time, although I have never seen the inside of > > > > autopackage. > > > > > > No one has started anything on this. So feel free to do the patch. > > > > > > I've done a checkout, but there are so many modules and directories, so > > I don't know where I should start. What module/files should I be looking at? > > > > > > > > > > > > > We should also work on getting a release done... it's been way too > > > long without a release now. > > > > > > -Isak > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected] > > > For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected] > > > > > > > > > > > > -- > > Blog: http://www.donkerdump.nl > > > > > > -- > Blog: http://www.donkerdump.nl > -- Blog: http://www.donkerdump.nl --------------------------------------------------------------------- To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected] For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]
force_installation.patch
(text/x-patch, 2.3 KB)
Index: share/apkg-defs
===================================================================
--- share/apkg-defs (revision 2436)
+++ share/apkg-defs (working copy)
@@ -124,6 +124,8 @@
-h, --help Display this help screen
-p, --prefix Sets the prefix that the package will install to
-t, --ttyfe Forces the usage of the text based terminal frontend
+ --local-only Force installation locally
+ --root-only Force installation system-wide
"
intl_UNSUPPORTED_CPU_ARCH=$"Sorry, this package is incompatible with your CPU architecture.
Index: share/apkg-funclib
===================================================================
--- share/apkg-funclib (revision 2436)
+++ share/apkg-funclib (working copy)
@@ -1379,11 +1379,13 @@
# for the root password, because root will not be able to find the
# autopackage support libraries.
- if [[ `id -u` == 0 || ( ! -f /etc/autopackage/config && -f "${XDG_CONFIG_HOME:-$HOME/.config}/autopackage/config" ) || ("$autopackage_no_autosu" == "true" && "$1" != "--root-only") ]]; then
+ if [[ `id -u` == 0 || $INSTALL_FORCE == 2 || ( ! -f /etc/autopackage/config && -f "${XDG_CONFIG_HOME:-$HOME/.config}/autopackage/config" ) || ("$autopackage_no_autosu" == "true" && "$1" != "--root-only") ]]; then
# Filter out autosu arguments
while [[ "${1:0:1}" == "-" ]]; do
if [[ "$1" == '--root-only' ]]; then
shift
+ elif [[ "$1" == '--local-only' ]]; then
+ shift
elif [[ "$1" == '-m' ]]; then
shift
shift
@@ -1512,6 +1514,8 @@
"-h" | "--help") shift; out "$intl_INSTALLER_HELP"; _installerFinish; exit 0;;
"-g" | "--gtkfe") shift; export AUTOPACKAGE_FRONTEND="autopackage-frontend-gtk";;
"-t" | "--ttyfe") shift; export AUTOPACKAGE_FRONTEND="apkg-ttyfe";;
+ "--local-only") shift; export INSTALL_FORCE=2;; # Force local installation
+ "--root-only") shift; export INSTALL_FORCE=1;; # Force system-wide installation
*) red; outn "$intl_FAIL"; normal; out "$intl_UNKNOWN_OPTION" "$1"; shift;
shift; exit 1;
;;
@@ -2224,7 +2228,7 @@
export AUTOSU_DISPLAYNAME="$DISPLAYNAME"
# recurse
- if [[ "$ROOTINSTALLONLY" == "Yes" ]]; then
+ if [[ "$ROOTINSTALLONLY" == "Yes" || $INSTALL_FORCE == 1 ]]; then
_autosuCommand --root-only "$_meta_dir/apkg-installer" "$@"
else
_autosuCommand "$_meta_dir/apkg-installer" "$@"