Closed Bug 157682 Opened 22 years ago Closed 21 years ago

legaldirs file is re-created even if modules file has not changed

Categories

(Webtools Graveyard :: Bonsai, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: david.berry, Assigned: tara)

Details

Attachments

(1 file)

The file data/legaldirs in Bonsai is always re-created every time
LoadDirList is called.

I believe the problem is as follows, in LoadDirList in bonsai/globals.pl.

      $modules = $::TreeInfo{$::TreeID}{'repository'} . "/CVSROOT/modules";
      $dirsfile = DataDir() . "/legaldirs";

      if (-f $modules) {
           if ((!(-f $dirsfile)) ||
               ((-M $dirsfile) < (-M $modules))) {
                system("./createlegaldirs.pl", $::TreeID);
           }
      }

As I interpret this it says that if the legaldirs file doesn't
exist or legaldirs was last modfied date is newer than the CVSROOT/modules
modification date then re-create the legaldirs file.

If the file doesn't exist that's fine.

It's the second part that puzzles me, surely as the legaldirs file is
generated from the modules file it will always be newer, and in fact the
test should be the other way round. If the legaldirs file is older than the
modules file, then you would want to re-create the legaldirs file.

I'll attach a suggested patch when the bug is created
Attachment #91484 - Flags: review?(tara)
Well, duh.  Patch checked in, with thanks to Mr. Berry.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #91484 - Flags: review?(tara)
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: