Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo ohne Internet aktuell halten / installieren
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
ralix
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2002
Posts: 101
Location: Potsdam

PostPosted: Thu Mar 20, 2003 8:00 am    Post subject: Gentoo ohne Internet aktuell halten / installieren Reply with quote

Hallo,

Ab dem 1. April habe ich für einige Zeit keinen Inet zugang mehr zu Hause.
Wie kann ich mein System trotzdem halbwegs aktuell halten, bzw ist es möglich alle pakete und den portage-tree per hand (z.B) cd einzuspielen.
Die pakte könnte ich an der Uni holen und auf cd brennen

MfG ralix
Back to top
View user's profile Send private message
Beforegod
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 1494
Location: Frankfurt/Main

PostPosted: Thu Mar 20, 2003 8:24 am    Post subject: Reply with quote

Solche Themen hatten wir schon oft genug aber ich gebe hier nochmal eine Schritt für Schritt anleitung :

Du kopierst Dir folgende Daten auf eine Diskette/CD :
Code:

/etc/make.conf
/var/db/pkgs
/var/edb/cache/world


Diese entpackst Du auf Deinem Rechner in der Uni /Gentoo System/ und tauscht diese mit den Original Dateien/Verzeichnissen aus (vorher BACKUP MACHEN!!).
Dann ein emerge -uf world und schon biste aktuell.

Danach das komplette /usr/portage/ Verzeichnis packen und auf cd brennen. Zuhause dann einfach das Archiv entpacken und gut ist.

Falls kein Gentoo auf dem Uni Rechner sein sollte (und auch keine Linux usw.) hilft folgende Möglichkeit.

Vom Gentoo Server den aktuellen Portage Snapshot runterladen (unter snapshots auf dem Gentoo Server), zuhause entpacken, eine emerge -up world ausführen und zwar nach diesem Schema :

Code:

emerge -up world > /dateien.liste


Danach die Dateien.liste einfach auf Disk Kopieren oder ausdrucken. und diese Dateien dann in der Uni runterladen. Während dieser Zeit den Portage Zweig nicht aktualisieren, sonst kann es sein das Du wieder neue Dateien brauchst.
Back to top
View user's profile Send private message
ralix
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2002
Posts: 101
Location: Potsdam

PostPosted: Thu Mar 20, 2003 8:43 am    Post subject: Reply with quote

Thx,

Sorry das ich das einfach so gefragt habe, sonst suche ich eigentlich
immer erst. Nur als ich den Brief von meiner Kündigung vom dsl Anschluß
bekommen habe war ich ein wenig durch den Wind.

MfG Ralix
Back to top
View user's profile Send private message
skipjack
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2003
Posts: 75

PostPosted: Fri Mar 21, 2003 12:09 am    Post subject: Reply with quote

:twisted: gut das du das nochmal so öfentlich erklärt hast nun weis ich das auch hab zwar dhaeim dsl aber nur lite und mein linux rehcner geht über den window srechner online (ja ich bin total bescheuert *fg*) und dann kann ich mittags die snapshot saugen und dann alels instalieren lassen hehe
THX
Back to top
View user's profile Send private message
_tove_
n00b
n00b


Joined: 06 May 2003
Posts: 1

PostPosted: Tue May 06, 2003 6:11 pm    Post subject: Reply with quote

Hallo,

so richtig vollständig ist obige Beschreibung (wenn man kein Gentoo-System hat) nicht:
'emerge -up world' liefert nur die Namen der Packete. Es kommt aber häufig vor, dass dann mehrere Dateien heruntergeladen werden müssen.

Ein weiteres Vorgehen (ich gehe davon aus, dass man seine distfiles nicht sofort löscht, wenn man keine schnelle kostengünstige Anbindung hat):

'emerge -uf world', während man offline ist, überprüft, ob die Dateien lokal vorhanden sind, und will ggf. einen Download starten (der natürlich fehlschlägt.) Hierdurch kann man erkennen, für welche Packete Dateien fehlen (und hat sofort einen Downloadadresse). Das Problem ist auch hier: Bei der ersten fehlenden Quelle bricht emerge ab und geht zum nächsten Packet weiter. (Was hilft es, wenn man nur eine von fünf Dateien eines Packetes hat?)
Danach kann man noch ein 'emerge -upf <Packetname>' oder 'emerge -upf world' machen. Dies liefert alle möglichen Downloadadressen. Wenn man diese mit zu einem internetangebundenen Rechner nimmt, kann man sich die notwendigen Packete herunterladen. (Leider geht es nicht automatisch mit wget, da häufig Alternativadressen angegeben sind.)
Back to top
View user's profile Send private message
rdx
n00b
n00b


Joined: 05 Sep 2002
Posts: 54
Location: Switzerland

PostPosted: Fri Jun 06, 2003 9:14 am    Post subject: Reply with quote

skipjack wrote:
linux rehcner geht über den window srechner online (ja ich bin total bescheuert *fg*)

gettin' OT: wieso nicht anders rum?! :lol:
Back to top
View user's profile Send private message
piquadrat
Guru
Guru


Joined: 18 Feb 2003
Posts: 301
Location: Switzerland

PostPosted: Sun Jul 20, 2003 12:28 pm    Post subject: Reply with quote

Wieso nicht einfach so:
"emerge -upf world > liste" -> schreibt die URLs aller benötigten Dateien in die Datei 'liste' (z.T. mehrfach, was uns aber nicht stört). Wichtig ist das p - Flag, damit er nicht probiert, die Files direkt zu holen, was zu unschönen Fehlermeldungen führt, die wir in unserer Downloadliste nicht brauchen können.
Die Liste kannst du dann an der Uni oder wo auch immer wenn möglich an einem Unix/Linux PC an wget übergeben:
wget -c -i liste
(-c, damit er angebrochene Downloads weiterführt bzw. bereits runtergeladene Files nicht nochmals holt). Falls kein Unix/Linux PC greifbar ist, bekommst du eine win32 Version von wget bei http://unxutils.sf.net
Dateien brennen, finito.

[edit]
Hätte _tove_'s Post fertig lesen sollen, er erwähnt ja auch -upf. Aber Alternativadressen sollten mit dem c-Flag bei wget keine Probleme machen...
[/edit]
Back to top
View user's profile Send private message
tuxfan
Apprentice
Apprentice


Joined: 14 Feb 2003
Posts: 257

PostPosted: Thu Sep 18, 2003 11:42 pm    Post subject: Reply with quote

Bei mir funktioniert "emerge -upf world > liste" so nicht, da in der Datei nur die Dateien auftauchen, die bereits auf meinem Rechner sind. Die fehlenden werden trotzdem auf der Konsole ausgegeben. Deswegen mußte ich die Anweisung ergänzen, so daß Fehlermeldungen auch mit in die Datei reingeschrieben werden.
Code:
emerge -upf world >& liste

Und schon funktioniert es wie angegeben.
Back to top
View user's profile Send private message
Donnergurgler
Apprentice
Apprentice


Joined: 17 Jan 2003
Posts: 202
Location: Schnongs-Zone

PostPosted: Mon Oct 20, 2003 8:16 am    Post subject: Reply with quote

Bei mir haben die Alternativ-Adressen in der Updateliste für
wget Probleme bereitet.

Vielleicht lags an dem Proxy, der erst überwunden werden
musste (Eintrag in der 'wgetrc') :?:

Ausweg bei mir:
Jede (ALternativ-) Adresse in eine eigene Zeile schreiben,
bzw. die Liste nachbearbeiten und schon funktionierts :D


Ciao,
Jens
Back to top
View user's profile Send private message
Donnergurgler
Apprentice
Apprentice


Joined: 17 Jan 2003
Posts: 202
Location: Schnongs-Zone

PostPosted: Mon Nov 03, 2003 11:32 am    Post subject: Reply with quote

Hier noch Ergänzungen, die euch evtl. auch interessieren könnten.

Zunächst die Liste 'liste' mit den benötigten Quell-Archiven wie im Thread
beschrieben erstellen.

Danach die vielen Alternativen in jeder Zeile aus der 'liste' löschen
und in 'liste.gekürzt' schreiben:
Quote:
# sed -e 's/ .*//g' liste > liste.gekürzt

Für einen schnellen Download noch einen zentralen dt. Mirror (z.B.
Uni-Erlangen.de) für die Distfiles angeben und an 'liste.gekürzt.schnell'
übergeben:
Quote:
# sed -e 's/^.*\//http:\/\/ftp.uni-erlangen.de\/pub\/mirrors\/gentoo\/distfiles\//g' liste.gekürzt > liste.gekürzt.schnell

Viele Hochschulen bieten ihren Studenten ein Login auf ihren
Unix-Server mit etwas Speicherplatz an. Man braucht sich nur
mal im RZ erkundigen!
Dort einloggen und evtl. die Proxy-Einstellungen exportieren
(mal im Web-Browser nachsehen):
Quote:
# export http_proxy="PROXY:PORT"
# export ftp_proxy="PROXY:PORT"

Ein Verzeichnis für die Distfiles erstellen und den Download anstoßen:
Quote:
# mkdir gentoo-distfiles
# cd gentoo-distfiles
# nohup wget -c -Y on -i liste.gekürzt.schnell &


'Nohup' verhindert beim Verlassen der Shell, dass 'wget' beendet wird,
sollte der Download sich nicht über Minuten, sondern Stunden hinziehen.
Die Option '-Y on' ist nur bei einem Proxy notwendig.

Wer will kann sich wie folgt über den Fortgang der Downloads informieren:
Quote:
# tail -f nohup.out

Heraus kommt man wieder mit CTRL-C.


Ciao und viel Spaß!
Jens
Back to top
View user's profile Send private message
ruth
Retired Dev
Retired Dev


Joined: 07 Sep 2003
Posts: 640
Location: M / AN / BY / GER

PostPosted: Wed Nov 19, 2003 12:50 pm    Post subject: Reply with quote

moin,
ich habe mir auch noch meine gedanken dazu gemacht,
speichert die datei als fetchpack.pl z.b. nach /usr/sbin ab.
noch g'scheit chmodden und gut isses... ;-)

alles weitere ist selbsterklärend... ;-)
Code:

#!/usr/bin/perl
#
# (c) 2003 by rootshell <fernsehleo@gmx.net>
#
# version 0.6  initial public release  18/11/2003
# changelog:
# 20/11/2003: added <br> to html code
#             added warning for MS IE ;-)
#             better handling of output filename
#
# If you have any comments, suggestions, etc., feel free to send me a mail ;-)
# flames and other things like that will go to /dev/null
#
#  This script is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
use Getopt::Long;
GetOptions(   "help" => \$help,
      "package=s" => \$package,
      "html" => \$html,
      "output=s" => \$output,
      "update" => \$update
);
print "\nThis is fetchpack.pl v0.6 (c) 2003 by rootshell <fernsehleo\@gmx.net>\n\n";
$user = 'id -u';
if ($user == 0) {
   print "OK, you are root ;-)\n";
}
else {
   print "Sorry, you are not root - exiting ;-(\n";
   exit;
}
if ($help) {
   print "fetchpack.pl is a utility to keep Gentoo Linux up to date without\n";
   print "an Internet Connection.\n";
   print "it creates a textfile, that is usable for 'wget -c -i'\n";
   print "on UN*X Systems or a html file with hyperlinks\n";
   print "for easy download via browser on other Machines.\n";
   print "Options:\n";
   print "--help       show this text\n";
   print "--package    choose package to install\n";
   print "             for example [ world | system | mplayer ]\n";
   print "--html       output list as html file\n";
   print "--output     name of the created file\n";
   print "             not necessary, if you don't give --output,\n";
   print "             the name of the emerged packages will be used\n";
   print "             for the filename\n";
   print "--update     call emerge with -u\n";
   print "file extensions (.txt or .html) will be appended automacigally\n";
   print "Examples:\n";
   print "# fetchpack.pl --package mplayer --html --output dllist\n";
   print "will create a html file (dllist.html) with hyperlinks to all\n";
   print "required packages for a mplayer installation on this machine.\n";
   print "# fetchpack.pl --package mplayer --output dllist\n";
   print "will create a simple textfile (dllist.txt)\n";
   print "that you can use with\n";
   print "# wget -c -nc -i dllist.txt\n";
   print "# fetchpack.pl --package world --html --update --output world\n";
   print "will create a html file (world.html) with all the required\n";
   print "URL's to perform a world update on this machine.\n";
   print "note:\n";
   print "if you created a html file, NEVER ever try to download\n";
   print "the files using MS IE - most files will be unusable... \n";
   print "**********************************************************************\n";
   print "* fetchpack.pl is (c) 2003 by rootshell and released under the GPLv2 *\n";
   print "*                   email: <fernsehleo_at_gmx.net                    *\n";
   print "**********************************************************************\n";
exit;
}
if ($package eq "") {
   print "please give me a packagename with --package or try --help\n";
   print "for instructions ;-)\n";
   exit;
}
if ($output eq "") {
   $output = $package;
}
if (open(FILE, "< raw_download.txt")) {
   print "previous tempfile found - removing...\n";
   close (FILE);
   system ("rm raw_download.txt")
}

if ($html) {
   print "Setting Output-Filename to: $output.html\n";
   if (open(FILE, "< $output.html")) {
           print "previous outputfile found - removing...\n";
           close (FILE);
           system ("rm $output.html")
   }
} else {
   print "Setting Output-Filename to: $output.txt\n";
   if (open(FILE, "< $output.txt")) {
           print "previous outputfile found - removing...\n";
           close (FILE);
           system ("rm $output.txt")
   }
}

if ($update) {
   $up = "-u";
}

$status = system("emerge $up --fetchonly -p $package 2>raw_download.txt");
if ($html) {
   print "creating html outputfile: $output.html...\n";
   open(HTML,">>$output.html") or die "unable to open outputfile: $output.html\n";
   print HTML "<!doctype html public \"-//W3C//DTD HTML 3.2 Final//EN\">\n";
   print HTML "<html><head>\n";
   print HTML "<meta http-equiv=\"Content-Type\" content=\"text/html; Charset=iso-8859-1\">\n";
   print HTML "<title>Downloadlist for Gentoo Linux / created by fetchpack.pl</title>\n";
   print HTML "</head>\n";
   print HTML "<body>\n";
}
else {
   print "creating txt outputfile: $output.txt...\n";
   open(TEXT,">>$output.txt") or die "unable to open outputfile: $output.txt\n";
}
open(FILE,"<./raw_download.txt") or die "unable to open tempfile.";
@lines = <FILE>;
foreach $line (@lines) {
   ($uri1,$uri2,$uri3,$uri4,$uri5) = split (" ",$line);
   test_if_url ($uri1);
   if ($html) {
      do_print_html ($uri1) unless $ok == 1;
   } else {
   print TEXT "$uri1\n" unless $ok == 1;
   }
   test_if_url ($uri2);
   if ($html) {
      do_print_html ($uri2) unless $ok == 1;
   } else {
   print TEXT "$uri2\n" unless $ok == 1;
   }
   test_if_url ($uri3);
        if ($html) {
                do_print_html ($uri3) unless $ok == 1;
        } else {
        print TEXT "$uri3\n" unless $ok == 1;
        }
   test_if_url ($uri4);
        if ($html) {
                do_print_html ($uri4) unless $ok == 1;
        } else {
        print TEXT "$uri4\n" unless $ok == 1;
        }
   test_if_url ($uri5);
        if ($html) {
                do_print_html ($uri5) unless $ok == 1;
        } else {
        print TEXT "$uri5\n" unless $ok == 1;
        }
if ($html) {
   print HTML "<hr noshade size=1>\n";
}
}

sub test_if_url {
my $a = $_[0];
if( $a =~ m/http/ || $a =~ m/ftp/ ) {
   return $ok = 0;
}
else {
}
return $ok = 1;
}
sub do_print_html {
my $b = $_[0];
   print HTML "<a href=$b><b>$b</b><br>\n";
return 0;
}
if ($html) {
   print HTML "</body>\n";
   print HTML "</html>\n";
   close (HTML);
   print "$output.html closed ;-)\n";
} else {
close TEXT;
print "output.txt closed ;-)\n";
}
if (open(FILE, "< raw_download.txt")) {
        print "removing tempfile...\n";
        close (FILE);
        system ("rm raw_download.txt")
}
exit;


