summaryrefslogtreecommitdiffstats
path: root/RPM4/src/RPM4.xs
diff options
context:
space:
mode:
authortv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-06-25 18:27:27 +0000
committertv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-06-25 18:27:27 +0000
commita4fb3997ba6dad842934b08400e12f065e4a733c (patch)
tree7dddf509306b31e13b2b44955200c04c799d405d /RPM4/src/RPM4.xs
parent2c8e250093d20e5ab658f9de81a1ad9c98a47014 (diff)
downloadperl-RPM4-a4fb3997ba6dad842934b08400e12f065e4a733c.tar
perl-RPM4-a4fb3997ba6dad842934b08400e12f065e4a733c.tar.gz
perl-RPM4-a4fb3997ba6dad842934b08400e12f065e4a733c.tar.bz2
perl-RPM4-a4fb3997ba6dad842934b08400e12f065e4a733c.tar.xz
perl-RPM4-a4fb3997ba6dad842934b08400e12f065e4a733c.zip
(_newspec,newspec) drop unused 'cookie', 'passphrase', 'rootdir' & 'verify' parameters
(useless with rpm-4.9.x anyway) git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@217 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4/src/RPM4.xs')
-rw-r--r--RPM4/src/RPM4.xs45
1 files changed, 5 insertions, 40 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index f8ade44..520e246 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -396,36 +396,18 @@ void _newdep(SV * sv_deptag, char * name, SV * sv_sense, SV * sv_evr) {
}
/* Get a new specfile */
-void _newspec(rpmts ts, char * filename, SV * svpassphrase, SV * svrootdir, SV * svcookies, SV * svanyarch, SV * svforce, SV * svverify) {
+void _newspec(rpmts ts, char * filename, SV * svanyarch, SV * svforce) {
rpmSpec spec = NULL;
- char * passphrase = NULL;
- char * rootdir = NULL;
- char * cookies = NULL;
int anyarch = 0;
int force = 0;
- int verify = 0;
dSP;
- if (svpassphrase && SvOK(svpassphrase))
- passphrase = SvPV_nolen(svpassphrase);
-
- if (svrootdir && SvOK(svrootdir))
- rootdir = SvPV_nolen(svrootdir);
- else
- rootdir = "/";
-
- if (svcookies && SvOK(svcookies))
- cookies = SvPV_nolen(svcookies);
-
if (svanyarch && SvOK(svanyarch))
anyarch = SvIV(svanyarch);
if (svforce && SvOK(svforce))
force = SvIV(svforce);
- if (svverify && SvOK(svverify))
- verify = SvIV(svverify);
-
if (filename) {
#ifdef RPM4_9_0
rpmSpecFlags flags = 0;
@@ -435,7 +417,7 @@ void _newspec(rpmts ts, char * filename, SV * svpassphrase, SV * svrootdir, SV *
flags |= RPMSPEC_FORCE;
spec = rpmSpecParse(filename, flags, NULL);
#else
- if (!parseSpec(ts, filename, rootdir, NULL ,0, passphrase, cookies, anyarch, force))
+ if (!parseSpec(ts, filename, "/", NULL ,0, NULL, NULL, anyarch, force))
spec = rpmtsSetSpec(ts, NULL);
#endif
#ifdef HHACK
@@ -2602,19 +2584,15 @@ Files_nlink(Files)
MODULE = RPM4 PACKAGE = RPM4
void
-newspec(filename = NULL, passphrase = NULL, rootdir = NULL, cookies = NULL, anyarch = NULL, force = NULL, verify = NULL)
+newspec(filename = NULL, anyarch = NULL, force = NULL)
char * filename
- SV * passphrase
- SV * rootdir
- SV * cookies
SV * anyarch
SV * force
- SV * verify
PREINIT:
rpmts ts = rpmtsCreate();
PPCODE:
PUTBACK;
- _newspec(ts, filename, passphrase, rootdir, cookies, anyarch, force, verify);
+ _newspec(ts, filename, anyarch, force);
ts = rpmtsFree(ts);
SPAGAIN;
@@ -2626,12 +2604,8 @@ Spec_new(perlclass, specfile = NULL, ...)
char * specfile
PREINIT:
rpmts ts = NULL;
- SV * passphrase = NULL;
- SV * rootdir = NULL;
- SV * cookies = NULL;
SV * anyarch = 0;
SV * force = 0;
- SV * verify = 0;
int i;
PPCODE:
for(i=2; i < items; i++) {
@@ -2651,18 +2625,9 @@ Spec_new(perlclass, specfile = NULL, ...)
} else if (strcmp(SvPV_nolen(ST(i)), "force") == 0) {
i++;
force = ST(i);
- } else if (strcmp(SvPV_nolen(ST(i)), "verify") == 0) {
- i++;
- verify = ST(i);
} else if (strcmp(SvPV_nolen(ST(i)), "anyarch") == 0) {
i++;
anyarch = ST(i);
- } else if (strcmp(SvPV_nolen(ST(i)), "passphrase") == 0) {
- i++;
- passphrase = ST(i);
- } else if (strcmp(SvPV_nolen(ST(i)), "root") == 0) {
- i++;
- rootdir = ST(i);
} else {
warn("Unknown value in " bless_spec "->new, ignored");
i++;
@@ -2671,7 +2636,7 @@ Spec_new(perlclass, specfile = NULL, ...)
if (!ts)
ts = rpmtsCreate();
PUTBACK;
- _newspec(ts, specfile, passphrase, rootdir, cookies, anyarch, force, verify);
+ _newspec(ts, specfile, anyarch, force);
SPAGAIN;
ts = rpmtsFree(ts);