On Sat, 15 Apr 2006 11:44:37 -0600
"Shaun Jackman" <[EMAIL PROTECTED]> wrote:

> Although it's an admirable goal to have the timestamps of the
> documents represent their most recent change, I'm not sure it's
> feasible without a gross ammount of effort. The thirteen files with
> the time stamp of 2006-04-13 13:48 are all upstream documentation. The
> time stamps are munged by any number of processes, including
> generating the HTML file from the DocBook XML file.

I can imagine.  This might be considered an upstream bug, yet in cases
where upstream won't fix it the question is should Debian?  If so, how?

I'm thinking there could be some new util that would take care of this
for maintainers.  That is, as soon as a Debian package is first
created, that'd be Debian day #1, (we won't worry about upstream day
#1), so our util would:

        1) save a list of doc filenames, dates, and checksums.[1]

...then for the next package version it would:

        2) do step #1 again, then go through every file, 
           compare the respective checksums, and backdate
           anything that hadn't changed. [2]

This isn't hard to code, but not being a Debian developer I don't know
where in the DD's tool chain it ought to fit.  That is, would this
hypothetical util belong in a new package or an old one.

Another thing to decide would be for cases where Debian takes one doc
file and converts it to another format, should the converted file keep
the original file's date?  Note: if nothing has changed, the converted
file, if needlessly reconverted on every new Debian version, should at
least keep the date of the last differing conversion.

> The Debian specific documentation is another matter. I should be able
> to keep the time stamps of README.Debian, changelog.Debian and
> copyright correct. I'll keep this in mind the next time I do a
> maintenance release of FreeGuide.

That'd be good too.  Thanks for maintaining the package!

Notes (sample code, shell script):

[1]
        # print doc filenames, age in seconds since 1970, and a checksum
        % find /usr/share/doc/freeguide/ -type f -printf "%p [EMAIL PROTECTED]" 
| while read a b ; do c=`crc32 $a`; echo $a $b $c ; done
        /usr/share/doc/freeguide/changelog.Debian.gz 1145074130 c55a8f7b
        /usr/share/doc/freeguide/README.html 1145074130 8b7d21cd
        /usr/share/doc/freeguide/LookAndFeel.html 1145074130 2bd3a502
        /usr/share/doc/freeguide/FAQ.html 1145074130 450e8849
        /usr/share/doc/freeguide/developers-cvs.html 1145074130 02ff06ff
        /usr/share/doc/freeguide/design.html 1145074130 aff331b7
        /usr/share/doc/freeguide/timezone.html 1145074130 058339ae
        /usr/share/doc/freeguide/developers-translating.html 1145074130 ab97f4bb
        /usr/share/doc/freeguide/developers-compiling.html 1145074130 ce37dcdf
        /usr/share/doc/freeguide/copyright 1145074130 fa4238eb
        /usr/share/doc/freeguide/INSTALL-linux-noxmltv.html 1145074130 53f80ae8
        /usr/share/doc/freeguide/FreeGuide-0_7-Linux-MetalLookAndFeel.png 
1145074130 685e90d7
        /usr/share/doc/freeguide/sflogo.png 1145074130 181d6e96
        /usr/share/doc/freeguide/README.Debian 1145074130 4677978f
        /usr/share/doc/freeguide/stylesheet.css 1145074130 cf321ee9
        /usr/share/doc/freeguide/TODO 1145074130 4c992358

(Seconds since 1970 are easiest to compare, being just one number.)

[2]
        # backdate a file to 'n' seconds, using 'date' and 'touch'.
        % f=/tmp/foo
        % echo > $f     # make a temporary file
        % ls -gG $f     # show its date is the present
        -rw-r--r-- 1 1 Apr 18 00:44 /tmp/foo
        % n=1145074130          # Apr 15, in seconds since 1970.
        % t=`date -d '1970-01-01 UTC '$n' seconds' +"%Y-%m-%d %T"`
        % touch -d "$t" $f
        % ls -gG $f     # show its been backdated
        -rw-r--r-- 1 1 Apr 15 00:08 /tmp/foo

Etc...  I haven't coded any of the main loops or Debian policy stuff,
but the above snippets should demonstrate the trickier parts as far as
file date I/O goes.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to