viel spass + rfc, bitte ;-)

[EDIT]
statt wget -c -i ist ausserdem -nc empfehlenswert
sodass der aufruf
Code:

wget -c -nc -i [/pfad/zur/datei]

heissen sollte
ausserdem arbeitet das script _NICHT_ mit portage < 0.49;
der benötigte aufruf von emerge resultiert in einem syntaxfehler... ;-(
tja, portage ist halt interprtiert... :-)
das ist _kein_ fehler des scriptes, sondern des portage systems...
ist für einen ersten update von einem 1.4 iso halt besch****
kann aber leider nix dran ändern...
wenn jemand die genaue portage version wissen sollte, ab der
der aufruf _nicht_ mehr in einem desaster endet, bitte mir mitteilen,
sodass das script dieses abfangen kann - danke ;-)
[/EDIT]


gruss
rootshell
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Tue Dec 02, 2003 6:35 pm    Post subject: Reply with quote

Dieses Thema wird in unserer Gentoo-Forums-FAQ erläutert:

(http://gentoo.diefleissigen.de)

mod edit by amne - neue URL:
http://www.gentoofaq.org/36-de-2

Detached Thread.
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
ruth
Retired Dev
Retired Dev


Joined: 07 Sep 2003
Posts: 640
Location: M / AN / BY / GER

PostPosted: Thu Dec 04, 2003 6:57 pm    Post subject: Reply with quote

moin,
aber mein script ist besser als die beschreibung in den FAQ... ;-)

gruss
rootshell
aus z.zt USA ;-)
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Thu Dec 04, 2003 7:33 pm    Post subject: Reply with quote

rootshell wrote:
moin,
aber mein script ist besser als die beschreibung in den FAQ... ;-)

gruss
rootshell
aus z.zt USA ;-)


Gut, dann melde dich an und schreibe das Dokument um. :D

Gruß,
ian!
von z.Zt. Zuhause ;)
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
ska-rockt
n00b
n00b


Joined: 28 Dec 2002
Posts: 3

PostPosted: Sat Jan 31, 2004 10:29 pm    Post subject: ...und wenn ich schon Dateien habe ? Reply with quote

Hallo rootshell,

Danke für dein klasse script ! Ich kann leider gar kein Perl drum die Frage:
Gibts ne Möglichkeit, das das Script checkt, ob die Datei schon das ist ?
Vieleicht sogar mit digest Prüfung ?

Grüße in die USA
Back to top
View user's profile Send private message
ruth
Retired Dev
Retired Dev


Joined: 07 Sep 2003
Posts: 640
Location: M / AN / BY / GER

PostPosted: Sun Feb 01, 2004 2:11 pm    Post subject: Reply with quote

hi,

zu deiner frage:
????????????????????????????
wie meinst du das?


gruss
rootshell
Back to top
View user's profile Send private message
ska-rockt
n00b
n00b


Joined: 28 Dec 2002
Posts: 3

PostPosted: Sun Feb 01, 2004 6:18 pm    Post subject: Reply with quote

Hallo nochmal,

ich habe z.B. die xyz.tar.bz2 weil ich mal xyz-r1.ebuild gebaut habe...,
bei einem
Code:
emerge -puD
world kommt jetzt u.a. xyz-r3.ebuild.
Mit deinem Scipt kommt im Moment xyz.tar.bz2 mit auf die "Liste".

Die Dateien zu meinem OnlineRechner mitzunehmen geht nicht, weil ich im Offlinerechner keinen Brenner habe. (dann könnte wget ja beim downloaden entscheiden was er braucht und was nicht).

Das mit dem digest kam mir in den Kopf, weil mein OfflineRechner nicht ganz offline ist (Modem) und ich manche Kleinigkeiten halt dann doch durch die kleine Leitung ziehe. Wenn bei den Kleinigkeiten was großes dazwischen kommt breche ich ab => Datei ist da, aber nicht ganz.

Wenn ich mich jetzt noch nicht klar genug ausdrücken konnte vieleicht weiter mit PM ?

