cwilling / hoorex

This repo now archived. Development continues at https://gitlab.com/chris.willing/hoorex
https://gitlab.com/chris.willing/hoorex
GNU General Public License v3.0
7 stars 1 forks source link

Different dependency targets #7

Closed cwilling closed 8 years ago

cwilling commented 9 years ago

We calculate dependencies using the REQUIRES field in packages' .info files. In some repos the .info files may be enhanced with fields to describe different dependencies. We should be able to determine the dependency relationships with these differently named fields. A command line option backed by configuration setting for this is easy enough (build_dicts already has a karg deptarget='REQUIRES' so that the caller could specify a different deptarget).

The main problem is when the new field used in the .info fields includes a $REQUIRES entry i.e. it normally relies on shell expansion. Since we don't use shell to decipher the .info files, we'd have to do that ourselves.

jvvv commented 9 years ago

Do you think it unreasonable to find a way to gather up optionals, also? That would be really nice feature for the way I use hoorex for finding I want to build for ffmpeg and gstreamer plugins. I can open this as a separate enhancement issue, if you think it would be more appropriate.

cwilling commented 9 years ago

What I do at the moment (therefore why this enhancement interests me) is to add a PREREQS field in any .info file that I want to record additional package names e.g. PREREQS="libshout ftgl $REQUIRES" My personal build tool looks for the PREREQS field and ensures I have all the required packages installed before proceeding. I've been testing a new hoorex version which also takes the PREREQS field into account by running it with something like: DEPTARGET=PREREQS ./hoorex -f DEPTARGET=PREREQS ./hoorex -rl1 vlc

Is that the sort of thing you mean? You can try it checking out the the branch named "feature-deptarget" which I just uploaded.

As an aside, the addition of fields to .info files is quite powerful. As well adding a PREREQS field, I add (if its needed) an ENVOPTS field so that I can specify any environment options I want to build under. So, for a .info file that also has: ENVOPTS="LAME=yes X264=yes CELT=yes DC1394=yes FREI0R=yes GSM=yes RTMP=yes ..." my build tool sets each of the named environment variables when it runs the SlackBuild.

jvvv commented 9 years ago

That covers what I was driving toward. Very nice. I will give it a go later tonight or tomorrow. Thanks again the excellent tool, and now thanks for the suggestions.

cwilling commented 8 years ago

Feature to set DEPTARGET=... merged 24/1/2016