Re: [Fink-devel] Should package put itself in conflicts?

2007-09-26 Thread Daniel Macks
On Thu, Sep 27, 2007 at 11:54:21AM +1200, Philip Lamb wrote:
> Hi all, one more question which is ambiguous in the docs: The  
> documentation states "If a package is listed in its own Conflicts, it  
> will be (silently) removed from that list".

What's ambiguous about that? If you list it, fink removes it (or at
least that's what we think fink does:). To see this in action, try
listing a package as its own Conflicts, 'fink rebuild' the package,
and then 'dpkg-deb -I' the .deb of that compiled package to see how
fink processed that Conflicts line.

> However, many packages DO seem to put themselves into the Conflicts:  
> field. E.g. version 1.0.1 of package foo might list Conflicts: foo (<  
> 1.0.1-1). This would seem to be redundant, since the upgrading of a  
> package would naturally remove the older version.

I agree that that usage is redundant. Do any packages actually do that
(other than variants, which often list all variants including self, as
akh described)?

> So, under what circumstances should a package list itself on the  
> Conflicts: line?

You never need to. You might find it easier in some cases. Listing it
is a harmless no-op because "it will be [...] removed".

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Should package put itself in conflicts?

2007-09-26 Thread Alexander K. Hansen
Philip Lamb wrote:
> Hi all, one more question which is ambiguous in the docs: The 
> documentation states "If a package is listed in its own Conflicts, it 
> will be (silently) removed from that list".
>
> However, many packages DO seem to put themselves into the Conflicts: 
> field. E.g. version 1.0.1 of package foo might list Conflicts: foo (< 
> 1.0.1-1). This would seem to be redundant, since the upgrading of a 
> package would naturally remove the older version.
>
> So, under what circumstances should a package list itself on the 
> Conflicts: line?
>
> Regards,
> Phil.
> 
A varianted package generally lists all possible variants (including 
itself) in Conflict/Replace if the variants can't coexist.  I guess you 
could do conditionals, but that's more complicated.

Also, if you've changed the packaging, you may need to spell out some 
Conflicts/Replaces amongst the main packages and splitoffs.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Conditional use of InfoDocs: in .info file

2007-09-26 Thread Philip Lamb

On 27/09/2007, at 7:27 AM, Alexander Hansen wrote:

On 9/25/07, Philip Lamb <[EMAIL PROTECTED]> wrote:

Is there some other means to allow conditional use of the InfoDocs
field?
You might have to resort to a manual install of the Info files in  
that case.


OK, for reference for anyone else who might need to do this in  
future, a line in the package .info file:


InfoDocs: FOO.info BAR.info

is currently (Fink version 0.27.6) approximately equivalent to:

PostInstScript: <<
if [ -f %p/share/info/dir ]; then
  if [ -f %p/sbin/install-info ]; then
%p/sbin/install-info --infodir=%p/share/info %p/share/info/ 
FOO.info
%p/sbin/install-info --infodir=%p/share/info %p/share/info/ 
BAR.info

  elif [ -f %p/bootstrap/sbin/install-info ]; then
%p/bootstrap/sbin/install-info --infodir=%p/share/info %p/ 
share/info/FOO.info
%p/bootstrap/sbin/install-info --infodir=%p/share/info %p/ 
share/info/BAR.info

  fi
fi
<<
PreRmScript: <<
if [ -f %p/share/info/dir ]; then
  %p/sbin/install-info --infodir=%p/share/info --remove FOO.info
  %p/sbin/install-info --infodir=%p/share/info --remove BAR.info
fi
<<

Regards,
Phil.

smime.p7s
Description: S/MIME cryptographic signature
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] Should package put itself in conflicts?

2007-09-26 Thread Philip Lamb
Hi all, one more question which is ambiguous in the docs: The  
documentation states "If a package is listed in its own Conflicts, it  
will be (silently) removed from that list".


However, many packages DO seem to put themselves into the Conflicts:  
field. E.g. version 1.0.1 of package foo might list Conflicts: foo (<  
1.0.1-1). This would seem to be redundant, since the upgrading of a  
package would naturally remove the older version.


So, under what circumstances should a package list itself on the  
Conflicts: line?


Regards,
Phil.


smime.p7s
Description: S/MIME cryptographic signature
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Conditional use of InfoDocs: in .info file

2007-09-26 Thread Alexander Hansen
On 9/25/07, Philip Lamb <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> The package I am curently working on has two variants, with only one
> of them building a particular .info doc (to be installed in /sw/share/
> info). However, it seems that the "InfoDocs" field in fink doesn't
> support the conditional syntax like:
>
> InfoDocs: (%type_raw[-variant] = -variant) somedoc.info
>
> Is there some other means to allow conditional use of the InfoDocs
> field?
>
> Regards,
> Phil.

You might have to resort to a manual install of the Info files in that case.

-- 
Alexander K. Hansen
akh AT finkproject DOT org
Fink User Liaison and Documenter

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Query a package's category

2007-09-26 Thread Kevin Walzer
Daniel Macks wrote:

> Curiosity's getting to me and I gotta ask...of what use is knowing the
> section to which a package belongs? Or is there some other ultimate
> goal here (sounds like what you *really* want is just a list of all
> sections)?

