diff --git a/include/image.mk b/include/image.mk index 4c53247eda..c476f6674f 100644 --- a/include/image.mk +++ b/include/image.mk @@ -326,7 +326,7 @@ ifdef CONFIG_TARGET_ROOTFS_CPIOGZ endif mkfs_packages = $(filter-out @%,$(PACKAGES_$(call param_get,pkg,pkg=$(target_params)))) -mkfs_packages_add = $(foreach pkg,$(filter-out -%,$(mkfs_packages)),$(pkg)$(call GetABISuffix,$(pkg))) +mkfs_packages_add = $(foreach pkg,$(filter-out -% ~%,$(mkfs_packages)),$(pkg)$(call GetABISuffix,$(pkg))) mkfs_packages_remove = $(foreach pkg,$(patsubst -%,%,$(filter -%,$(mkfs_packages))),$(pkg)$(call GetABISuffix,$(pkg))) mkfs_cur_target_dir = $(call mkfs_target_dir,pkg=$(target_params)) diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index e1d4ef242b..0c17e2e327 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -146,7 +146,7 @@ sub merge_package_lists($$) { my %pkgs; foreach my $pkg (@$list1, @$list2) { - $pkgs{$pkg} = 1; + $pkgs{$pkg =~ s/^~//r} = 1; } foreach my $pkg (keys %pkgs) { push @l, $pkg unless ($pkg =~ /^-/ or $pkgs{"-$pkg"});