Igor Pechtchanski writes:
 > On Fri, 15 Aug 2003, David Rothenberger wrote:
 > 
 > > Here's another small patch for "cygcheck -c" that strips leading ./
 > > and / from filenames in the package lists.
 > >
 > > I have Joshua's packages for building cygwin-doc installed, and the
 > > entries in those packages' lists start with "./", which breaks the
 > > postinstall check, causing them to show up as bad.
 > >
 > > I know these are non-standard packages, but it's such a small little
 > > fix to support them and I would really like my "cygcheck -c" output
 > > to be clean.  This gets it closer; it still complains about empty
 > > packages like diff, but I don't see an easy way to solve that.
 > >
 > > This patch includes all your previous changes.
 > >
 > 
 > Dave,
 > 
 > Oops, Corinna just applied my previous patch.  I guess you'll have to
 > re-generate this one against the CVS HEAD...  Sorry.
 >      Igor

No problem.  Here it is.  I wasn't sure whether to add to the
existing ChangeLog entry or make a new one.  Here's a new one.

Dave

======================================================================
2003-08-16  David Rothenberger  <[EMAIL PROTECTED]>

        * dump_setup.cc (check_package_files): Strip leading / and ./ from
        package file names.

Index: dump_setup.cc
===================================================================
RCS file: /cvs/src/src/winsup/utils/dump_setup.cc,v
retrieving revision 1.11
diff -u -p -r1.11 dump_setup.cc
--- dump_setup.cc       16 Aug 2003 09:09:09 -0000      1.11
+++ dump_setup.cc       16 Aug 2003 17:28:53 -0000
@@ -276,6 +276,12 @@ check_package_files (int verbose, char *
   while (fgets (buf, MAX_PATH, fp))
     {
       char *filename = strtok(buf, "\n");
+
+      if (*filename == '/')
+        ++filename;
+      else if (!strncmp (filename, "./", 2))
+        filename += 2;
+
       if (filename[strlen (filename) - 1] == '/')
         {
           if (!directory_exists (verbose, filename, package))

Reply via email to