summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cacheiterators.h2
-rw-r--r--apt-pkg/deb/dpkgpm.cc14
-rw-r--r--apt-pkg/packagemanager.cc21
-rw-r--r--cmdline/apt-get.cc6
-rw-r--r--debian/changelog48
-rw-r--r--debian/control27
-rwxr-xr-xdebian/rules4
-rw-r--r--methods/gpgv.cc12
-rw-r--r--methods/https.cc10
-rw-r--r--methods/rred.cc7
-rw-r--r--test/integration/framework9
-rwxr-xr-xtest/integration/test-dpkg-assert-multi-arch50
-rw-r--r--test/libapt/globalerror_test.cc7
-rwxr-xr-xtest/libapt/run-tests4
14 files changed, 173 insertions, 48 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index e6a0fddb0..d5e018be9 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -207,7 +207,7 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;};
inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;};
inline const char *Arch() const {
- if (S->MultiArch == pkgCache::Version::All)
+ if ((S->MultiArch & pkgCache::Version::All) == pkgCache::Version::All)
return "all";
return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;
};
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index c08f52c25..82b127c2f 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -857,6 +857,11 @@ bool pkgDPkgPM::Go(int OutStatusFd)
pid_t dpkgAssertMultiArch = ExecFork();
if (dpkgAssertMultiArch == 0)
{
+ // redirect everything to the ultimate sink as we only need the exit-status
+ int const nullfd = open("/dev/null", O_RDONLY);
+ dup2(nullfd, STDIN_FILENO);
+ dup2(nullfd, STDOUT_FILENO);
+ dup2(nullfd, STDERR_FILENO);
execv(Args[0], (char**) &Args[0]);
_error->WarningE("dpkgGo", "Can't detect if dpkg supports multi-arch!");
_exit(2);
@@ -1084,7 +1089,14 @@ bool pkgDPkgPM::Go(int OutStatusFd)
}
else
{
- char * const fullname = strdup(I->Pkg.FullName(false).c_str());
+ pkgCache::VerIterator PkgVer;
+ std::string name = I->Pkg.Name();
+ if (Op == Item::Remove || Op == Item::Purge)
+ PkgVer = I->Pkg.CurrentVer();
+ else
+ PkgVer = Cache[I->Pkg].InstVerIter(Cache);
+ name.append(":").append(PkgVer.Arch());
+ char * const fullname = strdup(name.c_str());
Packages.push_back(fullname);
ADDARG(fullname);
}
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index c9d7a3024..a370f15a3 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -322,22 +322,22 @@ bool pkgPackageManager::ConfigureAll()
only shown when debuging*/
bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
{
- // If this is true, only check and correct and dependancies without the Loop flag
+ // If this is true, only check and correct and dependencies without the Loop flag
bool PkgLoop = List->IsFlag(Pkg,pkgOrderList::Loop);
if (Debug) {
VerIterator InstallVer = VerIterator(Cache,Cache[Pkg].InstallVer);
clog << OutputInDepth(Depth) << "SmartConfigure " << Pkg.Name() << " (" << InstallVer.VerStr() << ")";
if (PkgLoop)
- clog << " (Only Correct Dependancies)";
+ clog << " (Only Correct Dependencies)";
clog << endl;
}
VerIterator const instVer = Cache[Pkg].InstVerIter(Cache);
- /* Because of the ordered list, most dependancies should be unpacked,
+ /* Because of the ordered list, most dependencies should be unpacked,
however if there is a loop (A depends on B, B depends on A) this will not
- be the case, so check for dependancies before configuring. */
+ be the case, so check for dependencies before configuring. */
bool Bad = false;
for (DepIterator D = instVer.DependsList();
D.end() == false; )
@@ -424,7 +424,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
if (Start==End) {
if (Bad && Debug && List->IsFlag(DepPkg,pkgOrderList::Loop) == false)
- std::clog << OutputInDepth(Depth) << "Could not satisfy dependancies for " << Pkg.Name() << std::endl;
+ std::clog << OutputInDepth(Depth) << "Could not satisfy dependencies for " << Pkg.Name() << std::endl;
break;
} else {
Start++;
@@ -529,7 +529,6 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg)
List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge);
- return true;
}
/*}}}*/
// PM::SmartUnPack - Install helper /*{{{*/
@@ -682,7 +681,13 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
VerIterator Ver(Cache,*I);
PkgIterator BrokenPkg = Ver.ParentPkg();
VerIterator InstallVer(Cache,Cache[BrokenPkg].InstallVer);
-
+ if (BrokenPkg.CurrentVer() != Ver)
+ {
+ if (Debug)
+ std::clog << OutputInDepth(Depth) << " Ignore not-installed version " << Ver.VerStr() << " of " << Pkg.FullName() << " for " << End << std::endl;
+ continue;
+ }
+
// Check if it needs to be unpacked
if (List->IsFlag(BrokenPkg,pkgOrderList::InList) && Cache[BrokenPkg].Delete() == false &&
List->IsNow(BrokenPkg)) {
@@ -733,7 +738,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
- if (Immediate == true && instVer->MultiArch == pkgCache::Version::Same)
+ if (Immediate == true && (instVer->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same)
{
/* Do lockstep M-A:same unpacking in two phases:
First unpack all installed architectures, then the not installed.
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index c140d5f5c..2f99cd60d 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1730,7 +1730,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
Pkg != tooMuch.end() && Changed == false; ++Pkg)
{
APT::PackageSet too;
- too.insert(Pkg);
+ too.insert(*Pkg);
for (pkgCache::PrvIterator Prv = Cache[Pkg].CandidateVerIter(Cache).ProvidesList();
Prv.end() == false; ++Prv)
too.insert(Prv.ParentPkg());
@@ -2872,12 +2872,12 @@ bool DoBuildDep(CommandLine &CmdL)
forbidden = "Multi-Arch: same";
// :native gets the buildArch
}
- else if (Ver->MultiArch == pkgCache::Version::Foreign || Ver->MultiArch == pkgCache::Version::AllForeign)
+ else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign)
{
if (colon != string::npos)
forbidden = "Multi-Arch: foreign";
}
- else if (Ver->MultiArch == pkgCache::Version::Allowed || Ver->MultiArch == pkgCache::Version::AllAllowed)
+ else if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed)
{
if (colon == string::npos)
Pkg = Ver.ParentPkg().Group().FindPkg(hostArch);
diff --git a/debian/changelog b/debian/changelog
index 732d67cbf..122052888 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,52 @@
-apt (0.8.16~exp10ubuntu1) UNRELEASED; urgency=low
+apt (0.8.16~exp12ubuntu1~ppa1) precise; urgency=low
* merge from debian/experimental:
- new ABI
- * DO NOT UPLOAD YET; THERE IS ANOTHER ABI BREAK COMMING SOON
- -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 19 Jan 2012 09:05:16 +0100
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 24 Jan 2012 20:07:38 +0100
+
+apt (0.8.16~exp12) experimental; urgency=low
+
+ [ Michael Vogt ]
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix segfault on pkg removal
+
+ [ David Kalnischkies ]
+ * apt-pkg/cacheiterators.h:
+ - return the correct version arch for all+foreign, too
+ * apt-pkg/packagemanager.cc:
+ - ignore breaks on not-installed versions while searching for
+ breakage loops as we don't have to avoid them
+ * debian/control:
+ - remove APT from the short descriptions as lintian doesn't like it
+ and it doesn't transport any information for a reader anyway
+ - apply typofixes by Pascal De Vuyst, thanks! (Closes: #652834, #652835)
+ * debian/rules:
+ - apply patch to enable usage of hardning CPPFLAGS and LDFLAGS by
+ Moritz Muehlenhoff, thanks! (Closes: #653504)
+ * methods/https.cc:
+ - use curls list append instead of appending Range and If-Range by hand
+ which generates malformed requests, thanks Mel Collins for the hint!
+ (Closes: #646381)
+ * test/libapt/run-tests:
+ - hurd doesn't have dmesg yet and we don't really need it either,
+ so use with $0 a more stable data source for hashsumming
+
+ [ Pino Toscano ]
+ * test/libapt/globalerror_test.cc:
+ - errno 0 has a different strerror on hurd, so generate the expected
+ message dynamically instead of hardcoding 'Success' (Closes: #656530)
+
+ -- Michael Vogt <mvo@debian.org> Tue, 24 Jan 2012 12:24:38 +0100
+
+apt (0.8.16~exp11) experimental; urgency=low
+
+ [ David Kalnischkies ]
+ * apt-pkg/deb/dpkgpm.cc:
+ - redirect out/input of dpkg --assert-multi-arch to /dev/null
+ - if multi-arch is detected ensure that pkg:all is reported as pkg:all
+
+ -- Michael Vogt <mvo@debian.org> Thu, 19 Jan 2012 13:48:18 +0100
apt (0.8.16~exp10) experimental; urgency=low
diff --git a/debian/control b/debian/control
index d7e295243..2354834ab 100644
--- a/debian/control
+++ b/debian/control
@@ -8,10 +8,9 @@ Uploaders: Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>,
Julian Andres Klode <jak@debian.org>
Standards-Version: 3.9.2
Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 8.1.3~), libdb-dev,
- gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.0),
- zlib1g-dev | libz-dev, debiandoc-sgml, xsltproc, docbook-xsl, docbook-xml,
- po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen,
- gcc-4.6 (>= 4.6.0-6ubuntu2)
+ gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.0),
+ zlib1g-dev | libz-dev, debiandoc-sgml, xsltproc, docbook-xsl, docbook-xml,
+ po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen
Build-Conflicts: autoconf2.13, automake1.4
Vcs-Bzr: lp:~ubuntu-core-dev/apt/ubuntu
Vcs-Browser: http://code.launchpad.net/apt/ubuntu
@@ -22,7 +21,7 @@ Depends: ubuntu-keyring, ${shlibs:Depends}, ${misc:Depends}, gnupg
Replaces: manpages-pl (<< 20060617-3~)
Conflicts: python-apt (<< 0.7.93.2~)
Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt
-Description: APT's commandline package manager
+Description: commandline package manager
This package provides commandline tools for searching and
managing as well as querying information about packages
as a low-level access to all features of the libapt-pkg library.
@@ -42,7 +41,7 @@ Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: APT's package managment runtime library
+Description: package managment runtime library
This library provides the common functionality for searching and
managing packages as well as information about packages.
Higher-level package managers can depend upon this library.
@@ -63,8 +62,8 @@ Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: APT's deb package format runtime library
- This library provides methods to query and extract information
+Description: deb package format runtime library
+ This library provides methods to query and extract information
from deb packages. This includes the control data and the package
file content.
@@ -73,7 +72,7 @@ Architecture: all
Priority: optional
Depends: ${misc:Depends}
Section: doc
-Description: Documentation for APT
+Description: documentation for APT
This package contains the user guide and offline guide for various
APT tools which are provided in a html and a text-only version.
@@ -84,7 +83,7 @@ Priority: optional
Pre-Depends: ${misc:Pre-Depends}
Depends: ${libapt-pkg-name} (= ${binary:Version}), ${libapt-inst-name} (= ${binary:Version}), ${misc:Depends}, zlib1g-dev | zlib-dev
Section: libdevel
-Description: Development files for APT's libapt-pkg and libapt-inst
+Description: development files for APT's libapt-pkg and libapt-inst
This package contains the header files and libraries for
developing with APT's libapt-pkg Debian package manipulation
library and the libapt-inst deb/tar/ar library.
@@ -94,7 +93,7 @@ Architecture: all
Priority: optional
Depends: ${misc:Depends}
Section: doc
-Description: Documentation for APT development
+Description: documentation for APT development
This package contains documentation for development of the APT
Debian package manipulation program and its libraries.
.
@@ -104,7 +103,7 @@ Description: Documentation for APT development
Package: apt-utils
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: APT utility programs
+Description: package managment related utility programs
This package contains some less used commandline utilities related
to package managment with APT.
.
@@ -122,7 +121,7 @@ Description: https download transport for APT
This package enables the usage of 'deb https://foo distro main' lines
in the /etc/apt/sources.list so that all package managers using the
libapt-pkg library can access metadata and packages available in sources
- accessable over https (Hypertext Transfer Protocol Secure).
+ accessible over https (Hypertext Transfer Protocol Secure).
.
- This transport supports server as well as client authenification
+ This transport supports server as well as client authentication
with certificates.
diff --git a/debian/rules b/debian/rules
index 234114d5d..dcd4fc361 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,8 @@ endif
ifneq (,$(shell which dpkg-buildflags))
export CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
+ export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+ export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
else
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
export CXXFLAGS = -O0 -g -Wall
@@ -95,7 +97,7 @@ build/configure-stamp: configure
dh_testdir
-mkdir build
cp COPYING debian/copyright
- cd build && CXXFLAGS="$(CXXFLAGS)" ../configure $(confflags)
+ cd build && CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" ../configure $(confflags)
touch $@
build/build-stamp: build/configure-stamp
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 2b2aba017..25ba0d063 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -98,8 +98,16 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
// Read a line. Sigh.
while ((c = getc(pipein)) != EOF && c != '\n')
{
- if (bufferoff == buffersize)
- buffer = (char *) realloc(buffer, buffersize *= 2);
+ if (bufferoff == buffersize)
+ {
+ char* newBuffer = (char *) realloc(buffer, buffersize *= 2);
+ if (newBuffer == NULL)
+ {
+ free(buffer);
+ return "Couldn't allocate a buffer big enough for reading";
+ }
+ buffer = newBuffer;
+ }
*(buffer+bufferoff) = c;
bufferoff++;
}
diff --git a/methods/https.cc b/methods/https.cc
index 317c8a587..6de18b8e0 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -100,7 +100,6 @@ void HttpsMethod::SetupProxy() /*{{{*/
depth. */
bool HttpsMethod::Fetch(FetchItem *Itm)
{
- stringstream ss;
struct stat SBuf;
struct curl_slist *headers=NULL;
char curl_errorstr[CURL_ERROR_SIZE];
@@ -199,6 +198,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
if (_config->FindB("Acquire::https::No-Store",
_config->FindB("Acquire::http::No-Store",false)) == true)
headers = curl_slist_append(headers,"Cache-Control: no-store");
+ stringstream ss;
ioprintf(ss, "Cache-Control: max-age=%u", _config->FindI("Acquire::https::Max-Age",
_config->FindI("Acquire::http::Max-Age",0)));
headers = curl_slist_append(headers, ss.str().c_str());
@@ -246,11 +246,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0)
{
char Buf[1000];
- sprintf(Buf,"Range: bytes=%li-\r\nIf-Range: %s\r\n",
- (long)SBuf.st_size - 1,
- TimeRFC1123(SBuf.st_mtime).c_str());
+ sprintf(Buf, "Range: bytes=%li-", (long) SBuf.st_size - 1);
headers = curl_slist_append(headers, Buf);
- }
+ sprintf(Buf, "If-Range: %s", TimeRFC1123(SBuf.st_mtime).c_str());
+ headers = curl_slist_append(headers, Buf);
+ }
else if(Itm->LastModified > 0)
{
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
diff --git a/methods/rred.cc b/methods/rred.cc
index e37a12ed9..1e352d0e7 100644
--- a/methods/rred.cc
+++ b/methods/rred.cc
@@ -333,7 +333,12 @@ RredMethod::State RredMethod::patchMMap(FileFd &Patch, FileFd &From, /*{{{*/
}
if(command_count == command_alloc) {
command_alloc = (command_alloc + 64) * 3 / 2;
- commands = (EdCommand*) realloc(commands, command_alloc * sizeof(EdCommand));
+ EdCommand* newCommands = (EdCommand*) realloc(commands, command_alloc * sizeof(EdCommand));
+ if (newCommands == NULL) {
+ free(commands);
+ return MMAP_FAILED;
+ }
+ commands = newCommands;
}
commands[command_count++] = cmd;
}
diff --git a/test/integration/framework b/test/integration/framework
index 2ea1844f0..d7526a100 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -25,7 +25,14 @@ msgnwarn() { echo -n "${CWARNING}W: $1${CNORMAL}" >&2; }
msgnmsg() { echo -n "${CMSG}$1${CNORMAL}" >&2; }
msgninfo() { echo -n "${CINFO}I: $1${CNORMAL}" >&2; }
msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}" >&2; }
-msgtest() { echo -n "${CINFO}$1 ${CCMD}$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} …${CNORMAL} " >&2; }
+msgtest() {
+ while [ -n "$1" ]; do
+ echo -n "${CINFO}$1${CCMD} " >&2;
+ echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} " >&2;
+ shift 2
+ done
+ echo -n "…${CNORMAL} " >&2;
+}
msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; }
msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; }
msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; }
diff --git a/test/integration/test-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch
index b1ec73e18..177d7489b 100755
--- a/test/integration/test-dpkg-assert-multi-arch
+++ b/test/integration/test-dpkg-assert-multi-arch
@@ -9,19 +9,29 @@ configarchitecture 'amd64' 'i386'
buildsimplenativepackage 'native-pkg' 'amd64' '1.0' 'stable'
buildsimplenativepackage 'foreign-pkg' 'i386' '0.5' 'stable' 'Multi-Arch: foreign'
buildsimplenativepackage 'same-lib' 'amd64,i386' '0.5' 'stable' 'Multi-Arch: same'
+buildsimplenativepackage 'all-pkg' 'all' '2.0' 'stable'
+buildsimplenativepackage 'all-foreign-pkg' 'all' '2.0' 'stable' 'Multi-Arch: foreign'
setupaptarchive
testqualifier() {
- msgtest 'Test for correct qualifier mode' $2
- GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -- '--configure' | sed -e 's/^.*--configure \([^ ]*\).*$/\1/')"
- test "$GIVEN" = "$2" && msgpass || msgfail
+ msgtest 'Test with' $1 'for correct qualifier mode' $2
+ GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -v -- '--unpack' | sed -e 's/^.*--[^u][^ ]* \([^ ]*\).*$/\1/')"
+ if [ "$GIVEN" = "$2" ]; then
+ msgpass
+ else
+ echo
+ echo "$GIVEN"
+ msgfail
+ fi
}
# non-multiarch or "ubuntus" old multiarchified dpkg
echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper
echo '#! /bin/sh
if echo "$*" | grep -q -- "--assert-multi-arch"; then
+ echo >&2 'dpkg: Fehler: unbekannte Option --assert-multi-arch'
+ echo >&1 'dpkg: Info: unbekannte Option --assert-multi-arch'
return 2;
fi
return $*' > ./dpkg-wrapper
@@ -34,9 +44,27 @@ testqualifier 'foreign-pkg:i386' 'foreign-pkg:i386'
testqualifier 'same-lib' 'same-lib'
testqualifier 'same-lib:amd64' 'same-lib'
testqualifier 'same-lib:i386' 'same-lib:i386'
+testqualifier 'all-pkg' 'all-pkg'
+testqualifier 'all-pkg:amd64' 'all-pkg'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg'
+insertinstalledpackage 'all-pkg' 'amd64' '1.0'
+insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg' 'all-pkg'
+testqualifier 'all-pkg:amd64' 'all-pkg'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg'
+insertinstalledpackage 'always-all-pkg' 'all' '1.0'
+insertinstalledpackage 'always-all-foreign-pkg' 'all' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg-' 'all-pkg'
+testqualifier 'all-foreign-pkg-' 'all-foreign-pkg'
+testqualifier 'always-all-pkg-' 'always-all-pkg'
+testqualifier 'always-all-foreign-pkg-' 'always-all-foreign-pkg'
# multiarch dpkg (new interface version)
+rm rootdir/var/lib/dpkg/status
+touch rootdir/var/lib/dpkg/status
echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper
echo '#! /bin/sh
if echo "$*" | grep -q -- "--assert-multi-arch"; then
@@ -51,3 +79,19 @@ testqualifier 'foreign-pkg:i386' 'foreign-pkg:i386'
testqualifier 'same-lib' 'same-lib:amd64'
testqualifier 'same-lib:amd64' 'same-lib:amd64'
testqualifier 'same-lib:i386' 'same-lib:i386'
+testqualifier 'all-pkg' 'all-pkg:all'
+testqualifier 'all-pkg:amd64' 'all-pkg:all'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all'
+insertinstalledpackage 'all-pkg' 'amd64' '1.0'
+insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg' 'all-pkg:all'
+testqualifier 'all-pkg:amd64' 'all-pkg:all'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all'
+insertinstalledpackage 'always-all-pkg' 'all' '1.0'
+insertinstalledpackage 'always-all-foreign-pkg' 'all' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg-' 'all-pkg:amd64'
+testqualifier 'all-foreign-pkg-' 'all-foreign-pkg:amd64'
+testqualifier 'always-all-pkg-' 'always-all-pkg:all'
+testqualifier 'always-all-foreign-pkg-' 'always-all-foreign-pkg:all'
diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc
index 5d27414f9..72044d493 100644
--- a/test/libapt/globalerror_test.cc
+++ b/test/libapt/globalerror_test.cc
@@ -3,9 +3,12 @@
#include "assert.h"
#include <string>
#include <errno.h>
+#include <string.h>
int main(int argc,char *argv[])
{
+ std::string const textOfErrnoZero(strerror(0));
+
equals(_error->empty(), true);
equals(_error->PendingError(), false);
equals(_error->Notice("%s Notice", "A"), false);
@@ -80,7 +83,7 @@ int main(int argc,char *argv[])
equals(_error->PendingError(), true);
equals(_error->PopMessage(text), true);
equals(_error->PendingError(), false);
- equals(text, "Something horrible happend 2 times - errno (0: Success)");
+ equals(text, std::string("Something horrible happend 2 times - errno (0: ").append(textOfErrnoZero).append(")"));
equals(_error->empty(), true);
std::string longText;
@@ -92,7 +95,7 @@ int main(int argc,char *argv[])
equals(_error->Errno("errno", "%s horrible %s %d times", longText.c_str(), "happend", 2), false);
equals(_error->PopMessage(text), true);
- equals(text, std::string(longText).append(" horrible happend 2 times - errno (0: Success)"));
+ equals(text, std::string(longText).append(" horrible happend 2 times - errno (0: ").append(textOfErrnoZero).append(")"));
equals(_error->Warning("Репозиторий не обновлён и будут %d %s", 4, "test"), false);
equals(_error->PopMessage(text), false);
diff --git a/test/libapt/run-tests b/test/libapt/run-tests
index 5fff4ecca..d4341412d 100755
--- a/test/libapt/run-tests
+++ b/test/libapt/run-tests
@@ -67,11 +67,9 @@ do
"${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak" \
"${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-ast_DE"
elif [ $name = "HashSums${EXT}" ]; then
- TMP="$(mktemp)"
- dmesg > $TMP
+ TMP="$(readlink -f "./${0}")"
echo -n "Testing with \033[1;35m${name}\033[0m ... "
LD_LIBRARY_PATH=${LDPATH} ${testapp} $TMP $(md5sum $TMP | cut -d' ' -f 1) $(sha1sum $TMP | cut -d' ' -f 1) $(sha256sum $TMP | cut -d' ' -f 1) $(sha512sum $TMP | cut -d' ' -f 1) && echo "\033[1;32mOKAY\033[0m" || echo "\033[1;31mFAILED\033[0m"
- rm $TMP
continue
elif [ $name = "CompareVersion${EXT}" ]; then
tmppath="${DIR}/versions.lst"