drpm: DRPM Make Options

drpm A library for making, reading and applying deltarpm packages

Loading...
Searching...
No Matches
Typedefs | Functions
DRPM Make Options
DRPM Make

Tools for customizing DeltaRPM creation. More...

## Typedefs
typedef struct drpm_make_options | drpm_make_options
| Options for drpm_make()

## Functions
DRPM_VISIBLE int | drpm_make_options_add_patches (drpm_make_options *opts, const char *oldrpmprint, const char *oldpatchrpm)
| Requests incorporation of RPM patch files for the old RPM.
DRPM_VISIBLE int | drpm_make_options_copy (drpm_make_options *dst, const drpm_make_options *src)
| Copies drpm_make_options.
DRPM_VISIBLE int | drpm_make_options_defaults (drpm_make_options *opts)
| Resets options to default values.
DRPM_VISIBLE int | drpm_make_options_destroy (drpm_make_options **opts)
| Frees drpm_make_options.
DRPM_VISIBLE int | drpm_make_options_forbid_addblk (drpm_make_options *opts)
| Forbids add block creation.
DRPM_VISIBLE int | drpm_make_options_get_delta_comp_from_rpm (drpm_make_options *opts)
| DeltaRPM compression method is the same as used in the new RPM.
DRPM_VISIBLE int | drpm_make_options_init (drpm_make_options **opts)
| Initializes drpm_make_options with default options.
DRPM_VISIBLE int | drpm_make_options_set_addblk_comp (drpm_make_options *opts, unsigned short comp, unsigned short level)
| Sets add block compression type and level.
DRPM_VISIBLE int | drpm_make_options_set_delta_comp (drpm_make_options *opts, unsigned short comp, unsigned short level)
| Sets DeltaRPM compression type and level.
DRPM_VISIBLE int | drpm_make_options_set_seqfile (drpm_make_options *opts, const char *seqfile)
| Specifies file to which to write DeltaRPM sequence ID.
DRPM_VISIBLE int | drpm_make_options_set_type (drpm_make_options *opts, unsigned short type)
| Sets DeltaRPM type.
DRPM_VISIBLE int | drpm_make_options_set_version (drpm_make_options *opts, unsigned short version)
| Sets DeltaRPM version.

## Detailed Description

Tools for customizing DeltaRPM creation.

## Function Documentation

## ◆ drpm_make_options_init()

DRPM_VISIBLE int drpm_make_options_init | ( | drpm_make_options ** | opts | ) |

Initializes drpm_make_options with default options.

Passing `*opts` to drpm_make() immediately after would have the same effect as passing `NULL` instead.

Parameters

  [out] | opts | Address of options structure pointer.

Returns
  Error code.

See also
  drpm_make()

## ◆ drpm_make_options_destroy()

DRPM_VISIBLE int drpm_make_options_destroy | ( | drpm_make_options ** | opts | ) |

Frees drpm_make_options.

Parameters

  [out] | opts | Address of options structure pointer.

Returns
  Error code.

See also
  drpm_make()

## ◆ drpm_make_options_defaults()

DRPM_VISIBLE int drpm_make_options_defaults | ( | drpm_make_options * | opts | ) |

Resets options to default values.

Passing `opts` to drpm_make() immediately after would have the same effect as passing `NULL` instead.

Parameters

  [out] | opts | Structure specifying options for drpm_make().

Returns
  Error code.

See also
  drpm_make()

## ◆ drpm_make_options_copy()

DRPM_VISIBLE int drpm_make_options_copy | ( | drpm_make_options * | dst,
|  | const drpm_make_options * | src )

Copies drpm_make_options.

Copies data from `src` to `dst`.

Parameters

  [out] | dst | Destination options.
  [in] | src | Source options.

Returns
  Error code.

Warning
  `dst` should have also been initialized with drpm_make_options_init() previously, otherwise behaviour is undefined.

See also
  drpm_make()

## ◆ drpm_make_options_set_type()

DRPM_VISIBLE int drpm_make_options_set_type | ( | drpm_make_options * | opts,
|  | unsigned short | type )

Sets DeltaRPM type.

There are two types of DeltaRPMs: standard and "rpm-only". The latter was introduced in version 3. It does not work with filesystem data but is smaller and faster to combine.

Parameters

  [out] | opts | Structure specifying options for drpm_make().
  [in] | type | Type of deltarpm.

Returns
  Error code.

