Force remove dependent packages in imagebuilder?

how to force remove dependent package while installing a package in imagebuilder ?
for example i want to install "luci-app-dockerman" but don't want "iptables-zz-legacy", is there any undocumented parameter ? or Makefile patch ?

1 Like

It's documented here. Place a minus sign before the package you wish to remove.

it doesn't work like opkg's --force-depends.
in this case, iptables-zz-legacy still installed if luci-app-dockerman is installed

These are the packages I see selected by luci-app-dockerman in my 23.05-SNAPSHOT build environment:

Selects: PACKAGE_luci-compat [=y] && PACKAGE_docker [=y] && PACKAGE_luci-lua-runtime [=y] && PACKAGE_ttyd [=y] && PACKAGE_libc [=y] && PACKAGE_luci-lib-docker [=y]

It looks like you would have to manually add this. I don’t see anything dependent on it??

Symbol: DEFAULT_iptables-zz-legacy [=DEFAULT_iptables-zz-legacy]
Type  : unknown

Symbol: PACKAGE_iptables-zz-legacy [=n]
Type  : tristate
Defined at tmp/.config-package.in:96160
  Prompt: iptables-zz-legacy....................... IP firewall administration tool
  Location:
    -> Network                                                                                                                                                                         
 (1)   -> Firewall
Selects: PACKAGE_xtables-legacy [=n] && PACKAGE_libc [=y]

What version of the imagebuilder are you working with and what's the host OS?

im using default image builder for 23.05.3, target is rockchip, host is wsl2, i have specified PACKAGES="-unwanted wanted" but unwanted still installed in final image.

iptables-zz-legacy is just a random sample that i think it is installed by luci-app-dockerman, but i already specify -iptables-zz-legacy as one of PACKAGES= value when executing make image and iptables-zz-legacy still installed.

Select iptables-nft, docker haopy with either