diff options
author | Judd Vinet <judd@archlinux.org> | 2005-07-22 01:59:11 +0000 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2005-07-22 01:59:11 +0000 |
commit | a2192570fb187f4be900b24a880a85fd4dd125db (patch) | |
tree | 717a03b8fa84463fbbce7fc203ba803395756afc /lib/libalpm | |
parent | da79a410543205cbcf25cd2d1355cc3f8faab3f2 (diff) |
changed license package field to a list
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/alpm.c | 2 | ||||
-rw-r--r-- | lib/libalpm/package.c | 2 | ||||
-rw-r--r-- | lib/libalpm/package.h | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index a91323b3..ce83f664 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -419,13 +419,13 @@ void *alpm_pkg_getinfo(pmpkg_t *pkg, unsigned char parm) case PM_PKG_DESC: data = pkg->desc; break; case PM_PKG_GROUPS: data = pkg->groups; break; case PM_PKG_URL: data = pkg->url; break; - case PM_PKG_LICENSE: data = pkg->license; break; case PM_PKG_ARCH: data = pkg->arch; break; case PM_PKG_BUILDDATE: data = pkg->builddate; break; case PM_PKG_INSTALLDATE: data = pkg->installdate; break; case PM_PKG_PACKAGER: data = pkg->packager; break; case PM_PKG_SIZE: data = (void *)pkg->size; break; case PM_PKG_REASON: data = (void *)(int)pkg->reason; break; + case PM_PKG_LICENSE: data = pkg->license; break; case PM_PKG_REPLACES: data = pkg->replaces; break; case PM_PKG_MD5SUM: data = pkg->md5sum; break; case PM_PKG_DEPENDS: data = pkg->depends; break; diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index f5a3c33a..db6a8732 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -84,7 +84,6 @@ pmpkg_t *pkg_dup(pmpkg_t *pkg) STRNCPY(newpkg->version, pkg->version, PKG_VERSION_LEN); STRNCPY(newpkg->desc, pkg->desc, PKG_DESC_LEN); STRNCPY(newpkg->url, pkg->url, PKG_URL_LEN); - STRNCPY(newpkg->license, pkg->license, PKG_LICENSE_LEN); STRNCPY(newpkg->builddate, pkg->builddate, PKG_DATE_LEN); STRNCPY(newpkg->installdate, pkg->installdate, PKG_DATE_LEN); STRNCPY(newpkg->packager, pkg->packager, PKG_PACKAGER_LEN); @@ -94,6 +93,7 @@ pmpkg_t *pkg_dup(pmpkg_t *pkg) newpkg->force = pkg->force; newpkg->scriptlet = pkg->scriptlet; newpkg->reason = pkg->reason; + newpkg->license = _alpm_list_strdup(pkg->license); newpkg->requiredby = _alpm_list_strdup(pkg->requiredby); newpkg->conflicts = _alpm_list_strdup(pkg->conflicts); newpkg->files = _alpm_list_strdup(pkg->files); diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h index 9623e483..a5b39b77 100644 --- a/lib/libalpm/package.h +++ b/lib/libalpm/package.h @@ -32,7 +32,6 @@ enum { #define PKG_VERSION_LEN 64 #define PKG_DESC_LEN 512 #define PKG_URL_LEN 256 -#define PKG_LICENSE_LEN 256 #define PKG_DATE_LEN 32 #define PKG_PACKAGER_LEN 64 #define PKG_MD5SUM_LEN 33 @@ -43,7 +42,6 @@ typedef struct __pmpkg_t { char version[PKG_VERSION_LEN]; char desc[PKG_DESC_LEN]; char url[PKG_URL_LEN]; - char license[PKG_LICENSE_LEN]; char builddate[PKG_DATE_LEN]; char installdate[PKG_DATE_LEN]; char packager[PKG_PACKAGER_LEN]; @@ -53,6 +51,7 @@ typedef struct __pmpkg_t { unsigned char scriptlet; unsigned char force; unsigned char reason; + PMList *license; PMList *replaces; PMList *groups; PMList *files; |