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...
|
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()
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.
int drpm_make_options_set_delta_comp(drpm_make_options *opts, unsigned short comp, unsigned short level)
Sets DeltaRPM compression type and level.
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 ...
#define DRPM_COMP_NONE
no compression
Definition: drpm.h:92
#define DRPM_TYPE_RPMONLY
rpm-only deltarpm
Definition: drpm.h:85
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_GZIP
gzip
Definition: drpm.h:93
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.
int drpm_make_options_init(drpm_make_options **opts)
Initializes drpm_make_options with default options.
int drpm_make_options_set_seqfile(drpm_make_options *opts, const char *seqfile)
Specifies file to which to write DeltaRPM sequence ID.
int drpm_make_options_destroy(drpm_make_options **opts)
Frees drpm_make_options.
#define DRPM_COMP_BZIP2
bzip2
Definition: drpm.h:94
int drpm_make_options_set_type(drpm_make_options *opts, unsigned short type)
Sets DeltaRPM type.
int drpm_make_options_forbid_addblk(drpm_make_options *opts)
Forbids add block creation.
int drpm_make_options_set_version(drpm_make_options *opts, unsigned short version)
Sets DeltaRPM version.
struct drpm_make_options drpm_make_options
Options for drpm_make()
Definition: drpm.h:164
#define DRPM_COMP_LEVEL_DEFAULT
default compression level for given compression type
Definition: drpm.h:142
#define DRPM_COMP_XZ
xz
Definition: drpm.h:96