summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-07-09 22:00:27 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-07-12 21:26:41 +0200
commita5b9553cf5922262383f7c42ec5e145a86c71624 (patch)
tree2735eea8521a99ef322369807ec3941478a1cd61
parent2f306873efbef159a5f5a8a922ef4c8da775464b (diff)
downloadopenwrt-a5b9553cf5922262383f7c42ec5e145a86c71624.tar.gz
openwrt-a5b9553cf5922262383f7c42ec5e145a86c71624.tar.bz2
openwrt-a5b9553cf5922262383f7c42ec5e145a86c71624.zip
scripts/feeds: add src-dummy method
The src-dummy method does not actually obtain any feed, but it can be used to insert addtional entries into the opkg distfeeds.conf. This is useful to make package feeds available to users without requiring the corresponding source feeds to be available during build. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit 6bdd5d8459cca7ceb93c841cccf61dc7ce830092)
-rwxr-xr-xscripts/feeds7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/feeds b/scripts/feeds
index 7613d3a107..b29e1d5c35 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -59,7 +59,8 @@ sub parse_config() {
my $valid = 1;
$line[0] =~ /^src-[\w-]+$/ or $valid = 0;
$line[1] =~ /^\w+$/ or $valid = 0;
- @src = split /\s+/, $line[2];
+ @src = split /\s+/, ($line[2] or '');
+ @src = ('') if @src == 0;
$valid or die "Syntax error in feeds.conf, line: $line\n";
$name{$line[1]} and die "Duplicate feed name '$line[1]', line: $line\n";
@@ -127,6 +128,10 @@ my %update_method = (
'init' => "ln -s '%s' '%s'",
'update' => "",
'revision' => "echo -n 'local'"},
+ 'src-dummy' => {
+ 'init' => "true '%s' && mkdir '%s'",
+ 'update' => "",
+ 'revision' => "echo -n 'dummy'"},
'src-git' => {
'init' => "git clone --depth 1 '%s' '%s'",
'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s'",