# HG changeset patch # User Carnë Draug # Date 1458509989 0 # Node ID ddfd7e5f8d18394bce0a0a276ae7ab5f29d7cb5c # Parent dcee67d28570c02a73060618c992244f4b882030 pkg: support PKG_ADD file in inst/. * pkg/private/create_pkgadddel.m: inst/ is meant to be the directory of the package "ready" to install" and all files within it are copied to the arch independent directory of the package. However, when reading the m files for PKG_ADD directives, it clobers an existing PKG_ADD file. So append to such file if it exists. This change will break "pkg build" since it is unable to guess the right place for the PKG_ADD (but it is already broken, see bug #45369). diff -r dcee67d28570 -r ddfd7e5f8d18 scripts/pkg/private/create_pkgadddel.m --- a/scripts/pkg/private/create_pkgadddel.m Fri May 29 00:25:46 2015 +0100 +++ b/scripts/pkg/private/create_pkgadddel.m Sun Mar 20 21:39:49 2016 +0000 @@ -24,7 +24,7 @@ function create_pkgadddel (desc, packdir, nm, global_install) instpkg = fullfile (desc.dir, nm); - instfid = fopen (instpkg, "wt"); + instfid = fopen (instpkg, "at"); # append to support PKG_ADD at inst/ ## If it is exists, most of the PKG_* file should go into the ## architecture dependent directory so that the autoload/mfilename ## commands work as expected. The only part that doesn't is the