diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | URPM.pm | 5 | ||||
-rw-r--r-- | URPM.xs | 8 |
3 files changed, 11 insertions, 5 deletions
@@ -1,5 +1,6 @@ -Version 4.34 - 21 June 2011, by Per Øyvid Karlsen +Version 4.34 - 23 June 2011, by Per Øyvid Karlsen +- add support for specifying tag name to match with URPM::Transaction->remove() - add some regression tests for parsing disttag & distepoch from synthesis - extract disttag & distepoch from new fields in @info@ of synthesis @@ -712,10 +712,11 @@ Options are: update => 0 / 1 : indicates whether this is an upgrade excludepath => [ ... ] -=item $trans->remove($name) +=item $trans->remove($keyp, [$tagname = "nvra"]) Adds a package to be erased to the transaction represented by $trans. -$name is the name of the package. +$keyp is by default the full name of the package, unless a different tag to +match has been specified with $tagname. =item $trans->check(%options) @@ -3627,15 +3627,19 @@ Trans_add(trans, pkg, ...) RETVAL int -Trans_remove(trans, name) +Trans_remove(trans, name, tagname = NULL) URPM::Transaction trans char *name + char *tagname PREINIT: Header h; rpmmi mi; int count = 0; + rpmTag tag = RPMTAG_NVRA; CODE: - mi = rpmtsInitIterator(trans->ts, RPMTAG_NVRA, name, 0); + if (tagname) + tag = rpmtag_from_string(tagname); + mi = rpmtsInitIterator(trans->ts, tag, name, 0); while ((h = rpmmiNext(mi))) { unsigned int recOffset = rpmmiInstance(mi); if (recOffset != 0) { |