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

Re: RSync

Dirk Eddelbuettel <edd@debian.org> writes:

> Shouldn't have to be, especially for someone as Perl-savvy as you. 

Being known as perl-savvy.  Don't know whether to be insulted or
complimented :>  a dark, hidden shame...

Seriously, the problem with mirror's inclusion/exclusion mechanism is
that it's context free.  You get one set of exclusions and one set of
inclusions, applied in a fixed order.

(All the following stated with the caveat that I haven't used fmirror
extensively because it has a socket glitch that kills it here
(slow-link problem?) so it's possible that there are some cases where
perl mirror is glaringly superior that I wouldn't have discovered

Fmirror, OTOH, which has what I consider a superior (readability-wise
at least) mechanism supports a model where you imagine starting off
with a full listing of the ftp site, and then apply a (potentially
interleaved) sequence of inclusions and exclusions to achive your
final mirror list.  In this model a given inclusion overrides all
*subsequent* exclusions.

Fmirror's support of a *list* of includes/excludes means that you
don't have to go so wild with or "|" and parentheses.  In addition,
fmirror has "types" of inclusions/exclusions so that you can say
whether you're talking about a path "p" or a filename "f".  This makes
many of the expressions much simpler, and means that they're less
likely (unless you're really careful in perl mirror) to accidentially
match something you didn't want them to.

As an example, consider my perl mirror in/exclusion spec.


Here's (roughly) the same thing in fmirror:

  # Prune whole dirs we don't want.
  exclude: p ^dists/stable/
  exclude: p hamradio/.*\.deb$

  # Now prune some files.
  exclude: f base12-.*\.bin$
  exclude: f .*1200\.bin
  exclude: f xbooks.*\.deb
  exclude: f kernel-(source|image).*\.deb
  exclude: f win32.*\.deb
  exclude: f lg-(base|issue).*\.deb
  exclude: f python.*\.deb
  exclude: f kde.*\.deb
  exclude: f festvox.*8k_.*\.deb

  # Now say what we *do* want.
  include: p (dists|hamm)/.*/binary-i386/
  include: p (dists|hamm)/.*/binary-all/
  include: p ^dists/[^/]*$

  # And kill all the rest.
  exclude: p .*

To me the fmirror setup is much easier to understand and maintain.

Rob Browning <rlb@cs.utexas.edu>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: