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

Re: RFD: Essential packages, /, and /usr



>>"Clint" == Clint Adams <schizo@debian.org> writes:

 Clint> (A) deathrampage || echo uh-oh, continuing without it

 Clint> Advantages: portable
 Clint> Disadvantages: requires running the program in question

	But if you doi want to run it, this is it,, end of story. So,
 now for when we want to merely test for presence.


 Clint> (B) test -x /usr/sbin/deathrampage && /usr/sbin/deathrampage

 Clint> Advantages: portable, will not execute the wrong deathrampage unless
 Clint>   someone has placed an impostor in /usr/sbin
 Clint> Disadvantages: will fail silently if deathrampage is moved to /usr/bin

	Disadvantage: prevents the local sysadmin from using the
 common UNIX practice of modifying the environment by rearrranging the
 path, is not needed anyway since A would have worked, redundant.


 Clint> (C) multiple tests, or loop of tests

 Clint> Advantages: portable, will handle multiple finite locations
 Clint> Disadvantages: will fail silently if deathrampage is moved beyond the
 Clint>   finite list of locations

	Also silly, since A would work.

 Clint> (D) command -v deathrampage 2>/dev/null && deathrampage
 Clint>  OR type deathrampage 2>/dev/null && deathrampage

 Clint> Advantages: will find and execute deathrampage anywhere
 Clint> Disadvantages: will find and execute deathrampage anywhere, no matter if
 Clint>   it is an alias to 'rm -rf /', a shell function that
 Clint>   initiates immediate reboot, or some other bizarre and
 Clint>   unexpected thing.  Not POSIX-compliant.

	So what? Who the hell is the postinst to tell me what I should
 or should not be doing with my machine? When I change the command on
 my machines, by gar, stupid postsinst should follow suit. Where does
 this overweening sense of the postinst always being right, the human
 who has changed the environment always is wrong coming from? This is
 certainly not the UNIX philosophy. 

	Silly, since A would have worked.

 Clint> (E) which deathrampage 2>/dev/null && command deathrampage

 Clint> Advantages: will find and execute deathrampage on the command
 Clint> search path. 
 Clint> Disadvantages: not standardized at all.  builtin which's will not
 Clint> likely have the same interface.

	Silly, since A is the correct answer, but what the heck do you
 mean it is not standardized?  POSIX is a standard, you know, and it
 has indeed standardized this. 

	If we do not need to run the command, this is the
 answer. which is provided by an essential package. which has a well
 known standard behaviour.

	If builtin which does not follow POSIX, file a bug.

 Clint> (F) /usr/bin/which deathrampage 2>/dev/null && command deathrampage

 Clint> Advantages: will find and execute deathrampage on the command
 Clint> search path.  Disadvantages: requires faith in /usr/bin/which
 Clint> not moving or changing

	Silly, since either A or E would do the trick.

 Clint> (G) dpkg -S deathrampage && some other stuff

 Clint> Advantages: will only find deathrampages tracked by the Debian
 Clint> packaging   system.
 Clint> Disadvantages: slow and cumbersome

	This is not just silly, this is moronic, and wrong.

 Clint> (H) #!/bin/specific shell, and use known whence, whwich, type
 Clint>     #commands

 Clint> Advantages: no portability problems, and you might get exactly
 Clint> what you    want
 Clint> Disadvantages: annoying to users everywhere


	SIlly, since A or  would work.

 Clint> (I) invent a Debian-specific solution to this problem

 Clint> Advantages: less confusion
 Clint> Disadvantages: requires cognition, and people seem to feel differently
 Clint>   about whether or not they want random shell aliases, functions, and
 Clint>   binaries in /usr/local being executed by package scripts.


	Oh yeah, the Not Invented Here syndrome. POSIX exists, and
 works for everyone else except Debian.

	Can we please take this silly thread off policy now? 

	manoj
-- 
 Perhaps the best way to characterize the relationship between DNA and
 meaning is to say that DNA is the source of meaning.  It takes
 information about the environment and turns it into behaviour - thus
 realizing meaning in the pragmatic sense of the word.  DNA is the
 place where the two sides of meaning meet, the place where reports
 become instructions.  DNA is thus what first gave meaning to life;
 or, perhaps, what first created meaning, and therefore life, or what
 first created life, and therefore meaning.  In any event, it is very
 impressive stuff. Robert Wright, Three Scientists and Their Gods
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: