jordansissel/fpm · warning
Using deprecated flag: --package-prefix. Please use --packag
Error message
Using deprecated flag: --package-prefix. Please use --package-name-prefix
What it means
The python input target renamed --package-prefix to --package-name-prefix. The old flag is still accepted for compatibility, but its handler block logs this deprecation warning on every use. The block returns the value unchanged, so the prefix is still applied — this is a rename warning, not a loss of function.
Source
Thrown at lib/fpm/package/python.rb:38
class FPM::Package::Python < FPM::Package
# Flags '--foo' will be accessable as attributes[:python_foo]
option "--bin", "PYTHON_EXECUTABLE",
"The path to the python executable you wish to run.", :default => "python"
option "--easyinstall", "EASYINSTALL_EXECUTABLE",
"The path to the easy_install executable tool", :default => "easy_install"
option "--pip", "PIP_EXECUTABLE",
"The path to the pip executable tool. If not specified, easy_install " \
"is used instead", :default => nil
option "--pypi", "PYPI_URL",
"PyPi Server uri for retrieving packages.",
:default => "https://pypi.python.org/simple"
option "--trusted-host", "PYPI_TRUSTED",
"Mark this host or host:port pair as trusted for pip",
:default => nil
option "--package-prefix", "NAMEPREFIX",
"(DEPRECATED, use --package-name-prefix) Name to prefix the package " \
"name with." do |value|
logger.warn("Using deprecated flag: --package-prefix. Please use " \
"--package-name-prefix")
value
end
option "--package-name-prefix", "PREFIX", "Name to prefix the package " \
"name with.", :default => "python"
option "--fix-name", :flag, "Should the target package name be prefixed?",
:default => true
option "--fix-dependencies", :flag, "Should the package dependencies be " \
"prefixed?", :default => true
option "--downcase-name", :flag, "Should the target package name be in " \
"lowercase?", :default => true
option "--downcase-dependencies", :flag, "Should the package dependencies " \
"be in lowercase?", :default => true
option "--install-bin", "BIN_PATH", "(DEPRECATED, does nothing) The path to where python scripts " \
"should be installed to." do
logger.warn("Using deprecated flag --install-bin")View on GitHub (pinned to b6d77ba72a)
Solutions
- Replace --package-prefix with --package-name-prefix in the fpm command line
- If driving fpm from Ruby, set attributes[:python_package_name_prefix] instead of the old attribute
- Drop the flag entirely to accept the default prefix 'python'
Example fix
# before fpm -s python -t rpm --package-prefix myteam requests # after fpm -s python -t rpm --package-name-prefix myteam requests
Defensive patterns
Strategy: validation
Validate before calling
# CI guard: fail the script audit when the deprecated flag appears if grep -rnE -- '--package-prefix([ =]|$)' build/; then echo 'ERROR: use --package-name-prefix, not --package-prefix' >&2 exit 1 fi
Prevention
- Keep fpm command lines in one shared script instead of duplicating them across jobs
- After every fpm upgrade, diff `fpm --help` output for the targets you use
- Search the repo for deprecated flags before releasing shared build templates
When it happens
Trigger: Invoking `fpm -s python -t rpm --package-prefix myteam ...`, or setting the python_package_prefix attribute programmatically on an FPM::Package::Python instance.
Common situations: Build scripts and CI pipelines written against older fpm releases; fpm command lines copy-pasted from old blog posts, wikis, or shared team recipes.
Related errors
- Using deprecated flag --install-bin
- Using deprecated flag: --install-location. Please use --pref
- #{self.class.name} does not yet support reading #{self.type}
- #{self.class.name} does not yet support creating #{self.type
- Parent directory does not exist: #{File.dirname(output_path)
AI-assisted analysis of jordansissel/fpm@b6d77ba72a (2026-08-21).
Data as JSON: /api/errors/4605b351b812447e.
Report an issue: GitHub.