Merge lp:~widelands-dev/widelands/bug-1784113-desktop-file-utils into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 8777
Proposed branch: lp:~widelands-dev/widelands/bug-1784113-desktop-file-utils
Merge into: lp:widelands
Diff against target: 61 lines (+18/-8)
3 files modified
debian/org.widelands.widelands.desktop (+1/-1)
debian/org.widelands.widelands.desktop.stub (+1/-1)
utils/update_appdata.py (+16/-6)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1784113-desktop-file-utils
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+351614@code.launchpad.net

Commit message

Validate .desktop file on translation updates. Removed deprecated category from .desktop file.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3732. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/409261257.
Appveyor build 3532. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1784113_desktop_file_utils-3532.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/org.widelands.widelands.desktop'
--- debian/org.widelands.widelands.desktop 2018-07-06 14:23:53 +0000
+++ debian/org.widelands.widelands.desktop 2018-07-28 11:31:09 +0000
@@ -74,4 +74,4 @@
74Icon=/usr/share/games/widelands/data/images/logos/wl-ico-64.png74Icon=/usr/share/games/widelands/data/images/logos/wl-ico-64.png
75TryExec=widelands75TryExec=widelands
76Exec=widelands76Exec=widelands
77Categories=Application;Game;StrategyGame;77Categories=Game;StrategyGame;
7878
=== modified file 'debian/org.widelands.widelands.desktop.stub'
--- debian/org.widelands.widelands.desktop.stub 2017-03-10 12:39:34 +0000
+++ debian/org.widelands.widelands.desktop.stub 2018-07-28 11:31:09 +0000
@@ -6,4 +6,4 @@
6Icon=/usr/share/games/widelands/data/images/logos/wl-ico-64.png6Icon=/usr/share/games/widelands/data/images/logos/wl-ico-64.png
7TryExec=widelands7TryExec=widelands
8Exec=widelands8Exec=widelands
9Categories=Application;Game;StrategyGame;9Categories=Game;StrategyGame;
1010
=== modified file 'utils/update_appdata.py'
--- utils/update_appdata.py 2017-03-10 12:39:34 +0000
+++ utils/update_appdata.py 2018-07-28 11:31:09 +0000
@@ -118,8 +118,8 @@
118118
119input_file.close()119input_file.close()
120120
121dest_filepath = base_path + '/debian/widelands.appdata.xml'121appdata_filepath = base_path + '/debian/widelands.appdata.xml'
122dest_file = codecs.open(dest_filepath, encoding='utf-8', mode='w')122dest_file = codecs.open(appdata_filepath, encoding='utf-8', mode='w')
123dest_file.write(appdata)123dest_file.write(appdata)
124dest_file.close()124dest_file.close()
125125
@@ -135,12 +135,22 @@
135135
136input_file.close()136input_file.close()
137137
138dest_filepath = base_path + '/debian/org.widelands.widelands.desktop'138desktop_filepath = base_path + '/debian/org.widelands.widelands.desktop'
139dest_file = codecs.open(dest_filepath, encoding='utf-8', mode='w')139dest_file = codecs.open(desktop_filepath, encoding='utf-8', mode='w')
140dest_file.write(desktop)140dest_file.write(desktop)
141dest_file.close()141dest_file.close()
142142
143print('Done!')143print('Done!')
144144
145from subprocess import call145from subprocess import call, Popen, PIPE
146call(['appstreamcli', 'validate', base_path + '/debian/widelands.appdata.xml'])146
147# Validata Appdata
148call(['appstreamcli', 'validate', appdata_filepath])
149
150# Validate desktop file. We don't get return codes, so we have to parse it
151process = Popen(['desktop-file-validate', desktop_filepath], stderr=PIPE, stdout=PIPE, stdin=PIPE)
152desktop_result = process.communicate()
153if desktop_result[0] != "":
154 print(desktop_result[0])
155 sys.exit(1)
156

Subscribers

People subscribed via source and target branches

to status/vote changes: