• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Packages - installing to current user's home directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packages - installing to current user's home directory


  • Subject: Re: Packages - installing to current user's home directory
  • From: Hanspeter Harpf <email@hidden>
  • Date: Thu, 16 Mar 2017 14:33:07 +0100

Dear Stephane,

thank you very much for your hint. The second installer is executed as you wrote and installs my files to „root“.
My original script is:
install_dir=`dirname $0`
/usr/sbin/installer -dumplog -verbose -pkg $install_dir/"SVP UserSettings Installer.pkg" -target "$3"

This installs my files into: /Documents/

Now I changed my script to:
install_dir=`dirname $0`
/usr/bin/su $USER -c /usr/sbin/installer -dumplog -verbose -pkg $install_dir/"SVP UserSettings Installer.pkg" -target "$3"

But now my main installer delivers an error during installation.

Thank you very very very much for your help!
Hanspeter

Am 16.03.2017 um 12:16 schrieb Stephane Sudre <email@hidden>:

On Wed, Mar 15, 2017 at 9:35 PM, Hanspeter Harpf <email@hidden> wrote:
Dear all,

I just created with the Packages Installer a main installer which installs the application to the application folder and everything works fine.
Now I need to install in addition some files into the current user's home directory (a.k.a. ˜/).
Therefore I created based on the following guide (http://s.sudre.free.fr/Software/Packages/Q&A_3.html) a second installer (*.pkg).

I tried now to integrate that „second“ installer into my main installer and it seems that everything works fine but the files do not be installed into the current user's home directory.
To do so I used this guide (https://derflounder.wordpress.com/2013/11/03/re-packaging-installer-packages-with-packages/) to integrate my second installer into the main installer.
I could see that this is done with a RAW Package.

So my question is if anyone has some hints why it doesn’t work?

It may be working but not as you're expecting.

When the installation script of your first installation package is
run, it is run as root. So if you do not use "/usr/bin/su $USER -c …"
to invoke the installer command line tool for your secondary package,
the secondary package will be installed in the home folder of the root
user account.

If this is not the problem and providing the installation package is
not an issue, this could help investigate the issue.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Packages - installing to current user's home directory (From: Hanspeter Harpf <email@hidden>)
 >Re: Packages - installing to current user's home directory (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Re: Packages - installing to current user's home directory
  • Next by Date: Re: Packages - installing to current user's home directory
  • Previous by thread: Re: Packages - installing to current user's home directory
  • Next by thread: Re: Packages - installing to current user's home directory
  • Index(es):
    • Date
    • Thread