--- Begin Message ---
Subject: |
distcheck does not detect incomplete uninstall as advertised |
Date: |
Thu, 22 Sep 2011 16:48:46 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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/)
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#9579: distcheck does not detect incomplete uninstall as advertised |
Date: |
Sat, 1 Oct 2011 19:23:58 +0200 |
User-agent: |
KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) |
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 <address@hidden>
> > > 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
--- End Message ---