On Thu, Mar 07, 2019 at 06:24:45PM +0100, Alexander Bluhm wrote:
> On Wed, Mar 06, 2019 at 07:53:00PM -0700, Andrew Hewus Fresh wrote:
> > A good 8 years since the 0.34 release to this one, but it seems to be
> > just a few patches to make things faster, plus some documentation fixes.
> > 
> > The difference between 0.50 and 0.51 is they actually applied the
> > speed improvement patches to 0.51.
> > 
> > https://metacpan.org/changes/release/KASEI/Class-Accessor-0.51
> > 
> > OK?
> 
> drwx------  5 _pbuild  _pbuild  512 Oct 22  2017 
> p5-Class-Accessor-0.51/Class-Accessor-0.51
> 
> you need a FIX_EXTRACT_PERMISSIONS=yes
> 
> with that OK bluhm@

I wonder if we could add something to catch that.

I don't know why I had to change to $# > 0 instead of 1 there, that
could maybe indicate another problem, or maybe I'm just confused.

I'm sure I can go read portcheck a bit closer and make a more
appropriate check if this seems like a generally good idea.

Index: infrastructure/bin/portcheck
===================================================================
RCS file: /cvs/ports/infrastructure/bin/portcheck,v
retrieving revision 1.126
diff -u -p -r1.126 portcheck
--- infrastructure/bin/portcheck        16 Nov 2018 10:08:38 -0000      1.126
+++ infrastructure/bin/portcheck        7 Mar 2019 18:17:16 -0000
@@ -789,15 +789,29 @@ check_distfiles() {
        local dir=$1; shift
        local dist_subdir=$1; shift
        local portref=$(portref "$dir")
+       local distdir=$( make show=DISTDIR )
+       local tmpdir
 
        # do not care about absent distfiles, this is fine for meta ports
-       while (($# > 1)); do
+       while (($# > 0)); do
                # try to catch "version-only" names, but not anything more
                if [[ $1 == ?(v)?(.)+([0-9])?(.+([0-9]))*(.+([a-z])) &&
                      -z $dist_subdir && $1 != *\{*\} ]]; then
                        err "${portref}badly named distfile $1 without" \
                            "DIST_SUBDIR or {url} postfix"
                fi
+               if [ -e "$distdir/$dist_subdir/$1" ] && \
+                    ! egrep -sq "^ *FIX_EXTRACT_PERMISSIONS[[:space:]]*=" 
Makefile; then
+                       tmpdir=$( mktemp -d portcheck-XXXXXXXXX )
+                       make WRKSRC=$tmpdir extract
+                       if [ $( find "$tmpdir" ! \( \
+                               \( -type d -a -perm -0555 \) -o -perm -0444 \
+                           \) | wc -l ) -gt 0 ]; then
+                               err "${portref}distfile $1 needs" \
+                                  "FIX_EXTRACT_PERMISSIONS"
+                       fi
+                       rm -rf "$tmpdir"
+               fi
                shift
        done
 }

Reply via email to