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

Re: base-files does not create /usr/local directories



Hi,
>>"Guy" == Guy Maor <maor@ece.utexas.edu> writes:

Guy> The only allowed changes to /usr/local are creating directories
Guy> as placeholders on package installation and removing the
Guy> directories, if empty, on package removal.  The postinst and
Guy> prerm scripts must NOT fail if either of these operations fail.
Guy> For example, the emacs package will contain
Guy> mkdir -p /usr/local/lib/emacs/site-lisp || true
Guy> in the postinst, and
Guy> rmdir /usr/local/lib/emacs/site-lisp && rmdir \
Guy>       /usr/local/lib/emacs || true
Guy> in the prerm.

	Yikes!. This contradicts the next paragraph, and, morever,
 wouldn't upgrading complain if I had installed local stuff (error:
 directory not empty)? I don't like the alternative of not removing
 the directories leaving empty directory detritus around either. What
 about:

 2>&1 rmdir /usr/local/lib/emacs/site-lisp && \
      rmdir /usr/local/lib/emacs || true >/dev/null

	Or variants thereof, to ignore errors, and change the
 paragraph below, to allow removing empty directories.

Guy> You may not create any directories off of /usr/local besides
Guy> those listed in FSSTND 4.8.  You may not remove any of the
Guy> directories mentioned in 4.8, even if you created them.

Guy> If you do create a directory in /usr/local for local additions to
Guy> a package, you must ensure that the package searches that
Guy> directory before the equivalent directory in /usr.

	manoj
-- 
 Everyone who comes in here wants three things: They want it
 quick. They want it good. They want it cheap. I tell 'em to pick two
 and call me back. sign on the back wall of a small printing company
 in Delaware
Manoj Srivastava               <url:mailto:srivasta@acm.org>
Mobile, Alabama USA            <url:http://www.datasync.com/%7Esrivasta/>


Reply to: