[graphics/krita] packaging: Fix our copy of the tarball packaging script

Boudewijn Rempt null at kde.org
Tue Aug 25 15:25:24 BST 2020


Git commit c70dbae7fadc437c91f4eb5f7a6b83e7775851b6 by Boudewijn Rempt, on behalf of L. E. Segovia.
Committed on 25/08/2020 at 14:25.
Pushed by rempt into branch 'master'.

Fix our copy of the tarball packaging script

This commit fixes our copy of create_tarball_kf5.rb to work against
Invent.

It now fetches the tarball from GitLab, and extracts the tree
following the format of git-archive.

Additionally, I added a few defaults for the category (sysadmin
namespaced the repos when moving them to Invent), tag (GitLab by default
returns the master branch), and skipped any possible app names that are
not defined in config.ini.

CCMAIL: kimageshop at kde.org

A  +1    -0    packaging/.gitignore
M  +1    -0    packaging/config.ini
M  +11   -4    packaging/create_tarball_kf5.rb

https://invent.kde.org/graphics/krita/commit/c70dbae7fadc437c91f4eb5f7a6b83e7775851b6

diff --git a/packaging/.gitignore b/packaging/.gitignore
new file mode 100644
index 0000000000..b2f21d2df9
--- /dev/null
+++ b/packaging/.gitignore
@@ -0,0 +1 @@
+krita-*
diff --git a/packaging/config.ini b/packaging/config.ini
index b4e62c4000..58b45fee93 100644
--- a/packaging/config.ini
+++ b/packaging/config.ini
@@ -1,6 +1,7 @@
 [krita]
 gitModule   = yes
 gitTag      = v4.3.0
+category    = graphics
 mainmodule  = extragear
 l10nmodule  = krita
 version     = 4.3.0
diff --git a/packaging/create_tarball_kf5.rb b/packaging/create_tarball_kf5.rb
index 161b1fe2e8..b29fb393e7 100755
--- a/packaging/create_tarball_kf5.rb
+++ b/packaging/create_tarball_kf5.rb
@@ -165,6 +165,11 @@ apps.each do |app|
         f.close
     end
 
+    if !found
+        puts " -> Application '#{app}' not found."
+        next
+    end
+
     if (kde_release && appdata["kde_release"] != "yes")
       puts "  -> Skipping because kde_release is not set in the config.ini"
       next
@@ -248,11 +253,13 @@ apps.each do |app|
     end
 
     if appdata["gitModule"]
+        if !appdata["category"]
+            appdata["category"] = "kde"
+        end
         if !appdata["gitTag"]
-            temp = { "gitTag" => "HEAD" }
-            appdata = appdata.merge(temp)
+            appData["gitTag"] = "master"
         end
-        puts "-> Fetching git://anongit.kde.org/" + app + ".git " +  appdata["gitTag"] + " into " + appdata["folder"] + "..."
+        puts "-> Fetching https://invent.kde.org/#{appdata["category"]}/#{app}/-/archive/#{appdata["gitTag"]}/#{app}-#{appdata["gitTag"]}.tar.gz"
     else
         puts "-> Fetching " + appdata["mainmodule"] + "/" + appdata["submodulepath"] + app + revString + " into " + appdata["folder"] + "..."
     end
@@ -276,7 +283,7 @@ apps.each do |app|
 
     # Do the main checkouts.
     if appdata["gitModule"]
-        `git archive --remote git://anongit.kde.org/#{app}.git #{appdata["gitTag"]} | tar -x`
+        `curl "https://invent.kde.org/#{appdata["category"]}/#{app}/-/archive/#{appdata["gitTag"]}/#{app}-#{appdata["gitTag"]}.tar.gz" | tar xz --strip-components=1`
     else
         if appdata["wholeModule"]
             `svn co #{svnroot}/#{appdata["mainmodule"]}/#{appdata["submodulepath"]} #{rev} #{app}-tmp`



More information about the kimageshop mailing list