Bug 1230193 - javapackages-tools: %add_maven_depmap can produce incorrect metadata
Summary: javapackages-tools: %add_maven_depmap can produce incorrect metadata
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: javapackages-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Srb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-10 12:21 UTC by Michal Srb
Modified: 2015-06-16 12:04 UTC (History)
5 users (show)

Fixed In Version: javapackages-tools-4.6.0-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 12:04:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michal Srb 2015-06-10 12:21:26 UTC
Description of problem:

Consider following code snippet from spec file:

for libname in catalina-ha util-scan; do
  %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom
  %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib"
done

Let's say that the file %{name}/$libname.jar exists if $libname is equal to "catalina-ha".
Then if file for $libname equal to "util-scan" *doesn't* exist, %add_maven_depmap will silently create incorrect mapping between artifact coordinates from JPP.%{name}-util-scan.pom and JAR file %{name}/catalina-ha.jar (i.e. JAR file from previous successful iteration).

Version-Release number of selected component (if applicable):
javapackages-tools-4.5.0-3.fc23.noarch

How reproducible:
always

Steps to Reproduce:
1. rebuild tomcat from c2e91f9 in Rawhide
2.
3.

Actual results:
incorrect information in metadata

Expected results:
the macro should fail if given file doesn't exist

Additional info:

Comment 1 Michal Srb 2015-06-11 05:23:09 UTC
Shoudl be fixed upstream, in 4958236. Test case added in 18bca97.

Comment 2 Michal Srb 2015-06-16 12:04:56 UTC
Fixed in Rawhide.


Note You need to log in before you can comment on or make changes to this bug.