Subject: bug#9579: closed (Re: bug#9579: distcheck does not detect incomplete uninstall as advertised)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 01 Oct 2011 17:26:02 +0000

Your bug report

#9579: distcheck does not detect incomplete uninstall as advertised

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
9579: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9579
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#9579: distcheck does not detect incomplete uninstall as advertised
From: Stefano Lattarini <[email-masked]>
To: Nick Bowler <[email-masked]>, [email-masked]
Cc: [email-masked]
Date: Sat, 1 Oct 2011 19:23:58 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Tuesday 27 September 2011, Stefano Lattarini wrote:
> On Monday 26 September 2011, Nick Bowler wrote:
> > Hi Stefano,
> > 
> > On 2011-09-23 21:46 +0200, Stefano Lattarini wrote:
> > > Apparently, it was a simple bug.  Attached is the patch I'll push to maint
> > > in a couple of days to fix it.  As usual, reviews welcome.
> > > 
> > > Thanks,
> > >   Stefano
> > 
> > > From: Stefano Lattarini <[email-masked]>
> > > Date: Fri, 23 Sep 2011 16:06:59 +0200
> > > Subject: [PATCH] distuninstallcheck: fail also when only one file is left installed
> > 
> > I've tested this on my project, and now distcheck fails when I revert my
> > uninstall-local rule.  It's perhaps a bit unfortunate that
> > 
> >   make infodir='${prefix}/somewhere_else' distcheck
> > 
> > no longer works, but I agree that it seems non-trivial to make that
> > work properly.
> >
> Well, I don't agree anymore on this ;-) -- by complicating my patch just
> a little bit, we can apparently cater for this situation as well.  See the
> attached squash-in (I've also attached the updated patch, for reference).
> 
> So I'll give a couple of days for further comments, than I'll push this
> improved patch instead of the previous one.
> 
> Thanks,
>   Stefano
> 
Pushed now, so I'm closing the bug report.

Regards,
  Stefano

Subject: distcheck does not detect incomplete uninstall as advertised
From: Nick Bowler <[email-masked]>
To: [email-masked]
Date: Thu, 22 Sep 2011 16:48:46 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

In the Automake manual, §14.4 "Checking the Distribution"

  https://www.gnu.org/software/automake/manual/automake.html#Checking-the-Distribution

claims that make distcheck will verify that make uninstall works
correctly.  The relevant text is quoted here:

> distcheck also checks that the uninstall rule works properly, both for
> ordinary and DESTDIR builds. It does this by invoking ‘make uninstall’,
> and then it checks the install tree to see if any files are left over.
> This check will make sure that you correctly coded your
> uninstall-related rules.

However, this does not seem to be the case.  I realized that I had
completely forgotten to write an uninstall-local rule to go with my
install-data-local rule, yet distcheck remained completely silent on
the matter.

I'm using autoconf-2.68 and automake-1.11.1.  The issue also occurs with
latest automake git at the time of writing.  Here's an example:

% cat >Makefile.am <<'EOF'
dist_data_DATA = foo
EXTRA_DIST = bar

install-data-local:
	$(MKDIR_P) '$(DESTDIR)$(datadir)'
	cp '$(srcdir)/bar' '$(DESTDIR)$(datadir)/bar'
EOF

% cat >configure.ac <<'EOF'
AC_INIT([test], [1.0])

AM_INIT_AUTOMAKE([-Wall -Werror foreign])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF

% cat >foo <<'EOF'
foo
EOF

% cat >bar <<'EOF'
bar
EOF

A quick test reveals that the uninstall target of my Makefile is
definitely broken:

  % ./configure --prefix=$PWD/inst
  % make install
  % find inst -type f
  inst/share/foo
  inst/share/bar
  % make uninstall
  % find inst -type f
  inst/share/bar

As expected, "bar" is erroneously left in the install tree.  However,
when we go to run make distcheck:

  % make distcheck
  [...]
  ==========================================
  test-1.0 archives ready for distribution: 
  test-1.0.tar.gz
  ==========================================

Based on the quoted paragraph in the manual, I had expected distcheck to
fail.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)