On Fri, Feb 15, 2008 at 08:34:52PM -0500, Nathan Jones wrote:
For the first patch, I added the -n flag to gzip in order to prevent the md5sum problem. The apply-delta script is not as efficient as it could be. There is an extra gunzip+gzip step that could be avoided if we create a delta on the .tar rather than the .tar.gz. Doing so would complicate makepkg a bit, so I stuck with the extra step.
Hm well, I have a stupid question : why is this better than the previous way of recreating the package? Before your patch, we only had overhead once at package / delta creation time, while after, we have it every time the delta is applied, right?
For the second patch, I created a second function, create_xdelta_latest, which creates a delta for the latest package with a given package name. I did this because otherwise a delta would be created for every package given on the command line which is annoying for me because I use *.pkg.tar.gz.
My comment here is rather on the previous code that you refactored than your patch itself. I really wish things could be much simpler here, it's all pretty complicated. What about dropping all this filenames parsing / version comparisons stuff, and try to reimplement this in a much more basic way in repo-add? Since repo-add removes an entry and add a new one in the database, we should be able to easily fetch the informations from these entries, and generate a delta between both. What do you think? I think this should work perfectly when using core / extra / community repos. Using testing repo complicates everything though, because packages are moved between repos. But is it really a big problem if the tools don't handle this situation automatically? Maybe we could allow a way to let the packager specify from which packages deltas should be created.