Commit Graph

140 Commits

Author SHA1 Message Date
Alexey Tourbin
af944d993e package.c (readPackageHeaders): factored do_readPackageHeaders 2009-05-10 23:32:43 +04:00
Alexey Tourbin
6a2cc38410 fprint.c: fpCacheFree returns NULL 2009-03-26 11:20:07 +03:00
Alexey Tourbin
dba96abac5 deal with fpCacheCreate() size parameter 2009-03-26 11:19:53 +03:00
Alexey Tourbin
02104ae61f Use only one, global fingerPrintCache to save a lot of stat calls
[Based on rpm.org af80c3de by Florian Festi.]
2009-03-26 11:19:43 +03:00
Alexey Tourbin
6d4fea769d jhash.h, rpmhash.c: switch to Jenkins One-at-a-time hash 2009-03-26 11:19:01 +03:00
Alexey Tourbin
c4170e6003 rpmhash.c: htFree() takes freeKey and freeData fns and returns NULL 2009-03-26 11:17:46 +03:00
Alexey Tourbin
d4b7714b36 rpmhash.c: removed keySize arg from htCreate() 2009-03-26 11:17:14 +03:00
Alexey Tourbin
aebc9a42dd removed prehistoric multilib support 2009-03-10 14:27:38 +03:00
Alexey Tourbin
822062204d transaction.c: shorter local names in decideConfigFate 2009-03-09 20:13:10 +03:00
Alexey Tourbin
52e51f6ae6 Avoid unnecessary .rpmnew and .rpmsave files (rhbz#128622)
[Based on rpm.org ebfbc82b by Panu Matilainen.]

Don't create .rpmnew and .rpmsave files when file/symlink on disk differs
just by timestamp. Patch by Tomas Mraz.
2009-03-09 20:13:08 +03:00
Alexey Tourbin
329d84a5d8 transaction.c: simplified SAVE/ALTNAME/CREATE condition 2009-03-09 20:13:08 +03:00
Alexey Tourbin
7bb2ab740a transaction.c: use explicit conditions for newWhat 2009-03-09 20:13:07 +03:00
Alexey Tourbin
be808f57ca Avoid .rpmnew when the file hasn't changed in package (rhbz#194246)
[Based on rpm.org e64bf5b9 by Panu Matilainen.]

The current behavior of %config(noreplace) creates a .rpmnewfile iff the type
of the current file has been changed wrto what was originally installed.

The patch changes this behavior so when old and new (in db and in package) is
identical -> not changed, the function returns FA_SKIP -> it won't clobber
anything, it simply skips installation of the file from the package.
This patch handles also the opposite case when old and new packages contain
%config symlink and we have regular file on disk.

Patch from Tomas Mraz.
2009-03-09 20:13:05 +03:00
Alexey Tourbin
ebf4093293 transaction.c: further decideConfigFate() tweaks 2009-03-09 20:13:02 +03:00
Alexey Tourbin
0ee67602ee transaction.c: revamped decideFileFate() akin to filecmp() 2009-03-09 20:11:22 +03:00
Alexey Tourbin
f9c067a1ad 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.
(cherry picked from commit 070b65040e)
2009-03-08 20:12:41 +03:00
Alexey Tourbin
75978600ab s/relocateable/relocatable/ (jbj) 2009-03-08 20:12:18 +03:00
Alexey Tourbin
9d970cf8e2 lib/transaction.c (handleInstInstalledFiles): fixed RPMFILE_CONFIG bug
(cherry picked from commit c5e957a3b3)
2009-03-08 20:07:14 +03:00
Alexey Tourbin
32c0658171 lib/transaction.c (filecmp): require st_mode and uid/gid match for overlapping files; do not require md5 match for %ghost files
(cherry picked from commit 1f439402e0)
2009-03-08 20:06:45 +03:00
Alexey Tourbin
75e60a90bb lib/psm.c: in syslog messages, discriminate between no epoch and zero epoch
(cherry picked from commit e60ab8fa21)
2009-03-08 20:06:17 +03:00
62d33b6587 psm.c (psmTriggerPosttrans): Handle unset "transaction file info" pointer properly (ALT#18079)
rpmRunTransactions() may call psmTriggerPosttrans() without transaction file info.
We have to handle this case gracefully.

Reported by Artem Zolochevskiy.
2008-12-02 22:28:38 +00:00
e350f7fcf1 psm.c (saveTriggerFiles): Fix missing sentinel in rpmGetPath() call
(cherry picked from commit dc9343e541)
2008-11-13 03:47:30 +03:00
Alexey Tourbin
2de9c0ce48 psm.c (psmTriggerPosttrans): try to increase "Running %s" message verbosity (for apt-get) 2008-11-13 00:41:02 +03:00
Alexey Tourbin
764606da7f rpmlibprov.c: added "rpmlib(PosttransFiletriggers)" 2008-11-12 06:02:13 +03:00
Alexey Tourbin
699a24ad65 psm.c (psmTriggerPosttrans): downgrade database lock, for e.g. update-menus 2008-11-12 06:01:08 +03:00
Alexey Tourbin
bffe630760 psm.c (psmTriggerPosttrans): missing sentinel in rpmGetPath() call 2008-11-12 06:00:27 +03:00
389d7864cf build/files.c, lib/signature.c: Do not include unused md5.h
(cherry picked from commit fe6df19341)
2008-11-12 05:29:08 +03:00
Alexey Tourbin
bd1897e46c psm.c (psmTriggerPosttrans): do not set RPM_INSTALL_ARG1 and RPM_INSTALL_ARG2 2008-11-12 05:10:51 +03:00
Alexey Tourbin
5fffe7272e psm.c (saveTriggerFiles): don't write filenames with '\n' character 2008-11-12 05:10:11 +03:00
Alexey Tourbin
4ada155008 implemented posttrans filetriggers, vaguely based on Mandriva patch 2008-11-12 05:10:11 +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
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
9814453966 backported LZMA payload compression from SuSE 2008-05-24 13:47:41 +04:00
6535b7f1cc rpmReadPackageManifest: Fix comments handling 2008-04-08 15:28:53 +00: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