Hi @geraldizo_0690,
Thanks for the pointers -- now as an FYI, these settings would have to be a Feed-level setting, but the drop-downs would be the same.
FYI, here's the code we use to generate the Release file --- I'm not sure what those other header values do, but we probably wouold just want to add the two you suggested.
What do you think?
I suspect this will be a quick, opt-in change!
private void WriteReleaseFile(Stream output)
{
using var writer = new StreamWriter(output, InedoLib.UTF8Encoding, leaveOpen: true) { NewLine = "\n" };
writer.WriteLine($"Suite: {this.Distro}");
writer.WriteLine($"Codename: {this.Distro}");
writer.WriteLine(FormattableString.Invariant($"Date: {this.Generated:ddd', 'dd' 'MMM' 'yyyy' 'HH':'mm':'ss' UTC'}"));
// NotAutomatic: yes <-- add here
// ButAutomaticUpgrades: yes <-- add here
writer.WriteLine($"Architectures: {string.Join(' ', this.indexes.Select(i => i.Architecture).Distinct(StringComparer.OrdinalIgnoreCase))}");
writer.WriteLine($"Components: {string.Join(' ', this.indexes.Select(i => i.Component).Distinct(StringComparer.OrdinalIgnoreCase))}");
var desc = FeedCache.GetFeed(this.feedId)?.Feed_Description;
if (!string.IsNullOrWhiteSpace(desc))
writer.WriteLine($"Description: {desc.ReplaceLineEndings(" ")}");
writeHashes("MD5Sum:", i => i.MD5);
writeHashes("SHA1:", i => i.SHA1);
writeHashes("SHA256:", i => i.SHA256);
writeHashes("SHA512:", i => i.SHA512);
void writeHashes(string name, Func<IndexHashData, byte[]> getHash)
{
writer.WriteLine(name);
foreach (var i in this.indexes)
{
writer.WriteLine($" {Convert.ToHexString(getHash(i.Uncompressed)).ToLowerInvariant()} {i.Uncompressed.Length,16} {i.Component}/binary-{i.Architecture}/Packages")
writer.WriteLine($" {Convert.ToHexString(getHash(i.GZip)).ToLowerInvariant()} {i.GZip.Length,16} {i.Component}/binary-{i.Architecture}/Packages.gz");
}
}
}

