aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/feeds
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-08-06 18:18:47 +0000
committerJohn Crispin <blogic@openwrt.org>2014-08-06 18:18:47 +0000
commit63cb54edd5e55ad7f89eea303deb34a2e38cf874 (patch)
treeb3367ee4159104d807163e570c66d52f131db791 /scripts/feeds
parentae669a075f4c0d41f62fc0d73fa37cea9f64ea10 (diff)
downloadupstream-63cb54edd5e55ad7f89eea303deb34a2e38cf874.tar.gz
upstream-63cb54edd5e55ad7f89eea303deb34a2e38cf874.tar.bz2
upstream-63cb54edd5e55ad7f89eea303deb34a2e38cf874.zip
build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate repositories for each enabled package feed instead of one monolithic one. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> Backport of r42002 git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@42016 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/feeds')
-rwxr-xr-xscripts/feeds26
1 files changed, 25 insertions, 1 deletions
diff --git a/scripts/feeds b/scripts/feeds
index be07e59613..26c2de0945 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -262,11 +262,17 @@ sub list_feed {
sub list {
my %opts;
- getopts('r:d:sh', \%opts);
+ getopts('r:d:nsh', \%opts);
if ($opts{h}) {
usage();
return 0;
}
+ if ($opts{n}) {
+ foreach my $feed (@feeds) {
+ printf "%s\n", $feed->[1];
+ }
+ return 0;
+ }
if ($opts{s}) {
foreach my $feed (@feeds) {
my $localpath = "./feeds/$feed->[1]";
@@ -598,6 +604,22 @@ sub update {
return 0;
}
+sub feed_config() {
+ foreach my $feed (@feeds) {
+ my $installed = (-f "feeds/$feed->[1].index");
+
+ printf "\tconfig FEED_%s\n", $feed->[1];
+ printf "\t\tbool \"Enable feed %s\"\n", $feed->[1];
+ printf "\t\tdepends on PER_FEED_REPO\n";
+ printf "\t\tdefault y\n" if $installed;
+ printf "\t\thelp\n";
+ printf "\t\t Enable the \\\"%s\\\" feed at %s.\n", $feed->[1], $feed->[2][0];
+ printf "\n";
+ }
+
+ return 0;
+}
+
sub usage() {
print <<EOF;
Usage: $0 <command> [options]
@@ -605,6 +627,7 @@ Usage: $0 <command> [options]
Commands:
list [options]: List feeds, their content and revisions (if installed)
Options:
+ -n : List of feed names.
-s : List of feed names and their URL.
-r <feedname>: List packages of specified feed.
-d <delimiter>: Use specified delimiter to distinguish rows (default: spaces)
@@ -640,6 +663,7 @@ my %commands = (
'install' => \&install,
'search' => \&search,
'uninstall' => \&uninstall,
+ 'feed_config' => \&feed_config,
'clean' => sub {
system("rm -rf feeds");
}