summaryrefslogtreecommitdiff
path: root/lib/rpmts.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-30 13:51:32 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-30 13:51:32 +0200
commit5dfc982dda733dbf06128358816bf6d91cd18c2a (patch)
treebeaf91deb9622eca17dd0f4570e80b006261c4b3 /lib/rpmts.c
parent26da2e12d7b11d967656a19300ed871f21bfed63 (diff)
downloadlibrpm-tizen-5dfc982dda733dbf06128358816bf6d91cd18c2a.tar.gz
librpm-tizen-5dfc982dda733dbf06128358816bf6d91cd18c2a.tar.bz2
librpm-tizen-5dfc982dda733dbf06128358816bf6d91cd18c2a.zip
Move netsharedpaths to per-transaction level
- netsharedpaths is clearly a per-transaction thing, avoid checking and splitting etc over and over for every package
Diffstat (limited to 'lib/rpmts.c')
-rw-r--r--lib/rpmts.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rpmts.c b/lib/rpmts.c
index 4d3bf031a..498ee662e 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -599,6 +599,7 @@ rpmts rpmtsFree(rpmts ts)
ts->orderAlloced = 0;
ts->keyring = rpmKeyringFree(ts->keyring);
+ ts->netsharedPaths = argvFree(ts->netsharedPaths);
if (_rpmts_stats)
rpmtsPrintStats(ts);
@@ -1108,6 +1109,14 @@ rpmts rpmtsCreate(void)
ts->color = rpmExpandNumeric("%{?_transaction_color}");
ts->prefcolor = rpmExpandNumeric("%{?_prefer_color}")?:2;
+ ts->netsharedPaths = NULL;
+ { char *tmp = rpmExpand("%{_netsharedpath}", NULL);
+ if (tmp && *tmp != '%') {
+ argvSplit(&ts->netsharedPaths, tmp, ":");
+ }
+ free(tmp);
+ }
+
ts->numRemovedPackages = 0;
ts->allocedRemovedPackages = ts->delta;
ts->removedPackages = xcalloc(ts->allocedRemovedPackages,