I guess I'm just used to the way MacPorts does it--I like seeing the 
category in the standard output. For instance, MacPorts doesn't provide 
a command-line switch for finding ports by category, but because the 
category is included in standard output, "port list | grep gnome/" 
provides all the ports in the Gnome category--and this seems to run 
faster than "fink list --section=gnome".

You're probably right, this may not be an essential feature for most 
users. I can always get off the dime, learn Perl, and submit a patch if 
I really want it done. :-)

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Query a package's category

2007-09-26 Thread Daniel Macks
On Wed, Sep 26, 2007 at 01:57:06PM -0400, Kevin Walzer wrote:
> Daniel Macks wrote:
> 
> > I would have thought that 'fink dumpinfo -fsection PACKAGENAME' would
> > tell you, but -fsection doesn't seem implemented? Oops.However, you
> > can 'fink dumpinfo -finfofile PACKAGENAME' and see the section
> > embedded in the pathname.
> 
> Well, this works, and doesn't spike my CPU to 90%. However, to get the 
> same results as iterating through each section (22 calls to Fink), I now 
> have to iterate through all 6,444 individual packages and call this 
> command (fink dumpinfo -fsection PACKAGENAME) each time: 6,444 calls to 
> Fink, which I then must parse further by extracting the directory name 
> from the output. I guess I have to pick my poison.
> 
> MacPorts includes the package category in its basic listing. Here's a 
> sample from the command-line ("port list"):
> 
> zope-ploneerrorreporting   @0.11   zope/zope-ploneerrorreporting
> 
> It's useful from the command-line because you can see what categories 
> are available without going to a website. How can I submit this as a 
> feature request for Fink? For instance, the output could look like this:
> 
> p ztrack  1.0-1   games   Curses-based 
> pseudo 3D driving game
> 
> I'm assuming that Fink would be able to parse its own data cache fairly 
> quickly and include the category with the standard output--much faster 
> than extracting the data as I currently am.

Yeah. 'fink list' could take -f flags like 'fink dumpinfo' does, so
one could request arbitrary fields. There's a "fink feature requests"
tracker on sourceforge linked from fink's homepage.

Curiosity's getting to me and I gotta ask...of what use is knowing the
section to which a package belongs? Or is there some other ultimate
goal here (sounds like what you *really* want is just a list of all
sections)?

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Query a package's category

2007-09-26 Thread Kevin Walzer
Daniel Macks wrote:

> I would have thought that 'fink dumpinfo -fsection PACKAGENAME' would
> tell you, but -fsection doesn't seem implemented? Oops.However, you
> can 'fink dumpinfo -finfofile PACKAGENAME' and see the section
> embedded in the pathname.
> 
> dan
> 

Well, this works, and doesn't spike my CPU to 90%. However, to get the 
same results as iterating through each section (22 calls to Fink), I now 
have to iterate through all 6,444 individual packages and call this 
command (fink dumpinfo -fsection PACKAGENAME) each time: 6,444 calls to 
Fink, which I then must parse further by extracting the directory name 
from the output. I guess I have to pick my poison.

MacPorts includes the package category in its basic listing. Here's a 
sample from the command-line ("port list"):

zope-ploneerrorreporting   @0.11   zope/zope-ploneerrorreporting


It's useful from the command-line because you can see what categories 
are available without going to a website. How can I submit this as a 
feature request for Fink? For instance, the output could look like this:

p   ztrack  1.0-1   games   Curses-based 
pseudo 3D driving game

I'm assuming that Fink would be able to parse its own data cache fairly 
quickly and include the category with the standard output--much faster 
than extracting the data as I currently am.

If I knew Perl, I'd submit a patch myself, but I presume this wouldn't 
be too difficult to implement for someone knowledgable about Fink's 
internals. However, if I'm wrong about its difficulty, or the Fink devs 
judge this an unneeded feature, then I understand.

Thanks!

--Kevin

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Query a package's category

2007-09-26 Thread Daniel Macks
On Wed, Sep 26, 2007 at 11:03:37AM -0400, Kevin Walzer wrote:
> Does the Fink command-line tool provide any hooks for querying what 
> category a package belongs to? Right now the only way I can get at this 
> information is to iterate through "fink list --section=foo", parse the 
> output from each section, and then merge everything into a large 
> list/array. Iterating through "fink list" so many times (22 by my count, 
> for all sections of Fink packages) is very slow, and also causes Perl to 
> consume up to 99% of CPU time for each iteration. If there is a more 
> efficient approach than I have outlined here, for instance through some 
> command-line switch that could add a "section" column to the output of 
> "fink list", that would be optimal.

I would have thought that 'fink dumpinfo -fsection PACKAGENAME' would
tell you, but -fsection doesn't seem implemented? Oops.However, you
can 'fink dumpinfo -finfofile PACKAGENAME' and see the section
embedded in the pathname.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] Query a package's category

2007-09-26 Thread Kevin Walzer
Does the Fink command-line tool provide any hooks for querying what 
category a package belongs to? Right now the only way I can get at this 
information is to iterate through "fink list --section=foo", parse the 
output from each section, and then merge everything into a large 
list/array. Iterating through "fink list" so many times (22 by my count, 
for all sections of Fink packages) is very slow, and also causes Perl to 
consume up to 99% of CPU time for each iteration. If there is a more 
efficient approach than I have outlined here, for instance through some 
command-line switch that could add a "section" column to the output of 
"fink list", that would be optimal.

Any advice is appreciated.

Regards,
Kevin

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel