aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
Commit message (Collapse)AuthorAgeFilesLines
* callbacks now get pkg name instead of just pkg idThierry Vignaud2015-02-261-2/+6
| | | | thus fixing unknown package name on erases (mga#15032)
* move PUTBACK in branchThierry Vignaud2014-11-171-1/+1
|
* Handle non numeric returns for traverse_tag_find callbackPascal Terjan2014-11-141-3/+6
| | | | fix a warning spot by Angelo Naselli
* add a missing PUTBACK in traverse_tag_find()Thierry Vignaud2014-11-141-0/+1
| | | | | | this is needed after using POPi bug introduced in commit 4294365db5d78909ae5a490e0714db379502cd80
* add >recommends method (mga#14376)Thierry Vignaud2014-10-261-0/+2
| | | | unlike recommends_nosense, it returns version too
* fix crashing in ptread when using log callback with rpm-4.12Thierry Vignaud2014-10-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix by Panu Matilainen When rpmlog() occurs, it now grabs a read/write lock on the log context depending on whether it needs to save the log or not. The callback executes while the context lock is held, so when one call rpmlogMessage() or pretty much any rpmlog-related function from the callback, it'll try to lock the context again. Which is okay as long as rpmlog() only needed a read-lock on the context. However if it has a write-lock then attempting to grab a read-lock for rpmlogMessage() fails, but due to the largely missing error handling in rpmlog.c it falls through to crash and burn. The only reason we need to call rpmlogMessage() is that the callback does not match the callback function type in rpm >= 4.6: typedef int (*rpmlogCallback) (rpmlogRec rec, rpmlogCallbackData data); We shouldn't call that from log callback. We can avoid the issue by using rpmlogRecMessage() instead of rpmlogMessage() inside the callback. These are not the same, rpmlogRecMessage() returns the message of the *current* log event, whereas rpmlogMessage() returns the last *saved* log event. Which might not exist, might be from an earlier event or it might be the current event. ...and it'll not only work in all rpm >= 4.6 versions, but also give the actual log message at hand, instead of something that might have happened in the past.
* add support for generating recommends in synthesisThierry Vignaud2014-09-121-2/+3
| | | | aka having @recommends@ lines instead of @suggests@ ones
* recognize "recommends" lines in synthesisThierry Vignaud2014-09-121-1/+1
|
* rename "suggests" method as "recommends_nosense"Thierry Vignaud2014-09-121-0/+1
| | | | | in order to reflect reality but keep a suggests alias for compatibility for the time being
* rename "suggests" field to "recommends"Thierry Vignaud2014-09-121-8/+8
| | | | as this really what it is
* make it compatible with rpm-4.12.0Thierry Vignaud2014-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpm-4.12.0 introduces a new weak deps implementation (the 3rd one to be used in mdv/mga!) The tag we used to use (RPMTAG_SUGGESTSNAME) is now OLDSUGGESTSNAME => we need to handle both old & new tags Hopefully rpm-4.12.x enables to check both old & new tags when using xxxNVRS variants We thus have a choice between RECOMMEND & SUGGEST tags, that both fallback on older SUGGESTS tags if no new ones are found. The difference is that they filter old suggests depending on RPMSENSE_STRONG hint. As we used suggests in the recommends role, this is the perfect time to switch from suggests to recommends (with a patch on rpm in order to fallback RECOMMEND on weak (old) SUGGESTS instead of on strong (old) ENHANCES as we didn't used the later in mga) Our rpm is patched so that RECOMMENDNAME fallbacks too. In Suse, only RECOMMENDNEVRS is the only RECOMMEND variant that handle the fallback on old tags. However, using RPMTAG_RECOMMENDNEVRS makes URPM->suggest_nosense to return versionated suggests, which while not supported by urpmi, do are used by a couple packages (such as git or gnome-user-share) This breaks urpmi as suggests on "foo >= x.y" is not interpreted by urpmi which thinks that "foo" is a new suggests and reinstalls a previously removed suggests Hence we patched rpm.
* use HEADERGET_EXT instead of HEADERGET_DEFAULTThierry Vignaud2014-08-271-2/+2
| | | | | in order to access to extension tags such as new weak deps tags (needed for next commit)
* (compare) croak if used on URPM::Package object (mga#12766)Thierry Vignaud2014-05-171-0/+2
| | | | | | suggests to use compare_pkg instead (needs a new rpmdrake)
* kill useless "$Id: " linesThierry Vignaud2014-05-091-1/+0
| | | | they're obsolete since switching to git
* fix 64k size limit on provides sizeThierry Vignaud2014-05-011-3/+3
| | | | | | this broke installing 32 bit kernel for drakx-installer-binaries (spotted by Pascal Terjan)
* $trans->order: add support for "deploops" optionThierry Vignaud2013-11-051-1/+12
|
* coverity: add a comment about "Argument cannot be negative"Thierry Vignaud2013-10-031-1/+1
| | | | "fd" is passed to a parameter that cannot be negative.
* coverity: fix "Resource leak"Thierry Vignaud2013-10-031-3/+7
| | | | | 'leaked_storage: Variable "foo" going out of scope leaks the storage it points to.'
* coverity: fix "Unused pointer value"Thierry Vignaud2013-10-031-6/+6
| | | | | 'Pointer "foo" returned by "_free(foo)" is never used' (improve coverity scan's SNR)
* (sourcerpm) make it more readableThierry Vignaud2013-09-301-16/+8
|
* alias N, V, R & A (saves nearly 2% of compiled size)Thierry Vignaud2013-09-301-51/+25
|
* fix retrieving payload formatThierry Vignaud2013-02-051-1/+1
| | | | | | commit r6545 on 2012-12-2 broke delta rpm support: "(Pkg_description, Pkg_sourcerpm) split UTF-8 strings from raw strings functions, then simplify"
* typo fixThierry Vignaud2013-02-031-1/+1
|
* (mask_from_string) factorize codeThierry Vignaud2013-02-031-14/+14
|
* simplify styleThierry Vignaud2013-02-031-2/+1
|
* (update_provides) clean unused variableThierry Vignaud2013-01-291-2/+0
|
* (update_provides) document ->info caseThierry Vignaud2013-01-291-0/+2
|
* (rpmRunTransactions_callback) handle new RPMCALLBACK_INST_STOPThierry Vignaud2013-01-291-0/+2
| | | | (redundant with INST_CLOSE_FILE...)
* add support for callback_errorThierry Vignaud2013-01-291-1/+24
|
* remove wrong commentThierry Vignaud2013-01-291-1/+0
|
* bump copyrigh yearsThierry Vignaud2013-01-291-1/+1
|
* (return_list_tag) simplify/factorizeThierry Vignaud2013-01-291-11/+12
|
* (call_package_callback,rpmRunTransactions_callback) optimize: preextend ↵Thierry Vignaud2013-01-291-8/+10
| | | | stack if needed
* (push_in_depslist) factorize common code for adding a package to {depslist}Thierry Vignaud2013-01-201-29/+18
|
* (stream2header,spec2srcheader) simplifyThierry Vignaud2013-01-201-10/+3
|
* (parse_line) make it more readableThierry Vignaud2013-01-201-3/+2
|
* (Urpm_stream2header) simplifyThierry Vignaud2013-01-201-2/+1
|
* (pack_header) separate the suggests & requires casesThierry Vignaud2013-01-201-2/+2
| | | | | the doble test was needed in mdv2008.0 due to suggests being implemented as requires
* (update_provides_files) simplify: let callee compute the lengthThierry Vignaud2013-01-201-6/+2
|
* (parse_line) simplifyThierry Vignaud2013-01-201-13/+18
|
* add commentsThierry Vignaud2013-01-201-0/+2
|
* RPMFILE_EXCLUDE & RPMFILE_UNPATCHED were drop from external API in rpm-4.11Thierry Vignaud2012-12-171-3/+0
| | | | | RPMFILE_UNPATCHED is no more used and RPMFILE_EXCLUDE only exists during spec parse (see rpm commit 8d277bbb)
* (EVR) fix it on packages from rpmdb (was ok on synthesis ones) (mga#7739)Thierry Vignaud2012-12-071-2/+5
|
* (Db_traverse_tag_find) fix a rare segfaultThierry Vignaud2012-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | found accidently could be triggered by the following (calling enough times either requires() or provides() while traversing rpm db) which resulting in an "Invalid read of size 8": use URPM; my $db = URPM::DB::open()->traverse_tag_find('whatprovides', 'kernel', sub { my ($p) = @_; warn $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires, $p->requires; return 1; }); bug introduced in commit r4947 on June 14 2012: "(_run_cb_while_traversing) introduce this helper"
* (Pkg_description, Pkg_sourcerpm) split UTF-8 strings from raw stringsThierry Vignaud2012-12-021-23/+31
| | | | functions, then simplify
* drop ->disttag (unused, was introduced by pok just before the fork)Thierry Vignaud2012-12-021-3/+0
|
* (update_provide_entry) kill itThierry Vignaud2012-11-291-11/+6
|
* Mageia copyrightThierry Vignaud2012-11-291-0/+1
|
* (Pkg_suggests) alias it on *_nonsenseThierry Vignaud2012-11-211-8/+2
| | | | (it should have been named suggests_nosense in the first place, bad pixel...)
* alias obsoletes/provides/requiresThierry Vignaud2012-11-211-29/+13
|