Commit e725fd69 authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra Committed by Lorenzo "Palinuro" Faletra

Import Debian version 2.1.1+parrot1

apt (2.1.1+parrot1) rolling; urgency=medium

  * Import new Debian release.

apt (2.1.1) unstable; urgency=medium

  [ David Kalnischkies ]
  * Allow aptitude to MarkInstall broken packages via FromUser
  * Drop nowrap from po4a --porefs as it is no longer supported
  * Use "po4a --porefs file" instead of undocumented compat noline

  [ Artur Grącki ]
  * Fix typo in Polish translation of --help messages

apt (2.1.0) unstable; urgency=medium

  [ Frans Spiesschaert ]
  * Dutch manpages translation update (Closes: #956313)

  [ David Kalnischkies ]
  * Refactor MarkInstall fixing various or-group handling issues
    - Discard impossible candidate versions also for non-installed
    - Explore or-groups for Recommends further than first
    - Refactor and reorder MarkInstall code
    - Discard candidate if its dependencies can't be satisfied
    - Split up MarkInstall into private helper methods
    - Fail earlier on impossible Conflicts in MarkInstall
    - Propagate Protected flag to single-option dependencies
    - Prefer upgrading installed orgroup members
    - Protect a package while resolving in MarkInstall

  [ Julian Andres Klode ]
  * Reinstate * wildcards (Closes: #953531) (LP: #1872200)
  * apt list: Fix behavior of regex vs fnmatch vs wildcards
parent 562813b0
Pipeline #510 failed with stages
in 56 minutes and 25 seconds
......@@ -318,7 +318,7 @@ function(add_update_po4a target pot header)
add_custom_target(${target}
COMMAND po4a --previous --no-backups --force --no-translations
--msgmerge-opt --add-location=file
--porefs noline,wrap
--porefs file
--package-name=${PROJECT_NAME}-doc --package-version=${PACKAGE_VERSION}
--msgid-bugs-address=${PACKAGE_MAIL} po4a.conf
${WRITE_HEADER}
......
......@@ -204,7 +204,7 @@ check_cxx_target(HAVE_FMV_SSE42_AND_CRC32DI "sse4.2" "__builtin_ia32_crc32di(0,
# Configure some variables like package, version and architecture.
set(PACKAGE ${PROJECT_NAME})
set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>")
set(PACKAGE_VERSION "2.0.2")
set(PACKAGE_VERSION "2.1.1")
string(REGEX MATCH "^[0-9.]+" PROJECT_VERSION ${PACKAGE_VERSION})
if (NOT DEFINED DPKG_DATADIR)
......
......@@ -189,8 +189,11 @@ bool CacheSetHelper::PackageFromFnmatch(PackageContainerInterface * const pci,
pkgCacheFile &Cache, std::string pattern)
{
static const char * const isfnmatch = ".?*[]!";
if (_config->FindB("APT::Cmd::Pattern-Only", false))
return false;
// Whitelist approach: Anything not in here is not a valid pattern
static const char *const isfnmatch_strict = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.:*";
if (_config->FindB("APT::Cmd::Pattern-Only", false) && pattern.find_first_not_of(isfnmatch_strict) != std::string::npos)
return false;
if (pattern.find_first_of(isfnmatch) == std::string::npos)
return false;
......
This diff is collapsed.
......@@ -51,6 +51,12 @@
class OpProgress;
class pkgVersioningSystem;
namespace APT
{
template <class Container>
class PackageContainer;
using PackageVector = PackageContainer<std::vector<pkgCache::PkgIterator>>;
} // namespace APT
class APT_PUBLIC pkgDepCache : protected pkgCache::Namespace
{
......@@ -511,6 +517,12 @@ class APT_PUBLIC pkgDepCache : protected pkgCache::Namespace
APT_HIDDEN bool IsModeChangeOk(ModeList const mode, PkgIterator const &Pkg,
unsigned long const Depth, bool const FromUser);
APT_HIDDEN bool MarkInstall_StateChange(PkgIterator const &Pkg, bool AutoInst, bool FromUser);
APT_HIDDEN bool MarkInstall_CollectDependencies(pkgCache::VerIterator const &PV, std::vector<pkgCache::DepIterator> &toInstall, std::vector<pkgCache::DepIterator> &toRemove);
APT_HIDDEN bool MarkInstall_RemoveConflictsIfNotUpgradeable(pkgCache::VerIterator const &PV, unsigned long Depth, std::vector<pkgCache::DepIterator> &toRemove, APT::PackageVector &toUpgrade);
APT_HIDDEN bool MarkInstall_UpgradeOrRemoveConflicts(bool const propagateProtected, unsigned long Depth, bool const ForceImportantDeps, APT::PackageVector &toUpgrade);
APT_HIDDEN bool MarkInstall_InstallDependencies(PkgIterator const &Pkg, unsigned long Depth, bool const ForceImportantDeps, std::vector<pkgCache::DepIterator> &toInstall, APT::PackageVector *const toMoveAuto, bool const propagateProtected, bool const FromUser);
};
#endif
......@@ -99,7 +99,7 @@ template <typename T> class map_pointer {
uint32_t val;
public:
map_pointer() noexcept : val(0) {}
map_pointer(nullptr_t) noexcept : val(0) {}
map_pointer(std::nullptr_t) noexcept : val(0) {}
explicit map_pointer(uint32_t n) noexcept : val(n) {}
explicit operator uint32_t() noexcept { return val; }
explicit operator bool() noexcept { return val != 0; }
......@@ -111,8 +111,8 @@ template<typename T> inline bool operator !=(map_pointer<T> u, map_pointer<T> m)
template<typename T> inline bool operator <(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) < uint32_t(m); }
template<typename T> inline bool operator >(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) > uint32_t(m); }
template<typename T> inline uint32_t operator -(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) - uint32_t(m); }
template<typename T> bool operator ==(map_pointer<T> m, nullptr_t) { return uint32_t(m) == 0; }
template<typename T> bool operator !=(map_pointer<T> m, nullptr_t) { return uint32_t(m) != 0; }
template<typename T> bool operator ==(map_pointer<T> m, std::nullptr_t) { return uint32_t(m) == 0; }
template<typename T> bool operator !=(map_pointer<T> m, std::nullptr_t) { return uint32_t(m) != 0; }
// same as the previous, but documented to be to a string item
typedef map_pointer<char> map_stringitem_t;
......
......@@ -298,9 +298,9 @@ APT_PURE signed short pkgPolicy::GetPriority(pkgCache::VerIterator const &Ver, b
out bogus entries that may be due to config-file states, or
other. */
if (file.File().Flagged(pkgCache::Flag::NotSource) && Ver.ParentPkg().CurrentVer() != Ver)
priority = std::max(priority, static_cast<decltype(priority)>(-1));
priority = std::max<decltype(priority)>(priority, -1);
else
priority = std::max(priority, static_cast<decltype(priority)>(GetPriority(file.File())));
priority = std::max<decltype(priority)>(priority, GetPriority(file.File()));
}
return priority == std::numeric_limits<decltype(priority)>::min() ? 0 : priority;
......
......@@ -39,6 +39,7 @@ struct PackageSortAlphabetic /*{{{*/
class PackageNameMatcher : public Matcher
{
static constexpr const char *const isfnmatch_strict = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.:*";
pkgCacheFile &cacheFile;
public:
explicit PackageNameMatcher(pkgCacheFile &cacheFile, const char **patterns)
......@@ -48,12 +49,12 @@ class PackageNameMatcher : public Matcher
{
std::string pattern = patterns[i];
APT::CacheFilter::Matcher *cachefilter = NULL;
if (pattern.size() > 0 && (pattern[0] == '?' || pattern[0] == '~'))
cachefilter = APT::CacheFilter::ParsePattern(pattern, &cacheFile).release();
else if(_config->FindB("APT::Cmd::Use-Regexp", false) == true)
if(_config->FindB("APT::Cmd::Use-Regexp", false) == true)
cachefilter = new APT::CacheFilter::PackageNameMatchesRegEx(pattern);
else
else if (pattern.find_first_not_of(isfnmatch_strict) == std::string::npos)
cachefilter = new APT::CacheFilter::PackageNameMatchesFnmatch(pattern);
else
cachefilter = APT::CacheFilter::ParsePattern(pattern, &cacheFile).release();
if (cachefilter == nullptr) {
return;
......
apt (2.1.1+parrot1) rolling; urgency=medium
* Import new Debian release.
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Thu, 14 May 2020 19:11:03 +0200
apt (2.1.1) unstable; urgency=medium
[ David Kalnischkies ]
* Allow aptitude to MarkInstall broken packages via FromUser
* Drop nowrap from po4a --porefs as it is no longer supported
* Use "po4a --porefs file" instead of undocumented compat noline
[ Artur Grącki ]
* Fix typo in Polish translation of --help messages
-- Julian Andres Klode <jak@debian.org> Fri, 08 May 2020 18:02:53 +0200
apt (2.1.0) unstable; urgency=medium
[ Frans Spiesschaert ]
* Dutch manpages translation update (Closes: #956313)
[ David Kalnischkies ]
* Refactor MarkInstall fixing various or-group handling issues
- Discard impossible candidate versions also for non-installed
- Explore or-groups for Recommends further than first
- Refactor and reorder MarkInstall code
- Discard candidate if its dependencies can't be satisfied
- Split up MarkInstall into private helper methods
- Fail earlier on impossible Conflicts in MarkInstall
- Propagate Protected flag to single-option dependencies
- Prefer upgrading installed orgroup members
- Protect a package while resolving in MarkInstall
[ Julian Andres Klode ]
* Reinstate * wildcards (Closes: #953531) (LP: #1872200)
* apt list: Fix behavior of regex vs fnmatch vs wildcards
-- Julian Andres Klode <jak@debian.org> Mon, 04 May 2020 15:58:24 +0200
apt (2.0.2+parrot1) rolling-testing; urgency=medium
* Import new Debian version.
......
......@@ -274,7 +274,7 @@
">
<!-- this will be updated by 'prepare-release' -->
<!ENTITY apt-product-version "2.0.2">
<!ENTITY apt-product-version "2.1.1">
<!-- (Code)names for various things used all over the place -->
<!ENTITY debian-oldstable-codename "stretch">
......
......@@ -5,9 +5,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: apt-doc 2.0.2\n"
"Project-Id-Version: apt-doc 2.1.1\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2020-04-09 12:21+0200\n"
"POT-Creation-Date: 2020-05-08 18:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -496,18 +496,12 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refmeta><manvolnum>
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml
#: apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml
msgid "8"
msgstr ""
#. type: Content of: <refentry><refmeta><refmiscinfo>
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml
#: apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml apt.conf.5.xml
#: apt_preferences.5.xml sources.list.5.xml apt-extracttemplates.1.xml
#: apt-sortpkgs.1.xml apt-ftparchive.1.xml apt_auth.conf.5.xml
#: apt-transport-http.1.xml apt-transport-https.1.xml
#: apt-transport-mirror.1.xml apt-patterns.7.xml
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml apt.conf.5.xml apt_preferences.5.xml sources.list.5.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml apt_auth.conf.5.xml apt-transport-http.1.xml apt-transport-https.1.xml apt-transport-mirror.1.xml apt-patterns.7.xml
msgid "APT"
msgstr ""
......@@ -517,12 +511,7 @@ msgid "command-line interface"
msgstr ""
#. type: Content of: <refentry><refsect1><title>
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml
#: apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml apt.conf.5.xml
#: apt_preferences.5.xml sources.list.5.xml apt-extracttemplates.1.xml
#: apt-sortpkgs.1.xml apt-ftparchive.1.xml apt_auth.conf.5.xml
#: apt-transport-http.1.xml apt-transport-https.1.xml
#: apt-transport-mirror.1.xml apt-patterns.7.xml
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml apt.conf.5.xml apt_preferences.5.xml sources.list.5.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml apt_auth.conf.5.xml apt-transport-http.1.xml apt-transport-https.1.xml apt-transport-mirror.1.xml apt-patterns.7.xml
msgid "Description"
msgstr ""
......@@ -722,11 +711,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><title>
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml
#: apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml apt.conf.5.xml
#: apt_preferences.5.xml sources.list.5.xml apt-extracttemplates.1.xml
#: apt-sortpkgs.1.xml apt-ftparchive.1.xml apt_auth.conf.5.xml
#: apt-transport-http.1.xml apt-transport-https.1.xml apt-patterns.7.xml
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt-secure.8.xml apt-cdrom.8.xml apt-config.8.xml apt.conf.5.xml apt_preferences.5.xml sources.list.5.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml apt_auth.conf.5.xml apt-transport-http.1.xml apt-transport-https.1.xml apt-patterns.7.xml
msgid "See Also"
msgstr ""
......@@ -738,9 +723,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><title>
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-mark.8.xml apt-cdrom.8.xml
#: apt-config.8.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml
#: apt-ftparchive.1.xml
#: apt.8.xml apt-get.8.xml apt-cache.8.xml apt-mark.8.xml apt-cdrom.8.xml apt-config.8.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml
msgid "Diagnostics"
msgstr ""
......@@ -766,8 +749,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><para>
#: apt-get.8.xml apt-cache.8.xml apt-cdrom.8.xml apt-config.8.xml
#: apt-ftparchive.1.xml
#: apt-get.8.xml apt-cache.8.xml apt-cdrom.8.xml apt-config.8.xml apt-ftparchive.1.xml
msgid ""
"Unless the <option>-h</option>, or <option>--help</option> option is given, "
"one of the commands below must be present."
......@@ -1103,8 +1085,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><title>
#: apt-get.8.xml apt-cache.8.xml apt-config.8.xml apt-extracttemplates.1.xml
#: apt-sortpkgs.1.xml apt-ftparchive.1.xml
#: apt-get.8.xml apt-cache.8.xml apt-config.8.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml
msgid "options"
msgstr ""
......@@ -1526,8 +1507,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><title>
#: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml
#: apt_preferences.5.xml apt_auth.conf.5.xml
#: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml apt_preferences.5.xml apt_auth.conf.5.xml
msgid "Files"
msgstr ""
......@@ -2158,8 +2138,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><title>
#: apt-key.8.xml apt-mark.8.xml apt-cdrom.8.xml apt-transport-http.1.xml
#: apt-transport-https.1.xml apt-transport-mirror.1.xml
#: apt-key.8.xml apt-mark.8.xml apt-cdrom.8.xml apt-transport-http.1.xml apt-transport-https.1.xml apt-transport-mirror.1.xml
msgid "Options"
msgstr ""
......@@ -2822,8 +2801,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><para>
#: apt-config.8.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml
#: apt-ftparchive.1.xml
#: apt-config.8.xml apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml
msgid "&apt-conf;"
msgstr ""
......@@ -4266,9 +4244,7 @@ msgid ""
msgstr ""
#. type: Content of: <refentry><refsect1><title>
#: apt.conf.5.xml apt_preferences.5.xml sources.list.5.xml apt-ftparchive.1.xml
#: apt-transport-http.1.xml apt-transport-https.1.xml
#: apt-transport-mirror.1.xml apt-patterns.7.xml
#: apt.conf.5.xml apt_preferences.5.xml sources.list.5.xml apt-ftparchive.1.xml apt-transport-http.1.xml apt-transport-https.1.xml apt-transport-mirror.1.xml apt-patterns.7.xml
msgid "Examples"
msgstr ""
......@@ -6188,9 +6164,7 @@ msgid "&apt-get;, &apt-conf;, &apt-acquire-additional-files;"
msgstr ""
#. type: Content of: <refentry><refmeta><manvolnum>
#: apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml
#: apt-transport-http.1.xml apt-transport-https.1.xml
#: apt-transport-mirror.1.xml
#: apt-extracttemplates.1.xml apt-sortpkgs.1.xml apt-ftparchive.1.xml apt-transport-http.1.xml apt-transport-https.1.xml apt-transport-mirror.1.xml
msgid "1"
msgstr ""
......
This diff is collapsed.
This diff is collapsed.
......@@ -372,7 +372,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req)
// as well as http to https
else if ((Uri.Access == "http" || Uri.Access == "https+http") && tmpURI.Access == "https")
return TRY_AGAIN_OR_REDIRECT;
// allow https to http redirects (for https mirrordirectors with http mirrors)
// allow https to http redirects (for https mirrordirectors with http mirrors)
else if ((Uri.Access == "https" || Uri.Access == "https+http") && tmpURI.Access == "http")
return TRY_AGAIN_OR_REDIRECT;
else
......
......@@ -5,9 +5,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: apt 2.0.2\n"
"Project-Id-Version: apt 2.1.1\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2020-04-09 12:21+0200\n"
"POT-Creation-Date: 2020-05-08 18:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -1779,12 +1779,12 @@ msgstr "Uwaga, wybieranie \"%s\" zamiast \"%s\"\n"
#: apt-private/private-cmndline.cc
msgid "Most used commands:"
msgstr ""
msgstr "Najczęściej używane polecenia"
#: apt-private/private-cmndline.cc
#, c-format
msgid "See %s for more information about the available commands."
msgstr ""
msgstr "Po więcej informacji o dostępnych poleceniach zobacz %s"
#: apt-private/private-cmndline.cc
msgid ""
......@@ -2888,7 +2888,7 @@ msgstr "Pobiera pakiet binarny do bieżącego katalogu"
#: cmdline/apt-get.cc
msgid "Download and display the changelog for the given package"
msgstr "Pobiera i wyświetla dziennika zmian wybranych pakietów"
msgstr "Pobiera i wyświetla dziennik zmian wybranych pakietów"
#: cmdline/apt-helper.cc
msgid "Need one URL as argument"
......
......@@ -116,42 +116,18 @@ Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following packages will be REMOVED:
bar
The following NEW packages will be installed:
baz
The following packages will be upgraded:
foo
1 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Remv bar [1]
Inst foo [1] (2 versioned [amd64])
Inst baz (2 versioned [amd64])
Conf foo (2 versioned [amd64])
Conf baz (2 versioned [amd64])' aptget install baz -st versioned
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
baz
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Inst baz (2 unversioned [amd64])
Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following packages will be REMOVED:
bar
foo
The following NEW packages will be installed:
baz
The following packages will be upgraded:
foo
bar
1 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Remv bar [1]
Inst foo [1] (2 versioned [amd64])
Remv foo [1]
Inst bar [1] (2 versioned [amd64])
Inst baz (2 versioned [amd64])
Conf foo (2 versioned [amd64])
Conf bar (2 versioned [amd64])
Conf baz (2 versioned [amd64])' aptget install baz -st versioned
# recreating the exact situation is hard, so we pull tricks to get the score
......
......@@ -27,7 +27,7 @@ testsuccess aptcache show nosection
testfailure grep 'Section' rootdir/tmp/testsuccess.output
testequal 'dpkg' aptmark showmanual
testsuccess aptget install mydesktop -y -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1
testsuccess aptget install mydesktop -y -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1
testmarkedmanual 'dpkg' 'mydesktop'
testmarkedauto 'mydesktop-core' 'foreignpkg:i386' 'texteditor' 'browser' 'nosection'
......@@ -75,12 +75,7 @@ testsuccess aptmark auto nosection
testmarkedauto 'browser' 'nosection'
testmarkedmanual 'dpkg' 'foreignpkg:i386'
# nosection should be auto, not manual, but is marked as such by the resolver
# removing mydesktop-core temporally… the resolver should be figuring out here
# that there is no point of removing mydesktop-core as its an unavoidable
# dependency of the user-requested mydesktop
testsuccess aptget install mydesktop -y -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1
testmarkedmanual 'dpkg' 'foreignpkg:i386' 'mydesktop' 'nosection'
testmarkedauto 'browser' 'mydesktop-core' 'texteditor'
testmarkedmanual 'dpkg' 'foreignpkg:i386' 'mydesktop'
testmarkedauto 'browser' 'mydesktop-core' 'texteditor' 'nosection'
......@@ -233,3 +233,37 @@ testsuccessequal "Listing..." apt list '?x-name-fnmatch(1)'
testsuccessequal "Listing...
automatic1/now 1.0 i386 [installed,local]
manual1/now 1.0 i386 [installed,local]" apt list '?x-name-fnmatch(*1)'
# * wildcards should still work
testsuccessequal "Listing...
automatic1/now 1.0 i386 [installed,local]
automatic2/now 1.0 i386 [installed,local]" apt list 'automatic*'
testfailureequal "Reading package lists...
Building dependency tree...
Reading state information...
Note, selecting 'automatic1' for glob 'automatic*'
Note, selecting 'automatic2' for glob 'automatic*'
automatic1 is already the newest version (1.0).
automatic1 set to manually installed.
automatic2 is already the newest version (1.0).
automatic2 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
broken : Depends: does-not-exist but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)." apt install -s 'automatic*'
# other wildcards should fail
testfailureequal "Listing...
E: input:0-10: error: Expected pattern
automatic?
^^^^^^^^^^" apt list 'automatic?'
testfailureequal "Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package automatic?" apt install -s 'automatic?'
......@@ -88,12 +88,13 @@ rm -f rootdir/var/lib/apt/extended_states
CONFLICTING='Reading package lists...
Building dependency tree...
MarkInstall dummy-archive:i386 < none -> 0.invalid.0 @un puN Ib > FU=1
MarkInstall libavcodec52:i386 < none -> 4:0.5.2-6 @un uN > FU=0
MarkInstall libvtk5-dev:i386 < none -> 5.4.2-8 @un uN Ib > FU=0
MarkInstall libvtk5.4:i386 < none -> 5.4.2-8 @un uN > FU=0
MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0
MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0
Ignore MarkGarbage of libavcodec52:i386 < none -> 4:0.5.2-6 @un puN > as its mode (Install) is protected
MarkDelete libvtk5.4:i386 < none -> 5.4.2-8 @un ugN > FU=0
Ignore MarkGarbage of libavcodec52:i386 < none -> 4:0.5.2-6 @un puN > as its mode (Install) is protected
The following additional packages will be installed:
libavcodec52 libopenal-dev
The following NEW packages will be installed:
......
......@@ -18,8 +18,6 @@ Building dependency tree...
MarkDelete libdb4.8:i386 < 1.0 @ii pmK > FU=1
MarkDelete exim4-daemon-light:i386 < 1.0 @ii mK Ib > FU=0
MarkInstall exim4-daemon-heavy:i386 < none -> 1.0 @un uN Ib > FU=0
Ignore MarkInstall of libdb4.8:i386 < 1.0 @ii pmR > as its mode (Delete) is protected
MarkDelete exim4-daemon-heavy:i386 < none -> 1.0 @un uN Ib > FU=0
MarkDelete exim4:i386 < 1.0 @ii mK Ib > FU=0
The following packages will be REMOVED:
exim4 exim4-daemon-light libdb4.8
......
......@@ -52,8 +52,8 @@ or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
foo : Depends: libfoo but it is not going to be installed
E: Unable to correct problems, you have held broken packages.' aptget install foo -s
libfoo : Depends: libfoo-bin but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.' aptget install foo -s
# activate multiarch
configarchitecture 'amd64' 'i386'
......
#!/bin/sh
set -e
TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
insertpackage 'unstable' 'okay' 'all' '1'
insertpackage 'unstable' 'upgrade' 'all' '2'
insertpackage 'unstable' 'unneeded' 'all' '1'
insertpackage 'unstable' 'later' 'all' '1'
insertpackage 'unstable' 'bad-level0' 'all' '1' 'Depends: unneeded, unknown'
insertpackage 'unstable' 'bad-level1' 'all' '1' 'Depends: bad-level0'
insertpackage 'unstable' 'bad-upgrade-level0' 'all' '2' 'Depends: unneeded, unknown'
insertpackage 'unstable' 'bad-upgrade-level1' 'all' '2' 'Depends: bad-upgrade-level0 (>= 2)'
insertpackage 'unstable' 'bad-conflict-level0' 'all' '1' 'Depends: unneeded
Conflicts: bad-conflict-level2'
insertpackage 'unstable' 'bad-conflict-level1' 'all' '1' 'Depends: bad-conflict-level0'
insertpackage 'unstable' 'bad-conflict-level2' 'all' '1' 'Depends: bad-conflict-level1'
insertinstalledpackage 'upgrade' 'all' '1'
insertinstalledpackage 'bad-upgrade' 'all' '1'
insertinstalledpackage 'bad-upgrade-level0' 'all' '1'
insertinstalledpackage 'bad-upgrade-level1' 'all' '1'
insertfoos() {
insertpackage 'unstable' "foo-${1}-level0" 'all' '1' "${2}: unknown | unknown | okay | later"
insertpackage 'unstable' "foo-${1}-level1" 'all' '1' "${2}: bad-level0 | bad-level0 | okay | later"
insertpackage 'unstable' "foo-${1}-level2" 'all' '1' "${2}: bad-level1 | bad-level1 | okay | later"
insertpackage 'unstable' "foo-${1}-upgrade-level0" 'all' '1' "${2}: bad-upgrade (>= 2) | okay | upgrade (>= 2) | later"
insertpackage 'unstable' "foo-${1}-upgrade-level1" 'all' '1' "${2}: bad-upgrade-level0 (>= 2) | bad-upgrade-level0 (>= 2) | bad-level0 | okay | upgrade (>= 2) | later"
insertpackage 'unstable' "foo-${1}-upgrade-level2" 'all' '1' "${2}: bad-upgrade-level1 (>= 2) | bad-upgrade-level1 (>= 2) | bad-level1 | okay | upgrade (>= 2) | later"
insertpackage 'unstable' "foo-${1}-conflict" 'all' '1' "${2}: unknown | bad-conflict-level2 | okay | later"
}
insertfoos 'd' 'Depends'
insertfoos 'r' 'Recommends'
setupaptarchive
_testsuccessheadtailequal() {
local TYPE="$1"
shift
msggroup "testsuccess${TYPE}equal"
local HEADLINES="$1"
local CMP="$2"
shift 2
testsuccesswithglobalerror 'testsuccess' 'EW' "$@"
cp "${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" "${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess${TYPE}equal.output"
testsuccessequal "$CMP" "${TYPE}" -n "$HEADLINES" "${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess${TYPE}equal.output"
msggroup
}
testsuccessheadequal() {
_testsuccessheadtailequal 'head' "$@"
}
testsuccesstailequal() {
_testsuccessheadtailequal 'tail' "$@"
}
checkfoos() {
msgmsg 'Install checks with foos dependency type' "$2"
for level in 0 1 2; do
testsuccessheadequal 7 "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
okay
The following NEW packages will be installed:
foo-${1}-level${level} okay
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded." apt install foo-${1}-level${level} -s
testsuccessheadequal 9 "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
upgrade
The following NEW packages will be installed:
foo-${1}-upgrade-level${level}
The following packages will be upgraded:
upgrade
1 upgraded, 1 newly installed, 0 to remove and $((2-${level})) not upgraded." apt install foo-${1}-upgrade-level${level} -s
done
testsuccessheadequal 7 "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
okay
The following NEW packages will be installed:
foo-${1}-conflict okay
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded." apt install foo-${1}-conflict -s
}
checkfoos 'd' 'Depends'
checkfoos 'r' 'Recommends'
TEST_WITH_APTITUDE=false
msgtest 'Check if aptitude is available for additional tests'
if dpkg-checkbuilddeps -d 'aptitude' /dev/null >/dev/null 2>&1; then
TEST_WITH_APTITUDE=true
# we don't document aptitude config options
sed -i -e '/^#x-apt-configure-index/ d' "$(getaptconfig)"
msgpass
else
msgskip 'not installed'
fi
if $TEST_WITH_APTITUDE; then
OKAYAPTITUDE='0 packages upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B of archives. After unpacking 86.0 kB will be used.
Would download/install/remove packages.'
testsuccesstailequal 3 "$OKAYAPTITUDE" aptitude install foo-d-level2 -sy
testsuccesstailequal 3 "$OKAYAPTITUDE" aptitude install foo-r-level2 -sy
testsuccesstailequal 3 "$OKAYAPTITUDE" aptitude install foo-d-conflict -sy
testsuccesstailequal 3 "$OKAYAPTITUDE" aptitude install foo-r-conflict -sy
fi
testfailure apt install bad-upgrade-level1 -s
testfailure apt install bad-conflict-level2 -s
if $TEST_WITH_APTITUDE; then
testsuccesstailequal 6 'The following packages have been kept back:
bad-upgrade-level1
No packages will be installed, upgraded, or removed.