* [PATCH] setup: installed xz packages (was: cygcheck: xz packages)
[not found] ` <20130916174023.GA3279@ednor.casa.cgf.cx>
@ 2013-09-17 20:09 ` Yaakov (Cygwin/X)
2013-09-17 23:03 ` Christopher Faylor
0 siblings, 1 reply; 2+ messages in thread
From: Yaakov (Cygwin/X) @ 2013-09-17 20:09 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
On 2013-09-16 12:40, Christopher Faylor wrote:
> 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 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.
While setup installed .tar.xz packages fine, it turns out they're not
being seen as installed the next time setup is run. Patch attached in
your name, since the code is literally a copy of your rewritten
winsup/cygwin/dump_setup.cc:find_tar_ext().
Yaakov
[-- Attachment #2: setup-db-tarxz.patch --]
[-- Type: text/x-patch, Size: 1231 bytes --]
2013-09-17 Christopher Faylor <me.cygwin2013@...>
* filemanip.cc (find_tar_ext): Generalize search for .tar extension,
avoiding looking for specific compression types.
Index: filemanip.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/filemanip.cc,v
retrieving revision 2.36
diff -u -p -r2.36 filemanip.cc
--- filemanip.cc 30 Aug 2012 22:32:14 -0000 2.36
+++ filemanip.cc 17 Sep 2013 19:59:43 -0000
@@ -70,18 +70,13 @@ base (const std::string& aString)
int
find_tar_ext (const char *path)
{
- char *end = strchr (path, '\0');
- /* check in longest first order */
- const char *ext;
- if ((ext = trail (path, ".tar.bz2")) && (end - ext) == 8)
- return ext - path;
- if ((ext = trail (path, ".tar.gz")) && (end - ext) == 7)
- return ext - path;
- if ((ext = trail (path, ".tar")) && (end - ext) == 4)
- return ext - path;
- if ((ext = trail (path, ".tar.lzma")) && (end - ext) == 9)
- return ext - path;
- return 0;
+ char *p = strchr (path, '\0') - 9;
+ if (p <= path)
+ return 0;
+ if ((p = strstr (p, ".tar")) != NULL)
+ return p - path;
+ else
+ return 0;
}
/* Parse a filename into package, version, and extension components. */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] setup: installed xz packages (was: cygcheck: xz packages)
2013-09-17 20:09 ` [PATCH] setup: installed xz packages (was: cygcheck: xz packages) Yaakov (Cygwin/X)
@ 2013-09-17 23:03 ` Christopher Faylor
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Faylor @ 2013-09-17 23:03 UTC (permalink / raw)
To: cygwin-apps
On Tue, Sep 17, 2013 at 03:09:00PM -0500, Yaakov (Cygwin/X) wrote:
>On 2013-09-16 12:40, Christopher Faylor wrote:
>> 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 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.
>
>While setup installed .tar.xz packages fine, it turns out they're not
>being seen as installed the next time setup is run. Patch attached in
>your name, since the code is literally a copy of your rewritten
>winsup/cygwin/dump_setup.cc:find_tar_ext().
Thanks. Please check in and I'll roll a new setup.exe.
cgf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-17 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <52334717.6070803@users.sourceforge.net>
[not found] ` <20130913180619.GB7571@ednor.casa.cgf.cx>
[not found] ` <20130916174023.GA3279@ednor.casa.cgf.cx>
2013-09-17 20:09 ` [PATCH] setup: installed xz packages (was: cygcheck: xz packages) Yaakov (Cygwin/X)
2013-09-17 23:03 ` 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).