drpm
A library for making, reading and applying deltarpm packages
|
Tools for creating a DeltaRPM file from two RPM files, providing the same functionality as makedeltarpm(8).
More...
|
DRPM_VISIBLE int | drpm_make (const char *oldrpm, const char *newrpm, const char *deltarpm, const drpm_make_options *opts) |
| Creates a DeltaRPM from two RPMs. The DeltaRPM can later be used to recreate the new RPM from either filesystem data or the old RPM. More...
|
|
Tools for creating a DeltaRPM file from two RPM files, providing the same functionality as makedeltarpm(8).
◆ drpm_make()
DRPM_VISIBLE int drpm_make |
( |
const char * |
oldrpm, |
|
|
const char * |
newrpm, |
|
|
const char * |
deltarpm, |
|
|
const drpm_make_options * |
opts |
|
) |
| |
Creates a DeltaRPM from two RPMs. The DeltaRPM can later be used to recreate the new RPM from either filesystem data or the old RPM.
Does the same thing as the makedeltarpm(8) command-line utility.
Examples of function calls (without error handling):
drpm_make(
"foo.rpm",
"goo.rpm",
"fg.drpm", NULL);
drpm_make(
"foo.rpm",
"goo.rpm",
"fg.drpm", &opts);
drpm_make(
"foo.rpm",
"goo.rpm",
"fg.drpm", &opts);
drpm_make(
"foo.rpm",
"goo.rpm",
"fg.drpm", &opts);
drpm_make(
"foo.rpm", NULL,
"foo.drpm", NULL);
- Parameters
-
[in] | oldrpm | Name of old RPM file. |
[in] | newrpm | Name of new RPM file. |
[in] | deltarpm | Name of DeltaRPM file to be created. |
[in] | opts | Options (if NULL , defaults used). |
- Returns
- Error code.
- Note
- If either
old_rpm
or new_rpm
is NULL
, an "identity" deltarpm is created (may be useful to just replace the signature of an RPM or to reconstruct an RPM from the filesystem).
- Warning
- If not
NULL
, opts
should have been initialized with drpm_make_options_init(), otherwise behaviour is undefined.
DRPM_VISIBLE int drpm_make_options_forbid_addblk(drpm_make_options *opts)
Forbids add block creation.
DRPM_VISIBLE int drpm_make_options_destroy(drpm_make_options **opts)
Frees drpm_make_options.
#define DRPM_COMP_NONE
no compression
Definition: drpm.h:98
#define DRPM_TYPE_RPMONLY
rpm-only deltarpm
Definition: drpm.h:91
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.
#define DRPM_COMP_GZIP
gzip
Definition: drpm.h:99
DRPM_VISIBLE int drpm_make(const char *oldrpm, const char *newrpm, const char *deltarpm, const drpm_make_options *opts)
Creates a DeltaRPM from two RPMs. The DeltaRPM can later be used to recreate the new RPM from either ...
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.
#define DRPM_COMP_BZIP2
bzip2
Definition: drpm.h:100
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.
struct drpm_make_options drpm_make_options
Options for drpm_make()
Definition: drpm.h:170
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.
#define DRPM_COMP_LEVEL_DEFAULT
default compression level for given compression type
Definition: drpm.h:148
DRPM_VISIBLE int drpm_make_options_init(drpm_make_options **opts)
Initializes drpm_make_options with default options.
#define DRPM_COMP_XZ
xz
Definition: drpm.h:102