include/package-pack: add special handling for CONTROL conffiles
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 22 May 2024 17:35:35 +0000 (19:35 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 11 Jun 2024 21:58:13 +0000 (23:58 +0200)
commit52e9431731fc4c0b6a2c2e2e76090a0641dc4334
tree71eaf58b95ae91acea6dcf51d9964b06a05e60a3
parentba7305c3e40fee1ab8da326e7f32955d8e5bf79b
include/package-pack: add special handling for CONTROL conffiles

Add special handling for CONTROL conffiles. Some packages (base-files)
manually append stuff to the CONTROL directory.

The CONTROL directory is something for OPKG that is added in the root of
the ipkg directory and usually contains postinst, list, and conffiles
file. For APK the implementation is different, to keep compatibility
with this and maybe other packages, apply manual fixup and check for
these corner case.

Also check if the CONTROL directory is present and is empty to make sure
we don't drop other special file while removing any pending CONTROL
directory in the ipkg directory.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
include/package-pack.mk