:: [DNG] Dependency Hell: was leveldb …
Góra strony
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
Dla: dng
Stare tematy: Re: [DNG] leveldb support proposal
Temat: [DNG] Dependency Hell: was leveldb support proposal
On Tue, 1 Mar 2016 15:15:05 +0100
Didier Kryn <kryn@???> wrote:

>      I hesitated to reply because I know my answer is politically 
> incorrect. "dependency hell" is the consequence of dynamic linkage. I 
> understand that dynamic linkage is a necessity for distros, but if
> the concern is about one package, this very one can be linked
> statically. 


I'm constructing my wpa_supplicant toolset. So far it's 100% /bin/sh.
Installation involves nothing more than copying its directory tree
somewhere on your computer, and then, on your executable path, putting
a 1 line shellscript that calls the main program in my toolset with
argument $@.

I can copy it to any machine with those two operations, and remove it
by deleting the directory tree and the 1 line shellscript.

I'd like to take credit for this easy installation idea, but of course I
can't. This was the main way of installing programs on MS-DOS. No DLLs.
No .so's. No registry. Just copy the directory, and bang, you're
installed. And so it is that, today, I can still run WordPerfect 5.0,
or Clarion 2.1, decades after my Windows programs became unrunnable.

Let me show you my top level shellscript:

=============================================
#!/bin/sh
mydir=`realpath $0 | sed -e's+/[^/]*$++'`
export PATH=$mydir:$PATH
export AP_SELECTION=/tmp/ap_selection.txt
fcn=$mydir/rw_$1.sh
shift
if test -f $fcn -a -x $fcn; then
    $fcn $@
else
    echo FAIL: File $fcn must exist and be executable. >&2
    echo Aborting. >&2
    exit 61
fi
=============================================


Installation by directory is as simple as realpath $0.

I'm not recommending this for every app. But I've got to tell you, when
you think about installation by package manager, with its pinnings and
exclusions and dependencies and conflicts, not to mention sabotage of
packaging by the poetterists and their ilk, installation by directory
starts to have its own charm, for certain applications.

SteveT

Steve Litt
February 2016 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key