On Tue, Jan 03, 2012 at 08:44:03AM -0500, Jiri B wrote:
> Hello,
> 
> I'm confused how @symlink should work,...
> 
> @symlink name
>         Added after a file entry by pkg_create to record that the entry
>         is actually a symbolic link.
> 
> I haven't found any usage of this in any PLIST.

Good luck finding any. pkg_create will reject @symlink in PLISTs.
(as well as @size and @link)

> My goal:
> - create a sample dir in /var/foo
> - create a symlink in /etc/foo -> /var/foo
> 
> I know it's possible to do it with 'ln -s' but I'm just
> curious how this @symlink is supposed to work.

It's an internal annotation: packing-lists, as they exist in packages 
and in /var/db/pkg,  have to record *everything* that constitutes a package,
so that they can be checked very thoroughly. 

Also, the tar USTAR format has several limitations, one of these being 
that paths over 255 chars cannot be recorded. In such a case, the archive
names are changed to LongName#x and LongLink#x, and the info in the
annotated packing-list is used to reconstitute the actual name we want.
(see OpenBSD/ArcCheck.pm for the gory details).

Note that the pkg_create(1) manpage says things in a careful way:

     @symlink name
             Added after a file entry by pkg_create to record that the entry
             is actually a symbolic link.

There is no indication of something else being feasible. This IS an automatic
annotation and you can't fiddle with it.

Reply via email to