bug-pyconfigure
[Top][All Lists]
Advanced

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

Re: [Bug-pyconfigure] uninstall target can miss some files


From: Brandon Invergo
Subject: Re: [Bug-pyconfigure] uninstall target can miss some files
Date: Tue, 19 Jan 2016 22:06:10 +0000

Hi Afif,

Sorry it took so long to get to this.  In any case, I believe this
problem has been fixed among the latest commits that I pushed.  I intend
to make a release sometime later this week.  I need to poke around the
code a bit to see if there are any other problems that I missed.  If you
noticed anything else, now would be a good time.

On Tue, 2015-12-22 at 20:45 -0800, Afif Elghraoui wrote:
> In Makefile.in, if you have something like:
> 
> SCRIPTS = bin/*
> 
> make uninstall will not remove the scripts because it executes something
> like:
> 
> rm -rvf <prefix>/bin/bin/*

DON'T DO THIS!  If you want to do a wildcard in a Makefile, use the
wildcard function:

  SCRIPTS = $(wildcard bin/*)

Otherwise, the asterisk would not be interpreted until it's read by
the shell when the uninstall command is run, potentially wiping out
everything in the bin directory.  Using Make's wildcard function
insures that it's interpreted by Make first and not by the shell.

Regardless, this made me see that I was a bit too cavalier with my rm
statements, so they're toned down a bit and should be a tiny bit
safer, but nothing I could do could protect from something like bin/*.

Happy hacking,
Brandon

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]