tar: fix circular dependency on xz
authorGeorge Sapkin <george@sapk.in>
Mon, 22 Dec 2025 01:28:07 +0000 (03:28 +0200)
committerGeorge Sapkin <george@sapk.in>
Mon, 22 Dec 2025 15:01:19 +0000 (17:01 +0200)
tar depended both on xz and xz-utils which xz already depended on.
Coupled with if PACKAGE_tar check it caused all packages that depended
on tar to have a circular Kconfig dependency. Remove the check and
dependency on xz-utils and leave xz one only.

Move libzstd dependency into DEPENDS.

Fixes: ad82c17 ("tar: fix EXTRA_DEPENDS")
Fixes: https://github.com/openwrt/packages/issues/28141
Signed-off-by: George Sapkin <george@sapk.in>
utils/tar/Makefile

index e204dce4f744ef2a2e9dfcb08380da55a4eae8c1..2c5a01a79fe8eae37e2c01b5a8997ea3ed68d5a2 100644 (file)
@@ -35,7 +35,12 @@ include $(INCLUDE_DIR)/package.mk
 define Package/tar
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+PACKAGE_TAR_POSIX_ACL:libacl +PACKAGE_TAR_XATTR:libattr +PACKAGE_TAR_BZIP2:bzip2 +PACKAGE_TAR_XZ:xz +PACKAGE_TAR_XZ:xz-utils
+  DEPENDS:= \
+    +PACKAGE_TAR_BZIP2:bzip2 \
+    +PACKAGE_TAR_POSIX_ACL:libacl \
+    +PACKAGE_TAR_XATTR:libattr \
+    +PACKAGE_TAR_ZSTD:libzstd \
+    +PACKAGE_TAR_XZ:xz
   TITLE:=GNU tar
   URL:=https://www.gnu.org/software/tar/
   MENU:=1
@@ -43,34 +48,31 @@ define Package/tar
 endef
 
 define Package/tar/config
-       if PACKAGE_tar
-               config PACKAGE_TAR_POSIX_ACL
-                       bool "tar: Enable POSIX ACL support"
-                       default y if USE_FS_ACL_ATTR
-                       default n
-
-               config PACKAGE_TAR_XATTR
-                       bool "tar: Enable extended attribute (xattr) support"
-                       default y if USE_FS_ACL_ATTR
-                       default n
-
-               config PACKAGE_TAR_BZIP2
-                       bool "tar: Enable seamless bzip2 support"
-                       default y
-
-               config PACKAGE_TAR_GZIP
-                       bool "tar: Enable seamless gzip support. Needed for sysupgrade."
-                       default y
-
-               config PACKAGE_TAR_XZ
-                       bool "tar: Enable seamless xz support"
-                       default y
-
-               config PACKAGE_TAR_ZSTD
-                       bool "tar: Enable seamless zstd support"
-                       select PACKAGE_libzstd
-                       default y
-       endif
+       config PACKAGE_TAR_POSIX_ACL
+               bool "tar: Enable POSIX ACL support"
+               default y if USE_FS_ACL_ATTR
+               default n
+
+       config PACKAGE_TAR_XATTR
+               bool "tar: Enable extended attribute (xattr) support"
+               default y if USE_FS_ACL_ATTR
+               default n
+
+       config PACKAGE_TAR_BZIP2
+               bool "tar: Enable seamless bzip2 support"
+               default y
+
+       config PACKAGE_TAR_GZIP
+               bool "tar: Enable seamless gzip support. Needed for sysupgrade."
+               default y
+
+       config PACKAGE_TAR_XZ
+               bool "tar: Enable seamless xz support"
+               default y
+
+       config PACKAGE_TAR_ZSTD
+               bool "tar: Enable seamless zstd support"
+               default y
 endef
 
 define Package/tar/description