A Gallai-Edmonds type theorem for the k-piece packing problem