public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.891-13-g5947bc9 Date: Sat, 07 Jul 2018 11:53:00 -0000 [thread overview] Message-ID: <20180707115351.61817.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=5947bc929bc772bf067a6b457fc825bbbfc4b0e6 commit 5947bc929bc772bf067a6b457fc825bbbfc4b0e6 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Fri Jul 6 17:16:16 2018 +0100 Fix SolvableVersion::deplist() to handle version-relations correctly This was using completely the wrong Id for the version-relation, so it was always returning unversioned dependencies https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=6d23697e7ec026b86b01030a482d546958a82c24 commit 6d23697e7ec026b86b01030a482d546958a82c24 Author: Ken Brown <kbrown@cornell.edu> Date: Wed Mar 21 15:38:07 2018 -0400 Finish providing support for provides: and conflicts: Introduce member functions SolvableVersion::provides() and SolvableVersion::conflicts(). This enables packagedb::read() to access provides and conflicts lists from setup.ini. Diff: --- libsolv.cc | 16 ++++++++++++++-- libsolv.h | 4 ++++ package_db.cc | 6 ++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/libsolv.cc b/libsolv.cc index 11394a2..63942b2 100644 --- a/libsolv.cc +++ b/libsolv.cc @@ -121,6 +121,18 @@ SolvableVersion::obsoletes() const return deplist(SOLVABLE_OBSOLETES); } +const PackageDepends +SolvableVersion::provides() const +{ + return deplist(SOLVABLE_PROVIDES); +} + +const PackageDepends +SolvableVersion::conflicts() const +{ + return deplist(SOLVABLE_CONFLICTS); +} + // helper function which returns the deplist for a given key, as a PackageDepends const PackageDepends SolvableVersion::deplist(Id keyname) const @@ -147,9 +159,9 @@ SolvableVersion::deplist(Id keyname) const const char *name = pool_id2str(pool, q.elements[i]); PackageSpecification *spec = new PackageSpecification (name); - if (ISRELDEP(id)) + if (ISRELDEP(q.elements[i])) { - Reldep *rd = GETRELDEP(pool, id); + Reldep *rd = GETRELDEP(pool, q.elements[i]); spec->setOperator(RelId2Operator(rd->flags)); spec->setVersion(pool_id2str(pool, rd->evr)); } diff --git a/libsolv.h b/libsolv.h index 7bb0be2..c218ab8 100644 --- a/libsolv.h +++ b/libsolv.h @@ -60,6 +60,10 @@ class SolvableVersion const PackageDepends depends() const; // Return the obsoletes list const PackageDepends obsoletes() const; + // Return the provides list + const PackageDepends provides() const; + // Return the conflicts list + const PackageDepends conflicts() const; bool accessible () const; package_type_t Type () const; package_stability_t Stability () const; diff --git a/package_db.cc b/package_db.cc index 2bbe3b1..2c4757c 100644 --- a/package_db.cc +++ b/package_db.cc @@ -146,6 +146,8 @@ packagedb::read () packageversion pv = findBinaryVersion(PackageSpecification(pkgname, f.ver)); PackageDepends dep; PackageDepends obs; + PackageDepends prov; + PackageDepends conf; if (pv) { data.sdesc = pv.SDesc(); @@ -157,6 +159,10 @@ packagedb::read () data.requires = &dep; obs = pv.obsoletes(); data.obsoletes = &obs; + prov = pv.provides(); + data.provides = &prov; + conf = pv.conflicts(); + data.conflicts = &conf; } else // This version is no longer available. It could
reply other threads:[~2018-07-07 11:53 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180707115351.61817.qmail@sourceware.org \ --to=jturney@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).