tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44713, brokennes of GNU patch



Hello. GNU patch fails to apply pkgsrc patches correctly (see
http://gnats.netbsd.org/44713).  Another problem is that latest versions
of GNU patch exit with error if files to be modified are read-only. This
happens very often with pkgsrc distfiles.

In order to solve this problem I'd like to enable devel/nbpatch
unconditionally during bootstrap on Linux and Solaris.
Then close pkg/44713.

Objections? The patch is in attachment.

Index: bootstrap
===================================================================
RCS file: /cvsroot/pkgsrc/bootstrap/bootstrap,v
retrieving revision 1.173
diff -u -r1.173 bootstrap
--- bootstrap   29 Nov 2011 17:06:45 -0000      1.173
+++ bootstrap   9 Dec 2011 14:15:20 -0000
@@ -449,6 +449,7 @@
 bmakexenv=
 bmakexargs=
 need_extras=no
+need_nbpatch=no
 case "$opsys" in
 AIX)
        root_group=system
@@ -595,6 +596,7 @@
        need_bsd_install=no
        need_awk=no
        need_sed=no
+       need_nbpatch=yes # pkg/44713
        set_opsys=no
        machine_arch=`uname -m | sed -e 's/i.86/i386/'`
        ;;
@@ -677,6 +679,7 @@
                need_sed=yes
        fi
        need_ksh=yes
+       need_nbpatch=yes # pkg/44713
        set_opsys=no
        groupsprog="/usr/xpg4/bin/id -gn"
        whoamiprog="/usr/xpg4/bin/id -un"
@@ -713,6 +716,7 @@
        need_awk=yes
        need_sed=yes
        need_ksh=yes
+       need_nbpatch=yes # pkg/44713
        ;;
 esac
 
@@ -970,7 +974,7 @@
 
 # bootstrap sed if necessary
 case "$need_sed" in
-yes)   echo_msg "Bootstrapping sed"
+yes)   echo_msg "Bootstrapping sed"
        copy_src $pkgsrcdir/textproc/nbsed/files sed
        run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS 
-I../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat' LIBS='$LIBS -lnbcompat' 
$shprog ./configure $configure_quiet_flags -C --prefix=$prefix --mandir=$mandir 
--sysconfdir=$sysconfdir --program-transform-name='s,sed,nbsed,' && $bmake)"
        run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/sed/sed 
$wrkdir/bin/sed"
@@ -979,6 +983,12 @@
        ;;
 esac
 
+# Set TOOLS_PLATFORM.patch if necessary
+if [ "$need_nbpatch" = yes ]; then
+       echo_msg "Setting TOOLS_PLATFORM.patch"
+       echo "TOOLS_PLATFORM.patch?=    # emptyness means pkgsrc version" >> 
${TARGET_MKCONF}
+fi
+
 # bootstrap pkg_install
 echo_msg "Bootstrapping pkgtools"
 copy_src $pkgsrcdir/pkgtools/pkg_install/files pkg_install


Home | Main Index | Thread Index | Old Index