delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/05/19:27:07

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3B44F785.55A1BB47@phekda.freeserve.co.uk>
Date: Fri, 06 Jul 2001 00:25:57 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: schultz AT ma DOT tum DOT de
CC: DJGPP newsgroup <djgpp AT delorie DOT com>,
Zippo Workers <zippo-workers AT egroups DOT com>
Subject: Re: ANNOUNCE: zippo 0.1.4 / DSM specification 0.5.1
References: <200107041917 DOT PAA01051 AT delorie DOT com> <3B442CBC DOT 4527A12C AT ma DOT tum DOT de>
Reply-To: djgpp AT delorie DOT com

Hello.

Waldemar Schultz wrote:
> small problems with directories/wildcards:
> I changed zipporc to have the line
> 
> zip from .,f:/djgppzip
> 
> Case 1:
> -------
> running zippo from e:/djgpp
> 
> bash-2.04$ zippo -v -q -p fil*
> . DJGPP path 'e:/djgpp/'
> . Installation prefix 'e:/djgpp/'
> . Backup prefix 'e:/djgpp/backup/'
> . Reading configuration from 'e:/djgpp/share/zippo/zipporc'
> . Installed DSM path [1]: 'e:/djgpp/share/zippo/db'
> . Installed manifest path [1]: 'e:/djgpp/manifest'
> . Available DSM path [1]: '.'
> . Available DSM path [2]: 'e:/djgpp/share/zippo/db-avail'
> . Available zip path [1]: '.'
> . Available zip path [2]: 'f:/djgppzip'
> . Available gzip'd tar path [1]: '.'
> . Available gzip'd tar path [2]: 'f:/djgppzip'
> fil*: Package unsupported
> Error: Unable to parse DSM!

That's not surprising. When you run:

    zippo -v -q -p fil*

the wildcard tries to match a file in the current directory. If there is
no file matching that name, then it remains unexpanded. zippo tries to
open 'fil*' and fails, because there is no file with that name in
e:/djgpp.

> when I cd to f:/djgppzip it works as expected:
> 
> bash-2.04$ zippo -v -q -p fil*
> . DJGPP path 'e:/djgpp/'
> . Installation prefix 'e:/djgpp/'
> . Backup prefix 'e:/djgpp/backup/'
> . Reading configuration from 'e:/djgpp/share/zippo/zipporc'
> . Installed DSM path [1]: 'e:/djgpp/share/zippo/db'
> . Installed manifest path [1]: 'e:/djgpp/manifest'
> . Available DSM path [1]: '.'
> . Available DSM path [2]: 'e:/djgpp/share/zippo/db-avail'
> . Available zip path [1]: '.'
> . Available zip path [2]: 'f:/djgppzip'
> . Available gzip'd tar path [1]: '.'
> . Available gzip'd tar path [2]: 'f:/djgppzip'
> fileutils 4.0 (binaries)

I guess you have fil40b.zip in f:/djgppzip?

> Case 2:
> -------
> 
> running zippo from e:/djgpp
> 
> bash-2.04$ zippo -q fil*
> findutils 4.1 (binaries)
> ^^^^^^^^^^ ????
> file 3.34 (binaries)
> fileutils 3.16 (binaries)
> fil40b 4.0 release 2 (binaries)
> fil40s 4.0 release 1 (sources)
> 5 package(s) matched
> 
> bash-2.04$ ls manifest/fil*.mft
> manifest/fil316b.mft  manifest/fil40s.mft
> manifest/fil40b.mft   manifest/file334b.mft

You are using a regular expression match on the package names. 'fil*'
means match 'fi' at the start and then zero or more 'l'. So it matches the
packages you see.

BTW you should enclose wildcards in single quotes, unless you want to
match filenames, e.g.:

    zippo -q 'fil*'

I should add some text to the documentation, explaining how package names
are matched. It goes through three steps:

1. exact (simple);
2. regular expression;
3. 'user' specifier format, e.g. 'fileutils 4.0 (binaries)'.

If you want to match 'fil...', use something like this:

    zippo -q 'fil'

> bash-2.04$ pwd
> e:/djgpp
> 
> when I cd to f:/djgppzip:
> 
> bash-2.04$ zippo -q fil*
> fil40b 4.0 release 2 (binaries)
> fil40s 4.0 release 1 (sources)
> 2 package(s) matched
> 
> bash-2.04$ ls fil*
> fil40b.zip  fil40s.zip
> bash-2.04$ pwd
> f:/djgppzip

In this case the wildcard expands to some filenames. I'm not exactly sure
why that matches. I'll take a look when I next have some time (a few weeks
from now).

Hope that helped, bye,

-- 
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019