1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-01-09 04:57:59 -05:00

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 <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-07-11 23:36:13 -04:00
parent 147a32b32d
commit 653fb8fe03
4 changed files with 1 additions and 29 deletions

View File

@ -356,11 +356,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
goto error; goto error;
} }
_alpm_strtrim(info->builddate); _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%")) { } else if(!strcmp(line, "%INSTALLDATE%")) {
if(fgets(info->installdate, sizeof(info->installdate), fp) == NULL) { if(fgets(info->installdate, sizeof(info->installdate), fp) == NULL) {
goto error; goto error;
@ -589,10 +584,6 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
fprintf(fp, "%%BUILDDATE%%\n" fprintf(fp, "%%BUILDDATE%%\n"
"%s\n\n", info->builddate); "%s\n\n", info->builddate);
} }
if(info->buildtype[0]) {
fprintf(fp, "%%BUILDTYPE%%\n"
"%s\n\n", info->buildtype);
}
if(info->installdate[0]) { if(info->installdate[0]) {
fprintf(fp, "%%INSTALLDATE%%\n" fprintf(fp, "%%INSTALLDATE%%\n"
"%s\n\n", info->installdate); "%s\n\n", info->installdate);

View File

@ -465,8 +465,6 @@ static int parse_descfile(const char *descfile, pmpkg_t *info)
info->licenses = alpm_list_add(info->licenses, strdup(ptr)); info->licenses = alpm_list_add(info->licenses, strdup(ptr));
} else if(!strcmp(key, "BUILDDATE")) { } else if(!strcmp(key, "BUILDDATE")) {
strncpy(info->builddate, ptr, sizeof(info->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")) { } else if(!strcmp(key, "INSTALLDATE")) {
strncpy(info->installdate, ptr, sizeof(info->installdate)); strncpy(info->installdate, ptr, sizeof(info->installdate));
} else if(!strcmp(key, "PACKAGER")) { } else if(!strcmp(key, "PACKAGER")) {
@ -885,20 +883,6 @@ const char SYMEXPORT *alpm_pkg_get_builddate(pmpkg_t *pkg)
return pkg->builddate; 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) const char SYMEXPORT *alpm_pkg_get_installdate(pmpkg_t *pkg)
{ {
ALPM_LOG_FUNC; ALPM_LOG_FUNC;

View File

@ -58,7 +58,6 @@ struct __pmpkg_t {
char desc[PKG_DESC_LEN]; char desc[PKG_DESC_LEN];
char url[PKG_URL_LEN]; char url[PKG_URL_LEN];
char builddate[PKG_DATE_LEN]; char builddate[PKG_DATE_LEN];
char buildtype[PKG_TYPE_LEN];
char installdate[PKG_DATE_LEN]; char installdate[PKG_DATE_LEN];
char packager[PKG_PACKAGER_LEN]; char packager[PKG_PACKAGER_LEN];
char md5sum[PKG_MD5SUM_LEN]; char md5sum[PKG_MD5SUM_LEN];

View File

@ -43,7 +43,7 @@
*/ */
void dump_pkg_full(pmpkg_t *pkg, int level) void dump_pkg_full(pmpkg_t *pkg, int level)
{ {
const char *bdate, *type, *idate, *reason, *descheader; const char *bdate, *idate, *reason, *descheader;
if(pkg == NULL) { if(pkg == NULL) {
return; return;
@ -51,7 +51,6 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
/* set variables here, do all output below */ /* set variables here, do all output below */
bdate = alpm_pkg_get_builddate(pkg); bdate = alpm_pkg_get_builddate(pkg);
type = alpm_pkg_get_buildtype(pkg);
idate = alpm_pkg_get_installdate(pkg); idate = alpm_pkg_get_installdate(pkg);
switch((long)alpm_pkg_get_reason(pkg)) { switch((long)alpm_pkg_get_reason(pkg)) {
@ -86,7 +85,6 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
printf(_("Packager : %s\n"), (char *)alpm_pkg_get_packager(pkg)); printf(_("Packager : %s\n"), (char *)alpm_pkg_get_packager(pkg));
printf(_("Architecture : %s\n"), (char *)alpm_pkg_get_arch(pkg)); printf(_("Architecture : %s\n"), (char *)alpm_pkg_get_arch(pkg));
printf(_("Build Date : %s %s\n"), bdate, strlen(bdate) ? "UTC" : ""); printf(_("Build Date : %s %s\n"), bdate, strlen(bdate) ? "UTC" : "");
printf(_("Build Type : %s\n"), strlen(type) ? type : _("Unknown"));
if(level > 0) { if(level > 0) {
printf(_("Install Date : %s %s\n"), idate, strlen(idate) ? "UTC" : ""); printf(_("Install Date : %s %s\n"), idate, strlen(idate) ? "UTC" : "");
printf(_("Install Reason : %s\n"), reason); printf(_("Install Reason : %s\n"), reason);