Browse code

Fix packages not getting installed if service name in base path

Currently, if devstack base path includes the name of a given
service (e.g. nova), then the service's prereq packages will
not be installed. This fix changes the checking the match
against the full path of the package list file rather than the
name of a given service.

Closes-Bug: #1434314
Change-Id: Ie81352ebd5691afc6d0019f71d5b62370e8bb95f

Ryan Hsu authored on 2015/03/20 08:26:45
Showing 1 changed files
... ...
@@ -918,42 +918,42 @@ function get_packages {
918 918
         # NOTE(sdague) n-api needs glance for now because that's where
919 919
         # glance client is
920 920
         if [[ $service == n-api ]]; then
921
-            if [[ ! $file_to_parse =~ nova ]]; then
921
+            if [[ ! $file_to_parse =~ $package_dir/nova ]]; then
922 922
                 file_to_parse="${file_to_parse} ${package_dir}/nova"
923 923
             fi
924
-            if [[ ! $file_to_parse =~ glance ]]; then
924
+            if [[ ! $file_to_parse =~ $package_dir/glance ]]; then
925 925
                 file_to_parse="${file_to_parse} ${package_dir}/glance"
926 926
             fi
927 927
         elif [[ $service == c-* ]]; then
928
-            if [[ ! $file_to_parse =~ cinder ]]; then
928
+            if [[ ! $file_to_parse =~ $package_dir/cinder ]]; then
929 929
                 file_to_parse="${file_to_parse} ${package_dir}/cinder"
930 930
             fi
931 931
         elif [[ $service == ceilometer-* ]]; then
932
-            if [[ ! $file_to_parse =~ ceilometer ]]; then
932
+            if [[ ! $file_to_parse =~ $package_dir/ceilometer ]]; then
933 933
                 file_to_parse="${file_to_parse} ${package_dir}/ceilometer"
934 934
             fi
935 935
         elif [[ $service == s-* ]]; then
936
-            if [[ ! $file_to_parse =~ swift ]]; then
936
+            if [[ ! $file_to_parse =~ $package_dir/swift ]]; then
937 937
                 file_to_parse="${file_to_parse} ${package_dir}/swift"
938 938
             fi
939 939
         elif [[ $service == n-* ]]; then
940
-            if [[ ! $file_to_parse =~ nova ]]; then
940
+            if [[ ! $file_to_parse =~ $package_dir/nova ]]; then
941 941
                 file_to_parse="${file_to_parse} ${package_dir}/nova"
942 942
             fi
943 943
         elif [[ $service == g-* ]]; then
944
-            if [[ ! $file_to_parse =~ glance ]]; then
944
+            if [[ ! $file_to_parse =~ $package_dir/glance ]]; then
945 945
                 file_to_parse="${file_to_parse} ${package_dir}/glance"
946 946
             fi
947 947
         elif [[ $service == key* ]]; then
948
-            if [[ ! $file_to_parse =~ keystone ]]; then
948
+            if [[ ! $file_to_parse =~ $package_dir/keystone ]]; then
949 949
                 file_to_parse="${file_to_parse} ${package_dir}/keystone"
950 950
             fi
951 951
         elif [[ $service == q-* ]]; then
952
-            if [[ ! $file_to_parse =~ neutron ]]; then
952
+            if [[ ! $file_to_parse =~ $package_dir/neutron ]]; then
953 953
                 file_to_parse="${file_to_parse} ${package_dir}/neutron"
954 954
             fi
955 955
         elif [[ $service == ir-* ]]; then
956
-            if [[ ! $file_to_parse =~ ironic ]]; then
956
+            if [[ ! $file_to_parse =~ $package_dir/ironic ]]; then
957 957
                 file_to_parse="${file_to_parse} ${package_dir}/ironic"
958 958
             fi
959 959
         fi