opkg_remove: avoid remove pkg repeatly with option --force-removal-of-dependent-packages
authorHongxu Jia <hongxu.jia@windriver.com>
Tue, 7 Sep 2021 22:42:45 +0000 (18:42 -0400)
committerJo-Philipp Wich <jo@mein.io>
Wed, 26 Jan 2022 08:16:26 +0000 (09:16 +0100)
commit9c44557a776da993c2ab80cfac4dbd8d59807d01
tree9b327d0a188ebe9dcf6dc3e7f283c5abc67bba5e
parent2edcfad1bb9a32f31199d5842aa087b4d30ec6f5
opkg_remove: avoid remove pkg repeatly with option --force-removal-of-dependent-packages

While remove pkg with '--force-removal-of-dependent-packages',
pkg may be added to pkgs remove list multiple times, add status
check to make sure pkg only be removed once.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
(Cherry picked from https://git.yoctoproject.org/cgit/cgit.cgi/opkg/commit/?id=e8996180833aa35d101fbeadec3d787ce0bbda5c)
(Fixes https://dev.archive.openwrt.org/ticket/18320 and openwrt/packages CI)
libopkg/opkg_remove.c