Skip to contentSkip to conversation

Remove/prevent a package's installed files if another package present

DISCUSSION [email protected] 2 participants 3 messages Apr 7, 2017 – Apr 11, 2017

lore
Share & tools
lore
#0 lore raw

I'd like to do a mod to my ppp recipe such that ip-up & ip-down aren't installed if another package is in the image recipe i.e. set in CORE_IMAGE_EXTRA_INSTALL.

I guess I could do a do_install_append() or a pkg_postinst_(), but is there a way to detect the other package within the recipe? E.g. along the lines of what PACKAGE_CONF can do for configuration.

Oh, and it needs to work after an update (e.g. rpm/deb) - don't want the files (re)installed by the update. (So I don't believe ROOTFS_POSTPROCESS_COMMAND is an option)

#1 lore raw
Quoted 11 lines · On 04/07/2017 02:53 PM, [email protected] wrote:

I'd like to do a mod to my ppp recipe such that ip-up & ip-down aren't installed if another package is in the image recipe i.e. set in CORE_IMAGE_EXTRA_INSTALL.

I guess I could do a do_install_append() or a pkg_postinst_(), but is there a way to detect the other package within the recipe? E.g. along the lines of what PACKAGE_CONF can do for configuration.

Oh, and it needs to work after an update (e.g. rpm/deb) - don't want the files (re)installed by the update. (So I don't believe ROOTFS_POSTPROCESS_COMMAND is an option)

Maybe you should do this at runtime, and modify ip-up/down themselves (or the thing that utilizes them) so that they do the right thing in both scenarios.

Alex

#2 lore raw
Quoted 13 lines · On 07 April 2017 at 12:57 Alexander Kanavin…
Quoted 8 lines · On 04/07/2017 02:53 PM, [email protected] wrote:

I'd like to do a mod to my ppp recipe such that ip-up & ip-down aren't installed if another package is in the image recipe i.e. set in CORE_IMAGE_EXTRA_INSTALL.

I guess I could do a do_install_append() or a pkg_postinst_(), but is there a way to detect the other package within the recipe? E.g. along the lines of what PACKAGE_CONF can do for configuration.

Quoted 8 lines
Quoted 3 lines

Oh, and it needs to work after an update (e.g. rpm/deb) - don't want the files (re)installed by the update. (So I don't believe ROOTFS_POSTPROCESS_COMMAND is an option)

Maybe you should do this at runtime, and modify ip-up/down themselves (or the thing that utilizes them) so that they do the right thing in both scenarios.

Worried about complexities of runtime mods (esp. across two other packages). What seems may be a 'simple' (if not weakness-less) method is to add my own DISTRO_FEATURE, and switch on that in my ppp_.bbappend.