Browse Source

updates

merge-requests/1/head
Joey Hess 12 years ago
parent
commit
b86020df97
  1. 2
      TODO
  2. 33
      debmirror

2
TODO

@ -0,0 +1,2 @@
It would probably be cleaner and easier to learn if it took
apt-style lines to tell where to mirror from and what portions to use.

33
debmirror

@ -1,8 +1,5 @@
#!/usr/bin/perl -w
# TODO: It would probably be cleaner and easier to learn if it took
# apt-style lines to tell where to mirror from and what portions to use.
=head1 NAME
debmirror - Debian partial mirror script, with ftp, http, hftp or
@ -19,7 +16,11 @@ mirror any combination of architectures, distributions, and sections. Files
are transferred by ftp, and package pools are fully supported. It also does
locking and updates trace files.
To support package pools, this program mirrors in three steps.
The partial mirror created by this program is not suitable to be used as a
public Debian mirror. If that is your aim, you should instead follow
the instructions at L<http://www.debian.org/mirrors/ftpmirror>.
This program mirrors in three steps.
=over 4
@ -28,12 +29,7 @@ To support package pools, this program mirrors in three steps.
First it downloads all Packages and Sources files for the subset of Debian it
was instructed to get.
=item 2. clean up unknown files
Any files and directories on the local mirror that are not in the list are
removed.
=item 3. download everything else
=item 2. download everything else
The Packages and Sources files are scanned, to build up a list of all the
files they refer to. A few other miscellaneous files are added to the list.
@ -41,6 +37,11 @@ Then the program makes sure that each file in the list is present on the
local mirror and is up-to-date, using file size (and optionally md5sum) checks.
Any necessary files are downloaded.
=item 3. clean up unknown files
Any files and directories on the local mirror that are not in the list are
removed.
=back
=cut
@ -1691,7 +1692,7 @@ sub rsync_extra {
push(@includes, "- /project/trace/$hostname");
push(@includes, "/project/trace/*");
push(@ignores, "^project/trace/");
say("Update remote trace files (using rsync).");
say("Updating remote trace files (using rsync) ...");
} elsif ($type eq "doc") {
push(@ignores, "^doc/");
push(@ignores, "^README*");
@ -1714,7 +1715,7 @@ sub rsync_extra {
return if (! @includes);
if (! $early) {
@extras = grep(!/^trace$/, @extras); # drop 'trace' from list
say("Update extra files (using rsync): @extras.");
say("Updating extra files (using rsync): @extras.");
}
rsync_extra_get(@includes);
}
@ -1746,7 +1747,8 @@ sub rsync_extra_get {
for (@result) {
print $fh "$_\n";
}
system ("rsync --timeout=$timeout $opt $rsyncremote --delete --include-from=$rsynctempfile --exclude='*' $mirrordir");
# intentionally not checked: mirror may not support rsync
system("rsync --timeout=$timeout $opt $rsyncremote --delete --include-from=$rsynctempfile --exclude='*' $mirrordir");
close $fh;
unlink $rsynctempfile;
}
@ -2544,11 +2546,12 @@ sub debug {
=head1 COPYRIGHT
This program is copyright 2000-2001 by Joey Hess <joeyh@debian.org>, under
This program is copyright 2000-2001, 2010 by
Joey Hess <joeyh@debian.org>, under
the terms of the GNU GPL (either version 2 of the licence or, at your
option, any later version), copyright 2001-2002 by Joerg Wendland
<joergland@debian.org>, copyright 2003-2007 by Goswin von Brederlow
<goswin-v-b@web.de> and copyright 2009 by Frans Pop <fjp@debian.org>.
<goswin-v-b@web.de> and copyright 2009-2010 by Frans Pop <fjp@debian.org>.
The author disclaims any responsibility for any mangling of your system,
unexpected bandwidth usage bills, meltdown of the Debian mirror network,

Loading…
Cancel
Save