summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-10 20:40:31 +0100
committerDan McGee <dan@archlinux.org>2011-01-22 02:30:45 +0100
commitbf46e04614b3740eea4a5e0d44767f57e1cffa4d (patch)
tree4a1fb5d578a539e42a1d73de1b3d83edbf17a58a /lib/libalpm/be_local.c
parent5c46ba14f780474e2b04b54aa7b0c8bf60de2b5b (diff)
downloadpacman-bf46e04614b3740eea4a5e0d44767f57e1cffa4d.tar.gz
pacman-bf46e04614b3740eea4a5e0d44767f57e1cffa4d.tar.xz
Remove epoch as an independent field
Instead, go the same route we have always taken with version-release in libalpm and treat it all as one piece of information. Makepkg is the only script that knows about epoch as a distinct value; from there on out we will parse out the components as necessary. This makes the code a lot simpler as far as epoch handling goes. The downside here is that we are tossing some compatibility to the wind; packages using force will have to be rebuilt with an incremented epoch to keep their special status. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 5471fee4..ea59ceca 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -156,12 +156,6 @@ static alpm_list_t *_cache_get_groups(pmpkg_t *pkg)
return pkg->groups;
}
-static int _cache_get_epoch(pmpkg_t *pkg)
-{
- LAZY_LOAD(INFRQ_DESC, -1);
- return pkg->epoch;
-}
-
static int _cache_has_scriptlet(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -318,7 +312,6 @@ static struct pkg_operations local_pkg_ops = {
.get_size = _cache_get_size,
.get_isize = _cache_get_isize,
.get_reason = _cache_get_reason,
- .get_epoch = _cache_get_epoch,
.has_scriptlet = _cache_has_scriptlet,
.get_licenses = _cache_get_licenses,
.get_groups = _cache_get_groups,
@@ -606,11 +599,6 @@ int _alpm_local_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
STRDUP(linedup, _alpm_strtrim(line), goto error);
info->replaces = alpm_list_add(info->replaces, linedup);
}
- } else if(strcmp(line, "%EPOCH%") == 0) {
- if(fgets(line, sizeof(line), fp) == NULL) {
- goto error;
- }
- info->epoch = atoi(_alpm_strtrim(line));
} else if(strcmp(line, "%DEPENDS%") == 0) {
while(fgets(line, sizeof(line), fp) && strlen(_alpm_strtrim(line))) {
pmdepend_t *dep = _alpm_splitdep(_alpm_strtrim(line));
@@ -767,10 +755,6 @@ int _alpm_local_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
fprintf(fp, "\n");
}
- if(info->epoch) {
- fprintf(fp, "%%EPOCH%%\n"
- "%d\n\n", info->epoch);
- }
if(info->url) {
fprintf(fp, "%%URL%%\n"
"%s\n\n", info->url);