File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 860860 'rnp_save_keys_to_path ' ,
861861 'rnp_supported_features ' ,
862862 'rpmaddtag ' ,
863+ 'rpmdefine ' ,
863864 'rrd_create ' ,
864865 'rrd_first ' ,
865866 'rrd_graph ' ,
Original file line number Diff line number Diff line change @@ -19,3 +19,23 @@ function rpmaddtag(int $tag): void
1919 throw RpminfoException::createFromPhpError ();
2020 }
2121}
22+
23+
24+ /**
25+ * Define or change a RPM macro value.
26+ *
27+ * This can be used to select the database path and backend to use
28+ * instead of system default one.
29+ *
30+ * @param string $text Macro name, options, body.
31+ * @throws RpminfoException
32+ *
33+ */
34+ function rpmdefine (string $ text ): void
35+ {
36+ error_clear_last ();
37+ $ safeResult = \rpmdefine ($ text );
38+ if ($ safeResult === false ) {
39+ throw RpminfoException::createFromPhpError ();
40+ }
41+ }
Original file line number Diff line number Diff line change 867867 'rnp_save_keys_to_path ' => 'Safe\rnp_save_keys_to_path ' ,
868868 'rnp_supported_features ' => 'Safe\rnp_supported_features ' ,
869869 'rpmaddtag ' => 'Safe\rpmaddtag ' ,
870+ 'rpmdefine ' => 'Safe\rpmdefine ' ,
870871 'rrd_create ' => 'Safe\rrd_create ' ,
871872 'rrd_first ' => 'Safe\rrd_first ' ,
872873 'rrd_graph ' => 'Safe\rrd_graph ' ,
You can’t perform that action at this time.
0 commit comments