[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Plink2 (Was: Bug#771154: plink: New major upstream version of plink)



Hi Dylan,

On Tue, Jan 13, 2015 at 08:24:45AM +0100, Dylan wrote:
> 
> Although discussions are not finished, I updated plink1 package with some
> refresh and with the new binary name plink1.
> 
> To summarize, I propose for this moment:
> 
>   1. The plink1 executable
>         /usr/bin/plink1
>   2. A symbolic link to the plink1 executable
>         /usr/bin/p-link
>   3. The plink1.9 executable
>         /usr/bin/plink1.9
>   4. The plink2 executable (when will be released)
>         /usr/bin/plink2
>   5. The plink executable (from putty)
>         /usr/bin/plink

+1
 
> > > I'd probably choose this option.
> >
> > Me too. Ideally with the option to use dpkg-reconfigure to allow the
> > sysadmin to set symlink that points p-link (or ideally plink) to one of
> > the three versions (like you can do with e.g. gcc versions).
> >
> > Regarding the p-link vs plink vs plink1 vs plink19 vs plink2 naming of
> > the executable: I understand that the plink name is taken by the Putty
> > package, but I was wondering if the Debian guidelines allow to use a
> > mechanism like dpkg-reconfigure to allow the user to choose which of
> > these applications is actually pointed to when the user types plink.
> >
> > My main argument for using plink (in fact as a sysadmin I always
> > manually create a plink symlink in /usr/local/bin that points to either
> > /usr/bin/p-link or the /usr/lib/plink/plink binary directly) is that all
> > tutorials and courses in genetic epidemiology that I know (including my
> > own) use the plink name. It is (obviously) what is used in the plink
> > documentation and since many people (in my experience) that are using
> > plink are not very experienced with the Linux command line I'd like to
> > keep things as simple and straight forward as possible.
> > Alternatively, would it be possible for the installer to ask a question
> > about whether to set this symlink or not (unless the variable
> > DEBIAN_FRONTEND is set to non-interactive), similar to e.g. the password
> > question when installing MySQL. Maybe such a question should only be
> > asked if the putty package is not installed.
> >
> 
> I will learn about dpkg-reconfigure to propose this.

I do not think that the solution for this problem is dpkg-reconfigure.  I
discussed a potential solution a long time ago here or on debian-science
list.  IMHO the solution is the following (and I'll dedicate a chunk of
time at the Debian Med sprint to implement it):

  1. Debian Med applications (more general any $BLEND application) will be
     installed to

       /usr/lib/$BLEND/bin

     with the name upstream has choosen (assuming that in the same field
     is no internal name space pollution.

     In /usr/bin a symlink to this executable is used which is featuring
     the policy conform name which might derive from the upstream choice.

  2. Add a script

      /etc/profile.d/$BLEND.sh

     which contains something like

       if [ "$BLEND" = "yes" ] ; then
         export PATH=/usr/lib/$BLEND/bin:$PATH
       fi

     to prepend the PATH where "our" executables reside if the user
     is a member of $BLEND which can be flagged by an according variable
     in environment.  (Alternatively the UNIX group system can be used as
     there is even some support for the user menu system.  However, I
     personally consider this as a dead end for several reasons.)

To make an example your list above would look as follows:


  1. The plink1 executable
        /usr/lib/debian-med/bin/plink

  1a. Optionally this link to stick to your suggestion

        ln -s /usr/lib/debian-med/bin/plink /usr/bin/plink1

  2. A symbolic link to the plink1 executable
        /usr/bin/p-link
     This should remain for compatibility reasons with
     previous Debian packages or instead of 1a it can be

        ln -s /usr/lib/debian-med/bin/plink /usr/bin/p-link
 
  3. The plink1.9 executable

        /usr/lib/debian-med/bin/plink1.9

  3a. Daliver the executable also in /usr/bin via symlink

       ln -s /usr/lib/debian-med/bin/plink1.9 /usr/bin/plink1.9

  4. The plink2 executable (when will be released)

       /usr/lib/debian-med/bin/plink2

  4a. Provide a symlink in /usr/bin

       ln -s /usr/lib/debian-med/bin/plink2 /usr/bin/plink2

  5. The plink executable (from putty)
         /usr/bin/plink


By using

   export PATH=/usr/lib/debian-med/bin:$PATH

each user of plink will see what he is expecting to see.

I personally do not see any reason to not implement this suggestion
right now in the current plink* packages since it is compatible to
previous solutions even without setting the PATH.  By documenting
the PATH in debian/README.Debian this can even be made available
before we have a package (probably med-common) featuring an

   /etc/profile.d/debian-med.sh

script.

Kind regards

        Andreas.

-- 
http://fam-tille.de


Reply to: