]> git.saurik.com Git - apt.git/log
apt.git
10 years agofix: warning: extra ‘;’ [-Wpedantic]
David Kalnischkies [Fri, 26 Sep 2014 20:55:56 +0000 (22:55 +0200)] 
fix: warning: extra ‘;’ [-Wpedantic]

Reported-By: gcc -Wpedantic
Git-Dch: Ignore

10 years agofix: Member variable 'X' is not initialized in the constructor.
David Kalnischkies [Fri, 26 Sep 2014 20:16:26 +0000 (22:16 +0200)] 
fix: Member variable 'X' is not initialized in the constructor.

Reported-By: cppcheck
Git-Dch: Ignore

10 years agofix occurrence typo in tagfile comment
David Kalnischkies [Fri, 26 Sep 2014 19:47:59 +0000 (21:47 +0200)] 
fix occurrence typo in tagfile comment

Reported-By: codespell
Git-Dch: Ignore

10 years agoremove outdated and unused po/ChangeLog
David Kalnischkies [Fri, 26 Sep 2014 19:46:41 +0000 (21:46 +0200)] 
remove outdated and unused po/ChangeLog

Git-Dch: Ignore

10 years agoadd an API for cache filters/matcher
David Kalnischkies [Sun, 7 Sep 2014 17:16:56 +0000 (19:16 +0200)] 
add an API for cache filters/matcher

A lot of code deals with iterating over packages and checking for
specific states. At the moment these are all handcrafted inplace, but
that makes sharing common code which just differs in the states it
checks rather difficult and is error prune. Having an API to construct
arbitrary complex filters will come in handy for those.

Git-Dch: Ignore

10 years agomove PCI::From* methods into CacheSetHelper class
David Kalnischkies [Thu, 4 Sep 2014 17:01:12 +0000 (19:01 +0200)] 
move PCI::From* methods into CacheSetHelper class

The methods itself deal with the helper a lot, so it makes sense to move
them to the helper itself, which helps also if we want to override some
of these methods, the FromString mentioned in the bugreport being the
obvious example.

VCI is spared from this change for now as while it would fit with the
same reasoning it much heavier entangled with the previous
CacheSetHelper change, so moving it now would mean breaking the API.
The PCI change is worthwhile on its own though as it is used by VCI.

Closes: 686221
10 years agoadapt to the new CacheSetHelper API
David Kalnischkies [Wed, 3 Sep 2014 17:02:05 +0000 (19:02 +0200)] 
adapt to the new CacheSetHelper API

Git-Dch: Ignore

10 years agorework cachesets API to allow future extension
David Kalnischkies [Wed, 3 Sep 2014 16:16:16 +0000 (18:16 +0200)] 
rework cachesets API to allow future extension

The introduction of Fnmatch showed that each new selector would require
multiple new virtual methods in the CacheSetHelper to work correctly,
which isn't that great. We now flip to a single virtual method which
handles all cases separated by an enum – as new enum values can be added
without an ABI break.

Great care was taken to make old code work with the new way of organisation,
which means in return that you might be bombarded with deprecation
warnings now if you don't adapt, but code should still compile and work
as before as can be seen in apt itself with this commit.

Git-Dch: Ignore

10 years agoadd APT::PackageUniverse as a pkgCache wrapper
David Kalnischkies [Wed, 3 Sep 2014 09:11:10 +0000 (11:11 +0200)] 
add APT::PackageUniverse as a pkgCache wrapper

Git-Dch: Ignore

10 years agoadd specialisations for std::vector
David Kalnischkies [Tue, 2 Sep 2014 22:26:13 +0000 (00:26 +0200)] 
add specialisations for std::vector

Git-Dch: Ignore

10 years agomark pkg(All|Dist)Upgrade as deprecated
David Kalnischkies [Sun, 17 Aug 2014 11:27:59 +0000 (13:27 +0200)] 
mark pkg(All|Dist)Upgrade as deprecated

The comment above their definition marks them already as such, so this
is only a formalisation of the deprecation and fixes the occurances we
have in our own code together with removing a magic number.

Git-Dch: Ignore

10 years agofix progress output for (dist-)upgrade calculation
David Kalnischkies [Sun, 17 Aug 2014 10:30:21 +0000 (12:30 +0200)] 
fix progress output for (dist-)upgrade calculation

Previously, we had a start and a done of the calculation printed by
higher-level code, but this got intermixed by progress reporting from an
external solver or the output of autoremove code…

The higherlevel code is now only responsible for instantiating a
progress object of its choosing (if it wants progress after all) and the
rest will be handled by the upgrade code. Either it is used to show the
progress of the external solver or the internal solver will give some
hints about its overall progress. The later isn't really a proper
progress as it will jump forward after each substep, but that is at
least a bit better than before without any progress indication.

Fixes also the 'strange' non-display of this progress line in -q=1, while
all others are shown, which is reflected by all testcase changes.

10 years agode-duplicate version strings in the cache
David Kalnischkies [Wed, 23 Jul 2014 12:52:11 +0000 (14:52 +0200)] 
de-duplicate version strings in the cache

Turns out that version numbers aren't as random as you might guess.
In my cache for example, I have:
  Total package names: 69513 (1390 k)
  Total package structures: 188259 (9036 k)
  Total distinct versions: 186345 (13.4 M)
  Total dependencies: 2052242 (57.5 M)
which amounts to 1035873 (10,1 M) strings.
Reusing version strings reduces this to 161465 (3.479 k).

This comes at a cost of course: Generation is slightly slower, but we
are still faster than what we started with and it makes room (also cache
size wise) for further changes.

10 years agodrop stored StringItems in favor of in-memory mappings
David Kalnischkies [Fri, 20 Jun 2014 19:33:56 +0000 (21:33 +0200)] 
drop stored StringItems in favor of in-memory mappings

Strings like Section names or architectures are needed vary often.
Instead of writing them each time we need them, we deploy sharing for
these special strings. Until now, this was done with a linked list of
strings in which we would search, which was stored in the cache.
It turns out we can do this just as well in memory as well with a bunch
of std::map's.

In memory means here that it isn't available anymore if we have a partly
invalid cache, but that isn't much of a problem in practice as the
status file is compared to the other files we parse very small and includes
mostly duplicates, so the space we would gain by storing is more or less
equal to the size of the stored linked list…

10 years agocount strings more accurately for stats
David Kalnischkies [Fri, 20 Jun 2014 18:28:54 +0000 (20:28 +0200)] 
count strings more accurately for stats

So far, only the few strings stored in stringitems were counted, but
many more strings are directly inserted into the cache. We account for
this now by identifying all these different strings and measure their
length. We are still not at the correct size of the cache in 'stats'
this way, but we are now again a bit closer.

Git-Dch: Ignore

10 years agopackages in the cache are sorted by name so noise-free
David Kalnischkies [Thu, 19 Jun 2014 10:23:10 +0000 (12:23 +0200)] 
packages in the cache are sorted by name so noise-free

Commit aa0fe657e46b87cc692895a36df12e8b74bb27bb sorts the package names
in the hashtable. We make use of this already in these functions, but as
a minor sideeffect it also means that we don't have 'noise' anymore
between packages belonging to the same group. We therefore don't need to
check for a matching name in Grp.FindPkg anymore.

Git-Dch: Ignore

10 years agosearch for pkg names in the cache case-sensitive
David Kalnischkies [Thu, 19 Jun 2014 09:59:41 +0000 (11:59 +0200)] 
search for pkg names in the cache case-sensitive

Package names have to be lowercase (debian-policy §5.6.1) and in as
lowlevel as these method are it would be quiet strange to treat an
invalid package "suddently" as a valid one which other tools might or
might not accept. If case-insensitivity is really needed the frontend
should ensure this rather than these methods waste cpu cycles by
default.

Git-Dch: Ignore

10 years agodeprecate Pkg->Name in favor of Grp->Name
David Kalnischkies [Thu, 19 Jun 2014 09:00:02 +0000 (11:00 +0200)] 
deprecate Pkg->Name in favor of Grp->Name

They both store the same information, so this field just takes up space
in the Package struct for no good reason. We mark it "just" as deprecated
instead of instantly removing it though as it isn't misleading like
Section was and is potentially used in the wild more often.

10 years agotest fixes
Michael Vogt [Fri, 26 Sep 2014 20:45:18 +0000 (22:45 +0200)] 
test fixes

10 years agoDo not allow going from authenticated to unauthenticated repo
Michael Vogt [Fri, 26 Sep 2014 18:59:31 +0000 (20:59 +0200)] 
Do not allow going from authenticated to unauthenticated repo

Also rework the way we load the Release file, so it only after
Release.gpg verified the Release file. The rational is that we
never want to load untrusted data into our parsers. Only stuff
verified with gpg or by its hashes get loaded. To load untrusted
data you now need to use apt-get update --allow-unauthenticated.

10 years agoPrint warning for unauthenticated repositories
Michael Vogt [Fri, 26 Sep 2014 18:59:56 +0000 (20:59 +0200)] 
Print warning for unauthenticated repositories

10 years agoDo not download Packages/Sources files on I-M-S hit of the Release file
Michael Vogt [Fri, 26 Sep 2014 16:13:48 +0000 (18:13 +0200)] 
Do not download Packages/Sources files on I-M-S hit of the Release file

With this branch we know that the data in the lists directory is always
what the release file says, so if the Release file is unchanged, then
there is no need to queue the download of the other indexfiles as they
will be unchanged too (or broken :)

10 years agoMerge remote-tracking branch 'donkult/feature/generalize-gzipindex' into debian/sid
Michael Vogt [Fri, 26 Sep 2014 16:09:32 +0000 (18:09 +0200)] 
Merge remote-tracking branch 'donkult/feature/generalize-gzipindex' into debian/sid

10 years agoDisable Mth.DropPrivsOrDie() in copy.cc for now
Michael Vogt [Fri, 26 Sep 2014 15:50:18 +0000 (17:50 +0200)] 
Disable Mth.DropPrivsOrDie() in copy.cc for now

Dch-Ignore: true

10 years agorewrite compressed indexes test to check with all compressors
David Kalnischkies [Thu, 25 Sep 2014 09:52:41 +0000 (11:52 +0200)] 
rewrite compressed indexes test to check with all compressors

Git-Dch: Ignore

10 years agoMerge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Michael Vogt [Thu, 25 Sep 2014 10:33:26 +0000 (12:33 +0200)] 
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans

10 years agoRemove check for "Translation-" from pkgAcqIndex::Custom600Headers()
Michael Vogt [Thu, 25 Sep 2014 10:26:22 +0000 (12:26 +0200)] 
Remove check for "Translation-" from pkgAcqIndex::Custom600Headers()

This unneeded because pkgAcqIndexTrans has its own Custom600Headers()
method.

10 years agoRevert making pkgAcquire::Item::DescURI() "const"
Michael Vogt [Thu, 25 Sep 2014 09:49:16 +0000 (11:49 +0200)] 
Revert making pkgAcquire::Item::DescURI() "const"

Revert because its a API change and the gain does not justify the
extra work to make the required changes in the consumers of this
interface at this point.

10 years agoUse /var/empty as the homedir for _apt
Michael Vogt [Thu, 25 Sep 2014 09:39:16 +0000 (11:39 +0200)] 
Use /var/empty as the homedir for _apt

Thanks to Axel Beckert

10 years agoreleasing package apt version 1.1~exp3
Michael Vogt [Wed, 24 Sep 2014 18:14:55 +0000 (20:14 +0200)] 
releasing package apt version 1.1~exp3

10 years agoDropPrivs: Document what it does
Julian Andres Klode [Wed, 24 Sep 2014 20:28:44 +0000 (22:28 +0200)] 
DropPrivs: Document what it does

Git-Dch: ignore

10 years agoDropPrivs: Use APT::Sandbox::User instead of Apt::User::Nobody
Julian Andres Klode [Wed, 24 Sep 2014 20:26:41 +0000 (22:26 +0200)] 
DropPrivs: Use APT::Sandbox::User instead of Apt::User::Nobody

Git-Dch: ignore

10 years agoDropPrivs: Hard-fail if the user does not exist
Julian Andres Klode [Wed, 24 Sep 2014 20:07:27 +0000 (22:07 +0200)] 
DropPrivs: Hard-fail if the user does not exist

Git-Dch: ignore

10 years agoDropPrivs: Add some comments for the more obscure setuid/setgid functions
Julian Andres Klode [Wed, 24 Sep 2014 20:00:33 +0000 (22:00 +0200)] 
DropPrivs: Add some comments for the more obscure setuid/setgid functions

Git-Dch: ignore

10 years agoDropPrivs: Move the re-set uid/gid thing to the end of the function
Julian Andres Klode [Wed, 24 Sep 2014 19:53:45 +0000 (21:53 +0200)] 
DropPrivs: Move the re-set uid/gid thing to the end of the function

Git-Dch: ignore

10 years agomethods: Fail if we cannot drop privileges
Julian Andres Klode [Wed, 24 Sep 2014 19:49:19 +0000 (21:49 +0200)] 
methods: Fail if we cannot drop privileges

10 years agoDropPrivs: Improve comments
Julian Andres Klode [Wed, 24 Sep 2014 18:59:53 +0000 (20:59 +0200)] 
DropPrivs: Improve comments

Git-Dch: ignore

10 years agoDropPrivs: Also check for saved set-user-ID and set-group-ID
Julian Andres Klode [Wed, 24 Sep 2014 18:57:30 +0000 (20:57 +0200)] 
DropPrivs: Also check for saved set-user-ID and set-group-ID

10 years agoDropPrivs: Do not use an invalid return check for setgroups()
Julian Andres Klode [Wed, 24 Sep 2014 18:02:54 +0000 (20:02 +0200)] 
DropPrivs: Do not use an invalid return check for setgroups()

setgroups() returns 0 on success

Git-Dch: ignore

10 years agoUse _apt as our unprivileged user name
Julian Andres Klode [Wed, 24 Sep 2014 15:29:53 +0000 (17:29 +0200)] 
Use _apt as our unprivileged user name

Some people want to standardize on it, and BSDs do it too, so let's
do the same.

Reported-by: Paul Wise <pabs@debian.org>
10 years agoDropPriv: Really call seteuid and not setuid, and add more checks
Julian Andres Klode [Wed, 24 Sep 2014 14:47:55 +0000 (16:47 +0200)] 
DropPriv: Really call seteuid and not setuid, and add more checks

The only thing we are missing is non-portable saved ids support.

10 years agoDrop Privileges to "Debian-apt" in most acquire methods
Michael Vogt [Wed, 24 Sep 2014 14:22:05 +0000 (16:22 +0200)] 
Drop Privileges to "Debian-apt" in most acquire methods

Add a new "Debian-apt" user that owns the /var/lib/apt/lists
and /var/cache/apt/archive directories. The methods
http, https, ftp, gpgv, gzip switch to this user when they
start.

Thanks to Julian and "ioerror" and tors "switch_id()" code.

10 years agomake pdiff transactional (but at the cost of a CopyFile()
Michael Vogt [Tue, 23 Sep 2014 21:48:19 +0000 (23:48 +0200)] 
make pdiff transactional (but at the cost of a CopyFile()

10 years agocleanup, fix test-apt-update-unauth as the behavior of apt changed
Michael Vogt [Tue, 23 Sep 2014 16:08:53 +0000 (18:08 +0200)] 
cleanup, fix test-apt-update-unauth as the behavior of apt changed

10 years agocleanup
Michael Vogt [Tue, 23 Sep 2014 15:18:30 +0000 (17:18 +0200)] 
cleanup

10 years agofix one broken test
Michael Vogt [Tue, 23 Sep 2014 15:00:05 +0000 (17:00 +0200)] 
fix one broken test

10 years agoMerge remote-tracking branch 'debian/debian/experimental' into feature/acq-trans
Michael Vogt [Tue, 23 Sep 2014 13:49:05 +0000 (15:49 +0200)] 
Merge remote-tracking branch 'debian/debian/experimental' into feature/acq-trans

10 years agoMerge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Michael Vogt [Tue, 23 Sep 2014 13:47:44 +0000 (15:47 +0200)] 
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans

Conflicts:
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
methods/copy.cc
test/integration/test-hashsum-verification

10 years agofix tests
Michael Vogt [Tue, 23 Sep 2014 12:57:10 +0000 (14:57 +0200)] 
fix tests

10 years agoMerge branch 'debian/sid' into debian/experimental
Michael Vogt [Tue, 23 Sep 2014 12:20:27 +0000 (14:20 +0200)] 
Merge branch 'debian/sid' into debian/experimental

Conflicts:
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
apt-pkg/cachefilter.h
configure.ac
debian/changelog

10 years agoEnsure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchive
Michael Vogt [Sun, 21 Sep 2014 19:40:10 +0000 (21:40 +0200)] 
Ensure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchive

The iTFRewritePackageOrder is used in indexcopy to copy and normalize
cdrom Packages files. This change will ensure that there is no
"normalization" that changes MD5sum -> MD5Sum which alters the hash
of the Packages file on disk (oh the irony).

10 years agoFix regression for cdrom: sources from latest security update
Michael Vogt [Sun, 21 Sep 2014 19:23:04 +0000 (21:23 +0200)] 
Fix regression for cdrom: sources from latest security update

Skip a reverify for cdrom: sources. The reverify step is actually
harmful here because the apt-cdrom add code uses the indexcopy.cc
which will "normalize" the Packages file from the cdrom when it
writes it to the local disk. This leads to changing the "MD5sum"
field (notice the lower case "s") on the cdrom Packages file to
a "MD5Sum" field on the local file in /var/lib/apt/lists. Which
of course alters the hash and makes apt fail to reverify the file.

10 years agogeneralize Acquire::GzipIndex
Michael Vogt [Sun, 21 Sep 2014 08:18:03 +0000 (10:18 +0200)] 
generalize Acquire::GzipIndex

10 years agorelax grep to support newer curl output format
David Kalnischkies [Fri, 19 Sep 2014 22:12:13 +0000 (00:12 +0200)] 
relax grep to support newer curl output format

Git-Dch: Ignore

10 years agodisable timestamps in the footer of docs by doxygen
Jérémy Bobbio [Fri, 19 Sep 2014 21:03:55 +0000 (23:03 +0200)] 
disable timestamps in the footer of docs by doxygen

The default being 'yes', but this spoils the effort of reproducible
builds for no real gain. (https://wiki.debian.org/ReproducibleBuilds)

10 years agoGerman program translation update
Holger Wansing [Fri, 19 Sep 2014 20:32:14 +0000 (22:32 +0200)] 
German program translation update

Closes: 762223
10 years agoFix regression when copy: is used for a relative path
Michael Vogt [Fri, 19 Sep 2014 14:41:55 +0000 (16:41 +0200)] 
Fix regression when copy: is used for a relative path

When we do a ReverifyAfterIMS() we use the copy: method to
verify the hashes again. If the user uses -o Dir=./something/relative
this fails because we use the URI class in copy.cc that strips
away the leading relative part. By not using URI this is fixed.

Closes: #762160
10 years agotest/integration/test-apt-update-file: improve test
Michael Vogt [Fri, 19 Sep 2014 14:41:50 +0000 (16:41 +0200)] 
test/integration/test-apt-update-file: improve test

10 years ago./pre-release pre-export
Michael Vogt [Thu, 18 Sep 2014 05:59:01 +0000 (07:59 +0200)] 
./pre-release pre-export

10 years agoreleasing package apt version 1.0.9.1 1.0.9.1
Michael Vogt [Wed, 17 Sep 2014 20:05:51 +0000 (22:05 +0200)] 
releasing package apt version 1.0.9.1

10 years agoMerge remote-tracking branch 'vnwildman/debian/sid' into debian/sid
Michael Vogt [Wed, 17 Sep 2014 20:04:30 +0000 (22:04 +0200)] 
Merge remote-tracking branch 'vnwildman/debian/sid' into debian/sid

10 years agoimprove test for commit daff4a
Michael Vogt [Wed, 17 Sep 2014 15:48:27 +0000 (17:48 +0200)] 
improve test for commit daff4a

10 years agoFix regression for file:/// uris from CVE-2014-0487
Michael Vogt [Wed, 17 Sep 2014 12:57:05 +0000 (14:57 +0200)] 
Fix regression for file:/// uris from CVE-2014-0487

Do not run ReverifyAfterIMS() for local file URIs as this will
causes apt to mess around in the file:/// uri space. This is
wrong in itself, but it will also cause a incorrect verification
failure when the archive and the lists directory are on different
partitions as rename().

10 years agofix gcc warnings
Michael Vogt [Wed, 17 Sep 2014 07:24:19 +0000 (09:24 +0200)] 
fix gcc warnings

10 years agouse pkgAcqMetaBase as the transactionManager
Michael Vogt [Wed, 17 Sep 2014 07:17:49 +0000 (09:17 +0200)] 
use pkgAcqMetaBase as the transactionManager

10 years agoprepare 1.0.9.1
Michael Vogt [Tue, 16 Sep 2014 18:53:35 +0000 (20:53 +0200)] 
prepare 1.0.9.1

10 years agomerge previous upload
Michael Vogt [Tue, 16 Sep 2014 18:51:19 +0000 (20:51 +0200)] 
merge previous upload

10 years agoSECURITY UPDATE for CVE-2014-{0488,0487,0489}
Michael Vogt [Tue, 16 Sep 2014 18:23:43 +0000 (20:23 +0200)] 
SECURITY UPDATE for CVE-2014-{0488,0487,0489}

incorrect invalidating of unauthenticated data (CVE-2014-0488)
incorect verification of 304 reply (CVE-2014-0487)
incorrect verification of Acquire::Gzip indexes (CVE-2014-0489)

10 years agoadd a bunch of dpointers
Michael Vogt [Tue, 16 Sep 2014 15:13:09 +0000 (17:13 +0200)] 
add a bunch of dpointers

10 years agoremove pkgAcqSubIndex
Michael Vogt [Tue, 16 Sep 2014 15:03:04 +0000 (17:03 +0200)] 
remove pkgAcqSubIndex

10 years agoadd a 'coverage' command to generate reports
David Kalnischkies [Sun, 14 Sep 2014 20:48:01 +0000 (22:48 +0200)] 
add a 'coverage' command to generate reports

Builds, runs and generates everything needed to have a coverage report
at the end for apt. The report isn't perfect as most childs apt forks do
not have a regular exit and so data is never written for them, which
results in e.g. most methods to have zero coverage reported.

Git-Dch: Ignore

10 years agoTurkish program translation update
Mert Dirik [Sun, 14 Sep 2014 21:04:03 +0000 (23:04 +0200)] 
Turkish program translation update

Closes: 761394
10 years agoUpdated German documentation translation
Chris Leick [Sun, 14 Sep 2014 12:48:10 +0000 (14:48 +0200)] 
Updated German documentation translation

10 years agol10n: vi.po (636t): Update program translation
Trần Ngọc Quân [Fri, 12 Sep 2014 07:13:36 +0000 (14:13 +0700)] 
l10n: vi.po (636t): Update program translation

Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
10 years agoAllow override of Proxy-Auto-Detect by the users configuration
Michael Vogt [Fri, 12 Sep 2014 09:44:11 +0000 (11:44 +0200)] 
Allow override of Proxy-Auto-Detect by the users configuration

Only run the Proxy-Auto-Detect code if there is not already
a host specific configuration.

Closes: 759264
10 years agoprepare 1.0.8 1.0.8
Michael Vogt [Tue, 9 Sep 2014 18:10:41 +0000 (20:10 +0200)] 
prepare 1.0.8

10 years agodebian/gbp.conf: use export-dir
Michael Vogt [Tue, 9 Sep 2014 18:50:34 +0000 (20:50 +0200)] 
debian/gbp.conf: use export-dir

10 years agodon't call pager in non-terminals for changelog
David Kalnischkies [Tue, 9 Sep 2014 11:52:32 +0000 (13:52 +0200)] 
don't call pager in non-terminals for changelog

Most pagers are nice and default to running non-interactively if they
aren't connected to a terminal and we relied on that. On ci.debian.net
the configured pager is printing a header out of nowhere though, so if
we are printing to a non-terminal we call "cat" instead.

In the rework we also "remove" the dependency on sensible-utils in sofar
as we call some alternatives if calling the utils fail.

This seems to be the last problem preventing a "PASS" status on
ci.debian.net, so we close the associated bugreport.

Closes: 755040
10 years agorework PTY magic to fix stair-stepping on kfreebsd
David Kalnischkies [Mon, 8 Sep 2014 19:05:11 +0000 (21:05 +0200)] 
rework PTY magic to fix stair-stepping on kfreebsd

A pty slave we have got from openpty can only be used for one dpkg
child, if we give it to a second child on kfreebsd setting TIOCSCTTY
fails causing the output to be stair-stepped from now on.

By switching the code to creating a master and opening a new slave in
the child for each child we can fix this glitch, so that at least the
master remains stable.

Closes: 759684
10 years agofix progress report for upgrade and reinstall
David Kalnischkies [Mon, 8 Sep 2014 15:14:17 +0000 (17:14 +0200)] 
fix progress report for upgrade and reinstall

APT treats upgrades like installs and dpkg is very similar in this, but
prints still a slightly different processing message indicating that it
is really an upgrade which we hadn't parsed so far, but this wasn't
really visible as we quickly moved on to a 'known' state.

More problematic was the reinstall case as apt hadn't recognized this
for the package name detection, so that reinstalls had no progress since
we introduced MultiArch.

10 years agofix and non-silent fail dpkg-overwrite error test
David Kalnischkies [Sun, 7 Sep 2014 20:08:01 +0000 (22:08 +0200)] 
fix and non-silent fail dpkg-overwrite error test

Commit cbcdd3ee9d86379d1b3a44e41ae8b17dc23111d0 removes the space at the
end of the debfile name dpkg send to us and we previously had included
in the pmerror message we printed on the statusfd.

Git-Dch: Ignore

10 years agostrip everything spacey in APT::String::Strip
David Kalnischkies [Sun, 7 Sep 2014 19:27:57 +0000 (21:27 +0200)] 
strip everything spacey in APT::String::Strip

Git-Dch: Ignore

10 years agodetect terminal output with 'test -t' in tests
David Kalnischkies [Sun, 7 Sep 2014 17:30:33 +0000 (19:30 +0200)] 
detect terminal output with 'test -t' in tests

Instead of trying to inspect /proc and the fds inside we use "test -t 1"
instead as this is available and working on kfreebsd as well – not that
something breaks if we wouldn't, but we like color.

Git-Dch: Ignore

10 years agodo use an 'unknown' arch-specification in test
David Kalnischkies [Sun, 7 Sep 2014 17:28:21 +0000 (19:28 +0200)] 
do use an 'unknown' arch-specification in test

Using 'kfreebsd' here makes the test fail on a kfreebsd system
(obviously), so we just use something totally madeup in the hope that
this is less like to conflict in the future.

Git-Dch: Ignore

10 years agomake GetLocalitySortedVersionSet more generic
David Kalnischkies [Tue, 2 Sep 2014 16:20:49 +0000 (18:20 +0200)] 
make GetLocalitySortedVersionSet more generic

No reason in and of by itself at the moment, but prepares for the goal
of having 'apt search' and 'apt-cache search' using the same code now
that they at least support the same stuff. The 'apt' code is just a
multitude slower at the moment…

Git-Dch: Ignore

10 years agoimplement --full in apt search
David Kalnischkies [Tue, 2 Sep 2014 12:32:48 +0000 (14:32 +0200)] 
implement --full in apt search

10 years agouse a format string in ListSingleVersion
David Kalnischkies [Mon, 1 Sep 2014 19:43:15 +0000 (21:43 +0200)] 
use a format string in ListSingleVersion

The method already deals with a format string, but had an else path
doing a hardcoded format as well. This is changed now to use the same
code for both - the format in the second case is still fixed though.

Git-Dch: Ignore

10 years agoskip version if we already have this package as search-result
David Kalnischkies [Mon, 1 Sep 2014 17:09:40 +0000 (19:09 +0200)] 
skip version if we already have this package as search-result

Git-Dch: Ignore

10 years agosupport regular expressions in 'apt search'
David Kalnischkies [Sat, 30 Aug 2014 09:29:45 +0000 (11:29 +0200)] 
support regular expressions in 'apt search'

apt-cache search supported this since ever and in the code for apt was a
fixme indicating this should be added here as well, so here we go.

10 years agoImprove Debug::Acquire::http debug output
Michael Vogt [Fri, 5 Sep 2014 14:24:32 +0000 (16:24 +0200)] 
Improve Debug::Acquire::http debug output

Prefix all answers with the URL that the answer is for. This
helps when debugging and pipeline is enabled.

10 years agoMerge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Michael Vogt [Fri, 5 Sep 2014 12:47:22 +0000 (14:47 +0200)] 
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans

10 years agoMerge branch 'debian/sid' into debian/experimental
Michael Vogt [Fri, 5 Sep 2014 12:41:54 +0000 (14:41 +0200)] 
Merge branch 'debian/sid' into debian/experimental

Conflicts:
apt-pkg/acquire-item.cc
configure.ac
debian/changelog
doc/apt-verbatim.ent
doc/po/apt-doc.pot
doc/po/de.po
doc/po/es.po
doc/po/fr.po
doc/po/it.po
doc/po/ja.po
doc/po/pt.po
po/ar.po
po/ast.po
po/bg.po
po/bs.po
po/ca.po
po/cs.po
po/cy.po
po/da.po
po/de.po
po/dz.po
po/el.po
po/es.po
po/eu.po
po/fi.po
po/fr.po
po/gl.po
po/hu.po
po/it.po
po/ja.po
po/km.po
po/ko.po
po/ku.po
po/lt.po
po/mr.po
po/nb.po
po/ne.po
po/nl.po
po/nn.po
po/pl.po
po/pt.po
po/pt_BR.po
po/ro.po
po/ru.po
po/sk.po
po/sl.po
po/sv.po
po/th.po
po/tl.po
po/tr.po
po/uk.po
po/vi.po
po/zh_CN.po
po/zh_TW.po
test/integration/test-ubuntu-bug-346386-apt-get-update-paywall

10 years agoEnsure we have a Policy in CacheFile.BuildDepCache()
Michael Vogt [Fri, 5 Sep 2014 10:50:15 +0000 (12:50 +0200)] 
Ensure we have a Policy in CacheFile.BuildDepCache()

This partly reverts d059cc2 and fixes bug #753297 in a more
general way by ensuring that CacheFile.BuildDepCache() builds
a pkgPolicy if there isn't one already.

10 years agoFix incorrect upgradable listing in "apt list" (thanks to Michael Musenbrock)
Michael Vogt [Fri, 5 Sep 2014 10:03:28 +0000 (12:03 +0200)] 
Fix incorrect upgradable listing in "apt list" (thanks to Michael Musenbrock)

The "apt list" command was using only the pkgDepCache but not the
pkgPolicy to figure out if a package is upgradable. This lead to
incorrect display of upgradable package when the user used the
policy to pin-down packages. Thanks to Michael Musenbrock for the
initial patch.

Closes: #753297
10 years agotest/integration/test-ubuntu-bug-346386-apt-get-update-paywall: use downloadfile()
Michael Vogt [Wed, 3 Sep 2014 14:54:16 +0000 (16:54 +0200)] 
test/integration/test-ubuntu-bug-346386-apt-get-update-paywall: use downloadfile()

10 years agoRun autopkgtest tests with "env -i" to avoid pollution from the host env
Michael Vogt [Tue, 2 Sep 2014 15:30:45 +0000 (17:30 +0200)] 
Run autopkgtest tests with "env -i" to avoid pollution from the host env

Closes: #759655
10 years agoMake Packages & Sources generation optional, during Generate call
Dimitri John Ledkov [Fri, 18 Jul 2014 15:06:34 +0000 (16:06 +0100)] 
Make Packages & Sources generation optional, during Generate call

refactor a bit, extract code out of Generate() into
DoGenerate{PackagesAndSources,Contents}, add new
APT::FTPArchive::ContentsOnly option to allow skipping the generation
of Package/Source files (if they are generated e.g. by some db outside
of apt-ftparchives control)

10 years agoUse heap to allocate PatternMatch to avoid potential stack overflow
Michael Vogt [Tue, 2 Sep 2014 15:06:52 +0000 (17:06 +0200)] 
Use heap to allocate PatternMatch to avoid potential stack overflow

When apt-cache search with many args (> 130) is given the allocation
of PatternMatch on the stack may fail resulting in a segmentation
fault. By using the heap the max size is much bigger and we also
get a bad_alloc expection instead of a segfault (which we can catch
*if* this ever becomes a pratical problem). No test for the crash
as its not reproducable with the MALLOC_ settings in framework.

Closes: 759612
10 years ago* apt-pkg/deb/dpkgpm.cc:
Michael Vogt [Tue, 2 Sep 2014 15:24:24 +0000 (17:24 +0200)] 
* apt-pkg/deb/dpkgpm.cc:
    - update string matching for dpkg I/O errors. (LP: #1363257)
    - properly parse the dpkg status line so that package name is properly set
      and an apport report is created. Thanks to Anders Kaseorg for the patch.
      (LP: #1353171)

10 years agoAdd testcase for apt list --all-versions
Michael Vogt [Tue, 2 Sep 2014 14:36:32 +0000 (16:36 +0200)] 
Add testcase for apt list --all-versions

Dch-Ignore: true