Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042769Openbravo ERPA. Platformpublic2020-01-09 13:592020-01-14 10:15
shuehner 
alostale 
urgentminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
caristu
Core
No
0042769: ant package.module is missing to exclude .git
The standard ant package.module task used to package modules by developers is missing to exclude .git folder.

It currently has excludes for both .hg & .svn but is missing to add same for .git

Consequence is it including all git repo history (if present) inside the obx file making them unnecessarily large.

On some occasions it can cause later secondary problem with module management as it tries to overwrite some read-only files inside .git in case of updating a module via mmc (having .git inside obx) when older module version also have .git files present.

Relevant code to which the new (.git) case should be added:
https://code.openbravo.com/erp/devel/pi/file/tip/src/org/openbravo/erpCommon/modules/ExtractModule.java#l232 [^]
Clone any module which is hosted as a git repository and run ant package.module to create obx file.

Check obx file (unzip -v) and notice it does contain .git.

No tags attached.
depends on backport 00428303.0PR20Q1 closed alostale ant package.module is missing to exclude .git 
depends on backport 00428313.0PR19Q4.2 closed alostale ant package.module is missing to exclude .git 
depends on backport 00428323.0PR19Q3.4 closed alostale ant package.module is missing to exclude .git 
related to defect 0042775 closed shuehner ant package.core is tied to mercurial and cannot be used with ob source in git 
blocks feature request 0041898 acknowledged Triage Platform Base support git 
Issue History
2020-01-09 13:59shuehnerNew Issue
2020-01-09 13:59shuehnerAssigned To => platform
2020-01-09 13:59shuehnerModules => Core
2020-01-09 13:59shuehnerTriggers an Emergency Pack => No
2020-01-09 14:00shuehnerNote Added: 0116730
2020-01-09 16:00shuehnerRelationship addedrelated to 0042775
2020-01-14 09:10alostaleAssigned Toplatform => alostale
2020-01-14 09:10alostaleReview Assigned To => caristu
2020-01-14 09:11alostaleRelationship addedblocks 0041898
2020-01-14 09:12alostaleSeveritymajor => minor
2020-01-14 09:12alostaleStatusnew => scheduled
2020-01-14 09:14alostaleNote Added: 0116820
2020-01-14 09:49hgbotCheckin
2020-01-14 09:49hgbotNote Added: 0116824
2020-01-14 09:49hgbotStatusscheduled => resolved
2020-01-14 09:49hgbotResolutionopen => fixed
2020-01-14 09:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2bf4a5d49474cc41ce137fb6d8b41d5eb3a97b42 [^]
2020-01-14 10:15caristuNote Added: 0116828
2020-01-14 10:15caristuStatusresolved => closed
2020-01-14 10:15caristuFixed in Version => 3.0PR20Q2

Notes
(0116730)
shuehner   
2020-01-09 14:00   
We should think on potentially backporting this issue to last active releases.
a.) Fix should be trivial
b.) With OB moving to git that could avoid some accidents of people using older pi to package modules managed using git
(0116820)
alostale   
2020-01-14 09:14   
MR: https://gitlab.com/openbravo/product/openbravo/merge_requests/32 [^]
(0116824)
hgbot   
2020-01-14 09:49   
Repository: erp/devel/pi
Changeset: 2bf4a5d49474cc41ce137fb6d8b41d5eb3a97b42
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jan 14 09:06:25 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2bf4a5d49474cc41ce137fb6d8b41d5eb3a97b42 [^]

fixed ISSUE-42769: exclude .git directory when packaging modules

---
M src/org/openbravo/erpCommon/modules/ExtractModule.java
---
(0116828)
caristu   
2020-01-14 10:15   
Reviewed