[gobolinux-users] Re: RestoreDefaults

Hisham Muhammad hisham.hm at gmail.com
Fri Aug 12 14:17:50 GMT 2005


Let me see if I understood what you suggested:

I have App 1.0 installed in my machine, and I want to InstallPackage App 2.0.

We're talking about three sets of Settings here:
(a) /Programs/App/Settings (my customized settings)
(b) /Programs/App/1.0/Resources/Defaults/Settings
(c) /Programs/App/2.0/Resources/Defaults/Settings

Compare (b) and (c).
If they are the same, keep using (a). 
If they differ then some configuration format may have changed. Notify
the user and offer to replace (a) with (c), keeping a backup of (a).

Did I get it right? Sounds like a great idea to me.

And perhaps this can be further improved, like this:

If (b) and (c) are different, compare (a) and (b). If (a) and (b) are
the same, the user is still using the defaults from version 1.0, which
means we can safely replace them with the new defaults of version 2.0,
(c), without interactivity.

I like this! Who wants to implement it? :)

-- Hisham

On 8/11/05, Fabio Mierlo <geromao at gmail.com> wrote:
> It can be improved in the follow way:
> 
> 1. The InstallPackage can diff the /Programs/App/
>   Settings against /Programs/App/Current/Resources/
>   Defaults/Settings before the install.
> 2. If no changes are found it can safely replace the old
>   settings with the new one.
> 3. If they are found the InstallPackage can create a new
>   directory Settings.new and notify the user that they
>   need to check the new settings.
> 4. And the user can do a simple diff of the Settings
>   against Settings.new to see the differences.  
> 
> Off course it can be a default option due the interactivity
> whit user.
> 
> On 8/11/05, Jonatan Liljedahl <lijon at kymatica.com> wrote:
> > On Thu, 11 Aug 2005 19:27:03 -0500
> > Carlo Calica <ccalica at gmail.com> wrote:
> > 
> > > On 8/11/05, Jonatan Liljedahl <lijon at kymatica.com> wrote:
> > > > we should have a script named RestoreDefaults that copied the
> > > > default settings from Resources/Default/Settings to Settings... Or
> > > > maybe implement this as a cmdline option to SymlinkProgram.
> > >
> > > Great idea.  One suggestion.  Rename /P/Foo/Settings to
> > > /P/Foo/Settings.modified before copying the defaults.  Maybe make a
> > > .modified-1, .modified-2, etc as needed.
> > 
> > Yes, that would be very nice. =) Or maybe .backup is a better name...
> > I don't think there's a need to number them, even if that would be nice.
> > 
> > What about this:
> > 
> > #!/bin/sh
> > OLD=/Programs/$1/Settings
> > NEW=/Programs/$1/Current/Resources/Default/Settings
> > [ -d $OLD ] && mv -f $OLD $OLD.backup
> > mkdir $OLD
> > cp -a $NEW/* $OLD/
> > 
> > /Jonatan    -=( http://kymatica.com )=-
> > _______________________________________________
> > gobolinux-users mailing list
> > gobolinux-users at lists.gobolinux.org
> > http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
> > 
> 
> 
> -- 
> fabio.m
> 
> "Bom é o que faz mal" -- Matanzza
> _______________________________________________
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
>


More information about the gobolinux-users mailing list