diff mbox series

[OpenWrt-Devel,1/4] scripts/feeds: add src-dummy method

Message ID a78e94c0897c4c450c36e6e1c1ae8ae9d928b05b.1531174081.git.mschiffer@universe-factory.net
State Accepted
Headers show
Series Overhaul distfeeds.conf generation | expand

Commit Message

Matthias Schiffer July 9, 2018, 10:31 p.m. UTC
The src-dummy method does not actually obtain any feed, but it can be used
to insert addtional entries into the opkg distfeeds.conf.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
---
 scripts/feeds | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Rafał Miłecki July 11, 2018, 8:59 a.m. UTC | #1
On Tue, 10 Jul 2018 at 00:31, Matthias Schiffer
<mschiffer@universe-factory.net> wrote:
> The src-dummy method does not actually obtain any feed, but it can be used
> to insert addtional entries into the opkg distfeeds.conf.

Should that be clear to me why we want that? Or could you add an extra
line of explanation, please?
Matthias Schiffer July 11, 2018, 7:39 p.m. UTC | #2
On 07/11/2018 10:59 AM, Rafał Miłecki wrote:
> On Tue, 10 Jul 2018 at 00:31, Matthias Schiffer
> <mschiffer@universe-factory.net> wrote:
>> The src-dummy method does not actually obtain any feed, but it can be used
>> to insert addtional entries into the opkg distfeeds.conf.
> 
> Should that be clear to me why we want that? Or could you add an extra
> line of explanation, please?
> 

Well, I think it's generally a good idea to give firmware builders more
control over the contents of distfeeds.conf.

In Gluon, the concrete reason is that we want all standard OpenWrt feeds to
be available to users, even though we do not include all these feeds in the
build. I can add a bit more explanation to the commit message.

Matthias
Rafał Miłecki July 12, 2018, 4:04 a.m. UTC | #3
On Wed, 11 Jul 2018 at 21:39, Matthias Schiffer
<mschiffer@universe-factory.net> wrote:
>
> On 07/11/2018 10:59 AM, Rafał Miłecki wrote:
> > On Tue, 10 Jul 2018 at 00:31, Matthias Schiffer
> > <mschiffer@universe-factory.net> wrote:
> >> The src-dummy method does not actually obtain any feed, but it can be used
> >> to insert addtional entries into the opkg distfeeds.conf.
> >
> > Should that be clear to me why we want that? Or could you add an extra
> > line of explanation, please?
> >
>
> Well, I think it's generally a good idea to give firmware builders more
> control over the contents of distfeeds.conf.
>
> In Gluon, the concrete reason is that we want all standard OpenWrt feeds to
> be available to users, even though we do not include all these feeds in the
> build. I can add a bit more explanation to the commit message.

Ah, I see the point now, thanks!
diff mbox series

Patch

diff --git a/scripts/feeds b/scripts/feeds
index 7613d3a107e4..b29e1d5c353d 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'",