[pacman-dev] [PATCH] makepkg: complain if an install/changelog is found as source

Dave Reisner d at falconindy.com
Sun Aug 14 08:27:24 EDT 2011


On Sun, Aug 14, 2011 at 09:00:44PM +1000, Allan McRae wrote:
> On 14/08/11 06:07, Dave Reisner wrote:
> >Signed-off-by: Dave Reisner<dreisner at archlinux.org>
> >---
> >bsdtar can't extract a tarball with the same path/file in it twice, but it
> >will gladly pack it that way... odd. Credit for the AUR for finding this.
> >
> >  scripts/makepkg.sh.in |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> >diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> >index f464014..e5840f1 100644
> >--- a/scripts/makepkg.sh.in
> >+++ b/scripts/makepkg.sh.in
> >@@ -1540,6 +1540,10 @@ check_sanity() {
> >  				error "$(gettext "%s file (%s) does not exist.")" "$i" "$file"
> >  				ret=1
> >  			fi
> >+			if in_array "$file" "${source[@]}"; then
> >+				error "$(gettext "%s file found in source array: %s")" "$i" "$file"
> >+				ret=1
> >+			fi
> >  		done
> >  	done
> >
> 
> 
> I am sure we already "fixed" this in the past.  Did the fix get lost
> with some of that re-factoring that happened with handling
> install/changelog files?

Seems that this was dealt with in 64c325, and it caused some regressions
which were dealt with in ac5c2f. And... now I can't reproduce this. It
definitely still works [1]. Looking at the tarball again, all I see is
insanity:

-rw-r--r-- tealeg/users   1237 2011-06-20 09:15 shunit2/PKGBUILD
-rw-r--r-- tealeg/users    367 2011-06-20 07:14 shunit2/shunit2.install
hrw-r--r-- tealeg/users      0 2011-06-20 07:14 shunit2/shunit2.install link to shunit2/shunit2.install

Not created by makepkg --source ...

disregard...

> As background, there was a big discussion a couple of years back
> about whether we should support the inclusion of install files
> (changelog was different then) in the source array.  The majority
> opinion (of which I was not part...) then was to do so.  So even
> though this patch goes with my line of thinking about the handling
> of install files, I think we should fix the actual issue and not
> pack the same file twice.

[1] http://sprunge.us/KWQY


More information about the pacman-dev mailing list