mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-19 06:11:47 -04:00
builder: Add builder_cache_checksum_compat_strv
This lets us add strv:s without invalidating old caches if the empty strv means same as before
This commit is contained in:
@@ -1088,6 +1088,19 @@ builder_cache_checksum_str (BuilderCache *self,
|
||||
g_checksum_update (self->checksum, (const guchar *) "\1", 1);
|
||||
}
|
||||
|
||||
/* Only add to cache if non-empty. This means we can add
|
||||
these things compatibly without invalidating the cache.
|
||||
This is useful if empty means no change from what was
|
||||
before */
|
||||
void
|
||||
builder_cache_checksum_compat_strv (BuilderCache *self,
|
||||
char **strv)
|
||||
{
|
||||
if (strv != NULL && strv[0] != NULL)
|
||||
builder_cache_checksum_strv (self, strv);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
builder_cache_checksum_strv (BuilderCache *self,
|
||||
char **strv)
|
||||
|
||||
@@ -65,6 +65,8 @@ void builder_cache_checksum_str (BuilderCache *self,
|
||||
const char *str);
|
||||
void builder_cache_checksum_strv (BuilderCache *self,
|
||||
char **strv);
|
||||
void builder_cache_checksum_compat_strv (BuilderCache *self,
|
||||
char **strv);
|
||||
void builder_cache_checksum_boolean (BuilderCache *self,
|
||||
gboolean val);
|
||||
void builder_cache_checksum_uint32 (BuilderCache *self,
|
||||
|
||||
Reference in New Issue
Block a user