wpkg --enforce-path-length-limit ...

By default wpkg lets you use very long paths, although it will emit a warning when your path reaches 1,024 bytes. You may change the warning limit with the --path-length-limit option.

However, if you want to make sure that your packages are compatible across a specific set of operating systems, then the maximum length of any path must be the smallest possible path supported by those operating systems. For example, if you are generating packages for Linux and MS-Windows, the maximum length for a path under Linux is 4,096, however, MS-Windows will let you create paths as long as 32,000 characters. Such packages would not be compatible with Linux.

The --enforce-path-length-limit option let you request that wpkg breaks by emitting an error when a path with a larger length is found in a package being built. Note that it is really only useful when creating a package. While installing, we let the operating system itself tell you whether the contents of a package may or may not be installed on it.


If you foresee your users installing your packages in a sub-directory—opposed to the root directory—then the limit should be smaller than the maximum allowed on the system with the smallest path length support. This is why by default we generate a warning when a path is more than 1,024 bytes.

This option is really an excellent choice to have in your wpkg.conf file.

Syndicate content