unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* dangerous command in Makefile.in uninstall rule
@ 2006-02-24 23:54 Claudio Fontana
  0 siblings, 0 replies; 8+ messages in thread
From: Claudio Fontana @ 2006-02-24 23:54 UTC (permalink / raw)


Hello,

as part of the uninstall rule in Makefile.in
(top_srcdir)
the following command is executed:

        (cd ${infodir} && rm -f cl* ada-mode*
autotype* calc* ccmode* ebrowse* efaq* eintr elisp*
eshell* eudc* idlwave* message* pcl-cvs* reftex*
speedbar* tramp* widget* woman* dired-x* ediff* emacs*
emacs-xtra* flymake* forms* gnus* info* mh-e*
newsticker* org* sc* ses* vip* smtpmail* url* rcirc*
erc*)

this is very dangerous, because by this command other
info files, unrelated with emacs, can be removed.

CLaudio



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dangerous command in Makefile.in uninstall rule
       [not found] <E1FDKjh-0000YT-28@fencepost.gnu.org>
@ 2006-02-27 12:45 ` Claudio Fontana
  2006-02-27 23:47   ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Claudio Fontana @ 2006-02-27 12:45 UTC (permalink / raw)
  Cc: bug-gnu-emacs

--- Richard Stallman <rms@gnu.org> ha scritto: 

>     this is very dangerous, because by this command
> other
>     info files, unrelated with emacs, can be
> removed.
> 
> Where is the danger?  These files do come from
> Emacs.

By the current uninstall rule,
the following command is run in the ${infodir}
directory:

$ rm -f cl* ada-mode*
autotype* calc* ccmode* ebrowse* efaq* eintr elisp*
eshell* eudc* idlwave* message* pcl-cvs* reftex*
speedbar* tramp* widget* woman* dired-x* ediff* emacs*
emacs-xtra* flymake* forms* gnus* info* mh-e*
newsticker* org* sc* ses* vip* smtpmail* url* rcirc*
erc*

Now if another package, say the clisp project, happens
to also offer info pages, those pages can be ruined by
this command.

Imagine that Clisp offers clisp.info, installed in
${infodir}. It matches cl*, and is thus removed by
make uninstall.

CLaudio




		
___________________________________ 
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive 
http://it.messenger.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dangerous command in Makefile.in uninstall rule
  2006-02-27 12:45 ` Claudio Fontana
@ 2006-02-27 23:47   ` Richard Stallman
  2006-02-28 10:35     ` Claudio Fontana
  2006-03-03 12:35     ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Richard Stallman @ 2006-02-27 23:47 UTC (permalink / raw)
  Cc: bug-gnu-emacs

    $ rm -f cl* ada-mode*
    autotype* calc* ccmode* ebrowse* efaq* eintr elisp*
    eshell* eudc* idlwave* message* pcl-cvs* reftex*
    speedbar* tramp* widget* woman* dired-x* ediff* emacs*
    emacs-xtra* flymake* forms* gnus* info* mh-e*
    newsticker* org* sc* ses* vip* smtpmail* url* rcirc*
    erc*

We could make these more specific.  For instance, it could be

cl cl-*

or even

cl cl-[0-9] cl-[0-9][0-9]

for each one of the manuals.

But that is rather clumsy.  Is there any cleaner way to do it?
Perhaps with a shell program that is given an argument such as
`cl', and returns the list of file names for that manual.
Do you know how to write one?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dangerous command in Makefile.in uninstall rule
  2006-02-27 23:47   ` Richard Stallman
@ 2006-02-28 10:35     ` Claudio Fontana
  2006-03-04 22:58       ` Karl Berry
  2006-03-03 12:35     ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Claudio Fontana @ 2006-02-28 10:35 UTC (permalink / raw)
  Cc: bug-gnu-emacs, bug-texinfo


--- Richard Stallman <rms@gnu.org> wrote: 

>     $ rm -f cl* ada-mode*
>     autotype* calc* ccmode* ebrowse* efaq* eintr
> elisp*
>     eshell* eudc* idlwave* message* pcl-cvs* reftex*
>     speedbar* tramp* widget* woman* dired-x* ediff*
> emacs*
>     emacs-xtra* flymake* forms* gnus* info* mh-e*
>     newsticker* org* sc* ses* vip* smtpmail* url*
> rcirc*
>     erc*
> 
> We could make these more specific.  For instance, it
> could be
> 
> cl cl-*
> 
> or even
> 
> cl cl-[0-9] cl-[0-9][0-9]
> 
> for each one of the manuals.
> 
> But that is rather clumsy.  Is there any cleaner way
> to do it?

With a for loop; automake uses this to uninstall info
files (from lib/am/texinfos.am in the Automake package
- I only strip the DJGPP stuff):

        @list='$(INFO_DEPS)'; \
        for file in $$list; do \
          relfile=`echo "$$file" | sed 's|^.*/||'`; \
          (if cd "$(DESTDIR)$(infodir)"; then \
             rm -f $$relfile $$relfile-[0-9]
$$relfile-[0-9][0-9]; \
           else :; fi); \
        done

> Perhaps with a shell program that is given an
> argument such as
> `cl', and returns the list of file names for that
> manual.
> Do you know how to write one?

I did not think about all the details yet,
but it should be possible to scan the "Indirect"
section in the main info file, and read the rest of
the info files from there.
The program should be put in the texinfo package under
utils I think. However, maybe that regex is safe
enough.

I forward this to bug-texinfo@gnu.org .

CLaudio



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dangerous command in Makefile.in uninstall rule
  2006-02-27 23:47   ` Richard Stallman
  2006-02-28 10:35     ` Claudio Fontana
@ 2006-03-03 12:35     ` Eli Zaretskii
  2006-03-04 13:37       ` Richard Stallman
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2006-03-03 12:35 UTC (permalink / raw)
  Cc: bug-gnu-emacs, sick_soul

> From: Richard Stallman <rms@gnu.org>
> Date: Mon, 27 Feb 2006 18:47:01 -0500
> Cc: bug-gnu-emacs@gnu.org
> 
>     $ rm -f cl* ada-mode*
>     autotype* calc* ccmode* ebrowse* efaq* eintr elisp*
>     eshell* eudc* idlwave* message* pcl-cvs* reftex*
>     speedbar* tramp* widget* woman* dired-x* ediff* emacs*
>     emacs-xtra* flymake* forms* gnus* info* mh-e*
>     newsticker* org* sc* ses* vip* smtpmail* url* rcirc*
>     erc*
> 
> We could make these more specific.  For instance, it could be
> 
> cl cl-*
> 
> or even
> 
> cl cl-[0-9] cl-[0-9][0-9]
> 
> for each one of the manuals.
> 
> But that is rather clumsy.  Is there any cleaner way to do it?

The cleanest way I know of is to have a single list of main Info files
(i.e., without the -[0-9] etc. suffixes, and then do something like
this:

   for f in ${INFO_FILES} do
     rm -f $$f $$f-[1-9] $$f-[1-9][0-9]
   done

We could then have the install target use INFO_FILES as well.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dangerous command in Makefile.in uninstall rule
  2006-03-03 12:35     ` Eli Zaretskii
@ 2006-03-04 13:37       ` Richard Stallman
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2006-03-04 13:37 UTC (permalink / raw)
  Cc: bug-gnu-emacs, sick_soul

    The cleanest way I know of is to have a single list of main Info files
    (i.e., without the -[0-9] etc. suffixes, and then do something like
    this:

       for f in ${INFO_FILES} do
	 rm -f $$f $$f-[1-9] $$f-[1-9][0-9]
       done

    We could then have the install target use INFO_FILES as well.

That is indeed clean.  Please install that.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dangerous command in Makefile.in uninstall rule
  2006-02-28 10:35     ` Claudio Fontana
@ 2006-03-04 22:58       ` Karl Berry
  2006-03-04 23:16         ` Claudio Fontana
  0 siblings, 1 reply; 8+ messages in thread
From: Karl Berry @ 2006-03-04 22:58 UTC (permalink / raw)
  Cc: bug-gnu-emacs, rms, bug-texinfo

                 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9]; \

Isn't that exactly what rms suggested?

It seems better (and way less work) than writing a new program that
parses info files to find out the filenames to me.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dangerous command in Makefile.in uninstall rule
  2006-03-04 22:58       ` Karl Berry
@ 2006-03-04 23:16         ` Claudio Fontana
  0 siblings, 0 replies; 8+ messages in thread
From: Claudio Fontana @ 2006-03-04 23:16 UTC (permalink / raw)
  Cc: bug-gnu-emacs, rms, bug-texinfo


--- Karl Berry <karl@freefriends.org> ha scritto: 

>                  rm -f $$relfile $$relfile-[0-9]
> $$relfile-[0-9][0-9]; \
> 
> Isn't that exactly what rms suggested?

yes, only enveloped in a for.

> It seems better (and way less work) than writing a
> new program that
> parses info files to find out the filenames to me.

Agreed.

CLaudio



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-03-04 23:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-24 23:54 dangerous command in Makefile.in uninstall rule Claudio Fontana
     [not found] <E1FDKjh-0000YT-28@fencepost.gnu.org>
2006-02-27 12:45 ` Claudio Fontana
2006-02-27 23:47   ` Richard Stallman
2006-02-28 10:35     ` Claudio Fontana
2006-03-04 22:58       ` Karl Berry
2006-03-04 23:16         ` Claudio Fontana
2006-03-03 12:35     ` Eli Zaretskii
2006-03-04 13:37       ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).