diff --git a/generated/functionsList.php b/generated/functionsList.php index 6a900132..50c6422a 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -860,6 +860,7 @@ 'rnp_save_keys_to_path', 'rnp_supported_features', 'rpmaddtag', + 'rpmdefine', 'rrd_create', 'rrd_first', 'rrd_graph', diff --git a/generated/rpminfo.php b/generated/rpminfo.php index 2cd42fa6..60183e30 100644 --- a/generated/rpminfo.php +++ b/generated/rpminfo.php @@ -19,3 +19,23 @@ function rpmaddtag(int $tag): void throw RpminfoException::createFromPhpError(); } } + + +/** + * Define or change a RPM macro value. + * + * This can be used to select the database path and backend to use + * instead of system default one. + * + * @param string $text Macro name, options, body. + * @throws RpminfoException + * + */ +function rpmdefine(string $text): void +{ + error_clear_last(); + $safeResult = \rpmdefine($text); + if ($safeResult === false) { + throw RpminfoException::createFromPhpError(); + } +} diff --git a/rector-migrate.php b/rector-migrate.php index e2f8e0f4..40af01b2 100644 --- a/rector-migrate.php +++ b/rector-migrate.php @@ -867,6 +867,7 @@ 'rnp_save_keys_to_path' => 'Safe\rnp_save_keys_to_path', 'rnp_supported_features' => 'Safe\rnp_supported_features', 'rpmaddtag' => 'Safe\rpmaddtag', + 'rpmdefine' => 'Safe\rpmdefine', 'rrd_create' => 'Safe\rrd_create', 'rrd_first' => 'Safe\rrd_first', 'rrd_graph' => 'Safe\rrd_graph',