Commit Graph

322 Commits

Author SHA1 Message Date
Alexey Tourbin
b51c799f6b 4.0.4-alt95.M41.6
- improved install/upgrade package reordering (in tsort algorithm,
  changed "presentation order" to "chainsaw order")
2008-11-10 05:44:13 +03:00
Alexey Tourbin
b8767dceb1 depends.c: disabled tsort presentation order
This should facilitate library upgrades, e.g. glibc-prthread.
Consider that we upgrade gcc-* and glibc-* packages; and glibc
has new subpackage glibc-pthread (with libpthread and librt
shared libraries).

Old order was:
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D:     0    0   14    0    0  glibc-preinstall-2.8.90-alt3
D:     1    1   21    0    1    glibc-core-2.8.90-alt3
D:     2    1    9    0    2      cpp4.3-4.3.2-alt5
D:     3    1    5    0    2      libgcc4.3-4.3.2-alt5
D:     4    2   13    0    3        glibc-pthread-2.8.90-alt3
D:     5    2   20    0    4          glibc-core-debug-2.8.90-alt3
D:     6    2   17    0    4          glibc-gconv-modules-2.8.90-alt3
D:     7    2   16    0    4          glibc-locales-2.8.90-alt3
D:     8    2   15    0    4          glibc-nss-2.8.90-alt3
D:     9    2   12    0    4          glibc-timezones-2.8.90-alt3
D:    10    2   11    0    4          glibc-utils-2.8.90-alt3
D:    11    2   10    0    5            iconv-2.8.90-alt3
D:    12    8   22    0    6              glibc-2.8.90-alt3
D:    13    4   19    0    7                glibc-devel-2.8.90-alt3
D:    14    1   18    0    8                  glibc-devel-static-2.8.90-alt3
D:    15    4    8    0    8                  gcc4.3-4.3.2-alt5
D:    16    1    4    0    2      libgfortran4.3-4.3.2-alt5
D:    17    2    3    0    3        libgfortran4.3-devel-4.3.2-alt5
D:    18    3    6    0    4          gcc4.3-fortran-4.3.2-alt5
D:    19    2    2    0    3        libstdc++4.3-4.3.2-alt5
D:    20    2    1    0    4          libstdc++4.3-devel-4.3.2-alt5
D: ========== successors only (presentation order)
D:    21    3    7    0    5            gcc4.3-c++-4.3.2-alt5

Note that #succesors value is actually changed using the package index
in the input list of packages (on the command line): earlier packages
have higher values.  This is called "successors from tsort are processed
in presentation order".  E.g. when choosing to upgrade between cpp4.3,
libgcc4.3, and libgfortran4.3, cpp4.3 gets upgraded first.  (The
collation is probably due to using shell glob on the command line.)

The problem is that, in cpp4.3 %post-script, some pthread-dependent
code might be called, and pthread shared library is simply mssing
at that point (after glibc-core upgrade and before glibc-pthread
install).

New order is:
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D:     0    0    1    0    0  glibc-preinstall-2.8.90-alt3
D:     1    1   17    0    1    glibc-core-2.8.90-alt3
D:     2    1    3    0    2      libgcc4.3-4.3.2-alt5
D:     3    2    8    0    3        glibc-pthread-2.8.90-alt3
D:     4    2    2    0    4          glibc-gconv-modules-2.8.90-alt3
D:     5    2    2    0    4          glibc-nss-2.8.90-alt3
D:     6    2    1    0    5            iconv-2.8.90-alt3
D:     7    2    1    0    4          glibc-locales-2.8.90-alt3
D:     8    2    1    0    4          glibc-timezones-2.8.90-alt3
D:     9    2    1    0    4          glibc-utils-2.8.90-alt3
D:    10    8    1    0    5            glibc-2.8.90-alt3
D:    11    4    4    0    6              glibc-devel-2.8.90-alt3
D:    12    2    1    0    3        libstdc++4.3-4.3.2-alt5
D:    13    2    1    0    4          libstdc++4.3-devel-4.3.2-alt5
D:    14    1    1    0    2      cpp4.3-4.3.2-alt5
D:    15    4    2    0    3        gcc4.3-4.3.2-alt5
D:    16    1    1    0    2      libgfortran4.3-4.3.2-alt5
D:    17    2    1    0    3        libgfortran4.3-devel-4.3.2-alt5
D: ========== successors only (presentation order)
D:    18    2    0    0    4          glibc-core-debug-2.8.90-alt3
D:    19    1    0    0    7                glibc-devel-static-2.8.90-alt3
D:    20    3    0    0    4          gcc4.3-fortran-4.3.2-alt5
D:    21    3    0    0    4          gcc4.3-c++-4.3.2-alt5

Note that #succesors now indicates the number of immediate successors;
libgcc4.3 now has 3 immediate successors (glibc-pthread, gcc4.3, and
libstdc++4.3), while cpp4.3 and libgfortran4.3 have only one immediate
successor.

Also removed tools/rpmsort.c.

> The are various serial representations of a partially ordered set.
>
> The default is what I call "chainsaw", always emit the node that has
> the most children.  The "chainsaw" heuristic tries to emit nodes that
> are depended upon as early as possible to localize interactions
> amongst packages, but really should be
>     Always emit the node of the largest sub-tree.
> rather than the number of immediate children. I call this "buzzsaw".
>
> Anaconda has the constraint of changing cd's during install. So
> "presentation" ordering preserves the arrival ordering into a
> transaction set. Too bad that "presentation" ordering is often
> incorrect because of no loop analysis first.

https://lists.dulug.duke.edu/pipermail/rpm-devel/2005-June/000468.html
2008-11-10 05:21:23 +03:00
4ce1b4bead lib/header_internal.c (headerGetLangs): Fix stupid X<=Y<=Z comparison 2008-10-20 11:49:56 +00:00
fe6df19341 build/files.c, lib/signature.c: Do not include unused md5.h 2008-10-20 11:39:45 +00:00
Alexey Tourbin
70b853bb1f Merge branch 'altlinux-4.0' 2008-06-13 05:29:00 +04:00
Alexey Tourbin
070b65040e psm.[ch]: skip fuser and fgroup test/set for src.rpm
Previous change in loadFi() triggers the code which depends
on fi->fuser and fi->fgroup being NULL for source rpms.
Now I add explicit check for source rpms.

