Further work on portagear file and inventoryutil.