isaexec and Tcl/Tk

Dagobert Michelsen dam at opencsw.org
Tue Feb 18 14:41:29 CET 2014


Hi Oliver,

Am 18.02.2014 um 14:26 schrieb Oliver Kiddle <opk at opencsw.org>:
>> Yes, exactly. Same for alternatives �select tclsh /opt/csw/bin/sparcv8plus/tclsh
>> The current implementation is a NFS-shared-/opt/csw-friendly reimplementation
>> in ksh of the redhat alternatives, but lacking the slave-group syntax. Maybe
>> you as shell-superguru can quickly fix it?
> 
> It actually seems that alternatives does support the slave syntax.
> What it isn't coping with is more than one conflicting alternative
> being provided by a single package. In the set_manual_prio function,
> it links the selected file in /opt/csw/share/alternatives to
> /etc/opt/csw/alternatives. This serves as it's "database" of how things
> are selected. According the comment in the source it "uses a symlink, so
> that way, the manual set does not take effect if the package has been
> removed.. but it is remembered if the package is coming right back". The
> trouble is that after selecting an alternative, it is linking to the
> file containing both alternatives.

I think this is because Phil didn’t think about the case you describe when
he wrote the script.

> The file in /opt/csw/share/alternatives is named by calling $(call
> catalogname, $*) in the GAR makefiles. So both the 32-bit and 64-bit
> settings are in a file named tcl there. I think we instead need to
> support putting them in a different file from GAR. Something like the
> following; this uses different files if more than one ALTERNATIVE is
> listed. It might be better to use an explicit variable of some sort.
> What do you think?

I see. However, I am not sure this is the right thing to do. The syntax was inherited
from the Red Hat implementation. The only reason why Phil wrote the ksh
version you see is to support NFS-shared /opt/csw. If the solution is more than
a trivial fix I tend to go back to the Red Hat implementation. Breaking Red Hat
format would IMHO go in a wrong direction.

Maybe some other maintainers want also chime in…


Best regards

  — Dago

> Oliver
> 
>  @echo "[ Generating alternatives for package $* ]"
> ifeq ($(word 2,$($(or $(ALTERNATIVES_$*),$(ALTERNATIVES)))),)
> 
>  $(foreach A,$(or $(ALTERNATIVES_$*),$(ALTERNATIVES)), \
>  $(if $(ALTERNATIVE_$A), \
>    echo "$(ALTERNATIVE_$A)" > $(PKGROOT)/opt/csw/share/alternatives/$(call catalogname,$*)-$A;, \
>    $(error The variable 'ALTERNATIVE_$A' is empty, but must contain an alternative)))
> else
>  ($(if $(ALTERNATIVE),echo "$(ALTERNATIVE)";) \
>    $(foreach A,$(or $(ALTERNATIVES_$*),$(ALTERNATIVES)), \
>    $(if $(ALTERNATIVE_$A), \
>      echo "$(ALTERNATIVE_$A)";, \
>      $(error The variable 'ALTERNATIVE_$A' is empty, but must contain an alternative) \
>    ))) > $(PKGROOT)/opt/csw/share/alternatives/$(call catalogname,$*)
> endif
>  @$(MAKECOOKIE)

-- 
"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2418 bytes
Desc: not available
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20140218/99cad0c9/attachment.p7s>


More information about the maintainers mailing list