summaryrefslogtreecommitdiff
path: root/lib/rpmds.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-24Dont blow up on headers without requireflags in rpmdsNew()Panu Matilainen1-1/+1
2009-10-21Ensure RPMSENSE_RPMLIB bit is always set on rpmlib() requires in rpmds flagsPanu Matilainen1-0/+8
- some packages in the wild have rpmlib() requires without the flag set due to older rpm not always setting it (for one, rpmdeps as external dependency generator could cause such deps), causing bogus dependency failures on install - only fix up dependencies coming from a header, rpmdsSingle() correctness is up to the caller
2009-09-07Remove bogus non-null checkPanu Matilainen1-1/+0
- rpmdsInit() only returns NULL if passed NULL, which can't happen as ods is already verified to be non-NULL
2009-09-07Eliminate unused calculationsPanu Matilainen1-2/+0
2009-09-07Eliminate unused variablePanu Matilainen1-2/+0
2009-09-02Take advantage of headerGetNumber() to get buildtime..Panu Matilainen1-6/+2
2009-09-02Eliminate uses of headerNVR() and friends in librpm (and python) codePanu Matilainen1-7/+4
2009-08-31Replace equal/not equal uses of str[n]cmp() with rstreq[n] in main ts codePanu Matilainen1-7/+7
2009-08-28Don't try to incref NULL dsPanu Matilainen1-4/+1
2009-06-16Generate DNEVR string lazily on rpmdsDNEVR() callsPanu Matilainen1-15/+13
- avoids useless string churning on rpmdsNext() when most paths dont actually use the DNEVR string for anything - make sure DNEVR is freed whenever iterator index changes
2009-06-16Eliminate epoch promotion debug cruftPanu Matilainen1-15/+0
- might've been useful back in the day but...
2009-05-07Dont bother generation rpmds debug messages unless in debug modePanu Matilainen1-0/+2
- rpmdsNotify() which does nothing but generate RPMLOG_DEBUG messages gets called often enough that avoiding the unnecessary rpmlog() and strcmp() calls is easily visible in wallclock times
2009-05-06rpmdsThis() is really just a special case of rpmdsSingle()Panu Matilainen1-26/+3
2009-03-26Eliminate pointless xstrdup()'s, the strings are never modifiedPanu Matilainen1-4/+2
2009-03-18Add support for "lzma alone" compression format (lzdio)Panu Matilainen1-0/+3
- "lzma alone" is superseeded by XZ but it's used by Suse and Mandriva distros so it's nice to have as it doesn't need much, only open differs from XZ - rpmlib() dependency versions are an uuuuuuuugly mess here: Suse used "PayloadIsLzma = 4.4.2-1" so that's what we provide to be most compatible (hopefully). Built packages require "PayloadIsLzma <= 4.4.6-1" however to be compatible with Mandriva 2008.0. Did I already say it's ugly? - Based on similar patch in Mandriva by Per Øyvind Karlsen, but avoiding unnecessary renames in rpmio
2009-03-18LZMA -> XZ renamingPanu Matilainen1-2/+4
- what we support now in payloads is XZ, not the former LZMA format, rename user- and header-visible parts to match this - rpmlib(PayloadIsXz) dependency versioned 5.2-1 to avoid unnecessary incompatibility with what rpm5 has and what Mandriva is already using - only provide the rpmlib dependency if actually built with xz support - rpmFileIsCompressed() attempts to guess the magicless old lzma format by file suffix, so it can handle both right now
2009-02-27Add md5->filedigest aliases (rhbz#487597)Jindrich Novy1-1/+1
- add %verify(nofiledigest) as %verify(nomd5) file attribute alias - reference digests as digests not checksums - make old md5 related symbols obsolete and use newer reference - update man page accordingly
2009-02-26Handle empty argv passed to rpmdsDupArgv()Panu Matilainen1-3/+2
- same as 94552b96256c3620b4be407c501d0d926c081963, apt-rpm expects to pass empty version as NULL to rpmdsSingle()
2009-02-06Bump FileDigests rpmlib dependency versionPanu Matilainen1-1/+1
- should've really been in commit 1f6ad324dbf4bebec905ddbb76d274345673a5b3, the tag adjustment is an incompatible change from what was in rpm 4.6.0-rc's, ugh
2009-01-20Grab dependency name & version strings as argv-style arraysPanu Matilainen1-1/+1
- Related to ticket #22, this fixes rpmdsMerge() on data grabbed from header. Prior to this, the following would blow up with memory corruption as headerGet() string array wasn't NULL-terminated rpmds d1 = rpmdsNew(h, RPMTAG_REQUIRENAME, 0); rpmds d2 = rpmdsSingle(RPMTAG_REQUIRENAME, "foo", "1", 0); rpmdsMerge(&d1, d2);
2009-01-20rpmdsMerge() expects ds->N and ds->EVR as argv-style arrays (ticket #22)Panu Matilainen1-26/+6
- use rpmdsDupArgv() instead of cloning headerGet() behavior to fix this for rpmdsSingle() and rpmdsThis() generated dependency sets - this is a regression from rpm 4.4.x, but for rpmdsNew() created sets rpmdsMerge() has never worked as headerGet() doesn't return NULL terminated arrays
2008-10-30Kill of scareMem / keep header flag from rpmdsPanu Matilainen1-18/+5
- unnecessary complication which doesn't benefit anything (anymore)
2008-10-30Remove unnecessary scaremem flags, hardwired to no scaremem anywayPanu Matilainen1-2/+1
- no functional changes
2008-10-29Start adding POSIX 1.e draft file capability support for realPanu Matilainen1-0/+5
- Parse %caps() from spec filelists, making best-guess verification of capability string sanity by passing to cap_from_text() - The posix draft specifies capability export presentation through cap_copy_ext() which would be fine, except that we don't have support for arrays of binary data. So we simply store the textual representation of the capabilities in a string array which we do have. - Only add capability tag on packages which actually have capabilities to avoid unnecessary header bloat. - Add a new rpmlib() dependency for file capabilities, packages relying on file capabilities wont work correctly unless the capabilities are set. To be fully correct, support for on-filesystem file capabilities should be checked at runtime, as this depends on kernel versions and such...
2008-10-13Honor default nopromote setting everywhere in rpmds (rhbz#466503)Panu Matilainen1-0/+3
- Of four different ways to create a dependency set, only rpmdsNew() explicitly set ds->nopromote to the expected value from global _rpmds_nopromote defaulting to on. All others fell back to legacy "epoch promotion" behavior inherited from xcalloc()...
2008-06-16Lose the useless tag data type fields from rpmdsPanu Matilainen1-17/+5
- we know names and evrs are string arrays, if they're not we're screwed anyway, and flags need to be freed if header is not around - there goes hfd() too...
2008-06-13Minimally convert rpmdsNew() to use new headerGet()Panu Matilainen1-24/+21
- take advantage of HEADERGET_ALLOC to avoid manually duplicating Flags - otherwise just dumb minimal conversion for now, rpmds could make use of rpmtd iteration etc but leaving that for later...
2008-06-09Handle NULL in str2hge()Panu Matilainen1-3/+9
- at least apt-rpm expects to pass empty version as NULL to rpmdsSingle(), don't blow up...
2008-06-02Enable build-time configuration of non-MD5 file checksum digest algorithmsPanu Matilainen1-0/+3
- if not specified (or 0), quietly assume MD5 - otherwise check for supported digest type, complain and fall back to md5 on invalid - if non-md5 algorithm is used, add rpmlib() feature dependency to package
2008-05-21Include rpmtypes.h first instead of rpmtag.h everywherePanu Matilainen1-1/+1
2008-04-22Handle lzma payloadJindrich Novy1-0/+3
2008-04-09Replace bunch of wtf evr formatters with headerGetNVR()Panu Matilainen1-30/+6
2008-03-31Simplify rpmdsThis() codePanu Matilainen1-20/+9
- use rasprintf() to construct [e:]v-r string instead of stpcpy games - use str2hge() for N + EVR
2008-03-31Copy N + EVR into ds in rpmdsSingle() instead of just referringPanu Matilainen1-4/+20
- previously a ds created by rpmdsSingle() would turn invalid as soon as the N and EVR strings were freed by caller (or went out of scope), ick - convert the N + EVR strings passed to rpmdsSingle() to similar construct as is returned by headerGetEntry so headerFreeData will free both the pointers + contents.
2008-03-31Bunch of formatting & indentation fixes to rpmdsPanu Matilainen1-7/+11
2008-03-18Minimal namespacing for locale-insensitive x*() string functionsPanu Matilainen1-1/+1
2008-03-07Log message adjustmentsPanu Matilainen1-3/+3
- dont waste translator time by having them translate obscure debug messages - adjust some suspect looking logging levels - mark some non-debug messages for translation where missing..
2008-03-07Another pile of read-only constants marked as such..Panu Matilainen1-1/+1
2008-02-05Mass convert (back) to rpmTag as it's usable everywhere nowPanu Matilainen1-13/+13
- cast away a few cases where the enum usage causes ridiculous amount of compiler warnings from unhandled switch-cases
2008-02-05Use rpmTagType always now that it's available everywherePanu Matilainen1-3/+3
- RPM_MASK_TYPE is not a datatype, move it out of the enum - add missing cases python header handling to shut up gcc
2008-02-05Add rpm_color_t type for rpm color bits, use where spottedPanu Matilainen1-5/+5
2008-02-05Port some rpmds improvements from rpm5.orgPanu Matilainen1-0/+124
- rpmlib provides as rpmds, lose the special case hackery - new functions rpmdsRpmlib() and rpmdsSearch() + python bindings for them
2008-02-05Use helper function to eliminate some copy-paste codePanu Matilainen1-75/+42
2008-02-04Add rpm_time_t type for time types (in headers), use where spottedPanu Matilainen1-2/+2
- easy to spot, easy to change... - time_t size can vary, header data needs fixed size
2008-01-30Include spring-cleaningPanu Matilainen1-1/+0
- put some consistency into include ordering - everything (apart from bits missed ;) is now ordered like this 1. "system.h" 2. other system includes 3. rpm public headers 4. rpm private headers 5. "debug.h"
2008-01-30Use rpmsenseFlags type for dependency flags everywhere (hopefully)Panu Matilainen1-7/+7
2008-01-30rpmlib.h mass evictionPanu Matilainen1-1/+2
- explicitly include what's really needed instead - document remaining uses
2007-12-19Add rpm_data_t (and _constdata_t) for header data, use everywherePanu Matilainen1-6/+6
- consistent, easy to grep for and change... - bogus consts removed where spotted
2007-12-15Couple of bogus const removals from rpmgi and rpmds structsPanu Matilainen1-1/+1
- in both cases the data is already directly inaccessible from outside, no further protection necessary
2007-12-14Another bunch of bogus const removalsPanu Matilainen1-2/+2