From 74bcab9dfa50647dd6615f261f2c2bc9f5a38951 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 13 Feb 2016 16:30:31 +0200 Subject: Offer in pkg-build to drop prerequisite packages that are no longer necessary This can happen if a package that is being upgraded/downgraded changes its dependencies. --- tests/repository/1/satisfy/libbar-1.2.0.tar.gz | Bin 0 -> 348 bytes tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz | 1 + tests/repository/1/satisfy/t5/repositories | 1 + tests/test.sh | 28 ++++++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 tests/repository/1/satisfy/libbar-1.2.0.tar.gz create mode 120000 tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz create mode 120000 tests/repository/1/satisfy/t5/repositories (limited to 'tests') diff --git a/tests/repository/1/satisfy/libbar-1.2.0.tar.gz b/tests/repository/1/satisfy/libbar-1.2.0.tar.gz new file mode 100644 index 0000000..4572395 Binary files /dev/null and b/tests/repository/1/satisfy/libbar-1.2.0.tar.gz differ diff --git a/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz b/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz new file mode 120000 index 0000000..b4a7773 --- /dev/null +++ b/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz @@ -0,0 +1 @@ +../libbar-1.2.0.tar.gz \ No newline at end of file diff --git a/tests/repository/1/satisfy/t5/repositories b/tests/repository/1/satisfy/t5/repositories new file mode 120000 index 0000000..d965b15 --- /dev/null +++ b/tests/repository/1/satisfy/t5/repositories @@ -0,0 +1 @@ +../repositories \ No newline at end of file diff --git a/tests/test.sh b/tests/test.sh index 2dcd6f7..e4d962b 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1204,6 +1204,34 @@ test cfg-fetch test pkg-build -y libbaz stat libfoo "configured 1.1.0" +# drop prerequisites on downgrade +# +test rep-create repository/1/satisfy/t5 +test cfg-create --wipe +test cfg-add $rep/satisfy/t2 +test cfg-fetch + +test pkg-build -y libbar +stat libfoo "configured 1.0.0" +stat libbar "configured 1.0.0 hold_package" + +test cfg-add $rep/satisfy/t5 +test cfg-fetch + +test pkg-build -y libbar +stat libfoo "available 1.0.0" +stat libbar "configured 1.2.0 hold_package" + +#@@test pkg-build -y libbar/1.0.0 libfoo +test pkg-build -y libbar/1.0.0 +test pkg-build -y libfoo +stat libfoo "configured 1.0.0 hold_package" +stat libbar "configured 1.0.0 hold_package hold_version; available 1.2.0" + +test pkg-build -y libbar +stat libfoo "configured 1.0.0 hold_package" +#@@stat libbar "configured 1.2.0 hold_package" +stat libbar "configured 1.2.0 hold_package hold_version" ## ## pkg-drop -- cgit v1.1