Michèle Garoche wrote:
> Sorry if my question seems to be trivial. I need an answer first for my
> own understanding, second for correct translation.
I second your request for explanation. I don't understand the
formulations either. And what I seem to understand doesn't immediately
make sense to me. Info3 has been in fink for quite some time, but the
number of packages that currently use it is *zero*, so I suspect no one
else understands its purpose either, or it is really superfluous.
After my recent dispute with Max over his claim to have observed a
situation that would make Info4 necessary, I tried to understand the
status of the InfoN field in fink, but I am still confused. I'll try to
explain what I gather from reading the sources and from some
experiments, but I am not sure if everything in the following is correct.
I thought that Info2 and then InfoN were originally introduced as an
emergency measure, for the case that a new feature was impossible to be
introduced without it, but they seem to have gained an attraction of
their own now, as a kind of higher-level version numbers for fink
features. For the sake of simplicity of the info files, I would prefer
if they could be avoided, but there seems to exist also a wish to make
them more or less mandatory.
Info2 was introduced exclusively for protecting older versions of fink
from crashing in the presence of newer info files (which use the
variants system), because otherwise upgrading was impossible in certain
situations. It is a no-op, either hiding the package completely (with
older fink), or doing nothing (with newer fink); a little like the
"Architecture:" field.
Info3 is different: It switches between different existing syntax rules
of current fink versions. It will also hide a package that uses Info3
from older fink versions that don't know about Info3, but that doesn't
seem to be its main purpose.
> I've tried to understand the explanation of Info3 in the packaging
> manual, but I'm completely at lost with it:
>
> <quote>Can indent nicely in .info files</quote>
> Anything to do here (tabs, spaces, etc.) or is it done automatically?
Without Info3, field names like "Package:" have to begin at the
beginning of a line, except in SplitOffs where they can be indented.
With Info3, you can indent them everywhere. So with Info3, you can have
Package : foo
Version : 1
Revision: 1001
Without Info3, the old RFC-822 continuation-line interpretation kicks in
and sees the Version and Revision lines as continuation of the Package
line, with disastrous results. I am not sure, however, why one cannot
simply drop the RFC-822 stuff now. I don't think there is any package
description left that still uses it.
Another difference is that without Info3, the indentation in DescUsage
that you see with "fink describe" is the same as the original in the
info file. With Info3, leading whitespace is removed according to
certain rules. Thus, for example, if you have
DescUsage: <<
Line 1
Line 2
Line 3
Line4
<<
"fink describe foo" will show you without Info3:
Usage Notes:
Line 1
Line 2
.
Line 3
Line4
and with Info3:
Usage Notes:
Line 1
Line 2
.
Line 3
Line4
I guess this can be useful in some situations, for instance when your
DescUsage is heavily indented, so that instead of
DescUsage: <<
Some text
describing the package
<<
you can write under Info3:
DescUsage: <<
Some text
describing the package
<<
and you get the same result.
> <quote>Can put comments in pkglist fields</quote>
> What are pkglist fields?
> All fields in an info files? Only fields which lists packages, such as
> Depends, BuildDepends?
This is the list according to Validation.pm:
'Depends',
'BuildDepends',
'Conflicts',
'BuildConflicts',
'TestDepends',
'TestConflicts',
'Provides',
'Suggests',
'Recommends',
'Enhances',
'Architecture',
The classical way to write these lists is in one line, in which case
comments inside the list don't make sense. But one can write them also
in several lines using heredoc. With Info3 you can then insert comments
into the list that will be ignored (from "#" to end of line).
HTH
--
Martin
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-devel