svn commit: r766242 - in /ofbiz/trunk/debian: ofbiz-framework.config ofbiz-framework.postinst ofbiz-framework.templates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r766242 - in /ofbiz/trunk/debian: ofbiz-framework.config ofbiz-framework.postinst ofbiz-framework.templates

doogie-3
Author: doogie
Date: Sat Apr 18 06:32:43 2009
New Revision: 766242

URL: http://svn.apache.org/viewvc?rev=766242&view=rev
Log:
No longer prompt whether to reimport data, nor which reader to
import.  seed is always imported when ofbiz packages get installed/
upgraded.

Modified:
    ofbiz/trunk/debian/ofbiz-framework.config
    ofbiz/trunk/debian/ofbiz-framework.postinst
    ofbiz/trunk/debian/ofbiz-framework.templates

Modified: ofbiz/trunk/debian/ofbiz-framework.config
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.config?rev=766242&r1=766241&r2=766242&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.config (original)
+++ ofbiz/trunk/debian/ofbiz-framework.config Sat Apr 18 06:32:43 2009
@@ -54,39 +54,16 @@
 cmd="$1"
 shift
 
-case "$cmd" in
- (configure)
- import_question=ofbiz/readers
- ;;
- (reconfigure)
- import_question=ofbiz/reimport-data
- ;;
- (*)
- echo "Invalid command($cmd)" 1>&2
- exit 9
- ;;
-esac
 
 ofb_dc_admin_user() {
  db_input low ofbiz/admin-user || true
 }
-ofb_dc_import_question() {
- db_input low $import_question || true
-}
-ofb_dc_readers() {
- db_get $import_question && do_import="$RET"
- if [ "$do_import" = "true" ]; then
- db_input medium ofbiz/readers || true
- fi
-}
 ofb_dc_admin_port() {
  db_input low ofbiz/admin-port || true
 }
 declare -a ofb_dc_list
 ofb_dc_list=(
  ofb_dc_admin_user
- ofb_dc_import_question
- ofb_dc_readers
  ofb_dc_admin_port
 )
 

Modified: ofbiz/trunk/debian/ofbiz-framework.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.postinst?rev=766242&r1=766241&r2=766242&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-framework.postinst Sat Apr 18 06:32:43 2009
@@ -58,7 +58,7 @@
  esac
 }
 configure_ofbiz() {
- extra=""
+ extra="-readers=seed"
  : ofbiz_readers "$ofbiz_readers"
  : ofbiz_import_readers "$ofbiz_import_readers"
  if [ "$ofbiz_readers" ]; then
@@ -71,22 +71,10 @@
  extra="$extra -file=\"$file\""
  fi
  done
- if [ "$extra" ]; then
- eval /etc/init.d/ofbiz install $extra
- rm -rf "/var/lib/ofbiz/import"
- fi
+ eval /etc/init.d/ofbiz install $extra
+ rm -rf "/var/lib/ofbiz/import"
  #rm -f "$tempfile1" "$tempfile2"
 }
-fix_readers() {
- IFS=", " set -- "$@"
- while [ $# -gt 0 ]; do
- echo -n "$1"
- shift
- if [ $# -gt 0 ]; then
- echo ','
- fi
- done
-}
 get_random_chars() {
  (
  LANG=C
@@ -143,37 +131,30 @@
 fi
 
 if [ "$1" = "triggered" ]; then
+ run_seed=""
+ for trigger in $2; do
+ case "$trigger" in
+ (ofbiz-install)
+ run_seed=1
+ ;;
+ esac
+ done
+ if [ "z" != "z$run_seed" ]; then
+ ofbiz_init_invoke stop
+ configure_ofbiz
+ dpkg-trigger --no-await ofbiz-start
+ fi
  for trigger in $2; do
  case "$trigger" in
  (ofbiz-start)
  ofbiz_init_invoke start
  ;;
- (ofbiz-install)
- ofbiz_reseed=""
- if [ "$trigger" = "ofbiz-install" ]; then
- ofbiz_reseed=1
- ofbiz_import_readers=1
- fi
- get ofbiz_readers ofbiz/readers ofbiz_import_readers ofbiz_reseed
- if [ "z" = "z$ofbiz_readers" ]; then
- ofbiz_readers="seed"
- else
- ofbiz_readers="seed,$ofbiz_readers"
- fi
- ofbiz_readers="$(fix_readers "$ofbiz_readers")"
- if [ "z" != "z$ofbiz_reseed" ]; then
- echo "Need to modify ofbiz data." 1>&2
- configure_ofbiz
- fi
- dpkg-trigger --no-await ofbiz-start
- ;;
  esac
  done
  db_stop
  exit 0
 fi
 
-ofbiz_reseed=""
 case "$1" in
  (configure|reconfigure)
  ofbiz_init_invoke stop

Modified: ofbiz/trunk/debian/ofbiz-framework.templates
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.templates?rev=766242&r1=766241&r2=766242&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.templates (original)
+++ ofbiz/trunk/debian/ofbiz-framework.templates Sat Apr 18 06:32:43 2009
@@ -13,20 +13,6 @@
  This is the port used to communicate with a running ofbiz instance, to
  see if it is starting, running, or stopping.
 
-Template: ofbiz/readers
-Type: multiselect
-Choices: demo, ext
-_Description: Important additional data?
- OfBiz comes with lots of example data, showing products/categories/users
- etc.  If this is your first time working with ofbiz, you may want to
- import this extra data to see how to better use it.
-
-Template: ofbiz/reimport-data
-Type: boolean
-Default: false
-_Description: Reimport data?
- Whether data should be reimported on upgrade.
-
 Template: ofbiz/fieldtype/postgres
 Type: select
 Choices: exact, text