Re: [OE-core] [PATCH] vim: put xxd in its own package

2022-06-08 Thread Tom Rini
On Wed, Jun 08, 2022 at 09:42:45AM +0200, Rasmus Villemoes wrote:

> The xxd tool can be quite handy by itself, and doesn't have anything
> to do with vim per se. Make it possible to include the rather tiny xxd
> in a rootfs without pulling in the several MB vim binary and
> associated data.
> 
> For backwards compatibility, add an RDEPENDS from the main package to
> the new vim-xxd package.
> 
> Signed-off-by: Rasmus Villemoes 

Reviewed-by: Tom Rini 

-- 
Tom

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166709): 
https://lists.openembedded.org/g/openembedded-core/message/166709
Mute This Topic: https://lists.openembedded.org/mt/91618936/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] vim: put xxd in its own package

2022-06-08 Thread Paulo Neves
Looks good to me then ;) Had a look at the code [1] and indeed it is a 
very minimal standalone binary.


Grateful for your patience
Paulo Neves

[1] https://github.com/vim/vim/blob/master/src/xxd/xxd.c

On 6/8/22 14:36, Rasmus Villemoes wrote:

On 08/06/2022 14.30, Paulo Neves wrote:

On 6/8/22 14:13, Rasmus Villemoes wrote:


On 08/06/2022 13.58, Paulo Neves via lists.openembedded.org wrote:

I mean that your patch allows for a new standalone package ${PN}-xxd.
Were somebody to use this package standalone, meaning without installing vim,
the ncurses-terminfo-base would not be installed, possibly breaking xxd.

Before your patch this risk did not occur due to xxd being include in the ${PN}
which had an RDEPENDS to ncurses-terminfo-base.

Thanks, now I understand what you were saying. And no, xxd does not in
any way depend on those terminfo files; it's a simple utility for
converting binary files to hex (or the reverse, which is what I happen
to need, taking input in the form of ascii hex chars and producing
binary output). Yes, I've tested it on target as well.

Rasmus



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166708): 
https://lists.openembedded.org/g/openembedded-core/message/166708
Mute This Topic: https://lists.openembedded.org/mt/91618936/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] vim: put xxd in its own package

2022-06-08 Thread Rasmus Villemoes via lists.openembedded.org
On 08/06/2022 14.30, Paulo Neves wrote:
> On 6/8/22 14:13, Rasmus Villemoes wrote:
> 
>> On 08/06/2022 13.58, Paulo Neves via lists.openembedded.org wrote:
> I mean that your patch allows for a new standalone package ${PN}-xxd.
> Were somebody to use this package standalone, meaning without installing vim,
> the ncurses-terminfo-base would not be installed, possibly breaking xxd.
> 
> Before your patch this risk did not occur due to xxd being include in the 
> ${PN}
> which had an RDEPENDS to ncurses-terminfo-base.

Thanks, now I understand what you were saying. And no, xxd does not in
any way depend on those terminfo files; it's a simple utility for
converting binary files to hex (or the reverse, which is what I happen
to need, taking input in the form of ascii hex chars and producing
binary output). Yes, I've tested it on target as well.

Rasmus

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166705): 
https://lists.openembedded.org/g/openembedded-core/message/166705
Mute This Topic: https://lists.openembedded.org/mt/91618936/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] vim: put xxd in its own package

2022-06-08 Thread Paulo Neves

On 6/8/22 14:13, Rasmus Villemoes wrote:


On 08/06/2022 13.58, Paulo Neves via lists.openembedded.org wrote:

Forgive me if it is a stupid question, but does xxd not rdepend on
ncurses-terminfo-base as well?

No, it does not, it's a trivial standalone utility whose only dynamic
dependency is libc.


The original RDEPENDS on ncurses-terminfo-base is not about dynamic
libraries but about terminfo files that are used for describing capabilities
of terminals. They are usually in /etc/terminfo directory.
There are programs that load these files and without them will
display broken output our refuse to run. vim seemed to be one of those programs.
Have you tested that xxd works without these files?


I ask because before your patch it could
was implied it that it did, s part of PN.

I don't understand what you're trying to say. I just put the extra
RDEPENDS from vim to vim-xxd into the existing RDEPENDS:vim line. That
doesn't imply any dependency either way between the two items listed on
the RHS.


I mean that your patch allows for a new standalone package ${PN}-xxd.
Were somebody to use this package standalone, meaning without installing vim,
the ncurses-terminfo-base would not be installed, possibly breaking xxd.

Before your patch this risk did not occur due to xxd being include in the ${PN}
which had an RDEPENDS to ncurses-terminfo-base.


Rasmus


Paulo Neves

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166704): 
https://lists.openembedded.org/g/openembedded-core/message/166704
Mute This Topic: https://lists.openembedded.org/mt/91618936/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] vim: put xxd in its own package

2022-06-08 Thread Rasmus Villemoes via lists.openembedded.org
On 08/06/2022 13.58, Paulo Neves via lists.openembedded.org wrote:
> Forgive me if it is a stupid question, but does xxd not rdepend on
> ncurses-terminfo-base as well?

No, it does not, it's a trivial standalone utility whose only dynamic
dependency is libc.

> I ask because before your patch it could
> was implied it that it did, s part of PN.

I don't understand what you're trying to say. I just put the extra
RDEPENDS from vim to vim-xxd into the existing RDEPENDS:vim line. That
doesn't imply any dependency either way between the two items listed on
the RHS.

Rasmus

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166702): 
https://lists.openembedded.org/g/openembedded-core/message/166702
Mute This Topic: https://lists.openembedded.org/mt/91618936/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] vim: put xxd in its own package

2022-06-08 Thread Paulo Neves
Forgive me if it is a stupid question, but does xxd not rdepend on 
ncurses-terminfo-base as well? I ask because before your patch it could was 
implied it that it did, s part of PN.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166701): 
https://lists.openembedded.org/g/openembedded-core/message/166701
Mute This Topic: https://lists.openembedded.org/mt/91618936/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] vim: put xxd in its own package

2022-06-08 Thread Rasmus Villemoes via lists.openembedded.org
The xxd tool can be quite handy by itself, and doesn't have anything
to do with vim per se. Make it possible to include the rather tiny xxd
in a rootfs without pulling in the several MB vim binary and
associated data.

For backwards compatibility, add an RDEPENDS from the main package to
the new vim-xxd package.

Signed-off-by: Rasmus Villemoes 
---
 meta/recipes-support/vim/vim_8.2.bb | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/vim/vim_8.2.bb 
b/meta/recipes-support/vim/vim_8.2.bb
index f358e61132b..fee9f055e9a 100644
--- a/meta/recipes-support/vim/vim_8.2.bb
+++ b/meta/recipes-support/vim/vim_8.2.bb
@@ -2,14 +2,18 @@ require vim.inc
 
 PROVIDES = "xxd"
 
-RDEPENDS:${PN} = "ncurses-terminfo-base"
+RDEPENDS:${PN} = "ncurses-terminfo-base ${PN}-xxd"
 # Recommend that runtime data is installed along with vim
 RRECOMMENDS:${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc 
${PN}-common"
 
 PACKAGECONFIG:class-native = ""
 BBCLASSEXTEND = "native nativesdk"
 
-ALTERNATIVE:${PN}:append = " xxd"
+PACKAGES =+ "${PN}-xxd"
+FILES:${PN}-xxd = "${bindir}/xxd"
+RPROVIDES:${PN}-xxd = "xxd"
+
+ALTERNATIVE:${PN}-xxd = "xxd"
 ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd"
 ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd"
 
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166693): 
https://lists.openembedded.org/g/openembedded-core/message/166693
Mute This Topic: https://lists.openembedded.org/mt/91618936/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-