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

Re: Archive Restructuring - Package Pool



Philip Hands <phil@hands.com> writes:

> I think Andrew Tridgell was planing to add this to rsync (if he's
> not already done so).

Wonderful.

> You could certainly use rsync's include/exclude lists to aid partial
> mirroring, so I'd suggest using rsync as a starting point, rather
> than mirror.

That would have been my preference, but I didn't mention it so I
wouldn't have to argue whether or not it's OK to make everyone who
wants to do this use rsync rather than ftp.

The only problem I have with rsync is that there's no way to specify
regex excludes.  I *hate* shell globs for anything other than single
directory or interactive use.  Aside from not being powerful enough to
say what I want to say, I've run into too many programs that aren't
consistent about whether they match the whole path, or part of the
path, whether they have a way to match only files, and whether *
matches "/" or not, etc.  Whereas

  ^foo/.*/(bar|baz)/.*\.deb$

  and

  .*/[^/]*foo[^/]*$

are unambiguous.  The former will match paths, the latter only cares
about filenames.  You can make these things a little less ugly if you
take an approach like fmirror's does (which is my favorite so far).
It has mehanisms to simplify the regexps you specify.  For example it
allows you to make a distinction between regexps for files and for
paths so you can leave out all the [^/]* nonsense in the common case:

  exclude: p foo
  exclude: f foo

The first line says exclude anything (any path (which includes files))
that contains foo.  The second says exclude only files containing foo
(which accomplishes the same thing as the much uglier full regex I
gave above).

fmirror also lets you invert regexps which can be *really* helpful
(like this)

  include: px /binary-arm/

Which means get anything except those things that have binary-arm in
the path.

I'd really love to see something like this in rsync as an option.
Find provdes a good example.  You can use globs or regexps, via -name
and -regex, depending on your preference.

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930


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


Reply to: