docker-squash 1.2.1__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {docker_squash-1.2.1/docker_squash.egg-info → docker_squash-1.2.2}/PKG-INFO +2 -2
  2. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/image.py +4 -3
  3. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/squash.py +5 -2
  4. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/v2_image.py +2 -3
  5. docker_squash-1.2.2/docker_squash/version.py +1 -0
  6. {docker_squash-1.2.1 → docker_squash-1.2.2/docker_squash.egg-info}/PKG-INFO +2 -2
  7. docker_squash-1.2.1/docker_squash/version.py +0 -1
  8. {docker_squash-1.2.1 → docker_squash-1.2.2}/LICENSE +0 -0
  9. {docker_squash-1.2.1 → docker_squash-1.2.2}/MANIFEST.in +0 -0
  10. {docker_squash-1.2.1 → docker_squash-1.2.2}/README.rst +0 -0
  11. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/__init__.py +0 -0
  12. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/cli.py +0 -0
  13. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/errors.py +0 -0
  14. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/lib/__init__.py +0 -0
  15. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/lib/common.py +0 -0
  16. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash/v1_image.py +0 -0
  17. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash.egg-info/SOURCES.txt +0 -0
  18. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash.egg-info/dependency_links.txt +0 -0
  19. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash.egg-info/entry_points.txt +0 -0
  20. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash.egg-info/requires.txt +0 -0
  21. {docker_squash-1.2.1 → docker_squash-1.2.2}/docker_squash.egg-info/top_level.txt +0 -0
  22. {docker_squash-1.2.1 → docker_squash-1.2.2}/requirements.txt +0 -0
  23. {docker_squash-1.2.1 → docker_squash-1.2.2}/setup.cfg +0 -0
  24. {docker_squash-1.2.1 → docker_squash-1.2.2}/setup.py +0 -0
  25. {docker_squash-1.2.1 → docker_squash-1.2.2}/tests/test_integ_squash.py +0 -0
  26. {docker_squash-1.2.1 → docker_squash-1.2.2}/tests/test_qa.py +0 -0
  27. {docker_squash-1.2.1 → docker_squash-1.2.2}/tests/test_unit_squash.py +0 -0
  28. {docker_squash-1.2.1 → docker_squash-1.2.2}/tests/test_unit_v1_image.py +0 -0
  29. {docker_squash-1.2.1 → docker_squash-1.2.2}/tests/test_unit_v2_image.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docker-squash
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Docker layer squashing tool
5
5
  Home-page: https://github.com/goldmann/docker-squash
6
- Download-URL: https://github.com/goldmann/docker-squash/archive/1.2.1.tar.gz
6
+ Download-URL: https://github.com/goldmann/docker-squash/archive/1.2.2.tar.gz
7
7
  Author: Marek Goldmann
8
8
  Author-email: marek.goldmann@gmail.com
9
9
  License: MIT
@@ -186,11 +186,12 @@ class Image(object):
186
186
  try:
187
187
  number_of_layers = int(self.from_layer)
188
188
 
189
- self.log.debug("We detected number of layers as the argument to squash")
189
+ self.log.debug(
190
+ f"We detected number of layers ({number_of_layers}) as the argument to squash"
191
+ )
190
192
  except ValueError:
191
- self.log.debug("We detected layer as the argument to squash")
192
-
193
193
  squash_id = self._squash_id(self.from_layer)
194
+ self.log.debug(f"We detected layer ({squash_id}) as the argument to squash")
194
195
 
195
196
  if not squash_id:
196
197
  raise SquashError(
@@ -143,8 +143,11 @@ class Squash(object):
143
143
  # Load squashed image into Docker
144
144
  image.load_squashed_image()
145
145
 
146
- # Clean up all temporary files
147
- image.cleanup()
146
+ # If development mode is not enabled, make sure we clean up the
147
+ # temporary directory
148
+ if not self.development:
149
+ # Clean up all temporary files
150
+ image.cleanup()
148
151
 
149
152
  # Remove the source image - this is the only possible way
150
153
  # to remove orphaned layers from Docker daemon at the build time.
@@ -16,9 +16,6 @@ class V2Image(Image):
16
16
  def _before_squashing(self):
17
17
  super(V2Image, self)._before_squashing()
18
18
 
19
- # New OCI Archive format type
20
- self.oci_format = True
21
-
22
19
  # Read old image manifest file
23
20
  self.old_image_manifest = self._get_manifest()
24
21
  self.log.debug(
@@ -378,6 +375,8 @@ class V2Image(Image):
378
375
 
379
376
  def _get_manifest(self):
380
377
  if os.path.exists(os.path.join(self.old_image_dir, "index.json")):
378
+ # New OCI Archive format type
379
+ self.oci_format = True
381
380
  # Not using index.json to extract manifest details as while the config
382
381
  # sha could be extracted via some indirection i.e.
383
382
  #
@@ -0,0 +1 @@
1
+ version = "1.2.2"
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docker-squash
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Docker layer squashing tool
5
5
  Home-page: https://github.com/goldmann/docker-squash
6
- Download-URL: https://github.com/goldmann/docker-squash/archive/1.2.1.tar.gz
6
+ Download-URL: https://github.com/goldmann/docker-squash/archive/1.2.2.tar.gz
7
7
  Author: Marek Goldmann
8
8
  Author-email: marek.goldmann@gmail.com
9
9
  License: MIT
@@ -1 +0,0 @@
1
- version = "1.2.1"
File without changes
File without changes
File without changes
File without changes
File without changes