Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2002 05:29:28 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Sheldon Hearn <sheldonh@starjuice.net>
Cc:        Ruslan Ermilov <ru@FreeBSD.ORG>, arch@FreeBSD.ORG
Subject:   Re: Adding support for a global src tree serial number
Message-ID:  <3C5946B8.BAA49BD@mindspring.com>
References:  <79636.1012479657@axl.seasidesoftware.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
Sheldon Hearn wrote:
> On Thu, 31 Jan 2002 14:04:03 +0200, Ruslan Ermilov wrote:
> > This scheme won't work because the state of the tree can be modified
> > by CVS meisters performing direct operations on a repository.  See
> > how stealthy the latest GCC import gone.
> 
> I don't think there are so many CVS meisters, or so much src repo
> surgery, that having them bump the serial number manually in these cases
> is a problem.

Another approach might be if you used a mod to CVS to cause
it to remember the most recent date of any file it checked
out in a batch checkout, and scripted the extraction of that
date into a file.

Then if you did a local checkout, you would get the date in
the file of the last modified file that was checked out, and
another checkout later of that date would result in the same
sources.

There's still a simultaneity problem with checkins that all
happen at the "same" time (the the granularity of the date,
which is in seconds), but I think this meets your requirements.

The only missing puzzle piece is that you would need to cause
the use of the scripted checkout by default.  This could be
done in the Makefile "make cvsworld" target, or something
similar.

If this wouldn't work, then the alternative is a "cvs stat"
scan of the source tree in question, to get the date (e.g.
a "make version" target), but you'd still need to hack the
CVS program so that it knew the highest delta, or did two
scans, so that it knew if any files were modified between
the lowest time and the highest to know if any files were
out of date (e.g. like the output of a "cvs update -n -D"
over the tree, using the highest date from a "cvs stat"
over the tree).

This could be done after a problem (obviously, it doesn't
satisfy the "uname -a" goal, either), which is when people
would care about this, except for release snapshots, where
we might care about it to reference a particular snapshot.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C5946B8.BAA49BD>