"Bernhard R. Link" <brl...@debian.org> writes:

> * Goswin von Brederlow <goswin-...@web.de> [100503 12:18]:
>> I recently updated a verry old reprepro instance and it changed the
>> interface for filter scripts. Before the update it would give the
>> Packages.gz file as first argument while not it gives the uncompressed
>> Packages. The filter script used 'zcat "$1" | ...; exit 0'. Since zcat
>> does not cope with uncompressed files the filter script produced a
>> completly empty package list. Subsequently all of the mirror was
>> removed.
>>
>> Now this isn't reprepros fault but it would be nice if reprepro would
>> protect aginst this. This could also happen if upstreams Packages file
>> gets created empty for some reason. It would be nice if reprepro would
>> have a limit of how much change a single update may produce. Say no
>> more than +/-10% of the old archive. If more is changed a command line
>> option should be needed to override this. The 10% should be
>> configurable obviously.
>
> That would cause an incompatible change for all the cases where one
> only want to get a small number of packages from that.

I mean 10% change to the reprepro archive. If you filter the list to
1000 debs then a change of roughly +/-100 debs would be fine. Although
I would check the overall archive size does not change by +/-10% counted
in bytes. So 10 large packages or 500 small ones would be fine.

If one only wants a really small number of packages, say 10, then this
would get in the way. But then one could change the limit. Or there
could be a lower limit under which change is not limited.

> The change for the ListHook is also quite an old one, so I see no reason
> to introduce an incompatible change for that.

This isn't a change for ListHook. With or without ListHook, with or
without FilterFormula, FilterList or ListShellHook. Even without any of
them the upstream mirror might just have a bad day and give a 0 Byte
Packages file. That did happen for ftp.debian.org in the past a few
times. Reprepro should notice such a HUGE change and rather give an
error than destroy the mirror.

> Reprepro should abort if the script returns an error. So I guess an
> set -e earlier should have made catching this easy.

Unfortunately grep-dctrl gives an error if no pattern is found and I
want to use a single filter script for all files. So not all patterns
are found in every filter pass and then set -e would stop the
filter in cases where everything is fine.

But yes, the filter should have returned an error but it didn't. Things
happen. The problem is that it deleted 50GiB of downloaded data.

> Thus I'm closing this bug...

MfG
        Goswin

PS: Even if the change limit is not used by default I would welcome and
use such an option.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to