[darcs-users] [patch360] Solve issue1923: bad source warning mechanism warns ab...

Eric Kow kowey at darcs.net
Wed Sep 8 10:44:33 UTC 2010


On Tue, Sep 07, 2010 at 21:30:29 -0500, Adolfo Builes wrote:
> I have been trying to found a test case for such behavior but I
> haven't been able to do it.
> I know it happens when it propagates the remote local sources and
> tries to use it, but  somehow it doesn't happen always.

Actually! I just realised that your patch may have another problem,
so perhaps we should discuss that.

I'll leave the question of testing to you and Petr (if he doesn't mind)
because I haven't fully wrapped my head around the lighthttpd stuff yet,
sorry!

> I tried first using Petr solution with lighthttpd but someone the test
> will pass when it should fail, then I setup an account in my server,
> and did the same to simulate the situation you describe first, and
> then when pulling it wouldn't complain.

For what it's worth, I've got failing tests on the lightttpd stuff with
the new infrastructure, but I haven't gotten around to figuring out why
yet.

Output below (ideas, Petr?)

> >> +            filterExternalSources there = if isFile repodir
> >> +                                          then
> >> +                                            there
> >> +                                          else
> >> +                                            filter (not . isFile . cacheSource) there

One issue here is that if the remote repository is non-local, then we don't do
*any* of the issue1599 checking, not even for paths which are within our
control.

So we have

  _darcs/sources:
    1. /some/expired/local/path
    2. cant at reach-this-either.cz

  foo at example.com:blah/_darcs/sources
    3. /example/local/path/we/dont/control
    4. http://other-bad-stuff

What we want to catch are 1, 2 and 4.  Your issue1599 work catches 1,2,3,4
with 3 being the case we had not considered.  The current version of the
issue1923 patch eliminates 1 and 3, where actually what we really want to
eliminate is just 3.

See what I mean?  How can we address something like this?  Ideally, we'd
know about where the source entries come from.  But maybe eliminating 1
is just unfortunate, but acceptable collateral damage?

issue1599 failing output
------------------------
issue1599-automatically-expire-unused-caches.sh (Darcs2): [Failed]
| 
| skip-formats old-fashioned
| + skip-formats old-fashioned
| + for f in '"$@"'
| + grep old-fashioned /tmp/tmp9289/.darcs/defaults
| + true
| 
| rm -rf R S log && mkdir R
| + rm -rf R S log
| + mkdir R
| cd R
| + cd R
| darcs init
| + darcs init
| echo a > a
| + echo a
| darcs rec -lam a
| + darcs rec -lam a
| Finished recording patch 'a'
| echo b > b
| + echo b
| darcs rec -lam b
| + darcs rec -lam b
| Finished recording patch 'b'
| echo c > c
| + echo c
| darcs rec -lam c
| + darcs rec -lam c
| Finished recording patch 'c'
| cd ..
| + cd ..
| 
| serve_http # sets baseurl
| + serve_http
| + cat
| + trap 'finish_http "/tmp/tmp9289"' EXIT
| + lighttpd -f light.conf
| cat light.pid
| ++ cat light.pid
| + ps
| + baseurl=http://localhost:23032
| darcs get --lazy $baseurl/R S
| + darcs get --lazy http://localhost:23032/R S
| 
| darcs failed:  Not a repository: http://localhost:23032/R (HTTP response code said error)
| finish_http "/tmp/tmp9289"
| + finish_http /tmp/tmp9289
| + test -e /tmp/tmp9289/light.pid
| cat "$1/light.pid"
| ++ cat /tmp/tmp9289/light.pid
| + kill 13672

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey at jabber.fr (Jabber or Google Talk only)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100908/c882e3bc/attachment.pgp>


More information about the darcs-users mailing list