diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-08-20 15:17:08 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-08-20 15:23:48 +0300 |
commit | fbd92df7544462a88cd8c752ffe07263dc8bb858 (patch) | |
tree | e6e2f009714b930ca8cd7371a9aa62fbc9334834 /rpmqv.c | |
parent | e951c42146d89a5f4abdb02eaf9e44eead235e2f (diff) | |
download | librpm-tizen-fbd92df7544462a88cd8c752ffe07263dc8bb858.tar.gz librpm-tizen-fbd92df7544462a88cd8c752ffe07263dc8bb858.tar.bz2 librpm-tizen-fbd92df7544462a88cd8c752ffe07263dc8bb858.zip |
Argh. Realize we already have equivalents of initCli() and finishCli()
- rpmcliInit() and rpmcliFini() do almost exactly the same as our
newborn cli-helpers, but they've been almost unused until now.
Use them and lose the new ones.. doh.
- The downside is that popt aliases are now broken when running commands
from the build tree due to lt-foo in argv[0], whereas initCli() took
and explicit popt context name argument. Oh well...
- rpmcliFini() was missing several necessary memory cleanup calls,
add them there while at it.
Diffstat (limited to 'rpmqv.c')
-rw-r--r-- | rpmqv.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -123,15 +123,7 @@ int main(int argc, char *argv[]) int i; #endif - setprogname(argv[0]); /* Retrofit glibc __progname */ - - /* XXX glibc churn sanity */ - if (__progname == NULL) { - if ((__progname = strrchr(argv[0], '/')) != NULL) __progname++; - else __progname = argv[0]; - } - - optCon = initCli("rpm", optionsTable, argc, argv); + optCon = rpmcliInit(argc, argv, optionsTable); /* Set the major mode based on argv[0] */ #ifdef IAM_RPMQV @@ -547,5 +539,7 @@ exit: ia->relocations = _free(ia->relocations); #endif - return finishCli(optCon, ec); + rpmcliFini(optCon); + + return RETVAL(ec); } |