On Thu, Sep 17, 2009 at 6:42 PM, Marc - A. Dahlhaus [ Administration | Westermann GmbH ] <mad@wol.de> wrote:
This is because you check for size and echo the delta on the same level of the recursion and the condition checking is wrong. We need to check for the retval of the recursion and actualy throw the error condition up one level when we exceed the sizelimit. The checking can only work one recursion level down from the current level because you push the actual deltas size one level down.
Recursions are fun are't they? ;-D
Both scripts have the same output. For example : 38866 < 139532 : Ignoring dhcpcd-4.0.2-1-i686.pkg.tar.gz 38866 < 88713 : Ignoring dhcpcd-4.0.2-2-i686.pkg.tar.gz 38866 < 87880 : Ignoring dhcpcd-4.0.3-1-i686.pkg.tar.gz 38866 < 67312 : Ignoring dhcpcd-4.0.4-1-i686.pkg.tar.gz 38866 < 57650 : Ignoring dhcpcd-5.0.2-1-i686.pkg.tar.gz vs dhcpcd-3.2.1-1_to_4.0.2-1-i686.delta 139532 dhcpcd-4.0.2-1_to_4.0.2-2-i686.delta 88713 dhcpcd-4.0.2-2_to_4.0.3-1-i686.delta 87880 dhcpcd-4.0.3-1_to_4.0.4-1-i686.delta 67312 dhcpcd-4.0.4-1_to_5.0.2-1-i686.delta 57650 but I checked several other packages as well. So I am not sure what you are trying to explain. Actually I was using the retval first, I just changed it at the end, and kept the same result. But now I just realize there is something wrong about it, and I actually don't know how it works at all. I set deltaname and newsize inside a subshell so normally we cannot access these outside.