Commit Graph

9263 Commits

Author SHA1 Message Date
Panu Matilainen 0c4e48de79 Replace equal/not equal uses of str[n]cmp() with rstreq[n] in build code 2009-08-31 11:08:05 +03:00
Panu Matilainen 7e841570fc Hum, rename rstrneq() to rstreqn() to avoid confusing neq with "not equal" 2009-08-31 10:44:35 +03:00
Panu Matilainen 8e9662bd4c Eliminate now unnecessary compressor -> ioflags conversions 2009-08-31 10:19:45 +03:00
Panu Matilainen 5ca7197e33 Accept direct compressor names as Fopen() modes too 2009-08-31 09:44:52 +03:00
Panu Matilainen f9de5ed430 Switch rpmio mode checking to use rstreq() 2009-08-31 09:39:16 +03:00
Panu Matilainen a5de0df0cd Add two helper functions for comparing string equality 2009-08-31 09:33:52 +03:00
Panu Matilainen 8f10f2362e Eliminate unused result code from psm struct 2009-08-28 15:43:07 +03:00
Panu Matilainen 41eb3ac581 Eliminate payload file handle from psm struct
- it's only needed locally inside PSM_PROCESS on PSM_INSTALL
2009-08-28 15:36:07 +03:00
Panu Matilainen 96987afd73 Don't try to incref NULL ds 2009-08-28 15:32:46 +03:00
Panu Matilainen a40e355676 Remove extra trailing } copy-paste error from python_foo macros, duh 2009-08-20 14:10:41 +03:00
Panu Matilainen 3ae20cd53d We always add EVR and Flags to dependencies, remove bogus condition 2009-08-20 13:04:21 +03:00
Panu Matilainen 10772ac7df Fix duplicate dependency checking on build
- Broken by commit af8b41c64a which
  simplified too much.
- There's no guarantee that rpmdsNew() returns a sorted dependency set
  so rpmdsFind() doesn't work correctly here. Walk the ds manually instead.
- With multiple triggers of same type, identical trigger conditions on
  different trigger script were seen as duplicates (RhBug:490378)
- Split the duplicate checking to separate helper function for clarity
2009-08-20 13:02:05 +03:00
Panu Matilainen 634a67d055 Copy BUGURL to source rpm's too
- should've been in commit 86032bfbb6, duh
2009-08-18 11:46:12 +03:00
Panu Matilainen 3e5097c975 Add some commonly used python macros (ticket #83)
- macros to determine python version and library paths
2009-08-18 09:20:45 +03:00
Panu Matilainen 4ced96c5f2 Eliminate unused code (leftover from ordering rewrite) 2009-08-17 15:06:39 +03:00
Panu Matilainen 80a8a5b518 Don't bother relocating packages no files
- fixes a small memleak
2009-08-17 14:40:39 +03:00
Panu Matilainen d8cde273e5 Avoid adding Lua sources and patches twice when recursing (ticket #82)
- parseSpec() operates on newly created empty spec structures even when
  "recursing" but the lua variables are global and need recursion
  protection to avoid adding multiple times
2009-08-17 12:07:48 +03:00
Panu Matilainen 3fc58248d2 Add default %clean section unless overridden in spec (ticket #81)
- avoids silly clutter in every specfile in the regular case but permits
  overriding if needed for whatever reason
- it's a spec behavior change but mostly backwards compatible:
  existing specs will do whatever the %clean does, and if you need to avoid
  calling %clean for whatever reason just keep an empty %clean in the spec
2009-08-17 11:22:16 +03:00
Ville Skyttä 859dd6d4d2 Add -d option to %patch. 2009-08-14 11:37:39 +03:00
Panu Matilainen 511d41abc5 Add isSource() method to python header object (ticket #32) 2009-08-14 11:30:07 +03:00
Panu Matilainen 883253ea6a Add %make_install macro that does the "right thing" wrt modern autotools
- old %makeinstall for broken/ancient autotools left untouched for
  backwards compatibility
2009-08-14 11:27:57 +03:00
Jindrich Novy 7f7188a396 Add bug URL macro so that it could be set distro-wide (rhbz#512774) 2009-08-14 09:36:26 +02:00
Panu Matilainen 3f29577dd4 Update querytags test to match current output
- should've been in commit 86032bfbb6, duh
2009-08-13 17:22:53 +03:00
Panu Matilainen 1d61f3e34b Build script environment tweaks to improve reproducability
- unset CDPATH (RhBug:426955) and DISPLAY environment variables
- always run in C locale
2009-08-13 17:11:47 +03:00
Panu Matilainen de218d7069 Don't set --target in %configure (RhBug:458648)
- --target is only ever useful for handful of compiler toolchain packages
  and cross-compiler packages are better off setting it themselves if
  necessary, rpm messing here only gets in the way
2009-08-13 16:46:18 +03:00
Panu Matilainen 91af91ef8e Nuke long since dead version of %configure macro + update commentary 2009-08-13 16:44:59 +03:00
Panu Matilainen 86032bfbb6 Add an option bug reporting URL tag to packages (RhBug:512774) 2009-08-13 15:45:56 +03:00
Panu Matilainen 0466fd7f89 Add missing <pthread.h> include in rpmsq.h (ticket #87)
- patch from Michal Čihař
2009-08-13 11:46:56 +03:00
Panu Matilainen db5ac1e44a Bump version to appear newer than 4.7.x branch 2009-08-13 10:35:01 +03:00
Jindrich Novy 241581a93e rpmbuild won't segfault when %including spec with zero size 2009-08-12 16:06:08 +02:00
Ville Skyttä 3b7d3b0c19 Add *.xz and *.lzma recompress support to brp-compress. 2009-08-10 10:04:45 +03:00
Jindrich Novy f6982a403b Correctly inherit default %attr(-,-,-) attributes from %defattr (rhbz#515685) 2009-08-06 14:16:02 +02:00
Panu Matilainen 69702c1de3 Kill off lclint remnants everywhere
- remove ancient and likely irrelevant LCL comments and bogus NULL checks
2009-07-23 12:24:10 +03:00
Lubomir Rintel 52e4b9bcac Fix memory allocation for token array
This fixes a memory corruption due to write access out of
bounds of token array, whose size was computed incorrectly.
It was assumed that only '%' characters separate tokens,
which could lead to crashes on useless uses of '[' tokens,
such as "rpm -qa --qf '[]lalala'".
2009-07-14 14:33:15 +03:00
Panu Matilainen d8071161f9 Log an error on short lead (RhBug:511101)
- if lead read returns short without it being an IO error, treat it
  as a case of "not an rpm package"
2009-07-14 14:25:58 +03:00
Panu Matilainen 7baf3235d2 Honor --nofiledigest on install too (RhBug:508021)
- query and install options clash, use popt callback to enable processing
2009-07-14 13:56:27 +03:00
Panu Matilainen 16be29746c Document --nodeps in rpmbuild manual (RhBug:482921) 2009-07-14 11:54:43 +03:00
Panu Matilainen b8102d8f61 Dont accept '-' in manifests (RhBug:461353) 2009-07-14 11:24:02 +03:00
Panu Matilainen 0114bb51dd Dont treat filenames starting with - as stdin 2009-07-14 11:15:30 +03:00
Panu Matilainen 666e26bd7a Oops, missing include for dirname() 2009-07-09 15:07:38 +03:00
Panu Matilainen 17f9073278 Create the directory used for transaction lock if necessary
- otherwise at least rpm --initdb can fail due to transaction locking failing
2009-07-09 14:40:17 +03:00
Panu Matilainen bcb71f69d2 Fix package relocatability checking, broken since forever
- at the time relocation problems are added, ts problem set is NULL
  and rpmtsCheck() wipes it out anyway so the problems from relocation
  are never seen anywhere
- The header isn't available at transaction prepare stage where most
  problems are checked for, so we can't validate the prefixes at that
  point. Add a per-element problem set to carry the problem data and
  merge it to ts problem set when checking for other problem types.
2009-07-09 14:01:13 +03:00
Panu Matilainen 7c512db912 Make rpmpsUnlink() behave the other fooUnlink() functions
- pretty much everything else in rpm returns NULL from unreference functions,
  make be more consistent here...
- also tolerate NULL in both reference and unreference
2009-07-09 13:43:10 +03:00
Panu Matilainen 6ffeec9d7f Add reference counting to rpmProblems 2009-07-09 13:39:55 +03:00
Panu Matilainen cb8241dda7 Unbreak --excludepath (RhBug:409637)
- excluded paths aren't counted as actual relocations, dont bother
  checkig addPrefixes() return
2009-07-09 11:03:54 +03:00
Panu Matilainen 2db564a85a Fix compiler warning on const free
- we dont need popt to set the file variable as we manually process
2009-07-09 09:28:45 +03:00
Panu Matilainen 6649c23cac Make verify result not depend on verbosity level, uff... (RhBug:510213) 2009-07-08 16:20:06 +03:00
Panu Matilainen 33d829d362 Add an index for obsoletes (RhBug:507702) 2009-07-03 15:12:07 +03:00
Panu Matilainen 683d308586 Unify extension + header data getter calling conventions
- simplifies headerGet() & friends a bit and reduces redundancy
- also just return an error instead of dying with assert on NULL td argument
2009-07-03 14:46:06 +03:00
Panu Matilainen e18aedbf97 Pass headerGet flags to extensions too (unused for now) 2009-07-03 14:21:01 +03:00