summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/package.h')
-rw-r--r--lib/libalpm/package.h33
1 files changed, 11 insertions, 22 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index d6c3eff9..2e4ff31e 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -33,30 +33,17 @@ typedef enum _pmpkgfrom_t {
PKG_FROM_FILE
} pmpkgfrom_t;
-/* Packages */
-#define PKG_FILENAME_LEN 512
-#define PKG_NAME_LEN 256
-#define PKG_VERSION_LEN 64
-#define PKG_FULLNAME_LEN (PKG_NAME_LEN + PKG_VERSION_LEN)
-#define PKG_DESC_LEN 512
-#define PKG_URL_LEN 256
-#define PKG_DATE_LEN 32
-#define PKG_TYPE_LEN 32
-#define PKG_PACKAGER_LEN 64
-#define PKG_MD5SUM_LEN 33
-#define PKG_ARCH_LEN 32
-
struct __pmpkg_t {
- char filename[PKG_FILENAME_LEN];
- char name[PKG_NAME_LEN];
- char version[PKG_VERSION_LEN];
- char desc[PKG_DESC_LEN];
- char url[PKG_URL_LEN];
+ char *filename;
+ char *name;
+ char *version;
+ char *desc;
+ char *url;
time_t builddate;
time_t installdate;
- char packager[PKG_PACKAGER_LEN];
- char md5sum[PKG_MD5SUM_LEN];
- char arch[PKG_ARCH_LEN];
+ char *packager;
+ char *md5sum;
+ char *arch;
unsigned long size;
unsigned long isize;
unsigned short scriptlet;
@@ -83,6 +70,8 @@ struct __pmpkg_t {
char *file;
} origin_data;
pmdbinfrq_t infolevel;
+ unsigned long download_size;
+ alpm_list_t *delta_path;
};
int _alpm_versioncmp(const char *a, const char *b);
@@ -90,8 +79,8 @@ pmpkg_t* _alpm_pkg_new(const char *name, const char *version);
pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg);
void _alpm_pkg_free(pmpkg_t *pkg);
int _alpm_pkg_cmp(const void *p1, const void *p2);
+int _alpm_pkgname_pkg_cmp(const void *pkgname, const void *package);
int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
-pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full);
pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack);
int _alpm_pkg_should_ignore(pmpkg_t *pkg);