Bug 330701 - Autotools plugin will silently delete the project directory if an empty build directory is supplied
Autotools plugin will silently delete the project directory if an empty build...
Product: Fedora
Classification: Fedora
Component: eclipse-cdt (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Jeff Johnston
Fedora Extras Quality Assurance
Depends On: 412651
  Show dependency treegraph
Reported: 2007-10-13 10:56 EDT by José Fonseca
Modified: 2008-04-04 16:50 EDT (History)
1 user (show)

See Also:
Fixed In Version: 4.0.1-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 16:50:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description José Fonseca 2007-10-13 10:56:57 EDT
Description of problem:

Autotools plugin will silently delete the project directory if an empty build
directory is supplied in the project settings.

Version-Release number of selected component (if applicable):

autotools-0.9.5, cdt-4.0.1, eclipse-3.4M2

How reproducible:

The delete is not always immediate but it's a matter of time until it happens.

Steps to Reproduce:
1. In an autotools project settings, change the build directory from "build" to
empty ("")
2. Change some other settings, clean the project, etc. to force a autotools to
clean the build.
3. Build the project.
Actual results:

The whole project directory is erased, and a message dialog about missing files

Expected results:

a) a simple "make distclean" instead of deleting 
b) an empty build directory should not be accepted.

I personally prefer a). Spite all the evil of building in the source directory,
is not an uncommon practice, so there should be a minimal support of autotools
plugin for it. At any rate, autotools plugin should not ever erase a directory
that it didn't create without the user's consent.
Comment 1 Jeff Johnston 2007-10-17 16:21:54 EDT
Working on a patch to add Autotools properties that will include by default
option a) above and will allow a user to manually specify that the build
directory is deleted on clean or specify an alternate make target (e.g. clean).
Comment 2 José Fonseca 2007-10-17 16:40:40 EDT
Excellent! Keep up the good work!
Comment 3 Jeff Johnston 2007-10-24 16:40:21 EDT
Patch is available on the Sourceware eclipse update site:  Please try
it out.  There is a new project property tab added to Project -> Properties ->
C/C++ Build -> Settings for Autotools options.  One of the added options is make
clean behavior.  By default, make clean will be performed via a make target, the
default target being: distclean.  One is given the choice of opting to use the
Managed Build "delete the build directory" method instead or choosing an
alternate make target.  I performed a test whereby I added a test.file to the
top-level build directory and did a clean - the file was left untouched.  One
quirk however; the low-level ManagedBuild mechanism insists on running a clean
as part of the build so a Clean and Build operation results in a make distclean
followed by a make distclean; make all.  The 2nd make distclean attempt has no
makefile to work with so reports this in a brief message.  The make all
following this ends up regenerating everything and works as expected.
Comment 4 José Fonseca 2007-11-05 18:26:26 EST
Sorry for the delay testing this. Really busy lately.

I still get the project directory deletion with, even when "distclean"
option is selected. It takes some time, and change other configure options and
doing clean, build, etc. But it still occurs. 

I'm going to investigate a bit further (whether there is something wrong with my
setup, whether it only happens on existing projects or also in new, etc.) and
then let you know.
Comment 5 Bug Zapper 2008-04-04 10:04:37 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 6 Jeff Johnston 2008-04-04 16:50:37 EDT
Closing.  A new bug 412651 was opened about the new remove option not working. 
A fix has already been made.

Note You need to log in before you can comment on or make changes to this bug.