Grüßle
Back to top
View user's profile Send private message
bitcrawler
n00b
n00b


Joined: 25 Dec 2003
Posts: 37

PostPosted: Fri Mar 12, 2004 5:01 pm    Post subject: Reply with quote

Hallo!

Bei der ganzen Sache hab ich ein Problem:

Code:

emerge --fetchonly -p PAKET 2> paketliste.txt


gibt mir eine ganze reihe von mirrors mit ein und derselben datei mit einem leerzeichen getrennt aus.
Darauf hin bringt wget fehler beim runterladen, da es die nächste folgende mirror-url als pfad auf dem server annimmt.
Das sieht dann so aus:
Code:

Verbindungsaufbau zu ftp.uni-erlangen.de[131.188.3.71]:21... verbunden.
Anmelden als anonymous ... Angemeldet!
==> SYST ... fertig.    ==> PWD ... fertig.
==> TYPE I ... fertig.  ==> CWD /pub/mirrors/gentoo/distfiles/espgs-7.07.1-source.tar.bz2 http:/aleron.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-sour
ce.tar.bz2 http:/twtelecom.dl.sourceforge.net/sourceforge/espgs/espgs-7.0
7.1-source.tar.bz2 http:/osdn.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-s
ource.tar.bz2 http:/belnet.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-s
ource.tar.bz2 http:/switch.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-s
ource.tar.bz2 http:/unc.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-source
.tar.bz2 http:/heanet.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-so
urce.tar.bz2 http:/keihanna.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-
source.tar.bz2 http:/cesnet.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-so
urce.tar.bz2 http:/easynews.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1
-source.tar.bz2 http:/umn.dl.sourceforge.net/sourceforge/espgs ...
Das Verzeichnis »pub/mirrors/gentoo/distfiles/espgs-7.07.1-source.ta
r.bz2 http:/aleron.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-sour
source.tar.bz2 http:/osdn.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-source
.tar.bz2 http:/belnet.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-sour
ce.tar.bz2 http:/switch.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-sour
ce.tar.bz2 http:/unc.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-source.t
ar.bz2 http:/heanet.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-sour
e.tar.bz2 http:/keihanna.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-s
ource.tar.bz2 http:/cesnet.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1-sour

ce.tar.bz2 http:/easynews.dl.sourceforge.net/sourceforge/espgs/espgs-7.07
.1-source.tar.bz2 http:/umn.dl.sourceforge.net/sourceforge/espgs« gibt es nicht.

--17:25:42--  ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/distfiles/ghostscript-fon
ts-std-8.11.tar.gz%20ftp:/mirror.cs.wisc.edu/pub/mirrors/ghost/fonts/ghostscript-fonts-std-8.11.tar.gz



Es wird praktisch das Leerzeichen mit "%20" escaped.
Am sinnvollsten wäre es imho, wenn eben nur _ein_ einziger mirror eingetragen wäre und somit für das jeweilige Paket nur eine Zeile ausgegeben wird.
Allerdings kann das ja auch nicht die optimale Lösung sein, da es bei rootshells script ja anscheinend auch bei den meisten funktioniert. (Bei mir nicht, aber das ist ein anderes Problem...sorry rootshell *schäm*)

Ich dneke, es hat bestimmt einer von euch ne lösung auf Lager, mit fällt im moment absolut nix ein...
Ach ja, in der /etc/make.conf ist momentan nur ein mirror eingetragen!
Back to top
View user's profile Send private message
Pette
n00b
n00b


Joined: 14 Feb 2004
Posts: 46
Location: Hamburg / Germany

PostPosted: Thu Jan 06, 2005 1:34 pm    Post subject: Reply with quote

Hallo!

Ich hätte da mal ne Frage/Bitte:

Wäre es möglich, das Skript so abzuändern, dass erst im $DISTDIR nachgeschaut wird, ob die Datei nicht vielleicht doch schon existiert,
und dann die Zeile in die output-datei geschrieben wird? Sodaß nur Einträge in der output-datei stehen, die auch wirklich noch im $DISTDIR fehlen.
Back to top
View user's profile Send private message
Pette
n00b
n00b


Joined: 14 Feb 2004
Posts: 46
Location: Hamburg / Germany

PostPosted: Fri Jan 07, 2005 3:59 pm    Post subject: Reply with quote

Also ich habe mir da mal meine eigenen Gedanken gemacht und das Skript ein wenig verändert:

Code:

#!/usr/bin/perl
#
# (c) 2003 by rootshell <fernsehleo@gmx.net>
#
# version 0.6  initial public release  18/11/2003
# changelog:
# 20/11/2003: added <br> to html code
#             added warning for MS IE ;-)
#             better handling of output filename
#
# If you have any comments, suggestions, etc., feel free to send me a mail ;-)
# flames and other things like that will go to /dev/null
#
#  This script is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
use Getopt::Long;
GetOptions(   "help" => \$help,
      "package=s" => \$package,
      "html" => \$html,
      "output=s" => \$output,
      "update" => \$update
     );
print "\nThis is fetchpack.pl v0.6 (c) 2003 by rootshell <fernsehleo\@gmx.net>\n\n";
$user = 'id -u';
if ($user == 0) {
   print "OK, you are root ;-)\n";
}
else {
   print "Sorry, you are not root - exiting ;-(\n";
   exit;
}
if ($help) {
   print "fetchpack.pl is a utility to keep Gentoo Linux up to date without\n";
   print "an Internet Connection.\n";
   print "it creates a textfile, that is usable for 'wget -c -i'\n";
   print "on UN*X Systems or a html file with hyperlinks\n";
   print "for easy download via browser on other Machines.\n";
   print "Options:\n";
   print "--help       show this text\n";
   print "--package    choose package to install\n";
   print "             for example [ world | system | mplayer ]\n";
   print "--html       output list as html file\n";
   print "--output     name of the created file\n";
   print "             not necessary, if you don't give --output,\n";
   print "             the name of the emerged packages will be used\n";
   print "             for the filename\n";
   print "--update     call emerge with -u\n";
   print "file extensions (.txt or .html) will be appended automacigally\n";
   print "Examples:\n";
   print "# fetchpack.pl --package mplayer --html --output dllist\n";
   print "will create a html file (dllist.html) with hyperlinks to all\n";
   print "required packages for a mplayer installation on this machine.\n";
   print "# fetchpack.pl --package mplayer --output dllist\n";
   print "will create a simple textfile (dllist.txt)\n";
   print "that you can use with\n";
   print "# wget -c -nc -i dllist.txt\n";
   print "# fetchpack.pl --package world --html --update --output world\n";
   print "will create a html file (world.html) with all the required\n";
   print "URL's to perform a world update on this machine.\n";
   print "note:\n";

   print "if you created a html file, NEVER ever try to download\n";
   print "the files using MS IE - most files will be unusable... \n";
   print "**********************************************************************\n";
   print "* fetchpack.pl is (c) 2003 by rootshell and released under the GPLv2 *\n";
   print "*                   email: <fernsehleo_at_gmx.net                    *\n";
   print "**********************************************************************\n";
   exit;
}
if ($package eq "") {
   print "please give me a packagename with --package or try --help\n";
   print "for instructions ;-)\n";
   exit;
}
if ($output eq "") {
   $output = $package;
}
if (open(FILE, "< raw_download.txt")) {
   print "previous tempfile found - removing...\n";
   close (FILE);
   system ("rm raw_download.txt")
}

if ($html) {
   print "Setting Output-Filename to: $output.html\n";
   if (open(FILE, "< $output.html")) {
      print "previous outputfile found - removing...\n";
      close (FILE);
      system ("rm $output.html")
   }
} else {
   print "Setting Output-Filename to: $output.txt\n";
   if (open(FILE, "< $output.txt")) {
      print "previous outputfile found - removing...\n";
      close (FILE);
      system ("rm $output.txt")
   }
}

if ($update) {
   $up = "-u";
}

