[gobolinux-devel] [gobolinux-commits] tools/Scripts/bin UpdateSettings
Jonas Karlsson
jonka750 at student.liu.se
Tue Nov 14 23:29:57 UTC 2006
On Tue, 14 Nov 2006 14:51:32 +0100, Hisham Muhammad <hisham.hm at gmail.com>
wrote:
> On 11/13/06, Hisham Muhammad <hisham.hm at gmail.com> wrote:
>> On 11/13/06, Jonas Karlsson <jonka750 at student.liu.se> wrote:
>> > 2006/11/13, Dan <theyranos at gmail.com>:
>> > > CVSROOT: /sources/goboscripts
>> > > Module name: tools
>> > > Changes by: Dan <drmoose> 06/11/13 16:36:36
>> > >
>> > > Modified files:
>> > > Scripts/bin : UpdateSettings
>> > >
>> > > Log message:
>> > > Replacement for Is_Nonempty_Directory added when checking
>> for the
>> > existance of previous and current settings.
>> > >
>> > > I think that this, in combination with Jonas's fixes, should
>> have
>> > #13 pretty much fixed.
>> > >
>> > I think that this change wasn't really needed after my fix. I even
>> > think this is a regression. Even though Is_Nonempty_Directory would
>> > return true in case there was a CVS folder, further down the function
>> > 'dirs_differ' would return false if the difference was only CVS
>> > folders. The regression, imo, is that now that directories are
>> > completly ignored, empty directories in Resources/Defaults/Settings
>> > aren't propagated to /Programs/App/Settings. I don't know if it is a
>> > wanted behaviour, but I can see its uses (skeleton).
>> > If empty directories should be ignored this fix should stand,
>> > otherwice we should revert.
>>
>> Oh, I see. Yes, once in a while an empty dir should be distributed. I
>> don't remember it happening under Settings, but I do remember a bug in
>> a KDE package that needed an empty dir under share/.
>
> There is a regression somewhere. With current CVS, I'm getting
> "UpdateSettings: Update settings in /Programs/Monotone? [Y/n]" and the
> app has no settings at all.
>
Ok, fixed. The bug was that dirs_differ returned the status from the grep
operation, which failed if there were no settings at all.
As for Is_Nonempty_Directory vs find I have not found if any is better or
more correct. Perhaps Is_Nonempty_Directory should be prefered for
readability?
--
/Jonas
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the gobolinux-devel
mailing list