From owner-freebsd-bugs Thu Jan 31 3:43:53 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mail20.jump.net (mail20.jump.net [206.196.91.20]) by hub.freebsd.org (Postfix) with ESMTP id 9793137B405; Thu, 31 Jan 2002 03:43:48 -0800 (PST) Received: from Powerbook.Dataplex.Net (cust-92-208.customer.jump.net [207.8.92.208]) by mail20.jump.net (8.11.6/) with ESMTP id g0VBhjA21041; Thu, 31 Jan 2002 05:43:45 -0600 (CST) Date: Thu, 31 Jan 2002 05:43:45 -0600 Subject: Re: conf/6346: Kernel version strings need to relate to the source not the build Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) Cc: joe@tao.org.uk, sheldonh@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, bde@zeta.org.au To: "."@babolo.ru From: Richard Wackerbarth In-Reply-To: <200201310401.HAA01299@aaz.links.ru> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.480) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wednesday, January 30, 2002, at 10:01 PM, "."@babolo.ru wrote: > Richard Wackerbarth writes: >> On Wednesday, January 30, 2002, at 06:26 PM, "."@babolo.ru wrote: >> >>> Richard Wackerbarth writes: >>>> It can also be done by playing games on a special file in the master >>>> cvs archive (but not the copies thereof) >>> Exactly. >>> What about do >>> date +'#define LAST_MOD "%Y-%m-%d %H:%M:%S"' > /path/last_mod_date.h >>> on any CVS tree update? > Sorry, commit > >>> And #include >> >> That won't work. It produces the time of the cvs checkout/update and >> not >> the time of the source modification. >> That is little better than the time of the compile that we have now. > I think about commit time (my mistake, not checkout) > But I understand, it is slightly complex to generate > last_mod_date.h,v then last_mod_date.h, > but there no need in tags in it, so it can be whole > overwritten by every commit Rather than computing the source date from the sources as Joe's algorithm does, you could compute that result at commit time and commit that time to the master cvs tree. The problem with that approach is that such a file would grow at an unacceptable rate. Your suggestion to simplify if to the extreme doesn't work either. Consider what happens if I check out any version other than the "HEAD". By your approach, I would get a recent time stamp and not the one which reflects the true age of the sources that I am using. Now, I do think your idea has some merit. For example, we could override the checkout/update procedure for this special file to produce a time stamp when checking out the head of a branch and to produce some other identifier when another tag is used. Other approaches which approximate the true source time stamp can also be considered. It might be reasonable to trade time granularity for accuracy. For example, you might update the source time stamp only once a day. That leaves some uncertainty in the result (Was that Thursday before xxx was corrected, or after? However, it would still be clear that it was before Saturday's change.) As Joe notes in another message, having the option to suppress the recalculation might be a good approach. Power users who are most impacted by the added complexity of the build time probably don't need the same level of source identification. Another approach is to integrate the searching with the build process. Instead of examining each source file directly, you can partition the files into subsets and compute a time stamp for each subset. The global time stamp can then be computed by examining only the limited number of collective time stamps. Modification of a file would trigger the computation of the time stamp for its subset, and hence the global time stamp, but not involve the other subsets. -- Richard Wackerbarth The Digital Dataplex (512) 346-5772 8801 Camelia Ln rkw@dataplex.net Austin, TX 78759 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message