Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025127Openbravo ERPA. Platformpublic2013-11-11 18:262020-06-24 09:17
shuehner 
cberner 
normalminorhave not tried
closedfixed 
5
 
PR20Q3 
alostale
Core
No
0025127: When updating core files removes in the 'referencedata' folder by the update are not removing in the instance
When installing a core update via the MMC then first the old core-files backed up and then the old-core files are deleted before the new files are unpacked.
By this files deleted in the updated core are deleted from the instance.

However files in the 'referencedata' subfolder are not deleted by this process as that folder is missing in the hard-coded list of folders in the ModuleUtiltiy.getCore function.

Impact: with the new sampledata work pushed a few mp's back this means that the 2 big (100mb in total) old referencedata.xml files are not deleted on updated.

That makes every install 100mb bigger and also puts that useless weight into every backup.
Install 3.0MP25 which contains old sampledata impl.
Updated via MMC to at least 3.0MP26
Check that the two xml files directly in the referencedata/sampledata folder have not been deleted.
They should have been deleted, as they are not in the new core obx.
Extend getCore function to also include the referencedata folder.
No tags attached.
Issue History
2013-11-11 18:26shuehnerNew Issue
2013-11-11 18:26shuehnerAssigned To => AugustoMauch
2013-11-11 18:26shuehnerModules => Core
2013-11-11 18:26shuehnerTriggers an Emergency Pack => No
2014-03-25 14:21alostaleNote Added: 0065427
2014-03-25 14:59shuehnerNote Added: 0065428
2015-03-11 13:53alostaleStatusnew => acknowledged
2015-03-17 14:37alostaleAssigned ToAugustoMauch => platform
2020-06-08 13:14shuehnerNote Added: 0120738
2020-06-12 15:03cbernerAssigned Toplatform => cberner
2020-06-12 15:03cbernerNote Added: 0120834
2020-06-16 08:19cbernerReview Assigned To => alostale
2020-06-16 08:22cbernerStatusacknowledged => scheduled
2020-06-16 08:42hgbotCheckin
2020-06-16 08:42hgbotNote Added: 0120855
2020-06-16 08:42hgbotStatusscheduled => resolved
2020-06-16 08:42hgbotResolutionopen => fixed
2020-06-16 08:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/257c9c19601190d8b10df8b54daac21441eb5914 [^]
2020-06-24 09:17alostaleStatusresolved => closed
2020-06-24 09:17alostaleFixed in Version => 3.0PR20Q3

Notes
(0065427)
alostale   
2014-03-25 14:21   
directory missing in ModuleUtility.getCore method
(0065428)
shuehner   
2014-03-25 14:59   
Open items:
- import/export client use referencedata folder also. so userdata may be present. Could be handled by restricting deletion to referencedata/sampledata & referencedata/standard
- export sampledata/import-sampledata user may have run that and have files in referencedata/sampledata should those be deleted? or not?
 Maybe restrict to the 4 known files/folders in sampledata which are present in the distribution and just delete those?
(0120738)
shuehner   
2020-06-08 13:14   
Updating topic as that has more bad side-effects.
Discovered in updating demo-master instance.
Which was created long time ago using only MMC to be updated + now wants a install.source run.

[importsampledata] Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "ad_pinstance" violates foreign key constraint "ad_pinstanc
[importsampledata] Detail: Key (ad_process_id)=(800085) is not present in table "ad_process".

Failed as referencedata/sampledata still had 5 files present which were removed years ago:
-rw-r--r-- 1 openbravo openbravo 1487443 Sep 11 2015 ./FB/AD_PINSTANCE_PARA.xml
-rw-r--r-- 1 openbravo openbravo 3247649 Sep 11 2015 ./FB/AD_PINSTANCE.xml
-rw-r--r-- 1 openbravo openbravo 126742 Jul 2 2019 ./FB/FIN_RECLINE_TEMP.xml
-rw-r--r-- 1 openbravo openbravo 916 Feb 22 2018 ./QA_Testing/OBUIAPP_GC_FIELD.xml
-rw-r--r-- 1 openbravo openbravo 840 Feb 22 2018 ./QA_Testing/OBUIAPP_GC_TAB.xml

Same cause that getCore is missing those folders so any old files stays in there forever.
(0120834)
cberner   
2020-06-12 15:03   
Merge Request: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/86 [^]
(0120855)
hgbot   
2020-06-16 08:42   
Repository: erp/devel/pi
Changeset: 257c9c19601190d8b10df8b54daac21441eb5914
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Fri Jun 12 14:55:02 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/257c9c19601190d8b10df8b54daac21441eb5914 [^]

Fixes ISSUE-25127: Fixes updates via MMC with old referencedata

Adds referencedata folder to core folders, so when updating via MMC
those old files get deleted and updated correctly, not keeping old files
that generate errors in future installations.

---
M src/org/openbravo/erpCommon/modules/ModuleUtiltiy.java
---