This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] cygcheck: xz packages
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 13 Sep 2013 14:06:19 -0400
- Subject: Re: [PATCH] cygcheck: xz packages
- Authentication-results: sourceware.org; auth=none
- References: <52334717 dot 6070803 at users dot sourceforge dot net>
- Reply-to: cygwin-patches at cygwin dot com
On Fri, Sep 13, 2013 at 12:10:47PM -0500, Yaakov (Cygwin/X) wrote:
>cygcheck needs fixing wrt .tar.xz packages; patch attached.
Thanks for noticing this but I think I'd like to see a more general
fix. In upset, I just completely relaxed the checking of .gz/.bz2/.xz
in favor of just checking for .tar. So, instead, something like the
below.
I can't confirm right now if this works or not so I won't check it in
until I can.
cgf
Index: dump_setup.cc
===================================================================
RCS file: /cvs/src/src/winsup/utils/dump_setup.cc,v
retrieving revision 1.27
diff -d -u -p -r1.27 dump_setup.cc
--- dump_setup.cc 21 Jan 2013 16:28:27 -0000 1.27
+++ dump_setup.cc 13 Sep 2013 17:51:10 -0000
@@ -41,18 +41,13 @@ typedef struct
static int
find_tar_ext (const char *path)
{
- char *p = strchr (path, '\0') - 7;
+ char *p = strstr (path, '\0') - 9;
if (p <= path)
return 0;
- if (*p == '.')
- {
- if (strcmp (p, ".tar.gz") != 0)
- return 0;
- }
- else if (--p <= path || strcmp (p, ".tar.bz2") != 0)
+ if ((p = strstr (path, ".tar")) != NULL)
+ return p - path;
+ else
return 0;
-
- return p - path;
}
static char *