Re: [PATCH] Add a mirrorlist option.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesse Keating wrote:
This option allows us to pass a mirrorlist into buildinstall instead of or in
addition to baseurls.  This will allow the yum object to make use of a list of
potential mirrors should it have difficulties downloading something.
---
 scripts/buildinstall |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/scripts/buildinstall b/scripts/buildinstall
index 4266d83..829d33c 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -67,6 +67,10 @@ while [ $# -gt 0 ]; do
 	    UPDATES=$2
 	    shift; shift
 	    ;;
+	--mirrorlist)
+	    MIRRORLIST="$MIRRORLIST $2"
+	    shift; shift
+	    ;;
*)
         if [ -z "$REPO" ]; then
@@ -142,6 +146,19 @@ EOF
     let n++
 done
+n=1
+for l in $MIRRORLIST; do
+    cat >> $yumconf <<EOF
+
+[anaconda-mirrorlistrepo-$n]
+name=anaconda mirrorlist repo $n
+mirrorlist=$l
+enabled=1
+EOF
+    let n++
+done
+
+
BUILDINSTDIR=`mktemp -d ${TMPDIR:-/tmp}/buildinstall.tree.XXXXXX`
 TREEDIR=`mktemp -d ${TMPDIR:-/tmp}/treedir.XXXXXX`




One of the great problems I, and many others, have had with Linux OS over they years, and this applies particularly to Anaconda, is documentation[1].

The proper place for documentation is with the package, and the proper time to document a feature is when it's added.

Reasons that "with the package" is the right place for the documentation include: 1. Anyone using the package has the package and therefore the documentation. Documentation "out there in someone's wiki" can be hard to find. 2. If done properly, the documentation with the package refers to that version of the package. Documentation "out there in someone's wiki" might refer to any version at all, or someone's perception of the package and, if maintained by a third party, is likely to omit useful new features such as this.

Where is the documentation for this new feature?




[1] I've generally been ignoring patches on this list; this one attracted my attention because I "have a thing" about mirror lists, and the it's small enough that the lack of, and need for, documentation are fairly obvious. I'm sure comments apply equally to many other patches.

All that aside, the guts of the patch can be expressed this way too:

n=1
for l in $MIRRORLIST; do
    echo "\
[anaconda-mirrorlistrepo-$n]
name=anaconda mirrorlist repo $n
mirrorlist=$l
enabled=1

"
    let n++
done >$yumconf

Depending on the shell, the "let n++" might be simplified to "++n."
It should run more quickly:
  1. Fewer fork(), exec() calls (unless in busybox).
  2. Doesn't repeatedly reopen the output file and seek to the end
though probably nobody will notice.

--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux