Hi again. You made some good suggestions in you last post, thanks. Those and the output your 'ipkg-files file' made me realize what the problem might be. The version of ipkg that is used in OZ doesn't return directory names, just file names, whereas it seems the one in the sharp rom returns everything. And while directories & symlinks themselves do take up space, that's negligable compared to the files, so I've tweaked the script a bit to take this into account. As well, I discovered another potential problem depending on what directory you're in at the time the script is run, so I've fixed that too.
Try out the latest version & let me know how it goes. This copy won't spit out the debugging output, so if it still doesn't work (cross our fingers), uncomment the TESTING line & attach the output. thks