public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [flatpaks/flatpak-runtime] f45: Use gzip for local caches
@ 2026-09-11 14:42 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-09-11 14:42 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : flatpaks/flatpak-runtime
            Branch : f45
            Commit : 96cec4cafb84a88e62a29c2b2d93dc51d05a1aaa
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-03-02T20:29:46-05:00
            Stats  : +4/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/flatpaks/flatpak-runtime/c/96cec4cafb84a88e62a29c2b2d93dc51d05a1aaa?branch=f45

            Log:
            Use gzip for local caches

These are not related to the repodata migration, and the .gz are smaller.

This partially reverts commit 0b3ccfeab1675ef978a341f71e46894a114a2c21.

---
diff --git a/tools/util.py b/tools/util.py
index 4822ca4..0f9151d 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -1,4 +1,5 @@
 from dataclasses import dataclass
+import gzip
 import hashlib
 from pathlib import Path
 import pickle
@@ -232,10 +233,10 @@ def get_repo_cacheable(name, generate):
     repo_info = RepoInfo.fetch()
     repo_hash = hashlib.sha256(repo_info.repomd_contents).hexdigest()
 
-    cache_path = os.path.join('out', name + ".zstd")
+    cache_path = os.path.join('out', name + ".gz")
 
     try:
-        with zstandard.open(cache_path, 'rb') as f:
+        with gzip.open(cache_path, 'rb') as f:
             old_repo_hash = f.read(64).decode('utf-8')
             if old_repo_hash == repo_hash:
                 start("Reading " + name)
@@ -249,7 +250,7 @@ def get_repo_cacheable(name, generate):
     data = generate(repo_info)
 
     start("Writing " + name)
-    with zstandard.open(cache_path, 'wb') as f:
+    with gzip.open(cache_path, 'wb') as f:
         f.write(repo_hash.encode('utf-8'))
         pickle.dump(data, f)
     done()

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 14:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 14:42 [flatpaks/flatpak-runtime] f45: Use gzip for local caches Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox