neilr8133 | 31 May 2012 18:57
Favicon

Multiple programs depend on fast-iterating package

Good [morning|afternoon|evening],

I've been scratching my head over this and would appreciate some feedback:

I have PROG1, PROG2, PROG3 that depend on Java being installed first.  I currently have package 
"java_jre7u3"  so my first reaction is to have Prog1-3 use  <depend package-id="java_jre7u3" />  However,
that would cause problems as soon as Java iterates:

* I'd have to update the packages for Prog 1-3 to reflect dependency on the new version (which would trigger
re-install of the apps because the package changed, even though the apps themselves hadn't been modified)
* Hard-coding a version-specific dependency into multiple files requires that I remember to update all of
them every time I iterate Java

I considered having the programs Depend on a package named "java" which would in turn Depend on jre7u3, but
that means some acrobatics so that "java" would know if it was successful or not (or else it runs every time
and always reports a failure).  (I can also see a possible problem if WPKG monitors all "depend" files for
changes and if one of them is updated considers the entire package modified, thus triggering the same
Prog1-3 reinstall as if I had modified those packages directly.)

The "best" option I've come up with so far is to set the current JRE to a fairly high priority level so it gets
installed before almost anything else, but that requires I remember to add Java separately to any profile
that requires it even indirectly, and doesn't feel very bullet-proof.

What am I missing?

Thanks,

-Neil
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
(Continue reading)

Malte Starostik | 31 May 2012 19:31

Re: Multiple programs depend on fast-iterating package

Hello Neil,

Am Donnerstag, 31. Mai 2012, 16:57:12 schrieb neilr8133:
> Good [morning|afternoon|evening],
> 
> I've been scratching my head over this and would appreciate some feedback:
> 
> 
> I have PROG1, PROG2, PROG3 that depend on Java being installed first.  I
> currently have package  "java_jre7u3"  so my first reaction is to have
> Prog1-3 use  <depend package-id="java_jre7u3" />  However, that would cause
> problems as soon as Java iterates:

Unless you have a very specific reason to keep the version in java's package 
name, why not just name it simply "java" - or maybe "java7" if you have 
multiple major versions around?
Then you can put the version into the java package's revision, copy or include 
the install command(s) to also apply on upgrade, packages can simply depend on 
"java" and you're all set.

e.g. <package id="java" name="Java Runtime Environment" revision="1.7.3">
<!-- ... -->
<commands>
  <command type="install" cmd="..."/>

  <command type="upgrade" include="install"/>
</commands>
</package>

<package id="java-app-1" ...>
(Continue reading)


Gmane