FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-12-2008, 03:15 PM
Jesse Keating
 
Default Add a mirrorlist option.

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`
--
1.5.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-17-2008, 02:09 AM
John Summerfield
 
Default Add a mirrorlist option.

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@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- 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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org