[OpenWrt-Devel] multiple local mirrors, not just one?

Robert P. J. Day rpjday at crashcourse.ca
Wed Oct 1 14:14:22 EDT 2014


  under "Advanced Configuration", there is an option for "Local mirror
for source packages", for which there is no help info and whose
wording suggests that you can have just one such local mirror.
however, i was just perusing scripts/download.pl and in the perl sub
"localmirrors", i noticed two things.

  first, this bit of code:

        my @mlist;
        open LM, "$scriptdir/localmirrors" and do {
            while (<LM>) {
                        chomp $_;
                        push @mlist, $_ if $_;
                }
                close LM;
        };

suggests that you can first have a list of local mirrors in the file
"scripts/localmirrors", which seems a bit odd. is that what the above
is doing? what's the rationale for this?

  also, right after that is the code:

        open CONFIG, "<".$ENV{'TOPDIR'}."/.config" and do {
                while (<CONFIG>) {
                        /^CONFIG_LOCALMIRROR="(.+)"/ and do {
                                chomp;
                                my @local_mirrors = split(/;/, $1);
                                push @mlist, @local_mirrors;
                        };
                }
                close CONFIG;
        };

which seems to make it clear that you can specify multiple local
mirror directories separated by semicolons.

  am i understanding both of these correctly? if i am, i can add some
help info to point this out, although i'm still weirded out by the
"localmirrors" file in the scripts/ directory.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list