359 lines
13 KiB
Diff
359 lines
13 KiB
Diff
diff -ru libdnf-0.22.0/libdnf/dnf-rpmts.cpp libdnf-0.22.0.patched/libdnf/dnf-rpmts.cpp
|
|
--- libdnf-0.22.0/libdnf/dnf-rpmts.cpp 2019-06-02 12:19:17.767417367 +0200
|
|
+++ libdnf-0.22.0.patched/libdnf/dnf-rpmts.cpp 2019-06-02 11:56:44.647788759 +0200
|
|
@@ -193,7 +193,7 @@
|
|
while (rpmpsNextIterator(psi) >= 0) {
|
|
g_autofree gchar *msg = NULL;
|
|
prob = rpmpsGetProblem(psi);
|
|
- msg = rpmProblemString(prob);
|
|
+ msg = (gchar*)rpmProblemString(prob);
|
|
g_string_append(string, msg);
|
|
g_string_append(string, "\n");
|
|
}
|
|
@@ -268,7 +268,7 @@
|
|
/* find package by db-id */
|
|
recOffset = dnf_package_get_rpmdbid(pkg);
|
|
rpmlogSetCallback(dnf_rpmts_log_handler_cb, &rpm_error);
|
|
- iter = rpmtsInitIterator(ts, RPMDBI_PACKAGES,
|
|
+ iter = rpmtsInitIterator(ts, (rpmTag)RPMDBI_PACKAGES,
|
|
&recOffset, sizeof(recOffset));
|
|
if (iter == NULL) {
|
|
if (rpm_error != NULL) {
|
|
diff -ru libdnf-0.22.0/libdnf/dnf-transaction.cpp libdnf-0.22.0.patched/libdnf/dnf-transaction.cpp
|
|
--- libdnf-0.22.0/libdnf/dnf-transaction.cpp 2019-06-02 12:19:17.768417372 +0200
|
|
+++ libdnf-0.22.0.patched/libdnf/dnf-transaction.cpp 2019-06-02 12:10:17.656626376 +0200
|
|
@@ -1062,8 +1062,8 @@
|
|
GPtrArray *pkglist;
|
|
DnfPackage *pkg;
|
|
DnfPackage *pkg_tmp;
|
|
- rpmprobFilterFlags problems_filter = 0;
|
|
- rpmtransFlags rpmts_flags = RPMTRANS_FLAG_NONE;
|
|
+ int problems_filter = 0;
|
|
+ int rpmts_flags = RPMTRANS_FLAG_NONE;
|
|
DnfTransactionPrivate *priv = GET_PRIVATE(transaction);
|
|
libdnf::Swdb *swdb = priv->swdb;
|
|
|
|
@@ -1306,8 +1306,8 @@
|
|
goto out;
|
|
|
|
/* no signature checking, we've handled that already */
|
|
- vs_flags = rpmtsSetVSFlags(priv->ts, _RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS);
|
|
- rpmtsSetVSFlags(priv->ts, vs_flags);
|
|
+ vs_flags = rpmtsSetVSFlags(priv->ts, (rpmVSFlags)(_RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS));
|
|
+ rpmtsSetVSFlags(priv->ts, (rpmVSFlags)vs_flags);
|
|
|
|
/* filter diskspace */
|
|
if (!dnf_context_get_check_disk_space(priv->context))
|
|
@@ -1326,10 +1326,10 @@
|
|
|
|
priv->state = dnf_state_get_child(state);
|
|
priv->step = DNF_TRANSACTION_STEP_IGNORE;
|
|
- rpmtsSetFlags(priv->ts, rpmts_flags);
|
|
+ rpmtsSetFlags(priv->ts, (rpmtransFlags)rpmts_flags);
|
|
g_debug("Running transaction in test mode");
|
|
dnf_state_set_allow_cancel(state, FALSE);
|
|
- rc = rpmtsRun(priv->ts, NULL, problems_filter);
|
|
+ rc = rpmtsRun(priv->ts, NULL, (rpmprobFilterFlags)problems_filter);
|
|
if (rc < 0) {
|
|
ret = FALSE;
|
|
g_set_error(error,
|
|
@@ -1359,10 +1359,10 @@
|
|
/* run the transaction */
|
|
priv->state = dnf_state_get_child(state);
|
|
priv->step = DNF_TRANSACTION_STEP_STARTED;
|
|
- rpmtsSetFlags(priv->ts, rpmts_flags);
|
|
+ rpmtsSetFlags(priv->ts, (rpmtransFlags)rpmts_flags);
|
|
g_debug("Running actual transaction");
|
|
dnf_state_set_allow_cancel(state, FALSE);
|
|
- rc = rpmtsRun(priv->ts, NULL, problems_filter);
|
|
+ rc = rpmtsRun(priv->ts, NULL, (rpmprobFilterFlags)problems_filter);
|
|
if (rc < 0) {
|
|
ret = FALSE;
|
|
g_set_error(
|
|
diff -ru libdnf-0.22.0/libdnf/repo/solvable/Package.cpp libdnf-0.22.0.patched/libdnf/repo/solvable/Package.cpp
|
|
--- libdnf-0.22.0/libdnf/repo/solvable/Package.cpp 2019-06-01 21:09:37.000000000 +0200
|
|
+++ libdnf-0.22.0.patched/libdnf/repo/solvable/Package.cpp 2019-06-02 12:15:17.288215714 +0200
|
|
@@ -3,12 +3,12 @@
|
|
#include <utility>
|
|
#include "DependencyContainer.hpp"
|
|
|
|
-Package::Package(DnfSack *sack, Id id)
|
|
+Package_::Package_(DnfSack *sack, Id id)
|
|
: sack(sack)
|
|
, id(id)
|
|
{}
|
|
|
|
-Package::Package(DnfSack *sack,
|
|
+Package_::Package_(DnfSack *sack,
|
|
HyRepo repo,
|
|
const char *name,
|
|
const char *version,
|
|
@@ -22,7 +22,7 @@
|
|
}
|
|
}
|
|
|
|
-Package::Package(DnfSack *sack,
|
|
+Package_::Package_(DnfSack *sack,
|
|
HyRepo repo,
|
|
const std::string &name,
|
|
const std::string &version,
|
|
@@ -36,148 +36,148 @@
|
|
}
|
|
}
|
|
|
|
-Package::Package(const Package &package)
|
|
+Package_::Package_(const Package_ &package)
|
|
: sack(package.sack)
|
|
, id(package.id)
|
|
{}
|
|
|
|
-Package::~Package() = default;
|
|
+Package_::~Package_() = default;
|
|
|
|
-const char *Package::getSolvableName() const
|
|
+const char *Package_::getSolvableName() const
|
|
{
|
|
Pool *pool = dnf_sack_get_pool(sack);
|
|
Solvable *solvable = pool_id2solvable(pool, id);
|
|
return pool_id2str(pool, solvable->name);
|
|
}
|
|
|
|
-const char *Package::getSolvableEvr() const
|
|
+const char *Package_::getSolvableEvr() const
|
|
{
|
|
Pool *pool = dnf_sack_get_pool(sack);
|
|
Solvable *solvable = pool_id2solvable(pool, id);
|
|
return pool_id2str(pool, solvable->evr);
|
|
}
|
|
|
|
-const char *Package::getArch() const
|
|
+const char *Package_::getArch() const
|
|
{
|
|
Pool *pool = dnf_sack_get_pool(sack);
|
|
Solvable *solvable = pool_id2solvable(pool, id);
|
|
return pool_id2str(pool, solvable->arch);
|
|
}
|
|
|
|
-const char *Package::getSolvableVendor() const
|
|
+const char *Package_::getSolvableVendor() const
|
|
{
|
|
Pool *pool = dnf_sack_get_pool(sack);
|
|
Solvable *solvable = pool_id2solvable(pool, id);
|
|
return pool_id2str(pool, solvable->vendor);
|
|
}
|
|
|
|
-void Package::setSolvableVendor(const char *vendor)
|
|
+void Package_::setSolvableVendor(const char *vendor)
|
|
{
|
|
Solvable *solvable = pool_id2solvable(dnf_sack_get_pool(sack), id);
|
|
solvable_set_str(solvable, SOLVABLE_VENDOR, vendor);
|
|
}
|
|
|
|
-Id Package::getId() const
|
|
+Id Package_::getId() const
|
|
{
|
|
return id;
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getConflicts() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getConflicts() const
|
|
{
|
|
return getDependencies(SOLVABLE_CONFLICTS);
|
|
};
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getEnhances() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getEnhances() const
|
|
{
|
|
return getDependencies(SOLVABLE_ENHANCES);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getObsoletes() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getObsoletes() const
|
|
{
|
|
return getDependencies(SOLVABLE_OBSOLETES);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getProvides() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getProvides() const
|
|
{
|
|
return getDependencies(SOLVABLE_PROVIDES);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getRecommends() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getRecommends() const
|
|
{
|
|
return getDependencies(SOLVABLE_RECOMMENDS);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getRequires() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getRequires() const
|
|
{
|
|
return getDependencies(SOLVABLE_REQUIRES, 0);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getRequiresPre() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getRequiresPre() const
|
|
{
|
|
return getDependencies(SOLVABLE_REQUIRES, 1);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getSuggests() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getSuggests() const
|
|
{
|
|
return getDependencies(SOLVABLE_SUGGESTS);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getSupplements() const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getSupplements() const
|
|
{
|
|
return getDependencies(SOLVABLE_SUPPLEMENTS);
|
|
}
|
|
|
|
-void Package::addConflicts(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addConflicts(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_CONFLICTS);
|
|
}
|
|
|
|
-void Package::addEnhances(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addEnhances(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_ENHANCES);
|
|
}
|
|
|
|
-void Package::addObsoletes(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addObsoletes(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_OBSOLETES);
|
|
}
|
|
|
|
-void Package::addProvides(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addProvides(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_PROVIDES);
|
|
}
|
|
|
|
-void Package::addRecommends(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addRecommends(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_RECOMMENDS);
|
|
}
|
|
|
|
-void Package::addRequires(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addRequires(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_REQUIRES, 0);
|
|
}
|
|
|
|
-void Package::addRequiresPre(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addRequiresPre(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_REQUIRES, 1);
|
|
}
|
|
|
|
-void Package::addSuggests(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addSuggests(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_SUGGESTS);
|
|
}
|
|
|
|
-void Package::addSupplements(std::shared_ptr<libdnf::Dependency> dependency)
|
|
+void Package_::addSupplements(std::shared_ptr<libdnf::Dependency> dependency)
|
|
{
|
|
addDependency(std::move(dependency), SOLVABLE_SUPPLEMENTS);
|
|
}
|
|
|
|
-void Package::createSolvable(HyRepo repo)
|
|
+void Package_::createSolvable(HyRepo repo)
|
|
{
|
|
id = repo_add_solvable(repo->libsolv_repo);
|
|
}
|
|
|
|
-void Package::fillSolvableData(const char *name, const char *version,
|
|
+void Package_::fillSolvableData(const char *name, const char *version,
|
|
const char *arch) const
|
|
{
|
|
Solvable *solvable = pool_id2solvable(dnf_sack_get_pool(sack), id);
|
|
@@ -187,7 +187,7 @@
|
|
solvable_set_str(solvable, SOLVABLE_ARCH, arch);
|
|
}
|
|
|
|
-std::shared_ptr<libdnf::DependencyContainer> Package::getDependencies(Id type, Id marker) const
|
|
+std::shared_ptr<libdnf::DependencyContainer> Package_::getDependencies(Id type, Id marker) const
|
|
{
|
|
auto queue = getDependencyQueue(type, marker);
|
|
auto container = std::make_shared<libdnf::DependencyContainer>(sack, *queue);
|
|
@@ -198,7 +198,7 @@
|
|
return container;
|
|
}
|
|
|
|
-Queue *Package::getDependencyQueue(Id type, Id marker) const
|
|
+Queue *Package_::getDependencyQueue(Id type, Id marker) const
|
|
{
|
|
Queue dependencyQueue{};
|
|
auto queue = static_cast<Queue *>(malloc(sizeof(Queue)));
|
|
@@ -219,7 +219,7 @@
|
|
return queue;
|
|
}
|
|
|
|
-void Package::addDependency(std::shared_ptr<libdnf::Dependency> dependency, int type, Id marker)
|
|
+void Package_::addDependency(std::shared_ptr<libdnf::Dependency> dependency, int type, Id marker)
|
|
{
|
|
Solvable *solvable = pool_id2solvable(dnf_sack_get_pool(sack), id);
|
|
solvable_add_deparray(solvable, type, dependency->getId(), marker);
|
|
diff -ru libdnf-0.22.0/libdnf/repo/solvable/Package.hpp libdnf-0.22.0.patched/libdnf/repo/solvable/Package.hpp
|
|
--- libdnf-0.22.0/libdnf/repo/solvable/Package.hpp 2019-06-01 21:09:37.000000000 +0200
|
|
+++ libdnf-0.22.0.patched/libdnf/repo/solvable/Package.hpp 2019-06-02 11:33:12.717551563 +0200
|
|
@@ -11,12 +11,12 @@
|
|
|
|
#include "Dependency.hpp"
|
|
|
|
-struct Package
|
|
+struct Package_
|
|
{
|
|
public:
|
|
- Package(DnfSack *sack, Id id);
|
|
- Package(const Package &package);
|
|
- virtual ~Package();
|
|
+ Package_(DnfSack *sack, Id id);
|
|
+ Package_(const Package_ &package);
|
|
+ virtual ~Package_();
|
|
|
|
std::shared_ptr<libdnf::DependencyContainer> getConflicts() const;
|
|
std::shared_ptr<libdnf::DependencyContainer> getEnhances() const;
|
|
@@ -34,8 +34,8 @@
|
|
const char *getArch() const;
|
|
|
|
protected:
|
|
- Package(DnfSack *sack, HyRepo repo, const char *name, const char *version, const char *arch, bool createSolvable = true);
|
|
- Package(DnfSack *sack, HyRepo repo, const std::string &name, const std::string &version, const std::string &arch, bool createSolvable = true);
|
|
+ Package_(DnfSack *sack, HyRepo repo, const char *name, const char *version, const char *arch, bool createSolvable = true);
|
|
+ Package_(DnfSack *sack, HyRepo repo, const std::string &name, const std::string &version, const std::string &arch, bool createSolvable = true);
|
|
|
|
void addConflicts(std::shared_ptr<libdnf::Dependency> dependency);
|
|
void addEnhances(std::shared_ptr<libdnf::Dependency> dependency);
|
|
diff -ru libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.cpp libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.cpp
|
|
--- libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.cpp 2019-06-01 21:09:37.000000000 +0200
|
|
+++ libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.cpp 2019-06-02 12:17:06.988770015 +0200
|
|
@@ -5,7 +5,7 @@
|
|
const char *name,
|
|
const char *version,
|
|
const char *arch)
|
|
- : Package(sack, repo, name, version, arch)
|
|
+ : Package_(sack, repo, name, version, arch)
|
|
{
|
|
addProvides(std::make_shared<libdnf::Dependency>(sack, "rpm = 1.0"));
|
|
}
|
|
diff -ru libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.hpp libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.hpp
|
|
--- libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.hpp 2019-06-01 21:09:37.000000000 +0200
|
|
+++ libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.hpp 2019-06-02 12:16:36.165615422 +0200
|
|
@@ -3,7 +3,7 @@
|
|
|
|
#include "libdnf/repo/solvable/Package.hpp"
|
|
|
|
-class PackageInstantiable : public Package
|
|
+class PackageInstantiable : public Package_
|
|
{
|
|
public:
|
|
PackageInstantiable(DnfSack *sack, HyRepo repo, const char *name, const char *version, const char *arch);
|