Setup.exe: solution to misbehaviour

Houder houder@xs4all.nl
Tue Apr 16 07:19:00 GMT 2019


L.S.,

Setup.exe writes "user defaults" to /etc/setup/setup.rc in the root
directory. Among these user defaults (which should override program
defaults) are "last-action" and "last-cache".

last-cache is an alias for the Local Package Directory (abbreviated
to local directory), the directory where the tarballs (or packages)
will be stored.

When setup.exe starts, one has to choose between "Download to local
directory", "Install fr. local directory" or "Download end Install".

As a reminder, setup.exe will show you the "last-action", i.e. what
action was chosen by you when you last invoked setup.exe.

However "all of the above" is in vain, if setup.exe fails to select
the correct root directory.

Currently, setup.exe fails to honour the -R option, which one uses
to specify a different location for the root directory.

setup.exe also fails to look for /etc/setup/setup.rc in the current
directory when setup.exe is started from the root directory.

I have written about this misbehaviour of setup.exe here:

     https://cygwin.com/ml/cygwin/2019-04/msg00032.html
     ( Setup: why consult registry (rootdir) if -R has been specified? )

Attached (I hope) to this post you will find a corrected version of
the UserSettings::open_settings() method; it determines the location
of the root directory as follows:

  - read /etc/setup/setup.rc from the specified root directory (-R)
    and if file exists
   - insert root directory in mount_table
  - else read /etc/setup/setup.rc from the current directory and if
    file exist
   - insert root directory in mount_table
  - else fall back to the whacky default (rootdir from registry)
    (root directory inserted in mount_table)

Good luck.

Henri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: open_settings.txt
Type: text/x-c
Size: 5896 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190416/31d24b1d/attachment.bin>
-------------- next part --------------

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list