Forum .LRN Q&A: Bulk Mail dependency not fulfilled

Collapse
Posted by Peter Marklund on
Bulk Mail provides version 0.1d (development) but Bulk Mail Portlet and dotLRN Bulk Mail Applet require the version 0.1a (alpha) of Bulk Mail so I can't install them.

After some experimenting, it seems version numbers work like this. You are only allowed to have at most one letter following the number. The ordering is as follows. Any letter other than d,b,a is lowest, then d (development), then a (alpha), then b (beta), and highest is no letter at all (production).

On our demo server we have:

select version_name, dependency_type, service_uri from apm_package_versions, apm_package_dependencies whe\re apm_package_versions.version_id = apm_package_dependencies.version_id and package_key = 'bm-portlet';

VERSION_NAME
--------------------------------------------------------------------------------
DEPENDENCY_TYPE
--------------------
SERVICE_URI
--------------------------------------------------------------------------------
0.1a
provides
bm-portlet

0.1a
requires
bulk-mail
...

and:

select version_name, dependency_type, service_uri from apm_package_versions, apm_package_dependencies whe\re apm_package_versions.version_id = apm_package_dependencies.version_id and package_key = 'bulk-mail';

VERSION_NAME
--------------------------------------------------------------------------------
DEPENDENCY_TYPE
--------------------
SERVICE_URI
--------------------------------------------------------------------------------
0.1d
provides
bulk-mail
...

and then compare the versions:

select apm_package_version.version_name_greater('0.1a','0.1d') from dual;

APM_PACKAGE_VERSION.VERSION_NAME_GREATER('0.1A','0.1D')
-------------------------------------------------------
                                                      1

And yet somehow bm-portlet is installed.

Does someone know what's going on here?

Collapse
Posted by Vinod Kurup on
Hi Peter, Looks like there's a bug in proc apm_dependency_provided_p in acs-tcl/tcl/apm-install-procs.tcl (line 109). Instead of using apm_package_version.version_name_greater, it checks the versions directly:
if { $dependency_version <= [lindex $prov 1] } {
which shortcuts the 'd' < 'a' precedence that we want. The same fix needs to be made a couple lines down as well.
Collapse
Posted by Peter Marklund on
Thanks Vinod!
You found the problem! I corrected the code to use the plsql proc instead. You might want to update and check that what I did seems ok.

I also changed bm-portlet to require version 0.1d of bulk-mail - that should fix the dependency problem.

Thanks again!

/Peter