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 860
860
'rnp_save_keys_to_path ' ,
861
861
'rnp_supported_features ' ,
862
862
'rpmaddtag ' ,
863
+ 'rpmdefine ' ,
863
864
'rrd_create ' ,
864
865
'rrd_first ' ,
865
866
'rrd_graph ' ,
Original file line number Diff line number Diff line change @@ -19,3 +19,23 @@ function rpmaddtag(int $tag): void
19
19
throw RpminfoException::createFromPhpError ();
20
20
}
21
21
}
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 867
867
'rnp_save_keys_to_path ' => 'Safe\rnp_save_keys_to_path ' ,
868
868
'rnp_supported_features ' => 'Safe\rnp_supported_features ' ,
869
869
'rpmaddtag ' => 'Safe\rpmaddtag ' ,
870
+ 'rpmdefine ' => 'Safe\rpmdefine ' ,
870
871
'rrd_create ' => 'Safe\rrd_create ' ,
871
872
'rrd_first ' => 'Safe\rrd_first ' ,
872
873
'rrd_graph ' => 'Safe\rrd_graph ' ,
You can’t perform that action at this time.
0 commit comments