summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2009-03-07 19:44:34 +0100
committerDan McGee <dan@archlinux.org>2009-04-11 21:05:13 +0200
commitaefb4e0fa54ad5b4140d6991f389b5a6fb4ead6d (patch)
treea3dd67506793245351ce0f92ab8208407f83e884 /src/pacman/sync.c
parent391952600d30bf7c28c5403c5c9e220d345ffe87 (diff)
downloadpacman-aefb4e0fa54ad5b4140d6991f389b5a6fb4ead6d.tar.gz
pacman-aefb4e0fa54ad5b4140d6991f389b5a6fb4ead6d.tar.xz
Remove pmsyncpkg_t
pmsyncpkg_t data sructure was removed: 1. pmpkg_t.reason is used instead of pmsyncpkg_t.newreason. (The target packages come from sync repos, so we can use this field without any problems. Upgrade transaction also uses this field to store this info.) 2. pmsyncpkg_t.removes was moved to pmpkg_t.removes. This step requires careful programming, because we don't duplicate packages when we add them to trans->packages. So we modify sync pkgcache when we add this transaction-only info to our package. Hence it is important to free this list when we remove any package from the target list (remove_unresolvable, remove_conflicts, trans_free), otherwise this could confuse the new sync transactions (with non-pacman GUI). Overall, our code became ~100 line shorter, and we can call our helper functions directly on trans->packages in sync.c, we don't need to maintain parallel package lists. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 0e193551..68fb81a9 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -673,7 +673,7 @@ static int sync_trans(alpm_list_t *targets)
/* print uris */
alpm_list_t *i;
for(i = packages; i; i = alpm_list_next(i)) {
- pmpkg_t *pkg = alpm_sync_get_pkg((pmsyncpkg_t *)alpm_list_getdata(i));
+ pmpkg_t *pkg = alpm_list_getdata(i);
pmdb_t *db = alpm_pkg_get_db(pkg);
printf("%s/%s\n", alpm_db_get_url(db), alpm_pkg_get_filename(pkg));
}