caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien <camaradetux@gmail.com>
To: Alain Frisch <alain@frisch.fr>
Cc: Gerd Stolpmann <info@gerd-stolpmann.de>,
	Jonathan Protzenko <jonathan.protzenko@gmail.com>,
	Martin DeMello <martindemello@gmail.com>,
	caml-list@inria.fr
Subject: Re: [Caml-list] Some comments on recent discussions
Date: Thu, 15 Dec 2011 22:38:10 +0100	[thread overview]
Message-ID: <CAP5QFJkCM1dRszzOb2ESQhbfyHnt+vFCLWD6GMnVmoti_1d1_Q@mail.gmail.com> (raw)
In-Reply-To: <4EE8D70A.1030207@frisch.fr>

On 14/12/2011, Alain Frisch <alain@frisch.fr> wrote:
> On 12/14/2011 04:49 PM, Adrien wrote:
>> But windows actually has symlinks. Kind of. Starting with Vista and the
>> corresponding NTFS version. But by default you need to be an administrator
>> to use them, you can only create a limited number of symlink in a given
>> folder afaiu, some functions work on the symlink and some on the target
>> (stat()/lstat()). They have a number of limitations and last time I looked
>> at them, I found them to be mostly unusable because of their limitations.
>>
>> They're one quite big issue I've had for packages on windows: if I
>> cross-compile a library from Linux, and make a tarball which has a number
>> of
>> symlink in it. What to do when untarring on windows? Try to create
>> symlinks?
>> Use hardlinks when possible? Copy the file's contents? Something else?
>
> Even if Windows supports kinds of symlink internally, this is a rarely
> used/exposed features. I think it's a bad idea to rely on them for a
> packaging system (targeted to "native" Windows users). They would look
> "foreign" to users, and we should expect a lot of bad support from
> existing tools.

