Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I21bf1a3a7c25cbec43022202cf2e5865b603a309
Signed-off-by: wangbiao <biao716.wang@samsung.com>
|
|
- Basically reverts commit d10a9941326f7d397428c8ab0b4ba571cfc6c184
which was just a temporary transition-period thing. Moving pointers
dont bother us anymore...
|
|
- We're not using the added rpmal for anything before rpmtsCheck() and/or
rpmtsOrder(), so this shouldn't break anything either. This is probably
a more or less temporary setup to make string pointer -> pool id
transition a bit easier.
|
|
- We'll need this shortly for added packages too...
|
|
- No functional changes here, but we'll need to know some of these
bits for accurately calculating various dependency bits later on.
|
|
|
|
- This splits outs nicely, moving queue allocation into separate
scope and making collectSCC() less of an heavy-weight.
No functional changes.
|
|
- collectSCC() doesn't actually modify the SCC struct it looks at
so operating on a copy is harmless, but using a (const) pointer
to the original makes the idea more clear (we're not modifying
the scc struct here, only its members)
|
|
- Not all of these are at the end of local scope and in many cases
the iterator pointer is reused, but the logic in all these is
straightforward enough (no jumps etc) that there's no much
chance of mistakenly using already freed iterator.
|
|
- Remove NULL-assignments of local variables at the end of scope
in transaction and database code
|
|
- Fix one-off in the SCC numbering
- Fix wording to talk about number of external dependencies, not packages
- Show number of members in the SCC
|
|
- On install we need to queue preferred colored pkgs before others
to account for the way colored files get laid on disk. On erase,
we need to revert this for the same reason. Most of the time
dependencies take care of this, but the queue placement matters in
cases such as RhBug:680261 where the order is not dependency-driven.
|
|
- %posttrans dependencies have their own peculiar semantics, they're
install-only dependencies which have no implications on ordering.
|
|
- Nobody has been relying on this for ages, and with the new ordering
code since rpm 4.8.x loops are handled much more gracefully than
before. RIP.
|
|
- Add support for new "OrderWithRequires: foo" spec syntax
which has "if and only if foo is present in transaction, order
the transaction as if this package required foo" semantics.
While it looks, and in some ways is, a soft dependency, this
is not the same as recommends/suggests etc: those have unknown
depsolver policy dependent semantics attached to them, whereas
ordering hints have a clear definition and is only relevant for rpm
itself, depsolvers should not even look at the data.
- This allows packages to express correct ordering for optional
functionality, such as
%post
if [ -x %{_bindir}/register-component ]; then
%{_bindir}/register-component %{name}
fi
If the package containing %{_bindir}/register-component is included
in the same transaction, it makes sense to have it installed before the
package(s) that use it. But as it is fully optional, Requires would
not be appropriate. Using OrderWithRequires allows this to be expressed
without dragging in extraneous dependencies for optional functionality.
|
|
- Instead of creating a completely unresolvable tangle of pre-requisites
between all collection members and their requirements, just add
a single relation loop of all the packages in a (grouped) collection,
effectively turning it into a strongly connected component. The
loop-cutting algorithm has slightly better chances of surviving this
while still enforcing the collection members to be installed in one
lump. Also only process each collection just once.
|
|
- Add a crude flags system to allow selectively enabling the extra
grouping during ordering: currently only sepolicy collection needs
this, and its very harmful when applied to more regular collections
as it creates truly gigantic dependency loops that rpm has no chance
of sorting out sanely.
|
|
- Nested functions are a gcc-extension and very non-portable. Refactor
to eliminate the nesting by passing the "global" variables via
a struct from detectSCCs().
|
|
This patch adds the install-time feature that if a package requires a package
in a collection, then it also requires all other packages in that collection.
This has the effect that collections will be roughly grouped together during a
transaction.
Although this is not absolutely necessary for the majority of collections, it
is required for the SELinux collection. This is because all SELinux policies
must be installed before the applications they secure to ensure correct labels.
This means we must ensure packages in the selinux collection are ordered
earlier in the transaction than all applications they protect. Adding this
implicit runtime requirements achieves this in a general manner, without major
modifications to dependency ordering.
To accomplish this, this patch splits the addRelation function into two parts:
one that determines which relations to add, and one that actually adds them.
After the usual relation is added between two packages, it then determines if
the required package contains any collections. If so, it finds all other
packages that are in the same collections and creates additional relations.
|
|
- A pre-transaction dependency is generally anything that must be
available at the start of the transaction, and cannot be resolved
by packages *in* the transaction. This lets %pretrans scriptlet
dependencies be expressed correctly, and could be also used for
other kinds of pre-conditions.
- rpmlib() dependencies are a special case of pre-trans dependencies
but leaving them handled separately as they cannot be provided by
anything in rpmdb either, whereas pretrans dependencies can.
|
|
- the "new" hash-based rpmal only uses rpmalMakeIndex() for initial
creation of the hash tables as late as possible for better estimate
of needed hash size, but doesn't require any index regeneration if something
is added
- first call to rpmalSatisfiedDepend() now initializes the hashes, if
significant amount of entries are added after the first call hash
table might get full ... so dont do that ;) (this was already true
with rpmalMakeIndex(), now its just hidden out of sight)
|
|
- add internal rpmtsMembers() function to get the member structures
- the main rpmts struct is now opaque within order.c, and much closer
to being so for depends.c and transaction.c too
- no functional changes
|
|
- ...except addRelation() which still needs rpmteTSI() for grabbing
tsort info from elements in rpmal
|
|
- pass the local order info struct to detectSCC() and work on that
instead of ping-ponging to the TSI's through transaction elements
|
|
|
|
|
|
|
|
- its only used for debug log formatting and we can calculate it from
the number of parents in the debug case
|
|
- this is the same as tsi_count
|
|
|
|
|
|
|
|
- nothing outside order.c needs this stuff, TSI alloc+free routines
have no business being exported
- for now we need to store a pointer to tsortInfo in the elements,
its just an opaque pointer for ping-ponging the data through ts elements
- all allocation + freeing is local to ordering code
|
|
|
|
|
|
|
|
- we have q's TSI in local variable already, use it
- also rename tsi -> q_tsi so it's obvious which one we're manipulating
|
|
|
|
|
|
|
|
|
|
|