Merge lp:~davidhackerdvm/session-manager/ubuntu-session-update into lp:session-manager

Proposed by David Hacker
Status: Needs review
Proposed branch: lp:~davidhackerdvm/session-manager/ubuntu-session-update
Merge into: lp:session-manager
Diff against target: 14 lines (+3/-1)
1 file modified
ubuntu-session (+3/-1)
To merge this branch: bzr merge lp:~davidhackerdvm/session-manager/ubuntu-session-update
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Needs Fixing
Review via email: mp+157013@code.launchpad.net

This proposal supersedes a proposal from 2013-03-27.

Description of the change

Allow session-manager to source /system/etc/ubuntu-sessions.d/$device.conf
  if /etc/ubuntu-sessions/$device.conf is not in session-manager package

To post a comment you must log in.
Revision history for this message
Ricardo Salveti (rsalveti) wrote : Posted in a previous version of this proposal

While I agree this is useful for people creating new ports, I'd like to get the configs merged at the package itself if possible.

In case this is a requirement for you, can you change the logic to only look for the /system based file in case the one available at the package doesn't exist?

Thanks.

review: Needs Fixing
Revision history for this message
David Hacker (davidhackerdvm) wrote :

Updated with logic to only use the android system/etc/ubuntu-sessions.d if etc/ubuntu-sessions.d doesn't exist.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

10 +[ -e /etc/ubuntu-session.d/$device.conf ] && . /etc/ubuntu-session.d/$device.conf ||
11 +. /system/etc/ubuntu-session.d/$device.conf

Looks better. I'd just like to have another check at the /system/etc/ubuntu-session.d/$device.conf file before sourcing it (as we might have the case where none of the files are available, which will break with an error instead of using the default values).

Add the extra check and we can merge this MR.

And to update the MR you don't need to create a new one, just do another commit to the lp:~davidhackerdvm/session-manager/ubuntu-session-update branch and push it to launchpad (the MR will be automatically updated).

review: Needs Fixing
Revision history for this message
Oliver Grawert (ogra) wrote :

you should drop the || and just make the override the next line below ...
i.e. copy the existing line and add a /system in front of the paths, that way you have a proper override chain:

in code defaults -> shipped defaults from the package -> porter/maintainer defaults

50. By David Hacker

Ensure that /system/etc/ubuntu-session.d/$device.conf exists before sourcing

Unmerged revisions

50. By David Hacker

Ensure that /system/etc/ubuntu-session.d/$device.conf exists before sourcing

49. By David Hacker

Allow session-manager to source /system/etc/ubuntu-sessions.d/$device.conf
if /etc/ubuntu-sessions/$device.conf is not in session-manager package

* This will allow porters to test thier configs prior to submitting to
  the session-manager package

48. By David Hacker

Allow ubuntu-sessions to also ready /system/etc/ubunutu-sessions.d/$(device).conf

* This will allow the device specific config to be included in the android base build
  and not require future changes to add .conf files to session-manager package

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-session'
2--- ubuntu-session 2013-03-22 13:49:23 +0000
3+++ ubuntu-session 2013-04-09 20:23:21 +0000
4@@ -66,7 +66,9 @@
5 FORM_FACTOR="phone"
6
7 # override defaults by sourcing /etc/ubuntu-session.d/$device.conf
8-[ -e /etc/ubuntu-session.d/$device.conf ] && . /etc/ubuntu-session.d/$device.conf
9+# or counterpart in android file system if the config is not in session-manager yet
10+[ -e /etc/ubuntu-session.d/$device.conf ] && . /etc/ubuntu-session.d/$device.conf ||
11+[ -e /system/etc/ubuntu-session.d/$device.conf ] && . /system/etc/ubuntu-session.d/$device.conf
12
13 grep -q GRID_UNIT_PX $bashrc || echo "export GRID_UNIT_PX=${GRID_UNIT_PX}" >> $bashrc
14 grep -q QTWEBKIT_DPR $bashrc || echo "export QTWEBKIT_DPR=${QTWEBKIT_DPR}" >> $bashrc

Subscribers

People subscribed via source and target branches