pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[patch] package.mk: use cp without -p if it fails
Hi all,
After setting up pkgsrc on a new FreeBSD 13 installation on ZFS, I
encoutnered an error when building any package: cp would report a
chattr failure copying the package file from the work directory to the
packages directory.
This was because my work directory is hosted on the ZFS root
filesystem, which sets 'uarch' flags, and the packages directory is on
an NFS-mounted volume which doesn't support that flag (or any?).
The attached patch uses regular 'cp' if 'cp -p' doesn't work.
ok to commit?
Sijmen
Index: mk/pkgformat/pkg/package.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pkgformat/pkg/package.mk,v
retrieving revision 1.16
diff -u -r1.16 package.mk
--- mk/pkgformat/pkg/package.mk 19 Aug 2017 00:30:19 -0000 1.16
+++ mk/pkgformat/pkg/package.mk 5 Aug 2021 13:33:10 -0000
@@ -66,7 +66,8 @@
@${STEP_MSG} "Creating binary package ${.TARGET}"
${RUN} ${MKDIR} ${.TARGET:H}; \
${LN} -f ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null || \
- ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE}
+ ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null || \
+ ${CP} -f ${STAGE_PKGFILE} ${PKGFILE}
.endif
######################################################################
Home |
Main Index |
Thread Index |
Old Index