setup and colons in filenames

Corinna Vinschen
Wed Oct 25 20:16:00 GMT 2017

On Oct 25 20:23, Jon Turney wrote:
> On 25/10/2017 16:50, Ken Brown wrote:
> > This is a followup to the thread started here:
> > 
> >
> > 
> > Currently setup's parse_filename is not correctly parsing filenames in
> > /etc/setup/installed.db that contain colons, as explained in the above
> > thread.  It would be easy to fix this by just ripping out the 'base'
> > function, except for the fact that parse_filename is called by
> > ScanFindVisitor::visitFile.
> Since older setup cannot correctly parse an installed.db containing
> filenames like that, we should probably bump the installed.db version at the
> same time as fixing this.
> > I don't know enough about WIN32_FIND_DATA to know whether the call to
> > 'base' is needed for that use of parse_filename.  If so, is it safe to
> > skip all colons in that setting, since we're dealing with Win32
> > filenames and they don't see the colons in Cygwin filenames?
> Yeah, that's about as far as I got before giving up...
> > Do we need two versions of parse_filename, one that calls base and one
> > that doesn't?
> This might be the easiest solution :)
> The other concern I had was if the filenames for the package archives stored
> in the download cache end up containing a ':', which I thought wasn't
> allowed in windows filenames?

Colons in Cygwin filenames will have 0xf03a value in WIN32.  The code to
transpose special chars into the private use area at 0xf0XY is in setup,
but I'm not sure if setup is really working correctly with archives
containing a colon.  That is:

- downloading the archive to the local drive with the filename
  transposed (rather than failing to store the file)
- storing the filename with a real colon in installed.db and still
  being able to transpose the filename when fetched from installed.db.

Especially the latter part is interesting since the reverse operation
(transposing back from 0xf0XY to 0xXY) may not be implemented in setup,
yet.  If so, I don't remember.  Somebody will have to test this.


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: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Cygwin-apps mailing list