From 60186cb51922aca5653267183311c019bca00452 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 29 Oct 2013 18:35:01 +0100 Subject: $trans->order: add support for "deploops" option --- NEWS | 1 + URPM.xs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3c22d04..443cf4f 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ - enhanced doc - "implement" create_transaction() in --env case +- $trans->order: add support for "deploops" option Version 4.28 - 3 October 2013 diff --git a/URPM.xs b/URPM.xs index 287efbc..12cfa92 100644 --- a/URPM.xs +++ b/URPM.xs @@ -2601,11 +2601,22 @@ Trans_check(trans, ...) } void -Trans_order(trans) +Trans_order(trans, ...) URPM::Transaction trans PREINIT: + rpmtransFlags transFlags = RPMTRANS_FLAG_NONE; I32 gimme = GIMME_V; + int i; PPCODE: + for (i = 1; i < items-1; i+=2) { + STRLEN len; + char *s = SvPV(ST(i), len); + + if (len == 8 && !memcmp(s, "deploops", 8)) { + if (SvIV(ST(i+1))) transFlags |= RPMTRANS_FLAG_DEPLOOPS; + } + } + rpmtsSetFlags(trans->ts, transFlags); if (rpmtsOrder(trans->ts) == 0) { if (gimme == G_SCALAR) mXPUSHs(newSViv(1)); -- cgit v1.2.1