$status = system("emerge $up --fetchonly -p $package 2>raw_download.txt");
if ($html) {
   print "creating html outputfile: $output.html...\n";
   open(HTML,">>$output.html") or die "unable to open outputfile: $output.html\n";
   print HTML "<!doctype html public \"-//W3C//DTD HTML 3.2 Final//EN\">\n";
   print HTML "<html><head>\n";
   print HTML "<meta http-equiv=\"Content-Type\" content=\"text/html; Charset=iso-8859-1\">\n";
   print HTML "<title>Downloadlist for Gentoo Linux / created by fetchpack.pl</title>\n";
   print HTML "</head>\n";
   print HTML "<body>\n";
}
else {
   print "creating txt outputfile: $output.txt...\n";
   open(TEXT,">>$output.txt") or die "unable to open outputfile: $output.txt\n";
}
open(FILE,"<./raw_download.txt") or die "unable to open tempfile.";
@lines = <FILE>;
foreach $line (@lines) {
   ($uri1,$uri2,$uri3,$uri4,$uri5) = split (" ",$line);
   test_if_url ($uri1);
   test_file_exists ($uri1);
   if ($html) {
      do_print_html ($uri1) unless $ok == 1;
   } else {
      print TEXT "$uri1\n" unless $ok == 1;
   }
   test_if_url ($uri2);
   test_file_exists ($uri2);
   if ($html) {
      do_print_html ($uri2) unless $ok == 1;
   } else {
      print TEXT "$uri2\n" unless $ok == 1;
   }
   test_if_url ($uri3);
   test_file_exists ($uri3);
   if ($html) {
      do_print_html ($uri3) unless $ok == 1;
   } else {
      print TEXT "$uri3\n" unless $ok == 1;
   }
   test_if_url ($uri4);
   test_file_exists ($uri4);
   if ($html) {
      do_print_html ($uri4) unless $ok == 1;
   } else {
      print TEXT "$uri4\n" unless $ok == 1;
   }
   test_if_url ($uri5);
   test_file_exists ($uri5);
   if ($html) {
      do_print_html ($uri5) unless $ok == 1;
   } else {
      print TEXT "$uri5\n" unless $ok == 1;
   }
   if ($html) {
      print HTML "<hr noshade size=1>\n";
   }
}

sub test_if_url {
   my $a = $_[0];
   if( $a =~ m/http/ || $a =~ m/ftp/ ) {
      return $ok = 0;
   }
   else {
   }
   return $ok = 1;
}
sub do_print_html {
   my $b = $_[0];
   print HTML "<a href=$b><b>$b</b><br>\n";
   return 0;
}
sub test_file_exists {
   my $c = $_[0];
   $start = rindex($c,"/") + 1;
   $filename = substr($c,$start);
   if (-f "/usr/portage/distfiles/$filename") {
      return $ok = 1;
   }
}

if ($html) {
   print HTML "</body>\n";
   print HTML "</html>\n";
   close (HTML);
   print "$output.html closed ;-)\n";
} else {
   close TEXT;
   print "output.txt closed ;-)\n";
}
if (open(FILE, "< raw_download.txt")) {
   print "removing tempfile...\n";
   close (FILE);
   system ("rm raw_download.txt")
}
exit;


Also ich habs ein paar mal getestet, und es scheint zu funktionieren.
Allerdings funktioniert es nur, wenn $DISTDIR auf "/usr/portage/distfiles" gesetzt ist in der make.conf.

Vielleicht findet ja der ein oder andere Verwendung für diese abgeänderte Variante.

Greetz,
Pette


// EDIT: Hab die Zeile 'print HTML "<hr noshade size=1>\n";' wieder in ihren ürspringlichen Zustand versetzt. Jetzt werden in der HTML Datei zwar ein paar Striche zuviel erzeugt, aber es ist dennoch übersichtlicher und geordneter.
Back to top
View user's profile Send private message
c07
Veteran
Veteran


Joined: 25 Oct 2002
Posts: 1091

PostPosted: Sun Mar 27, 2005 12:59 pm    Post subject: Reply with quote

Übrigens kriegt man eine vernünftige Liste ziemlich leicht mit
Code:
. /etc/make.globals; . /etc/make.conf
emerge -pf was man halt alles will 2>&1>/dev/null | fgrep : | cut '-d ' -f1 | fgrep -vf<(ls -C $DISTDIR)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum