Author: jow Date: 2016-01-24 16:36:05 +0100 (Sun, 24 Jan 2016) New Revision: 48475
Modified: trunk/include/feeds.mk trunk/include/kernel.mk trunk/include/package-defaults.mk trunk/include/package-dumpinfo.mk trunk/include/toplevel.mk trunk/package/Makefile trunk/scripts/metadata.pl trunk/scripts/metadata.pm Log: include: group kmod ipk files into a "kernel" subdirectory This is useful to just use the kmods from an official build while supplying base packages from a custom feed or the other way around; for just overriding the kmods with a local repo while using official repos for the rest. Signed-off-by: Jo-Philipp Wich <[email protected]> Modified: trunk/include/feeds.mk =================================================================== --- trunk/include/feeds.mk 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/include/feeds.mk 2016-01-24 15:36:05 UTC (rev 48475) @@ -5,7 +5,7 @@ # See /LICENSE for more information. # --include $(TMP_DIR)/.packagefeeds +-include $(TMP_DIR)/.packagesubdirs FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n) FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*)) @@ -21,7 +21,7 @@ # 1: package name define FeedPackageDir $(strip $(if $(CONFIG_PER_FEED_REPO), \ - $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/feed),$(Package/$(1)/feed),base)), \ + $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/subdir),$(Package/$(1)/subdir),base)), \ $(PACKAGE_DIR))) endef @@ -29,7 +29,7 @@ define FeedSourcesAppend ( \ $(strip $(if $(CONFIG_PER_FEED_REPO), \ - $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \ + $(foreach feed,base kernel $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \ $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \ $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \ , \ Modified: trunk/include/kernel.mk =================================================================== --- trunk/include/kernel.mk 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/include/kernel.mk 2016-01-24 15:36:05 UTC (rev 48475) @@ -155,6 +155,7 @@ DESCRIPTION:=$(DESCRIPTION) EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)) VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE)) + PACKAGE_SUBDIR:=kernel $(call KernelPackage/$(1)) $(call KernelPackage/$(1)/$(BOARD)) endef Modified: trunk/include/package-defaults.mk =================================================================== --- trunk/include/package-defaults.mk 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/include/package-defaults.mk 2016-01-24 15:36:05 UTC (rev 48475) @@ -17,6 +17,7 @@ CONFIGFILE:= SECTION:=opt CATEGORY:=Extra packages + PACKAGE_SUBDIR:=$(FEED) DEPENDS:= MDEPENDS:= CONFLICTS:= Modified: trunk/include/package-dumpinfo.mk =================================================================== --- trunk/include/package-dumpinfo.mk 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/include/package-dumpinfo.mk 2016-01-24 15:36:05 UTC (rev 48475) @@ -51,7 +51,7 @@ $(if $(KCONFIG),Kernel-Config: $(KCONFIG) )$(if $(BUILDONLY),Build-Only: $(BUILDONLY) )$(if $(HIDDEN),Hidden: $(HIDDEN) -)$(if $(FEED),Feed: $(FEED) +)$(if $(PACKAGE_SUBDIR),Package-Subdir: $(PACKAGE_SUBDIR) )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE)) $(if $(URL),$(URL) )$(MAINTAINER) Modified: trunk/include/toplevel.mk =================================================================== --- trunk/include/toplevel.mk 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/include/toplevel.mk 2016-01-24 15:36:05 UTC (rev 48475) @@ -84,9 +84,9 @@ f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \ [ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $(_ignore) $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \ done - [ tmp/.config-feeds.in -nt tmp/.packagefeeds ] || ./scripts/feeds feed_config > tmp/.config-feeds.in + [ tmp/.config-feeds.in -nt tmp/.packagesubdirs ] || ./scripts/feeds feed_config > tmp/.config-feeds.in ./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; } - ./scripts/metadata.pl package_feeds tmp/.packageinfo > tmp/.packagefeeds || { rm -f tmp/.packagefeeds; false; } + ./scripts/metadata.pl package_subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; } touch $(TOPDIR)/tmp/.build .config: ./scripts/config/conf $(if $(CONFIG_HAVE_DOT_CONFIG),,prepare-tmpinfo) Modified: trunk/package/Makefile =================================================================== --- trunk/package/Makefile 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/package/Makefile 2016-01-24 15:36:05 UTC (rev 48475) @@ -137,9 +137,9 @@ PACKAGE_SUBDIRS=. ifneq ($(CONFIG_PER_FEED_REPO),) ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),) - PACKAGE_SUBDIRS=base $(FEEDS_AVAILABLE) + PACKAGE_SUBDIRS=base kernel $(FEEDS_AVAILABLE) else - PACKAGE_SUBDIRS=base $(FEEDS_ENABLED) + PACKAGE_SUBDIRS=base kernel $(FEEDS_ENABLED) endif endif Modified: trunk/scripts/metadata.pl =================================================================== --- trunk/scripts/metadata.pl 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/scripts/metadata.pl 2016-01-24 15:36:05 UTC (rev 48475) @@ -833,12 +833,12 @@ } } -sub gen_package_feeds() { +sub gen_package_subdirs() { parse_package_metadata($ARGV[0]) or exit 1; foreach my $name (sort {uc($a) cmp uc($b)} keys %package) { my $pkg = $package{$name}; - if ($pkg->{name} && $pkg->{feed}) { - print "Package/$name/feed = $pkg->{feed}\n"; + if ($pkg->{name} && $pkg->{package_subdir}) { + print "Package/$name/subdir = $pkg->{package_subdir}\n"; } } } @@ -880,7 +880,7 @@ /^package_config$/ and return gen_package_config(); /^kconfig/ and return gen_kconfig_overrides(); /^package_source$/ and return gen_package_source(); - /^package_feeds$/ and return gen_package_feeds(); + /^package_subdirs$/ and return gen_package_subdirs(); /^package_license$/ and return gen_package_license(0); /^package_licensefull$/ and return gen_package_license(1); /^version_filter$/ and return gen_version_filtered_list(); @@ -892,7 +892,7 @@ $0 package_config [file] Package metadata in Kconfig format $0 kconfig [file] [config] [patchver] Kernel config overrides $0 package_source [file] Package source file information - $0 package_feeds [file] Package feed information in makefile format + $0 package_subdirs [file] Package subdir information in makefile format $0 package_license [file] Package license information $0 package_licensefull [file] Package license information (full list) $0 version_filter [patchver] [list...] Filter list of version tagged strings Modified: trunk/scripts/metadata.pm =================================================================== --- trunk/scripts/metadata.pm 2016-01-24 12:36:15 UTC (rev 48474) +++ trunk/scripts/metadata.pm 2016-01-24 15:36:05 UTC (rev 48475) @@ -222,7 +222,7 @@ /^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ]; /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $pkg->{"builddepends/$1"} = [ split /\s+/, $2 ]; /^Build-Types:\s*(.+)\s*$/ and $pkg->{buildtypes} = [ split /\s+/, $1 ]; - /^Feed:\s*(.+?)\s*$/ and $pkg->{feed} = $1; + /^Package-Subdir:\s*(.+?)\s*$/ and $pkg->{package_subdir} = $1; /^Category: \s*(.+)\s*$/ and do { $pkg->{category} = $1; defined $category{$1} or $category{$1} = {}; _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
