FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Local function of pkgagent. More...
#include "pkgagent.h"
Go to the source code of this file.
Functions | |
void | EscapeString (char *sourceString, char *escString, int esclen) |
Escaping special characters(single quote) More... | |
char * | GetFieldValue (char *Sin, char *Field, int FieldMax, char *Value, int ValueMax, char Separator) |
Given a string that contains field='value' pairs, save the items. More... | |
int | ProcessUpload (long upload_pk) |
Get all pfile need to processed use upload_pk. More... | |
void | ReadHeaderInfo (Header header, struct rpmpkginfo *pi) |
Get RPM package info from rpm file header use rpm library. More... | |
int | GetMetadata (char *pkg, struct rpmpkginfo *pi) |
Get RPM package info. More... | |
int | RecordMetadataRPM (struct rpmpkginfo *pi) |
Store rpm package info into database. More... | |
char * | ParseDebFile (char *Sin, char *Field, char *Value) |
Parse Debian binary control file with Field/Value pairs. More... | |
int | GetMetadataDebBinary (long upload_pk, struct debpkginfo *pi) |
Get debian binary package info. More... | |
int | RecordMetadataDEB (struct debpkginfo *pi) |
Store debian package info into database. More... | |
int | GetMetadataDebSource (char *repFile, struct debpkginfo *pi) |
Get debian source package info from .dsc file. More... | |
void | Usage (char *Name) |
Say how to run this program. More... | |
Variables | |
int | Verbose = 0 |
Verbose level. More... | |
PGconn * | db_conn = NULL |
The connection to Database. More... | |
int | tag [15] |
Local function of pkgagent.
The package metadata agent puts data about each package (rpm and deb) into the database.
Pkgagent get RPM package info from rpm files using rpm library, Build pkgagent.c need "rpm" and "librpm-dev", running binary just need "rpm".
Pkgagent get Debian binary package info from .deb binary control file.
Pkgagent get Debian source package info from .dsc file.
Definition in file pkgagent.c.
void EscapeString | ( | char * | sourceString, |
char * | escString, | ||
int | esclen | ||
) |
Escaping special characters(single quote)
Escaping special characters, so that they cannot cause any harm.
[in] | sourceString | The source string need to escape |
[out] | escString | The string after excape |
[in] | esclen | The string length need to escape |
Definition at line 51 of file pkgagent.c.
char* GetFieldValue | ( | char * | Sin, |
char * | Field, | ||
int | FieldMax, | ||
char * | Value, | ||
int | ValueMax, | ||
char | Separator | ||
) |
Given a string that contains field='value' pairs, save the items.
[in] | Sin | String to parse |
[out] | Field | Field string |
[in] | FieldMax | Field capacity |
[out] | Value | Value string |
[in] | ValueMax | Value capacity |
[in] | Separator | Separator to use |
Definition at line 101 of file pkgagent.c.
int GetMetadata | ( | char * | pkg, |
struct rpmpkginfo * | pi | ||
) |
Get RPM package info.
pkg | Path of repo pfile | |
[out] | pi | rpmpkginfo global pointer |
Definition at line 505 of file pkgagent.c.
int GetMetadataDebBinary | ( | long | upload_pk, |
struct debpkginfo * | pi | ||
) |
Get debian binary package info.
upload_pk | the upload_pk |
pi | the global pointor of debpkginfo |
Definition at line 670 of file pkgagent.c.
int GetMetadataDebSource | ( | char * | repFile, |
struct debpkginfo * | pi | ||
) |
Get debian source package info from .dsc file.
repFile | the pfile path name | |
[out] | pi | the global pointor of debpkginfo |
Definition at line 892 of file pkgagent.c.
char* ParseDebFile | ( | char * | Sin, |
char * | Field, | ||
char * | Value | ||
) |
Parse Debian binary control file with Field/Value pairs.
Sin | the string to parse | |
[out] | Field | the Field part of pairs |
[out] | Value | the Value part of pairs |
Definition at line 629 of file pkgagent.c.
int ProcessUpload | ( | long | upload_pk | ) |
Get all pfile need to processed use upload_pk.
upload_pk | The upload_pk send from scheduler |
Definition at line 162 of file pkgagent.c.
void ReadHeaderInfo | ( | Header | header, |
struct rpmpkginfo * | pi | ||
) |
Get RPM package info from rpm file header use rpm library.
header | rpm header | |
[out] | pi | rpmpkginfo global pointer |
Definition at line 402 of file pkgagent.c.
int RecordMetadataDEB | ( | struct debpkginfo * | pi | ) |
Store debian package info into database.
pi | the global pointor of debpkginfo |
Definition at line 818 of file pkgagent.c.
int RecordMetadataRPM | ( | struct rpmpkginfo * | pi | ) |
Store rpm package info into database.
pi |
Definition at line 563 of file pkgagent.c.
void Usage | ( | char * | Name | ) |
Say how to run this program.
Print usage of bucket agent
Name | Absolute path of agent |
Many agents permit running from the command-line for testing. At minimum, you need "-i" to initialize the DB and exit.
Say how to run this program.
Name | - the name of the executable, usually it is mimetype |
Say how to run this program.
Name | Path to nomos binary |
Definition at line 980 of file pkgagent.c.
PGconn* db_conn = NULL |
int tag[15] |
Array of RPMTAG
Definition at line 25 of file pkgagent.c.
int Verbose = 0 |
Verbose level.
Global verbose level.
Contains all the functions supported by delagent
Verbosity level
Definition at line 21 of file pkgagent.c.