From 653fb8fe036363dfb550785c45adcf26f6fcbfbc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 11 Jul 2007 23:36:13 -0400 Subject: Remove 'buildtype' from libalpm and pacman Remove unused buildtype field from pmpkg_t struct and anything associated with it, as it is unused at the moment. If we need to readd it, it is an easy revert of this commit. Signed-off-by: Dan McGee --- lib/libalpm/be_files.c | 9 --------- lib/libalpm/package.c | 16 ---------------- lib/libalpm/package.h | 1 - 3 files changed, 26 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index f0c0d5ef..7db9b260 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -356,11 +356,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) goto error; } _alpm_strtrim(info->builddate); - } else if(!strcmp(line, "%BUILDTYPE%")) { - if(fgets(info->buildtype, sizeof(info->buildtype), fp) == NULL) { - goto error; - } - _alpm_strtrim(info->buildtype); } else if(!strcmp(line, "%INSTALLDATE%")) { if(fgets(info->installdate, sizeof(info->installdate), fp) == NULL) { goto error; @@ -589,10 +584,6 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) fprintf(fp, "%%BUILDDATE%%\n" "%s\n\n", info->builddate); } - if(info->buildtype[0]) { - fprintf(fp, "%%BUILDTYPE%%\n" - "%s\n\n", info->buildtype); - } if(info->installdate[0]) { fprintf(fp, "%%INSTALLDATE%%\n" "%s\n\n", info->installdate); diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index eb12ae1a..ed6093f3 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -465,8 +465,6 @@ static int parse_descfile(const char *descfile, pmpkg_t *info) info->licenses = alpm_list_add(info->licenses, strdup(ptr)); } else if(!strcmp(key, "BUILDDATE")) { strncpy(info->builddate, ptr, sizeof(info->builddate)); - } else if(!strcmp(key, "BUILDTYPE")) { - strncpy(info->buildtype, ptr, sizeof(info->buildtype)); } else if(!strcmp(key, "INSTALLDATE")) { strncpy(info->installdate, ptr, sizeof(info->installdate)); } else if(!strcmp(key, "PACKAGER")) { @@ -885,20 +883,6 @@ const char SYMEXPORT *alpm_pkg_get_builddate(pmpkg_t *pkg) return pkg->builddate; } -const char SYMEXPORT *alpm_pkg_get_buildtype(pmpkg_t *pkg) -{ - ALPM_LOG_FUNC; - - /* Sanity checks */ - ASSERT(handle != NULL, return(NULL)); - ASSERT(pkg != NULL, return(NULL)); - - if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) { - _alpm_db_read(pkg->data, pkg, INFRQ_DESC); - } - return pkg->buildtype; -} - const char SYMEXPORT *alpm_pkg_get_installdate(pmpkg_t *pkg) { ALPM_LOG_FUNC; diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h index fda10800..279e232f 100644 --- a/lib/libalpm/package.h +++ b/lib/libalpm/package.h @@ -58,7 +58,6 @@ struct __pmpkg_t { char desc[PKG_DESC_LEN]; char url[PKG_URL_LEN]; char builddate[PKG_DATE_LEN]; - char buildtype[PKG_TYPE_LEN]; char installdate[PKG_DATE_LEN]; char packager[PKG_PACKAGER_LEN]; char md5sum[PKG_MD5SUM_LEN]; -- cgit v1.2.3-70-g09d2