So in a general case, we may want to set up the valid size limits for the container file and for the unpacked content. It is already true for snaps.
For snaps we are checking the size via a set of functions in common.py (see inline comments), however this functionality is intrinsic to the container and only makes sense in the context of it. Thus, I think it should be part of the base_container class.
The specific values for {min,max}_{,un}packed_size limits will be defined in each subclass (such as SnapContainer, ComponentContainer), but the functionality will be the same
There is some interaction among check_container_size and unpack, so I'm leaving the original functionality in comomon.py for now and it will removed in a follow up MR where unpack funtionality will be moved to the corresponding container class
So in a general case, we may want to set up the valid size limits for the container file and for the unpacked content. It is already true for snaps.
For snaps we are checking the size via a set of functions in common.py (see inline comments), however this functionality is intrinsic to the container and only makes sense in the context of it. Thus, I think it should be part of the base_container class. _{,un}packed_ size limits will be defined in each subclass (such as SnapContainer, ComponentContai ner), but the functionality will be the same
The specific values for {min,max}
There is some interaction among check_container _size and unpack, so I'm leaving the original functionality in comomon.py for now and it will removed in a follow up MR where unpack funtionality will be moved to the corresponding container class