* [PATCH] cygcheck: xz packages
@ 2013-09-13 17:10 Yaakov (Cygwin/X)
2013-09-13 18:06 ` Christopher Faylor
0 siblings, 1 reply; 3+ messages in thread
From: Yaakov (Cygwin/X) @ 2013-09-13 17:10 UTC (permalink / raw)
To: cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 69 bytes --]
cygcheck needs fixing wrt .tar.xz packages; patch attached.
Yaakov
[-- Attachment #2: cygcheck-xz-pkgs.patch --]
[-- Type: text/x-patch, Size: 675 bytes --]
2013-09-13 Yaakov Selkowitz <yselkowitz@...>
* dump_setup.cc (find_tar_ext): Allow .tar.xz packages.
Index: dump_setup.cc
===================================================================
RCS file: /cvs/src/src/winsup/utils/dump_setup.cc,v
retrieving revision 1.27
diff -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:08:42 -0000
@@ -46,7 +46,7 @@ find_tar_ext (const char *path)
return 0;
if (*p == '.')
{
- if (strcmp (p, ".tar.gz") != 0)
+ if (!(strcmp (p, ".tar.gz") == 0 || strcmp (p, ".tar.xz") == 0))
return 0;
}
else if (--p <= path || strcmp (p, ".tar.bz2") != 0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cygcheck: xz packages
2013-09-13 17:10 [PATCH] cygcheck: xz packages Yaakov (Cygwin/X)
@ 2013-09-13 18:06 ` Christopher Faylor
2013-09-16 17:40 ` Christopher Faylor
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Faylor @ 2013-09-13 18:06 UTC (permalink / raw)
To: cygwin-patches
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 *
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cygcheck: xz packages
2013-09-13 18:06 ` Christopher Faylor
@ 2013-09-16 17:40 ` Christopher Faylor
0 siblings, 0 replies; 3+ messages in thread
From: Christopher Faylor @ 2013-09-16 17:40 UTC (permalink / raw)
To: cygwin-patches
On Fri, Sep 13, 2013 at 02:06:19PM -0400, Christopher Faylor wrote:
>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.
I just confirmed: It doesn't work. I did, however, check in a modified
version that has the salutary effect of not segv'ing. It seems to work
but, now that I think of it, I haven't downloaded any new packages with
.xz extensions. It is general enough that, if it works for .tar.bz2, it
should also work for .tar.xz.
Thanks again for noticing this Yaakov.
cgf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-16 17:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-13 17:10 [PATCH] cygcheck: xz packages Yaakov (Cygwin/X)
2013-09-13 18:06 ` Christopher Faylor
2013-09-16 17:40 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).