See also
  drpm_make()
  DRPM_TYPE_STANDARD, DRPM_TYPE_RPMONLY

## ◆ drpm_make_options_set_version()

DRPM_VISIBLE int drpm_make_options_set_version | ( | drpm_make_options * | opts,
|  | unsigned short | version )

Sets DeltaRPM version.

The default DeltaRPM format is V3, but an older version may also be specified.

Parameters

  [out] | opts | Structure specifying options for drpm_make().
  [in] | version | Version (1-3).

Returns
  Error code.

See also
  drpm_make()

## ◆ drpm_make_options_set_delta_comp()

DRPM_VISIBLE int drpm_make_options_set_delta_comp | ( | drpm_make_options * | opts,
|  | unsigned short | comp,
|  | unsigned short | level )

Sets DeltaRPM compression type and level.

By default, the compression method is the same as used in the new RPM.

Parameters

  [out] | opts | Structure specifying options for drpm_make().
  [in] | comp | Compression type.
  [in] | level | Compression level (1-9 or default).

Returns
  Error code.

See also
  drpm_make()
  DRPM_COMP_NONE, DRPM_COMP_GZIP, DRPM_COMP_BZIP2, DRPM_COMP_LZMA, DRPM_COMP_XZ
  DRPM_COMP_LEVEL_DEFAULT

## ◆ drpm_make_options_get_delta_comp_from_rpm()

DRPM_VISIBLE int drpm_make_options_get_delta_comp_from_rpm | ( | drpm_make_options * | opts | ) |

DeltaRPM compression method is the same as used in the new RPM.

May be used to reset DeltaRPM compression option after previously calling drpm_make_options_delta_comp().

Parameters

  [out] | opts | Structure specifying options for drpm_make().

Returns
  Error code.

See also
  drpm_make()

## ◆ drpm_make_options_forbid_addblk()

DRPM_VISIBLE int drpm_make_options_forbid_addblk | ( | drpm_make_options * | opts | ) |

Forbids add block creation.

An "add block" is a highly compressible block used to store bytewise subtractions of segments where less than half the bytes have changed. It is used in re-creating the new RPM with drpm_apply(), unless this functions is called to tell drpm_make() not to create an add block.

Parameters

  [out] | opts | Structure specifying options for drpm_make().

Returns
  Error code.

See also
  drpm_make()

## ◆ drpm_make_options_set_addblk_comp()

DRPM_VISIBLE int drpm_make_options_set_addblk_comp | ( | drpm_make_options * | opts,
|  | unsigned short | comp,
|  | unsigned short | level )

Sets add block compression type and level.

The default add block compression type is bzip2, which gives the best results.

Parameters

  [out] | opts | Structure specifying options for drpm_make().
  [in] | comp | Compression type.
  [in] | level | Compression level (1-9 or default).

Returns
  Error code.

See also
  drpm_make()
  DRPM_COMP_NONE, DRPM_COMP_GZIP, DRPM_COMP_BZIP2, DRPM_COMP_LZMA, DRPM_COMP_XZ
  DRPM_COMP_LEVEL_DEFAULT

## ◆ drpm_make_options_set_seqfile()

DRPM_VISIBLE int drpm_make_options_set_seqfile | ( | drpm_make_options * | opts,
|  | const char * | seqfile )

Specifies file to which to write DeltaRPM sequence ID.

If a valid file name is given, drpm_make() will write out the sequence ID to the file `seqfile`.

Parameters

  [out] | opts | Structure specifying options for drpm_make().
  [in] | seqfile | Name of file to which to write out sequence.

Returns
  Error code.

Note
  If `seqfile` is `NULL`, sequence ID shall not be written.

See also
  drpm_make()

## ◆ drpm_make_options_add_patches()

DRPM_VISIBLE int drpm_make_options_add_patches | ( | drpm_make_options * | opts,
|  | const char * | oldrpmprint,
|  | const char * | oldpatchrpm )

Requests incorporation of RPM patch files for the old RPM.

This option enables the usage of patch RPMs, telling drpm_make() to exclude all files that were not included in the patch RPM but are not bytewise identical to the ones in the old RPM.

Parameters

  [out] | opts | Structure specifying options for drpm_make().
  [in] | oldrpmprint | The rpm-print of the old RPM.
  [in] | oldpatchrpm | The created patch RPM.

Returns
  Error code.

See also
  drpm_make()