Dear list,
I am wondering if there is any trick that could make me able to say in the %file section of a spec file include all what's in the directory foo except bar include bar as %doc
(bar in contained in the directory foo)
Any hints would be appreciated,
Thanks,
Pierre
On Tuesday 24 February 2009 01:36:14 pm Pierre-Yves wrote:
Dear list,
I am wondering if there is any trick that could make me able to say in the %file section of a spec file include all what's in the directory foo except bar include bar as %doc
(bar in contained in the directory foo)
Any hints would be appreciated,
Thanks,
Pierre
Move bar at the end of %install; add it to %doc normally.
Regards,
On Tue, 2009-02-24 at 13:41 -0800, Conrad Meyer wrote:
On Tuesday 24 February 2009 01:36:14 pm Pierre-Yves wrote:
Dear list,
I am wondering if there is any trick that could make me able to say in the %file section of a spec file include all what's in the directory foo except bar include bar as %doc
(bar in contained in the directory foo)
Move bar at the end of %install; add it to %doc normally.
I do not install bar myself, it's done directly.
Thanks, Pierre
On Tuesday 24 February 2009 01:48:59 pm Pierre-Yves wrote:
On Tue, 2009-02-24 at 13:41 -0800, Conrad Meyer wrote:
On Tuesday 24 February 2009 01:36:14 pm Pierre-Yves wrote:
I am wondering if there is any trick that could make me able to say in the %file section of a spec file include all what's in the directory foo except bar include bar as %doc
(bar in contained in the directory foo)
Move bar at the end of %install; add it to %doc normally.
I do not install bar myself, it's done directly.
Thanks, Pierre
That does not stop you from moving it at the end of %install.
On Tue, 2009-02-24 at 14:07 -0800, Conrad Meyer wrote:
On Tuesday 24 February 2009 01:48:59 pm Pierre-Yves wrote:
On Tue, 2009-02-24 at 13:41 -0800, Conrad Meyer wrote:
On Tuesday 24 February 2009 01:36:14 pm Pierre-Yves wrote:
I am wondering if there is any trick that could make me able to say in the %file section of a spec file include all what's in the directory foo except bar include bar as %doc
(bar in contained in the directory foo)
Move bar at the end of %install; add it to %doc normally.
I do not install bar myself, it's done directly.
That does not stop you from moving it at the end of %install.
I should not move them, they are where they should be:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
This obviously returns "File listed twice" but I was wondering if I could find a way to avoid to add the content of the whole directory.
Just wondering if it is possible, it might not be. I already asked spot who had no idea about that.
Thanks for your help,
Pierre
On Tue, 2009-02-24 at 23:16 +0100, Pierre-Yves wrote:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
This obviously returns "File listed twice" but I was wondering if I could find a way to avoid to add the content of the whole directory.
Just wondering if it is possible, it might not be. I already asked spot who had no idea about that.
Does:
%{_datadir}/R/library/%{packname} %exclude %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/doc
work? I haven't actually tried exactly that situation before, but I think it *may* work that way.
On Tue, 2009-02-24 at 14:29 -0800, Adam Williamson wrote:
%{_datadir}/R/library/%{packname} %exclude %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/doc
work? I haven't actually tried exactly that situation before, but I think it *may* work that way.
%{_datadir}/R/library/%{packname}
%exclude %{_datadir}/R/library/%{packname}/doc %exclude %{_datadir}/R/library/%{packname}/DESCRIPTION %exclude %{_datadir}/R/library/%{packname}/html %exclude %{_datadir}/R/library/%{packname}/latex/ %exclude %{_datadir}/R/library/%{packname}/man/ [...]
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/latex/ %doc %{_datadir}/R/library/%{packname}/man/ [...]
This compiles but then: rpmlint: R-RUnit.noarch: W: no-documentation
So it compiles but does not include the documentation
Regards, Pierre
Pierre-Yves wrote:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
You need to use %dir and list the non-doc stuff, e.g.: %dir %{_datadir}/R/library/%{packname}/ %{_datadir}/R/library/%{packname}/foo %{_datadir}/R/library/%{packname}/bar %{_datadir}/R/library/%{packname}/baz %doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
Using patterns can help: %{_datadir}/R/library/%{packname}/[^dDhl]* will pick up most of the non-doc files. :-)
Kevin Kofler
On Wed, 2009-02-25 at 04:31 +0100, Kevin Kofler wrote:
Pierre-Yves wrote:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
You need to use %dir and list the non-doc stuff, e.g.: %dir %{_datadir}/R/library/%{packname}/ %{_datadir}/R/library/%{packname}/foo %{_datadir}/R/library/%{packname}/bar %{_datadir}/R/library/%{packname}/baz %doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
Using patterns can help: %{_datadir}/R/library/%{packname}/[^dDhl]* will pick up most of the non-doc files. :-)
That's really an ugly way of doing things, though, and this situation is more or less the reason %exclude exists - it's just the %doc wrinkle that doesn't appear to have been considered (apparently, %exclude only helps in the "I want these 5,000 files in THIS package, except just one in this OTHER sub-package" situation). When you have a directory with really hundreds and hundreds, or even thousands, of files in it, and you just want to handle *one* of them differently, doing it by manually specifying all the non-exception packages in some way is really pretty silly, and there should be a more elegant way to handle it.
Of course, I'd still like to know if these doc files actually have to be in this particular directory, otherwise you could just delete them from the directory at the end of %install, and install them as docs in the standard doc dir in the usual way instead.
Pierre-Yves wrote:
I should not move them, they are where they should be:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
This obviously returns "File listed twice" but I was wondering if I could find a way to avoid to add the content of the whole directory.
If it listed twice intentionally is it really get any sense of this warning from rpmlint??
Pierre-Yves wrote:
I should not move them, they are where they should be:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
This obviously returns "File listed twice" but I was wondering if I could find a way to avoid to add the content of the whole directory.
So I have a question. How are these files used? You say that R expects them to be present here. Does that mean that the program can open them? Or that R has its own help viewer that can find them here?
-Toshio
Toshio Kuratomi пишет:
Pierre-Yves wrote:
I should not move them, they are where they should be:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
This obviously returns "File listed twice" but I was wondering if I could find a way to avoid to add the content of the whole directory.
So I have a question. How are these files used? You say that R expects them to be present here. Does that mean that the program can open them? Or that R has its own help viewer that can find them here?
Is it question for me? I don't known. I only speak about rpm warning what file listed twice. In end of process we get file where we want and marked as doc, also as we want. So, I think if all done correctly in final rpm package - we may just fully ignore this warning.
On Tue, Feb 24, 2009 at 5:16 PM, Pierre-Yves wrote:
On Tue, 2009-02-24 at 14:07 -0800, Conrad Meyer wrote:
On Tuesday 24 February 2009 01:48:59 pm Pierre-Yves wrote:
On Tue, 2009-02-24 at 13:41 -0800, Conrad Meyer wrote:
On Tuesday 24 February 2009 01:36:14 pm Pierre-Yves wrote:
I am wondering if there is any trick that could make me able to say in the %file section of a spec file include all what's in the directory foo except bar include bar as %doc
(bar in contained in the directory foo)
Move bar at the end of %install; add it to %doc normally.
I do not install bar myself, it's done directly.
That does not stop you from moving it at the end of %install.
I should not move them, they are where they should be:
%{_datadir}/R/library/%{packname}/
%doc %{_datadir}/R/library/%{packname}/doc %doc %{_datadir}/R/library/%{packname}/DESCRIPTION %doc %{_datadir}/R/library/%{packname}/html %doc %{_datadir}/R/library/%{packname}/late
This obviously returns "File listed twice" but I was wondering if I could find a way to avoid to add the content of the whole directory.
Just wondering if it is possible, it might not be. I already asked spot who had no idea about that.
Thanks for your help,
How about creating symlinks inside %{_docdir}/%{name} that point to %{_datadir}/R/library/%{packname}/doc etc ?
Orcan
On Fri, Feb 27, 2009 at 8:17 PM, Kevin Kofler wrote:
Orcan Ogetbil wrote:
How about creating symlinks inside %{_docdir}/%{name} that point to %{_datadir}/R/library/%{packname}/doc etc ?
How would that solve this problem? You'd still need to mark the actual files as %doc.
Uhm... Why?
Orcan
Orcan Ogetbil wrote:
On Fri, Feb 27, 2009 at 8:17 PM, Kevin Kofler wrote:
Orcan Ogetbil wrote:
How about creating symlinks inside %{_docdir}/%{name} that point to %{_datadir}/R/library/%{packname}/doc etc ?
How would that solve this problem? You'd still need to mark the actual files as %doc.
Uhm... Why?
Because they are documentation. :-)
Kevin Kofler