{"record":{"id":"4605b351b812447e","repo":"jordansissel/fpm","slug":"using-deprecated-flag-package-prefix-please-us-4605b3","errorCode":null,"errorMessage":"Using deprecated flag: --package-prefix. Please use --package-name-prefix","messagePattern":"Using deprecated flag: --package-prefix\\. Please use --package-name-prefix","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/fpm/package/python.rb","lineNumber":38,"sourceCode":"class FPM::Package::Python < FPM::Package\n  # Flags '--foo' will be accessable  as attributes[:python_foo]\n  option \"--bin\", \"PYTHON_EXECUTABLE\",\n    \"The path to the python executable you wish to run.\", :default => \"python\"\n  option \"--easyinstall\", \"EASYINSTALL_EXECUTABLE\",\n    \"The path to the easy_install executable tool\", :default => \"easy_install\"\n  option \"--pip\", \"PIP_EXECUTABLE\",\n    \"The path to the pip executable tool. If not specified, easy_install \" \\\n    \"is used instead\", :default => nil\n  option \"--pypi\", \"PYPI_URL\",\n    \"PyPi Server uri for retrieving packages.\",\n    :default => \"https://pypi.python.org/simple\"\n  option \"--trusted-host\", \"PYPI_TRUSTED\",\n    \"Mark this host or host:port pair as trusted for pip\",\n    :default => nil\n  option \"--package-prefix\", \"NAMEPREFIX\",\n    \"(DEPRECATED, use --package-name-prefix) Name to prefix the package \" \\\n    \"name with.\" do |value|\n    logger.warn(\"Using deprecated flag: --package-prefix. Please use \" \\\n                 \"--package-name-prefix\")\n    value\n  end\n  option \"--package-name-prefix\", \"PREFIX\", \"Name to prefix the package \" \\\n    \"name with.\", :default => \"python\"\n  option \"--fix-name\", :flag, \"Should the target package name be prefixed?\",\n    :default => true\n  option \"--fix-dependencies\", :flag, \"Should the package dependencies be \" \\\n    \"prefixed?\", :default => true\n\n  option \"--downcase-name\", :flag, \"Should the target package name be in \" \\\n    \"lowercase?\", :default => true\n  option \"--downcase-dependencies\", :flag, \"Should the package dependencies \" \\\n    \"be in lowercase?\", :default => true\n\n  option \"--install-bin\", \"BIN_PATH\", \"(DEPRECATED, does nothing) The path to where python scripts \" \\\n    \"should be installed to.\" do\n    logger.warn(\"Using deprecated flag --install-bin\")","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/jordansissel/fpm/blob/b6d77ba72a560b687723376a0e5115c3a92634ad/lib/fpm/package/python.rb#L20-L56","documentation":"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.","triggerScenarios":"Invoking `fpm -s python -t rpm --package-prefix myteam ...`, or setting the python_package_prefix attribute programmatically on an FPM::Package::Python instance.","commonSituations":"Build scripts and CI pipelines written against older fpm releases; fpm command lines copy-pasted from old blog posts, wikis, or shared team recipes.","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'"],"exampleFix":"# before\nfpm -s python -t rpm --package-prefix myteam requests\n\n# after\nfpm -s python -t rpm --package-name-prefix myteam requests","handlingStrategy":"validation","validationCode":"# CI guard: fail the script audit when the deprecated flag appears\nif grep -rnE -- '--package-prefix([ =]|$)' build/; then\n  echo 'ERROR: use --package-name-prefix, not --package-prefix' >&2\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["python","deprecated-flag","cli-options","packaging"],"backgroundTag":"deprecated-option-warning","analyzedSha":"b6d77ba72a560b687723376a0e5115c3a92634ad","analyzedAt":"2026-08-21T16:39:02.570Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}