[PATCH] cygcheck -m, --check-mtimes option
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Aug 14 08:41:00 GMT 2014
On Aug 13 22:20, Christian Franke wrote:
> Hi Corinna,
>
> Corinna Vinschen wrote:
> >On Aug 8 12:31, Corinna Vinschen wrote:
> >>Hi Christian,
> >>
> >>On Aug 7 22:15, Christian Franke wrote:
> >>>Attached is an experimental patch which adds -m, --check-mtimes[=SECONDS]
> >>>option to cygcheck. It provides an IMO useful heuristics to find files
> >>>possibly modified after installation.
> >>>
> >>>"cygcheck -c -m" prints the number of files with st_mtime >
> >>>INSTALL_TIME+SECONDS. INSTALL_TIME is the st_mtime of the
> >>>/etc/setup/PACKAGE.lst.gz file.
> >>>
> >>>With -v, the affected path names are printed. The optional parameter SECONDS
> >>>defaults to 600 to hide files modified by postinstall scripts.
> >>That's an interesting idea. I just gave it a try. I think this might
> >>be useful,
> >On second thought, the modification date isn't very meaningful all by
> >itself, is it? In theory it's only meaningful if the file has changed
> >as well.
>
> That's why I called it "heuristics" :-)
>
>
> > Consider, what is the user supposed to do with the information
> >that the file modification date has changed? Where does the user go
> >from there?
>
> The info is IMO useful to find changed config files, forgotten hot fixed
> scripts or other files you possibly want to save before a package is
> updated.
>
> It also sometimes exposes package collisions (e.g. libgnutls26/28 provide
> different versions of cyggnutls-openssl-27.dll or libsasl2/2_3 provide
> different version of /usr/sbin/saslauthd).
>
>
> >So I'm wondering if the st_mtime check isn't just a starting
> >point for a test for a file change. OTOH, we have a problem there.
> >The rudimentary package database in /etc/setup is not very helpful.
> >It only contains filenames, but no other information on the files.
> >
> >What would be really cool: Setup generates the package info files in
> >/etc/setup with additional file size and md5 (sha1, sha256, you name it)
> >checksum. Then cygcheck could test if st_mtime, st_size and the
> >checksum match. Or, in a first step, just store and check the file
> >size.
>
> Yes, this is an obvious missing feature of the Cygwin package management. I
> didn't suggest it because my open source spare time is too limited to
> implement it :-)
That's unfortunate. But, anyway, what about the other points I raised
in my first reply? We could improve the -m handling as we go along.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20140814/a6d01149/attachment.sig>
More information about the Cygwin-patches
mailing list