Merge lp:~stolowski/unity8/pkg-version-into-varlib into lp:unity8

Proposed by Paweł Stołowski
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1980
Merged at revision: 2002
Proposed branch: lp:~stolowski/unity8/pkg-version-into-varlib
Merge into: lp:unity8
Diff against target: 21 lines (+4/-0)
2 files modified
data/CMakeLists.txt (+3/-0)
debian/unity8.install (+1/-0)
To merge this branch: bzr merge lp:~stolowski/unity8/pkg-version-into-varlib
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+272398@code.launchpad.net

Commit message

Store unity8 package version in /var/lib/.../version file for fast retrieval from the shell plugin.

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
N/A
 * Did you perform an exploratory manual test run of your code change and any related functionality?
Y
 * Did you make sure that your branch does not contain spurious tags?
Y
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Y
 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1980
http://jenkins.qa.ubuntu.com/job/unity8-ci/6410/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4476
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-wily-touch/789/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1122
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-wily/441
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1017
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1018
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-amd64-ci/649
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-i386-ci/650
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3641
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4473
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4473/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23901
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-wily-mako/476/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/789
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/789/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23904

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6410/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :
Revision history for this message
Paweł Stołowski (stolowski) wrote :

> Please run strip-tags.py over lp:~stolowski/unity8/pkg-version-into-varlib
>
> Also write https://wiki.ubuntu.com/Process/Merges/Checklists/Unity8 in the
> description
Ok, done.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Why does the plugin need that?

Wouldn't be better using a call from unity8-dash to the plugin than a magic file somewhere?

review: Needs Information
Revision history for this message
Paweł Stołowski (stolowski) wrote :

> Why does the plugin need that?
>
> Wouldn't be better using a call from unity8-dash to the plugin than a magic
> file somewhere?

Plugin needs version numbers of itself, unity8, unity-scopes-api to send them to smart scopes server. Note, this may change in the future if smart scopes are ever abandoned (they are effectively in maintenence mode now).
In all cases we want real package versions and not artifical numbers (defined somewhere in the code) that would require manual updating. Currently we run dpkg-query during plugin startup, but this was proved to be very slow. The proposed solution is the fastest equivalent of running dpkg-query, without the associated cost. It's also a solution that gives version for all packages we're insterested in (I MP'ed same changes to scopes api and plugin), whereas making a special call for unity8-dash will make it look nicer for the dash only (and still, you need to get this version number in an efficient way somehow to pass it to the plugin).

Revision history for this message
Albert Astals Cid (aacid) wrote :

Ok, if this means the plugin doesn't need to call dpkg on runtime makes sense to have.

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass?
Yes to the extend they do

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/CMakeLists.txt'
2--- data/CMakeLists.txt 2015-03-12 13:59:07 +0000
3+++ data/CMakeLists.txt 2015-10-01 13:10:43 +0000
4@@ -11,5 +11,8 @@
5 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
6 )
7
8+add_custom_target(pkgversion ALL COMMAND dpkg-parsechangelog -l${CMAKE_SOURCE_DIR}/debian/changelog --show-field version > ${CMAKE_CURRENT_BINARY_DIR}/version)
9+
10 install(FILES com.canonical.Unity8.gschema.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas)
11 install(FILES unity8-dash.url-dispatcher DESTINATION ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)
12+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/unity8)
13
14=== modified file 'debian/unity8.install'
15--- debian/unity8.install 2015-06-23 20:51:20 +0000
16+++ debian/unity8.install 2015-10-01 13:10:43 +0000
17@@ -1,3 +1,4 @@
18+var/lib/unity8/version
19 data/unity8-dash.conf usr/share/upstart/sessions/
20 data/unity8-filewatcher.conf usr/share/upstart/sessions/
21 data/unity8.conf usr/share/upstart/sessions/

Subscribers

People subscribed via source and target branches