Compare commits
No commits in common. "8d10f00a2d60728971b78c477a3478e50114ce0c" and "c6688ea8506e1e725b412df6265d9490c3c78d2e" have entirely different histories.
8d10f00a2d
...
c6688ea850
BIN
0.7.22.tar.gz
BIN
0.7.22.tar.gz
Binary file not shown.
@ -1,29 +0,0 @@
|
||||
From 9a361f5248557e032f15890aac54c0db53c52098 Mon Sep 17 00:00:00 2001
|
||||
From: banjiuqingshan <63209634+banjiuqingshan@users.noreply.github.com>
|
||||
Date: Sun, 19 Jun 2022 01:43:51 +0800
|
||||
Subject: [PATCH] Fix memory leak when using testsolv to execute cases
|
||||
|
||||
*resultp will only keep the pointer of the last cycle, which will lead to memory leakage.
|
||||
This solves the first memory leak problem in issue #496 "==255147==error..."
|
||||
---
|
||||
ext/testcase.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/ext/testcase.c b/ext/testcase.c
|
||||
index 035cfdbd..c529057a 100644
|
||||
--- a/ext/testcase.c
|
||||
+++ b/ext/testcase.c
|
||||
@@ -2448,7 +2448,10 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res
|
||||
}
|
||||
}
|
||||
if (resultp)
|
||||
+ {
|
||||
+ solv_free(*resultp);
|
||||
*resultp = result;
|
||||
+ }
|
||||
else
|
||||
solv_free(result);
|
||||
if (resultflagsp)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 47734e26d67ad236a29c160ff224fcb1910e3a6f Mon Sep 17 00:00:00 2001
|
||||
From: Michael Schroeder <mls@suse.de>
|
||||
Date: Tue, 18 Apr 2023 12:36:40 +0200
|
||||
Subject: [PATCH] Add testcase for last commit
|
||||
|
||||
---
|
||||
test/testcases/cplxdeps/ifelse_rec.t | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
create mode 100644 test/testcases/cplxdeps/ifelse_rec.t
|
||||
|
||||
diff --git a/test/testcases/cplxdeps/ifelse_rec.t b/test/testcases/cplxdeps/ifelse_rec.t
|
||||
new file mode 100644
|
||||
index 000000000..ea467027c
|
||||
--- /dev/null
|
||||
+++ b/test/testcases/cplxdeps/ifelse_rec.t
|
||||
@@ -0,0 +1,10 @@
|
||||
+repo appstream 0 testtags <inline>
|
||||
+#>=Pkg: xorg-x11-server-Xorg 1.20.11 18.el9 noarch
|
||||
+#>=Req: missing-req
|
||||
+#>=Pkg: pass 1.7.4 6.el9 noarch
|
||||
+#>=Rec: xclip <IF> (xorg-x11-server-Xorg <ELSE> wl-clipboard)
|
||||
+repo @System 0 empty
|
||||
+system unset * @System
|
||||
+job install pkg pass-1.7.4-6.el9.noarch@appstream
|
||||
+result transaction,problems <inline>
|
||||
+#>install pass-1.7.4-6.el9.noarch@appstream
|
||||
@ -1,27 +0,0 @@
|
||||
From 1edb35a3bd9abcede3a200471a4d1868f8054c99 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Schroeder <mls@suse.de>
|
||||
Date: Tue, 18 Apr 2023 11:57:50 +0200
|
||||
Subject: [PATCH] Treat condition both as positive and negative literal in
|
||||
pool_add_pos_literals_complex_dep
|
||||
|
||||
That's because (A IF B ELSE C) gets rewritten to (A OR ~B) AND (C OR B) and
|
||||
(A UNLESS B ELSE C) gets rewritten to (A AND ~B) OR (C AND B). In both
|
||||
cases we have A, B, ~B, C.
|
||||
|
||||
This resolves issue #527
|
||||
---
|
||||
src/cplxdeps.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/cplxdeps.c b/src/cplxdeps.c
|
||||
index 6c40752e2..26e754d95 100644
|
||||
--- a/src/cplxdeps.c
|
||||
+++ b/src/cplxdeps.c
|
||||
@@ -405,6 +405,7 @@ pool_add_pos_literals_complex_dep(Pool *pool, Id dep, Queue *q, Map *m, int neg)
|
||||
Reldep *rd2 = GETRELDEP(pool, rd->evr);
|
||||
if (rd2->flags == REL_ELSE)
|
||||
{
|
||||
+ pool_add_pos_literals_complex_dep(pool, rd2->name, q, m, !neg);
|
||||
pool_add_pos_literals_complex_dep(pool, rd2->evr, q, m, !neg);
|
||||
dep = rd2->name;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
From 2c85ed581422e072ad95119f3d7dc19eb45f29ac Mon Sep 17 00:00:00 2001
|
||||
From: Michael Schroeder <mls@suse.de>
|
||||
Date: Fri, 19 May 2023 15:17:53 +0200
|
||||
Subject: [PATCH] choice rules: also do solver_choicerulecheck for package
|
||||
downgrades
|
||||
|
||||
Fixes issue #514
|
||||
---
|
||||
src/rules.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/rules.c b/src/rules.c
|
||||
index 660656f01..7d57cfdee 100644
|
||||
--- a/src/rules.c
|
||||
+++ b/src/rules.c
|
||||
@@ -3449,6 +3449,7 @@ solver_addchoicerules(Solver *solv)
|
||||
int lastaddedcnt;
|
||||
unsigned int now;
|
||||
int isinstalled;
|
||||
+ int dodowngradecheck = solv->allowdowngrade;
|
||||
|
||||
solv->choicerules = solv->nrules;
|
||||
if (!pool->installed)
|
||||
@@ -3457,6 +3458,8 @@ solver_addchoicerules(Solver *solv)
|
||||
return;
|
||||
}
|
||||
now = solv_timems(0);
|
||||
+ if ((solv->dupinvolvedmap_all || solv->dupinvolvedmap.size) && solv->dup_allowdowngrade)
|
||||
+ dodowngradecheck = 1;
|
||||
queue_init(&q);
|
||||
queue_init(&qi);
|
||||
queue_init(&qcheck);
|
||||
@@ -3532,8 +3535,16 @@ solver_addchoicerules(Solver *solv)
|
||||
/* do extra checking for packages related to installed packages */
|
||||
for (i = j = 0; i < qi.count; i += 2)
|
||||
{
|
||||
+ int isdowngrade = 0;
|
||||
p2 = qi.elements[i];
|
||||
- if (solv->updatemap_all || (solv->updatemap.size && MAPTST(&solv->updatemap, p2 - solv->installed->start)))
|
||||
+ if (dodowngradecheck)
|
||||
+ {
|
||||
+ p = qi.elements[i + 1];
|
||||
+ if (pool->solvables[p2].name == pool->solvables[p].name)
|
||||
+ if (pool_evrcmp(pool, pool->solvables[p2].evr, pool->solvables[p].evr, EVRCMP_COMPARE) > 0)
|
||||
+ isdowngrade = 1;
|
||||
+ }
|
||||
+ if (isdowngrade || solv->updatemap_all || (solv->updatemap.size && MAPTST(&solv->updatemap, p2 - solv->installed->start)))
|
||||
{
|
||||
if (solver_choicerulecheck(solv, p2, r, &m, &qcheck))
|
||||
continue;
|
||||
BIN
libsolv-0.7.17.tar.gz
Normal file
BIN
libsolv-0.7.17.tar.gz
Normal file
Binary file not shown.
117
libsolv.spec
117
libsolv.spec
@ -11,29 +11,20 @@
|
||||
%bcond_without multi_semantics
|
||||
%bcond_with zchunk
|
||||
%bcond_without zstd
|
||||
%bcond_without conda
|
||||
|
||||
Name: libsolv
|
||||
Version: 0.7.22
|
||||
Release: 2
|
||||
Version: 0.7.17
|
||||
Release: 1
|
||||
Summary: Package dependency solver
|
||||
License: BSD
|
||||
URL: https://github.com/openSUSE/libsolv
|
||||
Source: https://github.com/openSUSE/libsolv/archive/refs/tags/%{version}.tar.gz
|
||||
|
||||
Patch0: Fix-memory-leak-when-using-testsolv-to-execute-cases.patch
|
||||
Patch6001: backport-Treat-condition-both-as-positive-and-negative-literal-in-pool_add_pos_literals_complex_dep.patch
|
||||
Patch6002: backport-Add-testcase-for-last-commit.patch
|
||||
Patch6003: backport-choice-rules-also-do-solver_choicerulecheck-for-package-downgrades.patch
|
||||
|
||||
Source: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
BuildRequires: cmake gcc-c++ ninja-build pkgconfig(rpm) zlib-devel
|
||||
BuildRequires: libxml2-devel xz-devel bzip2-devel
|
||||
%if %{with zstd}
|
||||
BuildRequires: libzstd-devel
|
||||
%endif
|
||||
%if %{with zchunk}
|
||||
BuildRequires: pkgconfig(zck)
|
||||
%endif
|
||||
BuildRequires: libxml2-devel xz-devel bzip2-devel libzstd-devel
|
||||
Requires: %{_bindir}/find %{_bindir}/curl %{_bindir}/gpg2
|
||||
Provides: libsolv-tools libsolv-demo
|
||||
Obsoletes: libsolv-tools < %{version}-%{release}
|
||||
Obsoletes: libsolv-demo < %{version}-%{release}
|
||||
|
||||
Requires: rpm
|
||||
|
||||
@ -54,23 +45,6 @@ Requires: %{name} = %{version}-%{release} rpm-devel
|
||||
%description devel
|
||||
Development files for %{name}.
|
||||
|
||||
%package tools
|
||||
Summary: Package dependency solver tools
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: /usr/bin/find
|
||||
|
||||
%description tools
|
||||
Package dependency solver tools.
|
||||
|
||||
%package demo
|
||||
Summary: Applications demoing the %{name} library
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: /usr/bin/curl
|
||||
Requires: /usr/bin/gpg2
|
||||
|
||||
%description demo
|
||||
Applications demoing the %{name} library.
|
||||
|
||||
%package -n perl-solv
|
||||
Summary: Perl bindings for the %{name} library
|
||||
BuildRequires: swig perl-devel perl-generators
|
||||
@ -127,7 +101,6 @@ Python 3 version.
|
||||
%{?with_arch_repo:-DENABLE_ARCHREPO=ON} \
|
||||
%{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \
|
||||
%{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \
|
||||
%{?with_conda:-DENABLE_CONDA=ON} \
|
||||
%{?with_perl_bindings:-DENABLE_PERL=ON} \
|
||||
%{?with_ruby_bindings:-DENABLE_RUBY=ON} \
|
||||
%if %{with python3_bindings}
|
||||
@ -154,6 +127,10 @@ Python 3 version.
|
||||
%license LICENSE*
|
||||
%{_libdir}/%{name}.so.*
|
||||
%{_libdir}/%{name}ext.so.*
|
||||
%{_bindir}/{solv,dumpsolv,installcheck,mergesolv,rpmdb2solv}
|
||||
%{_bindir}/{rpms2solv,testsolv,repo2solv,comps2solv,appdata2solv,deb2solv}
|
||||
%{_bindir}/{archpkgs2solv,archrepo2solv,helix2solv,repomdxml2solv}
|
||||
%{_bindir}/{deltainfoxml2solv,updateinfoxml2solv,rpmmd2solv,susetags2solv}
|
||||
|
||||
%files devel
|
||||
%{_libdir}/%{name}.so
|
||||
@ -164,44 +141,6 @@ Python 3 version.
|
||||
%dir %{_datadir}/cmake/Modules/
|
||||
%{_datadir}/cmake/Modules/FindLibSolv.cmake
|
||||
|
||||
%files tools
|
||||
%{_bindir}/deltainfoxml2solv
|
||||
%{_bindir}/dumpsolv
|
||||
%{_bindir}/installcheck
|
||||
%{_bindir}/mergesolv
|
||||
%{_bindir}/repomdxml2solv
|
||||
%{_bindir}/rpmdb2solv
|
||||
%{_bindir}/rpmmd2solv
|
||||
%{_bindir}/rpms2solv
|
||||
%{_bindir}/testsolv
|
||||
%{_bindir}/updateinfoxml2solv
|
||||
%{_bindir}/repo2solv
|
||||
%if %{with comps}
|
||||
%{_bindir}/comps2solv
|
||||
%endif
|
||||
%if %{with appdata}
|
||||
%{_bindir}/appdata2solv
|
||||
%endif
|
||||
%if %{with debian_repo}
|
||||
%{_bindir}/deb2solv
|
||||
%endif
|
||||
%if %{with arch_repo}
|
||||
%{_bindir}/archpkgs2solv
|
||||
%{_bindir}/archrepo2solv
|
||||
%endif
|
||||
%if %{with helix_repo}
|
||||
%{_bindir}/helix2solv
|
||||
%endif
|
||||
%if %{with suse_repo}
|
||||
%{_bindir}/susetags2solv
|
||||
%endif
|
||||
%if %{with conda}
|
||||
%{_bindir}/conda2solv
|
||||
%endif
|
||||
|
||||
%files demo
|
||||
%{_bindir}/solv
|
||||
|
||||
%files -n perl-solv
|
||||
%{perl_vendorarch}/solv.pm
|
||||
%{perl_vendorarch}/solv.so
|
||||
@ -210,7 +149,9 @@ Python 3 version.
|
||||
%{ruby_vendorarchdir}/solv.so
|
||||
|
||||
%files -n python3-solv
|
||||
%{python3_sitearch}/*
|
||||
%{python3_sitearch}/_solv.so
|
||||
%{python3_sitearch}/solv.py
|
||||
%{python3_sitearch}/__pycache__/solv.*
|
||||
|
||||
%files help
|
||||
%doc README
|
||||
@ -218,34 +159,6 @@ Python 3 version.
|
||||
%{_mandir}/man3/%{name}*.3*
|
||||
|
||||
%changelog
|
||||
* Sat Aug 19 2023 hanhuihui<hanhuihui5@huawei.com> - 0.7.22-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix requirement error
|
||||
|
||||
* Tue Nov 8 2022 hanhuihui<hanhuihui5@huawei.com> - 0.7.22-1
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update libsolv to 0.7.22-1
|
||||
|
||||
* Fri Oct 21 2022 hanhuihui<hanhuihui5@huawei.com> - 0.7.20-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:ensure-duplinvolvedmap_all-is-reset.patch
|
||||
|
||||
* Tue Oct 11 2022 zhangjun<zhangjun@kylinos.cn> - 0.7.20-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:Fix memory leak when using testsolv to execute cases
|
||||
Fix segfault on conflict resolution when using bindings
|
||||
|
||||
* Sat Dec 25 2021 wangkerong<wangkerong@huawei.com> - 0.7.20-1
|
||||
- update to 0.7.20
|
||||
|
||||
* Sat Jan 30 2021 xihaochen <xihaochen@huawei.com> - 0.7.17-1
|
||||
- Type:requirements
|
||||
- Id:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user