Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes in rpminfo 0.7.0 #2794

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 46 additions & 2 deletions reference/rpminfo/functions/rpmvercmp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>rpmvercmp</methodname>
<type class="union"><type>int</type><type>bool</type></type><methodname>rpmvercmp</methodname>
<methodparam><type>string</type><parameter>evr1</parameter></methodparam>
<methodparam><type>string</type><parameter>evr2</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>operator</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Compare 2 RPM versions.
Expand All @@ -38,16 +39,59 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>operator</parameter></term>
<listitem>
<para>
An optional operator. The possible operators
are: <literal>&lt;</literal>, <literal>lt</literal>,
<literal>&lt;=</literal>, <literal>le</literal>, <literal>&gt;</literal>,
<literal>gt</literal>, <literal>&gt;=</literal>, <literal>ge</literal>,
<literal>==</literal>, <literal>=</literal>, <literal>eq</literal>,
<literal>!=</literal>, <literal>&lt;&gt;</literal>, <literal>ne</literal>
respectively.
</para>
<para>
This parameter is case-sensitive, values should be lowercase.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &lt; 0 if evr1 is less than evr2, &gt; 0 if evr1 is greater than evr2, and 0 if they are equal.
Returns &lt; 0 if evr1 is less than evr2, &gt; 0 if evr1 is greater than evr2, and 0 if they are equal.
</para>
<para>
When using the optional <parameter>operator</parameter> argument, the
function will return &true; if the relationship is the one specified
by the operator, &false; otherwise.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>0.7.0</entry>
<entry>
Optional <parameter>operator</parameter> was added.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

</refentry>

Expand Down