[Solved] How to pass --force-overwrite opkg while building OpenWrt?

I get an error while trying to compile my own 19.07 branch (while integrating lxc and some kernel tweaks)...

Collected errors:
 * check_data_file_clashes: Package xz wants to install file /media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt/build_dir/target-aarch64_cortex-a53_musl/root-mvebu/usr/bin/unxz
	But that file is already provided by package  * busybox
 * check_data_file_clashes: Package xz wants to install file /media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt/build_dir/target-aarch64_cortex-a53_musl/root-mvebu/usr/bin/xz
	But that file is already provided by package  * busybox
 * opkg_install_cmd: Cannot install package tar.
 * check_data_file_clashes: Package xz wants to install file /media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt/build_dir/target-aarch64_cortex-a53_musl/root-mvebu/usr/bin/unxz
	But that file is already provided by package  * busybox
 * check_data_file_clashes: Package xz wants to install file /media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt/build_dir/target-aarch64_cortex-a53_musl/root-mvebu/usr/bin/xz
	But that file is already provided by package  * busybox
 * opkg_install_cmd: Cannot install package xz.
make[2]: *** [package/Makefile:68: package/install] Error 255
make[2]: Leaving directory '/media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt'
make[1]: *** [package/Makefile:108: /media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_install] Error 2
make[1]: Leaving directory '/media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt'
make: *** [/media/gerald/EBINDEV/DEVEL/OWRT/19.07/openwrt/include/toplevel.mk:227 : world] Erreur 2

For bypassing these error I usually use --force-overwrite when trying to install package with opkg.
But how can I do this tweak with make ?

1 Like

You can try this way:

cat << EOF >> openwrt/.config
CONFIG_BUSYBOX_CONFIG_INSTALL_NO_USR=y
CONFIG_BUSYBOX_CUSTOM=y
EOF

Limit BusyBox applets to /bin and /sbin

1 Like

Looks like it is not sufficient, but thanks for the tip and the link...
Will look further to get a solution !

did you do make busybox clean?

make package/busybox/clean
2 Likes

I was making only make clean and it was not sufficient...

thanks !

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.