Update: also turn off suid/sgid bits for src.rpm.
2008-06-13 05:23:41 +04:00
Alexey Tourbin
5632ef5ac2 rpmrc.c: classify SSE2-capable CPUs as "pentium4" 2008-06-12 04:45:53 +04:00
9376fa4c22 rpmrc.c (is_pentium3): Add new p3 family models
http://download.intel.com/design/processor/applnots/24161832.pdf page 22
2008-06-05 21:52:02 +00:00
669c2e04c2 rpmrc.c (is_pentium4): Add new p4 models
http://download.intel.com/design/processor/applnots/24161832.pdf page 23
Patch from alexander@npo-inform.com
2008-06-05 21:52:02 +00:00
Alexey Tourbin
6fab850d5e s/relocateable/relocatable/ (jbj) 2008-06-04 13:54:36 +04:00
Alexey Tourbin
c5e957a3b3 lib/transaction.c (handleInstInstalledFiles): fixed RPMFILE_CONFIG bug 2008-06-04 03:21:04 +04:00
Alexey Tourbin
4a557675fc Merge branch 'altlinux-4.0' 2008-05-30 22:25:55 +04:00
Alexey Tourbin
9814453966 backported LZMA payload compression from SuSE 2008-05-24 13:47:41 +04:00
Alexey Tourbin
1f439402e0 lib/transaction.c (filecmp): require st_mode and uid/gid match for overlapping files; do not require md5 match for %ghost files 2008-05-14 07:26:15 +04:00
Alexey Tourbin
fb5f3e4c88 lib/depends.c: adjust provides check for versioned paths 2008-05-12 22:23:45 +04:00
c56e3cf71d Merge branch 'altlinux-4.0' 2008-04-08 15:32:44 +00:00
6535b7f1cc rpmReadPackageManifest: Fix comments handling 2008-04-08 15:28:53 +00:00
Alexey Tourbin
e60ab8fa21 lib/psm.c: in syslog messages, discriminate between no epoch and zero epoch 2008-03-30 05:15:45 +04:00
8440b43b3c lib/query.c (showQueryPackage): Fix potential null dereference in QUERY_FOR_DEFAULT mode 2007-05-18 00:54:19 +00:00
4c4920e2d8 lib/query.c (showQueryPackage): Check all header strings to resize buffer (CVE-2006-5466, RH#212833)
Backported from rpm-4.4.8
2007-05-18 00:33:44 +00:00
6e81fe8727 lib/package.c (readPackageHeaders): Remove insecure legacy providePackageNVR() call 2007-05-18 00:20:42 +00:00
8a189d448b lib/formats.c (i18nTag): Avoid segfault on header without RPMTAG_NAME (RH#239557)
https://lists.dulug.duke.edu/pipermail/rpm-devel/2007-May/002653.html
2007-05-16 13:20:45 +00:00
0da910fb46 lib/transaction.c (rpmRunTransactions): Ignore unavailable mount points instead of bailing out 2007-03-29 16:03:42 +00:00
2aea31a78f lib/transaction.c (rpmRunTransactions): Drop "/mnt" support 2007-03-27 15:41:57 +00:00
8708708cac lib/fs.c (getFilesystemList): Drop "/mnt" support 2007-03-27 15:41:38 +00:00
e681f13889 lib/query.c: flush query format buffer before listing files (RH#212833, CVE-2006-5466). 2006-11-18 23:17:15 +00:00
7be2f91309 showMatches: Backport --querybynumber looping fix (#9773). 2006-09-16 23:27:20 +00:00
fe838e98f7 rpmQueryVerify: when rpmReadPackageManifest() is disabled, treat RPMRC_BADMAGIC return code from rpmReadPackageHeader() like other read errors (#9433). 2006-09-16 23:00:55 +00:00
df61ee0b9e Include local headers. 2006-05-15 03:26:57 +04:00
8787ee5d55 Fixed "type qualifiers ignored on function return type" issue. 2006-05-15 02:48:59 +04:00
ff10df025a Backported defaultMachine changes from rpm-4_4 branch. 2006-03-19 17:08:09 +00:00
44f692fbc1 %_preScriptEnvironment: export RPM_TARGET_ARCH and RPM_TARGET_OS 2006-02-24 00:35:53 +00:00
a2310ac49c reverted rpmTagTable changes 2005-10-19 17:45:39 +00:00
6e6ebb00f1 define _upgrade_honor_buildtime to 1 by default, add --ignorebuildtime to disable 2005-10-18 10:43:12 +00:00
540f2aec95 loadFi: fixed potential NULL dereference 2005-10-17 23:50:09 +00:00
f8470fffbe Set umask 022 for install scripts and triggers execution. 2005-10-17 22:57:59 +00:00
3fa4258878 Backported epoch handling fix in psmStage() and rpmRunTransactions().
Fix package upgrades by introducing digest comparison.
Optionally honor buildtime during package upgrades.
2005-10-17 13:23:09 +00:00
eaef1aad45 relocated _noDirTokens, compressFilelist, expandFilelist, providePackageNVR from lib to rpmdb 2005-10-15 16:30:13 +00:00
e1e85a6d51 relocated tagtable.c from lib to rpmdb 2005-10-15 15:22:28 +00:00
857446207e relocated tagtable.c from lib to rpmdb 2005-10-15 15:13:29 +00:00
adacd53a24 relocated headerNVR() from lib to rpmdb; added headerNEVRA() to rpmdb 2005-10-15 15:03:18 +00:00
e4d02edfd1 relocated tagName.c from lib to rpmdb 2005-10-15 14:57:00 +00:00
acf2f5d6ac relocated rpmvercmp.c from lib to rpmdb 2005-10-15 14:44:31 +00:00
f27bc8917e reverted: relocated parseEVR and isChangeNameMoreFresh from lib to rpmdb 2005-10-15 14:42:24 +00:00
5fe70d69b9 relocated parseEVR and isChangeNameMoreFresh from lib to rpmdb 2005-10-15 14:29:38 +00:00
d447fad49e relocated hdrinline.h and header.c from lib to rpmdb 2005-10-15 14:12:36 +00:00
6a14cbc258 fixed rpmExpand usage 2005-09-29 17:10:24 +00:00
4086557633 fixed rpmExpand usage 2005-09-29 16:01:17 +00:00
ce8ad9b9f0 fix rpmExpandNumeric handling 2005-09-29 15:46:13 +00:00
e79572e641 parseFormat(): allocate space for PTOK_ARRAY too 2005-06-29 22:26:42 +00:00
79826577bb more tweaks 2005-02-10 19:59:21 +00:00
f3fe45f1ac tweak buffer size 2005-02-10 19:56:23 +00:00
edfa505d46 open() return code fix 2005-02-10 19:48:37 +00:00
20c9cc7888 checkCPU() usage tweaks 2005-02-10 19:43:00 +00:00
65aaf3b23d Added pentium4 arch support (Raorn, #5259) 2004-10-31 19:08:39 +00:00
24276c5ef6 optimize _macro_i18ndomains expression 2004-06-26 23:41:48 +00:00
6f64190b92 convert: fixed to meet gettext(3) conventions 2004-06-26 19:51:13 +00:00
f23046ad70 import language guessing mechanism from glibc/intl 2004-06-26 16:46:55 +00:00
29942cbf6c fixed thinko made in prev change 2004-05-17 18:06:51 +00:00
424680beb0 disallow root to install source packages by default 2004-05-17 14:25:27 +00:00
f6e2d37e95 assorted backports from 4_0-20030325 2004-02-29 14:14:02 +00:00
cffe35f230 headerFindI18NString: do not translate empty strings [2] 2004-02-20 23:17:55 +00:00
e98c19a967 headerFindI18NString: do not translate empty strings 2004-02-20 23:10:52 +00:00
eab59fe8a3 runScript: signal (SIGPIPE, SIG_DFL) - executed scripts exepcts default SIGPIPE handler 2004-02-03 20:36:08 +00:00
6cb9a9a472 - lib/depends.c(rangeMatchesDepFlags,alAllSatisfiesDepend):
when using rpmRangesOverlap for versioned requires, ensure that
  provides are also versioned.
2004-01-22 12:43:59 +00:00
e13efb7549 reverted recent change 2004-01-22 11:56:33 +00:00
0d326d3a8d rpmRangesOverlap: If both A and B are an existence test, always overlap 2004-01-22 08:57:52 +00:00
4b6e05af60 rpmRangesOverlap: when both EVRs are non-existent or empty, overlap; otherwise use normal rpmEVRcmp algorithm 2004-01-21 15:11:03 +00:00
1cff6d97bc makefiles cleanup1 2003-11-24 20:44:29 +00:00
065f690ea7 fixed compilation 2003-11-24 19:25:54 +00:00
d90659e737 fixed compilation 2003-11-24 19:20:13 +00:00
d5ddad3bf5 fixed compilation 2003-11-24 19:04:47 +00:00
58e1dad6cc fixed compilation warnings 2003-11-24 18:59:03 +00:00
ffa7179b0e uninstall_noorder hook (NOTYET) 2003-11-07 17:26:13 +00:00
a6b602bd31 fix Requires(post,preun) problem 2003-07-09 17:21:28 +00:00
dc16524f2d do syslog only when geteuid() == 0 2003-07-09 13:45:10 +00:00
bc77b340a3 fix segfault on "rpmquery --qf %{FILENAMES} ncurses" command 2003-04-23 22:00:43 +00:00
112afdc29c rpmQueryVerify[RPMQV_RPM]: parse argument (do glob and other expansions)
only if glob_query is enabled [and disabled it by default].
2002-12-09 23:11:15 +00:00
2b157ba674 rpmQueryVerify: don't parse file argument 2002-12-09 14:30:30 +00:00
8769e44cd0 s/INTLLIBS/LIBINTL/g 2002-12-09 14:05:00 +00:00
cf669a7c4a headerFindI18NString: check for LANGUAGE first 2002-10-11 10:30:13 +00:00
d60fb06db2 reverted to prev version of chroot fix 2002-10-04 16:42:29 +00:00
80c96f59f4 do not try to chroot into "/", part 2 2002-10-03 17:11:50 +00:00
394a569a16 do not try to chroot into "/" 2002-10-03 17:02:02 +00:00
569410371a used MkdirP 2002-08-29 15:00:42 +00:00
c3a7049f78 added username/homedir support 2002-08-12 15:53:39 +00:00
6cc64fa4ea updated code to snapshot 2002-06-15 of 4_0 branch 2002-08-03 16:35:14 +00:00
b7b3857d3e fixed switch warning 2002-07-20 11:02:13 +00:00
d0efd988dd convention forces us to use xisspace 2002-07-20 10:52:46 +00:00
de25d1f6d1 Added a pair of new things to the query format:
the '>'-test, ':nothing' format variant and
	implemented '-q --changes-since=<e:v-r>' upon them.
2002-07-20 10:39:40 +00:00
3e8d542527 Fixed a pair of swapped function dscriptions. 2002-07-20 10:25:57 +00:00
3b7a25ec52 fixed two possible NULL dereferences 2002-07-20 10:23:28 +00:00
c5185845ec reverted previous changes: no need 2002-07-20 10:12:10 +00:00
4fd2a7a997 added new escape sequence: \0 2002-07-08 14:09:57 +00:00
accfd001d5 fixed switch warning 2002-07-08 14:01:22 +00:00
12cb7941b3 added optional RPMTAG_ARG support 2002-07-08 11:50:55 +00:00
c0574eb4aa convert: fixed recent change 2002-06-13 14:39:30 +00:00
428c74f76f convert: optimized to reduce chance of memleak 2002-06-13 10:22:49 +00:00
f5f6615898 convert: introduced memleak to gain full i18n support 2002-06-13 10:15:57 +00:00
0d589754c9 export RPM_INSTALL_ARG{1,2} variables in runScript() 2002-06-13 10:01:20 +00:00
c4187a43a3 indentified piece of source 2002-06-13 09:37:35 +00:00
1afe894c52 updated code to snapshot 2002-05-23 of 4_0 branch 2002-06-05 11:06:46 +00:00
349f25715c updated code to snapshot 2002-04-19 2002-04-22 17:06:31 +00:00
62a57e9dd7 updated code to snapshot 2002-04-11 2002-04-12 05:52:33 +00:00
db9590945c updated code to snapshot 2002-04-04 2002-04-05 08:04:32 +00:00
14b947cb6c updated code to snapshot 2002-03-27 2002-03-30 16:02:41 +00:00
4afce734b3 added: #include <string.h> 2002-03-26 18:12:00 +00:00
fec51dbf1b dependency_libs cleanup for: -lpopt 2002-03-26 16:27:19 +00:00
2d7975f990 sync with rpm4 branch: fancyPercents: forgotten lines 2002-03-26 15:24:50 +00:00
1ce2c1a667 sync with rpm4 branch 2002-03-26 00:56:54 +00:00
305a704478 sync with rpm4 branch 2002-03-26 00:33:14 +00:00
685c165e70 sync with rpm4 branch 2002-03-26 00:25:58 +00:00
54ba4fa9bc sync with rpm4 branch 2002-03-25 23:51:37 +00:00
06caede98b sync with rpm4 branch: fancyPercents 2002-03-25 23:46:55 +00:00
22ea12d87f sync with rpm4 branch 2002-03-25 23:36:07 +00:00
c0497676a6 sync with rpm4 branch 2002-03-25 23:19:22 +00:00
41c8ceaf55 sync with rpm4 branch: added fancyPercents 2002-03-25 23:16:51 +00:00
dee952c2f8 sync with rpm4 branch: include local headers 2002-03-25 22:02:39 +00:00
44060ebf8f sync with rpm4 branch: removed obsolete entries, added closeall entry 2002-03-25 20:58:05 +00:00
8b8d4d39aa sync with rpm4 branch: added new files 2002-03-25 20:37:46 +00:00
c15b8e601d re-added .lclintrc and .cvsignore files from CVS 2002-03-25 20:27:37 +00:00
82a4763c66 Initial revision 2002-03-25 20:16:26 +00:00