Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic/repeatable #9

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -32,8 +32,4 @@ <h3>{{maintainer}}<a name="{{maintainer_anchor}}"></a></h3>
{{/summaries}}
{{/partial}}

{{#partial}}{ float_right }
<small>Last updated on: {{time}}</small>
{{/partial}}

{{> base}}
@@ -1,9 +1,5 @@
{{#partial}}{title}Issues for {{package_name}} in {{suite}}/{{section}}{{/partial}}

{{#partial}}{ float_right }
<small>Last updated on: {{time}}</small>
{{/partial}}

{{#partial}}{ header_content }
<span style="font-size:18px;"><a href="index.html" style="color: #000000;">⇦ |</a></span>

@@ -30,8 +30,4 @@ <h3>{{maintainer}}<a name="{{maintainer_anchor}}"></a></h3>

{{/partial}}

{{#partial}}{ float_right }
<small>Last updated on: {{time}}</small>
{{/partial}}

{{> base}}
@@ -1,9 +1,5 @@
{{#partial}}{title}{{package_name}} in {{suite}}/{{section}}{{/partial}}

{{#partial}}{ float_right }
<small>Last updated on: {{time}}</small>
{{/partial}}

{{#partial}}{ head_extra }
<link rel="stylesheet" href="{{root_url}}/static/css/highlight.css">
<script src="{{root_url}}/static/js/highlight/highlight.pack.js"></script>
@@ -164,8 +164,4 @@ <h3>Global data validation result</h3>

{{/partial}}

{{#partial}}{ float_right }
<small>Last updated on: {{time}}</small>
{{/partial}}

{{> base}}
@@ -123,8 +123,4 @@ <h2>Health of suite "{{suite}}"</h2>

{{/partial}}

{{#partial}}{ float_right }
<small>Last updated on: {{time}}</small>
{{/partial}}

{{> base}}
@@ -374,10 +374,13 @@ void compressAndSave (ubyte[] data, string fname, ArchiveType atype)
void saveCompressed (string fname, ArchiveType atype)
{
import std.process;
import std.datetime : SysTime, unixTimeToStdTime;

Pid pid;
File cf;
if (atype == ArchiveType.GZIP) {
SysTime epoch = unixTimeToStdTime (0);
std.file.setTimes (fname, epoch, epoch); // Ensure repeatable result
cf = File (fname ~ ".gz", "w");
pid = spawnProcess (["gzip", "-c", fname], std.stdio.stdin, cf);
} else {
@@ -395,20 +398,16 @@ class ArchiveCompressor

private:
string archiveFname;
ArchiveType archiveType;
archive *ar;
bool closed;

public:

this (ArchiveType type)
{
archiveType = type;
ar = archive_write_new ();

if (type == ArchiveType.GZIP)
archive_write_add_filter_gzip (ar);
else
archive_write_add_filter_xz (ar);

archive_write_set_format_pax_restricted (ar);
closed = true;
}
@@ -434,6 +433,9 @@ public:
return;
archive_write_close (ar);
closed = true;

saveCompressed (archiveFname, archiveType);
std.file.remove (archiveFname);
}

void addFile (string fname, string dest = null)
@@ -228,12 +228,12 @@ public:
if (withIconTar) {
foreach (size; iconTarSizes) {
iconTar[size] = new ArchiveCompressor (ArchiveType.GZIP);
iconTar[size].open (buildPath (dataExportDir, format ("icons-%sx%s.tar.gz", size, size)));
iconTar[size].open (buildPath (dataExportDir, format ("icons-%sx%s.tar", size, size)));
}
}

// collect metadata, icons and hints for the given packages
foreach (ref pkg; parallel (pkgs, 100)) {
foreach (ref pkg; pkgs) {
auto pkid = Package.getId (pkg);
auto gcids = dcache.getGCIDsForPackage (pkid);
if (gcids !is null) {