Package: sonic-pi / 3.2.2~repack-7

10-reproducible.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: make examples reproducible by sorting by filename
Author: Valentin Vidic <vvidic@debian.org>
Last-Update: 2020-09-29

--- a/app/server/ruby/bin/qt-doc.rb
+++ b/app/server/ruby/bin/qt-doc.rb
@@ -187,7 +187,7 @@
 example_html_map = {}
 example_dirs = ["Apprentice", "Illusionist", "Magician", "Sorcerer", "Wizard", "Algomancer"]
 example_dirs.each do |ex_dir|
-  Dir["#{examples_path}/#{ex_dir.downcase}/*.rb"].each do |path|
+  Dir["#{examples_path}/#{ex_dir.downcase}/*.rb"].sort.each do |path|
     bname = File.basename(path, ".rb")
     bname = ActiveSupport::Inflector.titleize(bname)
     name = "[#{ex_dir}] #{bname}"
@@ -217,7 +217,7 @@
 languages =
   Dir[File.expand_path("../lang/sonic-pi-tutorial-*.po", tutorial_path)].
   map { |p| File.basename(p).gsub(/sonic-pi-tutorial-(.*?).po/, '\1') }.
-  sort_by {|n| -n.length}
+  sort_by {|n| [-n.length, n]}
 
 docs << "\n  QString systemLocale = QLocale::system().name();\n\n" unless languages.empty?