After some discussion and pondering, I think that symlinks won't be stored
as-is in the package but will instead be created during some sort of
post-install hook (yypkg doesn't work that way but you get the idea). Then,
if the OS or FS doesn't handle symlinks in an acceptable way, I think the
following fallbacks could be used:
1- if symlink's target is a file in the symlink's folder: use a hardlink
2- if symlink's target is a file in another folder: cp the file
3- if symlink's target is a folder: try to use symlinks
4- if symlink's target is a folder and 3- is impossible, cp -r the folder

3- is based on the optimistic but realistic assumption that there aren't
many symlinks to folders in a given folder, therefore avoiding the limit of
31 symlinks in a given folder on windows.

I've used the following commands to find how many symlinks to directories I
had in a given folder (hope it's right) (on a full slackware):
find -P / -mount -type l -xtype d | xargs -L 1 -x dirname | sort |
uniq -c | sort -n

I got: /usr/man: 11, /etc: 9, /usr/doc/gimp-2.6.11: 8, /usr/include: 7,
/usr/X11R6: 7, /media: 7, /usr/lib64/X11: 6, /usr/lib64: 6, ..., /usr/doc:
5, /usr/ 5...

That shows the option 3- is quite likely to succeed. Also, note that
slackware adds some symlinks to do things the way it wants (it predates
Linux' standard fs hierachy ;-) ).

I'd be interested in any comments. Thanks.

Regards,
Adrien Nader

  reply	other threads:[~2011-12-15 21:38 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 15:24 Jonathan Protzenko
2011-12-06 15:31 ` Joel Reymont
2011-12-06 23:03   ` Martin Jambon
2011-12-06 16:01 ` Mihamina Rakotomandimby
2011-12-06 16:03 ` Benedikt Meurer
2011-12-06 16:56   ` Ashish Agarwal
2011-12-06 17:12 ` Gerd Stolpmann
2011-12-06 17:33 ` Alex Rubinsteyn
2011-12-06 17:53 ` Alain Frisch
2011-12-07  0:18   ` Paolo Donadeo
2011-12-07  1:00     ` oliver
2011-12-07  6:33       ` Mihamina Rakotomandimby
2011-12-07  1:48     ` Ashish Agarwal
2011-12-07  9:53       ` Goswin von Brederlow
2011-12-07 10:33     ` Pierre-Alexandre Voye
2011-12-07 11:18       ` Gabriel Scherer
2011-12-07 13:15         ` David MENTRE
2011-12-07 13:48           ` Alan Schmitt
2011-12-07 14:56           ` Ashish Agarwal
2011-12-07 15:52         ` oliver
2011-12-10 14:58         ` Xavier Leroy
2011-12-08  7:59       ` rixed
2011-12-08 10:37         ` oliver
2011-12-08 13:15         ` [Caml-list] Wanted book (Re: Some comments on recent discussions) Mihamina Rakotomandimby
2011-12-09 21:22           ` oliver
2011-12-09  7:13   ` [Caml-list] Some comments on recent discussions Martin Jambon
2011-12-10 20:32 ` Andrei Formiga
2011-12-10 21:01   ` Edgar Friendly
2011-12-10 21:12     ` rixed
2011-12-10 21:24       ` Edgar Friendly
2011-12-10 21:49         ` rixed
2011-12-10 22:45           ` Edgar Friendly
2011-12-10 23:58       ` Hans Ole Rafaelsen
2011-12-11 10:25       ` Gerd Stolpmann
2011-12-11 10:06   ` Gerd Stolpmann
2011-12-13 17:41   ` oliver
2011-12-13  5:54 ` Martin DeMello
2011-12-13  7:15   ` Gerd Stolpmann
2011-12-13  8:21     ` Martin DeMello
2011-12-13  8:51       ` Alain Frisch
2011-12-13  9:15         ` Gaius Hammond
2011-12-13 14:08           ` Gerd Stolpmann
2011-12-14  5:28           ` Alain Frisch
2011-12-13  9:51         ` Martin DeMello
2011-12-13  9:53         ` Adrien
2011-12-13 20:52           ` Jon Harrop
2011-12-14  6:03           ` Alain Frisch
2011-12-14  9:34             ` Jonathan Protzenko
2011-12-14 10:24               ` Alain Frisch
2011-12-14 13:37                 ` Adrien
2011-12-14 14:24                   ` Gabriel Scherer
2011-12-14 15:27                   ` Gerd Stolpmann
2011-12-14 15:46                     ` Gaius Hammond
2011-12-14 15:49                     ` Adrien
2011-12-14 16:42                       ` Fabrice Le Fessant
2011-12-14 17:04                       ` Alain Frisch
2011-12-15 21:38                         ` Adrien [this message]
2011-12-14 16:55                   ` Alain Frisch
2011-12-14 21:35                     ` Benedikt Meurer
2011-12-15 11:14                     ` Adrien
2011-12-14 12:52             ` Gerd Stolpmann
2011-12-14 13:25               ` Jonathan Protzenko
2011-12-14 17:27               ` Aleksey Nogin
2011-12-14 17:36                 ` Gerd Stolpmann
2011-12-14 19:41                   ` David Allsopp
2011-12-15 10:29                     ` Adrien
2011-12-15 17:41                       ` Martin DeMello
2011-12-15 20:47                         ` Adrien
2011-12-15 21:20                           ` Martin DeMello
2011-12-15 11:25                     ` Gerd Stolpmann
2011-12-16 12:39                   ` Alain Frisch
2011-12-16 12:44                     ` Jonathan Protzenko
2011-12-16 13:14                     ` Gerd Stolpmann
2011-12-16 14:11                       ` Alain Frisch
2011-12-16 14:50                         ` Gerd Stolpmann
2011-12-16 13:58                     ` Stéphane Glondu
2011-12-16 17:29                     ` Edgar Friendly
2011-12-14 18:41                 ` Dmitry Grebeniuk
2011-12-14 23:54               ` Martin DeMello
2011-12-15 10:03                 ` Adrien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP5QFJkCM1dRszzOb2ESQhbfyHnt+vFCLWD6GMnVmoti_1d1_Q@mail.gmail.com \
    --to=camaradetux@gmail.com \
    --cc=alain@frisch.fr \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    --cc=jonathan.protzenko@gmail.com \
    --cc=martindemello@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).