I have made the following changes intended for : CE:MW:Shared / policy-settings-basic-n950
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/5839 Thank You, Juho Hämäläinen [This message was auto-generated] --- Request # 5839: Messages from BOSS: State: review at 2012-08-15T13:30:49 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:jhamalai:branches:CE:MW:Shared / policy-settings-basic-n950 -> CE:MW:Shared / policy-settings-basic-n950 changes files: -------------- --- policy-settings-basic-n950.changes +++ policy-settings-basic-n950.changes @@ -0,0 +1,3 @@ +* Wed Aug 15 2012 Juho Hämäläinen <[email protected]> - 0.1.1 +- Fixes NEMO#257: Add missing resource_class_request/4. + new: ---- Add-missing-resource_class_request-4.-Fixes-NEMO-257.patch spec files: ----------- --- policy-settings-basic-n950.spec +++ policy-settings-basic-n950.spec @@ -1,11 +1,13 @@ # # Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.23 +# Generated by: spectacle version 0.24 # + +Name: policy-settings-basic-n950 + # >> macros # << macros -Name: policy-settings-basic-n950 Summary: Precompiled basic MeeGo policy settings for the N950 Version: 0.1.1 Release: 0 @@ -14,6 +16,7 @@ BuildArch: noarch Source0: %{name}-%{version}.tar.gz Source100: policy-settings-basic-n950.yaml +Patch0: Add-missing-resource_class_request-4.-Fixes-NEMO-257.patch Requires: ohm Requires: ohm-plugins-misc Requires: ohm-plugin-resolver @@ -26,11 +29,9 @@ BuildRequires: prolog-resourcepolicy-extensions Provides: policy-settings - %description Precompiled basic MeeGo policy settings for the N950. - %package text Summary: Basic MeeGo policy settings sources for the N950 Group: System/Resource Policy @@ -49,6 +50,8 @@ %prep %setup -q -n %{name} +# Add-missing-resource_class_request-4.-Fixes-NEMO-257.patch +%patch0 -p1 # >> setup # << setup @@ -64,6 +67,7 @@ #make %{?jobs:-j%jobs} make -j1 # << build post + %install rm -rf %{buildroot} # >> install pre @@ -74,13 +78,6 @@ # << install post - - - - - - - %files %defattr(-,root,root,-) # >> files @@ -96,7 +93,6 @@ %{_datadir}/policy/etc/basic/pulse # << files - %files text %defattr(-,root,root,-) # >> files text @@ -111,4 +107,3 @@ %{_datadir}/policy/etc/basic/ohm %{_datadir}/policy/etc/basic/pulse # << files text - other changes: -------------- ++++++ Add-missing-resource_class_request-4.-Fixes-NEMO-257.patch (new) --- Add-missing-resource_class_request-4.-Fixes-NEMO-257.patch +++ Add-missing-resource_class_request-4.-Fixes-NEMO-257.patch @@ -0,0 +1,51 @@ +From 206d44ab29e980fd418dc52e1920f1fce08d3a1e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= <[email protected]> +Date: Fri, 10 Aug 2012 11:50:20 +0300 +Subject: [PATCH] Add missing resource_class_request/4. Fixes NEMO#257 + +--- + basic/policy/resource.pl | 22 ++++++++++++++++++++-- + 1 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/basic/policy/resource.pl b/basic/policy/resource.pl +index 53db90d..e2b57fd 100644 +--- a/basic/policy/resource.pl ++++ b/basic/policy/resource.pl +@@ -2,10 +2,10 @@ + [update_resource_entries/1, update_resource_owner_entries/1, + resource_owner/2, resource_owner/3, resource_group/2, + granted_resource/2, granted_resource/3, active_resource/3, +- force_resource_release/3]). ++ force_resource_release/3, resource_class_request/4]). + + rules([update_resource_entries/1, update_resource_owner_entries/1, +- force_resource_release/3]). ++ force_resource_release/3, resource_class_request/4]). + + + /* +@@ -447,3 +447,21 @@ active_resource(Class, Group, Resource) :- + GrantedBit is Granted /\ ResourceBit, + GrantedBit = ResourceBit, + !. ++ ++resource_bits([], A, A). ++resource_bits([A|C], B, E) :- ++ D is A\/B, ++ resource_bits(C, D, E). ++ ++resource_bits_list(C, D) :- ++ findall(A, ++ (resource_classes:resource_bit(B, A), ++ resource_classes:valid_resource_class(B, C)), ++ D). ++ ++resource_class_request(Class, M, O, Result) :- ++ resource_bits_list(Class, BitList), ++ resource_bits(BitList, 0, BitMask), ++ Mandatory is M/\BitMask, ++ Optional is O/\BitMask, ++ Result=[[resource, [mandatory, Mandatory], [optional, Optional]]]. +-- +1.7.0.4 + ++++++ policy-settings-basic-n950.yaml --- policy-settings-basic-n950.yaml +++ policy-settings-basic-n950.yaml @@ -8,6 +8,9 @@ - "%{name}-%{version}.tar.gz" Description: Precompiled basic MeeGo policy settings for the N950. +Patches: + - Add-missing-resource_class_request-4.-Fixes-NEMO-257.patch + Requires: - ohm - ohm-plugins-misc
