summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--Makefile15
-rw-r--r--apt-inst/contrib/arfile.h4
-rw-r--r--apt-inst/contrib/extracttar.cc5
-rw-r--r--apt-inst/contrib/extracttar.h8
-rw-r--r--apt-inst/deb/debfile.cc8
-rw-r--r--apt-inst/deb/debfile.h14
-rw-r--r--apt-inst/dirstream.h12
-rw-r--r--apt-inst/extract.h6
-rw-r--r--apt-inst/makefile2
-rw-r--r--apt-pkg/acquire-item.cc3210
-rw-r--r--apt-pkg/acquire-item.h873
-rw-r--r--apt-pkg/acquire-method.cc27
-rw-r--r--apt-pkg/acquire-method.h14
-rw-r--r--apt-pkg/acquire-worker.cc409
-rw-r--r--apt-pkg/acquire-worker.h8
-rw-r--r--apt-pkg/acquire.cc163
-rw-r--r--apt-pkg/acquire.h60
-rw-r--r--apt-pkg/algorithms.cc42
-rw-r--r--apt-pkg/algorithms.h32
-rw-r--r--apt-pkg/aptconfiguration.cc3
-rw-r--r--apt-pkg/aptconfiguration.h23
-rw-r--r--apt-pkg/cachefile.cc41
-rw-r--r--apt-pkg/cachefile.h30
-rw-r--r--apt-pkg/cachefilter.h60
-rw-r--r--apt-pkg/cacheiterators.h201
-rw-r--r--apt-pkg/cacheset.cc135
-rw-r--r--apt-pkg/cacheset.h527
-rw-r--r--apt-pkg/cdrom.cc13
-rw-r--r--apt-pkg/cdrom.h11
-rw-r--r--apt-pkg/clean.cc3
-rw-r--r--apt-pkg/clean.h4
-rw-r--r--apt-pkg/contrib/cdromutl.cc2
-rw-r--r--apt-pkg/contrib/cmndline.cc8
-rw-r--r--apt-pkg/contrib/configuration.cc10
-rw-r--r--apt-pkg/contrib/configuration.h11
-rw-r--r--apt-pkg/contrib/fileutl.cc81
-rw-r--r--apt-pkg/contrib/fileutl.h32
-rw-r--r--apt-pkg/contrib/gpgv.cc19
-rw-r--r--apt-pkg/contrib/gpgv.h5
-rw-r--r--apt-pkg/contrib/hashes.cc52
-rw-r--r--apt-pkg/contrib/hashes.h18
-rw-r--r--apt-pkg/contrib/hashsum_template.h2
-rw-r--r--apt-pkg/contrib/macros.h10
-rw-r--r--apt-pkg/contrib/md5.h2
-rw-r--r--apt-pkg/contrib/progress.h5
-rw-r--r--apt-pkg/contrib/sha1.h2
-rw-r--r--apt-pkg/contrib/sha2.h6
-rw-r--r--apt-pkg/contrib/sptr.h12
-rw-r--r--apt-pkg/contrib/strutl.cc19
-rw-r--r--apt-pkg/contrib/strutl.h1
-rw-r--r--apt-pkg/deb/debindexfile.cc779
-rw-r--r--apt-pkg/deb/debindexfile.h205
-rw-r--r--apt-pkg/deb/deblistparser.cc162
-rw-r--r--apt-pkg/deb/deblistparser.h56
-rw-r--r--apt-pkg/deb/debmetaindex.cc1008
-rw-r--r--apt-pkg/deb/debmetaindex.h98
-rw-r--r--apt-pkg/deb/debrecords.cc13
-rw-r--r--apt-pkg/deb/debrecords.h41
-rw-r--r--apt-pkg/deb/debsrcrecords.cc4
-rw-r--r--apt-pkg/deb/debsrcrecords.h30
-rw-r--r--apt-pkg/deb/debsystem.cc5
-rw-r--r--apt-pkg/deb/debsystem.h18
-rw-r--r--apt-pkg/deb/debversion.cc48
-rw-r--r--apt-pkg/deb/debversion.h9
-rw-r--r--apt-pkg/deb/dpkgpm.cc27
-rw-r--r--apt-pkg/deb/dpkgpm.h14
-rw-r--r--apt-pkg/depcache.cc276
-rw-r--r--apt-pkg/depcache.h41
-rw-r--r--apt-pkg/edsp.cc154
-rw-r--r--apt-pkg/edsp.h44
-rw-r--r--apt-pkg/edsp/edspindexfile.cc83
-rw-r--r--apt-pkg/edsp/edspindexfile.h27
-rw-r--r--apt-pkg/edsp/edsplistparser.cc9
-rw-r--r--apt-pkg/edsp/edsplistparser.h16
-rw-r--r--apt-pkg/edsp/edspsystem.cc21
-rw-r--r--apt-pkg/edsp/edspsystem.h22
-rw-r--r--apt-pkg/indexcopy.cc31
-rw-r--r--apt-pkg/indexcopy.h49
-rw-r--r--apt-pkg/indexfile.cc288
-rw-r--r--apt-pkg/indexfile.h145
-rw-r--r--apt-pkg/indexrecords.cc296
-rw-r--r--apt-pkg/indexrecords.h96
-rw-r--r--apt-pkg/init.cc28
-rw-r--r--apt-pkg/install-progress.cc23
-rw-r--r--apt-pkg/install-progress.h45
-rw-r--r--apt-pkg/metaindex.cc85
-rw-r--r--apt-pkg/metaindex.h83
-rw-r--r--apt-pkg/orderlist.cc26
-rw-r--r--apt-pkg/orderlist.h6
-rw-r--r--apt-pkg/packagemanager.cc51
-rw-r--r--apt-pkg/packagemanager.h14
-rw-r--r--apt-pkg/pkgcache.cc304
-rw-r--r--apt-pkg/pkgcache.h264
-rw-r--r--apt-pkg/pkgcachegen.cc1007
-rw-r--r--apt-pkg/pkgcachegen.h71
-rw-r--r--apt-pkg/pkgrecords.cc3
-rw-r--r--apt-pkg/pkgrecords.h19
-rw-r--r--apt-pkg/pkgsystem.cc5
-rw-r--r--apt-pkg/pkgsystem.h18
-rw-r--r--apt-pkg/policy.cc130
-rw-r--r--apt-pkg/policy.h18
-rw-r--r--apt-pkg/sourcelist.cc308
-rw-r--r--apt-pkg/sourcelist.h51
-rw-r--r--apt-pkg/srcrecords.cc6
-rw-r--r--apt-pkg/srcrecords.h14
-rw-r--r--apt-pkg/tagfile.cc130
-rw-r--r--apt-pkg/tagfile.h40
-rw-r--r--apt-pkg/update.cc3
-rw-r--r--apt-pkg/upgrade.cc6
-rw-r--r--apt-pkg/upgrade.h5
-rw-r--r--apt-pkg/vendor.cc41
-rw-r--r--apt-pkg/vendor.h37
-rw-r--r--apt-pkg/vendorlist.cc164
-rw-r--r--apt-pkg/vendorlist.h54
-rw-r--r--apt-pkg/version.cc3
-rw-r--r--apt-pkg/version.h2
-rw-r--r--apt-pkg/versionmatch.cc84
-rw-r--r--apt-pkg/versionmatch.h5
-rw-r--r--apt-private/acqprogress.cc46
-rw-r--r--apt-private/acqprogress.h19
-rw-r--r--apt-private/private-cachefile.cc61
-rw-r--r--apt-private/private-cachefile.h77
-rw-r--r--apt-private/private-cacheset.cc209
-rw-r--r--apt-private/private-cacheset.h248
-rw-r--r--apt-private/private-cmndline.cc14
-rw-r--r--apt-private/private-download.cc19
-rw-r--r--apt-private/private-download.h3
-rw-r--r--apt-private/private-install.cc296
-rw-r--r--apt-private/private-list.cc2
-rw-r--r--apt-private/private-main.cc8
-rw-r--r--apt-private/private-moo.h2
-rw-r--r--apt-private/private-output.cc346
-rw-r--r--apt-private/private-output.h67
-rw-r--r--apt-private/private-show.cc2
-rw-r--r--apt-private/private-update.cc3
-rw-r--r--buildlib/config.h.in4
-rw-r--r--buildlib/environment.mak.in10
-rw-r--r--buildlib/library.mak10
-rw-r--r--buildlib/libversion.mak6
-rw-r--r--buildlib/po4a_manpage.mak1
-rw-r--r--cmdline/apt-cache.cc111
-rw-r--r--cmdline/apt-cdrom.cc10
-rw-r--r--cmdline/apt-extracttemplates.h6
-rw-r--r--cmdline/apt-get.cc407
-rw-r--r--cmdline/apt-internal-solver.cc1
-rw-r--r--cmdline/apt-key.in218
-rw-r--r--cmdline/apt-mark.cc2
-rw-r--r--cmdline/apt.cc3
-rw-r--r--configure.ac4
-rw-r--r--debian/NEWS12
-rw-r--r--debian/apt.conf.autoremove8
-rw-r--r--debian/apt.cron.daily15
-rw-r--r--debian/changelog348
-rw-r--r--debian/control17
-rw-r--r--debian/gbp.conf3
-rw-r--r--debian/libapt-inst1.6.symbols91
-rw-r--r--debian/libapt-inst2.0.install.in (renamed from debian/libapt-inst1.6.install.in)0
-rw-r--r--debian/libapt-inst2.0.symbols72
-rw-r--r--debian/libapt-pkg4.15.symbols1431
-rw-r--r--debian/libapt-pkg5.0.install.in (renamed from debian/libapt-pkg4.15.install.in)0
-rw-r--r--debian/libapt-pkg5.0.symbols1503
-rw-r--r--doc/acquire-additional-files.txt233
-rw-r--r--doc/apt-cache.8.xml22
-rw-r--r--doc/apt-get.8.xml91
-rw-r--r--doc/apt.8.xml8
-rw-r--r--doc/apt.conf.5.xml70
-rw-r--r--doc/apt_preferences.5.xml31
-rw-r--r--doc/dpkg-tech.dbk10
-rw-r--r--doc/examples/configure-index11
-rw-r--r--doc/files.dbk6
-rw-r--r--doc/po/apt-doc.pot5
-rw-r--r--doc/po/de.po8
-rw-r--r--doc/po/es.po8
-rw-r--r--doc/po/fr.po8
-rw-r--r--doc/po/it.po10
-rw-r--r--doc/po/ja.po10
-rw-r--r--doc/po/pl.po8
-rw-r--r--doc/po/pt.po8
-rw-r--r--doc/po/pt_BR.po6
-rw-r--r--doc/sources.list.5.xml364
-rwxr-xr-xdselect/install12
-rwxr-xr-xdselect/update2
-rw-r--r--ftparchive/apt-ftparchive.cc74
-rw-r--r--ftparchive/cachedb.cc1
-rw-r--r--ftparchive/contents.h2
-rw-r--r--ftparchive/writer.cc51
-rw-r--r--ftparchive/writer.h22
-rw-r--r--methods/cdrom.cc7
-rw-r--r--methods/copy.cc10
-rw-r--r--methods/file.cc54
-rw-r--r--methods/ftp.cc3
-rw-r--r--methods/ftp.h6
-rw-r--r--methods/gpgv.cc87
-rw-r--r--methods/gzip.cc4
-rw-r--r--methods/http.h34
-rw-r--r--methods/https.h34
-rw-r--r--methods/mirror.h10
-rw-r--r--methods/rred.cc124
-rw-r--r--methods/rsh.cc22
-rw-r--r--methods/rsh.h5
-rw-r--r--methods/server.h4
-rw-r--r--po/apt-all.pot22
-rw-r--r--po/ar.po24
-rw-r--r--po/ast.po24
-rw-r--r--po/bg.po24
-rw-r--r--po/bs.po10
-rw-r--r--po/ca.po24
-rw-r--r--po/cs.po26
-rw-r--r--po/cy.po26
-rw-r--r--po/da.po24
-rw-r--r--po/de.po24
-rw-r--r--po/dz.po24
-rw-r--r--po/el.po26
-rw-r--r--po/es.po24
-rw-r--r--po/eu.po26
-rw-r--r--po/fi.po24
-rw-r--r--po/fr.po28
-rw-r--r--po/gl.po26
-rw-r--r--po/he.po16
-rw-r--r--po/hu.po26
-rw-r--r--po/it.po27
-rw-r--r--po/ja.po24
-rw-r--r--po/km.po26
-rw-r--r--po/ko.po26
-rw-r--r--po/ku.po20
-rw-r--r--po/lt.po26
-rw-r--r--po/mr.po24
-rw-r--r--po/nb.po24
-rw-r--r--po/ne.po26
-rw-r--r--po/nl.po24
-rw-r--r--po/nn.po26
-rw-r--r--po/pl.po24
-rw-r--r--po/pt.po26
-rw-r--r--po/pt_BR.po26
-rw-r--r--po/ro.po26
-rw-r--r--po/ru.po3141
-rw-r--r--po/sk.po26
-rw-r--r--po/sl.po24
-rw-r--r--po/sv.po26
-rw-r--r--po/th.po26
-rw-r--r--po/tl.po26
-rw-r--r--po/tr.po1911
-rw-r--r--po/uk.po26
-rw-r--r--po/vi.po24
-rw-r--r--po/zh_CN.po58
-rw-r--r--po/zh_TW.po26
-rwxr-xr-xprepare-release9
-rw-r--r--test/integration/framework139
-rwxr-xr-xtest/integration/skip-aptwebserver25
-rwxr-xr-xtest/integration/test-acquire-same-file-multiple-times80
-rwxr-xr-xtest/integration/test-acquire-same-repository-multiple-times81
-rwxr-xr-xtest/integration/test-allow98
-rwxr-xr-xtest/integration/test-allow-scores-for-all-dependency-types4
-rwxr-xr-xtest/integration/test-apt-acquire-additional-files111
-rwxr-xr-xtest/integration/test-apt-by-hash-update12
-rwxr-xr-xtest/integration/test-apt-cache104
-rwxr-xr-xtest/integration/test-apt-cdrom8
-rwxr-xr-xtest/integration/test-apt-cli-show2
-rwxr-xr-xtest/integration/test-apt-cli-update4
-rwxr-xr-xtest/integration/test-apt-download-progress9
-rwxr-xr-xtest/integration/test-apt-get-autoremove26
-rwxr-xr-xtest/integration/test-apt-get-changelog104
-rwxr-xr-xtest/integration/test-apt-get-download2
-rwxr-xr-xtest/integration/test-apt-get-install-deb51
-rwxr-xr-xtest/integration/test-apt-get-source42
-rwxr-xr-xtest/integration/test-apt-get-source-arch23
-rwxr-xr-xtest/integration/test-apt-get-source-authenticated2
-rwxr-xr-xtest/integration/test-apt-get-source-multisources12
-rwxr-xr-xtest/integration/test-apt-get-update-unauth-warning54
-rwxr-xr-xtest/integration/test-apt-helper26
-rwxr-xr-xtest/integration/test-apt-key117
-rwxr-xr-xtest/integration/test-apt-move-and-forget-manual-sections31
-rwxr-xr-xtest/integration/test-apt-never-markauto-sections86
-rwxr-xr-xtest/integration/test-apt-progress-fd2
-rwxr-xr-xtest/integration/test-apt-showlist-orgroup-in-recommends158
-rwxr-xr-xtest/integration/test-apt-sources-deb822132
-rwxr-xr-xtest/integration/test-apt-translation-has-no-packages4
-rwxr-xr-xtest/integration/test-apt-update-expected-size6
-rwxr-xr-xtest/integration/test-apt-update-file29
-rwxr-xr-xtest/integration/test-apt-update-filesize-mismatch2
-rwxr-xr-xtest/integration/test-apt-update-hashsum-mismatch2
-rwxr-xr-xtest/integration/test-apt-update-ims54
-rwxr-xr-xtest/integration/test-apt-update-nofallback28
-rwxr-xr-xtest/integration/test-apt-update-not-modified94
-rwxr-xr-xtest/integration/test-apt-update-rollback24
-rwxr-xr-xtest/integration/test-apt-update-stale9
-rwxr-xr-xtest/integration/test-apt-update-transactions32
-rwxr-xr-xtest/integration/test-architecture-specification-parsing6
-rwxr-xr-xtest/integration/test-bug-470115-new-and-tighten-recommends20
-rwxr-xr-xtest/integration/test-bug-543966-downgrade-below-1000-pin27
-rwxr-xr-xtest/integration/test-bug-549968-install-depends-of-not-installed2
-rwxr-xr-xtest/integration/test-bug-590041-prefer-non-virtual-packages2
-rwxr-xr-xtest/integration/test-bug-595691-empty-and-broken-archive-files35
-rwxr-xr-xtest/integration/test-bug-596498-trusted-unsigned-repo25
-rwxr-xr-xtest/integration/test-bug-602412-dequote-redirect2
-rwxr-xr-xtest/integration/test-bug-604222-new-and-autoremove30
-rwxr-xr-xtest/integration/test-bug-611729-mark-as-manual6
-rwxr-xr-xtest/integration/test-bug-612099-multiarch-conflicts8
-rwxr-xr-xtest/integration/test-bug-612557-garbage-upgrade4
-rwxr-xr-xtest/integration/test-bug-612958-use-dpkg-multiarch-config19
-rwxr-xr-xtest/integration/test-bug-613420-new-garbage-dependency18
-rwxr-xr-xtest/integration/test-bug-632221-cross-dependency-satisfaction26
-rwxr-xr-xtest/integration/test-bug-675449-essential-are-protected14
-rwxr-xr-xtest/integration/test-bug-686346-package-missing-architecture10
-rwxr-xr-xtest/integration/test-bug-709560-set-candidate-release2
-rwxr-xr-xtest/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch2
-rwxr-xr-xtest/integration/test-bug-722207-print-uris-even-if-very-quiet15
-rwxr-xr-xtest/integration/test-bug-723586-any-stripped-in-single-arch4
-rwxr-xr-xtest/integration/test-bug-723705-tagfile-truncates-fields2
-rwxr-xr-xtest/integration/test-bug-735967-lib32-to-i386-unavailable2
-rwxr-xr-xtest/integration/test-bug-738785-switch-protocol29
-rwxr-xr-xtest/integration/test-bug-758153-versioned-provides-support90
-rwxr-xr-xtest/integration/test-bug-multiarch-upgrade2
-rwxr-xr-xtest/integration/test-compressed-indexes2
-rwxr-xr-xtest/integration/test-cve-2013-1051-InRelease-parsing19
-rwxr-xr-xtest/integration/test-essential-force-loopbreak2
-rwxr-xr-xtest/integration/test-handle-redirect-as-used-mirror-change23
-rwxr-xr-xtest/integration/test-handling-broken-orgroups10
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-breaks16
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-conflicts16
-rwxr-xr-xtest/integration/test-kernel-helper-autoremove16
-rwxr-xr-xtest/integration/test-method-rred194
-rwxr-xr-xtest/integration/test-multiarch-allowed245
-rwxr-xr-xtest/integration/test-multiarch-foreign49
-rwxr-xr-xtest/integration/test-ordering-ignore-not-matching-breaks56
-rwxr-xr-xtest/integration/test-parse-all-archs-into-cache91
-rwxr-xr-xtest/integration/test-pdiff-usage49
-rwxr-xr-xtest/integration/test-policy-pinning150
-rwxr-xr-xtest/integration/test-prefer-higher-priority-providers10
-rwxr-xr-xtest/integration/test-prefer-native-architecture-over-higher-priority2
-rwxr-xr-xtest/integration/test-prevent-markinstall-multiarch-same-versionscrew2
-rwxr-xr-xtest/integration/test-release-candidate-switching32
-rwxr-xr-xtest/integration/test-releasefile-valid-until9
-rwxr-xr-xtest/integration/test-releasefile-verification65
-rwxr-xr-xtest/integration/test-sourceslist-lang-plusminus-options87
-rwxr-xr-xtest/integration/test-sourceslist-trusted-options17
-rwxr-xr-xtest/integration/test-specific-architecture-dependencies20
-rwxr-xr-xtest/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum28
-rwxr-xr-xtest/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings12
-rwxr-xr-xtest/integration/test-ubuntu-bug-346386-apt-get-update-paywall11
-rwxr-xr-xtest/integration/test-ubuntu-bug-6149932
-rwxr-xr-xtest/integration/test-ubuntu-bug-784473-InRelease-one-message-only5
-rwxr-xr-xtest/integration/test-ubuntu-bug-806274-install-suggests8
-rwxr-xr-xtest/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first4
-rwxr-xr-xtest/integration/test-unpack-different-version-unpacked12
-rwxr-xr-xtest/integration/test-xorg-break-providers2
-rw-r--r--test/interactive-helper/testdeb.cc2
-rw-r--r--test/libapt/acqprogress_test.cc52
-rw-r--r--test/libapt/cdrom_test.cc7
-rw-r--r--test/libapt/file-helpers.cc18
-rw-r--r--test/libapt/file-helpers.h2
-rw-r--r--test/libapt/fileutl_test.cc6
-rw-r--r--test/libapt/hashsums_test.cc3
-rw-r--r--test/libapt/indexcopytosourcelist_test.cc8
-rw-r--r--test/libapt/makefile3
-rw-r--r--test/libapt/sourcelist_test.cc20
-rw-r--r--test/libapt/uri_test.cc39
-rw-r--r--vendor/README8
-rw-r--r--vendor/blankon/apt-vendor.ent9
-rw-r--r--vendor/debian/apt-vendor.ent12
-rw-r--r--vendor/debian/sources.list.in3
-rw-r--r--vendor/raspbian/apt-vendor.ent6
-rw-r--r--vendor/steamos/apt-vendor.ent7
-rw-r--r--vendor/steamos/sources.list.in4
-rw-r--r--vendor/tanglu/apt-vendor.ent6
-rw-r--r--vendor/ubuntu/apt-vendor.ent13
-rw-r--r--vendor/ubuntu/apt.conf-01-vendor-ubuntu6
368 files changed, 17360 insertions, 13251 deletions
diff --git a/.travis.yml b/.travis.yml
index b449aeba5..993492b7e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,11 @@
language: cpp
before_install:
+ - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -q
+install:
- sudo ./prepare-release travis-ci
+ - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+ - sudo apt-get -qq update
+ - sudo apt-get -qq install g++-4.8
+ - export CXX=g++-4.8
script: make && make test && test/integration/run-tests
diff --git a/Makefile b/Makefile
index 6e1edbd5f..7680f0842 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ endif
.PHONY: default
default: startup all
-.PHONY: headers library clean veryclean all binary program doc test update-po
+.PHONY: fast headers library clean veryclean all binary program doc test update-po
all headers library clean veryclean binary program doc manpages docbook test update-po startup dirs:
$(MAKE) -C vendor $@
$(MAKE) -C apt-pkg $@
@@ -21,7 +21,18 @@ all headers library clean veryclean binary program doc manpages docbook test upd
$(MAKE) -C dselect $@
$(MAKE) -C doc $@
$(MAKE) -C po $@
- $(MAKE) -C test $@
+ # FIXME: -C test has issue swith parallel builds, investigate!
+ -$(MAKE) -C test $@
+
+fast:
+ $(MAKE) -C vendor all
+ $(MAKE) -C apt-pkg all
+ $(MAKE) -C apt-inst all
+ $(MAKE) -C apt-private all
+ $(MAKE) -C methods all
+ $(MAKE) -C cmdline all
+ $(MAKE) -C ftparchive all
+ $(MAKE) -C test all
all headers library clean veryclean binary program doc manpages docbook test update-po: startup dirs
diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h
index f53356847..297303a9d 100644
--- a/apt-inst/contrib/arfile.h
+++ b/apt-inst/contrib/arfile.h
@@ -62,11 +62,7 @@ struct ARArchive::Member
unsigned long long Size;
// Location of the data.
-#if APT_PKG_ABI >= 413
unsigned long long Start;
-#else
- unsigned long Start;
-#endif
Member *Next;
Member() : Start(0), Next(0) {};
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index be0b69d96..2c86d0d01 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -60,13 +60,8 @@ struct ExtractTar::TarHeader
// ExtractTar::ExtractTar - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-#if APT_PKG_ABI >= 413
ExtractTar::ExtractTar(FileFd &Fd,unsigned long long Max,string DecompressionProgram)
: File(Fd), MaxInSize(Max), DecompressProg(DecompressionProgram)
-#else
-ExtractTar::ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram)
- : File(Fd), MaxInSize(Max), DecompressProg(DecompressionProgram)
-#endif
{
GZPid = -1;
Eof = false;
diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h
index 57be956bd..22bb69e66 100644
--- a/apt-inst/contrib/extracttar.h
+++ b/apt-inst/contrib/extracttar.h
@@ -40,11 +40,7 @@ class ExtractTar
GNU_LongLink = 'K',GNU_LongName = 'L'};
FileFd &File;
-#if APT_PKG_ABI >= 413
unsigned long long MaxInSize;
-#else
- unsigned long MaxInSize;
-#endif
int GZPid;
FileFd InFd;
bool Eof;
@@ -58,11 +54,7 @@ class ExtractTar
bool Go(pkgDirStream &Stream);
-#if APT_PKG_ABI >= 413
ExtractTar(FileFd &Fd,unsigned long long Max,std::string DecompressionProgram);
-#else
- ExtractTar(FileFd &Fd,unsigned long Max,std::string DecompressionProgram);
-#endif
virtual ~ExtractTar();
};
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc
index a8bf754e4..4853a13c7 100644
--- a/apt-inst/deb/debfile.cc
+++ b/apt-inst/deb/debfile.cc
@@ -203,11 +203,7 @@ bool debDebFile::MemControlExtract::DoItem(Item &Itm,int &Fd)
/* Just memcopy the block from the tar extractor and put it in the right
place in the pre-allocated memory block. */
bool debDebFile::MemControlExtract::Process(Item &/*Itm*/,const unsigned char *Data,
-#if APT_PKG_ABI >= 413
unsigned long long Size,unsigned long long Pos)
-#else
- unsigned long Size,unsigned long Pos)
-#endif
{
memcpy(Control + Pos, Data,Size);
return true;
@@ -236,11 +232,7 @@ bool debDebFile::MemControlExtract::Read(debDebFile &Deb)
// ---------------------------------------------------------------------
/* The given memory block is loaded into the parser and parsed as a control
record. */
-#if APT_PKG_ABI >= 413
bool debDebFile::MemControlExtract::TakeControl(const void *Data,unsigned long long Size)
-#else
-bool debDebFile::MemControlExtract::TakeControl(const void *Data,unsigned long Size)
-#endif
{
delete [] Control;
Control = new char[Size+2];
diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h
index 9d286716a..02ebaae2e 100644
--- a/apt-inst/deb/debfile.h
+++ b/apt-inst/deb/debfile.h
@@ -65,7 +65,7 @@ class debDebFile::ControlExtract : public pkgDirStream
{
public:
- virtual bool DoItem(Item &Itm,int &Fd);
+ virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
};
class debDebFile::MemControlExtract : public pkgDirStream
@@ -80,21 +80,13 @@ class debDebFile::MemControlExtract : public pkgDirStream
std::string Member;
// Members from DirStream
- virtual bool DoItem(Item &Itm,int &Fd);
+ virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
virtual bool Process(Item &Itm,const unsigned char *Data,
-#if APT_PKG_ABI >= 413
- unsigned long long Size,unsigned long long Pos);
-#else
- unsigned long Size,unsigned long Pos);
-#endif
+ unsigned long long Size,unsigned long long Pos) APT_OVERRIDE;
// Helpers
bool Read(debDebFile &Deb);
-#if APT_PKG_ABI >= 413
bool TakeControl(const void *Data,unsigned long long Size);
-#else
- bool TakeControl(const void *Data,unsigned long Size);
-#endif
MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {};
MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
diff --git a/apt-inst/dirstream.h b/apt-inst/dirstream.h
index 53ac24ba5..dac965db7 100644
--- a/apt-inst/dirstream.h
+++ b/apt-inst/dirstream.h
@@ -38,15 +38,10 @@ class pkgDirStream
Directory, FIFO} Type;
char *Name;
char *LinkTarget;
-#if APT_PKG_ABI >= 413
- unsigned long long Size;
-#endif
unsigned long Mode;
unsigned long UID;
unsigned long GID;
-#if APT_PKG_ABI < 413
- unsigned long Size;
-#endif
+ unsigned long long Size;
unsigned long MTime;
unsigned long Major;
unsigned long Minor;
@@ -55,13 +50,8 @@ class pkgDirStream
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool Fail(Item &Itm,int Fd);
virtual bool FinishedFile(Item &Itm,int Fd);
-#if APT_PKG_ABI >= 413
virtual bool Process(Item &/*Itm*/,const unsigned char * /*Data*/,
unsigned long long /*Size*/,unsigned long long /*Pos*/) {return true;};
-#else
- virtual bool Process(Item &/*Itm*/,const unsigned char * /*Data*/,
- unsigned long /*Size*/,unsigned long /*Pos*/) {return true;};
-#endif
virtual ~pkgDirStream() {};
};
diff --git a/apt-inst/extract.h b/apt-inst/extract.h
index 8ad9ac629..a62ff51bd 100644
--- a/apt-inst/extract.h
+++ b/apt-inst/extract.h
@@ -38,9 +38,9 @@ class pkgExtract : public pkgDirStream
public:
- virtual bool DoItem(Item &Itm,int &Fd);
- virtual bool Fail(Item &Itm,int Fd);
- virtual bool FinishedFile(Item &Itm,int Fd);
+ virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
+ virtual bool Fail(Item &Itm,int Fd) APT_OVERRIDE;
+ virtual bool FinishedFile(Item &Itm,int Fd) APT_OVERRIDE;
bool Finished();
bool Aborted();
diff --git a/apt-inst/makefile b/apt-inst/makefile
index e4a3ae702..2883cbcb0 100644
--- a/apt-inst/makefile
+++ b/apt-inst/makefile
@@ -14,7 +14,7 @@ include ../buildlib/libversion.mak
# The library name
LIBRARY=apt-inst
-MAJOR=1.6
+MAJOR=2.0
MINOR=0
SLIBS=$(PTHREADLIB) -lapt-pkg
APT_DOMAIN:=libapt-inst$(MAJOR)
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 8155b9bfe..26c835444 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -22,15 +22,15 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/sha1.h>
#include <apt-pkg/tagfile.h>
-#include <apt-pkg/indexrecords.h>
+#include <apt-pkg/metaindex.h>
#include <apt-pkg/acquire.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/gpgv.h>
#include <stddef.h>
#include <stdlib.h>
@@ -41,9 +41,9 @@
#include <unistd.h>
#include <errno.h>
#include <string>
-#include <sstream>
#include <stdio.h>
#include <ctime>
+#include <sstream>
#include <apti18n.h>
/*}}}*/
@@ -79,25 +79,38 @@ static std::string GetFinalFileNameFromURI(std::string const &uri) /*{{{*/
return _config->FindDir("Dir::State::lists") + URItoFileName(uri);
}
/*}}}*/
-static std::string GetCompressedFileName(std::string const &URI, std::string const &Name, std::string const &Ext) /*{{{*/
+static std::string GetCompressedFileName(IndexTarget const &Target, std::string const &Name, std::string const &Ext) /*{{{*/
{
if (Ext.empty() || Ext == "uncompressed")
return Name;
// do not reverify cdrom sources as apt-cdrom may rewrite the Packages
// file when its doing the indexcopy
- if (URI.substr(0,6) == "cdrom:")
+ if (Target.URI.substr(0,6) == "cdrom:")
return Name;
// adjust DestFile if its compressed on disk
- if (_config->FindB("Acquire::GzipIndexes",false) == true)
+ if (Target.KeepCompressed == true)
return Name + '.' + Ext;
return Name;
}
/*}}}*/
-static bool AllowInsecureRepositories(indexRecords const * const MetaIndexParser, pkgAcqMetaBase * const TransactionManager, pkgAcquire::Item * const I) /*{{{*/
+static std::string GetMergeDiffsPatchFileName(std::string const &Final, std::string const &Patch)/*{{{*/
+{
+ // rred expects the patch as $FinalFile.ed.$patchname.gz
+ return Final + ".ed." + Patch + ".gz";
+}
+ /*}}}*/
+static std::string GetDiffsPatchFileName(std::string const &Final) /*{{{*/
+{
+ // rred expects the patch as $FinalFile.ed
+ return Final + ".ed";
+}
+ /*}}}*/
+
+static bool AllowInsecureRepositories(metaIndex const * const MetaIndexParser, pkgAcqMetaClearSig * const TransactionManager, pkgAcquire::Item * const I) /*{{{*/
{
- if(MetaIndexParser->IsAlwaysTrusted() || _config->FindB("Acquire::AllowInsecureRepositories") == true)
+ if(MetaIndexParser->GetTrusted() == metaIndex::TRI_YES || _config->FindB("Acquire::AllowInsecureRepositories") == true)
return true;
_error->Error(_("Use --allow-insecure-repositories to force the update"));
@@ -106,41 +119,343 @@ static bool AllowInsecureRepositories(indexRecords const * const MetaIndexParser
return false;
}
/*}}}*/
+static HashStringList GetExpectedHashesFromFor(metaIndex * const Parser, std::string const &MetaKey)/*{{{*/
+{
+ if (Parser == NULL)
+ return HashStringList();
+ metaIndex::checkSum * const R = Parser->Lookup(MetaKey);
+ if (R == NULL)
+ return HashStringList();
+ return R->Hashes;
+}
+ /*}}}*/
+
+// all ::HashesRequired and ::GetExpectedHashes implementations /*{{{*/
+/* ::GetExpectedHashes is abstract and has to be implemented by all subclasses.
+ It is best to implement it as broadly as possible, while ::HashesRequired defaults
+ to true and should be as restrictive as possible for false cases. Note that if
+ a hash is returned by ::GetExpectedHashes it must match. Only if it doesn't
+ ::HashesRequired is called to evaluate if its okay to have no hashes. */
+APT_CONST bool pkgAcqTransactionItem::HashesRequired() const
+{
+ /* signed repositories obviously have a parser and good hashes.
+ unsigned repositories, too, as even if we can't trust them for security,
+ we can at least trust them for integrity of the download itself.
+ Only repositories without a Release file can (obviously) not have
+ hashes – and they are very uncommon and strongly discouraged */
+ return TransactionManager->MetaIndexParser != NULL &&
+ TransactionManager->MetaIndexParser->GetLoadedSuccessfully() != metaIndex::TRI_UNSET;
+}
+HashStringList pkgAcqTransactionItem::GetExpectedHashes() const
+{
+ return GetExpectedHashesFor(GetMetaKey());
+}
+
+APT_CONST bool pkgAcqMetaBase::HashesRequired() const
+{
+ // Release and co have no hashes 'by design'.
+ return false;
+}
+HashStringList pkgAcqMetaBase::GetExpectedHashes() const
+{
+ return HashStringList();
+}
+
+APT_CONST bool pkgAcqIndexDiffs::HashesRequired() const
+{
+ /* We don't always have the diff of the downloaded pdiff file.
+ What we have for sure is hashes for the uncompressed file,
+ but rred uncompresses them on the fly while parsing, so not handled here.
+ Hashes are (also) checked while searching for (next) patch to apply. */
+ if (State == StateFetchDiff)
+ return available_patches[0].download_hashes.empty() == false;
+ return false;
+}
+HashStringList pkgAcqIndexDiffs::GetExpectedHashes() const
+{
+ if (State == StateFetchDiff)
+ return available_patches[0].download_hashes;
+ return HashStringList();
+}
+
+APT_CONST bool pkgAcqIndexMergeDiffs::HashesRequired() const
+{
+ /* @see #pkgAcqIndexDiffs::HashesRequired, with the difference that
+ we can check the rred result after all patches are applied as
+ we know the expected result rather than potentially apply more patches */
+ if (State == StateFetchDiff)
+ return patch.download_hashes.empty() == false;
+ return State == StateApplyDiff;
+}
+HashStringList pkgAcqIndexMergeDiffs::GetExpectedHashes() const
+{
+ if (State == StateFetchDiff)
+ return patch.download_hashes;
+ else if (State == StateApplyDiff)
+ return GetExpectedHashesFor(Target.MetaKey);
+ return HashStringList();
+}
+
+APT_CONST bool pkgAcqArchive::HashesRequired() const
+{
+ return LocalSource == false;
+}
+HashStringList pkgAcqArchive::GetExpectedHashes() const
+{
+ // figured out while parsing the records
+ return ExpectedHashes;
+}
+
+APT_CONST bool pkgAcqFile::HashesRequired() const
+{
+ // supplied as parameter at creation time, so the caller decides
+ return ExpectedHashes.usable();
+}
+HashStringList pkgAcqFile::GetExpectedHashes() const
+{
+ return ExpectedHashes;
+}
+ /*}}}*/
+// Acquire::Item::QueueURI and specialisations from child classes /*{{{*/
+bool pkgAcquire::Item::QueueURI(pkgAcquire::ItemDesc &Item)
+{
+ Owner->Enqueue(Item);
+ return true;
+}
+/* The idea here is that an item isn't queued if it exists on disk and the
+ transition manager was a hit as this means that the files it contains
+ the checksums for can't be updated either (or they are and we are asking
+ for a hashsum mismatch to happen which helps nobody) */
+bool pkgAcqTransactionItem::QueueURI(pkgAcquire::ItemDesc &Item)
+{
+ std::string const FinalFile = GetFinalFilename();
+ if (TransactionManager != NULL && TransactionManager->IMSHit == true &&
+ FileExists(FinalFile) == true)
+ {
+ PartialFile = DestFile = FinalFile;
+ Status = StatDone;
+ return false;
+ }
+ return pkgAcquire::Item::QueueURI(Item);
+}
+/* The transition manager InRelease itself (or its older sisters-in-law
+ Release & Release.gpg) is always queued as this allows us to rerun gpgv
+ on it to verify that we aren't stalled with old files */
+bool pkgAcqMetaBase::QueueURI(pkgAcquire::ItemDesc &Item)
+{
+ return pkgAcquire::Item::QueueURI(Item);
+}
+/* the Diff/Index needs to queue also the up-to-date complete index file
+ to ensure that the list cleaner isn't eating it */
+bool pkgAcqDiffIndex::QueueURI(pkgAcquire::ItemDesc &Item)
+{
+ if (pkgAcqTransactionItem::QueueURI(Item) == true)
+ return true;
+ QueueOnIMSHit();
+ return false;
+}
+ /*}}}*/
+// Acquire::Item::GetFinalFilename and specialisations for child classes /*{{{*/
+std::string pkgAcquire::Item::GetFinalFilename() const
+{
+ return GetFinalFileNameFromURI(Desc.URI);
+}
+std::string pkgAcqDiffIndex::GetFinalFilename() const
+{
+ // the logic we inherent from pkgAcqBaseIndex isn't what we need here
+ return pkgAcquire::Item::GetFinalFilename();
+}
+std::string pkgAcqIndex::GetFinalFilename() const
+{
+ std::string const FinalFile = GetFinalFileNameFromURI(Target.URI);
+ return GetCompressedFileName(Target, FinalFile, CurrentCompressionExtension);
+}
+std::string pkgAcqMetaSig::GetFinalFilename() const
+{
+ return GetFinalFileNameFromURI(Target.URI);
+}
+std::string pkgAcqBaseIndex::GetFinalFilename() const
+{
+ return GetFinalFileNameFromURI(Target.URI);
+}
+std::string pkgAcqMetaBase::GetFinalFilename() const
+{
+ return GetFinalFileNameFromURI(Target.URI);
+}
+std::string pkgAcqArchive::GetFinalFilename() const
+{
+ return _config->FindDir("Dir::Cache::Archives") + flNotDir(StoreFilename);
+}
+ /*}}}*/
+// pkgAcqTransactionItem::GetMetaKey and specialisations for child classes /*{{{*/
+std::string pkgAcqTransactionItem::GetMetaKey() const
+{
+ return Target.MetaKey;
+}
+std::string pkgAcqIndex::GetMetaKey() const
+{
+ if (Stage == STAGE_DECOMPRESS_AND_VERIFY || CurrentCompressionExtension == "uncompressed")
+ return Target.MetaKey;
+ return Target.MetaKey + "." + CurrentCompressionExtension;
+}
+std::string pkgAcqDiffIndex::GetMetaKey() const
+{
+ return Target.MetaKey + ".diff/Index";
+}
+ /*}}}*/
+//pkgAcqTransactionItem::TransactionState and specialisations for child classes /*{{{*/
+bool pkgAcqTransactionItem::TransactionState(TransactionStates const state)
+{
+ bool const Debug = _config->FindB("Debug::Acquire::Transaction", false);
+ switch(state)
+ {
+ case TransactionAbort:
+ if(Debug == true)
+ std::clog << " Cancel: " << DestFile << std::endl;
+ if (Status == pkgAcquire::Item::StatIdle)
+ {
+ Status = pkgAcquire::Item::StatDone;
+ Dequeue();
+ }
+ break;
+ case TransactionCommit:
+ if(PartialFile != "")
+ {
+ if(Debug == true)
+ std::clog << "mv " << PartialFile << " -> "<< DestFile << " # " << DescURI() << std::endl;
+
+ Rename(PartialFile, DestFile);
+ } else {
+ if(Debug == true)
+ std::clog << "rm " << DestFile << " # " << DescURI() << std::endl;
+ unlink(DestFile.c_str());
+ }
+ break;
+ }
+ return true;
+}
+bool pkgAcqMetaBase::TransactionState(TransactionStates const state)
+{
+ // Do not remove InRelease on IMSHit of Release.gpg [yes, this is very edgecasey]
+ if (TransactionManager->IMSHit == false)
+ return pkgAcqTransactionItem::TransactionState(state);
+ return true;
+}
+bool pkgAcqIndex::TransactionState(TransactionStates const state)
+{
+ if (pkgAcqTransactionItem::TransactionState(state) == false)
+ return false;
+
+ switch (state)
+ {
+ case TransactionAbort:
+ if (Stage == STAGE_DECOMPRESS_AND_VERIFY)
+ {
+ // keep the compressed file, but drop the decompressed
+ EraseFileName.clear();
+ if (PartialFile.empty() == false && flExtension(PartialFile) == "decomp")
+ unlink(PartialFile.c_str());
+ }
+ break;
+ case TransactionCommit:
+ if (EraseFileName.empty() == false)
+ unlink(EraseFileName.c_str());
+ break;
+ }
+ return true;
+}
+bool pkgAcqDiffIndex::TransactionState(TransactionStates const state)
+{
+ if (pkgAcqTransactionItem::TransactionState(state) == false)
+ return false;
+
+ switch (state)
+ {
+ case TransactionCommit:
+ break;
+ case TransactionAbort:
+ std::string const Partial = GetPartialFileNameFromURI(Target.URI);
+ unlink(Partial.c_str());
+ break;
+ }
+
+ return true;
+}
+ /*}}}*/
+class APT_HIDDEN NoActionItem : public pkgAcquire::Item /*{{{*/
+/* The sole purpose of this class is having an item which does nothing to
+ reach its done state to prevent cleanup deleting the mentioned file.
+ Handy in cases in which we know we have the file already, like IMS-Hits. */
+{
+ IndexTarget const Target;
+ public:
+ virtual std::string DescURI() const APT_OVERRIDE {return Target.URI;};
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE {return HashStringList();};
+
+ NoActionItem(pkgAcquire * const Owner, IndexTarget const &Target) :
+ pkgAcquire::Item(Owner), Target(Target)
+ {
+ Status = StatDone;
+ DestFile = GetFinalFileNameFromURI(Target.URI);
+ }
+};
+ /*}}}*/
// Acquire::Item::Item - Constructor /*{{{*/
APT_IGNORE_DEPRECATED_PUSH
-pkgAcquire::Item::Item(pkgAcquire *Owner,
- HashStringList const &ExpectedHashes,
- pkgAcqMetaBase *TransactionManager)
- : Owner(Owner), FileSize(0), PartialSize(0), Mode(0), ID(0), Complete(false),
- Local(false), QueueCounter(0), TransactionManager(TransactionManager),
- ExpectedAdditionalItems(0), ExpectedHashes(ExpectedHashes)
+pkgAcquire::Item::Item(pkgAcquire * const owner) :
+ FileSize(0), PartialSize(0), Mode(0), ID(0), Complete(false), Local(false),
+ QueueCounter(0), ExpectedAdditionalItems(0), Owner(owner), d(NULL)
{
Owner->Add(this);
Status = StatIdle;
- if(TransactionManager != NULL)
- TransactionManager->Add(this);
}
APT_IGNORE_DEPRECATED_POP
/*}}}*/
// Acquire::Item::~Item - Destructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
pkgAcquire::Item::~Item()
{
Owner->Remove(this);
}
/*}}}*/
+std::string pkgAcquire::Item::Custom600Headers() const /*{{{*/
+{
+ return std::string();
+}
+ /*}}}*/
+std::string pkgAcquire::Item::ShortDesc() const /*{{{*/
+{
+ return DescURI();
+}
+ /*}}}*/
+APT_CONST void pkgAcquire::Item::Finished() /*{{{*/
+{
+}
+ /*}}}*/
+APT_PURE pkgAcquire * pkgAcquire::Item::GetOwner() const /*{{{*/
+{
+ return Owner;
+}
+ /*}}}*/
+APT_CONST pkgAcquire::ItemDesc &pkgAcquire::Item::GetItemDesc() /*{{{*/
+{
+ return Desc;
+}
+ /*}}}*/
+APT_CONST bool pkgAcquire::Item::IsTrusted() const /*{{{*/
+{
+ return false;
+}
+ /*}}}*/
// Acquire::Item::Failed - Item failed to download /*{{{*/
// ---------------------------------------------------------------------
/* We return to an idle state if there are still other queues that could
fetch this object */
-void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
+void pkgAcquire::Item::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)
{
if(ErrorText.empty())
ErrorText = LookupTag(Message,"Message");
- UsedMirror = LookupTag(Message,"UsedMirror");
if (QueueCounter <= 1)
{
/* This indicates that the file is not available right now but might
@@ -154,63 +469,43 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
return;
}
- Status = StatError;
+ switch (Status)
+ {
+ case StatIdle:
+ case StatFetching:
+ case StatDone:
+ Status = StatError;
+ break;
+ case StatAuthError:
+ case StatError:
+ case StatTransientNetworkError:
+ break;
+ }
Complete = false;
Dequeue();
}
- else
- Status = StatIdle;
- // check fail reason
string const FailReason = LookupTag(Message, "FailReason");
- if(FailReason == "MaximumSizeExceeded")
+ if (FailReason == "MaximumSizeExceeded")
RenameOnError(MaximumSizeExceeded);
+ else if (Status == StatAuthError)
+ RenameOnError(HashSumMismatch);
// report mirror failure back to LP if we actually use a mirror
- if(FailReason.size() != 0)
+ if (FailReason.empty() == false)
ReportMirrorFailure(FailReason);
else
ReportMirrorFailure(ErrorText);
-}
- /*}}}*/
-bool pkgAcquire::Item::TransactionState(TransactionStates const state) /*{{{*/
-{
- bool const Debug = _config->FindB("Debug::Acquire::Transaction", false);
- switch(state)
- {
- case TransactionAbort:
- if(Debug == true)
- std::clog << " Cancel: " << DestFile << std::endl;
- if (Status == pkgAcquire::Item::StatIdle)
- {
- Status = pkgAcquire::Item::StatDone;
- Dequeue();
- }
- break;
- case TransactionCommit:
- if(PartialFile != "")
- {
- if(Debug == true)
- std::clog << "mv " << PartialFile << " -> "<< DestFile << " # " << DescURI() << std::endl;
- Rename(PartialFile, DestFile);
- } else {
- if(Debug == true)
- std::clog << "rm " << DestFile << " # " << DescURI() << std::endl;
- unlink(DestFile.c_str());
- }
- // mark that this transaction is finished
- TransactionManager = 0;
- break;
- }
- return true;
+ if (QueueCounter > 1)
+ Status = StatIdle;
}
/*}}}*/
// Acquire::Item::Start - Item has begun to download /*{{{*/
// ---------------------------------------------------------------------
-/* Stash status and the file size. Note that setting Complete means
+/* Stash status and the file size. Note that setting Complete means
sub-phases of the acquire process such as decompresion are operating */
-void pkgAcquire::Item::Start(string /*Message*/,unsigned long long Size)
+void pkgAcquire::Item::Start(string const &/*Message*/, unsigned long long const Size)
{
Status = StatFetching;
ErrorText.clear();
@@ -218,23 +513,36 @@ void pkgAcquire::Item::Start(string /*Message*/,unsigned long long Size)
FileSize = Size;
}
/*}}}*/
-// Acquire::Item::Done - Item downloaded OK /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void pkgAcquire::Item::Done(string Message,unsigned long long Size,HashStringList const &/*Hash*/,
- pkgAcquire::MethodConfig * /*Cnf*/)
+// Acquire::Item::VerifyDone - check if Item was downloaded OK /*{{{*/
+/* Note that hash-verification is 'hardcoded' in acquire-worker and has
+ * already passed if this method is called. */
+bool pkgAcquire::Item::VerifyDone(std::string const &Message,
+ pkgAcquire::MethodConfig const * const /*Cnf*/)
{
- // We just downloaded something..
- string FileName = LookupTag(Message,"Filename");
- UsedMirror = LookupTag(Message,"UsedMirror");
- if (Complete == false && !Local && FileName == DestFile)
+ std::string const FileName = LookupTag(Message,"Filename");
+ if (FileName.empty() == true)
{
- if (Owner->Log != 0)
- Owner->Log->Fetched(Size,atoi(LookupTag(Message,"Resume-Point","0").c_str()));
+ Status = StatError;
+ ErrorText = "Method gave a blank filename";
+ return false;
}
+ return true;
+}
+ /*}}}*/
+// Acquire::Item::Done - Item downloaded OK /*{{{*/
+void pkgAcquire::Item::Done(string const &/*Message*/, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const /*Cnf*/)
+{
+ // We just downloaded something..
if (FileSize == 0)
- FileSize= Size;
+ {
+ unsigned long long const downloadedSize = Hashes.FileSize();
+ if (downloadedSize != 0)
+ {
+ FileSize = downloadedSize;
+ }
+ }
Status = StatDone;
ErrorText = string();
Owner->Dequeue(this);
@@ -244,7 +552,7 @@ void pkgAcquire::Item::Done(string Message,unsigned long long Size,HashStringLis
// ---------------------------------------------------------------------
/* This helper function is used by a lot of item methods as their final
step */
-bool pkgAcquire::Item::Rename(string From,string To)
+bool pkgAcquire::Item::Rename(string const &From,string const &To)
{
if (From == To || rename(From.c_str(),To.c_str()) == 0)
return true;
@@ -260,43 +568,6 @@ bool pkgAcquire::Item::Rename(string From,string To)
return false;
}
/*}}}*/
-// Acquire::Item::QueueURI and specialisations from child classes /*{{{*/
-/* The idea here is that an item isn't queued if it exists on disk and the
- transition manager was a hit as this means that the files it contains
- the checksums for can't be updated either (or they are and we are asking
- for a hashsum mismatch to happen which helps nobody) */
-bool pkgAcquire::Item::QueueURI(ItemDesc &Item)
-{
- std::string const FinalFile = GetFinalFilename();
- if (TransactionManager != NULL && TransactionManager->IMSHit == true &&
- FileExists(FinalFile) == true)
- {
- PartialFile = DestFile = FinalFile;
- Status = StatDone;
- return false;
- }
-
- Owner->Enqueue(Item);
- return true;
-}
-/* The transition manager InRelease itself (or its older sisters-in-law
- Release & Release.gpg) is always queued as this allows us to rerun gpgv
- on it to verify that we aren't stalled with old files */
-bool pkgAcqMetaBase::QueueURI(pkgAcquire::ItemDesc &Item)
-{
- Owner->Enqueue(Item);
- return true;
-}
-/* the Diff/Index needs to queue also the up-to-date complete index file
- to ensure that the list cleaner isn't eating it */
-bool pkgAcqDiffIndex::QueueURI(pkgAcquire::ItemDesc &Item)
-{
- if (pkgAcquire::Item::QueueURI(Item) == true)
- return true;
- QueueOnIMSHit();
- return false;
-}
- /*}}}*/
void pkgAcquire::Item::Dequeue() /*{{{*/
{
Owner->Dequeue(this);
@@ -307,30 +578,31 @@ bool pkgAcquire::Item::RenameOnError(pkgAcquire::Item::RenameOnErrorState const
if (RealFileExists(DestFile))
Rename(DestFile, DestFile + ".FAILED");
+ std::string errtext;
switch (error)
{
case HashSumMismatch:
- ErrorText = _("Hash Sum mismatch");
+ errtext = _("Hash Sum mismatch");
Status = StatAuthError;
ReportMirrorFailure("HashChecksumFailure");
break;
case SizeMismatch:
- ErrorText = _("Size mismatch");
+ errtext = _("Size mismatch");
Status = StatAuthError;
ReportMirrorFailure("SizeFailure");
break;
case InvalidFormat:
- ErrorText = _("Invalid file format");
+ errtext = _("Invalid file format");
Status = StatError;
// do not report as usually its not the mirrors fault, but Portal/Proxy
break;
case SignatureError:
- ErrorText = _("Signature error");
+ errtext = _("Signature error");
Status = StatError;
break;
case NotClearsigned:
- ErrorText = _("Does not start with a cleartext signature");
- Status = StatError;
+ strprintf(errtext, _("Clearsigned file isn't valid, got '%s' (does the network require authentication?)"), "NOSPLIT");
+ Status = StatAuthError;
break;
case MaximumSizeExceeded:
// the method is expected to report a good error for this
@@ -340,6 +612,8 @@ bool pkgAcquire::Item::RenameOnError(pkgAcquire::Item::RenameOnErrorState const
// no handling here, done by callers
break;
}
+ if (ErrorText.empty())
+ ErrorText = errtext;
return false;
}
/*}}}*/
@@ -349,15 +623,8 @@ void pkgAcquire::Item::SetActiveSubprocess(const std::string &subprocess)/*{{{*/
APT_IGNORE_DEPRECATED(Mode = ActiveSubprocess.c_str();)
}
/*}}}*/
-// Acquire::Item::GetFinalFilename - Return the full final file path /*{{{*/
-std::string pkgAcquire::Item::GetFinalFilename() const
-{
- return GetFinalFileNameFromURI(Desc.URI);
-}
- /*}}}*/
// Acquire::Item::ReportMirrorFailure /*{{{*/
-// ---------------------------------------------------------------------
-void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
+void pkgAcquire::Item::ReportMirrorFailure(string const &FailCode)
{
// we only act if a mirror was used at all
if(UsedMirror.empty())
@@ -400,6 +667,881 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
}
}
/*}}}*/
+std::string pkgAcquire::Item::HashSum() const /*{{{*/
+{
+ HashStringList const hashes = GetExpectedHashes();
+ HashString const * const hs = hashes.find(NULL);
+ return hs != NULL ? hs->toStr() : "";
+}
+ /*}}}*/
+
+pkgAcqTransactionItem::pkgAcqTransactionItem(pkgAcquire * const Owner, /*{{{*/
+ pkgAcqMetaClearSig * const transactionManager, IndexTarget const &target) :
+ pkgAcquire::Item(Owner), d(NULL), Target(target), TransactionManager(transactionManager)
+{
+ if (TransactionManager != this)
+ TransactionManager->Add(this);
+}
+ /*}}}*/
+pkgAcqTransactionItem::~pkgAcqTransactionItem() /*{{{*/
+{
+}
+ /*}}}*/
+HashStringList pkgAcqTransactionItem::GetExpectedHashesFor(std::string const &MetaKey) const /*{{{*/
+{
+ return GetExpectedHashesFromFor(TransactionManager->MetaIndexParser, MetaKey);
+}
+ /*}}}*/
+
+// AcqMetaBase - Constructor /*{{{*/
+pkgAcqMetaBase::pkgAcqMetaBase(pkgAcquire * const Owner,
+ pkgAcqMetaClearSig * const TransactionManager,
+ std::vector<IndexTarget> const &IndexTargets,
+ IndexTarget const &DataTarget)
+: pkgAcqTransactionItem(Owner, TransactionManager, DataTarget), d(NULL),
+ IndexTargets(IndexTargets),
+ AuthPass(false), IMSHit(false)
+{
+}
+ /*}}}*/
+// AcqMetaBase::Add - Add a item to the current Transaction /*{{{*/
+void pkgAcqMetaBase::Add(pkgAcqTransactionItem * const I)
+{
+ Transaction.push_back(I);
+}
+ /*}}}*/
+// AcqMetaBase::AbortTransaction - Abort the current Transaction /*{{{*/
+void pkgAcqMetaBase::AbortTransaction()
+{
+ if(_config->FindB("Debug::Acquire::Transaction", false) == true)
+ std::clog << "AbortTransaction: " << TransactionManager << std::endl;
+
+ // ensure the toplevel is in error state too
+ for (std::vector<pkgAcqTransactionItem*>::iterator I = Transaction.begin();
+ I != Transaction.end(); ++I)
+ {
+ (*I)->TransactionState(TransactionAbort);
+ }
+ Transaction.clear();
+}
+ /*}}}*/
+// AcqMetaBase::TransactionHasError - Check for errors in Transaction /*{{{*/
+APT_PURE bool pkgAcqMetaBase::TransactionHasError() const
+{
+ for (std::vector<pkgAcqTransactionItem*>::const_iterator I = Transaction.begin();
+ I != Transaction.end(); ++I)
+ {
+ switch((*I)->Status) {
+ case StatDone: break;
+ case StatIdle: break;
+ case StatAuthError: return true;
+ case StatError: return true;
+ case StatTransientNetworkError: return true;
+ case StatFetching: break;
+ }
+ }
+ return false;
+}
+ /*}}}*/
+// AcqMetaBase::CommitTransaction - Commit a transaction /*{{{*/
+void pkgAcqMetaBase::CommitTransaction()
+{
+ if(_config->FindB("Debug::Acquire::Transaction", false) == true)
+ std::clog << "CommitTransaction: " << this << std::endl;
+
+ // move new files into place *and* remove files that are not
+ // part of the transaction but are still on disk
+ for (std::vector<pkgAcqTransactionItem*>::iterator I = Transaction.begin();
+ I != Transaction.end(); ++I)
+ {
+ (*I)->TransactionState(TransactionCommit);
+ }
+ Transaction.clear();
+}
+ /*}}}*/
+// AcqMetaBase::TransactionStageCopy - Stage a file for copying /*{{{*/
+void pkgAcqMetaBase::TransactionStageCopy(pkgAcqTransactionItem * const I,
+ const std::string &From,
+ const std::string &To)
+{
+ I->PartialFile = From;
+ I->DestFile = To;
+}
+ /*}}}*/
+// AcqMetaBase::TransactionStageRemoval - Stage a file for removal /*{{{*/
+void pkgAcqMetaBase::TransactionStageRemoval(pkgAcqTransactionItem * const I,
+ const std::string &FinalFile)
+{
+ I->PartialFile = "";
+ I->DestFile = FinalFile;
+}
+ /*}}}*/
+// AcqMetaBase::GenerateAuthWarning - Check gpg authentication error /*{{{*/
+bool pkgAcqMetaBase::CheckStopAuthentication(pkgAcquire::Item * const I, const std::string &Message)
+{
+ // FIXME: this entire function can do now that we disallow going to
+ // a unauthenticated state and can cleanly rollback
+
+ string const Final = I->GetFinalFilename();
+ if(FileExists(Final))
+ {
+ I->Status = StatTransientNetworkError;
+ _error->Warning(_("An error occurred during the signature "
+ "verification. The repository is not updated "
+ "and the previous index files will be used. "
+ "GPG error: %s: %s"),
+ Desc.Description.c_str(),
+ LookupTag(Message,"Message").c_str());
+ RunScripts("APT::Update::Auth-Failure");
+ return true;
+ } else if (LookupTag(Message,"Message").find("NODATA") != string::npos) {
+ /* Invalid signature file, reject (LP: #346386) (Closes: #627642) */
+ _error->Error(_("GPG error: %s: %s"),
+ Desc.Description.c_str(),
+ LookupTag(Message,"Message").c_str());
+ I->Status = StatAuthError;
+ return true;
+ } else {
+ _error->Warning(_("GPG error: %s: %s"),
+ Desc.Description.c_str(),
+ LookupTag(Message,"Message").c_str());
+ }
+ // gpgv method failed
+ ReportMirrorFailure("GPGFailure");
+ return false;
+}
+ /*}}}*/
+// AcqMetaBase::Custom600Headers - Get header for AcqMetaBase /*{{{*/
+// ---------------------------------------------------------------------
+string pkgAcqMetaBase::Custom600Headers() const
+{
+ std::string Header = "\nIndex-File: true";
+ std::string MaximumSize;
+ strprintf(MaximumSize, "\nMaximum-Size: %i",
+ _config->FindI("Acquire::MaxReleaseFileSize", 10*1000*1000));
+ Header += MaximumSize;
+
+ string const FinalFile = GetFinalFilename();
+ struct stat Buf;
+ if (stat(FinalFile.c_str(),&Buf) == 0)
+ Header += "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
+
+ return Header;
+}
+ /*}}}*/
+// AcqMetaBase::QueueForSignatureVerify /*{{{*/
+void pkgAcqMetaBase::QueueForSignatureVerify(pkgAcqTransactionItem * const I, std::string const &File, std::string const &Signature)
+{
+ AuthPass = true;
+ I->Desc.URI = "gpgv:" + Signature;
+ I->DestFile = File;
+ QueueURI(I->Desc);
+ I->SetActiveSubprocess("gpgv");
+}
+ /*}}}*/
+// AcqMetaBase::CheckDownloadDone /*{{{*/
+bool pkgAcqMetaBase::CheckDownloadDone(pkgAcqTransactionItem * const I, const std::string &Message, HashStringList const &Hashes) const
+{
+ // We have just finished downloading a Release file (it is not
+ // verified yet)
+
+ std::string const FileName = LookupTag(Message,"Filename");
+ if (FileName != I->DestFile && RealFileExists(I->DestFile) == false)
+ {
+ I->Local = true;
+ I->Desc.URI = "copy:" + FileName;
+ I->QueueURI(I->Desc);
+ return false;
+ }
+
+ // make sure to verify against the right file on I-M-S hit
+ bool IMSHit = StringToBool(LookupTag(Message,"IMS-Hit"), false);
+ if (IMSHit == false && Hashes.usable())
+ {
+ // detect IMS-Hits servers haven't detected by Hash comparison
+ std::string const FinalFile = I->GetFinalFilename();
+ if (RealFileExists(FinalFile) && Hashes.VerifyFile(FinalFile) == true)
+ {
+ IMSHit = true;
+ unlink(I->DestFile.c_str());
+ }
+ }
+
+ if(IMSHit == true)
+ {
+ // for simplicity, the transaction manager is always InRelease
+ // even if it doesn't exist.
+ if (TransactionManager != NULL)
+ TransactionManager->IMSHit = true;
+ I->PartialFile = I->DestFile = I->GetFinalFilename();
+ }
+
+ // set Item to complete as the remaining work is all local (verify etc)
+ I->Complete = true;
+
+ return true;
+}
+ /*}}}*/
+bool pkgAcqMetaBase::CheckAuthDone(string const &Message) /*{{{*/
+{
+ // At this point, the gpgv method has succeeded, so there is a
+ // valid signature from a key in the trusted keyring. We
+ // perform additional verification of its contents, and use them
+ // to verify the indexes we are about to download
+
+ if (TransactionManager->IMSHit == false)
+ {
+ // open the last (In)Release if we have it
+ std::string const FinalFile = GetFinalFilename();
+ std::string FinalRelease;
+ std::string FinalInRelease;
+ if (APT::String::Endswith(FinalFile, "InRelease"))
+ {
+ FinalInRelease = FinalFile;
+ FinalRelease = FinalFile.substr(0, FinalFile.length() - strlen("InRelease")) + "Release";
+ }
+ else
+ {
+ FinalInRelease = FinalFile.substr(0, FinalFile.length() - strlen("Release")) + "InRelease";
+ FinalRelease = FinalFile;
+ }
+ if (RealFileExists(FinalInRelease) || RealFileExists(FinalRelease))
+ {
+ TransactionManager->LastMetaIndexParser = TransactionManager->MetaIndexParser->UnloadedClone();
+ if (TransactionManager->LastMetaIndexParser != NULL)
+ {
+ _error->PushToStack();
+ if (RealFileExists(FinalInRelease))
+ TransactionManager->LastMetaIndexParser->Load(FinalInRelease, NULL);
+ else
+ TransactionManager->LastMetaIndexParser->Load(FinalRelease, NULL);
+ // its unlikely to happen, but if what we have is bad ignore it
+ if (_error->PendingError())
+ {
+ delete TransactionManager->LastMetaIndexParser;
+ TransactionManager->LastMetaIndexParser = NULL;
+ }
+ _error->RevertToStack();
+ }
+ }
+ }
+
+ if (TransactionManager->MetaIndexParser->Load(DestFile, &ErrorText) == false)
+ {
+ Status = StatAuthError;
+ return false;
+ }
+
+ if (!VerifyVendor(Message))
+ {
+ Status = StatAuthError;
+ return false;
+ }
+
+ if (_config->FindB("Debug::pkgAcquire::Auth", false))
+ std::cerr << "Signature verification succeeded: "
+ << DestFile << std::endl;
+
+ // Download further indexes with verification
+ QueueIndexes(true);
+
+ return true;
+}
+ /*}}}*/
+void pkgAcqMetaBase::QueueIndexes(bool const verify) /*{{{*/
+{
+ // at this point the real Items are loaded in the fetcher
+ ExpectedAdditionalItems = 0;
+
+ for (std::vector <IndexTarget>::const_iterator Target = IndexTargets.begin();
+ Target != IndexTargets.end();
+ ++Target)
+ {
+ bool trypdiff = _config->FindB("Acquire::PDiffs", true);
+ if (verify == true)
+ {
+ if (TransactionManager->MetaIndexParser->Exists(Target->MetaKey) == false)
+ {
+ // optional targets that we do not have in the Release file are skipped
+ if (Target->IsOptional)
+ continue;
+
+ Status = StatAuthError;
+ strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), Target->MetaKey.c_str());
+ return;
+ }
+
+ if (RealFileExists(GetFinalFileNameFromURI(Target->URI)))
+ {
+ if (TransactionManager->LastMetaIndexParser != NULL)
+ {
+ HashStringList const newFile = GetExpectedHashesFromFor(TransactionManager->MetaIndexParser, Target->MetaKey);
+ HashStringList const oldFile = GetExpectedHashesFromFor(TransactionManager->LastMetaIndexParser, Target->MetaKey);
+ if (newFile == oldFile)
+ {
+ // we have the file already, no point in trying to acquire it again
+ new NoActionItem(Owner, *Target);
+ continue;
+ }
+ }
+ else if (TransactionManager->IMSHit == true)
+ {
+ // we have the file already, no point in trying to acquire it again
+ new NoActionItem(Owner, *Target);
+ continue;
+ }
+ }
+ else
+ trypdiff = false; // no file to patch
+
+ // check if we have patches available
+ trypdiff &= TransactionManager->MetaIndexParser->Exists(Target->MetaKey + ".diff/Index");
+ }
+ // if we have no file to patch, no point in trying
+ trypdiff &= RealFileExists(GetFinalFileNameFromURI(Target->URI));
+
+ // no point in patching from local sources
+ if (trypdiff)
+ {
+ std::string const proto = Target->URI.substr(0, strlen("file:/"));
+ if (proto == "file:/" || proto == "copy:/" || proto == "cdrom:")
+ trypdiff = false;
+ }
+
+ // Queue the Index file (Packages, Sources, Translation-$foo, …)
+ if (trypdiff)
+ new pkgAcqDiffIndex(Owner, TransactionManager, *Target);
+ else
+ new pkgAcqIndex(Owner, TransactionManager, *Target);
+ }
+}
+ /*}}}*/
+bool pkgAcqMetaBase::VerifyVendor(string const &Message) /*{{{*/
+{
+ string::size_type pos;
+
+ // check for missing sigs (that where not fatal because otherwise we had
+ // bombed earlier)
+ string missingkeys;
+ string msg = _("There is no public key available for the "
+ "following key IDs:\n");
+ pos = Message.find("NO_PUBKEY ");
+ if (pos != std::string::npos)
+ {
+ string::size_type start = pos+strlen("NO_PUBKEY ");
+ string Fingerprint = Message.substr(start, Message.find("\n")-start);
+ missingkeys += (Fingerprint);
+ }
+ if(!missingkeys.empty())
+ _error->Warning("%s", (msg + missingkeys).c_str());
+
+ string Transformed = TransactionManager->MetaIndexParser->GetExpectedDist();
+
+ if (Transformed == "../project/experimental")
+ {
+ Transformed = "experimental";
+ }
+
+ pos = Transformed.rfind('/');
+ if (pos != string::npos)
+ {
+ Transformed = Transformed.substr(0, pos);
+ }
+
+ if (Transformed == ".")
+ {
+ Transformed = "";
+ }
+
+ if (TransactionManager->MetaIndexParser->GetValidUntil() > 0)
+ {
+ time_t const invalid_since = time(NULL) - TransactionManager->MetaIndexParser->GetValidUntil();
+ if (invalid_since > 0)
+ {
+ std::string errmsg;
+ strprintf(errmsg,
+ // TRANSLATOR: The first %s is the URL of the bad Release file, the second is
+ // the time since then the file is invalid - formatted in the same way as in
+ // the download progress display (e.g. 7d 3h 42min 1s)
+ _("Release file for %s is expired (invalid since %s). "
+ "Updates for this repository will not be applied."),
+ Target.URI.c_str(), TimeToStr(invalid_since).c_str());
+ if (ErrorText.empty())
+ ErrorText = errmsg;
+ return _error->Error("%s", errmsg.c_str());
+ }
+ }
+
+ /* Did we get a file older than what we have? This is a last minute IMS hit and doubles
+ as a prevention of downgrading us to older (still valid) files */
+ if (TransactionManager->IMSHit == false && TransactionManager->LastMetaIndexParser != NULL &&
+ TransactionManager->LastMetaIndexParser->GetDate() > TransactionManager->MetaIndexParser->GetDate())
+ {
+ TransactionManager->IMSHit = true;
+ unlink(DestFile.c_str());
+ PartialFile = DestFile = GetFinalFilename();
+ // load the 'old' file in the 'new' one instead of flipping pointers as
+ // the new one isn't owned by us, while the old one is so cleanup would be confused.
+ TransactionManager->MetaIndexParser->swapLoad(TransactionManager->LastMetaIndexParser);
+ delete TransactionManager->LastMetaIndexParser;
+ TransactionManager->LastMetaIndexParser = NULL;
+ }
+
+ if (_config->FindB("Debug::pkgAcquire::Auth", false))
+ {
+ std::cerr << "Got Codename: " << TransactionManager->MetaIndexParser->GetCodename() << std::endl;
+ std::cerr << "Expecting Dist: " << TransactionManager->MetaIndexParser->GetExpectedDist() << std::endl;
+ std::cerr << "Transformed Dist: " << Transformed << std::endl;
+ }
+
+ if (TransactionManager->MetaIndexParser->CheckDist(Transformed) == false)
+ {
+ // This might become fatal one day
+// Status = StatAuthError;
+// ErrorText = "Conflicting distribution; expected "
+// + MetaIndexParser->GetExpectedDist() + " but got "
+// + MetaIndexParser->GetCodename();
+// return false;
+ if (!Transformed.empty())
+ {
+ _error->Warning(_("Conflicting distribution: %s (expected %s but got %s)"),
+ Desc.Description.c_str(),
+ Transformed.c_str(),
+ TransactionManager->MetaIndexParser->GetCodename().c_str());
+ }
+ }
+
+ return true;
+}
+ /*}}}*/
+pkgAcqMetaBase::~pkgAcqMetaBase()
+{
+}
+
+pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire * const Owner, /*{{{*/
+ IndexTarget const &ClearsignedTarget,
+ IndexTarget const &DetachedDataTarget, IndexTarget const &DetachedSigTarget,
+ std::vector<IndexTarget> const &IndexTargets,
+ metaIndex * const MetaIndexParser) :
+ pkgAcqMetaIndex(Owner, this, ClearsignedTarget, DetachedSigTarget, IndexTargets),
+ d(NULL), ClearsignedTarget(ClearsignedTarget),
+ DetachedDataTarget(DetachedDataTarget),
+ MetaIndexParser(MetaIndexParser), LastMetaIndexParser(NULL)
+{
+ // index targets + (worst case:) Release/Release.gpg
+ ExpectedAdditionalItems = IndexTargets.size() + 2;
+ TransactionManager->Add(this);
+}
+ /*}}}*/
+pkgAcqMetaClearSig::~pkgAcqMetaClearSig() /*{{{*/
+{
+ if (LastMetaIndexParser != NULL)
+ delete LastMetaIndexParser;
+}
+ /*}}}*/
+// pkgAcqMetaClearSig::Custom600Headers - Insert custom request headers /*{{{*/
+string pkgAcqMetaClearSig::Custom600Headers() const
+{
+ string Header = pkgAcqMetaBase::Custom600Headers();
+ Header += "\nFail-Ignore: true";
+ std::string const key = TransactionManager->MetaIndexParser->GetSignedBy();
+ if (key.empty() == false)
+ Header += "\nSigned-By: " + key;
+
+ return Header;
+}
+ /*}}}*/
+bool pkgAcqMetaClearSig::VerifyDone(std::string const &Message,
+ pkgAcquire::MethodConfig const * const Cnf)
+{
+ Item::VerifyDone(Message, Cnf);
+
+ if (FileExists(DestFile) && !StartsWithGPGClearTextSignature(DestFile))
+ return RenameOnError(NotClearsigned);
+
+ return true;
+}
+// pkgAcqMetaClearSig::Done - We got a file /*{{{*/
+void pkgAcqMetaClearSig::Done(std::string const &Message,
+ HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf)
+{
+ Item::Done(Message, Hashes, Cnf);
+
+ if(AuthPass == false)
+ {
+ if(CheckDownloadDone(this, Message, Hashes) == true)
+ QueueForSignatureVerify(this, DestFile, DestFile);
+ return;
+ }
+ else if(CheckAuthDone(Message) == true)
+ {
+ if (TransactionManager->IMSHit == false)
+ TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename());
+ else if (RealFileExists(GetFinalFilename()) == false)
+ {
+ // We got an InRelease file IMSHit, but we haven't one, which means
+ // we had a valid Release/Release.gpg combo stepping in, which we have
+ // to 'acquire' now to ensure list cleanup isn't removing them
+ new NoActionItem(Owner, DetachedDataTarget);
+ new NoActionItem(Owner, DetachedSigTarget);
+ }
+ }
+}
+ /*}}}*/
+void pkgAcqMetaClearSig::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf) /*{{{*/
+{
+ Item::Failed(Message, Cnf);
+
+ // we failed, we will not get additional items from this method
+ ExpectedAdditionalItems = 0;
+
+ if (AuthPass == false)
+ {
+ if (Status == StatAuthError)
+ {
+ // if we expected a ClearTextSignature (InRelease) and got a file,
+ // but it wasn't valid we end up here (see VerifyDone).
+ // As these is usually called by web-portals we do not try Release/Release.gpg
+ // as this is gonna fail anyway and instead abort our try (LP#346386)
+ TransactionManager->AbortTransaction();
+ return;
+ }
+
+ // Queue the 'old' InRelease file for removal if we try Release.gpg
+ // as otherwise the file will stay around and gives a false-auth
+ // impression (CVE-2012-0214)
+ TransactionManager->TransactionStageRemoval(this, GetFinalFilename());
+ Status = StatDone;
+
+ new pkgAcqMetaIndex(Owner, TransactionManager, DetachedDataTarget, DetachedSigTarget, IndexTargets);
+ }
+ else
+ {
+ if(CheckStopAuthentication(this, Message))
+ return;
+
+ _error->Warning(_("The data from '%s' is not signed. Packages "
+ "from that repository can not be authenticated."),
+ ClearsignedTarget.Description.c_str());
+
+ // No Release file was present, or verification failed, so fall
+ // back to queueing Packages files without verification
+ // only allow going further if the users explicitely wants it
+ if(AllowInsecureRepositories(TransactionManager->MetaIndexParser, TransactionManager, this) == true)
+ {
+ Status = StatDone;
+
+ /* InRelease files become Release files, otherwise
+ * they would be considered as trusted later on */
+ string const FinalRelease = GetFinalFileNameFromURI(DetachedDataTarget.URI);
+ string const PartialRelease = GetPartialFileNameFromURI(DetachedDataTarget.URI);
+ string const FinalReleasegpg = GetFinalFileNameFromURI(DetachedSigTarget.URI);
+ string const FinalInRelease = GetFinalFilename();
+ Rename(DestFile, PartialRelease);
+ TransactionManager->TransactionStageCopy(this, PartialRelease, FinalRelease);
+
+ if (RealFileExists(FinalReleasegpg) || RealFileExists(FinalInRelease))
+ {
+ // open the last Release if we have it
+ if (TransactionManager->IMSHit == false)
+ {
+ TransactionManager->LastMetaIndexParser = TransactionManager->MetaIndexParser->UnloadedClone();
+ if (TransactionManager->LastMetaIndexParser != NULL)
+ {
+ _error->PushToStack();
+ if (RealFileExists(FinalInRelease))
+ TransactionManager->LastMetaIndexParser->Load(FinalInRelease, NULL);
+ else
+ TransactionManager->LastMetaIndexParser->Load(FinalRelease, NULL);
+ // its unlikely to happen, but if what we have is bad ignore it
+ if (_error->PendingError())
+ {
+ delete TransactionManager->LastMetaIndexParser;
+ TransactionManager->LastMetaIndexParser = NULL;
+ }
+ _error->RevertToStack();
+ }
+ }
+ }
+
+ // we parse the indexes here because at this point the user wanted
+ // a repository that may potentially harm him
+ if (TransactionManager->MetaIndexParser->Load(PartialRelease, &ErrorText) == false || VerifyVendor(Message) == false)
+ /* expired Release files are still a problem you need extra force for */;
+ else
+ QueueIndexes(true);
+ }
+ }
+}
+ /*}}}*/
+
+pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire * const Owner, /*{{{*/
+ pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &DataTarget,
+ IndexTarget const &DetachedSigTarget,
+ vector<IndexTarget> const &IndexTargets) :
+ pkgAcqMetaBase(Owner, TransactionManager, IndexTargets, DataTarget), d(NULL),
+ DetachedSigTarget(DetachedSigTarget)
+{
+ if(_config->FindB("Debug::Acquire::Transaction", false) == true)
+ std::clog << "New pkgAcqMetaIndex with TransactionManager "
+ << this->TransactionManager << std::endl;
+
+ DestFile = GetPartialFileNameFromURI(DataTarget.URI);
+
+ // Create the item
+ Desc.Description = DataTarget.Description;
+ Desc.Owner = this;
+ Desc.ShortDesc = DataTarget.ShortDesc;
+ Desc.URI = DataTarget.URI;
+
+ // we expect more item
+ ExpectedAdditionalItems = IndexTargets.size();
+ QueueURI(Desc);
+}
+ /*}}}*/
+void pkgAcqMetaIndex::Done(string const &Message, /*{{{*/
+ HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cfg)
+{
+ Item::Done(Message,Hashes,Cfg);
+
+ if(CheckDownloadDone(this, Message, Hashes))
+ {
+ // we have a Release file, now download the Signature, all further
+ // verify/queue for additional downloads will be done in the
+ // pkgAcqMetaSig::Done() code
+ new pkgAcqMetaSig(Owner, TransactionManager, DetachedSigTarget, this);
+ }
+}
+ /*}}}*/
+// pkgAcqMetaIndex::Failed - no Release file present /*{{{*/
+void pkgAcqMetaIndex::Failed(string const &Message,
+ pkgAcquire::MethodConfig const * const Cnf)
+{
+ pkgAcquire::Item::Failed(Message, Cnf);
+ Status = StatDone;
+
+ _error->Warning(_("The repository '%s' does not have a Release file. "
+ "This is deprecated, please contact the owner of the "
+ "repository."), Target.Description.c_str());
+
+ // No Release file was present so fall
+ // back to queueing Packages files without verification
+ // only allow going further if the users explicitely wants it
+ if(AllowInsecureRepositories(TransactionManager->MetaIndexParser, TransactionManager, this) == true)
+ {
+ // ensure old Release files are removed
+ TransactionManager->TransactionStageRemoval(this, GetFinalFilename());
+
+ // queue without any kind of hashsum support
+ QueueIndexes(false);
+ }
+}
+ /*}}}*/
+void pkgAcqMetaIndex::Finished() /*{{{*/
+{
+ if(_config->FindB("Debug::Acquire::Transaction", false) == true)
+ std::clog << "Finished: " << DestFile <<std::endl;
+ if(TransactionManager != NULL &&
+ TransactionManager->TransactionHasError() == false)
+ TransactionManager->CommitTransaction();
+}
+ /*}}}*/
+std::string pkgAcqMetaIndex::DescURI() const /*{{{*/
+{
+ return Target.URI;
+}
+ /*}}}*/
+pkgAcqMetaIndex::~pkgAcqMetaIndex() {}
+
+// AcqMetaSig::AcqMetaSig - Constructor /*{{{*/
+pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire * const Owner,
+ pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target,
+ pkgAcqMetaIndex * const MetaIndex) :
+ pkgAcqTransactionItem(Owner, TransactionManager, Target), d(NULL), MetaIndex(MetaIndex)
+{
+ DestFile = GetPartialFileNameFromURI(Target.URI);
+
+ // remove any partial downloaded sig-file in partial/.
+ // it may confuse proxies and is too small to warrant a
+ // partial download anyway
+ unlink(DestFile.c_str());
+
+ // set the TransactionManager
+ if(_config->FindB("Debug::Acquire::Transaction", false) == true)
+ std::clog << "New pkgAcqMetaSig with TransactionManager "
+ << TransactionManager << std::endl;
+
+ // Create the item
+ Desc.Description = Target.Description;
+ Desc.Owner = this;
+ Desc.ShortDesc = Target.ShortDesc;
+ Desc.URI = Target.URI;
+
+ // If we got a hit for Release, we will get one for Release.gpg too (or obscure errors),
+ // so we skip the download step and go instantly to verification
+ if (TransactionManager->IMSHit == true && RealFileExists(GetFinalFilename()))
+ {
+ Complete = true;
+ Status = StatDone;
+ PartialFile = DestFile = GetFinalFilename();
+ MetaIndexFileSignature = DestFile;
+ MetaIndex->QueueForSignatureVerify(this, MetaIndex->DestFile, DestFile);
+ }
+ else
+ QueueURI(Desc);
+}
+ /*}}}*/
+pkgAcqMetaSig::~pkgAcqMetaSig() /*{{{*/
+{
+}
+ /*}}}*/
+// pkgAcqMetaSig::Custom600Headers - Insert custom request headers /*{{{*/
+std::string pkgAcqMetaSig::Custom600Headers() const
+{
+ std::string Header = pkgAcqTransactionItem::Custom600Headers();
+ std::string const key = TransactionManager->MetaIndexParser->GetSignedBy();
+ if (key.empty() == false)
+ Header += "\nSigned-By: " + key;
+ return Header;
+}
+ /*}}}*/
+// AcqMetaSig::Done - The signature was downloaded/verified /*{{{*/
+void pkgAcqMetaSig::Done(string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cfg)
+{
+ if (MetaIndexFileSignature.empty() == false)
+ {
+ DestFile = MetaIndexFileSignature;
+ MetaIndexFileSignature.clear();
+ }
+ Item::Done(Message, Hashes, Cfg);
+
+ if(MetaIndex->AuthPass == false)
+ {
+ if(MetaIndex->CheckDownloadDone(this, Message, Hashes) == true)
+ {
+ // destfile will be modified to point to MetaIndexFile for the
+ // gpgv method, so we need to save it here
+ MetaIndexFileSignature = DestFile;
+ MetaIndex->QueueForSignatureVerify(this, MetaIndex->DestFile, DestFile);
+ }
+ return;
+ }
+ else if(MetaIndex->CheckAuthDone(Message) == true)
+ {
+ if (TransactionManager->IMSHit == false)
+ {
+ TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename());
+ TransactionManager->TransactionStageCopy(MetaIndex, MetaIndex->DestFile, MetaIndex->GetFinalFilename());
+ }
+ }
+}
+ /*}}}*/
+void pkgAcqMetaSig::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)/*{{{*/
+{
+ Item::Failed(Message,Cnf);
+
+ // check if we need to fail at this point
+ if (MetaIndex->AuthPass == true && MetaIndex->CheckStopAuthentication(this, Message))
+ return;
+
+ string const FinalRelease = MetaIndex->GetFinalFilename();
+ string const FinalReleasegpg = GetFinalFilename();
+ string const FinalInRelease = TransactionManager->GetFinalFilename();
+
+ if (RealFileExists(FinalReleasegpg) || RealFileExists(FinalInRelease))
+ {
+ std::string downgrade_msg;
+ strprintf(downgrade_msg, _("The repository '%s' is no longer signed."),
+ MetaIndex->Target.Description.c_str());
+ if(_config->FindB("Acquire::AllowDowngradeToInsecureRepositories"))
+ {
+ // meh, the users wants to take risks (we still mark the packages
+ // from this repository as unauthenticated)
+ _error->Warning("%s", downgrade_msg.c_str());
+ _error->Warning(_("This is normally not allowed, but the option "
+ "Acquire::AllowDowngradeToInsecureRepositories was "
+ "given to override it."));
+ Status = StatDone;
+ } else {
+ _error->Error("%s", downgrade_msg.c_str());
+ if (TransactionManager->IMSHit == false)
+ Rename(MetaIndex->DestFile, MetaIndex->DestFile + ".FAILED");
+ Item::Failed("Message: " + downgrade_msg, Cnf);
+ TransactionManager->AbortTransaction();
+ return;
+ }
+ }
+ else
+ _error->Warning(_("The data from '%s' is not signed. Packages "
+ "from that repository can not be authenticated."),
+ MetaIndex->Target.Description.c_str());
+
+ // ensures that a Release.gpg file in the lists/ is removed by the transaction
+ TransactionManager->TransactionStageRemoval(this, DestFile);
+
+ // only allow going further if the users explicitely wants it
+ if(AllowInsecureRepositories(TransactionManager->MetaIndexParser, TransactionManager, this) == true)
+ {
+ if (RealFileExists(FinalReleasegpg) || RealFileExists(FinalInRelease))
+ {
+ // open the last Release if we have it
+ if (TransactionManager->IMSHit == false)
+ {
+ TransactionManager->LastMetaIndexParser = TransactionManager->MetaIndexParser->UnloadedClone();
+ if (TransactionManager->LastMetaIndexParser != NULL)
+ {
+ _error->PushToStack();
+ if (RealFileExists(FinalInRelease))
+ TransactionManager->LastMetaIndexParser->Load(FinalInRelease, NULL);
+ else
+ TransactionManager->LastMetaIndexParser->Load(FinalRelease, NULL);
+ // its unlikely to happen, but if what we have is bad ignore it
+ if (_error->PendingError())
+ {
+ delete TransactionManager->LastMetaIndexParser;
+ TransactionManager->LastMetaIndexParser = NULL;
+ }
+ _error->RevertToStack();
+ }
+ }
+ }
+
+ // we parse the indexes here because at this point the user wanted
+ // a repository that may potentially harm him
+ if (TransactionManager->MetaIndexParser->Load(MetaIndex->DestFile, &ErrorText) == false || MetaIndex->VerifyVendor(Message) == false)
+ /* expired Release files are still a problem you need extra force for */;
+ else
+ MetaIndex->QueueIndexes(true);
+
+ TransactionManager->TransactionStageCopy(MetaIndex, MetaIndex->DestFile, MetaIndex->GetFinalFilename());
+ }
+
+ // FIXME: this is used often (e.g. in pkgAcqIndexTrans) so refactor
+ if (Cnf->LocalOnly == true ||
+ StringToBool(LookupTag(Message,"Transient-Failure"),false) == false)
+ {
+ // Ignore this
+ Status = StatDone;
+ }
+}
+ /*}}}*/
+
+
+// AcqBaseIndex - Constructor /*{{{*/
+pkgAcqBaseIndex::pkgAcqBaseIndex(pkgAcquire * const Owner,
+ pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target)
+: pkgAcqTransactionItem(Owner, TransactionManager, Target), d(NULL)
+{
+}
+ /*}}}*/
+pkgAcqBaseIndex::~pkgAcqBaseIndex() {}
+
// AcqDiffIndex::AcqDiffIndex - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Get the DiffIndex file first and see if there are patches available
@@ -407,65 +1549,30 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
* patches. If anything goes wrong in that process, it will fall back to
* the original packages file
*/
-pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- IndexTarget const * const Target,
- HashStringList const &ExpectedHashes,
- indexRecords *MetaIndexParser)
- : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes,
- MetaIndexParser)
+pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire * const Owner,
+ pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target)
+ : pkgAcqBaseIndex(Owner, TransactionManager, Target), d(NULL), diffs(NULL)
{
-
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
- RealURI = Target->URI;
Desc.Owner = this;
- Desc.Description = Target->Description + ".diff/Index";
- Desc.ShortDesc = Target->ShortDesc;
- Desc.URI = Target->URI + ".diff/Index";
+ Desc.Description = Target.Description + ".diff/Index";
+ Desc.ShortDesc = Target.ShortDesc;
+ Desc.URI = Target.URI + ".diff/Index";
DestFile = GetPartialFileNameFromURI(Desc.URI);
if(Debug)
std::clog << "pkgAcqDiffIndex: " << Desc.URI << std::endl;
- // look for the current package file
- CurrentPackagesFile = GetFinalFileNameFromURI(RealURI);
-
- // FIXME: this file:/ check is a hack to prevent fetching
- // from local sources. this is really silly, and
- // should be fixed cleanly as soon as possible
- if(!FileExists(CurrentPackagesFile) ||
- Desc.URI.substr(0,strlen("file:/")) == "file:/")
- {
- // we don't have a pkg file or we don't want to queue
- Failed("No index file, local or canceld by user", NULL);
- return;
- }
-
- if(Debug)
- std::clog << "pkgAcqDiffIndex::pkgAcqDiffIndex(): "
- << CurrentPackagesFile << std::endl;
-
QueueURI(Desc);
-
-}
- /*}}}*/
-// Acquire::Item::GetFinalFilename - Return the full final file path /*{{{*/
-std::string pkgAcqDiffIndex::GetFinalFilename() const
-{
- // the logic we inherent from pkgAcqBaseIndex isn't what we need here
- return pkgAcquire::Item::GetFinalFilename();
}
/*}}}*/
// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
/* The only header we use is the last-modified header. */
-#if APT_PKG_ABI >= 413
string pkgAcqDiffIndex::Custom600Headers() const
-#else
-string pkgAcqDiffIndex::Custom600Headers()
-#endif
{
string const Final = GetFinalFilename();
@@ -483,11 +1590,10 @@ void pkgAcqDiffIndex::QueueOnIMSHit() const /*{{{*/
{
// list cleanup needs to know that this file as well as the already
// present index is ours, so we create an empty diff to save it for us
- new pkgAcqIndexDiffs(Owner, TransactionManager, Target,
- ExpectedHashes, MetaIndexParser);
+ new pkgAcqIndexDiffs(Owner, TransactionManager, Target);
}
/*}}}*/
-bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
+bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/
{
// failing here is fine: our caller will take care of trying to
// get the complete file if patching fails
@@ -534,17 +1640,31 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
return false;
}
- if (ServerHashes != HashSums())
+ std::string const CurrentPackagesFile = GetFinalFileNameFromURI(Target.URI);
+ HashStringList const TargetFileHashes = GetExpectedHashesFor(Target.MetaKey);
+ if (TargetFileHashes.usable() == false || ServerHashes != TargetFileHashes)
{
if (Debug == true)
{
std::clog << "pkgAcqDiffIndex: " << IndexDiffFile << ": Index has different hashes than parser, probably older, so fail pdiffing" << std::endl;
- printHashSumComparision(CurrentPackagesFile, ServerHashes, HashSums());
+ printHashSumComparision(CurrentPackagesFile, ServerHashes, TargetFileHashes);
}
return false;
}
- if (ServerHashes.VerifyFile(CurrentPackagesFile) == true)
+ HashStringList LocalHashes;
+ // try avoiding calculating the hash here as this is costly
+ if (TransactionManager->LastMetaIndexParser != NULL)
+ LocalHashes = GetExpectedHashesFromFor(TransactionManager->LastMetaIndexParser, Target.MetaKey);
+ if (LocalHashes.usable() == false)
+ {
+ FileFd fd(CurrentPackagesFile, FileFd::ReadOnly);
+ Hashes LocalHashesCalc(ServerHashes);
+ LocalHashesCalc.AddFD(fd);
+ LocalHashes = LocalHashesCalc.GetHashStringList();
+ }
+
+ if (ServerHashes == LocalHashes)
{
// we have the same sha1 as the server so we are done here
if(Debug)
@@ -553,14 +1673,9 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
return true;
}
- FileFd fd(CurrentPackagesFile, FileFd::ReadOnly);
- Hashes LocalHashesCalc;
- LocalHashesCalc.AddFD(fd);
- HashStringList const LocalHashes = LocalHashesCalc.GetHashStringList();
-
if(Debug)
std::clog << "Server-Current: " << ServerHashes.find(NULL)->toStr() << " and we start at "
- << fd.Name() << " " << fd.FileSize() << " " << LocalHashes.find(NULL)->toStr() << std::endl;
+ << CurrentPackagesFile << " " << LocalHashes.FileSize() << " " << LocalHashes.find(NULL)->toStr() << std::endl;
// parse all of (provided) history
vector<DiffInfo> available_patches;
@@ -589,7 +1704,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
std::vector<DiffInfo>::iterator cur = available_patches.begin();
for (; cur != available_patches.end(); ++cur)
{
- if (cur->file != filename || unlikely(cur->result_size != size))
+ if (cur->file != filename)
continue;
cur->result_hashes.push_back(HashString(*type, hash));
break;
@@ -601,8 +1716,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
DiffInfo next;
next.file = filename;
next.result_hashes.push_back(HashString(*type, hash));
- next.result_size = size;
- next.patch_size = 0;
+ next.result_hashes.FileSize(size);
available_patches.push_back(next);
}
else
@@ -650,10 +1764,9 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
{
if (cur->file != filename)
continue;
- if (unlikely(cur->patch_size != 0 && cur->patch_size != size))
- continue;
+ if (cur->patch_hashes.empty())
+ cur->patch_hashes.FileSize(size);
cur->patch_hashes.push_back(HashString(*type, hash));
- cur->patch_size = size;
break;
}
if (cur != available_patches.end())
@@ -665,6 +1778,48 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
}
}
+ for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type)
+ {
+ std::string tagname = *type;
+ tagname.append("-Download");
+ std::string const tmp = Tags.FindS(tagname.c_str());
+ if (tmp.empty() == true)
+ continue;
+
+ string hash, filename;
+ unsigned long long size;
+ std::stringstream ss(tmp);
+
+ // FIXME: all of pdiff supports only .gz compressed patches
+ while (ss >> hash >> size >> filename)
+ {
+ if (unlikely(hash.empty() == true || filename.empty() == true))
+ continue;
+ if (unlikely(APT::String::Endswith(filename, ".gz") == false))
+ continue;
+ filename.erase(filename.length() - 3);
+
+ // see if we have a record for this file already
+ std::vector<DiffInfo>::iterator cur = available_patches.begin();
+ for (; cur != available_patches.end(); ++cur)
+ {
+ if (cur->file != filename)
+ continue;
+ if (cur->download_hashes.empty())
+ cur->download_hashes.FileSize(size);
+ cur->download_hashes.push_back(HashString(*type, hash));
+ break;
+ }
+ if (cur != available_patches.end())
+ continue;
+ if (Debug == true)
+ std::clog << "pkgAcqDiffIndex: " << IndexDiffFile << ": File " << filename
+ << " wasn't in the list for the first parsed hash! (download)" << std::endl;
+ break;
+ }
+ }
+
+
bool foundStart = false;
for (std::vector<DiffInfo>::iterator cur = available_patches.begin();
cur != available_patches.end(); ++cur)
@@ -700,7 +1855,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
unsigned long long patchesSize = 0;
for (std::vector<DiffInfo>::const_iterator cur = available_patches.begin();
cur != available_patches.end(); ++cur)
- patchesSize += cur->patch_size;
+ patchesSize += cur->patch_hashes.FileSize();
unsigned long long const sizeLimit = ServerSize * _config->FindI("Acquire::PDiffs::SizeLimit", 100);
if (sizeLimit > 0 && (sizeLimit/100) < patchesSize)
{
@@ -729,18 +1884,13 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
}
if (pdiff_merge == false)
- {
- new pkgAcqIndexDiffs(Owner, TransactionManager, Target, ExpectedHashes,
- MetaIndexParser, available_patches);
- }
+ new pkgAcqIndexDiffs(Owner, TransactionManager, Target, available_patches);
else
{
- std::vector<pkgAcqIndexMergeDiffs*> *diffs = new std::vector<pkgAcqIndexMergeDiffs*>(available_patches.size());
+ diffs = new std::vector<pkgAcqIndexMergeDiffs*>(available_patches.size());
for(size_t i = 0; i < available_patches.size(); ++i)
(*diffs)[i] = new pkgAcqIndexMergeDiffs(Owner, TransactionManager,
Target,
- ExpectedHashes,
- MetaIndexParser,
available_patches[i],
diffs);
}
@@ -751,7 +1901,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
return true;
}
/*}}}*/
-void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig * Cnf)/*{{{*/
+void pkgAcqDiffIndex::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)/*{{{*/
{
Item::Failed(Message,Cnf);
Status = StatDone;
@@ -760,49 +1910,16 @@ void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig * Cnf)/*{{{
std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
- new pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser);
-}
- /*}}}*/
-bool pkgAcqDiffIndex::TransactionState(TransactionStates const state) /*{{{*/
-{
- if (pkgAcquire::Item::TransactionState(state) == false)
- return false;
-
- switch (state)
- {
- case TransactionCommit:
- break;
- case TransactionAbort:
- std::string const Partial = GetPartialFileNameFromURI(RealURI);
- unlink(Partial.c_str());
- break;
- }
-
- return true;
+ new pkgAcqIndex(Owner, TransactionManager, Target);
}
/*}}}*/
-void pkgAcqDiffIndex::Done(string Message,unsigned long long Size,HashStringList const &Hashes, /*{{{*/
- pkgAcquire::MethodConfig *Cnf)
+void pkgAcqDiffIndex::Done(string const &Message,HashStringList const &Hashes, /*{{{*/
+ pkgAcquire::MethodConfig const * const Cnf)
{
if(Debug)
std::clog << "pkgAcqDiffIndex::Done(): " << Desc.URI << std::endl;
- Item::Done(Message, Size, Hashes, Cnf);
-
- // verify the index target
- if(Target && Target->MetaKey != "" && MetaIndexParser && Hashes.usable())
- {
- std::string IndexMetaKey = Target->MetaKey + ".diff/Index";
- indexRecords::checkSum *Record = MetaIndexParser->Lookup(IndexMetaKey);
- if(Record && Record->Hashes.usable() && Hashes != Record->Hashes)
- {
- RenameOnError(HashSumMismatch);
- printHashSumComparision(RealURI, Record->Hashes, Hashes);
- Failed(Message, Cnf);
- return;
- }
-
- }
+ Item::Done(Message, Hashes, Cnf);
string const FinalFile = GetFinalFilename();
if(StringToBool(LookupTag(Message,"IMS-Hit"),false))
@@ -826,39 +1943,42 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long long Size,HashStringList
return;
}
/*}}}*/
+pkgAcqDiffIndex::~pkgAcqDiffIndex()
+{
+ if (diffs != NULL)
+ delete diffs;
+}
+
// AcqIndexDiffs::AcqIndexDiffs - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* The package diff is added to the queue. one object is constructed
* for each diff and the index
*/
-pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- struct IndexTarget const * const Target,
- HashStringList const &ExpectedHashes,
- indexRecords *MetaIndexParser,
- vector<DiffInfo> diffs)
- : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser),
+pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire * const Owner,
+ pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target,
+ vector<DiffInfo> const &diffs)
+ : pkgAcqBaseIndex(Owner, TransactionManager, Target), d(NULL),
available_patches(diffs)
{
- DestFile = GetPartialFileNameFromURI(Target->URI);
+ DestFile = GetPartialFileNameFromURI(Target.URI);
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
- RealURI = Target->URI;
Desc.Owner = this;
- Description = Target->Description;
- Desc.ShortDesc = Target->ShortDesc;
+ Description = Target.Description;
+ Desc.ShortDesc = Target.ShortDesc;
if(available_patches.empty() == true)
{
// we are done (yeah!), check hashes against the final file
- DestFile = GetFinalFileNameFromURI(Target->URI);
+ DestFile = GetFinalFileNameFromURI(Target.URI);
Finish(true);
}
else
{
// patching needs to be bootstrapped with the 'old' version
- std::string const PartialFile = GetPartialFileNameFromURI(RealURI);
+ std::string const PartialFile = GetPartialFileNameFromURI(Target.URI);
if (RealFileExists(PartialFile) == false)
{
if (symlink(GetFinalFilename().c_str(), PartialFile.c_str()) != 0)
@@ -874,7 +1994,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
}
}
/*}}}*/
-void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig * Cnf)/*{{{*/
+void pkgAcqIndexDiffs::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)/*{{{*/
{
Item::Failed(Message,Cnf);
Status = StatDone;
@@ -882,9 +2002,12 @@ void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig * Cnf)/*{{
if(Debug)
std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
- DestFile = GetPartialFileNameFromURI(Target->URI);
+ DestFile = GetPartialFileNameFromURI(Target.URI);
RenameOnError(PDiffError);
- new pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser);
+ std::string const patchname = GetDiffsPatchFileName(DestFile);
+ if (RealFileExists(patchname))
+ rename(patchname.c_str(), std::string(patchname + ".FAILED").c_str());
+ new pkgAcqIndex(Owner, TransactionManager, Target);
Finish();
}
/*}}}*/
@@ -898,15 +2021,8 @@ void pkgAcqIndexDiffs::Finish(bool allDone)
// we restore the original name, this is required, otherwise
// the file will be cleaned
- if(allDone)
+ if(allDone)
{
- if(HashSums().usable() && !HashSums().VerifyFile(DestFile))
- {
- RenameOnError(HashSumMismatch);
- Dequeue();
- return;
- }
-
TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename());
// this is for the "real" finish
@@ -929,7 +2045,7 @@ void pkgAcqIndexDiffs::Finish(bool allDone)
bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
{
// calc sha1 of the just patched file
- std::string const FinalFile = GetPartialFileNameFromURI(RealURI);
+ std::string const FinalFile = GetPartialFileNameFromURI(Target.URI);
if(!FileExists(FinalFile))
{
@@ -945,7 +2061,8 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
if(Debug)
std::clog << "QueueNextDiff: " << FinalFile << " (" << LocalHashes.find(NULL)->toStr() << ")" << std::endl;
- if (unlikely(LocalHashes.usable() == false || ExpectedHashes.usable() == false))
+ HashStringList const TargetFileHashes = GetExpectedHashesFor(Target.MetaKey);
+ if (unlikely(LocalHashes.usable() == false || TargetFileHashes.usable() == false))
{
Failed("Local/Expected hashes are not usable", NULL);
return false;
@@ -953,7 +2070,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
// final file reached before all patches are applied
- if(LocalHashes == ExpectedHashes)
+ if(LocalHashes == TargetFileHashes)
{
Finish(true);
return true;
@@ -978,9 +2095,9 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
}
// queue the right diff
- Desc.URI = RealURI + ".diff/" + available_patches[0].file + ".gz";
+ Desc.URI = Target.URI + ".diff/" + available_patches[0].file + ".gz";
Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
- DestFile = GetPartialFileNameFromURI(RealURI + ".diff/" + available_patches[0].file);
+ DestFile = GetPartialFileNameFromURI(Target.URI + ".diff/" + available_patches[0].file);
if(Debug)
std::clog << "pkgAcqIndexDiffs::QueueNextDiff(): " << Desc.URI << std::endl;
@@ -990,36 +2107,21 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
return true;
}
/*}}}*/
-void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size, HashStringList const &Hashes, /*{{{*/
- pkgAcquire::MethodConfig *Cnf)
+void pkgAcqIndexDiffs::Done(string const &Message, HashStringList const &Hashes, /*{{{*/
+ pkgAcquire::MethodConfig const * const Cnf)
{
if(Debug)
std::clog << "pkgAcqIndexDiffs::Done(): " << Desc.URI << std::endl;
- Item::Done(Message, Size, Hashes, Cnf);
+ Item::Done(Message, Hashes, Cnf);
- // FIXME: verify this download too before feeding it to rred
- std::string const FinalFile = GetPartialFileNameFromURI(RealURI);
+ std::string const FinalFile = GetPartialFileNameFromURI(Target.URI);
+ std::string const PatchFile = GetDiffsPatchFileName(FinalFile);
// success in downloading a diff, enter ApplyDiff state
if(State == StateFetchDiff)
{
- FileFd fd(DestFile, FileFd::ReadOnly, FileFd::Gzip);
- class Hashes LocalHashesCalc;
- LocalHashesCalc.AddFD(fd);
- HashStringList const LocalHashes = LocalHashesCalc.GetHashStringList();
-
- if (fd.Size() != available_patches[0].patch_size ||
- available_patches[0].patch_hashes != LocalHashes)
- {
- // patchfiles are dated, so bad indicates a bad download, so kill it
- unlink(DestFile.c_str());
- Failed("Patch has Size/Hashsum mismatch", NULL);
- return;
- }
-
- // rred excepts the patch as $FinalFile.ed
- Rename(DestFile,FinalFile+".ed");
+ Rename(DestFile, PatchFile);
if(Debug)
std::clog << "Sending to rred method: " << FinalFile << std::endl;
@@ -1030,18 +2132,17 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size, HashStringLi
QueueURI(Desc);
SetActiveSubprocess("rred");
return;
- }
-
+ }
// success in download/apply a diff, queue next (if needed)
if(State == StateApplyDiff)
{
// remove the just applied patch
available_patches.erase(available_patches.begin());
- unlink((FinalFile + ".ed").c_str());
+ unlink(PatchFile.c_str());
// move into place
- if(Debug)
+ if(Debug)
{
std::clog << "Moving patched file in place: " << std::endl
<< DestFile << " -> " << FinalFile << std::endl;
@@ -1052,7 +2153,6 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size, HashStringLi
// see if there is more to download
if(available_patches.empty() == false) {
new pkgAcqIndexDiffs(Owner, TransactionManager, Target,
- ExpectedHashes, MetaIndexParser,
available_patches);
return Finish();
} else
@@ -1062,28 +2162,39 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size, HashStringLi
}
}
/*}}}*/
+std::string pkgAcqIndexDiffs::Custom600Headers() const /*{{{*/
+{
+ if(State != StateApplyDiff)
+ return pkgAcqBaseIndex::Custom600Headers();
+ std::ostringstream patchhashes;
+ HashStringList const ExpectedHashes = available_patches[0].patch_hashes;
+ for (HashStringList::const_iterator hs = ExpectedHashes.begin(); hs != ExpectedHashes.end(); ++hs)
+ patchhashes << "\nPatch-0-" << hs->HashType() << "-Hash: " << hs->HashValue();
+ patchhashes << pkgAcqBaseIndex::Custom600Headers();
+ return patchhashes.str();
+}
+ /*}}}*/
+pkgAcqIndexDiffs::~pkgAcqIndexDiffs() {}
+
// AcqIndexMergeDiffs::AcqIndexMergeDiffs - Constructor /*{{{*/
-pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- struct IndexTarget const * const Target,
- HashStringList const &ExpectedHashes,
- indexRecords *MetaIndexParser,
+pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire * const Owner,
+ pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target,
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
- : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser),
+ : pkgAcqBaseIndex(Owner, TransactionManager, Target), d(NULL),
patch(patch), allPatches(allPatches), State(StateFetchDiff)
{
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
- RealURI = Target->URI;
Desc.Owner = this;
- Description = Target->Description;
- Desc.ShortDesc = Target->ShortDesc;
+ Description = Target.Description;
+ Desc.ShortDesc = Target.ShortDesc;
- Desc.URI = RealURI + ".diff/" + patch.file + ".gz";
+ Desc.URI = Target.URI + ".diff/" + patch.file + ".gz";
Desc.Description = Description + " " + patch.file + string(".pdiff");
- DestFile = GetPartialFileNameFromURI(RealURI + ".diff/" + patch.file);
+ DestFile = GetPartialFileNameFromURI(Target.URI + ".diff/" + patch.file);
if(Debug)
std::clog << "pkgAcqIndexMergeDiffs: " << Desc.URI << std::endl;
@@ -1091,7 +2202,7 @@ pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire *Owner,
QueueURI(Desc);
}
/*}}}*/
-void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig * Cnf)/*{{{*/
+void pkgAcqIndexMergeDiffs::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)/*{{{*/
{
if(Debug)
std::clog << "pkgAcqIndexMergeDiffs failed: " << Desc.URI << " with " << Message << std::endl;
@@ -1110,39 +2221,26 @@ void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig * Cnf
State = StateErrorDiff;
if (Debug)
std::clog << "Falling back to normal index file acquire" << std::endl;
- DestFile = GetPartialFileNameFromURI(Target->URI);
+ DestFile = GetPartialFileNameFromURI(Target.URI);
RenameOnError(PDiffError);
- new pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser);
+ std::string const patchname = GetMergeDiffsPatchFileName(DestFile, patch.file);
+ if (RealFileExists(patchname))
+ rename(patchname.c_str(), std::string(patchname + ".FAILED").c_str());
+ new pkgAcqIndex(Owner, TransactionManager, Target);
}
/*}}}*/
-void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStringList const &Hashes, /*{{{*/
- pkgAcquire::MethodConfig *Cnf)
+void pkgAcqIndexMergeDiffs::Done(string const &Message, HashStringList const &Hashes, /*{{{*/
+ pkgAcquire::MethodConfig const * const Cnf)
{
if(Debug)
std::clog << "pkgAcqIndexMergeDiffs::Done(): " << Desc.URI << std::endl;
- Item::Done(Message,Size,Hashes,Cnf);
-
- // FIXME: verify download before feeding it to rred
- string const FinalFile = GetPartialFileNameFromURI(RealURI);
+ Item::Done(Message, Hashes, Cnf);
+ string const FinalFile = GetPartialFileNameFromURI(Target.URI);
if (State == StateFetchDiff)
{
- FileFd fd(DestFile, FileFd::ReadOnly, FileFd::Gzip);
- class Hashes LocalHashesCalc;
- LocalHashesCalc.AddFD(fd);
- HashStringList const LocalHashes = LocalHashesCalc.GetHashStringList();
-
- if (fd.Size() != patch.patch_size || patch.patch_hashes != LocalHashes)
- {
- // patchfiles are dated, so bad indicates a bad download, so kill it
- unlink(DestFile.c_str());
- Failed("Patch has Size/Hashsum mismatch", NULL);
- return;
- }
-
- // rred expects the patch as $FinalFile.ed.$patchname.gz
- Rename(DestFile, FinalFile + ".ed." + patch.file + ".gz");
+ Rename(DestFile, GetMergeDiffsPatchFileName(FinalFile, patch.file));
// check if this is the last completed diff
State = StateDoneDiff;
@@ -1177,13 +2275,6 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri
// success in download/apply all diffs, clean up
else if (State == StateApplyDiff)
{
- // see if we really got the expected file
- if(ExpectedHashes.usable() && ExpectedHashes != Hashes)
- {
- RenameOnError(HashSumMismatch);
- return;
- }
-
// move the result into place
std::string const Final = GetFinalFilename();
if(Debug)
@@ -1197,8 +2288,8 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri
for (std::vector<pkgAcqIndexMergeDiffs *>::const_iterator I = allPatches->begin();
I != allPatches->end(); ++I)
{
- std::string const PartialFile = GetPartialFileNameFromURI(RealURI);
- std::string patch = PartialFile + ".ed." + (*I)->patch.file + ".gz";
+ std::string const PartialFile = GetPartialFileNameFromURI(Target.URI);
+ std::string const patch = GetMergeDiffsPatchFileName(PartialFile, (*I)->patch.file);
unlink(patch.c_str());
}
unlink(FinalFile.c_str());
@@ -1210,71 +2301,35 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri
}
}
/*}}}*/
-// AcqBaseIndex - Constructor /*{{{*/
-pkgAcqBaseIndex::pkgAcqBaseIndex(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- struct IndexTarget const * const Target,
- HashStringList const &ExpectedHashes,
- indexRecords *MetaIndexParser)
-: Item(Owner, ExpectedHashes, TransactionManager), Target(Target),
- MetaIndexParser(MetaIndexParser)
-{
-}
- /*}}}*/
-// AcqBaseIndex::VerifyHashByMetaKey - verify hash for the given metakey /*{{{*/
-bool pkgAcqBaseIndex::VerifyHashByMetaKey(HashStringList const &Hashes)
+std::string pkgAcqIndexMergeDiffs::Custom600Headers() const /*{{{*/
{
- if(MetaKey != "" && Hashes.usable())
+ if(State != StateApplyDiff)
+ return pkgAcqBaseIndex::Custom600Headers();
+ std::ostringstream patchhashes;
+ unsigned int seen_patches = 0;
+ for (std::vector<pkgAcqIndexMergeDiffs *>::const_iterator I = allPatches->begin();
+ I != allPatches->end(); ++I)
{
- indexRecords::checkSum *Record = MetaIndexParser->Lookup(MetaKey);
- if(Record && Record->Hashes.usable() && Hashes != Record->Hashes)
- {
- printHashSumComparision(RealURI, Record->Hashes, Hashes);
- return false;
- }
+ HashStringList const ExpectedHashes = (*I)->patch.patch_hashes;
+ for (HashStringList::const_iterator hs = ExpectedHashes.begin(); hs != ExpectedHashes.end(); ++hs)
+ patchhashes << "\nPatch-" << seen_patches << "-" << hs->HashType() << "-Hash: " << hs->HashValue();
+ ++seen_patches;
}
- return true;
+ patchhashes << pkgAcqBaseIndex::Custom600Headers();
+ return patchhashes.str();
}
/*}}}*/
-// AcqBaseIndex::GetFinalFilename - Return the full final file path /*{{{*/
-std::string pkgAcqBaseIndex::GetFinalFilename() const
-{
- return GetFinalFileNameFromURI(RealURI);
-}
- /*}}}*/
-// AcqIndex::AcqIndex - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* The package file is added to the queue and a second class is
- instantiated to fetch the revision file */
-pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
- string URI,string URIDesc,string ShortDesc,
- HashStringList const &ExpectedHash)
- : pkgAcqBaseIndex(Owner, 0, NULL, ExpectedHash, NULL)
-{
- RealURI = URI;
-
- AutoSelectCompression();
- Init(URI, URIDesc, ShortDesc);
+pkgAcqIndexMergeDiffs::~pkgAcqIndexMergeDiffs() {}
- if(_config->FindB("Debug::Acquire::Transaction", false) == true)
- std::clog << "New pkgIndex with TransactionManager "
- << TransactionManager << std::endl;
-}
- /*}}}*/
// AcqIndex::AcqIndex - Constructor /*{{{*/
-pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- IndexTarget const *Target,
- HashStringList const &ExpectedHash,
- indexRecords *MetaIndexParser)
- : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHash,
- MetaIndexParser)
+pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner,
+ pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target)
+ : pkgAcqBaseIndex(Owner, TransactionManager, Target), d(NULL), Stage(STAGE_DOWNLOAD)
{
- RealURI = Target->URI;
-
// autoselect the compression method
AutoSelectCompression();
- Init(Target->URI, Target->Description, Target->ShortDesc);
+ Init(Target.URI, Target.Description, Target.ShortDesc);
if(_config->FindB("Debug::Acquire::Transaction", false) == true)
std::clog << "New pkgIndex with TransactionManager "
@@ -1286,14 +2341,14 @@ void pkgAcqIndex::AutoSelectCompression()
{
std::vector<std::string> types = APT::Configuration::getCompressionTypes();
CompressionExtensions = "";
- if (ExpectedHashes.usable())
+ if (TransactionManager->MetaIndexParser != NULL && TransactionManager->MetaIndexParser->Exists(Target.MetaKey))
{
for (std::vector<std::string>::const_iterator t = types.begin();
t != types.end(); ++t)
{
- std::string CompressedMetaKey = string(Target->MetaKey).append(".").append(*t);
+ std::string CompressedMetaKey = string(Target.MetaKey).append(".").append(*t);
if (*t == "uncompressed" ||
- MetaIndexParser->Exists(CompressedMetaKey) == true)
+ TransactionManager->MetaIndexParser->Exists(CompressedMetaKey) == true)
CompressionExtensions.append(*t).append(" ");
}
}
@@ -1314,30 +2369,32 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc,
DestFile = GetPartialFileNameFromURI(URI);
- CurrentCompressionExtension = CompressionExtensions.substr(0, CompressionExtensions.find(' '));
+ size_t const nextExt = CompressionExtensions.find(' ');
+ if (nextExt == std::string::npos)
+ {
+ CurrentCompressionExtension = CompressionExtensions;
+ CompressionExtensions.clear();
+ }
+ else
+ {
+ CurrentCompressionExtension = CompressionExtensions.substr(0, nextExt);
+ CompressionExtensions = CompressionExtensions.substr(nextExt+1);
+ }
+
if (CurrentCompressionExtension == "uncompressed")
{
Desc.URI = URI;
- if(Target)
- MetaKey = string(Target->MetaKey);
}
+ else if (unlikely(CurrentCompressionExtension.empty()))
+ return;
else
{
Desc.URI = URI + '.' + CurrentCompressionExtension;
DestFile = DestFile + '.' + CurrentCompressionExtension;
- if(Target)
- MetaKey = string(Target->MetaKey) + '.' + CurrentCompressionExtension;
}
- // load the filesize
- if(MetaIndexParser)
- {
- indexRecords::checkSum *Record = MetaIndexParser->Lookup(MetaKey);
- if(Record)
- FileSize = Record->Size;
-
- InitByHashIfNeeded(MetaKey);
- }
+ if(TransactionManager->MetaIndexParser != NULL)
+ InitByHashIfNeeded();
Desc.Description = URIDesc;
Desc.Owner = this;
@@ -1347,7 +2404,7 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc,
}
/*}}}*/
// AcqIndex::AdjustForByHash - modify URI for by-hash support /*{{{*/
-void pkgAcqIndex::InitByHashIfNeeded(const std::string MetaKey)
+void pkgAcqIndex::InitByHashIfNeeded()
{
// TODO:
// - (maybe?) add support for by-hash into the sources.list as flag
@@ -1355,15 +2412,15 @@ void pkgAcqIndex::InitByHashIfNeeded(const std::string MetaKey)
std::string HostKnob = "APT::Acquire::" + ::URI(Desc.URI).Host + "::By-Hash";
if(_config->FindB("APT::Acquire::By-Hash", false) == true ||
_config->FindB(HostKnob, false) == true ||
- MetaIndexParser->GetSupportsAcquireByHash())
+ TransactionManager->MetaIndexParser->GetSupportsAcquireByHash())
{
- indexRecords::checkSum *Record = MetaIndexParser->Lookup(MetaKey);
- if(Record)
+ HashStringList const Hashes = GetExpectedHashes();
+ if(Hashes.usable())
{
// FIXME: should we really use the best hash here? or a fixed one?
- const HashString *TargetHash = Record->Hashes.find("");
- std::string ByHash = "/by-hash/" + TargetHash->HashType() + "/" + TargetHash->HashValue();
- size_t trailing_slash = Desc.URI.find_last_of("/");
+ HashString const * const TargetHash = Hashes.find("");
+ std::string const ByHash = "/by-hash/" + TargetHash->HashType() + "/" + TargetHash->HashValue();
+ size_t const trailing_slash = Desc.URI.find_last_of("/");
Desc.URI = Desc.URI.replace(
trailing_slash,
Desc.URI.substr(trailing_slash+1).size()+1,
@@ -1371,7 +2428,7 @@ void pkgAcqIndex::InitByHashIfNeeded(const std::string MetaKey)
} else {
_error->Warning(
"Fetching ByHash requested but can not find record for %s",
- MetaKey.c_str());
+ GetMetaKey().c_str());
}
}
}
@@ -1379,11 +2436,7 @@ void pkgAcqIndex::InitByHashIfNeeded(const std::string MetaKey)
// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
/* The only header we use is the last-modified header. */
-#if APT_PKG_ABI >= 413
string pkgAcqIndex::Custom600Headers() const
-#else
-string pkgAcqIndex::Custom600Headers()
-#endif
{
string Final = GetFinalFilename();
@@ -1392,71 +2445,40 @@ string pkgAcqIndex::Custom600Headers()
if (stat(Final.c_str(),&Buf) == 0)
msg += "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
- if(Target->IsOptional())
+ if(Target.IsOptional)
msg += "\nFail-Ignore: true";
return msg;
}
/*}}}*/
-// pkgAcqIndex::Failed - getting the indexfile failed /*{{{*/
-void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
+// AcqIndex::Failed - getting the indexfile failed /*{{{*/
+void pkgAcqIndex::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)
{
Item::Failed(Message,Cnf);
- size_t const nextExt = CompressionExtensions.find(' ');
- if (nextExt != std::string::npos)
+ // authorisation matches will not be fixed by other compression types
+ if (Status != StatAuthError)
{
- CompressionExtensions = CompressionExtensions.substr(nextExt+1);
- Init(RealURI, Desc.Description, Desc.ShortDesc);
- Status = StatIdle;
- return;
+ if (CompressionExtensions.empty() == false)
+ {
+ Init(Target.URI, Desc.Description, Desc.ShortDesc);
+ Status = StatIdle;
+ return;
+ }
}
- Item::Failed(Message,Cnf);
-
- if(Target->IsOptional() && ExpectedHashes.empty() && Stage == STAGE_DOWNLOAD)
+ if(Target.IsOptional && GetExpectedHashes().empty() && Stage == STAGE_DOWNLOAD)
Status = StatDone;
else
TransactionManager->AbortTransaction();
}
/*}}}*/
-bool pkgAcqIndex::TransactionState(TransactionStates const state) /*{{{*/
-{
- if (pkgAcquire::Item::TransactionState(state) == false)
- return false;
-
- switch (state)
- {
- case TransactionAbort:
- if (Stage == STAGE_DECOMPRESS_AND_VERIFY)
- {
- // keep the compressed file, but drop the decompressed
- EraseFileName.clear();
- if (PartialFile.empty() == false && flExtension(PartialFile) == "decomp")
- unlink(PartialFile.c_str());
- }
- break;
- case TransactionCommit:
- if (EraseFileName.empty() == false)
- unlink(EraseFileName.c_str());
- break;
- }
- return true;
-}
- /*}}}*/
-// pkgAcqIndex::GetFinalFilename - Return the full final file path /*{{{*/
-std::string pkgAcqIndex::GetFinalFilename() const
-{
- std::string const FinalFile = GetFinalFileNameFromURI(RealURI);
- return GetCompressedFileName(RealURI, FinalFile, CurrentCompressionExtension);
-}
- /*}}}*/
// AcqIndex::ReverifyAfterIMS - Reverify index after an ims-hit /*{{{*/
void pkgAcqIndex::ReverifyAfterIMS()
{
// update destfile to *not* include the compression extension when doing
// a reverify (as its uncompressed on disk already)
- DestFile = GetCompressedFileName(RealURI, GetPartialFileNameFromURI(RealURI), CurrentCompressionExtension);
+ DestFile = GetCompressedFileName(Target, GetPartialFileNameFromURI(Target.URI), CurrentCompressionExtension);
// copy FinalFile into partial/ so that we check the hash again
string FinalFile = GetFinalFilename();
@@ -1465,33 +2487,6 @@ void pkgAcqIndex::ReverifyAfterIMS()
QueueURI(Desc);
}
/*}}}*/
-// AcqIndex::ValidateFile - Validate the content of the downloaded file /*{{{*/
-bool pkgAcqIndex::ValidateFile(const std::string &FileName)
-{
- // FIXME: this can go away once we only ever download stuff that
- // has a valid hash and we never do GET based probing
- // FIXME2: this also leaks debian-isms into the code and should go therefore
-
- /* Always validate the index file for correctness (all indexes must
- * have a Package field) (LP: #346386) (Closes: #627642)
- */
- FileFd fd(FileName, FileFd::ReadOnly, FileFd::Extension);
- // Only test for correctness if the content of the file is not empty
- // (empty is ok)
- if (fd.Size() > 0)
- {
- pkgTagSection sec;
- pkgTagFile tag(&fd);
-
- // all our current indexes have a field 'Package' in each section
- if (_error->PendingError() == true ||
- tag.Step(sec) == false ||
- sec.Exists("Package") == false)
- return false;
- }
- return true;
-}
- /*}}}*/
// AcqIndex::Done - Finished a fetch /*{{{*/
// ---------------------------------------------------------------------
/* This goes through a number of states.. On the initial fetch the
@@ -1499,12 +2494,11 @@ bool pkgAcqIndex::ValidateFile(const std::string &FileName)
to the uncompressed version of the file. If this is so the file
is copied into the partial directory. In all other cases the file
is decompressed with a compressed uri. */
-void pkgAcqIndex::Done(string Message,
- unsigned long long Size,
+void pkgAcqIndex::Done(string const &Message,
HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cfg)
+ pkgAcquire::MethodConfig const * const Cfg)
{
- Item::Done(Message,Size,Hashes,Cfg);
+ Item::Done(Message,Hashes,Cfg);
switch(Stage)
{
@@ -1518,23 +2512,13 @@ void pkgAcqIndex::Done(string Message,
}
/*}}}*/
// AcqIndex::StageDownloadDone - Queue for decompress and verify /*{{{*/
-void pkgAcqIndex::StageDownloadDone(string Message,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cfg)
+void pkgAcqIndex::StageDownloadDone(string const &Message, HashStringList const &,
+ pkgAcquire::MethodConfig const * const)
{
- // First check if the calculcated Hash of the (compressed) downloaded
- // file matches the hash we have in the MetaIndexRecords for this file
- if(VerifyHashByMetaKey(Hashes) == false)
- {
- RenameOnError(HashSumMismatch);
- Failed(Message, Cfg);
- return;
- }
-
Complete = true;
// Handle the unzipd case
- string FileName = LookupTag(Message,"Alt-Filename");
+ std::string FileName = LookupTag(Message,"Alt-Filename");
if (FileName.empty() == false)
{
Stage = STAGE_DECOMPRESS_AND_VERIFY;
@@ -1545,17 +2529,11 @@ void pkgAcqIndex::StageDownloadDone(string Message,
SetActiveSubprocess("copy");
return;
}
-
FileName = LookupTag(Message,"Filename");
- if (FileName.empty() == true)
- {
- Status = StatError;
- ErrorText = "Method gave a blank filename";
- }
// Methods like e.g. "file:" will give us a (compressed) FileName that is
// not the "DestFile" we set, in this case we uncompress from the local file
- if (FileName != DestFile)
+ if (FileName != DestFile && RealFileExists(DestFile) == false)
Local = true;
else
EraseFileName = FileName;
@@ -1570,10 +2548,10 @@ void pkgAcqIndex::StageDownloadDone(string Message,
return;
}
- // If we have compressed indexes enabled, queue for hash verification
- if (_config->FindB("Acquire::GzipIndexes",false))
+ // If we want compressed indexes, just copy in place for hash verification
+ if (Target.KeepCompressed == true)
{
- DestFile = GetPartialFileNameFromURI(RealURI + '.' + CurrentCompressionExtension);
+ DestFile = GetPartialFileNameFromURI(Target.URI + '.' + CurrentCompressionExtension);
EraseFileName = "";
Stage = STAGE_DECOMPRESS_AND_VERIFY;
Desc.URI = "copy:" + FileName;
@@ -1602,879 +2580,28 @@ void pkgAcqIndex::StageDownloadDone(string Message,
SetActiveSubprocess(decompProg);
}
/*}}}*/
-// pkgAcqIndex::StageDecompressDone - Final verification /*{{{*/
-void pkgAcqIndex::StageDecompressDone(string Message,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cfg)
+// AcqIndex::StageDecompressDone - Final verification /*{{{*/
+void pkgAcqIndex::StageDecompressDone(string const &,
+ HashStringList const &,
+ pkgAcquire::MethodConfig const * const)
{
- if (ExpectedHashes.usable() && ExpectedHashes != Hashes)
- {
- Desc.URI = RealURI;
- RenameOnError(HashSumMismatch);
- printHashSumComparision(RealURI, ExpectedHashes, Hashes);
- Failed(Message, Cfg);
- return;
- }
-
- if(!ValidateFile(DestFile))
- {
- RenameOnError(InvalidFormat);
- Failed(Message, Cfg);
- return;
- }
-
// Done, queue for rename on transaction finished
TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename());
-
return;
}
/*}}}*/
-// AcqMetaBase - Constructor /*{{{*/
-pkgAcqMetaBase::pkgAcqMetaBase(pkgAcquire *Owner,
- const std::vector<IndexTarget*>* IndexTargets,
- indexRecords* MetaIndexParser,
- std::string const &RealURI,
- HashStringList const &ExpectedHashes,
- pkgAcqMetaBase *TransactionManager)
-: Item(Owner, ExpectedHashes, TransactionManager),
- MetaIndexParser(MetaIndexParser), LastMetaIndexParser(NULL), IndexTargets(IndexTargets),
- AuthPass(false), RealURI(RealURI), IMSHit(false)
-{
-}
- /*}}}*/
-// AcqMetaBase::Add - Add a item to the current Transaction /*{{{*/
-void pkgAcqMetaBase::Add(Item *I)
-{
- Transaction.push_back(I);
-}
- /*}}}*/
-// AcqMetaBase::AbortTransaction - Abort the current Transaction /*{{{*/
-void pkgAcqMetaBase::AbortTransaction()
-{
- if(_config->FindB("Debug::Acquire::Transaction", false) == true)
- std::clog << "AbortTransaction: " << TransactionManager << std::endl;
+pkgAcqIndex::~pkgAcqIndex() {}
- // ensure the toplevel is in error state too
- for (std::vector<Item*>::iterator I = Transaction.begin();
- I != Transaction.end(); ++I)
- {
- (*I)->TransactionState(TransactionAbort);
- }
- Transaction.clear();
-}
- /*}}}*/
-// AcqMetaBase::TransactionHasError - Check for errors in Transaction /*{{{*/
-bool pkgAcqMetaBase::TransactionHasError()
-{
- for (pkgAcquire::ItemIterator I = Transaction.begin();
- I != Transaction.end(); ++I)
- {
- switch((*I)->Status) {
- case StatDone: break;
- case StatIdle: break;
- case StatAuthError: return true;
- case StatError: return true;
- case StatTransientNetworkError: return true;
- case StatFetching: break;
- }
- }
- return false;
-}
- /*}}}*/
-// AcqMetaBase::CommitTransaction - Commit a transaction /*{{{*/
-void pkgAcqMetaBase::CommitTransaction()
-{
- if(_config->FindB("Debug::Acquire::Transaction", false) == true)
- std::clog << "CommitTransaction: " << this << std::endl;
-
- // move new files into place *and* remove files that are not
- // part of the transaction but are still on disk
- for (std::vector<Item*>::iterator I = Transaction.begin();
- I != Transaction.end(); ++I)
- {
- (*I)->TransactionState(TransactionCommit);
- }
- Transaction.clear();
-}
- /*}}}*/
-bool pkgAcqMetaBase::TransactionState(TransactionStates const state) /*{{{*/
-{
- // Do not remove InRelease on IMSHit of Release.gpg [yes, this is very edgecasey]
- if (TransactionManager->IMSHit == false)
- return pkgAcquire::Item::TransactionState(state);
- return true;
-}
- /*}}}*/
-// AcqMetaBase::TransactionStageCopy - Stage a file for copying /*{{{*/
-void pkgAcqMetaBase::TransactionStageCopy(Item *I,
- const std::string &From,
- const std::string &To)
-{
- I->PartialFile = From;
- I->DestFile = To;
-}
- /*}}}*/
-// AcqMetaBase::TransactionStageRemoval - Stage a file for removal /*{{{*/
-void pkgAcqMetaBase::TransactionStageRemoval(Item *I,
- const std::string &FinalFile)
-{
- I->PartialFile = "";
- I->DestFile = FinalFile;
-}
- /*}}}*/
-// AcqMetaBase::GenerateAuthWarning - Check gpg authentication error /*{{{*/
-bool pkgAcqMetaBase::CheckStopAuthentication(pkgAcquire::Item * const I, const std::string &Message)
-{
- // FIXME: this entire function can do now that we disallow going to
- // a unauthenticated state and can cleanly rollback
-
- string const Final = I->GetFinalFilename();
- if(FileExists(Final))
- {
- I->Status = StatTransientNetworkError;
- _error->Warning(_("An error occurred during the signature "
- "verification. The repository is not updated "
- "and the previous index files will be used. "
- "GPG error: %s: %s\n"),
- Desc.Description.c_str(),
- LookupTag(Message,"Message").c_str());
- RunScripts("APT::Update::Auth-Failure");
- return true;
- } else if (LookupTag(Message,"Message").find("NODATA") != string::npos) {
- /* Invalid signature file, reject (LP: #346386) (Closes: #627642) */
- _error->Error(_("GPG error: %s: %s"),
- Desc.Description.c_str(),
- LookupTag(Message,"Message").c_str());
- I->Status = StatError;
- return true;
- } else {
- _error->Warning(_("GPG error: %s: %s"),
- Desc.Description.c_str(),
- LookupTag(Message,"Message").c_str());
- }
- // gpgv method failed
- ReportMirrorFailure("GPGFailure");
- return false;
-}
- /*}}}*/
-// AcqMetaSig::AcqMetaSig - Constructor /*{{{*/
-pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- string const &URI, string const &URIDesc,string const &ShortDesc,
- pkgAcqMetaIndex * const MetaIndex) :
- pkgAcquire::Item(Owner, HashStringList(), TransactionManager), MetaIndex(MetaIndex),
- URIDesc(URIDesc), RealURI(URI)
-{
- DestFile = GetPartialFileNameFromURI(URI);
- // remove any partial downloaded sig-file in partial/.
- // it may confuse proxies and is too small to warrant a
- // partial download anyway
- unlink(DestFile.c_str());
-
- // set the TransactionManager
- if(_config->FindB("Debug::Acquire::Transaction", false) == true)
- std::clog << "New pkgAcqMetaSig with TransactionManager "
- << TransactionManager << std::endl;
-
- // Create the item
- Desc.Description = URIDesc;
- Desc.Owner = this;
- Desc.ShortDesc = ShortDesc;
- Desc.URI = URI;
-
- // If we got a hit for Release, we will get one for Release.gpg too (or obscure errors),
- // so we skip the download step and go instantly to verification
- if (TransactionManager->IMSHit == true && RealFileExists(GetFinalFilename()))
- {
- Complete = true;
- Status = StatDone;
- PartialFile = DestFile = GetFinalFilename();
- MetaIndexFileSignature = DestFile;
- MetaIndex->QueueForSignatureVerify(this, MetaIndex->DestFile, DestFile);
- }
- else
- QueueURI(Desc);
-}
- /*}}}*/
-pkgAcqMetaSig::~pkgAcqMetaSig() /*{{{*/
-{
-}
- /*}}}*/
-// pkgAcqMetaSig::GetFinalFilename - Return the full final file path /*{{{*/
-std::string pkgAcqMetaSig::GetFinalFilename() const
-{
- return GetFinalFileNameFromURI(RealURI);
-}
- /*}}}*/
-// pkgAcqMetaSig::Done - The signature was downloaded/verified /*{{{*/
-// ---------------------------------------------------------------------
-/* The only header we use is the last-modified header. */
-void pkgAcqMetaSig::Done(string Message,unsigned long long Size,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cfg)
-{
- if (MetaIndexFileSignature.empty() == false)
- {
- DestFile = MetaIndexFileSignature;
- MetaIndexFileSignature.clear();
- }
- Item::Done(Message, Size, Hashes, Cfg);
-
- if(MetaIndex->AuthPass == false)
- {
- if(MetaIndex->CheckDownloadDone(this, Message, Hashes) == true)
- {
- // destfile will be modified to point to MetaIndexFile for the
- // gpgv method, so we need to save it here
- MetaIndexFileSignature = DestFile;
- MetaIndex->QueueForSignatureVerify(this, MetaIndex->DestFile, DestFile);
- }
- return;
- }
- else if(MetaIndex->CheckAuthDone(Message) == true)
- {
- if (TransactionManager->IMSHit == false)
- {
- TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename());
- TransactionManager->TransactionStageCopy(MetaIndex, MetaIndex->DestFile, MetaIndex->GetFinalFilename());
- }
- }
-}
- /*}}}*/
-void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
-{
- Item::Failed(Message,Cnf);
-
- // check if we need to fail at this point
- if (MetaIndex->AuthPass == true && MetaIndex->CheckStopAuthentication(this, Message))
- return;
-
- string const FinalRelease = MetaIndex->GetFinalFilename();
- string const FinalReleasegpg = GetFinalFilename();
- string const FinalInRelease = TransactionManager->GetFinalFilename();
-
- if (RealFileExists(FinalReleasegpg) || RealFileExists(FinalInRelease))
- {
- std::string downgrade_msg;
- strprintf(downgrade_msg, _("The repository '%s' is no longer signed."),
- MetaIndex->URIDesc.c_str());
- if(_config->FindB("Acquire::AllowDowngradeToInsecureRepositories"))
- {
- // meh, the users wants to take risks (we still mark the packages
- // from this repository as unauthenticated)
- _error->Warning("%s", downgrade_msg.c_str());
- _error->Warning(_("This is normally not allowed, but the option "
- "Acquire::AllowDowngradeToInsecureRepositories was "
- "given to override it."));
- Status = StatDone;
- } else {
- _error->Error("%s", downgrade_msg.c_str());
- if (TransactionManager->IMSHit == false)
- Rename(MetaIndex->DestFile, MetaIndex->DestFile + ".FAILED");
- Item::Failed("Message: " + downgrade_msg, Cnf);
- TransactionManager->AbortTransaction();
- return;
- }
- }
- else
- _error->Warning(_("The data from '%s' is not signed. Packages "
- "from that repository can not be authenticated."),
- MetaIndex->URIDesc.c_str());
-
- // ensures that a Release.gpg file in the lists/ is removed by the transaction
- TransactionManager->TransactionStageRemoval(this, DestFile);
-
- // only allow going further if the users explicitely wants it
- if(AllowInsecureRepositories(MetaIndex->MetaIndexParser, TransactionManager, this) == true)
- {
- if (RealFileExists(FinalReleasegpg) || RealFileExists(FinalInRelease))
- {
- // open the last Release if we have it
- if (TransactionManager->IMSHit == false)
- {
- MetaIndex->LastMetaIndexParser = new indexRecords;
- _error->PushToStack();
- if (RealFileExists(FinalInRelease))
- MetaIndex->LastMetaIndexParser->Load(FinalInRelease);
- else
- MetaIndex->LastMetaIndexParser->Load(FinalRelease);
- // its unlikely to happen, but if what we have is bad ignore it
- if (_error->PendingError())
- {
- delete MetaIndex->LastMetaIndexParser;
- MetaIndex->LastMetaIndexParser = NULL;
- }
- _error->RevertToStack();
- }
- }
-
- // we parse the indexes here because at this point the user wanted
- // a repository that may potentially harm him
- MetaIndex->MetaIndexParser->Load(MetaIndex->DestFile);
- if (MetaIndex->VerifyVendor(Message) == false)
- /* expired Release files are still a problem you need extra force for */;
- else
- MetaIndex->QueueIndexes(true);
-
- TransactionManager->TransactionStageCopy(MetaIndex, MetaIndex->DestFile, MetaIndex->GetFinalFilename());
- }
-
- // FIXME: this is used often (e.g. in pkgAcqIndexTrans) so refactor
- if (Cnf->LocalOnly == true ||
- StringToBool(LookupTag(Message,"Transient-Failure"),false) == false)
- {
- // Ignore this
- Status = StatDone;
- }
-}
- /*}}}*/
-pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, /*{{{*/
- pkgAcqMetaBase *TransactionManager,
- string URI,string URIDesc,string ShortDesc,
- string MetaIndexSigURI,string MetaIndexSigURIDesc, string MetaIndexSigShortDesc,
- const vector<IndexTarget*>* IndexTargets,
- indexRecords* MetaIndexParser) :
- pkgAcqMetaBase(Owner, IndexTargets, MetaIndexParser, URI, HashStringList(),
- TransactionManager),
- URIDesc(URIDesc), ShortDesc(ShortDesc),
- MetaIndexSigURI(MetaIndexSigURI), MetaIndexSigURIDesc(MetaIndexSigURIDesc),
- MetaIndexSigShortDesc(MetaIndexSigShortDesc)
-{
- if(TransactionManager == NULL)
- {
- this->TransactionManager = this;
- this->TransactionManager->Add(this);
- }
-
- if(_config->FindB("Debug::Acquire::Transaction", false) == true)
- std::clog << "New pkgAcqMetaIndex with TransactionManager "
- << this->TransactionManager << std::endl;
-
-
- Init(URIDesc, ShortDesc);
-}
- /*}}}*/
-// pkgAcqMetaIndex::Init - Delayed constructor /*{{{*/
-void pkgAcqMetaIndex::Init(std::string URIDesc, std::string ShortDesc)
-{
- DestFile = GetPartialFileNameFromURI(RealURI);
-
- // Create the item
- Desc.Description = URIDesc;
- Desc.Owner = this;
- Desc.ShortDesc = ShortDesc;
- Desc.URI = RealURI;
-
- // we expect more item
- ExpectedAdditionalItems = IndexTargets->size();
- QueueURI(Desc);
-}
- /*}}}*/
-void pkgAcqMetaIndex::Done(string Message,unsigned long long Size, /*{{{*/
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cfg)
-{
- Item::Done(Message,Size,Hashes,Cfg);
-
- if(CheckDownloadDone(this, Message, Hashes))
- {
- // we have a Release file, now download the Signature, all further
- // verify/queue for additional downloads will be done in the
- // pkgAcqMetaSig::Done() code
- new pkgAcqMetaSig(Owner, TransactionManager,
- MetaIndexSigURI, MetaIndexSigURIDesc,
- MetaIndexSigShortDesc, this);
- }
-}
- /*}}}*/
-bool pkgAcqMetaBase::CheckAuthDone(string Message) /*{{{*/
-{
- // At this point, the gpgv method has succeeded, so there is a
- // valid signature from a key in the trusted keyring. We
- // perform additional verification of its contents, and use them
- // to verify the indexes we are about to download
-
- if (TransactionManager->IMSHit == false)
- {
- // open the last (In)Release if we have it
- std::string const FinalFile = GetFinalFilename();
- std::string FinalRelease;
- std::string FinalInRelease;
- if (APT::String::Endswith(FinalFile, "InRelease"))
- {
- FinalInRelease = FinalFile;
- FinalRelease = FinalFile.substr(0, FinalFile.length() - strlen("InRelease")) + "Release";
- }
- else
- {
- FinalInRelease = FinalFile.substr(0, FinalFile.length() - strlen("Release")) + "InRelease";
- FinalRelease = FinalFile;
- }
- if (RealFileExists(FinalInRelease) || RealFileExists(FinalRelease))
- {
- LastMetaIndexParser = new indexRecords;
- _error->PushToStack();
- if (RealFileExists(FinalInRelease))
- LastMetaIndexParser->Load(FinalInRelease);
- else
- LastMetaIndexParser->Load(FinalRelease);
- // its unlikely to happen, but if what we have is bad ignore it
- if (_error->PendingError())
- {
- delete LastMetaIndexParser;
- LastMetaIndexParser = NULL;
- }
- _error->RevertToStack();
- }
- }
-
- if (!MetaIndexParser->Load(DestFile))
- {
- Status = StatAuthError;
- ErrorText = MetaIndexParser->ErrorText;
- return false;
- }
-
- if (!VerifyVendor(Message))
- {
- Status = StatAuthError;
- return false;
- }
-
- if (_config->FindB("Debug::pkgAcquire::Auth", false))
- std::cerr << "Signature verification succeeded: "
- << DestFile << std::endl;
-
- // Download further indexes with verification
- QueueIndexes(true);
-
- return true;
-}
- /*}}}*/
-// pkgAcqMetaBase::Custom600Headers - Get header for AcqMetaBase /*{{{*/
-// ---------------------------------------------------------------------
-#if APT_PKG_ABI >= 413
-string pkgAcqMetaBase::Custom600Headers() const
-#else
-string pkgAcqMetaBase::Custom600Headers()
-#endif
-{
- std::string Header = "\nIndex-File: true";
- std::string MaximumSize;
- strprintf(MaximumSize, "\nMaximum-Size: %i",
- _config->FindI("Acquire::MaxReleaseFileSize", 10*1000*1000));
- Header += MaximumSize;
-
- string const FinalFile = GetFinalFilename();
-
- struct stat Buf;
- if (stat(FinalFile.c_str(),&Buf) == 0)
- Header += "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
-
- return Header;
-}
- /*}}}*/
-// pkgAcqMetaBase::GetFinalFilename - Return the full final file path /*{{{*/
-std::string pkgAcqMetaBase::GetFinalFilename() const
-{
- return GetFinalFileNameFromURI(RealURI);
-}
- /*}}}*/
-// pkgAcqMetaBase::QueueForSignatureVerify /*{{{*/
-void pkgAcqMetaBase::QueueForSignatureVerify(pkgAcquire::Item * const I, std::string const &File, std::string const &Signature)
-{
- AuthPass = true;
- I->Desc.URI = "gpgv:" + Signature;
- I->DestFile = File;
- QueueURI(I->Desc);
- I->SetActiveSubprocess("gpgv");
-}
- /*}}}*/
-// pkgAcqMetaBase::CheckDownloadDone /*{{{*/
-bool pkgAcqMetaBase::CheckDownloadDone(pkgAcquire::Item * const I, const std::string &Message, HashStringList const &Hashes) const
-{
- // We have just finished downloading a Release file (it is not
- // verified yet)
-
- string const FileName = LookupTag(Message,"Filename");
- if (FileName.empty() == true)
- {
- I->Status = StatError;
- I->ErrorText = "Method gave a blank filename";
- return false;
- }
-
- if (FileName != I->DestFile)
- {
- I->Local = true;
- I->Desc.URI = "copy:" + FileName;
- I->QueueURI(I->Desc);
- return false;
- }
-
- // make sure to verify against the right file on I-M-S hit
- bool IMSHit = StringToBool(LookupTag(Message,"IMS-Hit"), false);
- if (IMSHit == false && Hashes.usable())
- {
- // detect IMS-Hits servers haven't detected by Hash comparison
- std::string const FinalFile = I->GetFinalFilename();
- if (RealFileExists(FinalFile) && Hashes.VerifyFile(FinalFile) == true)
- {
- IMSHit = true;
- unlink(I->DestFile.c_str());
- }
- }
-
- if(IMSHit == true)
- {
- // for simplicity, the transaction manager is always InRelease
- // even if it doesn't exist.
- if (TransactionManager != NULL)
- TransactionManager->IMSHit = true;
- I->PartialFile = I->DestFile = I->GetFinalFilename();
- }
-
- // set Item to complete as the remaining work is all local (verify etc)
- I->Complete = true;
-
- return true;
-}
- /*}}}*/
-void pkgAcqMetaBase::QueueIndexes(bool verify) /*{{{*/
-{
- // at this point the real Items are loaded in the fetcher
- ExpectedAdditionalItems = 0;
-
- vector <struct IndexTarget*>::const_iterator Target;
- for (Target = IndexTargets->begin();
- Target != IndexTargets->end();
- ++Target)
- {
- HashStringList ExpectedIndexHashes;
- const indexRecords::checkSum *Record = MetaIndexParser->Lookup((*Target)->MetaKey);
-
- // optional target that we do not have in the Release file are
- // skipped
- if (verify == true && Record == NULL && (*Target)->IsOptional())
- continue;
-
- // targets without a hash record are a error when verify is required
- if (verify == true && Record == NULL)
- {
- Status = StatAuthError;
- strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), (*Target)->MetaKey.c_str());
- return;
- }
-
- if (Record)
- ExpectedIndexHashes = Record->Hashes;
-
- if (_config->FindB("Debug::pkgAcquire::Auth", false))
- {
- std::cerr << "Queueing: " << (*Target)->URI << std::endl
- << "Expected Hash:" << std::endl;
- for (HashStringList::const_iterator hs = ExpectedIndexHashes.begin(); hs != ExpectedIndexHashes.end(); ++hs)
- std::cerr << "\t- " << hs->toStr() << std::endl;
- std::cerr << "For: " << ((Record == NULL) ? "<NULL>" : Record->MetaKeyFilename) << std::endl;
-
- }
- if (verify == true && ExpectedIndexHashes.empty() == true)
- {
- Status = StatAuthError;
- strprintf(ErrorText, _("Unable to find hash sum for '%s' in Release file"), (*Target)->MetaKey.c_str());
- return;
- }
-
- /* Queue the Index file (Packages, Sources, Translation-$foo
- (either diff or full packages files, depending
- on the users option) - we also check if the PDiff Index file is listed
- in the Meta-Index file. Ideal would be if pkgAcqDiffIndex would test this
- instead, but passing the required info to it is to much hassle */
- if(_config->FindB("Acquire::PDiffs",true) == true && (verify == false ||
- MetaIndexParser->Exists((*Target)->MetaKey + ".diff/Index") == true))
- new pkgAcqDiffIndex(Owner, TransactionManager, *Target, ExpectedIndexHashes, MetaIndexParser);
- else
- new pkgAcqIndex(Owner, TransactionManager, *Target, ExpectedIndexHashes, MetaIndexParser);
- }
-}
- /*}}}*/
-bool pkgAcqMetaBase::VerifyVendor(string Message) /*{{{*/
-{
- string::size_type pos;
-
- // check for missing sigs (that where not fatal because otherwise we had
- // bombed earlier)
- string missingkeys;
- string msg = _("There is no public key available for the "
- "following key IDs:\n");
- pos = Message.find("NO_PUBKEY ");
- if (pos != std::string::npos)
- {
- string::size_type start = pos+strlen("NO_PUBKEY ");
- string Fingerprint = Message.substr(start, Message.find("\n")-start);
- missingkeys += (Fingerprint);
- }
- if(!missingkeys.empty())
- _error->Warning("%s", (msg + missingkeys).c_str());
-
- string Transformed = MetaIndexParser->GetExpectedDist();
-
- if (Transformed == "../project/experimental")
- {
- Transformed = "experimental";
- }
-
- pos = Transformed.rfind('/');
- if (pos != string::npos)
- {
- Transformed = Transformed.substr(0, pos);
- }
-
- if (Transformed == ".")
- {
- Transformed = "";
- }
-
- if (_config->FindB("Acquire::Check-Valid-Until", true) == true &&
- MetaIndexParser->GetValidUntil() > 0) {
- time_t const invalid_since = time(NULL) - MetaIndexParser->GetValidUntil();
- if (invalid_since > 0)
- {
- std::string errmsg;
- strprintf(errmsg,
- // TRANSLATOR: The first %s is the URL of the bad Release file, the second is
- // the time since then the file is invalid - formated in the same way as in
- // the download progress display (e.g. 7d 3h 42min 1s)
- _("Release file for %s is expired (invalid since %s). "
- "Updates for this repository will not be applied."),
- RealURI.c_str(), TimeToStr(invalid_since).c_str());
- if (ErrorText.empty())
- ErrorText = errmsg;
- return _error->Error("%s", errmsg.c_str());
- }
- }
-
- /* Did we get a file older than what we have? This is a last minute IMS hit and doubles
- as a prevention of downgrading us to older (still valid) files */
- if (TransactionManager->IMSHit == false && LastMetaIndexParser != NULL &&
- LastMetaIndexParser->GetDate() > MetaIndexParser->GetDate())
- {
- TransactionManager->IMSHit = true;
- unlink(DestFile.c_str());
- PartialFile = DestFile = GetFinalFilename();
- delete MetaIndexParser;
- MetaIndexParser = LastMetaIndexParser;
- LastMetaIndexParser = NULL;
- }
-
- if (_config->FindB("Debug::pkgAcquire::Auth", false))
- {
- std::cerr << "Got Codename: " << MetaIndexParser->GetDist() << std::endl;
- std::cerr << "Expecting Dist: " << MetaIndexParser->GetExpectedDist() << std::endl;
- std::cerr << "Transformed Dist: " << Transformed << std::endl;
- }
-
- if (MetaIndexParser->CheckDist(Transformed) == false)
- {
- // This might become fatal one day
-// Status = StatAuthError;
-// ErrorText = "Conflicting distribution; expected "
-// + MetaIndexParser->GetExpectedDist() + " but got "
-// + MetaIndexParser->GetDist();
-// return false;
- if (!Transformed.empty())
- {
- _error->Warning(_("Conflicting distribution: %s (expected %s but got %s)"),
- Desc.Description.c_str(),
- Transformed.c_str(),
- MetaIndexParser->GetDist().c_str());
- }
- }
-
- return true;
-}
- /*}}}*/
-// pkgAcqMetaIndex::Failed - no Release file present /*{{{*/
-void pkgAcqMetaIndex::Failed(string Message,
- pkgAcquire::MethodConfig * Cnf)
-{
- pkgAcquire::Item::Failed(Message, Cnf);
- Status = StatDone;
-
- _error->Warning(_("The repository '%s' does not have a Release file. "
- "This is deprecated, please contact the owner of the "
- "repository."), URIDesc.c_str());
-
- // No Release file was present so fall
- // back to queueing Packages files without verification
- // only allow going further if the users explicitely wants it
- if(AllowInsecureRepositories(MetaIndexParser, TransactionManager, this) == true)
- {
- // Done, queue for rename on transaction finished
- if (FileExists(DestFile))
- TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename());
-
- // queue without any kind of hashsum support
- QueueIndexes(false);
- }
-}
- /*}}}*/
-void pkgAcqMetaIndex::Finished() /*{{{*/
-{
- if(_config->FindB("Debug::Acquire::Transaction", false) == true)
- std::clog << "Finished: " << DestFile <<std::endl;
- if(TransactionManager != NULL &&
- TransactionManager->TransactionHasError() == false)
- TransactionManager->CommitTransaction();
-}
- /*}}}*/
-pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire *Owner, /*{{{*/
- string const &URI, string const &URIDesc, string const &ShortDesc,
- string const &MetaIndexURI, string const &MetaIndexURIDesc, string const &MetaIndexShortDesc,
- string const &MetaSigURI, string const &MetaSigURIDesc, string const &MetaSigShortDesc,
- const vector<IndexTarget*>* IndexTargets,
- indexRecords* MetaIndexParser) :
- pkgAcqMetaIndex(Owner, NULL, URI, URIDesc, ShortDesc, MetaSigURI, MetaSigURIDesc,MetaSigShortDesc, IndexTargets, MetaIndexParser),
- MetaIndexURI(MetaIndexURI), MetaIndexURIDesc(MetaIndexURIDesc), MetaIndexShortDesc(MetaIndexShortDesc),
- MetaSigURI(MetaSigURI), MetaSigURIDesc(MetaSigURIDesc), MetaSigShortDesc(MetaSigShortDesc)
-{
- // index targets + (worst case:) Release/Release.gpg
- ExpectedAdditionalItems = IndexTargets->size() + 2;
-}
- /*}}}*/
-pkgAcqMetaClearSig::~pkgAcqMetaClearSig() /*{{{*/
-{
-}
- /*}}}*/
-// pkgAcqMetaClearSig::Custom600Headers - Insert custom request headers /*{{{*/
-#if APT_PKG_ABI >= 413
-string pkgAcqMetaClearSig::Custom600Headers() const
-#else
-string pkgAcqMetaClearSig::Custom600Headers()
-#endif
-{
- string Header = pkgAcqMetaBase::Custom600Headers();
- Header += "\nFail-Ignore: true";
- return Header;
-}
- /*}}}*/
-// pkgAcqMetaClearSig::Done - We got a file /*{{{*/
-class APT_HIDDEN DummyItem : public pkgAcquire::Item
-{
- std::string URI;
- public:
- virtual std::string DescURI() {return URI;};
-
- DummyItem(pkgAcquire *Owner, std::string const &URI) : pkgAcquire::Item(Owner), URI(URI)
- {
- Status = StatDone;
- DestFile = GetFinalFileNameFromURI(URI);
- }
-};
-void pkgAcqMetaClearSig::Done(std::string Message,unsigned long long Size,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf)
-{
- Item::Done(Message, Size, Hashes, Cnf);
-
- // if we expect a ClearTextSignature (InRelease), ensure that
- // this is what we get and if not fail to queue a
- // Release/Release.gpg, see #346386
- if (FileExists(DestFile) && !StartsWithGPGClearTextSignature(DestFile))
- {
- pkgAcquire::Item::Failed(Message, Cnf);
- RenameOnError(NotClearsigned);
- TransactionManager->AbortTransaction();
- return;
- }
-
- if(AuthPass == false)
- {
- if(CheckDownloadDone(this, Message, Hashes) == true)
- QueueForSignatureVerify(this, DestFile, DestFile);
- return;
- }
- else if(CheckAuthDone(Message) == true)
- {
- if (TransactionManager->IMSHit == false)
- TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename());
- else if (RealFileExists(GetFinalFilename()) == false)
- {
- // We got an InRelease file IMSHit, but we haven't one, which means
- // we had a valid Release/Release.gpg combo stepping in, which we have
- // to 'acquire' now to ensure list cleanup isn't removing them
- new DummyItem(Owner, MetaIndexURI);
- new DummyItem(Owner, MetaSigURI);
- }
- }
-}
- /*}}}*/
-void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
-{
- Item::Failed(Message, Cnf);
-
- // we failed, we will not get additional items from this method
- ExpectedAdditionalItems = 0;
-
- if (AuthPass == false)
- {
- // Queue the 'old' InRelease file for removal if we try Release.gpg
- // as otherwise the file will stay around and gives a false-auth
- // impression (CVE-2012-0214)
- TransactionManager->TransactionStageRemoval(this, GetFinalFilename());
- Status = StatDone;
-
- new pkgAcqMetaIndex(Owner, TransactionManager,
- MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
- MetaSigURI, MetaSigURIDesc, MetaSigShortDesc,
- IndexTargets, MetaIndexParser);
- }
- else
- {
- if(CheckStopAuthentication(this, Message))
- return;
-
- _error->Warning(_("The data from '%s' is not signed. Packages "
- "from that repository can not be authenticated."),
- URIDesc.c_str());
-
- // No Release file was present, or verification failed, so fall
- // back to queueing Packages files without verification
- // only allow going further if the users explicitely wants it
- if(AllowInsecureRepositories(MetaIndexParser, TransactionManager, this) == true)
- {
- Status = StatDone;
-
- /* Always move the meta index, even if gpgv failed. This ensures
- * that PackageFile objects are correctly filled in */
- if (FileExists(DestFile))
- {
- string FinalFile = GetFinalFilename();
- /* InRelease files become Release files, otherwise
- * they would be considered as trusted later on */
- RealURI = RealURI.replace(RealURI.rfind("InRelease"), 9,
- "Release");
- FinalFile = FinalFile.replace(FinalFile.rfind("InRelease"), 9,
- "Release");
-
- // Done, queue for rename on transaction finished
- TransactionManager->TransactionStageCopy(this, DestFile, FinalFile);
- }
- QueueIndexes(false);
- }
- }
-}
- /*}}}*/
// AcqArchive::AcqArchive - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* This just sets up the initial fetch environment and queues the first
possibilitiy */
-pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
- pkgRecords *Recs,pkgCache::VerIterator const &Version,
+pkgAcqArchive::pkgAcqArchive(pkgAcquire * const Owner,pkgSourceList * const Sources,
+ pkgRecords * const Recs,pkgCache::VerIterator const &Version,
string &StoreFilename) :
- Item(Owner, HashStringList()), Version(Version), Sources(Sources), Recs(Recs),
- StoreFilename(StoreFilename), Vf(Version.FileList()),
+ Item(Owner), d(NULL), LocalSource(false), Version(Version), Sources(Sources), Recs(Recs),
+ StoreFilename(StoreFilename), Vf(Version.FileList()),
Trusted(false)
{
Retries = _config->FindI("Acquire::Retries",0);
@@ -2494,7 +2621,7 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
// Skip not source sources, they do not have file fields.
for (; Vf.end() == false; ++Vf)
{
- if ((Vf.File()->Flags & pkgCache::Flag::NotSource) != 0)
+ if (Vf.File().Flagged(pkgCache::Flag::NotSource))
continue;
break;
}
@@ -2560,15 +2687,17 @@ bool pkgAcqArchive::QueueNext()
{
for (; Vf.end() == false; ++Vf)
{
+ pkgCache::PkgFileIterator const PkgF = Vf.File();
// Ignore not source sources
- if ((Vf.File()->Flags & pkgCache::Flag::NotSource) != 0)
+ if (PkgF.Flagged(pkgCache::Flag::NotSource))
continue;
// Try to cross match against the source list
pkgIndexFile *Index;
- if (Sources->FindIndex(Vf.File(),Index) == false)
+ if (Sources->FindIndex(PkgF, Index) == false)
continue;
-
+ LocalSource = PkgF.Flagged(pkgCache::Flag::LocalSource);
+
// only try to get a trusted package from another source if that source
// is also trusted
if(Trusted && !Index->IsTrusted())
@@ -2668,37 +2797,14 @@ bool pkgAcqArchive::QueueNext()
// AcqArchive::Done - Finished fetching /*{{{*/
// ---------------------------------------------------------------------
/* */
-void pkgAcqArchive::Done(string Message,unsigned long long Size, HashStringList const &CalcHashes,
- pkgAcquire::MethodConfig *Cfg)
+void pkgAcqArchive::Done(string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cfg)
{
- Item::Done(Message, Size, CalcHashes, Cfg);
-
- // Check the size
- if (Size != Version->Size)
- {
- RenameOnError(SizeMismatch);
- return;
- }
-
- // FIXME: could this empty() check impose *any* sort of security issue?
- if(ExpectedHashes.usable() && ExpectedHashes != CalcHashes)
- {
- RenameOnError(HashSumMismatch);
- printHashSumComparision(DestFile, ExpectedHashes, CalcHashes);
- return;
- }
+ Item::Done(Message, Hashes, Cfg);
// Grab the output filename
- string FileName = LookupTag(Message,"Filename");
- if (FileName.empty() == true)
- {
- Status = StatError;
- ErrorText = "Method gave a blank filename";
- return;
- }
-
- // Reference filename
- if (FileName != DestFile)
+ std::string const FileName = LookupTag(Message,"Filename");
+ if (DestFile != FileName && RealFileExists(DestFile) == false)
{
StoreFilename = DestFile = FileName;
Local = true;
@@ -2713,23 +2819,17 @@ void pkgAcqArchive::Done(string Message,unsigned long long Size, HashStringList
Complete = true;
}
/*}}}*/
-// Acquire::Item::GetFinalFilename - Return the full final file path /*{{{*/
-std::string pkgAcqArchive::GetFinalFilename() const
-{
- return _config->FindDir("Dir::Cache::Archives") + flNotDir(StoreFilename);
-}
- /*}}}*/
// AcqArchive::Failed - Failure handler /*{{{*/
// ---------------------------------------------------------------------
/* Here we try other sources */
-void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
+void pkgAcqArchive::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)
{
Item::Failed(Message,Cnf);
- /* We don't really want to retry on failed media swaps, this prevents
+ /* We don't really want to retry on failed media swaps, this prevents
that. An interesting observation is that permanent failures are not
recorded. */
- if (Cnf->Removable == true &&
+ if (Cnf->Removable == true &&
StringToBool(LookupTag(Message,"Transient-Failure"),false) == true)
{
// Vf = Version.FileList();
@@ -2757,21 +2857,12 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
}
}
/*}}}*/
-// AcqArchive::IsTrusted - Determine whether this archive comes from a trusted source /*{{{*/
-// ---------------------------------------------------------------------
-#if APT_PKG_ABI >= 413
-APT_PURE bool pkgAcqArchive::IsTrusted() const
-#else
-APT_PURE bool pkgAcqArchive::IsTrusted()
-#endif
+APT_PURE bool pkgAcqArchive::IsTrusted() const /*{{{*/
{
return Trusted;
}
/*}}}*/
-// AcqArchive::Finished - Fetching has finished, tidy up /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void pkgAcqArchive::Finished()
+void pkgAcqArchive::Finished() /*{{{*/
{
if (Status == pkgAcquire::Item::StatDone &&
Complete == true)
@@ -2779,17 +2870,225 @@ void pkgAcqArchive::Finished()
StoreFilename = string();
}
/*}}}*/
+std::string pkgAcqArchive::DescURI() const /*{{{*/
+{
+ return Desc.URI;
+}
+ /*}}}*/
+std::string pkgAcqArchive::ShortDesc() const /*{{{*/
+{
+ return Desc.ShortDesc;
+}
+ /*}}}*/
+pkgAcqArchive::~pkgAcqArchive() {}
+
+// AcqChangelog::pkgAcqChangelog - Constructors /*{{{*/
+pkgAcqChangelog::pkgAcqChangelog(pkgAcquire * const Owner, pkgCache::VerIterator const &Ver,
+ std::string const &DestDir, std::string const &DestFilename) :
+ pkgAcquire::Item(Owner), d(NULL), SrcName(Ver.SourcePkgName()), SrcVersion(Ver.SourceVerStr())
+{
+ Desc.URI = URI(Ver);
+ Init(DestDir, DestFilename);
+}
+// some parameters are char* here as they come likely from char* interfaces – which can also return NULL
+pkgAcqChangelog::pkgAcqChangelog(pkgAcquire * const Owner, pkgCache::RlsFileIterator const &RlsFile,
+ char const * const Component, char const * const SrcName, char const * const SrcVersion,
+ const string &DestDir, const string &DestFilename) :
+ pkgAcquire::Item(Owner), d(NULL), SrcName(SrcName), SrcVersion(SrcVersion)
+{
+ Desc.URI = URI(RlsFile, Component, SrcName, SrcVersion);
+ Init(DestDir, DestFilename);
+}
+pkgAcqChangelog::pkgAcqChangelog(pkgAcquire * const Owner,
+ std::string const &URI, char const * const SrcName, char const * const SrcVersion,
+ const string &DestDir, const string &DestFilename) :
+ pkgAcquire::Item(Owner), d(NULL), SrcName(SrcName), SrcVersion(SrcVersion)
+{
+ Desc.URI = URI;
+ Init(DestDir, DestFilename);
+}
+void pkgAcqChangelog::Init(std::string const &DestDir, std::string const &DestFilename)
+{
+ if (Desc.URI.empty())
+ {
+ Status = StatError;
+ // TRANSLATOR: %s=%s is sourcename=sourceversion, e.g. apt=1.1
+ strprintf(ErrorText, _("Changelog unavailable for %s=%s"), SrcName.c_str(), SrcVersion.c_str());
+ // Let the error message print something sensible rather than "Failed to fetch /"
+ if (DestFilename.empty())
+ DestFile = SrcName + ".changelog";
+ else
+ DestFile = DestFilename;
+ Desc.URI = "changelog:/" + DestFile;
+ return;
+ }
+
+ if (DestDir.empty())
+ {
+ std::string const systemTemp = GetTempDir();
+ char tmpname[100];
+ snprintf(tmpname, sizeof(tmpname), "%s/apt-changelog-XXXXXX", systemTemp.c_str());
+ if (NULL == mkdtemp(tmpname))
+ {
+ _error->Errno("mkdtemp", "mkdtemp failed in changelog acquire of %s %s", SrcName.c_str(), SrcVersion.c_str());
+ Status = StatError;
+ return;
+ }
+ DestFile = TemporaryDirectory = tmpname;
+ }
+ else
+ DestFile = DestDir;
+
+ if (DestFilename.empty())
+ DestFile = flCombine(DestFile, SrcName + ".changelog");
+ else
+ DestFile = flCombine(DestFile, DestFilename);
+
+ Desc.ShortDesc = "Changelog";
+ strprintf(Desc.Description, "%s %s %s Changelog", URI::SiteOnly(Desc.URI).c_str(), SrcName.c_str(), SrcVersion.c_str());
+ Desc.Owner = this;
+ QueueURI(Desc);
+}
+ /*}}}*/
+std::string pkgAcqChangelog::URI(pkgCache::VerIterator const &Ver) /*{{{*/
+{
+ char const * const SrcName = Ver.SourcePkgName();
+ char const * const SrcVersion = Ver.SourceVerStr();
+ pkgCache::PkgFileIterator PkgFile;
+ // find the first source for this version which promises a changelog
+ for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; ++VF)
+ {
+ pkgCache::PkgFileIterator const PF = VF.File();
+ if (PF.Flagged(pkgCache::Flag::NotSource) || PF->Release == 0)
+ continue;
+ PkgFile = PF;
+ pkgCache::RlsFileIterator const RF = PF.ReleaseFile();
+ std::string const uri = URI(RF, PF.Component(), SrcName, SrcVersion);
+ if (uri.empty())
+ continue;
+ return uri;
+ }
+ return "";
+}
+std::string pkgAcqChangelog::URITemplate(pkgCache::RlsFileIterator const &Rls)
+{
+ if (Rls.end() == true || (Rls->Label == 0 && Rls->Origin == 0))
+ return "";
+ std::string const serverConfig = "Acquire::Changelogs::URI";
+ std::string server;
+#define APT_EMPTY_SERVER \
+ if (server.empty() == false) \
+ { \
+ if (server != "no") \
+ return server; \
+ return ""; \
+ }
+#define APT_CHECK_SERVER(X, Y) \
+ if (Rls->X != 0) \
+ { \
+ std::string const specialServerConfig = serverConfig + "::" + Y + #X + "::" + Rls.X(); \
+ server = _config->Find(specialServerConfig); \
+ APT_EMPTY_SERVER \
+ }
+ // this way e.g. Debian-Security can fallback to Debian
+ APT_CHECK_SERVER(Label, "Override::")
+ APT_CHECK_SERVER(Origin, "Override::")
+
+ if (RealFileExists(Rls.FileName()))
+ {
+ _error->PushToStack();
+ FileFd rf;
+ /* This can be costly. A caller wanting to get millions of URIs might
+ want to do this on its own once and use Override settings.
+ We don't do this here as Origin/Label are not as unique as they
+ should be so this could produce request order-dependent anomalies */
+ if (OpenMaybeClearSignedFile(Rls.FileName(), rf) == true)
+ {
+ pkgTagFile TagFile(&rf, rf.Size());
+ pkgTagSection Section;
+ if (TagFile.Step(Section) == true)
+ server = Section.FindS("Changelogs");
+ }
+ _error->RevertToStack();
+ APT_EMPTY_SERVER
+ }
+
+ APT_CHECK_SERVER(Label, "")
+ APT_CHECK_SERVER(Origin, "")
+#undef APT_CHECK_SERVER
+#undef APT_EMPTY_SERVER
+ return "";
+}
+std::string pkgAcqChangelog::URI(pkgCache::RlsFileIterator const &Rls,
+ char const * const Component, char const * const SrcName,
+ char const * const SrcVersion)
+{
+ return URI(URITemplate(Rls), Component, SrcName, SrcVersion);
+}
+std::string pkgAcqChangelog::URI(std::string const &Template,
+ char const * const Component, char const * const SrcName,
+ char const * const SrcVersion)
+{
+ if (Template.find("CHANGEPATH") == std::string::npos)
+ return "";
+
+ // the path is: COMPONENT/SRC/SRCNAME/SRCNAME_SRCVER, e.g. main/a/apt/1.1 or contrib/liba/libapt/2.0
+ std::string Src = SrcName;
+ std::string path = APT::String::Startswith(SrcName, "lib") ? Src.substr(0, 4) : Src.substr(0,1);
+ path.append("/").append(Src).append("/");
+ path.append(Src).append("_").append(StripEpoch(SrcVersion));
+ // we omit component for releases without one (= flat-style repositories)
+ if (Component != NULL && strlen(Component) != 0)
+ path = std::string(Component) + "/" + path;
+
+ return SubstVar(Template, "CHANGEPATH", path);
+}
+ /*}}}*/
+// AcqChangelog::Failed - Failure handler /*{{{*/
+void pkgAcqChangelog::Failed(string const &Message, pkgAcquire::MethodConfig const * const Cnf)
+{
+ Item::Failed(Message,Cnf);
+
+ std::string errText;
+ // TRANSLATOR: %s=%s is sourcename=sourceversion, e.g. apt=1.1
+ strprintf(errText, _("Changelog unavailable for %s=%s"), SrcName.c_str(), SrcVersion.c_str());
+
+ // Error is probably something techy like 404 Not Found
+ if (ErrorText.empty())
+ ErrorText = errText;
+ else
+ ErrorText = errText + " (" + ErrorText + ")";
+ return;
+}
+ /*}}}*/
+// AcqChangelog::Done - Item downloaded OK /*{{{*/
+void pkgAcqChangelog::Done(string const &Message,HashStringList const &CalcHashes,
+ pkgAcquire::MethodConfig const * const Cnf)
+{
+ Item::Done(Message,CalcHashes,Cnf);
+
+ Complete = true;
+}
+ /*}}}*/
+pkgAcqChangelog::~pkgAcqChangelog() /*{{{*/
+{
+ if (TemporaryDirectory.empty() == false)
+ {
+ unlink(DestFile.c_str());
+ rmdir(TemporaryDirectory.c_str());
+ }
+}
+ /*}}}*/
+
// AcqFile::pkgAcqFile - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* The file is added to the queue */
-pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI, HashStringList const &Hashes,
- unsigned long long Size,string Dsc,string ShortDesc,
+pkgAcqFile::pkgAcqFile(pkgAcquire * const Owner,string const &URI, HashStringList const &Hashes,
+ unsigned long long const Size,string const &Dsc,string const &ShortDesc,
const string &DestDir, const string &DestFilename,
- bool IsIndexFile) :
- Item(Owner, Hashes), IsIndexFile(IsIndexFile)
+ bool const IsIndexFile) :
+ Item(Owner), d(NULL), IsIndexFile(IsIndexFile), ExpectedHashes(Hashes)
{
Retries = _config->FindI("Acquire::Retries",0);
-
+
if(!DestFilename.empty())
DestFile = DestFilename;
else if(!DestDir.empty())
@@ -2804,7 +3103,7 @@ pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI, HashStringList const &Hashe
// Set the short description to the archive component
Desc.ShortDesc = ShortDesc;
-
+
// Get the transfer sizes
FileSize = Size;
struct stat Buf;
@@ -2821,37 +3120,20 @@ pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI, HashStringList const &Hashe
}
/*}}}*/
// AcqFile::Done - Item downloaded OK /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void pkgAcqFile::Done(string Message,unsigned long long Size,HashStringList const &CalcHashes,
- pkgAcquire::MethodConfig *Cnf)
+void pkgAcqFile::Done(string const &Message,HashStringList const &CalcHashes,
+ pkgAcquire::MethodConfig const * const Cnf)
{
- Item::Done(Message,Size,CalcHashes,Cnf);
-
- // Check the hash
- if(ExpectedHashes.usable() && ExpectedHashes != CalcHashes)
- {
- RenameOnError(HashSumMismatch);
- printHashSumComparision(DestFile, ExpectedHashes, CalcHashes);
- return;
- }
-
- string FileName = LookupTag(Message,"Filename");
- if (FileName.empty() == true)
- {
- Status = StatError;
- ErrorText = "Method gave a blank filename";
- return;
- }
+ Item::Done(Message,CalcHashes,Cnf);
+ std::string const FileName = LookupTag(Message,"Filename");
Complete = true;
-
+
// The files timestamp matches
if (StringToBool(LookupTag(Message,"IMS-Hit"),false) == true)
return;
-
+
// We have to copy it into place
- if (FileName != DestFile)
+ if (RealFileExists(DestFile.c_str()) == false)
{
Local = true;
if (_config->FindB("Acquire::Source-Symlinks",true) == false ||
@@ -2861,7 +3143,7 @@ void pkgAcqFile::Done(string Message,unsigned long long Size,HashStringList cons
QueueURI(Desc);
return;
}
-
+
// Erase the file if it is a symlink so we can overwrite it
struct stat St;
if (lstat(DestFile.c_str(),&St) == 0)
@@ -2869,7 +3151,7 @@ void pkgAcqFile::Done(string Message,unsigned long long Size,HashStringList cons
if (S_ISLNK(St.st_mode) != 0)
unlink(DestFile.c_str());
}
-
+
// Symlink the file
if (symlink(FileName.c_str(),DestFile.c_str()) != 0)
{
@@ -2881,14 +3163,14 @@ void pkgAcqFile::Done(string Message,unsigned long long Size,HashStringList cons
ErrorText = msg.str();
Status = StatError;
Complete = false;
- }
+ }
}
}
/*}}}*/
// AcqFile::Failed - Failure handler /*{{{*/
// ---------------------------------------------------------------------
/* Here we try other sources */
-void pkgAcqFile::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
+void pkgAcqFile::Failed(string const &Message, pkgAcquire::MethodConfig const * const Cnf)
{
Item::Failed(Message,Cnf);
@@ -2905,17 +3187,11 @@ void pkgAcqFile::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
}
/*}}}*/
-// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/
-// ---------------------------------------------------------------------
-/* The only header we use is the last-modified header. */
-#if APT_PKG_ABI >= 413
-string pkgAcqFile::Custom600Headers() const
-#else
-string pkgAcqFile::Custom600Headers()
-#endif
+string pkgAcqFile::Custom600Headers() const /*{{{*/
{
if (IsIndexFile)
return "\nIndex-File: true";
return "";
}
/*}}}*/
+pkgAcqFile::~pkgAcqFile() {}
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 07c86f31b..d6bcdafcb 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -1,26 +1,26 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.h,v 1.26.2.3 2004/01/02 18:51:00 mdz Exp $
/* ######################################################################
Acquire Item - Item to acquire
When an item is instantiated it will add it self to the local list in
- the Owner Acquire class. Derived classes will then call QueueURI to
- register all the URI's they wish to fetch at the initial moment.
-
+ the Owner Acquire class. Derived classes will then call QueueURI to
+ register all the URI's they wish to fetch at the initial moment.
+
Three item classes are provided to provide functionality for
downloading of Index, Translation and Packages files.
-
+
A Archive class is provided for downloading .deb files. It does Hash
checking and source location as well as a retry algorithm.
-
+
##################################################################### */
/*}}}*/
#ifndef PKGLIB_ACQUIRE_ITEM_H
#define PKGLIB_ACQUIRE_ITEM_H
#include <apt-pkg/acquire.h>
+#include <apt-pkg/indexfile.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/weakptr.h>
#include <apt-pkg/pkgcache.h>
@@ -28,13 +28,11 @@
#include <string>
#include <vector>
+#include <map>
#ifndef APT_8_CLEANER_HEADERS
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/vendor.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/indexrecords.h>
#endif
/** \addtogroup acquire
@@ -43,13 +41,14 @@
* \file acquire-item.h
*/
-class indexRecords;
class pkgRecords;
class pkgSourceList;
-class IndexTarget;
-class pkgAcqMetaBase;
+class pkgAcqMetaClearSig;
+class pkgAcqIndexMergeDiffs;
+class metaIndex;
-/** \brief Represents the process by which a pkgAcquire object should {{{
+class pkgAcquire::Item : public WeakPointable /*{{{*/
+/** \brief Represents the process by which a pkgAcquire object should
* retrieve a file or a collection of files.
*
* By convention, Item subclasses should insert themselves into the
@@ -61,46 +60,7 @@ class pkgAcqMetaBase;
*
* \see pkgAcquire
*/
-class pkgAcquire::Item : public WeakPointable
-{
- friend class pkgAcqMetaBase;
-
- void *d;
-
- protected:
-
- /** \brief The acquire object with which this item is associated. */
- pkgAcquire *Owner;
-
- /** \brief Insert this item into its owner's queue.
- *
- * The method is designed to check if the request would end
- * in an IMSHit and if it determines that it would, it isn't
- * queueing the Item and instead sets it to completion instantly.
- *
- * \param Item Metadata about this item (its URI and
- * description).
- * \return true if the item was inserted, false if IMSHit was detected
- */
- virtual bool QueueURI(ItemDesc &Item);
-
- /** \brief Remove this item from its owner's queue. */
- void Dequeue();
-
- /** \brief Rename a file without modifying its timestamp.
- *
- * Many item methods call this as their final action.
- *
- * \param From The file to be renamed.
- *
- * \param To The new name of \a From. If \a To exists it will be
- * overwritten.
- */
- bool Rename(std::string From,std::string To);
-
- /** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
-
+{
public:
/** \brief The current status of this item. */
@@ -125,7 +85,7 @@ class pkgAcquire::Item : public WeakPointable
*/
StatAuthError,
- /** \brief The item was could not be downloaded because of
+ /** \brief The item was could not be downloaded because of
* a transient network error (e.g. network down)
*/
StatTransientNetworkError,
@@ -153,11 +113,11 @@ class pkgAcquire::Item : public WeakPointable
std::string ActiveSubprocess;
/** \brief A client-supplied unique identifier.
- *
+ *
* This field is initalized to 0; it is meant to be filled in by
* clients that wish to use it to uniquely identify items.
*
- * \todo it's unused in apt itself
+ * APT progress reporting will store an ID there as shown in "Get:42 …"
*/
unsigned long ID;
@@ -173,6 +133,7 @@ class pkgAcquire::Item : public WeakPointable
* download progress indicator's overall statistics.
*/
bool Local;
+
std::string UsedMirror;
/** \brief The number of fetch queues into which this item has been
@@ -185,9 +146,6 @@ class pkgAcquire::Item : public WeakPointable
*/
unsigned int QueueCounter;
- /** \brief TransactionManager */
- pkgAcqMetaBase *TransactionManager;
-
/** \brief The number of additional fetch items that are expected
* once this item is done.
*
@@ -197,15 +155,12 @@ class pkgAcquire::Item : public WeakPointable
* progress.
*/
unsigned int ExpectedAdditionalItems;
-
+
/** \brief The name of the file into which the retrieved object
* will be written.
*/
std::string DestFile;
- /** \brief storge name until a transaction is finished */
- std::string PartialFile;
-
/** \brief Invoked by the acquire worker when the object couldn't
* be fetched.
*
@@ -219,7 +174,29 @@ class pkgAcquire::Item : public WeakPointable
*
* \sa pkgAcqMethod
*/
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
+
+ /** \brief Invoked by the acquire worker to check if the successfully
+ * fetched object is also the objected we wanted to have.
+ *
+ * Note that the object might \e not have been written to
+ * DestFile; check for the presence of an Alt-Filename entry in
+ * Message to find the file to which it was really written.
+ *
+ * This is called before Done is called and can prevent it by returning
+ * \b false which will result in Failed being called instead.
+ *
+ * You should prefer to use this method over calling Failed() from Done()
+ * as this has e.g. the wrong progress reporting.
+ *
+ * \param Message Data from the acquire method. Use LookupTag()
+ * to parse it.
+ * \param Cnf The method via which the object was fetched.
+ *
+ * \sa pkgAcqMethod
+ */
+ virtual bool VerifyDone(std::string const &Message,
+ pkgAcquire::MethodConfig const * const Cnf);
/** \brief Invoked by the acquire worker when the object was
* fetched successfully.
@@ -234,25 +211,24 @@ class pkgAcquire::Item : public WeakPointable
*
* \param Message Data from the acquire method. Use LookupTag()
* to parse it.
- * \param Size The size of the object that was fetched.
* \param Hashes The HashSums of the object that was fetched.
* \param Cnf The method via which the object was fetched.
*
* \sa pkgAcqMethod
*/
- virtual void Done(std::string Message, unsigned long long Size, HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf);
/** \brief Invoked when the worker starts to fetch this object.
*
* \param Message RFC822-formatted data from the worker process.
* Use LookupTag() to parse it.
*
- * \param Size The size of the object being fetched.
+ * \param Hashes The expected hashes of the object being fetched.
*
* \sa pkgAcqMethod
*/
- virtual void Start(std::string Message,unsigned long long Size);
+ virtual void Start(std::string const &Message, unsigned long long const Size);
/** \brief Custom headers to be sent to the fetch process.
*
@@ -262,61 +238,56 @@ class pkgAcquire::Item : public WeakPointable
* line, so they should (if nonempty) have a leading newline and
* no trailing newline.
*/
-#if APT_PKG_ABI >= 413
- virtual std::string Custom600Headers() const {return std::string();};
-#else
- virtual std::string Custom600Headers() {return std::string();};
-#endif
+ virtual std::string Custom600Headers() const;
/** \brief A "descriptive" URI-like string.
*
* \return a URI that should be used to describe what is being fetched.
*/
- virtual std::string DescURI() = 0;
+ virtual std::string DescURI() const = 0;
/** \brief Short item description.
*
* \return a brief description of the object being fetched.
*/
- virtual std::string ShortDesc() {return DescURI();}
+ virtual std::string ShortDesc() const;
/** \brief Invoked by the worker when the download is completely done. */
- virtual void Finished() {};
-
- /** \brief HashSums
+ virtual void Finished();
+
+ /** \return HashSums the DestFile is supposed to have in this stage */
+ virtual HashStringList GetExpectedHashes() const = 0;
+ /** \return the 'best' hash for display proposes like --print-uris */
+ std::string HashSum() const;
+
+ /** \return if having no hashes is a hard failure or not
*
- * \return the HashSums of this object, if applicable; otherwise, an
- * empty list.
+ * Idealy this is always \b true for every subclass, but thanks to
+ * historical grow we don't have hashes for all files in all cases
+ * in all steps, so it is slightly more complicated than it should be.
*/
- HashStringList HashSums() const {return ExpectedHashes;};
- std::string HashSum() const {HashStringList const hashes = HashSums(); HashString const * const hs = hashes.find(NULL); return hs != NULL ? hs->toStr() : ""; };
+ virtual bool HashesRequired() const { return true; }
/** \return the acquire process with which this item is associated. */
- pkgAcquire *GetOwner() const {return Owner;};
-#if APT_PKG_ABI < 413
- pkgAcquire *GetOwner() {return Owner;};
-#endif
+ pkgAcquire *GetOwner() const;
+ pkgAcquire::ItemDesc &GetItemDesc();
/** \return \b true if this object is being fetched from a trusted source. */
-#if APT_PKG_ABI >= 413
- virtual bool IsTrusted() const {return false;};
-#else
- virtual bool IsTrusted() {return false;};
-#endif
-
+ virtual bool IsTrusted() const;
+
/** \brief Report mirror problem
- *
+ *
* This allows reporting mirror failures back to a centralized
* server. The apt-report-mirror-failure script is called for this
- *
+ *
* \param FailCode A short failure string that is send
*/
- void ReportMirrorFailure(std::string FailCode);
+ void ReportMirrorFailure(std::string const &FailCode);
/** \brief Set the name of the current active subprocess
*
* See also #ActiveSubprocess
*/
- void SetActiveSubprocess(const std::string &subprocess);
+ void SetActiveSubprocess(std::string const &subprocess);
/** \brief Initialize an item.
*
@@ -325,11 +296,8 @@ class pkgAcquire::Item : public WeakPointable
* manually invoke QueueURI() to do so).
*
* \param Owner The new owner of this item.
- * \param ExpectedHashes of the file represented by this item
*/
- Item(pkgAcquire *Owner,
- HashStringList const &ExpectedHashes=HashStringList(),
- pkgAcqMetaBase *TransactionManager=NULL);
+ explicit Item(pkgAcquire * const Owner);
/** \brief Remove this item from its owner's queue by invoking
* pkgAcquire::Remove.
@@ -337,6 +305,11 @@ class pkgAcquire::Item : public WeakPointable
virtual ~Item();
protected:
+ /** \brief The acquire object with which this item is associated. */
+ pkgAcquire * const Owner;
+
+ /** \brief The item that is currently being downloaded. */
+ pkgAcquire::ItemDesc Desc;
enum RenameOnErrorState {
HashSumMismatch,
@@ -354,63 +327,94 @@ class pkgAcquire::Item : public WeakPointable
*/
bool RenameOnError(RenameOnErrorState const state);
+ /** \brief Insert this item into its owner's queue.
+ *
+ * The method is designed to check if the request would end
+ * in an IMSHit and if it determines that it would, it isn't
+ * queueing the Item and instead sets it to completion instantly.
+ *
+ * \param Item Metadata about this item (its URI and
+ * description).
+ * \return true if the item was inserted, false if IMSHit was detected
+ */
+ virtual bool QueueURI(ItemDesc &Item);
+
+ /** \brief Remove this item from its owner's queue. */
+ void Dequeue();
+
+ /** \brief Rename a file without modifying its timestamp.
+ *
+ * Many item methods call this as their final action.
+ *
+ * \param From The file to be renamed.
+ *
+ * \param To The new name of \a From. If \a To exists it will be
+ * overwritten. If \a From and \a To are equal nothing happens.
+ */
+ bool Rename(std::string const &From, std::string const &To);
+
+ /** \brief Get the full pathname of the final file for the current URI */
+ virtual std::string GetFinalFilename() const;
+
+ private:
+ void * const d;
+
+ friend class pkgAcqMetaBase;
+ friend class pkgAcqMetaClearSig;
+};
+ /*}}}*/
+class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item /*{{{*/
+/** \brief baseclass for the indexes files to manage them all together */
+{
+ void * const d;
+ protected:
+ IndexTarget const Target;
+ HashStringList GetExpectedHashesFor(std::string const &MetaKey) const;
+
+ bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
+
+ public:
+ /** \brief storge name until a transaction is finished */
+ std::string PartialFile;
+
+ /** \brief TransactionManager */
+ pkgAcqMetaClearSig * const TransactionManager;
+
enum TransactionStates {
TransactionCommit,
TransactionAbort,
};
virtual bool TransactionState(TransactionStates const state);
- /** \brief The HashSums of the item is supposed to have than done */
- HashStringList ExpectedHashes;
-
- /** \brief The item that is currently being downloaded. */
- pkgAcquire::ItemDesc Desc;
-};
- /*}}}*/
-/** \brief Information about an index patch (aka diff). */ /*{{{*/
-struct APT_HIDDEN DiffInfo {
- /** The filename of the diff. */
- std::string file;
+ virtual std::string DescURI() const APT_OVERRIDE { return Target.URI; }
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
+ virtual std::string GetMetaKey() const;
+ virtual bool HashesRequired() const APT_OVERRIDE;
- /** The hashes of the diff */
- HashStringList result_hashes;
- /** The hashes of the file after the diff is applied */
- HashStringList patch_hashes;
-
- /** The size of the file after the diff is applied */
- unsigned long long result_size;
+ pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, IndexTarget const &Target);
+ virtual ~pkgAcqTransactionItem();
- /** The size of the diff itself */
- unsigned long long patch_size;
+ friend class pkgAcqMetaBase;
+ friend class pkgAcqMetaClearSig;
};
/*}}}*/
-class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/
+class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/
+/** \brief the manager of a transaction */
{
- void *d;
-
+ void * const d;
protected:
- std::vector<Item*> Transaction;
-
- /** \brief A package-system-specific parser for the meta-index file. */
- indexRecords *MetaIndexParser;
- indexRecords *LastMetaIndexParser;
+ std::vector<pkgAcqTransactionItem*> Transaction;
/** \brief The index files which should be looked up in the meta-index
* and then downloaded.
*/
- const std::vector<IndexTarget*>* IndexTargets;
+ std::vector<IndexTarget> const IndexTargets;
/** \brief If \b true, the index's signature is currently being verified.
*/
bool AuthPass;
- /** \brief The URI of the signature file. Unlike Desc.URI, this is
- * never modified; it is used to determine the file that is being
- * downloaded.
- */
- std::string RealURI;
-
/** \brief Starts downloading the individual index files.
*
* \param verify If \b true, only indices whose expected hashsum
@@ -419,7 +423,7 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/
* #StatAuthError if there is a mismatch). If verify is \b false,
* no hashsum checking will be performed.
*/
- void QueueIndexes(bool verify);
+ void QueueIndexes(bool const verify);
/** \brief Called when a file is finished being retrieved.
*
@@ -430,16 +434,12 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/
* \param Message The message block received from the fetch
* subprocess.
*/
- bool CheckDownloadDone(pkgAcquire::Item * const I, const std::string &Message, HashStringList const &Hashes) const;
+ bool CheckDownloadDone(pkgAcqTransactionItem * const I, const std::string &Message, HashStringList const &Hashes) const;
/** \brief Queue the downloaded Signature for verification */
- void QueueForSignatureVerify(pkgAcquire::Item * const I, std::string const &File, std::string const &Signature);
+ void QueueForSignatureVerify(pkgAcqTransactionItem * const I, std::string const &File, std::string const &Signature);
-#if APT_PKG_ABI >= 413
- virtual std::string Custom600Headers() const;
-#else
- virtual std::string Custom600Headers();
-#endif
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
/** \brief Called when authentication succeeded.
*
@@ -450,7 +450,7 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/
* \param Message The message block received from the fetch
* subprocess.
*/
- bool CheckAuthDone(std::string Message);
+ bool CheckAuthDone(std::string const &Message);
/** Check if the current item should fail at this point */
bool CheckStopAuthentication(pkgAcquire::Item * const I, const std::string &Message);
@@ -460,41 +460,40 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/
*
* \return \b true if no fatal errors were encountered.
*/
- bool VerifyVendor(std::string Message);
+ bool VerifyVendor(std::string const &Message);
- virtual bool TransactionState(TransactionStates const state);
+ virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;
public:
// This refers more to the Transaction-Manager than the actual file
bool IMSHit;
- virtual std::string DescURI() {return RealURI; };
- virtual bool QueueURI(pkgAcquire::ItemDesc &Item);
+ virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
+ virtual bool HashesRequired() const APT_OVERRIDE;
// transaction code
- void Add(Item *I);
+ void Add(pkgAcqTransactionItem * const I);
void AbortTransaction();
- bool TransactionHasError() APT_PURE;
+ bool TransactionHasError() const;
void CommitTransaction();
/** \brief Stage (queue) a copy action when the transaction is committed
*/
- void TransactionStageCopy(Item *I,
- const std::string &From,
+ void TransactionStageCopy(pkgAcqTransactionItem * const I,
+ const std::string &From,
const std::string &To);
/** \brief Stage (queue) a removal action when the transaction is committed
*/
- void TransactionStageRemoval(Item *I, const std::string &FinalFile);
+ void TransactionStageRemoval(pkgAcqTransactionItem * const I, const std::string &FinalFile);
/** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
+ virtual std::string GetFinalFilename() const APT_OVERRIDE;
- pkgAcqMetaBase(pkgAcquire *Owner,
- const std::vector<IndexTarget*>* IndexTargets,
- indexRecords* MetaIndexParser,
- std::string const &RealURI,
- HashStringList const &ExpectedHashes=HashStringList(),
- pkgAcqMetaBase *TransactionManager=NULL);
+ pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ std::vector<IndexTarget> const &IndexTargets,
+ IndexTarget const &DataTarget);
+ virtual ~pkgAcqMetaBase();
};
/*}}}*/
/** \brief An item that is responsible for downloading the meta-index {{{
@@ -509,39 +508,27 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/
*/
class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
{
- void *d;
-
+ void * const d;
protected:
- std::string URIDesc;
- std::string ShortDesc;
-
- /** \brief The URI of the meta-index file for the detached signature */
- std::string MetaIndexSigURI;
-
- /** \brief A "URI-style" description of the meta-index file */
- std::string MetaIndexSigURIDesc;
-
- /** \brief A brief description of the meta-index file */
- std::string MetaIndexSigShortDesc;
+ IndexTarget const DetachedSigTarget;
/** \brief delayed constructor */
- void Init(std::string URIDesc, std::string ShortDesc);
-
+ void Init(std::string const &URIDesc, std::string const &ShortDesc);
+
public:
+ virtual std::string DescURI() const APT_OVERRIDE;
// Specialized action members
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
- virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
- virtual void Finished();
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Finished() APT_OVERRIDE;
/** \brief Create a new pkgAcqMetaIndex. */
- pkgAcqMetaIndex(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- std::string URI,std::string URIDesc, std::string ShortDesc,
- std::string MetaIndexSigURI, std::string MetaIndexSigURIDesc, std::string MetaIndexSigShortDesc,
- const std::vector<IndexTarget*>* IndexTargets,
- indexRecords* MetaIndexParser);
+ pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
+ std::vector<IndexTarget> const &IndexTargets);
+ virtual ~pkgAcqMetaIndex();
friend class pkgAcqMetaSig;
};
@@ -554,9 +541,9 @@ class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
*
* \sa pkgAcqMetaIndex
*/
-class APT_HIDDEN pkgAcqMetaSig : public pkgAcquire::Item
+class APT_HIDDEN pkgAcqMetaSig : public pkgAcqTransactionItem
{
- void *d;
+ void * const d;
pkgAcqMetaIndex * const MetaIndex;
@@ -565,109 +552,65 @@ class APT_HIDDEN pkgAcqMetaSig : public pkgAcquire::Item
protected:
- /** \brief Long URI description used in the acquire system */
- std::string URIDesc;
-
- /** \brief URI used to get the file */
- std::string RealURI;
-
/** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
+ virtual std::string GetFinalFilename() const APT_OVERRIDE;
public:
- virtual std::string DescURI() {return RealURI;};
+ virtual bool HashesRequired() const APT_OVERRIDE { return false; }
// Specialized action members
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
- virtual void Done(std::string Message,unsigned long long Size,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
/** \brief Create a new pkgAcqMetaSig. */
- pkgAcqMetaSig(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- std::string const &URI,std::string const &URIDesc,
- std::string const &ShortDesc, pkgAcqMetaIndex * const MetaIndex);
+ pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target, pkgAcqMetaIndex * const MetaIndex);
virtual ~pkgAcqMetaSig();
};
/*}}}*/
/** \brief An item repsonsible for downloading clearsigned metaindexes {{{*/
class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
{
- void *d;
-
- /** \brief The URI of the meta-index file for the detached signature */
- std::string MetaIndexURI;
-
- /** \brief A "URI-style" description of the meta-index file */
- std::string MetaIndexURIDesc;
-
- /** \brief A brief description of the meta-index file */
- std::string MetaIndexShortDesc;
+ void * const d;
- /** \brief The URI of the detached meta-signature file if the clearsigned one failed. */
- std::string MetaSigURI;
+ IndexTarget const ClearsignedTarget;
+ IndexTarget const DetachedDataTarget;
- /** \brief A "URI-style" description of the meta-signature file */
- std::string MetaSigURIDesc;
-
- /** \brief A brief description of the meta-signature file */
- std::string MetaSigShortDesc;
+ public:
+ /** \brief A package-system-specific parser for the meta-index file. */
+ metaIndex *MetaIndexParser;
+ metaIndex *LastMetaIndexParser;
-public:
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
-#if APT_PKG_ABI >= 413
- virtual std::string Custom600Headers() const;
-#else
- virtual std::string Custom600Headers();
-#endif
- virtual void Done(std::string Message,unsigned long long Size,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
+ virtual bool VerifyDone(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
/** \brief Create a new pkgAcqMetaClearSig. */
- pkgAcqMetaClearSig(pkgAcquire *Owner,
- std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc,
- std::string const &MetaIndexURI, std::string const &MetaIndexURIDesc, std::string const &MetaIndexShortDesc,
- std::string const &MetaSigURI, std::string const &MetaSigURIDesc, std::string const &MetaSigShortDesc,
- const std::vector<IndexTarget*>* IndexTargets,
- indexRecords* MetaIndexParser);
+ pkgAcqMetaClearSig(pkgAcquire * const Owner,
+ IndexTarget const &ClearsignedTarget,
+ IndexTarget const &DetachedDataTarget,
+ IndexTarget const &DetachedSigTarget,
+ std::vector<IndexTarget> const &IndexTargets,
+ metaIndex * const MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
/*}}}*/
-/** \brief Common base class for all classes that deal with fetching {{{
- indexes
- */
-class pkgAcqBaseIndex : public pkgAcquire::Item
+/** \brief Common base class for all classes that deal with fetching indexes {{{*/
+class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem
{
- void *d;
-
- protected:
- /** \brief Pointer to the IndexTarget data
- */
- const struct IndexTarget * Target;
-
- /** \brief Pointer to the indexRecords parser */
- indexRecords *MetaIndexParser;
-
- /** \brief The MetaIndex Key */
- std::string MetaKey;
-
- /** \brief The URI of the index file to recreate at our end (either
- * by downloading it or by applying partial patches).
- */
- std::string RealURI;
-
- bool VerifyHashByMetaKey(HashStringList const &Hashes);
+ void * const d;
+ public:
/** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
+ virtual std::string GetFinalFilename() const APT_OVERRIDE;
- pkgAcqBaseIndex(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- struct IndexTarget const * const Target,
- HashStringList const &ExpectedHashes,
- indexRecords *MetaIndexParser);
+ pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target);
+ virtual ~pkgAcqBaseIndex();
};
/*}}}*/
/** \brief An item that is responsible for fetching an index file of {{{
@@ -681,39 +624,32 @@ class pkgAcqBaseIndex : public pkgAcquire::Item
*/
class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
{
- void *d;
+ void * const d;
+ std::vector<pkgAcqIndexMergeDiffs*> * diffs;
protected:
/** \brief If \b true, debugging information will be written to std::clog. */
bool Debug;
- /** \brief The index file which will be patched to generate the new
- * file.
- */
- std::string CurrentPackagesFile;
-
/** \brief A description of the Packages file (stored in
* pkgAcquire::ItemDesc::Description).
*/
std::string Description;
/** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
+ virtual std::string GetFinalFilename() const APT_OVERRIDE;
- virtual bool QueueURI(pkgAcquire::ItemDesc &Item);
+ virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
- virtual bool TransactionState(TransactionStates const state);
+ virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;
public:
// Specialized action members
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
- virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
- virtual std::string DescURI() {return RealURI + "Index";};
-#if APT_PKG_ABI >= 413
- virtual std::string Custom600Headers() const;
-#else
- virtual std::string Custom600Headers();
-#endif
+ virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";};
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
+ virtual std::string GetMetaKey() const APT_OVERRIDE;
/** \brief Parse the Index file for a set of Packages diffs.
*
@@ -725,7 +661,7 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
* \return \b true if the Index file was successfully parsed, \b
* false otherwise.
*/
- bool ParseDiffIndex(std::string IndexDiffFile);
+ bool ParseDiffIndex(std::string const &IndexDiffFile);
/** \brief Create a new pkgAcqDiffIndex.
*
@@ -736,18 +672,28 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
* \param URIDesc A long description of the list file to download.
*
* \param ShortDesc A short description of the list file to download.
- *
- * \param ExpectedHashes The list file's hashsums which are expected.
*/
- pkgAcqDiffIndex(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- struct IndexTarget const * const Target,
- HashStringList const &ExpectedHashes,
- indexRecords *MetaIndexParser);
+ pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target);
+ virtual ~pkgAcqDiffIndex();
private:
APT_HIDDEN void QueueOnIMSHit() const;
};
/*}}}*/
+struct APT_HIDDEN DiffInfo { /*{{{*/
+ /** The filename of the diff. */
+ std::string file;
+
+ /** The hashes of the file after the diff is applied */
+ HashStringList result_hashes;
+
+ /** The hashes of the diff */
+ HashStringList patch_hashes;
+
+ /** The hashes of the compressed diff */
+ HashStringList download_hashes;
+};
+ /*}}}*/
/** \brief An item that is responsible for fetching client-merge patches {{{
* that need to be applied to a given package index file.
*
@@ -761,7 +707,7 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
*/
class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
{
- void *d;
+ void * const d;
protected:
@@ -801,10 +747,13 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
* This method will fall back to downloading the whole index file
* outright; its arguments are ignored.
*/
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
- virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
- virtual std::string DescURI() {return RealURI + "Index";};
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
+ virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";};
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
+ virtual bool HashesRequired() const APT_OVERRIDE;
/** \brief Create an index merge-diff item.
*
@@ -817,23 +766,16 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
*
* \param ShortDesc A brief description of this item.
*
- * \param ExpectedHashes The expected md5sum of the completely
- * reconstructed package index file; the index file will be tested
- * against this value when it is entirely reconstructed.
- *
* \param patch contains infos about the patch this item is supposed
* to download which were read from the index
*
* \param allPatches contains all related items so that each item can
* check if it was the last one to complete the download step
*/
- pkgAcqIndexMergeDiffs(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- struct IndexTarget const * const Target,
- HashStringList const &ExpectedHash,
- indexRecords *MetaIndexParser,
- DiffInfo const &patch,
+ pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target, DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
+ virtual ~pkgAcqIndexMergeDiffs();
};
/*}}}*/
/** \brief An item that is responsible for fetching server-merge patches {{{
@@ -849,7 +791,7 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
*/
class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
{
- void *d;
+ void * const d;
private:
@@ -875,7 +817,7 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
* \param allDone If \b true, the file was entirely reconstructed,
* and its md5sum is verified.
*/
- APT_HIDDEN void Finish(bool allDone=false);
+ APT_HIDDEN void Finish(bool const allDone=false);
protected:
@@ -905,26 +847,26 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
/** \brief The diff is currently being fetched. */
StateFetchDiff,
-
- /** \brief The diff is currently being uncompressed. */
- StateUnzipDiff, // FIXME: No longer used
/** \brief The diff is currently being applied. */
StateApplyDiff
} State;
public:
-
+
/** \brief Called when the patch file failed to be downloaded.
*
* This method will fall back to downloading the whole index file
* outright; its arguments are ignored.
*/
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
- virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
- virtual std::string DescURI() {return RealURI + "IndexDiffs";};
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
+ virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "IndexDiffs";};
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
+ virtual bool HashesRequired() const APT_OVERRIDE;
/** \brief Create an index diff item.
*
@@ -940,20 +882,14 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
*
* \param ShortDesc A brief description of this item.
*
- * \param ExpectedHashes The expected hashsums of the completely
- * reconstructed package index file; the index file will be tested
- * against this value when it is entirely reconstructed.
- *
* \param diffs The remaining diffs from the index of diffs. They
* should be ordered so that each diff appears before any diff
* that depends on it.
*/
- pkgAcqIndexDiffs(pkgAcquire *Owner,
- pkgAcqMetaBase *TransactionManager,
- struct IndexTarget const * const Target,
- HashStringList const &ExpectedHash,
- indexRecords *MetaIndexParser,
- std::vector<DiffInfo> diffs=std::vector<DiffInfo>());
+ pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target,
+ std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
+ virtual ~pkgAcqIndexDiffs();
};
/*}}}*/
/** \brief An acquire item that is responsible for fetching an index {{{
@@ -965,7 +901,7 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
*/
class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
{
- void *d;
+ void * const d;
protected:
@@ -981,16 +917,16 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
AllStages Stage;
/** \brief Handle what needs to be done when the download is done */
- void StageDownloadDone(std::string Message,
+ void StageDownloadDone(std::string const &Message,
HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cfg);
+ pkgAcquire::MethodConfig const * const Cfg);
/** \brief Handle what needs to be done when the decompression/copy is
* done
*/
- void StageDecompressDone(std::string Message,
+ void StageDecompressDone(std::string const &Message,
HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cfg);
+ pkgAcquire::MethodConfig const * const Cfg);
/** \brief If \b set, this partially downloaded file will be
* removed when the download completes.
@@ -1006,7 +942,7 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
std::string CurrentCompressionExtension;
/** \brief Do the changes needed to fetch via AptByHash (if needed) */
- void InitByHashIfNeeded(const std::string MetaKey);
+ void InitByHashIfNeeded();
/** \brief Auto select the right compression to use */
void AutoSelectCompression();
@@ -1014,90 +950,27 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
/** \brief Schedule file for verification after a IMS hit */
void ReverifyAfterIMS();
- /** \brief Validate the downloaded index file */
- bool ValidateFile(const std::string &FileName);
-
/** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
+ virtual std::string GetFinalFilename() const APT_OVERRIDE;
- virtual bool TransactionState(TransactionStates const state);
+ virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;
public:
// Specialized action members
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
- virtual void Done(std::string Message,unsigned long long Size,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
-#if APT_PKG_ABI >= 413
- virtual std::string Custom600Headers() const;
-#else
- virtual std::string Custom600Headers();
-#endif
- virtual std::string DescURI() {return Desc.URI;};
-
- /** \brief Create a pkgAcqIndex.
- *
- * \param Owner The pkgAcquire object with which this item is
- * associated.
- *
- * \param URI The URI of the index file that is to be downloaded.
- *
- * \param URIDesc A "URI-style" description of this index file.
- *
- * \param ShortDesc A brief description of this index file.
- *
- * \param ExpectedHashes The expected hashsum of this index file.
- *
- * \param compressExt The compression-related extension with which
- * this index file should be downloaded, or "" to autodetect
- * Compression types can be set with config Acquire::CompressionTypes,
- * default is ".lzma" or ".bz2" (if the needed binaries are present)
- * fallback is ".gz" or none.
- */
- pkgAcqIndex(pkgAcquire *Owner,std::string URI,std::string URIDesc,
- std::string ShortDesc, HashStringList const &ExpectedHashes);
- pkgAcqIndex(pkgAcquire *Owner, pkgAcqMetaBase *TransactionManager,
- IndexTarget const * const Target,
- HashStringList const &ExpectedHash,
- indexRecords *MetaIndexParser);
-
- void Init(std::string const &URI, std::string const &URIDesc,
- std::string const &ShortDesc);
-};
- /*}}}*/
-/** \brief Information about an index file. */ /*{{{*/
-class APT_HIDDEN IndexTarget
-{
- void *d;
-
- public:
- /** \brief A URI from which the index file can be downloaded. */
- std::string URI;
-
- /** \brief A description of the index file. */
- std::string Description;
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
+ virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
+ virtual std::string GetMetaKey() const APT_OVERRIDE;
- /** \brief A shorter description of the index file. */
- std::string ShortDesc;
+ pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
+ IndexTarget const &Target);
+ virtual ~pkgAcqIndex();
- /** \brief The key by which this index file should be
- * looked up within the meta signature file.
- */
- std::string MetaKey;
-
- virtual bool IsOptional() const {
- return false;
- }
-};
- /*}}}*/
-/** \brief Information about an optional index file. */ /*{{{*/
-class APT_HIDDEN OptionalIndexTarget : public IndexTarget
-{
- void *d;
-
- virtual bool IsOptional() const {
- return true;
- }
+ private:
+ APT_HIDDEN void Init(std::string const &URI, std::string const &URIDesc,
+ std::string const &ShortDesc);
};
/*}}}*/
/** \brief An item that is responsible for fetching a package file. {{{
@@ -1107,7 +980,10 @@ class APT_HIDDEN OptionalIndexTarget : public IndexTarget
*/
class pkgAcqArchive : public pkgAcquire::Item
{
- void *d;
+ void * const d;
+
+ bool LocalSource;
+ HashStringList ExpectedHashes;
protected:
/** \brief The package version being fetched. */
@@ -1141,27 +1017,25 @@ class pkgAcqArchive : public pkgAcquire::Item
/** \brief \b true if this version file is being downloaded from a
* trusted source.
*/
- bool Trusted;
+ bool Trusted;
/** \brief Queue up the next available file for this version. */
bool QueueNext();
/** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
+ virtual std::string GetFinalFilename() const APT_OVERRIDE;
public:
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
- virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
- pkgAcquire::MethodConfig *Cnf);
- virtual std::string DescURI() {return Desc.URI;};
- virtual std::string ShortDesc() {return Desc.ShortDesc;};
- virtual void Finished();
-#if APT_PKG_ABI >= 413
- virtual bool IsTrusted() const;
-#else
- virtual bool IsTrusted();
-#endif
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string DescURI() const APT_OVERRIDE;
+ virtual std::string ShortDesc() const APT_OVERRIDE;
+ virtual void Finished() APT_OVERRIDE;
+ virtual bool IsTrusted() const APT_OVERRIDE;
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
+ virtual bool HashesRequired() const APT_OVERRIDE;
/** \brief Create a new pkgAcqArchive.
*
@@ -1181,9 +1055,124 @@ class pkgAcqArchive : public pkgAcquire::Item
* basename in the constructor, and filled in with a fully
* qualified filename once the download finishes.
*/
- pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
- pkgRecords *Recs,pkgCache::VerIterator const &Version,
+ pkgAcqArchive(pkgAcquire * const Owner,pkgSourceList * const Sources,
+ pkgRecords * const Recs,pkgCache::VerIterator const &Version,
std::string &StoreFilename);
+ virtual ~pkgAcqArchive();
+};
+ /*}}}*/
+/** \brief Retrieve the changelog for the given version {{{
+ *
+ * Downloads the changelog to a temporary file it will also remove again
+ * while it is deconstructed or downloads it to a named location.
+ */
+class pkgAcqChangelog : public pkgAcquire::Item
+{
+ void * const d;
+ std::string TemporaryDirectory;
+ std::string const SrcName;
+ std::string const SrcVersion;
+
+ public:
+ // we will never have hashes for changelogs.
+ // If you need verified ones, download the deb and extract the changelog.
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE { return HashStringList(); }
+ virtual bool HashesRequired() const APT_OVERRIDE { return false; }
+
+ // Specialized action members
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &CalcHashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
+
+ /** returns the URI to the changelog of this version
+ *
+ * @param Ver is the version to get the changelog for
+ * @return the URI which will be used to acquire the changelog
+ */
+ static std::string URI(pkgCache::VerIterator const &Ver);
+
+ /** returns the URI to the changelog of this version
+ *
+ * \param Rls is the Release file the package comes from
+ * \param Component in which the package resides, can be empty
+ * \param SrcName is the source package name
+ * \param SrcVersion is the source package version
+ * @return the URI which will be used to acquire the changelog
+ */
+ static std::string URI(pkgCache::RlsFileIterator const &Rls,
+ char const * const Component, char const * const SrcName,
+ char const * const SrcVersion);
+
+ /** returns the URI to the changelog of this version
+ *
+ * \param Template URI where CHANGEPATH has to be filled in
+ * \param Component in which the package resides, can be empty
+ * \param SrcName is the source package name
+ * \param SrcVersion is the source package version
+ * @return the URI which will be used to acquire the changelog
+ */
+ static std::string URI(std::string const &Template,
+ char const * const Component, char const * const SrcName,
+ char const * const SrcVersion);
+
+ /** returns the URI template for this release file
+ *
+ * \param Rls is a Release file
+ * @return the URI template to use for this release file
+ */
+ static std::string URITemplate(pkgCache::RlsFileIterator const &Rls);
+
+ /** \brief Create a new pkgAcqChangelog object.
+ *
+ * \param Owner The pkgAcquire object with which this object is
+ * associated.
+ * \param Ver is the version to get the changelog for
+ * \param DestDir The directory the file should be downloaded into.
+ * Will be an autocreated (and cleaned up) temporary directory if not set.
+ * \param DestFilename The filename the file should have in #DestDir
+ * Defaults to sourcepackagename.changelog if not set.
+ */
+ pkgAcqChangelog(pkgAcquire * const Owner, pkgCache::VerIterator const &Ver,
+ std::string const &DestDir="", std::string const &DestFilename="");
+
+ /** \brief Create a new pkgAcqChangelog object.
+ *
+ * \param Owner The pkgAcquire object with which this object is
+ * associated.
+ * \param Rls is the Release file the package comes from
+ * \param Component in which the package resides, can be empty
+ * \param SrcName is the source package name
+ * \param SrcVersion is the source package version
+ * \param DestDir The directory the file should be downloaded into.
+ * Will be an autocreated (and cleaned up) temporary directory if not set.
+ * \param DestFilename The filename the file should have in #DestDir
+ * Defaults to sourcepackagename.changelog if not set.
+ */
+ pkgAcqChangelog(pkgAcquire * const Owner, pkgCache::RlsFileIterator const &Rls,
+ char const * const Component, char const * const SrcName, char const * const SrcVersion,
+ std::string const &DestDir="", std::string const &DestFilename="");
+
+ /** \brief Create a new pkgAcqChangelog object.
+ *
+ * \param Owner The pkgAcquire object with which this object is
+ * associated.
+ * \param URI is to be used to get the changelog
+ * \param SrcName is the source package name
+ * \param SrcVersion is the source package version
+ * \param DestDir The directory the file should be downloaded into.
+ * Will be an autocreated (and cleaned up) temporary directory if not set.
+ * \param DestFilename The filename the file should have in #DestDir
+ * Defaults to sourcepackagename.changelog if not set.
+ */
+ pkgAcqChangelog(pkgAcquire * const Owner, std::string const &URI,
+ char const * const SrcName, char const * const SrcVersion,
+ std::string const &DestDir="", std::string const &DestFilename="");
+
+ virtual ~pkgAcqChangelog();
+
+private:
+ APT_HIDDEN void Init(std::string const &DestDir, std::string const &DestFilename);
};
/*}}}*/
/** \brief Retrieve an arbitrary file to the current directory. {{{
@@ -1194,28 +1183,27 @@ class pkgAcqArchive : public pkgAcquire::Item
*/
class pkgAcqFile : public pkgAcquire::Item
{
- void *d;
+ void * const d;
/** \brief How many times to retry the download, set from
* Acquire::Retries.
*/
unsigned int Retries;
-
+
/** \brief Should this file be considered a index file */
bool IsIndexFile;
+ HashStringList const ExpectedHashes;
public:
-
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
+ virtual bool HashesRequired() const APT_OVERRIDE;
+
// Specialized action members
- virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
- virtual void Done(std::string Message,unsigned long long Size, HashStringList const &CalcHashes,
- pkgAcquire::MethodConfig *Cnf);
- virtual std::string DescURI() {return Desc.URI;};
-#if APT_PKG_ABI >= 413
- virtual std::string Custom600Headers() const;
-#else
- virtual std::string Custom600Headers();
-#endif
+ virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual void Done(std::string const &Message, HashStringList const &CalcHashes,
+ pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+ virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
+ virtual std::string Custom600Headers() const APT_OVERRIDE;
/** \brief Create a new pkgAcqFile object.
*
@@ -1248,10 +1236,11 @@ class pkgAcqFile : public pkgAcquire::Item
* is the absolute name to which the file should be downloaded.
*/
- pkgAcqFile(pkgAcquire *Owner, std::string URI, HashStringList const &Hashes, unsigned long long Size,
- std::string Desc, std::string ShortDesc,
- const std::string &DestDir="", const std::string &DestFilename="",
- bool IsIndexFile=false);
+ pkgAcqFile(pkgAcquire * const Owner, std::string const &URI, HashStringList const &Hashes, unsigned long long const Size,
+ std::string const &Desc, std::string const &ShortDesc,
+ std::string const &DestDir="", std::string const &DestFilename="",
+ bool const IsIndexFile=false);
+ virtual ~pkgAcqFile();
};
/*}}}*/
/** @} */
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index c29ef469e..991e6780a 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -376,7 +376,10 @@ int pkgAcqMethod::Run(bool Single)
Tmp->ExpectedHashes.push_back(HashString(*t, hash));
}
char *End;
- Tmp->MaximumSize = strtoll(LookupTag(Message, "Maximum-Size", "0").c_str(), &End, 10);
+ if (Tmp->ExpectedHashes.FileSize() > 0)
+ Tmp->MaximumSize = Tmp->ExpectedHashes.FileSize();
+ else
+ Tmp->MaximumSize = strtoll(LookupTag(Message, "Maximum-Size", "0").c_str(), &End, 10);
Tmp->Next = 0;
// Append it to the list
@@ -385,14 +388,14 @@ int pkgAcqMethod::Run(bool Single)
*I = Tmp;
if (QueueBack == 0)
QueueBack = Tmp;
-
+
// Notify that this item is to be fetched.
- if (Fetch(Tmp) == false)
+ if (URIAcquire(Message, Tmp) == false)
Fail();
-
- break;
- }
- }
+
+ break;
+ }
+ }
}
Exit();
@@ -400,8 +403,6 @@ int pkgAcqMethod::Run(bool Single)
}
/*}}}*/
// AcqMethod::PrintStatus - privately really send a log/status message /*{{{*/
-// ---------------------------------------------------------------------
-/* */
void pkgAcqMethod::PrintStatus(char const * const header, const char* Format,
va_list &args) const
{
@@ -456,7 +457,7 @@ void pkgAcqMethod::Redirect(const string &NewURI)
// ---------------------------------------------------------------------
/* */
pkgAcqMethod::FetchResult::FetchResult() : LastModified(0),
- IMSHit(false), Size(0), ResumePoint(0)
+ IMSHit(false), Size(0), ResumePoint(0), d(NULL)
{
}
/*}}}*/
@@ -477,5 +478,9 @@ void pkgAcqMethod::Dequeue() { /*{{{*/
delete Tmp;
}
/*}}}*/
-
pkgAcqMethod::~pkgAcqMethod() {}
+
+pkgAcqMethod::FetchItem::FetchItem() : d(NULL) {}
+pkgAcqMethod::FetchItem::~FetchItem() {}
+
+pkgAcqMethod::FetchResult::~FetchResult() {}
diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h
index 399454892..cab2bda40 100644
--- a/apt-pkg/acquire-method.h
+++ b/apt-pkg/acquire-method.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-method.h,v 1.15.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Acquire Method - Method helper class + functions
@@ -53,6 +52,11 @@ class pkgAcqMethod
// for when we know it or a arbitrary limit when we don't know the
// filesize (like a InRelease file)
unsigned long long MaximumSize;
+
+ FetchItem();
+ virtual ~FetchItem();
+ private:
+ void * const d;
};
struct FetchResult
@@ -67,6 +71,9 @@ class pkgAcqMethod
void TakeHashes(class Hashes &Hash);
FetchResult();
+ virtual ~FetchResult();
+ private:
+ void * const d;
};
// State
@@ -76,11 +83,12 @@ class pkgAcqMethod
std::string FailReason;
std::string UsedMirror;
std::string IP;
-
+
// Handlers for messages
virtual bool Configuration(std::string Message);
virtual bool Fetch(FetchItem * /*Item*/) {return true;};
-
+ virtual bool URIAcquire(std::string const &/*Message*/, FetchItem *Itm) { return Fetch(Itm); };
+
// Outgoing messages
void Fail(bool Transient = false);
inline void Fail(const char *Why, bool Transient = false) {Fail(std::string(Why),Transient);};
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 9254e20a3..b15340448 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -26,7 +26,6 @@
#include <string>
#include <vector>
#include <iostream>
-#include <sstream>
#include <sys/stat.h>
#include <stdlib.h>
@@ -34,9 +33,7 @@
#include <signal.h>
#include <stdio.h>
#include <errno.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <grp.h>
+#include <sstream>
#include <apti18n.h>
/*}}}*/
@@ -47,7 +44,7 @@ using namespace std;
// ---------------------------------------------------------------------
/* */
pkgAcquire::Worker::Worker(Queue *Q,MethodConfig *Cnf,
- pkgAcquireStatus *Log) : Log(Log)
+ pkgAcquireStatus *log) : d(NULL), Log(log)
{
OwnerQ = Q;
Config = Cnf;
@@ -55,23 +52,18 @@ pkgAcquire::Worker::Worker(Queue *Q,MethodConfig *Cnf,
CurrentItem = 0;
TotalSize = 0;
CurrentSize = 0;
-
- Construct();
+
+ Construct();
}
/*}}}*/
// Worker::Worker - Constructor for method config startup /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgAcquire::Worker::Worker(MethodConfig *Cnf)
+pkgAcquire::Worker::Worker(MethodConfig *Cnf) : d(NULL), OwnerQ(NULL), Config(Cnf),
+ Access(Cnf->Access), CurrentItem(NULL),
+ CurrentSize(0), TotalSize(0)
{
- OwnerQ = 0;
- Config = Cnf;
- Access = Cnf->Access;
- CurrentItem = 0;
- TotalSize = 0;
- CurrentSize = 0;
-
- Construct();
+ Construct();
}
/*}}}*/
// Worker::Construct - Constructor helper /*{{{*/
@@ -136,7 +128,7 @@ bool pkgAcquire::Worker::Start()
}
for (int I = 0; I != 4; I++)
SetCloseExec(Pipes[I],true);
-
+
// Fork off the process
Process = ExecFork();
if (Process == 0)
@@ -145,9 +137,9 @@ bool pkgAcquire::Worker::Start()
dup2(Pipes[1],STDOUT_FILENO);
dup2(Pipes[2],STDIN_FILENO);
SetCloseExec(STDOUT_FILENO,false);
- SetCloseExec(STDIN_FILENO,false);
+ SetCloseExec(STDIN_FILENO,false);
SetCloseExec(STDERR_FILENO,false);
-
+
const char *Args[2];
Args[0] = Method.c_str();
Args[1] = 0;
@@ -165,7 +157,7 @@ bool pkgAcquire::Worker::Start()
close(Pipes[2]);
OutReady = false;
InReady = true;
-
+
// Read the configuration data
if (WaitFd(InFd) == false ||
ReadMessages() == false)
@@ -174,7 +166,7 @@ bool pkgAcquire::Worker::Start()
RunMessages();
if (OwnerQ != 0)
SendConfiguration();
-
+
return true;
}
/*}}}*/
@@ -201,7 +193,7 @@ bool pkgAcquire::Worker::RunMessages()
if (Debug == true)
clog << " <- " << Access << ':' << QuoteString(Message,"\n") << endl;
-
+
// Fetch the message number
char *End;
int Number = strtol(Message.c_str(),&End,10);
@@ -209,21 +201,24 @@ bool pkgAcquire::Worker::RunMessages()
return _error->Error("Invalid message from method %s: %s",Access.c_str(),Message.c_str());
string URI = LookupTag(Message,"URI");
- pkgAcquire::Queue::QItem *Itm = 0;
+ pkgAcquire::Queue::QItem *Itm = NULL;
if (URI.empty() == false)
Itm = OwnerQ->FindItem(URI,this);
- // update used mirror
- string UsedMirror = LookupTag(Message,"UsedMirror", "");
- if (!UsedMirror.empty() &&
- Itm &&
- Itm->Description.find(" ") != string::npos)
+ if (Itm != NULL)
{
- Itm->Description.replace(0, Itm->Description.find(" "), UsedMirror);
- // FIXME: will we need this as well?
- //Itm->ShortDesc = UsedMirror;
+ // update used mirror
+ string UsedMirror = LookupTag(Message,"UsedMirror", "");
+ if (UsedMirror.empty() == false)
+ {
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ (*O)->UsedMirror = UsedMirror;
+
+ if (Itm->Description.find(" ") != string::npos)
+ Itm->Description.replace(0, Itm->Description.find(" "), UsedMirror);
+ }
}
-
+
// Determine the message number and dispatch
switch (Number)
{
@@ -232,18 +227,18 @@ bool pkgAcquire::Worker::RunMessages()
if (Capabilities(Message) == false)
return _error->Error("Unable to process Capabilities message from %s",Access.c_str());
break;
-
+
// 101 Log
case 101:
if (Debug == true)
clog << " <- (log) " << LookupTag(Message,"Message") << endl;
break;
-
+
// 102 Status
case 102:
Status = LookupTag(Message,"Message");
break;
-
+
// 103 Redirect
case 103:
{
@@ -252,27 +247,49 @@ bool pkgAcquire::Worker::RunMessages()
_error->Error("Method gave invalid 103 Redirect message");
break;
}
-
- string NewURI = LookupTag(Message,"New-URI",URI.c_str());
+
+ std::string const NewURI = LookupTag(Message,"New-URI",URI.c_str());
Itm->URI = NewURI;
ItemDone();
- pkgAcquire::Item *Owner = Itm->Owner;
- pkgAcquire::ItemDesc Desc = *Itm;
-
// Change the status so that it can be dequeued
- Owner->Status = pkgAcquire::Item::StatIdle;
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ (*O)->Status = pkgAcquire::Item::StatIdle;
// Mark the item as done (taking care of all queues)
// and then put it in the main queue again
+ std::vector<Item*> const ItmOwners = Itm->Owners;
OwnerQ->ItemDone(Itm);
- OwnerQ->Owner->Enqueue(Desc);
-
- if (Log != 0)
- Log->Done(Desc);
+ Itm = NULL;
+ for (pkgAcquire::Queue::QItem::owner_iterator O = ItmOwners.begin(); O != ItmOwners.end(); ++O)
+ {
+ pkgAcquire::Item *Owner = *O;
+ pkgAcquire::ItemDesc &desc = Owner->GetItemDesc();
+ // if we change site, treat it as a mirror change
+ if (URI::SiteOnly(NewURI) != URI::SiteOnly(desc.URI))
+ {
+ std::string const OldSite = desc.Description.substr(0, desc.Description.find(" "));
+ if (likely(APT::String::Startswith(desc.URI, OldSite)))
+ {
+ std::string const OldExtra = desc.URI.substr(OldSite.length() + 1);
+ if (likely(APT::String::Endswith(NewURI, OldExtra)))
+ {
+ std::string const NewSite = NewURI.substr(0, NewURI.length() - OldExtra.length());
+ Owner->UsedMirror = URI::ArchiveOnly(NewSite);
+ if (desc.Description.find(" ") != string::npos)
+ desc.Description.replace(0, desc.Description.find(" "), Owner->UsedMirror);
+ }
+ }
+ }
+ desc.URI = NewURI;
+ OwnerQ->Owner->Enqueue(desc);
+
+ if (Log != 0)
+ Log->Done(desc);
+ }
break;
}
-
+
// 200 URI Start
case 200:
{
@@ -281,23 +298,27 @@ bool pkgAcquire::Worker::RunMessages()
_error->Error("Method gave invalid 200 URI Start message");
break;
}
-
+
CurrentItem = Itm;
CurrentSize = 0;
TotalSize = strtoull(LookupTag(Message,"Size","0").c_str(), NULL, 10);
ResumePoint = strtoull(LookupTag(Message,"Resume-Point","0").c_str(), NULL, 10);
- Itm->Owner->Start(Message,strtoull(LookupTag(Message,"Size","0").c_str(), NULL, 10));
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ {
+ (*O)->Start(Message, TotalSize);
- // Display update before completion
- if (Log != 0 && Log->MorePulses == true)
- Log->Pulse(Itm->Owner->GetOwner());
-
- if (Log != 0)
- Log->Fetch(*Itm);
+ // Display update before completion
+ if (Log != 0)
+ {
+ if (Log->MorePulses == true)
+ Log->Pulse((*O)->GetOwner());
+ Log->Fetch((*O)->GetItemDesc());
+ }
+ }
break;
}
-
+
// 201 URI Done
case 201:
{
@@ -306,72 +327,114 @@ bool pkgAcquire::Worker::RunMessages()
_error->Error("Method gave invalid 201 URI Done message");
break;
}
-
- pkgAcquire::Item *Owner = Itm->Owner;
- pkgAcquire::ItemDesc Desc = *Itm;
- if (RealFileExists(Owner->DestFile))
- ChangeOwnerAndPermissionOfFile("201::URIDone", Owner->DestFile.c_str(), "root", "root", 0644);
+ PrepareFiles("201::URIDone", Itm);
// Display update before completion
if (Log != 0 && Log->MorePulses == true)
- Log->Pulse(Owner->GetOwner());
-
- OwnerQ->ItemDone(Itm);
- unsigned long long const ServerSize = strtoull(LookupTag(Message,"Size","0").c_str(), NULL, 10);
- bool isHit = StringToBool(LookupTag(Message,"IMS-Hit"),false) ||
- StringToBool(LookupTag(Message,"Alt-IMS-Hit"),false);
- // Using the https method the server might return 200, but the
- // If-Modified-Since condition is not satsified, libcurl will
- // discard the download. In this case, however, TotalSize will be
- // set to the actual size of the file, while ServerSize will be set
- // to 0. Therefore, if the item is marked as a hit and the
- // downloaded size (ServerSize) is 0, we ignore TotalSize.
- if (TotalSize != 0 && (!isHit || ServerSize != 0) && ServerSize != TotalSize)
- _error->Warning("Size of file %s is not what the server reported %s %llu",
- Owner->DestFile.c_str(), LookupTag(Message,"Size","0").c_str(),TotalSize);
-
- // see if there is a hash to verify
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ Log->Pulse((*O)->GetOwner());
+
+ std::string const filename = LookupTag(Message, "Filename", Itm->Owner->DestFile.c_str());
HashStringList ReceivedHashes;
- for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type)
{
- std::string const tagname = std::string(*type) + "-Hash";
- std::string const hashsum = LookupTag(Message, tagname.c_str());
- if (hashsum.empty() == false)
- ReceivedHashes.push_back(HashString(*type, hashsum));
+ // see if we got hashes to verify
+ for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type)
+ {
+ std::string const tagname = std::string(*type) + "-Hash";
+ std::string const hashsum = LookupTag(Message, tagname.c_str());
+ if (hashsum.empty() == false)
+ ReceivedHashes.push_back(HashString(*type, hashsum));
+ }
+ // not all methods always sent Hashes our way
+ if (ReceivedHashes.usable() == false)
+ {
+ HashStringList const ExpectedHashes = Itm->GetExpectedHashes();
+ if (ExpectedHashes.usable() == true && RealFileExists(filename))
+ {
+ Hashes calc(ExpectedHashes);
+ FileFd file(filename, FileFd::ReadOnly, FileFd::None);
+ calc.AddFD(file);
+ ReceivedHashes = calc.GetHashStringList();
+ }
+ }
}
- if(_config->FindB("Debug::pkgAcquire::Auth", false) == true)
- {
- std::clog << "201 URI Done: " << Owner->DescURI() << endl
- << "ReceivedHash:" << endl;
- for (HashStringList::const_iterator hs = ReceivedHashes.begin(); hs != ReceivedHashes.end(); ++hs)
- std::clog << "\t- " << hs->toStr() << std::endl;
- std::clog << "ExpectedHash:" << endl;
- HashStringList expectedHashes = Owner->HashSums();
- for (HashStringList::const_iterator hs = expectedHashes.begin(); hs != expectedHashes.end(); ++hs)
- std::clog << "\t- " << hs->toStr() << std::endl;
- std::clog << endl;
- }
- Owner->Done(Message, ServerSize, ReceivedHashes, Config);
- ItemDone();
+ // only local files can refer other filenames and counting them as fetched would be unfair
+ if (Log != NULL && filename != Itm->Owner->DestFile)
+ Log->Fetched(ReceivedHashes.FileSize(),atoi(LookupTag(Message,"Resume-Point","0").c_str()));
+
+ std::vector<Item*> const ItmOwners = Itm->Owners;
+ OwnerQ->ItemDone(Itm);
+ Itm = NULL;
- // Log that we are done
- if (Log != 0)
+ bool const isIMSHit = StringToBool(LookupTag(Message,"IMS-Hit"),false) ||
+ StringToBool(LookupTag(Message,"Alt-IMS-Hit"),false);
+ for (pkgAcquire::Queue::QItem::owner_iterator O = ItmOwners.begin(); O != ItmOwners.end(); ++O)
{
- if (isHit)
+ pkgAcquire::Item * const Owner = *O;
+ HashStringList const ExpectedHashes = Owner->GetExpectedHashes();
+ if(_config->FindB("Debug::pkgAcquire::Auth", false) == true)
+ {
+ std::clog << "201 URI Done: " << Owner->DescURI() << endl
+ << "ReceivedHash:" << endl;
+ for (HashStringList::const_iterator hs = ReceivedHashes.begin(); hs != ReceivedHashes.end(); ++hs)
+ std::clog << "\t- " << hs->toStr() << std::endl;
+ std::clog << "ExpectedHash:" << endl;
+ for (HashStringList::const_iterator hs = ExpectedHashes.begin(); hs != ExpectedHashes.end(); ++hs)
+ std::clog << "\t- " << hs->toStr() << std::endl;
+ std::clog << endl;
+ }
+
+ // decide if what we got is what we expected
+ bool consideredOkay = false;
+ if (ExpectedHashes.usable())
{
- /* Hide 'hits' for local only sources - we also manage to
- hide gets */
- if (Config->LocalOnly == false)
- Log->IMSHit(Desc);
- }
+ if (ReceivedHashes.usable() == false)
+ {
+ /* IMS-Hits can't be checked here as we will have uncompressed file,
+ but the hashes for the compressed file. What we have was good through
+ so all we have to ensure later is that we are not stalled. */
+ consideredOkay = isIMSHit;
+ }
+ else if (ReceivedHashes == ExpectedHashes)
+ consideredOkay = true;
+ else
+ consideredOkay = false;
+
+ }
+ else if (Owner->HashesRequired() == true)
+ consideredOkay = false;
else
- Log->Done(Desc);
+ consideredOkay = true;
+
+ if (consideredOkay == true)
+ consideredOkay = Owner->VerifyDone(Message, Config);
+ else // hashsum mismatch
+ Owner->Status = pkgAcquire::Item::StatAuthError;
+
+ if (consideredOkay == true)
+ {
+ Owner->Done(Message, ReceivedHashes, Config);
+ if (Log != 0)
+ {
+ if (isIMSHit)
+ Log->IMSHit(Owner->GetItemDesc());
+ else
+ Log->Done(Owner->GetItemDesc());
+ }
+ }
+ else
+ {
+ Owner->Failed(Message,Config);
+ if (Log != 0)
+ Log->Fail(Owner->GetItemDesc());
+ }
}
+ ItemDone();
break;
- }
-
+ }
+
// 400 URI Failure
case 400:
{
@@ -382,44 +445,46 @@ bool pkgAcquire::Worker::RunMessages()
break;
}
+ PrepareFiles("400::URIFailure", Itm);
+
// Display update before completion
if (Log != 0 && Log->MorePulses == true)
- Log->Pulse(Itm->Owner->GetOwner());
-
- pkgAcquire::Item *Owner = Itm->Owner;
- pkgAcquire::ItemDesc Desc = *Itm;
-
- if (RealFileExists(Owner->DestFile))
- ChangeOwnerAndPermissionOfFile("400::URIFailure", Owner->DestFile.c_str(), "root", "root", 0644);
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ Log->Pulse((*O)->GetOwner());
+ std::vector<Item*> const ItmOwners = Itm->Owners;
OwnerQ->ItemDone(Itm);
+ Itm = NULL;
- // set some status
- if(LookupTag(Message,"FailReason") == "Timeout" ||
- LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
- LookupTag(Message,"FailReason") == "ResolveFailure" ||
- LookupTag(Message,"FailReason") == "ConnectionRefused")
- Owner->Status = pkgAcquire::Item::StatTransientNetworkError;
+ for (pkgAcquire::Queue::QItem::owner_iterator O = ItmOwners.begin(); O != ItmOwners.end(); ++O)
+ {
+ // set some status
+ if(LookupTag(Message,"FailReason") == "Timeout" ||
+ LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
+ LookupTag(Message,"FailReason") == "ResolveFailure" ||
+ LookupTag(Message,"FailReason") == "ConnectionRefused")
+ (*O)->Status = pkgAcquire::Item::StatTransientNetworkError;
- Owner->Failed(Message,Config);
- ItemDone();
+ (*O)->Failed(Message,Config);
- if (Log != 0)
- Log->Fail(Desc);
+ if (Log != 0)
+ Log->Fail((*O)->GetItemDesc());
+ }
+ ItemDone();
break;
- }
-
+ }
+
// 401 General Failure
case 401:
_error->Error("Method %s General failure: %s",Access.c_str(),LookupTag(Message,"Message").c_str());
break;
-
+
// 403 Media Change
case 403:
- MediaChange(Message);
+ MediaChange(Message);
break;
- }
+ }
}
return true;
}
@@ -432,7 +497,7 @@ bool pkgAcquire::Worker::Capabilities(string Message)
{
if (Config == 0)
return true;
-
+
Config->Version = LookupTag(Message,"Version");
Config->SingleInstance = StringToBool(LookupTag(Message,"Single-Instance"),false);
Config->Pipeline = StringToBool(LookupTag(Message,"Pipeline"),false);
@@ -447,13 +512,13 @@ bool pkgAcquire::Worker::Capabilities(string Message)
clog << "Configured access method " << Config->Access << endl;
clog << "Version:" << Config->Version <<
" SingleInstance:" << Config->SingleInstance <<
- " Pipeline:" << Config->Pipeline <<
- " SendConfig:" << Config->SendConfig <<
- " LocalOnly: " << Config->LocalOnly <<
- " NeedsCleanup: " << Config->NeedsCleanup <<
+ " Pipeline:" << Config->Pipeline <<
+ " SendConfig:" << Config->SendConfig <<
+ " LocalOnly: " << Config->LocalOnly <<
+ " NeedsCleanup: " << Config->NeedsCleanup <<
" Removable: " << Config->Removable << endl;
}
-
+
return true;
}
/*}}}*/
@@ -463,14 +528,14 @@ bool pkgAcquire::Worker::Capabilities(string Message)
bool pkgAcquire::Worker::MediaChange(string Message)
{
int status_fd = _config->FindI("APT::Status-Fd",-1);
- if(status_fd > 0)
+ if(status_fd > 0)
{
string Media = LookupTag(Message,"Media");
- string Drive = LookupTag(Message,"Drive");
+ string Drive = LookupTag(Message,"Drive");
ostringstream msg,status;
ioprintf(msg,_("Please insert the disc labeled: "
"'%s' "
- "in the drive '%s' and press enter."),
+ "in the drive '%s' and press [Enter]."),
Media.c_str(),Drive.c_str());
status << "media-change: " // message
<< Media << ":" // media
@@ -536,21 +601,29 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item)
{
if (OutFd == -1)
return false;
-
+
string Message = "600 URI Acquire\n";
Message.reserve(300);
Message += "URI: " + Item->URI;
Message += "\nFilename: " + Item->Owner->DestFile;
- HashStringList const hsl = Item->Owner->HashSums();
+
+ HashStringList const hsl = Item->GetExpectedHashes();
for (HashStringList::const_iterator hs = hsl.begin(); hs != hsl.end(); ++hs)
Message += "\nExpected-" + hs->HashType() + ": " + hs->HashValue();
- if(Item->Owner->FileSize > 0)
+
+ if (hsl.FileSize() == 0)
{
- string MaximumSize;
- strprintf(MaximumSize, "%llu", Item->Owner->FileSize);
- Message += "\nMaximum-Size: " + MaximumSize;
+ unsigned long long FileSize = Item->GetMaximumSize();
+ if(FileSize > 0)
+ {
+ string MaximumSize;
+ strprintf(MaximumSize, "%llu", FileSize);
+ Message += "\nMaximum-Size: " + MaximumSize;
+ }
}
- Message += Item->Owner->Custom600Headers();
+
+ Item->SyncDestinationFiles();
+ Message += Item->Custom600Headers();
Message += "\n\n";
if (RealFileExists(Item->Owner->DestFile))
@@ -564,7 +637,7 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item)
clog << " -> " << Access << ':' << QuoteString(Message,"\n") << endl;
OutQueue += Message;
OutReady = true;
-
+
return true;
}
/*}}}*/
@@ -586,7 +659,7 @@ bool pkgAcquire::Worker::OutFdReady()
OutQueue.erase(0,Res);
if (OutQueue.empty() == true)
OutReady = false;
-
+
return true;
}
/*}}}*/
@@ -608,7 +681,7 @@ bool pkgAcquire::Worker::InFdReady()
bool pkgAcquire::Worker::MethodFailure()
{
_error->Error("Method %s has died unexpectedly!",Access.c_str());
-
+
// do not reap the child here to show meaningfull error to the user
ExecWait(Process,Access.c_str(),false);
Process = -1;
@@ -620,26 +693,22 @@ bool pkgAcquire::Worker::MethodFailure()
InReady = false;
OutQueue = string();
MessageQueue.erase(MessageQueue.begin(),MessageQueue.end());
-
+
return false;
}
/*}}}*/
-// Worker::Pulse - Called periodically /*{{{*/
+// Worker::Pulse - Called periodically /*{{{*/
// ---------------------------------------------------------------------
/* */
void pkgAcquire::Worker::Pulse()
{
if (CurrentItem == 0)
return;
-
+
struct stat Buf;
if (stat(CurrentItem->Owner->DestFile.c_str(),&Buf) != 0)
return;
CurrentSize = Buf.st_size;
-
- // Hmm? Should not happen...
- if (CurrentSize > TotalSize && TotalSize != 0)
- TotalSize = CurrentSize;
}
/*}}}*/
// Worker::ItemDone - Called when the current item is finished /*{{{*/
@@ -653,3 +722,33 @@ void pkgAcquire::Worker::ItemDone()
Status = string();
}
/*}}}*/
+void pkgAcquire::Worker::PrepareFiles(char const * const caller, pkgAcquire::Queue::QItem const * const Itm)/*{{{*/
+{
+ if (RealFileExists(Itm->Owner->DestFile))
+ {
+ ChangeOwnerAndPermissionOfFile(caller, Itm->Owner->DestFile.c_str(), "root", "root", 0644);
+ std::string const filename = Itm->Owner->DestFile;
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ {
+ pkgAcquire::Item const * const Owner = *O;
+ if (Owner->DestFile == filename)
+ continue;
+ unlink(Owner->DestFile.c_str());
+ if (link(filename.c_str(), Owner->DestFile.c_str()) != 0)
+ {
+ // different mounts can't happen for us as we download to lists/ by default,
+ // but if the system is reused by others the locations can potentially be on
+ // different disks, so use symlink as poor-men replacement.
+ // FIXME: Real copying as last fallback, but that is costly, so offload to a method preferable
+ if (symlink(filename.c_str(), Owner->DestFile.c_str()) != 0)
+ _error->Error("Can't create (sym)link of file %s to %s", filename.c_str(), Owner->DestFile.c_str());
+ }
+ }
+ }
+ else
+ {
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ unlink((*O)->DestFile.c_str());
+ }
+}
+ /*}}}*/
diff --git a/apt-pkg/acquire-worker.h b/apt-pkg/acquire-worker.h
index db8889c8e..42762abe0 100644
--- a/apt-pkg/acquire-worker.h
+++ b/apt-pkg/acquire-worker.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-worker.h,v 1.12 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################
Acquire Worker - Worker process manager
@@ -48,7 +47,7 @@
class pkgAcquire::Worker : public WeakPointable
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
friend class pkgAcquire;
@@ -318,7 +317,7 @@ class pkgAcquire::Worker : public WeakPointable
* \param Config A location in which to store information about
* the fetch method.
*/
- Worker(MethodConfig *Config);
+ explicit Worker(MethodConfig *Config);
/** \brief Clean up this worker.
*
@@ -326,6 +325,9 @@ class pkgAcquire::Worker : public WeakPointable
* \b false, also rudely interrupts the worker with a SIGINT.
*/
virtual ~Worker();
+
+private:
+ APT_HIDDEN void PrepareFiles(char const * const caller, pkgAcquire::Queue::QItem const * const Itm);
};
/** @} */
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 0c815c005..f8b077367 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -23,6 +23,7 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
+#include <algorithm>
#include <string>
#include <vector>
#include <iostream>
@@ -40,7 +41,6 @@
#include <sys/select.h>
#include <errno.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <apti18n.h>
/*}}}*/
@@ -50,13 +50,13 @@ using namespace std;
// Acquire::pkgAcquire - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* We grab some runtime state from the configuration space */
-pkgAcquire::pkgAcquire() : LockFD(-1), Queues(0), Workers(0), Configs(0), Log(NULL), ToFetch(0),
+pkgAcquire::pkgAcquire() : LockFD(-1), d(NULL), Queues(0), Workers(0), Configs(0), Log(NULL), ToFetch(0),
Debug(_config->FindB("Debug::pkgAcquire",false)),
Running(false)
{
Initialize();
}
-pkgAcquire::pkgAcquire(pkgAcquireStatus *Progress) : LockFD(-1), Queues(0), Workers(0),
+pkgAcquire::pkgAcquire(pkgAcquireStatus *Progress) : LockFD(-1), d(NULL), Queues(0), Workers(0),
Configs(0), Log(NULL), ToFetch(0),
Debug(_config->FindB("Debug::pkgAcquire",false)),
Running(false)
@@ -652,8 +652,8 @@ pkgAcquire::MethodConfig::MethodConfig() : d(NULL), Next(0), SingleInstance(fals
// Queue::Queue - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgAcquire::Queue::Queue(string Name,pkgAcquire *Owner) : d(NULL), Next(0),
- Name(Name), Items(0), Workers(0), Owner(Owner), PipeDepth(0), MaxPipeDepth(1)
+pkgAcquire::Queue::Queue(string const &name,pkgAcquire * const owner) : d(NULL), Next(0),
+ Name(name), Items(0), Workers(0), Owner(owner), PipeDepth(0), MaxPipeDepth(1)
{
}
/*}}}*/
@@ -679,10 +679,14 @@ bool pkgAcquire::Queue::Enqueue(ItemDesc &Item)
{
QItem **I = &Items;
// move to the end of the queue and check for duplicates here
+ HashStringList const hsl = Item.Owner->GetExpectedHashes();
for (; *I != 0; I = &(*I)->Next)
- if (Item.URI == (*I)->URI)
+ if (Item.URI == (*I)->URI || hsl == (*I)->Owner->GetExpectedHashes())
{
- Item.Owner->Status = Item::StatDone;
+ if (_config->FindB("Debug::pkgAcquire::Worker",false) == true)
+ std::cerr << " @ Queue: Action combined for " << Item.URI << " and " << (*I)->URI << std::endl;
+ (*I)->Owners.push_back(Item.Owner);
+ Item.Owner->Status = (*I)->Owner->Status;
return false;
}
@@ -705,13 +709,13 @@ bool pkgAcquire::Queue::Dequeue(Item *Owner)
{
if (Owner->Status == pkgAcquire::Item::StatFetching)
return _error->Error("Tried to dequeue a fetching object");
-
+
bool Res = false;
-
+
QItem **I = &Items;
for (; *I != 0;)
{
- if ((*I)->Owner == Owner)
+ if (Owner == (*I)->Owner)
{
QItem *Jnk= *I;
*I = (*I)->Next;
@@ -722,7 +726,7 @@ bool pkgAcquire::Queue::Dequeue(Item *Owner)
else
I = &(*I)->Next;
}
-
+
return Res;
}
/*}}}*/
@@ -799,9 +803,12 @@ pkgAcquire::Queue::QItem *pkgAcquire::Queue::FindItem(string URI,pkgAcquire::Wor
bool pkgAcquire::Queue::ItemDone(QItem *Itm)
{
PipeDepth--;
- if (Itm->Owner->Status == pkgAcquire::Item::StatFetching)
- Itm->Owner->Status = pkgAcquire::Item::StatDone;
-
+ for (QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
+ {
+ if ((*O)->Status == pkgAcquire::Item::StatFetching)
+ (*O)->Status = pkgAcquire::Item::StatDone;
+ }
+
if (Itm->Owner->QueueCounter <= 1)
Owner->Dequeue(Itm->Owner);
else
@@ -809,7 +816,7 @@ bool pkgAcquire::Queue::ItemDone(QItem *Itm)
Dequeue(Itm->Owner);
Owner->Bump();
}
-
+
return Cycle();
}
/*}}}*/
@@ -824,7 +831,7 @@ bool pkgAcquire::Queue::Cycle()
if (PipeDepth < 0)
return _error->Error("Pipedepth failure");
-
+
// Look for a queable item
QItem *I = Items;
while (PipeDepth < (signed)MaxPipeDepth)
@@ -832,18 +839,19 @@ bool pkgAcquire::Queue::Cycle()
for (; I != 0; I = I->Next)
if (I->Owner->Status == pkgAcquire::Item::StatIdle)
break;
-
+
// Nothing to do, queue is idle.
if (I == 0)
return true;
-
+
I->Worker = Workers;
- I->Owner->Status = pkgAcquire::Item::StatFetching;
+ for (QItem::owner_iterator O = I->Owners.begin(); O != I->Owners.end(); ++O)
+ (*O)->Status = pkgAcquire::Item::StatFetching;
PipeDepth++;
if (Workers->QueueItem(I) == false)
return false;
}
-
+
return true;
}
/*}}}*/
@@ -855,10 +863,98 @@ void pkgAcquire::Queue::Bump()
Cycle();
}
/*}}}*/
+HashStringList pkgAcquire::Queue::QItem::GetExpectedHashes() const /*{{{*/
+{
+ /* each Item can have multiple owners and each owner might have different
+ hashes, even if that is unlikely in practice and if so at least some
+ owners will later fail. There is one situation through which is not a
+ failure and still needs this handling: Two owners who expect the same
+ file, but one owner only knows the SHA1 while the other only knows SHA256. */
+ HashStringList superhsl;
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Owners.begin(); O != Owners.end(); ++O)
+ {
+ HashStringList const hsl = (*O)->GetExpectedHashes();
+ if (hsl.usable() == false)
+ continue;
+ if (superhsl.usable() == false)
+ superhsl = hsl;
+ else
+ {
+ // we merge both lists - if we find disagreement send no hashes
+ HashStringList::const_iterator hs = hsl.begin();
+ for (; hs != hsl.end(); ++hs)
+ if (superhsl.push_back(*hs) == false)
+ break;
+ if (hs != hsl.end())
+ {
+ superhsl.clear();
+ break;
+ }
+ }
+ }
+ return superhsl;
+}
+ /*}}}*/
+APT_PURE unsigned long long pkgAcquire::Queue::QItem::GetMaximumSize() const /*{{{*/
+{
+ unsigned long long Maximum = std::numeric_limits<unsigned long long>::max();
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Owners.begin(); O != Owners.end(); ++O)
+ {
+ if ((*O)->FileSize == 0)
+ continue;
+ Maximum = std::min(Maximum, (*O)->FileSize);
+ }
+ if (Maximum == std::numeric_limits<unsigned long long>::max())
+ return 0;
+ return Maximum;
+}
+ /*}}}*/
+void pkgAcquire::Queue::QItem::SyncDestinationFiles() const /*{{{*/
+{
+ /* ensure that the first owner has the best partial file of all and
+ the rest have (potentially dangling) symlinks to it so that
+ everything (like progress reporting) finds it easily */
+ std::string superfile = Owner->DestFile;
+ off_t supersize = 0;
+ for (pkgAcquire::Queue::QItem::owner_iterator O = Owners.begin(); O != Owners.end(); ++O)
+ {
+ if ((*O)->DestFile == superfile)
+ continue;
+ struct stat file;
+ if (lstat((*O)->DestFile.c_str(),&file) == 0)
+ {
+ if ((file.st_mode & S_IFREG) == 0)
+ unlink((*O)->DestFile.c_str());
+ else if (supersize < file.st_size)
+ {
+ supersize = file.st_size;
+ unlink(superfile.c_str());
+ rename((*O)->DestFile.c_str(), superfile.c_str());
+ }
+ else
+ unlink((*O)->DestFile.c_str());
+ if (symlink(superfile.c_str(), (*O)->DestFile.c_str()) != 0)
+ {
+ ; // not a problem per-se and no real alternative
+ }
+ }
+ }
+}
+ /*}}}*/
+std::string pkgAcquire::Queue::QItem::Custom600Headers() const /*{{{*/
+{
+ /* The others are relatively easy to merge, but this one?
+ Lets not merge and see how far we can run with it…
+ Likely, nobody will ever notice as all the items will
+ be of the same class and hence generate the same headers. */
+ return Owner->Custom600Headers();
+}
+ /*}}}*/
+
// AcquireStatus::pkgAcquireStatus - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgAcquireStatus::pkgAcquireStatus() : d(NULL), Percent(0), Update(true), MorePulses(false)
+pkgAcquireStatus::pkgAcquireStatus() : d(NULL), Percent(-1), Update(true), MorePulses(false)
{
Start();
}
@@ -914,9 +1010,9 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
{
CurrentBytes += I->CurrentSize;
ResumeSize += I->ResumePoint;
-
+
// Files with unknown size always have 100% completion
- if (I->CurrentItem->Owner->FileSize == 0 &&
+ if (I->CurrentItem->Owner->FileSize == 0 &&
I->CurrentItem->Owner->Complete == false)
TotalBytes += I->CurrentSize;
}
@@ -957,13 +1053,17 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
Time = NewTime;
}
+ double const OldPercent = Percent;
// calculate the percentage, if we have too little data assume 1%
if (TotalBytes > 0 && UnfetchedReleaseFiles)
Percent = 0;
- else
+ else
// use both files and bytes because bytes can be unreliable
- Percent = (0.8 * (CurrentBytes/float(TotalBytes)*100.0) +
+ Percent = (0.8 * (CurrentBytes/float(TotalBytes)*100.0) +
0.2 * (CurrentItems/float(TotalItems)*100.0));
+ double const DiffPercent = Percent - OldPercent;
+ if (DiffPercent < 0.001 && _config->FindB("Acquire::Progress::Diffpercent", false) == true)
+ return true;
int fd = _config->FindI("APT::Status-Fd",-1);
if(fd > 0)
@@ -981,11 +1081,11 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
snprintf(msg,sizeof(msg), _("Retrieving file %li of %li (%s remaining)"), i, TotalItems, TimeToStr(ETA).c_str());
else
snprintf(msg,sizeof(msg), _("Retrieving file %li of %li"), i, TotalItems);
-
+
// build the status str
status << "dlstatus:" << i
<< ":" << std::setprecision(3) << Percent
- << ":" << msg
+ << ":" << msg
<< endl;
std::string const dlstatus = status.str();
@@ -1042,6 +1142,15 @@ void pkgAcquireStatus::Fetched(unsigned long long Size,unsigned long long Resume
}
/*}}}*/
+pkgAcquire::UriIterator::UriIterator(pkgAcquire::Queue *Q) : d(NULL), CurQ(Q), CurItem(0)
+{
+ while (CurItem == 0 && CurQ != 0)
+ {
+ CurItem = CurQ->Items;
+ CurQ = CurQ->Next;
+ }
+}
+
APT_CONST pkgAcquire::UriIterator::~UriIterator() {}
APT_CONST pkgAcquire::MethodConfig::~MethodConfig() {}
APT_CONST pkgAcquireStatus::~pkgAcquireStatus() {}
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index fc90624e1..0d2b21233 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.h,v 1.29.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Acquire - File Acquiration
@@ -68,9 +67,10 @@
#include <apt-pkg/macros.h>
#include <apt-pkg/weakptr.h>
+#include <apt-pkg/hashes.h>
-#include <vector>
#include <string>
+#include <vector>
#include <stddef.h>
#include <sys/time.h>
@@ -101,7 +101,7 @@ class pkgAcquire
/** \brief FD of the Lock file we acquire in Setup (if any) */
int LockFD;
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
public:
@@ -369,7 +369,7 @@ class pkgAcquire
bool GetLock(std::string const &Lock);
/** \brief Construct a new pkgAcquire. */
- pkgAcquire(pkgAcquireStatus *Log);
+ explicit pkgAcquire(pkgAcquireStatus *Log);
pkgAcquire();
/** \brief Destroy this pkgAcquire object.
@@ -390,13 +390,13 @@ class pkgAcquire
*/
struct pkgAcquire::ItemDesc : public WeakPointable
{
- /** \brief The URI from which to download this item. */
+ /** \brief URI from which to download this item. */
std::string URI;
- /** brief A description of this item. */
+ /** \brief description of this item. */
std::string Description;
- /** brief A shorter description of this item. */
+ /** \brief shorter description of this item. */
std::string ShortDesc;
- /** brief The underlying item which is to be downloaded. */
+ /** \brief underlying item which is to be downloaded. */
Item *Owner;
};
/*}}}*/
@@ -411,7 +411,7 @@ class pkgAcquire::Queue
friend class pkgAcquire::Worker;
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
/** \brief The next queue in the pkgAcquire object's list of queues. */
Queue *Next;
@@ -419,13 +419,18 @@ class pkgAcquire::Queue
protected:
/** \brief A single item placed in this queue. */
- struct QItem : pkgAcquire::ItemDesc
+ struct QItem : public ItemDesc
{
/** \brief The next item in the queue. */
QItem *Next;
/** \brief The worker associated with this item, if any. */
pkgAcquire::Worker *Worker;
+ /** \brief The underlying items interested in the download */
+ std::vector<Item*> Owners;
+
+ typedef std::vector<Item*>::const_iterator owner_iterator;
+
/** \brief Assign the ItemDesc portion of this QItem from
* another ItemDesc
*/
@@ -434,10 +439,24 @@ class pkgAcquire::Queue
URI = I.URI;
Description = I.Description;
ShortDesc = I.ShortDesc;
+ Owners.clear();
+ Owners.push_back(I.Owner);
Owner = I.Owner;
};
+
+ /** @return the sum of all expected hashes by all owners */
+ HashStringList GetExpectedHashes() const;
+
+ /** @return smallest maximum size of all owners */
+ unsigned long long GetMaximumSize() const;
+
+ /** \brief get partial files in order */
+ void SyncDestinationFiles() const;
+
+ /** @return the custom headers to use for this item */
+ std::string Custom600Headers() const;
};
-
+
/** \brief The name of this queue. */
std::string Name;
@@ -557,7 +576,7 @@ class pkgAcquire::Queue
* \param Name The name of the new queue.
* \param Owner The download process that owns the new queue.
*/
- Queue(std::string Name,pkgAcquire *Owner);
+ Queue(std::string const &Name,pkgAcquire * const Owner);
/** Shut down all the worker processes associated with this queue
* and empty the queue.
@@ -569,7 +588,7 @@ class pkgAcquire::Queue
class pkgAcquire::UriIterator
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
/** The next queue to iterate over. */
pkgAcquire::Queue *CurQ;
@@ -590,7 +609,7 @@ class pkgAcquire::UriIterator
}
};
- inline pkgAcquire::ItemDesc const *operator ->() const {return CurItem;};
+ inline pkgAcquire::Queue::QItem const *operator ->() const {return CurItem;};
inline bool operator !=(UriIterator const &rhs) const {return rhs.CurQ != CurQ || rhs.CurItem != CurItem;};
inline bool operator ==(UriIterator const &rhs) const {return rhs.CurQ == CurQ && rhs.CurItem == CurItem;};
@@ -598,14 +617,7 @@ class pkgAcquire::UriIterator
*
* \param Q The queue over which this UriIterator should iterate.
*/
- UriIterator(pkgAcquire::Queue *Q) : d(NULL), CurQ(Q), CurItem(0)
- {
- while (CurItem == 0 && CurQ != 0)
- {
- CurItem = CurQ->Items;
- CurQ = CurQ->Next;
- }
- }
+ explicit UriIterator(pkgAcquire::Queue *Q);
virtual ~UriIterator();
};
/*}}}*/
@@ -613,7 +625,7 @@ class pkgAcquire::UriIterator
struct pkgAcquire::MethodConfig
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
/** \brief The next link on the acquire method list.
*
@@ -674,7 +686,7 @@ struct pkgAcquire::MethodConfig
class pkgAcquireStatus
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
protected:
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index adbec82f7..6d982c551 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -19,9 +19,7 @@
#include <apt-pkg/algorithms.h>
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/edsp.h>
-#include <apt-pkg/progress.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/packagemanager.h>
#include <apt-pkg/pkgcache.h>
@@ -43,7 +41,7 @@ pkgProblemResolver *pkgProblemResolver::This = 0;
/* The legacy translations here of input Pkg iterators is obsolete,
this is not necessary since the pkgCaches are fully shared now. */
pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache),
- iPolicy(Cache),
+ d(NULL), iPolicy(Cache),
Sim(&Cache->GetCache(),&iPolicy),
group(Sim)
{
@@ -476,8 +474,8 @@ void pkgProblemResolver::MakeScores()
}
// Copy the scores to advoid additive looping
- SPtrArray<int> OldScores = new int[Size];
- memcpy(OldScores,Scores,sizeof(*Scores)*Size);
+ std::unique_ptr<int[]> OldScores(new int[Size]);
+ memcpy(OldScores.get(),Scores,sizeof(*Scores)*Size);
/* Now we cause 1 level of dependency inheritance, that is we add the
score of the packages that depend on the target Package. This
@@ -638,14 +636,6 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg)
}
/*}}}*/
// ProblemResolver::Resolve - calls a resolver to fix the situation /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-#if APT_PKG_ABI < 413
-bool pkgProblemResolver::Resolve(bool BrokenFix)
-{
- return Resolve(BrokenFix, NULL);
-}
-#endif
bool pkgProblemResolver::Resolve(bool BrokenFix, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
@@ -710,17 +700,17 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
operates from highest score to lowest. This prevents problems when
high score packages cause the removal of lower score packages that
would cause the removal of even lower score packages. */
- SPtrArray<pkgCache::Package *> PList = new pkgCache::Package *[Size];
- pkgCache::Package **PEnd = PList;
+ std::unique_ptr<pkgCache::Package *[]> PList(new pkgCache::Package *[Size]);
+ pkgCache::Package **PEnd = PList.get();
for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
*PEnd++ = I;
This = this;
- qsort(PList,PEnd - PList,sizeof(*PList),&ScoreSort);
+ qsort(PList.get(),PEnd - PList.get(),sizeof(PList[0]),&ScoreSort);
if (_config->FindB("Debug::pkgProblemResolver::ShowScores",false) == true)
{
clog << "Show Scores" << endl;
- for (pkgCache::Package **K = PList; K != PEnd; K++)
+ for (pkgCache::Package **K = PList.get(); K != PEnd; K++)
if (Scores[(*K)->ID] != 0)
{
pkgCache::PkgIterator Pkg(Cache,*K);
@@ -742,7 +732,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
for (int Counter = 0; Counter != 10 && Change == true; Counter++)
{
Change = false;
- for (pkgCache::Package **K = PList; K != PEnd; K++)
+ for (pkgCache::Package **K = PList.get(); K != PEnd; K++)
{
pkgCache::PkgIterator I(Cache,*K);
@@ -853,8 +843,8 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
/* Look across the version list. If there are no possible
targets then we keep the package and bail. This is necessary
if a package has a dep on another package that can't be found */
- SPtrArray<pkgCache::Version *> VList = Start.AllTargets();
- if (*VList == 0 && (Flags[I->ID] & Protected) != Protected &&
+ std::unique_ptr<pkgCache::Version *[]> VList(Start.AllTargets());
+ if (VList[0] == 0 && (Flags[I->ID] & Protected) != Protected &&
Start.IsNegative() == false &&
Cache[I].NowBroken() == false)
{
@@ -871,7 +861,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
}
bool Done = false;
- for (pkgCache::Version **V = VList; *V != 0; V++)
+ for (pkgCache::Version **V = VList.get(); *V != 0; V++)
{
pkgCache::VerIterator Ver(Cache,*V);
pkgCache::PkgIterator Pkg = Ver.ParentPkg();
@@ -1144,12 +1134,6 @@ bool pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator I)
/* This is the work horse of the soft upgrade routine. It is very gental
in that it does not install or remove any packages. It is assumed that the
system was non-broken previously. */
-#if APT_PKG_ABI < 413
-bool pkgProblemResolver::ResolveByKeep()
-{
- return ResolveByKeep(NULL);
-}
-#endif
bool pkgProblemResolver::ResolveByKeep(OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
@@ -1247,8 +1231,8 @@ bool pkgProblemResolver::ResolveByKeepInternal()
clog << "Package " << I.FullName(false) << " " << Start << endl;
// Look at all the possible provides on this package
- SPtrArray<pkgCache::Version *> VList = Start.AllTargets();
- for (pkgCache::Version **V = VList; *V != 0; V++)
+ std::unique_ptr<pkgCache::Version *[]> VList(Start.AllTargets());
+ for (pkgCache::Version **V = VList.get(); *V != 0; V++)
{
pkgCache::VerIterator Ver(Cache,*V);
pkgCache::PkgIterator Pkg = Ver.ParentPkg();
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 2ac28c0d7..aad261b63 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: algorithms.h,v 1.10 2001/05/22 04:17:41 jgg Exp $
/* ######################################################################
Algorithms - A set of misc algorithms
@@ -55,6 +54,7 @@ using std::ostream;
class pkgSimulate : public pkgPackageManager /*{{{*/
{
+ void * const d;
protected:
class Policy : public pkgDepCache::Policy
@@ -62,12 +62,12 @@ class pkgSimulate : public pkgPackageManager /*{{{*/
pkgDepCache *Cache;
public:
- virtual VerIterator GetCandidateVer(PkgIterator const &Pkg)
+ virtual VerIterator GetCandidateVer(PkgIterator const &Pkg) APT_OVERRIDE
{
return (*Cache)[Pkg].CandidateVerIter(*Cache);
}
- Policy(pkgDepCache *Cache) : Cache(Cache) {};
+ explicit Policy(pkgDepCache *Cache) : Cache(Cache) {};
};
unsigned char *Flags;
@@ -77,9 +77,9 @@ class pkgSimulate : public pkgPackageManager /*{{{*/
pkgDepCache::ActionGroup group;
// The Actuall installation implementation
- virtual bool Install(PkgIterator Pkg,std::string File);
- virtual bool Configure(PkgIterator Pkg);
- virtual bool Remove(PkgIterator Pkg,bool Purge);
+ virtual bool Install(PkgIterator Pkg,std::string File) APT_OVERRIDE;
+ virtual bool Configure(PkgIterator Pkg) APT_OVERRIDE;
+ virtual bool Remove(PkgIterator Pkg,bool Purge) APT_OVERRIDE;
private:
APT_HIDDEN void ShortBreaks();
@@ -87,15 +87,15 @@ private:
public:
- pkgSimulate(pkgDepCache *Cache);
- ~pkgSimulate();
+ explicit pkgSimulate(pkgDepCache *Cache);
+ virtual ~pkgSimulate();
};
/*}}}*/
class pkgProblemResolver /*{{{*/
{
private:
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
pkgDepCache &Cache;
typedef pkgCache::PkgIterator PkgIterator;
@@ -138,25 +138,15 @@ class pkgProblemResolver /*{{{*/
inline void Clear(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] &= ~(Protected | ToRemove);};
// Try to intelligently resolve problems by installing and removing packages
-#if APT_PKG_ABI >= 413
bool Resolve(bool BrokenFix = false, OpProgress * const Progress = NULL);
-#else
- bool Resolve(bool BrokenFix = false);
- bool Resolve(bool BrokenFix, OpProgress * const Progress);
-#endif
// Try to resolve problems only by using keep
-#if APT_PKG_ABI >= 413
bool ResolveByKeep(OpProgress * const Progress = NULL);
-#else
- bool ResolveByKeep();
- bool ResolveByKeep(OpProgress * const Progress);
-#endif
APT_DEPRECATED void InstallProtect();
- pkgProblemResolver(pkgDepCache *Cache);
- ~pkgProblemResolver();
+ explicit pkgProblemResolver(pkgDepCache *Cache);
+ virtual ~pkgProblemResolver();
};
/*}}}*/
bool pkgApplyStatus(pkgDepCache &Cache);
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 01b85a74e..f5bc18394 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -29,7 +29,6 @@
#include <string>
#include <vector>
-#include <apti18n.h>
/*}}}*/
namespace APT {
// setDefaultConfigurationForCompressors /*{{{*/
@@ -222,7 +221,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All,
// get the environment language codes: LC_MESSAGES (and later LANGUAGE)
// we extract both, a long and a short code and then we will
// check if we actually need both (rare) or if the short is enough
- string const envMsg = string(Locale == 0 ? std::setlocale(LC_MESSAGES, NULL) : *Locale);
+ string const envMsg = string(Locale == 0 ? ::setlocale(LC_MESSAGES, NULL) : *Locale);
size_t const lenShort = (envMsg.find('_') != string::npos) ? envMsg.find('_') : 2;
size_t const lenLong = (envMsg.find_first_of(".@") != string::npos) ? envMsg.find_first_of(".@") : (lenShort + 3);
diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h
index c7b8d2d73..fbd9b02e6 100644
--- a/apt-pkg/aptconfiguration.h
+++ b/apt-pkg/aptconfiguration.h
@@ -16,8 +16,7 @@
#include <limits>
/*}}}*/
namespace APT {
-class Configuration { /*{{{*/
-public: /*{{{*/
+namespace Configuration { /*{{{*/
/** \brief Returns a vector of usable Compression Types
*
* Files can be compressed in various ways to decrease the size of the
@@ -39,7 +38,7 @@ public: /*{{{*/
*
* \return a vector of the compression types in the preferred usage order
*/
- std::vector<std::string> static const getCompressionTypes(bool const &Cached = true);
+ std::vector<std::string> const getCompressionTypes(bool const &Cached = true);
/** \brief Returns a vector of Language Codes
*
@@ -64,7 +63,7 @@ public: /*{{{*/
*
* \return a vector of (all) Language Codes in the preferred usage order
*/
- std::vector<std::string> static const getLanguages(bool const &All = false,
+ std::vector<std::string> const getLanguages(bool const &All = false,
bool const &Cached = true, char const ** const Locale = 0);
/** \brief Are we interested in the given Language?
@@ -73,7 +72,7 @@ public: /*{{{*/
* \param All defines if we check against all codes or only against used codes
* \return true if we are interested, false otherwise
*/
- bool static checkLanguage(std::string Lang, bool const All = false);
+ bool checkLanguage(std::string Lang, bool const All = false);
/** \brief Returns a vector of Architectures we support
*
@@ -82,14 +81,14 @@ public: /*{{{*/
*
* \return a vector of Architectures in preferred order
*/
- std::vector<std::string> static const getArchitectures(bool const &Cached = true);
+ std::vector<std::string> const getArchitectures(bool const &Cached = true);
/** \brief Are we interested in the given Architecture?
*
* \param Arch we want to check
* \return true if we are interested, false otherwise
*/
- bool static checkArchitecture(std::string const &Arch);
+ bool checkArchitecture(std::string const &Arch);
/** \brief Representation of supported compressors */
struct Compressor {
@@ -113,17 +112,17 @@ public: /*{{{*/
*
* \return a vector of Compressors
*/
- std::vector<Compressor> static const getCompressors(bool const Cached = true);
+ std::vector<Compressor> const getCompressors(bool const Cached = true);
/** \brief Return a vector of extensions supported for data.tar's */
- std::vector<std::string> static const getCompressorExtensions();
+ std::vector<std::string> const getCompressorExtensions();
/** \return Return a vector of enabled build profile specifications */
- std::vector<std::string> static const getBuildProfiles();
+ std::vector<std::string> const getBuildProfiles();
/** \return Return a comma-separated list of enabled build profile specifications */
- std::string static const getBuildProfilesString();
+ std::string const getBuildProfilesString();
/*}}}*/
-};
+}
/*}}}*/
}
#endif
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index ea3d45480..214864095 100644
--- a/apt-pkg/cachefile.cc
+++ b/apt-pkg/cachefile.cc
@@ -35,10 +35,13 @@
#include <apti18n.h>
/*}}}*/
// CacheFile::CacheFile - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgCacheFile::pkgCacheFile() : d(NULL), Map(NULL), Cache(NULL), DCache(NULL),
- SrcList(NULL), Policy(NULL)
+pkgCacheFile::pkgCacheFile() : d(NULL), ExternOwner(false), Map(NULL), Cache(NULL),
+ DCache(NULL), SrcList(NULL), Policy(NULL)
+{
+}
+pkgCacheFile::pkgCacheFile(pkgDepCache * const Owner) : d(NULL), ExternOwner(true),
+ Map(&Owner->GetCache().GetMap()), Cache(&Owner->GetCache()),
+ DCache(Owner), SrcList(NULL), Policy(NULL)
{
}
/*}}}*/
@@ -47,12 +50,16 @@ pkgCacheFile::pkgCacheFile() : d(NULL), Map(NULL), Cache(NULL), DCache(NULL),
/* */
pkgCacheFile::~pkgCacheFile()
{
- delete DCache;
+ if (ExternOwner == false)
+ {
+ delete DCache;
+ delete Cache;
+ delete Map;
+ }
delete Policy;
delete SrcList;
- delete Cache;
- delete Map;
- _system->UnLock(true);
+ if (ExternOwner == false)
+ _system->UnLock(true);
}
/*}}}*/
// CacheFile::BuildCaches - Open and build the cache files /*{{{*/
@@ -65,8 +72,8 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock)
if (_config->FindB("pkgCacheFile::Generate", true) == false)
{
- Map = new MMap(*new FileFd(_config->FindFile("Dir::Cache::pkgcache"),
- FileFd::ReadOnly),MMap::Public|MMap::ReadOnly);
+ FileFd file(_config->FindFile("Dir::Cache::pkgcache"), FileFd::ReadOnly);
+ Map = new MMap(file, MMap::Public|MMap::ReadOnly);
Cache = new pkgCache(Map);
if (_error->PendingError() == true)
return false;
@@ -150,8 +157,7 @@ bool pkgCacheFile::BuildDepCache(OpProgress *Progress)
if (_error->PendingError() == true)
return false;
- DCache->Init(Progress);
- return true;
+ return DCache->Init(Progress);
}
/*}}}*/
// CacheFile::Open - Open the cache files, creating if necessary /*{{{*/
@@ -229,11 +235,16 @@ void pkgCacheFile::RemoveCaches()
/* */
void pkgCacheFile::Close()
{
- delete DCache;
+ if (ExternOwner == false)
+ {
+ delete DCache;
+ delete Cache;
+ delete Map;
+ }
+ else
+ ExternOwner = false;
delete Policy;
- delete Cache;
delete SrcList;
- delete Map;
_system->UnLock(true);
Map = NULL;
diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h
index 36b20893a..f4cadf5e6 100644
--- a/apt-pkg/cachefile.h
+++ b/apt-pkg/cachefile.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cachefile.h,v 1.5 2002/04/27 04:28:04 jgg Exp $
/* ######################################################################
CacheFile - Simple wrapper class for opening, generating and whatnot
@@ -38,10 +37,10 @@ class OpProgress;
class pkgCacheFile
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
+ bool ExternOwner;
protected:
-
MMap *Map;
pkgCache *Cache;
pkgDepCache *DCache;
@@ -51,18 +50,18 @@ class pkgCacheFile
pkgPolicy *Policy;
// We look pretty much exactly like a pointer to a dep cache
- inline operator pkgCache &() {return *Cache;};
- inline operator pkgCache *() {return Cache;};
- inline operator pkgDepCache &() {return *DCache;};
- inline operator pkgDepCache *() {return DCache;};
- inline operator pkgPolicy &() {return *Policy;};
- inline operator pkgPolicy *() {return Policy;};
- inline operator pkgSourceList &() {return *SrcList;};
- inline operator pkgSourceList *() {return SrcList;};
- inline pkgDepCache *operator ->() {return DCache;};
- inline pkgDepCache &operator *() {return *DCache;};
- inline pkgDepCache::StateCache &operator [](pkgCache::PkgIterator const &I) {return (*DCache)[I];};
- inline unsigned char &operator [](pkgCache::DepIterator const &I) {return (*DCache)[I];};
+ inline operator pkgCache &() const {return *Cache;};
+ inline operator pkgCache *() const {return Cache;};
+ inline operator pkgDepCache &() const {return *DCache;};
+ inline operator pkgDepCache *() const {return DCache;};
+ inline operator pkgPolicy &() const {return *Policy;};
+ inline operator pkgPolicy *() const {return Policy;};
+ inline operator pkgSourceList &() const {return *SrcList;};
+ inline operator pkgSourceList *() const {return SrcList;};
+ inline pkgDepCache *operator ->() const {return DCache;};
+ inline pkgDepCache &operator *() const {return *DCache;};
+ inline pkgDepCache::StateCache &operator [](pkgCache::PkgIterator const &I) const {return (*DCache)[I];};
+ inline unsigned char &operator [](pkgCache::DepIterator const &I) const {return (*DCache)[I];};
bool BuildCaches(OpProgress *Progress = NULL,bool WithLock = true);
APT_DEPRECATED bool BuildCaches(OpProgress &Progress,bool const &WithLock = true) { return BuildCaches(&Progress, WithLock); };
@@ -86,6 +85,7 @@ class pkgCacheFile
inline bool IsSrcListBuilt() const { return (SrcList != NULL); };
pkgCacheFile();
+ explicit pkgCacheFile(pkgDepCache * const Owner);
virtual ~pkgCacheFile();
};
diff --git a/apt-pkg/cachefilter.h b/apt-pkg/cachefilter.h
index b4697b773..9970b5b22 100644
--- a/apt-pkg/cachefilter.h
+++ b/apt-pkg/cachefilter.h
@@ -29,34 +29,34 @@ public:
class PackageMatcher : public Matcher {
public:
- virtual bool operator() (pkgCache::PkgIterator const &Pkg) = 0;
- virtual bool operator() (pkgCache::VerIterator const &Ver) { return (*this)(Ver.ParentPkg()); }
- virtual bool operator() (pkgCache::GrpIterator const &/*Grp*/) { return false; }
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE = 0;
+ virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE { return (*this)(Ver.ParentPkg()); }
+ virtual bool operator() (pkgCache::GrpIterator const &/*Grp*/) APT_OVERRIDE { return false; }
virtual ~PackageMatcher();
};
// Generica like True, False, NOT, AND, OR /*{{{*/
class TrueMatcher : public Matcher {
public:
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
- virtual bool operator() (pkgCache::GrpIterator const &Grp);
- virtual bool operator() (pkgCache::VerIterator const &Ver);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};
class FalseMatcher : public Matcher {
public:
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
- virtual bool operator() (pkgCache::GrpIterator const &Grp);
- virtual bool operator() (pkgCache::VerIterator const &Ver);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};
class NOTMatcher : public Matcher {
Matcher * const matcher;
public:
- NOTMatcher(Matcher * const matcher);
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
- virtual bool operator() (pkgCache::GrpIterator const &Grp);
- virtual bool operator() (pkgCache::VerIterator const &Ver);
+ explicit NOTMatcher(Matcher * const matcher);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~NOTMatcher();
};
@@ -65,15 +65,15 @@ class ANDMatcher : public Matcher {
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
ANDMatcher();
- ANDMatcher(Matcher * const matcher1);
+ explicit ANDMatcher(Matcher * const matcher1);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4, Matcher * const matcher5);
ANDMatcher& AND(Matcher * const matcher);
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
- virtual bool operator() (pkgCache::GrpIterator const &Grp);
- virtual bool operator() (pkgCache::VerIterator const &Ver);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~ANDMatcher();
};
class ORMatcher : public Matcher {
@@ -81,33 +81,33 @@ class ORMatcher : public Matcher {
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
ORMatcher();
- ORMatcher(Matcher * const matcher1);
+ explicit ORMatcher(Matcher * const matcher1);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4, Matcher * const matcher5);
ORMatcher& OR(Matcher * const matcher);
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
- virtual bool operator() (pkgCache::GrpIterator const &Grp);
- virtual bool operator() (pkgCache::VerIterator const &Ver);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~ORMatcher();
};
/*}}}*/
class PackageNameMatchesRegEx : public PackageMatcher { /*{{{*/
regex_t* pattern;
public:
- PackageNameMatchesRegEx(std::string const &Pattern);
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
- virtual bool operator() (pkgCache::GrpIterator const &Grp);
+ explicit PackageNameMatchesRegEx(std::string const &Pattern);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual ~PackageNameMatchesRegEx();
};
/*}}}*/
class PackageNameMatchesFnmatch : public PackageMatcher { /*{{{*/
const std::string Pattern;
public:
- PackageNameMatchesFnmatch(std::string const &Pattern);
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
- virtual bool operator() (pkgCache::GrpIterator const &Grp);
+ explicit PackageNameMatchesFnmatch(std::string const &Pattern);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual ~PackageNameMatchesFnmatch() {};
};
/*}}}*/
@@ -133,15 +133,15 @@ public:
*/
PackageArchitectureMatchesSpecification(std::string const &pattern, bool const isPattern = true);
bool operator() (char const * const &arch);
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual ~PackageArchitectureMatchesSpecification();
};
/*}}}*/
class PackageIsNewInstall : public PackageMatcher { /*{{{*/
pkgCacheFile * const Cache;
public:
- PackageIsNewInstall(pkgCacheFile * const Cache);
- virtual bool operator() (pkgCache::PkgIterator const &Pkg);
+ explicit PackageIsNewInstall(pkgCacheFile * const Cache);
+ virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual ~PackageIsNewInstall();
};
/*}}}*/
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index fe798799c..48547e564 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -43,10 +43,6 @@
need to have for doing some walk-over-the-cache magic */
template<typename Str, typename Itr> class pkgCache::Iterator :
public std::iterator<std::forward_iterator_tag, Str> {
- protected:
- Str *S;
- pkgCache *Owner;
-
/** \brief Returns the Pointer for this struct in the owner
* The implementation of this method should be pretty short
* as it will only return the Pointer into the mmap stored
@@ -55,12 +51,14 @@ template<typename Str, typename Itr> class pkgCache::Iterator :
* basic methods from the actual structure.
* \return Pointer to the first structure of this type
*/
- virtual Str* OwnerPointer() const = 0;
+ Str* OwnerPointer() const { return static_cast<Itr const*>(this)->OwnerPointer(); }
+
+ protected:
+ Str *S;
+ pkgCache *Owner;
public:
// Iteration
- virtual void operator ++(int) = 0;
- virtual void operator ++() = 0; // Should be {operator ++(0);}
inline bool end() const {return Owner == 0 || S == OwnerPointer();}
// Comparison
@@ -77,7 +75,6 @@ template<typename Str, typename Itr> class pkgCache::Iterator :
inline pkgCache *Cache() const {return Owner;}
// Mixed stuff
- inline void operator =(const Itr &B) {S = B.S; Owner = B.Owner;}
inline bool IsGood() const { return S && Owner && ! end();}
inline unsigned long Index() const {return S - OwnerPointer();}
@@ -100,20 +97,19 @@ template<typename Str, typename Itr> class pkgCache::Iterator :
class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> {
long HashIndex;
- protected:
+ public:
inline Group* OwnerPointer() const {
return (Owner != 0) ? Owner->GrpP : 0;
}
- public:
// This constructor is the 'begin' constructor, never use it.
- inline GrpIterator(pkgCache &Owner) : Iterator<Group, GrpIterator>(Owner), HashIndex(-1) {
+ explicit inline GrpIterator(pkgCache &Owner) : Iterator<Group, GrpIterator>(Owner), HashIndex(-1) {
S = OwnerPointer();
- operator ++(0);
+ operator++();
}
- virtual void operator ++(int);
- virtual void operator ++() {operator ++(0);}
+ GrpIterator& operator++();
+ inline GrpIterator operator++(int) { GrpIterator const tmp(*this); operator++(); return tmp; }
inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;}
inline PkgIterator PackageList() const;
@@ -141,20 +137,19 @@ class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> {
class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
long HashIndex;
- protected:
+ public:
inline Package* OwnerPointer() const {
return (Owner != 0) ? Owner->PkgP : 0;
}
- public:
// This constructor is the 'begin' constructor, never use it.
- inline PkgIterator(pkgCache &Owner) : Iterator<Package, PkgIterator>(Owner), HashIndex(-1) {
+ explicit inline PkgIterator(pkgCache &Owner) : Iterator<Package, PkgIterator>(Owner), HashIndex(-1) {
S = OwnerPointer();
- operator ++(0);
+ operator++();
}
- virtual void operator ++(int);
- virtual void operator ++() {operator ++(0);}
+ PkgIterator& operator++();
+ inline PkgIterator operator++(int) { PkgIterator const tmp(*this); operator++(); return tmp; }
enum OkState {NeedsNothing,NeedsUnpack,NeedsConfigure};
@@ -162,11 +157,7 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
inline const char *Name() const { return Group().Name(); }
// Versions have sections - and packages can have different versions with different sections
// so this interface is broken by design. Run as fast as you can to Version.Section().
- APT_DEPRECATED inline const char *Section() const {
- APT_IGNORE_DEPRECATED_PUSH
- return S->Section == 0?0:Owner->StrP + S->Section;
- APT_IGNORE_DEPRECATED_POP
- }
+ APT_DEPRECATED inline const char *Section() const;
inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge ||
(S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}
inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}
@@ -194,15 +185,14 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
/*}}}*/
// Version Iterator /*{{{*/
class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
- protected:
+ public:
inline Version* OwnerPointer() const {
return (Owner != 0) ? Owner->VerP : 0;
}
- public:
// Iteration
- void operator ++(int) {if (S != Owner->VerP) S = Owner->VerP + S->NextVer;}
- inline void operator ++() {operator ++(0);}
+ inline VerIterator& operator++() {if (S != Owner->VerP) S = Owner->VerP + S->NextVer; return *this;}
+ inline VerIterator operator++(int) { VerIterator const tmp(*this); operator++(); return tmp; }
// Comparison
int CompareVer(const VerIterator &B) const;
@@ -217,14 +207,12 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
// Accessors
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;}
-#if APT_PKG_ABI >= 413
/** \brief source package name this version comes from
Always contains the name, even if it is the same as the binary name */
inline const char *SourcePkgName() const {return Owner->StrP + S->SourcePkgName;}
/** \brief source version this version comes from
Always contains the version string, even if it is the same as the binary version */
inline const char *SourceVerStr() const {return Owner->StrP + S->SourceVerStr;}
-#endif
inline const char *Arch() const {
if ((S->MultiArch & pkgCache::Version::All) == pkgCache::Version::All)
return "all";
@@ -254,15 +242,14 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
/*}}}*/
// Description Iterator /*{{{*/
class pkgCache::DescIterator : public Iterator<Description, DescIterator> {
- protected:
+ public:
inline Description* OwnerPointer() const {
return (Owner != 0) ? Owner->DescP : 0;
}
- public:
// Iteration
- void operator ++(int) {if (S != Owner->DescP) S = Owner->DescP + S->NextDesc;}
- inline void operator ++() {operator ++(0);}
+ inline DescIterator& operator++() {if (S != Owner->DescP) S = Owner->DescP + S->NextDesc; return *this;}
+ inline DescIterator operator++(int) { DescIterator const tmp(*this); operator++(); return tmp; }
// Comparison
int CompareDesc(const DescIterator &B) const;
@@ -282,21 +269,20 @@ class pkgCache::DescIterator : public Iterator<Description, DescIterator> {
// Dependency iterator /*{{{*/
class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
enum {DepVer, DepRev} Type;
+ DependencyData * S2;
- protected:
+ public:
inline Dependency* OwnerPointer() const {
return (Owner != 0) ? Owner->DepP : 0;
}
- public:
// Iteration
- void operator ++(int) {if (S != Owner->DepP) S = Owner->DepP +
- (Type == DepVer ? S->NextDepends : S->NextRevDepends);}
- inline void operator ++() {operator ++(0);}
+ DepIterator& operator++();
+ inline DepIterator operator++(int) { DepIterator const tmp(*this); operator++(); return tmp; }
// Accessors
- inline const char *TargetVer() const {return S->Version == 0?0:Owner->StrP + S->Version;}
- inline PkgIterator TargetPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->Package);}
+ inline const char *TargetVer() const {return S2->Version == 0?0:Owner->StrP + S2->Version;}
+ inline PkgIterator TargetPkg() const {return PkgIterator(*Owner,Owner->PkgP + S2->Package);}
inline PkgIterator SmartTargetPkg() const {PkgIterator R(*Owner,0);SmartTargetPkg(R);return R;}
inline VerIterator ParentVer() const {return VerIterator(*Owner,Owner->VerP + S->ParentVer);}
inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[S->ParentVer].ParentPkg);}
@@ -305,45 +291,79 @@ class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
bool IsNegative() const APT_PURE;
bool IsIgnorable(PrvIterator const &Prv) const APT_PURE;
bool IsIgnorable(PkgIterator const &Pkg) const APT_PURE;
- bool IsMultiArchImplicit() const APT_PURE;
+ /* MultiArch can be translated to SingleArch for an resolver and we did so,
+ by adding dependencies to help the resolver understand the problem, but
+ sometimes it is needed to identify these to ignore them… */
+ inline bool IsMultiArchImplicit() const APT_PURE {
+ return (S2->CompareOp & pkgCache::Dep::MultiArchImplicit) == pkgCache::Dep::MultiArchImplicit;
+ }
+ /* This covers additionally negative dependencies, which aren't arch-specific,
+ but change architecture nontheless as a Conflicts: foo does applies for all archs */
+ bool IsImplicit() const APT_PURE;
+
bool IsSatisfied(VerIterator const &Ver) const APT_PURE;
bool IsSatisfied(PrvIterator const &Prv) const APT_PURE;
void GlobOr(DepIterator &Start,DepIterator &End);
Version **AllTargets() const;
bool SmartTargetPkg(PkgIterator &Result) const;
- inline const char *CompType() const {return Owner->CompType(S->CompareOp);}
- inline const char *DepType() const {return Owner->DepType(S->Type);}
+ inline const char *CompType() const {return Owner->CompType(S2->CompareOp);}
+ inline const char *DepType() const {return Owner->DepType(S2->Type);}
+
+ // overrides because we are special
+ struct DependencyProxy
+ {
+ map_stringitem_t &Version;
+ map_pointer_t &Package;
+ map_id_t &ID;
+ unsigned char &Type;
+ unsigned char &CompareOp;
+ map_pointer_t &ParentVer;
+ map_pointer_t &DependencyData;
+ map_pointer_t &NextRevDepends;
+ map_pointer_t &NextDepends;
+ map_pointer_t &NextData;
+ DependencyProxy const * operator->() const { return this; }
+ DependencyProxy * operator->() { return this; }
+ };
+ inline DependencyProxy operator->() const {return (DependencyProxy) { S2->Version, S2->Package, S->ID, S2->Type, S2->CompareOp, S->ParentVer, S->DependencyData, S->NextRevDepends, S->NextDepends, S2->NextData };}
+ inline DependencyProxy operator->() {return (DependencyProxy) { S2->Version, S2->Package, S->ID, S2->Type, S2->CompareOp, S->ParentVer, S->DependencyData, S->NextRevDepends, S->NextDepends, S2->NextData };}
+ void ReMap(void const * const oldMap, void const * const newMap)
+ {
+ Iterator<Dependency, DepIterator>::ReMap(oldMap, newMap);
+ if (Owner == 0 || S == 0 || S2 == 0)
+ return;
+ S2 += (DependencyData const * const)(newMap) - (DependencyData const * const)(oldMap);
+ }
//Nice printable representation
friend std::ostream& operator <<(std::ostream& out, DepIterator D);
inline DepIterator(pkgCache &Owner, Dependency *Trg, Version* = 0) :
- Iterator<Dependency, DepIterator>(Owner, Trg), Type(DepVer) {
+ Iterator<Dependency, DepIterator>(Owner, Trg), Type(DepVer), S2(Trg == 0 ? Owner.DepDataP : (Owner.DepDataP + Trg->DependencyData)) {
if (S == 0)
S = Owner.DepP;
}
inline DepIterator(pkgCache &Owner, Dependency *Trg, Package*) :
- Iterator<Dependency, DepIterator>(Owner, Trg), Type(DepRev) {
+ Iterator<Dependency, DepIterator>(Owner, Trg), Type(DepRev), S2(Trg == 0 ? Owner.DepDataP : (Owner.DepDataP + Trg->DependencyData)) {
if (S == 0)
S = Owner.DepP;
}
- inline DepIterator() : Iterator<Dependency, DepIterator>(), Type(DepVer) {}
+ inline DepIterator() : Iterator<Dependency, DepIterator>(), Type(DepVer), S2(0) {}
};
/*}}}*/
// Provides iterator /*{{{*/
class pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> {
enum {PrvVer, PrvPkg} Type;
- protected:
+ public:
inline Provides* OwnerPointer() const {
return (Owner != 0) ? Owner->ProvideP : 0;
}
- public:
// Iteration
- void operator ++(int) {if (S != Owner->ProvideP) S = Owner->ProvideP +
- (Type == PrvVer?S->NextPkgProv:S->NextProvides);}
- inline void operator ++() {operator ++(0);}
+ inline PrvIterator& operator ++() {if (S != Owner->ProvideP) S = Owner->ProvideP +
+ (Type == PrvVer?S->NextPkgProv:S->NextProvides); return *this;}
+ inline PrvIterator operator++(int) { PrvIterator const tmp(*this); operator++(); return tmp; }
// Accessors
inline const char *Name() const {return ParentPkg().Name();}
@@ -352,7 +372,12 @@ class pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> {
inline VerIterator OwnerVer() const {return VerIterator(*Owner,Owner->VerP + S->Version);}
inline PkgIterator OwnerPkg() const {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[S->Version].ParentPkg);}
- bool IsMultiArchImplicit() const APT_PURE;
+ /* MultiArch can be translated to SingleArch for an resolver and we did so,
+ by adding provides to help the resolver understand the problem, but
+ sometimes it is needed to identify these to ignore them… */
+ bool IsMultiArchImplicit() const APT_PURE
+ { return (S->Flags & pkgCache::Flag::MultiArchImplicit) == pkgCache::Flag::MultiArchImplicit; }
+
inline PrvIterator() : Iterator<Provides, PrvIterator>(), Type(PrvVer) {}
inline PrvIterator(pkgCache &Owner, Provides *Trg, Version*) :
@@ -367,27 +392,59 @@ class pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> {
}
};
/*}}}*/
-// Package file /*{{{*/
-class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator> {
- protected:
- inline PackageFile* OwnerPointer() const {
- return (Owner != 0) ? Owner->PkgFileP : 0;
+// Release file /*{{{*/
+class pkgCache::RlsFileIterator : public Iterator<ReleaseFile, RlsFileIterator> {
+ public:
+ inline ReleaseFile* OwnerPointer() const {
+ return (Owner != 0) ? Owner->RlsFileP : 0;
}
- public:
// Iteration
- void operator ++(int) {if (S != Owner->PkgFileP) S = Owner->PkgFileP + S->NextFile;}
- inline void operator ++() {operator ++(0);}
+ inline RlsFileIterator& operator++() {if (S != Owner->RlsFileP) S = Owner->RlsFileP + S->NextFile;return *this;}
+ inline RlsFileIterator operator++(int) { RlsFileIterator const tmp(*this); operator++(); return tmp; }
// Accessors
inline const char *FileName() const {return S->FileName == 0?0:Owner->StrP + S->FileName;}
inline const char *Archive() const {return S->Archive == 0?0:Owner->StrP + S->Archive;}
- inline const char *Component() const {return S->Component == 0?0:Owner->StrP + S->Component;}
inline const char *Version() const {return S->Version == 0?0:Owner->StrP + S->Version;}
inline const char *Origin() const {return S->Origin == 0?0:Owner->StrP + S->Origin;}
inline const char *Codename() const {return S->Codename ==0?0:Owner->StrP + S->Codename;}
inline const char *Label() const {return S->Label == 0?0:Owner->StrP + S->Label;}
inline const char *Site() const {return S->Site == 0?0:Owner->StrP + S->Site;}
+ inline bool Flagged(pkgCache::Flag::ReleaseFileFlags const flag) const {return (S->Flags & flag) == flag; }
+
+ bool IsOk();
+ std::string RelStr();
+
+ // Constructors
+ inline RlsFileIterator() : Iterator<ReleaseFile, RlsFileIterator>() {}
+ explicit inline RlsFileIterator(pkgCache &Owner) : Iterator<ReleaseFile, RlsFileIterator>(Owner, Owner.RlsFileP) {}
+ inline RlsFileIterator(pkgCache &Owner,ReleaseFile *Trg) : Iterator<ReleaseFile, RlsFileIterator>(Owner, Trg) {}
+};
+ /*}}}*/
+// Package file /*{{{*/
+class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator> {
+ public:
+ inline PackageFile* OwnerPointer() const {
+ return (Owner != 0) ? Owner->PkgFileP : 0;
+ }
+
+ // Iteration
+ inline PkgFileIterator& operator++() {if (S != Owner->PkgFileP) S = Owner->PkgFileP + S->NextFile; return *this;}
+ inline PkgFileIterator operator++(int) { PkgFileIterator const tmp(*this); operator++(); return tmp; }
+
+ // Accessors
+ inline const char *FileName() const {return S->FileName == 0?0:Owner->StrP + S->FileName;}
+ inline pkgCache::RlsFileIterator ReleaseFile() const {return RlsFileIterator(*Owner, Owner->RlsFileP + S->Release);}
+ inline const char *Archive() const {return S->Release == 0 ? Component() : ReleaseFile().Archive();}
+ inline const char *Version() const {return S->Release == 0 ? NULL : ReleaseFile().Version();}
+ inline const char *Origin() const {return S->Release == 0 ? NULL : ReleaseFile().Origin();}
+ inline const char *Codename() const {return S->Release == 0 ? NULL : ReleaseFile().Codename();}
+ inline const char *Label() const {return S->Release == 0 ? NULL : ReleaseFile().Label();}
+ inline const char *Site() const {return S->Release == 0 ? NULL : ReleaseFile().Site();}
+ inline bool Flagged(pkgCache::Flag::ReleaseFileFlags const flag) const {return S->Release== 0 ? false : ReleaseFile().Flagged(flag);}
+ inline bool Flagged(pkgCache::Flag::PkgFFlags const flag) const {return (S->Flags & flag) == flag;}
+ inline const char *Component() const {return S->Component == 0?0:Owner->StrP + S->Component;}
inline const char *Architecture() const {return S->Architecture == 0?0:Owner->StrP + S->Architecture;}
inline const char *IndexType() const {return S->IndexType == 0?0:Owner->StrP + S->IndexType;}
@@ -396,21 +453,20 @@ class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator>
// Constructors
inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {}
- inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgFileIterator>(Owner, Owner.PkgFileP) {}
+ explicit inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgFileIterator>(Owner, Owner.PkgFileP) {}
inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator<PackageFile, PkgFileIterator>(Owner, Trg) {}
};
/*}}}*/
// Version File /*{{{*/
class pkgCache::VerFileIterator : public pkgCache::Iterator<VerFile, VerFileIterator> {
- protected:
+ public:
inline VerFile* OwnerPointer() const {
return (Owner != 0) ? Owner->VerFileP : 0;
}
- public:
// Iteration
- void operator ++(int) {if (S != Owner->VerFileP) S = Owner->VerFileP + S->NextFile;}
- inline void operator ++() {operator ++(0);}
+ inline VerFileIterator& operator++() {if (S != Owner->VerFileP) S = Owner->VerFileP + S->NextFile; return *this;}
+ inline VerFileIterator operator++(int) { VerFileIterator const tmp(*this); operator++(); return tmp; }
// Accessors
inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S->File + Owner->PkgFileP);}
@@ -421,15 +477,14 @@ class pkgCache::VerFileIterator : public pkgCache::Iterator<VerFile, VerFileIter
/*}}}*/
// Description File /*{{{*/
class pkgCache::DescFileIterator : public Iterator<DescFile, DescFileIterator> {
- protected:
+ public:
inline DescFile* OwnerPointer() const {
return (Owner != 0) ? Owner->DescFileP : 0;
}
- public:
// Iteration
- void operator ++(int) {if (S != Owner->DescFileP) S = Owner->DescFileP + S->NextFile;}
- inline void operator ++() {operator ++(0);}
+ inline DescFileIterator& operator++() {if (S != Owner->DescFileP) S = Owner->DescFileP + S->NextFile; return *this;}
+ inline DescFileIterator operator++(int) { DescFileIterator const tmp(*this); operator++(); return tmp; }
// Accessors
inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S->File + Owner->PkgFileP);}
@@ -459,5 +514,7 @@ inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const
{return VerFileIterator(*Owner,Owner->VerFileP + S->FileList);}
inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const
{return DescFileIterator(*Owner,Owner->DescFileP + S->FileList);}
+APT_DEPRECATED inline const char * pkgCache::PkgIterator::Section() const
+ {return S->VersionList == 0 ? 0 : VersionList().Section();}
/*}}}*/
#endif
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 0ad99713a..af607a197 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -37,7 +37,6 @@
#include <apti18n.h>
/*}}}*/
namespace APT {
-
// PackageFrom - selecting the appropriate method for package selection /*{{{*/
bool CacheSetHelper::PackageFrom(enum PkgSelector const select, PackageContainerInterface * const pci,
pkgCacheFile &Cache, std::string const &pattern) {
@@ -583,6 +582,116 @@ bool VersionContainerInterface::FromPackage(VersionContainerInterface * const vc
return found;
}
/*}}}*/
+// FromDependency - versions satisfying a given dependency /*{{{*/
+bool VersionContainerInterface::FromDependency(VersionContainerInterface * const vci,
+ pkgCacheFile &Cache,
+ pkgCache::DepIterator const &D,
+ CacheSetHelper::VerSelector const selector,
+ CacheSetHelper &helper)
+{
+ bool found = false;
+ switch(selector) {
+ case CacheSetHelper::ALL:
+ {
+ pkgCache::PkgIterator const T = D.TargetPkg();
+ for (pkgCache::VerIterator Ver = T.VersionList(); Ver.end() == false; ++Ver)
+ {
+ if (D.IsSatisfied(Ver) == true)
+ {
+ vci->insert(Ver);
+ found = true;
+ }
+ for (pkgCache::PrvIterator Prv = T.ProvidesList(); Prv.end() != true; ++Prv)
+ {
+ pkgCache::VerIterator const V = Prv.OwnerVer();
+ if (unlikely(V.end() == true) || D.IsSatisfied(Prv) == false)
+ continue;
+ vci->insert(V);
+ found = true;
+ }
+ }
+ return found;
+ }
+ case CacheSetHelper::CANDANDINST:
+ {
+ found = FromDependency(vci, Cache, D, CacheSetHelper::CANDIDATE, helper);
+ found &= FromDependency(vci, Cache, D, CacheSetHelper::INSTALLED, helper);
+ return found;
+ }
+ case CacheSetHelper::CANDIDATE:
+ {
+ pkgCache::PkgIterator const T = D.TargetPkg();
+ pkgCache::VerIterator const Cand = Cache[T].CandidateVerIter(Cache);
+ if (Cand.end() == false && D.IsSatisfied(Cand) == true)
+ {
+ vci->insert(Cand);
+ found = true;
+ }
+ for (pkgCache::PrvIterator Prv = T.ProvidesList(); Prv.end() != true; ++Prv)
+ {
+ pkgCache::VerIterator const V = Prv.OwnerVer();
+ pkgCache::VerIterator const Cand = Cache[Prv.OwnerPkg()].CandidateVerIter(Cache);
+ if (Cand.end() == true || V != Cand || D.IsSatisfied(Prv) == false)
+ continue;
+ vci->insert(Cand);
+ found = true;
+ }
+ return found;
+ }
+ case CacheSetHelper::INSTALLED:
+ {
+ pkgCache::PkgIterator const T = D.TargetPkg();
+ pkgCache::VerIterator const Cand = T.CurrentVer();
+ if (Cand.end() == false && D.IsSatisfied(Cand) == true)
+ {
+ vci->insert(Cand);
+ found = true;
+ }
+ for (pkgCache::PrvIterator Prv = T.ProvidesList(); Prv.end() != true; ++Prv)
+ {
+ pkgCache::VerIterator const V = Prv.OwnerVer();
+ pkgCache::VerIterator const Cand = Prv.OwnerPkg().CurrentVer();
+ if (Cand.end() == true || V != Cand || D.IsSatisfied(Prv) == false)
+ continue;
+ vci->insert(Cand);
+ found = true;
+ }
+ return found;
+ }
+ case CacheSetHelper::CANDINST:
+ return FromDependency(vci, Cache, D, CacheSetHelper::CANDIDATE, helper) ||
+ FromDependency(vci, Cache, D, CacheSetHelper::INSTALLED, helper);
+ case CacheSetHelper::INSTCAND:
+ return FromDependency(vci, Cache, D, CacheSetHelper::INSTALLED, helper) ||
+ FromDependency(vci, Cache, D, CacheSetHelper::CANDIDATE, helper);
+ case CacheSetHelper::NEWEST:
+ {
+ pkgCache::PkgIterator const T = D.TargetPkg();
+ pkgCache::VerIterator const Cand = T.VersionList();
+ if (Cand.end() == false && D.IsSatisfied(Cand) == true)
+ {
+ vci->insert(Cand);
+ found = true;
+ }
+ for (pkgCache::PrvIterator Prv = T.ProvidesList(); Prv.end() != true; ++Prv)
+ {
+ pkgCache::VerIterator const V = Prv.OwnerVer();
+ pkgCache::VerIterator const Cand = Prv.OwnerPkg().VersionList();
+ if (Cand.end() == true || V != Cand || D.IsSatisfied(Prv) == false)
+ continue;
+ vci->insert(Cand);
+ found = true;
+ }
+ return found;
+ }
+ case CacheSetHelper::RELEASE:
+ case CacheSetHelper::VERSIONNUMBER:
+ // both make no sense here, so always false
+ return false;
+ }
+ return found;
+}
+ /*}}}*/
// getCandidateVer - Returns the candidate version of the given package /*{{{*/
pkgCache::VerIterator VersionContainerInterface::getCandidateVer(pkgCacheFile &Cache,
pkgCache::PkgIterator const &Pkg, CacheSetHelper &helper) {
@@ -812,4 +921,28 @@ APT_CONST void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const &
bool const /*verIsRel*/) {
}
/*}}}*/
+
+CacheSetHelper::CacheSetHelper(bool const ShowError, GlobalError::MsgType ErrorType) :
+ ShowError(ShowError), ErrorType(ErrorType), d(NULL) {}
+CacheSetHelper::~CacheSetHelper() {}
+
+PackageContainerInterface::PackageContainerInterface() : ConstructedBy(CacheSetHelper::UNKNOWN), d(NULL) {}
+PackageContainerInterface::PackageContainerInterface(CacheSetHelper::PkgSelector const by) : ConstructedBy(by), d(NULL) {}
+PackageContainerInterface& PackageContainerInterface::operator=(PackageContainerInterface const &other) {
+ if (this != &other)
+ this->ConstructedBy = other.ConstructedBy;
+ return *this;
+}
+PackageContainerInterface::~PackageContainerInterface() {}
+
+PackageUniverse::PackageUniverse(pkgCache * const Owner) : _cont(Owner), d(NULL) {}
+PackageUniverse::PackageUniverse(pkgCacheFile * const Owner) : _cont(Owner->GetPkgCache()), d(NULL) {}
+PackageUniverse::~PackageUniverse() {}
+
+VersionContainerInterface::VersionContainerInterface() : d(NULL) {}
+VersionContainerInterface& VersionContainerInterface::operator=(VersionContainerInterface const &) {
+ return *this;
+}
+
+VersionContainerInterface::~VersionContainerInterface() {}
}
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index 97aee8c2d..7c03ad97a 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -12,7 +12,12 @@
#include <fstream>
#include <map>
#include <set>
+#if __cplusplus >= 201103L
+#include <unordered_set>
+#include <forward_list>
+#endif
#include <list>
+#include <deque>
#include <vector>
#include <string>
#include <iterator>
@@ -50,9 +55,8 @@ class CacheSetHelper { /*{{{*/
*/
public: /*{{{*/
CacheSetHelper(bool const ShowError = true,
- GlobalError::MsgType ErrorType = GlobalError::ERROR) :
- ShowError(ShowError), ErrorType(ErrorType) {}
- virtual ~CacheSetHelper() {}
+ GlobalError::MsgType ErrorType = GlobalError::ERROR);
+ virtual ~CacheSetHelper();
enum PkgSelector { UNKNOWN, REGEX, TASK, FNMATCH, PACKAGENAME, STRING };
@@ -203,8 +207,92 @@ protected:
bool PackageFromFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
bool PackageFromPackageName(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
bool PackageFromString(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &pattern);
+private:
+ void * const d;
}; /*}}}*/
+// Iterator templates for our Containers /*{{{*/
+template<typename Interface, typename Master, typename iterator_type, typename container_iterator, typename container_value> class Container_iterator_base :
+ public std::iterator<typename std::iterator_traits<container_iterator>::iterator_category, container_iterator>,
+ public Interface::template iterator_base<iterator_type>
+{
+protected:
+ container_iterator _iter;
+public:
+ explicit Container_iterator_base(container_iterator i) : _iter(i) {}
+ inline container_value operator*(void) const { return static_cast<iterator_type const*>(this)->getType(); };
+ operator container_iterator(void) const { return _iter; }
+ inline iterator_type& operator++() { ++_iter; return static_cast<iterator_type&>(*this); }
+ inline iterator_type operator++(int) { iterator_type tmp(*this); operator++(); return tmp; }
+ inline iterator_type operator+(typename container_iterator::difference_type const &n) { return iterator_type(_iter + n); }
+ inline iterator_type operator+=(typename container_iterator::difference_type const &n) { _iter += n; return static_cast<iterator_type&>(*this); }
+ inline iterator_type& operator--() { --_iter;; return static_cast<iterator_type&>(*this); }
+ inline iterator_type operator--(int) { iterator_type tmp(*this); operator--(); return tmp; }
+ inline iterator_type operator-(typename container_iterator::difference_type const &n) { return iterator_type(_iter - n); }
+ inline iterator_type operator-=(typename container_iterator::difference_type const &n) { _iter -= n; return static_cast<iterator_type&>(*this); }
+ inline bool operator!=(iterator_type const &i) const { return _iter != i._iter; }
+ inline bool operator==(iterator_type const &i) const { return _iter == i._iter; }
+ inline bool operator<(iterator_type const &i) const { return _iter < i._iter; }
+ inline bool operator>(iterator_type const &i) const { return _iter > i._iter; }
+ inline bool operator<=(iterator_type const &i) const { return _iter <= i._iter; }
+ inline bool operator>=(iterator_type const &i) const { return _iter >= i._iter; }
+ inline typename container_iterator::reference operator[](typename container_iterator::difference_type const &n) const { return _iter[n]; }
+
+ friend std::ostream& operator<<(std::ostream& out, iterator_type i) { return operator<<(out, *i); }
+ friend Master;
+};
+template<class Interface, class Container, class Master> class Container_const_iterator :
+ public Container_iterator_base<Interface, Master, Container_const_iterator<Interface, Container, Master>, typename Container::const_iterator, typename Container::value_type>
+{
+ typedef Container_const_iterator<Interface, Container, Master> iterator_type;
+ typedef typename Container::const_iterator container_iterator;
+public:
+ explicit Container_const_iterator(container_iterator i) :
+ Container_iterator_base<Interface, Master, iterator_type, container_iterator, typename Container::value_type>(i) {}
+
+ inline typename Container::value_type getType(void) const { return *this->_iter; }
+};
+template<class Interface, class Container, class Master> class Container_iterator :
+ public Container_iterator_base<Interface, Master, Container_iterator<Interface, Container, Master>, typename Container::iterator, typename Container::value_type>
+{
+ typedef Container_iterator<Interface, Container, Master> iterator_type;
+ typedef typename Container::iterator container_iterator;
+public:
+ explicit Container_iterator(container_iterator i) :
+ Container_iterator_base<Interface, Master, iterator_type, container_iterator, typename Container::value_type>(i) {}
+
+ operator typename Master::const_iterator() { return typename Master::const_iterator(this->_iter); }
+ inline iterator_type& operator=(iterator_type const &i) { this->_iter = i._iter; return static_cast<iterator_type&>(*this); }
+ inline iterator_type& operator=(container_iterator const &i) { this->_iter = i; return static_cast<iterator_type&>(*this); }
+
+ inline typename Container::value_type getType(void) const { return *this->_iter; }
+};
+template<class Interface, class Container, class Master> class Container_const_reverse_iterator :
+ public Container_iterator_base<Interface, Master, Container_const_reverse_iterator<Interface, Container, Master>, typename Container::const_reverse_iterator, typename Container::value_type>
+{
+ typedef Container_const_reverse_iterator<Interface, Container, Master> iterator_type;
+ typedef typename Container::const_reverse_iterator container_iterator;
+public:
+ explicit Container_const_reverse_iterator(container_iterator i) :
+ Container_iterator_base<Interface, Master, iterator_type, container_iterator, typename Container::value_type>(i) {}
+
+ inline typename Container::value_type getType(void) const { return *this->_iter; }
+};
+template<class Interface, class Container, class Master> class Container_reverse_iterator :
+ public Container_iterator_base<Interface, Master, Container_reverse_iterator<Interface, Container, Master>, typename Container::reverse_iterator, typename Container::value_type>
+{
+ typedef Container_reverse_iterator<Interface, Container, Master> iterator_type;
+ typedef typename Container::reverse_iterator container_iterator;
+public:
+ explicit Container_reverse_iterator(container_iterator i) :
+ Container_iterator_base<Interface, Master, iterator_type, container_iterator, typename Container::value_type>(i) {}
+
+ operator typename Master::const_iterator() { return typename Master::const_iterator(this->_iter); }
+ inline iterator_type& operator=(iterator_type const &i) { this->_iter = i._iter; return static_cast<iterator_type&>(*this); }
+ inline iterator_type& operator=(container_iterator const &i) { this->_iter = i; return static_cast<iterator_type&>(*this); }
+ inline typename Container::value_type getType(void) const { return *this->_iter; }
+};
+ /*}}}*/
class PackageContainerInterface { /*{{{*/
/** \class PackageContainerInterface
@@ -216,41 +304,42 @@ class PackageContainerInterface { /*{{{*/
* This class mostly protects use from the need to write all implementation
* of the methods working on containers in the template */
public:
- class const_iterator { /*{{{*/
+ template<class Itr> class iterator_base { /*{{{*/
+ pkgCache::PkgIterator getType() const { return static_cast<Itr const*>(this)->getType(); };
public:
- virtual pkgCache::PkgIterator getPkg() const = 0;
- operator pkgCache::PkgIterator(void) const { return getPkg(); }
+ operator pkgCache::PkgIterator(void) const { return getType(); }
- inline const char *Name() const {return getPkg().Name(); }
- inline std::string FullName(bool const Pretty) const { return getPkg().FullName(Pretty); }
- inline std::string FullName() const { return getPkg().FullName(); }
+ inline const char *Name() const {return getType().Name(); }
+ inline std::string FullName(bool const Pretty) const { return getType().FullName(Pretty); }
+ inline std::string FullName() const { return getType().FullName(); }
APT_DEPRECATED inline const char *Section() const {
APT_IGNORE_DEPRECATED_PUSH
- return getPkg().Section();
+ return getType().Section();
APT_IGNORE_DEPRECATED_POP
}
- inline bool Purge() const {return getPkg().Purge(); }
- inline const char *Arch() const {return getPkg().Arch(); }
- inline pkgCache::GrpIterator Group() const { return getPkg().Group(); }
- inline pkgCache::VerIterator VersionList() const { return getPkg().VersionList(); }
- inline pkgCache::VerIterator CurrentVer() const { return getPkg().CurrentVer(); }
- inline pkgCache::DepIterator RevDependsList() const { return getPkg().RevDependsList(); }
- inline pkgCache::PrvIterator ProvidesList() const { return getPkg().ProvidesList(); }
- inline pkgCache::PkgIterator::OkState State() const { return getPkg().State(); }
- inline const char *CandVersion() const { return getPkg().CandVersion(); }
- inline const char *CurVersion() const { return getPkg().CurVersion(); }
- inline pkgCache *Cache() const { return getPkg().Cache(); }
- inline unsigned long Index() const {return getPkg().Index();}
+ inline bool Purge() const {return getType().Purge(); }
+ inline const char *Arch() const {return getType().Arch(); }
+ inline pkgCache::GrpIterator Group() const { return getType().Group(); }
+ inline pkgCache::VerIterator VersionList() const { return getType().VersionList(); }
+ inline pkgCache::VerIterator CurrentVer() const { return getType().CurrentVer(); }
+ inline pkgCache::DepIterator RevDependsList() const { return getType().RevDependsList(); }
+ inline pkgCache::PrvIterator ProvidesList() const { return getType().ProvidesList(); }
+ inline pkgCache::PkgIterator::OkState State() const { return getType().State(); }
+ inline const char *CandVersion() const { return getType().CandVersion(); }
+ inline const char *CurVersion() const { return getType().CurVersion(); }
+ inline pkgCache *Cache() const { return getType().Cache(); }
+ inline unsigned long Index() const {return getType().Index();}
// we have only valid iterators here
inline bool end() const { return false; }
- inline pkgCache::Package const * operator->() const {return &*getPkg();}
+ inline pkgCache::Package const * operator->() const {return &*getType();}
};
/*}}}*/
virtual bool insert(pkgCache::PkgIterator const &P) = 0;
virtual bool empty() const = 0;
virtual void clear() = 0;
+ virtual size_t size() const = 0;
// FIXME: This is a bloody hack removed soon. Use CacheSetHelper::PkgSelector !
enum APT_DEPRECATED Constructor { UNKNOWN = CacheSetHelper::UNKNOWN,
@@ -263,8 +352,10 @@ APT_IGNORE_DEPRECATED_POP
void setConstructor(CacheSetHelper::PkgSelector const by) { ConstructedBy = by; }
CacheSetHelper::PkgSelector getConstructor() const { return ConstructedBy; }
- PackageContainerInterface() : ConstructedBy(CacheSetHelper::UNKNOWN) {}
- PackageContainerInterface(CacheSetHelper::PkgSelector const by) : ConstructedBy(by) {}
+ PackageContainerInterface();
+ explicit PackageContainerInterface(CacheSetHelper::PkgSelector const by);
+ PackageContainerInterface& operator=(PackageContainerInterface const &other);
+ virtual ~PackageContainerInterface();
APT_DEPRECATED static bool FromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
return helper.PackageFrom(CacheSetHelper::TASK, pci, Cache, pattern); }
@@ -292,6 +383,7 @@ APT_IGNORE_DEPRECATED_POP
private:
CacheSetHelper::PkgSelector ConstructedBy;
+ void * const d;
};
/*}}}*/
template<class Container> class PackageContainer : public PackageContainerInterface {/*{{{*/
@@ -303,60 +395,43 @@ template<class Container> class PackageContainer : public PackageContainerInterf
Container _cont;
public: /*{{{*/
/** \brief smell like a pkgCache::PkgIterator */
- class const_iterator : public PackageContainerInterface::const_iterator,/*{{{*/
- public std::iterator<std::forward_iterator_tag, typename Container::const_iterator> {
- typename Container::const_iterator _iter;
- public:
- const_iterator(typename Container::const_iterator i) : _iter(i) {}
- pkgCache::PkgIterator getPkg(void) const { return *_iter; }
- inline pkgCache::PkgIterator operator*(void) const { return *_iter; }
- operator typename Container::const_iterator(void) const { return _iter; }
- inline const_iterator& operator++() { ++_iter; return *this; }
- inline const_iterator operator++(int) { const_iterator tmp(*this); operator++(); return tmp; }
- inline bool operator!=(const_iterator const &i) const { return _iter != i._iter; }
- inline bool operator==(const_iterator const &i) const { return _iter == i._iter; }
- friend std::ostream& operator<<(std::ostream& out, const_iterator i) { return operator<<(out, *i); }
- };
- class iterator : public PackageContainerInterface::const_iterator,
- public std::iterator<std::forward_iterator_tag, typename Container::iterator> {
- typename Container::iterator _iter;
- public:
- iterator(typename Container::iterator i) : _iter(i) {}
- pkgCache::PkgIterator getPkg(void) const { return *_iter; }
- inline pkgCache::PkgIterator operator*(void) const { return *_iter; }
- operator typename Container::iterator(void) const { return _iter; }
- operator typename PackageContainer<Container>::const_iterator() { return typename PackageContainer<Container>::const_iterator(_iter); }
- inline iterator& operator++() { ++_iter; return *this; }
- inline iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; }
- inline bool operator!=(iterator const &i) const { return _iter != i._iter; }
- inline bool operator==(iterator const &i) const { return _iter == i._iter; }
- inline iterator& operator=(iterator const &i) { _iter = i._iter; return *this; }
- inline iterator& operator=(typename Container::iterator const &i) { _iter = i; return *this; }
- friend std::ostream& operator<<(std::ostream& out, iterator i) { return operator<<(out, *i); }
- };
- /*}}}*/
+ typedef Container_const_iterator<PackageContainerInterface, Container, PackageContainer> const_iterator;
+ typedef Container_iterator<PackageContainerInterface, Container, PackageContainer> iterator;
+ typedef Container_const_reverse_iterator<PackageContainerInterface, Container, PackageContainer> const_reverse_iterator;
+ typedef Container_reverse_iterator<PackageContainerInterface, Container, PackageContainer> reverse_iterator;
- bool insert(pkgCache::PkgIterator const &P) { if (P.end() == true) return false; _cont.insert(P); return true; }
+ bool insert(pkgCache::PkgIterator const &P) APT_OVERRIDE { if (P.end() == true) return false; _cont.insert(P); return true; }
template<class Cont> void insert(PackageContainer<Cont> const &pkgcont) { _cont.insert((typename Cont::const_iterator)pkgcont.begin(), (typename Cont::const_iterator)pkgcont.end()); }
void insert(const_iterator begin, const_iterator end) { _cont.insert(begin, end); }
- bool empty() const { return _cont.empty(); }
- void clear() { return _cont.clear(); }
- //FIXME: on ABI break, replace the first with the second without bool
- void erase(iterator position) { _cont.erase((typename Container::iterator)position); }
- iterator& erase(iterator &position, bool) { return position = _cont.erase((typename Container::iterator)position); }
- size_t erase(const pkgCache::PkgIterator x) { return _cont.erase(x); }
- void erase(iterator first, iterator last) { _cont.erase(first, last); }
- size_t size() const { return _cont.size(); }
-
+ bool empty() const APT_OVERRIDE { return _cont.empty(); }
+ void clear() APT_OVERRIDE { return _cont.clear(); }
+ size_t size() const APT_OVERRIDE { return _cont.size(); }
+#if __GNUC__ >= 5 || (__GNUC_MINOR__ >= 9 && __GNUC__ >= 4)
+ iterator erase( const_iterator pos ) { return iterator(_cont.erase(pos._iter)); }
+ iterator erase( const_iterator first, const_iterator last ) { return iterator(_cont.erase(first._iter, last._iter)); }
+#else
+ iterator erase( iterator pos ) { return iterator(_cont.erase(pos._iter)); }
+ iterator erase( iterator first, iterator last ) { return iterator(_cont.erase(first._iter, last._iter)); }
+#endif
const_iterator begin() const { return const_iterator(_cont.begin()); }
const_iterator end() const { return const_iterator(_cont.end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(_cont.rbegin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(_cont.rend()); }
+#if __cplusplus >= 201103L
+ const_iterator cbegin() const { return const_iterator(_cont.cbegin()); }
+ const_iterator cend() const { return const_iterator(_cont.cend()); }
+ const_reverse_iterator crbegin() const { return const_reverse_iterator(_cont.crbegin()); }
+ const_reverse_iterator crend() const { return const_reverse_iterator(_cont.crend()); }
+#endif
iterator begin() { return iterator(_cont.begin()); }
iterator end() { return iterator(_cont.end()); }
+ reverse_iterator rbegin() { return reverse_iterator(_cont.rbegin()); }
+ reverse_iterator rend() { return reverse_iterator(_cont.rend()); }
const_iterator find(pkgCache::PkgIterator const &P) const { return const_iterator(_cont.find(P)); }
- PackageContainer() : PackageContainerInterface() {}
- PackageContainer(CacheSetHelper::PkgSelector const &by) : PackageContainerInterface(by) {}
+ PackageContainer() : PackageContainerInterface(CacheSetHelper::UNKNOWN) {}
+ explicit PackageContainer(CacheSetHelper::PkgSelector const &by) : PackageContainerInterface(by) {}
APT_IGNORE_DEPRECATED_PUSH
APT_DEPRECATED PackageContainer(Constructor const &by) : PackageContainerInterface((CacheSetHelper::PkgSelector)by) {}
APT_IGNORE_DEPRECATED_POP
@@ -504,16 +579,26 @@ APT_IGNORE_DEPRECATED_POP
}
/*}}}*/
}; /*}}}*/
-// specialisations for push_back containers: std::list & std::vector /*{{{*/
+// various specialisations for PackageContainer /*{{{*/
template<> template<class Cont> void PackageContainer<std::list<pkgCache::PkgIterator> >::insert(PackageContainer<Cont> const &pkgcont) {
for (typename PackageContainer<Cont>::const_iterator p = pkgcont.begin(); p != pkgcont.end(); ++p)
_cont.push_back(*p);
}
+#if __cplusplus >= 201103L
+template<> template<class Cont> void PackageContainer<std::forward_list<pkgCache::PkgIterator> >::insert(PackageContainer<Cont> const &pkgcont) {
+ for (typename PackageContainer<Cont>::const_iterator p = pkgcont.begin(); p != pkgcont.end(); ++p)
+ _cont.push_front(*p);
+}
+#endif
+template<> template<class Cont> void PackageContainer<std::deque<pkgCache::PkgIterator> >::insert(PackageContainer<Cont> const &pkgcont) {
+ for (typename PackageContainer<Cont>::const_iterator p = pkgcont.begin(); p != pkgcont.end(); ++p)
+ _cont.push_back(*p);
+}
template<> template<class Cont> void PackageContainer<std::vector<pkgCache::PkgIterator> >::insert(PackageContainer<Cont> const &pkgcont) {
for (typename PackageContainer<Cont>::const_iterator p = pkgcont.begin(); p != pkgcont.end(); ++p)
_cont.push_back(*p);
}
-// these two are 'inline' as otherwise the linker has problems with seeing these untemplated
+// these are 'inline' as otherwise the linker has problems with seeing these untemplated
// specializations again and again - but we need to see them, so that library users can use them
template<> inline bool PackageContainer<std::list<pkgCache::PkgIterator> >::insert(pkgCache::PkgIterator const &P) {
if (P.end() == true)
@@ -521,6 +606,20 @@ template<> inline bool PackageContainer<std::list<pkgCache::PkgIterator> >::inse
_cont.push_back(P);
return true;
}
+#if __cplusplus >= 201103L
+template<> inline bool PackageContainer<std::forward_list<pkgCache::PkgIterator> >::insert(pkgCache::PkgIterator const &P) {
+ if (P.end() == true)
+ return false;
+ _cont.push_front(P);
+ return true;
+}
+#endif
+template<> inline bool PackageContainer<std::deque<pkgCache::PkgIterator> >::insert(pkgCache::PkgIterator const &P) {
+ if (P.end() == true)
+ return false;
+ _cont.push_back(P);
+ return true;
+}
template<> inline bool PackageContainer<std::vector<pkgCache::PkgIterator> >::insert(pkgCache::PkgIterator const &P) {
if (P.end() == true)
return false;
@@ -531,16 +630,49 @@ template<> inline void PackageContainer<std::list<pkgCache::PkgIterator> >::inse
for (const_iterator p = begin; p != end; ++p)
_cont.push_back(*p);
}
+#if __cplusplus >= 201103L
+template<> inline void PackageContainer<std::forward_list<pkgCache::PkgIterator> >::insert(const_iterator begin, const_iterator end) {
+ for (const_iterator p = begin; p != end; ++p)
+ _cont.push_front(*p);
+}
+#endif
+template<> inline void PackageContainer<std::deque<pkgCache::PkgIterator> >::insert(const_iterator begin, const_iterator end) {
+ for (const_iterator p = begin; p != end; ++p)
+ _cont.push_back(*p);
+}
template<> inline void PackageContainer<std::vector<pkgCache::PkgIterator> >::insert(const_iterator begin, const_iterator end) {
for (const_iterator p = begin; p != end; ++p)
_cont.push_back(*p);
}
- /*}}}*/
-
+#if __cplusplus < 201103L
+template<> inline PackageContainer<std::set<pkgCache::PkgIterator> >::iterator PackageContainer<std::set<pkgCache::PkgIterator> >::erase(iterator i) {
+ _cont.erase(i._iter);
+ return end();
+}
+template<> inline PackageContainer<std::set<pkgCache::PkgIterator> >::iterator PackageContainer<std::set<pkgCache::PkgIterator> >::erase(iterator first, iterator last) {
+ _cont.erase(first, last);
+ return end();
+}
+#endif
template<> template<class Compare> inline bool PackageContainer<std::vector<pkgCache::PkgIterator> >::sort(Compare Comp) {
std::sort(_cont.begin(), _cont.end(), Comp);
return true;
}
+template<> template<class Compare> inline bool PackageContainer<std::list<pkgCache::PkgIterator> >::sort(Compare Comp) {
+ _cont.sort(Comp);
+ return true;
+}
+#if __cplusplus >= 201103L
+template<> template<class Compare> inline bool PackageContainer<std::forward_list<pkgCache::PkgIterator> >::sort(Compare Comp) {
+ _cont.sort(Comp);
+ return true;
+}
+#endif
+template<> template<class Compare> inline bool PackageContainer<std::deque<pkgCache::PkgIterator> >::sort(Compare Comp) {
+ std::sort(_cont.begin(), _cont.end(), Comp);
+ return true;
+}
+ /*}}}*/
// class PackageUniverse - pkgCache as PackageContainerInterface /*{{{*/
/** \class PackageUniverse
@@ -550,35 +682,53 @@ template<> template<class Compare> inline bool PackageContainer<std::vector<pkgC
The wrapping is read-only in practice modeled by making erase and co
private methods. */
-class APT_HIDDEN PackageUniverse : public PackageContainerInterface {
+class APT_PUBLIC PackageUniverse : public PackageContainerInterface {
pkgCache * const _cont;
+ void * const d;
public:
- typedef pkgCache::PkgIterator iterator;
- typedef pkgCache::PkgIterator const_iterator;
+ class const_iterator : public APT::Container_iterator_base<APT::PackageContainerInterface, PackageUniverse, PackageUniverse::const_iterator, pkgCache::PkgIterator, pkgCache::PkgIterator>
+ {
+ public:
+ explicit const_iterator(pkgCache::PkgIterator i):
+ Container_iterator_base<APT::PackageContainerInterface, PackageUniverse, PackageUniverse::const_iterator, pkgCache::PkgIterator, pkgCache::PkgIterator>(i) {}
+
+ inline pkgCache::PkgIterator getType(void) const { return _iter; }
+ };
+ typedef const_iterator iterator;
- APT_PUBLIC bool empty() const { return false; }
- APT_PUBLIC size_t size() const { return _cont->Head().PackageCount; }
+ bool empty() const APT_OVERRIDE { return false; }
+ size_t size() const APT_OVERRIDE { return _cont->Head().PackageCount; }
- APT_PUBLIC const_iterator begin() const { return _cont->PkgBegin(); }
- APT_PUBLIC const_iterator end() const { return _cont->PkgEnd(); }
- APT_PUBLIC iterator begin() { return _cont->PkgBegin(); }
- APT_PUBLIC iterator end() { return _cont->PkgEnd(); }
+ const_iterator begin() const { return const_iterator(_cont->PkgBegin()); }
+ const_iterator end() const { return const_iterator(_cont->PkgEnd()); }
+ const_iterator cbegin() const { return const_iterator(_cont->PkgBegin()); }
+ const_iterator cend() const { return const_iterator(_cont->PkgEnd()); }
+ iterator begin() { return iterator(_cont->PkgBegin()); }
+ iterator end() { return iterator(_cont->PkgEnd()); }
- APT_PUBLIC PackageUniverse(pkgCache * const Owner) : _cont(Owner) { }
+ pkgCache * data() const { return _cont; }
+
+ explicit PackageUniverse(pkgCache * const Owner);
+ explicit PackageUniverse(pkgCacheFile * const Owner);
+ virtual ~PackageUniverse();
private:
- bool insert(pkgCache::PkgIterator const &) { return true; }
- template<class Cont> void insert(PackageContainer<Cont> const &) { }
- void insert(const_iterator, const_iterator) { }
-
- void clear() { }
- iterator& erase(iterator &iter) { return iter; }
- size_t erase(const pkgCache::PkgIterator) { return 0; }
- void erase(iterator, iterator) { }
+ APT_HIDDEN bool insert(pkgCache::PkgIterator const &) APT_OVERRIDE { return true; }
+ template<class Cont> APT_HIDDEN void insert(PackageContainer<Cont> const &) { }
+ APT_HIDDEN void insert(const_iterator, const_iterator) { }
+
+ APT_HIDDEN void clear() APT_OVERRIDE { }
+ APT_HIDDEN iterator erase( const_iterator pos );
+ APT_HIDDEN iterator erase( const_iterator first, const_iterator last );
};
/*}}}*/
typedef PackageContainer<std::set<pkgCache::PkgIterator> > PackageSet;
+#if __cplusplus >= 201103L
+typedef PackageContainer<std::unordered_set<pkgCache::PkgIterator> > PackageUnorderedSet;
+typedef PackageContainer<std::forward_list<pkgCache::PkgIterator> > PackageForwardList;
+#endif
typedef PackageContainer<std::list<pkgCache::PkgIterator> > PackageList;
+typedef PackageContainer<std::deque<pkgCache::PkgIterator> > PackageDeque;
typedef PackageContainer<std::vector<pkgCache::PkgIterator> > PackageVector;
class VersionContainerInterface { /*{{{*/
@@ -587,38 +737,39 @@ class VersionContainerInterface { /*{{{*/
Same as APT::PackageContainerInterface, just for Versions */
public:
/** \brief smell like a pkgCache::VerIterator */
- class const_iterator { /*{{{*/
+ template<class Itr> class iterator_base { /*{{{*/
+ pkgCache::VerIterator getType() const { return static_cast<Itr const*>(this)->getType(); };
public:
- virtual pkgCache::VerIterator getVer() const = 0;
- operator pkgCache::VerIterator(void) { return getVer(); }
-
- inline pkgCache *Cache() const { return getVer().Cache(); }
- inline unsigned long Index() const {return getVer().Index();}
- inline int CompareVer(const pkgCache::VerIterator &B) const { return getVer().CompareVer(B); }
- inline const char *VerStr() const { return getVer().VerStr(); }
- inline const char *Section() const { return getVer().Section(); }
- inline const char *Arch() const { return getVer().Arch(); }
- inline pkgCache::PkgIterator ParentPkg() const { return getVer().ParentPkg(); }
- inline pkgCache::DescIterator DescriptionList() const { return getVer().DescriptionList(); }
- inline pkgCache::DescIterator TranslatedDescription() const { return getVer().TranslatedDescription(); }
- inline pkgCache::DepIterator DependsList() const { return getVer().DependsList(); }
- inline pkgCache::PrvIterator ProvidesList() const { return getVer().ProvidesList(); }
- inline pkgCache::VerFileIterator FileList() const { return getVer().FileList(); }
- inline bool Downloadable() const { return getVer().Downloadable(); }
- inline const char *PriorityType() const { return getVer().PriorityType(); }
- inline std::string RelStr() const { return getVer().RelStr(); }
- inline bool Automatic() const { return getVer().Automatic(); }
- inline pkgCache::VerFileIterator NewestFile() const { return getVer().NewestFile(); }
+ operator pkgCache::VerIterator(void) { return getType(); }
+
+ inline pkgCache *Cache() const { return getType().Cache(); }
+ inline unsigned long Index() const {return getType().Index();}
+ inline int CompareVer(const pkgCache::VerIterator &B) const { return getType().CompareVer(B); }
+ inline const char *VerStr() const { return getType().VerStr(); }
+ inline const char *Section() const { return getType().Section(); }
+ inline const char *Arch() const { return getType().Arch(); }
+ inline pkgCache::PkgIterator ParentPkg() const { return getType().ParentPkg(); }
+ inline pkgCache::DescIterator DescriptionList() const { return getType().DescriptionList(); }
+ inline pkgCache::DescIterator TranslatedDescription() const { return getType().TranslatedDescription(); }
+ inline pkgCache::DepIterator DependsList() const { return getType().DependsList(); }
+ inline pkgCache::PrvIterator ProvidesList() const { return getType().ProvidesList(); }
+ inline pkgCache::VerFileIterator FileList() const { return getType().FileList(); }
+ inline bool Downloadable() const { return getType().Downloadable(); }
+ inline const char *PriorityType() const { return getType().PriorityType(); }
+ inline std::string RelStr() const { return getType().RelStr(); }
+ inline bool Automatic() const { return getType().Automatic(); }
+ inline pkgCache::VerFileIterator NewestFile() const { return getType().NewestFile(); }
// we have only valid iterators here
inline bool end() const { return false; }
- inline pkgCache::Version const * operator->() const { return &*getVer(); }
+ inline pkgCache::Version const * operator->() const { return &*getType(); }
};
/*}}}*/
virtual bool insert(pkgCache::VerIterator const &V) = 0;
virtual bool empty() const = 0;
virtual void clear() = 0;
+ virtual size_t size() const = 0;
/** \brief specifies which version(s) will be returned if non is given */
enum APT_DEPRECATED Version {
@@ -701,6 +852,12 @@ APT_IGNORE_DEPRECATED_PUSH
}
APT_IGNORE_DEPRECATED_POP
+ VersionContainerInterface();
+ VersionContainerInterface& operator=(VersionContainerInterface const &other);
+ virtual ~VersionContainerInterface();
+private:
+ void * const d;
+
protected: /*{{{*/
/** \brief returns the candidate version of the package
@@ -729,56 +886,38 @@ template<class Container> class VersionContainer : public VersionContainerInterf
pkgCache. */
Container _cont;
public: /*{{{*/
- /** \brief smell like a pkgCache::VerIterator */
- class const_iterator : public VersionContainerInterface::const_iterator,
- public std::iterator<std::forward_iterator_tag, typename Container::const_iterator> {/*{{{*/
- typename Container::const_iterator _iter;
- public:
- const_iterator(typename Container::const_iterator i) : _iter(i) {}
- pkgCache::VerIterator getVer(void) const { return *_iter; }
- inline pkgCache::VerIterator operator*(void) const { return *_iter; }
- operator typename Container::const_iterator(void) const { return _iter; }
- inline const_iterator& operator++() { ++_iter; return *this; }
- inline const_iterator operator++(int) { const_iterator tmp(*this); operator++(); return tmp; }
- inline bool operator!=(const_iterator const &i) const { return _iter != i._iter; }
- inline bool operator==(const_iterator const &i) const { return _iter == i._iter; }
- friend std::ostream& operator<<(std::ostream& out, const_iterator i) { return operator<<(out, *i); }
- };
- class iterator : public VersionContainerInterface::const_iterator,
- public std::iterator<std::forward_iterator_tag, typename Container::iterator> {
- typename Container::iterator _iter;
- public:
- iterator(typename Container::iterator i) : _iter(i) {}
- pkgCache::VerIterator getVer(void) const { return *_iter; }
- inline pkgCache::VerIterator operator*(void) const { return *_iter; }
- operator typename Container::iterator(void) const { return _iter; }
- operator typename VersionContainer<Container>::const_iterator() { return typename VersionContainer<Container>::const_iterator(_iter); }
- inline iterator& operator++() { ++_iter; return *this; }
- inline iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; }
- inline bool operator!=(iterator const &i) const { return _iter != i._iter; }
- inline bool operator==(iterator const &i) const { return _iter == i._iter; }
- inline iterator& operator=(iterator const &i) { _iter = i._iter; return *this; }
- inline iterator& operator=(typename Container::iterator const &i) { _iter = i; return *this; }
- friend std::ostream& operator<<(std::ostream& out, iterator i) { return operator<<(out, *i); }
- };
- /*}}}*/
+ typedef Container_const_iterator<VersionContainerInterface, Container, VersionContainer> const_iterator;
+ typedef Container_iterator<VersionContainerInterface, Container, VersionContainer> iterator;
+ typedef Container_const_reverse_iterator<VersionContainerInterface, Container, VersionContainer> const_reverse_iterator;
+ typedef Container_reverse_iterator<VersionContainerInterface, Container, VersionContainer> reverse_iterator;
- bool insert(pkgCache::VerIterator const &V) { if (V.end() == true) return false; _cont.insert(V); return true; }
+ bool insert(pkgCache::VerIterator const &V) APT_OVERRIDE { if (V.end() == true) return false; _cont.insert(V); return true; }
template<class Cont> void insert(VersionContainer<Cont> const &vercont) { _cont.insert((typename Cont::const_iterator)vercont.begin(), (typename Cont::const_iterator)vercont.end()); }
void insert(const_iterator begin, const_iterator end) { _cont.insert(begin, end); }
- bool empty() const { return _cont.empty(); }
- void clear() { return _cont.clear(); }
- //FIXME: on ABI break, replace the first with the second without bool
- void erase(iterator position) { _cont.erase((typename Container::iterator)position); }
- iterator& erase(iterator &position, bool) { return position = _cont.erase((typename Container::iterator)position); }
- size_t erase(const pkgCache::VerIterator x) { return _cont.erase(x); }
- void erase(iterator first, iterator last) { _cont.erase(first, last); }
- size_t size() const { return _cont.size(); }
-
+ bool empty() const APT_OVERRIDE { return _cont.empty(); }
+ void clear() APT_OVERRIDE { return _cont.clear(); }
+ size_t size() const APT_OVERRIDE { return _cont.size(); }
+#if __GNUC__ >= 5 || (__GNUC_MINOR__ >= 9 && __GNUC__ >= 4)
+ iterator erase( const_iterator pos ) { return iterator(_cont.erase(pos._iter)); }
+ iterator erase( const_iterator first, const_iterator last ) { return iterator(_cont.erase(first._iter, last._iter)); }
+#else
+ iterator erase( iterator pos ) { return iterator(_cont.erase(pos._iter)); }
+ iterator erase( iterator first, iterator last ) { return iterator(_cont.erase(first._iter, last._iter)); }
+#endif
const_iterator begin() const { return const_iterator(_cont.begin()); }
const_iterator end() const { return const_iterator(_cont.end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(_cont.rbegin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(_cont.rend()); }
+#if __cplusplus >= 201103L
+ const_iterator cbegin() const { return const_iterator(_cont.cbegin()); }
+ const_iterator cend() const { return const_iterator(_cont.cend()); }
+ const_reverse_iterator crbegin() const { return const_reverse_iterator(_cont.crbegin()); }
+ const_reverse_iterator crend() const { return const_reverse_iterator(_cont.crend()); }
+#endif
iterator begin() { return iterator(_cont.begin()); }
iterator end() { return iterator(_cont.end()); }
+ reverse_iterator rbegin() { return reverse_iterator(_cont.rbegin()); }
+ reverse_iterator rend() { return reverse_iterator(_cont.rend()); }
const_iterator find(pkgCache::VerIterator const &V) const { return const_iterator(_cont.find(V)); }
/** \brief sort all included versions with given comparer
@@ -924,7 +1063,7 @@ APT_IGNORE_DEPRECATED_POP
static VersionContainer FromDependency(pkgCacheFile &Cache, pkgCache::DepIterator const &D,
CacheSetHelper::VerSelector const selector) {
CacheSetHelper helper;
- return FromPackage(Cache, D, selector, helper);
+ return FromDependency(Cache, D, selector, helper);
}
APT_IGNORE_DEPRECATED_PUSH
static VersionContainer FromDependency(pkgCacheFile &Cache, pkgCache::DepIterator const &D,
@@ -936,24 +1075,34 @@ APT_IGNORE_DEPRECATED_PUSH
static VersionContainer FromDependency(pkgCacheFile &Cache, pkgCache::DepIterator const &D,
Version const &selector) {
CacheSetHelper helper;
- return FromPackage(Cache, D, (CacheSetHelper::VerSelector)selector, helper);
+ return FromDependency(Cache, D, (CacheSetHelper::VerSelector)selector, helper);
}
APT_IGNORE_DEPRECATED_POP
static VersionContainer FromDependency(pkgCacheFile &Cache, pkgCache::DepIterator const &D) {
- return FromPackage(Cache, D, CacheSetHelper::CANDIDATE);
+ return FromDependency(Cache, D, CacheSetHelper::CANDIDATE);
}
/*}}}*/
}; /*}}}*/
-// specialisations for push_back containers: std::list & std::vector /*{{{*/
+// various specialisations for VersionContainer /*{{{*/
template<> template<class Cont> void VersionContainer<std::list<pkgCache::VerIterator> >::insert(VersionContainer<Cont> const &vercont) {
for (typename VersionContainer<Cont>::const_iterator v = vercont.begin(); v != vercont.end(); ++v)
_cont.push_back(*v);
}
+#if __cplusplus >= 201103L
+template<> template<class Cont> void VersionContainer<std::forward_list<pkgCache::VerIterator> >::insert(VersionContainer<Cont> const &vercont) {
+ for (typename VersionContainer<Cont>::const_iterator v = vercont.begin(); v != vercont.end(); ++v)
+ _cont.push_front(*v);
+}
+#endif
+template<> template<class Cont> void VersionContainer<std::deque<pkgCache::VerIterator> >::insert(VersionContainer<Cont> const &vercont) {
+ for (typename VersionContainer<Cont>::const_iterator v = vercont.begin(); v != vercont.end(); ++v)
+ _cont.push_back(*v);
+}
template<> template<class Cont> void VersionContainer<std::vector<pkgCache::VerIterator> >::insert(VersionContainer<Cont> const &vercont) {
for (typename VersionContainer<Cont>::const_iterator v = vercont.begin(); v != vercont.end(); ++v)
_cont.push_back(*v);
}
-// these two are 'inline' as otherwise the linker has problems with seeing these untemplated
+// these are 'inline' as otherwise the linker has problems with seeing these untemplated
// specializations again and again - but we need to see them, so that library users can use them
template<> inline bool VersionContainer<std::list<pkgCache::VerIterator> >::insert(pkgCache::VerIterator const &V) {
if (V.end() == true)
@@ -961,6 +1110,20 @@ template<> inline bool VersionContainer<std::list<pkgCache::VerIterator> >::inse
_cont.push_back(V);
return true;
}
+#if __cplusplus >= 201103L
+template<> inline bool VersionContainer<std::forward_list<pkgCache::VerIterator> >::insert(pkgCache::VerIterator const &V) {
+ if (V.end() == true)
+ return false;
+ _cont.push_front(V);
+ return true;
+}
+#endif
+template<> inline bool VersionContainer<std::deque<pkgCache::VerIterator> >::insert(pkgCache::VerIterator const &V) {
+ if (V.end() == true)
+ return false;
+ _cont.push_back(V);
+ return true;
+}
template<> inline bool VersionContainer<std::vector<pkgCache::VerIterator> >::insert(pkgCache::VerIterator const &V) {
if (V.end() == true)
return false;
@@ -971,19 +1134,57 @@ template<> inline void VersionContainer<std::list<pkgCache::VerIterator> >::inse
for (const_iterator v = begin; v != end; ++v)
_cont.push_back(*v);
}
+#if __cplusplus >= 201103L
+template<> inline void VersionContainer<std::forward_list<pkgCache::VerIterator> >::insert(const_iterator begin, const_iterator end) {
+ for (const_iterator v = begin; v != end; ++v)
+ _cont.push_front(*v);
+}
+#endif
+template<> inline void VersionContainer<std::deque<pkgCache::VerIterator> >::insert(const_iterator begin, const_iterator end) {
+ for (const_iterator v = begin; v != end; ++v)
+ _cont.push_back(*v);
+}
template<> inline void VersionContainer<std::vector<pkgCache::VerIterator> >::insert(const_iterator begin, const_iterator end) {
for (const_iterator v = begin; v != end; ++v)
_cont.push_back(*v);
}
- /*}}}*/
-
+#if __cplusplus < 201103L
+template<> inline VersionContainer<std::set<pkgCache::VerIterator> >::iterator VersionContainer<std::set<pkgCache::VerIterator> >::erase(iterator i) {
+ _cont.erase(i._iter);
+ return end();
+}
+template<> inline VersionContainer<std::set<pkgCache::VerIterator> >::iterator VersionContainer<std::set<pkgCache::VerIterator> >::erase(iterator first, iterator last) {
+ _cont.erase(first, last);
+ return end();
+}
+#endif
template<> template<class Compare> inline bool VersionContainer<std::vector<pkgCache::VerIterator> >::sort(Compare Comp) {
std::sort(_cont.begin(), _cont.end(), Comp);
return true;
}
+template<> template<class Compare> inline bool VersionContainer<std::list<pkgCache::VerIterator> >::sort(Compare Comp) {
+ _cont.sort(Comp);
+ return true;
+}
+#if __cplusplus >= 201103L
+template<> template<class Compare> inline bool VersionContainer<std::forward_list<pkgCache::VerIterator> >::sort(Compare Comp) {
+ _cont.sort(Comp);
+ return true;
+}
+#endif
+template<> template<class Compare> inline bool VersionContainer<std::deque<pkgCache::VerIterator> >::sort(Compare Comp) {
+ std::sort(_cont.begin(), _cont.end(), Comp);
+ return true;
+}
+ /*}}}*/
typedef VersionContainer<std::set<pkgCache::VerIterator> > VersionSet;
+#if __cplusplus >= 201103L
+typedef VersionContainer<std::unordered_set<pkgCache::VerIterator> > VersionUnorderedSet;
+typedef VersionContainer<std::forward_list<pkgCache::VerIterator> > VersionForwardList;
+#endif
typedef VersionContainer<std::list<pkgCache::VerIterator> > VersionList;
+typedef VersionContainer<std::deque<pkgCache::VerIterator> > VersionDeque;
typedef VersionContainer<std::vector<pkgCache::VerIterator> > VersionVector;
}
#endif
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 8cec4b78e..dea4a88c3 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -16,14 +16,15 @@
#include <iostream>
#include <string>
#include <vector>
-#include <sstream>
-#include <fstream>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
#include <stdio.h>
#include <algorithm>
#include <dlfcn.h>
+#include <iostream>
+#include <sstream>
+#include <fstream>
#include<apti18n.h>
@@ -917,7 +918,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/
}
/*}}}*/
pkgUdevCdromDevices::pkgUdevCdromDevices() /*{{{*/
-: libudev_handle(NULL), udev_new(NULL), udev_enumerate_add_match_property(NULL),
+: d(NULL), libudev_handle(NULL), udev_new(NULL), udev_enumerate_add_match_property(NULL),
udev_enumerate_scan_devices(NULL), udev_enumerate_get_list_entry(NULL),
udev_device_new_from_syspath(NULL), udev_enumerate_get_udev(NULL),
udev_list_entry_get_name(NULL), udev_device_get_devnode(NULL),
@@ -1022,3 +1023,9 @@ pkgUdevCdromDevices::~pkgUdevCdromDevices() /*{{{*/
dlclose(libudev_handle);
}
/*}}}*/
+
+pkgCdromStatus::pkgCdromStatus() : d(NULL), totalSteps(0) {}
+pkgCdromStatus::~pkgCdromStatus() {}
+
+pkgCdrom::pkgCdrom() : d(NULL) {}
+pkgCdrom::~pkgCdrom() {}
diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h
index bd0902176..ab1e046bf 100644
--- a/apt-pkg/cdrom.h
+++ b/apt-pkg/cdrom.h
@@ -18,12 +18,13 @@ class OpProgress;
class pkgCdromStatus /*{{{*/
{
+ void * const d;
protected:
int totalSteps;
public:
- pkgCdromStatus() : totalSteps(0) {};
- virtual ~pkgCdromStatus() {};
+ pkgCdromStatus();
+ virtual ~pkgCdromStatus();
// total steps
virtual void SetTotal(int total) { totalSteps = total; };
@@ -74,7 +75,12 @@ class pkgCdrom /*{{{*/
bool Ident(std::string &ident, pkgCdromStatus *log);
bool Add(pkgCdromStatus *log);
+ pkgCdrom();
+ virtual ~pkgCdrom();
+
private:
+ void * const d;
+
APT_HIDDEN bool MountAndIdentCDROM(Configuration &Database, std::string &CDROM,
std::string &ident, pkgCdromStatus * const log, bool const interactive);
APT_HIDDEN bool UnmountCDROM(std::string const &CDROM, pkgCdromStatus * const log);
@@ -92,6 +98,7 @@ struct CdromDevice /*{{{*/
/*}}}*/
class pkgUdevCdromDevices /*{{{*/
{
+ void * const d;
protected:
// libudev dlopen structure
void *libudev_handle;
diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc
index 6edce5b6d..ebe8a8a53 100644
--- a/apt-pkg/clean.cc
+++ b/apt-pkg/clean.cc
@@ -106,7 +106,7 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
J.end() == false; ++J)
{
if (CleanInstalled == true &&
- (J.File()->Flags & pkgCache::Flag::NotSource) != 0)
+ J.File().Flagged(pkgCache::Flag::NotSource))
continue;
IsFetchable = true;
break;
@@ -132,4 +132,5 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
}
/*}}}*/
+pkgArchiveCleaner::pkgArchiveCleaner() : d(NULL) {}
APT_CONST pkgArchiveCleaner::~pkgArchiveCleaner() {}
diff --git a/apt-pkg/clean.h b/apt-pkg/clean.h
index 466cb67a9..6cedae086 100644
--- a/apt-pkg/clean.h
+++ b/apt-pkg/clean.h
@@ -21,7 +21,7 @@ class pkgCache;
class pkgArchiveCleaner
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
protected:
@@ -30,6 +30,8 @@ class pkgArchiveCleaner
public:
bool Go(std::string Dir,pkgCache &Cache);
+
+ pkgArchiveCleaner();
virtual ~pkgArchiveCleaner();
};
diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc
index 6eb917457..428ef0161 100644
--- a/apt-pkg/contrib/cdromutl.cc
+++ b/apt-pkg/contrib/cdromutl.cc
@@ -287,9 +287,11 @@ string FindMountPointForDevice(const char *devnode)
fclose(f);
// unescape the \0XXX chars in the path
string mount_point = out[1];
+ free(line);
return DeEscapeString(mount_point);
}
fclose(f);
+ free(line);
}
return string();
diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc
index ff8b09ebc..40365237e 100644
--- a/apt-pkg/contrib/cmndline.cc
+++ b/apt-pkg/contrib/cmndline.cc
@@ -124,7 +124,7 @@ bool CommandLine::Parse(int argc,const char **argv)
Args *A;
for (A = ArgList; A->end() == false && A->ShortOpt != *Opt; A++);
if (A->end() == true)
- return _error->Error(_("Command line option '%c' [from %s] is not known."),*Opt,argv[I]);
+ return _error->Error(_("Command line option '%c' [from %s] is not understood in combination with the other options."),*Opt,argv[I]);
if (HandleOpt(I,argc,argv,Opt,A) == false)
return false;
@@ -149,7 +149,7 @@ bool CommandLine::Parse(int argc,const char **argv)
{
Opt = (const char*) memchr(Opt, '-', OptEnd - Opt);
if (Opt == NULL)
- return _error->Error(_("Command line option %s is not understood"),argv[I]);
+ return _error->Error(_("Command line option %s is not understood in combination with the other options"),argv[I]);
Opt++;
for (A = ArgList; A->end() == false &&
@@ -158,7 +158,7 @@ bool CommandLine::Parse(int argc,const char **argv)
// Failed again..
if (A->end() == true && OptEnd - Opt != 1)
- return _error->Error(_("Command line option %s is not understood"),argv[I]);
+ return _error->Error(_("Command line option %s is not understood in combination with the other options"),argv[I]);
// The option could be a single letter option prefixed by a no-..
if (A->end() == true)
@@ -166,7 +166,7 @@ bool CommandLine::Parse(int argc,const char **argv)
for (A = ArgList; A->end() == false && A->ShortOpt != *Opt; A++);
if (A->end() == true)
- return _error->Error(_("Command line option %s is not understood"),argv[I]);
+ return _error->Error(_("Command line option %s is not understood in combination with the other options"),argv[I]);
}
// The option is not boolean
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 42e35d32a..203de158b 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -253,13 +253,7 @@ string Configuration::FindDir(const char *Name,const char *Default) const
// Configuration::FindVector - Find a vector of values /*{{{*/
// ---------------------------------------------------------------------
/* Returns a vector of config values under the given item */
-#if APT_PKG_ABI < 413
-vector<string> Configuration::FindVector(const char *Name) const
-{
- return FindVector(Name, "");
-}
-#endif
-vector<string> Configuration::FindVector(const char *Name, std::string const &Default) const
+vector<string> Configuration::FindVector(const char *Name, std::string const &Default, bool const Keys) const
{
vector<string> Vec;
const Item *Top = Lookup(Name);
@@ -272,7 +266,7 @@ vector<string> Configuration::FindVector(const char *Name, std::string const &De
Item *I = Top->Child;
while(I != NULL)
{
- Vec.push_back(I->Value);
+ Vec.push_back(Keys ? I->Tag : I->Value);
I = I->Next;
}
if (Vec.empty() == true)
diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h
index 8d7d51037..eacc26fda 100644
--- a/apt-pkg/contrib/configuration.h
+++ b/apt-pkg/contrib/configuration.h
@@ -84,15 +84,8 @@ class Configuration
*
* \param Name of the parent node
* \param Default list of values separated by commas */
-#if APT_PKG_ABI >= 413
- std::vector<std::string> FindVector(const char *Name, std::string const &Default = "") const;
- std::vector<std::string> FindVector(std::string const &Name, std::string const &Default = "") const { return FindVector(Name.c_str(), Default); };
-#else
- std::vector<std::string> FindVector(const char *Name, std::string const &Default) const;
- std::vector<std::string> FindVector(std::string const &Name, std::string const &Default) const { return FindVector(Name.c_str(), Default); };
- std::vector<std::string> FindVector(const char *Name) const;
- std::vector<std::string> FindVector(std::string const &Name) const { return FindVector(Name.c_str(), ""); };
-#endif
+ std::vector<std::string> FindVector(const char *Name, std::string const &Default = "", bool const Keys = false) const;
+ std::vector<std::string> FindVector(std::string const &Name, std::string const &Default = "", bool const Keys = false) const { return FindVector(Name.c_str(), Default, Keys); };
int FindI(const char *Name,int const &Default = 0) const;
int FindI(std::string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);};
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 8ec868ec0..1be782bac 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -52,6 +52,7 @@
#include <set>
#include <algorithm>
+#include <memory>
#ifdef HAVE_ZLIB
#include <zlib.h>
@@ -159,7 +160,7 @@ bool CopyFile(FileFd &From,FileFd &To)
return false;
// Buffered copy between fds
- SPtrArray<unsigned char> Buf = new unsigned char[64000];
+ std::unique_ptr<unsigned char[]> Buf(new unsigned char[64000]);
unsigned long long Size = From.Size();
while (Size != 0)
{
@@ -167,8 +168,8 @@ bool CopyFile(FileFd &From,FileFd &To)
if (Size > 64000)
ToRead = 64000;
- if (From.Read(Buf,ToRead) == false ||
- To.Write(Buf,ToRead) == false)
+ if (From.Read(Buf.get(),ToRead) == false ||
+ To.Write(Buf.get(),ToRead) == false)
return false;
Size -= ToRead;
@@ -800,12 +801,26 @@ pid_t ExecFork(std::set<int> KeepFDs)
signal(SIGCONT,SIG_DFL);
signal(SIGTSTP,SIG_DFL);
- long ScOpenMax = sysconf(_SC_OPEN_MAX);
- // Close all of our FDs - just in case
- for (int K = 3; K != ScOpenMax; K++)
+ DIR *dir = opendir("/proc/self/fd");
+ if (dir != NULL)
{
- if(KeepFDs.find(K) == KeepFDs.end())
- fcntl(K,F_SETFD,FD_CLOEXEC);
+ struct dirent *ent;
+ while ((ent = readdir(dir)))
+ {
+ int fd = atoi(ent->d_name);
+ // If fd > 0, it was a fd number and not . or ..
+ if (fd >= 3 && KeepFDs.find(fd) == KeepFDs.end())
+ fcntl(fd,F_SETFD,FD_CLOEXEC);
+ }
+ closedir(dir);
+ } else {
+ long ScOpenMax = sysconf(_SC_OPEN_MAX);
+ // Close all of our FDs - just in case
+ for (int K = 3; K != ScOpenMax; K++)
+ {
+ if(KeepFDs.find(K) == KeepFDs.end())
+ fcntl(K,F_SETFD,FD_CLOEXEC);
+ }
}
}
@@ -1011,6 +1026,25 @@ class FileFdPrivate { /*{{{*/
~FileFdPrivate() { CloseDown(""); }
};
/*}}}*/
+// FileFd Constructors /*{{{*/
+FileFd::FileFd(std::string FileName,unsigned int const Mode,unsigned long AccessMode) : iFd(-1), Flags(0), d(NULL)
+{
+ Open(FileName,Mode, None, AccessMode);
+}
+FileFd::FileFd(std::string FileName,unsigned int const Mode, CompressMode Compress, unsigned long AccessMode) : iFd(-1), Flags(0), d(NULL)
+{
+ Open(FileName,Mode, Compress, AccessMode);
+}
+FileFd::FileFd() : iFd(-1), Flags(AutoClose), d(NULL) {}
+FileFd::FileFd(int const Fd, unsigned int const Mode, CompressMode Compress) : iFd(-1), Flags(0), d(NULL)
+{
+ OpenDescriptor(Fd, Mode, Compress);
+}
+FileFd::FileFd(int const Fd, bool const AutoClose) : iFd(-1), Flags(0), d(NULL)
+{
+ OpenDescriptor(Fd, ReadWrite, None, AutoClose);
+}
+ /*}}}*/
// FileFd::Open - Open a file /*{{{*/
// ---------------------------------------------------------------------
/* The most commonly used open mode combinations are given with Mode */
@@ -2096,28 +2130,27 @@ std::string GetTempDir() /*{{{*/
return string(tmpdir);
}
/*}}}*/
-FileFd* GetTempFile(std::string const &Prefix, bool ImmediateUnlink) /*{{{*/
+FileFd* GetTempFile(std::string const &Prefix, bool ImmediateUnlink, FileFd * const TmpFd) /*{{{*/
{
char fn[512];
- FileFd *Fd = new FileFd();
+ FileFd * const Fd = TmpFd == NULL ? new FileFd() : TmpFd;
- std::string tempdir = GetTempDir();
- snprintf(fn, sizeof(fn), "%s/%s.XXXXXX",
+ std::string const tempdir = GetTempDir();
+ snprintf(fn, sizeof(fn), "%s/%s.XXXXXX",
tempdir.c_str(), Prefix.c_str());
- int fd = mkstemp(fn);
+ int const fd = mkstemp(fn);
if(ImmediateUnlink)
unlink(fn);
- if (fd < 0)
+ if (fd < 0)
{
_error->Errno("GetTempFile",_("Unable to mkstemp %s"), fn);
return NULL;
}
- if (!Fd->OpenDescriptor(fd, FileFd::WriteOnly, FileFd::None, true))
+ if (!Fd->OpenDescriptor(fd, FileFd::ReadWrite, FileFd::None, true))
{
_error->Errno("GetTempFile",_("Unable to write to %s"),fn);
return NULL;
}
-
return Fd;
}
/*}}}*/
@@ -2219,22 +2252,32 @@ bool DropPrivileges() /*{{{*/
return _error->Error("No user %s, can not drop rights", toUser.c_str());
// Do not change the order here, it might break things
+ // Get rid of all our supplementary groups first
if (setgroups(1, &pw->pw_gid))
return _error->Errno("setgroups", "Failed to setgroups");
+ // Now change the group ids to the new user
+#ifdef HAVE_SETRESGID
+ if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) != 0)
+ return _error->Errno("setresgid", "Failed to set new group ids");
+#else
if (setegid(pw->pw_gid) != 0)
return _error->Errno("setegid", "Failed to setegid");
if (setgid(pw->pw_gid) != 0)
return _error->Errno("setgid", "Failed to setgid");
+#endif
+ // Change the user ids to the new user
+#ifdef HAVE_SETRESUID
+ if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) != 0)
+ return _error->Errno("setresuid", "Failed to set new user ids");
+#else
if (setuid(pw->pw_uid) != 0)
return _error->Errno("setuid", "Failed to setuid");
-
- // the seteuid() is probably uneeded (at least thats what the linux
- // man-page says about setuid(2)) but we cargo culted it anyway
if (seteuid(pw->pw_uid) != 0)
return _error->Errno("seteuid", "Failed to seteuid");
+#endif
// Verify that the user has only a single group, and the correct one
gid_t groups[1];
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index 97cb05c56..acfd560ab 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -130,28 +130,17 @@ class FileFd
inline bool Eof() {return (Flags & HitEof) == HitEof;};
inline bool IsCompressed() {return (Flags & Compressed) == Compressed;};
inline std::string &Name() {return FileName;};
-
- FileFd(std::string FileName,unsigned int const Mode,unsigned long AccessMode = 0666) : iFd(-1), Flags(0), d(NULL)
- {
- Open(FileName,Mode, None, AccessMode);
- };
- FileFd(std::string FileName,unsigned int const Mode, CompressMode Compress, unsigned long AccessMode = 0666) : iFd(-1), Flags(0), d(NULL)
- {
- Open(FileName,Mode, Compress, AccessMode);
- };
- FileFd() : iFd(-1), Flags(AutoClose), d(NULL) {};
- FileFd(int const Fd, unsigned int const Mode = ReadWrite, CompressMode Compress = None) : iFd(-1), Flags(0), d(NULL)
- {
- OpenDescriptor(Fd, Mode, Compress);
- };
- FileFd(int const Fd, bool const AutoClose) : iFd(-1), Flags(0), d(NULL)
- {
- OpenDescriptor(Fd, ReadWrite, None, AutoClose);
- };
+
+ FileFd(std::string FileName,unsigned int const Mode,unsigned long AccessMode = 0666);
+ FileFd(std::string FileName,unsigned int const Mode, CompressMode Compress, unsigned long AccessMode = 0666);
+ FileFd();
+ FileFd(int const Fd, unsigned int const Mode = ReadWrite, CompressMode Compress = None);
+ FileFd(int const Fd, bool const AutoClose);
virtual ~FileFd();
private:
- FileFdPrivate* d;
+ FileFdPrivate * d;
+ APT_HIDDEN FileFd & operator=(const FileFd &);
APT_HIDDEN bool OpenInternDescriptor(unsigned int const Mode, APT::Configuration::Compressor const &compressor);
// private helpers to set Fail flag and call _error->Error
@@ -170,8 +159,9 @@ time_t GetModificationTime(std::string const &Path);
bool Rename(std::string From, std::string To);
std::string GetTempDir();
-FileFd* GetTempFile(std::string const &Prefix = "",
- bool ImmediateUnlink = true);
+FileFd* GetTempFile(std::string const &Prefix = "",
+ bool ImmediateUnlink = true,
+ FileFd * const TmpFd = NULL);
/** \brief Ensure the existence of the given Path
*
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc
index 9d798cca9..ef84da0d8 100644
--- a/apt-pkg/contrib/gpgv.cc
+++ b/apt-pkg/contrib/gpgv.cc
@@ -16,6 +16,8 @@
#include <sys/wait.h>
#include <unistd.h>
#include <stddef.h>
+
+#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
@@ -42,7 +44,7 @@ static char * GenerateTemporaryFileTemplate(const char *basename) /*{{{*/
of the lifting in regards to merging keyrings. Fun for the whole family.
*/
void ExecGPGV(std::string const &File, std::string const &FileGPG,
- int const &statusfd, int fd[2])
+ int const &statusfd, int fd[2], std::string const &key)
{
#define EINTERNAL 111
std::string const aptkey = _config->FindFile("Dir::Bin::apt-key", "/usr/bin/apt-key");
@@ -55,6 +57,19 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG,
Args.push_back(aptkey.c_str());
Args.push_back("--quiet");
Args.push_back("--readonly");
+ if (key.empty() == false)
+ {
+ if (key[0] == '/')
+ {
+ Args.push_back("--keyring");
+ Args.push_back(key.c_str());
+ }
+ else
+ {
+ Args.push_back("--keyid");
+ Args.push_back(key.c_str());
+ }
+ }
Args.push_back("verify");
char statusfdstr[10];
@@ -296,6 +311,8 @@ bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile,
// all the rest is whitespace, unsigned garbage or additional message blocks we ignore
}
fclose(in);
+ if (buf != NULL)
+ free(buf);
if (found_signature == true)
return _error->Error("Signature in file %s wasn't closed", InFile.c_str());
diff --git a/apt-pkg/contrib/gpgv.h b/apt-pkg/contrib/gpgv.h
index f018893fd..2a4cdad72 100644
--- a/apt-pkg/contrib/gpgv.h
+++ b/apt-pkg/contrib/gpgv.h
@@ -38,9 +38,12 @@ class FileFd;
*
* @param File is the message (unsigned or clear-signed)
* @param FileSig is the signature (detached or clear-signed)
+ * @param statusfd is the fd given to gpgv as --status-fd
+ * @param fd is used as a pipe for the standard output of gpgv
+ * @param key is the specific one to be used instead of using all
*/
void ExecGPGV(std::string const &File, std::string const &FileSig,
- int const &statusfd, int fd[2]) APT_NORETURN;
+ int const &statusfd, int fd[2], std::string const &Key = "") APT_NORETURN;
inline APT_NORETURN void ExecGPGV(std::string const &File, std::string const &FileSig,
int const &statusfd = -1) {
int fd[2];
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index 0fa443b4a..4481321c4 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -23,6 +23,7 @@
#include <stddef.h>
#include <algorithm>
#include <unistd.h>
+#include <stdlib.h>
#include <string>
#include <iostream>
/*}}}*/
@@ -178,6 +179,22 @@ HashString const * HashStringList::find(char const * const type) const /*{{{*/
return NULL;
}
/*}}}*/
+unsigned long long HashStringList::FileSize() const /*{{{*/
+{
+ HashString const * const hsf = find("Checksum-FileSize");
+ if (hsf == NULL)
+ return 0;
+ std::string const hv = hsf->HashValue();
+ return strtoull(hv.c_str(), NULL, 10);
+}
+ /*}}}*/
+bool HashStringList::FileSize(unsigned long long const Size) /*{{{*/
+{
+ std::string size;
+ strprintf(size, "%llu", Size);
+ return push_back(HashString("Checksum-FileSize", size));
+}
+ /*}}}*/
bool HashStringList::supported(char const * const type) /*{{{*/
{
for (char const * const * t = HashString::SupportedHashes(); *t != NULL; ++t)
@@ -259,7 +276,19 @@ public:
unsigned long long FileSize;
unsigned int CalcHashes;
- PrivateHashes(unsigned int const CalcHashes) : FileSize(0), CalcHashes(CalcHashes) {}
+ explicit PrivateHashes(unsigned int const CalcHashes) : FileSize(0), CalcHashes(CalcHashes) {}
+ explicit PrivateHashes(HashStringList const &Hashes) : FileSize(0) {
+ unsigned int calcHashes = Hashes.usable() ? 0 : ~0;
+ if (Hashes.find("MD5Sum") != NULL)
+ calcHashes |= Hashes::MD5SUM;
+ if (Hashes.find("SHA1") != NULL)
+ calcHashes |= Hashes::SHA1SUM;
+ if (Hashes.find("SHA256") != NULL)
+ calcHashes |= Hashes::SHA256SUM;
+ if (Hashes.find("SHA512") != NULL)
+ calcHashes |= Hashes::SHA512SUM;
+ CalcHashes = calcHashes;
+ }
};
/*}}}*/
// Hashes::Add* - Add the contents of data or FD /*{{{*/
@@ -351,25 +380,12 @@ APT_IGNORE_DEPRECATED_PUSH
if ((d->CalcHashes & SHA512SUM) == SHA512SUM)
hashes.push_back(HashString("SHA512", SHA512.Result().Value()));
APT_IGNORE_DEPRECATED_POP
- std::string SizeStr;
- strprintf(SizeStr, "%llu", d->FileSize);
- hashes.push_back(HashString("Checksum-FileSize", SizeStr));
+ hashes.FileSize(d->FileSize);
return hashes;
}
APT_IGNORE_DEPRECATED_PUSH
-Hashes::Hashes() { d = new PrivateHashes(~0); }
-Hashes::Hashes(unsigned int const Hashes) { d = new PrivateHashes(Hashes); }
-Hashes::Hashes(HashStringList const &Hashes) {
- unsigned int calcHashes = Hashes.usable() ? 0 : ~0;
- if (Hashes.find("MD5Sum") != NULL)
- calcHashes |= MD5SUM;
- if (Hashes.find("SHA1") != NULL)
- calcHashes |= SHA1SUM;
- if (Hashes.find("SHA256") != NULL)
- calcHashes |= SHA256SUM;
- if (Hashes.find("SHA512") != NULL)
- calcHashes |= SHA512SUM;
- d = new PrivateHashes(calcHashes);
-}
+Hashes::Hashes() : d(new PrivateHashes(~0)) { }
+Hashes::Hashes(unsigned int const Hashes) : d(new PrivateHashes(Hashes)) {}
+Hashes::Hashes(HashStringList const &Hashes) : d(new PrivateHashes(Hashes)) {}
Hashes::~Hashes() { delete d; }
APT_IGNORE_DEPRECATED_POP
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index ac13c8ace..0e6ff9ef1 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -87,6 +87,22 @@ class HashStringList
*/
HashString const * find(char const * const type) const;
HashString const * find(std::string const &type) const { return find(type.c_str()); }
+
+ /** finds the filesize hash and returns it as number
+ *
+ * @return beware: if the size isn't known we return \b 0 here,
+ * just like we would do for an empty file. If that is a problem
+ * for you have to get the size manually out of the list.
+ */
+ unsigned long long FileSize() const;
+
+ /** sets the filesize hash
+ *
+ * @param Size of the file
+ * @return @see #push_back
+ */
+ bool FileSize(unsigned long long const Size);
+
/** check if the given hash type is supported
*
* @param type to check
@@ -166,7 +182,7 @@ class HashStringList
class PrivateHashes;
class Hashes
{
- PrivateHashes *d;
+ PrivateHashes * const d;
public:
/* those will disappear in the future as it is hard to add new ones this way.
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
index 869dc5cb7..d0ea0971e 100644
--- a/apt-pkg/contrib/hashsum_template.h
+++ b/apt-pkg/contrib/hashsum_template.h
@@ -87,7 +87,7 @@ class HashSumValue
Sum[I] = S[I];
}
- HashSumValue(std::string Str)
+ explicit HashSumValue(std::string const &Str)
{
memset(Sum,0,sizeof(Sum));
Set(Str);
diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
index 2f9c6c269..afa385c75 100644
--- a/apt-pkg/contrib/macros.h
+++ b/apt-pkg/contrib/macros.h
@@ -148,13 +148,19 @@
#define APT_IGNORE_DEPRECATED(XXX) XXX
#endif
+#if __cplusplus >= 201103L
+ #define APT_OVERRIDE override
+#else
+ #define APT_OVERRIDE /* no c++11 standard */
+#endif
+
// These lines are extracted by the makefiles and the buildsystem
// Increasing MAJOR or MINOR results in the need of recompiling all
// reverse-dependencies of libapt-pkg against the new SONAME.
// Non-ABI-Breaks should only increase RELEASE number.
// See also buildlib/libversion.mak
-#define APT_PKG_MAJOR 4
-#define APT_PKG_MINOR 15
+#define APT_PKG_MAJOR 5
+#define APT_PKG_MINOR 0
#define APT_PKG_RELEASE 0
#define APT_PKG_ABI ((APT_PKG_MAJOR * 100) + APT_PKG_MINOR)
diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h
index f4992c223..a16ea4d2d 100644
--- a/apt-pkg/contrib/md5.h
+++ b/apt-pkg/contrib/md5.h
@@ -48,7 +48,7 @@ class MD5Summation : public SummationImplementation
public:
- bool Add(const unsigned char *inbuf, unsigned long long inlen);
+ bool Add(const unsigned char *inbuf, unsigned long long inlen) APT_OVERRIDE;
using SummationImplementation::Add;
MD5SumValue Result();
diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h
index f7fbc9ccf..427b1bd35 100644
--- a/apt-pkg/contrib/progress.h
+++ b/apt-pkg/contrib/progress.h
@@ -24,6 +24,7 @@
#include <string>
#include <sys/time.h>
+#include <apt-pkg/macros.h>
#ifndef APT_8_CLEANER_HEADERS
using std::string;
@@ -74,12 +75,12 @@ class OpTextProgress : public OpProgress
bool NoUpdate;
bool NoDisplay;
unsigned long LastLen;
- virtual void Update();
+ virtual void Update() APT_OVERRIDE;
void Write(const char *S);
public:
- virtual void Done();
+ virtual void Done() APT_OVERRIDE;
OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate),
NoDisplay(false), LastLen(0) {};
diff --git a/apt-pkg/contrib/sha1.h b/apt-pkg/contrib/sha1.h
index 5770c315a..1c5cb5aa1 100644
--- a/apt-pkg/contrib/sha1.h
+++ b/apt-pkg/contrib/sha1.h
@@ -37,7 +37,7 @@ class SHA1Summation : public SummationImplementation
bool Done;
public:
- bool Add(const unsigned char *inbuf, unsigned long long inlen);
+ bool Add(const unsigned char *inbuf, unsigned long long inlen) APT_OVERRIDE;
using SummationImplementation::Add;
SHA1SumValue Result();
diff --git a/apt-pkg/contrib/sha2.h b/apt-pkg/contrib/sha2.h
index a25ad4d32..8b4bdd439 100644
--- a/apt-pkg/contrib/sha2.h
+++ b/apt-pkg/contrib/sha2.h
@@ -34,7 +34,7 @@ class SHA2SummationBase : public SummationImplementation
protected:
bool Done;
public:
- bool Add(const unsigned char *inbuf, unsigned long long len) = 0;
+ bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE = 0;
void Result();
};
@@ -45,7 +45,7 @@ class SHA256Summation : public SHA2SummationBase
unsigned char Sum[32];
public:
- bool Add(const unsigned char *inbuf, unsigned long long len)
+ bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE
{
if (Done)
return false;
@@ -78,7 +78,7 @@ class SHA512Summation : public SHA2SummationBase
unsigned char Sum[64];
public:
- bool Add(const unsigned char *inbuf, unsigned long long len)
+ bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE
{
if (Done)
return false;
diff --git a/apt-pkg/contrib/sptr.h b/apt-pkg/contrib/sptr.h
index 9df0e44a7..92f4cdec8 100644
--- a/apt-pkg/contrib/sptr.h
+++ b/apt-pkg/contrib/sptr.h
@@ -22,7 +22,7 @@
#define SMART_POINTER_H
template <class T>
-class SPtr
+class APT_DEPRECATED SPtr
{
public:
T *Ptr;
@@ -43,7 +43,7 @@ class SPtr
};
template <class T>
-class SPtrArray
+class APT_DEPRECATED SPtrArray
{
public:
T *Ptr;
@@ -60,7 +60,15 @@ class SPtrArray
inline SPtrArray(T *Ptr) : Ptr(Ptr) {};
inline SPtrArray() : Ptr(0) {};
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+ // gcc warns about this, but we can do nothing here…
+#endif
inline ~SPtrArray() {delete [] Ptr;};
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic pop
+#endif
};
#endif
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 0db4c57b2..05624f7fb 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1308,7 +1308,7 @@ void ioprintf(ostream &out,const char *format,...)
va_list args;
ssize_t size = 400;
while (true) {
- bool ret = false;
+ bool ret;
va_start(args,format);
ret = iovprintf(out, format, args, size);
va_end(args);
@@ -1322,7 +1322,7 @@ void strprintf(string &out,const char *format,...)
ssize_t size = 400;
std::ostringstream outstr;
while (true) {
- bool ret = false;
+ bool ret;
va_start(args,format);
ret = iovprintf(outstr, format, args, size);
va_end(args);
@@ -1637,8 +1637,6 @@ URI::operator string()
}
/*}}}*/
// URI::SiteOnly - Return the schema and site for the URI /*{{{*/
-// ---------------------------------------------------------------------
-/* */
string URI::SiteOnly(const string &URI)
{
::URI U(URI);
@@ -1648,9 +1646,18 @@ string URI::SiteOnly(const string &URI)
return U;
}
/*}}}*/
+// URI::ArchiveOnly - Return the schema, site and cleaned path for the URI /*{{{*/
+string URI::ArchiveOnly(const string &URI)
+{
+ ::URI U(URI);
+ U.User.clear();
+ U.Password.clear();
+ if (U.Path.empty() == false && U.Path[U.Path.length() - 1] == '/')
+ U.Path.erase(U.Path.length() - 1);
+ return U;
+}
+ /*}}}*/
// URI::NoUserPassword - Return the schema, site and path for the URI /*{{{*/
-// ---------------------------------------------------------------------
-/* */
string URI::NoUserPassword(const string &URI)
{
::URI U(URI);
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index d64270aaf..01bbfef72 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -167,6 +167,7 @@ class URI
inline void operator =(const std::string &From) {CopyFrom(From);}
inline bool empty() {return Access.empty();};
static std::string SiteOnly(const std::string &URI);
+ static std::string ArchiveOnly(const std::string &URI);
static std::string NoUserPassword(const std::string &URI);
URI(std::string Path) {CopyFrom(Path);}
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index d672b4fd8..c43ee7b91 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -16,56 +16,34 @@
#include <apt-pkg/deblistparser.h>
#include <apt-pkg/debrecords.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/progress.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/debmetaindex.h>
-#include <apt-pkg/gpgv.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/indexfile.h>
-#include <apt-pkg/mmap.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
-#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/sptr.h>
#include <stdio.h>
#include <iostream>
-#include <sstream>
#include <string>
+#include <sstream>
+
#include <sys/stat.h>
/*}}}*/
-using std::string;
-
-// SourcesIndex::debSourcesIndex - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-debSourcesIndex::debSourcesIndex(string URI,string Dist,string Section,bool Trusted) :
- pkgIndexFile(Trusted), URI(URI), Dist(Dist), Section(Section)
+// Sources Index /*{{{*/
+debSourcesIndex::debSourcesIndex(IndexTarget const &Target,bool const Trusted) :
+ pkgDebianIndexTargetFile(Target, Trusted), d(NULL)
{
}
- /*}}}*/
-// SourcesIndex::SourceInfo - Short 1 liner describing a source /*{{{*/
-// ---------------------------------------------------------------------
-/* The result looks like:
- http://foo/debian/ stable/main src 1.1.1 (dsc) */
-string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record,
+std::string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record,
pkgSrcRecords::File const &File) const
{
- string Res;
- Res = ::URI::NoUserPassword(URI) + ' ';
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Res += Dist;
- }
- else
- Res += Dist + '/' + Section;
-
+ // The result looks like: http://foo/debian/ stable/main src 1.1.1 (dsc)
+ std::string Res = Target.Description;
+ Res.erase(Target.Description.rfind(' '));
+
Res += " ";
Res += Record.Package();
Res += " ";
@@ -74,622 +52,111 @@ string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record,
Res += " (" + File.Type + ")";
return Res;
}
- /*}}}*/
-// SourcesIndex::CreateSrcParser - Get a parser for the source files /*{{{*/
-// ---------------------------------------------------------------------
-/* */
pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const
{
- string SourcesURI = _config->FindDir("Dir::State::lists") +
- URItoFileName(IndexURI("Sources"));
-
- std::vector<std::string> types = APT::Configuration::getCompressionTypes();
- for (std::vector<std::string>::const_iterator t = types.begin(); t != types.end(); ++t)
- {
- string p;
- p = SourcesURI + '.' + *t;
- if (FileExists(p))
- return new debSrcRecordParser(p, this);
- }
+ std::string const SourcesURI = IndexFileName();
if (FileExists(SourcesURI))
return new debSrcRecordParser(SourcesURI, this);
return NULL;
}
- /*}}}*/
-// SourcesIndex::Describe - Give a descriptive path to the index /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string debSourcesIndex::Describe(bool Short) const
-{
- char S[300];
- if (Short == true)
- snprintf(S,sizeof(S),"%s",Info("Sources").c_str());
- else
- snprintf(S,sizeof(S),"%s (%s)",Info("Sources").c_str(),
- IndexFile("Sources").c_str());
-
- return S;
-}
- /*}}}*/
-// SourcesIndex::Info - One liner describing the index URI /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string debSourcesIndex::Info(const char *Type) const
+bool debSourcesIndex::OpenListFile(FileFd &, std::string const &)
{
- string Info = ::URI::NoUserPassword(URI) + ' ';
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Info += Dist;
- }
- else
- Info += Dist + '/' + Section;
- Info += " ";
- Info += Type;
- return Info;
+ return true;
}
- /*}}}*/
-// SourcesIndex::Index* - Return the URI to the index files /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string debSourcesIndex::IndexFile(const char *Type) const
+pkgCacheListParser * debSourcesIndex::CreateListParser(FileFd &)
{
- string s = URItoFileName(IndexURI(Type));
-
- std::vector<std::string> types = APT::Configuration::getCompressionTypes();
- for (std::vector<std::string>::const_iterator t = types.begin(); t != types.end(); ++t)
- {
- string p = s + '.' + *t;
- if (FileExists(p))
- return p;
- }
- return s;
+ return NULL;
}
-
-string debSourcesIndex::IndexURI(const char *Type) const
+uint8_t debSourcesIndex::GetIndexFlags() const
{
- string Res;
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Res = URI + Dist;
- else
- Res = URI;
- }
- else
- Res = URI + "dists/" + Dist + '/' + Section +
- "/source/";
-
- Res += Type;
- return Res;
+ return 0;
}
/*}}}*/
-// SourcesIndex::Exists - Check if the index is available /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debSourcesIndex::Exists() const
+// Packages Index /*{{{*/
+debPackagesIndex::debPackagesIndex(IndexTarget const &Target, bool const Trusted) :
+ pkgDebianIndexTargetFile(Target, Trusted), d(NULL)
{
- return FileExists(IndexFile("Sources"));
}
- /*}}}*/
-// SourcesIndex::Size - Return the size of the index /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-unsigned long debSourcesIndex::Size() const
+std::string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator const &Ver) const
{
- unsigned long size = 0;
-
- /* we need to ignore errors here; if the lists are absent, just return 0 */
- _error->PushToStack();
-
- FileFd f(IndexFile("Sources"), FileFd::ReadOnly, FileFd::Extension);
- if (!f.Failed())
- size = f.Size();
+ std::string Res = Target.Description;
+ Res.erase(Target.Description.rfind(' '));
- if (_error->PendingError() == true)
- size = 0;
- _error->RevertToStack();
-
- return size;
-}
- /*}}}*/
-
-// PackagesIndex::debPackagesIndex - Contructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-debPackagesIndex::debPackagesIndex(string const &URI, string const &Dist, string const &Section,
- bool const &Trusted, string const &Arch) :
- pkgIndexFile(Trusted), URI(URI), Dist(Dist), Section(Section), Architecture(Arch)
-{
- if (Architecture == "native")
- Architecture = _config->Find("APT::Architecture");
-}
- /*}}}*/
-// PackagesIndex::ArchiveInfo - Short version of the archive url /*{{{*/
-// ---------------------------------------------------------------------
-/* This is a shorter version that is designed to be < 60 chars or so */
-string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator Ver) const
-{
- string Res = ::URI::NoUserPassword(URI) + ' ';
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Res += Dist;
- }
- else
- Res += Dist + '/' + Section;
-
Res += " ";
Res += Ver.ParentPkg().Name();
Res += " ";
- if (Dist[Dist.size() - 1] != '/')
+ std::string const Dist = Target.Option(IndexTarget::RELEASE);
+ if (Dist.empty() == false && Dist[Dist.size() - 1] != '/')
Res.append(Ver.Arch()).append(" ");
Res += Ver.VerStr();
return Res;
}
- /*}}}*/
-// PackagesIndex::Describe - Give a descriptive path to the index /*{{{*/
-// ---------------------------------------------------------------------
-/* This should help the user find the index in the sources.list and
- in the filesystem for problem solving */
-string debPackagesIndex::Describe(bool Short) const
-{
- char S[300];
- if (Short == true)
- snprintf(S,sizeof(S),"%s",Info("Packages").c_str());
- else
- snprintf(S,sizeof(S),"%s (%s)",Info("Packages").c_str(),
- IndexFile("Packages").c_str());
- return S;
-}
- /*}}}*/
-// PackagesIndex::Info - One liner describing the index URI /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string debPackagesIndex::Info(const char *Type) const
+uint8_t debPackagesIndex::GetIndexFlags() const
{
- string Info = ::URI::NoUserPassword(URI) + ' ';
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Info += Dist;
- }
- else
- Info += Dist + '/' + Section;
- Info += " ";
- if (Dist[Dist.size() - 1] != '/')
- Info += Architecture + " ";
- Info += Type;
- return Info;
-}
- /*}}}*/
-// PackagesIndex::Index* - Return the URI to the index files /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string debPackagesIndex::IndexFile(const char *Type) const
-{
- string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type));
-
- std::vector<std::string> types = APT::Configuration::getCompressionTypes();
- for (std::vector<std::string>::const_iterator t = types.begin(); t != types.end(); ++t)
- {
- string p = s + '.' + *t;
- if (FileExists(p))
- return p;
- }
- return s;
-}
-string debPackagesIndex::IndexURI(const char *Type) const
-{
- string Res;
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Res = URI + Dist;
- else
- Res = URI;
- }
- else
- Res = URI + "dists/" + Dist + '/' + Section +
- "/binary-" + Architecture + '/';
-
- Res += Type;
- return Res;
-}
- /*}}}*/
-// PackagesIndex::Exists - Check if the index is available /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debPackagesIndex::Exists() const
-{
- return FileExists(IndexFile("Packages"));
-}
- /*}}}*/
-// PackagesIndex::Size - Return the size of the index /*{{{*/
-// ---------------------------------------------------------------------
-/* This is really only used for progress reporting. */
-unsigned long debPackagesIndex::Size() const
-{
- unsigned long size = 0;
-
- /* we need to ignore errors here; if the lists are absent, just return 0 */
- _error->PushToStack();
-
- FileFd f(IndexFile("Packages"), FileFd::ReadOnly, FileFd::Extension);
- if (!f.Failed())
- size = f.Size();
-
- if (_error->PendingError() == true)
- size = 0;
- _error->RevertToStack();
-
- return size;
-}
- /*}}}*/
-// PackagesIndex::Merge - Load the index file into a cache /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debPackagesIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
-{
- string PackageFile = IndexFile("Packages");
- FileFd Pkg(PackageFile,FileFd::ReadOnly, FileFd::Extension);
- debListParser Parser(&Pkg, Architecture);
-
- if (_error->PendingError() == true)
- return _error->Error("Problem opening %s",PackageFile.c_str());
- if (Prog != NULL)
- Prog->SubProgress(0,Info("Packages"));
- ::URI Tmp(URI);
- if (Gen.SelectFile(PackageFile,Tmp.Host,*this) == false)
- return _error->Error("Problem with SelectFile %s",PackageFile.c_str());
-
- // Store the IMS information
- pkgCache::PkgFileIterator File = Gen.GetCurFile();
- pkgCacheGenerator::Dynamic<pkgCache::PkgFileIterator> DynFile(File);
- File->Size = Pkg.FileSize();
- File->mtime = Pkg.ModificationTime();
-
- if (Gen.MergeList(Parser) == false)
- return _error->Error("Problem with MergeList %s",PackageFile.c_str());
-
- // Check the release file
- string ReleaseFile = debReleaseIndex(URI,Dist).MetaIndexFile("InRelease");
- bool releaseExists = false;
- if (FileExists(ReleaseFile) == true)
- releaseExists = true;
- else
- ReleaseFile = debReleaseIndex(URI,Dist).MetaIndexFile("Release");
-
- if (releaseExists == true || FileExists(ReleaseFile) == true)
- {
- FileFd Rel;
- // Beware: The 'Release' file might be clearsigned in case the
- // signature for an 'InRelease' file couldn't be checked
- if (OpenMaybeClearSignedFile(ReleaseFile, Rel) == false)
- return false;
-
- if (_error->PendingError() == true)
- return false;
- Parser.LoadReleaseInfo(File,Rel,Section);
- }
-
- return true;
-}
- /*}}}*/
-// PackagesIndex::FindInCache - Find this index /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgCache::PkgFileIterator debPackagesIndex::FindInCache(pkgCache &Cache) const
-{
- string FileName = IndexFile("Packages");
- pkgCache::PkgFileIterator File = Cache.FileBegin();
- for (; File.end() == false; ++File)
- {
- if (File.FileName() == NULL || FileName != File.FileName())
- continue;
-
- struct stat St;
- if (stat(File.FileName(),&St) != 0)
- {
- if (_config->FindB("Debug::pkgCacheGen", false))
- std::clog << "PackagesIndex::FindInCache - stat failed on " << File.FileName() << std::endl;
- return pkgCache::PkgFileIterator(Cache);
- }
- if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime)
- {
- if (_config->FindB("Debug::pkgCacheGen", false))
- std::clog << "PackagesIndex::FindInCache - size (" << St.st_size << " <> " << File->Size
- << ") or mtime (" << St.st_mtime << " <> " << File->mtime
- << ") doesn't match for " << File.FileName() << std::endl;
- return pkgCache::PkgFileIterator(Cache);
- }
- return File;
- }
-
- return File;
+ return 0;
}
/*}}}*/
-
-// TranslationsIndex::debTranslationsIndex - Contructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-debTranslationsIndex::debTranslationsIndex(std::string const &URI, std::string const &Dist,
- std::string const &Section, std::string const &Translation) :
- pkgIndexFile(true), URI(URI), Dist(Dist), Section(Section),
- Language(Translation)
+// Translation-* Index /*{{{*/
+debTranslationsIndex::debTranslationsIndex(IndexTarget const &Target) :
+ pkgDebianIndexTargetFile(Target, true), d(NULL)
{}
- /*}}}*/
-// TranslationIndex::Trans* - Return the URI to the translation files /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string debTranslationsIndex::IndexFile(const char *Type) const
+bool debTranslationsIndex::HasPackages() const
{
- string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type));
-
- std::vector<std::string> types = APT::Configuration::getCompressionTypes();
- for (std::vector<std::string>::const_iterator t = types.begin(); t != types.end(); ++t)
- {
- string p = s + '.' + *t;
- if (FileExists(p))
- return p;
- }
- return s;
+ return Exists();
}
-string debTranslationsIndex::IndexURI(const char *Type) const
+bool debTranslationsIndex::OpenListFile(FileFd &Pkg, std::string const &FileName)
{
- string Res;
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Res = URI + Dist;
- else
- Res = URI;
- }
- else
- Res = URI + "dists/" + Dist + '/' + Section +
- "/i18n/Translation-";
-
- Res += Type;
- return Res;
-}
- /*}}}*/
-// TranslationsIndex::Describe - Give a descriptive path to the index /*{{{*/
-// ---------------------------------------------------------------------
-/* This should help the user find the index in the sources.list and
- in the filesystem for problem solving */
-string debTranslationsIndex::Describe(bool Short) const
-{
- std::string S;
- if (Short == true)
- strprintf(S,"%s",Info(TranslationFile().c_str()).c_str());
- else
- strprintf(S,"%s (%s)",Info(TranslationFile().c_str()).c_str(),
- IndexFile(Language.c_str()).c_str());
- return S;
-}
- /*}}}*/
-// TranslationsIndex::Info - One liner describing the index URI /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string debTranslationsIndex::Info(const char *Type) const
-{
- string Info = ::URI::NoUserPassword(URI) + ' ';
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Info += Dist;
- }
- else
- Info += Dist + '/' + Section;
- Info += " ";
- Info += Type;
- return Info;
+ if (FileExists(FileName))
+ return pkgDebianIndexTargetFile::OpenListFile(Pkg, FileName);
+ return true;
}
- /*}}}*/
-bool debTranslationsIndex::HasPackages() const /*{{{*/
+uint8_t debTranslationsIndex::GetIndexFlags() const
{
- return FileExists(IndexFile(Language.c_str()));
+ return pkgCache::Flag::NotSource | pkgCache::Flag::NoPackages;
}
- /*}}}*/
-// TranslationsIndex::Exists - Check if the index is available /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debTranslationsIndex::Exists() const
+std::string debTranslationsIndex::GetArchitecture() const
{
- return FileExists(IndexFile(Language.c_str()));
+ return std::string();
}
- /*}}}*/
-// TranslationsIndex::Size - Return the size of the index /*{{{*/
-// ---------------------------------------------------------------------
-/* This is really only used for progress reporting. */
-unsigned long debTranslationsIndex::Size() const
+pkgCacheListParser * debTranslationsIndex::CreateListParser(FileFd &Pkg)
{
- unsigned long size = 0;
-
- /* we need to ignore errors here; if the lists are absent, just return 0 */
+ if (Pkg.IsOpen() == false)
+ return NULL;
_error->PushToStack();
-
- FileFd f(IndexFile(Language.c_str()), FileFd::ReadOnly, FileFd::Extension);
- if (!f.Failed())
- size = f.Size();
-
- if (_error->PendingError() == true)
- size = 0;
- _error->RevertToStack();
-
- return size;
+ pkgCacheListParser * const Parser = new debTranslationsParser(&Pkg);
+ bool const newError = _error->PendingError();
+ _error->MergeWithStack();
+ return newError ? NULL : Parser;
}
/*}}}*/
-// TranslationsIndex::Merge - Load the index file into a cache /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
-{
- // Check the translation file, if in use
- string TranslationFile = IndexFile(Language.c_str());
- if (FileExists(TranslationFile))
- {
- FileFd Trans(TranslationFile,FileFd::ReadOnly, FileFd::Extension);
- debTranslationsParser TransParser(&Trans);
- if (_error->PendingError() == true)
- return false;
-
- if (Prog != NULL)
- Prog->SubProgress(0, Info(TranslationFile.c_str()));
- if (Gen.SelectFile(TranslationFile,string(),*this) == false)
- return _error->Error("Problem with SelectFile %s",TranslationFile.c_str());
-
- // Store the IMS information
- pkgCache::PkgFileIterator TransFile = Gen.GetCurFile();
- TransFile->Size = Trans.FileSize();
- TransFile->mtime = Trans.ModificationTime();
-
- if (Gen.MergeList(TransParser) == false)
- return _error->Error("Problem with MergeList %s",TranslationFile.c_str());
- }
-
- return true;
-}
- /*}}}*/
-// TranslationsIndex::FindInCache - Find this index /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgCache::PkgFileIterator debTranslationsIndex::FindInCache(pkgCache &Cache) const
+// dpkg/status Index /*{{{*/
+debStatusIndex::debStatusIndex(std::string const &File) : pkgDebianIndexRealFile(File, true), d(NULL)
{
- string FileName = IndexFile(Language.c_str());
-
- pkgCache::PkgFileIterator File = Cache.FileBegin();
- for (; File.end() == false; ++File)
- {
- if (FileName != File.FileName())
- continue;
-
- struct stat St;
- if (stat(File.FileName(),&St) != 0)
- {
- if (_config->FindB("Debug::pkgCacheGen", false))
- std::clog << "TranslationIndex::FindInCache - stat failed on " << File.FileName() << std::endl;
- return pkgCache::PkgFileIterator(Cache);
- }
- if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime)
- {
- if (_config->FindB("Debug::pkgCacheGen", false))
- std::clog << "TranslationIndex::FindInCache - size (" << St.st_size << " <> " << File->Size
- << ") or mtime (" << St.st_mtime << " <> " << File->mtime
- << ") doesn't match for " << File.FileName() << std::endl;
- return pkgCache::PkgFileIterator(Cache);
- }
- return File;
- }
- return File;
}
- /*}}}*/
-// StatusIndex::debStatusIndex - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-debStatusIndex::debStatusIndex(string File) : pkgIndexFile(true), File(File)
+std::string debStatusIndex::GetArchitecture() const
{
+ return std::string();
}
- /*}}}*/
-// StatusIndex::Size - Return the size of the index /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-unsigned long debStatusIndex::Size() const
-{
- struct stat S;
- if (stat(File.c_str(),&S) != 0)
- return 0;
- return S.st_size;
-}
- /*}}}*/
-// StatusIndex::Merge - Load the index file into a cache /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debStatusIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
-{
- FileFd Pkg(File,FileFd::ReadOnly, FileFd::Extension);
- if (_error->PendingError() == true)
- return false;
- debListParser Parser(&Pkg);
- if (_error->PendingError() == true)
- return false;
-
- if (Prog != NULL)
- Prog->SubProgress(0,File);
- if (Gen.SelectFile(File,string(),*this,pkgCache::Flag::NotSource) == false)
- return _error->Error("Problem with SelectFile %s",File.c_str());
-
- // Store the IMS information
- pkgCache::PkgFileIterator CFile = Gen.GetCurFile();
- CFile->Size = Pkg.FileSize();
- CFile->mtime = Pkg.ModificationTime();
- map_stringitem_t const storage = Gen.StoreString(pkgCacheGenerator::MIXED, "now");
- CFile->Archive = storage;
-
- if (Gen.MergeList(Parser) == false)
- return _error->Error("Problem with MergeList %s",File.c_str());
- return true;
-}
- /*}}}*/
-// StatusIndex::FindInCache - Find this index /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgCache::PkgFileIterator debStatusIndex::FindInCache(pkgCache &Cache) const
+std::string debStatusIndex::GetComponent() const
{
- pkgCache::PkgFileIterator File = Cache.FileBegin();
- for (; File.end() == false; ++File)
- {
- if (this->File != File.FileName())
- continue;
-
- struct stat St;
- if (stat(File.FileName(),&St) != 0)
- {
- if (_config->FindB("Debug::pkgCacheGen", false))
- std::clog << "StatusIndex::FindInCache - stat failed on " << File.FileName() << std::endl;
- return pkgCache::PkgFileIterator(Cache);
- }
- if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime)
- {
- if (_config->FindB("Debug::pkgCacheGen", false))
- std::clog << "StatusIndex::FindInCache - size (" << St.st_size << " <> " << File->Size
- << ") or mtime (" << St.st_mtime << " <> " << File->mtime
- << ") doesn't match for " << File.FileName() << std::endl;
- return pkgCache::PkgFileIterator(Cache);
- }
- return File;
- }
- return File;
+ return "now";
}
- /*}}}*/
-// StatusIndex::Exists - Check if the index is available /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-APT_CONST bool debStatusIndex::Exists() const
+uint8_t debStatusIndex::GetIndexFlags() const
{
- // Abort if the file does not exist.
- return true;
+ return pkgCache::Flag::NotSource;
}
/*}}}*/
-
-// debDebPkgFile - Single .deb file /*{{{*/
-debDebPkgFileIndex::debDebPkgFileIndex(std::string DebFile)
- : pkgIndexFile(true), DebFile(DebFile)
-{
- DebFileFullPath = flAbsPath(DebFile);
-}
-
-std::string debDebPkgFileIndex::ArchiveURI(std::string /*File*/) const
-{
- return "file:" + DebFileFullPath;
-}
-
-bool debDebPkgFileIndex::Exists() const
+// DebPkgFile Index - a single .deb file as an index /*{{{*/
+debDebPkgFileIndex::debDebPkgFileIndex(std::string const &DebFile)
+ : pkgDebianIndexRealFile(DebFile, true), d(NULL), DebFile(DebFile)
{
- return FileExists(DebFile);
}
bool debDebPkgFileIndex::GetContent(std::ostream &content, std::string const &debfile)
{
+ struct stat Buf;
+ if (stat(debfile.c_str(), &Buf) != 0)
+ return false;
+
// get the control data out of the deb file via dpkg-deb -I
std::string dpkg = _config->Find("Dir::Bin::dpkg","dpkg-deb");
std::vector<const char *> Args;
@@ -716,106 +183,86 @@ bool debDebPkgFileIndex::GetContent(std::ostream &content, std::string const &de
ExecWait(Child, "Popen");
content << "Filename: " << debfile << "\n";
- struct stat Buf;
- if (stat(debfile.c_str(), &Buf) != 0)
- return false;
content << "Size: " << Buf.st_size << "\n";
return true;
}
-bool debDebPkgFileIndex::Merge(pkgCacheGenerator& Gen, OpProgress* Prog) const
+bool debDebPkgFileIndex::OpenListFile(FileFd &Pkg, std::string const &FileName)
{
- if(Prog)
- Prog->SubProgress(0, "Reading deb file");
-
// write the control data to a tempfile
- SPtr<FileFd> DebControl = GetTempFile("deb-file-" + flNotDir(DebFile));
- if(DebControl == NULL)
+ if (GetTempFile("deb-file-" + flNotDir(FileName), true, &Pkg) == NULL)
return false;
std::ostringstream content;
- if (GetContent(content, DebFile) == false)
+ if (GetContent(content, FileName) == false)
return false;
std::string const contentstr = content.str();
- DebControl->Write(contentstr.c_str(), contentstr.length());
- // rewind for the listparser
- DebControl->Seek(0);
-
- // and give it to the list parser
- debDebFileParser Parser(DebControl, DebFile);
- if(Gen.SelectFile(DebFile, "local", *this) == false)
- return _error->Error("Problem with SelectFile %s", DebFile.c_str());
-
- pkgCache::PkgFileIterator File = Gen.GetCurFile();
- File->Size = DebControl->Size();
- File->mtime = DebControl->ModificationTime();
-
- if (Gen.MergeList(Parser) == false)
- return _error->Error("Problem with MergeLister for %s", DebFile.c_str());
-
+ if (contentstr.empty())
+ return true;
+ if (Pkg.Write(contentstr.c_str(), contentstr.length()) == false || Pkg.Seek(0) == false)
+ return false;
return true;
}
+pkgCacheListParser * debDebPkgFileIndex::CreateListParser(FileFd &Pkg)
+{
+ if (Pkg.IsOpen() == false)
+ return NULL;
+ _error->PushToStack();
+ pkgCacheListParser * const Parser = new debDebFileParser(&Pkg, DebFile);
+ bool const newError = _error->PendingError();
+ _error->MergeWithStack();
+ return newError ? NULL : Parser;
+}
+uint8_t debDebPkgFileIndex::GetIndexFlags() const
+{
+ return pkgCache::Flag::LocalSource;
+}
+std::string debDebPkgFileIndex::GetArchitecture() const
+{
+ return std::string();
+}
+std::string debDebPkgFileIndex::GetComponent() const
+{
+ return "local-deb";
+}
pkgCache::PkgFileIterator debDebPkgFileIndex::FindInCache(pkgCache &Cache) const
{
+ std::string const FileName = IndexFileName();
pkgCache::PkgFileIterator File = Cache.FileBegin();
for (; File.end() == false; ++File)
{
- if (File.FileName() == NULL || DebFile != File.FileName())
+ if (File.FileName() == NULL || FileName != File.FileName())
continue;
-
- return File;
+ // we can't do size checks here as file size != content size
+ return File;
}
-
- return File;
-}
-unsigned long debDebPkgFileIndex::Size() const
-{
- struct stat buf;
- if(stat(DebFile.c_str(), &buf) != 0)
- return 0;
- return buf.st_size;
-}
- /*}}}*/
-// debDscFileIndex stuff
-debDscFileIndex::debDscFileIndex(std::string &DscFile)
- : pkgIndexFile(true), DscFile(DscFile)
-{
-}
-
-bool debDscFileIndex::Exists() const
-{
- return FileExists(DscFile);
+ return File;
}
-unsigned long debDscFileIndex::Size() const
+ /*}}}*/
+// DscFile Index - a single .dsc file as an index /*{{{*/
+debDscFileIndex::debDscFileIndex(std::string const &DscFile)
+ : pkgDebianIndexRealFile(DscFile, true), d(NULL)
{
- struct stat buf;
- if(stat(DscFile.c_str(), &buf) == 0)
- return buf.st_size;
- return 0;
}
-
-// DscFileIndex::CreateSrcParser - Get a parser for the .dsc file /*{{{*/
pkgSrcRecords::Parser *debDscFileIndex::CreateSrcParser() const
{
- if (!FileExists(DscFile))
+ if (Exists() == false)
return NULL;
-
- return new debDscRecordParser(DscFile,this);
+ return new debDscRecordParser(File, this);
}
/*}}}*/
+
// Index File types for Debian /*{{{*/
class APT_HIDDEN debIFTypeSrc : public pkgIndexFile::Type
{
public:
-
debIFTypeSrc() {Label = "Debian Source Index";};
};
class APT_HIDDEN debIFTypePkg : public pkgIndexFile::Type
{
public:
-
- virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
+ virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator const &File) const APT_OVERRIDE
{
return new debRecordParser(File.FileName(),*File.Cache());
};
@@ -829,8 +276,7 @@ class APT_HIDDEN debIFTypeTrans : public debIFTypePkg
class APT_HIDDEN debIFTypeStatus : public pkgIndexFile::Type
{
public:
-
- virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
+ virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator const &File) const APT_OVERRIDE
{
return new debRecordParser(File.FileName(),*File.Cache());
};
@@ -839,29 +285,29 @@ class APT_HIDDEN debIFTypeStatus : public pkgIndexFile::Type
class APT_HIDDEN debIFTypeDebPkgFile : public pkgIndexFile::Type
{
public:
- virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
+ virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator const &File) const APT_OVERRIDE
{
return new debDebFileRecordParser(File.FileName());
};
- debIFTypeDebPkgFile() {Label = "deb Package file";};
+ debIFTypeDebPkgFile() {Label = "Debian deb file";};
};
class APT_HIDDEN debIFTypeDscFile : public pkgIndexFile::Type
{
public:
- virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string DscFile) const
+ virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string const &DscFile) const APT_OVERRIDE
{
return new debDscRecordParser(DscFile, NULL);
};
- debIFTypeDscFile() {Label = "dsc File Source Index";};
+ debIFTypeDscFile() {Label = "Debian dsc file";};
};
class APT_HIDDEN debIFTypeDebianSourceDir : public pkgIndexFile::Type
{
public:
- virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string SourceDir) const
+ virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string const &SourceDir) const APT_OVERRIDE
{
- return new debDscRecordParser(SourceDir + string("/debian/control"), NULL);
+ return new debDscRecordParser(SourceDir + std::string("/debian/control"), NULL);
};
- debIFTypeDebianSourceDir() {Label = "debian/control File Source Index";};
+ debIFTypeDebianSourceDir() {Label = "Debian control file";};
};
APT_HIDDEN debIFTypeSrc _apt_Src;
@@ -909,3 +355,4 @@ debTranslationsIndex::~debTranslationsIndex() {}
debSourcesIndex::~debSourcesIndex() {}
debDebPkgFileIndex::~debDebPkgFileIndex() {}
+debDscFileIndex::~debDscFileIndex() {}
diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h
index 1e5882071..dc75a01ab 100644
--- a/apt-pkg/deb/debindexfile.h
+++ b/apt-pkg/deb/debindexfile.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debindexfile.h,v 1.3.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Debian Index Files
@@ -27,155 +26,105 @@ class OpProgress;
class pkgAcquire;
class pkgCacheGenerator;
-
-class APT_HIDDEN debStatusIndex : public pkgIndexFile
+class debStatusIndex : public pkgDebianIndexRealFile
{
- /** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
+protected:
+ virtual std::string GetArchitecture() const APT_OVERRIDE;
+ virtual std::string GetComponent() const APT_OVERRIDE;
+ virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
- protected:
- std::string File;
+public:
- public:
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
- virtual const Type *GetType() const APT_CONST;
-
- // Interface for acquire
- virtual std::string Describe(bool /*Short*/) const {return File;};
-
// Interface for the Cache Generator
- virtual bool Exists() const;
- virtual bool HasPackages() const {return true;};
- virtual unsigned long Size() const;
- virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
- bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog, unsigned long const Flag) const;
- virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
-
- debStatusIndex(std::string File);
+ virtual bool HasPackages() const APT_OVERRIDE {return true;};
+ // Abort if the file does not exist.
+ virtual bool Exists() const APT_OVERRIDE {return true;};
+
+ debStatusIndex(std::string const &File);
virtual ~debStatusIndex();
};
-
-class APT_HIDDEN debPackagesIndex : public pkgIndexFile
-{
- /** \brief dpointer placeholder (for later in case we need it) */
- void *d;
-
- std::string URI;
- std::string Dist;
- std::string Section;
- std::string Architecture;
- APT_HIDDEN std::string Info(const char *Type) const;
- APT_HIDDEN std::string IndexFile(const char *Type) const;
- APT_HIDDEN std::string IndexURI(const char *Type) const;
+class debPackagesIndex : public pkgDebianIndexTargetFile
+{
+ void * const d;
+protected:
+ virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
- public:
-
- virtual const Type *GetType() const APT_CONST;
+public:
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
// Stuff for accessing files on remote items
- virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const;
- virtual std::string ArchiveURI(std::string File) const {return URI + File;};
-
- // Interface for acquire
- virtual std::string Describe(bool Short) const;
-
+ virtual std::string ArchiveInfo(pkgCache::VerIterator const &Ver) const APT_OVERRIDE;
+
// Interface for the Cache Generator
- virtual bool Exists() const;
- virtual bool HasPackages() const {return true;};
- virtual unsigned long Size() const;
- virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
- virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
-
- debPackagesIndex(std::string const &URI, std::string const &Dist, std::string const &Section,
- bool const &Trusted, std::string const &Arch = "native");
+ virtual bool HasPackages() const APT_OVERRIDE {return true;};
+
+ debPackagesIndex(IndexTarget const &Target, bool const Trusted);
virtual ~debPackagesIndex();
};
-class APT_HIDDEN debTranslationsIndex : public pkgIndexFile
+class debTranslationsIndex : public pkgDebianIndexTargetFile
{
- /** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
+protected:
+ virtual std::string GetArchitecture() const APT_OVERRIDE;
+ virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
+ virtual bool OpenListFile(FileFd &Pkg, std::string const &FileName) APT_OVERRIDE;
+ APT_HIDDEN virtual pkgCacheListParser * CreateListParser(FileFd &Pkg) APT_OVERRIDE;
- std::string const URI;
- std::string const Dist;
- std::string const Section;
- std::string const Language;
+public:
- APT_HIDDEN std::string Info(const char *Type) const;
- APT_HIDDEN std::string IndexFile(const char *Type) const;
- APT_HIDDEN std::string IndexURI(const char *Type) const;
-
- APT_HIDDEN std::string TranslationFile() const {return std::string("Translation-").append(Language);};
-
- public:
-
- virtual const Type *GetType() const APT_CONST;
-
- // Interface for acquire
- virtual std::string Describe(bool Short) const;
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
// Interface for the Cache Generator
- virtual bool Exists() const;
- virtual bool HasPackages() const;
- virtual unsigned long Size() const;
- virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
- virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
+ virtual bool HasPackages() const APT_OVERRIDE;
- debTranslationsIndex(std::string const &URI,std::string const &Dist,std::string const &Section, std::string const &Language);
+ debTranslationsIndex(IndexTarget const &Target);
virtual ~debTranslationsIndex();
};
-class APT_HIDDEN debSourcesIndex : public pkgIndexFile
+class debSourcesIndex : public pkgDebianIndexTargetFile
{
- /** \brief dpointer placeholder (for later in case we need it) */
- void *d;
-
- std::string URI;
- std::string Dist;
- std::string Section;
-
- APT_HIDDEN std::string Info(const char *Type) const;
- APT_HIDDEN std::string IndexFile(const char *Type) const;
- APT_HIDDEN std::string IndexURI(const char *Type) const;
+ void * const d;
+ virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
+ virtual bool OpenListFile(FileFd &Pkg, std::string const &FileName) APT_OVERRIDE;
+ APT_HIDDEN virtual pkgCacheListParser * CreateListParser(FileFd &Pkg) APT_OVERRIDE;
public:
- virtual const Type *GetType() const APT_CONST;
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
// Stuff for accessing files on remote items
virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
- pkgSrcRecords::File const &File) const;
- virtual std::string ArchiveURI(std::string File) const {return URI + File;};
-
- // Interface for acquire
- virtual std::string Describe(bool Short) const;
+ pkgSrcRecords::File const &File) const APT_OVERRIDE;
// Interface for the record parsers
- virtual pkgSrcRecords::Parser *CreateSrcParser() const;
-
+ virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;
+
// Interface for the Cache Generator
- virtual bool Exists() const;
- virtual bool HasPackages() const {return false;};
- virtual unsigned long Size() const;
-
- debSourcesIndex(std::string URI,std::string Dist,std::string Section,bool Trusted);
+ virtual bool HasPackages() const APT_OVERRIDE {return false;};
+
+ debSourcesIndex(IndexTarget const &Target, bool const Trusted);
virtual ~debSourcesIndex();
};
-class APT_HIDDEN debDebPkgFileIndex : public pkgIndexFile
+class debDebPkgFileIndex : public pkgDebianIndexRealFile
{
- private:
- void *d;
+ void * const d;
std::string DebFile;
- std::string DebFileFullPath;
- public:
- virtual const Type *GetType() const APT_CONST;
+protected:
+ virtual std::string GetComponent() const APT_OVERRIDE;
+ virtual std::string GetArchitecture() const APT_OVERRIDE;
+ virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
+ virtual bool OpenListFile(FileFd &Pkg, std::string const &FileName) APT_OVERRIDE;
+ APT_HIDDEN virtual pkgCacheListParser * CreateListParser(FileFd &Pkg) APT_OVERRIDE;
- virtual std::string Describe(bool /*Short*/) const {
- return DebFile;
- }
+public:
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
/** get the control (file) content of the deb file
*
@@ -186,43 +135,31 @@ class APT_HIDDEN debDebPkgFileIndex : public pkgIndexFile
static bool GetContent(std::ostream &content, std::string const &debfile);
// Interface for the Cache Generator
- virtual bool Exists() const;
- virtual bool HasPackages() const {
- return true;
- };
- virtual unsigned long Size() const;
- virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
- virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
+ virtual bool HasPackages() const APT_OVERRIDE {return true;}
+ virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;
// Interface for acquire
- virtual std::string ArchiveURI(std::string /*File*/) const;
- debDebPkgFileIndex(std::string DebFile);
+ debDebPkgFileIndex(std::string const &DebFile);
virtual ~debDebPkgFileIndex();
};
-class APT_HIDDEN debDscFileIndex : public pkgIndexFile
+class debDscFileIndex : public pkgDebianIndexRealFile
{
- private:
- std::string DscFile;
+ void * const d;
public:
- virtual const Type *GetType() const APT_CONST;
- virtual pkgSrcRecords::Parser *CreateSrcParser() const;
- virtual bool Exists() const;
- virtual bool HasPackages() const {return false;};
- virtual unsigned long Size() const;
- virtual std::string Describe(bool /*Short*/) const {
- return DscFile;
- };
-
- debDscFileIndex(std::string &DscFile);
- virtual ~debDscFileIndex() {};
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
+ virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;
+ virtual bool HasPackages() const APT_OVERRIDE {return false;};
+
+ debDscFileIndex(std::string const &DscFile);
+ virtual ~debDscFileIndex();
};
-class APT_HIDDEN debDebianSourceDirIndex : public debDscFileIndex
+class debDebianSourceDirIndex : public debDscFileIndex
{
public:
- virtual const Type *GetType() const APT_CONST;
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
};
#endif
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index b80b57bc4..42eca8677 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -18,10 +18,8 @@
#include <apt-pkg/cachefilter.h>
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/crc-16.h>
#include <apt-pkg/md5.h>
-#include <apt-pkg/mmap.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/tagfile.h>
@@ -50,12 +48,9 @@ static debListParser::WordList PrioList[] = {
/* Provide an architecture and only this one and "all" will be accepted
in Step(), if no Architecture is given we will accept every arch
we would accept in general with checkArchitecture() */
-debListParser::debListParser(FileFd *File, string const &Arch) : Tags(File),
- Arch(Arch) {
- if (Arch == "native")
- this->Arch = _config->Find("APT::Architecture");
- Architectures = APT::Configuration::getArchitectures();
- MultiArchEnabled = Architectures.size() > 1;
+debListParser::debListParser(FileFd *File) :
+ pkgCacheListParser(), d(NULL), Tags(File)
+{
}
/*}}}*/
// ListParser::Package - Return the package name /*{{{*/
@@ -72,7 +67,8 @@ string debListParser::Package() {
// ---------------------------------------------------------------------
/* This will return the Architecture of the package this section describes */
string debListParser::Architecture() {
- return Section.FindS("Architecture");
+ std::string const Arch = Section.FindS("Architecture");
+ return Arch.empty() ? "none" : Arch;
}
/*}}}*/
// ListParser::ArchitectureAll /*{{{*/
@@ -97,14 +93,14 @@ unsigned char debListParser::ParseMultiArch(bool const showErrors) /*{{{*/
unsigned char MA;
string const MultiArch = Section.FindS("Multi-Arch");
if (MultiArch.empty() == true || MultiArch == "no")
- MA = pkgCache::Version::None;
+ MA = pkgCache::Version::No;
else if (MultiArch == "same") {
if (ArchitectureAll() == true)
{
if (showErrors == true)
_error->Warning("Architecture: all package '%s' can't be Multi-Arch: same",
Section.FindS("Package").c_str());
- MA = pkgCache::Version::None;
+ MA = pkgCache::Version::No;
}
else
MA = pkgCache::Version::Same;
@@ -118,7 +114,7 @@ unsigned char debListParser::ParseMultiArch(bool const showErrors) /*{{{*/
if (showErrors == true)
_error->Warning("Unknown Multi-Arch type '%s' for package '%s'",
MultiArch.c_str(), Section.FindS("Package").c_str());
- MA = pkgCache::Version::None;
+ MA = pkgCache::Version::No;
}
if (ArchitectureAll() == true)
@@ -141,7 +137,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
map_stringitem_t const idx = StoreString(pkgCacheGenerator::SECTION, Start, Stop - Start);
Ver->Section = idx;
}
-#if APT_PKG_ABI >= 413
// Parse the source package name
pkgCache::GrpIterator const G = Ver.ParentPkg().Group();
Ver->SourcePkgName = G->Name;
@@ -193,7 +188,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
}
}
}
-#endif
Ver->MultiArch = ParseMultiArch(true);
// Archive Size
@@ -209,23 +203,22 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
Ver->Priority = pkgCache::State::Extra;
}
- if (ParseDepends(Ver,"Depends",pkgCache::Dep::Depends) == false)
- return false;
if (ParseDepends(Ver,"Pre-Depends",pkgCache::Dep::PreDepends) == false)
return false;
- if (ParseDepends(Ver,"Suggests",pkgCache::Dep::Suggests) == false)
- return false;
- if (ParseDepends(Ver,"Recommends",pkgCache::Dep::Recommends) == false)
+ if (ParseDepends(Ver,"Depends",pkgCache::Dep::Depends) == false)
return false;
if (ParseDepends(Ver,"Conflicts",pkgCache::Dep::Conflicts) == false)
return false;
if (ParseDepends(Ver,"Breaks",pkgCache::Dep::DpkgBreaks) == false)
return false;
+ if (ParseDepends(Ver,"Recommends",pkgCache::Dep::Recommends) == false)
+ return false;
+ if (ParseDepends(Ver,"Suggests",pkgCache::Dep::Suggests) == false)
+ return false;
if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Replaces) == false)
return false;
if (ParseDepends(Ver,"Enhances",pkgCache::Dep::Enhances) == false)
return false;
-
// Obsolete.
if (ParseDepends(Ver,"Optional",pkgCache::Dep::Suggests) == false)
return false;
@@ -793,43 +786,23 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
return _error->Error("Problem parsing dependency %s",Tag);
size_t const found = Package.rfind(':');
- // If negative is unspecific it needs to apply on all architectures
- if (MultiArchEnabled == true && found == string::npos &&
- (Type == pkgCache::Dep::Conflicts ||
- Type == pkgCache::Dep::DpkgBreaks ||
- Type == pkgCache::Dep::Replaces))
+ if (found == string::npos || strcmp(Package.c_str() + found, ":any") == 0)
{
- for (std::vector<std::string>::const_iterator a = Architectures.begin();
- a != Architectures.end(); ++a)
- if (NewDepends(Ver,Package,*a,Version,Op,Type) == false)
- return false;
- if (NewDepends(Ver,Package,"none",Version,Op,Type) == false)
+ if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false)
return false;
}
- else if (found != string::npos &&
- strcmp(Package.c_str() + found, ":any") != 0)
+ else
{
string Arch = Package.substr(found+1, string::npos);
Package = Package.substr(0, found);
// Such dependencies are not supposed to be accepted …
- // … but this is probably the best thing to do.
+ // … but this is probably the best thing to do anyway
if (Arch == "native")
Arch = _config->Find("APT::Architecture");
- if (NewDepends(Ver,Package,Arch,Version,Op,Type) == false)
- return false;
- }
- else
- {
- if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false)
- return false;
- if ((Type == pkgCache::Dep::Conflicts ||
- Type == pkgCache::Dep::DpkgBreaks ||
- Type == pkgCache::Dep::Replaces) &&
- NewDepends(Ver, Package,
- (pkgArch != "none") ? "none" : _config->Find("APT::Architecture"),
- Version,Op,Type) == false)
+ if (NewDepends(Ver,Package,Arch,Version,Op | pkgCache::Dep::ArchSpecific,Type) == false)
return false;
}
+
if (Start == Stop)
break;
}
@@ -861,13 +834,13 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
} else if (archfound != string::npos) {
string OtherArch = Package.substr(archfound+1, string::npos);
Package = Package.substr(0, archfound);
- if (NewProvides(Ver, Package, OtherArch, Version) == false)
+ if (NewProvides(Ver, Package, OtherArch, Version, pkgCache::Flag::ArchSpecific) == false)
return false;
} else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign) {
- if (NewProvidesAllArch(Ver, Package, Version) == false)
+ if (NewProvidesAllArch(Ver, Package, Version, 0) == false)
return false;
} else {
- if (NewProvides(Ver, Package, Arch, Version) == false)
+ if (NewProvides(Ver, Package, Arch, Version, 0) == false)
return false;
}
@@ -879,26 +852,14 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed)
{
string const Package = string(Ver.ParentPkg().Name()).append(":").append("any");
- return NewProvidesAllArch(Ver, Package, Ver.VerStr());
+ return NewProvidesAllArch(Ver, Package, Ver.VerStr(), pkgCache::Flag::MultiArchImplicit);
}
else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign)
- return NewProvidesAllArch(Ver, Ver.ParentPkg().Name(), Ver.VerStr());
+ return NewProvidesAllArch(Ver, Ver.ParentPkg().Name(), Ver.VerStr(), pkgCache::Flag::MultiArchImplicit);
return true;
}
/*}}}*/
-// ListParser::NewProvides - add provides for all architectures /*{{{*/
-bool debListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, string const &Package,
- string const &Version) {
- for (std::vector<string>::const_iterator a = Architectures.begin();
- a != Architectures.end(); ++a)
- {
- if (NewProvides(Ver, Package, *a, Version) == false)
- return false;
- }
- return true;
-}
- /*}}}*/
// ListParser::GrabWord - Matches a word and returns /*{{{*/
// ---------------------------------------------------------------------
/* Looks for a word in a list of words - for ParseStatus */
@@ -921,71 +882,7 @@ bool debListParser::GrabWord(string Word,WordList *List,unsigned char &Out)
bool debListParser::Step()
{
iOffset = Tags.Offset();
- while (Tags.Step(Section) == true)
- {
- /* See if this is the correct Architecture, if it isn't then we
- drop the whole section. A missing arch tag only happens (in theory)
- inside the Status file, so that is a positive return */
- string const Architecture = Section.FindS("Architecture");
-
- if (Arch.empty() == true || Arch == "any" || MultiArchEnabled == false)
- {
- if (APT::Configuration::checkArchitecture(Architecture) == true)
- return true;
- /* parse version stanzas without an architecture only in the status file
- (and as misfortune bycatch flat-archives) */
- if ((Arch.empty() == true || Arch == "any") && Architecture.empty() == true)
- return true;
- }
- else
- {
- if (Architecture == Arch)
- return true;
-
- if (Architecture == "all" && Arch == _config->Find("APT::Architecture"))
- return true;
- }
-
- iOffset = Tags.Offset();
- }
- return false;
-}
- /*}}}*/
-// ListParser::LoadReleaseInfo - Load the release information /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
- FileFd &File, string component)
-{
- // apt-secure does no longer download individual (per-section) Release
- // file. to provide Component pinning we use the section name now
- map_stringitem_t const storage = StoreString(pkgCacheGenerator::MIXED, component);
- FileI->Component = storage;
-
- pkgTagFile TagFile(&File, File.Size());
- pkgTagSection Section;
- if (_error->PendingError() == true || TagFile.Step(Section) == false)
- return false;
-
- std::string data;
- #define APT_INRELEASE(TYPE, TAG, STORE) \
- data = Section.FindS(TAG); \
- if (data.empty() == false) \
- { \
- map_stringitem_t const storage = StoreString(pkgCacheGenerator::TYPE, data); \
- STORE = storage; \
- }
- APT_INRELEASE(MIXED, "Suite", FileI->Archive)
- APT_INRELEASE(MIXED, "Component", FileI->Component)
- APT_INRELEASE(VERSIONNUMBER, "Version", FileI->Version)
- APT_INRELEASE(MIXED, "Origin", FileI->Origin)
- APT_INRELEASE(MIXED, "Codename", FileI->Codename)
- APT_INRELEASE(MIXED, "Label", FileI->Label)
- #undef APT_INRELEASE
- Section.FindFlag("NotAutomatic", FileI->Flags, pkgCache::Flag::NotAutomatic);
- Section.FindFlag("ButAutomaticUpgrades", FileI->Flags, pkgCache::Flag::ButAutomaticUpgrades);
-
- return !_error->PendingError();
+ return Tags.Step(Section);
}
/*}}}*/
// ListParser::GetPrio - Convert the priority from a string /*{{{*/
@@ -1000,11 +897,10 @@ unsigned char debListParser::GetPrio(string Str)
return Out;
}
/*}}}*/
-#if APT_PKG_ABI >= 413
bool debListParser::SameVersion(unsigned short const Hash, /*{{{*/
pkgCache::VerIterator const &Ver)
{
- if (pkgCacheGenerator::ListParser::SameVersion(Hash, Ver) == false)
+ if (pkgCacheListParser::SameVersion(Hash, Ver) == false)
return false;
// status file has no (Download)Size, but all others are fair game
// status file is parsed last, so the first version we encounter is
@@ -1020,11 +916,9 @@ bool debListParser::SameVersion(unsigned short const Hash, /*{{{*/
return true;
}
/*}}}*/
-#endif
-
debDebFileParser::debDebFileParser(FileFd *File, std::string const &DebFile)
- : debListParser(File, ""), DebFile(DebFile)
+ : debListParser(File), DebFile(DebFile)
{
}
@@ -1034,7 +928,7 @@ bool debDebFileParser::UsePackage(pkgCache::PkgIterator &Pkg,
bool res = debListParser::UsePackage(Pkg, Ver);
// we use the full file path as a provides so that the file is found
// by its name
- if(NewProvidesAllArch(Ver, DebFile, Ver.VerStr()) == false)
+ if(NewProvides(Ver, DebFile, Pkg.Cache()->NativeArch(), Ver.VerStr(), 0) == false)
return false;
return res;
}
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 6279d8399..747e022d8 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -26,7 +26,7 @@
class FileFd;
-class APT_HIDDEN debListParser : public pkgCacheGenerator::ListParser
+class APT_HIDDEN debListParser : public pkgCacheListParser
{
public:
@@ -39,21 +39,17 @@ class APT_HIDDEN debListParser : public pkgCacheGenerator::ListParser
private:
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
protected:
pkgTagFile Tags;
pkgTagSection Section;
map_filesize_t iOffset;
- std::string Arch;
- std::vector<std::string> Architectures;
- bool MultiArchEnabled;
virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
bool ParseDepends(pkgCache::VerIterator &Ver,const char *Tag,
unsigned int Type);
bool ParseProvides(pkgCache::VerIterator &Ver);
- bool NewProvidesAllArch(pkgCache::VerIterator &Ver, std::string const &Package, std::string const &Version);
static bool GrabWord(std::string Word,WordList *List,unsigned char &Out);
APT_HIDDEN unsigned char ParseMultiArch(bool const showErrors);
@@ -62,27 +58,25 @@ class APT_HIDDEN debListParser : public pkgCacheGenerator::ListParser
APT_PUBLIC static unsigned char GetPrio(std::string Str);
// These all operate against the current section
- virtual std::string Package();
- virtual std::string Architecture();
- virtual bool ArchitectureAll();
- virtual std::string Version();
- virtual bool NewVersion(pkgCache::VerIterator &Ver);
- virtual std::string Description(std::string const &lang);
- virtual std::vector<std::string> AvailableDescriptionLanguages();
- virtual MD5SumValue Description_md5();
- virtual unsigned short VersionHash();
-#if APT_PKG_ABI >= 413
- virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
-#endif
+ virtual std::string Package() APT_OVERRIDE;
+ virtual std::string Architecture() APT_OVERRIDE;
+ virtual bool ArchitectureAll() APT_OVERRIDE;
+ virtual std::string Version() APT_OVERRIDE;
+ virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
+ virtual std::string Description(std::string const &lang) APT_OVERRIDE;
+ virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
+ virtual MD5SumValue Description_md5() APT_OVERRIDE;
+ virtual unsigned short VersionHash() APT_OVERRIDE;
+ virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
- pkgCache::VerIterator &Ver);
- virtual map_filesize_t Offset() {return iOffset;};
- virtual map_filesize_t Size() {return Section.size();};
+ pkgCache::VerIterator &Ver) APT_OVERRIDE;
+ virtual map_filesize_t Offset() APT_OVERRIDE {return iOffset;};
+ virtual map_filesize_t Size() APT_OVERRIDE {return Section.size();};
- virtual bool Step();
-
- bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File,
- std::string section);
+ virtual bool Step() APT_OVERRIDE;
+
+ bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
+ std::string const &section);
APT_PUBLIC static const char *ParseDepends(const char *Start,const char *Stop,
std::string &Package,std::string &Ver,unsigned int &Op);
@@ -99,7 +93,7 @@ class APT_HIDDEN debListParser : public pkgCacheGenerator::ListParser
APT_PUBLIC static const char *ConvertRelation(const char *I,unsigned int &Op);
- debListParser(FileFd *File, std::string const &Arch = "");
+ debListParser(FileFd *File);
virtual ~debListParser();
};
@@ -111,18 +105,18 @@ class APT_HIDDEN debDebFileParser : public debListParser
public:
debDebFileParser(FileFd *File, std::string const &DebFile);
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
- pkgCache::VerIterator &Ver);
+ pkgCache::VerIterator &Ver) APT_OVERRIDE;
};
class APT_HIDDEN debTranslationsParser : public debListParser
{
public:
// a translation can never be a real package
- virtual std::string Architecture() { return ""; }
- virtual std::string Version() { return ""; }
+ virtual std::string Architecture() APT_OVERRIDE { return ""; }
+ virtual std::string Version() APT_OVERRIDE { return ""; }
- debTranslationsParser(FileFd *File, std::string const &Arch = "")
- : debListParser(File, Arch) {};
+ debTranslationsParser(FileFd *File)
+ : debListParser(File) {};
};
#endif
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index aa2db8149..b2e9eeb00 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -1,5 +1,6 @@
#include <config.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/debmetaindex.h>
#include <apt-pkg/debindexfile.h>
#include <apt-pkg/strutl.h>
@@ -7,44 +8,50 @@
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/indexrecords.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/hashes.h>
-#include <apt-pkg/macros.h>
#include <apt-pkg/metaindex.h>
+#include <apt-pkg/pkgcachegen.h>
+#include <apt-pkg/tagfile.h>
+#include <apt-pkg/gpgv.h>
+#include <apt-pkg/macros.h>
-#include <string.h>
#include <map>
#include <string>
#include <utility>
#include <vector>
-#include <set>
#include <algorithm>
-using namespace std;
+#include <sys/stat.h>
+#include <string.h>
+
+#include <apti18n.h>
-string debReleaseIndex::Info(const char *Type, string const &Section, string const &Arch) const
+class APT_HIDDEN debReleaseIndexPrivate /*{{{*/
{
- string Info = ::URI::SiteOnly(URI) + ' ';
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Info += Dist;
- }
- else
+ public:
+ struct APT_HIDDEN debSectionEntry
{
- Info += Dist + '/' + Section;
- if (Arch.empty() != true)
- Info += " " + Arch;
- }
- Info += " ";
- Info += Type;
- return Info;
-}
+ std::string Name;
+ std::vector<std::string> Targets;
+ std::vector<std::string> Architectures;
+ std::vector<std::string> Languages;
+ };
+
+ std::vector<debSectionEntry> DebEntries;
+ std::vector<debSectionEntry> DebSrcEntries;
-string debReleaseIndex::MetaIndexInfo(const char *Type) const
+ metaIndex::TriState CheckValidUntil;
+ time_t ValidUntilMin;
+ time_t ValidUntilMax;
+
+ debReleaseIndexPrivate() : CheckValidUntil(metaIndex::TRI_UNSET), ValidUntilMin(0), ValidUntilMax(0) {}
+};
+ /*}}}*/
+// ReleaseIndex::MetaIndex* - display helpers /*{{{*/
+std::string debReleaseIndex::MetaIndexInfo(const char *Type) const
{
- string Info = ::URI::SiteOnly(URI) + ' ';
+ std::string Info = ::URI::ArchiveOnly(URI) + ' ';
if (Dist[Dist.size() - 1] == '/')
{
if (Dist != "/")
@@ -56,16 +63,20 @@ string debReleaseIndex::MetaIndexInfo(const char *Type) const
Info += Type;
return Info;
}
+std::string debReleaseIndex::Describe() const
+{
+ return MetaIndexInfo("Release");
+}
-string debReleaseIndex::MetaIndexFile(const char *Type) const
+std::string debReleaseIndex::MetaIndexFile(const char *Type) const
{
return _config->FindDir("Dir::State::lists") +
URItoFileName(MetaIndexURI(Type));
}
-string debReleaseIndex::MetaIndexURI(const char *Type) const
+std::string debReleaseIndex::MetaIndexURI(const char *Type) const
{
- string Res;
+ std::string Res;
if (Dist == "/")
Res = URI;
@@ -77,235 +88,410 @@ string debReleaseIndex::MetaIndexURI(const char *Type) const
Res += Type;
return Res;
}
-
-std::string debReleaseIndex::LocalFileName() const
+ /*}}}*/
+// ReleaseIndex Con- and Destructors /*{{{*/
+debReleaseIndex::debReleaseIndex(std::string const &URI, std::string const &Dist) :
+ metaIndex(URI, Dist, "deb"), d(new debReleaseIndexPrivate())
+{}
+debReleaseIndex::debReleaseIndex(std::string const &URI, std::string const &Dist, bool const pTrusted) :
+ metaIndex(URI, Dist, "deb"), d(new debReleaseIndexPrivate())
{
- // see if we have a InRelease file
- std::string PathInRelease = MetaIndexFile("InRelease");
- if (FileExists(PathInRelease))
- return PathInRelease;
-
- // and if not return the normal one
- if (FileExists(PathInRelease))
- return MetaIndexFile("Release");
-
- return "";
+ Trusted = pTrusted ? TRI_YES : TRI_NO;
}
-
-string debReleaseIndex::IndexURISuffix(const char *Type, string const &Section, string const &Arch) const
-{
- string Res ="";
- if (Dist[Dist.size() - 1] != '/')
- {
- if (Arch == "native")
- Res += Section + "/binary-" + _config->Find("APT::Architecture") + '/';
- else
- Res += Section + "/binary-" + Arch + '/';
- }
- return Res + Type;
+debReleaseIndex::~debReleaseIndex() {
+ if (d != NULL)
+ delete d;
}
-
-
-string debReleaseIndex::IndexURI(const char *Type, string const &Section, string const &Arch) const
+ /*}}}*/
+// ReleaseIndex::GetIndexTargets /*{{{*/
+static void GetIndexTargetsFor(char const * const Type, std::string const &URI, std::string const &Dist,
+ std::vector<debReleaseIndexPrivate::debSectionEntry> const &entries,
+ std::vector<IndexTarget> &IndexTargets)
{
- if (Dist[Dist.size() - 1] == '/')
+ bool const flatArchive = (Dist[Dist.length() - 1] == '/');
+ std::string baseURI = URI;
+ if (flatArchive)
{
- string Res;
if (Dist != "/")
- Res = URI + Dist;
- else
- Res = URI;
- return Res + Type;
+ baseURI += Dist;
}
else
- return URI + "dists/" + Dist + '/' + IndexURISuffix(Type, Section, Arch);
- }
+ baseURI += "dists/" + Dist + "/";
+ std::string const Release = (Dist == "/") ? "" : Dist;
+ std::string const Site = ::URI::ArchiveOnly(URI);
+
+ bool const GzipIndex = _config->FindB("Acquire::GzipIndexes", false);
+ for (std::vector<debReleaseIndexPrivate::debSectionEntry>::const_iterator E = entries.begin(); E != entries.end(); ++E)
+ {
+ for (std::vector<std::string>::const_iterator T = E->Targets.begin(); T != E->Targets.end(); ++T)
+ {
+#define APT_T_CONFIG(X) _config->Find(std::string("Acquire::IndexTargets::") + Type + "::" + *T + "::" + (X))
+ std::string const tplMetaKey = APT_T_CONFIG(flatArchive ? "flatMetaKey" : "MetaKey");
+ std::string const tplShortDesc = APT_T_CONFIG("ShortDescription");
+ std::string const tplLongDesc = "$(SITE) " + APT_T_CONFIG(flatArchive ? "flatDescription" : "Description");
+ bool const IsOptional = _config->FindB(std::string("Acquire::IndexTargets::") + Type + "::" + *T + "::Optional", true);
+ bool const KeepCompressed = _config->FindB(std::string("Acquire::IndexTargets::") + Type + "::" + *T + "::KeepCompressed", GzipIndex);
+#undef APT_T_CONFIG
+ if (tplMetaKey.empty())
+ continue;
+
+ for (std::vector<std::string>::const_iterator L = E->Languages.begin(); L != E->Languages.end(); ++L)
+ {
+ if (*L == "none" && tplMetaKey.find("$(LANGUAGE)") != std::string::npos)
+ continue;
+
+ for (std::vector<std::string>::const_iterator A = E->Architectures.begin(); A != E->Architectures.end(); ++A)
+ {
-string debReleaseIndex::SourceIndexURISuffix(const char *Type, const string &Section) const
+ std::map<std::string, std::string> Options;
+ Options.insert(std::make_pair("SITE", Site));
+ Options.insert(std::make_pair("RELEASE", Release));
+ if (tplMetaKey.find("$(COMPONENT)") != std::string::npos)
+ Options.insert(std::make_pair("COMPONENT", E->Name));
+ if (tplMetaKey.find("$(LANGUAGE)") != std::string::npos)
+ Options.insert(std::make_pair("LANGUAGE", *L));
+ if (tplMetaKey.find("$(ARCHITECTURE)") != std::string::npos)
+ Options.insert(std::make_pair("ARCHITECTURE", *A));
+ Options.insert(std::make_pair("BASE_URI", baseURI));
+ Options.insert(std::make_pair("REPO_URI", URI));
+ Options.insert(std::make_pair("TARGET_OF", "deb-src"));
+ Options.insert(std::make_pair("CREATED_BY", *T));
+
+ std::string MetaKey = tplMetaKey;
+ std::string ShortDesc = tplShortDesc;
+ std::string LongDesc = tplLongDesc;
+ for (std::map<std::string, std::string>::const_iterator O = Options.begin(); O != Options.end(); ++O)
+ {
+ MetaKey = SubstVar(MetaKey, std::string("$(") + O->first + ")", O->second);
+ ShortDesc = SubstVar(ShortDesc, std::string("$(") + O->first + ")", O->second);
+ LongDesc = SubstVar(LongDesc, std::string("$(") + O->first + ")", O->second);
+ }
+ IndexTarget Target(
+ MetaKey,
+ ShortDesc,
+ LongDesc,
+ Options.find("BASE_URI")->second + MetaKey,
+ IsOptional,
+ KeepCompressed,
+ Options
+ );
+ IndexTargets.push_back(Target);
+
+ if (tplMetaKey.find("$(ARCHITECTURE)") == std::string::npos)
+ break;
+
+ }
+
+ if (tplMetaKey.find("$(LANGUAGE)") == std::string::npos)
+ break;
+
+ }
+
+ }
+ }
+}
+std::vector<IndexTarget> debReleaseIndex::GetIndexTargets() const
{
- string Res ="";
- if (Dist[Dist.size() - 1] != '/')
- Res += Section + "/source/";
- return Res + Type;
+ std::vector<IndexTarget> IndexTargets;
+ GetIndexTargetsFor("deb-src", URI, Dist, d->DebSrcEntries, IndexTargets);
+ GetIndexTargetsFor("deb", URI, Dist, d->DebEntries, IndexTargets);
+ return IndexTargets;
}
-
-string debReleaseIndex::SourceIndexURI(const char *Type, const string &Section) const
+ /*}}}*/
+void debReleaseIndex::AddComponent(bool const isSrc, std::string const &Name,/*{{{*/
+ std::vector<std::string> const &Targets,
+ std::vector<std::string> const &Architectures,
+ std::vector<std::string> Languages)
{
- string Res;
- if (Dist[Dist.size() - 1] == '/')
- {
- if (Dist != "/")
- Res = URI + Dist;
- else
- Res = URI;
- return Res + Type;
- }
+ if (Languages.empty() == true)
+ Languages.push_back("none");
+ debReleaseIndexPrivate::debSectionEntry const entry = {
+ Name, Targets, Architectures, Languages
+ };
+ if (isSrc)
+ d->DebSrcEntries.push_back(entry);
else
- return URI + "dists/" + Dist + "/" + SourceIndexURISuffix(Type, Section);
+ d->DebEntries.push_back(entry);
}
+ /*}}}*/
-string debReleaseIndex::TranslationIndexURISuffix(const char *Type, const string &Section) const
+bool debReleaseIndex::Load(std::string const &Filename, std::string * const ErrorText)/*{{{*/
{
- string Res ="";
- if (Dist[Dist.size() - 1] != '/')
- Res += Section + "/i18n/Translation-";
- return Res + Type;
-}
+ LoadedSuccessfully = TRI_NO;
+ FileFd Fd;
+ if (OpenMaybeClearSignedFile(Filename, Fd) == false)
+ return false;
-string debReleaseIndex::TranslationIndexURI(const char *Type, const string &Section) const
-{
- string Res;
- if (Dist[Dist.size() - 1] == '/')
+ pkgTagFile TagFile(&Fd, Fd.Size());
+ if (_error->PendingError() == true)
{
- if (Dist != "/")
- Res = URI + Dist;
- else
- Res = URI;
- return Res + Type;
+ if (ErrorText != NULL)
+ strprintf(*ErrorText, _("Unable to parse Release file %s"),Filename.c_str());
+ return false;
}
- else
- return URI + "dists/" + Dist + "/" + TranslationIndexURISuffix(Type, Section);
-}
-debReleaseIndex::debReleaseIndex(string const &URI, string const &Dist) :
- metaIndex(URI, Dist, "deb"), Trusted(CHECK_TRUST)
-{}
+ pkgTagSection Section;
+ const char *Start, *End;
+ if (TagFile.Step(Section) == false)
+ {
+ if (ErrorText != NULL)
+ strprintf(*ErrorText, _("No sections in Release file %s"), Filename.c_str());
+ return false;
+ }
+ // FIXME: find better tag name
+ SupportsAcquireByHash = Section.FindB("Acquire-By-Hash", false);
-debReleaseIndex::debReleaseIndex(string const &URI, string const &Dist, bool const Trusted) :
- metaIndex(URI, Dist, "deb") {
- SetTrusted(Trusted);
-}
+ Suite = Section.FindS("Suite");
+ Codename = Section.FindS("Codename");
-debReleaseIndex::~debReleaseIndex() {
- for (map<string, vector<debSectionEntry const*> >::const_iterator A = ArchEntries.begin();
- A != ArchEntries.end(); ++A)
- for (vector<const debSectionEntry *>::const_iterator S = A->second.begin();
- S != A->second.end(); ++S)
- delete *S;
-}
+ bool FoundHashSum = false;
+ for (int i=0;HashString::SupportedHashes()[i] != NULL; i++)
+ {
+ if (!Section.Find(HashString::SupportedHashes()[i], Start, End))
+ continue;
+
+ std::string Name;
+ std::string Hash;
+ unsigned long long Size;
+ while (Start < End)
+ {
+ if (!parseSumData(Start, End, Name, Hash, Size))
+ return false;
+
+ if (Entries.find(Name) == Entries.end())
+ {
+ metaIndex::checkSum *Sum = new metaIndex::checkSum;
+ Sum->MetaKeyFilename = Name;
+ Sum->Size = Size;
+ Sum->Hashes.FileSize(Size);
+ APT_IGNORE_DEPRECATED(Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);)
+ Entries[Name] = Sum;
+ }
+ Entries[Name]->Hashes.push_back(HashString(HashString::SupportedHashes()[i],Hash));
+ FoundHashSum = true;
+ }
+ }
+
+ if(FoundHashSum == false)
+ {
+ if (ErrorText != NULL)
+ strprintf(*ErrorText, _("No Hash entry in Release file %s"), Filename.c_str());
+ return false;
+ }
+
+ std::string const StrDate = Section.FindS("Date");
+ if (RFC1123StrToTime(StrDate.c_str(), Date) == false)
+ {
+ if (ErrorText != NULL)
+ strprintf(*ErrorText, _("Invalid 'Date' entry in Release file %s"), Filename.c_str());
+ return false;
+ }
+
+ bool CheckValidUntil = _config->FindB("Acquire::Check-Valid-Until", true);
+ if (d->CheckValidUntil == metaIndex::TRI_NO)
+ CheckValidUntil = false;
+ else if (d->CheckValidUntil == metaIndex::TRI_YES)
+ CheckValidUntil = true;
+
+ if (CheckValidUntil == true)
+ {
+ std::string const Label = Section.FindS("Label");
+ std::string const StrValidUntil = Section.FindS("Valid-Until");
-vector <IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const {
- vector <IndexTarget *>* IndexTargets = new vector <IndexTarget *>;
-
- map<string, vector<debSectionEntry const*> >::const_iterator const src = ArchEntries.find("source");
- if (src != ArchEntries.end()) {
- vector<debSectionEntry const*> const SectionEntries = src->second;
- for (vector<debSectionEntry const*>::const_iterator I = SectionEntries.begin();
- I != SectionEntries.end(); ++I) {
- IndexTarget * Target = new IndexTarget();
- Target->ShortDesc = "Sources";
- Target->MetaKey = SourceIndexURISuffix(Target->ShortDesc.c_str(), (*I)->Section);
- Target->URI = SourceIndexURI(Target->ShortDesc.c_str(), (*I)->Section);
- Target->Description = Info (Target->ShortDesc.c_str(), (*I)->Section);
- IndexTargets->push_back (Target);
- }
- }
-
- // Only source release
- if (IndexTargets->empty() == false && ArchEntries.size() == 1)
- return IndexTargets;
-
- std::set<std::string> sections;
- for (map<string, vector<debSectionEntry const*> >::const_iterator a = ArchEntries.begin();
- a != ArchEntries.end(); ++a) {
- if (a->first == "source")
- continue;
- for (vector <const debSectionEntry *>::const_iterator I = a->second.begin();
- I != a->second.end(); ++I) {
- IndexTarget * Target = new IndexTarget();
- Target->ShortDesc = "Packages";
- Target->MetaKey = IndexURISuffix(Target->ShortDesc.c_str(), (*I)->Section, a->first);
- Target->URI = IndexURI(Target->ShortDesc.c_str(), (*I)->Section, a->first);
- Target->Description = Info (Target->ShortDesc.c_str(), (*I)->Section, a->first);
- IndexTargets->push_back (Target);
- sections.insert((*I)->Section);
- }
- }
-
- std::vector<std::string> lang = APT::Configuration::getLanguages(true);
- std::vector<std::string>::iterator lend = std::remove(lang.begin(), lang.end(), "none");
- if (lend != lang.end())
- lang.erase(lend);
-
- if (lang.empty() == true)
- return IndexTargets;
-
- // get the Translation-* files, later we will skip download of non-existent if we have an index
- for (std::set<std::string>::const_iterator s = sections.begin();
- s != sections.end(); ++s) {
- for (std::vector<std::string>::const_iterator l = lang.begin();
- l != lang.end(); ++l) {
- IndexTarget * Target = new OptionalIndexTarget();
- Target->ShortDesc = "Translation-" + *l;
- Target->MetaKey = TranslationIndexURISuffix(l->c_str(), *s);
- Target->URI = TranslationIndexURI(l->c_str(), *s);
- Target->Description = Info (Target->ShortDesc.c_str(), *s);
- IndexTargets->push_back(Target);
- }
- }
-
- return IndexTargets;
+ // if we have a Valid-Until header in the Release file, use it as default
+ if (StrValidUntil.empty() == false)
+ {
+ if(RFC1123StrToTime(StrValidUntil.c_str(), ValidUntil) == false)
+ {
+ if (ErrorText != NULL)
+ strprintf(*ErrorText, _("Invalid 'Valid-Until' entry in Release file %s"), Filename.c_str());
+ return false;
+ }
+ }
+ // get the user settings for this archive and use what expires earlier
+ time_t MaxAge = d->ValidUntilMax;
+ if (MaxAge == 0)
+ {
+ MaxAge = _config->FindI("Acquire::Max-ValidTime", 0);
+ if (Label.empty() == false)
+ MaxAge = _config->FindI(("Acquire::Max-ValidTime::" + Label).c_str(), MaxAge);
+ }
+ time_t MinAge = d->ValidUntilMin;
+ if (MinAge == 0)
+ {
+ MinAge = _config->FindI("Acquire::Min-ValidTime", 0);
+ if (Label.empty() == false)
+ MinAge = _config->FindI(("Acquire::Min-ValidTime::" + Label).c_str(), MinAge);
+ }
+
+ if (MinAge != 0 && ValidUntil != 0) {
+ time_t const min_date = Date + MinAge;
+ if (ValidUntil < min_date)
+ ValidUntil = min_date;
+ }
+ if (MaxAge != 0) {
+ time_t const max_date = Date + MaxAge;
+ if (ValidUntil == 0 || ValidUntil > max_date)
+ ValidUntil = max_date;
+ }
+ }
+
+ LoadedSuccessfully = TRI_YES;
+ return true;
+}
+ /*}}}*/
+metaIndex * debReleaseIndex::UnloadedClone() const /*{{{*/
+{
+ if (Trusted == TRI_NO)
+ return new debReleaseIndex(URI, Dist, false);
+ else if (Trusted == TRI_YES)
+ return new debReleaseIndex(URI, Dist, true);
+ else
+ return new debReleaseIndex(URI, Dist);
}
/*}}}*/
-bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const
+bool debReleaseIndex::parseSumData(const char *&Start, const char *End, /*{{{*/
+ std::string &Name, std::string &Hash, unsigned long long &Size)
{
- bool const tryInRelease = _config->FindB("Acquire::TryInRelease", true);
+ Name = "";
+ Hash = "";
+ Size = 0;
+ /* Skip over the first blank */
+ while ((*Start == '\t' || *Start == ' ' || *Start == '\n' || *Start == '\r')
+ && Start < End)
+ Start++;
+ if (Start >= End)
+ return false;
+
+ /* Move EntryEnd to the end of the first entry (the hash) */
+ const char *EntryEnd = Start;
+ while ((*EntryEnd != '\t' && *EntryEnd != ' ')
+ && EntryEnd < End)
+ EntryEnd++;
+ if (EntryEnd == End)
+ return false;
- indexRecords * const iR = new indexRecords(Dist);
- if (Trusted == ALWAYS_TRUSTED)
- iR->SetTrusted(true);
- else if (Trusted == NEVER_TRUSTED)
- iR->SetTrusted(false);
+ Hash.append(Start, EntryEnd-Start);
+ /* Skip over intermediate blanks */
+ Start = EntryEnd;
+ while (*Start == '\t' || *Start == ' ')
+ Start++;
+ if (Start >= End)
+ return false;
+
+ EntryEnd = Start;
+ /* Find the end of the second entry (the size) */
+ while ((*EntryEnd != '\t' && *EntryEnd != ' ' )
+ && EntryEnd < End)
+ EntryEnd++;
+ if (EntryEnd == End)
+ return false;
+
+ Size = strtoull (Start, NULL, 10);
+
+ /* Skip over intermediate blanks */
+ Start = EntryEnd;
+ while (*Start == '\t' || *Start == ' ')
+ Start++;
+ if (Start >= End)
+ return false;
+
+ EntryEnd = Start;
+ /* Find the end of the third entry (the filename) */
+ while ((*EntryEnd != '\t' && *EntryEnd != ' ' &&
+ *EntryEnd != '\n' && *EntryEnd != '\r')
+ && EntryEnd < End)
+ EntryEnd++;
+
+ Name.append(Start, EntryEnd-Start);
+ Start = EntryEnd; //prepare for the next round
+ return true;
+}
+ /*}}}*/
+
+bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll)/*{{{*/
+{
+ std::vector<IndexTarget> const targets = GetIndexTargets();
+#define APT_TARGET(X) IndexTarget("", X, MetaIndexInfo(X), MetaIndexURI(X), false, false, std::map<std::string,std::string>())
+ pkgAcqMetaClearSig * const TransactionManager = new pkgAcqMetaClearSig(Owner,
+ APT_TARGET("InRelease"), APT_TARGET("Release"), APT_TARGET("Release.gpg"),
+ targets, this);
+#undef APT_TARGET
// special case for --print-uris
- if (GetAll) {
- vector <IndexTarget *> *targets = ComputeIndexTargets();
- for (vector <IndexTarget*>::const_iterator Target = targets->begin(); Target != targets->end(); ++Target) {
- new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
- (*Target)->ShortDesc, HashStringList());
- }
- delete targets;
-
- // this is normally created in pkgAcqMetaSig, but if we run
- // in --print-uris mode, we add it here
- if (tryInRelease == false)
- new pkgAcqMetaIndex(Owner, NULL,
- MetaIndexURI("Release"),
- MetaIndexInfo("Release"), "Release",
- MetaIndexURI("Release.gpg"), MetaIndexInfo("Release.gpg"), "Release.gpg",
- ComputeIndexTargets(),
- iR);
+ if (GetAll)
+ {
+ for (std::vector<IndexTarget>::const_iterator Target = targets.begin(); Target != targets.end(); ++Target)
+ new pkgAcqIndex(Owner, TransactionManager, *Target);
}
- if (tryInRelease == true)
- new pkgAcqMetaClearSig(Owner,
- MetaIndexURI("InRelease"), MetaIndexInfo("InRelease"), "InRelease",
- MetaIndexURI("Release"), MetaIndexInfo("Release"), "Release",
- MetaIndexURI("Release.gpg"), MetaIndexInfo("Release.gpg"), "Release.gpg",
- ComputeIndexTargets(),
- iR);
- else
- new pkgAcqMetaIndex(Owner, NULL,
- MetaIndexURI("Release"), MetaIndexInfo("Release"), "Release",
- MetaIndexURI("Release.gpg"), MetaIndexInfo("Release.gpg"), "Release.gpg",
- ComputeIndexTargets(),
- iR);
return true;
}
-
-void debReleaseIndex::SetTrusted(bool const Trusted)
+ /*}}}*/
+// ReleaseIndex::Set* TriState options /*{{{*/
+bool debReleaseIndex::SetTrusted(TriState const pTrusted)
{
- if (Trusted == true)
- this->Trusted = ALWAYS_TRUSTED;
- else
- this->Trusted = NEVER_TRUSTED;
+ if (Trusted == TRI_UNSET)
+ Trusted = pTrusted;
+ else if (Trusted != pTrusted)
+ // TRANSLATOR: The first is an option name from sources.list manpage, the other two URI and Suite
+ return _error->Error(_("Conflicting values set for option %s concerning source %s %s"), "Trusted", URI.c_str(), Dist.c_str());
+ return true;
}
-
+bool debReleaseIndex::SetCheckValidUntil(TriState const pCheckValidUntil)
+{
+ if (d->CheckValidUntil == TRI_UNSET)
+ d->CheckValidUntil = pCheckValidUntil;
+ else if (d->CheckValidUntil != pCheckValidUntil)
+ return _error->Error(_("Conflicting values set for option %s concerning source %s %s"), "Check-Valid-Until", URI.c_str(), Dist.c_str());
+ return true;
+}
+bool debReleaseIndex::SetValidUntilMin(time_t const Valid)
+{
+ if (d->ValidUntilMin == 0)
+ d->ValidUntilMin = Valid;
+ else if (d->ValidUntilMin != Valid)
+ return _error->Error(_("Conflicting values set for option %s concerning source %s %s"), "Min-ValidTime", URI.c_str(), Dist.c_str());
+ return true;
+}
+bool debReleaseIndex::SetValidUntilMax(time_t const Valid)
+{
+ if (d->ValidUntilMax == 0)
+ d->ValidUntilMax = Valid;
+ else if (d->ValidUntilMax != Valid)
+ return _error->Error(_("Conflicting values set for option %s concerning source %s %s"), "Max-ValidTime", URI.c_str(), Dist.c_str());
+ return true;
+}
+bool debReleaseIndex::SetSignedBy(std::string const &pSignedBy)
+{
+ if (SignedBy.empty() == true && pSignedBy.empty() == false)
+ {
+ if (pSignedBy[0] == '/') // no check for existence as we could be chrooting later or such things
+ ; // absolute path to a keyring file
+ else
+ {
+ // we could go all fancy and allow short/long/string matches as gpgv/apt-key does,
+ // but fingerprints are harder to fake than the others and this option is set once,
+ // not interactively all the time so easy to type is not really a concern.
+ std::string finger = pSignedBy;
+ finger.erase(std::remove(finger.begin(), finger.end(), ' '), finger.end());
+ std::transform(finger.begin(), finger.end(), finger.begin(), ::toupper);
+ if (finger.length() != 40 || finger.find_first_not_of("0123456789ABCDEF") != std::string::npos)
+ return _error->Error(_("Invalid value set for option %s concerning source %s %s (%s)"), "Signed-By", URI.c_str(), Dist.c_str(), "not a fingerprint");
+ }
+ SignedBy = pSignedBy;
+ }
+ else if (SignedBy != pSignedBy)
+ return _error->Error(_("Conflicting values set for option %s concerning source %s %s"), "Signed-By", URI.c_str(), Dist.c_str());
+ return true;
+}
+ /*}}}*/
+// ReleaseIndex::IsTrusted /*{{{*/
bool debReleaseIndex::IsTrusted() const
{
- if (Trusted == ALWAYS_TRUSTED)
+ if (Trusted == TRI_YES)
return true;
- else if (Trusted == NEVER_TRUSTED)
+ else if (Trusted == TRI_NO)
return false;
@@ -313,236 +499,288 @@ bool debReleaseIndex::IsTrusted() const
if(URI.substr(0,strlen("cdrom:")) == "cdrom:")
return true;
- string VerifiedSigFile = _config->FindDir("Dir::State::lists") +
- URItoFileName(MetaIndexURI("Release")) + ".gpg";
-
- if (FileExists(VerifiedSigFile))
+ if (FileExists(MetaIndexFile("Release.gpg")))
return true;
- VerifiedSigFile = _config->FindDir("Dir::State::lists") +
- URItoFileName(MetaIndexURI("InRelease"));
-
- return FileExists(VerifiedSigFile);
+ return FileExists(MetaIndexFile("InRelease"));
}
+ /*}}}*/
+std::vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() /*{{{*/
+{
+ if (Indexes != NULL)
+ return Indexes;
-vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() {
- if (Indexes != NULL)
- return Indexes;
-
- Indexes = new vector <pkgIndexFile*>;
- map<string, vector<debSectionEntry const*> >::const_iterator const src = ArchEntries.find("source");
- if (src != ArchEntries.end()) {
- vector<debSectionEntry const*> const SectionEntries = src->second;
- for (vector<debSectionEntry const*>::const_iterator I = SectionEntries.begin();
- I != SectionEntries.end(); ++I)
- Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted()));
- }
-
- // Only source release
- if (Indexes->empty() == false && ArchEntries.size() == 1)
- return Indexes;
-
- std::vector<std::string> const lang = APT::Configuration::getLanguages(true);
- map<string, set<string> > sections;
- for (map<string, vector<debSectionEntry const*> >::const_iterator a = ArchEntries.begin();
- a != ArchEntries.end(); ++a) {
- if (a->first == "source")
- continue;
- for (vector<debSectionEntry const*>::const_iterator I = a->second.begin();
- I != a->second.end(); ++I) {
- Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted(), a->first));
- sections[(*I)->Section].insert(lang.begin(), lang.end());
- }
- }
-
- for (map<string, set<string> >::const_iterator s = sections.begin();
- s != sections.end(); ++s)
- for (set<string>::const_iterator l = s->second.begin();
- l != s->second.end(); ++l) {
- if (*l == "none") continue;
- Indexes->push_back(new debTranslationsIndex(URI,Dist,s->first,(*l).c_str()));
- }
-
- return Indexes;
+ Indexes = new std::vector<pkgIndexFile*>();
+ std::vector<IndexTarget> const Targets = GetIndexTargets();
+ bool const istrusted = IsTrusted();
+ for (std::vector<IndexTarget>::const_iterator T = Targets.begin(); T != Targets.end(); ++T)
+ {
+ std::string const TargetName = T->Option(IndexTarget::CREATED_BY);
+ if (TargetName == "Packages")
+ Indexes->push_back(new debPackagesIndex(*T, istrusted));
+ else if (TargetName == "Sources")
+ Indexes->push_back(new debSourcesIndex(*T, istrusted));
+ else if (TargetName == "Translations")
+ Indexes->push_back(new debTranslationsIndex(*T));
+ }
+ return Indexes;
}
+ /*}}}*/
-void debReleaseIndex::PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry) {
- for (vector<string>::const_iterator a = Archs.begin();
- a != Archs.end(); ++a)
- ArchEntries[*a].push_back(new debSectionEntry(Entry->Section, Entry->IsSrc));
- delete Entry;
+static bool ReleaseFileName(debReleaseIndex const * const That, std::string &ReleaseFile)/*{{{*/
+{
+ ReleaseFile = That->MetaIndexFile("InRelease");
+ bool releaseExists = false;
+ if (FileExists(ReleaseFile) == true)
+ releaseExists = true;
+ else
+ {
+ ReleaseFile = That->MetaIndexFile("Release");
+ if (FileExists(ReleaseFile))
+ releaseExists = true;
+ }
+ return releaseExists;
}
+ /*}}}*/
+bool debReleaseIndex::Merge(pkgCacheGenerator &Gen,OpProgress * /*Prog*/) const/*{{{*/
+{
+ std::string ReleaseFile;
+ bool const releaseExists = ReleaseFileName(this, ReleaseFile);
-void debReleaseIndex::PushSectionEntry(string const &Arch, const debSectionEntry *Entry) {
- ArchEntries[Arch].push_back(Entry);
-}
+ ::URI Tmp(URI);
+ if (Gen.SelectReleaseFile(ReleaseFile, Tmp.Host) == false)
+ return _error->Error("Problem with SelectReleaseFile %s", ReleaseFile.c_str());
-void debReleaseIndex::PushSectionEntry(const debSectionEntry *Entry) {
- if (Entry->IsSrc == true)
- PushSectionEntry("source", Entry);
- else {
- for (map<string, vector<const debSectionEntry *> >::iterator a = ArchEntries.begin();
- a != ArchEntries.end(); ++a) {
- a->second.push_back(Entry);
- }
- }
-}
+ if (releaseExists == false)
+ return true;
-debReleaseIndex::debSectionEntry::debSectionEntry (string const &Section,
- bool const &IsSrc): Section(Section), IsSrc(IsSrc)
-{}
+ FileFd Rel;
+ // Beware: The 'Release' file might be clearsigned in case the
+ // signature for an 'InRelease' file couldn't be checked
+ if (OpenMaybeClearSignedFile(ReleaseFile, Rel) == false)
+ return false;
+ if (_error->PendingError() == true)
+ return false;
-class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type
+ // Store the IMS information
+ pkgCache::RlsFileIterator File = Gen.GetCurRlsFile();
+ pkgCacheGenerator::Dynamic<pkgCache::RlsFileIterator> DynFile(File);
+ // Rel can't be used as this is potentially a temporary file
+ struct stat Buf;
+ if (stat(ReleaseFile.c_str(), &Buf) != 0)
+ return _error->Errno("fstat", "Unable to stat file %s", ReleaseFile.c_str());
+ File->Size = Buf.st_size;
+ File->mtime = Buf.st_mtime;
+
+ pkgTagFile TagFile(&Rel, Rel.Size());
+ pkgTagSection Section;
+ if (_error->PendingError() == true || TagFile.Step(Section) == false)
+ return false;
+
+ std::string data;
+ #define APT_INRELEASE(TYPE, TAG, STORE) \
+ data = Section.FindS(TAG); \
+ if (data.empty() == false) \
+ { \
+ map_stringitem_t const storage = Gen.StoreString(pkgCacheGenerator::TYPE, data); \
+ STORE = storage; \
+ }
+ APT_INRELEASE(MIXED, "Suite", File->Archive)
+ APT_INRELEASE(VERSIONNUMBER, "Version", File->Version)
+ APT_INRELEASE(MIXED, "Origin", File->Origin)
+ APT_INRELEASE(MIXED, "Codename", File->Codename)
+ APT_INRELEASE(MIXED, "Label", File->Label)
+ #undef APT_INRELEASE
+ Section.FindFlag("NotAutomatic", File->Flags, pkgCache::Flag::NotAutomatic);
+ Section.FindFlag("ButAutomaticUpgrades", File->Flags, pkgCache::Flag::ButAutomaticUpgrades);
+
+ return !_error->PendingError();
+}
+ /*}}}*/
+// ReleaseIndex::FindInCache - Find this index /*{{{*/
+pkgCache::RlsFileIterator debReleaseIndex::FindInCache(pkgCache &Cache, bool const ModifyCheck) const
{
- protected:
+ std::string ReleaseFile;
+ bool const releaseExists = ReleaseFileName(this, ReleaseFile);
- bool CreateItemInternal(vector<metaIndex *> &List, string const &URI,
- string const &Dist, string const &Section,
- bool const &IsSrc, map<string, string> const &Options) const
+ pkgCache::RlsFileIterator File = Cache.RlsFileBegin();
+ for (; File.end() == false; ++File)
{
- // parse arch=, arch+= and arch-= settings
- map<string, string>::const_iterator arch = Options.find("arch");
- vector<string> Archs;
- if (arch != Options.end())
- Archs = VectorizeString(arch->second, ',');
- else
- Archs = APT::Configuration::getArchitectures();
+ if (File->FileName == 0 || ReleaseFile != File.FileName())
+ continue;
- if ((arch = Options.find("arch+")) != Options.end())
+ // empty means the file does not exist by "design"
+ if (ModifyCheck == false || (releaseExists == false && File->Size == 0))
+ return File;
+
+ struct stat St;
+ if (stat(File.FileName(),&St) != 0)
{
- std::vector<std::string> const plusArch = VectorizeString(arch->second, ',');
- for (std::vector<std::string>::const_iterator plus = plusArch.begin(); plus != plusArch.end(); ++plus)
- if (std::find(Archs.begin(), Archs.end(), *plus) == Archs.end())
- Archs.push_back(*plus);
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "ReleaseIndex::FindInCache - stat failed on " << File.FileName() << std::endl;
+ return pkgCache::RlsFileIterator(Cache);
}
- if ((arch = Options.find("arch-")) != Options.end())
+ if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime)
{
- std::vector<std::string> const minusArch = VectorizeString(arch->second, ',');
- for (std::vector<std::string>::const_iterator minus = minusArch.begin(); minus != minusArch.end(); ++minus)
- {
- std::vector<std::string>::iterator kill = std::find(Archs.begin(), Archs.end(), *minus);
- if (kill != Archs.end())
- Archs.erase(kill);
- }
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "ReleaseIndex::FindInCache - size (" << St.st_size << " <> " << File->Size
+ << ") or mtime (" << St.st_mtime << " <> " << File->mtime
+ << ") doesn't match for " << File.FileName() << std::endl;
+ return pkgCache::RlsFileIterator(Cache);
}
+ return File;
+ }
- map<string, string>::const_iterator const trusted = Options.find("trusted");
+ return File;
+}
+ /*}}}*/
- for (vector<metaIndex *>::const_iterator I = List.begin();
+static std::vector<std::string> parsePlusMinusOptions(std::string const &Name, /*{{{*/
+ std::map<std::string, std::string> const &Options, std::vector<std::string> const &defaultValues)
+{
+ std::map<std::string, std::string>::const_iterator val = Options.find(Name);
+ std::vector<std::string> Values;
+ if (val != Options.end())
+ Values = VectorizeString(val->second, ',');
+ else
+ Values = defaultValues;
+
+ if ((val = Options.find(Name + "+")) != Options.end())
+ {
+ std::vector<std::string> const plusArch = VectorizeString(val->second, ',');
+ for (std::vector<std::string>::const_iterator plus = plusArch.begin(); plus != plusArch.end(); ++plus)
+ if (std::find(Values.begin(), Values.end(), *plus) == Values.end())
+ Values.push_back(*plus);
+ }
+ if ((val = Options.find(Name + "-")) != Options.end())
+ {
+ std::vector<std::string> const minusArch = VectorizeString(val->second, ',');
+ for (std::vector<std::string>::const_iterator minus = minusArch.begin(); minus != minusArch.end(); ++minus)
+ {
+ std::vector<std::string>::iterator kill = std::find(Values.begin(), Values.end(), *minus);
+ if (kill != Values.end())
+ Values.erase(kill);
+ }
+ }
+ return Values;
+}
+ /*}}}*/
+class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type /*{{{*/
+{
+ metaIndex::TriState GetTriStateOption(std::map<std::string, std::string>const &Options, char const * const name) const
+ {
+ std::map<std::string, std::string>::const_iterator const opt = Options.find(name);
+ if (opt != Options.end())
+ return StringToBool(opt->second, false) ? metaIndex::TRI_YES : metaIndex::TRI_NO;
+ return metaIndex::TRI_DONTCARE;
+ }
+
+ time_t GetTimeOption(std::map<std::string, std::string>const &Options, char const * const name) const
+ {
+ std::map<std::string, std::string>::const_iterator const opt = Options.find(name);
+ if (opt == Options.end())
+ return 0;
+ return strtoull(opt->second.c_str(), NULL, 10);
+ }
+
+ protected:
+
+ bool CreateItemInternal(std::vector<metaIndex *> &List, std::string const &URI,
+ std::string const &Dist, std::string const &Section,
+ bool const &IsSrc, std::map<std::string, std::string> const &Options) const
+ {
+ debReleaseIndex *Deb = NULL;
+ for (std::vector<metaIndex *>::const_iterator I = List.begin();
I != List.end(); ++I)
{
// We only worry about debian entries here
if (strcmp((*I)->GetType(), "deb") != 0)
continue;
- debReleaseIndex *Deb = (debReleaseIndex *) (*I);
- if (trusted != Options.end())
- Deb->SetTrusted(StringToBool(trusted->second, false));
-
/* This check insures that there will be only one Release file
queued for all the Packages files and Sources files it
corresponds to. */
- if (Deb->GetURI() == URI && Deb->GetDist() == Dist)
+ if ((*I)->GetURI() == URI && (*I)->GetDist() == Dist)
{
- if (IsSrc == true)
- Deb->PushSectionEntry("source", new debReleaseIndex::debSectionEntry(Section, IsSrc));
- else
- {
- if (Dist[Dist.size() - 1] == '/')
- Deb->PushSectionEntry("any", new debReleaseIndex::debSectionEntry(Section, IsSrc));
- else
- Deb->PushSectionEntry(Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc));
- }
- return true;
+ Deb = dynamic_cast<debReleaseIndex*>(*I);
+ if (Deb != NULL)
+ break;
}
}
// No currently created Release file indexes this entry, so we create a new one.
- debReleaseIndex *Deb;
- if (trusted != Options.end())
- Deb = new debReleaseIndex(URI, Dist, StringToBool(trusted->second, false));
- else
+ if (Deb == NULL)
+ {
Deb = new debReleaseIndex(URI, Dist);
+ List.push_back(Deb);
+ }
- if (IsSrc == true)
- Deb->PushSectionEntry ("source", new debReleaseIndex::debSectionEntry(Section, IsSrc));
+ Deb->AddComponent(
+ IsSrc,
+ Section,
+ parsePlusMinusOptions("target", Options, _config->FindVector(std::string("Acquire::IndexTargets::") + Name, "", true)),
+ parsePlusMinusOptions("arch", Options, APT::Configuration::getArchitectures()),
+ parsePlusMinusOptions("lang", Options, APT::Configuration::getLanguages(true))
+ );
+
+ if (Deb->SetTrusted(GetTriStateOption(Options, "trusted")) == false ||
+ Deb->SetCheckValidUntil(GetTriStateOption(Options, "check-valid-until")) == false ||
+ Deb->SetValidUntilMax(GetTimeOption(Options, "valid-until-max")) == false ||
+ Deb->SetValidUntilMin(GetTimeOption(Options, "valid-until-min")) == false)
+ return false;
+
+ std::map<std::string, std::string>::const_iterator const signedby = Options.find("signed-by");
+ if (signedby == Options.end())
+ {
+ if (Deb->SetSignedBy("") == false)
+ return false;
+ }
else
{
- if (Dist[Dist.size() - 1] == '/')
- Deb->PushSectionEntry ("any", new debReleaseIndex::debSectionEntry(Section, IsSrc));
- else
- Deb->PushSectionEntry (Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc));
+ if (Deb->SetSignedBy(signedby->second) == false)
+ return false;
}
- List.push_back(Deb);
+
return true;
}
-};
-debDebFileMetaIndex::debDebFileMetaIndex(std::string const &DebFile)
- : metaIndex(DebFile, "local-uri", "deb-dist"), DebFile(DebFile)
-{
- DebIndex = new debDebPkgFileIndex(DebFile);
- Indexes = new vector<pkgIndexFile *>();
- Indexes->push_back(DebIndex);
-}
-
-
-class APT_HIDDEN debSLTypeDeb : public debSLTypeDebian
+ debSLTypeDebian(char const * const Name, char const * const Label) : Type(Name, Label)
+ {
+ }
+};
+ /*}}}*/
+class APT_HIDDEN debSLTypeDeb : public debSLTypeDebian /*{{{*/
{
public:
- bool CreateItem(vector<metaIndex *> &List, string const &URI,
- string const &Dist, string const &Section,
- std::map<string, string> const &Options) const
+ bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
+ std::string const &Dist, std::string const &Section,
+ std::map<std::string, std::string> const &Options) const APT_OVERRIDE
{
return CreateItemInternal(List, URI, Dist, Section, false, Options);
}
- debSLTypeDeb()
+ debSLTypeDeb() : debSLTypeDebian("deb", "Debian binary tree")
{
- Name = "deb";
- Label = "Standard Debian binary tree";
- }
+ }
};
-
-class APT_HIDDEN debSLTypeDebSrc : public debSLTypeDebian
+ /*}}}*/
+class APT_HIDDEN debSLTypeDebSrc : public debSLTypeDebian /*{{{*/
{
public:
- bool CreateItem(vector<metaIndex *> &List, string const &URI,
- string const &Dist, string const &Section,
- std::map<string, string> const &Options) const
+ bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
+ std::string const &Dist, std::string const &Section,
+ std::map<std::string, std::string> const &Options) const APT_OVERRIDE
{
return CreateItemInternal(List, URI, Dist, Section, true, Options);
}
-
- debSLTypeDebSrc()
- {
- Name = "deb-src";
- Label = "Standard Debian source tree";
- }
-};
-class APT_HIDDEN debSLTypeDebFile : public pkgSourceList::Type
-{
- public:
-
- bool CreateItem(vector<metaIndex *> &List, string const &URI,
- string const &/*Dist*/, string const &/*Section*/,
- std::map<string, string> const &/*Options*/) const
+ debSLTypeDebSrc() : debSLTypeDebian("deb-src", "Debian source tree")
{
- metaIndex *mi = new debDebFileMetaIndex(URI);
- List.push_back(mi);
- return true;
}
-
- debSLTypeDebFile()
- {
- Name = "deb-file";
- Label = "Debian Deb File";
- }
};
+ /*}}}*/
APT_HIDDEN debSLTypeDeb _apt_DebType;
APT_HIDDEN debSLTypeDebSrc _apt_DebSrcType;
-APT_HIDDEN debSLTypeDebFile _apt_DebFileType;
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h
index 94d005760..e93959a21 100644
--- a/apt-pkg/deb/debmetaindex.h
+++ b/apt-pkg/deb/debmetaindex.h
@@ -1,4 +1,3 @@
-// ijones, walters
#ifndef PKGLIB_DEBMETAINDEX_H
#define PKGLIB_DEBMETAINDEX_H
@@ -18,83 +17,52 @@
class pkgAcquire;
class pkgIndexFile;
-class debDebPkgFileIndex;
class IndexTarget;
+class pkgCacheGenerator;
+class OpProgress;
+class debReleaseIndexPrivate;
-class APT_HIDDEN debReleaseIndex : public metaIndex {
- public:
-
- class debSectionEntry
- {
- public:
- debSectionEntry (std::string const &Section, bool const &IsSrc);
- std::string const Section;
- bool const IsSrc;
- };
-
- private:
- /** \brief dpointer placeholder (for later in case we need it) */
- void *d;
- std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries;
- enum APT_HIDDEN { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted;
+class APT_HIDDEN debReleaseIndex : public metaIndex
+{
+ debReleaseIndexPrivate * const d;
+ APT_HIDDEN bool parseSumData(const char *&Start, const char *End, std::string &Name,
+ std::string &Hash, unsigned long long &Size);
public:
+ APT_HIDDEN std::string MetaIndexInfo(const char *Type) const;
+ APT_HIDDEN std::string MetaIndexFile(const char *Types) const;
+ APT_HIDDEN std::string MetaIndexURI(const char *Type) const;
+
debReleaseIndex(std::string const &URI, std::string const &Dist);
debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted);
virtual ~debReleaseIndex();
- virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
- virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
- std::vector <IndexTarget *>* ComputeIndexTargets() const;
- std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const;
+ virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE {return URI + File;};
+ virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) APT_OVERRIDE;
+ virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE;
- std::string MetaIndexInfo(const char *Type) const;
- std::string MetaIndexFile(const char *Types) const;
- std::string MetaIndexURI(const char *Type) const;
+ virtual std::string Describe() const APT_OVERRIDE;
+ virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const APT_OVERRIDE;
+ virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
-#if APT_PKG_ABI >= 413
- virtual
-#endif
- std::string LocalFileName() const;
-
- std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const;
- std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const;
- std::string SourceIndexURI(const char *Type, const std::string &Section) const;
- std::string SourceIndexURISuffix(const char *Type, const std::string &Section) const;
- std::string TranslationIndexURI(const char *Type, const std::string &Section) const;
- std::string TranslationIndexURISuffix(const char *Type, const std::string &Section) const;
- virtual std::vector <pkgIndexFile *> *GetIndexFiles();
-
- void SetTrusted(bool const Trusted);
- virtual bool IsTrusted() const;
-
- void PushSectionEntry(std::vector<std::string> const &Archs, const debSectionEntry *Entry);
- void PushSectionEntry(std::string const &Arch, const debSectionEntry *Entry);
- void PushSectionEntry(const debSectionEntry *Entry);
-};
+ virtual bool Load(std::string const &Filename, std::string * const ErrorText) APT_OVERRIDE;
+ virtual metaIndex * UnloadedClone() const APT_OVERRIDE;
-class APT_HIDDEN debDebFileMetaIndex : public metaIndex
-{
- private:
- std::string DebFile;
- debDebPkgFileIndex *DebIndex;
- public:
- virtual std::string ArchiveURI(std::string const& /*File*/) const {
- return DebFile;
- }
- virtual bool GetIndexes(pkgAcquire* /*Owner*/, const bool& /*GetAll=false*/) const {
- return true;
- }
- virtual std::vector<pkgIndexFile *> *GetIndexFiles() {
- return Indexes;
- }
- virtual bool IsTrusted() const {
- return true;
- }
- debDebFileMetaIndex(std::string const &DebFile);
- virtual ~debDebFileMetaIndex() {};
+ virtual std::vector <pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE;
+
+ bool SetTrusted(TriState const Trusted);
+ bool SetCheckValidUntil(TriState const Trusted);
+ bool SetValidUntilMin(time_t const Valid);
+ bool SetValidUntilMax(time_t const Valid);
+ bool SetSignedBy(std::string const &SignedBy);
+
+ virtual bool IsTrusted() const APT_OVERRIDE;
+ void AddComponent(bool const isSrc, std::string const &Name,
+ std::vector<std::string> const &Targets,
+ std::vector<std::string> const &Architectures,
+ std::vector<std::string> Languages);
};
#endif
diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc
index 335bcfda0..d78a7e2e0 100644
--- a/apt-pkg/deb/debrecords.cc
+++ b/apt-pkg/deb/debrecords.cc
@@ -34,7 +34,7 @@ using std::string;
// RecordParser::debRecordParser - Constructor /*{{{*/
debRecordParser::debRecordParser(string FileName,pkgCache &Cache) :
- debRecordParserBase(), File(FileName, FileFd::ReadOnly, FileFd::Extension),
+ debRecordParserBase(), d(NULL), File(FileName, FileFd::ReadOnly, FileFd::Extension),
Tags(&File, std::max(Cache.Head().MaxVerFileSize, Cache.Head().MaxDescFileSize) + 200)
{
}
@@ -42,15 +42,20 @@ debRecordParser::debRecordParser(string FileName,pkgCache &Cache) :
// RecordParser::Jump - Jump to a specific record /*{{{*/
bool debRecordParser::Jump(pkgCache::VerFileIterator const &Ver)
{
+ if (Ver.end() == true)
+ return false;
return Tags.Jump(Section,Ver->Offset);
}
bool debRecordParser::Jump(pkgCache::DescFileIterator const &Desc)
{
+ if (Desc.end() == true)
+ return false;
return Tags.Jump(Section,Desc->Offset);
}
/*}}}*/
debRecordParser::~debRecordParser() {}
+debRecordParserBase::debRecordParserBase() : Parser(), d(NULL) {}
// RecordParserBase::FileName - Return the archive filename on the site /*{{{*/
string debRecordParserBase::FileName()
{
@@ -207,3 +212,9 @@ bool debDebFileRecordParser::LoadContent()
return _error->Error(_("Unable to parse package file %s (%d)"), debFileName.c_str(), 3);
return true;
}
+bool debDebFileRecordParser::Jump(pkgCache::VerFileIterator const &) { return LoadContent(); }
+bool debDebFileRecordParser::Jump(pkgCache::DescFileIterator const &) { return LoadContent(); }
+std::string debDebFileRecordParser::FileName() { return debFileName; }
+
+debDebFileRecordParser::debDebFileRecordParser(std::string FileName) : debRecordParserBase(), d(NULL), debFileName(FileName) {}
+debDebFileRecordParser::~debDebFileRecordParser() {}
diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h
index 38e071940..7fc82a88d 100644
--- a/apt-pkg/deb/debrecords.h
+++ b/apt-pkg/deb/debrecords.h
@@ -27,41 +27,43 @@
class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser
{
+ void * const d;
protected:
pkgTagSection Section;
public:
// These refer to the archive file for the Version
- virtual std::string FileName();
- virtual std::string SourcePkg();
- virtual std::string SourceVer();
+ virtual std::string FileName() APT_OVERRIDE;
+ virtual std::string SourcePkg() APT_OVERRIDE;
+ virtual std::string SourceVer() APT_OVERRIDE;
- virtual HashStringList Hashes() const;
+ virtual HashStringList Hashes() const APT_OVERRIDE;
// These are some general stats about the package
- virtual std::string Maintainer();
- virtual std::string ShortDesc(std::string const &lang);
- virtual std::string LongDesc(std::string const &lang);
- virtual std::string Name();
- virtual std::string Homepage();
+ virtual std::string Maintainer() APT_OVERRIDE;
+ virtual std::string ShortDesc(std::string const &lang) APT_OVERRIDE;
+ virtual std::string LongDesc(std::string const &lang) APT_OVERRIDE;
+ virtual std::string Name() APT_OVERRIDE;
+ virtual std::string Homepage() APT_OVERRIDE;
// An arbitrary custom field
- virtual std::string RecordField(const char *fieldName);
+ virtual std::string RecordField(const char *fieldName) APT_OVERRIDE;
- virtual void GetRec(const char *&Start,const char *&Stop);
+ virtual void GetRec(const char *&Start,const char *&Stop) APT_OVERRIDE;
- debRecordParserBase() : Parser() {}
+ debRecordParserBase();
virtual ~debRecordParserBase();
};
class APT_HIDDEN debRecordParser : public debRecordParserBase
{
+ void * const d;
protected:
FileFd File;
pkgTagFile Tags;
- virtual bool Jump(pkgCache::VerFileIterator const &Ver);
- virtual bool Jump(pkgCache::DescFileIterator const &Desc);
+ virtual bool Jump(pkgCache::VerFileIterator const &Ver) APT_OVERRIDE;
+ virtual bool Jump(pkgCache::DescFileIterator const &Desc) APT_OVERRIDE;
public:
debRecordParser(std::string FileName,pkgCache &Cache);
@@ -71,20 +73,21 @@ class APT_HIDDEN debRecordParser : public debRecordParserBase
// custom record parser that reads deb files directly
class APT_HIDDEN debDebFileRecordParser : public debRecordParserBase
{
+ void * const d;
std::string debFileName;
std::string controlContent;
APT_HIDDEN bool LoadContent();
protected:
// single file files, so no jumping whatsoever
- bool Jump(pkgCache::VerFileIterator const &) { return LoadContent(); }
- bool Jump(pkgCache::DescFileIterator const &) { return LoadContent(); }
+ bool Jump(pkgCache::VerFileIterator const &) APT_OVERRIDE;
+ bool Jump(pkgCache::DescFileIterator const &) APT_OVERRIDE;
public:
- virtual std::string FileName() { return debFileName; }
+ virtual std::string FileName() APT_OVERRIDE;
- debDebFileRecordParser(std::string FileName)
- : debRecordParserBase(), debFileName(FileName) {};
+ debDebFileRecordParser(std::string FileName);
+ virtual ~debDebFileRecordParser();
};
#endif
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index ca6d09896..9404b6421 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -32,6 +32,10 @@
using std::max;
using std::string;
+debSrcRecordParser::debSrcRecordParser(std::string const &File,pkgIndexFile const *Index)
+ : Parser(Index), d(NULL), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),
+ iOffset(0), Buffer(NULL) {}
+
// SrcRecordParser::Binaries - Return the binaries field /*{{{*/
// ---------------------------------------------------------------------
/* This member parses the binaries field into a pair of class arrays and
diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h
index cd246d624..89134af5f 100644
--- a/apt-pkg/deb/debsrcrecords.h
+++ b/apt-pkg/deb/debsrcrecords.h
@@ -24,7 +24,7 @@ class pkgIndexFile;
class APT_HIDDEN debSrcRecordParser : public pkgSrcRecords::Parser
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
protected:
FileFd Fd;
@@ -36,29 +36,27 @@ class APT_HIDDEN debSrcRecordParser : public pkgSrcRecords::Parser
public:
- virtual bool Restart() {return Jump(0);};
- virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);};
- virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);};
+ virtual bool Restart() APT_OVERRIDE {return Jump(0);};
+ virtual bool Step() APT_OVERRIDE {iOffset = Tags.Offset(); return Tags.Step(Sect);};
+ virtual bool Jump(unsigned long const &Off) APT_OVERRIDE {iOffset = Off; return Tags.Jump(Sect,Off);};
- virtual std::string Package() const {return Sect.FindS("Package");};
- virtual std::string Version() const {return Sect.FindS("Version");};
- virtual std::string Maintainer() const {return Sect.FindS("Maintainer");};
- virtual std::string Section() const {return Sect.FindS("Section");};
- virtual const char **Binaries();
- virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true);
- virtual unsigned long Offset() {return iOffset;};
- virtual std::string AsStr()
+ virtual std::string Package() const APT_OVERRIDE {return Sect.FindS("Package");};
+ virtual std::string Version() const APT_OVERRIDE {return Sect.FindS("Version");};
+ virtual std::string Maintainer() const APT_OVERRIDE {return Sect.FindS("Maintainer");};
+ virtual std::string Section() const APT_OVERRIDE {return Sect.FindS("Section");};
+ virtual const char **Binaries() APT_OVERRIDE;
+ virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) APT_OVERRIDE;
+ virtual unsigned long Offset() APT_OVERRIDE {return iOffset;};
+ virtual std::string AsStr() APT_OVERRIDE
{
const char *Start=0,*Stop=0;
Sect.GetSection(Start,Stop);
return std::string(Start,Stop);
};
- virtual bool Files(std::vector<pkgSrcRecords::File> &F);
+ virtual bool Files(std::vector<pkgSrcRecords::File> &F) APT_OVERRIDE;
bool Files2(std::vector<pkgSrcRecords::File2> &F);
- debSrcRecordParser(std::string const &File,pkgIndexFile const *Index)
- : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),
- iOffset(0), Buffer(NULL) {}
+ debSrcRecordParser(std::string const &File,pkgIndexFile const *Index);
virtual ~debSrcRecordParser();
};
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index 9a5da9da1..465e13b9e 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -53,11 +53,8 @@ public:
// System::debSystem - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-debSystem::debSystem()
+debSystem::debSystem() : pkgSystem("Debian dpkg interface", &debVS), d(new debSystemPrivate())
{
- d = new debSystemPrivate();
- Label = "Debian dpkg interface";
- VS = &debVS;
}
/*}}}*/
// System::~debSystem - Destructor /*{{{*/
diff --git a/apt-pkg/deb/debsystem.h b/apt-pkg/deb/debsystem.h
index 226cd60bf..aed77520e 100644
--- a/apt-pkg/deb/debsystem.h
+++ b/apt-pkg/deb/debsystem.h
@@ -28,20 +28,20 @@ class debStatusIndex;
class debSystem : public pkgSystem
{
// private d-pointer
- debSystemPrivate *d;
+ debSystemPrivate * const d;
APT_HIDDEN bool CheckUpdates();
public:
- virtual bool Lock();
- virtual bool UnLock(bool NoErrors = false);
- virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const;
- virtual bool Initialize(Configuration &Cnf);
- virtual bool ArchiveSupported(const char *Type);
- virtual signed Score(Configuration const &Cnf);
- virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List);
+ virtual bool Lock() APT_OVERRIDE;
+ virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE;
+ virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE;
+ virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
+ virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE;
+ virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
+ virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
virtual bool FindIndex(pkgCache::PkgFileIterator File,
- pkgIndexFile *&Found) const;
+ pkgIndexFile *&Found) const APT_OVERRIDE;
debSystem();
virtual ~debSystem();
diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc
index a5eacb7f5..48462c6a2 100644
--- a/apt-pkg/deb/debversion.cc
+++ b/apt-pkg/deb/debversion.cc
@@ -16,7 +16,6 @@
#include <apt-pkg/pkgcache.h>
#include <string.h>
-#include <string>
#include <stdlib.h>
#include <ctype.h>
/*}}}*/
@@ -34,29 +33,26 @@ debVersioningSystem::debVersioningSystem()
// debVS::CmpFragment - Compare versions /*{{{*/
// ---------------------------------------------------------------------
-/* This compares a fragment of the version. This is a slightly adapted
- version of what dpkg uses. */
-#define order(x) ((x) == '~' ? -1 \
- : isdigit((x)) ? 0 \
- : !(x) ? 0 \
- : isalpha((x)) ? (x) \
- : (x) + 256)
-int debVersioningSystem::CmpFragment(const char *A,const char *AEnd,
- const char *B,const char *BEnd)
+/* This compares a fragment of the version. This is a slightly adapted
+ version of what dpkg uses in dpkg/lib/dpkg/version.c.
+ In particular, the a | b = NULL check is removed as we check this in the
+ caller, we use an explicit end for a | b strings and we check ~ explicit. */
+static int order(char c)
{
- if (A >= AEnd && B >= BEnd)
+ if (isdigit(c))
return 0;
- if (A >= AEnd)
- {
- if (*B == '~') return 1;
+ else if (isalpha(c))
+ return c;
+ else if (c == '~')
return -1;
- }
- if (B >= BEnd)
- {
- if (*A == '~') return -1;
- return 1;
- }
-
+ else if (c)
+ return c + 256;
+ else
+ return 0;
+}
+int debVersioningSystem::CmpFragment(const char *A,const char *AEnd,
+ const char *B,const char *BEnd)
+{
/* Iterate over the whole string
What this does is to split the whole string into groups of
numeric and non numeric portions. For instance:
@@ -77,19 +73,19 @@ int debVersioningSystem::CmpFragment(const char *A,const char *AEnd,
int rc = order(*rhs);
if (vc != rc)
return vc - rc;
- lhs++; rhs++;
+ ++lhs; ++rhs;
}
while (*lhs == '0')
- lhs++;
+ ++lhs;
while (*rhs == '0')
- rhs++;
+ ++rhs;
while (isdigit(*lhs) && isdigit(*rhs))
{
if (!first_diff)
first_diff = *lhs - *rhs;
- lhs++;
- rhs++;
+ ++lhs;
+ ++rhs;
}
if (isdigit(*lhs))
diff --git a/apt-pkg/deb/debversion.h b/apt-pkg/deb/debversion.h
index 434ff4a2e..db70c8797 100644
--- a/apt-pkg/deb/debversion.h
+++ b/apt-pkg/deb/debversion.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debversion.h,v 1.3 2001/05/03 05:25:04 jgg Exp $
/* ######################################################################
Debian Version - Versioning system for Debian
@@ -25,14 +24,14 @@ class debVersioningSystem : public pkgVersioningSystem
// Compare versions..
virtual int DoCmpVersion(const char *A,const char *Aend,
- const char *B,const char *Bend) APT_PURE;
- virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) APT_PURE;
+ const char *B,const char *Bend) APT_OVERRIDE APT_PURE;
+ virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) APT_OVERRIDE APT_PURE;
virtual APT_PURE int DoCmpReleaseVer(const char *A,const char *Aend,
- const char *B,const char *Bend)
+ const char *B,const char *Bend) APT_OVERRIDE
{
return DoCmpVersion(A,Aend,B,Bend);
}
- virtual std::string UpstreamVersion(const char *A);
+ virtual std::string UpstreamVersion(const char *A) APT_OVERRIDE;
debVersioningSystem();
};
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index a7a66c75d..6ae85d2ea 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -18,7 +18,6 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/install-progress.h>
#include <apt-pkg/packagemanager.h>
-#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/macros.h>
@@ -27,7 +26,6 @@
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
-#include <pty.h>
#include <pwd.h>
#include <signal.h>
#include <stddef.h>
@@ -205,8 +203,10 @@ pkgCache::VerIterator FindNowVersion(const pkgCache::PkgIterator &Pkg)
for (Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
for (pkgCache::VerFileIterator Vf = Ver.FileList(); Vf.end() == false; ++Vf)
for (pkgCache::PkgFileIterator F = Vf.File(); F.end() == false; ++F)
- if (F->Archive != 0 && strcmp(F.Archive(), "now") == 0)
+ {
+ if (F.Archive() != 0 && strcmp(F.Archive(), "now") == 0)
return Ver;
+ }
return Ver;
}
/*}}}*/
@@ -214,10 +214,9 @@ pkgCache::VerIterator FindNowVersion(const pkgCache::PkgIterator &Pkg)
// DPkgPM::pkgDPkgPM - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache)
- : pkgPackageManager(Cache), pkgFailures(0), PackagesDone(0), PackagesTotal(0)
+pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache)
+ : pkgPackageManager(Cache),d(new pkgDPkgPMPrivate()), pkgFailures(0), PackagesDone(0), PackagesTotal(0)
{
- d = new pkgDPkgPMPrivate();
}
/*}}}*/
// DPkgPM::pkgDPkgPM - Destructor /*{{{*/
@@ -1483,6 +1482,10 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
a != Args.end(); ++a)
clog << *a << ' ';
clog << endl;
+ for (std::vector<char *>::const_iterator p = Packages.begin();
+ p != Packages.end(); ++p)
+ free(*p);
+ Packages.clear();
continue;
}
Args.push_back(NULL);
@@ -1540,9 +1543,6 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
_exit(100);
}
- /* No Job Control Stop Env is a magic dpkg var that prevents it
- from using sigstop */
- putenv((char *)"DPKG_NO_TSTP=yes");
execvp(Args[0], (char**) &Args[0]);
cerr << "Could not exec dpkg!" << endl;
_exit(100);
@@ -1841,16 +1841,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
time_t now = time(NULL);
fprintf(report, "Date: %s" , ctime(&now));
fprintf(report, "Package: %s %s\n", pkgname.c_str(), pkgver.c_str());
-#if APT_PKG_ABI >= 413
fprintf(report, "SourcePackage: %s\n", Ver.SourcePkgName());
-#else
- pkgRecords Recs(Cache);
- pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
- std::string srcpkgname = Parse.SourcePkg();
- if(srcpkgname.empty())
- srcpkgname = pkgname;
- fprintf(report, "SourcePackage: %s\n", srcpkgname.c_str());
-#endif
fprintf(report, "ErrorMessage:\n %s\n", errormsg);
// ensure that the log is flushed
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index 2a6e7e004..82c1bef5d 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -37,7 +37,7 @@ class pkgDPkgPMPrivate;
class pkgDPkgPM : public pkgPackageManager
{
private:
- pkgDPkgPMPrivate *d;
+ pkgDPkgPMPrivate * const d;
/** \brief record the disappear action and handle accordingly
@@ -120,14 +120,14 @@ class pkgDPkgPM : public pkgPackageManager
void ProcessDpkgStatusLine(char *line);
// The Actuall installation implementation
- virtual bool Install(PkgIterator Pkg,std::string File);
- virtual bool Configure(PkgIterator Pkg);
- virtual bool Remove(PkgIterator Pkg,bool Purge = false);
+ virtual bool Install(PkgIterator Pkg,std::string File) APT_OVERRIDE;
+ virtual bool Configure(PkgIterator Pkg) APT_OVERRIDE;
+ virtual bool Remove(PkgIterator Pkg,bool Purge = false) APT_OVERRIDE;
- virtual bool Go(APT::Progress::PackageManager *progress);
- virtual bool Go(int StatusFd=-1);
+ virtual bool Go(APT::Progress::PackageManager *progress) APT_OVERRIDE;
+ virtual bool Go(int StatusFd=-1) APT_OVERRIDE;
- virtual void Reset();
+ virtual void Reset() APT_OVERRIDE;
public:
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index b73c336db..39bbe484f 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -13,7 +13,6 @@
#include <apt-pkg/depcache.h>
#include <apt-pkg/versionmatch.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
@@ -23,6 +22,7 @@
#include <apt-pkg/cacheset.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/cachefile.h>
#include <apt-pkg/macros.h>
#include <stdio.h>
@@ -63,7 +63,7 @@ ConfigValueInSubTree(const char* SubTree, const char *needle)
}
/*}}}*/
pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) : /*{{{*/
- cache(cache), released(false)
+ d(NULL), cache(cache), released(false)
{
++cache.group_level;
}
@@ -94,8 +94,10 @@ pkgDepCache::ActionGroup::~ActionGroup()
// DepCache::pkgDepCache - Constructors /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgDepCache::pkgDepCache(pkgCache *pCache,Policy *Plcy) :
- group_level(0), Cache(pCache), PkgState(0), DepState(0)
+pkgDepCache::pkgDepCache(pkgCache * const pCache,Policy * const Plcy) :
+ group_level(0), Cache(pCache), PkgState(0), DepState(0),
+ iUsrSize(0), iDownloadSize(0), iInstCount(0), iDelCount(0), iKeepCount(0),
+ iBrokenCount(0), iPolicyBrokenCount(0), iBadCount(0), d(NULL)
{
DebugMarker = _config->FindB("Debug::pkgDepCache::Marker", false);
DebugAutoInstall = _config->FindB("Debug::pkgDepCache::AutoInstall", false);
@@ -118,7 +120,7 @@ pkgDepCache::~pkgDepCache()
// DepCache::Init - Generate the initial extra structures. /*{{{*/
// ---------------------------------------------------------------------
/* This allocats the extension buffers and initializes them. */
-bool pkgDepCache::Init(OpProgress *Prog)
+bool pkgDepCache::Init(OpProgress * const Prog)
{
// Suppress mark updates during this operation (just in case) and
// run a mark operation when Init terminates.
@@ -129,7 +131,7 @@ bool pkgDepCache::Init(OpProgress *Prog)
PkgState = new StateCache[Head().PackageCount];
DepState = new unsigned char[Head().DependsCount];
memset(PkgState,0,sizeof(*PkgState)*Head().PackageCount);
- memset(DepState,0,sizeof(*DepState)*Head().DependsCount);
+ memset(DepState,0,sizeof(*DepState)*Head().DependsCount);
if (Prog != 0)
{
@@ -137,7 +139,7 @@ bool pkgDepCache::Init(OpProgress *Prog)
_("Building dependency tree"));
Prog->SubProgress(Head().PackageCount,_("Candidate versions"));
}
-
+
/* Set the current state of everything. In this state all of the
packages are kept exactly as is. See AllUpgrade */
int Done = 0;
@@ -145,7 +147,7 @@ bool pkgDepCache::Init(OpProgress *Prog)
{
if (Prog != 0 && Done%20 == 0)
Prog->Progress(Done);
-
+
// Find the proper cache slot
StateCache &State = PkgState[I->ID];
State.iFlags = 0;
@@ -154,28 +156,27 @@ bool pkgDepCache::Init(OpProgress *Prog)
State.CandidateVer = GetCandidateVer(I);
State.InstallVer = I.CurrentVer();
State.Mode = ModeKeep;
-
+
State.Update(I,*this);
- }
-
+ }
+
if (Prog != 0)
{
-
Prog->OverallProgress(Head().PackageCount,2*Head().PackageCount,
Head().PackageCount,
_("Building dependency tree"));
Prog->SubProgress(Head().PackageCount,_("Dependency generation"));
}
-
+
Update(Prog);
if(Prog != 0)
Prog->Done();
return true;
-}
+}
/*}}}*/
-bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/
+bool pkgDepCache::readStateFile(OpProgress * const Prog) /*{{{*/
{
FileFd state_file;
string const state = _config->FindFile("Dir::State::extended_states");
@@ -183,7 +184,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/
state_file.Open(state, FileFd::ReadOnly);
off_t const file_size = state_file.Size();
if(Prog != NULL)
- Prog->OverallProgress(0, file_size, 1,
+ Prog->OverallProgress(0, file_size, 1,
_("Reading state information"));
pkgTagFile tagfile(&state_file);
@@ -227,7 +228,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/
return true;
}
/*}}}*/
-bool pkgDepCache::writeStateFile(OpProgress * /*prog*/, bool InstalledOnly) /*{{{*/
+bool pkgDepCache::writeStateFile(OpProgress * const /*prog*/, bool const InstalledOnly) /*{{{*/
{
bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false);
@@ -337,7 +338,7 @@ bool pkgDepCache::writeStateFile(OpProgress * /*prog*/, bool InstalledOnly) /*{{
then walks along the package provides list and checks if each provides
will be installed then checks the provides against the dep. Res will be
set to the package which was used to satisfy the dep. */
-bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
+bool pkgDepCache::CheckDep(DepIterator const &Dep,int const Type,PkgIterator &Res)
{
Res = Dep.TargetPkg();
@@ -346,24 +347,27 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
bug. Conflicts may never self match */
if (Dep.IsIgnorable(Res) == false)
{
- PkgIterator Pkg = Dep.TargetPkg();
// Check the base package
- if (Type == NowVersion && Pkg->CurrentVer != 0)
- if (Dep.IsSatisfied(Pkg.CurrentVer()) == true)
+ if (Type == NowVersion)
+ {
+ if (Res->CurrentVer != 0 && Dep.IsSatisfied(Res.CurrentVer()) == true)
return true;
-
- if (Type == InstallVersion && PkgState[Pkg->ID].InstallVer != 0)
- if (Dep.IsSatisfied(PkgState[Pkg->ID].InstVerIter(*this)) == true)
+ }
+ else if (Type == InstallVersion)
+ {
+ if (PkgState[Res->ID].InstallVer != 0 &&
+ Dep.IsSatisfied(PkgState[Res->ID].InstVerIter(*this)) == true)
return true;
-
- if (Type == CandidateVersion && PkgState[Pkg->ID].CandidateVer != 0)
- if (Dep.IsSatisfied(PkgState[Pkg->ID].CandidateVerIter(*this)) == true)
+ }
+ else if (Type == CandidateVersion)
+ if (PkgState[Res->ID].CandidateVer != 0 &&
+ Dep.IsSatisfied(PkgState[Res->ID].CandidateVerIter(*this)) == true)
return true;
}
-
+
if (Dep->Type == Dep::Obsoletes)
return false;
-
+
// Check the providing packages
PrvIterator P = Dep.TargetPkg().ProvidesList();
for (; P.end() != true; ++P)
@@ -377,21 +381,19 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
if (P.OwnerPkg().CurrentVer() != P.OwnerVer())
continue;
}
-
- if (Type == InstallVersion)
+ else if (Type == InstallVersion)
{
StateCache &State = PkgState[P.OwnerPkg()->ID];
if (State.InstallVer != (Version *)P.OwnerVer())
continue;
}
-
- if (Type == CandidateVersion)
+ else if (Type == CandidateVersion)
{
StateCache &State = PkgState[P.OwnerPkg()->ID];
if (State.CandidateVer != (Version *)P.OwnerVer())
continue;
}
-
+
// Compare the versions.
if (Dep.IsSatisfied(P) == true)
{
@@ -399,7 +401,7 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
return true;
}
}
-
+
return false;
}
/*}}}*/
@@ -481,47 +483,46 @@ void pkgDepCache::AddStates(const PkgIterator &Pkg, bool const Invert)
{
signed char const Add = (Invert == false) ? 1 : -1;
StateCache &State = PkgState[Pkg->ID];
-
+
// The Package is broken (either minimal dep or policy dep)
if ((State.DepState & DepInstMin) != DepInstMin)
iBrokenCount += Add;
if ((State.DepState & DepInstPolicy) != DepInstPolicy)
iPolicyBrokenCount += Add;
-
+
// Bad state
if (Pkg.State() != PkgIterator::NeedsNothing)
iBadCount += Add;
-
+
// Not installed
if (Pkg->CurrentVer == 0)
{
if (State.Mode == ModeDelete &&
(State.iFlags & Purge) == Purge && Pkg.Purge() == false)
iDelCount += Add;
-
+
if (State.Mode == ModeInstall)
iInstCount += Add;
return;
}
-
+
// Installed, no upgrade
if (State.Status == 0)
- {
+ {
if (State.Mode == ModeDelete)
iDelCount += Add;
else
if ((State.iFlags & ReInstall) == ReInstall)
iInstCount += Add;
-
return;
}
-
+
// Alll 3 are possible
if (State.Mode == ModeDelete)
- iDelCount += Add;
- if (State.Mode == ModeKeep)
+ iDelCount += Add;
+ else if (State.Mode == ModeKeep)
iKeepCount += Add;
- if (State.Mode == ModeInstall)
+ else if (State.Mode == ModeInstall)
iInstCount += Add;
}
/*}}}*/
@@ -532,7 +533,6 @@ void pkgDepCache::AddStates(const PkgIterator &Pkg, bool const Invert)
void pkgDepCache::BuildGroupOrs(VerIterator const &V)
{
unsigned char Group = 0;
-
for (DepIterator D = V.DependsList(); D.end() != true; ++D)
{
// Build the dependency state.
@@ -542,18 +542,18 @@ void pkgDepCache::BuildGroupOrs(VerIterator const &V)
right sense for a conflicts group */
if (D.IsNegative() == true)
State = ~State;
-
+
// Add to the group if we are within an or..
State &= 0x7;
Group |= State;
State |= Group << 3;
if ((D->CompareOp & Dep::Or) != Dep::Or)
Group = 0;
-
+
// Invert for Conflicts
if (D.IsNegative() == true)
State = ~State;
- }
+ }
}
/*}}}*/
// DepCache::VersionState - Perform a pass over a dependency list /*{{{*/
@@ -562,34 +562,31 @@ void pkgDepCache::BuildGroupOrs(VerIterator const &V)
state of the list, filtering it through both a Min check and a Policy
check. The return result will have SetMin/SetPolicy low if a check
fails. It uses the DepState cache for it's computations. */
-unsigned char pkgDepCache::VersionState(DepIterator D,unsigned char Check,
- unsigned char SetMin,
- unsigned char SetPolicy)
+unsigned char pkgDepCache::VersionState(DepIterator D, unsigned char const Check,
+ unsigned char const SetMin,
+ unsigned char const SetPolicy) const
{
unsigned char Dep = 0xFF;
-
while (D.end() != true)
{
- // Compute a single dependency element (glob or)
- DepIterator Start = D;
- unsigned char State = 0;
- for (bool LastOR = true; D.end() == false && LastOR == true; ++D)
- {
- State |= DepState[D->ID];
- LastOR = (D->CompareOp & Dep::Or) == Dep::Or;
- }
-
+ // the last or-dependency has the state of all previous or'ed
+ DepIterator Start, End;
+ D.GlobOr(Start, End);
+ // ignore if we are called with Dep{Install,…} or DepG{Install,…}
+ // the later would be more correct, but the first is what we get
+ unsigned char const State = DepState[End->ID] | (DepState[End->ID] >> 3);
+
// Minimum deps that must be satisfied to have a working package
if (Start.IsCritical() == true)
+ {
if ((State & Check) != Check)
- Dep &= ~SetMin;
-
+ return Dep &= ~(SetMin | SetPolicy);
+ }
// Policy deps that must be satisfied to install the package
- if (IsImportantDep(Start) == true &&
+ else if (IsImportantDep(Start) == true &&
(State & Check) != Check)
Dep &= ~SetPolicy;
}
-
return Dep;
}
/*}}}*/
@@ -598,17 +595,17 @@ unsigned char pkgDepCache::VersionState(DepIterator D,unsigned char Check,
/* This is the main dependency computation bit. It computes the 3 main
results for a dependencys, Now, Install and Candidate. Callers must
invert the result if dealing with conflicts. */
-unsigned char pkgDepCache::DependencyState(DepIterator &D)
+unsigned char pkgDepCache::DependencyState(DepIterator const &D)
{
unsigned char State = 0;
-
+
if (CheckDep(D,NowVersion) == true)
State |= DepNow;
if (CheckDep(D,InstallVersion) == true)
State |= DepInstall;
if (CheckDep(D,CandidateVersion) == true)
State |= DepCVer;
-
+
return State;
}
/*}}}*/
@@ -617,7 +614,7 @@ unsigned char pkgDepCache::DependencyState(DepIterator &D)
/* This determines the combined dependency representation of a package
for its two states now and install. This is done by using the pre-generated
dependency information. */
-void pkgDepCache::UpdateVerState(PkgIterator Pkg)
+void pkgDepCache::UpdateVerState(PkgIterator const &Pkg)
{
// Empty deps are always true
StateCache &State = PkgState[Pkg->ID];
@@ -651,7 +648,7 @@ void pkgDepCache::UpdateVerState(PkgIterator Pkg)
// ---------------------------------------------------------------------
/* This will figure out the state of all the packages and all the
dependencies based on the current policy. */
-void pkgDepCache::Update(OpProgress *Prog)
+void pkgDepCache::Update(OpProgress * const Prog)
{
iUsrSize = 0;
iDownloadSize = 0;
@@ -838,6 +835,41 @@ bool pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
ActionGroup group(*this);
+ if (FromUser == false)
+ {
+ VerIterator const PV = P.InstVerIter(*this);
+ if (PV.end() == false)
+ {
+ // removed metapackages mark their dependencies as manual to prevent in "desktop depends browser, texteditor"
+ // the removal of browser to suggest the removal of desktop and texteditor.
+ // We ignore the auto-bit here as we can't deal with metapackage cascardes otherwise.
+ // We do not check for or-groups here as we don't know which package takes care of
+ // providing the feature the user likes e.g.: browser1 | browser2 | browser3
+ // Temporary removals are effected by this as well, which is bad, but unlikely in practice
+ bool const PinNeverMarkAutoSection = (PV->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", PV.Section()));
+ if (PinNeverMarkAutoSection)
+ {
+ for (DepIterator D = PV.DependsList(); D.end() != true; ++D)
+ {
+ if (D.IsMultiArchImplicit() == true || D.IsNegative() == true || IsImportantDep(D) == false)
+ continue;
+
+ pkgCacheFile CacheFile(this);
+ APT::VersionList verlist = APT::VersionList::FromDependency(CacheFile, D, APT::CacheSetHelper::INSTALLED);
+ for (auto const &V : verlist)
+ {
+ PkgIterator const DP = V.ParentPkg();
+ if(DebugAutoInstall == true)
+ std::clog << OutputInDepth(Depth) << "Setting " << DP.FullName(false) << " NOT as auto-installed (direct "
+ << D.DepType() << " of " << Pkg.FullName(false) << " which is in APT::Never-MarkAuto-Sections)" << std::endl;
+
+ MarkAuto(DP, false);
+ }
+ }
+ }
+ }
+ }
+
if (DebugMarker == true)
std::clog << OutputInDepth(Depth) << (rPurge ? "MarkPurge " : "MarkDelete ") << Pkg << " FU=" << FromUser << std::endl;
@@ -947,7 +979,7 @@ bool pkgDepCache::IsModeChangeOk(ModeList const mode, PkgIterator const &Pkg,
/* */
struct CompareProviders {
pkgCache::PkgIterator const Pkg;
- CompareProviders(pkgCache::DepIterator const &Dep) : Pkg(Dep.TargetPkg()) {};
+ explicit CompareProviders(pkgCache::DepIterator const &Dep) : Pkg(Dep.TargetPkg()) {};
//bool operator() (APT::VersionList::iterator const &AV, APT::VersionList::iterator const &BV)
bool operator() (pkgCache::VerIterator const &AV, pkgCache::VerIterator const &BV)
{
@@ -1095,7 +1127,28 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
if (DebugMarker == true)
std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << " FU=" << FromUser << std::endl;
- DepIterator Dep = P.InstVerIter(*this).DependsList();
+ bool MoveAutoBitToDependencies = false;
+ VerIterator const PV = P.InstVerIter(*this);
+ if (unlikely(PV.end() == true))
+ return false;
+ else if (PV->Section != 0 && (P.Flags & Flag::Auto) != Flag::Auto)
+ {
+ VerIterator const CurVer = Pkg.CurrentVer();
+ if (CurVer.end() == false && CurVer->Section != 0 && strcmp(CurVer.Section(), PV.Section()) != 0)
+ {
+ bool const CurVerInMoveSection = ConfigValueInSubTree("APT::Move-Autobit-Sections", CurVer.Section());
+ bool const InstVerInMoveSection = ConfigValueInSubTree("APT::Move-Autobit-Sections", PV.Section());
+ MoveAutoBitToDependencies = (CurVerInMoveSection == false && InstVerInMoveSection == true);
+ if (MoveAutoBitToDependencies == true)
+ {
+ if(DebugAutoInstall == true)
+ std::clog << OutputInDepth(Depth) << "Setting " << Pkg.FullName(false) << " as auto-installed, moving manual to its dependencies" << std::endl;
+ MarkAuto(Pkg, true);
+ }
+ }
+ }
+
+ DepIterator Dep = PV.DependsList();
for (; Dep.end() != true;)
{
// Grok or groups
@@ -1187,18 +1240,8 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
fixing the problem for "positive" dependencies */
if (Start.IsNegative() == false && (DepState[Start->ID] & DepCVer) == DepCVer)
{
- APT::VersionList verlist;
- pkgCache::VerIterator Cand = PkgState[Start.TargetPkg()->ID].CandidateVerIter(*this);
- if (Cand.end() == false && Start.IsSatisfied(Cand) == true)
- verlist.insert(Cand);
- for (PrvIterator Prv = Start.TargetPkg().ProvidesList(); Prv.end() != true; ++Prv)
- {
- pkgCache::VerIterator V = Prv.OwnerVer();
- pkgCache::VerIterator Cand = PkgState[Prv.OwnerPkg()->ID].CandidateVerIter(*this);
- if (Cand.end() == true || V != Cand || Start.IsSatisfied(Prv) == false)
- continue;
- verlist.insert(Cand);
- }
+ pkgCacheFile CacheFile(this);
+ APT::VersionList verlist = APT::VersionList::FromDependency(CacheFile, Start, APT::CacheSetHelper::CANDIDATE);
CompareProviders comp(Start);
do {
@@ -1217,14 +1260,17 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
verlist.erase(InstVer);
continue;
}
+
// now check if we should consider it a automatic dependency or not
- if(InstPkg->CurrentVer == 0 && InstVer->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", InstVer.Section()))
+ if(InstPkg->CurrentVer == 0 && MoveAutoBitToDependencies)
{
if(DebugAutoInstall == true)
- std::clog << OutputInDepth(Depth) << "Setting NOT as auto-installed (direct "
- << Start.DepType() << " of pkg in APT::Never-MarkAuto-Sections)" << std::endl;
+ std::clog << OutputInDepth(Depth) << "Setting " << InstPkg.FullName(false) << " NOT as auto-installed (direct "
+ << Start.DepType() << " of " << Pkg.FullName(false) << " which is manual and in APT::Move-Autobit-Sections)" << std::endl;
MarkAuto(InstPkg, false);
}
+
+
break;
} while(true);
continue;
@@ -1234,9 +1280,9 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
Otherwise we remove the offender if needed */
else if (Start.IsNegative() == true && Start->Type != pkgCache::Dep::Obsoletes)
{
- SPtrArray<Version *> List = Start.AllTargets();
+ std::unique_ptr<Version *[]> List(Start.AllTargets());
pkgCache::PkgIterator TrgPkg = Start.TargetPkg();
- for (Version **I = List; *I != 0; I++)
+ for (Version **I = List.get(); *I != 0; I++)
{
VerIterator Ver(*this,*I);
PkgIterator Pkg = Ver.ParentPkg();
@@ -1662,10 +1708,10 @@ const char *pkgDepCache::StateCache::StripEpoch(const char *Ver)
return 0;
// Strip any epoch
- for (const char *I = Ver; *I != 0; I++)
- if (*I == ':')
- return I + 1;
- return Ver;
+ char const * const I = strchr(Ver, ':');
+ if (I == nullptr)
+ return Ver;
+ return I + 1;
}
/*}}}*/
// Policy::GetCandidateVer - Returns the Candidate install version /*{{{*/
@@ -1685,13 +1731,13 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator const &Pk
for (VerFileIterator J = I.FileList(); J.end() == false; ++J)
{
- if ((J.File()->Flags & Flag::NotSource) != 0)
+ if (J.File().Flagged(Flag::NotSource))
continue;
/* Stash the highest version of a not-automatic source, we use it
if there is nothing better */
- if ((J.File()->Flags & Flag::NotAutomatic) != 0 ||
- (J.File()->Flags & Flag::ButAutomaticUpgrades) != 0)
+ if (J.File().Flagged(Flag::NotAutomatic) ||
+ J.File().Flagged(Flag::ButAutomaticUpgrades))
{
if (Last.end() == true)
Last = I;
@@ -1708,17 +1754,17 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator const &Pk
// Policy::IsImportantDep - True if the dependency is important /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgDepCache::Policy::IsImportantDep(DepIterator const &Dep)
+bool pkgDepCache::Policy::IsImportantDep(DepIterator const &Dep) const
{
if(Dep.IsCritical())
return true;
- else if(Dep->Type == pkgCache::Dep::Recommends)
+ else if(Dep->Type == pkgCache::Dep::Recommends)
{
if (InstallRecommends)
return true;
// we suport a special mode to only install-recommends for certain
// sections
- // FIXME: this is a meant as a temporarly solution until the
+ // FIXME: this is a meant as a temporarly solution until the
// recommends are cleaned up
const char *sec = Dep.ParentVer().Section();
if (sec && ConfigValueInSubTree("APT::Install-Recommends-Sections", sec))
@@ -1733,6 +1779,8 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator const &Dep)
// Policy::GetPriority - Get the priority of the package pin /*{{{*/
APT_CONST signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const &/*Pkg*/)
{ return 0; }
+APT_CONST signed short pkgDepCache::Policy::GetPriority(pkgCache::VerIterator const &/*Ver*/, bool /*ConsiderFiles*/)
+{ return 0; }
APT_CONST signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const &/*File*/)
{ return 0; }
/*}}}*/
@@ -1764,24 +1812,22 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc)
if (_config->Find("APT::Solver", "internal") != "internal")
return true;
- bool follow_recommends;
- bool follow_suggests;
- bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false);
+ bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false);
// init the states
- for(PkgIterator p = PkgBegin(); !p.end(); ++p)
+ map_id_t const PackagesCount = Head().PackageCount;
+ for(map_id_t i = 0; i < PackagesCount; ++i)
{
- PkgState[p->ID].Marked = false;
- PkgState[p->ID].Garbage = false;
-
- // debug output
- if(debug_autoremove && PkgState[p->ID].Flags & Flag::Auto)
- std::clog << "AutoDep: " << p.FullName() << std::endl;
+ PkgState[i].Marked = false;
+ PkgState[i].Garbage = false;
}
+ if (debug_autoremove)
+ for(PkgIterator p = PkgBegin(); !p.end(); ++p)
+ if(PkgState[p->ID].Flags & Flag::Auto)
+ std::clog << "AutoDep: " << p.FullName() << std::endl;
- // init vars
- follow_recommends = MarkFollowsRecommends();
- follow_suggests = MarkFollowsSuggests();
+ bool const follow_recommends = MarkFollowsRecommends();
+ bool const follow_suggests = MarkFollowsSuggests();
// do the mark part, this is the core bit of the algorithm
for(PkgIterator p = PkgBegin(); !p.end(); ++p)
@@ -1965,7 +2011,7 @@ bool pkgDepCache::MarkAndSweep(InRootSetFunc &rootFunc)
}
bool pkgDepCache::MarkAndSweep()
{
- std::auto_ptr<InRootSetFunc> f(GetRootSetFunc());
+ std::unique_ptr<InRootSetFunc> f(GetRootSetFunc());
if(f.get() != NULL)
return MarkAndSweep(*f.get());
else
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 20d263c67..ba997c8a6 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -1,6 +1,5 @@
// -*- mode: c++; mode: fold -*-
// Description /*{{{*/
-// $Id: depcache.h,v 1.14 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################
DepCache - Dependency Extension data for the cache
@@ -164,6 +163,7 @@ class pkgDepCache : protected pkgCache::Namespace
*/
class ActionGroup
{
+ void * const d;
pkgDepCache &cache;
bool released;
@@ -179,7 +179,7 @@ class pkgDepCache : protected pkgCache::Namespace
* As long as this object exists, no automatic cleanup
* operations will be undertaken.
*/
- ActionGroup(pkgDepCache &cache);
+ explicit ActionGroup(pkgDepCache &cache);
/** \brief Clean up the action group before it is destroyed.
*
@@ -192,7 +192,7 @@ class pkgDepCache : protected pkgCache::Namespace
* If this is the last action group, the automatic cache
* cleanup operations will be undertaken.
*/
- ~ActionGroup();
+ virtual ~ActionGroup();
};
/** \brief Returns \b true for packages matching a regular
@@ -204,7 +204,7 @@ class pkgDepCache : protected pkgCache::Namespace
DefaultRootSetFunc() : Configuration::MatchAgainstConfig("APT::NeverAutoRemove") {};
virtual ~DefaultRootSetFunc() {};
- bool InRootSet(const pkgCache::PkgIterator &pkg) { return pkg.end() == false && Match(pkg.Name()); };
+ bool InRootSet(const pkgCache::PkgIterator &pkg) APT_OVERRIDE { return pkg.end() == false && Match(pkg.Name()); };
};
struct StateCache
@@ -250,7 +250,7 @@ class pkgDepCache : protected pkgCache::Namespace
inline bool Keep() const {return Mode == ModeKeep;};
inline bool Protect() const {return (iFlags & Protected) == Protected;};
inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;};
- inline bool Upgradable() const {return Status >= 1;};
+ inline bool Upgradable() const {return Status >= 1 && CandidateVer != NULL;};
inline bool Downgrade() const {return Status < 0 && Mode == ModeInstall;};
inline bool Held() const {return Status != 0 && Keep();};
inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;};
@@ -267,7 +267,7 @@ class pkgDepCache : protected pkgCache::Namespace
// Helper functions
void BuildGroupOrs(VerIterator const &V);
- void UpdateVerState(PkgIterator Pkg);
+ void UpdateVerState(PkgIterator const &Pkg);
// User Policy control
class Policy
@@ -279,8 +279,9 @@ class pkgDepCache : protected pkgCache::Namespace
}
virtual VerIterator GetCandidateVer(PkgIterator const &Pkg);
- virtual bool IsImportantDep(DepIterator const &Dep);
+ virtual bool IsImportantDep(DepIterator const &Dep) const;
virtual signed short GetPriority(PkgIterator const &Pkg);
+ virtual signed short GetPriority(VerIterator const &Ver, bool ConsiderFiles=true);
virtual signed short GetPriority(PkgFileIterator const &File);
virtual ~Policy() {};
@@ -323,18 +324,18 @@ class pkgDepCache : protected pkgCache::Namespace
Policy *LocalPolicy;
// Check for a matching provides
- bool CheckDep(DepIterator Dep,int Type,PkgIterator &Res);
- inline bool CheckDep(DepIterator Dep,int Type)
+ bool CheckDep(DepIterator const &Dep,int const Type,PkgIterator &Res);
+ inline bool CheckDep(DepIterator const &Dep,int const Type)
{
PkgIterator Res(*this,0);
return CheckDep(Dep,Type,Res);
}
// Computes state information for deps and versions (w/o storing)
- unsigned char DependencyState(DepIterator &D);
- unsigned char VersionState(DepIterator D,unsigned char Check,
- unsigned char SetMin,
- unsigned char SetPolicy);
+ unsigned char DependencyState(DepIterator const &D);
+ unsigned char VersionState(DepIterator D,unsigned char const Check,
+ unsigned char const SetMin,
+ unsigned char const SetPolicy) const;
// Recalculates various portions of the cache, call after changing something
void Update(DepIterator Dep); // Mostly internal
@@ -362,7 +363,7 @@ class pkgDepCache : protected pkgCache::Namespace
// Policy implementation
inline VerIterator GetCandidateVer(PkgIterator const &Pkg) {return LocalPolicy->GetCandidateVer(Pkg);};
- inline bool IsImportantDep(DepIterator Dep) {return LocalPolicy->IsImportantDep(Dep);};
+ inline bool IsImportantDep(DepIterator Dep) const {return LocalPolicy->IsImportantDep(Dep);};
inline Policy &GetPolicy() {return *LocalPolicy;};
// Accessors
@@ -471,8 +472,8 @@ class pkgDepCache : protected pkgCache::Namespace
unsigned long Depth = 0, bool FromUser = true);
// read persistent states
- bool readStateFile(OpProgress *prog);
- bool writeStateFile(OpProgress *prog, bool InstalledOnly=true);
+ bool readStateFile(OpProgress * const prog);
+ bool writeStateFile(OpProgress * const prog, bool const InstalledOnly=true);
// Size queries
inline signed long long UsrSize() {return iUsrSize;};
@@ -484,11 +485,11 @@ class pkgDepCache : protected pkgCache::Namespace
inline unsigned long PolicyBrokenCount() {return iPolicyBrokenCount;};
inline unsigned long BadCount() {return iBadCount;};
- bool Init(OpProgress *Prog);
+ bool Init(OpProgress * const Prog);
// Generate all state information
- void Update(OpProgress *Prog = 0);
+ void Update(OpProgress * const Prog = 0);
- pkgDepCache(pkgCache *Cache,Policy *Plcy = 0);
+ pkgDepCache(pkgCache * const Cache,Policy * const Plcy = 0);
virtual ~pkgDepCache();
protected:
@@ -503,6 +504,8 @@ class pkgDepCache : protected pkgCache::Namespace
bool const rPurge, unsigned long const Depth, bool const FromUser);
private:
+ void * const d;
+
APT_HIDDEN bool IsModeChangeOk(ModeList const mode, PkgIterator const &Pkg,
unsigned long const Depth, bool const FromUser);
};
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index 3c6a7e30f..aea6f3a5d 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -7,31 +7,25 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/edsp.h>
#include <apt-pkg/error.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/progress.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/edsp.h>
+#include <apt-pkg/tagfile.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/pkgrecords.h>
#include <ctype.h>
#include <stddef.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include <stdio.h>
-#include <algorithm>
#include <iostream>
-#include <vector>
#include <limits>
#include <string>
-#include <list>
#include <apti18n.h>
/*}}}*/
@@ -39,71 +33,19 @@
using std::string;
// we could use pkgCache::DepType and ::Priority, but these would be localized strings…
-const char * const EDSP::PrioMap[] = {0, "important", "required", "standard",
+const char * const PrioMap[] = {0, "important", "required", "standard",
"optional", "extra"};
-const char * const EDSP::DepMap[] = {"", "Depends", "Pre-Depends", "Suggests",
+const char * const DepMap[] = {"", "Depends", "Pre-Depends", "Suggests",
"Recommends" , "Conflicts", "Replaces",
"Obsoletes", "Breaks", "Enhances"};
-// EDSP::WriteScenario - to the given file descriptor /*{{{*/
-bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress)
-{
- if (Progress != NULL)
- Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
- unsigned long p = 0;
- std::vector<std::string> archs = APT::Configuration::getArchitectures();
- for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg)
- {
- std::string const arch = Pkg.Arch();
- if (std::find(archs.begin(), archs.end(), arch) == archs.end())
- continue;
- for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver, ++p)
- {
- WriteScenarioVersion(Cache, output, Pkg, Ver);
- WriteScenarioDependency(output, Ver);
- fprintf(output, "\n");
- if (Progress != NULL && p % 100 == 0)
- Progress->Progress(p);
- }
- }
- return true;
-}
- /*}}}*/
-// EDSP::WriteLimitedScenario - to the given file descriptor /*{{{*/
-bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
- APT::PackageSet const &pkgset,
- OpProgress *Progress)
-{
- if (Progress != NULL)
- Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
- unsigned long p = 0;
- for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg, ++p)
- for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
- {
- WriteScenarioVersion(Cache, output, Pkg, Ver);
- WriteScenarioLimitedDependency(output, Ver, pkgset);
- fprintf(output, "\n");
- if (Progress != NULL && p % 100 == 0)
- Progress->Progress(p);
- }
- if (Progress != NULL)
- Progress->Done();
- return true;
-}
- /*}}}*/
-// EDSP::WriteScenarioVersion /*{{{*/
-void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
+
+// WriteScenarioVersion /*{{{*/
+static void WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
pkgCache::VerIterator const &Ver)
{
fprintf(output, "Package: %s\n", Pkg.Name());
-#if APT_PKG_ABI >= 413
fprintf(output, "Source: %s\n", Ver.SourcePkgName());
-#else
- pkgRecords Recs(Cache);
- pkgRecords::Parser &rec = Recs.Lookup(Ver.FileList());
- string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
- fprintf(output, "Source: %s\n", srcpkg.c_str());
-#endif
fprintf(output, "Architecture: %s\n", Ver.Arch());
fprintf(output, "Version: %s\n", Ver.VerStr());
if (Pkg.CurrentVer() == Ver)
@@ -129,7 +71,7 @@ void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgI
signed short const p = Cache.GetPolicy().GetPriority(File);
if (Pin < p)
Pin = p;
- if ((File->Flags & pkgCache::Flag::NotSource) != pkgCache::Flag::NotSource) {
+ if (File.Flagged(pkgCache::Flag::NotSource) == false) {
string Release = File.RelStr();
if (!Release.empty())
Releases.insert(Release);
@@ -147,18 +89,18 @@ void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgI
fprintf(output, "APT-Automatic: yes\n");
}
/*}}}*/
-// EDSP::WriteScenarioDependency /*{{{*/
-void EDSP::WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &Ver)
+// WriteScenarioDependency /*{{{*/
+static void WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &Ver)
{
std::string dependencies[pkgCache::Dep::Enhances + 1];
bool orGroup = false;
for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
{
- if (Dep.IsMultiArchImplicit() == true)
+ if (Dep.IsImplicit() == true)
continue;
if (orGroup == false)
dependencies[Dep->Type].append(", ");
- dependencies[Dep->Type].append(Dep.TargetPkg().Name());
+ dependencies[Dep->Type].append(Dep.TargetPkg().FullName((Dep->CompareOp & pkgCache::Dep::ArchSpecific) != pkgCache::Dep::ArchSpecific));
if (Dep->Version != 0)
dependencies[Dep->Type].append(" (").append(pkgCache::CompTypeDeb(Dep->CompareOp)).append(" ").append(Dep.TargetVer()).append(")");
if ((Dep->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or)
@@ -183,8 +125,8 @@ void EDSP::WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &V
fprintf(output, "Provides: %s\n", provides.c_str()+2);
}
/*}}}*/
-// EDSP::WriteScenarioLimitedDependency /*{{{*/
-void EDSP::WriteScenarioLimitedDependency(FILE* output,
+// WriteScenarioLimitedDependency /*{{{*/
+static void WriteScenarioLimitedDependency(FILE* output,
pkgCache::VerIterator const &Ver,
APT::PackageSet const &pkgset)
{
@@ -192,7 +134,7 @@ void EDSP::WriteScenarioLimitedDependency(FILE* output,
bool orGroup = false;
for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
{
- if (Dep.IsMultiArchImplicit() == true)
+ if (Dep.IsImplicit() == true)
continue;
if (orGroup == false)
{
@@ -208,7 +150,7 @@ void EDSP::WriteScenarioLimitedDependency(FILE* output,
orGroup = false;
continue;
}
- dependencies[Dep->Type].append(Dep.TargetPkg().Name());
+ dependencies[Dep->Type].append(Dep.TargetPkg().FullName((Dep->CompareOp & pkgCache::Dep::ArchSpecific) != pkgCache::Dep::ArchSpecific));
if (Dep->Version != 0)
dependencies[Dep->Type].append(" (").append(pkgCache::CompTypeDeb(Dep->CompareOp)).append(" ").append(Dep.TargetVer()).append(")");
if ((Dep->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or)
@@ -235,6 +177,52 @@ void EDSP::WriteScenarioLimitedDependency(FILE* output,
fprintf(output, "Provides: %s\n", provides.c_str()+2);
}
/*}}}*/
+// EDSP::WriteScenario - to the given file descriptor /*{{{*/
+bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress)
+{
+ if (Progress != NULL)
+ Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
+ unsigned long p = 0;
+ std::vector<std::string> archs = APT::Configuration::getArchitectures();
+ for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg)
+ {
+ std::string const arch = Pkg.Arch();
+ if (std::find(archs.begin(), archs.end(), arch) == archs.end())
+ continue;
+ for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver, ++p)
+ {
+ WriteScenarioVersion(Cache, output, Pkg, Ver);
+ WriteScenarioDependency(output, Ver);
+ fprintf(output, "\n");
+ if (Progress != NULL && p % 100 == 0)
+ Progress->Progress(p);
+ }
+ }
+ return true;
+}
+ /*}}}*/
+// EDSP::WriteLimitedScenario - to the given file descriptor /*{{{*/
+bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
+ APT::PackageSet const &pkgset,
+ OpProgress *Progress)
+{
+ if (Progress != NULL)
+ Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
+ unsigned long p = 0;
+ for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg, ++p)
+ for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
+ {
+ WriteScenarioVersion(Cache, output, Pkg, Ver);
+ WriteScenarioLimitedDependency(output, Ver, pkgset);
+ fprintf(output, "\n");
+ if (Progress != NULL && p % 100 == 0)
+ Progress->Progress(p);
+ }
+ if (Progress != NULL)
+ Progress->Done();
+ return true;
+}
+ /*}}}*/
// EDSP::WriteRequest - to the given file descriptor /*{{{*/
bool EDSP::WriteRequest(pkgDepCache &Cache, FILE* output, bool const Upgrade,
bool const DistUpgrade, bool const AutoRemove,
@@ -365,13 +353,13 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progres
return true;
}
/*}}}*/
-// EDSP::ReadLine - first line from the given file descriptor /*{{{*/
+// ReadLine - first line from the given file descriptor /*{{{*/
// ---------------------------------------------------------------------
/* Little helper method to read a complete line into a string. Similar to
fgets but we need to use the low-level read() here as otherwise the
listparser will be confused later on as mixing of fgets and read isn't
a supported action according to the manpages and results are undefined */
-bool EDSP::ReadLine(int const input, std::string &line) {
+static bool ReadLine(int const input, std::string &line) {
char one;
ssize_t data = 0;
line.erase();
@@ -390,11 +378,11 @@ bool EDSP::ReadLine(int const input, std::string &line) {
return false;
}
/*}}}*/
-// EDSP::StringToBool - convert yes/no to bool /*{{{*/
+// StringToBool - convert yes/no to bool /*{{{*/
// ---------------------------------------------------------------------
/* we are not as lazy as we are in the global StringToBool as we really
only accept yes/no here - but we will ignore leading spaces */
-bool EDSP::StringToBool(char const *answer, bool const defValue) {
+static bool StringToBool(char const *answer, bool const defValue) {
for (; isspace(*answer) != 0; ++answer);
if (strncasecmp(answer, "yes", 3) == 0)
return true;
@@ -443,11 +431,11 @@ bool EDSP::ReadRequest(int const input, std::list<std::string> &install,
request = &remove;
}
else if (line.compare(0, 8, "Upgrade:") == 0)
- upgrade = EDSP::StringToBool(line.c_str() + 9, false);
+ upgrade = StringToBool(line.c_str() + 9, false);
else if (line.compare(0, 13, "Dist-Upgrade:") == 0)
- distUpgrade = EDSP::StringToBool(line.c_str() + 14, false);
+ distUpgrade = StringToBool(line.c_str() + 14, false);
else if (line.compare(0, 11, "Autoremove:") == 0)
- autoRemove = EDSP::StringToBool(line.c_str() + 12, false);
+ autoRemove = StringToBool(line.c_str() + 12, false);
else if (line.compare(0, 13, "Architecture:") == 0)
_config->Set("APT::Architecture", line.c_str() + 14);
else if (line.compare(0, 14, "Architectures:") == 0)
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index 9e833556a..4f5f500a1 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -27,24 +27,8 @@
class pkgDepCache;
class OpProgress;
-class EDSP /*{{{*/
+namespace EDSP /*{{{*/
{
- // we could use pkgCache::DepType and ::Priority, but these would be localized strings…
- static const char * const PrioMap[];
- static const char * const DepMap[];
-
- APT_HIDDEN bool static ReadLine(int const input, std::string &line);
- APT_HIDDEN bool static StringToBool(char const *answer, bool const defValue);
-
- APT_HIDDEN void static WriteScenarioVersion(pkgDepCache &Cache, FILE* output,
- pkgCache::PkgIterator const &Pkg,
- pkgCache::VerIterator const &Ver);
- APT_HIDDEN void static WriteScenarioDependency(FILE* output,
- pkgCache::VerIterator const &Ver);
- APT_HIDDEN void static WriteScenarioLimitedDependency(FILE* output,
- pkgCache::VerIterator const &Ver,
- APT::PackageSet const &pkgset);
-public:
/** \brief creates the EDSP request stanza
*
* In the EDSP protocol the first thing send to the resolver is a stanza
@@ -61,7 +45,7 @@ public:
*
* \return true if request was composed successfully, otherwise false
*/
- bool static WriteRequest(pkgDepCache &Cache, FILE* output,
+ bool WriteRequest(pkgDepCache &Cache, FILE* output,
bool const upgrade = false,
bool const distUpgrade = false,
bool const autoRemove = false,
@@ -84,7 +68,7 @@ public:
*
* \return true if universe was composed successfully, otherwise false
*/
- bool static WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress = NULL);
+ bool WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress = NULL);
/** \brief creates a limited scenario representing the package universe
*
@@ -101,7 +85,7 @@ public:
*
* \return true if universe was composed successfully, otherwise false
*/
- bool static WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
+ bool WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
APT::PackageSet const &pkgset,
OpProgress *Progress = NULL);
@@ -118,7 +102,7 @@ public:
*
* \return true if a solution is found and applied correctly, otherwise false
*/
- bool static ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
+ bool ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
/** \brief search and read the request stanza for action later
*
@@ -136,7 +120,7 @@ public:
*
* \return true if the request could be found and worked on, otherwise false
*/
- bool static ReadRequest(int const input, std::list<std::string> &install,
+ bool ReadRequest(int const input, std::list<std::string> &install,
std::list<std::string> &remove, bool &upgrade,
bool &distUpgrade, bool &autoRemove);
@@ -152,7 +136,7 @@ public:
*
* \return false if the request couldn't be applied, true otherwise
*/
- bool static ApplyRequest(std::list<std::string> const &install,
+ bool ApplyRequest(std::list<std::string> const &install,
std::list<std::string> const &remove,
pkgDepCache &Cache);
@@ -168,7 +152,7 @@ public:
*
* \return true if solution could be written, otherwise false
*/
- bool static WriteSolution(pkgDepCache &Cache, FILE* output);
+ bool WriteSolution(pkgDepCache &Cache, FILE* output);
/** \brief sends a progress report
*
@@ -176,7 +160,7 @@ public:
* \param message the solver wants the user to see
* \param output the front-end listens for progress report
*/
- bool static WriteProgress(unsigned short const percent, const char* const message, FILE* output);
+ bool WriteProgress(unsigned short const percent, const char* const message, FILE* output);
/** \brief sends an error report
*
@@ -193,7 +177,7 @@ public:
* \param message is free form text to describe the error
* \param output the front-end listens for error messages
*/
- bool static WriteError(char const * const uuid, std::string const &message, FILE* output);
+ bool WriteError(char const * const uuid, std::string const &message, FILE* output);
/** \brief executes the given solver and returns the pipe ends
@@ -207,8 +191,8 @@ public:
*
* \return PID of the started solver or 0 if failure occurred
*/
- pid_t static ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
- APT_DEPRECATED bool static ExecuteSolver(const char* const solver, int *solver_in, int *solver_out);
+ pid_t ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
+ APT_DEPRECATED bool ExecuteSolver(const char* const solver, int *solver_in, int *solver_out);
/** \brief call an external resolver to handle the request
*
@@ -224,9 +208,9 @@ public:
* \return true if the solver has successfully solved the problem,
* otherwise false
*/
- bool static ResolveExternal(const char* const solver, pkgDepCache &Cache,
+ bool ResolveExternal(const char* const solver, pkgDepCache &Cache,
bool const upgrade, bool const distUpgrade,
bool const autoRemove, OpProgress *Progress = NULL);
-};
+}
/*}}}*/
#endif
diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc
index d00536362..409117c5e 100644
--- a/apt-pkg/edsp/edspindexfile.cc
+++ b/apt-pkg/edsp/edspindexfile.cc
@@ -12,13 +12,8 @@
#include <apt-pkg/edsplistparser.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/debindexfile.h>
#include <apt-pkg/indexfile.h>
-#include <apt-pkg/mmap.h>
#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/cacheiterators.h>
-#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/pkgrecords.h>
#include <stddef.h>
@@ -26,59 +21,67 @@
#include <string>
/*}}}*/
-// edspIndex::edspIndex - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-edspIndex::edspIndex(std::string File) : debStatusIndex(File)
+// EDSP Index /*{{{*/
+edspIndex::edspIndex(std::string const &File) : pkgDebianIndexRealFile(File, true), d(NULL)
{
}
- /*}}}*/
-// StatusIndex::Merge - Load the index file into a cache /*{{{*/
-bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
+std::string edspIndex::GetComponent() const
+{
+ return "edsp";
+}
+std::string edspIndex::GetArchitecture() const
+{
+ return std::string();
+}
+bool edspIndex::HasPackages() const
+{
+ return true;
+}
+bool edspIndex::Exists() const
{
- FileFd Pkg;
- if (File != "stdin")
- Pkg.Open(File, FileFd::ReadOnly);
- else
- Pkg.OpenDescriptor(STDIN_FILENO, FileFd::ReadOnly);
- if (_error->PendingError() == true)
- return false;
- edspListParser Parser(&Pkg);
- if (_error->PendingError() == true)
- return false;
-
- if (Prog != NULL)
- Prog->SubProgress(0,File);
- if (Gen.SelectFile(File,std::string(),*this) == false)
- return _error->Error("Problem with SelectFile %s",File.c_str());
-
- // Store the IMS information
- pkgCache::PkgFileIterator CFile = Gen.GetCurFile();
- CFile->Size = Pkg.FileSize();
- CFile->mtime = Pkg.ModificationTime();
- map_stringitem_t const storage = Gen.StoreString(pkgCacheGenerator::MIXED, "edsp::scenario");
- CFile->Archive = storage;
-
- if (Gen.MergeList(Parser) == false)
- return _error->Error("Problem with MergeList %s",File.c_str());
return true;
}
+uint8_t edspIndex::GetIndexFlags() const
+{
+ return 0;
+}
+bool edspIndex::OpenListFile(FileFd &Pkg, std::string const &FileName)
+{
+ if (FileName.empty() == false && FileName != "stdin")
+ return pkgDebianIndexRealFile::OpenListFile(Pkg, FileName);
+ if (Pkg.OpenDescriptor(STDIN_FILENO, FileFd::ReadOnly) == false)
+ return _error->Error("Problem opening %s",FileName.c_str());
+ return true;
+}
+pkgCacheListParser * edspIndex::CreateListParser(FileFd &Pkg)
+{
+ if (Pkg.IsOpen() == false)
+ return NULL;
+ _error->PushToStack();
+ pkgCacheListParser * const Parser = new edspListParser(&Pkg);
+ bool const newError = _error->PendingError();
+ _error->MergeWithStack();
+ return newError ? NULL : Parser;
+}
/*}}}*/
+
// Index File types for APT /*{{{*/
class APT_HIDDEN edspIFType: public pkgIndexFile::Type
{
public:
- virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const
+ virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator const &) const APT_OVERRIDE
{
// we don't have a record parser for this type as the file is not presistent
return NULL;
};
edspIFType() {Label = "EDSP scenario file";};
};
-APT_HIDDEN edspIFType _apt_Universe;
+APT_HIDDEN edspIFType _apt_Edsp;
const pkgIndexFile::Type *edspIndex::GetType() const
{
- return &_apt_Universe;
+ return &_apt_Edsp;
}
/*}}}*/
+
+edspIndex::~edspIndex() {}
diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h
index 8c18d8cbd..4548bff3c 100644
--- a/apt-pkg/edsp/edspindexfile.h
+++ b/apt-pkg/edsp/edspindexfile.h
@@ -18,18 +18,25 @@
class OpProgress;
class pkgCacheGenerator;
-class APT_HIDDEN edspIndex : public debStatusIndex
+class APT_HIDDEN edspIndex : public pkgDebianIndexRealFile
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
-
- public:
-
- virtual const Type *GetType() const APT_CONST;
-
- virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
-
- edspIndex(std::string File);
+ void * const d;
+
+protected:
+ APT_HIDDEN virtual pkgCacheListParser * CreateListParser(FileFd &Pkg) APT_OVERRIDE;
+ virtual bool OpenListFile(FileFd &Pkg, std::string const &File) APT_OVERRIDE;
+ virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
+ virtual std::string GetComponent() const APT_OVERRIDE;
+ virtual std::string GetArchitecture() const APT_OVERRIDE;
+public:
+
+ virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
+ virtual bool Exists() const APT_OVERRIDE;
+ virtual bool HasPackages() const APT_OVERRIDE;
+
+ edspIndex(std::string const &File);
+ virtual ~edspIndex();
};
#endif
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index 212dc7840..ff79b537e 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -18,11 +18,10 @@
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/tagfile.h>
-#include <string>
/*}}}*/
// ListParser::edspListParser - Constructor /*{{{*/
-edspListParser::edspListParser(FileFd *File, std::string const &Arch) : debListParser(File, Arch)
+edspListParser::edspListParser(FileFd *File) : debListParser(File), d(NULL)
{}
/*}}}*/
// ListParser::NewVersion - Fill in the version structure /*{{{*/
@@ -86,9 +85,11 @@ bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
}
/*}}}*/
// ListParser::LoadReleaseInfo - Load the release information /*{{{*/
-APT_CONST bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator & /*FileI*/,
- FileFd & /*File*/, std::string /*component*/)
+APT_CONST bool edspListParser::LoadReleaseInfo(pkgCache::RlsFileIterator & /*FileI*/,
+ FileFd & /*File*/, std::string const &/*component*/)
{
return true;
}
/*}}}*/
+
+edspListParser::~edspListParser() {}
diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h
index 86cd77606..221229302 100644
--- a/apt-pkg/edsp/edsplistparser.h
+++ b/apt-pkg/edsp/edsplistparser.h
@@ -27,20 +27,22 @@ class FileFd;
class APT_HIDDEN edspListParser : public debListParser
{
+ void * const d;
public:
- virtual bool NewVersion(pkgCache::VerIterator &Ver);
+ virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::string Description();
virtual std::string DescriptionLanguage();
- virtual MD5SumValue Description_md5();
- virtual unsigned short VersionHash();
+ virtual MD5SumValue Description_md5() APT_OVERRIDE;
+ virtual unsigned short VersionHash() APT_OVERRIDE;
- bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File,
- std::string section);
+ bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
+ std::string const &section);
- edspListParser(FileFd *File, std::string const &Arch = "");
+ edspListParser(FileFd *File);
+ virtual ~edspListParser();
protected:
- virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
+ virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
};
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc
index 063517421..f577efcbd 100644
--- a/apt-pkg/edsp/edspsystem.cc
+++ b/apt-pkg/edsp/edspsystem.cc
@@ -15,7 +15,6 @@
#include <apt-pkg/debversion.h>
#include <apt-pkg/edspindexfile.h>
#include <apt-pkg/edspsystem.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
@@ -23,16 +22,11 @@
#include <string>
#include <vector>
-#include <apti18n.h>
/*}}}*/
-// System::debSystem - Constructor /*{{{*/
-edspSystem::edspSystem()
+// System::edspSystem - Constructor /*{{{*/
+edspSystem::edspSystem() : pkgSystem("Debian APT solver interface", &debVS), d(NULL), StatusFile(NULL)
{
- StatusFile = 0;
-
- Label = "Debian APT solver interface";
- VS = &debVS;
}
/*}}}*/
// System::~debSystem - Destructor /*{{{*/
@@ -85,18 +79,13 @@ bool edspSystem::ArchiveSupported(const char * /*Type*/)
return false;
}
/*}}}*/
-// System::Score - Determine if we should use the edsp system /*{{{*/
-signed edspSystem::Score(Configuration const &Cnf)
+// System::Score - Never use the EDSP system automatically /*{{{*/
+signed edspSystem::Score(Configuration const &)
{
- if (Cnf.Find("edsp::scenario", "") == "stdin")
- return 1000;
- if (RealFileExists(Cnf.FindFile("edsp::scenario","")) == true)
- return 1000;
return -1000;
}
/*}}}*/
-// System::AddStatusFiles - Register the status files /*{{{*/
-bool edspSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List)
+bool edspSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List) /*{{{*/
{
if (StatusFile == 0)
{
diff --git a/apt-pkg/edsp/edspsystem.h b/apt-pkg/edsp/edspsystem.h
index 06a63f40c..ec42bef75 100644
--- a/apt-pkg/edsp/edspsystem.h
+++ b/apt-pkg/edsp/edspsystem.h
@@ -16,6 +16,8 @@
#include <vector>
+#include <apt-pkg/macros.h>
+
class Configuration;
class pkgDepCache;
class pkgIndexFile;
@@ -25,24 +27,24 @@ class edspIndex;
class APT_HIDDEN edspSystem : public pkgSystem
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
edspIndex *StatusFile;
public:
- virtual bool Lock() APT_CONST;
- virtual bool UnLock(bool NoErrors = false) APT_CONST;
- virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_CONST;
- virtual bool Initialize(Configuration &Cnf);
- virtual bool ArchiveSupported(const char *Type) APT_CONST;
- virtual signed Score(Configuration const &Cnf);
- virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List);
+ virtual bool Lock() APT_OVERRIDE APT_CONST;
+ virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE APT_CONST;
+ virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE APT_CONST;
+ virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
+ virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE APT_CONST;
+ virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
+ virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
virtual bool FindIndex(pkgCache::PkgFileIterator File,
- pkgIndexFile *&Found) const;
+ pkgIndexFile *&Found) const APT_OVERRIDE;
edspSystem();
- ~edspSystem();
+ virtual ~edspSystem();
};
#endif
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 461aa4217..8a7df2eb3 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -19,18 +19,19 @@
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/tagfile.h>
-#include <apt-pkg/indexrecords.h>
+#include <apt-pkg/metaindex.h>
#include <apt-pkg/cdrom.h>
#include <apt-pkg/gpgv.h>
#include <apt-pkg/hashes.h>
+#include <apt-pkg/debmetaindex.h>
#include <iostream>
-#include <sstream>
#include <unistd.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sstream>
#include "indexcopy.h"
#include <apti18n.h>
@@ -424,7 +425,6 @@ bool PackageCopy::GetFile(string &File,unsigned long long &Size)
// PackageCopy::RewriteEntry - Rewrite the entry with a new filename /*{{{*/
bool PackageCopy::RewriteEntry(FileFd &Target,string const &File)
{
- string const Dir(File,0,File.rfind('/'));
std::vector<pkgTagSection::Tag> Changes;
Changes.push_back(pkgTagSection::Tag::Rewrite("Filename", File));
@@ -477,9 +477,9 @@ bool SourceCopy::RewriteEntry(FileFd &Target, std::string const &File)
}
/*}}}*/
// SigVerify::Verify - Verify a files md5sum against its metaindex /*{{{*/
-bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
+bool SigVerify::Verify(string prefix, string file, metaIndex *MetaIndex)
{
- const indexRecords::checkSum *Record = MetaIndex->Lookup(file);
+ const metaIndex::checkSum *Record = MetaIndex->Lookup(file);
bool const Debug = _config->FindB("Debug::aptcdrom",false);
// we skip non-existing files in the verifcation of the Release file
@@ -546,11 +546,11 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
// Read all Release files
for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); ++I)
- {
+ {
if(Debug)
cout << "Signature verify for: " << *I << endl;
- indexRecords *MetaIndex = new indexRecords;
+ metaIndex *MetaIndex = new debReleaseIndex("","");
string prefix = *I;
string const releasegpg = *I+"Release.gpg";
@@ -592,12 +592,13 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
}
// Open the Release file and add it to the MetaIndex
- if(!MetaIndex->Load(release))
+ std::string ErrorText;
+ if(MetaIndex->Load(release, &ErrorText) == false)
{
- _error->Error("%s",MetaIndex->ErrorText.c_str());
+ _error->Error("%s", ErrorText.c_str());
return false;
}
-
+
// go over the Indexfiles and see if they verify
// if so, remove them from our copy of the lists
vector<string> keys = MetaIndex->MetaKeys();
@@ -770,4 +771,14 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
}
/*}}}*/
+IndexCopy::IndexCopy() : d(NULL) {}
APT_CONST IndexCopy::~IndexCopy() {}
+
+PackageCopy::PackageCopy() : IndexCopy(), d(NULL) {}
+APT_CONST PackageCopy::~PackageCopy() {}
+SourceCopy::SourceCopy() : IndexCopy(), d(NULL) {}
+APT_CONST SourceCopy::~SourceCopy() {}
+TranslationsCopy::TranslationsCopy() : d(NULL) {}
+APT_CONST TranslationsCopy::~TranslationsCopy() {}
+SigVerify::SigVerify() : d(NULL) {}
+APT_CONST SigVerify::~SigVerify() {}
diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h
index 729b0c8cb..d4f04b5b1 100644
--- a/apt-pkg/indexcopy.h
+++ b/apt-pkg/indexcopy.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: indexcopy.h,v 1.3 2001/05/27 04:46:54 jgg Exp $
/* ######################################################################
Index Copying - Aid for copying and verifying the index files
@@ -11,8 +10,10 @@
#define INDEXCOPY_H
#include <vector>
+#ifndef APT_11_CLEAN_HEADERS
#include <string>
#include <stdio.h>
+#endif
#include <apt-pkg/macros.h>
@@ -26,14 +27,14 @@ using std::vector;
#endif
class pkgTagSection;
-class indexRecords;
class pkgCdromStatus;
class FileFd;
+class metaIndex;
class IndexCopy /*{{{*/
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
protected:
@@ -54,47 +55,60 @@ class IndexCopy /*{{{*/
bool CopyPackages(std::string CDROM,std::string Name,std::vector<std::string> &List,
pkgCdromStatus *log);
+ IndexCopy();
virtual ~IndexCopy();
};
/*}}}*/
class PackageCopy : public IndexCopy /*{{{*/
{
+ void * const d;
protected:
-
- virtual bool GetFile(std::string &Filename,unsigned long long &Size);
- virtual bool RewriteEntry(FileFd &Target, std::string const &File);
- virtual const char *GetFileName() {return "Packages";};
- virtual const char *Type() {return "Package";};
-
+
+ virtual bool GetFile(std::string &Filename,unsigned long long &Size) APT_OVERRIDE;
+ virtual bool RewriteEntry(FileFd &Target, std::string const &File) APT_OVERRIDE;
+ virtual const char *GetFileName() APT_OVERRIDE {return "Packages";};
+ virtual const char *Type() APT_OVERRIDE {return "Package";};
+
+ public:
+ PackageCopy();
+ virtual ~PackageCopy();
};
/*}}}*/
class SourceCopy : public IndexCopy /*{{{*/
{
+ void * const d;
protected:
- virtual bool GetFile(std::string &Filename,unsigned long long &Size);
- virtual bool RewriteEntry(FileFd &Target, std::string const &File);
- virtual const char *GetFileName() {return "Sources";};
- virtual const char *Type() {return "Source";};
-
+ virtual bool GetFile(std::string &Filename,unsigned long long &Size) APT_OVERRIDE;
+ virtual bool RewriteEntry(FileFd &Target, std::string const &File) APT_OVERRIDE;
+ virtual const char *GetFileName() APT_OVERRIDE {return "Sources";};
+ virtual const char *Type() APT_OVERRIDE {return "Source";};
+
+ public:
+ SourceCopy();
+ virtual ~SourceCopy();
};
/*}}}*/
class TranslationsCopy /*{{{*/
{
+ void * const d;
protected:
pkgTagSection *Section;
public:
bool CopyTranslations(std::string CDROM,std::string Name,std::vector<std::string> &List,
pkgCdromStatus *log);
+
+ TranslationsCopy();
+ virtual ~TranslationsCopy();
};
/*}}}*/
class SigVerify /*{{{*/
{
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
- APT_HIDDEN bool Verify(std::string prefix,std::string file, indexRecords *records);
+ APT_HIDDEN bool Verify(std::string prefix,std::string file, metaIndex *records);
APT_HIDDEN bool CopyMetaIndex(std::string CDROM, std::string CDName,
std::string prefix, std::string file);
@@ -106,6 +120,9 @@ class SigVerify /*{{{*/
int const &statusfd, int fd[2]);
APT_DEPRECATED static bool RunGPGV(std::string const &File, std::string const &FileOut,
int const &statusfd = -1);
+
+ SigVerify();
+ virtual ~SigVerify();
};
/*}}}*/
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 89615cb41..8e50ecfae 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -10,18 +10,27 @@
// Include Files /*{{{*/
#include<config.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/srcrecords.h>
+#include <apt-pkg/progress.h>
#include <apt-pkg/macros.h>
+#include <apt-pkg/deblistparser.h>
+
+#include <sys/stat.h>
+
#include <string>
#include <vector>
#include <clocale>
#include <cstring>
+#include <memory>
/*}}}*/
// Global list of Item supported
@@ -50,25 +59,24 @@ pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type)
return 0;
}
/*}}}*/
+pkgIndexFile::pkgIndexFile(bool const Trusted) : /*{{{*/
+ d(NULL), Trusted(Trusted)
+{
+}
+ /*}}}*/
// IndexFile::ArchiveInfo - Stub /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator /*Ver*/) const
+std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator const &/*Ver*/) const
{
return std::string();
}
/*}}}*/
// IndexFile::FindInCache - Stub /*{{{*/
-// ---------------------------------------------------------------------
-/* */
pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const
{
return pkgCache::PkgFileIterator(Cache);
}
/*}}}*/
// IndexFile::SourceIndex - Stub /*{{{*/
-// ---------------------------------------------------------------------
-/* */
std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &/*Record*/,
pkgSrcRecords::File const &/*File*/) const
{
@@ -88,7 +96,7 @@ bool pkgIndexFile::TranslationsAvailable() {
is already done in getLanguages(). Note also that this check is
rather bad (doesn't take three character like ast into account).
TODO: Remove method with next API break */
-APT_DEPRECATED bool pkgIndexFile::CheckLanguageCode(const char *Lang)
+APT_DEPRECATED bool pkgIndexFile::CheckLanguageCode(const char * const Lang)
{
if (strlen(Lang) == 2 || (strlen(Lang) == 5 && Lang[2] == '_'))
return true;
@@ -110,3 +118,267 @@ APT_DEPRECATED std::string pkgIndexFile::LanguageCode() {
return APT::Configuration::getLanguages()[0];
}
/*}}}*/
+
+// IndexTarget - Constructor /*{{{*/
+IndexTarget::IndexTarget(std::string const &MetaKey, std::string const &ShortDesc,
+ std::string const &LongDesc, std::string const &URI, bool const IsOptional,
+ bool const KeepCompressed, std::map<std::string, std::string> const &Options) :
+ URI(URI), Description(LongDesc), ShortDesc(ShortDesc), MetaKey(MetaKey),
+ IsOptional(IsOptional), KeepCompressed(KeepCompressed), Options(Options)
+{
+}
+ /*}}}*/
+std::string IndexTarget::Option(OptionKeys const EnumKey) const /*{{{*/
+{
+ std::string Key;
+ switch (EnumKey)
+ {
+#define APT_CASE(X) case X: Key = #X; break
+ APT_CASE(SITE);
+ APT_CASE(RELEASE);
+ APT_CASE(COMPONENT);
+ APT_CASE(LANGUAGE);
+ APT_CASE(ARCHITECTURE);
+ APT_CASE(BASE_URI);
+ APT_CASE(REPO_URI);
+ APT_CASE(TARGET_OF);
+ APT_CASE(CREATED_BY);
+#undef APT_CASE
+ case FILENAME: return _config->FindDir("Dir::State::lists") + URItoFileName(URI);
+ case EXISTING_FILENAME:
+ std::string const filename = Option(FILENAME);
+ std::vector<std::string> const types = APT::Configuration::getCompressionTypes();
+ for (std::vector<std::string>::const_iterator t = types.begin(); t != types.end(); ++t)
+ {
+ if (t->empty())
+ continue;
+ std::string const file = (*t == "uncompressed") ? filename : (filename + "." + *t);
+ if (FileExists(file))
+ return file;
+ }
+ return "";
+ }
+ std::map<std::string,std::string>::const_iterator const M = Options.find(Key);
+ if (M == Options.end())
+ return "";
+ return M->second;
+}
+ /*}}}*/
+std::string IndexTarget::Format(std::string format) const /*{{{*/
+{
+ for (std::map<std::string, std::string>::const_iterator O = Options.begin(); O != Options.end(); ++O)
+ {
+ format = SubstVar(format, std::string("$(") + O->first + ")", O->second);
+ }
+ format = SubstVar(format, "$(METAKEY)", MetaKey);
+ format = SubstVar(format, "$(SHORTDESC)", ShortDesc);
+ format = SubstVar(format, "$(DESCRIPTION)", Description);
+ format = SubstVar(format, "$(URI)", URI);
+ format = SubstVar(format, "$(FILENAME)", Option(IndexTarget::FILENAME));
+ return format;
+}
+ /*}}}*/
+
+pkgDebianIndexTargetFile::pkgDebianIndexTargetFile(IndexTarget const &Target, bool const Trusted) :/*{{{*/
+ pkgDebianIndexFile(Trusted), d(NULL), Target(Target)
+{
+}
+ /*}}}*/
+std::string pkgDebianIndexTargetFile::ArchiveURI(std::string const &File) const/*{{{*/
+{
+ return Target.Option(IndexTarget::REPO_URI) + File;
+}
+ /*}}}*/
+std::string pkgDebianIndexTargetFile::Describe(bool const Short) const /*{{{*/
+{
+ if (Short)
+ return Target.Description;
+ return Target.Description + " (" + IndexFileName() + ")";
+}
+ /*}}}*/
+std::string pkgDebianIndexTargetFile::IndexFileName() const /*{{{*/
+{
+ std::string const s = Target.Option(IndexTarget::FILENAME);
+ if (FileExists(s))
+ return s;
+
+ std::vector<std::string> types = APT::Configuration::getCompressionTypes();
+ for (std::vector<std::string>::const_iterator t = types.begin(); t != types.end(); ++t)
+ {
+ std::string p = s + '.' + *t;
+ if (FileExists(p))
+ return p;
+ }
+ return s;
+}
+ /*}}}*/
+unsigned long pkgDebianIndexTargetFile::Size() const /*{{{*/
+{
+ unsigned long size = 0;
+
+ /* we need to ignore errors here; if the lists are absent, just return 0 */
+ _error->PushToStack();
+
+ FileFd f(IndexFileName(), FileFd::ReadOnly, FileFd::Extension);
+ if (!f.Failed())
+ size = f.Size();
+
+ if (_error->PendingError() == true)
+ size = 0;
+ _error->RevertToStack();
+
+ return size;
+}
+ /*}}}*/
+bool pkgDebianIndexTargetFile::Exists() const /*{{{*/
+{
+ return FileExists(IndexFileName());
+}
+ /*}}}*/
+std::string pkgDebianIndexTargetFile::GetArchitecture() const /*{{{*/
+{
+ return Target.Option(IndexTarget::ARCHITECTURE);
+}
+ /*}}}*/
+std::string pkgDebianIndexTargetFile::GetComponent() const /*{{{*/
+{
+ return Target.Option(IndexTarget::COMPONENT);
+}
+ /*}}}*/
+bool pkgDebianIndexTargetFile::OpenListFile(FileFd &Pkg, std::string const &FileName)/*{{{*/
+{
+ if (Pkg.Open(FileName, FileFd::ReadOnly, FileFd::Extension) == false)
+ return _error->Error("Problem opening %s",FileName.c_str());
+ return true;
+}
+ /*}}}*/
+std::string pkgDebianIndexTargetFile::GetProgressDescription() const
+{
+ return Target.Description;
+}
+
+pkgDebianIndexRealFile::pkgDebianIndexRealFile(std::string const &File, bool const Trusted) :/*{{{*/
+ pkgDebianIndexFile(Trusted), d(NULL), File(flAbsPath(File))
+{
+}
+ /*}}}*/
+// IndexRealFile::Size - Return the size of the index /*{{{*/
+unsigned long pkgDebianIndexRealFile::Size() const
+{
+ struct stat S;
+ if (stat(File.c_str(),&S) != 0)
+ return 0;
+ return S.st_size;
+}
+ /*}}}*/
+bool pkgDebianIndexRealFile::Exists() const /*{{{*/
+{
+ return FileExists(File);
+}
+ /*}}}*/
+std::string pkgDebianIndexRealFile::Describe(bool const /*Short*/) const/*{{{*/
+{
+ return File;
+}
+ /*}}}*/
+std::string pkgDebianIndexRealFile::ArchiveURI(std::string const &/*File*/) const/*{{{*/
+{
+ return "file:" + File;
+}
+ /*}}}*/
+std::string pkgDebianIndexRealFile::IndexFileName() const /*{{{*/
+{
+ return File;
+}
+ /*}}}*/
+std::string pkgDebianIndexRealFile::GetProgressDescription() const
+{
+ return File;
+}
+bool pkgDebianIndexRealFile::OpenListFile(FileFd &Pkg, std::string const &FileName)/*{{{*/
+{
+ if (Pkg.Open(FileName, FileFd::ReadOnly, FileFd::None) == false)
+ return _error->Error("Problem opening %s",FileName.c_str());
+ return true;
+}
+ /*}}}*/
+
+pkgDebianIndexFile::pkgDebianIndexFile(bool const Trusted) : pkgIndexFile(Trusted)
+{
+}
+pkgDebianIndexFile::~pkgDebianIndexFile()
+{
+}
+pkgCacheListParser * pkgDebianIndexFile::CreateListParser(FileFd &Pkg)
+{
+ if (Pkg.IsOpen() == false)
+ return NULL;
+ _error->PushToStack();
+ pkgCacheListParser * const Parser = new debListParser(&Pkg);
+ bool const newError = _error->PendingError();
+ _error->MergeWithStack();
+ return newError ? NULL : Parser;
+}
+bool pkgDebianIndexFile::Merge(pkgCacheGenerator &Gen,OpProgress * const Prog)
+{
+ std::string const PackageFile = IndexFileName();
+ FileFd Pkg;
+ if (OpenListFile(Pkg, PackageFile) == false)
+ return false;
+ _error->PushToStack();
+ std::unique_ptr<pkgCacheListParser> Parser(CreateListParser(Pkg));
+ bool const newError = _error->PendingError();
+ if (newError == false && Parser == nullptr)
+ return true;
+ if (Parser == NULL)
+ return false;
+
+ if (Prog != NULL)
+ Prog->SubProgress(0, GetProgressDescription());
+
+ if (Gen.SelectFile(PackageFile, *this, GetArchitecture(), GetComponent(), GetIndexFlags()) == false)
+ return _error->Error("Problem with SelectFile %s",PackageFile.c_str());
+
+ // Store the IMS information
+ pkgCache::PkgFileIterator File = Gen.GetCurFile();
+ pkgCacheGenerator::Dynamic<pkgCache::PkgFileIterator> DynFile(File);
+ File->Size = Pkg.FileSize();
+ File->mtime = Pkg.ModificationTime();
+
+ if (Gen.MergeList(*Parser) == false)
+ return _error->Error("Problem with MergeList %s",PackageFile.c_str());
+ return true;
+}
+pkgCache::PkgFileIterator pkgDebianIndexFile::FindInCache(pkgCache &Cache) const
+{
+ std::string const FileName = IndexFileName();
+ pkgCache::PkgFileIterator File = Cache.FileBegin();
+ for (; File.end() == false; ++File)
+ {
+ if (File.FileName() == NULL || FileName != File.FileName())
+ continue;
+
+ struct stat St;
+ if (stat(File.FileName(),&St) != 0)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "DebianIndexFile::FindInCache - stat failed on " << File.FileName() << std::endl;
+ return pkgCache::PkgFileIterator(Cache);
+ }
+ if ((map_filesize_t)St.st_size != File->Size || St.st_mtime != File->mtime)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "DebianIndexFile::FindInCache - size (" << St.st_size << " <> " << File->Size
+ << ") or mtime (" << St.st_mtime << " <> " << File->mtime
+ << ") doesn't match for " << File.FileName() << std::endl;
+ return pkgCache::PkgFileIterator(Cache);
+ }
+ return File;
+ }
+
+ return File;
+}
+
+APT_CONST pkgIndexFile::~pkgIndexFile() {}
+APT_CONST pkgDebianIndexTargetFile::~pkgDebianIndexTargetFile() {}
+APT_CONST pkgDebianIndexRealFile::~pkgDebianIndexRealFile() {}
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index 817165f08..844f0cd3b 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: indexfile.h,v 1.6.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Index File - Abstraction for an index of archive/source file.
@@ -28,6 +27,7 @@
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/macros.h>
+#include <map>
#include <string>
#ifndef APT_8_CLEANER_HEADERS
@@ -38,28 +38,80 @@ class pkgAcquire;
#endif
class pkgCacheGenerator;
+class pkgCacheListParser;
class OpProgress;
+class IndexTarget /*{{{*/
+/** \brief Information about an index file. */
+{
+ public:
+ /** \brief A URI from which the index file can be downloaded. */
+ std::string URI;
+
+ /** \brief A description of the index file. */
+ std::string Description;
+
+ /** \brief A shorter description of the index file. */
+ std::string ShortDesc;
+
+ /** \brief The key by which this index file should be
+ looked up within the meta index file. */
+ std::string MetaKey;
+
+ /** \brief Is it okay if the file isn't found in the meta index */
+ bool IsOptional;
+
+ /** \brief If the file is downloaded compressed, do not unpack it */
+ bool KeepCompressed;
+
+ /** \brief options with which this target was created
+ Prefer the usage of #Option if at all possible.
+ Beware: Not all of these options are intended for public use */
+ std::map<std::string, std::string> Options;
+
+ IndexTarget(std::string const &MetaKey, std::string const &ShortDesc,
+ std::string const &LongDesc, std::string const &URI, bool const IsOptional,
+ bool const KeepCompressed, std::map<std::string, std::string> const &Options);
+
+ enum OptionKeys {
+ SITE,
+ RELEASE,
+ COMPONENT,
+ LANGUAGE,
+ ARCHITECTURE,
+ BASE_URI,
+ REPO_URI,
+ CREATED_BY,
+ TARGET_OF,
+ FILENAME,
+ EXISTING_FILENAME,
+ };
+ std::string Option(OptionKeys const Key) const;
+ std::string Format(std::string format) const;
+};
+ /*}}}*/
+
class pkgIndexFile
{
+ void * const d;
protected:
bool Trusted;
-
+
public:
class Type
{
public:
-
+
// Global list of Items supported
static Type **GlobalList;
static unsigned long GlobalListLen;
- static Type *GetType(const char *Type) APT_PURE;
+ static Type *GetType(const char * const Type) APT_PURE;
const char *Label;
- virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator /*File*/) const {return 0;};
- virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string /*File*/) const {return 0;};
+ virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator const &/*File*/) const {return 0;};
+ virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string const &/*File*/) const {return 0;};
Type();
virtual ~Type() {};
};
@@ -67,13 +119,13 @@ class pkgIndexFile
virtual const Type *GetType() const = 0;
// Return descriptive strings of various sorts
- virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const;
+ virtual std::string ArchiveInfo(pkgCache::VerIterator const &Ver) const;
virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
pkgSrcRecords::File const &File) const;
- virtual std::string Describe(bool Short = false) const = 0;
+ virtual std::string Describe(bool const Short = false) const = 0;
// Interface for acquire
- virtual std::string ArchiveURI(std::string /*File*/) const {return std::string();};
+ virtual std::string ArchiveURI(std::string const &/*File*/) const {return std::string();};
// Interface for the record parsers
virtual pkgSrcRecords::Parser *CreateSrcParser() const {return 0;};
@@ -82,22 +134,77 @@ class pkgIndexFile
virtual bool Exists() const = 0;
virtual bool HasPackages() const = 0;
virtual unsigned long Size() const = 0;
- virtual bool Merge(pkgCacheGenerator &/*Gen*/, OpProgress* /*Prog*/) const { return false; };
- APT_DEPRECATED virtual bool Merge(pkgCacheGenerator &Gen, OpProgress &Prog) const
- { return Merge(Gen, &Prog); };
- virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/,OpProgress* /*Prog*/) const {return true;};
- APT_DEPRECATED virtual bool MergeFileProvides(pkgCacheGenerator &Gen, OpProgress &Prog) const
- {return MergeFileProvides(Gen, &Prog);};
+ virtual bool Merge(pkgCacheGenerator &/*Gen*/, OpProgress* const /*Prog*/) { return true; };
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
static bool TranslationsAvailable();
- static bool CheckLanguageCode(const char *Lang);
+ static bool CheckLanguageCode(const char * const Lang);
static std::string LanguageCode();
bool IsTrusted() const { return Trusted; };
-
- pkgIndexFile(bool Trusted): Trusted(Trusted) {};
- virtual ~pkgIndexFile() {};
+
+ explicit pkgIndexFile(bool const Trusted);
+ virtual ~pkgIndexFile();
+};
+
+class pkgDebianIndexFile : public pkgIndexFile
+{
+protected:
+ virtual std::string IndexFileName() const = 0;
+ virtual std::string GetComponent() const = 0;
+ virtual std::string GetArchitecture() const = 0;
+ virtual std::string GetProgressDescription() const = 0;
+ virtual uint8_t GetIndexFlags() const = 0;
+ virtual bool OpenListFile(FileFd &Pkg, std::string const &FileName) = 0;
+ APT_HIDDEN virtual pkgCacheListParser * CreateListParser(FileFd &Pkg);
+
+public:
+ virtual bool Merge(pkgCacheGenerator &Gen, OpProgress* const Prog) APT_OVERRIDE;
+ virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;
+
+ pkgDebianIndexFile(bool const Trusted);
+ virtual ~pkgDebianIndexFile();
+};
+
+class pkgDebianIndexTargetFile : public pkgDebianIndexFile
+{
+ void * const d;
+protected:
+ IndexTarget const Target;
+
+ virtual std::string IndexFileName() const APT_OVERRIDE;
+ virtual std::string GetComponent() const APT_OVERRIDE;
+ virtual std::string GetArchitecture() const APT_OVERRIDE;
+ virtual std::string GetProgressDescription() const APT_OVERRIDE;
+ virtual bool OpenListFile(FileFd &Pkg, std::string const &FileName) APT_OVERRIDE;
+
+public:
+ virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE;
+ virtual std::string Describe(bool const Short = false) const APT_OVERRIDE;
+ virtual bool Exists() const APT_OVERRIDE;
+ virtual unsigned long Size() const APT_OVERRIDE;
+
+ pkgDebianIndexTargetFile(IndexTarget const &Target, bool const Trusted);
+ virtual ~pkgDebianIndexTargetFile();
+};
+
+class pkgDebianIndexRealFile : public pkgDebianIndexFile
+{
+ void * const d;
+protected:
+ std::string File;
+
+ virtual std::string IndexFileName() const APT_OVERRIDE;
+ virtual std::string GetProgressDescription() const APT_OVERRIDE;
+ virtual bool OpenListFile(FileFd &Pkg, std::string const &FileName) APT_OVERRIDE;
+public:
+ virtual std::string Describe(bool const /*Short*/ = false) const APT_OVERRIDE;
+ virtual bool Exists() const APT_OVERRIDE;
+ virtual unsigned long Size() const APT_OVERRIDE;
+ virtual std::string ArchiveURI(std::string const &/*File*/) const APT_OVERRIDE;
+
+ pkgDebianIndexRealFile(std::string const &File, bool const Trusted);
+ virtual ~pkgDebianIndexRealFile();
};
#endif
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
deleted file mode 100644
index de2617833..000000000
--- a/apt-pkg/indexrecords.cc
+++ /dev/null
@@ -1,296 +0,0 @@
-// -*- mode: cpp; mode: fold -*-
-// Description /*{{{*/
-// $Id: indexrecords.cc,v 1.1.2.4 2003/12/30 02:11:43 mdz Exp $
- /*}}}*/
-// Include Files /*{{{*/
-#include<config.h>
-
-#include <apt-pkg/indexrecords.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/hashes.h>
-#include <apt-pkg/gpgv.h>
-
-#include <stdlib.h>
-#include <time.h>
-#include <clocale>
-#include <map>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include <apti18n.h>
- /*}}}*/
-
-using std::string;
-
-APT_PURE string indexRecords::GetDist() const
-{
- return this->Dist;
-}
-
-APT_PURE string indexRecords::GetSuite() const
-{
- return this->Suite;
-}
-
-APT_PURE bool indexRecords::GetSupportsAcquireByHash() const
-{
- return this->SupportsAcquireByHash;
-}
-
-APT_PURE bool indexRecords::CheckDist(const string MaybeDist) const
-{
- return (this->Dist == MaybeDist
- || this->Suite == MaybeDist);
-}
-
-APT_PURE string indexRecords::GetExpectedDist() const
-{
- return this->ExpectedDist;
-}
-
-APT_PURE time_t indexRecords::GetValidUntil() const
-{
- return this->ValidUntil;
-}
-
-APT_PURE time_t indexRecords::GetDate() const
-{
- return this->Date;
-}
-
-APT_PURE indexRecords::checkSum *indexRecords::Lookup(const string MetaKey)
-{
- std::map<std::string, indexRecords::checkSum* >::const_iterator sum = Entries.find(MetaKey);
- if (sum == Entries.end())
- return NULL;
- return sum->second;
-}
-
-APT_PURE bool indexRecords::Exists(string const &MetaKey) const
-{
- return Entries.count(MetaKey) == 1;
-}
-
-bool indexRecords::Load(const string Filename) /*{{{*/
-{
- FileFd Fd;
- if (OpenMaybeClearSignedFile(Filename, Fd) == false)
- return false;
-
- pkgTagFile TagFile(&Fd, Fd.Size());
- if (_error->PendingError() == true)
- {
- strprintf(ErrorText, _("Unable to parse Release file %s"),Filename.c_str());
- return false;
- }
-
- pkgTagSection Section;
- const char *Start, *End;
- if (TagFile.Step(Section) == false)
- {
- strprintf(ErrorText, _("No sections in Release file %s"), Filename.c_str());
- return false;
- }
- // FIXME: find better tag name
- SupportsAcquireByHash = Section.FindB("Acquire-By-Hash", false);
-
- Suite = Section.FindS("Suite");
- Dist = Section.FindS("Codename");
-
- bool FoundHashSum = false;
- for (int i=0;HashString::SupportedHashes()[i] != NULL; i++)
- {
- if (!Section.Find(HashString::SupportedHashes()[i], Start, End))
- continue;
-
- string Name;
- string Hash;
- unsigned long long Size;
- while (Start < End)
- {
- if (!parseSumData(Start, End, Name, Hash, Size))
- return false;
-
- if (Entries.find(Name) == Entries.end())
- {
- indexRecords::checkSum *Sum = new indexRecords::checkSum;
- Sum->MetaKeyFilename = Name;
- Sum->Size = Size;
- std::string SizeStr;
- strprintf(SizeStr, "%llu", Size);
- Sum->Hashes.push_back(HashString("Checksum-FileSize", SizeStr));
- APT_IGNORE_DEPRECATED(Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);)
- Entries[Name] = Sum;
- }
- Entries[Name]->Hashes.push_back(HashString(HashString::SupportedHashes()[i],Hash));
- FoundHashSum = true;
- }
- }
-
- if(FoundHashSum == false)
- {
- strprintf(ErrorText, _("No Hash entry in Release file %s"), Filename.c_str());
- return false;
- }
-
- string const StrDate = Section.FindS("Date");
- if (RFC1123StrToTime(StrDate.c_str(), Date) == false)
- {
- strprintf(ErrorText, _("Invalid 'Date' entry in Release file %s"), Filename.c_str());
- return false;
- }
-
- string const Label = Section.FindS("Label");
- string const StrValidUntil = Section.FindS("Valid-Until");
-
- // if we have a Valid-Until header in the Release file, use it as default
- if (StrValidUntil.empty() == false)
- {
- if(RFC1123StrToTime(StrValidUntil.c_str(), ValidUntil) == false)
- {
- strprintf(ErrorText, _("Invalid 'Valid-Until' entry in Release file %s"), Filename.c_str());
- return false;
- }
- }
- // get the user settings for this archive and use what expires earlier
- int MaxAge = _config->FindI("Acquire::Max-ValidTime", 0);
- if (Label.empty() == false)
- MaxAge = _config->FindI(("Acquire::Max-ValidTime::" + Label).c_str(), MaxAge);
- int MinAge = _config->FindI("Acquire::Min-ValidTime", 0);
- if (Label.empty() == false)
- MinAge = _config->FindI(("Acquire::Min-ValidTime::" + Label).c_str(), MinAge);
-
- if(MaxAge == 0 &&
- (MinAge == 0 || ValidUntil == 0)) // No user settings, use the one from the Release file
- return true;
-
- if (MinAge != 0 && ValidUntil != 0) {
- time_t const min_date = Date + MinAge;
- if (ValidUntil < min_date)
- ValidUntil = min_date;
- }
- if (MaxAge != 0) {
- time_t const max_date = Date + MaxAge;
- if (ValidUntil == 0 || ValidUntil > max_date)
- ValidUntil = max_date;
- }
-
- return true;
-}
- /*}}}*/
-std::vector<string> indexRecords::MetaKeys() /*{{{*/
-{
- std::vector<std::string> keys;
- std::map<string,checkSum *>::iterator I = Entries.begin();
- while(I != Entries.end()) {
- keys.push_back((*I).first);
- ++I;
- }
- return keys;
-}
- /*}}}*/
-bool indexRecords::parseSumData(const char *&Start, const char *End, /*{{{*/
- string &Name, string &Hash, unsigned long long &Size)
-{
- Name = "";
- Hash = "";
- Size = 0;
- /* Skip over the first blank */
- while ((*Start == '\t' || *Start == ' ' || *Start == '\n' || *Start == '\r')
- && Start < End)
- Start++;
- if (Start >= End)
- return false;
-
- /* Move EntryEnd to the end of the first entry (the hash) */
- const char *EntryEnd = Start;
- while ((*EntryEnd != '\t' && *EntryEnd != ' ')
- && EntryEnd < End)
- EntryEnd++;
- if (EntryEnd == End)
- return false;
-
- Hash.append(Start, EntryEnd-Start);
-
- /* Skip over intermediate blanks */
- Start = EntryEnd;
- while (*Start == '\t' || *Start == ' ')
- Start++;
- if (Start >= End)
- return false;
-
- EntryEnd = Start;
- /* Find the end of the second entry (the size) */
- while ((*EntryEnd != '\t' && *EntryEnd != ' ' )
- && EntryEnd < End)
- EntryEnd++;
- if (EntryEnd == End)
- return false;
-
- Size = strtoull (Start, NULL, 10);
-
- /* Skip over intermediate blanks */
- Start = EntryEnd;
- while (*Start == '\t' || *Start == ' ')
- Start++;
- if (Start >= End)
- return false;
-
- EntryEnd = Start;
- /* Find the end of the third entry (the filename) */
- while ((*EntryEnd != '\t' && *EntryEnd != ' ' &&
- *EntryEnd != '\n' && *EntryEnd != '\r')
- && EntryEnd < End)
- EntryEnd++;
-
- Name.append(Start, EntryEnd-Start);
- Start = EntryEnd; //prepare for the next round
- return true;
-}
- /*}}}*/
-
-APT_PURE bool indexRecords::IsAlwaysTrusted() const
-{
- if (Trusted == ALWAYS_TRUSTED)
- return true;
- return false;
-}
-APT_PURE bool indexRecords::IsNeverTrusted() const
-{
- if (Trusted == NEVER_TRUSTED)
- return true;
- return false;
-}
-void indexRecords::SetTrusted(bool const Trusted)
-{
- if (Trusted == true)
- this->Trusted = ALWAYS_TRUSTED;
- else
- this->Trusted = NEVER_TRUSTED;
-}
-
-#if APT_PKG_ABI >= 413
-indexRecords::indexRecords(const string &ExpectedDist) :
- Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
- SupportsAcquireByHash(false)
-{
-}
-#else
-indexRecords::indexRecords() :
- Trusted(CHECK_TRUST), d(NULL), ExpectedDist(""), ValidUntil(0),
- SupportsAcquireByHash(false)
-{
-}
-indexRecords::indexRecords(const string ExpectedDist) :
- Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
- SupportsAcquireByHash(false)
-{
-}
-#endif
-
-indexRecords::~indexRecords() {}
diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h
deleted file mode 100644
index 6ed5f0c2b..000000000
--- a/apt-pkg/indexrecords.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// -*- mode: cpp; mode: fold -*-
-// Description /*{{{*/
-// $Id: indexrecords.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $
- /*}}}*/
-#ifndef PKGLIB_INDEXRECORDS_H
-#define PKGLIB_INDEXRECORDS_H
-
-#include <apt-pkg/hashes.h>
-
-#include <map>
-#include <vector>
-#include <ctime>
-#include <string>
-
-#ifndef APT_8_CLEANER_HEADERS
-#include <apt-pkg/fileutl.h>
-#endif
-#ifndef APT_10_CLEANER_HEADERS
-#include <apt-pkg/pkgcache.h>
-#endif
-
-class indexRecords
-{
- APT_HIDDEN bool parseSumData(const char *&Start, const char *End, std::string &Name,
- std::string &Hash, unsigned long long &Size);
- public:
- struct checkSum;
- std::string ErrorText;
-
- private:
- enum APT_HIDDEN { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted;
- // dpointer (for later)
- void * d;
-
- protected:
- std::string Dist;
- std::string Suite;
- std::string ExpectedDist;
- time_t Date;
- time_t ValidUntil;
- bool SupportsAcquireByHash;
-
- std::map<std::string,checkSum *> Entries;
-
- public:
-#if APT_PKG_ABI >= 413
- indexRecords(const std::string &ExpectedDist = "");
-#else
- indexRecords();
- indexRecords(const std::string ExpectedDist);
-#endif
-
- // Lookup function
- virtual checkSum *Lookup(const std::string MetaKey);
- /** \brief tests if a checksum for this file is available */
- bool Exists(std::string const &MetaKey) const;
- std::vector<std::string> MetaKeys();
-
- virtual bool Load(std::string Filename);
- virtual bool CheckDist(const std::string MaybeDist) const;
-
- std::string GetDist() const;
- std::string GetSuite() const;
- bool GetSupportsAcquireByHash() const;
- time_t GetValidUntil() const;
- time_t GetDate() const;
- std::string GetExpectedDist() const;
-
- /** \brief check if source is marked as always trusted */
- bool IsAlwaysTrusted() const;
- /** \brief check if source is marked as never trusted */
- bool IsNeverTrusted() const;
-
- /** \brief sets an explicit trust value
- *
- * \b true means that the source should always be considered trusted,
- * while \b false marks a source as always untrusted, even if we have
- * a valid signature and everything.
- */
- void SetTrusted(bool const Trusted);
-
- virtual ~indexRecords();
-};
-
-APT_IGNORE_DEPRECATED_PUSH
-struct indexRecords::checkSum
-{
- std::string MetaKeyFilename;
- HashStringList Hashes;
- unsigned long long Size;
-
- APT_DEPRECATED HashString Hash;
-};
-APT_IGNORE_DEPRECATED_POP
-
-#endif
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index f756eab26..eab198fac 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -18,7 +18,6 @@
#include <apt-pkg/macros.h>
#include <string.h>
-#include <string>
#include <cstdlib>
#include <apti18n.h>
@@ -62,8 +61,6 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("Dir::Etc","etc/apt/");
Cnf.CndSet("Dir::Etc::sourcelist","sources.list");
Cnf.CndSet("Dir::Etc::sourceparts","sources.list.d");
- Cnf.CndSet("Dir::Etc::vendorlist","vendors.list");
- Cnf.CndSet("Dir::Etc::vendorparts","vendors.list.d");
Cnf.CndSet("Dir::Etc::main","apt.conf");
Cnf.CndSet("Dir::Etc::netrc", "auth.conf");
Cnf.CndSet("Dir::Etc::parts","apt.conf.d");
@@ -101,8 +98,31 @@ bool pkgInitConfig(Configuration &Cnf)
// The default user we drop to in the methods
Cnf.CndSet("APT::Sandbox::User", "_apt");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Packages::MetaKey", "$(COMPONENT)/binary-$(ARCHITECTURE)/Packages");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Packages::flatMetaKey", "Packages");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Packages::ShortDescription", "Packages");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Packages::Description", "$(RELEASE)/$(COMPONENT) $(ARCHITECTURE) Packages");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Packages::flatDescription", "$(RELEASE) Packages");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Packages::Optional", false);
+ Cnf.CndSet("Acquire::IndexTargets::deb::Translations::MetaKey", "$(COMPONENT)/i18n/Translation-$(LANGUAGE)");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Translations::flatMetaKey", "$(LANGUAGE)");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Translations::ShortDescription", "Translation-$(LANGUAGE)");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Translations::Description", "$(RELEASE)/$(COMPONENT) Translation-$(LANGUAGE)");
+ Cnf.CndSet("Acquire::IndexTargets::deb::Translations::flatDescription", "$(RELEASE) Translation-$(LANGUAGE)");
+ Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::MetaKey", "$(COMPONENT)/source/Sources");
+ Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::flatMetaKey", "Sources");
+ Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::ShortDescription", "Sources");
+ Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::Description", "$(RELEASE)/$(COMPONENT) Sources");
+ Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::flatDescription", "$(RELEASE) Sources");
+ Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::Optional", false);
+
+ Cnf.CndSet("Acquire::Changelogs::URI::Origin::Debian", "http://metadata.ftp-master.debian.org/changelogs/CHANGEPATH_changelog");
+ Cnf.CndSet("Acquire::Changelogs::URI::Origin::Tanglu", "http://metadata.tanglu.org/changelogs/CHANGEPATH_changelog");
+ Cnf.CndSet("Acquire::Changelogs::URI::Origin::Ubuntu", "http://changelogs.ubuntu.com/changelogs/pool/CHANGEPATH/changelog");
+ Cnf.CndSet("Acquire::Changelogs::URI::Origin::Ultimedia", "http://packages.ultimediaos.com/changelogs/pool/CHANGEPATH/changelog.txt");
+
bool Res = true;
-
+
// Read an alternate config file
const char *Cfg = getenv("APT_CONFIG");
if (Cfg != 0 && strlen(Cfg) != 0)
diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc
index 5ea8bf4d0..14409e301 100644
--- a/apt-pkg/install-progress.cc
+++ b/apt-pkg/install-progress.cc
@@ -8,13 +8,12 @@
#include <signal.h>
#include <unistd.h>
#include <iostream>
-#include <string>
#include <vector>
#include <sys/ioctl.h>
-#include <sstream>
#include <fcntl.h>
#include <algorithm>
#include <stdio.h>
+#include <sstream>
#include <apti18n.h>
@@ -65,10 +64,11 @@ bool PackageManager::StatusChanged(std::string /*PackageName*/,
}
PackageManagerProgressFd::PackageManagerProgressFd(int progress_fd)
- : StepsDone(0), StepsTotal(1)
+ : d(NULL), StepsDone(0), StepsTotal(1)
{
OutStatusFd = progress_fd;
}
+PackageManagerProgressFd::~PackageManagerProgressFd() {}
void PackageManagerProgressFd::WriteToStatusFd(std::string s)
{
@@ -153,10 +153,11 @@ bool PackageManagerProgressFd::StatusChanged(std::string PackageName,
PackageManagerProgressDeb822Fd::PackageManagerProgressDeb822Fd(int progress_fd)
- : StepsDone(0), StepsTotal(1)
+ : d(NULL), StepsDone(0), StepsTotal(1)
{
OutStatusFd = progress_fd;
}
+PackageManagerProgressDeb822Fd::~PackageManagerProgressDeb822Fd() {}
void PackageManagerProgressDeb822Fd::WriteToStatusFd(std::string s)
{
@@ -233,7 +234,7 @@ bool PackageManagerProgressDeb822Fd::StatusChanged(std::string PackageName,
PackageManagerFancy::PackageManagerFancy()
- : child_pty(-1)
+ : d(NULL), child_pty(-1)
{
// setup terminal size
old_SIGWINCH = signal(SIGWINCH, PackageManagerFancy::staticSIGWINCH);
@@ -285,13 +286,13 @@ void PackageManagerFancy::SetupTerminalScrollArea(int nr_rows)
std::cout << "\n";
// save cursor
- std::cout << "\033[s";
+ std::cout << "\0337";
// set scroll region (this will place the cursor in the top left)
std::cout << "\033[0;" << nr_rows - 1 << "r";
// restore cursor but ensure its inside the scrolling area
- std::cout << "\033[u";
+ std::cout << "\0338";
static const char *move_cursor_up = "\033[1A";
std::cout << move_cursor_up;
@@ -373,8 +374,8 @@ bool PackageManagerFancy::DrawStatusLine()
if (unlikely(size.rows < 1 || size.columns < 1))
return false;
- static std::string save_cursor = "\033[s";
- static std::string restore_cursor = "\033[u";
+ static std::string save_cursor = "\0337";
+ static std::string restore_cursor = "\0338";
// green
static std::string set_bg_color = DeQuoteString(
@@ -433,6 +434,10 @@ bool PackageManagerText::StatusChanged(std::string PackageName,
return true;
}
+PackageManagerText::PackageManagerText() : PackageManager(), d(NULL) {}
+PackageManagerText::~PackageManagerText() {}
+
+
} // namespace progress
diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h
index d8b4a5c82..ee03ac217 100644
--- a/apt-pkg/install-progress.h
+++ b/apt-pkg/install-progress.h
@@ -18,7 +18,7 @@ namespace Progress {
{
private:
/** \brief dpointer placeholder */
- void *d;
+ void * const d;
protected:
std::string progress_str;
@@ -61,6 +61,7 @@ namespace Progress {
class PackageManagerProgressFd : public PackageManager
{
+ void * const d;
protected:
int OutStatusFd;
int StepsDone;
@@ -68,28 +69,30 @@ namespace Progress {
void WriteToStatusFd(std::string msg);
public:
- PackageManagerProgressFd(int progress_fd);
+ explicit PackageManagerProgressFd(int progress_fd);
+ virtual ~PackageManagerProgressFd();
- virtual void StartDpkg();
- virtual void Stop();
+ virtual void StartDpkg() APT_OVERRIDE;
+ virtual void Stop() APT_OVERRIDE;
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string HumanReadableAction);
+ std::string HumanReadableAction) APT_OVERRIDE;
virtual void Error(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string ErrorMessage);
+ std::string ErrorMessage) APT_OVERRIDE;
virtual void ConffilePrompt(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string ConfMessage);
+ std::string ConfMessage) APT_OVERRIDE;
};
class PackageManagerProgressDeb822Fd : public PackageManager
{
+ void * const d;
protected:
int OutStatusFd;
int StepsDone;
@@ -97,27 +100,29 @@ namespace Progress {
void WriteToStatusFd(std::string msg);
public:
- PackageManagerProgressDeb822Fd(int progress_fd);
+ explicit PackageManagerProgressDeb822Fd(int progress_fd);
+ virtual ~PackageManagerProgressDeb822Fd();
- virtual void StartDpkg();
- virtual void Stop();
+ virtual void StartDpkg() APT_OVERRIDE;
+ virtual void Stop() APT_OVERRIDE;
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string HumanReadableAction);
+ std::string HumanReadableAction) APT_OVERRIDE;
virtual void Error(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string ErrorMessage);
+ std::string ErrorMessage) APT_OVERRIDE;
virtual void ConffilePrompt(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string ConfMessage);
+ std::string ConfMessage) APT_OVERRIDE;
};
class PackageManagerFancy : public PackageManager
{
+ void * const d;
private:
APT_HIDDEN static void staticSIGWINCH(int);
static std::vector<PackageManagerFancy*> instances;
@@ -138,13 +143,13 @@ namespace Progress {
public:
PackageManagerFancy();
- ~PackageManagerFancy();
- virtual void Start(int child_pty=-1);
- virtual void Stop();
+ virtual ~PackageManagerFancy();
+ virtual void Start(int child_pty=-1) APT_OVERRIDE;
+ virtual void Stop() APT_OVERRIDE;
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string HumanReadableAction);
+ std::string HumanReadableAction) APT_OVERRIDE;
// return a progress bar of the given size for the given progress
// percent between 0.0 and 1.0 in the form "[####...]"
@@ -153,11 +158,15 @@ namespace Progress {
class PackageManagerText : public PackageManager
{
+ void * const d;
public:
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string HumanReadableAction);
+ std::string HumanReadableAction) APT_OVERRIDE;
+
+ PackageManagerText();
+ virtual ~PackageManagerText();
};
diff --git a/apt-pkg/metaindex.cc b/apt-pkg/metaindex.cc
index 31a8ec009..1632b928c 100644
--- a/apt-pkg/metaindex.cc
+++ b/apt-pkg/metaindex.cc
@@ -1,30 +1,31 @@
// Include Files /*{{{*/
+#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/metaindex.h>
-#include <stddef.h>
-
#include <string>
#include <vector>
/*}}}*/
-#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
-std::string metaIndex::LocalFileName() const { return ""; }
-#else
-#include <apt-pkg/debmetaindex.h>
-std::string metaIndex::LocalFileName() const
+std::string metaIndex::Describe() const
{
- debReleaseIndex const * deb = dynamic_cast<debReleaseIndex const*>(this);
- if (deb != NULL)
- return deb->LocalFileName();
+ return "Release";
+}
- return "";
+pkgCache::RlsFileIterator metaIndex::FindInCache(pkgCache &Cache, bool const) const
+{
+ return pkgCache::RlsFileIterator(Cache);
+}
+
+bool metaIndex::Merge(pkgCacheGenerator &Gen,OpProgress *) const
+{
+ return Gen.SelectReleaseFile("", "");
}
-#endif
metaIndex::metaIndex(std::string const &URI, std::string const &Dist,
char const * const Type)
-: Indexes(NULL), Type(Type), URI(URI), Dist(Dist), Trusted(false)
+: d(NULL), Indexes(NULL), Type(Type), URI(URI), Dist(Dist), Trusted(TRI_UNSET),
+ Date(0), ValidUntil(0), SupportsAcquireByHash(false), LoadedSuccessfully(TRI_UNSET)
{
/* nothing */
}
@@ -38,3 +39,61 @@ metaIndex::~metaIndex()
delete *I;
delete Indexes;
}
+
+// one line Getters for public fields /*{{{*/
+APT_PURE std::string metaIndex::GetURI() const { return URI; }
+APT_PURE std::string metaIndex::GetDist() const { return Dist; }
+APT_PURE const char* metaIndex::GetType() const { return Type; }
+APT_PURE metaIndex::TriState metaIndex::GetTrusted() const { return Trusted; }
+APT_PURE std::string metaIndex::GetSignedBy() const { return SignedBy; }
+APT_PURE std::string metaIndex::GetCodename() const { return Codename; }
+APT_PURE std::string metaIndex::GetSuite() const { return Suite; }
+APT_PURE bool metaIndex::GetSupportsAcquireByHash() const { return SupportsAcquireByHash; }
+APT_PURE time_t metaIndex::GetValidUntil() const { return ValidUntil; }
+APT_PURE time_t metaIndex::GetDate() const { return this->Date; }
+APT_PURE metaIndex::TriState metaIndex::GetLoadedSuccessfully() const { return LoadedSuccessfully; }
+
+APT_PURE bool metaIndex::CheckDist(string const &MaybeDist) const
+{
+ return (this->Codename == MaybeDist
+ || this->Suite == MaybeDist);
+}
+APT_PURE std::string metaIndex::GetExpectedDist() const
+{
+ // TODO: Used to be an explicit value set in the constructor
+ return "";
+}
+ /*}}}*/
+APT_PURE metaIndex::checkSum *metaIndex::Lookup(string const &MetaKey) const /*{{{*/
+{
+ std::map<std::string, metaIndex::checkSum* >::const_iterator sum = Entries.find(MetaKey);
+ if (sum == Entries.end())
+ return NULL;
+ return sum->second;
+}
+ /*}}}*/
+APT_PURE bool metaIndex::Exists(string const &MetaKey) const /*{{{*/
+{
+ return Entries.find(MetaKey) != Entries.end();
+}
+ /*}}}*/
+std::vector<std::string> metaIndex::MetaKeys() const /*{{{*/
+{
+ std::vector<std::string> keys;
+ std::map<string,checkSum *>::const_iterator I = Entries.begin();
+ while(I != Entries.end()) {
+ keys.push_back((*I).first);
+ ++I;
+ }
+ return keys;
+}
+ /*}}}*/
+void metaIndex::swapLoad(metaIndex * const OldMetaIndex) /*{{{*/
+{
+ std::swap(Entries, OldMetaIndex->Entries);
+ std::swap(Date, OldMetaIndex->Date);
+ std::swap(ValidUntil, OldMetaIndex->ValidUntil);
+ std::swap(SupportsAcquireByHash, OldMetaIndex->SupportsAcquireByHash);
+ std::swap(LoadedSuccessfully, OldMetaIndex->LoadedSuccessfully);
+}
+ /*}}}*/
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index 6c3d2880b..94aec2d1f 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -17,41 +17,92 @@ class OpProgress;
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/vendor.h>
using std::string;
#endif
class pkgAcquire;
+class IndexTarget;
+class pkgCacheGenerator;
+class OpProgress;
class metaIndex
{
- protected:
+public:
+ APT_IGNORE_DEPRECATED_PUSH
+ struct checkSum
+ {
+ std::string MetaKeyFilename;
+ HashStringList Hashes;
+ unsigned long long Size;
+
+ APT_DEPRECATED HashString Hash;
+ };
+ APT_IGNORE_DEPRECATED_POP
+
+ enum APT_HIDDEN TriState {
+ TRI_YES, TRI_DONTCARE, TRI_NO, TRI_UNSET
+ };
+private:
+ void * const d;
+protected:
std::vector <pkgIndexFile *> *Indexes;
+ // parsed from the sources.list
const char *Type;
std::string URI;
std::string Dist;
- bool Trusted;
+ TriState Trusted;
+ std::string SignedBy;
- public:
+ // parsed from a file
+ std::string Suite;
+ std::string Codename;
+ time_t Date;
+ time_t ValidUntil;
+ bool SupportsAcquireByHash;
+ std::map<std::string, checkSum *> Entries;
+ TriState LoadedSuccessfully;
+public:
// Various accessors
- virtual std::string GetURI() const {return URI;}
- virtual std::string GetDist() const {return Dist;}
- virtual const char* GetType() const {return Type;}
-
- // interface to to query it
-#if APT_PKG_ABI >= 413
- /** \return the path of the local file (or "" if its not available) */
- virtual std::string LocalFileName() const;
-#else
- std::string LocalFileName() const;
-#endif
+ std::string GetURI() const;
+ std::string GetDist() const;
+ const char* GetType() const;
+ TriState GetTrusted() const;
+ std::string GetSignedBy() const;
+
+ std::string GetCodename() const;
+ std::string GetSuite() const;
+ bool GetSupportsAcquireByHash() const;
+ time_t GetValidUntil() const;
+ time_t GetDate() const;
+
+ std::string GetExpectedDist() const;
+ bool CheckDist(std::string const &MaybeDist) const;
// Interface for acquire
+ virtual std::string Describe() const;
virtual std::string ArchiveURI(std::string const& File) const = 0;
- virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const = 0;
+ virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) = 0;
+ virtual std::vector<IndexTarget> GetIndexTargets() const = 0;
virtual std::vector<pkgIndexFile *> *GetIndexFiles() = 0;
virtual bool IsTrusted() const = 0;
+ virtual bool Load(std::string const &Filename, std::string * const ErrorText) = 0;
+ /** @return a new metaIndex object based on this one, but without information from #Load */
+ virtual metaIndex * UnloadedClone() const = 0;
+ // the given metaIndex is potentially invalid after this call and should be deleted
+ void swapLoad(metaIndex * const OldMetaIndex);
+
+ // Lookup functions for parsed Hashes
+ checkSum *Lookup(std::string const &MetaKey) const;
+ /** \brief tests if a checksum for this file is available */
+ bool Exists(std::string const &MetaKey) const;
+ std::vector<std::string> MetaKeys() const;
+ TriState GetLoadedSuccessfully() const;
+
+ // Interfaces for pkgCacheGen
+ virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const;
+ virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
+
metaIndex(std::string const &URI, std::string const &Dist,
char const * const Type);
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc
index a1fcbcc98..1e0640422 100644
--- a/apt-pkg/orderlist.cc
+++ b/apt-pkg/orderlist.cc
@@ -68,14 +68,12 @@
#include <apt-pkg/orderlist.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/pkgcache.h>
#include <stdlib.h>
#include <string.h>
-#include <string>
#include <iostream>
/*}}}*/
@@ -86,7 +84,7 @@ pkgOrderList *pkgOrderList::Me = 0;
// OrderList::pkgOrderList - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgOrderList::pkgOrderList(pkgDepCache *pCache) : Cache(*pCache),
+pkgOrderList::pkgOrderList(pkgDepCache *pCache) : d(NULL), Cache(*pCache),
Primary(NULL), Secondary(NULL),
RevDepends(NULL), Remove(NULL),
AfterEnd(NULL), FileList(NULL),
@@ -142,9 +140,9 @@ bool pkgOrderList::DoRun()
{
// Temp list
unsigned long Size = Cache.Head().PackageCount;
- SPtrArray<Package *> NList = new Package *[Size];
- SPtrArray<Package *> AfterList = new Package *[Size];
- AfterEnd = AfterList;
+ std::unique_ptr<Package *[]> NList(new Package *[Size]);
+ std::unique_ptr<Package *[]> AfterList(new Package *[Size]);
+ AfterEnd = AfterList.get();
Depth = 0;
WipeFlags(Added | AddPending | Loop | InList);
@@ -154,7 +152,7 @@ bool pkgOrderList::DoRun()
// Rebuild the main list into the temp list.
iterator OldEnd = End;
- End = NList;
+ End = NList.get();
for (iterator I = List; I != OldEnd; ++I)
if (VisitNode(PkgIterator(Cache,*I), "DoRun") == false)
{
@@ -163,12 +161,12 @@ bool pkgOrderList::DoRun()
}
// Copy the after list to the end of the main list
- for (Package **I = AfterList; I != AfterEnd; I++)
+ for (Package **I = AfterList.get(); I != AfterEnd; I++)
*End++ = *I;
// Swap the main list to the new list
delete [] List;
- List = NList.UnGuard();
+ List = NList.release();
return true;
}
/*}}}*/
@@ -512,8 +510,8 @@ bool pkgOrderList::VisitRProvides(DepFunc F,VerIterator Ver)
against it! */
bool pkgOrderList::VisitProvides(DepIterator D,bool Critical)
{
- SPtrArray<Version *> List = D.AllTargets();
- for (Version **I = List; *I != 0; ++I)
+ std::unique_ptr<Version *[]> List(D.AllTargets());
+ for (Version **I = List.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator Pkg = Ver.ParentPkg();
@@ -541,7 +539,7 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical)
}
if (D.IsNegative() == false)
return true;
- for (Version **I = List; *I != 0; ++I)
+ for (Version **I = List.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator Pkg = Ver.ParentPkg();
@@ -1075,9 +1073,9 @@ void pkgOrderList::WipeFlags(unsigned long F)
this fails to produce a suitable result. */
bool pkgOrderList::CheckDep(DepIterator D)
{
- SPtrArray<Version *> List = D.AllTargets();
+ std::unique_ptr<Version *[]> List(D.AllTargets());
bool Hit = false;
- for (Version **I = List; *I != 0; I++)
+ for (Version **I = List.get(); *I != 0; I++)
{
VerIterator Ver(Cache,*I);
PkgIterator Pkg = Ver.ParentPkg();
diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h
index b8bad81b3..7b35b2955 100644
--- a/apt-pkg/orderlist.h
+++ b/apt-pkg/orderlist.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: orderlist.h,v 1.9 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################
Order List - Represents and Manipulates an ordered list of packages.
@@ -25,6 +24,7 @@
class pkgDepCache;
class pkgOrderList : protected pkgCache::Namespace
{
+ void * const d;
protected:
pkgDepCache &Cache;
@@ -122,8 +122,8 @@ class pkgOrderList : protected pkgCache::Namespace
int Score(PkgIterator Pkg);
- pkgOrderList(pkgDepCache *Cache);
- ~pkgOrderList();
+ explicit pkgOrderList(pkgDepCache *Cache);
+ virtual ~pkgOrderList();
};
#endif
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index d137dc75a..06ec986ed 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -23,7 +23,6 @@
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
@@ -45,7 +44,7 @@ bool pkgPackageManager::SigINTStop = false;
// ---------------------------------------------------------------------
/* */
pkgPackageManager::pkgPackageManager(pkgDepCache *pCache) : Cache(*pCache),
- List(NULL), Res(Incomplete)
+ List(NULL), Res(Incomplete), d(NULL)
{
FileNames = new string[Cache.Head().PackageCount];
Debug = _config->FindB("Debug::pkgPackageManager",false);
@@ -390,9 +389,9 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
// to do anything at all
for (DepIterator Cur = Start; true; ++Cur)
{
- SPtrArray<Version *> VList = Cur.AllTargets();
+ std::unique_ptr<Version *> VList(Cur.AllTargets());
- for (Version **I = VList; *I != 0; ++I)
+ for (Version **I = VList.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator DepPkg = Ver.ParentPkg();
@@ -440,9 +439,9 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
// probably due to loops.
for (DepIterator Cur = Start; true; ++Cur)
{
- SPtrArray<Version *> VList = Cur.AllTargets();
+ std::unique_ptr<Version *> VList(Cur.AllTargets());
- for (Version **I = VList; *I != 0; ++I)
+ for (Version **I = VList.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator DepPkg = Ver.ParentPkg();
@@ -515,9 +514,9 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
// Search for dependencies which are unpacked but aren't configured yet (maybe loops)
for (DepIterator Cur = Start; true; ++Cur)
{
- SPtrArray<Version *> VList = Cur.AllTargets();
+ std::unique_ptr<Version *> VList(Cur.AllTargets());
- for (Version **I = VList; *I != 0; ++I)
+ for (Version **I = VList.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator DepPkg = Ver.ParentPkg();
@@ -726,8 +725,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
// Look for easy targets: packages that are already okay
for (DepIterator Cur = Start; Bad == true; ++Cur)
{
- SPtrArray<Version *> VList = Cur.AllTargets();
- for (Version **I = VList; *I != 0; ++I)
+ std::unique_ptr<Version *> VList(Cur.AllTargets());
+ for (Version **I = VList.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator Pkg = Ver.ParentPkg();
@@ -750,8 +749,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
// Look for something that could be configured.
for (DepIterator Cur = Start; Bad == true && Cur.end() == false; ++Cur)
{
- SPtrArray<Version *> VList = Cur.AllTargets();
- for (Version **I = VList; *I != 0; ++I)
+ std::unique_ptr<Version *[]> VList(Cur.AllTargets());
+ for (Version **I = VList.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator DepPkg = Ver.ParentPkg();
@@ -806,8 +805,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
End->Type == pkgCache::Dep::Obsoletes ||
End->Type == pkgCache::Dep::DpkgBreaks)
{
- SPtrArray<Version *> VList = End.AllTargets();
- for (Version **I = VList; *I != 0; ++I)
+ std::unique_ptr<Version *[]> VList(End.AllTargets());
+ for (Version **I = VList.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);
PkgIterator ConflictPkg = Ver.ParentPkg();
@@ -1085,7 +1084,6 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
// PM::DoInstallPostFork - compat /*{{{*/
// ---------------------------------------------------------------------
/*}}}*/
-#if APT_PKG_ABI >= 413
pkgPackageManager::OrderResult
pkgPackageManager::DoInstallPostFork(int statusFd)
{
@@ -1107,22 +1105,10 @@ pkgPackageManager::DoInstallPostFork(APT::Progress::PackageManager *progress)
return Res;
}
-#else
-pkgPackageManager::OrderResult
-pkgPackageManager::DoInstallPostFork(int statusFd)
-{
- bool goResult = Go(statusFd);
- if(goResult == false)
- return Failed;
-
- return Res;
-}
-#endif
/*}}}*/
// PM::DoInstall - Does the installation /*{{{*/
// ---------------------------------------------------------------------
/* compat */
-#if APT_PKG_ABI >= 413
pkgPackageManager::OrderResult
pkgPackageManager::DoInstall(int statusFd)
{
@@ -1132,21 +1118,11 @@ pkgPackageManager::DoInstall(int statusFd)
delete progress;
return res;
}
-#else
-pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int statusFd)
-{
- if(DoInstallPreFork() == Failed)
- return Failed;
-
- return DoInstallPostFork(statusFd);
-}
-#endif
/*}}}*/
// PM::DoInstall - Does the installation /*{{{*/
// ---------------------------------------------------------------------
/* This uses the filenames in FileNames and the information in the
DepCache to perform the installation of packages.*/
-#if APT_PKG_ABI >= 413
pkgPackageManager::OrderResult
pkgPackageManager::DoInstall(APT::Progress::PackageManager *progress)
{
@@ -1155,5 +1131,4 @@ pkgPackageManager::DoInstall(APT::Progress::PackageManager *progress)
return DoInstallPostFork(progress);
}
-#endif
/*}}}*/
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h
index fce0ad301..8de6ab3ad 100644
--- a/apt-pkg/packagemanager.h
+++ b/apt-pkg/packagemanager.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.h,v 1.14 2001/05/07 04:24:08 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
@@ -96,9 +95,7 @@ class pkgPackageManager : protected pkgCache::Namespace
virtual bool Install(PkgIterator /*Pkg*/,std::string /*File*/) {return false;};
virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
-#if APT_PKG_ABI >= 413
virtual bool Go(APT::Progress::PackageManager * /*progress*/) {return true;};
-#endif
virtual bool Go(int /*statusFd*/=-1) {return true;};
virtual void Reset() {};
@@ -113,13 +110,9 @@ class pkgPackageManager : protected pkgCache::Namespace
pkgRecords *Recs);
// Do the installation
-#if APT_PKG_ABI >= 413
OrderResult DoInstall(APT::Progress::PackageManager *progress);
// compat
APT_DEPRECATED OrderResult DoInstall(int statusFd=-1);
-#else
- OrderResult DoInstall(int statusFd=-1);
-#endif
// stuff that needs to be done before the fork() of a library that
// uses apt
@@ -127,14 +120,10 @@ class pkgPackageManager : protected pkgCache::Namespace
Res = OrderInstall();
return Res;
};
-#if APT_PKG_ABI >= 413
// stuff that needs to be done after the fork
OrderResult DoInstallPostFork(APT::Progress::PackageManager *progress);
// compat
APT_DEPRECATED OrderResult DoInstallPostFork(int statusFd=-1);
-#else
- OrderResult DoInstallPostFork(int statusFd=-1);
-#endif
// ?
bool FixMissing();
@@ -142,10 +131,11 @@ class pkgPackageManager : protected pkgCache::Namespace
/** \brief returns all packages dpkg let disappear */
inline std::set<std::string> GetDisappearedPackages() { return disappearedPkgs; };
- pkgPackageManager(pkgDepCache *Cache);
+ explicit pkgPackageManager(pkgDepCache *Cache);
virtual ~pkgPackageManager();
private:
+ void * const d;
enum APT_HIDDEN SmartAction { UNPACK_IMMEDIATE, UNPACK, CONFIGURE };
APT_HIDDEN bool NonLoopingSmart(SmartAction const action, pkgCache::PkgIterator &Pkg,
pkgCache::PkgIterator DepPkg, int const Depth, bool const PkgLoop,
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 864ae0f60..9d3929cd9 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -34,7 +34,8 @@
#include <stddef.h>
#include <string.h>
-#include <ostream>
+#include <sstream>
+#include <algorithm>
#include <vector>
#include <string>
#include <sys/stat.h>
@@ -50,41 +51,45 @@ using std::string;
/* Simply initialize the header */
pkgCache::Header::Header()
{
- Signature = 0x98FE76DC;
-
+#define APT_HEADER_SET(X,Y) X = Y; static_assert(std::numeric_limits<decltype(X)>::max() > Y, "Size violation detected in pkgCache::Header")
+ APT_HEADER_SET(Signature, 0x98FE76DC);
+
/* Whenever the structures change the major version should be bumped,
whenever the generator changes the minor version should be bumped. */
- MajorVersion = 10;
- MinorVersion = 0;
- Dirty = false;
-
- HeaderSz = sizeof(pkgCache::Header);
- GroupSz = sizeof(pkgCache::Group);
- PackageSz = sizeof(pkgCache::Package);
- PackageFileSz = sizeof(pkgCache::PackageFile);
- VersionSz = sizeof(pkgCache::Version);
- DescriptionSz = sizeof(pkgCache::Description);
- DependencySz = sizeof(pkgCache::Dependency);
- ProvidesSz = sizeof(pkgCache::Provides);
- VerFileSz = sizeof(pkgCache::VerFile);
- DescFileSz = sizeof(pkgCache::DescFile);
-
+ APT_HEADER_SET(MajorVersion, 10);
+ APT_HEADER_SET(MinorVersion, 0);
+ APT_HEADER_SET(Dirty, false);
+
+ APT_HEADER_SET(HeaderSz, sizeof(pkgCache::Header));
+ APT_HEADER_SET(GroupSz, sizeof(pkgCache::Group));
+ APT_HEADER_SET(PackageSz, sizeof(pkgCache::Package));
+ APT_HEADER_SET(ReleaseFileSz, sizeof(pkgCache::ReleaseFile));
+ APT_HEADER_SET(PackageFileSz, sizeof(pkgCache::PackageFile));
+ APT_HEADER_SET(VersionSz, sizeof(pkgCache::Version));
+ APT_HEADER_SET(DescriptionSz, sizeof(pkgCache::Description));
+ APT_HEADER_SET(DependencySz, sizeof(pkgCache::Dependency));
+ APT_HEADER_SET(DependencyDataSz, sizeof(pkgCache::DependencyData));
+ APT_HEADER_SET(ProvidesSz, sizeof(pkgCache::Provides));
+ APT_HEADER_SET(VerFileSz, sizeof(pkgCache::VerFile));
+ APT_HEADER_SET(DescFileSz, sizeof(pkgCache::DescFile));
+#undef APT_HEADER_SET
+
GroupCount = 0;
PackageCount = 0;
VersionCount = 0;
DescriptionCount = 0;
DependsCount = 0;
+ DependsDataCount = 0;
+ ReleaseFileCount = 0;
PackageFileCount = 0;
VerFileCount = 0;
DescFileCount = 0;
ProvidesCount = 0;
MaxVerFileSize = 0;
MaxDescFileSize = 0;
-
+
FileList = 0;
-#if APT_PKG_ABI < 413
- APT_IGNORE_DEPRECATED(StringList = 0;)
-#endif
+ RlsFileList = 0;
VerSysName = 0;
Architecture = 0;
SetArchitectures(0);
@@ -102,10 +107,12 @@ bool pkgCache::Header::CheckSizes(Header &Against) const
if (HeaderSz == Against.HeaderSz &&
GroupSz == Against.GroupSz &&
PackageSz == Against.PackageSz &&
+ ReleaseFileSz == Against.ReleaseFileSz &&
PackageFileSz == Against.PackageFileSz &&
VersionSz == Against.VersionSz &&
DescriptionSz == Against.DescriptionSz &&
DependencySz == Against.DependencySz &&
+ DependencyDataSz == Against.DependencyDataSz &&
VerFileSz == Against.VerFileSz &&
DescFileSz == Against.DescFileSz &&
ProvidesSz == Against.ProvidesSz)
@@ -118,7 +125,7 @@ bool pkgCache::Header::CheckSizes(Header &Against) const
// ---------------------------------------------------------------------
/* */
APT_IGNORE_DEPRECATED_PUSH
-pkgCache::pkgCache(MMap *Map, bool DoMap) : Map(*Map)
+pkgCache::pkgCache(MMap *Map, bool DoMap) : Map(*Map), d(NULL)
{
// call getArchitectures() with cached=false to ensure that the
// architectures cache is re-evaulated. this is needed in cases
@@ -140,11 +147,13 @@ bool pkgCache::ReMap(bool const &Errorchecks)
PkgP = (Package *)Map.Data();
VerFileP = (VerFile *)Map.Data();
DescFileP = (DescFile *)Map.Data();
+ RlsFileP = (ReleaseFile *)Map.Data();
PkgFileP = (PackageFile *)Map.Data();
VerP = (Version *)Map.Data();
DescP = (Description *)Map.Data();
ProvideP = (Provides *)Map.Data();
DepP = (Dependency *)Map.Data();
+ DepDataP = (DependencyData *)Map.Data();
StrP = (char *)Map.Data();
if (Errorchecks == false)
@@ -403,10 +412,10 @@ pkgCache::PkgIterator pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const
return PkgIterator(*Owner, Owner->PkgP + LastPkg->NextPackage);
}
/*}}}*/
-// GrpIterator::operator ++ - Postfix incr /*{{{*/
+// GrpIterator::operator++ - Prefix incr /*{{{*/
// ---------------------------------------------------------------------
/* This will advance to the next logical group in the hash table. */
-void pkgCache::GrpIterator::operator ++(int)
+pkgCache::GrpIterator& pkgCache::GrpIterator::operator++()
{
// Follow the current links
if (S != Owner->GrpP)
@@ -415,15 +424,16 @@ void pkgCache::GrpIterator::operator ++(int)
// Follow the hash table
while (S == Owner->GrpP && (HashIndex+1) < (signed)Owner->HeaderP->GetHashTableSize())
{
- HashIndex++;
+ ++HashIndex;
S = Owner->GrpP + Owner->HeaderP->GrpHashTableP()[HashIndex];
}
+ return *this;
}
/*}}}*/
-// PkgIterator::operator ++ - Postfix incr /*{{{*/
+// PkgIterator::operator++ - Prefix incr /*{{{*/
// ---------------------------------------------------------------------
/* This will advance to the next logical package in the hash table. */
-void pkgCache::PkgIterator::operator ++(int)
+pkgCache::PkgIterator& pkgCache::PkgIterator::operator++()
{
// Follow the current links
if (S != Owner->PkgP)
@@ -432,9 +442,22 @@ void pkgCache::PkgIterator::operator ++(int)
// Follow the hash table
while (S == Owner->PkgP && (HashIndex+1) < (signed)Owner->HeaderP->GetHashTableSize())
{
- HashIndex++;
+ ++HashIndex;
S = Owner->PkgP + Owner->HeaderP->PkgHashTableP()[HashIndex];
}
+ return *this;
+}
+ /*}}}*/
+pkgCache::DepIterator& pkgCache::DepIterator::operator++() /*{{{*/
+{
+ if (S == Owner->DepP)
+ return *this;
+ S = Owner->DepP + (Type == DepVer ? S->NextDepends : S->NextRevDepends);
+ if (S == Owner->DepP)
+ S2 = Owner->DepDataP;
+ else
+ S2 = Owner->DepDataP + S->DependencyData;
+ return *this;
}
/*}}}*/
// PkgIterator::State - Check the State of the package /*{{{*/
@@ -536,8 +559,8 @@ std::string pkgCache::PkgIterator::FullName(bool const &Pretty) const
bool pkgCache::DepIterator::IsCritical() const
{
if (IsNegative() == true ||
- S->Type == pkgCache::Dep::Depends ||
- S->Type == pkgCache::Dep::PreDepends)
+ S2->Type == pkgCache::Dep::Depends ||
+ S2->Type == pkgCache::Dep::PreDepends)
return true;
return false;
}
@@ -548,9 +571,9 @@ bool pkgCache::DepIterator::IsCritical() const
are negative like Conflicts which can and should be handled differently */
bool pkgCache::DepIterator::IsNegative() const
{
- return S->Type == Dep::DpkgBreaks ||
- S->Type == Dep::Conflicts ||
- S->Type == Dep::Obsoletes;
+ return S2->Type == Dep::DpkgBreaks ||
+ S2->Type == Dep::Conflicts ||
+ S2->Type == Dep::Obsoletes;
}
/*}}}*/
// DepIterator::SmartTargetPkg - Resolve dep target pointers w/provides /*{{{*/
@@ -679,8 +702,8 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End)
End = *this;
for (bool LastOR = true; end() == false && LastOR == true;)
{
- LastOR = (S->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or;
- (*this)++;
+ LastOR = (S2->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or;
+ ++(*this);
if (LastOR == true)
End = (*this);
}
@@ -690,31 +713,22 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End)
// ---------------------------------------------------------------------
/* Deps like self-conflicts should be ignored as well as implicit conflicts
on virtual packages. */
-bool pkgCache::DepIterator::IsIgnorable(PkgIterator const &/*Pkg*/) const
+bool pkgCache::DepIterator::IsIgnorable(PkgIterator const &PT) const
{
if (IsNegative() == false)
return false;
- pkgCache::PkgIterator PP = ParentPkg();
- pkgCache::PkgIterator PT = TargetPkg();
+ pkgCache::PkgIterator const PP = ParentPkg();
if (PP->Group != PT->Group)
return false;
// self-conflict
if (PP == PT)
return true;
- pkgCache::VerIterator PV = ParentVer();
+ pkgCache::VerIterator const PV = ParentVer();
// ignore group-conflict on a M-A:same package - but not our implicit dependencies
// so that we can have M-A:same packages conflicting with their own real name
if ((PV->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same)
- {
- // Replaces: ${self}:other ( << ${binary:Version})
- if (S->Type == pkgCache::Dep::Replaces && S->CompareOp == pkgCache::Dep::Less && strcmp(PV.VerStr(), TargetVer()) == 0)
- return false;
- // Breaks: ${self}:other (!= ${binary:Version})
- if (S->Type == pkgCache::Dep::DpkgBreaks && S->CompareOp == pkgCache::Dep::NotEquals && strcmp(PV.VerStr(), TargetVer()) == 0)
- return false;
- return true;
- }
+ return IsMultiArchImplicit() == false;
return false;
}
@@ -729,35 +743,34 @@ bool pkgCache::DepIterator::IsIgnorable(PrvIterator const &Prv) const
if (Prv.OwnerPkg()->Group == Pkg->Group)
return true;
// Implicit group-conflicts should not be applied on providers of other groups
- if (Pkg->Group == TargetPkg()->Group && Prv.OwnerPkg()->Group != Pkg->Group)
+ if (IsMultiArchImplicit() && Prv.OwnerPkg()->Group != Pkg->Group)
return true;
return false;
}
/*}}}*/
-// DepIterator::IsMultiArchImplicit - added by the cache generation /*{{{*/
-// ---------------------------------------------------------------------
-/* MultiArch can be translated to SingleArch for an resolver and we did so,
- by adding dependencies to help the resolver understand the problem, but
- sometimes it is needed to identify these to ignore them… */
-bool pkgCache::DepIterator::IsMultiArchImplicit() const
-{
- if (ParentPkg()->Arch != TargetPkg()->Arch &&
- (S->Type == pkgCache::Dep::Replaces ||
- S->Type == pkgCache::Dep::DpkgBreaks ||
- S->Type == pkgCache::Dep::Conflicts))
- return true;
- return false;
-}
- /*}}}*/
// DepIterator::IsSatisfied - check if a version satisfied the dependency /*{{{*/
bool pkgCache::DepIterator::IsSatisfied(VerIterator const &Ver) const
{
- return Owner->VS->CheckDep(Ver.VerStr(),S->CompareOp,TargetVer());
+ return Owner->VS->CheckDep(Ver.VerStr(),S2->CompareOp,TargetVer());
}
bool pkgCache::DepIterator::IsSatisfied(PrvIterator const &Prv) const
{
- return Owner->VS->CheckDep(Prv.ProvideVersion(),S->CompareOp,TargetVer());
+ return Owner->VS->CheckDep(Prv.ProvideVersion(),S2->CompareOp,TargetVer());
+}
+ /*}}}*/
+// DepIterator::IsImplicit - added by the cache generation /*{{{*/
+bool pkgCache::DepIterator::IsImplicit() const
+{
+ if (IsMultiArchImplicit() == true)
+ return true;
+ if (IsNegative() || S2->Type == pkgCache::Dep::Replaces)
+ {
+ if ((S2->CompareOp & pkgCache::Dep::ArchSpecific) != pkgCache::Dep::ArchSpecific &&
+ strcmp(ParentPkg().Arch(), TargetPkg().Arch()) != 0)
+ return true;
+ }
+ return false;
}
/*}}}*/
// ostream operator to handle string representation of a dependecy /*{{{*/
@@ -814,7 +827,7 @@ APT_PURE bool pkgCache::VerIterator::Downloadable() const
{
VerFileIterator Files = FileList();
for (; Files.end() == false; ++Files)
- if ((Files.File()->Flags & pkgCache::Flag::NotSource) != pkgCache::Flag::NotSource)
+ if (Files.File().Flagged(pkgCache::Flag::NotSource) == false)
return true;
return false;
}
@@ -828,7 +841,7 @@ APT_PURE bool pkgCache::VerIterator::Automatic() const
VerFileIterator Files = FileList();
for (; Files.end() == false; ++Files)
// Do not check ButAutomaticUpgrades here as it is kind of automatic…
- if ((Files.File()->Flags & pkgCache::Flag::NotAutomatic) != pkgCache::Flag::NotAutomatic)
+ if (Files.File().Flagged(pkgCache::Flag::NotAutomatic) == false)
return true;
return false;
}
@@ -854,69 +867,54 @@ pkgCache::VerFileIterator pkgCache::VerIterator::NewestFile() const
// ---------------------------------------------------------------------
/* This describes the version from a release-centric manner. The output is a
list of Label:Version/Archive */
+static std::string PkgFileIteratorToRelString(pkgCache::PkgFileIterator const &File)
+{
+ std::string Res;
+ if (File.Label() != 0)
+ Res = Res + File.Label() + ':';
+
+ if (File.Archive() != 0)
+ {
+ if (File.Version() == 0)
+ Res += File.Archive();
+ else
+ Res = Res + File.Version() + '/' + File.Archive();
+ }
+ else
+ {
+ // No release file, print the host name that this came from
+ if (File.Site() == 0 || File.Site()[0] == 0)
+ Res += "localhost";
+ else
+ Res += File.Site();
+ }
+ return Res;
+}
string pkgCache::VerIterator::RelStr() const
{
- bool First = true;
- string Res;
+ std::vector<std::string> RelStrs;
for (pkgCache::VerFileIterator I = this->FileList(); I.end() == false; ++I)
{
// Do not print 'not source' entries'
- pkgCache::PkgFileIterator File = I.File();
- if ((File->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource)
+ pkgCache::PkgFileIterator const File = I.File();
+ if (File.Flagged(pkgCache::Flag::NotSource))
continue;
- // See if we have already printed this out..
- bool Seen = false;
- for (pkgCache::VerFileIterator J = this->FileList(); I != J; ++J)
- {
- pkgCache::PkgFileIterator File2 = J.File();
- if (File2->Label == 0 || File->Label == 0)
- continue;
-
- if (strcmp(File.Label(),File2.Label()) != 0)
- continue;
-
- if (File2->Version == File->Version)
- {
- Seen = true;
- break;
- }
- if (File2->Version == 0 || File->Version == 0)
- break;
- if (strcmp(File.Version(),File2.Version()) == 0)
- Seen = true;
- }
-
- if (Seen == true)
+ std::string const RS = PkgFileIteratorToRelString(File);
+ if (std::find(RelStrs.begin(), RelStrs.end(), RS) != RelStrs.end())
continue;
-
- if (First == false)
- Res += ", ";
- else
- First = false;
-
- if (File->Label != 0)
- Res = Res + File.Label() + ':';
- if (File->Archive != 0)
- {
- if (File->Version == 0)
- Res += File.Archive();
- else
- Res = Res + File.Version() + '/' + File.Archive();
- }
- else
- {
- // No release file, print the host name that this came from
- if (File->Site == 0 || File.Site()[0] == 0)
- Res += "localhost";
- else
- Res += File.Site();
- }
+ RelStrs.push_back(RS);
+ }
+ std::ostringstream os;
+ if (likely(RelStrs.empty() == false))
+ {
+ std::copy(RelStrs.begin(), RelStrs.end()-1, std::ostream_iterator<std::string>(os, ", "));
+ os << *RelStrs.rbegin();
}
if (S->ParentPkg != 0)
- Res.append(" [").append(Arch()).append("]");
- return Res;
+ os << " [" << Arch() << "]";
+ return os.str();
}
/*}}}*/
// VerIterator::MultiArchType - string representing MultiArch flag /*{{{*/
@@ -931,12 +929,12 @@ const char * pkgCache::VerIterator::MultiArchType() const
return "none";
}
/*}}}*/
-// PkgFileIterator::IsOk - Checks if the cache is in sync with the file /*{{{*/
+// RlsFileIterator::IsOk - Checks if the cache is in sync with the file /*{{{*/
// ---------------------------------------------------------------------
/* This stats the file and compares its stats with the ones that were
- stored during generation. Date checks should probably also be
+ stored during generation. Date checks should probably also be
included here. */
-bool pkgCache::PkgFileIterator::IsOk()
+bool pkgCache::RlsFileIterator::IsOk()
{
struct stat Buf;
if (stat(FileName(),&Buf) != 0)
@@ -948,10 +946,8 @@ bool pkgCache::PkgFileIterator::IsOk()
return true;
}
/*}}}*/
-// PkgFileIterator::RelStr - Return the release string /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string pkgCache::PkgFileIterator::RelStr()
+// RlsFileIterator::RelStr - Return the release string /*{{{*/
+string pkgCache::RlsFileIterator::RelStr()
{
string Res;
if (Version() != 0)
@@ -964,8 +960,40 @@ string pkgCache::PkgFileIterator::RelStr()
Res = Res + (Res.empty() == true?"n=":",n=") + Codename();
if (Label() != 0)
Res = Res + (Res.empty() == true?"l=":",l=") + Label();
- if (Component() != 0)
- Res = Res + (Res.empty() == true?"c=":",c=") + Component();
+ return Res;
+}
+ /*}}}*/
+// PkgFileIterator::IsOk - Checks if the cache is in sync with the file /*{{{*/
+// ---------------------------------------------------------------------
+/* This stats the file and compares its stats with the ones that were
+ stored during generation. Date checks should probably also be
+ included here. */
+bool pkgCache::PkgFileIterator::IsOk()
+{
+ struct stat Buf;
+ if (stat(FileName(),&Buf) != 0)
+ return false;
+
+ if (Buf.st_size != (signed)S->Size || Buf.st_mtime != S->mtime)
+ return false;
+
+ return true;
+}
+ /*}}}*/
+string pkgCache::PkgFileIterator::RelStr() /*{{{*/
+{
+ std::string Res;
+ if (ReleaseFile() == 0)
+ {
+ if (Component() != 0)
+ Res = Res + (Res.empty() == true?"a=":",a=") + Component();
+ }
+ else
+ {
+ Res = ReleaseFile().RelStr();
+ if (Component() != 0)
+ Res = Res + (Res.empty() == true?"c=":",c=") + Component();
+ }
if (Architecture() != 0)
Res = Res + (Res.empty() == true?"b=":",b=") + Architecture();
return Res;
@@ -1010,17 +1038,5 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const
}
/*}}}*/
-// PrvIterator::IsMultiArchImplicit - added by the cache generation /*{{{*/
-// ---------------------------------------------------------------------
-/* MultiArch can be translated to SingleArch for an resolver and we did so,
- by adding provides to help the resolver understand the problem, but
- sometimes it is needed to identify these to ignore them… */
-bool pkgCache::PrvIterator::IsMultiArchImplicit() const
-{
- pkgCache::PkgIterator const Owner = OwnerPkg();
- pkgCache::PkgIterator const Parent = ParentPkg();
- if (strcmp(Owner.Arch(), Parent.Arch()) != 0 || Owner.Group()->Name == Parent.Group()->Name)
- return true;
- return false;
-}
- /*}}}*/
+
+pkgCache::~pkgCache() {}
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 2ba23c5c0..801f8556d 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -85,45 +85,21 @@
using std::string;
#endif
-#if APT_PKG_ABI >= 413
+// size of (potentially big) files like debs or the install size of them
+typedef uint64_t map_filesize_t;
// storing file sizes of indexes, which are way below 4 GB for now
-typedef uint32_t map_filesize_t;
-typedef map_filesize_t should_be_map_filesize_t;
-#else
-typedef unsigned long map_filesize_t;
-typedef unsigned int should_be_map_filesize_t;
-#endif
-#if APT_PKG_ABI >= 413
+typedef uint32_t map_filesize_small_t;
// each package/group/dependency gets an id
typedef uint32_t map_id_t;
-typedef map_id_t should_be_map_id_t;
-#else
-typedef unsigned long map_id_t;
-typedef unsigned int should_be_map_id_t;
-#endif
-#if APT_PKG_ABI >= 413
// some files get an id, too, but in far less absolute numbers
typedef uint16_t map_fileid_t;
-typedef map_fileid_t should_be_map_fileid_t;
-#else
-typedef unsigned long map_fileid_t;
-typedef unsigned int should_be_map_fileid_t;
-#endif
-#if APT_PKG_ABI >= 413
// relative pointer from cache start
typedef uint32_t map_pointer_t;
-#else
-typedef unsigned int map_pointer_t;
-#endif
// same as the previous, but documented to be to a string item
typedef map_pointer_t map_stringitem_t;
-#if APT_PKG_ABI >= 413
-typedef uint64_t should_be_uint64_t;
-typedef uint64_t should_be_uint64_small_t;
-#else
-typedef unsigned long long should_be_uint64_t;
-typedef unsigned long should_be_uint64_small_t;
-#endif
+// we have only a small amount of flags for each item
+typedef uint8_t map_flags_t;
+typedef uint8_t map_number_t;
class pkgVersioningSystem;
class pkgCache /*{{{*/
@@ -133,11 +109,13 @@ class pkgCache /*{{{*/
struct Header;
struct Group;
struct Package;
+ struct ReleaseFile;
struct PackageFile;
struct Version;
struct Description;
struct Provides;
struct Dependency;
+ struct DependencyData;
struct StringItem;
struct VerFile;
struct DescFile;
@@ -150,6 +128,7 @@ class pkgCache /*{{{*/
class DescIterator;
class DepIterator;
class PrvIterator;
+ class RlsFileIterator;
class PkgFileIterator;
class VerFileIterator;
class DescFileIterator;
@@ -170,8 +149,12 @@ class pkgCache /*{{{*/
The lower 4 bits are used to indicate what operator is being specified and
the upper 4 bits are flags. OR indicates that the next package is
or'd with the current package. */
- enum DepCompareOp {Or=0x10,NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
- Greater=0x4,Equals=0x5,NotEquals=0x6};
+ enum DepCompareOp {NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
+ Greater=0x4,Equals=0x5,NotEquals=0x6,
+ Or=0x10, /*!< or'ed with the next dependency */
+ MultiArchImplicit=0x20, /*!< generated internally, not spelled out in the index */
+ ArchSpecific=0x40 /*!< was decorated with an explicit architecture in index */
+ };
};
struct State
@@ -190,7 +173,19 @@ class pkgCache /*{{{*/
struct Flag
{
enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)};
- enum PkgFFlags {NotSource=(1<<0),NotAutomatic=(1<<1),ButAutomaticUpgrades=(1<<2)};
+ enum PkgFFlags {
+ NotSource=(1<<0), /*!< packages can't be fetched from here, e.g. dpkg/status file */
+ LocalSource=(1<<1), /*!< local sources can't and will not be verified by hashes */
+ NoPackages=(1<<2), /*!< the file includes no package records itself, but additions like Translations */
+ };
+ enum ReleaseFileFlags {
+ NotAutomatic=(1<<0), /*!< archive has a default pin of 1 */
+ ButAutomaticUpgrades=(1<<1), /*!< (together with the previous) archive has a default pin of 100 */
+ };
+ enum ProvidesFlags {
+ MultiArchImplicit=pkgCache::Dep::MultiArchImplicit, /*!< generated internally, not spelled out in the index */
+ ArchSpecific=pkgCache::Dep::ArchSpecific /*!< was decorated with an explicit architecture in index */
+ };
};
protected:
@@ -210,11 +205,13 @@ class pkgCache /*{{{*/
Package *PkgP;
VerFile *VerFileP;
DescFile *DescFileP;
+ ReleaseFile *RlsFileP;
PackageFile *PkgFileP;
Version *VerP;
Description *DescP;
Provides *ProvideP;
Dependency *DepP;
+ DependencyData *DepDataP;
APT_DEPRECATED StringItem *StringItemP;
char *StrP;
@@ -228,7 +225,7 @@ class pkgCache /*{{{*/
inline map_id_t Hash(const char *S) const {return sHash(S);}
// Useful transformation things
- const char *Priority(unsigned char Priority);
+ static const char *Priority(unsigned char Priority);
// Accessors
GrpIterator FindGrp(const std::string &Name);
@@ -242,6 +239,8 @@ class pkgCache /*{{{*/
inline PkgIterator PkgEnd();
inline PkgFileIterator FileBegin();
inline PkgFileIterator FileEnd();
+ inline RlsFileIterator RlsFileBegin();
+ inline RlsFileIterator RlsFileEnd();
inline bool MultiArchCache() const { return MultiArchEnabled; }
inline char const * NativeArch();
@@ -253,11 +252,12 @@ class pkgCache /*{{{*/
static const char *CompTypeDeb(unsigned char Comp) APT_CONST;
static const char *CompType(unsigned char Comp) APT_CONST;
static const char *DepType(unsigned char Dep);
-
+
pkgCache(MMap *Map,bool DoMap = true);
- virtual ~pkgCache() {}
+ virtual ~pkgCache();
private:
+ void * const d;
bool MultiArchEnabled;
APT_HIDDEN PkgIterator SingleArchFindPkg(const std::string &Name);
};
@@ -270,10 +270,10 @@ struct pkgCache::Header
This must contain the hex value 0x98FE76DC which is designed to
verify that the system loading the image has the same byte order
and byte size as the system saving the image */
- unsigned long Signature;
+ uint32_t Signature;
/** These contain the version of the cache file */
- short MajorVersion;
- short MinorVersion;
+ map_number_t MajorVersion;
+ map_number_t MinorVersion;
/** \brief indicates if the cache should be erased
Dirty is true if the cache file was opened for reading, the client
@@ -288,16 +288,18 @@ struct pkgCache::Header
If any of the size values do not exactly match what the client expects
then the client should refuse the load the file. */
- unsigned short HeaderSz;
- unsigned short GroupSz;
- unsigned short PackageSz;
- unsigned short PackageFileSz;
- unsigned short VersionSz;
- unsigned short DescriptionSz;
- unsigned short DependencySz;
- unsigned short ProvidesSz;
- unsigned short VerFileSz;
- unsigned short DescFileSz;
+ uint16_t HeaderSz;
+ map_number_t GroupSz;
+ map_number_t PackageSz;
+ map_number_t ReleaseFileSz;
+ map_number_t PackageFileSz;
+ map_number_t VersionSz;
+ map_number_t DescriptionSz;
+ map_number_t DependencySz;
+ map_number_t DependencyDataSz;
+ map_number_t ProvidesSz;
+ map_number_t VerFileSz;
+ map_number_t DescFileSz;
/** \brief Structure counts
@@ -309,6 +311,8 @@ struct pkgCache::Header
map_id_t VersionCount;
map_id_t DescriptionCount;
map_id_t DependsCount;
+ map_id_t DependsDataCount;
+ map_fileid_t ReleaseFileCount;
map_fileid_t PackageFileCount;
map_fileid_t VerFileCount;
map_fileid_t DescFileCount;
@@ -319,17 +323,15 @@ struct pkgCache::Header
The PackageFile structures are singly linked lists that represent
all package files that have been merged into the cache. */
map_pointer_t FileList;
-#if APT_PKG_ABI < 413
- APT_DEPRECATED map_pointer_t StringList;
-#endif
+ /** \brief index of the first ReleaseFile structure */
+ map_pointer_t RlsFileList;
+
/** \brief String representing the version system used */
map_pointer_t VerSysName;
/** \brief native architecture the cache was built against */
map_pointer_t Architecture;
-#if APT_PKG_ABI >= 413
/** \brief all architectures the cache was built against */
map_pointer_t Architectures;
-#endif
/** \brief The maximum size of a raw entry from the original Package file */
map_filesize_t MaxVerFileSize;
/** \brief The maximum size of a raw entry from the original Translation file */
@@ -343,7 +345,7 @@ struct pkgCache::Header
the same number of pools as there are structure types. The generator
stores this information so future additions can make use of any unused pool
blocks. */
- DynamicMMap::Pool Pools[9];
+ DynamicMMap::Pool Pools[12];
/** \brief hash tables providing rapid group/package name lookup
@@ -355,26 +357,16 @@ struct pkgCache::Header
In the PkgHashTable is it possible that multiple packages have the same name -
these packages are stored as a sequence in the list.
The size of both tables is the same. */
-#if APT_PKG_ABI >= 413
- unsigned int HashTableSize;
- unsigned int GetHashTableSize() const { return HashTableSize; }
+ uint32_t HashTableSize;
+ uint32_t GetHashTableSize() const { return HashTableSize; }
void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
map_pointer_t GetArchitectures() const { return Architectures; }
void SetArchitectures(map_pointer_t const idx) { Architectures = idx; }
-#else
- // BEWARE: these tables are pretty much empty and just here for abi compat
- map_ptrloc PkgHashTable[2*1048];
- map_ptrloc GrpHashTable[2*1048];
- unsigned int GetHashTableSize() const { return PkgHashTable[0]; }
- void SetHashTableSize(unsigned int const sz) { PkgHashTable[0] = sz; }
- map_pointer_t GetArchitectures() const { return PkgHashTable[1]; }
- void SetArchitectures(map_pointer_t const idx) { PkgHashTable[1] = idx; }
-#endif
map_pointer_t * PkgHashTableP() const { return (map_pointer_t*) (this + 1); }
map_pointer_t * GrpHashTableP() const { return PkgHashTableP() + GetHashTableSize(); }
/** \brief Size of the complete cache file */
- should_be_uint64_small_t CacheFileSize;
+ map_filesize_small_t CacheFileSize;
bool CheckSizes(Header &Against) const APT_PURE;
Header();
@@ -400,7 +392,7 @@ struct pkgCache::Group
/** \brief Link to the next Group */
map_pointer_t Next; // Group
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
@@ -437,12 +429,6 @@ struct pkgCache::Package
map_pointer_t VersionList; // Version
/** \brief index to the installed version */
map_pointer_t CurrentVer; // Version
- /** \brief indicates nothing (consistently)
- This field used to contain ONE section the package belongs to,
- if those differs between versions it is a RANDOM one.
- The Section() method tries to reproduce it, but the only sane
- thing to do is use the Section field from the version! */
- APT_DEPRECATED map_ptrloc Section; // StringItem
/** \brief index of the group this package belongs to */
map_pointer_t Group; // Group the Package belongs to
@@ -456,15 +442,15 @@ struct pkgCache::Package
// Install/Remove/Purge etc
/** \brief state that the user wishes the package to be in */
- unsigned char SelectedState; // What
+ map_number_t SelectedState; // What
/** \brief installation state of the package
This should be "ok" but in case the installation failed
it will be different.
*/
- unsigned char InstState; // Flags
+ map_number_t InstState; // Flags
/** \brief indicates if the package is installed */
- unsigned char CurrentState; // State
+ map_number_t CurrentState; // State
/** \brief unique sequel ID
@@ -472,20 +458,19 @@ struct pkgCache::Package
This allows clients to create an array of size PackageCount and use it to store
state information for the package map. For instance the status file emitter uses
this to track which packages have been emitted already. */
- should_be_map_id_t ID;
+ map_id_t ID;
/** \brief some useful indicators of the package's state */
- unsigned long Flags;
+ map_flags_t Flags;
};
/*}}}*/
-// Package File structure /*{{{*/
-/** \brief stores information about the files used to generate the cache
+// Release File structure /*{{{*/
+/** \brief stores information about the release files used to generate the cache
- Package files are referenced by Version structures to be able to know
- after the generation still from which Packages file includes this Version
- as we need this information later on e.g. for pinning. */
-struct pkgCache::PackageFile
+ PackageFiles reference ReleaseFiles as we need to keep record of which
+ version belongs to which release e.g. for pinning. */
+struct pkgCache::ReleaseFile
{
- /** \brief physical disk file that this PackageFile represents */
+ /** \brief physical disk file that this ReleaseFile represents */
map_stringitem_t FileName;
/** \brief the release information
@@ -493,13 +478,47 @@ struct pkgCache::PackageFile
release information means. */
map_stringitem_t Archive;
map_stringitem_t Codename;
- map_stringitem_t Component;
map_stringitem_t Version;
map_stringitem_t Origin;
map_stringitem_t Label;
- map_stringitem_t Architecture;
/** \brief The site the index file was fetched from */
map_stringitem_t Site;
+
+ /** \brief Size of the file
+
+ Used together with the modification time as a
+ simple check to ensure that the Packages
+ file has not been altered since Cache generation. */
+ map_filesize_t Size;
+ /** \brief Modification time for the file */
+ time_t mtime;
+
+ /** @TODO document PackageFile::Flags */
+ map_flags_t Flags;
+
+ // Linked list
+ /** \brief Link to the next ReleaseFile in the Cache */
+ map_pointer_t NextFile;
+ /** \brief unique sequel ID */
+ map_fileid_t ID;
+};
+ /*}}}*/
+// Package File structure /*{{{*/
+/** \brief stores information about the files used to generate the cache
+
+ Package files are referenced by Version structures to be able to know
+ after the generation still from which Packages file includes this Version
+ as we need this information later on e.g. for pinning. */
+struct pkgCache::PackageFile
+{
+ /** \brief physical disk file that this PackageFile represents */
+ map_stringitem_t FileName;
+ /** \brief the release information */
+ map_pointer_t Release;
+
+ map_stringitem_t Component;
+ map_stringitem_t Architecture;
+
/** \brief indicates what sort of index file this is
@TODO enumerate at least the possible indexes */
@@ -514,13 +533,13 @@ struct pkgCache::PackageFile
time_t mtime;
/** @TODO document PackageFile::Flags */
- unsigned long Flags;
+ map_flags_t Flags;
// Linked list
/** \brief Link to the next PackageFile in the Cache */
map_pointer_t NextFile; // PackageFile
/** \brief unique sequel ID */
- should_be_map_fileid_t ID;
+ map_fileid_t ID;
};
/*}}}*/
// VerFile structure /*{{{*/
@@ -535,7 +554,7 @@ struct pkgCache::VerFile
/** \brief next step in the linked list */
map_pointer_t NextFile; // PkgVerFile
/** \brief position in the package file */
- should_be_map_filesize_t Offset; // File offset
+ map_filesize_t Offset; // File offset
/** @TODO document pkgCache::VerFile::Size */
map_filesize_t Size;
};
@@ -549,7 +568,7 @@ struct pkgCache::DescFile
/** \brief next step in the linked list */
map_pointer_t NextFile; // PkgVerFile
/** \brief position in the file */
- should_be_map_filesize_t Offset; // File offset
+ map_filesize_t Offset; // File offset
/** @TODO document pkgCache::DescFile::Size */
map_filesize_t Size;
};
@@ -566,28 +585,30 @@ struct pkgCache::Version
map_stringitem_t VerStr;
/** \brief section this version is filled in */
map_stringitem_t Section;
-#if APT_PKG_ABI >= 413
/** \brief source package name this version comes from
Always contains the name, even if it is the same as the binary name */
map_stringitem_t SourcePkgName;
/** \brief source version this version comes from
Always contains the version string, even if it is the same as the binary version */
map_stringitem_t SourceVerStr;
-#endif
/** \brief Multi-Arch capabilities of a package version */
- enum VerMultiArch { None = 0, /*!< is the default and doesn't trigger special behaviour */
+ enum VerMultiArch { No = 0, /*!< is the default and doesn't trigger special behaviour */
All = (1<<0), /*!< will cause that Ver.Arch() will report "all" */
Foreign = (1<<1), /*!< can satisfy dependencies in another architecture */
Same = (1<<2), /*!< can be co-installed with itself from other architectures */
Allowed = (1<<3), /*!< other packages are allowed to depend on thispkg:any */
AllForeign = All | Foreign,
AllAllowed = All | Allowed };
+
+ /** \brief deprecated variant of No */
+ static const APT_DEPRECATED VerMultiArch None = No;
+
/** \brief stores the MultiArch capabilities of this version
Flags used are defined in pkgCache::Version::VerMultiArch
*/
- unsigned char MultiArch;
+ map_number_t MultiArch;
/** \brief references all the PackageFile's that this version came from
@@ -612,18 +633,18 @@ struct pkgCache::Version
/** \brief archive size for this version
For Debian this is the size of the .deb file. */
- should_be_uint64_t Size; // These are the .deb size
+ map_filesize_t Size; // These are the .deb size
/** \brief uncompressed size for this version */
- should_be_uint64_t InstalledSize;
+ map_filesize_t InstalledSize;
/** \brief characteristic value representing this version
No two packages in existence should have the same VerStr
and Hash with different contents. */
unsigned short Hash;
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
/** \brief parsed priority value */
- unsigned char Priority;
+ map_number_t Priority;
};
/*}}}*/
// Description structure /*{{{*/
@@ -649,7 +670,7 @@ struct pkgCache::Description
map_pointer_t ParentPkg; // Package
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
// Dependency structure /*{{{*/
@@ -659,7 +680,7 @@ struct pkgCache::Description
The base of the linked list is pkgCache::Version::DependsList.
All forms of dependencies are recorded here including Depends,
Recommends, Suggests, Enhances, Conflicts, Replaces and Breaks. */
-struct pkgCache::Dependency
+struct pkgCache::DependencyData
{
/** \brief string of the version the dependency is applied against */
map_stringitem_t Version;
@@ -668,21 +689,28 @@ struct pkgCache::Dependency
The generator will - if the package does not already exist -
create a blank (no version records) package. */
map_pointer_t Package; // Package
- /** \brief next dependency of this version */
- map_pointer_t NextDepends; // Dependency
- /** \brief next reverse dependency of this package */
- map_pointer_t NextRevDepends; // Dependency
- /** \brief version of the package which has the reverse depends */
- map_pointer_t ParentVer; // Version
- /** \brief unique sequel ID */
- should_be_map_id_t ID;
/** \brief Dependency type - Depends, Recommends, Conflicts, etc */
- unsigned char Type;
+ map_number_t Type;
/** \brief comparison operator specified on the depends line
If the high bit is set then it is a logical OR with the previous record. */
- unsigned char CompareOp;
+ map_flags_t CompareOp;
+
+ map_pointer_t NextData;
+};
+struct pkgCache::Dependency
+{
+ map_pointer_t DependencyData; // DependencyData
+ /** \brief version of the package which has the depends */
+ map_pointer_t ParentVer; // Version
+ /** \brief next reverse dependency of this package */
+ map_pointer_t NextRevDepends; // Dependency
+ /** \brief next dependency of this version */
+ map_pointer_t NextDepends; // Dependency
+
+ /** \brief unique sequel ID */
+ map_id_t ID;
};
/*}}}*/
// Provides structure /*{{{*/
@@ -703,9 +731,9 @@ struct pkgCache::Provides
/** \brief version in the provides line (if any)
This version allows dependencies to depend on specific versions of a
- Provides, as well as allowing Provides to override existing packages.
- This is experimental. Note that Debian doesn't allow versioned provides */
+ Provides, as well as allowing Provides to override existing packages. */
map_stringitem_t ProvideVersion;
+ map_flags_t Flags;
/** \brief next provides (based of package) */
map_pointer_t NextProvides; // Provides
/** \brief next provides (based of version) */
@@ -739,6 +767,11 @@ inline pkgCache::PkgFileIterator pkgCache::FileBegin()
{return PkgFileIterator(*this,PkgFileP + HeaderP->FileList);}
inline pkgCache::PkgFileIterator pkgCache::FileEnd()
{return PkgFileIterator(*this,PkgFileP);}
+inline pkgCache::RlsFileIterator pkgCache::RlsFileBegin()
+ {return RlsFileIterator(*this,RlsFileP + HeaderP->RlsFileList);}
+inline pkgCache::RlsFileIterator pkgCache::RlsFileEnd()
+ {return RlsFileIterator(*this,RlsFileP);}
+
// Oh I wish for Real Name Space Support
class pkgCache::Namespace /*{{{*/
@@ -750,6 +783,7 @@ class pkgCache::Namespace /*{{{*/
typedef pkgCache::DescIterator DescIterator;
typedef pkgCache::DepIterator DepIterator;
typedef pkgCache::PrvIterator PrvIterator;
+ typedef pkgCache::RlsFileIterator RlsFileIterator;
typedef pkgCache::PkgFileIterator PkgFileIterator;
typedef pkgCache::VerFileIterator VerFileIterator;
typedef pkgCache::Version Version;
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index ba454f057..6daebbc2a 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -18,8 +18,6 @@
#include <apt-pkg/progress.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/metaindex.h>
@@ -36,11 +34,14 @@
#include <iostream>
#include <string>
#include <vector>
+#include <memory>
+#include <algorithm>
#include <sys/stat.h>
#include <unistd.h>
#include <apti18n.h>
- /*}}}*/
+
+template<class T> using Dynamic = pkgCacheGenerator::Dynamic<T>; /*}}}*/
typedef std::vector<pkgIndexFile *>::iterator FileIterator;
template <typename Iter> std::vector<Iter*> pkgCacheGenerator::Dynamic<Iter>::toReMap;
@@ -54,10 +55,8 @@ using std::string;
/* We set the dirty flag and make sure that is written to the disk */
pkgCacheGenerator::pkgCacheGenerator(DynamicMMap *pMap,OpProgress *Prog) :
Map(*pMap), Cache(pMap,false), Progress(Prog),
- FoundFileDeps(0)
+ CurrentRlsFile(NULL), CurrentFile(NULL), d(NULL)
{
- CurrentFile = 0;
-
if (_error->PendingError() == true)
return;
@@ -145,6 +144,7 @@ void pkgCacheGenerator::ReMap(void const * const oldMap, void const * const newM
Cache.ReMap(false);
CurrentFile += (pkgCache::PackageFile const * const) newMap - (pkgCache::PackageFile const * const) oldMap;
+ CurrentRlsFile += (pkgCache::ReleaseFile const * const) newMap - (pkgCache::ReleaseFile const * const) oldMap;
for (std::vector<pkgCache::GrpIterator*>::const_iterator i = Dynamic<pkgCache::GrpIterator>::toReMap.begin();
i != Dynamic<pkgCache::GrpIterator>::toReMap.end(); ++i)
@@ -167,6 +167,9 @@ void pkgCacheGenerator::ReMap(void const * const oldMap, void const * const newM
for (std::vector<pkgCache::PkgFileIterator*>::const_iterator i = Dynamic<pkgCache::PkgFileIterator>::toReMap.begin();
i != Dynamic<pkgCache::PkgFileIterator>::toReMap.end(); ++i)
(*i)->ReMap(oldMap, newMap);
+ for (std::vector<pkgCache::RlsFileIterator*>::const_iterator i = Dynamic<pkgCache::RlsFileIterator>::toReMap.begin();
+ i != Dynamic<pkgCache::RlsFileIterator>::toReMap.end(); ++i)
+ (*i)->ReMap(oldMap, newMap);
} /*}}}*/
// CacheGenerator::WriteStringInMap /*{{{*/
map_stringitem_t pkgCacheGenerator::WriteStringInMap(const char *String,
@@ -225,22 +228,6 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
continue;
}
- if (Arch.empty() == true)
- {
- // use the pseudo arch 'none' for arch-less packages
- Arch = "none";
- /* We might built a SingleArchCache here, which we don't want to blow up
- just for these :none packages to a proper MultiArchCache, so just ensure
- that we have always a native package structure first for SingleArch */
- pkgCache::PkgIterator NP;
- Dynamic<pkgCache::PkgIterator> DynPkg(NP);
- if (NewPackage(NP, PackageName, _config->Find("APT::Architecture")) == false)
- // TRANSLATOR: The first placeholder is a package name,
- // the other two should be copied verbatim as they include debug info
- return _error->Error(_("Error occurred while processing %s (%s%d)"),
- PackageName.c_str(), "NewPackage", 0);
- }
-
// Get a pointer to the package structure
pkgCache::PkgIterator Pkg;
Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
@@ -263,10 +250,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
}
if (OutVer != 0)
- {
- FoundFileDeps |= List.HasFileDeps();
return true;
- }
}
if (Cache.HeaderP->PackageCount >= std::numeric_limits<map_id_t>::max())
@@ -282,7 +266,6 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
return _error->Error(_("Wow, you exceeded the number of dependencies "
"this APT is capable of."));
- FoundFileDeps |= List.HasFileDeps();
return true;
}
// CacheGenerator::MergeListGroup /*{{{*/
@@ -440,40 +423,6 @@ bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator
return _error->Error(_("Error occurred while processing %s (%s%d)"),
Pkg.Name(), "AddImplicitDepends", 1);
}
- /* :none packages are packages without an architecture. They are forbidden by
- debian-policy, so usually they will only be in (old) dpkg status files -
- and dpkg will complain about them - and are pretty rare. We therefore do
- usually not create conflicts while the parent is created, but only if a :none
- package (= the target) appears. This creates incorrect dependencies on :none
- for architecture-specific dependencies on the package we copy from, but we
- will ignore this bug as architecture-specific dependencies are only allowed
- in jessie and until then the :none packages should be extinct (hopefully).
- In other words: This should work long enough to allow graceful removal of
- these packages, it is not supposed to allow users to keep using them … */
- if (strcmp(Pkg.Arch(), "none") == 0)
- {
- pkgCache::PkgIterator M = Grp.FindPreferredPkg();
- if (M.end() == false && Pkg != M)
- {
- pkgCache::DepIterator D = M.RevDependsList();
- Dynamic<pkgCache::DepIterator> DynD(D);
- for (; D.end() == false; ++D)
- {
- if ((D->Type != pkgCache::Dep::Conflicts &&
- D->Type != pkgCache::Dep::DpkgBreaks &&
- D->Type != pkgCache::Dep::Replaces) ||
- D.ParentPkg().Group() == Grp)
- continue;
-
- map_pointer_t *OldDepLast = NULL;
- pkgCache::VerIterator ConVersion = D.ParentVer();
- Dynamic<pkgCache::VerIterator> DynV(ConVersion);
- // duplicate the Conflicts/Breaks/Replaces for :none arch
- NewDepends(Pkg, ConVersion, D->Version,
- D->CompareOp, D->Type, OldDepLast);
- }
- }
- }
}
if (unlikely(AddImplicitDepends(Grp, Pkg, Ver) == false))
return _error->Error(_("Error occurred while processing %s (%s%d)"),
@@ -543,57 +492,6 @@ bool pkgCacheGenerator::AddNewDescription(ListParser &List, pkgCache::VerIterato
}
/*}}}*/
/*}}}*/
-// CacheGenerator::MergeFileProvides - Merge file provides /*{{{*/
-// ---------------------------------------------------------------------
-/* If we found any file depends while parsing the main list we need to
- resolve them. Since it is undesired to load the entire list of files
- into the cache as virtual packages we do a two stage effort. MergeList
- identifies the file depends and this creates Provdies for them by
- re-parsing all the indexs. */
-bool pkgCacheGenerator::MergeFileProvides(ListParser &List)
-{
- List.Owner = this;
-
- unsigned int Counter = 0;
- while (List.Step() == true)
- {
- string PackageName = List.Package();
- if (PackageName.empty() == true)
- return false;
- string Version = List.Version();
- if (Version.empty() == true)
- continue;
-
- pkgCache::PkgIterator Pkg = Cache.FindPkg(PackageName);
- Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
- if (Pkg.end() == true)
- return _error->Error(_("Error occurred while processing %s (%s%d)"),
- PackageName.c_str(), "FindPkg", 1);
- Counter++;
- if (Counter % 100 == 0 && Progress != 0)
- Progress->Progress(List.Offset());
-
- unsigned short Hash = List.VersionHash();
- pkgCache::VerIterator Ver = Pkg.VersionList();
- Dynamic<pkgCache::VerIterator> DynVer(Ver);
- for (; Ver.end() == false; ++Ver)
- {
- if (List.SameVersion(Hash, Ver) == true && Version == Ver.VerStr())
- {
- if (List.CollectFileProvides(Cache,Ver) == false)
- return _error->Error(_("Error occurred while processing %s (%s%d)"),
- PackageName.c_str(), "CollectFileProvides", 1);
- break;
- }
- }
-
- if (Ver.end() == true)
- _error->Warning(_("Package %s %s was not found while processing file dependencies"),PackageName.c_str(),Version.c_str());
- }
-
- return true;
-}
- /*}}}*/
// CacheGenerator::NewGroup - Add a new group /*{{{*/
// ---------------------------------------------------------------------
/* This creates a new group structure and adds it to the hash table */
@@ -646,6 +544,16 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name
return false;
Pkg = pkgCache::PkgIterator(Cache,Cache.PkgP + Package);
+ // Set the name, arch and the ID
+ APT_IGNORE_DEPRECATED(Pkg->Name = Grp->Name;)
+ Pkg->Group = Grp.Index();
+ // all is mapped to the native architecture
+ map_stringitem_t const idxArch = (Arch == "all") ? Cache.HeaderP->Architecture : StoreString(MIXED, Arch);
+ if (unlikely(idxArch == 0))
+ return false;
+ Pkg->Arch = idxArch;
+ Pkg->ID = Cache.HeaderP->PackageCount++;
+
// Insert the package into our package list
if (Grp->FirstPackage == 0) // the group is new
{
@@ -660,23 +568,53 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name
}
else // Group the Packages together
{
+ // but first get implicit provides done
+ if (APT::Configuration::checkArchitecture(Pkg.Arch()) == true)
+ {
+ pkgCache::PkgIterator const M = Grp.FindPreferredPkg(false); // native or any foreign pkg will do
+ if (M.end() == false)
+ for (pkgCache::PrvIterator Prv = M.ProvidesList(); Prv.end() == false; ++Prv)
+ {
+ if ((Prv->Flags & pkgCache::Flag::ArchSpecific) != 0)
+ continue;
+ pkgCache::VerIterator Ver = Prv.OwnerVer();
+ if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed ||
+ ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign &&
+ (Prv->Flags & pkgCache::Flag::MultiArchImplicit) == 0))
+ if (NewProvides(Ver, Pkg, Prv->ProvideVersion, Prv->Flags) == false)
+ return false;
+ }
+
+ for (pkgCache::PkgIterator P = Grp.PackageList(); P.end() == false; P = Grp.NextPkg(P))
+ for (pkgCache::VerIterator Ver = P.VersionList(); Ver.end() == false; ++Ver)
+ if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign)
+ if (NewProvides(Ver, Pkg, Ver->VerStr, pkgCache::Flag::MultiArchImplicit) == false)
+ return false;
+ }
+ // and negative dependencies, don't forget negative dependencies
+ {
+ pkgCache::PkgIterator const M = Grp.FindPreferredPkg(false);
+ if (M.end() == false)
+ for (pkgCache::DepIterator Dep = M.RevDependsList(); Dep.end() == false; ++Dep)
+ {
+ if ((Dep->CompareOp & (pkgCache::Dep::ArchSpecific | pkgCache::Dep::MultiArchImplicit)) != 0)
+ continue;
+ if (Dep->Type != pkgCache::Dep::DpkgBreaks && Dep->Type != pkgCache::Dep::Conflicts &&
+ Dep->Type != pkgCache::Dep::Replaces)
+ continue;
+ pkgCache::VerIterator Ver = Dep.ParentVer();
+ map_pointer_t * unused = NULL;
+ if (NewDepends(Pkg, Ver, Dep->Version, Dep->CompareOp, Dep->Type, unused) == false)
+ return false;
+ }
+ }
+
// this package is the new last package
pkgCache::PkgIterator LastPkg(Cache, Cache.PkgP + Grp->LastPackage);
Pkg->NextPackage = LastPkg->NextPackage;
LastPkg->NextPackage = Package;
}
Grp->LastPackage = Package;
-
- // Set the name, arch and the ID
- APT_IGNORE_DEPRECATED(Pkg->Name = Grp->Name;)
- Pkg->Group = Grp.Index();
- // all is mapped to the native architecture
- map_stringitem_t const idxArch = (Arch == "all") ? Cache.HeaderP->Architecture : StoreString(MIXED, Arch);
- if (unlikely(idxArch == 0))
- return false;
- Pkg->Arch = idxArch;
- Pkg->ID = Cache.HeaderP->PackageCount++;
-
return true;
}
/*}}}*/
@@ -707,16 +645,16 @@ bool pkgCacheGenerator::AddImplicitDepends(pkgCache::GrpIterator &G,
{
// Replaces: ${self}:other ( << ${binary:Version})
NewDepends(D, V, VerStrIdx,
- pkgCache::Dep::Less, pkgCache::Dep::Replaces,
+ pkgCache::Dep::Less | pkgCache::Dep::MultiArchImplicit, pkgCache::Dep::Replaces,
OldDepLast);
// Breaks: ${self}:other (!= ${binary:Version})
NewDepends(D, V, VerStrIdx,
- pkgCache::Dep::NotEquals, pkgCache::Dep::DpkgBreaks,
+ pkgCache::Dep::NotEquals | pkgCache::Dep::MultiArchImplicit, pkgCache::Dep::DpkgBreaks,
OldDepLast);
} else {
// Conflicts: ${self}:other
NewDepends(D, V, 0,
- pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts,
+ pkgCache::Dep::NoOp | pkgCache::Dep::MultiArchImplicit, pkgCache::Dep::Conflicts,
OldDepLast);
}
}
@@ -735,16 +673,16 @@ bool pkgCacheGenerator::AddImplicitDepends(pkgCache::VerIterator &V,
map_stringitem_t const VerStrIdx = V->VerStr;
// Replaces: ${self}:other ( << ${binary:Version})
NewDepends(D, V, VerStrIdx,
- pkgCache::Dep::Less, pkgCache::Dep::Replaces,
+ pkgCache::Dep::Less | pkgCache::Dep::MultiArchImplicit, pkgCache::Dep::Replaces,
OldDepLast);
// Breaks: ${self}:other (!= ${binary:Version})
NewDepends(D, V, VerStrIdx,
- pkgCache::Dep::NotEquals, pkgCache::Dep::DpkgBreaks,
+ pkgCache::Dep::NotEquals | pkgCache::Dep::MultiArchImplicit, pkgCache::Dep::DpkgBreaks,
OldDepLast);
} else {
// Conflicts: ${self}:other
NewDepends(D, V, 0,
- pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts,
+ pkgCache::Dep::NoOp | pkgCache::Dep::MultiArchImplicit, pkgCache::Dep::Conflicts,
OldDepLast);
}
return true;
@@ -910,36 +848,9 @@ map_pointer_t pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc,
version and to the package that it is pointing to. */
bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver,
- string const &Version,
- unsigned int const &Op,
- unsigned int const &Type,
- map_stringitem_t* &OldDepLast)
-{
- map_stringitem_t index = 0;
- if (Version.empty() == false)
- {
- int const CmpOp = Op & 0x0F;
- // =-deps are used (79:1) for lockstep on same-source packages (e.g. data-packages)
- if (CmpOp == pkgCache::Dep::Equals && strcmp(Version.c_str(), Ver.VerStr()) == 0)
- index = Ver->VerStr;
-
- if (index == 0)
- {
- void const * const oldMap = Map.Data();
- index = StoreString(VERSIONNUMBER, Version);
- if (unlikely(index == 0))
- return false;
- if (OldDepLast != 0 && oldMap != Map.Data())
- OldDepLast += (map_pointer_t const * const) Map.Data() - (map_pointer_t const * const) oldMap;
- }
- }
- return NewDepends(Pkg, Ver, index, Op, Type, OldDepLast);
-}
-bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg,
- pkgCache::VerIterator &Ver,
map_pointer_t const Version,
- unsigned int const &Op,
- unsigned int const &Type,
+ uint8_t const Op,
+ uint8_t const Type,
map_pointer_t* &OldDepLast)
{
void const * const oldMap = Map.Data();
@@ -948,19 +859,72 @@ bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg,
if (unlikely(Dependency == 0))
return false;
- // Fill it in
- pkgCache::DepIterator Dep(Cache,Cache.DepP + Dependency);
- Dynamic<pkgCache::DepIterator> DynDep(Dep);
- Dep->ParentVer = Ver.Index();
- Dep->Type = Type;
- Dep->CompareOp = Op;
- Dep->Version = Version;
- Dep->ID = Cache.HeaderP->DependsCount++;
+ bool isDuplicate = false;
+ map_pointer_t DependencyData = 0;
+ map_pointer_t PreviousData = 0;
+ if (Pkg->RevDepends != 0)
+ {
+ pkgCache::Dependency const * const L = Cache.DepP + Pkg->RevDepends;
+ DependencyData = L->DependencyData;
+ do {
+ pkgCache::DependencyData const * const D = Cache.DepDataP + DependencyData;
+ if (Version > D->Version)
+ break;
+ if (D->Version == Version && D->Type == Type && D->CompareOp == Op)
+ {
+ isDuplicate = true;
+ break;
+ }
+ PreviousData = DependencyData;
+ DependencyData = D->NextData;
+ } while (DependencyData != 0);
+ }
+
+ if (isDuplicate == false)
+ {
+ DependencyData = AllocateInMap(sizeof(pkgCache::DependencyData));
+ if (unlikely(DependencyData == 0))
+ return false;
+ }
+
+ pkgCache::Dependency * Link = Cache.DepP + Dependency;
+ Link->ParentVer = Ver.Index();
+ Link->DependencyData = DependencyData;
+ Link->ID = Cache.HeaderP->DependsCount++;
+
+ pkgCache::DepIterator Dep(Cache, Link);
+ if (isDuplicate == false)
+ {
+ Dep->Type = Type;
+ Dep->CompareOp = Op;
+ Dep->Version = Version;
+ Dep->Package = Pkg.Index();
+ ++Cache.HeaderP->DependsDataCount;
+ if (PreviousData != 0)
+ {
+ pkgCache::DependencyData * const D = Cache.DepDataP + PreviousData;
+ Dep->NextData = D->NextData;
+ D->NextData = DependencyData;
+ }
+ else if (Pkg->RevDepends != 0)
+ {
+ pkgCache::Dependency const * const D = Cache.DepP + Pkg->RevDepends;
+ Dep->NextData = D->DependencyData;
+ }
+ }
+
+ if (isDuplicate == true || PreviousData != 0)
+ {
+ pkgCache::Dependency * const L = Cache.DepP + Pkg->RevDepends;
+ Link->NextRevDepends = L->NextRevDepends;
+ L->NextRevDepends = Dependency;
+ }
+ else
+ {
+ Link->NextRevDepends = Pkg->RevDepends;
+ Pkg->RevDepends = Dependency;
+ }
- // Link it to the package
- Dep->Package = Pkg.Index();
- Dep->NextRevDepends = Pkg->RevDepends;
- Pkg->RevDepends = Dep.Index();
// Do we know where to link the Dependency to?
if (OldDepLast == NULL)
@@ -972,9 +936,8 @@ bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg,
OldDepLast += (map_pointer_t const * const) Map.Data() - (map_pointer_t const * const) oldMap;
Dep->NextDepends = *OldDepLast;
- *OldDepLast = Dep.Index();
+ *OldDepLast = Dependency;
OldDepLast = &Dep->NextDepends;
-
return true;
}
/*}}}*/
@@ -982,103 +945,208 @@ bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg,
// ---------------------------------------------------------------------
/* This creates a Group and the Package to link this dependency to if
needed and handles also the caching of the old endpoint */
-bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator &Ver,
+bool pkgCacheListParser::NewDepends(pkgCache::VerIterator &Ver,
const string &PackageName,
const string &Arch,
const string &Version,
- unsigned int Op,
- unsigned int Type)
+ uint8_t const Op,
+ uint8_t const Type)
{
pkgCache::GrpIterator Grp;
Dynamic<pkgCache::GrpIterator> DynGrp(Grp);
if (unlikely(Owner->NewGroup(Grp, PackageName) == false))
return false;
- // Locate the target package
- pkgCache::PkgIterator Pkg = Grp.FindPkg(Arch);
- // we don't create 'none' packages and their dependencies if we can avoid it …
- if (Pkg.end() == true && Arch == "none" && strcmp(Ver.ParentPkg().Arch(), "none") != 0)
- return true;
- Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
- if (Pkg.end() == true) {
- if (unlikely(Owner->NewPackage(Pkg, PackageName, Arch) == false))
- return false;
+ map_stringitem_t idxVersion = 0;
+ if (Version.empty() == false)
+ {
+ int const CmpOp = Op & 0x0F;
+ // =-deps are used (79:1) for lockstep on same-source packages (e.g. data-packages)
+ if (CmpOp == pkgCache::Dep::Equals && strcmp(Version.c_str(), Ver.VerStr()) == 0)
+ idxVersion = Ver->VerStr;
+
+ if (idxVersion == 0)
+ {
+ idxVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
+ if (unlikely(idxVersion == 0))
+ return false;
+ }
}
- // Is it a file dependency?
- if (unlikely(PackageName[0] == '/'))
- FoundFileDeps = true;
+ bool const isNegative = (Type == pkgCache::Dep::DpkgBreaks ||
+ Type == pkgCache::Dep::Conflicts ||
+ Type == pkgCache::Dep::Replaces);
- /* Caching the old end point speeds up generation substantially */
- if (OldDepVer != Ver) {
- OldDepLast = NULL;
- OldDepVer = Ver;
+ pkgCache::PkgIterator Pkg;
+ Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
+ if (isNegative == false || (Op & pkgCache::Dep::ArchSpecific) == pkgCache::Dep::ArchSpecific || Grp->FirstPackage == 0)
+ {
+ // Locate the target package
+ Pkg = Grp.FindPkg(Arch);
+ if (Pkg.end() == true) {
+ if (unlikely(Owner->NewPackage(Pkg, PackageName, Arch) == false))
+ return false;
+ }
+
+ /* Caching the old end point speeds up generation substantially */
+ if (OldDepVer != Ver) {
+ OldDepLast = NULL;
+ OldDepVer = Ver;
+ }
+
+ return Owner->NewDepends(Pkg, Ver, idxVersion, Op, Type, OldDepLast);
}
+ else
+ {
+ /* Caching the old end point speeds up generation substantially */
+ if (OldDepVer != Ver) {
+ OldDepLast = NULL;
+ OldDepVer = Ver;
+ }
- return Owner->NewDepends(Pkg, Ver, Version, Op, Type, OldDepLast);
+ for (Pkg = Grp.PackageList(); Pkg.end() == false; Pkg = Grp.NextPkg(Pkg))
+ {
+ if (Owner->NewDepends(Pkg, Ver, idxVersion, Op, Type, OldDepLast) == false)
+ return false;
+ }
+ }
+ return true;
}
/*}}}*/
// ListParser::NewProvides - Create a Provides element /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator &Ver,
- const string &PkgName,
+bool pkgCacheListParser::NewProvides(pkgCache::VerIterator &Ver,
+ const string &PkgName,
const string &PkgArch,
- const string &Version)
+ const string &Version,
+ uint8_t const Flags)
{
- pkgCache &Cache = Owner->Cache;
+ pkgCache const &Cache = Owner->Cache;
// We do not add self referencing provides
if (Ver.ParentPkg().Name() == PkgName && (PkgArch == Ver.ParentPkg().Arch() ||
(PkgArch == "all" && strcmp((Cache.StrP + Cache.HeaderP->Architecture), Ver.ParentPkg().Arch()) == 0)))
return true;
-
+
+ // Locate the target package
+ pkgCache::PkgIterator Pkg;
+ Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
+ if (unlikely(Owner->NewPackage(Pkg,PkgName, PkgArch) == false))
+ return false;
+
+ map_stringitem_t idxProvideVersion = 0;
+ if (Version.empty() == false) {
+ idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
+ if (unlikely(idxProvideVersion == 0))
+ return false;
+ }
+ return Owner->NewProvides(Ver, Pkg, idxProvideVersion, Flags);
+}
+bool pkgCacheGenerator::NewProvides(pkgCache::VerIterator &Ver,
+ pkgCache::PkgIterator &Pkg,
+ map_pointer_t const ProvideVersion,
+ uint8_t const Flags)
+{
// Get a structure
- map_pointer_t const Provides = Owner->AllocateInMap(sizeof(pkgCache::Provides));
+ map_pointer_t const Provides = AllocateInMap(sizeof(pkgCache::Provides));
if (unlikely(Provides == 0))
return false;
- Cache.HeaderP->ProvidesCount++;
-
+ ++Cache.HeaderP->ProvidesCount;
+
// Fill it in
pkgCache::PrvIterator Prv(Cache,Cache.ProvideP + Provides,Cache.PkgP);
- Dynamic<pkgCache::PrvIterator> DynPrv(Prv);
Prv->Version = Ver.Index();
+ Prv->ProvideVersion = ProvideVersion;
+ Prv->Flags = Flags;
Prv->NextPkgProv = Ver->ProvidesList;
Ver->ProvidesList = Prv.Index();
- if (Version.empty() == false) {
- map_stringitem_t const idxProvideVersion = WriteString(Version);
- Prv->ProvideVersion = idxProvideVersion;
- if (unlikely(idxProvideVersion == 0))
- return false;
- }
-
- // Locate the target package
- pkgCache::PkgIterator Pkg;
- Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
- if (unlikely(Owner->NewPackage(Pkg,PkgName, PkgArch) == false))
- return false;
-
+
// Link it to the package
Prv->ParentPkg = Pkg.Index();
Prv->NextProvides = Pkg->ProvidesList;
Pkg->ProvidesList = Prv.Index();
-
return true;
}
/*}}}*/
-bool pkgCacheGenerator::ListParser::SameVersion(unsigned short const Hash,/*{{{*/
+// ListParser::NewProvidesAllArch - add provides for all architectures /*{{{*/
+bool pkgCacheListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, string const &Package,
+ string const &Version, uint8_t const Flags) {
+ pkgCache &Cache = Owner->Cache;
+ pkgCache::GrpIterator const Grp = Cache.FindGrp(Package);
+ if (Grp.end() == true)
+ return NewProvides(Ver, Package, Cache.NativeArch(), Version, Flags);
+ else
+ {
+ map_stringitem_t idxProvideVersion = 0;
+ if (Version.empty() == false) {
+ idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
+ if (unlikely(idxProvideVersion == 0))
+ return false;
+ }
+
+ bool const isImplicit = (Flags & pkgCache::Flag::MultiArchImplicit) == pkgCache::Flag::MultiArchImplicit;
+ bool const isArchSpecific = (Flags & pkgCache::Flag::ArchSpecific) == pkgCache::Flag::ArchSpecific;
+ pkgCache::PkgIterator const OwnerPkg = Ver.ParentPkg();
+ for (pkgCache::PkgIterator Pkg = Grp.PackageList(); Pkg.end() == false; Pkg = Grp.NextPkg(Pkg))
+ {
+ if (isImplicit && OwnerPkg == Pkg)
+ continue;
+ if (isArchSpecific == false && APT::Configuration::checkArchitecture(OwnerPkg.Arch()) == false)
+ continue;
+ if (Owner->NewProvides(Ver, Pkg, idxProvideVersion, Flags) == false)
+ return false;
+ }
+ }
+ return true;
+}
+ /*}}}*/
+bool pkgCacheListParser::SameVersion(unsigned short const Hash, /*{{{*/
pkgCache::VerIterator const &Ver)
{
return Hash == Ver->Hash;
}
/*}}}*/
+// CacheGenerator::SelectReleaseFile - Select the current release file the indexes belong to /*{{{*/
+bool pkgCacheGenerator::SelectReleaseFile(const string &File,const string &Site,
+ unsigned long Flags)
+{
+ if (File.empty() && Site.empty())
+ {
+ CurrentRlsFile = NULL;
+ return true;
+ }
+
+ // Get some space for the structure
+ map_pointer_t const idxFile = AllocateInMap(sizeof(*CurrentRlsFile));
+ if (unlikely(idxFile == 0))
+ return false;
+ CurrentRlsFile = Cache.RlsFileP + idxFile;
+
+ // Fill it in
+ map_stringitem_t const idxFileName = WriteStringInMap(File);
+ map_stringitem_t const idxSite = StoreString(MIXED, Site);
+ if (unlikely(idxFileName == 0 || idxSite == 0))
+ return false;
+ CurrentRlsFile->FileName = idxFileName;
+ CurrentRlsFile->Site = idxSite;
+ CurrentRlsFile->NextFile = Cache.HeaderP->RlsFileList;
+ CurrentRlsFile->Flags = Flags;
+ CurrentRlsFile->ID = Cache.HeaderP->ReleaseFileCount;
+ RlsFileName = File;
+ Cache.HeaderP->RlsFileList = CurrentRlsFile - Cache.RlsFileP;
+ Cache.HeaderP->ReleaseFileCount++;
+
+ return true;
+}
+ /*}}}*/
// CacheGenerator::SelectFile - Select the current file being parsed /*{{{*/
// ---------------------------------------------------------------------
/* This is used to select which file is to be associated with all newly
added versions. The caller is responsible for setting the IMS fields. */
-bool pkgCacheGenerator::SelectFile(const string &File,const string &Site,
- const pkgIndexFile &Index,
- unsigned long Flags)
+bool pkgCacheGenerator::SelectFile(std::string const &File,
+ pkgIndexFile const &Index,
+ std::string const &Architecture,
+ std::string const &Component,
+ unsigned long const Flags)
{
// Get some space for the structure
map_pointer_t const idxFile = AllocateInMap(sizeof(*CurrentFile));
@@ -1088,18 +1156,33 @@ bool pkgCacheGenerator::SelectFile(const string &File,const string &Site,
// Fill it in
map_stringitem_t const idxFileName = WriteStringInMap(File);
- map_stringitem_t const idxSite = StoreString(MIXED, Site);
- if (unlikely(idxFileName == 0 || idxSite == 0))
+ if (unlikely(idxFileName == 0))
return false;
CurrentFile->FileName = idxFileName;
- CurrentFile->Site = idxSite;
CurrentFile->NextFile = Cache.HeaderP->FileList;
- CurrentFile->Flags = Flags;
CurrentFile->ID = Cache.HeaderP->PackageFileCount;
map_stringitem_t const idxIndexType = StoreString(MIXED, Index.GetType()->Label);
if (unlikely(idxIndexType == 0))
return false;
CurrentFile->IndexType = idxIndexType;
+ if (Architecture.empty())
+ CurrentFile->Architecture = 0;
+ else
+ {
+ map_stringitem_t const arch = StoreString(pkgCacheGenerator::MIXED, Architecture);
+ if (unlikely(arch == 0))
+ return false;
+ CurrentFile->Architecture = arch;
+ }
+ map_stringitem_t const component = StoreString(pkgCacheGenerator::MIXED, Component);
+ if (unlikely(component == 0))
+ return false;
+ CurrentFile->Component = component;
+ CurrentFile->Flags = Flags;
+ if (CurrentRlsFile != NULL)
+ CurrentFile->Release = CurrentRlsFile - Cache.RlsFileP;
+ else
+ CurrentFile->Release = 0;
PkgFileName = File;
Cache.HeaderP->FileList = CurrentFile - Cache.PkgFileP;
Cache.HeaderP->PackageFileCount++;
@@ -1141,10 +1224,10 @@ map_stringitem_t pkgCacheGenerator::StoreString(enum StringType const type, cons
/* This just verifies that each file in the list of index files exists,
has matching attributes with the cache and the cache does not have
any extra files. */
-static bool CheckValidity(const string &CacheFile,
+static bool CheckValidity(const string &CacheFile,
pkgSourceList &List,
- FileIterator Start,
- FileIterator End,
+ FileIterator const Start,
+ FileIterator const End,
MMap **OutMap = 0)
{
bool const Debug = _config->FindB("Debug::pkgCacheGen", false);
@@ -1152,7 +1235,7 @@ static bool CheckValidity(const string &CacheFile,
if (CacheFile.empty() == true || FileExists(CacheFile) == false)
{
if (Debug == true)
- std::clog << "CacheFile doesn't exist" << std::endl;
+ std::clog << "CacheFile " << CacheFile << " doesn't exist" << std::endl;
return false;
}
@@ -1165,44 +1248,66 @@ static bool CheckValidity(const string &CacheFile,
// Map it
FileFd CacheF(CacheFile,FileFd::ReadOnly);
- SPtr<MMap> Map = new MMap(CacheF,0);
- pkgCache Cache(Map);
+ std::unique_ptr<MMap> Map(new MMap(CacheF,0));
+ pkgCache Cache(Map.get());
if (_error->PendingError() == true || Map->Size() == 0)
{
if (Debug == true)
- std::clog << "Errors are pending or Map is empty()" << std::endl;
+ std::clog << "Errors are pending or Map is empty() for " << CacheFile << std::endl;
_error->Discard();
return false;
}
-
- /* Now we check every index file, see if it is in the cache,
- verify the IMS data and check that it is on the disk too.. */
- SPtrArray<bool> Visited = new bool[Cache.HeaderP->PackageFileCount];
- memset(Visited,0,sizeof(*Visited)*Cache.HeaderP->PackageFileCount);
- for (; Start != End; ++Start)
+
+ std::unique_ptr<bool[]> RlsVisited(new bool[Cache.HeaderP->ReleaseFileCount]);
+ memset(RlsVisited.get(),0,sizeof(RlsVisited[0])*Cache.HeaderP->ReleaseFileCount);
+ std::vector<pkgIndexFile *> Files;
+ for (pkgSourceList::const_iterator i = List.begin(); i != List.end(); ++i)
{
if (Debug == true)
- std::clog << "Checking PkgFile " << (*Start)->Describe() << ": ";
- if ((*Start)->HasPackages() == false)
+ std::clog << "Checking RlsFile " << (*i)->Describe() << ": ";
+ pkgCache::RlsFileIterator const RlsFile = (*i)->FindInCache(Cache, true);
+ if (RlsFile.end() == true)
{
- if (Debug == true)
- std::clog << "Has NO packages" << std::endl;
- continue;
+ if (Debug == true)
+ std::clog << "FindInCache returned end-Pointer" << std::endl;
+ return false;
}
-
- if ((*Start)->Exists() == false)
+
+ RlsVisited[RlsFile->ID] = true;
+ if (Debug == true)
+ std::clog << "with ID " << RlsFile->ID << " is valid" << std::endl;
+
+ std::vector <pkgIndexFile *> const * const Indexes = (*i)->GetIndexFiles();
+ std::copy_if(Indexes->begin(), Indexes->end(), std::back_inserter(Files),
+ [](pkgIndexFile const * const I) { return I->HasPackages(); });
+ }
+ for (unsigned I = 0; I != Cache.HeaderP->ReleaseFileCount; ++I)
+ if (RlsVisited[I] == false)
+ {
+ if (Debug == true)
+ std::clog << "RlsFile with ID" << I << " wasn't visited" << std::endl;
+ return false;
+ }
+
+ std::copy(Start, End, std::back_inserter(Files));
+
+ /* Now we check every index file, see if it is in the cache,
+ verify the IMS data and check that it is on the disk too.. */
+ std::unique_ptr<bool[]> Visited(new bool[Cache.HeaderP->PackageFileCount]);
+ memset(Visited.get(),0,sizeof(Visited[0])*Cache.HeaderP->PackageFileCount);
+ for (std::vector<pkgIndexFile *>::const_reverse_iterator PkgFile = Files.rbegin(); PkgFile != Files.rend(); ++PkgFile)
+ {
+ if (Debug == true)
+ std::clog << "Checking PkgFile " << (*PkgFile)->Describe() << ": ";
+ if ((*PkgFile)->Exists() == false)
{
-#if 0 // mvo: we no longer give a message here (Default Sources spec)
- _error->WarningE("stat",_("Couldn't stat source package list %s"),
- (*Start)->Describe().c_str());
-#endif
if (Debug == true)
std::clog << "file doesn't exist" << std::endl;
continue;
}
// FindInCache is also expected to do an IMS check.
- pkgCache::PkgFileIterator File = (*Start)->FindInCache(Cache);
+ pkgCache::PkgFileIterator File = (*PkgFile)->FindInCache(Cache);
if (File.end() == true)
{
if (Debug == true)
@@ -1214,15 +1319,15 @@ static bool CheckValidity(const string &CacheFile,
if (Debug == true)
std::clog << "with ID " << File->ID << " is valid" << std::endl;
}
-
+
for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++)
if (Visited[I] == false)
{
if (Debug == true)
- std::clog << "File with ID" << I << " wasn't visited" << std::endl;
+ std::clog << "PkgFile with ID" << I << " wasn't visited" << std::endl;
return false;
}
-
+
if (_error->PendingError() == true)
{
if (Debug == true)
@@ -1235,7 +1340,7 @@ static bool CheckValidity(const string &CacheFile,
}
if (OutMap != 0)
- *OutMap = Map.UnGuard();
+ *OutMap = Map.release();
return true;
}
/*}}}*/
@@ -1243,9 +1348,20 @@ static bool CheckValidity(const string &CacheFile,
// ---------------------------------------------------------------------
/* Size is kind of an abstract notion that is only used for the progress
meter */
-static map_filesize_t ComputeSize(FileIterator Start,FileIterator End)
+static map_filesize_t ComputeSize(pkgSourceList const * const List, FileIterator Start,FileIterator End)
{
map_filesize_t TotalSize = 0;
+ if (List != NULL)
+ {
+ for (pkgSourceList::const_iterator i = List->begin(); i != List->end(); ++i)
+ {
+ std::vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
+ for (std::vector<pkgIndexFile *>::const_iterator j = Indexes->begin(); j != Indexes->end(); ++j)
+ if ((*j)->HasPackages() == true)
+ TotalSize += (*j)->Size();
+ }
+ }
+
for (; Start < End; ++Start)
{
if ((*Start)->HasPackages() == false)
@@ -1256,60 +1372,80 @@ static map_filesize_t ComputeSize(FileIterator Start,FileIterator End)
}
/*}}}*/
// BuildCache - Merge the list of index files into the cache /*{{{*/
-// ---------------------------------------------------------------------
-/* */
static bool BuildCache(pkgCacheGenerator &Gen,
- OpProgress *Progress,
+ OpProgress * const Progress,
map_filesize_t &CurrentSize,map_filesize_t TotalSize,
- FileIterator Start, FileIterator End)
+ pkgSourceList const * const List,
+ FileIterator const Start, FileIterator const End)
{
- FileIterator I;
- for (I = Start; I != End; ++I)
- {
- if ((*I)->HasPackages() == false)
- continue;
-
- if ((*I)->Exists() == false)
- continue;
+ std::vector<pkgIndexFile *> Files;
+ bool mergeFailure = false;
+
+ auto const indexFileMerge = [&](pkgIndexFile * const I) {
+ if (I->HasPackages() == false || mergeFailure)
+ return;
- if ((*I)->FindInCache(Gen.GetCache()).end() == false)
+ if (I->Exists() == false)
+ return;
+
+ if (I->FindInCache(Gen.GetCache()).end() == false)
{
_error->Warning("Duplicate sources.list entry %s",
- (*I)->Describe().c_str());
- continue;
+ I->Describe().c_str());
+ return;
}
-
- map_filesize_t Size = (*I)->Size();
+
+ map_filesize_t const Size = I->Size();
if (Progress != NULL)
- Progress->OverallProgress(CurrentSize,TotalSize,Size,_("Reading package lists"));
+ Progress->OverallProgress(CurrentSize, TotalSize, Size, _("Reading package lists"));
CurrentSize += Size;
-
- if ((*I)->Merge(Gen,Progress) == false)
- return false;
- }
- if (Gen.HasFileDeps() == true)
+ if (I->Merge(Gen,Progress) == false)
+ mergeFailure = true;
+ };
+
+ if (List != NULL)
{
- if (Progress != NULL)
- Progress->Done();
- TotalSize = ComputeSize(Start, End);
- CurrentSize = 0;
- for (I = Start; I != End; ++I)
+ for (pkgSourceList::const_iterator i = List->begin(); i != List->end(); ++i)
{
- map_filesize_t Size = (*I)->Size();
- if (Progress != NULL)
- Progress->OverallProgress(CurrentSize,TotalSize,Size,_("Collecting File Provides"));
- CurrentSize += Size;
- if ((*I)->MergeFileProvides(Gen,Progress) == false)
+ if ((*i)->FindInCache(Gen.GetCache(), false).end() == false)
+ {
+ _error->Warning("Duplicate sources.list entry %s",
+ (*i)->Describe().c_str());
+ continue;
+ }
+
+ if ((*i)->Merge(Gen, Progress) == false)
+ return false;
+
+ std::vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
+ if (Indexes != NULL)
+ std::for_each(Indexes->begin(), Indexes->end(), indexFileMerge);
+ if (mergeFailure)
return false;
}
}
-
+
+ if (Start != End)
+ {
+ Gen.SelectReleaseFile("", "");
+ std::for_each(Start, End, indexFileMerge);
+ if (mergeFailure)
+ return false;
+ }
return true;
}
/*}}}*/
-// CacheGenerator::CreateDynamicMMap - load an mmap with configuration options /*{{{*/
-DynamicMMap* pkgCacheGenerator::CreateDynamicMMap(FileFd *CacheF, unsigned long Flags) {
+// CacheGenerator::MakeStatusCache - Construct the status cache /*{{{*/
+// ---------------------------------------------------------------------
+/* This makes sure that the status cache (the cache that has all
+ index files from the sources list and all local ones) is ready
+ to be mmaped. If OutMap is not zero then a MMap object representing
+ the cache will be stored there. This is pretty much mandetory if you
+ are using AllowMem. AllowMem lets the function be run as non-root
+ where it builds the cache 'fast' into a memory buffer. */
+static DynamicMMap* CreateDynamicMMap(FileFd * const CacheF, unsigned long Flags)
+{
map_filesize_t const MapStart = _config->FindI("APT::Cache-Start", 24*1024*1024);
map_filesize_t const MapGrow = _config->FindI("APT::Cache-Grow", 1*1024*1024);
map_filesize_t const MapLimit = _config->FindI("APT::Cache-Limit", 0);
@@ -1321,15 +1457,42 @@ DynamicMMap* pkgCacheGenerator::CreateDynamicMMap(FileFd *CacheF, unsigned long
else
return new DynamicMMap(Flags, MapStart, MapGrow, MapLimit);
}
- /*}}}*/
-// CacheGenerator::MakeStatusCache - Construct the status cache /*{{{*/
-// ---------------------------------------------------------------------
-/* This makes sure that the status cache (the cache that has all
- index files from the sources list and all local ones) is ready
- to be mmaped. If OutMap is not zero then a MMap object representing
- the cache will be stored there. This is pretty much mandetory if you
- are using AllowMem. AllowMem lets the function be run as non-root
- where it builds the cache 'fast' into a memory buffer. */
+static bool writeBackMMapToFile(pkgCacheGenerator * const Gen, DynamicMMap * const Map,
+ std::string const &FileName)
+{
+ FileFd SCacheF(FileName, FileFd::WriteAtomic);
+ if (_error->PendingError() == true)
+ return false;
+
+ fchmod(SCacheF.Fd(),0644);
+
+ // Write out the main data
+ if (SCacheF.Write(Map->Data(),Map->Size()) == false)
+ return _error->Error(_("IO Error saving source cache"));
+ SCacheF.Sync();
+
+ // Write out the proper header
+ Gen->GetCache().HeaderP->Dirty = false;
+ if (SCacheF.Seek(0) == false ||
+ SCacheF.Write(Map->Data(),sizeof(*Gen->GetCache().HeaderP)) == false)
+ return _error->Error(_("IO Error saving source cache"));
+ Gen->GetCache().HeaderP->Dirty = true;
+ SCacheF.Sync();
+ return true;
+}
+static bool loadBackMMapFromFile(std::unique_ptr<pkgCacheGenerator> &Gen,
+ std::unique_ptr<DynamicMMap> &Map, OpProgress * const Progress, std::string const &FileName)
+{
+ Map.reset(CreateDynamicMMap(NULL, 0));
+ FileFd CacheF(FileName, FileFd::ReadOnly);
+ map_pointer_t const alloc = Map->RawAllocate(CacheF.Size());
+ if ((alloc == 0 && _error->PendingError())
+ || CacheF.Read((unsigned char *)Map->Data() + alloc,
+ CacheF.Size()) == false)
+ return false;
+ Gen.reset(new pkgCacheGenerator(Map.get(),Progress));
+ return true;
+}
APT_DEPRECATED bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
MMap **OutMap, bool AllowMem)
{ return pkgCacheGenerator::MakeStatusCache(List, &Progress, OutMap, AllowMem); }
@@ -1339,18 +1502,6 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
bool const Debug = _config->FindB("Debug::pkgCacheGen", false);
std::vector<pkgIndexFile *> Files;
- for (std::vector<metaIndex *>::const_iterator i = List.begin();
- i != List.end();
- ++i)
- {
- std::vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
- for (std::vector<pkgIndexFile *>::const_iterator j = Indexes->begin();
- j != Indexes->end();
- ++j)
- Files.push_back (*j);
- }
-
- map_filesize_t const EndOfSource = Files.size();
if (_system->AddStatusFiles(Files) == false)
return false;
@@ -1371,160 +1522,130 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
CreateDirectory(dir, flNotFile(SrcCacheFile));
}
- // Decide if we can write to the cache
- bool Writeable = false;
- if (CacheFile.empty() == false)
- Writeable = access(flNotFile(CacheFile).c_str(),W_OK) == 0;
- else
- if (SrcCacheFile.empty() == false)
- Writeable = access(flNotFile(SrcCacheFile).c_str(),W_OK) == 0;
- if (Debug == true)
- std::clog << "Do we have write-access to the cache files? " << (Writeable ? "YES" : "NO") << std::endl;
-
- if (Writeable == false && AllowMem == false && CacheFile.empty() == false)
- return _error->Error(_("Unable to write to %s"),flNotFile(CacheFile).c_str());
-
if (Progress != NULL)
Progress->OverallProgress(0,1,1,_("Reading package lists"));
- // Cache is OK, Fin.
- if (CheckValidity(CacheFile, List, Files.begin(),Files.end(),OutMap) == true)
+ bool pkgcache_fine = false;
+ bool srcpkgcache_fine = false;
+ bool volatile_fine = List.GetVolatileFiles().empty();
+
+ if (CheckValidity(CacheFile, List, Files.begin(), Files.end(), volatile_fine ? OutMap : NULL) == true)
{
- if (Progress != NULL)
- Progress->OverallProgress(1,1,1,_("Reading package lists"));
if (Debug == true)
- std::clog << "pkgcache.bin is valid - no need to build anything" << std::endl;
- return true;
+ std::clog << "pkgcache.bin is valid - no need to build any cache" << std::endl;
+ pkgcache_fine = true;
+ srcpkgcache_fine = true;
}
- else if (Debug == true)
- std::clog << "pkgcache.bin is NOT valid" << std::endl;
-
- /* At this point we know we need to reconstruct the package cache,
- begin. */
- SPtr<FileFd> CacheF;
- SPtr<DynamicMMap> Map;
- if (Writeable == true && CacheFile.empty() == false)
+ if (pkgcache_fine == false)
{
- _error->PushToStack();
- unlink(CacheFile.c_str());
- CacheF = new FileFd(CacheFile,FileFd::WriteAtomic);
- fchmod(CacheF->Fd(),0644);
- Map = CreateDynamicMMap(CacheF, MMap::Public);
- if (_error->PendingError() == true)
+ if (CheckValidity(SrcCacheFile, List, Files.end(), Files.end()) == true)
{
- delete CacheF.UnGuard();
- delete Map.UnGuard();
if (Debug == true)
- std::clog << "Open filebased MMap FAILED" << std::endl;
- Writeable = false;
- if (AllowMem == false)
- {
- _error->MergeWithStack();
- return false;
- }
- _error->RevertToStack();
- }
- else
- {
- _error->MergeWithStack();
- if (Debug == true)
- std::clog << "Open filebased MMap" << std::endl;
+ std::clog << "srcpkgcache.bin is valid - it can be reused" << std::endl;
+ srcpkgcache_fine = true;
}
}
- if (Writeable == false || CacheFile.empty() == true)
+
+ if (volatile_fine == true && srcpkgcache_fine == true && pkgcache_fine == true)
{
- // Just build it in memory..
- Map = CreateDynamicMMap(NULL);
- if (Debug == true)
- std::clog << "Open memory Map (not filebased)" << std::endl;
+ if (Progress != NULL)
+ Progress->OverallProgress(1,1,1,_("Reading package lists"));
+ return true;
}
-
- // Lets try the source cache.
- map_filesize_t CurrentSize = 0;
- map_filesize_t TotalSize = 0;
- if (CheckValidity(SrcCacheFile, List, Files.begin(),
- Files.begin()+EndOfSource) == true)
+
+ bool Writeable = false;
+ if (srcpkgcache_fine == false || pkgcache_fine == false)
{
+ if (CacheFile.empty() == false)
+ Writeable = access(flNotFile(CacheFile).c_str(),W_OK) == 0;
+ else if (SrcCacheFile.empty() == false)
+ Writeable = access(flNotFile(SrcCacheFile).c_str(),W_OK) == 0;
+
if (Debug == true)
- std::clog << "srcpkgcache.bin is valid - populate MMap with it." << std::endl;
- // Preload the map with the source cache
- FileFd SCacheF(SrcCacheFile,FileFd::ReadOnly);
- map_pointer_t const alloc = Map->RawAllocate(SCacheF.Size());
- if ((alloc == 0 && _error->PendingError())
- || SCacheF.Read((unsigned char *)Map->Data() + alloc,
- SCacheF.Size()) == false)
- return false;
+ std::clog << "Do we have write-access to the cache files? " << (Writeable ? "YES" : "NO") << std::endl;
- TotalSize = ComputeSize(Files.begin()+EndOfSource,Files.end());
+ if (Writeable == false && AllowMem == false)
+ {
+ if (CacheFile.empty() == false)
+ return _error->Error(_("Unable to write to %s"),flNotFile(CacheFile).c_str());
+ else if (SrcCacheFile.empty() == false)
+ return _error->Error(_("Unable to write to %s"),flNotFile(SrcCacheFile).c_str());
+ else
+ return _error->Error("Unable to create caches as file usage is disabled, but memory not allowed either!");
+ }
+ }
- // Build the status cache
- pkgCacheGenerator Gen(Map.Get(),Progress);
- if (_error->PendingError() == true)
- return false;
- if (BuildCache(Gen,Progress,CurrentSize,TotalSize,
- Files.begin()+EndOfSource,Files.end()) == false)
+ // At this point we know we need to construct something, so get storage ready
+ std::unique_ptr<DynamicMMap> Map(CreateDynamicMMap(NULL, 0));
+ if (Debug == true)
+ std::clog << "Open memory Map (not filebased)" << std::endl;
+
+ std::unique_ptr<pkgCacheGenerator> Gen{nullptr};
+ map_filesize_t CurrentSize = 0;
+ std::vector<pkgIndexFile*> VolatileFiles = List.GetVolatileFiles();
+ map_filesize_t TotalSize = ComputeSize(NULL, VolatileFiles.begin(), VolatileFiles.end());
+ if (srcpkgcache_fine == true && pkgcache_fine == false)
+ {
+ if (Debug == true)
+ std::clog << "srcpkgcache.bin was valid - populate MMap with it" << std::endl;
+ if (loadBackMMapFromFile(Gen, Map, Progress, SrcCacheFile) == false)
return false;
+ srcpkgcache_fine = true;
+ TotalSize += ComputeSize(NULL, Files.begin(), Files.end());
}
- else
+ else if (srcpkgcache_fine == false)
{
if (Debug == true)
std::clog << "srcpkgcache.bin is NOT valid - rebuild" << std::endl;
- TotalSize = ComputeSize(Files.begin(),Files.end());
-
- // Build the source cache
- pkgCacheGenerator Gen(Map.Get(),Progress);
- if (_error->PendingError() == true)
- return false;
- if (BuildCache(Gen,Progress,CurrentSize,TotalSize,
- Files.begin(),Files.begin()+EndOfSource) == false)
+ Gen.reset(new pkgCacheGenerator(Map.get(),Progress));
+
+ TotalSize += ComputeSize(&List, Files.begin(),Files.end());
+ if (BuildCache(*Gen, Progress, CurrentSize, TotalSize, &List,
+ Files.end(),Files.end()) == false)
return false;
-
- // Write it back
+
if (Writeable == true && SrcCacheFile.empty() == false)
- {
- FileFd SCacheF(SrcCacheFile,FileFd::WriteAtomic);
- if (_error->PendingError() == true)
+ if (writeBackMMapToFile(Gen.get(), Map.get(), SrcCacheFile) == false)
return false;
-
- fchmod(SCacheF.Fd(),0644);
-
- // Write out the main data
- if (SCacheF.Write(Map->Data(),Map->Size()) == false)
- return _error->Error(_("IO Error saving source cache"));
- SCacheF.Sync();
-
- // Write out the proper header
- Gen.GetCache().HeaderP->Dirty = false;
- if (SCacheF.Seek(0) == false ||
- SCacheF.Write(Map->Data(),sizeof(*Gen.GetCache().HeaderP)) == false)
- return _error->Error(_("IO Error saving source cache"));
- Gen.GetCache().HeaderP->Dirty = true;
- SCacheF.Sync();
- }
-
- // Build the status cache
- if (BuildCache(Gen,Progress,CurrentSize,TotalSize,
- Files.begin()+EndOfSource,Files.end()) == false)
+ }
+
+ if (pkgcache_fine == false)
+ {
+ if (Debug == true)
+ std::clog << "Building status cache in pkgcache.bin now" << std::endl;
+ if (BuildCache(*Gen, Progress, CurrentSize, TotalSize, NULL,
+ Files.begin(), Files.end()) == false)
return false;
+
+ if (Writeable == true && CacheFile.empty() == false)
+ if (writeBackMMapToFile(Gen.get(), Map.get(), CacheFile) == false)
+ return false;
}
+
if (Debug == true)
- std::clog << "Caches are ready for shipping" << std::endl;
+ std::clog << "Caches done. Now bring in the volatile files (if any)" << std::endl;
- if (_error->PendingError() == true)
- return false;
- if (OutMap != 0)
+ if (volatile_fine == false)
{
- if (CacheF != 0)
+ if (Gen == nullptr)
{
- delete Map.UnGuard();
- *OutMap = new MMap(*CacheF,0);
+ if (Debug == true)
+ std::clog << "Populate new MMap with cachefile contents" << std::endl;
+ if (loadBackMMapFromFile(Gen, Map, Progress, CacheFile) == false)
+ return false;
}
- else
- {
- *OutMap = Map.UnGuard();
- }
+
+ Files = List.GetVolatileFiles();
+ if (BuildCache(*Gen, Progress, CurrentSize, TotalSize, NULL,
+ Files.begin(), Files.end()) == false)
+ return false;
}
-
+
+ if (OutMap != nullptr)
+ *OutMap = Map.release();
+
+ if (Debug == true)
+ std::clog << "Everything is ready for shipping" << std::endl;
return true;
}
/*}}}*/
@@ -1536,29 +1657,28 @@ APT_DEPRECATED bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **Ou
bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
{
std::vector<pkgIndexFile *> Files;
- map_filesize_t EndOfSource = Files.size();
if (_system->AddStatusFiles(Files) == false)
return false;
- SPtr<DynamicMMap> Map = CreateDynamicMMap(NULL);
+ std::unique_ptr<DynamicMMap> Map(CreateDynamicMMap(NULL, 0));
map_filesize_t CurrentSize = 0;
map_filesize_t TotalSize = 0;
- TotalSize = ComputeSize(Files.begin()+EndOfSource,Files.end());
+ TotalSize = ComputeSize(NULL, Files.begin(), Files.end());
// Build the status cache
if (Progress != NULL)
Progress->OverallProgress(0,1,1,_("Reading package lists"));
- pkgCacheGenerator Gen(Map.Get(),Progress);
+ pkgCacheGenerator Gen(Map.get(),Progress);
if (_error->PendingError() == true)
return false;
- if (BuildCache(Gen,Progress,CurrentSize,TotalSize,
- Files.begin()+EndOfSource,Files.end()) == false)
+ if (BuildCache(Gen,Progress,CurrentSize,TotalSize, NULL,
+ Files.begin(), Files.end()) == false)
return false;
if (_error->PendingError() == true)
return false;
- *OutMap = Map.UnGuard();
+ *OutMap = Map.release();
return true;
}
@@ -1576,9 +1696,6 @@ static bool IsDuplicateDescription(pkgCache::DescIterator Desc,
return false;
}
/*}}}*/
-// CacheGenerator::FinishCache /*{{{*/
-bool pkgCacheGenerator::FinishCache(OpProgress * /*Progress*/)
-{
- return true;
-}
- /*}}}*/
+
+pkgCacheListParser::pkgCacheListParser() : Owner(NULL), OldDepLast(NULL), d(NULL) {}
+pkgCacheListParser::~pkgCacheListParser() {}
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index c4ace713d..46fccdaa5 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.h,v 1.19 2002/07/08 03:13:30 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -33,10 +32,10 @@ class FileFd;
class pkgSourceList;
class OpProgress;
class pkgIndexFile;
+class pkgCacheListParser;
class APT_HIDDEN pkgCacheGenerator /*{{{*/
{
- private:
APT_HIDDEN map_stringitem_t WriteStringInMap(std::string const &String) { return WriteStringInMap(String.c_str()); };
APT_HIDDEN map_stringitem_t WriteStringInMap(const char *String);
APT_HIDDEN map_stringitem_t WriteStringInMap(const char *String, const unsigned long &Len);
@@ -47,15 +46,15 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
std::map<std::string,map_stringitem_t> strPkgNames;
std::map<std::string,map_stringitem_t> strVersions;
+ friend class pkgCacheListParser;
+ typedef pkgCacheListParser ListParser;
+
public:
-
- class ListParser;
- friend class ListParser;
template<typename Iter> class Dynamic {
public:
static std::vector<Iter*> toReMap;
- Dynamic(Iter &I) {
+ explicit Dynamic(Iter &I) {
toReMap.push_back(&I);
}
@@ -69,29 +68,27 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
DynamicMMap &Map;
pkgCache Cache;
OpProgress *Progress;
-
+
+ std::string RlsFileName;
+ pkgCache::ReleaseFile *CurrentRlsFile;
std::string PkgFileName;
pkgCache::PackageFile *CurrentFile;
- // Flag file dependencies
- bool FoundFileDeps;
-
bool NewGroup(pkgCache::GrpIterator &Grp,const std::string &Name);
bool NewPackage(pkgCache::PkgIterator &Pkg,const std::string &Name, const std::string &Arch);
bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List);
bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List);
bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver,
- std::string const &Version, unsigned int const &Op,
- unsigned int const &Type, map_pointer_t* &OldDepLast);
- bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver,
- map_pointer_t const Version, unsigned int const &Op,
- unsigned int const &Type, map_pointer_t* &OldDepLast);
+ map_pointer_t const Version, uint8_t const Op,
+ uint8_t const Type, map_pointer_t* &OldDepLast);
map_pointer_t NewVersion(pkgCache::VerIterator &Ver,const std::string &VerStr,map_pointer_t const Next) APT_DEPRECATED
{ return NewVersion(Ver, VerStr, 0, 0, Next); }
map_pointer_t NewVersion(pkgCache::VerIterator &Ver,const std::string &VerStr,
map_pointer_t const ParentPkg, unsigned short const Hash,
map_pointer_t const Next);
map_pointer_t NewDescription(pkgCache::DescIterator &Desc,const std::string &Lang,const MD5SumValue &md5sum,map_stringitem_t const idxmd5str);
+ bool NewProvides(pkgCache::VerIterator &Ver, pkgCache::PkgIterator &Pkg,
+ map_stringitem_t const ProvidesVersion, uint8_t const Flags);
public:
@@ -100,28 +97,26 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
inline map_stringitem_t StoreString(enum StringType const type, const std::string &S) {return StoreString(type, S.c_str(),S.length());};
void DropProgress() {Progress = 0;};
- bool SelectFile(const std::string &File,const std::string &Site,pkgIndexFile const &Index,
- unsigned long Flags = 0);
+ bool SelectFile(const std::string &File,pkgIndexFile const &Index, std::string const &Architecture, std::string const &Component, unsigned long Flags = 0);
+ bool SelectReleaseFile(const std::string &File, const std::string &Site, unsigned long Flags = 0);
bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0);
inline pkgCache &GetCache() {return Cache;};
- inline pkgCache::PkgFileIterator GetCurFile()
+ inline pkgCache::PkgFileIterator GetCurFile()
{return pkgCache::PkgFileIterator(Cache,CurrentFile);};
-
- bool HasFileDeps() {return FoundFileDeps;};
- bool MergeFileProvides(ListParser &List);
- bool FinishCache(OpProgress *Progress) APT_DEPRECATED APT_CONST;
+ inline pkgCache::RlsFileIterator GetCurRlsFile()
+ {return pkgCache::RlsFileIterator(Cache,CurrentRlsFile);};
APT_PUBLIC static bool MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
MMap **OutMap = 0,bool AllowMem = false);
APT_PUBLIC static bool MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap);
- APT_PUBLIC static DynamicMMap* CreateDynamicMMap(FileFd *CacheF, unsigned long Flags = 0);
void ReMap(void const * const oldMap, void const * const newMap);
pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress);
- ~pkgCacheGenerator();
+ virtual ~pkgCacheGenerator();
private:
+ void * const d;
APT_HIDDEN bool MergeListGroup(ListParser &List, std::string const &GrpName);
APT_HIDDEN bool MergeListPackage(ListParser &List, pkgCache::PkgIterator &Pkg);
APT_HIDDEN bool MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg,
@@ -136,18 +131,17 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
};
/*}}}*/
// This is the abstract package list parser class. /*{{{*/
-class APT_HIDDEN pkgCacheGenerator::ListParser
+class APT_HIDDEN pkgCacheListParser
{
pkgCacheGenerator *Owner;
friend class pkgCacheGenerator;
-
+
// Some cache items
pkgCache::VerIterator OldDepVer;
map_pointer_t *OldDepLast;
- // Flag file dependencies
- bool FoundFileDeps;
-
+ void * const d;
+
protected:
inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, std::string const &S) {return Owner->StoreString(type, S);};
@@ -156,10 +150,13 @@ class APT_HIDDEN pkgCacheGenerator::ListParser
inline map_stringitem_t WriteString(const std::string &S) {return Owner->WriteStringInMap(S);};
inline map_stringitem_t WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
bool NewDepends(pkgCache::VerIterator &Ver,const std::string &Package, const std::string &Arch,
- const std::string &Version,unsigned int Op,
- unsigned int Type);
+ const std::string &Version,uint8_t const Op,
+ uint8_t const Type);
bool NewProvides(pkgCache::VerIterator &Ver,const std::string &PkgName,
- const std::string &PkgArch, const std::string &Version);
+ const std::string &PkgArch, const std::string &Version,
+ uint8_t const Flags);
+ bool NewProvidesAllArch(pkgCache::VerIterator &Ver, std::string const &Package,
+ std::string const &Version, uint8_t const Flags);
public:
@@ -178,10 +175,7 @@ class APT_HIDDEN pkgCacheGenerator::ListParser
* \param Hash of the currently parsed version
* \param Ver to compare with
*/
-#if APT_PKG_ABI >= 413
- virtual
-#endif
- APT_PURE bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
+ virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver) = 0;
virtual map_filesize_t Offset() = 0;
@@ -189,12 +183,11 @@ class APT_HIDDEN pkgCacheGenerator::ListParser
virtual bool Step() = 0;
- inline bool HasFileDeps() {return FoundFileDeps;};
virtual bool CollectFileProvides(pkgCache &/*Cache*/,
pkgCache::VerIterator &/*Ver*/) {return true;};
- ListParser() : Owner(NULL), OldDepLast(NULL), FoundFileDeps(false) {};
- virtual ~ListParser() {};
+ pkgCacheListParser();
+ virtual ~pkgCacheListParser();
};
/*}}}*/
diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc
index 859af3a09..ef4c17cd2 100644
--- a/apt-pkg/pkgrecords.cc
+++ b/apt-pkg/pkgrecords.cc
@@ -76,3 +76,6 @@ pkgRecords::Parser &pkgRecords::Lookup(pkgCache::DescFileIterator const &Desc)
return *Files[Desc.File()->ID];
}
/*}}}*/
+
+pkgRecords::Parser::Parser() : d(NULL) {}
+pkgRecords::Parser::~Parser() {}
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index bcc05baba..0ed731f1f 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -31,7 +31,7 @@ class pkgRecords /*{{{*/
private:
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
pkgCache &Cache;
std::vector<Parser *>Files;
@@ -42,8 +42,8 @@ class pkgRecords /*{{{*/
Parser &Lookup(pkgCache::DescFileIterator const &Desc);
// Construct destruct
- pkgRecords(pkgCache &Cache);
- ~pkgRecords();
+ explicit pkgRecords(pkgCache &Cache);
+ virtual ~pkgRecords();
};
/*}}}*/
class pkgRecords::Parser /*{{{*/
@@ -68,17 +68,10 @@ class pkgRecords::Parser /*{{{*/
* choose the hash to be used.
*/
virtual HashStringList Hashes() const { return HashStringList(); };
-#if APT_PKG_ABI >= 413
APT_DEPRECATED std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); };
APT_DEPRECATED std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); };
APT_DEPRECATED std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); };
APT_DEPRECATED std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); };
-#else
- APT_DEPRECATED std::string MD5Hash() { return GetHashFromHashes("MD5Sum"); };
- APT_DEPRECATED std::string SHA1Hash() { return GetHashFromHashes("SHA1"); };
- APT_DEPRECATED std::string SHA256Hash() { return GetHashFromHashes("SHA256"); };
- APT_DEPRECATED std::string SHA512Hash() { return GetHashFromHashes("SHA512"); };
-#endif
// These are some general stats about the package
virtual std::string Maintainer() {return std::string();};
@@ -106,10 +99,12 @@ class pkgRecords::Parser /*{{{*/
// The record in binary form
virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};
-
- virtual ~Parser() {};
+
+ Parser();
+ virtual ~Parser();
private:
+ void * const d;
APT_HIDDEN std::string GetHashFromHashes(char const * const type) const
{
HashStringList const hashes = Hashes();
diff --git a/apt-pkg/pkgsystem.cc b/apt-pkg/pkgsystem.cc
index 14d090c7a..a6b61e655 100644
--- a/apt-pkg/pkgsystem.cc
+++ b/apt-pkg/pkgsystem.cc
@@ -27,7 +27,8 @@ unsigned long pkgSystem::GlobalListLen = 0;
// System::pkgSystem - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Add it to the global list.. */
-pkgSystem::pkgSystem() : Label(NULL), VS(NULL)
+pkgSystem::pkgSystem(char const * const label, pkgVersioningSystem * const vs) :
+ Label(label), VS(vs), d(NULL)
{
assert(GlobalListLen < sizeof(SysList)/sizeof(*SysList));
SysList[GlobalListLen] = this;
@@ -45,3 +46,5 @@ APT_PURE pkgSystem *pkgSystem::GetSystem(const char *Label)
return 0;
}
/*}}}*/
+
+pkgSystem::~pkgSystem() {}
diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h
index f88ffa7c8..5b31457e0 100644
--- a/apt-pkg/pkgsystem.h
+++ b/apt-pkg/pkgsystem.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgsystem.h,v 1.6 2002/11/11 06:55:50 doogie Exp $
/* ######################################################################
System - Abstraction for running on different systems.
@@ -53,7 +52,7 @@ class Configuration;
class pkgIndexFile;
class pkgSystem
-{
+{
public:
// Global list of supported systems
@@ -61,8 +60,8 @@ class pkgSystem
static unsigned long GlobalListLen;
static pkgSystem *GetSystem(const char *Label);
- const char *Label;
- pkgVersioningSystem *VS;
+ const char * const Label;
+ pkgVersioningSystem * const VS;
/* Prevent other programs from touching shared data not covered by
other locks (cache or state locks) */
@@ -82,7 +81,8 @@ class pkgSystem
virtual bool ArchiveSupported(const char *Type) = 0;
// Return a list of system index files..
- virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) = 0;
+ virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) = 0;
+
virtual bool FindIndex(pkgCache::PkgFileIterator File,
pkgIndexFile *&Found) const = 0;
@@ -91,9 +91,11 @@ class pkgSystem
virtual signed Score(Configuration const &/*Cnf*/) {
return 0;
};
-
- pkgSystem();
- virtual ~pkgSystem() {};
+
+ pkgSystem(char const * const Label, pkgVersioningSystem * const VS);
+ virtual ~pkgSystem();
+ private:
+ void * const d;
};
// The environment we are operating in.
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 00693ce54..91ad1d5bf 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -22,10 +22,10 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/versionmatch.h>
+#include <apt-pkg/version.h>
#include <ctype.h>
#include <stddef.h>
@@ -44,15 +44,19 @@ using namespace std;
// ---------------------------------------------------------------------
/* Set the defaults for operation. The default mode with no loaded policy
file matches the V0 policy engine. */
-pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner)
+pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(nullptr), VerPins(nullptr),
+ PFPriority(nullptr), Cache(Owner), d(NULL)
{
if (Owner == 0)
return;
PFPriority = new signed short[Owner->Head().PackageFileCount];
Pins = new Pin[Owner->Head().PackageCount];
+ VerPins = new Pin[Owner->Head().VersionCount];
for (unsigned long I = 0; I != Owner->Head().PackageCount; I++)
Pins[I].Type = pkgVersionMatch::None;
+ for (unsigned long I = 0; I != Owner->Head().VersionCount; I++)
+ VerPins[I].Type = pkgVersionMatch::None;
// The config file has a master override.
string DefRel = _config->Find("APT::Default-Release");
@@ -63,9 +67,9 @@ pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner)
pkgVersionMatch vm("", pkgVersionMatch::None);
for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); ++F)
{
- if ((F->Archive != 0 && vm.ExpressionMatches(DefRel, F.Archive()) == true) ||
- (F->Codename != 0 && vm.ExpressionMatches(DefRel, F.Codename()) == true) ||
- (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true) ||
+ if (vm.ExpressionMatches(DefRel, F.Archive()) ||
+ vm.ExpressionMatches(DefRel, F.Codename()) ||
+ vm.ExpressionMatches(DefRel, F.Version()) ||
(DefRel.length() > 2 && DefRel[1] == '='))
found = true;
}
@@ -86,17 +90,17 @@ bool pkgPolicy::InitDefaults()
for (pkgCache::PkgFileIterator I = Cache->FileBegin(); I != Cache->FileEnd(); ++I)
{
PFPriority[I->ID] = 500;
- if ((I->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource)
+ if (I.Flagged(pkgCache::Flag::NotSource))
PFPriority[I->ID] = 100;
- else if ((I->Flags & pkgCache::Flag::ButAutomaticUpgrades) == pkgCache::Flag::ButAutomaticUpgrades)
+ else if (I.Flagged(pkgCache::Flag::ButAutomaticUpgrades))
PFPriority[I->ID] = 100;
- else if ((I->Flags & pkgCache::Flag::NotAutomatic) == pkgCache::Flag::NotAutomatic)
+ else if (I.Flagged(pkgCache::Flag::NotAutomatic))
PFPriority[I->ID] = 1;
}
// Apply the defaults..
- SPtrArray<bool> Fixed = new bool[Cache->HeaderP->PackageFileCount];
- memset(Fixed,0,sizeof(*Fixed)*Cache->HeaderP->PackageFileCount);
+ std::unique_ptr<bool[]> Fixed(new bool[Cache->HeaderP->PackageFileCount]);
+ memset(Fixed.get(),0,sizeof(Fixed[0])*Cache->HeaderP->PackageFileCount);
StatusOverride = false;
for (vector<Pin>::const_iterator I = Defaults.begin(); I != Defaults.end(); ++I)
{
@@ -128,6 +132,10 @@ bool pkgPolicy::InitDefaults()
best package is. */
pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const &Pkg)
{
+ if (_config->FindI("APT::Policy", 1) >= 1) {
+ return GetCandidateVerNew(Pkg);
+ }
+
// Look for a package pin and evaluate it.
signed Max = GetPriority(Pkg);
pkgCache::VerIterator Pref = GetMatch(Pkg);
@@ -170,8 +178,7 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const &Pk
then it is not a candidate for installation, ever. This weeds
out bogus entries that may be due to config-file states, or
other. */
- if ((VF.File()->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource &&
- instVer == false)
+ if (VF.File().Flagged(pkgCache::Flag::NotSource) && instVer == false)
continue;
signed Prio = PFPriority[VF.File()->ID];
@@ -215,6 +222,36 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const &Pk
return Pref;
}
+
+// Policy::GetCandidateVer - Get the candidate install version /*{{{*/
+// ---------------------------------------------------------------------
+/* Evaluate the package pins and the default list to deteremine what the
+ best package is. */
+pkgCache::VerIterator pkgPolicy::GetCandidateVerNew(pkgCache::PkgIterator const &Pkg)
+{
+ // TODO: Replace GetCandidateVer()
+ pkgCache::VerIterator cand;
+ pkgCache::VerIterator cur = Pkg.CurrentVer();
+ int candPriority = -1;
+ pkgVersioningSystem *vs = Cache->VS;
+
+ for (pkgCache::VerIterator ver = Pkg.VersionList(); ver.end() == false; ver++) {
+ int priority = GetPriority(ver);
+
+ if (priority == 0 || priority <= candPriority)
+ continue;
+
+ // TODO: Maybe optimize to not compare versions
+ if (!cur.end() && priority < 1000
+ && (vs->CmpVersion(ver.VerStr(), cur.VerStr()) < 0))
+ continue;
+
+ candPriority = priority;
+ cand = ver;
+ }
+
+ return cand;
+}
/*}}}*/
// Policy::CreatePin - Create an entry in the pin table.. /*{{{*/
// ---------------------------------------------------------------------
@@ -282,6 +319,17 @@ void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name,
P->Priority = Priority;
P->Data = Data;
matched = true;
+
+ // Find matching version(s) and copy the pin into it
+ pkgVersionMatch Match(P->Data,P->Type);
+ for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() != true; Ver++)
+ {
+ if (Match.VersionMatches(Ver)) {
+ Pin *VP = VerPins + Ver->ID;
+ if (VP->Type == pkgVersionMatch::None)
+ *VP = *P;
+ }
+ }
}
}
@@ -319,26 +367,35 @@ APT_PURE signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg)
return Pins[Pkg->ID].Priority;
return 0;
}
+APT_PURE signed short pkgPolicy::GetPriority(pkgCache::VerIterator const &Ver, bool ConsiderFiles)
+{
+ if (VerPins[Ver->ID].Type != pkgVersionMatch::None)
+ return VerPins[Ver->ID].Priority;
+ if (!ConsiderFiles)
+ return 0;
+
+ int priority = std::numeric_limits<int>::min();
+ for (pkgCache::VerFileIterator file = Ver.FileList(); file.end() == false; file++)
+ {
+ /* If this is the status file, and the current version is not the
+ version in the status file (ie it is not installed, or somesuch)
+ then it is not a candidate for installation, ever. This weeds
+ out bogus entries that may be due to config-file states, or
+ other. */
+ if (file.File().Flagged(pkgCache::Flag::NotSource) && Ver.ParentPkg().CurrentVer() != Ver) {
+ // Ignore
+ } else if (GetPriority(file.File()) > priority) {
+ priority = GetPriority(file.File());
+ }
+ }
+
+ return priority == std::numeric_limits<int>::min() ? 0 : priority;
+}
APT_PURE signed short pkgPolicy::GetPriority(pkgCache::PkgFileIterator const &File)
{
return PFPriority[File->ID];
}
/*}}}*/
-// PreferenceSection class - Overriding the default TrimRecord method /*{{{*/
-// ---------------------------------------------------------------------
-/* The preference file is a user generated file so the parser should
- therefore be a bit more friendly by allowing comments and new lines
- all over the place rather than forcing a special format */
-class PreferenceSection : public pkgTagSection
-{
- void TrimRecord(bool /*BeforeRecord*/, const char* &End)
- {
- for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r' || Stop[0] == '#'); Stop++)
- if (Stop[0] == '#')
- Stop = (const char*) memchr(Stop,'\n',End-Stop);
- }
-};
- /*}}}*/
// ReadPinDir - Load the pin files from this dir into a Policy /*{{{*/
// ---------------------------------------------------------------------
/* This will load each pin file in the given dir into a Policy. If the
@@ -383,8 +440,8 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
pkgTagFile TF(&Fd);
if (_error->PendingError() == true)
return false;
-
- PreferenceSection Tags;
+
+ pkgUserTagSection Tags;
while (TF.Step(Tags) == true)
{
// can happen when there are only comments in a record
@@ -420,11 +477,18 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
}
for (; Word != End && isspace(*Word) != 0; Word++);
- short int priority = Tags.FindI("Pin-Priority", 0);
+ int priority = Tags.FindI("Pin-Priority", 0);
+ if (priority < std::numeric_limits<short>::min() ||
+ priority > std::numeric_limits<short>::max() ||
+ _error->PendingError()) {
+ return _error->Error(_("%s: Value %s is outside the range of valid pin priorities (%d to %d)"),
+ File.c_str(), Tags.FindS("Pin-Priority").c_str(),
+ std::numeric_limits<short>::min(),
+ std::numeric_limits<short>::max());
+ }
if (priority == 0)
{
- _error->Warning(_("No priority (or zero) specified for pin"));
- continue;
+ return _error->Error(_("No priority (or zero) specified for pin"));
}
istringstream s(Name);
@@ -440,3 +504,5 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
return true;
}
/*}}}*/
+
+pkgPolicy::~pkgPolicy() {delete [] PFPriority; delete [] Pins; delete [] VerPins; }
diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h
index f15d8c0a0..bb0ff7e27 100644
--- a/apt-pkg/policy.h
+++ b/apt-pkg/policy.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: policy.h,v 1.4 2001/05/07 04:24:08 jgg Exp $
/* ######################################################################
Package Version Policy implementation
@@ -60,10 +59,11 @@ class pkgPolicy : public pkgDepCache::Policy
struct PkgPin : Pin
{
std::string Pkg;
- PkgPin(std::string const &Pkg) : Pin(), Pkg(Pkg) {};
+ explicit PkgPin(std::string const &Pkg) : Pin(), Pkg(Pkg) {};
};
Pin *Pins;
+ Pin *VerPins;
signed short *PFPriority;
std::vector<Pin> Defaults;
std::vector<PkgPin> Unmatched;
@@ -78,14 +78,18 @@ class pkgPolicy : public pkgDepCache::Policy
pkgCache::VerIterator GetMatch(pkgCache::PkgIterator const &Pkg);
// Things for the cache interface.
- virtual pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator const &Pkg);
- virtual signed short GetPriority(pkgCache::PkgIterator const &Pkg);
- virtual signed short GetPriority(pkgCache::PkgFileIterator const &File);
+ virtual pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual signed short GetPriority(pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual signed short GetPriority(pkgCache::VerIterator const &Ver, bool ConsiderFiles = true) APT_OVERRIDE;
+ virtual signed short GetPriority(pkgCache::PkgFileIterator const &File) APT_OVERRIDE;
bool InitDefaults();
- pkgPolicy(pkgCache *Owner);
- virtual ~pkgPolicy() {delete [] PFPriority; delete [] Pins;};
+ explicit pkgPolicy(pkgCache *Owner);
+ virtual ~pkgPolicy();
+ private:
+ APT_HIDDEN pkgCache::VerIterator GetCandidateVerNew(pkgCache::PkgIterator const &Pkg);
+ void * const d;
};
bool ReadPinFile(pkgPolicy &Plcy, std::string File = "");
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 8b960572b..3e714667c 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -37,25 +37,26 @@
using namespace std;
// Global list of Items supported
-static pkgSourceList::Type *ItmList[10];
+static pkgSourceList::Type *ItmList[10];
pkgSourceList::Type **pkgSourceList::Type::GlobalList = ItmList;
unsigned long pkgSourceList::Type::GlobalListLen = 0;
// Type::Type - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Link this to the global list of items*/
-pkgSourceList::Type::Type() : Name(NULL), Label(NULL)
+pkgSourceList::Type::Type(char const * const pName, char const * const pLabel) : Name(pName), Label(pLabel)
{
ItmList[GlobalListLen] = this;
- GlobalListLen++;
+ ++GlobalListLen;
}
+pkgSourceList::Type::~Type() {}
/*}}}*/
// Type::GetType - Get a specific meta for a given type /*{{{*/
// ---------------------------------------------------------------------
/* */
pkgSourceList::Type *pkgSourceList::Type::GetType(const char *Type)
{
- for (unsigned I = 0; I != GlobalListLen; I++)
+ for (unsigned I = 0; I != GlobalListLen; ++I)
if (strcmp(GlobalList[I]->Name,Type) == 0)
return GlobalList[I];
return 0;
@@ -81,76 +82,102 @@ bool pkgSourceList::Type::FixupURI(string &URI) const
return true;
}
/*}}}*/
-bool pkgSourceList::Type::ParseStanza(vector<metaIndex *> &List,
+bool pkgSourceList::Type::ParseStanza(vector<metaIndex *> &List, /*{{{*/
pkgTagSection &Tags,
- int i,
+ unsigned int const i,
FileFd &Fd)
{
map<string, string> Options;
string Enabled = Tags.FindS("Enabled");
- if (Enabled.size() > 0 && StringToBool(Enabled) == false)
+ if (Enabled.empty() == false && StringToBool(Enabled) == false)
return true;
-
- // Define external/internal options
- const char* option_deb822[] = {
- "Architectures", "Architectures-Add", "Architectures-Remove", "Trusted",
- };
- const char* option_internal[] = {
- "arch", "arch+", "arch-", "trusted",
- };
- for (unsigned int j=0; j < sizeof(option_deb822)/sizeof(char*); j++)
- if (Tags.Exists(option_deb822[j]))
+
+ std::map<char const * const, std::pair<char const * const, bool> > mapping;
+#define APT_PLUSMINUS(X, Y) \
+ mapping.insert(std::make_pair(X, std::make_pair(Y, true))); \
+ mapping.insert(std::make_pair(X "Add", std::make_pair(Y "+", true))); \
+ mapping.insert(std::make_pair(X "Remove", std::make_pair(Y "-", true)))
+ APT_PLUSMINUS("Architectures", "arch");
+ APT_PLUSMINUS("Languages", "lang");
+ APT_PLUSMINUS("Targets", "target");
+#undef APT_PLUSMINUS
+ mapping.insert(std::make_pair("Trusted", std::make_pair("trusted", false)));
+ mapping.insert(std::make_pair("Check-Valid-Until", std::make_pair("check-valid-until", false)));
+ mapping.insert(std::make_pair("Valid-Until-Min", std::make_pair("valid-until-min", false)));
+ mapping.insert(std::make_pair("Valid-Until-Max", std::make_pair("valid-until-max", false)));
+ mapping.insert(std::make_pair("Signed-By", std::make_pair("signed-by", false)));
+
+ for (std::map<char const * const, std::pair<char const * const, bool> >::const_iterator m = mapping.begin(); m != mapping.end(); ++m)
+ if (Tags.Exists(m->first))
{
- // for deb822 the " " is the delimiter, but the backend expects ","
- std::string option = Tags.FindS(option_deb822[j]);
- std::replace(option.begin(), option.end(), ' ', ',');
- Options[option_internal[j]] = option;
+ std::string option = Tags.FindS(m->first);
+ // for deb822 the " " is the delimiter, but the backend expects ","
+ if (m->second.second == true)
+ std::replace(option.begin(), option.end(), ' ', ',');
+ Options[m->second.first] = option;
}
-
+
// now create one item per suite/section
string Suite = Tags.FindS("Suites");
Suite = SubstVar(Suite,"$(ARCH)",_config->Find("APT::Architecture"));
- string const Section = Tags.FindS("Sections");
- string URIS = Tags.FindS("URIs");
+ string const Component = Tags.FindS("Components");
+ string const URIS = Tags.FindS("URIs");
+
+ std::vector<std::string> const list_uris = VectorizeString(URIS, ' ');
+ std::vector<std::string> const list_suite = VectorizeString(Suite, ' ');
+ std::vector<std::string> const list_comp = VectorizeString(Component, ' ');
+
+ if (list_uris.empty())
+ // TRANSLATOR: %u is a line number, the first %s is a filename of a file with the extension "second %s" and the third %s is a unique identifier for bugreports
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), i, "sources", Fd.Name().c_str(), "URI");
- std::vector<std::string> list_uris = StringSplit(URIS, " ");
- std::vector<std::string> list_dist = StringSplit(Suite, " ");
- std::vector<std::string> list_section = StringSplit(Section, " ");
-
for (std::vector<std::string>::const_iterator U = list_uris.begin();
U != list_uris.end(); ++U)
{
- std::string URI = (*U);
- if (!FixupURI(URI))
- {
- _error->Error(_("Malformed stanza %u in source list %s (URI parse)"),i,Fd.Name().c_str());
- return false;
- }
+ std::string URI = *U;
+ if (U->empty() || FixupURI(URI) == false)
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), i, "sources", Fd.Name().c_str(), "URI parse");
+
+ if (list_suite.empty())
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), i, "sources", Fd.Name().c_str(), "Suite");
- for (std::vector<std::string>::const_iterator I = list_dist.begin();
- I != list_dist.end(); ++I)
+ for (std::vector<std::string>::const_iterator S = list_suite.begin();
+ S != list_suite.end(); ++S)
{
- for (std::vector<std::string>::const_iterator J = list_section.begin();
- J != list_section.end(); ++J)
- {
- if (CreateItem(List, URI, (*I), (*J), Options) == false)
- {
- return false;
- }
- }
+ if (S->empty() == false && (*S)[S->size() - 1] == '/')
+ {
+ if (list_comp.empty() == false)
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), i, "sources", Fd.Name().c_str(), "absolute Suite Component");
+ if (CreateItem(List, URI, *S, "", Options) == false)
+ return false;
+ }
+ else
+ {
+ if (list_comp.empty())
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), i, "sources", Fd.Name().c_str(), "Component");
+
+ for (std::vector<std::string>::const_iterator C = list_comp.begin();
+ C != list_comp.end(); ++C)
+ {
+ if (CreateItem(List, URI, *S, *C, Options) == false)
+ {
+ return false;
+ }
+ }
+ }
}
}
return true;
}
-
+ /*}}}*/
// Type::ParseLine - Parse a single line /*{{{*/
// ---------------------------------------------------------------------
/* This is a generic one that is the 'usual' format for sources.list
Weird types may override this. */
bool pkgSourceList::Type::ParseLine(vector<metaIndex *> &List,
const char *Buffer,
- unsigned long const &CurLine,
+ unsigned int const CurLine,
string const &File) const
{
for (;Buffer != 0 && isspace(*Buffer); ++Buffer); // Skip whitespaces
@@ -167,10 +194,10 @@ bool pkgSourceList::Type::ParseLine(vector<metaIndex *> &List,
// get one option, e.g. option1=value1
string option;
if (ParseQuoteWord(Buffer,option) == false)
- return _error->Error(_("Malformed line %lu in source list %s ([option] unparseable)"),CurLine,File.c_str());
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "[option] unparseable");
if (option.length() < 3)
- return _error->Error(_("Malformed line %lu in source list %s ([option] too short)"),CurLine,File.c_str());
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "[option] too short");
// accept options even if the last has no space before the ]-end marker
if (option.at(option.length()-1) == ']')
@@ -181,16 +208,16 @@ bool pkgSourceList::Type::ParseLine(vector<metaIndex *> &List,
size_t const needle = option.find('=');
if (needle == string::npos)
- return _error->Error(_("Malformed line %lu in source list %s ([%s] is not an assignment)"),CurLine,File.c_str(), option.c_str());
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "[option] not assignment");
string const key = string(option, 0, needle);
string const value = string(option, needle + 1, option.length());
if (key.empty() == true)
- return _error->Error(_("Malformed line %lu in source list %s ([%s] has no key)"),CurLine,File.c_str(), option.c_str());
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "[option] no key");
if (value.empty() == true)
- return _error->Error(_("Malformed line %lu in source list %s ([%s] key %s has no value)"),CurLine,File.c_str(),option.c_str(),key.c_str());
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "[option] no value");
Options[key] = value;
}
@@ -203,47 +230,42 @@ bool pkgSourceList::Type::ParseLine(vector<metaIndex *> &List,
string Section;
if (ParseQuoteWord(Buffer,URI) == false)
- return _error->Error(_("Malformed line %lu in source list %s (URI)"),CurLine,File.c_str());
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "URI");
if (ParseQuoteWord(Buffer,Dist) == false)
- return _error->Error(_("Malformed line %lu in source list %s (dist)"),CurLine,File.c_str());
-
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "Suite");
+
if (FixupURI(URI) == false)
- return _error->Error(_("Malformed line %lu in source list %s (URI parse)"),CurLine,File.c_str());
-
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "URI parse");
+
// Check for an absolute dists specification.
if (Dist.empty() == false && Dist[Dist.size() - 1] == '/')
{
if (ParseQuoteWord(Buffer,Section) == true)
- return _error->Error(_("Malformed line %lu in source list %s (absolute dist)"),CurLine,File.c_str());
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "absolute Suite Component");
Dist = SubstVar(Dist,"$(ARCH)",_config->Find("APT::Architecture"));
return CreateItem(List, URI, Dist, Section, Options);
}
-
+
// Grab the rest of the dists
if (ParseQuoteWord(Buffer,Section) == false)
- return _error->Error(_("Malformed line %lu in source list %s (dist parse)"),CurLine,File.c_str());
-
+ return _error->Error(_("Malformed entry %u in %s file %s (%s)"), CurLine, "list", File.c_str(), "Component");
+
do
{
if (CreateItem(List, URI, Dist, Section, Options) == false)
return false;
}
while (ParseQuoteWord(Buffer,Section) == true);
-
+
return true;
}
/*}}}*/
// SourceList::pkgSourceList - Constructors /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgSourceList::pkgSourceList()
+pkgSourceList::pkgSourceList() : d(NULL)
{
}
-
-pkgSourceList::pkgSourceList(string File)
-{
- Read(File);
-}
/*}}}*/
// SourceList::~pkgSourceList - Destructor /*{{{*/
// ---------------------------------------------------------------------
@@ -252,6 +274,10 @@ pkgSourceList::~pkgSourceList()
{
for (const_iterator I = SrcList.begin(); I != SrcList.end(); ++I)
delete *I;
+ SrcList.clear();
+ for (auto F = VolatileFiles.begin(); F != VolatileFiles.end(); ++F)
+ delete (*F);
+ VolatileFiles.clear();
}
/*}}}*/
// SourceList::ReadMainList - Read the main source list from etc /*{{{*/
@@ -301,7 +327,7 @@ void pkgSourceList::Reset()
// SourceList::Read - Parse the sourcelist file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgSourceList::Read(string File)
+bool pkgSourceList::Read(string const &File)
{
Reset();
return ReadAppend(File);
@@ -310,71 +336,63 @@ bool pkgSourceList::Read(string File)
// SourceList::ReadAppend - Parse a sourcelist file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgSourceList::ReadAppend(string File)
+bool pkgSourceList::ReadAppend(string const &File)
{
- if (_config->FindB("APT::Sources::Use-Deb822", false) == true)
- {
- int lines_parsed =ParseFileDeb822(File);
- if (lines_parsed < 0)
- return false;
- else if (lines_parsed > 0)
- return true;
- // no lines parsed ... fall through and use old style parser
- }
- return ParseFileOldStyle(File);
+ if (flExtension(File) == "sources")
+ return ParseFileDeb822(File);
+ else
+ return ParseFileOldStyle(File);
}
-
+ /*}}}*/
// SourceList::ReadFileOldStyle - Read Traditional style sources.list /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgSourceList::ParseFileOldStyle(string File)
+bool pkgSourceList::ParseFileOldStyle(std::string const &File)
{
// Open the stream for reading
ifstream F(File.c_str(),ios::in /*| ios::nocreate*/);
if (F.fail() == true)
return _error->Errno("ifstream::ifstream",_("Opening %s"),File.c_str());
- // CNC:2003-12-10 - 300 is too short.
- char Buffer[1024];
-
- int CurLine = 0;
- while (F.eof() == false)
+ std::string Buffer;
+ for (unsigned int CurLine = 1; std::getline(F, Buffer); ++CurLine)
{
- F.getline(Buffer,sizeof(Buffer));
- CurLine++;
- _strtabexpand(Buffer,sizeof(Buffer));
- if (F.fail() && !F.eof())
- return _error->Error(_("Line %u too long in source list %s."),
- CurLine,File.c_str());
-
-
- char *I;
- // CNC:2003-02-20 - Do not break if '#' is inside [].
- for (I = Buffer; *I != 0 && *I != '#'; I++)
- if (*I == '[')
- {
- char *b_end = strchr(I + 1, ']');
- if (b_end != NULL)
- I = b_end;
- }
- *I = 0;
-
- const char *C = _strstrip(Buffer);
-
- // Comment or blank
- if (C[0] == '#' || C[0] == 0)
+ // remove comments
+ size_t curpos = 0;
+ while ((curpos = Buffer.find('#', curpos)) != std::string::npos)
+ {
+ size_t const openbrackets = std::count(Buffer.begin(), Buffer.begin() + curpos, '[');
+ size_t const closedbrackets = std::count(Buffer.begin(), Buffer.begin() + curpos, ']');
+ if (openbrackets > closedbrackets)
+ {
+ // a # in an option, unlikely, but oh well, it was supported so stick to it
+ ++curpos;
+ continue;
+ }
+ Buffer.erase(curpos);
+ break;
+ }
+ // remove spaces before/after
+ curpos = Buffer.find_first_not_of(" \t\r");
+ if (curpos != 0)
+ Buffer.erase(0, curpos);
+ curpos = Buffer.find_last_not_of(" \t\r");
+ if (curpos != std::string::npos)
+ Buffer.erase(curpos + 1);
+
+ if (Buffer.empty())
continue;
-
+
// Grok it
- string LineType;
- if (ParseQuoteWord(C,LineType) == false)
+ std::string const LineType = Buffer.substr(0, Buffer.find(' '));
+ if (LineType.empty() || LineType == Buffer)
return _error->Error(_("Malformed line %u in source list %s (type)"),CurLine,File.c_str());
Type *Parse = Type::GetType(LineType.c_str());
if (Parse == 0)
return _error->Error(_("Type '%s' is not known on line %u in source list %s"),LineType.c_str(),CurLine,File.c_str());
-
- if (Parse->ParseLine(SrcList, C, CurLine, File) == false)
+
+ if (Parse->ParseLine(SrcList, Buffer.c_str() + LineType.length(), CurLine, File) == false)
return false;
}
return true;
@@ -383,30 +401,25 @@ bool pkgSourceList::ParseFileOldStyle(string File)
// SourceList::ParseFileDeb822 - Parse deb822 style sources.list /*{{{*/
// ---------------------------------------------------------------------
/* Returns: the number of stanzas parsed*/
-int pkgSourceList::ParseFileDeb822(string File)
+bool pkgSourceList::ParseFileDeb822(string const &File)
{
- pkgTagSection Tags;
- unsigned int i=0;
+ pkgUserTagSection Tags;
+ unsigned int i = 1;
// see if we can read the file
- _error->PushToStack();
FileFd Fd(File, FileFd::ReadOnly);
pkgTagFile Sources(&Fd);
if (_error->PendingError() == true)
- {
- _error->RevertToStack();
- return 0;
- }
- _error->MergeWithStack();
-
+ return _error->Error(_("Malformed stanza %u in source list %s (type)"),i,File.c_str());
+
// read step by step
while (Sources.Step(Tags) == true)
{
- if(!Tags.Exists("Types"))
- continue;
+ if(Tags.Exists("Types") == false)
+ return _error->Error(_("Malformed stanza %u in source list %s (type)"),i,File.c_str());
string const types = Tags.FindS("Types");
- std::vector<std::string> list_types = StringSplit(types, " ");
+ std::vector<std::string> const list_types = VectorizeString(types, ' ');
for (std::vector<std::string>::const_iterator I = list_types.begin();
I != list_types.end(); ++I)
{
@@ -414,18 +427,16 @@ int pkgSourceList::ParseFileDeb822(string File)
if (Parse == 0)
{
_error->Error(_("Type '%s' is not known on stanza %u in source list %s"), (*I).c_str(),i,Fd.Name().c_str());
- return -1;
+ return false;
}
-
+
if (!Parse->ParseStanza(SrcList, Tags, i, Fd))
- return -1;
+ return false;
- i++;
+ ++i;
}
}
-
- // we are done, return the number of stanzas read
- return i;
+ return true;
}
/*}}}*/
// SourceList::FindIndex - Get the index associated with a file /*{{{*/
@@ -447,7 +458,15 @@ bool pkgSourceList::FindIndex(pkgCache::PkgFileIterator File,
}
}
}
-
+ for (vector<pkgIndexFile *>::const_iterator J = VolatileFiles.begin();
+ J != VolatileFiles.end(); ++J)
+ {
+ if ((*J)->FindInCache(*File.Cache()) == File)
+ {
+ Found = (*J);
+ return true;
+ }
+ }
return false;
}
/*}}}*/
@@ -467,9 +486,12 @@ bool pkgSourceList::GetIndexes(pkgAcquire *Owner, bool GetAll) const
// Based on ReadConfigDir() /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgSourceList::ReadSourceDir(string Dir)
+bool pkgSourceList::ReadSourceDir(string const &Dir)
{
- vector<string> const List = GetListOfFilesInDir(Dir, "list", true);
+ std::vector<std::string> ext;
+ ext.push_back("list");
+ ext.push_back("sources");
+ std::vector<std::string> const List = GetListOfFilesInDir(Dir, ext, true);
// Read the files
for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I)
@@ -501,4 +523,14 @@ time_t pkgSourceList::GetLastModifiedTime()
return mtime_sources;
}
/*}}}*/
-
+std::vector<pkgIndexFile*> pkgSourceList::GetVolatileFiles() const /*{{{*/
+{
+ return VolatileFiles;
+}
+ /*}}}*/
+void pkgSourceList::AddVolatileFile(pkgIndexFile * const File) /*{{{*/
+{
+ if (File != NULL)
+ VolatileFiles.push_back(File);
+}
+ /*}}}*/
diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h
index 998357509..47a562d18 100644
--- a/apt-pkg/sourcelist.h
+++ b/apt-pkg/sourcelist.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: sourcelist.h,v 1.12.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
SourceList - Manage a list of sources
@@ -18,10 +17,6 @@
list all you have is a list of package index files that have the ability
to be Acquired.
- The vendor machanism is similar, except the vendor types are hard
- wired. Before loading the source list the vendor list is loaded.
- This doesn't load key data, just the checks to perform.
-
##################################################################### */
/*}}}*/
#ifndef PKGLIB_SOURCELIST_H
@@ -54,6 +49,8 @@ class metaIndex;
class pkgSourceList
{
+ void * const d;
+ std::vector<pkgIndexFile*> VolatileFiles;
public:
// List of supported source list types
@@ -66,22 +63,22 @@ class pkgSourceList
static unsigned long GlobalListLen;
static Type *GetType(const char *Type) APT_PURE;
- const char *Name;
- const char *Label;
+ char const * const Name;
+ char const * const Label;
bool FixupURI(std::string &URI) const;
virtual bool ParseStanza(std::vector<metaIndex *> &List,
pkgTagSection &Tags,
- int stanza_n,
+ unsigned int const stanza_n,
FileFd &Fd);
virtual bool ParseLine(std::vector<metaIndex *> &List,
const char *Buffer,
- unsigned long const &CurLine,std::string const &File) const;
+ unsigned int const CurLine,std::string const &File) const;
virtual bool CreateItem(std::vector<metaIndex *> &List,std::string const &URI,
std::string const &Dist,std::string const &Section,
std::map<std::string, std::string> const &Options) const = 0;
- Type();
- virtual ~Type() {};
+ Type(char const * const Name, char const * const Label);
+ virtual ~Type();
};
typedef std::vector<metaIndex *>::const_iterator const_iterator;
@@ -90,18 +87,19 @@ class pkgSourceList
std::vector<metaIndex *> SrcList;
- int ParseFileDeb822(std::string File);
- bool ParseFileOldStyle(std::string File);
+ private:
+ APT_HIDDEN bool ParseFileDeb822(std::string const &File);
+ APT_HIDDEN bool ParseFileOldStyle(std::string const &File);
public:
bool ReadMainList();
- bool Read(std::string File);
+ bool Read(std::string const &File);
// CNC:2003-03-03
void Reset();
- bool ReadAppend(std::string File);
- bool ReadSourceDir(std::string Dir);
+ bool ReadAppend(std::string const &File);
+ bool ReadSourceDir(std::string const &Dir);
// List accessors
inline const_iterator begin() const {return SrcList.begin();};
@@ -116,9 +114,26 @@ class pkgSourceList
// query last-modified time
time_t GetLastModifiedTime();
+ /** \brief add file for parsing, but not to the cache
+ *
+ * pkgIndexFiles origining from pkgSourcesList are included in
+ * srcpkgcache, the status files added via #AddStatusFiles are
+ * included in pkgcache, but these files here are not included in
+ * any cache to have the possibility of having a file included just
+ * for a single run like a local .deb/.dsc file.
+ *
+ * The volatile files do not count as "normal" sourceslist entries,
+ * can't be iterated over with #begin and #end and can't be
+ * downloaded, but they can be found via #FindIndex.
+ *
+ * @param File is an index file; pointer-ownership is transferred
+ */
+ void AddVolatileFile(pkgIndexFile * const File);
+ /** @return list of files registered with #AddVolatileFile */
+ std::vector<pkgIndexFile*> GetVolatileFiles() const;
+
pkgSourceList();
- pkgSourceList(std::string File);
- ~pkgSourceList();
+ virtual ~pkgSourceList();
};
#endif
diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
index 3175ee75f..942f11569 100644
--- a/apt-pkg/srcrecords.cc
+++ b/apt-pkg/srcrecords.cc
@@ -31,7 +31,7 @@
// SrcRecords::pkgSrcRecords - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Open all the source index files */
-pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : d(NULL), Files(0), Current(0)
+pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : d(NULL), Files(0)
{
for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); ++I)
{
@@ -178,3 +178,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
return true;
}
/*}}}*/
+
+
+pkgSrcRecords::Parser::Parser(const pkgIndexFile *Index) : d(NULL), iIndex(Index) {}
+pkgSrcRecords::Parser::~Parser() {}
diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h
index c931e17b7..f0a3c463a 100644
--- a/apt-pkg/srcrecords.h
+++ b/apt-pkg/srcrecords.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: srcrecords.h,v 1.8.2.1 2003/12/26 16:27:34 mdz Exp $
/* ######################################################################
Source Package Records - Allows access to source package records
@@ -49,6 +48,7 @@ APT_IGNORE_DEPRECATED_POP
// Abstract parser for each source record
class Parser
{
+ void * const d;
protected:
const pkgIndexFile *iIndex;
@@ -86,14 +86,14 @@ APT_IGNORE_DEPRECATED_POP
virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
bool Files2(std::vector<pkgSrcRecords::File2> &F);
-
- Parser(const pkgIndexFile *Index) : iIndex(Index) {};
- virtual ~Parser() {};
+
+ explicit Parser(const pkgIndexFile *Index);
+ virtual ~Parser();
};
private:
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
// The list of files and the current parser pointer
std::vector<Parser*> Files;
@@ -111,8 +111,8 @@ APT_IGNORE_DEPRECATED_POP
// Locate a package by name and return pointer to the Parser.
// The pointer is owned by libapt.
Parser* Find(const char *Package,bool const &SrcOnly = false);
-
- pkgSrcRecords(pkgSourceList &List);
+
+ explicit pkgSrcRecords(pkgSourceList &List);
virtual ~pkgSrcRecords();
};
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index 5ff495fbd..8acecd735 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -32,19 +32,36 @@ using std::string;
class pkgTagFilePrivate
{
public:
- pkgTagFilePrivate(FileFd *pFd, unsigned long long Size) : Fd(*pFd), Buffer(NULL),
- Start(NULL), End(NULL),
- Done(false), iOffset(0),
- Size(Size)
+ void Reset(FileFd * const pFd, unsigned long long const pSize)
{
+ if (Buffer != NULL)
+ free(Buffer);
+ Buffer = NULL;
+ Fd = pFd;
+ Start = NULL;
+ End = NULL;
+ Done = false;
+ iOffset = 0;
+ Size = pSize;
}
- FileFd &Fd;
+
+ pkgTagFilePrivate(FileFd * const pFd, unsigned long long const Size) : Buffer(NULL)
+ {
+ Reset(pFd, Size);
+ }
+ FileFd * Fd;
char *Buffer;
char *Start;
char *End;
bool Done;
unsigned long long iOffset;
unsigned long long Size;
+
+ ~pkgTagFilePrivate()
+ {
+ if (Buffer != NULL)
+ free(Buffer);
+ }
};
class pkgTagSectionPrivate
@@ -59,7 +76,7 @@ public:
unsigned int StartValue;
unsigned int NextInBucket;
- TagData(unsigned int const StartTag) : StartTag(StartTag), EndTag(0), StartValue(0), NextInBucket(0) {}
+ explicit TagData(unsigned int const StartTag) : StartTag(StartTag), EndTag(0), StartValue(0), NextInBucket(0) {}
};
std::vector<TagData> Tags;
};
@@ -83,27 +100,21 @@ static unsigned long AlphaHash(const char *Text, size_t Length) /*{{{*/
// TagFile::pkgTagFile - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long long Size)
- : d(NULL)
+pkgTagFile::pkgTagFile(FileFd * const pFd,unsigned long long const Size)
+ : d(new pkgTagFilePrivate(pFd, Size + 4))
{
Init(pFd, Size);
}
-
-void pkgTagFile::Init(FileFd *pFd,unsigned long long Size)
+void pkgTagFile::Init(FileFd * const pFd,unsigned long long Size)
{
/* The size is increased by 4 because if we start with the Size of the
filename we need to try to read 1 char more to see an EOF faster, 1
char the end-pointer can be on and maybe 2 newlines need to be added
to the end of the file -> 4 extra chars */
Size += 4;
- if(d != NULL)
- {
- free(d->Buffer);
- delete d;
- }
- d = new pkgTagFilePrivate(pFd, Size);
+ d->Reset(pFd, Size);
- if (d->Fd.IsOpen() == false)
+ if (d->Fd->IsOpen() == false)
d->Start = d->End = d->Buffer = 0;
else
d->Buffer = (char*)malloc(sizeof(char) * Size);
@@ -124,7 +135,6 @@ void pkgTagFile::Init(FileFd *pFd,unsigned long long Size)
/* */
pkgTagFile::~pkgTagFile()
{
- free(d->Buffer);
delete d;
}
/*}}}*/
@@ -184,7 +194,7 @@ bool pkgTagFile::Step(pkgTagSection &Tag)
if (Resize() == false)
return _error->Error(_("Unable to parse package file %s (%d)"),
- d->Fd.Name().c_str(), 1);
+ d->Fd->Name().c_str(), 1);
} while (Tag.Scan(d->Start,d->End - d->Start, false) == false);
}
@@ -213,7 +223,7 @@ bool pkgTagFile::Fill()
{
// See if only a bit of the file is left
unsigned long long const dataSize = d->Size - ((d->End - d->Buffer) + 1);
- if (d->Fd.Read(d->End, dataSize, &Actual) == false)
+ if (d->Fd->Read(d->End, dataSize, &Actual) == false)
return false;
if (Actual != dataSize)
d->Done = true;
@@ -268,7 +278,7 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset)
// Reposition and reload..
d->iOffset = Offset;
d->Done = false;
- if (d->Fd.Seek(Offset) == false)
+ if (d->Fd->Seek(Offset) == false)
return false;
d->End = d->Start = d->Buffer;
@@ -283,7 +293,7 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset)
return false;
if (Tag.Scan(d->Start, d->End - d->Start, false) == false)
- return _error->Error(_("Unable to parse package file %s (%d)"),d->Fd.Name().c_str(), 2);
+ return _error->Error(_("Unable to parse package file %s (%d)"),d->Fd->Name().c_str(), 2);
return true;
}
@@ -293,24 +303,13 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset)
/* */
APT_IGNORE_DEPRECATED_PUSH
pkgTagSection::pkgTagSection()
- : Section(0), d(NULL), Stop(0)
+ : Section(0), d(new pkgTagSectionPrivate()), Stop(0)
{
- d = new pkgTagSectionPrivate();
-#if APT_PKG_ABI < 413
- TagCount = 0;
- memset(&Indexes, 0, sizeof(Indexes));
-#endif
memset(&AlphaIndexes, 0, sizeof(AlphaIndexes));
}
APT_IGNORE_DEPRECATED_POP
/*}}}*/
// TagSection::Scan - Scan for the end of the header information /*{{{*/
-#if APT_PKG_ABI < 413
-bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength)
-{
- return Scan(Start, MaxLength, true);
-}
-#endif
bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const Restart)
{
Section = Start;
@@ -336,11 +335,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R
}
d->Tags.reserve(0x100);
}
-#if APT_PKG_ABI >= 413
unsigned int TagCount = d->Tags.size();
-#else
- APT_IGNORE_DEPRECATED(TagCount = d->Tags.size();)
-#endif
if (Stop == 0)
return false;
@@ -367,10 +362,6 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R
lastTagData.NextInBucket = AlphaIndexes[lastTagHash];
APT_IGNORE_DEPRECATED_PUSH
AlphaIndexes[lastTagHash] = TagCount;
-#if APT_PKG_ABI < 413
- if (d->Tags.size() < sizeof(Indexes)/sizeof(Indexes[0]))
- Indexes[d->Tags.size()] = lastTagData.StartTag;
-#endif
APT_IGNORE_DEPRECATED_POP
d->Tags.push_back(lastTagData);
}
@@ -414,16 +405,10 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R
if (AlphaIndexes[lastTagHash] != 0)
lastTagData.NextInBucket = AlphaIndexes[lastTagHash];
APT_IGNORE_DEPRECATED(AlphaIndexes[lastTagHash] = TagCount;)
-#if APT_PKG_ABI < 413
- APT_IGNORE_DEPRECATED(Indexes[d->Tags.size()] = lastTagData.StartTag;)
-#endif
d->Tags.push_back(lastTagData);
}
pkgTagSectionPrivate::TagData const td(Stop - Section);
-#if APT_PKG_ABI < 413
- APT_IGNORE_DEPRECATED(Indexes[d->Tags.size()] = td.StartTag;)
-#endif
d->Tags.push_back(td);
TrimRecord(false,End);
return true;
@@ -454,11 +439,7 @@ void pkgTagSection::Trim()
}
/*}}}*/
// TagSection::Exists - return True if a tag exists /*{{{*/
-#if APT_PKG_ABI >= 413
bool pkgTagSection::Exists(const char* const Tag) const
-#else
-bool pkgTagSection::Exists(const char* const Tag)
-#endif
{
unsigned int tmp;
return Find(Tag, tmp);
@@ -552,9 +533,16 @@ signed int pkgTagSection::FindI(const char *Tag,signed long Default) const
return Default;
strncpy(S,Start,Stop-Start);
S[Stop - Start] = 0;
-
+
+ errno = 0;
char *End;
signed long Result = strtol(S,&End,10);
+ if (errno == ERANGE)
+ _error->Errno("strtol", _("Cannot convert %s to integer"), S);
+ if (Result < std::numeric_limits<int>::min() || Result > std::numeric_limits<int>::max()) {
+ errno = ERANGE;
+ _error->Errno("", _("Cannot convert %s to integer"), S);
+ }
if (S == End)
return Default;
return Result;
@@ -598,6 +586,34 @@ bool pkgTagSection::FindB(const char *Tag, bool const &Default) const
// TagSection::FindFlag - Locate a yes/no type flag /*{{{*/
// ---------------------------------------------------------------------
/* The bits marked in Flag are masked on/off in Flags */
+bool pkgTagSection::FindFlag(const char * const Tag, uint8_t &Flags,
+ uint8_t const Flag) const
+{
+ const char *Start;
+ const char *Stop;
+ if (Find(Tag,Start,Stop) == false)
+ return true;
+ return FindFlag(Flags, Flag, Start, Stop);
+}
+bool pkgTagSection::FindFlag(uint8_t &Flags, uint8_t const Flag,
+ char const* const Start, char const* const Stop)
+{
+ switch (StringToBool(string(Start, Stop)))
+ {
+ case 0:
+ Flags &= ~Flag;
+ return true;
+
+ case 1:
+ Flags |= Flag;
+ return true;
+
+ default:
+ _error->Warning("Unknown flag value: %s",string(Start,Stop).c_str());
+ return true;
+ }
+ return true;
+}
bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags,
unsigned long Flag) const
{
@@ -766,6 +782,14 @@ bool pkgTagSection::Write(FileFd &File, char const * const * const Order, std::v
}
/*}}}*/
+void pkgUserTagSection::TrimRecord(bool /*BeforeRecord*/, const char* &End)/*{{{*/
+{
+ for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r' || Stop[0] == '#'); Stop++)
+ if (Stop[0] == '#')
+ Stop = (const char*) memchr(Stop,'\n',End-Stop);
+}
+ /*}}}*/
+
#include "tagfile-order.c"
// TFRewrite - Rewrite a control record /*{{{*/
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 118954541..19c07595e 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -1,6 +1,5 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: tagfile.h,v 1.20 2003/05/19 17:13:57 doogie Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
@@ -38,17 +37,9 @@ class pkgTagSectionPrivate;
class pkgTagSection
{
const char *Section;
- // We have a limit of 256 tags per section with the old abi
-#if APT_PKG_ABI < 413
- APT_DEPRECATED unsigned int Indexes[256];
-#endif
unsigned int AlphaIndexes[0x100];
-#if APT_PKG_ABI < 413
- APT_DEPRECATED unsigned int TagCount;
-#endif
- // dpointer placeholder (for later in case we need it)
- pkgTagSectionPrivate *d;
+ pkgTagSectionPrivate * const d;
protected:
const char *Stop;
@@ -65,6 +56,10 @@ class pkgTagSection
signed int FindI(const char *Tag,signed long Default = 0) const;
bool FindB(const char *Tag, bool const &Default = false) const;
unsigned long long FindULL(const char *Tag, unsigned long long const &Default = 0) const;
+ bool FindFlag(const char * const Tag,uint8_t &Flags,
+ uint8_t const Flag) const;
+ bool static FindFlag(uint8_t &Flags, uint8_t const Flag,
+ const char* const Start, const char* const Stop);
bool FindFlag(const char *Tag,unsigned long &Flags,
unsigned long Flag) const;
bool static FindFlag(unsigned long &Flags, unsigned long Flag,
@@ -86,12 +81,7 @@ class pkgTagSection
* @return \b true if section end was found, \b false otherwise.
* Beware that internal state will be inconsistent if \b false is returned!
*/
-#if APT_PKG_ABI >= 413
APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart = true);
-#else
- APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart);
- APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength);
-#endif
inline unsigned long size() const {return Stop - Section;};
void Trim();
@@ -103,11 +93,7 @@ class pkgTagSection
* times, but only the last occurrence is available via Find methods.
*/
unsigned int Count() const;
-#if APT_PKG_ABI >= 413
bool Exists(const char* const Tag) const;
-#else
- bool Exists(const char* const Tag);
-#endif
void Get(const char *&Start,const char *&Stop,unsigned int I) const;
@@ -138,16 +124,24 @@ class pkgTagSection
*
* @param File to write the section to
* @param Order in which tags should appear in the file
- * @param Rewrite is a set of tags to be renamed, rewitten and/or removed
+ * @param Rewrite is a set of tags to be renamed, rewritten and/or removed
* @return \b true if successful, otherwise \b false
*/
bool Write(FileFd &File, char const * const * const Order = NULL, std::vector<Tag> const &Rewrite = std::vector<Tag>()) const;
};
+
+/* For user generated file the parser should be a bit more relaxed in exchange
+ for being a bit slower to allow comments and new lines all over the place */
+class pkgUserTagSection : public pkgTagSection
+{
+ virtual void TrimRecord(bool BeforeRecord, const char* &End) APT_OVERRIDE;
+};
+
class pkgTagFilePrivate;
class pkgTagFile
{
- pkgTagFilePrivate *d;
+ pkgTagFilePrivate * const d;
APT_HIDDEN bool Fill();
APT_HIDDEN bool Resize();
@@ -159,9 +153,9 @@ class pkgTagFile
unsigned long Offset();
bool Jump(pkgTagSection &Tag,unsigned long long Offset);
- void Init(FileFd *F,unsigned long long Size = 32*1024);
+ void Init(FileFd * const F,unsigned long long const Size = 32*1024);
- pkgTagFile(FileFd *F,unsigned long long Size = 32*1024);
+ pkgTagFile(FileFd * const F,unsigned long long Size = 32*1024);
virtual ~pkgTagFile();
};
diff --git a/apt-pkg/update.cc b/apt-pkg/update.cc
index 2908a4820..369e85122 100644
--- a/apt-pkg/update.cc
+++ b/apt-pkg/update.cc
@@ -11,7 +11,6 @@
#include <apt-pkg/update.h>
#include <string>
-#include <vector>
#include <apti18n.h>
/*}}}*/
@@ -74,7 +73,7 @@ bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval,
uri.User.clear();
uri.Password.clear();
string descUri = string(uri);
- _error->Warning(_("Failed to fetch %s %s\n"), descUri.c_str(),
+ _error->Warning(_("Failed to fetch %s %s"), descUri.c_str(),
(*I)->ErrorText.c_str());
if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError)
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc
index 6c8721da8..e7f2aae40 100644
--- a/apt-pkg/upgrade.cc
+++ b/apt-pkg/upgrade.cc
@@ -288,12 +288,6 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache)
}
/*}}}*/
// APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/
-#if APT_PKG_ABI < 413
-bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode)
-{
- return Upgrade(Cache, mode, NULL);
-}
-#endif
bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress)
{
APT_IGNORE_DEPRECATED_PUSH
diff --git a/apt-pkg/upgrade.h b/apt-pkg/upgrade.h
index 18b6aac7b..6cad64fd9 100644
--- a/apt-pkg/upgrade.h
+++ b/apt-pkg/upgrade.h
@@ -24,12 +24,7 @@ namespace APT {
FORBID_INSTALL_NEW_PACKAGES = 2,
ALLOW_EVERYTHING = 0
};
-#if APT_PKG_ABI >= 413
bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
-#else
- bool Upgrade(pkgDepCache &Cache, int UpgradeMode);
- bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress);
-#endif
}
}
diff --git a/apt-pkg/vendor.cc b/apt-pkg/vendor.cc
deleted file mode 100644
index d4add560e..000000000
--- a/apt-pkg/vendor.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-#include<config.h>
-
-#include <apt-pkg/vendor.h>
-#include <apt-pkg/configuration.h>
-
-#include <iostream>
-#include <map>
-#include <string>
-#include <utility>
-#include <vector>
-
-Vendor::Vendor(std::string VendorID,
- std::string Origin,
- std::vector<struct Vendor::Fingerprint *> *FingerprintList)
-{
- this->VendorID = VendorID;
- this->Origin = Origin;
- for (std::vector<struct Vendor::Fingerprint *>::iterator I = FingerprintList->begin();
- I != FingerprintList->end(); ++I)
- {
- if (_config->FindB("Debug::Vendor", false))
- std::cerr << "Vendor \"" << VendorID << "\": Mapping \""
- << (*I)->Print << "\" to \"" << (*I)->Description << '"' << std::endl;
- Fingerprints[(*I)->Print] = (*I)->Description;
- }
- delete FingerprintList;
-}
-
-const std::string Vendor::LookupFingerprint(std::string Print) const
-{
- std::map<std::string,std::string>::const_iterator Elt = Fingerprints.find(Print);
- if (Elt == Fingerprints.end())
- return "";
- else
- return (*Elt).second;
-}
-
-APT_CONST bool Vendor::CheckDist(std::string /*Dist*/)
-{
- return true;
-}
diff --git a/apt-pkg/vendor.h b/apt-pkg/vendor.h
deleted file mode 100644
index 2d2e2b0ae..000000000
--- a/apt-pkg/vendor.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef PKGLIB_VENDOR_H
-#define PKGLIB_VENDOR_H
-#include <string>
-#include <vector>
-#include <map>
-
-#include <apt-pkg/macros.h>
-
-#ifndef APT_8_CLEANER_HEADERS
-using std::string;
-#endif
-
-// A class representing a particular software provider.
-class APT_DEPRECATED Vendor
-{
- public:
- struct Fingerprint
- {
- std::string Print;
- std::string Description;
- };
-
- protected:
- std::string VendorID;
- std::string Origin;
- std::map<std::string, std::string> Fingerprints;
-
- public:
- Vendor(std::string VendorID, std::string Origin,
- std::vector<struct Fingerprint *> *FingerprintList);
- virtual const std::string& GetVendorID() const { return VendorID; };
- virtual const std::string LookupFingerprint(std::string Print) const;
- virtual bool CheckDist(std::string Dist);
- virtual ~Vendor(){};
-};
-
-#endif
diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc
deleted file mode 100644
index db5b87fc0..000000000
--- a/apt-pkg/vendorlist.cc
+++ /dev/null
@@ -1,164 +0,0 @@
-#include<config.h>
-
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/configuration.h>
-
-#include <stddef.h>
-#include <iostream>
-#include <string>
-#include <vector>
-
-#include <apti18n.h>
-
-// The whole vendor system is deprecated
-APT_IGNORE_DEPRECATED_PUSH
-
-#include <apt-pkg/vendor.h>
-#include <apt-pkg/vendorlist.h>
-
-using std::string;
-using std::vector;
-
-pkgVendorList::~pkgVendorList()
-{
- for (vector<const Vendor *>::const_iterator I = VendorList.begin();
- I != VendorList.end(); ++I)
- delete *I;
-}
-
-// pkgVendorList::ReadMainList - Read list of known package vendors /*{{{*/
-// ---------------------------------------------------------------------
-/* This also scans a directory of vendor files similar to apt.conf.d
- which can contain the usual suspects of distribution provided data.
- The APT config mechanism allows the user to override these in their
- configuration file. */
-bool pkgVendorList::ReadMainList()
-{
- Configuration Cnf;
-
- string CnfFile = _config->FindDir("Dir::Etc::vendorparts");
- if (DirectoryExists(CnfFile) == true)
- if (ReadConfigDir(Cnf,CnfFile,true) == false)
- return false;
- CnfFile = _config->FindFile("Dir::Etc::vendorlist");
- if (RealFileExists(CnfFile) == true)
- if (ReadConfigFile(Cnf,CnfFile,true) == false)
- return false;
-
- return CreateList(Cnf);
-}
- /*}}}*/
-bool pkgVendorList::Read(string File) /*{{{*/
-{
- Configuration Cnf;
- if (ReadConfigFile(Cnf,File,true) == false)
- return false;
-
- return CreateList(Cnf);
-}
- /*}}}*/
-bool pkgVendorList::CreateList(Configuration& Cnf) /*{{{*/
-{
- for (vector<const Vendor *>::const_iterator I = VendorList.begin();
- I != VendorList.end(); ++I)
- delete *I;
- VendorList.erase(VendorList.begin(),VendorList.end());
-
- const Configuration::Item *Top = Cnf.Tree("Vendor");
- for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next)
- {
- Configuration Block(Top);
- string VendorID = Top->Tag;
- vector <struct Vendor::Fingerprint *> *Fingerprints = new vector<Vendor::Fingerprint *>;
- struct Vendor::Fingerprint *Fingerprint = new struct Vendor::Fingerprint();
- string Origin = Block.Find("Origin");
-
- Fingerprint->Print = Block.Find("Fingerprint");
- Fingerprint->Description = Block.Find("Name");
- Fingerprints->push_back(Fingerprint);
-
- if (Fingerprint->Print.empty() || Fingerprint->Description.empty())
- {
- _error->Error(_("Vendor block %s contains no fingerprint"), VendorID.c_str());
- delete Fingerprints;
- continue;
- }
- if (_config->FindB("Debug::sourceList", false))
- std::cerr << "Adding vendor with ID: " << VendorID
- << " Fingerprint: " << Fingerprint->Print << std::endl;
-
- VendorList.push_back(new Vendor(VendorID, Origin, Fingerprints));
- }
-
- /* Process 'group-key' type sections */
- Top = Cnf.Tree("group-key");
- for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next)
- {
-// Configuration Block(Top);
-// vector<Vendor::Fingerprint *> Fingerprints;
-// string VendorID = Top->Tag;
-
-// while (Block->Next)
-// {
-// struct Vendor::Fingerprint Fingerprint = new struct Vendor::Fingerprint;
-// Fingerprint->Print = Block.Find("Fingerprint");
-// Fingerprint->Description = Block.Find("Name");
-// if (Fingerprint->print.empty() || Fingerprint->Description.empty())
-// {
-// _error->Error(_("Vendor block %s is invalid"),
-// Vendor->VendorID.c_str());
-// delete Fingerprint;
-// break;
-// }
-// Block = Block->Next->Next;
-// }
-// if (_error->PendingError())
-// {
-// for (vector <struct Vendor::Fingerprint *>::iterator I = Fingerprints.begin();
-// I != Fingerprints.end(); I++)
-// delete *I;
-// delete Fingerprints;
-// continue;
-// }
-
-// VendorList.push_back(new Vendor(VendorID, Fingerprints));
- }
-
- return !_error->PendingError();
-}
- /*}}}*/
-const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint) /*{{{*/
-{
- for (const_iterator I = VendorList.begin(); I != VendorList.end(); ++I)
- {
- if ((*I)->LookupFingerprint(Fingerprint) != "")
- return *I;
- }
-
- return NULL;
-}
- /*}}}*/
-const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput) /*{{{*/
-{
- for (std::vector<string>::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); ++I)
- {
- string::size_type pos = (*I).find("VALIDSIG ");
- if (_config->FindB("Debug::Vendor", false))
- std::cerr << "Looking for VALIDSIG in \"" << (*I) << "\": pos " << pos << std::endl;
- if (pos != std::string::npos)
- {
- string Fingerprint = (*I).substr(pos+sizeof("VALIDSIG"));
- if (_config->FindB("Debug::Vendor", false))
- std::cerr << "Looking for \"" << Fingerprint << "\" in vendor..." << std::endl;
- const Vendor* vendor = this->LookupFingerprint(Fingerprint);
- if (vendor != NULL)
- return vendor;
- }
- }
-
- return NULL;
-}
- /*}}}*/
-
-APT_IGNORE_DEPRECATED_POP
diff --git a/apt-pkg/vendorlist.h b/apt-pkg/vendorlist.h
deleted file mode 100644
index bc3702a93..000000000
--- a/apt-pkg/vendorlist.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// -*- mode: cpp; mode: fold -*-
-// Description /*{{{*/
-// $Id: vendorlist.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $
-/* ######################################################################
-
- VendorList - Manage a list of vendors
-
- The Vendor List class provides access to a list of vendors and
- attributes associated with them, read from a configuration file.
-
- ##################################################################### */
- /*}}}*/
-#ifndef PKGLIB_VENDORLIST_H
-#define PKGLIB_VENDORLIST_H
-
-#include <string>
-#include <vector>
-#include <apt-pkg/macros.h>
-
-#ifndef APT_8_CLEANER_HEADERS
-#include <apt-pkg/vendor.h>
-#include <apt-pkg/configuration.h>
-using std::string;
-using std::vector;
-#endif
-
-class Vendor;
-class Configuration;
-
-class APT_DEPRECATED pkgVendorList
-{
- protected:
- std::vector<Vendor const *> VendorList;
-
- bool CreateList(Configuration& Cnf);
- const Vendor* LookupFingerprint(std::string Fingerprint);
-
- public:
- typedef std::vector<Vendor const *>::const_iterator const_iterator;
- bool ReadMainList();
- bool Read(std::string File);
-
- // List accessors
- inline const_iterator begin() const {return VendorList.begin();};
- inline const_iterator end() const {return VendorList.end();};
- inline unsigned int size() const {return VendorList.size();};
- inline bool empty() const {return VendorList.empty();};
-
- const Vendor* FindVendor(const std::vector<std::string> GPGVOutput);
-
- ~pkgVendorList();
-};
-
-#endif
diff --git a/apt-pkg/version.cc b/apt-pkg/version.cc
index 29bee46da..f32d39a69 100644
--- a/apt-pkg/version.cc
+++ b/apt-pkg/version.cc
@@ -40,3 +40,6 @@ pkgVersioningSystem *pkgVersioningSystem::GetVS(const char *Label)
return 0;
}
/*}}}*/
+
+
+pkgVersioningSystem::~pkgVersioningSystem() {}
diff --git a/apt-pkg/version.h b/apt-pkg/version.h
index d98809f7e..5110ecaa7 100644
--- a/apt-pkg/version.h
+++ b/apt-pkg/version.h
@@ -55,7 +55,7 @@ class pkgVersioningSystem
APT_MKSTRCMP(CmpReleaseVer,DoCmpReleaseVer);
pkgVersioningSystem();
- virtual ~pkgVersioningSystem() {};
+ virtual ~pkgVersioningSystem();
};
#endif
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index 284098bdf..2376ca8fd 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -137,7 +137,10 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type)
// ---------------------------------------------------------------------
/* */
bool pkgVersionMatch::MatchVer(const char *A,string B,bool Prefix)
-{
+{
+ if (A == NULL)
+ return false;
+
const char *Ab = A;
const char *Ae = Ab + strlen(A);
@@ -161,30 +164,45 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg)
pkgCache::VerIterator Ver = Pkg.VersionList();
for (; Ver.end() == false; ++Ver)
{
- if (Type == Version)
- {
- if (MatchVer(Ver.VerStr(),VerStr,VerPrefixMatch) == true)
- return Ver;
- if (ExpressionMatches(VerStr, Ver.VerStr()) == true)
- return Ver;
- continue;
- }
-
- for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; ++VF)
- if (FileMatch(VF.File()) == true)
- return Ver;
+ if (VersionMatches(Ver))
+ return Ver;
}
-
+
// This will be Ended by now.
return Ver;
}
+ /*}}}*/
+
+// VersionMatch::Find - Locate the best match for the select type /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool pkgVersionMatch::VersionMatches(pkgCache::VerIterator Ver)
+{
+ if (Type == Version)
+ {
+ if (MatchVer(Ver.VerStr(),VerStr,VerPrefixMatch) == true)
+ return true;
+ if (ExpressionMatches(VerStr, Ver.VerStr()) == true)
+ return true;
+ return false;
+ }
+
+ for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; ++VF)
+ if (FileMatch(VF.File()) == true)
+ return true;
+
+ return false;
+}
+ /*}}}*/
#ifndef FNM_CASEFOLD
#define FNM_CASEFOLD 0
#endif
-bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string)
+bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string)/*{{{*/
{
+ if (pattern == NULL || string == NULL)
+ return false;
if (pattern[0] == '/') {
size_t length = strlen(pattern);
if (pattern[length - 1] == '/') {
@@ -230,38 +248,30 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File)
return false;
if (RelVerStr.empty() == false)
- if (File->Version == 0 ||
- (MatchVer(File.Version(),RelVerStr,RelVerPrefixMatch) == false &&
- ExpressionMatches(RelVerStr, File.Version()) == false))
+ if (MatchVer(File.Version(),RelVerStr,RelVerPrefixMatch) == false &&
+ ExpressionMatches(RelVerStr, File.Version()) == false)
return false;
if (RelOrigin.empty() == false)
- if (File->Origin == 0 || !ExpressionMatches(RelOrigin,File.Origin()))
+ if (!ExpressionMatches(RelOrigin,File.Origin()))
return false;
if (RelArchive.empty() == false)
- if (File->Archive == 0 ||
- !ExpressionMatches(RelArchive,File.Archive()))
+ if (!ExpressionMatches(RelArchive,File.Archive()))
return false;
if (RelCodename.empty() == false)
- if (File->Codename == 0 ||
- !ExpressionMatches(RelCodename,File.Codename()))
+ if (!ExpressionMatches(RelCodename,File.Codename()))
return false;
if (RelRelease.empty() == false)
- if ((File->Archive == 0 ||
- !ExpressionMatches(RelRelease,File.Archive())) &&
- (File->Codename == 0 ||
- !ExpressionMatches(RelRelease,File.Codename())))
+ if (!ExpressionMatches(RelRelease,File.Archive()) &&
+ !ExpressionMatches(RelRelease,File.Codename()))
return false;
if (RelLabel.empty() == false)
- if (File->Label == 0 ||
- !ExpressionMatches(RelLabel,File.Label()))
+ if (!ExpressionMatches(RelLabel,File.Label()))
return false;
if (RelComponent.empty() == false)
- if (File->Component == 0 ||
- !ExpressionMatches(RelComponent,File.Component()))
+ if (!ExpressionMatches(RelComponent,File.Component()))
return false;
if (RelArchitecture.empty() == false)
- if (File->Architecture == 0 ||
- !ExpressionMatches(RelArchitecture,File.Architecture()))
+ if (!ExpressionMatches(RelArchitecture,File.Architecture()))
return false;
return true;
}
@@ -269,11 +279,11 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File)
if (Type == Origin)
{
if (OrSite.empty() == false) {
- if (File->Site == 0)
- return false;
- } else // so we are talking about file:// or status file
- if (strcmp(File.Site(),"") == 0 && File->Archive != 0 && strcmp(File.Archive(),"now") == 0) // skip the status file
+ if (File.Site() == NULL)
return false;
+ }
+ else if (File->Release == 0)// only 'bad' files like dpkg.status file has no release file
+ return false;
return (ExpressionMatches(OrSite, File.Site())); /* both strings match */
}
diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h
index 4c8f704c8..156ad61cb 100644
--- a/apt-pkg/versionmatch.h
+++ b/apt-pkg/versionmatch.h
@@ -70,10 +70,11 @@ class pkgVersionMatch
enum MatchType {None = 0,Version,Release,Origin} Type;
bool MatchVer(const char *A,std::string B,bool Prefix) APT_PURE;
- bool ExpressionMatches(const char *pattern, const char *string);
- bool ExpressionMatches(const std::string& pattern, const char *string);
+ static bool ExpressionMatches(const char *pattern, const char *string);
+ static bool ExpressionMatches(const std::string& pattern, const char *string);
bool FileMatch(pkgCache::PkgFileIterator File);
pkgCache::VerIterator Find(pkgCache::PkgIterator Pkg);
+ bool VersionMatches(pkgCache::VerIterator Ver);
pkgVersionMatch(std::string Data,MatchType Type);
};
diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc
index 0c606e48e..62b2c13d0 100644
--- a/apt-private/acqprogress.cc
+++ b/apt-private/acqprogress.cc
@@ -49,6 +49,16 @@ void AcqTextStatus::Start()
ID = 1;
}
/*}}}*/
+void AcqTextStatus::AssignItemID(pkgAcquire::ItemDesc &Itm) /*{{{*/
+{
+ /* In theory calling it from Fetch() would be enough, but to be
+ safe we call it from IMSHit and Fail as well.
+ Also, an Item can pass through multiple stages, so ensure
+ that it keeps the same number */
+ if (Itm.Owner->ID == 0)
+ Itm.Owner->ID = ID++;
+}
+ /*}}}*/
// AcqTextStatus::IMSHit - Called when an item got a HIT response /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -57,9 +67,11 @@ void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm)
if (Quiet > 1)
return;
+ AssignItemID(Itm);
clearLastLine();
- out << _("Hit ") << Itm.Description;
+ // TRANSLATOR: Very short word to be displayed before unchanged files in 'apt-get update'
+ ioprintf(out, _("Hit:%lu %s"), Itm.Owner->ID, Itm.Description.c_str());
out << std::endl;
Update = true;
}
@@ -72,15 +84,16 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm)
Update = true;
if (Itm.Owner->Complete == true)
return;
-
- Itm.Owner->ID = ID++;
+ AssignItemID(Itm);
if (Quiet > 1)
return;
clearLastLine();
- out << _("Get:") << Itm.Owner->ID << ' ' << Itm.Description;
+ // TRANSLATOR: Very short word to be displayed for files processed in 'apt-get update'
+ // Potentially replaced later by "Hit:", "Ign:" or "Err:" if something (bad) happens
+ ioprintf(out, _("Get:%lu %s"), Itm.Owner->ID, Itm.Description.c_str());
if (Itm.Owner->FileSize != 0)
out << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
out << std::endl;
@@ -89,9 +102,10 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm)
// AcqTextStatus::Done - Completed a download /*{{{*/
// ---------------------------------------------------------------------
/* We don't display anything... */
-void AcqTextStatus::Done(pkgAcquire::ItemDesc &/*Itm*/)
+void AcqTextStatus::Done(pkgAcquire::ItemDesc &Itm)
{
Update = true;
+ AssignItemID(Itm);
}
/*}}}*/
// AcqTextStatus::Fail - Called when an item fails to download /*{{{*/
@@ -102,23 +116,25 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm)
if (Quiet > 1)
return;
- // Ignore certain kinds of transient failures (bad code)
- if (Itm.Owner->Status == pkgAcquire::Item::StatIdle)
- return;
-
+ AssignItemID(Itm);
clearLastLine();
- if (Itm.Owner->Status == pkgAcquire::Item::StatDone)
+ if (Itm.Owner->Status == pkgAcquire::Item::StatDone || Itm.Owner->Status == pkgAcquire::Item::StatIdle)
{
- out << _("Ign ") << Itm.Description << std::endl;
+ // TRANSLATOR: Very short word to be displayed for files in 'apt-get update'
+ // which failed to download, but the error is ignored (compare "Err:")
+ ioprintf(out, _("Ign:%lu %s"), Itm.Owner->ID, Itm.Description.c_str());
if (Itm.Owner->ErrorText.empty() == false &&
_config->FindB("Acquire::Progress::Ignore::ShowErrorText", false) == true)
- out << " " << Itm.Owner->ErrorText << std::endl;
+ out << std::endl << " " << Itm.Owner->ErrorText;
+ out << std::endl;
}
else
{
- out << _("Err ") << Itm.Description << std::endl;
- out << " " << Itm.Owner->ErrorText << std::endl;
+ // TRANSLATOR: Very short word to be displayed for files in 'apt-get update'
+ // which failed to download and the error is critical (compare "Ign:")
+ ioprintf(out, _("Err:%lu %s"), Itm.Owner->ID, Itm.Description.c_str());
+ out << std::endl << " " << Itm.Owner->ErrorText << std::endl;
}
Update = true;
@@ -280,7 +296,7 @@ bool AcqTextStatus::MediaChange(std::string Media, std::string Drive)
clearLastLine();
ioprintf(out,_("Media change: please insert the disc labeled\n"
" '%s'\n"
- "in the drive '%s' and press enter\n"),
+ "in the drive '%s' and press [Enter]\n"),
Media.c_str(),Drive.c_str());
char C = 0;
diff --git a/apt-private/acqprogress.h b/apt-private/acqprogress.h
index 7cf990c65..6b6d555b1 100644
--- a/apt-private/acqprogress.h
+++ b/apt-private/acqprogress.h
@@ -23,19 +23,20 @@ class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus
unsigned long ID;
unsigned long Quiet;
- void clearLastLine();
+ APT_HIDDEN void clearLastLine();
+ APT_HIDDEN void AssignItemID(pkgAcquire::ItemDesc &Itm);
public:
- virtual bool MediaChange(std::string Media,std::string Drive);
- virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
- virtual void Fetch(pkgAcquire::ItemDesc &Itm);
- virtual void Done(pkgAcquire::ItemDesc &Itm);
- virtual void Fail(pkgAcquire::ItemDesc &Itm);
- virtual void Start();
- virtual void Stop();
+ virtual bool MediaChange(std::string Media,std::string Drive) APT_OVERRIDE;
+ virtual void IMSHit(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
+ virtual void Fetch(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
+ virtual void Done(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
+ virtual void Fail(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
+ virtual void Start() APT_OVERRIDE;
+ virtual void Stop() APT_OVERRIDE;
- bool Pulse(pkgAcquire *Owner);
+ bool Pulse(pkgAcquire *Owner) APT_OVERRIDE;
AcqTextStatus(std::ostream &out, unsigned int &ScreenWidth,unsigned int const Quiet);
};
diff --git a/apt-private/private-cachefile.cc b/apt-private/private-cachefile.cc
index 29e665245..32cad1c33 100644
--- a/apt-private/private-cachefile.cc
+++ b/apt-private/private-cachefile.cc
@@ -7,7 +7,7 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/cacheset.h>
#include <apt-private/private-output.h>
#include <apt-private/private-cachefile.h>
@@ -21,39 +21,40 @@
using namespace std;
-// CacheFile::NameComp - QSort compare by name /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgCache *CacheFile::SortCache = 0;
-int CacheFile::NameComp(const void *a,const void *b)
+static bool SortPackagesByName(pkgCache * const Owner,
+ map_pointer_t const A, map_pointer_t const B)
{
- if (*(pkgCache::Package **)a == 0 || *(pkgCache::Package **)b == 0)
- return *(pkgCache::Package **)a - *(pkgCache::Package **)b;
-
- const pkgCache::Package &A = **(pkgCache::Package **)a;
- const pkgCache::Package &B = **(pkgCache::Package **)b;
- const pkgCache::Group * const GA = SortCache->GrpP + A.Group;
- const pkgCache::Group * const GB = SortCache->GrpP + B.Group;
-
- return strcmp(SortCache->StrP + GA->Name,SortCache->StrP + GB->Name);
+ if (A == 0)
+ return false;
+ if (B == 0 || A == B)
+ return true;
+ pkgCache::Group const * const GA = Owner->GrpP + A;
+ pkgCache::Group const * const GB = Owner->GrpP + B;
+ return strcmp(Owner->StrP + GA->Name, Owner->StrP + GB->Name) <= 0;
}
- /*}}}*/
-// CacheFile::Sort - Sort by name /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void CacheFile::Sort()
+SortedPackageUniverse::SortedPackageUniverse(CacheFile &Cache) :
+ PackageUniverse{Cache}, List(Cache.UniverseList)
{
- delete [] List;
- List = new pkgCache::Package *[Cache->Head().PackageCount];
- memset(List,0,sizeof(*List)*Cache->Head().PackageCount);
- pkgCache::PkgIterator I = Cache->PkgBegin();
- for (;I.end() != true; ++I)
- List[I->ID] = I;
-
- SortCache = *this;
- qsort(List,Cache->Head().PackageCount,sizeof(*List),NameComp);
}
- /*}}}*/
+void SortedPackageUniverse::LazyInit() const
+{
+ if (List.empty() == false)
+ return;
+ pkgCache * const Owner = data();
+ // In Multi-Arch systems Grps are easier to sort than Pkgs
+ std::vector<map_pointer_t> GrpList;
+ List.reserve(Owner->Head().GroupCount);
+ for (pkgCache::GrpIterator I{Owner->GrpBegin()}; I.end() != true; ++I)
+ GrpList.emplace_back(I - Owner->GrpP);
+ std::stable_sort(GrpList.begin(), GrpList.end(), std::bind( &SortPackagesByName, Owner, std::placeholders::_1, std::placeholders::_2 ));
+ List.reserve(Owner->Head().PackageCount);
+ for (auto G : GrpList)
+ {
+ pkgCache::GrpIterator const Grp(*Owner, Owner->GrpP + G);
+ for (pkgCache::PkgIterator P = Grp.PackageList(); P.end() != true; P = Grp.NextPkg(P))
+ List.emplace_back(P - Owner->PkgP);
+ }
+}
// CacheFile::CheckDeps - Open the cache file /*{{{*/
// ---------------------------------------------------------------------
/* This routine generates the caches and then opens the dependency cache
diff --git a/apt-private/private-cachefile.h b/apt-private/private-cachefile.h
index 1fddabfbd..51703b0ad 100644
--- a/apt-private/private-cachefile.h
+++ b/apt-private/private-cachefile.h
@@ -7,32 +7,16 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/sourcelist.h>
-#include <apti18n.h>
-
-// FIXME: we need to find a way to export this
-class APT_PUBLIC SourceList : public pkgSourceList
-{
-
- public:
- // Add custom metaIndex (e.g. local files)
- void AddMetaIndex(metaIndex *mi) {
- SrcList.push_back(mi);
- }
+#include <apt-pkg/cacheset.h>
-};
+#include <apti18n.h>
// class CacheFile - Cover class for some dependency cache functions /*{{{*/
-// ---------------------------------------------------------------------
-/* */
class APT_PUBLIC CacheFile : public pkgCacheFile
{
- static pkgCache *SortCache;
- APT_HIDDEN static int NameComp(const void *a,const void *b) APT_PURE;
-
public:
- pkgCache::Package **List;
-
- void Sort();
+ std::vector<map_pointer_t> UniverseList;
+
bool CheckDeps(bool AllowBroken = false);
bool BuildCaches(bool WithLock = true)
{
@@ -41,24 +25,10 @@ class APT_PUBLIC CacheFile : public pkgCacheFile
return false;
return true;
}
- // FIXME: this can go once the "libapt-pkg" pkgSourceList has a way
- // to add custom metaIndexes (or custom local files or so)
- bool BuildSourceList(OpProgress */*Progress*/ = NULL) {
- if (SrcList != NULL)
- return true;
- SrcList = new SourceList();
- if (SrcList->ReadMainList() == false)
- return _error->Error(_("The list of sources could not be read."));
- return true;
- }
- bool Open(bool WithLock = true)
+ bool Open(bool WithLock = true)
{
OpTextProgress Prog(*_config);
- if (pkgCacheFile::Open(&Prog,WithLock) == false)
- return false;
- Sort();
-
- return true;
+ return pkgCacheFile::Open(&Prog,WithLock);
};
bool OpenForInstall()
{
@@ -67,11 +37,38 @@ class APT_PUBLIC CacheFile : public pkgCacheFile
else
return Open(true);
}
- CacheFile() : List(0) {};
- ~CacheFile() {
- delete[] List;
- }
};
/*}}}*/
+class SortedPackageUniverse : public APT::PackageUniverse
+{
+ std::vector<map_pointer_t> &List;
+ void LazyInit() const;
+
+public:
+ SortedPackageUniverse(CacheFile &Cache);
+
+ class const_iterator : public APT::Container_iterator_base<APT::PackageContainerInterface, SortedPackageUniverse, SortedPackageUniverse::const_iterator, std::vector<map_pointer_t>::const_iterator, pkgCache::PkgIterator>
+ {
+ pkgCache * const Cache;
+ public:
+ inline pkgCache::PkgIterator getType(void) const
+ {
+ if (*_iter == 0) return pkgCache::PkgIterator(*Cache);
+ return pkgCache::PkgIterator(*Cache, Cache->PkgP + *_iter);
+ }
+ explicit const_iterator(pkgCache * const Owner, std::vector<map_pointer_t>::const_iterator i):
+ Container_iterator_base<APT::PackageContainerInterface, SortedPackageUniverse, SortedPackageUniverse::const_iterator, std::vector<map_pointer_t>::const_iterator, pkgCache::PkgIterator>(i), Cache(Owner) {}
+
+ };
+ typedef const_iterator iterator;
+
+ const_iterator begin() const { LazyInit(); return const_iterator(data(), List.begin()); }
+ const_iterator end() const { LazyInit(); return const_iterator(data(), List.end()); }
+ const_iterator cbegin() const { LazyInit(); return const_iterator(data(), List.begin()); }
+ const_iterator cend() const { LazyInit(); return const_iterator(data(), List.end()); }
+ iterator begin() { LazyInit(); return iterator(data(), List.begin()); }
+ iterator end() { LazyInit(); return iterator(data(), List.end()); }
+};
+
#endif
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc
index cb68024db..8db736507 100644
--- a/apt-private/private-cacheset.cc
+++ b/apt-private/private-cacheset.cc
@@ -4,9 +4,11 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/policy.h>
+#include <apt-pkg/strutl.h>
#include <apt-private/private-cacheset.h>
@@ -14,7 +16,7 @@
#include <apti18n.h>
-bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
+bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile, /*{{{*/
APT::VersionContainerInterface * const vci,
OpProgress * const progress)
{
@@ -22,7 +24,6 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
return GetLocalitySortedVersionSet(CacheFile, vci,
null_matcher, progress);
}
-
bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
APT::VersionContainerInterface * const vci,
Matcher &matcher,
@@ -88,3 +89,207 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
progress->Done();
return true;
}
+ /*}}}*/
+
+// CacheSetHelper saving virtual packages /*{{{*/
+pkgCache::VerIterator CacheSetHelperVirtuals::canNotGetVersion(
+ enum CacheSetHelper::VerSelector const select,
+ pkgCacheFile &Cache,
+ pkgCache::PkgIterator const &Pkg)
+{
+ if (select == NEWEST || select == CANDIDATE || select == ALL)
+ virtualPkgs.insert(Pkg);
+ return CacheSetHelper::canNotGetVersion(select, Cache, Pkg);
+}
+void CacheSetHelperVirtuals::canNotFindVersion(
+ enum CacheSetHelper::VerSelector const select,
+ APT::VersionContainerInterface * vci,
+ pkgCacheFile &Cache,
+ pkgCache::PkgIterator const &Pkg)
+{
+ if (select == NEWEST || select == CANDIDATE || select == ALL)
+ virtualPkgs.insert(Pkg);
+ return CacheSetHelper::canNotFindVersion(select, vci, Cache, Pkg);
+}
+CacheSetHelperVirtuals::CacheSetHelperVirtuals(bool const ShowErrors, GlobalError::MsgType const &ErrorType) :
+ CacheSetHelper{ShowErrors, ErrorType}
+{}
+ /*}}}*/
+
+// CacheSetHelperAPTGet - responsible for message telling from the CacheSets/*{{{*/
+CacheSetHelperAPTGet::CacheSetHelperAPTGet(std::ostream &out) :
+ APT::CacheSetHelper{true}, out(out)
+{
+ explicitlyNamed = true;
+}
+void CacheSetHelperAPTGet::showTaskSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern)
+{
+ ioprintf(out, _("Note, selecting '%s' for task '%s'\n"),
+ Pkg.FullName(true).c_str(), pattern.c_str());
+ explicitlyNamed = false;
+}
+void CacheSetHelperAPTGet::showFnmatchSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern)
+{
+ ioprintf(out, _("Note, selecting '%s' for glob '%s'\n"),
+ Pkg.FullName(true).c_str(), pattern.c_str());
+ explicitlyNamed = false;
+}
+void CacheSetHelperAPTGet::showRegExSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern)
+{
+ ioprintf(out, _("Note, selecting '%s' for regex '%s'\n"),
+ Pkg.FullName(true).c_str(), pattern.c_str());
+ explicitlyNamed = false;
+}
+void CacheSetHelperAPTGet::showSelectedVersion(pkgCache::PkgIterator const &/*Pkg*/, pkgCache::VerIterator const Ver,
+ std::string const &ver, bool const /*verIsRel*/)
+{
+ if (ver == Ver.VerStr())
+ return;
+ selectedByRelease.push_back(make_pair(Ver, ver));
+}
+bool CacheSetHelperAPTGet::showVirtualPackageErrors(pkgCacheFile &Cache)
+{
+ if (virtualPkgs.empty() == true)
+ return true;
+ for (APT::PackageSet::const_iterator Pkg = virtualPkgs.begin();
+ Pkg != virtualPkgs.end(); ++Pkg) {
+ if (Pkg->ProvidesList != 0) {
+ ioprintf(c1out,_("Package %s is a virtual package provided by:\n"),
+ Pkg.FullName(true).c_str());
+
+ pkgCache::PrvIterator I = Pkg.ProvidesList();
+ unsigned short provider = 0;
+ for (; I.end() == false; ++I) {
+ pkgCache::PkgIterator Pkg = I.OwnerPkg();
+
+ if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer()) {
+ c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr();
+ if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false)
+ c1out << _(" [Installed]");
+ c1out << std::endl;
+ ++provider;
+ }
+ }
+ // if we found no candidate which provide this package, show non-candidates
+ if (provider == 0)
+ for (I = Pkg.ProvidesList(); I.end() == false; ++I)
+ c1out << " " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr()
+ << _(" [Not candidate version]") << std::endl;
+ else
+ out << _("You should explicitly select one to install.") << std::endl;
+ } else {
+ ioprintf(c1out,
+ _("Package %s is not available, but is referred to by another package.\n"
+ "This may mean that the package is missing, has been obsoleted, or\n"
+ "is only available from another source\n"),Pkg.FullName(true).c_str());
+
+ std::string List;
+ std::string VersionsList;
+ std::vector<bool> Seen(Cache.GetPkgCache()->Head().PackageCount, false);
+ APT::PackageList pkglist;
+ for (pkgCache::DepIterator Dep = Pkg.RevDependsList();
+ Dep.end() == false; ++Dep) {
+ if (Dep->Type != pkgCache::Dep::Replaces)
+ continue;
+ pkgCache::PkgIterator const DP = Dep.ParentPkg();
+ if (Seen[DP->ID] == true)
+ continue;
+ Seen[DP->ID] = true;
+ pkglist.insert(DP);
+ }
+ ShowList(c1out, _("However the following packages replace it:"), pkglist,
+ &AlwaysTrue, &PrettyFullName, &EmptyString);
+ }
+ c1out << std::endl;
+ }
+ return false;
+}
+pkgCache::VerIterator CacheSetHelperAPTGet::canNotFindCandidateVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg)
+{
+ APT::VersionSet const verset = tryVirtualPackage(Cache, Pkg, CacheSetHelper::CANDIDATE);
+ if (verset.empty() == false)
+ return *(verset.begin());
+ else if (ShowError == true) {
+ _error->Error(_("Package '%s' has no installation candidate"),Pkg.FullName(true).c_str());
+ virtualPkgs.insert(Pkg);
+ }
+ return pkgCache::VerIterator(Cache, 0);
+}
+pkgCache::VerIterator CacheSetHelperAPTGet::canNotFindNewestVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg)
+{
+ if (Pkg->ProvidesList != 0)
+ {
+ APT::VersionSet const verset = tryVirtualPackage(Cache, Pkg, CacheSetHelper::NEWEST);
+ if (verset.empty() == false)
+ return *(verset.begin());
+ if (ShowError == true)
+ ioprintf(out, _("Virtual packages like '%s' can't be removed\n"), Pkg.FullName(true).c_str());
+ }
+ else
+ {
+ pkgCache::GrpIterator Grp = Pkg.Group();
+ pkgCache::PkgIterator P = Grp.PackageList();
+ for (; P.end() != true; P = Grp.NextPkg(P))
+ {
+ if (P == Pkg)
+ continue;
+ if (P->CurrentVer != 0) {
+ // TRANSLATORS: Note, this is not an interactive question
+ ioprintf(c1out,_("Package '%s' is not installed, so not removed. Did you mean '%s'?\n"),
+ Pkg.FullName(true).c_str(), P.FullName(true).c_str());
+ break;
+ }
+ }
+ if (P.end() == true)
+ ioprintf(c1out,_("Package '%s' is not installed, so not removed\n"),Pkg.FullName(true).c_str());
+ }
+ return pkgCache::VerIterator(Cache, 0);
+}
+APT::VersionSet CacheSetHelperAPTGet::tryVirtualPackage(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg,
+ CacheSetHelper::VerSelector const select)
+{
+ /* This is a pure virtual package and there is a single available
+ candidate providing it. */
+ if (unlikely(Cache[Pkg].CandidateVer != 0) || Pkg->ProvidesList == 0)
+ return APT::VersionSet();
+
+ pkgCache::PkgIterator Prov;
+ bool found_one = false;
+ for (pkgCache::PrvIterator P = Pkg.ProvidesList(); P; ++P) {
+ pkgCache::VerIterator const PVer = P.OwnerVer();
+ pkgCache::PkgIterator const PPkg = PVer.ParentPkg();
+
+ /* Ignore versions that are not a candidate. */
+ if (Cache[PPkg].CandidateVer != PVer)
+ continue;
+
+ if (found_one == false) {
+ Prov = PPkg;
+ found_one = true;
+ } else if (PPkg != Prov) {
+ // same group, so it's a foreign package
+ if (PPkg->Group == Prov->Group) {
+ // do we already have the requested arch?
+ if (strcmp(Pkg.Arch(), Prov.Arch()) == 0 ||
+ strcmp(Prov.Arch(), "all") == 0 ||
+ unlikely(strcmp(PPkg.Arch(), Prov.Arch()) == 0)) // packages have only on candidate, but just to be sure
+ continue;
+ // see which architecture we prefer more and switch to it
+ std::vector<std::string> archs = APT::Configuration::getArchitectures();
+ if (std::find(archs.begin(), archs.end(), PPkg.Arch()) < std::find(archs.begin(), archs.end(), Prov.Arch()))
+ Prov = PPkg;
+ continue;
+ }
+ found_one = false; // we found at least two
+ break;
+ }
+ }
+
+ if (found_one == true) {
+ ioprintf(out, _("Note, selecting '%s' instead of '%s'\n"),
+ Prov.FullName(true).c_str(), Pkg.FullName(true).c_str());
+ return APT::VersionSet::FromPackage(Cache, Prov, select, *this);
+ }
+ return APT::VersionSet();
+}
+ /*}}}*/
diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h
index 059c7637e..892993e58 100644
--- a/apt-private/private-cacheset.h
+++ b/apt-private/private-cacheset.h
@@ -1,55 +1,48 @@
#ifndef APT_PRIVATE_CACHESET_H
#define APT_PRIVATE_CACHESET_H
-#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/cachefile.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/sptr.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/depcache.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/macros.h>
-#include <algorithm>
+#include <apt-private/private-output.h>
+
#include <vector>
-#include <string.h>
#include <list>
-#include <ostream>
#include <set>
#include <string>
-#include <utility>
-
-#include "private-output.h"
#include <apti18n.h>
class OpProgress;
-struct VersionSortDescriptionLocality
+struct APT_PUBLIC VersionSortDescriptionLocality /*{{{*/
{
- bool operator () (const pkgCache::VerIterator &v_lhs,
- const pkgCache::VerIterator &v_rhs)
- {
- pkgCache::DescFile *A = v_lhs.TranslatedDescription().FileList();
- pkgCache::DescFile *B = v_rhs.TranslatedDescription().FileList();
- if (A == 0 && B == 0)
- return false;
+ bool operator () (const pkgCache::VerIterator &v_lhs,
+ const pkgCache::VerIterator &v_rhs)
+ {
+ pkgCache::DescFile const *A = nullptr;
+ pkgCache::DescFile const *B = nullptr;
+ if (v_lhs->DescriptionList != 0)
+ A = v_lhs.TranslatedDescription().FileList();
+ if (v_rhs->DescriptionList != 0)
+ B = v_rhs.TranslatedDescription().FileList();
- if (A == 0)
- return true;
+ if (A == nullptr && B == nullptr)
+ return false;
- if (B == 0)
- return false;
+ if (A == nullptr)
+ return true;
- if (A->File == B->File)
- return A->Offset < B->Offset;
+ if (B == nullptr)
+ return false;
- return A->File < B->File;
- }
-};
+ if (A->File == B->File)
+ return A->Offset < B->Offset;
+ return A->File < B->File;
+ }
+};
+ /*}}}*/
// sorted by locality which makes iterating much faster
typedef APT::VersionContainer<
std::set<pkgCache::VerIterator,
@@ -72,28 +65,19 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
// CacheSetHelper saving virtual packages /*{{{*/
-class CacheSetHelperVirtuals: public APT::CacheSetHelper {
+class APT_PUBLIC CacheSetHelperVirtuals: public APT::CacheSetHelper {
public:
APT::PackageSet virtualPkgs;
- virtual pkgCache::VerIterator canNotGetVersion(enum CacheSetHelper::VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
- if (select == NEWEST || select == CANDIDATE || select == ALL)
- virtualPkgs.insert(Pkg);
- return CacheSetHelper::canNotGetVersion(select, Cache, Pkg);
- }
+ virtual pkgCache::VerIterator canNotGetVersion(enum CacheSetHelper::VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual void canNotFindVersion(enum CacheSetHelper::VerSelector const select, APT::VersionContainerInterface * vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
- virtual void canNotFindVersion(enum CacheSetHelper::VerSelector const select, APT::VersionContainerInterface * vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
- if (select == NEWEST || select == CANDIDATE || select == ALL)
- virtualPkgs.insert(Pkg);
- return CacheSetHelper::canNotFindVersion(select, vci, Cache, Pkg);
- }
-
- CacheSetHelperVirtuals(bool const ShowErrors = true, GlobalError::MsgType const &ErrorType = GlobalError::NOTICE) : CacheSetHelper(ShowErrors, ErrorType) {}
+ CacheSetHelperVirtuals(bool const ShowErrors = true, GlobalError::MsgType const &ErrorType = GlobalError::NOTICE);
};
/*}}}*/
// CacheSetHelperAPTGet - responsible for message telling from the CacheSets/*{{{*/
-class CacheSetHelperAPTGet : public APT::CacheSetHelper {
+class APT_PUBLIC CacheSetHelperAPTGet : public APT::CacheSetHelper {
/** \brief stream message should be printed to */
std::ostream &out;
/** \brief were things like Task or RegEx used to select packages? */
@@ -104,178 +88,22 @@ class CacheSetHelperAPTGet : public APT::CacheSetHelper {
public:
std::list<std::pair<pkgCache::VerIterator, std::string> > selectedByRelease;
- CacheSetHelperAPTGet(std::ostream &out) : APT::CacheSetHelper(true), out(out) {
- explicitlyNamed = true;
- }
+ CacheSetHelperAPTGet(std::ostream &out);
- virtual void showTaskSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) {
- ioprintf(out, _("Note, selecting '%s' for task '%s'\n"),
- Pkg.FullName(true).c_str(), pattern.c_str());
- explicitlyNamed = false;
- }
- virtual void showFnmatchSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) {
- ioprintf(out, _("Note, selecting '%s' for glob '%s'\n"),
- Pkg.FullName(true).c_str(), pattern.c_str());
- explicitlyNamed = false;
- }
- virtual void showRegExSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) {
- ioprintf(out, _("Note, selecting '%s' for regex '%s'\n"),
- Pkg.FullName(true).c_str(), pattern.c_str());
- explicitlyNamed = false;
- }
+ virtual void showTaskSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) APT_OVERRIDE;
+ virtual void showFnmatchSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) APT_OVERRIDE;
+ virtual void showRegExSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) APT_OVERRIDE;
virtual void showSelectedVersion(pkgCache::PkgIterator const &/*Pkg*/, pkgCache::VerIterator const Ver,
- std::string const &ver, bool const /*verIsRel*/) {
- if (ver == Ver.VerStr())
- return;
- selectedByRelease.push_back(make_pair(Ver, ver));
- }
-
- bool showVirtualPackageErrors(pkgCacheFile &Cache) {
- if (virtualPkgs.empty() == true)
- return true;
- for (APT::PackageSet::const_iterator Pkg = virtualPkgs.begin();
- Pkg != virtualPkgs.end(); ++Pkg) {
- if (Pkg->ProvidesList != 0) {
- ioprintf(c1out,_("Package %s is a virtual package provided by:\n"),
- Pkg.FullName(true).c_str());
+ std::string const &ver, bool const /*verIsRel*/) APT_OVERRIDE;
+ bool showVirtualPackageErrors(pkgCacheFile &Cache);
- pkgCache::PrvIterator I = Pkg.ProvidesList();
- unsigned short provider = 0;
- for (; I.end() == false; ++I) {
- pkgCache::PkgIterator Pkg = I.OwnerPkg();
-
- if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer()) {
- c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr();
- if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false)
- c1out << _(" [Installed]");
- c1out << std::endl;
- ++provider;
- }
- }
- // if we found no candidate which provide this package, show non-candidates
- if (provider == 0)
- for (I = Pkg.ProvidesList(); I.end() == false; ++I)
- c1out << " " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr()
- << _(" [Not candidate version]") << std::endl;
- else
- out << _("You should explicitly select one to install.") << std::endl;
- } else {
- ioprintf(c1out,
- _("Package %s is not available, but is referred to by another package.\n"
- "This may mean that the package is missing, has been obsoleted, or\n"
- "is only available from another source\n"),Pkg.FullName(true).c_str());
-
- std::string List;
- std::string VersionsList;
- SPtrArray<bool> Seen = new bool[Cache.GetPkgCache()->Head().PackageCount];
- memset(Seen,0,Cache.GetPkgCache()->Head().PackageCount*sizeof(*Seen));
- for (pkgCache::DepIterator Dep = Pkg.RevDependsList();
- Dep.end() == false; ++Dep) {
- if (Dep->Type != pkgCache::Dep::Replaces)
- continue;
- if (Seen[Dep.ParentPkg()->ID] == true)
- continue;
- Seen[Dep.ParentPkg()->ID] = true;
- List += Dep.ParentPkg().FullName(true) + " ";
- //VersionsList += std::string(Dep.ParentPkg().CurVersion) + "\n"; ???
- }
- ShowList(c1out,_("However the following packages replace it:"),List,VersionsList);
- }
- c1out << std::endl;
- }
- return false;
- }
-
- virtual pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
- APT::VersionSet const verset = tryVirtualPackage(Cache, Pkg, CacheSetHelper::CANDIDATE);
- if (verset.empty() == false)
- return *(verset.begin());
- else if (ShowError == true) {
- _error->Error(_("Package '%s' has no installation candidate"),Pkg.FullName(true).c_str());
- virtualPkgs.insert(Pkg);
- }
- return pkgCache::VerIterator(Cache, 0);
- }
-
- virtual pkgCache::VerIterator canNotFindNewestVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
- if (Pkg->ProvidesList != 0)
- {
- APT::VersionSet const verset = tryVirtualPackage(Cache, Pkg, CacheSetHelper::NEWEST);
- if (verset.empty() == false)
- return *(verset.begin());
- if (ShowError == true)
- ioprintf(out, _("Virtual packages like '%s' can't be removed\n"), Pkg.FullName(true).c_str());
- }
- else
- {
- pkgCache::GrpIterator Grp = Pkg.Group();
- pkgCache::PkgIterator P = Grp.PackageList();
- for (; P.end() != true; P = Grp.NextPkg(P))
- {
- if (P == Pkg)
- continue;
- if (P->CurrentVer != 0) {
- // TRANSLATORS: Note, this is not an interactive question
- ioprintf(c1out,_("Package '%s' is not installed, so not removed. Did you mean '%s'?\n"),
- Pkg.FullName(true).c_str(), P.FullName(true).c_str());
- break;
- }
- }
- if (P.end() == true)
- ioprintf(c1out,_("Package '%s' is not installed, so not removed\n"),Pkg.FullName(true).c_str());
- }
- return pkgCache::VerIterator(Cache, 0);
- }
+ virtual pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
+ virtual pkgCache::VerIterator canNotFindNewestVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
APT::VersionSet tryVirtualPackage(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg,
- CacheSetHelper::VerSelector const select) {
- /* This is a pure virtual package and there is a single available
- candidate providing it. */
- if (unlikely(Cache[Pkg].CandidateVer != 0) || Pkg->ProvidesList == 0)
- return APT::VersionSet();
-
- pkgCache::PkgIterator Prov;
- bool found_one = false;
- for (pkgCache::PrvIterator P = Pkg.ProvidesList(); P; ++P) {
- pkgCache::VerIterator const PVer = P.OwnerVer();
- pkgCache::PkgIterator const PPkg = PVer.ParentPkg();
-
- /* Ignore versions that are not a candidate. */
- if (Cache[PPkg].CandidateVer != PVer)
- continue;
-
- if (found_one == false) {
- Prov = PPkg;
- found_one = true;
- } else if (PPkg != Prov) {
- // same group, so it's a foreign package
- if (PPkg->Group == Prov->Group) {
- // do we already have the requested arch?
- if (strcmp(Pkg.Arch(), Prov.Arch()) == 0 ||
- strcmp(Prov.Arch(), "all") == 0 ||
- unlikely(strcmp(PPkg.Arch(), Prov.Arch()) == 0)) // packages have only on candidate, but just to be sure
- continue;
- // see which architecture we prefer more and switch to it
- std::vector<std::string> archs = APT::Configuration::getArchitectures();
- if (std::find(archs.begin(), archs.end(), PPkg.Arch()) < std::find(archs.begin(), archs.end(), Prov.Arch()))
- Prov = PPkg;
- continue;
- }
- found_one = false; // we found at least two
- break;
- }
- }
-
- if (found_one == true) {
- ioprintf(out, _("Note, selecting '%s' instead of '%s'\n"),
- Prov.FullName(true).c_str(), Pkg.FullName(true).c_str());
- return APT::VersionSet::FromPackage(Cache, Prov, select, *this);
- }
- return APT::VersionSet();
- }
+ CacheSetHelper::VerSelector const select);
inline bool allPkgNamedExplicitly() const { return explicitlyNamed; }
-
};
/*}}}*/
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 41aab81f6..3a1564b23 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -51,6 +51,7 @@ static bool addArgumentsAPTCache(std::vector<CommandLine::Args> &Args, char cons
addArg(0, "conflicts", "APT::Cache::ShowConflicts", 0);
addArg(0, "enhances", "APT::Cache::ShowEnhances", 0);
addArg(0, "recurse", "APT::Cache::RecurseDepends", 0);
+ addArg(0, "implicit", "APT::Cache::ShowImplicit", 0);
}
else if (CmdMatches("search"))
{
@@ -163,14 +164,19 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const
// once sbuild is fixed, this option can be removed
addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0);
}
- else if (CmdMatches("clean", "autoclean", "check", "download", "changelog") ||
+ else if (CmdMatches("indextargets"))
+ {
+ addArg(0,"format","APT::Get::IndexTargets::Format", CommandLine::HasArg);
+ addArg(0,"release-info","APT::Get::IndexTargets::ReleaseInfo", 0);
+ }
+ else if (CmdMatches("clean", "autoclean", "auto-clean", "check", "download", "changelog") ||
CmdMatches("markauto", "unmarkauto")) // deprecated commands
;
else if (CmdMatches("moo"))
addArg(0, "color", "APT::Moo::Color", 0);
if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade",
- "dselect-upgrade", "autoremove", "clean", "autoclean", "check",
+ "dselect-upgrade", "autoremove", "auto-remove", "clean", "autoclean", "auto-clean", "check",
"build-dep", "full-upgrade", "source"))
{
addArg('s', "simulate", "APT::Get::Simulate", 0);
@@ -196,6 +202,9 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const
addArg(0,"ignore-hold","APT::Ignore-Hold",0);
addArg(0,"upgrade","APT::Get::upgrade",0);
addArg(0,"only-upgrade","APT::Get::Only-Upgrade",0);
+ addArg(0,"allow-change-held-packages","APT::Get::allow-change-held-packages",CommandLine::Boolean);
+ addArg(0,"allow-remove-essential","APT::Get::allow-remove-essential",CommandLine::Boolean);
+ addArg(0,"allow-downgrades","APT::Get::allow-downgrades",CommandLine::Boolean);
addArg(0,"force-yes","APT::Get::force-yes",0);
addArg(0,"print-uris","APT::Get::Print-URIs",0);
addArg(0,"trivial-only","APT::Get::Trivial-Only",0);
@@ -236,6 +245,7 @@ static bool addArgumentsAPT(std::vector<CommandLine::Args> &Args, char const * c
if (CmdMatches("list"))
{
addArg(0,"installed","APT::Cmd::Installed",0);
+ addArg(0,"upgradeable","APT::Cmd::Upgradable",0);
addArg(0,"upgradable","APT::Cmd::Upgradable",0);
addArg(0,"manual-installed","APT::Cmd::Manual-Installed",0);
addArg('v', "verbose", "APT::Cmd::List-Include-Summary", 0);
diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc
index 37fae18e9..18a9b1fbc 100644
--- a/apt-private/private-download.cc
+++ b/apt-private/private-download.cc
@@ -78,20 +78,23 @@ bool CheckDropPrivsMustBeDisabled(pkgAcquire &Fetcher) /*{{{*/
// CheckAuth - check if each download comes form a trusted source /*{{{*/
bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser)
{
- std::string UntrustedList;
+ std::vector<std::string> UntrustedList;
for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I)
if (!(*I)->IsTrusted())
- UntrustedList += std::string((*I)->ShortDesc()) + " ";
+ UntrustedList.push_back((*I)->ShortDesc());
- if (UntrustedList == "")
+ if (UntrustedList.empty())
return true;
return AuthPrompt(UntrustedList, PromptUser);
}
-bool AuthPrompt(std::string const &UntrustedList, bool const PromptUser)
+bool AuthPrompt(std::vector<std::string> const &UntrustedList, bool const PromptUser)
{
- ShowList(c2out,_("WARNING: The following packages cannot be authenticated!"),UntrustedList,"");
+ ShowList(c2out,_("WARNING: The following packages cannot be authenticated!"), UntrustedList,
+ [](std::string const&) { return true; },
+ [](std::string const&str) { return str; },
+ [](std::string const&) { return ""; });
if (_config->FindB("APT::Get::AllowUnauthenticated",false) == true)
{
@@ -111,10 +114,12 @@ bool AuthPrompt(std::string const &UntrustedList, bool const PromptUser)
return true;
}
- else if (_config->FindB("APT::Get::Force-Yes",false) == true)
+ else if (_config->FindB("APT::Get::Force-Yes",false) == true) {
+ _error->Warning(_("--force-yes is deprecated, use one of the options starting with --allow instead."));
return true;
+ }
- return _error->Error(_("There are problems and -y was used without --force-yes"));
+ return _error->Error(_("There were unauthenticated packages and -y was used without --allow-unauthenticated"));
}
/*}}}*/
bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failure, bool * const TransientNetworkFailure)/*{{{*/
diff --git a/apt-private/private-download.h b/apt-private/private-download.h
index 0a0ac6b95..0f3db5e7a 100644
--- a/apt-private/private-download.h
+++ b/apt-private/private-download.h
@@ -4,6 +4,7 @@
#include <apt-pkg/macros.h>
#include <string>
+#include <vector>
class pkgAcquire;
@@ -14,7 +15,7 @@ APT_PUBLIC bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser);
// show a authentication warning prompt and return true if the system
// should continue
-APT_PUBLIC bool AuthPrompt(std::string const &UntrustedList, bool const PromptUser);
+APT_PUBLIC bool AuthPrompt(std::vector<std::string> const &UntrustedList, bool const PromptUser);
APT_PUBLIC bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failure, bool * const TransientNetworkFailure);
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index acc6d42c2..844fcbc7e 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -21,6 +21,7 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/upgrade.h>
#include <apt-pkg/install-progress.h>
+#include <apt-pkg/debindexfile.h>
#include <stdlib.h>
#include <string.h>
@@ -57,7 +58,8 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
}
}
- bool Fail = false;
+ bool Hold = false;
+ bool Downgrade = false;
bool Essential = false;
// Show all the various warning indicators
@@ -65,13 +67,17 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
ShowNew(c1out,Cache);
if (ShwKept == true)
ShowKept(c1out,Cache);
- Fail |= !ShowHold(c1out,Cache);
+ Hold = !ShowHold(c1out,Cache);
if (_config->FindB("APT::Get::Show-Upgraded",true) == true)
ShowUpgraded(c1out,Cache);
- Fail |= !ShowDowngraded(c1out,Cache);
+ Downgrade = !ShowDowngraded(c1out,Cache);
+
if (_config->FindB("APT::Get::Download-Only",false) == false)
Essential = !ShowEssential(c1out,Cache);
- Fail |= Essential;
+
+ // All kinds of failures
+ bool Fail = (Essential || Downgrade || Hold);
+
Stats(c1out,Cache);
// Sanity check
@@ -88,20 +94,33 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
// No remove flag
if (Cache->DelCount() != 0 && _config->FindB("APT::Get::Remove",true) == false)
return _error->Error(_("Packages need to be removed but remove is disabled."));
-
+
+ // Fail safe check
+ if (_config->FindI("quiet",0) >= 2 ||
+ _config->FindB("APT::Get::Assume-Yes",false) == true)
+ {
+ if (_config->FindB("APT::Get::Force-Yes",false) == true) {
+ _error->Warning(_("--force-yes is deprecated, use one of the options starting with --allow instead."));
+ }
+
+ if (Fail == true && _config->FindB("APT::Get::Force-Yes",false) == false) {
+ if (Essential == true && _config->FindB("APT::Get::allow-remove-essential", false) == false)
+ return _error->Error(_("Essential packages were removed and -y was used without --allow-remove-essential."));
+ if (Downgrade == true && _config->FindB("APT::Get::allow-downgrades", false) == false)
+ return _error->Error(_("Packages were downgraded and -y was used without --allow-downgrades."));
+ if (Hold == true && _config->FindB("APT::Get::allow-change-held-packages", false) == false)
+ return _error->Error(_("Held packages were changed and -y was used without --allow-change-held-packages."));
+ }
+ }
+
// Run the simulator ..
if (_config->FindB("APT::Get::Simulate") == true)
{
pkgSimulate PM(Cache);
-#if APT_PKG_ABI >= 413
APT::Progress::PackageManager *progress = APT::Progress::PackageManagerProgressFactory();
pkgPackageManager::OrderResult Res = PM.DoInstall(progress);
delete progress;
-#else
- int status_fd = _config->FindI("APT::Status-Fd",-1);
- pkgPackageManager::OrderResult Res = PM.DoInstall(status_fd);
-#endif
if (Res == pkgPackageManager::Failed)
return false;
@@ -132,7 +151,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
pkgSourceList *List = Cache.GetSourceList();
// Create the package manager and prepare to download
- SPtr<pkgPackageManager> PM= _system->CreatePM(Cache);
+ std::unique_ptr<pkgPackageManager> PM(_system->CreatePM(Cache));
if (PM->GetArchives(&Fetcher,List,&Recs) == false ||
_error->PendingError() == true)
return false;
@@ -177,15 +196,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
if (CheckFreeSpaceBeforeDownload(_config->FindDir("Dir::Cache::Archives"), (FetchBytes - FetchPBytes)) == false)
return false;
- // Fail safe check
- if (_config->FindI("quiet",0) >= 2 ||
- _config->FindB("APT::Get::Assume-Yes",false) == true)
- {
- if (Fail == true && _config->FindB("APT::Get::Force-Yes",false) == false)
- return _error->Error(_("There are problems and -y was used without --force-yes"));
- }
-
- if (Essential == true && Safety == true)
+ if (Essential == true && Safety == true && _config->FindB("APT::Get::allow-remove-essential", false) == false)
{
if (_config->FindB("APT::Get::Trivial-Only",false) == true)
return _error->Error(_("Trivial Only specified but this is not a trivial operation."));
@@ -307,14 +318,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
_system->UnLock();
-#if APT_PKG_ABI >= 413
APT::Progress::PackageManager *progress = APT::Progress::PackageManagerProgressFactory();
pkgPackageManager::OrderResult Res = PM->DoInstall(progress);
delete progress;
-#else
- int status_fd = _config->FindI("APT::Status-Fd", -1);
- pkgPackageManager::OrderResult Res = PM->DoInstall(status_fd);
-#endif
if (Res == pkgPackageManager::Failed || _error->PendingError() == true)
return false;
@@ -330,19 +336,17 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
}
std::set<std::string> const disappearedPkgs = PM->GetDisappearedPackages();
- if (disappearedPkgs.empty() == true)
- return true;
-
- std::string disappear;
- for (std::set<std::string>::const_iterator d = disappearedPkgs.begin();
- d != disappearedPkgs.end(); ++d)
- disappear.append(*d).append(" ");
-
- ShowList(c1out, P_("The following package disappeared from your system as\n"
- "all files have been overwritten by other packages:",
- "The following packages disappeared from your system as\n"
- "all files have been overwritten by other packages:", disappearedPkgs.size()), disappear, "");
- c0out << _("Note: This is done automatically and on purpose by dpkg.") << std::endl;
+ if (disappearedPkgs.empty() == false)
+ {
+ ShowList(c1out, P_("The following package disappeared from your system as\n"
+ "all files have been overwritten by other packages:",
+ "The following packages disappeared from your system as\n"
+ "all files have been overwritten by other packages:", disappearedPkgs.size()), disappearedPkgs,
+ [](std::string const &Pkg) { return Pkg.empty() == false; },
+ [](std::string const &Pkg) { return Pkg; },
+ [](std::string const &) { return std::string(); });
+ c0out << _("Note: This is done automatically and on purpose by dpkg.") << std::endl;
+ }
return true;
}
@@ -374,11 +378,10 @@ static bool DoAutomaticRemove(CacheFile &Cache)
unsigned long autoRemoveCount = 0;
APT::PackageSet tooMuch;
- APT::PackageList autoRemoveList;
+ SortedPackageUniverse Universe(Cache);
// look over the cache to see what can be removed
- for (unsigned J = 0; J < Cache->Head().PackageCount; ++J)
+ for (auto const &Pkg: Universe)
{
- pkgCache::PkgIterator Pkg(Cache,Cache.List[J]);
if (Cache[Pkg].Garbage)
{
if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
@@ -395,8 +398,6 @@ static bool DoAutomaticRemove(CacheFile &Cache)
}
else
{
- if (hideAutoRemove == false && Cache[Pkg].Delete() == false)
- autoRemoveList.insert(Pkg);
// if the package is a new install and already garbage we don't need to
// install it in the first place, so nuke it instead of show it
if (Cache[Pkg].Install() == true && Pkg.CurrentVer() == 0)
@@ -419,7 +420,7 @@ static bool DoAutomaticRemove(CacheFile &Cache)
bool Changed;
do {
Changed = false;
- for (APT::PackageSet::const_iterator Pkg = tooMuch.begin();
+ for (APT::PackageSet::iterator Pkg = tooMuch.begin();
Pkg != tooMuch.end(); ++Pkg)
{
APT::PackageSet too;
@@ -456,18 +457,6 @@ static bool DoAutomaticRemove(CacheFile &Cache)
} while (Changed == true);
}
- std::string autoremovelist, autoremoveversions;
- if (smallList == false && autoRemoveCount != 0)
- {
- for (APT::PackageList::const_iterator Pkg = autoRemoveList.begin(); Pkg != autoRemoveList.end(); ++Pkg)
- {
- if (Cache[Pkg].Garbage == false)
- continue;
- autoremovelist += Pkg.FullName(true) + " ";
- autoremoveversions += std::string(Cache[Pkg].CandVersion) + "\n";
- }
- }
-
// Now see if we had destroyed anything (if we had done anything)
if (Cache->BrokenCount() != 0)
{
@@ -482,12 +471,17 @@ static bool DoAutomaticRemove(CacheFile &Cache)
}
// if we don't remove them, we should show them!
- if (doAutoRemove == false && (autoremovelist.empty() == false || autoRemoveCount != 0))
+ if (doAutoRemove == false && autoRemoveCount != 0)
{
if (smallList == false)
+ {
+ SortedPackageUniverse Universe(Cache);
ShowList(c1out, P_("The following package was automatically installed and is no longer required:",
"The following packages were automatically installed and are no longer required:",
- autoRemoveCount), autoremovelist, autoremoveversions);
+ autoRemoveCount), Universe,
+ [&Cache](pkgCache::PkgIterator const &Pkg) { return (*Cache)[Pkg].Garbage == true && (*Cache)[Pkg].Delete() == false; },
+ &PrettyFullName, CandidateVersion(&Cache));
+ }
else
ioprintf(c1out, P_("%lu package was automatically installed and is no longer required.\n",
"%lu packages were automatically installed and are no longer required.\n", autoRemoveCount), autoRemoveCount);
@@ -513,9 +507,9 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
if (Cache->BrokenCount() != 0)
BrokenFix = true;
- SPtr<pkgProblemResolver> Fix;
+ std::unique_ptr<pkgProblemResolver> Fix(nullptr);
if (_config->FindB("APT::Get::CallResolver", true) == true)
- Fix = new pkgProblemResolver(Cache);
+ Fix.reset(new pkgProblemResolver(Cache));
unsigned short fallback = MOD_INSTALL;
if (strcasecmp(CmdL.FileList[0],"remove") == 0)
@@ -525,7 +519,8 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
_config->Set("APT::Get::Purge", true);
fallback = MOD_REMOVE;
}
- else if (strcasecmp(CmdL.FileList[0], "autoremove") == 0)
+ else if (strcasecmp(CmdL.FileList[0], "autoremove") == 0 ||
+ strcasecmp(CmdL.FileList[0], "auto-remove") == 0)
{
_config->Set("APT::Get::AutomaticRemove", "true");
fallback = MOD_REMOVE;
@@ -547,8 +542,8 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
}
- TryToInstall InstallAction(Cache, Fix, BrokenFix);
- TryToRemove RemoveAction(Cache, Fix);
+ TryToInstall InstallAction(Cache, Fix.get(), BrokenFix);
+ TryToRemove RemoveAction(Cache, Fix.get());
// new scope for the ActionGroup
{
@@ -651,30 +646,26 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
// DoInstall - Install packages from the command line /*{{{*/
// ---------------------------------------------------------------------
/* Install named packages */
+struct PkgIsExtraInstalled {
+ pkgCacheFile * const Cache;
+ APT::VersionSet const * const verset;
+ PkgIsExtraInstalled(pkgCacheFile * const Cache, APT::VersionSet const * const Container) : Cache(Cache), verset(Container) {}
+ bool operator() (pkgCache::PkgIterator const Pkg)
+ {
+ if ((*Cache)[Pkg].Install() == false)
+ return false;
+ pkgCache::VerIterator const Cand = (*Cache)[Pkg].CandidateVerIter(*Cache);
+ return verset->find(Cand) == verset->end();
+ }
+};
bool DoInstall(CommandLine &CmdL)
{
CacheFile Cache;
// first check for local pkgs and add them to the cache
for (const char **I = CmdL.FileList; *I != 0; I++)
{
- if(FileExists(*I))
- {
- // FIXME: make this more elegant
- std::string TypeStr = flExtension(*I) + "-file";
- pkgSourceList::Type *Type = pkgSourceList::Type::GetType(TypeStr.c_str());
- if(Type != 0)
- {
- std::vector<metaIndex *> List;
- std::map<std::string, std::string> Options;
- if(Type->CreateItem(List, *I, "", "", Options))
- {
- // we have our own CacheFile that gives us a SourceList
- // with superpowerz
- SourceList *sources = (SourceList*)Cache.GetSourceList();
- sources->AddMetaIndex(List[0]);
- }
- }
- }
+ if(FileExists(*I) && flExtension(*I) == "deb")
+ Cache.GetSourceList()->AddVolatileFile(new debDebPkgFileIndex(*I));
}
// then open the cache
@@ -689,35 +680,17 @@ bool DoInstall(CommandLine &CmdL)
/* Print out a list of packages that are going to be installed extra
to what the user asked */
+ SortedPackageUniverse Universe(Cache);
if (Cache->InstCount() != verset[MOD_INSTALL].size())
- {
- std::string List;
- std::string VersionsList;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
- if ((*Cache)[I].Install() == false)
- continue;
- pkgCache::VerIterator Cand = Cache[I].CandidateVerIter(Cache);
-
- if (verset[MOD_INSTALL].find(Cand) != verset[MOD_INSTALL].end())
- continue;
-
- List += I.FullName(true) + " ";
- VersionsList += std::string(Cache[I].CandVersion) + "\n";
- }
-
- ShowList(c1out,_("The following extra packages will be installed:"),List,VersionsList);
- }
+ ShowList(c1out, _("The following additional packages will be installed:"), Universe,
+ PkgIsExtraInstalled(&Cache, &verset[MOD_INSTALL]),
+ &PrettyFullName, CandidateVersion(&Cache));
/* Print out a list of suggested and recommended packages */
{
- std::string SuggestsList, RecommendsList;
- std::string SuggestsVersions, RecommendsVersions;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
+ std::list<std::string> Recommends, Suggests, SingleRecommends, SingleSuggests;
+ for (auto const &Pkg: Universe)
{
- pkgCache::PkgIterator Pkg(Cache,Cache.List[J]);
-
/* Just look at the ones we want to install */
if ((*Cache)[Pkg].Install() == false)
continue;
@@ -729,77 +702,79 @@ bool DoInstall(CommandLine &CmdL)
pkgCache::DepIterator Start;
pkgCache::DepIterator End;
D.GlobOr(Start,End); // advances D
+ if (Start->Type != pkgCache::Dep::Recommends && Start->Type != pkgCache::Dep::Suggests)
+ continue;
- // FIXME: we really should display a or-group as a or-group to the user
- // the problem is that ShowList is incapable of doing this
- std::string RecommendsOrList,RecommendsOrVersions;
- std::string SuggestsOrList,SuggestsOrVersions;
- bool foundInstalledInOrGroup = false;
- for(;;)
{
- /* Skip if package is installed already, or is about to be */
- std::string target = Start.TargetPkg().FullName(true) + " ";
- pkgCache::PkgIterator const TarPkg = Start.TargetPkg();
- if (TarPkg->SelectedState == pkgCache::State::Install ||
- TarPkg->SelectedState == pkgCache::State::Hold ||
- Cache[Start.TargetPkg()].Install())
- {
- foundInstalledInOrGroup=true;
- break;
- }
-
- /* Skip if we already saw it */
- if (int(SuggestsList.find(target)) != -1 || int(RecommendsList.find(target)) != -1)
+ // Skip if we already saw this
+ std::string target;
+ for (pkgCache::DepIterator I = Start; I != D; ++I)
{
- foundInstalledInOrGroup=true;
- break;
+ if (target.empty() == false)
+ target.append(" | ");
+ target.append(I.TargetPkg().FullName(true));
}
+ std::list<std::string> &Type = Start->Type == pkgCache::Dep::Recommends ? SingleRecommends : SingleSuggests;
+ if (std::find(Type.begin(), Type.end(), target) != Type.end())
+ continue;
+ Type.push_back(target);
+ }
- // this is a dep on a virtual pkg, check if any package that provides it
- // should be installed
- if(Start.TargetPkg().ProvidesList() != 0)
+ std::list<std::string> OrList;
+ bool foundInstalledInOrGroup = false;
+ for (pkgCache::DepIterator I = Start; I != D; ++I)
+ {
{
- pkgCache::PrvIterator I = Start.TargetPkg().ProvidesList();
- for (; I.end() == false; ++I)
+ // satisfying package is installed and not marked for deletion
+ APT::VersionList installed = APT::VersionList::FromDependency(Cache, I, APT::CacheSetHelper::INSTALLED);
+ if (std::find_if(installed.begin(), installed.end(),
+ [&Cache](pkgCache::VerIterator const &Ver) { return Cache[Ver.ParentPkg()].Delete() == false; }) != installed.end())
{
- pkgCache::PkgIterator Pkg = I.OwnerPkg();
- if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer() &&
- Pkg.CurrentVer() != 0)
- foundInstalledInOrGroup=true;
+ foundInstalledInOrGroup = true;
+ break;
}
}
- if (Start->Type == pkgCache::Dep::Suggests)
- {
- SuggestsOrList += target;
- SuggestsOrVersions += std::string(Cache[Start.TargetPkg()].CandVersion) + "\n";
- }
-
- if (Start->Type == pkgCache::Dep::Recommends)
{
- RecommendsOrList += target;
- RecommendsOrVersions += std::string(Cache[Start.TargetPkg()].CandVersion) + "\n";
+ // satisfying package is upgraded to/new install
+ APT::VersionList upgrades = APT::VersionList::FromDependency(Cache, I, APT::CacheSetHelper::CANDIDATE);
+ if (std::find_if(upgrades.begin(), upgrades.end(),
+ [&Cache](pkgCache::VerIterator const &Ver) { return Cache[Ver.ParentPkg()].Upgrade(); }) != upgrades.end())
+ {
+ foundInstalledInOrGroup = true;
+ break;
+ }
}
- if (Start >= End)
- break;
- ++Start;
+ if (OrList.empty())
+ OrList.push_back(I.TargetPkg().FullName(true));
+ else
+ OrList.push_back("| " + I.TargetPkg().FullName(true));
}
-
+
if(foundInstalledInOrGroup == false)
{
- RecommendsList += RecommendsOrList;
- RecommendsVersions += RecommendsOrVersions;
- SuggestsList += SuggestsOrList;
- SuggestsVersions += SuggestsOrVersions;
+ std::list<std::string> &Type = Start->Type == pkgCache::Dep::Recommends ? Recommends : Suggests;
+ std::move(OrList.begin(), OrList.end(), std::back_inserter(Type));
}
-
}
}
-
- ShowList(c1out,_("Suggested packages:"),SuggestsList,SuggestsVersions);
- ShowList(c1out,_("Recommended packages:"),RecommendsList,RecommendsVersions);
-
+ auto always_true = [](std::string const&) { return true; };
+ auto string_ident = [](std::string const&str) { return str; };
+ auto verbose_show_candidate =
+ [&Cache](std::string str)
+ {
+ if (APT::String::Startswith(str, "| "))
+ str.erase(0, 2);
+ pkgCache::PkgIterator const Pkg = Cache->FindPkg(str);
+ if (Pkg.end() == true)
+ return "";
+ return (*Cache)[Pkg].CandVersion;
+ };
+ ShowList(c1out,_("Suggested packages:"), Suggests,
+ always_true, string_ident, verbose_show_candidate);
+ ShowList(c1out,_("Recommended packages:"), Recommends,
+ always_true, string_ident, verbose_show_candidate);
}
// See if we need to prompt
@@ -807,7 +782,7 @@ bool DoInstall(CommandLine &CmdL)
if (Cache->InstCount() == verset[MOD_INSTALL].size() && Cache->DelCount() == 0)
return InstallPackages(Cache,false,false);
- return InstallPackages(Cache,false);
+ return InstallPackages(Cache,false);
}
/*}}}*/
@@ -841,8 +816,9 @@ void TryToInstall::operator() (pkgCache::VerIterator const &Ver) {
else
Cache->GetDepCache()->SetReInstall(Pkg, true);
} else
- ioprintf(c1out,_("%s is already the newest version.\n"),
- Pkg.FullName(true).c_str());
+ // TRANSLATORS: First string is package name, second is version
+ ioprintf(c1out,_("%s is already the newest version (%s).\n"),
+ Pkg.FullName(true).c_str(), Pkg.CurrentVer().VerStr());
}
// Install it with autoinstalling enabled (if we not respect the minial
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc
index aa3a2c24b..c4d5e8bc3 100644
--- a/apt-private/private-list.cc
+++ b/apt-private/private-list.cc
@@ -59,7 +59,7 @@ class PackageNameMatcher : public Matcher
for(J=filters.begin(); J != filters.end(); ++J)
delete *J;
}
- virtual bool operator () (const pkgCache::PkgIterator &P)
+ virtual bool operator () (const pkgCache::PkgIterator &P) APT_OVERRIDE
{
for(J=filters.begin(); J != filters.end(); ++J)
{
diff --git a/apt-private/private-main.cc b/apt-private/private-main.cc
index 668b1733a..3886c7df6 100644
--- a/apt-private/private-main.cc
+++ b/apt-private/private-main.cc
@@ -22,13 +22,15 @@ void InitSignals()
void CheckSimulateMode(CommandLine &CmdL)
{
- // simulate user-friendly if apt-get has no root privileges
- if (getuid() != 0 && _config->FindB("APT::Get::Simulate") == true &&
+ // disable locking in simulation, but show the message only for users
+ // as root hasn't the same problems like unreadable files which can heavily
+ // distort the simulation.
+ if (_config->FindB("APT::Get::Simulate") == true &&
(CmdL.FileSize() == 0 ||
(strcmp(CmdL.FileList[0], "source") != 0 && strcmp(CmdL.FileList[0], "download") != 0 &&
strcmp(CmdL.FileList[0], "changelog") != 0)))
{
- if (_config->FindB("APT::Get::Show-User-Simulation-Note",true) == true)
+ if (getuid() != 0 && _config->FindB("APT::Get::Show-User-Simulation-Note",true) == true)
std::cout << _("NOTE: This is only a simulation!\n"
" apt-get needs root privileges for real execution.\n"
" Keep also in mind that locking is deactivated,\n"
diff --git a/apt-private/private-moo.h b/apt-private/private-moo.h
index b8e1cfed6..bc8b3e7dd 100644
--- a/apt-private/private-moo.h
+++ b/apt-private/private-moo.h
@@ -1,6 +1,8 @@
#ifndef APT_PRIVATE_MOO_H
#define APT_PRIVATE_MOO_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
APT_PUBLIC bool DoMoo(CommandLine &CmdL);
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index 4e18030ab..b8e6dec02 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -25,6 +25,8 @@
#include <signal.h>
#include <sys/ioctl.h>
+#include <sstream>
+
#include <apti18n.h>
/*}}}*/
@@ -199,10 +201,12 @@ static std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &reco
std::string ShortDescription = "(none)";
if(ver)
{
- pkgCache::DescIterator Desc = ver.TranslatedDescription();
- pkgRecords::Parser & parser = records.Lookup(Desc.FileList());
-
- ShortDescription = parser.ShortDesc();
+ pkgCache::DescIterator const Desc = ver.TranslatedDescription();
+ if (Desc.end() == false)
+ {
+ pkgRecords::Parser & parser = records.Lookup(Desc.FileList());
+ ShortDescription = parser.ShortDesc();
+ }
}
return ShortDescription;
}
@@ -222,11 +226,14 @@ static std::string GetLongDescription(pkgCacheFile &CacheFile, pkgRecords &recor
return EmptyDescription;
pkgCache::DescIterator const Desc = ver.TranslatedDescription();
- pkgRecords::Parser & parser = records.Lookup(Desc.FileList());
- std::string const longdesc = parser.LongDesc();
- if (longdesc.empty() == true)
- return EmptyDescription;
- return SubstVar(longdesc, "\n ", "\n ");
+ if (Desc.end() == false)
+ {
+ pkgRecords::Parser & parser = records.Lookup(Desc.FileList());
+ std::string const longdesc = parser.LongDesc();
+ if (longdesc.empty() == false)
+ return SubstVar(longdesc, "\n ", "\n ");
+ }
+ return EmptyDescription;
}
/*}}}*/
void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/
@@ -293,66 +300,6 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/
out << output;
}
/*}}}*/
-// ShowList - Show a list /*{{{*/
-// ---------------------------------------------------------------------
-/* This prints out a string of space separated words with a title and
- a two space indent line wraped to the current screen width. */
-bool ShowList(ostream &out,string Title,string List,string VersionsList)
-{
- if (List.empty() == true)
- return true;
- // trim trailing space
- int NonSpace = List.find_last_not_of(' ');
- if (NonSpace != -1)
- {
- List = List.erase(NonSpace + 1);
- if (List.empty() == true)
- return true;
- }
-
- // Acount for the leading space
- int ScreenWidth = ::ScreenWidth - 3;
-
- out << Title << endl;
- string::size_type Start = 0;
- string::size_type VersionsStart = 0;
- while (Start < List.size())
- {
- if(_config->FindB("APT::Get::Show-Versions",false) == true &&
- VersionsList.size() > 0) {
- string::size_type End;
- string::size_type VersionsEnd;
-
- End = List.find(' ',Start);
- VersionsEnd = VersionsList.find('\n', VersionsStart);
-
- out << " " << string(List,Start,End - Start) << " (" <<
- string(VersionsList,VersionsStart,VersionsEnd - VersionsStart) <<
- ")" << endl;
-
- if (End == string::npos || End < Start)
- End = Start + ScreenWidth;
-
- Start = End + 1;
- VersionsStart = VersionsEnd + 1;
- } else {
- string::size_type End;
-
- if (Start + ScreenWidth >= List.size())
- End = List.size();
- else
- End = List.rfind(' ',Start+ScreenWidth);
-
- if (End == string::npos || End < Start)
- End = Start + ScreenWidth;
- out << " " << string(List,Start,End - Start) << endl;
- Start = End + 1;
- }
- }
-
- return false;
-}
- /*}}}*/
// ShowBroken - Debugging aide /*{{{*/
// ---------------------------------------------------------------------
/* This prints out the names of all the packages that are broken along
@@ -486,11 +433,9 @@ void ShowBroken(ostream &out, CacheFile &Cache, bool const Now)
return;
out << _("The following packages have unmet dependencies:") << endl;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator const I(Cache,Cache.List[J]);
- ShowBrokenPackage(out, &Cache, I, Now);
- }
+ SortedPackageUniverse Universe(Cache);
+ for (auto const &Pkg: Universe)
+ ShowBrokenPackage(out, &Cache, Pkg, Now);
}
void ShowBroken(ostream &out, pkgCacheFile &Cache, bool const Now)
{
@@ -498,98 +443,64 @@ void ShowBroken(ostream &out, pkgCacheFile &Cache, bool const Now)
return;
out << _("The following packages have unmet dependencies:") << endl;
- for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg)
+ APT::PackageUniverse Universe(Cache);
+ for (auto const &Pkg: Universe)
ShowBrokenPackage(out, &Cache, Pkg, Now);
}
/*}}}*/
// ShowNew - Show packages to newly install /*{{{*/
-// ---------------------------------------------------------------------
-/* */
void ShowNew(ostream &out,CacheFile &Cache)
{
- /* Print out a list of packages that are going to be installed extra
- to what the user asked */
- string List;
- string VersionsList;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
- if (Cache[I].NewInstall() == true) {
- List += I.FullName(true) + " ";
- VersionsList += string(Cache[I].CandVersion) + "\n";
- }
- }
-
- ShowList(out,_("The following NEW packages will be installed:"),List,VersionsList);
+ SortedPackageUniverse Universe(Cache);
+ ShowList(out,_("The following NEW packages will be installed:"), Universe,
+ [&Cache](pkgCache::PkgIterator const &Pkg) { return Cache[Pkg].NewInstall(); },
+ &PrettyFullName,
+ CandidateVersion(&Cache));
}
/*}}}*/
// ShowDel - Show packages to delete /*{{{*/
-// ---------------------------------------------------------------------
-/* */
void ShowDel(ostream &out,CacheFile &Cache)
{
- /* Print out a list of packages that are going to be removed extra
- to what the user asked */
- string List;
- string VersionsList;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
- if (Cache[I].Delete() == true)
- {
- if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge)
- List += I.FullName(true) + "* ";
- else
- List += I.FullName(true) + " ";
-
- VersionsList += string(Cache[I].CandVersion)+ "\n";
- }
- }
-
- ShowList(out,_("The following packages will be REMOVED:"),List,VersionsList);
+ SortedPackageUniverse Universe(Cache);
+ ShowList(out,_("The following packages will be REMOVED:"), Universe,
+ [&Cache](pkgCache::PkgIterator const &Pkg) { return Cache[Pkg].Delete(); },
+ [&Cache](pkgCache::PkgIterator const &Pkg)
+ {
+ std::string str = PrettyFullName(Pkg);
+ if (((*Cache)[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge)
+ str.append("*");
+ return str;
+ },
+ CandidateVersion(&Cache));
}
/*}}}*/
// ShowKept - Show kept packages /*{{{*/
-// ---------------------------------------------------------------------
-/* */
void ShowKept(ostream &out,CacheFile &Cache)
{
- string List;
- string VersionsList;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
-
- // Not interesting
- if (Cache[I].Upgrade() == true || Cache[I].Upgradable() == false ||
- I->CurrentVer == 0 || Cache[I].Delete() == true)
- continue;
-
- List += I.FullName(true) + " ";
- VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
- }
- ShowList(out,_("The following packages have been kept back:"),List,VersionsList);
+ SortedPackageUniverse Universe(Cache);
+ ShowList(out,_("The following packages have been kept back:"), Universe,
+ [&Cache](pkgCache::PkgIterator const &Pkg)
+ {
+ return Cache[Pkg].Upgrade() == false &&
+ Cache[Pkg].Upgradable() == true &&
+ Pkg->CurrentVer != 0 &&
+ Cache[Pkg].Delete() == false;
+ },
+ &PrettyFullName,
+ CurrentToCandidateVersion(&Cache));
}
/*}}}*/
// ShowUpgraded - Show upgraded packages /*{{{*/
-// ---------------------------------------------------------------------
-/* */
void ShowUpgraded(ostream &out,CacheFile &Cache)
{
- string List;
- string VersionsList;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
-
- // Not interesting
- if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true)
- continue;
-
- List += I.FullName(true) + " ";
- VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
- }
- ShowList(out,_("The following packages will be upgraded:"),List,VersionsList);
+ SortedPackageUniverse Universe(Cache);
+ ShowList(out,_("The following packages will be upgraded:"), Universe,
+ [&Cache](pkgCache::PkgIterator const &Pkg)
+ {
+ return Cache[Pkg].Upgrade() == true && Cache[Pkg].NewInstall() == false;
+ },
+ &PrettyFullName,
+ CurrentToCandidateVersion(&Cache));
}
/*}}}*/
// ShowDowngraded - Show downgraded packages /*{{{*/
@@ -597,74 +508,73 @@ void ShowUpgraded(ostream &out,CacheFile &Cache)
/* */
bool ShowDowngraded(ostream &out,CacheFile &Cache)
{
- string List;
- string VersionsList;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
-
- // Not interesting
- if (Cache[I].Downgrade() == false || Cache[I].NewInstall() == true)
- continue;
-
- List += I.FullName(true) + " ";
- VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
- }
- return ShowList(out,_("The following packages will be DOWNGRADED:"),List,VersionsList);
+ SortedPackageUniverse Universe(Cache);
+ return ShowList(out,_("The following packages will be DOWNGRADED:"), Universe,
+ [&Cache](pkgCache::PkgIterator const &Pkg)
+ {
+ return Cache[Pkg].Downgrade() == true && Cache[Pkg].NewInstall() == false;
+ },
+ &PrettyFullName,
+ CurrentToCandidateVersion(&Cache));
}
/*}}}*/
// ShowHold - Show held but changed packages /*{{{*/
-// ---------------------------------------------------------------------
-/* */
bool ShowHold(ostream &out,CacheFile &Cache)
{
- string List;
- string VersionsList;
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
- {
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
- if (Cache[I].InstallVer != (pkgCache::Version *)I.CurrentVer() &&
- I->SelectedState == pkgCache::State::Hold) {
- List += I.FullName(true) + " ";
- VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
- }
- }
-
- return ShowList(out,_("The following held packages will be changed:"),List,VersionsList);
+ SortedPackageUniverse Universe(Cache);
+ return ShowList(out,_("The following held packages will be changed:"), Universe,
+ [&Cache](pkgCache::PkgIterator const &Pkg)
+ {
+ return Pkg->SelectedState == pkgCache::State::Hold &&
+ Cache[Pkg].InstallVer != (pkgCache::Version *)Pkg.CurrentVer();
+ },
+ &PrettyFullName,
+ CurrentToCandidateVersion(&Cache));
}
/*}}}*/
// ShowEssential - Show an essential package warning /*{{{*/
// ---------------------------------------------------------------------
/* This prints out a warning message that is not to be ignored. It shows
- all essential packages and their dependents that are to be removed.
+ all essential packages and their dependents that are to be removed.
It is insanely risky to remove the dependents of an essential package! */
+struct APT_HIDDEN PrettyFullNameWithDue {
+ std::map<unsigned long long, pkgCache::PkgIterator> due;
+ PrettyFullNameWithDue() {}
+ std::string operator() (pkgCache::PkgIterator const &Pkg)
+ {
+ std::string const A = PrettyFullName(Pkg);
+ std::map<unsigned long long, pkgCache::PkgIterator>::const_iterator d = due.find(Pkg->ID);
+ if (d == due.end())
+ return A;
+
+ std::string const B = PrettyFullName(d->second);
+ std::ostringstream outstr;
+ ioprintf(outstr, _("%s (due to %s)"), A.c_str(), B.c_str());
+ return outstr.str();
+ }
+};
bool ShowEssential(ostream &out,CacheFile &Cache)
{
- string List;
- string VersionsList;
- bool *Added = new bool[Cache->Head().PackageCount];
- for (unsigned int I = 0; I != Cache->Head().PackageCount; I++)
- Added[I] = false;
-
- for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
+ std::vector<bool> Added(Cache->Head().PackageCount, false);
+ APT::PackageDeque pkglist;
+ PrettyFullNameWithDue withdue;
+
+ SortedPackageUniverse Universe(Cache);
+ for (pkgCache::PkgIterator const &I: Universe)
{
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
if ((I->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential &&
(I->Flags & pkgCache::Flag::Important) != pkgCache::Flag::Important)
continue;
-
+
// The essential package is being removed
- if (Cache[I].Delete() == true)
+ if (Cache[I].Delete() == false)
+ continue;
+
+ if (Added[I->ID] == false)
{
- if (Added[I->ID] == false)
- {
- Added[I->ID] = true;
- List += I.FullName(true) + " ";
- //VersionsList += string(Cache[I].CurVersion) + "\n"; ???
- }
+ Added[I->ID] = true;
+ pkglist.insert(I);
}
- else
- continue;
if (I->CurrentVer == 0)
continue;
@@ -676,27 +586,23 @@ bool ShowEssential(ostream &out,CacheFile &Cache)
if (D->Type != pkgCache::Dep::PreDepends &&
D->Type != pkgCache::Dep::Depends)
continue;
-
+
pkgCache::PkgIterator P = D.SmartTargetPkg();
if (Cache[P].Delete() == true)
{
if (Added[P->ID] == true)
continue;
Added[P->ID] = true;
-
- char S[300];
- snprintf(S,sizeof(S),_("%s (due to %s) "),P.FullName(true).c_str(),I.FullName(true).c_str());
- List += S;
- //VersionsList += "\n"; ???
- }
- }
+
+ pkglist.insert(P);
+ withdue.due[P->ID] = I;
+ }
+ }
}
-
- delete [] Added;
return ShowList(out,_("WARNING: The following essential packages will be removed.\n"
- "This should NOT be done unless you know exactly what you are doing!"),List,VersionsList);
+ "This should NOT be done unless you know exactly what you are doing!"),
+ pkglist, &AlwaysTrue, withdue, &EmptyString);
}
-
/*}}}*/
// Stats - Show some statistics /*{{{*/
// ---------------------------------------------------------------------
@@ -824,3 +730,33 @@ bool AnalPrompt(const char *Text)
return false;
}
/*}}}*/
+
+std::string PrettyFullName(pkgCache::PkgIterator const &Pkg)
+{
+ return Pkg.FullName(true);
+}
+std::string CandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg)
+{
+ return (*Cache)[Pkg].CandVersion;
+}
+std::function<std::string(pkgCache::PkgIterator const &)> CandidateVersion(pkgCacheFile * const Cache)
+{
+ return std::bind(static_cast<std::string(*)(pkgCacheFile * const, pkgCache::PkgIterator const&)>(&CandidateVersion), Cache, std::placeholders::_1);
+}
+std::string CurrentToCandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg)
+{
+ return std::string((*Cache)[Pkg].CurVersion) + " => " + (*Cache)[Pkg].CandVersion;
+}
+std::function<std::string(pkgCache::PkgIterator const &)> CurrentToCandidateVersion(pkgCacheFile * const Cache)
+{
+ return std::bind(static_cast<std::string(*)(pkgCacheFile * const, pkgCache::PkgIterator const&)>(&CurrentToCandidateVersion), Cache, std::placeholders::_1);
+}
+bool AlwaysTrue(pkgCache::PkgIterator const &)
+{
+ return true;
+}
+std::string EmptyString(pkgCache::PkgIterator const &)
+{
+ return std::string();
+}
+
diff --git a/apt-private/private-output.h b/apt-private/private-output.h
index d5b57adec..4930fd981 100644
--- a/apt-private/private-output.h
+++ b/apt-private/private-output.h
@@ -1,9 +1,11 @@
#ifndef APT_PRIVATE_OUTPUT_H
#define APT_PRIVATE_OUTPUT_H
+#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/macros.h>
+#include <functional>
#include <fstream>
#include <string>
#include <iostream>
@@ -32,8 +34,61 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
APT_PUBLIC void ShowBroken(std::ostream &out, CacheFile &Cache, bool const Now);
APT_PUBLIC void ShowBroken(std::ostream &out, pkgCacheFile &Cache, bool const Now);
-APT_PUBLIC bool ShowList(std::ostream &out, std::string Title, std::string List,
- std::string VersionsList);
+template<class Container, class PredicateC, class DisplayP, class DisplayV> APT_PUBLIC bool ShowList(std::ostream &out, std::string const &Title,
+ Container const &cont,
+ PredicateC Predicate,
+ DisplayP PkgDisplay,
+ DisplayV VerboseDisplay)
+{
+ size_t const ScreenWidth = (::ScreenWidth > 3) ? ::ScreenWidth - 3 : 0;
+ int ScreenUsed = 0;
+ bool const ShowVersions = _config->FindB("APT::Get::Show-Versions", false);
+ bool printedTitle = false;
+
+ for (auto const &Pkg: cont)
+ {
+ if (Predicate(Pkg) == false)
+ continue;
+
+ if (printedTitle == false)
+ {
+ out << Title;
+ printedTitle = true;
+ }
+
+ if (ShowVersions == true)
+ {
+ out << std::endl << " " << PkgDisplay(Pkg);
+ std::string const verbose = VerboseDisplay(Pkg);
+ if (verbose.empty() == false)
+ out << " (" << verbose << ")";
+ }
+ else
+ {
+ std::string const PkgName = PkgDisplay(Pkg);
+ if (ScreenUsed == 0 || (ScreenUsed + PkgName.length()) >= ScreenWidth)
+ {
+ out << std::endl << " ";
+ ScreenUsed = 0;
+ }
+ else if (ScreenUsed != 0)
+ {
+ out << " ";
+ ++ScreenUsed;
+ }
+ out << PkgName;
+ ScreenUsed += PkgName.length();
+ }
+ }
+
+ if (printedTitle == true)
+ {
+ out << std::endl;
+ return false;
+ }
+ return true;
+}
+
void ShowNew(std::ostream &out,CacheFile &Cache);
void ShowDel(std::ostream &out,CacheFile &Cache);
void ShowKept(std::ostream &out,CacheFile &Cache);
@@ -49,4 +104,12 @@ void Stats(std::ostream &out, pkgDepCache &Dep);
bool YnPrompt(bool Default=true);
bool AnalPrompt(const char *Text);
+std::string PrettyFullName(pkgCache::PkgIterator const &Pkg);
+std::string CandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg);
+std::function<std::string(pkgCache::PkgIterator const &)> CandidateVersion(pkgCacheFile * const Cache);
+std::string CurrentToCandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg);
+std::function<std::string(pkgCache::PkgIterator const &)> CurrentToCandidateVersion(pkgCacheFile * const Cache);
+std::string EmptyString(pkgCache::PkgIterator const &);
+bool AlwaysTrue(pkgCache::PkgIterator const &);
+
#endif
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc
index 790bc0092..3a393b746 100644
--- a/apt-private/private-show.cc
+++ b/apt-private/private-show.cc
@@ -94,7 +94,7 @@ static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
if (is_installed)
manual_installed = !(state.Flags & pkgCache::Flag::Auto) ? "yes" : "no";
else
- manual_installed = 0;
+ manual_installed = "";
// FIXME: add verbose that does not do the removal of the tags?
std::vector<pkgTagSection::Tag> RW;
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index 73a82e988..1323771f0 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -84,7 +84,8 @@ bool DoUpdate(CommandLine &CmdL)
if (_config->FindB("APT::Cmd::Show-Update-Stats", false) == true)
{
int upgradable = 0;
- Cache.Open();
+ if (Cache.Open() == false)
+ return false;
for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I)
{
pkgDepCache::StateCache &state = Cache[I];
diff --git a/buildlib/config.h.in b/buildlib/config.h.in
index 66ab33c2b..c6b1ee669 100644
--- a/buildlib/config.h.in
+++ b/buildlib/config.h.in
@@ -28,9 +28,11 @@
/* If there is no socklen_t, define this for the netdb shim */
#undef NEED_SOCKLEN_T_DEFINE
-/* We need the getresuid() function */
+/* Check for getresuid() function and similar ones */
#undef HAVE_GETRESUID
#undef HAVE_GETRESGID
+#undef HAVE_SETRESUID
+#undef HAVE_SETRESGID
/* Define to the size of the filesize containing structures */
#undef _FILE_OFFSET_BITS
diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
index b0a8d9d35..287205181 100644
--- a/buildlib/environment.mak.in
+++ b/buildlib/environment.mak.in
@@ -9,9 +9,15 @@ PACKAGE_MAIL = @PACKAGE_MAIL@
CC = @CC@
CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2
CXX = @CXX@
-CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
+CXXFLAGS+= @CXXFLAGS@ -std=c++11 -Wall -Wextra
CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations
-CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
+CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef
+# suggests methods which already have such an attribute
+#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
+# gcc reports currently lots of them at the end of file - unknown reason
+CXXFLAGS+= -Wno-deprecated-declarations
+# sanitize options to be enabled for testing
+#CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
# a bit too pedantic to be run by default
#CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros
NUM_PROCS = @NUM_PROCS@
diff --git a/buildlib/library.mak b/buildlib/library.mak
index cc0286d7e..03f868116 100644
--- a/buildlib/library.mak
+++ b/buildlib/library.mak
@@ -21,6 +21,7 @@ $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOU
$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
$(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
$(LOCAL)-SONAME := lib$(LIBRARY).so.$(MAJOR)
+$(LOCAL)-VERSIONSCRIPT := $(LIB)/lib$(LIBRARY)-$(MAJOR)-$(MINOR).symver
$(LOCAL)-SLIBS := $(SLIBS)
$(LOCAL)-LIBRARY := $(LIBRARY)
@@ -39,7 +40,7 @@ MKDIRS += $(OBJ) $(DEP) $(LIB) $(dir $($(LOCAL)-HEADERS))
# The clean rules
.PHONY: clean/$(LOCAL) veryclean/$(LOCAL)
clean/$(LOCAL):
- -rm -f $($(@F)-OBJS) $($(@F)-DEP)
+ -rm -f $($(@F)-OBJS) $($(@F)-DEP) $($(@F)-VERSIONSCRIPT)
veryclean/$(LOCAL): clean/$(LOCAL)
-rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so*
@@ -50,11 +51,14 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR): $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR)
$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR)
ln -sf $(<F) $@
+$($(LOCAL)-VERSIONSCRIPT):
+ echo '$(shell echo '$(LIBRARY)' | tr -d '-' | tr 'a-z' 'A-Z')_$(MAJOR) { global: *; };' > $@
+
# The binary build rule
-$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS)
+$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS) $($(LOCAL)-VERSIONSCRIPT)
-rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
echo Building shared library $@
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -Wl,--version-script=$($(@F)-VERSIONSCRIPT) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
-o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
$(filter %.opic,$^) \
$($(@F)-SLIBS)
diff --git a/buildlib/libversion.mak b/buildlib/libversion.mak
index deb3da377..1b1855be3 100644
--- a/buildlib/libversion.mak
+++ b/buildlib/libversion.mak
@@ -4,11 +4,11 @@
# with each non-ABI break to the lib, please increase RELEASE.
# The versionnumber is extracted from apt-pkg/macros.h - see also there.
LIBAPTPKG_MAJOR=$(shell awk -v ORS='.' '/^\#define APT_PKG_M/ {print $$3}' $(BASE)/apt-pkg/contrib/macros.h | sed 's/\.$$//')
-LIBAPTPKG_RELEASE=$(shell grep -E '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/contrib/macros.h | cut -d ' ' -f 3)
+LIBAPTPKG_RELEASE=$(shell grep '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/contrib/macros.h | cut -d ' ' -f 3)
# Version number of libapt-inst
# Please increase MAJOR with each ABI break,
# with each non-ABI break to the lib, please increase MINOR.
# The versionnumber is extracted from apt-inst/makefile - see also there.
-LIBAPTINST_MAJOR=$(shell egrep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2)
-LIBAPTINST_MINOR=$(shell egrep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2)
+LIBAPTINST_MAJOR=$(shell grep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2)
+LIBAPTINST_MINOR=$(shell grep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2)
diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak
index 0f53a8600..2e98652a5 100644
--- a/buildlib/po4a_manpage.mak
+++ b/buildlib/po4a_manpage.mak
@@ -57,7 +57,6 @@ HAVE_PO4A=yes
endif
# take care of the rest
-SOURCE := $(SOURCE) $(wildcard apt.$(LC).8)
INCLUDES :=
ifndef HAVE_PO4A
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 690b03bcc..f7abb823d 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -253,12 +253,12 @@ static bool DumpPackage(CommandLine &CmdL)
{
cout << Cur.VerStr() << " - ";
for (pkgCache::PrvIterator Prv = Cur.ProvidesList(); Prv.end() != true; ++Prv)
- cout << Prv.ParentPkg().FullName(true) << " ";
+ cout << Prv.ParentPkg().FullName(true) << " (= " << (Prv->ProvideVersion == 0 ? "" : Prv.ProvideVersion()) << ") ";
cout << endl;
}
cout << "Reverse Provides: " << endl;
for (pkgCache::PrvIterator Prv = Pkg.ProvidesList(); Prv.end() != true; ++Prv)
- cout << Prv.OwnerPkg().FullName(true) << " " << Prv.OwnerVer().VerStr() << endl;
+ cout << Prv.OwnerPkg().FullName(true) << " " << Prv.OwnerVer().VerStr() << " (= " << (Prv->ProvideVersion == 0 ? "" : Prv.ProvideVersion()) << ")"<< endl;
}
return true;
@@ -310,10 +310,15 @@ static void ShowHashTableStats(std::string Type,
// Stats - Dump some nice statistics /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool Stats(CommandLine &)
+static bool Stats(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
+
+ if (CmdL.FileSize() > 1) {
+ _error->Error(_("apt-cache stats does not take any arguments"));
+ return false;
+ }
if (unlikely(Cache == NULL))
return false;
@@ -364,14 +369,14 @@ static bool Stats(CommandLine &)
cout << _(" Single virtual packages: ") << DVirt << endl;
cout << _(" Mixed virtual packages: ") << NVirt << endl;
cout << _(" Missing: ") << Missing << endl;
-
+
cout << _("Total distinct versions: ") << Cache->Head().VersionCount << " (" <<
SizeToStr(Cache->Head().VersionCount*Cache->Head().VersionSz) << ')' << endl;
cout << _("Total distinct descriptions: ") << Cache->Head().DescriptionCount << " (" <<
SizeToStr(Cache->Head().DescriptionCount*Cache->Head().DescriptionSz) << ')' << endl;
- cout << _("Total dependencies: ") << Cache->Head().DependsCount << " (" <<
- SizeToStr(Cache->Head().DependsCount*Cache->Head().DependencySz) << ')' << endl;
-
+ cout << _("Total dependencies: ") << Cache->Head().DependsCount << "/" << Cache->Head().DependsDataCount << " (" <<
+ SizeToStr((Cache->Head().DependsCount*Cache->Head().DependencySz) +
+ (Cache->Head().DependsDataCount*Cache->Head().DependencyDataSz)) << ')' << endl;
cout << _("Total ver/file relations: ") << Cache->Head().VerFileCount << " (" <<
SizeToStr(Cache->Head().VerFileCount*Cache->Head().VerFileSz) << ')' << endl;
cout << _("Total Desc/File relations: ") << Cache->Head().DescFileCount << " (" <<
@@ -392,10 +397,8 @@ static bool Stats(CommandLine &)
stritems.insert(V->VerStr);
if (V->Section != 0)
stritems.insert(V->Section);
-#if APT_PKG_ABI >= 413
stritems.insert(V->SourcePkgName);
stritems.insert(V->SourceVerStr);
-#endif
for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; ++D)
{
if (D->Version != 0)
@@ -413,23 +416,27 @@ static bool Stats(CommandLine &)
stritems.insert(Prv->ProvideVersion);
}
}
- for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); ++F)
+ for (pkgCache::RlsFileIterator F = Cache->RlsFileBegin(); F != Cache->RlsFileEnd(); ++F)
{
stritems.insert(F->FileName);
stritems.insert(F->Archive);
stritems.insert(F->Codename);
- stritems.insert(F->Component);
stritems.insert(F->Version);
stritems.insert(F->Origin);
stritems.insert(F->Label);
- stritems.insert(F->Architecture);
stritems.insert(F->Site);
+ }
+ for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); ++F)
+ {
+ stritems.insert(F->FileName);
+ stritems.insert(F->Architecture);
+ stritems.insert(F->Component);
stritems.insert(F->IndexType);
}
+
unsigned long Size = 0;
for (std::set<map_stringitem_t>::const_iterator i = stritems.begin(); i != stritems.end(); ++i)
Size += strlen(Cache->StrP + *i) + 1;
-
cout << _("Total globbed strings: ") << stritems.size() << " (" << SizeToStr(Size) << ')' << endl;
stritems.clear();
@@ -446,6 +453,8 @@ static bool Stats(CommandLine &)
APT_CACHESIZE(VersionCount, VersionSz) +
APT_CACHESIZE(DescriptionCount, DescriptionSz) +
APT_CACHESIZE(DependsCount, DependencySz) +
+ APT_CACHESIZE(DependsDataCount, DependencyDataSz) +
+ APT_CACHESIZE(ReleaseFileCount, ReleaseFileSz) +
APT_CACHESIZE(PackageFileCount, PackageFileSz) +
APT_CACHESIZE(VerFileCount, VerFileSz) +
APT_CACHESIZE(DescFileCount, DescFileSz) +
@@ -685,6 +694,7 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
bool const ShowBreaks = _config->FindB("APT::Cache::ShowBreaks", Important == false);
bool const ShowEnhances = _config->FindB("APT::Cache::ShowEnhances", Important == false);
bool const ShowOnlyFirstOr = _config->FindB("APT::Cache::ShowOnlyFirstOr", false);
+ bool const ShowImplicit = _config->FindB("APT::Cache::ShowImplicit", false);
while (verset.empty() != true)
{
@@ -705,12 +715,16 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
case pkgCache::Dep::Depends: if (!ShowDepends) continue; break;
case pkgCache::Dep::Recommends: if (!ShowRecommends) continue; break;
case pkgCache::Dep::Suggests: if (!ShowSuggests) continue; break;
- case pkgCache::Dep::Replaces: if (!ShowReplaces) continue; break; case pkgCache::Dep::Conflicts: if (!ShowConflicts) continue; break;
+ case pkgCache::Dep::Replaces: if (!ShowReplaces) continue; break;
+ case pkgCache::Dep::Conflicts: if (!ShowConflicts) continue; break;
case pkgCache::Dep::DpkgBreaks: if (!ShowBreaks) continue; break;
case pkgCache::Dep::Enhances: if (!ShowEnhances) continue; break;
}
+ if (ShowImplicit == false && D.IsImplicit())
+ continue;
pkgCache::PkgIterator Trg = RevDepends ? D.ParentPkg() : D.TargetPkg();
+ bool const showNoArch = RevDepends || (D->CompareOp & pkgCache::Dep::ArchSpecific) != pkgCache::Dep::ArchSpecific;
if((Installed && Trg->CurrentVer != 0) || !Installed)
{
@@ -724,9 +738,9 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
if (ShowDepType == true)
cout << D.DepType() << ": ";
if (Trg->VersionList == 0)
- cout << "<" << Trg.FullName(true) << ">";
+ cout << "<" << Trg.FullName(showNoArch) << ">";
else
- cout << Trg.FullName(true);
+ cout << Trg.FullName(showNoArch);
if (ShowVersion == true && D->Version != 0)
cout << " (" << pkgCache::CompTypeDeb(D->CompareOp) << ' ' << D.TargetVer() << ')';
cout << std::endl;
@@ -740,9 +754,9 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
}
// Display all solutions
- SPtrArray<pkgCache::Version *> List = D.AllTargets();
- pkgPrioSortList(*Cache,List);
- for (pkgCache::Version **I = List; *I != 0; I++)
+ std::unique_ptr<pkgCache::Version *[]> List(D.AllTargets());
+ pkgPrioSortList(*Cache,List.get());
+ for (pkgCache::Version **I = List.get(); *I != 0; I++)
{
pkgCache::VerIterator V(*Cache,*I);
if (V != Cache->VerP + V.ParentPkg()->VersionList ||
@@ -1318,6 +1332,7 @@ static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
struct ExDescFile
{
pkgCache::DescFile *Df;
+ pkgCache::VerIterator V;
map_id_t ID;
};
@@ -1403,6 +1418,7 @@ static bool Search(CommandLine &CmdL)
if (D.end() == true)
continue;
DFList[G->ID].Df = D.FileList();
+ DFList[G->ID].V = V;
DFList[G->ID].ID = G->ID;
}
@@ -1422,11 +1438,12 @@ static bool Search(CommandLine &CmdL)
if (D.end() == true)
continue;
DFList[id].Df = D.FileList();
+ DFList[id].V = V;
DFList[id].ID = id;
size_t const PrvPatternOffset = id * NumPatterns;
for (unsigned I = 0; I < NumPatterns; ++I)
- PatternMatch[PrvPatternOffset + I] = PatternMatch[PatternOffset + I];
+ PatternMatch[PrvPatternOffset + I] |= PatternMatch[PatternOffset + I];
}
}
@@ -1463,13 +1480,7 @@ static bool Search(CommandLine &CmdL)
if (matchedAll == true)
{
if (ShowFull == true)
- {
- const char *Start;
- const char *End;
- P.GetRec(Start,End);
- fwrite(Start,End-Start,1,stdout);
- putc('\n',stdout);
- }
+ DisplayRecord(CacheFile, J->V);
else
printf("%s - %s\n",P.Name().c_str(),P.ShortDesc().c_str());
}
@@ -1479,6 +1490,7 @@ static bool Search(CommandLine &CmdL)
delete [] PatternMatch;
for (unsigned I = 0; I != NumPatterns; I++)
regfree(&Patterns[I]);
+ delete [] Patterns;
if (ferror(stdout))
return _error->Error("Write to stdout failed");
return true;
@@ -1633,6 +1645,8 @@ static bool Policy(CommandLine &CmdL)
cout << _("Package files:") << endl;
for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; ++F)
{
+ if (F.Flagged(pkgCache::Flag::NoPackages))
+ continue;
// Locate the associated index files so we can derive a description
pkgIndexFile *Indx;
if (SrcList->FindIndex(F,Indx) == false &&
@@ -1655,19 +1669,33 @@ static bool Policy(CommandLine &CmdL)
pkgCache::PkgIterator I = Cache->PkgBegin();
for (;I.end() != true; ++I)
{
- if (Plcy->GetPriority(I) == 0)
+ // Old code for debugging
+ if (_config->FindI("APT::Policy", 1) < 1) {
+ if (Plcy->GetPriority(I) == 0)
+ continue;
+
+ // Print the package name and the version we are forcing to
+ cout << " " << I.FullName(true) << " -> ";
+
+ pkgCache::VerIterator V = Plcy->GetMatch(I);
+ if (V.end() == true)
+ cout << _("(not found)") << endl;
+ else
+ cout << V.VerStr() << endl;
+
continue;
+ }
+ // New code
+ for (pkgCache::VerIterator V = I.VersionList(); !V.end(); V++) {
+ auto Prio = Plcy->GetPriority(V, false);
+ if (Prio == 0)
+ continue;
- // Print the package name and the version we are forcing to
- cout << " " << I.FullName(true) << " -> ";
-
- pkgCache::VerIterator V = Plcy->GetMatch(I);
- if (V.end() == true)
- cout << _("(not found)") << endl;
- else
- cout << V.VerStr() << endl;
- }
-
+ cout << " ";
+ // Print the package name and the version we are forcing to
+ ioprintf(cout, _("%s -> %s with priority %d\n"), I.FullName(true).c_str(), V.VerStr(), Prio);
+ }
+ }
return true;
}
@@ -1703,7 +1731,7 @@ static bool Policy(CommandLine &CmdL)
cout << V.VerStr() << endl;
// Pinned version
- if (Plcy->GetPriority(Pkg) != 0)
+ if (_config->FindI("APT::Policy", 1) < 1 && Plcy->GetPriority(Pkg) != 0)
{
cout << _(" Package pin: ");
V = Plcy->GetMatch(Pkg);
@@ -1721,7 +1749,10 @@ static bool Policy(CommandLine &CmdL)
cout << " *** " << V.VerStr();
else
cout << " " << V.VerStr();
- cout << " " << Plcy->GetPriority(Pkg) << endl;
+ if (_config->FindI("APT::Policy", 1) < 1)
+ cout << " " << Plcy->GetPriority(Pkg) << endl;
+ else
+ cout << " " << Plcy->GetPriority(V) << endl;
for (pkgCache::VerFileIterator VF = V.FileList(); VF.end() == false; ++VF)
{
// Locate the associated index files so we can derive a description
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index d95c169cd..dcc784746 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -44,12 +44,12 @@ protected:
OpTextProgress Progress;
void Prompt(const char *Text);
string PromptLine(const char *Text);
- bool AskCdromName(string &name);
+ bool AskCdromName(string &name) APT_OVERRIDE;
public:
- virtual void Update(string text, int current);
- virtual bool ChangeCdrom();
- virtual OpProgress* GetOpProgress();
+ virtual void Update(string text, int current) APT_OVERRIDE;
+ virtual bool ChangeCdrom() APT_OVERRIDE;
+ virtual OpProgress* GetOpProgress() APT_OVERRIDE;
};
void pkgCdromTextStatus::Prompt(const char *Text)
@@ -89,7 +89,7 @@ void pkgCdromTextStatus::Update(string text, int /*current*/)
bool pkgCdromTextStatus::ChangeCdrom()
{
- Prompt(_("Please insert a Disc in the drive and press enter"));
+ Prompt(_("Please insert a Disc in the drive and press [Enter]"));
return true;
}
diff --git a/cmdline/apt-extracttemplates.h b/cmdline/apt-extracttemplates.h
index 829cdae75..91e385e70 100644
--- a/cmdline/apt-extracttemplates.h
+++ b/cmdline/apt-extracttemplates.h
@@ -24,11 +24,11 @@ class DebFile : public pkgDirStream
unsigned long ControlLen;
public:
- DebFile(const char *FileName);
+ explicit DebFile(const char *FileName);
~DebFile();
- bool DoItem(Item &I, int &fd);
+ bool DoItem(Item &I, int &fd) APT_OVERRIDE;
bool Process(pkgDirStream::Item &I, const unsigned char *data,
- unsigned long long size, unsigned long long pos);
+ unsigned long long size, unsigned long long pos) APT_OVERRIDE;
bool Go();
bool ParseInfo();
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index c1f78523c..acf6c2155 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -39,7 +39,6 @@
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/indexfile.h>
-#include <apt-pkg/indexrecords.h>
#include <apt-pkg/init.h>
#include <apt-pkg/md5.h>
#include <apt-pkg/metaindex.h>
@@ -56,6 +55,7 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/upgrade.h>
+#include <apt-pkg/sptr.h>
#include <apt-private/acqprogress.h>
#include <apt-private/private-cacheset.h>
@@ -86,6 +86,7 @@
#include <algorithm>
#include <fstream>
#include <iostream>
+#include <sstream>
#include <set>
#include <string>
#include <vector>
@@ -136,11 +137,9 @@ static bool TryToInstallBuildDep(pkgCache::PkgIterator Pkg,pkgCacheFile &Cache,
return true;
}
/*}}}*/
-// GetReleaseForSourceRecord - Return Suite for the given srcrecord /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-static std::string GetReleaseForSourceRecord(pkgSourceList *SrcList,
- pkgSrcRecords::Parser *Parse)
+// GetReleaseFileForSourceRecord - Return Suite for the given srcrecord /*{{{*/
+static pkgCache::RlsFileIterator GetReleaseFileForSourceRecord(CacheFile &CacheFile,
+ pkgSourceList *SrcList, pkgSrcRecords::Parser *Parse)
{
// try to find release
const pkgIndexFile& CurrentIndexFile = Parse->Index();
@@ -153,28 +152,16 @@ static std::string GetReleaseForSourceRecord(pkgSourceList *SrcList,
IF != Indexes->end(); ++IF)
{
if (&CurrentIndexFile == (*IF))
- {
- std::string const path = (*S)->LocalFileName();
- if (path != "")
- {
- indexRecords records;
- records.Load(path);
- return records.GetSuite();
- }
- }
+ return (*S)->FindInCache(CacheFile, false);
}
}
- return "";
+ return pkgCache::RlsFileIterator(CacheFile);
}
/*}}}*/
// FindSrc - Find a source record /*{{{*/
// ---------------------------------------------------------------------
/* */
-#if APT_PKG_ABI >= 413
static pkgSrcRecords::Parser *FindSrc(const char *Name,
-#else
-static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
-#endif
pkgSrcRecords &SrcRecs,string &Src,
CacheFile &CacheFile)
{
@@ -284,19 +271,8 @@ static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
{
// the Version we have is possibly fuzzy or includes binUploads,
// so we use the Version of the SourcePkg (empty if same as package)
-#if APT_PKG_ABI >= 413
Src = Ver.SourcePkgName();
VerTag = Ver.SourceVerStr();
-#else
- pkgRecords::Parser &Parse = Recs.Lookup(VF);
- Src = Parse.SourcePkg();
- // no SourcePkg name, so it is the "binary" name
- if (Src.empty() == true)
- Src = TmpSrc;
- VerTag = Parse.SourceVer();
- if (VerTag.empty() == true)
- VerTag = Ver.VerStr();
-#endif
break;
}
}
@@ -327,17 +303,10 @@ static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
pkgCache::VerIterator Ver = Cache->GetCandidateVer(Pkg);
if (Ver.end() == false)
{
-#if APT_PKG_ABI >= 413
if (strcmp(Ver.SourcePkgName(),Ver.ParentPkg().Name()) != 0)
Src = Ver.SourcePkgName();
if (VerTag.empty() == true && strcmp(Ver.SourceVerStr(),Ver.VerStr()) != 0)
VerTag = Ver.SourceVerStr();
-#else
- pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
- Src = Parse.SourcePkg();
- if (VerTag.empty() == true)
- VerTag = Parse.SourceVer();
-#endif
}
}
}
@@ -378,13 +347,16 @@ static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
// See if we need to look for a specific release tag
if (RelTag != "" && UserRequestedVerTag == "")
{
- const string Rel = GetReleaseForSourceRecord(SrcList, Parse);
-
- if (Rel == RelTag)
+ pkgCache::RlsFileIterator const Rls = GetReleaseFileForSourceRecord(CacheFile, SrcList, Parse);
+ if (Rls.end() == false)
{
- Last = Parse;
- Offset = Parse->Offset();
- Version = Ver;
+ if ((Rls->Archive != 0 && RelTag == Rls.Archive()) ||
+ (Rls->Codename != 0 && RelTag == Rls.Codename()))
+ {
+ Last = Parse;
+ Offset = Parse->Offset();
+ Version = Ver;
+ }
}
}
@@ -578,7 +550,7 @@ static bool DoClean(CommandLine &)
class LogCleaner : public pkgArchiveCleaner
{
protected:
- virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St)
+ virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St) APT_OVERRIDE
{
c1out << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "B]" << endl;
@@ -721,9 +693,6 @@ static bool DoSource(CommandLine &CmdL)
pkgSourceList *List = Cache.GetSourceList();
// Create the text record parsers
-#if APT_PKG_ABI < 413
- pkgRecords Recs(Cache);
-#endif
pkgSrcRecords SrcRecs(*List);
if (_error->PendingError() == true)
return false;
@@ -732,7 +701,7 @@ static bool DoSource(CommandLine &CmdL)
AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0));
pkgAcquire Fetcher(&Stat);
- SPtrArray<DscFile> Dsc = new DscFile[CmdL.FileSize()];
+ std::unique_ptr<DscFile[]> Dsc(new DscFile[CmdL.FileSize()]);
// insert all downloaded uris into this set to avoid downloading them
// twice
@@ -747,22 +716,18 @@ static bool DoSource(CommandLine &CmdL)
// Load the requestd sources into the fetcher
unsigned J = 0;
- std::string UntrustedList;
+ std::vector<std::string> UntrustedList;
for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++)
{
string Src;
-#if APT_PKG_ABI >= 413
pkgSrcRecords::Parser *Last = FindSrc(*I,SrcRecs,Src,Cache);
-#else
- pkgSrcRecords::Parser *Last = FindSrc(*I,Recs,SrcRecs,Src,Cache);
-#endif
if (Last == 0) {
return _error->Error(_("Unable to find a source package for %s"),Src.c_str());
}
if (Last->Index().IsTrusted() == false)
- UntrustedList += Src + " ";
-
+ UntrustedList.push_back(Src);
+
string srec = Last->AsStr();
string::size_type pos = srec.find("\nVcs-");
while (pos != string::npos)
@@ -889,7 +854,7 @@ static bool DoSource(CommandLine &CmdL)
CheckDropPrivsMustBeDisabled(Fetcher);
// check authentication status of the source as well
- if (UntrustedList != "" && !AuthPrompt(UntrustedList, false))
+ if (UntrustedList.empty() == false && AuthPrompt(UntrustedList, false) == false)
return false;
// Run it
@@ -1001,8 +966,10 @@ static bool DoBuildDep(CommandLine &CmdL)
CacheFile Cache;
_config->Set("APT::Install-Recommends", false);
+
+ bool WantLock = _config->FindB("APT::Get::Print-URIs", false) == false;
- if (Cache.Open(true) == false)
+ if (Cache.Open(WantLock) == false)
return false;
if (CmdL.FileSize() <= 1)
@@ -1014,9 +981,6 @@ static bool DoBuildDep(CommandLine &CmdL)
pkgSourceList *List = Cache.GetSourceList();
// Create the text record parsers
-#if APT_PKG_ABI < 413
- pkgRecords Recs(Cache);
-#endif
pkgSrcRecords SrcRecs(*List);
if (_error->PendingError() == true)
return false;
@@ -1038,6 +1002,7 @@ static bool DoBuildDep(CommandLine &CmdL)
{
string Src;
pkgSrcRecords::Parser *Last = 0;
+ std::unique_ptr<pkgSrcRecords::Parser> LastOwner;
// an unpacked debian source tree
using APT::String::Startswith;
@@ -1046,10 +1011,10 @@ static bool DoBuildDep(CommandLine &CmdL)
{
ioprintf(c1out, _("Note, using directory '%s' to get the build dependencies\n"), *I);
// FIXME: how can we make this more elegant?
- std::string TypeName = "debian/control File Source Index";
+ std::string TypeName = "Debian control file";
pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(TypeName.c_str());
if(Type != NULL)
- Last = Type->CreateSrcPkgParser(*I);
+ LastOwner.reset(Last = Type->CreateSrcPkgParser(*I));
}
// if its a local file (e.g. .dsc) use this
else if (FileExists(*I))
@@ -1057,17 +1022,13 @@ static bool DoBuildDep(CommandLine &CmdL)
ioprintf(c1out, _("Note, using file '%s' to get the build dependencies\n"), *I);
// see if we can get a parser for this pkgIndexFile type
- string TypeName = flExtension(*I) + " File Source Index";
+ string TypeName = "Debian " + flExtension(*I) + " file";
pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(TypeName.c_str());
if(Type != NULL)
- Last = Type->CreateSrcPkgParser(*I);
+ LastOwner.reset(Last = Type->CreateSrcPkgParser(*I));
} else {
// normal case, search the cache for the source file
-#if APT_PKG_ABI >= 413
Last = FindSrc(*I,SrcRecs,Src,Cache);
-#else
- Last = FindSrc(*I,Recs,SrcRecs,Src,Cache);
-#endif
}
if (Last == 0)
@@ -1212,12 +1173,12 @@ static bool DoBuildDep(CommandLine &CmdL)
for (; Ver != verlist.end(); ++Ver)
{
forbidden.clear();
- if (Ver->MultiArch == pkgCache::Version::None || Ver->MultiArch == pkgCache::Version::All)
+ if (Ver->MultiArch == pkgCache::Version::No || Ver->MultiArch == pkgCache::Version::All)
{
if (colon == string::npos)
Pkg = Ver.ParentPkg().Group().FindPkg(hostArch);
else if (strcmp(D->Package.c_str() + colon, ":any") == 0)
- forbidden = "Multi-Arch: none";
+ forbidden = "Multi-Arch: no";
else if (strcmp(D->Package.c_str() + colon, ":native") == 0)
Pkg = Ver.ParentPkg().Group().FindPkg("native");
}
@@ -1409,196 +1370,175 @@ static bool DoBuildDep(CommandLine &CmdL)
return true;
}
/*}}}*/
-// GetChangelogPath - return a path pointing to a changelog file or dir /*{{{*/
-// ---------------------------------------------------------------------
-/* This returns a "path" string for the changelog url construction.
- * Please note that its not complete, it either needs a "/changelog"
- * appended (for the packages.debian.org/changelogs site) or a
- * ".changelog" (for third party sites that store the changelog in the
- * pool/ next to the deb itself)
- * Example return: "pool/main/a/apt/apt_0.8.8ubuntu3"
- */
-static string GetChangelogPath(CacheFile &Cache,
- pkgCache::VerIterator Ver)
-{
- pkgRecords Recs(Cache);
- pkgRecords::Parser &rec=Recs.Lookup(Ver.FileList());
- string path = flNotFile(rec.FileName());
-#if APT_PKG_ABI >= 413
- path.append(Ver.SourcePkgName());
- path.append("_");
- path.append(StripEpoch(Ver.SourceVerStr()));
-#else
- string srcpkg = rec.SourcePkg().empty() ? Ver.ParentPkg().Name() : rec.SourcePkg();
- string ver = Ver.VerStr();
- // if there is a source version it always wins
- if (rec.SourceVer() != "")
- ver = rec.SourceVer();
- path += srcpkg + "_" + StripEpoch(ver);
-#endif
- return path;
-}
- /*}}}*/
-// GuessThirdPartyChangelogUri - return url /*{{{*/
-// ---------------------------------------------------------------------
-/* Contruct a changelog file path for third party sites that do not use
- * packages.debian.org/changelogs
- * This simply uses the ArchiveURI() of the source pkg and looks for
- * a .changelog file there, Example for "mediabuntu":
- * apt-get changelog mplayer-doc:
- * http://packages.medibuntu.org/pool/non-free/m/mplayer/mplayer_1.0~rc4~try1.dsfg1-1ubuntu1+medibuntu1.changelog
- */
-static bool GuessThirdPartyChangelogUri(CacheFile &Cache,
- pkgCache::VerIterator Ver,
- string &out_uri)
-{
- // get the binary deb server path
- pkgCache::VerFileIterator Vf = Ver.FileList();
- if (Vf.end() == true)
- return false;
- pkgCache::PkgFileIterator F = Vf.File();
- pkgIndexFile *index;
- pkgSourceList *SrcList = Cache.GetSourceList();
- if(SrcList->FindIndex(F, index) == false)
- return false;
-
- // get archive uri for the binary deb
- string path_without_dot_changelog = GetChangelogPath(Cache, Ver);
- out_uri = index->ArchiveURI(path_without_dot_changelog + ".changelog");
-
- // now strip away the filename and add srcpkg_srcver.changelog
- return true;
-}
- /*}}}*/
-// DownloadChangelog - Download the changelog /*{{{*/
-// ---------------------------------------------------------------------
-static bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
- pkgCache::VerIterator Ver, string targetfile)
-/* Download a changelog file for the given package version to
- * targetfile. This will first try the server from Apt::Changelogs::Server
- * (http://packages.debian.org/changelogs by default) and if that gives
- * a 404 tries to get it from the archive directly (see
- * GuessThirdPartyChangelogUri for details how)
- */
-{
- // make the server root configurable
- string const server = _config->Find("Apt::Changelogs::Server",
- "http://packages.debian.org/changelogs");
- string const path = GetChangelogPath(CacheFile, Ver);
- string changelog_uri;
- if (APT::String::Endswith(server, "/") == true)
- strprintf(changelog_uri, "%s%s/changelog", server.c_str(), path.c_str());
- else
- strprintf(changelog_uri, "%s/%s/changelog", server.c_str(), path.c_str());
- if (_config->FindB("APT::Get::Print-URIs", false) == true)
- {
- std::cout << '\'' << changelog_uri << '\'' << std::endl;
- return true;
- }
- pkgCache::PkgIterator const Pkg = Ver.ParentPkg();
-
- string descr;
- strprintf(descr, _("Changelog for %s (%s)"), Pkg.Name(), changelog_uri.c_str());
- // queue it
- pkgAcquire::Item const * itm = new pkgAcqFile(&Fetcher, changelog_uri, "", 0, descr, Pkg.Name(), "ignored", targetfile);
-
- // Disable drop-privs if "_apt" can not write to the target dir
- CheckDropPrivsMustBeDisabled(Fetcher);
-
- // try downloading it, if that fails, try third-party-changelogs location
- // FIXME: Fetcher.Run() is "Continue" even if I get a 404?!?
- Fetcher.Run();
- if (itm->Status != pkgAcquire::Item::StatDone)
- {
- string third_party_uri;
- if (GuessThirdPartyChangelogUri(CacheFile, Ver, third_party_uri))
- {
- strprintf(descr, _("Changelog for %s (%s)"), Pkg.Name(), third_party_uri.c_str());
- itm = new pkgAcqFile(&Fetcher, third_party_uri, "", 0, descr, Pkg.Name(), "ignored", targetfile);
- Fetcher.Run();
- }
- }
-
- if (itm->Status == pkgAcquire::Item::StatDone)
- return true;
-
- // error
- return _error->Error("changelog download failed");
-}
- /*}}}*/
// DoChangelog - Get changelog from the command line /*{{{*/
-// ---------------------------------------------------------------------
static bool DoChangelog(CommandLine &CmdL)
{
CacheFile Cache;
if (Cache.ReadOnlyOpen() == false)
return false;
-
+
APT::CacheSetHelper helper;
APT::VersionList verset = APT::VersionList::FromCommandLine(Cache,
CmdL.FileList + 1, APT::CacheSetHelper::CANDIDATE, helper);
if (verset.empty() == true)
return false;
pkgAcquire Fetcher;
+ AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0));
+ Fetcher.SetLog(&Stat);
- if (_config->FindB("APT::Get::Print-URIs", false) == true)
+ bool const downOnly = _config->FindB("APT::Get::Download-Only", false);
+ bool const printOnly = _config->FindB("APT::Get::Print-URIs", false);
+
+ for (APT::VersionList::const_iterator Ver = verset.begin();
+ Ver != verset.end();
+ ++Ver)
{
- bool Success = true;
- for (APT::VersionList::const_iterator Ver = verset.begin();
- Ver != verset.end(); ++Ver)
- Success &= DownloadChangelog(Cache, Fetcher, Ver, "");
- return Success;
+ if (printOnly)
+ new pkgAcqChangelog(&Fetcher, Ver, "/dev/null");
+ else if (downOnly)
+ new pkgAcqChangelog(&Fetcher, Ver, ".");
+ else
+ new pkgAcqChangelog(&Fetcher, Ver);
}
- AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0));
- Fetcher.SetLog(&Stat);
+ if (printOnly == false)
+ {
+ // Disable drop-privs if "_apt" can not write to the target dir
+ CheckDropPrivsMustBeDisabled(Fetcher);
+ if (_error->PendingError() == true)
+ return false;
- bool const downOnly = _config->FindB("APT::Get::Download-Only", false);
+ bool Failed = false;
+ if (AcquireRun(Fetcher, 0, &Failed, NULL) == false || Failed == true)
+ return false;
+ }
- char tmpname[100];
- const char* tmpdir = NULL;
- if (downOnly == false)
+ if (downOnly == false || printOnly == true)
{
- std::string systemTemp = GetTempDir();
- snprintf(tmpname, sizeof(tmpname), "%s/apt-changelog-XXXXXX",
- systemTemp.c_str());
- tmpdir = mkdtemp(tmpname);
- if (tmpdir == NULL)
- return _error->Errno("mkdtemp", "mkdtemp failed");
-
- std::string const SandboxUser = _config->Find("APT::Sandbox::User");
- if (getuid() == 0 && SandboxUser.empty() == false) // if we aren't root, we can't chown, so don't try it
+ bool Failed = false;
+ for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); ++I)
{
- struct passwd const * const pw = getpwnam(SandboxUser.c_str());
- struct group const * const gr = getgrnam("root");
- if (pw != NULL && gr != NULL)
+ if (printOnly)
{
- // chown the tmp dir directory we use to the sandbox user
- if(chown(tmpdir, pw->pw_uid, gr->gr_gid) != 0)
- _error->WarningE("DoChangelog", "chown to %s:%s of directory %s failed", SandboxUser.c_str(), "root", tmpdir);
+ if ((*I)->ErrorText.empty() == false)
+ {
+ Failed = true;
+ _error->Error("%s", (*I)->ErrorText.c_str());
+ }
+ else
+ cout << '\'' << (*I)->DescURI() << "' " << flNotDir((*I)->DestFile) << std::endl;
}
+ else
+ DisplayFileInPager((*I)->DestFile);
}
+ return Failed == false;
}
- for (APT::VersionList::const_iterator Ver = verset.begin();
- Ver != verset.end();
- ++Ver)
+ return true;
+}
+ /*}}}*/
+// DoIndexTargets - Lists all IndexTargets /*{{{*/
+static std::string format_key(std::string key)
+{
+ // deb822 is case-insensitive, but the human eye prefers candy
+ std::transform(key.begin(), key.end(), key.begin(), ::tolower);
+ key[0] = ::toupper(key[0]);
+ size_t found = key.find("_uri");
+ if (found != std::string::npos)
+ key.replace(found, 4, "-URI");
+ while ((found = key.find('_')) != std::string::npos)
{
- string changelogfile;
- if (downOnly == false)
- changelogfile.append(tmpname).append("/changelog");
- else
- changelogfile.append(Ver.ParentPkg().Name()).append(".changelog");
- if (DownloadChangelog(Cache, Fetcher, Ver, changelogfile) && downOnly == false)
+ key[found] = '-';
+ key[found + 1] = ::toupper(key[found + 1]);
+ }
+ return key;
+}
+static bool DoIndexTargets(CommandLine &CmdL)
+{
+ pkgCacheFile CacheFile;
+ pkgSourceList *SrcList = CacheFile.GetSourceList();
+
+ if (SrcList == NULL)
+ return false;
+
+ std::string const Format = _config->Find("APT::Get::IndexTargets::Format");
+ bool const ReleaseInfo = _config->FindB("APT::Get::IndexTargets::ReleaseInfo", true);
+ bool Filtered = CmdL.FileSize() > 1;
+ for (pkgSourceList::const_iterator S = SrcList->begin(); S != SrcList->end(); ++S)
+ {
+ std::vector<IndexTarget> const targets = (*S)->GetIndexTargets();
+ std::map<std::string, string> AddOptions;
+ if (ReleaseInfo)
{
- DisplayFileInPager(changelogfile);
- // cleanup temp file
- unlink(changelogfile.c_str());
+ AddOptions.insert(std::make_pair("TRUSTED", ((*S)->IsTrusted() ? "yes" : "no")));
+ pkgCache &Cache = *CacheFile.GetPkgCache();
+ pkgCache::RlsFileIterator const RlsFile = (*S)->FindInCache(Cache, false);
+ if (RlsFile.end())
+ continue;
+#define APT_RELEASE(X,Y) if (RlsFile.Y() != NULL) AddOptions.insert(std::make_pair(X, RlsFile.Y()))
+ APT_RELEASE("CODENAME", Codename);
+ APT_RELEASE("SUITE", Archive);
+ APT_RELEASE("VERSION", Version);
+ APT_RELEASE("ORIGIN", Origin);
+ APT_RELEASE("LABEL", Label);
+#undef APT_RELEASE
+ }
+
+ for (std::vector<IndexTarget>::const_iterator T = targets.begin(); T != targets.end(); ++T)
+ {
+ std::string filename = T->Option(ReleaseInfo ? IndexTarget::EXISTING_FILENAME : IndexTarget::FILENAME);
+ if (filename.empty())
+ continue;
+
+ std::ostringstream stanza;
+ if (Filtered || Format.empty())
+ {
+ stanza << "MetaKey: " << T->MetaKey << "\n"
+ << "ShortDesc: " << T->ShortDesc << "\n"
+ << "Description: " << T->Description << "\n"
+ << "URI: " << T->URI << "\n"
+ << "Filename: " << filename << "\n"
+ << "Optional: " << (T->IsOptional ? "yes" : "no") << "\n";
+ for (std::map<std::string,std::string>::const_iterator O = AddOptions.begin(); O != AddOptions.end(); ++O)
+ stanza << format_key(O->first) << ": " << O->second << "\n";
+ for (std::map<std::string,std::string>::const_iterator O = T->Options.begin(); O != T->Options.end(); ++O)
+ stanza << format_key(O->first) << ": " << O->second << "\n";
+ stanza << "\n";
+
+ if (Filtered)
+ {
+ // that is a bit crude, but good enough for now
+ bool found = true;
+ std::string haystack = std::string("\n") + stanza.str() + "\n";
+ std::transform(haystack.begin(), haystack.end(), haystack.begin(), ::tolower);
+ size_t const filesize = CmdL.FileSize() - 1;
+ for (size_t i = 0; i != filesize; ++i)
+ {
+ std::string needle = std::string("\n") + CmdL.FileList[i + 1] + "\n";
+ std::transform(needle.begin(), needle.end(), needle.begin(), ::tolower);
+ if (haystack.find(needle) != std::string::npos)
+ continue;
+ found = false;
+ break;
+ }
+ if (found == false)
+ continue;
+ }
+ }
+
+ if (Format.empty())
+ cout << stanza.str();
+ else
+ {
+ std::string out = SubstVar(Format, "$(FILENAME)", filename);
+ out = T->Format(out);
+ for (std::map<std::string,std::string>::const_iterator O = AddOptions.begin(); O != AddOptions.end(); ++O)
+ out = SubstVar(out, std::string("$(") + O->first + ")", O->second);
+ cout << out << std::endl;
+ }
}
}
- // clenaup tmp dir
- if (tmpdir != NULL)
- rmdir(tmpdir);
+
return true;
}
/*}}}*/
@@ -1705,6 +1645,7 @@ int main(int argc,const char *argv[]) /*{{{*/
{"remove",&DoInstall},
{"purge",&DoInstall},
{"autoremove",&DoInstall},
+ {"auto-remove",&DoInstall},
{"markauto",&DoMarkAuto},
{"unmarkauto",&DoMarkAuto},
{"dist-upgrade",&DoDistUpgrade},
@@ -1712,10 +1653,12 @@ int main(int argc,const char *argv[]) /*{{{*/
{"build-dep",&DoBuildDep},
{"clean",&DoClean},
{"autoclean",&DoAutoClean},
+ {"auto-clean",&DoAutoClean},
{"check",&DoCheck},
{"source",&DoSource},
{"download",&DoDownload},
{"changelog",&DoChangelog},
+ {"indextargets",&DoIndexTargets},
{"moo",&DoMoo},
{"help",&ShowHelp},
{0,0}};
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 939061b93..af301dbcd 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -109,6 +109,7 @@ int main(int argc,const char *argv[]) /*{{{*/
if (_config->FindI("quiet", 0) < 1)
_config->Set("Debug::EDSP::WriteSolution", true);
+ _config->Set("APT::System", "Debian APT solver interface");
_config->Set("APT::Solver", "internal");
_config->Set("edsp::scenario", "stdin");
int input = STDIN_FILENO;
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index 2a66ad74d..881f8a990 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -34,7 +34,8 @@ get_fingerprints_of_keyring() {
elif [ "${fprline%%:*}" != 'fpr' ]; then continue; fi
echo "$fprline" | cut -d':' -f 10
done
- done
+ # order in the keyring shouldn't be important
+ done | sort
}
add_keys_with_verify_against_master_keyring() {
@@ -73,7 +74,7 @@ add_keys_with_verify_against_master_keyring() {
local TMP_KEYRING="${GPGHOMEDIR}/tmp-keyring.gpg"
$GPG_CMD --batch --yes --keyring "$ADD_KEYRING" --output "$TMP_KEYRING" --export "$add_key"
if ! $GPG_CMD --batch --yes --keyring "$TMP_KEYRING" --import "$MASTER" > "${GPGHOMEDIR}/gpgoutput.log" 2>&1; then
- cat "${GPGHOMEDIR}/gpgoutput.log"
+ cat >&2 "${GPGHOMEDIR}/gpgoutput.log"
false
fi
# check if signed with the master key and only add in this case
@@ -145,7 +146,7 @@ update() {
# attacker might as well replace the master-archive-keyring file
# in the package and add his own keys. so this check wouldn't
# add any security. we *need* this check on net-update though
- $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
+ import_keyring_into_keyring "$ARCHIVE_KEYRING" '' && cat "${GPGHOMEDIR}/gpgoutput.log"
if [ -r "$REMOVED_KEYS" ]; then
# remove no-longer supported/used keys
@@ -167,8 +168,10 @@ remove_key_from_keyring() {
local GPG="$GPG_CMD --keyring $KEYRINGFILE"
for KEY in "$@"; do
- # check if the key is in this keyring: the key id is in the 5 column at the end
- if ! get_fingerprints_of_keyring "$KEYRINGFILE" | grep -iq "^[0-9A-F]*${KEY}$"; then
+ local FINGERPRINTS="${GPGHOMEDIR}/keyringfile.keylst"
+ get_fingerprints_of_keyring "$KEYRINGFILE" > "$FINGERPRINTS"
+ # check if the key is in this keyring
+ if ! grep -iq "^[0-9A-F]*${KEY}$" "$FINGERPRINTS"; then
continue
fi
if [ ! -w "$KEYRINGFILE" ]; then
@@ -176,7 +179,7 @@ remove_key_from_keyring() {
continue
fi
# check if it is the only key in the keyring and if so remove the keyring altogether
- if [ '1' = "$(get_fingerprints_of_keyring "$KEYRINGFILE" | wc -l)" ]; then
+ if [ '1' = "$(uniq "$FINGERPRINTS" | wc -l)" ]; then
mv -f "$KEYRINGFILE" "${KEYRINGFILE}~" # behave like gpg
return
fi
@@ -188,7 +191,7 @@ remove_key_from_keyring() {
cp -a "$REALTARGET" "$KEYRINGFILE"
fi
# delete the key from the keyring
- $GPG --batch --delete-key --yes "$KEY"
+ $GPG --batch --delete-keys --yes "$KEY"
if [ -n "$REALTARGET" ]; then
# the real backup is the old link, not the copy we made
mv -f "${KEYRINGFILE}.dpkg-tmp" "${KEYRINGFILE}~"
@@ -199,7 +202,7 @@ remove_key_from_keyring() {
foreach_keyring_do() {
local ACTION="$1"
shift
- # if a --keyring was given, just remove from there
+ # if a --keyring was given, just work on this one
if [ -n "$FORCED_KEYRING" ]; then
$ACTION "$FORCED_KEYRING" "$@"
else
@@ -231,24 +234,78 @@ run_cmd_on_keyring() {
$GPG_CMD --keyring "$KEYRINGFILE" --batch "$@" 2>/dev/null || true
}
-import_keys_from_keyring() {
- local IMPORT="$1"
- local KEYRINGFILE="$2"
- if ! $GPG_CMD --keyring "$KEYRINGFILE" --batch --import "$IMPORT" > "${GPGHOMEDIR}/gpgoutput.log" 2>&1; then
- cat "${GPGHOMEDIR}/gpgoutput.log"
- false
+import_keyring_into_keyring() {
+ local FROM="${1:-${GPGHOMEDIR}/pubring.gpg}"
+ local TO="${2:-${GPGHOMEDIR}/pubring.gpg}"
+ shift 2
+ rm -f "${GPGHOMEDIR}/gpgoutput.log"
+ # the idea is simple: We take keys from one keyring and copy it to another
+ # we do this with so many checks inbetween to ensure that WE control the
+ # creation, so we know that the (potentially) created $TO keyring is a
+ # simple keyring rather than a keybox as gpg2 would create it which in turn
+ # can't be read by gpgv.
+ # BEWARE: This is designed more in the way to work with the current
+ # callers, than to have a well defined it would be easy to add new callers to.
+ if [ ! -s "$TO" ]; then
+ if [ -s "$FROM" ]; then
+ if [ -z "$2" ]; then
+ if ! $GPG_CMD --keyring "$FROM" --export ${1:+"$1"} > "$TO" 2> "${GPGHOMEDIR}/gpgoutput.log"; then
+ cat >&2 "${GPGHOMEDIR}/gpgoutput.log"
+ false
+ else
+ chmod 0644 -- "$TO"
+ fi
+ else
+ create_new_keyring "$TO"
+ fi
+ else
+ create_new_keyring "$TO"
+ fi
+ elif [ -s "$FROM" ]; then
+ local EXPORTLIMIT="$1"
+ if [ -n "$1$2" ]; then shift; fi
+ if ! $GPG_CMD --keyring "$FROM" --export ${EXPORTLIMIT:+"$EXPORTLIMIT"} | $GPG_CMD --keyring "$TO" --batch --import "$@" > "${GPGHOMEDIR}/gpgoutput.log" 2>&1; then
+ cat >&2 "${GPGHOMEDIR}/gpgoutput.log"
+ false
+ fi
fi
}
-merge_keys_into_keyrings() {
- local KEYRINGFILE="$1"
- local IMPORT="$2"
- if ! $GPG_CMD --keyring "$KEYRINGFILE" --batch --import --import-options 'merge-only' "$IMPORT" > "${GPGHOMEDIR}/gpgoutput.log" 2>&1; then
- cat "${GPGHOMEDIR}/gpgoutput.log"
- false
+merge_all_trusted_keyrings_into_pubring() {
+ # does the same as:
+ # foreach_keyring_do 'import_keys_from_keyring' "${GPGHOMEDIR}/pubring.gpg"
+ # but without using gpg, just cat and find
+ local PUBRING="${GPGHOMEDIR}/pubring.gpg"
+ # if a --keyring was given, just use this one
+ if [ -n "$FORCED_KEYRING" ]; then
+ if [ -s "$FORCED_KEYRING" ]; then
+ cp --dereference "$FORCED_KEYRING" "$PUBRING"
+ fi
+ else
+ # otherwise all known keyrings are merged
+ local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
+ eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)
+ if [ -d "$TRUSTEDPARTS" ]; then
+ # ignore errors mostly for non-existing $TRUSTEDFILE
+ cat /dev/null "$TRUSTEDFILE" $(find -L "$TRUSTEDPARTS" -type f -name '*.gpg') > "$PUBRING" 2>/dev/null || true
+ elif [ -s "$TRUSTEDFILE" ]; then
+ cp --dereference "$TRUSTEDFILE" "$PUBRING"
+ fi
+ fi
+
+ if [ ! -s "$PUBRING" ]; then
+ touch "$PUBRING"
fi
}
+import_keys_from_keyring() {
+ import_keyring_into_keyring "$1" "$2"
+}
+
+merge_keys_into_keyrings() {
+ import_keyring_into_keyring "$2" "$1" '' --import-options 'merge-only'
+}
+
merge_back_changes() {
if [ -n "$FORCED_KEYRING" ]; then
# if the keyring was forced merge is already done
@@ -261,26 +318,29 @@ merge_back_changes() {
# look for keys which were added or removed
get_fingerprints_of_keyring "${GPGHOMEDIR}/pubring.orig.gpg" > "${GPGHOMEDIR}/pubring.orig.keylst"
get_fingerprints_of_keyring "${GPGHOMEDIR}/pubring.gpg" > "${GPGHOMEDIR}/pubring.keylst"
- sort "${GPGHOMEDIR}/pubring.keylst" "${GPGHOMEDIR}/pubring.orig.keylst" | uniq --unique | while read key; do
- if grep -q "^${key}$" "${GPGHOMEDIR}/pubring.orig.keylst"; then
- # key isn't part of new keyring, so remove
- foreach_keyring_do 'remove_key_from_keyring' "$key"
- elif grep -q "^${key}$" "${GPGHOMEDIR}/pubring.keylst"; then
- # key is part of new keyring, so we need to import it
- create_new_keyring "$TRUSTEDFILE"
- if ! $GPG --batch --yes --export "$key" | $GPG_CMD --keyring "$TRUSTEDFILE" --batch --yes --import > "${GPGHOMEDIR}/gpgoutput.log" 2>&1; then
- cat "${GPGHOMEDIR}/gpgoutput.log"
- false
- fi
- else
- echo >&2 "Errror: Key ${key} (dis)appeared out of nowhere"
- fi
+ comm -3 "${GPGHOMEDIR}/pubring.keylst" "${GPGHOMEDIR}/pubring.orig.keylst" > "${GPGHOMEDIR}/pubring.diff"
+ # key isn't part of new keyring, so remove
+ cut -f 2 "${GPGHOMEDIR}/pubring.diff" | while read key; do
+ if [ -z "$key" ]; then continue; fi
+ foreach_keyring_do 'remove_key_from_keyring' "$key"
+ done
+ # key is only part of new keyring, so we need to import it
+ cut -f 1 "${GPGHOMEDIR}/pubring.diff" | while read key; do
+ if [ -z "$key" ]; then continue; fi
+ import_keyring_into_keyring '' "$TRUSTEDFILE" "$key"
done
}
setup_merged_keyring() {
- if [ -z "$FORCED_KEYRING" ]; then
- foreach_keyring_do 'import_keys_from_keyring' "${GPGHOMEDIR}/pubring.gpg"
+ if [ -n "$FORCED_KEYID" ]; then
+ merge_all_trusted_keyrings_into_pubring
+ FORCED_KEYRING="${GPGHOMEDIR}/forcedkeyid.gpg"
+ TRUSTEDFILE="${FORCED_KEYRING}"
+ GPG="$GPG --keyring $TRUSTEDFILE"
+ # ignore error as this "just" means we haven't found the forced keyid and the keyring will be empty
+ import_keyring_into_keyring '' "$TRUSTEDFILE" "$FORCED_KEYID" || true
+ elif [ -z "$FORCED_KEYRING" ]; then
+ merge_all_trusted_keyrings_into_pubring
if [ -r "${GPGHOMEDIR}/pubring.gpg" ]; then
cp -a "${GPGHOMEDIR}/pubring.gpg" "${GPGHOMEDIR}/pubring.orig.gpg"
else
@@ -288,8 +348,8 @@ setup_merged_keyring() {
fi
GPG="$GPG --keyring ${GPGHOMEDIR}/pubring.gpg"
else
- GPG="$GPG --keyring $TRUSTEDFILE"
create_new_keyring "$TRUSTEDFILE"
+ GPG="$GPG --keyring $TRUSTEDFILE"
fi
}
@@ -328,12 +388,17 @@ while [ -n "$1" ]; do
TRUSTEDFILE="$1"
FORCED_KEYRING="$1"
;;
+ --keyid)
+ shift
+ FORCED_KEYID="$1"
+ ;;
--secret-keyring)
shift
FORCED_SECRET_KEYRING="$1"
;;
--readonly)
merge_back_changes() { true; }
+ create_new_keyring() { if [ ! -r $FORCED_KEYRING ]; then TRUSTEDFILE='/dev/null'; FORCED_KEYRING="$TRUSTEDFILE"; fi; }
;;
--fakeroot)
requires_root() { true; }
@@ -341,6 +406,14 @@ while [ -n "$1" ]; do
--quiet)
aptkey_echo() { true; }
;;
+ --debug1)
+ # some cmds like finger redirect stderr to /dev/null …
+ aptkey_execute() { echo 'EXEC:' "$@"; "$@"; }
+ ;;
+ --debug2)
+ # … other more complicated ones pipe gpg into gpg.
+ aptkey_execute() { echo >&2 'EXEC:' "$@"; "$@"; }
+ ;;
--*)
echo >&2 "Unknown option: $1"
usage
@@ -364,7 +437,23 @@ if [ -z "$command" ]; then
fi
shift
-if [ "$command" != "help" ]; then
+create_gpg_home() {
+ # gpg needs (in different versions more or less) files to function correctly,
+ # so we give it its own homedir and generate some valid content for it later on
+ if [ -n "$TMPDIR" ]; then
+ # tmpdir is a directory and current user has rwx access to it
+ # same tests as in apt-pkg/contrib/fileutl.cc GetTempDir()
+ if [ ! -d "$TMPDIR" ] || [ ! -r "$TMPDIR" ] || [ ! -w "$TMPDIR" ] || [ ! -x "$TMPDIR" ]; then
+ unset TMPDIR
+ fi
+ fi
+ GPGHOMEDIR="$(mktemp -d)"
+ CURRENTTRAP="${CURRENTTRAP} rm -rf '${GPGHOMEDIR}';"
+ trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
+ chmod 700 "$GPGHOMEDIR"
+}
+
+prepare_gpg_home() {
eval $(apt-config shell GPG_EXE Apt::Key::gpgcommand)
if [ -n "$GPG_EXE" ] && which "$GPG_EXE" >/dev/null 2>&1; then
@@ -375,26 +464,18 @@ if [ "$command" != "help" ]; then
GPG_EXE="gpg2"
else
echo >&2 "Error: gnupg or gnupg2 do not seem to be installed,"
- echo >&2 "Error: but apt-key requires gnupg or gnupg2 for operation."
+ echo >&2 "Error: but apt-key requires gnupg or gnupg2 for this operation."
echo >&2
exit 255
fi
+ if type aptkey_execute >/dev/null 2>&1; then
+ GPG_EXE="aptkey_execute $GPG_EXE"
+ fi
GPG_CMD="$GPG_EXE --ignore-time-conflict --no-options --no-default-keyring"
- # gpg needs (in different versions more or less) files to function correctly,
- # so we give it its own homedir and generate some valid content for it
- if [ -n "$TMPDIR" ]; then
- # tmpdir is a directory and current user has rwx access to it
- # same tests as in apt-pkg/contrib/fileutl.cc GetTempDir()
- if [ ! -d "$TMPDIR" ] || [ ! -r "$TMPDIR" ] || [ ! -w "$TMPDIR" ] || [ ! -x "$TMPDIR" ]; then
- unset TMPDIR
- fi
- fi
- GPGHOMEDIR="$(mktemp -d)"
- CURRENTTRAP="${CURRENTTRAP} rm -rf '${GPGHOMEDIR}';"
- trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
- chmod 700 "$GPGHOMEDIR"
+ create_gpg_home
+
# We don't use a secret keyring, of course, but gpg panics and
# implodes if there isn't one available - and writeable for imports
SECRETKEYRING="${GPGHOMEDIR}/secring.gpg"
@@ -414,6 +495,16 @@ if [ "$command" != "help" ]; then
rm -f "$SECRETKEYRING"
cp -a "$FORCED_SECRET_KEYRING" "$SECRETKEYRING"
fi
+
+ # older gpg versions need a secring file, but newer versions take it as
+ # a hint to start a migration from earlier versions. The file is empty
+ # anyhow, so nothing actually happens, but its three lines of output
+ # nobody expects to see in apt-key context, so trigger it in silence
+ echo -n | $GPG --batch --import >/dev/null 2>&1 || true
+}
+
+if [ "$command" != 'help' ] && [ "$command" != 'verify' ]; then
+ prepare_gpg_home
fi
case "$command" in
@@ -448,7 +539,7 @@ case "$command" in
foreach_keyring_do 'run_cmd_on_keyring' --fingerprint "$@"
;;
export|exportall)
- foreach_keyring_do 'import_keys_from_keyring' "${GPGHOMEDIR}/pubring.gpg"
+ merge_all_trusted_keyrings_into_pubring
$GPG_CMD --keyring "${GPGHOMEDIR}/pubring.gpg" --armor --export "$@"
;;
adv*)
@@ -458,11 +549,26 @@ case "$command" in
merge_back_changes
;;
verify)
+ GPGV=''
+ eval $(apt-config shell GPGV Apt::Key::gpgvcommand)
+ if [ -n "$GPGV" ] && which "$GPGV" >/dev/null 2>&1; then true;
+ elif which gpgv >/dev/null 2>&1; then GPGV='gpgv';
+ elif which gpgv2 >/dev/null 2>&1; then GPGV='gpgv2';
+ else
+ echo >&2 'ERROR: gpgv or gpgv2 required for verification'
+ exit 29
+ fi
+ # for a forced keyid we need gpg --export, so full wrapping required
+ if [ -n "$FORCED_KEYID" ]; then
+ prepare_gpg_home
+ else
+ create_gpg_home
+ fi
setup_merged_keyring
- if which gpgv >/dev/null 2>&1; then
- gpgv --homedir "${GPGHOMEDIR}" --keyring "${GPGHOMEDIR}/pubring.gpg" --ignore-time-conflict "$@"
+ if [ -n "$FORCED_KEYRING" ]; then
+ $GPGV --homedir "${GPGHOMEDIR}" --keyring "${FORCED_KEYRING}" --ignore-time-conflict "$@"
else
- $GPG --verify "$@"
+ $GPGV --homedir "${GPGHOMEDIR}" --keyring "${GPGHOMEDIR}/pubring.gpg" --ignore-time-conflict "$@"
fi
;;
help)
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index de1c80309..02c73fc2e 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -238,7 +238,7 @@ static bool DoHold(CommandLine &CmdL)
ioprintf(c1out,_("%s was already set on hold.\n"), Pkg.FullName(true).c_str());
else
ioprintf(c1out,_("%s was already not hold.\n"), Pkg.FullName(true).c_str());
- Pkg = pkgset.erase(Pkg, true);
+ Pkg = pkgset.erase(Pkg);
}
else
++Pkg;
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 2f7eddb61..92db34cfa 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -55,6 +55,7 @@ static bool ShowHelp(CommandLine &)
"\n"
" install - install packages\n"
" remove - remove packages\n"
+ " autoremove - Remove automatically all unused packages\n"
"\n"
" upgrade - upgrade the system by installing/upgrading packages\n"
" full-upgrade - upgrade the system by removing/installing/upgrading packages\n"
@@ -76,6 +77,8 @@ int main(int argc, const char *argv[]) /*{{{*/
// package stuff
{"install",&DoInstall},
{"remove", &DoInstall},
+ {"autoremove", &DoInstall},
+ {"auto-remove", &DoInstall},
{"purge", &DoInstall},
// system wide stuff
diff --git a/configure.ac b/configure.ac
index 2221833a1..feba7be61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,9 +174,11 @@ AC_EGREP_HEADER(h_errno, netdb.h, [AC_MSG_RESULT(normal)],
dnl check for setuid checking function
-AC_CHECK_FUNCS(getresuid getresgid)
+AC_CHECK_FUNCS(getresuid getresgid setresuid setresgid)
AC_SUBST(HAVE_GETRESUID)
AC_SUBST(HAVE_GETRESGID)
+AC_SUBST(HAVE_SETRESUID)
+AC_SUBST(HAVE_SETRESGID)
dnl Check for doxygen
AC_PATH_PROG(DOXYGEN, doxygen)
diff --git a/debian/NEWS b/debian/NEWS
index b0524c741..41ac763d8 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,3 +1,15 @@
+apt (1.1~exp9) experimental; urgency=medium
+
+ A new algorithm for pinning has been implemented, it now assigns a
+ pin priority to a version instead of assigning a pin to a package.
+
+ This might break existing corner cases of pinning, if they use multiple
+ pins involving the same package name or patterns matching the same
+ package name, but should overall lead to pinning that actually works
+ as intended and documented.
+
+ -- Julian Andres Klode <jak@debian.org> Mon, 17 Aug 2015 14:45:17 +0200
+
apt (0.8.11) unstable; urgency=low
* apt-get install pkg/experimental will now not only switch the
diff --git a/debian/apt.conf.autoremove b/debian/apt.conf.autoremove
index fc02350ae..3609ca49c 100644
--- a/debian/apt.conf.autoremove
+++ b/debian/apt.conf.autoremove
@@ -29,10 +29,18 @@ APT
Never-MarkAuto-Sections
{
"metapackages";
+ "contrib/metapackages";
+ "non-free/metapackages";
"restricted/metapackages";
"universe/metapackages";
"multiverse/metapackages";
+ };
+
+ Move-Autobit-Sections
+ {
"oldlibs";
+ "contrib/oldlibs";
+ "non-free/oldlibs";
"restricted/oldlibs";
"universe/oldlibs";
"multiverse/oldlibs";
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index ee0761bfb..765dd4ae4 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -3,7 +3,7 @@
#
# This file understands the following apt configuration variables:
# Values here are the default.
-# Create /etc/apt/apt.conf.d/02periodic file to set your preference.
+# Create /etc/apt/apt.conf.d/10periodic file to set your preference.
#
# Dir "/";
# - RootDir for all configuration files
@@ -68,6 +68,19 @@
# 1: progress report (actually any string)
# 2: + command outputs (remove -qq, remove 2>/dev/null, add -d)
# 3: + trace on
+#
+# APT::Periodic::RandomSleep "1800";
+# - The apt cron job will delay its execution by a random
+# time span between zero and 'APT::Periodic::RandomSleep'
+# seconds.
+# This is done because otherwise everyone would access the
+# mirror servers at the same time and put them collectively
+# under very high strain.
+# You can set this to '0' if you are using a local mirror and
+# do not care about the load spikes.
+# Note that sleeping in the apt job will be delaying the
+# execution of all subsequent cron.daily jobs.
+#
check_stamp()
{
diff --git a/debian/changelog b/debian/changelog
index 7414b5c61..4c1ff24ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,285 @@
+apt (1.1~exp9) experimental; urgency=medium
+
+ [ Michael Vogt ]
+ * Add "ca-certificates" recommends to apt-transport-https
+ * test/integration/test-apt-download-progress:
+ - fix test failure on fast hardware
+ * Rename "Size" in ServerState to TotalFileSize
+ * Make apt compile with clang++ again
+ * Cleanup includes (Thanks iwyu)
+
+ [ David Kalnischkies ]
+ * reenable patchsize limit option for pdiffs
+ * better non-virtual metaIndex.LocalFileName() implementation
+ * mark internal interfaces as hidden
+ * restore ABI of pkgTagSection
+ * streamline display of --help in all tools
+ * allow uninstalled packages to be put on hold
+ * use 'best' hash for source authentication (LP: #1098738)
+ * reenable support for -s (and co) in apt-get source (Closes: 742578)
+ * create directory for extended_states if needed
+ * create our cache and lib directory always with mode 755
+ * fix file ownership tests to work on kfreebsd
+ * use dpkg --merge-avail only if needed in apt-mark
+ * properly handle already reinstall pkgs in ordering (Closes: 770291)
+ * correct architecture detection for 'rc' packages for purge (Closes: 770898)
+ * derive more of https from http method
+ * properly implement pkgRecord::Parser for *.deb files
+ * improve https method queue progress reporting.
+ Thanks to Robert Edmonds and Anders Kaseorg for initial patchs
+ (Closes: 777565, 781509)
+ * calculate only expected hashes in methods
+ * calculate hashes while downloading in https
+ * ensure lists/ files have correct permissions after apt-cdrom add
+ * unsigned Release files can expire, too
+ * a hit on Release files means the indexes will be hits too
+ * remove "first package seen is native package" assumption.
+ Thanks to Axel Beckert for testing (Closes: 782777)
+ * improve partial/ cleanup in abort and failure cases
+ * a pin of 1000 always means downgrade allowed
+ * remove unused and strange default-value for pins
+ * show non-matching m-a:same versions in debug message
+ * fix 'Source' to 'Package' rename in apt-ftparchive
+ * sync TFRewrite*Order arrays with dpkg and dak
+ * stop depending on copy-on-write for std::string
+ * implement a more c++-style TFRewrite alternative
+ * rewrite all TFRewrite instances to use the new pkgTagSection::Write
+ * detect 416 complete file in partial by expected hash
+ * implement VerifyFile as all-hashes check
+ * detect Releasefile IMS hits even if the server doesn't
+ * treat older Release files than we already have as an IMSHit
+ * don't try other compressions on hashsum mismatch
+ * rework hashsum verification in the acquire system
+ * check patch hashes in rred worker instead of in the handler
+ * add more parsing error checking for rred
+ * support hashes for compressed pdiff files
+ * do not request files if we expect an IMS hit
+ * configureable acquire targets to download additional files
+ * show URI.Path in all acquire item descriptions
+ * implement 'apt-get files' to access index targets
+ * store Release files data in the Cache
+ * implement default apt-get file --release-info mode (Closes: 752702)
+ * populate the Architecture field for PackageFiles (Closes: 687255)
+ * hide Translation-* in 'apt-cache policy' output
+ * provide a public interface for acquiring changelogs
+ (Closes: 687147, 739854, 784027, 787190)
+ * ensure valid or remove destination file in file method
+ * deal better with acquiring the same URI multiple times
+ * call URIStart in cdrom and file method
+ * show item ID in Hit, Ign and Err lines as well
+ * condense parallel requests with the same hashes to one
+ * support lang= and target= sources.list options
+ * bring back deb822 sources.list entries as .sources
+ * detect and error out on conflicting Trusted settings
+ * merge indexRecords into metaIndex
+ * add sources.list Check-Valid-Until and Valid-Until-{Max,Min} options
+ * implement Signed-By option for sources.list
+ * remove the longtime deprecated vendor{,list} stuff
+ * allow individual targets to be kept compressed
+ * support gpg 2.1.x in apt-key (Closes: 781042)
+ * merge keyrings with cat instead of gpg in apt-key.
+ Thanks to Daniel Kahn Gillmor for the suggestion
+ * handle site-changing redirects as mirror changes
+ * disable locking even for root in --simulate
+ * rename 'apt-get files' to 'apt-get indextargets'
+ * enforce GCC5 C++11 ABI and usage
+ * show or-groups in not-installed recommends and suggests lists
+ * hide implicit deps in apt-cache again by default
+ * just-in-time creation for (explicit) negative deps
+ * add volatile sources support in libapt-pkg
+ * parse packages from all architectures into the cache
+ * enhance "hit paywall" error message to mention the probable cause
+ * drop extra newline in 'Failed to fetch' and 'GPG error' message
+ * mark again deps of pkgs in APT::Never-MarkAuto-Sections as manual.
+ Thanks to Raphaël Hertzog and Adam Conrad for detailed reports and
+ initial patches (Closes: 793360) (LP: #1479207)
+ * change to libapt-pkg abi 5.0 with versioned symbols
+ * move APT::Never-MarkAuto-Sections handling to MarkDelete
+ * move manual-bit from 'oldlibs' pkg to its dependencies
+ * remove Dir:: scope limit of RootDir in the documentation (Closes: 659387)
+ * add {contrib,non-free}/{metapackages,oldlibs} to section specialhandling
+ (Closes: 788320)
+
+ [ Frans Spiesschaert ]
+ * Dutch program translation update (Closes: 771039)
+
+ [ Julien Patriarca ]
+ * French program translation update (Closes: 766755)
+
+ [ Zhou Mo ]
+ * Chinese (simplified) program translation update (Closes: 766170)
+ * Chinese (simplified) program translation update (Closes: 771982)
+
+ [ Miroslav Kure ]
+ * Czech program translation update (Closes: 764055)
+
+ [ Mert Dirik ]
+ * Turkish program translation update (Closes: 763379)
+ * Turkish translation update for apt (Closes: #789491)
+
+ [ Kenshi Muto ]
+ * Japanese program translation update (Closes: 763033)
+ * Japanese program translation update (Closes: 772678)
+
+ [ James McCoy ]
+ * support long keyids in "apt-key del" instead of ignoring them
+ (Closes: 754436)
+ * tighten filtering of kernel images in apt.auto-removal (Closes: 772732)
+ * Use terminfo's typical save_cursor/restore_cursor sequences
+ (Closes: #772521)
+
+ [ Manuel "Venturi" Porras Peralta ]
+ * Spanish program translation update (Closes: 771815)
+
+ [ Jean-Pierre Giraud ]
+ * French manpages translation update (Closes: 771967)
+
+ [ Theppitak Karoonboonyanan ]
+ * Thai program translation update (Closes: 772913)
+
+ [ Tomasz Buchert ]
+ * Fix crash in the apt-transport-https when Owner is NULL (Closes: #778375)
+
+ [ Helmut Grohne ]
+ * parse arch-qualified Provides correctly (Closes: 777071)
+
+ [ Beatrice Torracca ]
+ * Italian manpage translation update (Closes: 776702)
+
+ [ Jérémy Bobbio ]
+ * stop displaying time of build in online help (Closes: 774342)
+
+ [ Robert Edmonds ]
+ * HttpsMethod::Fetch(): Zero the FetchResult object when leaving due to 404
+
+ [ Milo Casagrande ]
+ * Italian program translation update (Closes: 782122)
+
+ [ Julian Andres Klode ]
+ * pkgPolicy: Introduce storage and helpers for per-version pins
+ * versionmatch: Extract version match checking out of Find()
+ * policy: Assign per-version pins
+ * apt-cache: Change version pin output to use per-version pins
+ * fileutl_test.cc: Check for /etc/passwd instead of /bin/sh
+ * policy: Return highest file pin if version pin == 0 in GetPriority()
+ * Determine the candidate based on per-version pins, instead of old code
+ (Closes: #770017, #622237, #620249, #685215)
+ * policy: Fix the new policy implementation to handle downgrades correctly
+ * Fix test case breakage from the new policy implementation
+ * policy: Fix the handling of config-files states
+ * Replace INT_MIN with std::numeric_limits<int>::min
+ * Simply ignore cruft in the status files, do not treat it as prio 0
+ * Fix an obscure warning from GCC
+ * apt-get: Do not include apt-pkg/indexrecords.h
+ * Drop C++11 elements from headers
+ * Re-introduce None as a deprecated alias for No
+ * Make QItem a subclass of DescItem
+ * ExecFork: Use /proc/self/fd to determine which files to close
+ (Closes: #764204)
+ * Merge changelog entries from sid-gcc5
+ * Bump apt-inst SONAME to 2.0 to adjust for the ABI break in apt-pkg
+ * Annotate more methods with APT_OVERRIDE.
+ Thanks to g++ -Wsuggest-override
+ * debian/gbp.conf: Set multimaint-merge = True
+ * debian/control: Rename libapt-pkg4.15 -> libapt-pkg5.0
+ * apt.cron.daily: Reference 10periodic instead of 02periodic (LP: #1332106)
+ * Makefile: Add a make fast command for development
+ * Add a parameter ConsiderFiles to GetPriority(VerIterator)
+ * apt-cache: Modify policy output to use per-version pins
+ * Only make Upgradable() return true for packages with a candidate
+ (LP: #896689)
+ * apt-cache: Improve translateability of the "with priority" thing
+ * policy: Be more strict about parsing pin files, and document prio 0
+ (Closes: #429912)
+ * apt_preferences(5): Re-document how priorities are calculated
+ (Closes: #554773)
+ * Drop the Section field from pkgCache::Package again
+ * Fix integration tests for the removal of the Package pin output
+ * Remove an invalid fi from a testcase
+ * C++11: Switch from auto_ptr to unique_ptr
+ * Mark SPtr as deprecated, and convert users to std::unique_ptr
+ * Deprecate SPtrArray<T> and convert everyone to unique_ptr<T[]>
+ * Use setresuid() and setresgid() where available
+ * Accept --upgradeable as synonym for --upgradable (Closes: #787846)
+ * po/fr.po: Remove the unbreakable space before ! in the confirm string
+ (Closes: #727680)
+ * Replace --force-yes by various options starting with --allow
+ * Add integration test for Pin-Priority range checks
+ * Replace UINT_MAX with std::numeric_limits<unsigned int>::max()
+ * Mention that source order only matter per version (Closes: #617445)
+ * Say "in combination with the other options" if an option is not understood
+ (Closes: #762758)
+ * apt-cache: Show an error if stats gets any arguments (Closes: #153161)
+ * apt-cache(8): Mention that --names-only search provides (Closes: #618017)
+ * apt_preferences(5): Correct default pin assignment documentation
+ (Closes: #623706)
+ * apt_preferences(5): Mention overlapping of pin matches
+ * Make auto-remove and auto-clean aliases for the versions without -
+ (Closes: #274159)
+ * apt: Add autoremove and auto-remove commands
+ * changelog: Replace reenable by re-enable everywhere.
+ Thanks to Lintian
+ * debian/control: Replace debian by Debian.
+ Thanks to Lintian
+ * debian/control: Drop the versioned python-apt conflict.
+ Thanks to Lintian
+ * debian/control: Remove XS- from Testsuite and bump Standards-Version.
+ Thanks to Lintian
+ * Set Acquire::Changelogs::URI::Origin::Tanglu for Tanglu changelogs
+ * Also add 'in combination with the other options.' to another error
+ * apt-cache(8): Drop the #versions >= #package names comparison
+ (Closes: #691281)
+ * apt-get: allow non-root --print-uris build-dep (Closes: #283400)
+ * doc/files.dbk: Improve documentation for {src,}pkgcache.bin
+ (Closes: #465551)
+ * update: Check if the cache could be opened, don't just assume it
+ (Closes: #756162)
+ * cachefile.cc: Do not ignore return value of pkgDepCache::Init()
+ * Add GetPriority(VerIterator) to pkgDepCache::Policy
+ * Document the general effect of the comma operator (Closes: #574939)
+ * When looking if Provides match, OR them with the normal patches
+ (Closes: #760868)
+ * install: If package already is the newest version, display version
+ (Closes: #315149)
+ * Make pkgCache::Priority() static, it does not need the instance
+ (Closes: #448627)
+ * Replace "extra" in "the following extra packages [...]" by "additional"
+ (Closes: #82430)
+ * Do not crash in 'apt show' for non-installed packages
+ * debian/NEWS: Mention new pinning algorithm added in 2.0~exp1
+
+ [ Yuri Kozlov ]
+ * Russian program translation update (Closes: 789709)
+
+ [ Guillem Jover ]
+ * po-fixups: fill Project-Id-Version and Encoding correctly (Closes: 612996)
+ * Do not set unhonored DPKG_NO_TSTP variable for dpkg (Closes: #765366)
+
+ [ Daniel Hartwig ]
+ * support setting a port for rsh:// in sources.list (Closes: 624727)
+ * replace direct calls to egrep with grep -E.
+ Thanks to David Weinehall for initial patch (Closes: 255577)
+
+ [ Luca Bruno ]
+ * Replace all "press enter" occurrences with "press [Enter]"
+ Thanks to Andre Felipe Machado for initial patch (Closes: 414848)
+
+ [ Jonathan Nieder ]
+ * document VERSION 2 (and 3) pre-install-pkgs hook interface (Closes: 627188)
+
+ [ Tomas Pospisek ]
+ * document APT::Periodic::RandomSleep.
+ Thanks to Chris Bainbridge and Kees Cook for initial text (Closes: 776380)
+
+ [ Johannes Schauer ]
+ * use a=experimental instead n=experimental in pin documentation
+ (Closes: 783343)
+
+ [ Kusanagi Kouichi ]
+ * Show full package records in apt-cache search -f (Closes: #660851)
+
+ -- Michael Vogt <mvo@debian.org> Tue, 18 Aug 2015 11:15:52 +0200
+
apt (1.1~exp8) experimental; urgency=medium
[ Michael Vogt ]
@@ -10,7 +292,7 @@ apt (1.1~exp8) experimental; urgency=medium
* Bump ABI to 4.15
[ David Kalnischkies ]
- * reenable support for -s (and co) in apt-get source (Closes: 742578)
+ * re-enable support for -s (and co) in apt-get source (Closes: 742578)
* run acquire transactions only once
* aborted reverify restores file owner and permission
* test if TMPDIR is accessible before using (Closes: 765951)
@@ -189,7 +471,7 @@ apt (1.1~exp1) experimental; urgency=low
* use 'best' hash for source authentication (LP: 1098738)
* use HashStringList in the acquire system
* deal with hashes in ftparchive more dynamic as well
- * reenable pipelining via hashsum reordering support
+ * re-enable pipelining via hashsum reordering support
* parse and retrieve multiple Descriptions in one record
* improve pkgTagSection scanning and parsing
* invalid cache if architecture set doesn't match (Closes: 745036)
@@ -234,6 +516,62 @@ apt (1.1~exp1) experimental; urgency=low
-- Michael Vogt <mvo@debian.org> Thu, 19 Jun 2014 12:01:48 +0200
+apt (1.0.10.1) unstable; urgency=medium
+
+ * hide first pdiff merge failure debug message (Closes: 793444)
+ * mark again deps of pkgs in APT::Never-MarkAuto-Sections as manual.
+ Thanks to Raphaël Hertzog and Adam Conrad for detailed reports and
+ initial patches (Closes: 793360) (LP: #1479207)
+ * explicitly build-dep on g++ (>= 4:5.2) for gcc5 transition
+
+ -- David Kalnischkies <david@kalnischkies.de> Mon, 03 Aug 2015 07:29:40 +0200
+
+apt (1.0.10) unstable; urgency=medium
+
+ [ Zhou Mo ]
+ * po: update zh_CN translation slightly
+ * po: Update Simplified Chinese programs translation
+
+ [ Mert Dirik ]
+ * Turkish translation update for apt (Closes: #789491)
+
+ [ Yuri Kozlov ]
+ * Russian program translation update (Closes: 789709)
+
+ [ Milo Casagrande ]
+ * Italian program translation update (Closes: 782122)
+
+ [ Beatrice Torracca ]
+ * Italian manpage translation update (Closes: 776702)
+
+ [ Julian Andres Klode ]
+ * ExecFork: Use /proc/self/fd to determine which files to close
+ (Closes: #764204)
+
+ [ Michael Vogt ]
+ * Prepare new 1.0.10 release with gcc5 abi transition
+
+ [ David Kalnischkies ]
+ * stop depending on copy-on-write for std::string
+ * bump next-abi check above gcc5-abi bump
+ * update symbols file to use gcc5 abi mangling
+
+ -- David Kalnischkies <david@kalnischkies.de> Sat, 25 Jul 2015 12:11:08 +0200
+
+apt (1.0.9.10) unstable; urgency=medium
+
+ [ Michael Vogt ]
+ * Fix crash in pkgDPkgPM::WriteApportReport(() (LP: #1436626)
+ * Move sysconf(_SC_OPEN_MAX); out of the for() loop to avoid unneeded
+ syscalls
+ * Fix endless loop in apt-get update that can cause disk fillup
+ (LP: #1445239)
+
+ [ Helmut Grohne ]
+ * parse arch-qualified Provides correctly (Closes: 777071)
+
+ -- Michael Vogt <mvo@debian.org> Fri, 22 May 2015 17:38:31 +0200
+
apt (1.0.9.9) unstable; urgency=medium
[ David Kalnischkies ]
@@ -961,7 +1299,7 @@ apt (0.9.14.3~exp2) experimental; urgency=medium
* correct IndexDiff vs DiffIndex in Debug output
[ David Kalnischkies ]
- * reenable unlimited pdiff files download
+ * re-enable unlimited pdiff files download
* integrate Anthonys rred with POC for client-side merge
[ Michael Vogt ]
@@ -1300,7 +1638,7 @@ apt (0.9.10) unstable; urgency=low
* add missing Turkish (tr) to po/LINGUAS
* correct management-typo in description found by lintian
* implement debian/rules build-{arch,indep} as required by policy 3.9.4
- * reenable automatic parallel build of APT
+ * re-enable automatic parallel build of APT
* exclude config.{sub,guess} from source package
* update the symbol files to reflect current state
* unset LANGUAGE for showing [Y/n] answer hints
@@ -1570,7 +1908,7 @@ apt (0.9.7.9~exp2) experimental; urgency=low
- keep the last good InRelease file around just as we do it with
Release.gpg in case the new one we download isn't good for us
* apt-pkg/deb/debmetaindex.cc:
- - reenable InRelease by default
+ - re-enable InRelease by default
* ftparchive/writer.cc,
apt-pkg/deb/debindexfile.cc,
apt-pkg/deb/deblistparser.cc:
diff --git a/debian/control b/debian/control
index 8c3eea3f1..82f455287 100644
--- a/debian/control
+++ b/debian/control
@@ -4,24 +4,24 @@ Priority: important
Maintainer: APT Development Team <deity@lists.debian.org>
Uploaders: Michael Vogt <mvo@debian.org>, Christian Perrier <bubulle@debian.org>,
Julian Andres Klode <jak@debian.org>
-Standards-Version: 3.9.5
+Standards-Version: 3.9.6
Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 8.1.3~), libdb-dev,
gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.4~),
zlib1g-dev, libbz2-dev, liblzma-dev,
xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2),
- autotools-dev, autoconf, automake, libgtest-dev
+ autotools-dev, autoconf, automake, libgtest-dev,
+ g++ (>= 4:5.2)
Build-Depends-Indep: doxygen, w3m, graphviz
Build-Conflicts: autoconf2.13, automake1.4
Vcs-Git: git://anonscm.debian.org/apt/apt.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=apt/apt.git
-XS-Testsuite: autopkgtest
+Testsuite: autopkgtest
Package: apt
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${apt:keyring}, gnupg | gnupg2, adduser
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${apt:keyring}, gpgv | gpgv2, gnupg | gnupg2, adduser
Replaces: manpages-pl (<< 20060617-3~), manpages-it (<< 2.80-4~), sun-java6-jdk (>> 0), sun-java5-jdk (>> 0), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~)
Breaks: manpages-pl (<< 20060617-3~), manpages-it (<< 2.80-4~), sun-java6-jdk (>> 0), sun-java5-jdk (>> 0), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~)
-Conflicts: python-apt (<< 0.7.93.2~)
Suggests: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt
Description: commandline package manager
This package provides commandline tools for searching and
@@ -38,7 +38,7 @@ Description: commandline package manager
* apt-config as an interface to the configuration settings
* apt-key as an interface to manage authentication keys
-Package: libapt-pkg4.15
+Package: libapt-pkg5.0
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
@@ -61,7 +61,7 @@ Description: package management runtime library
http, rsh as well as an interface to add more transports like
https (apt-transport-https) and debtorrent (apt-transport-debtorrent).
-Package: libapt-inst1.6
+Package: libapt-inst2.0
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
@@ -115,12 +115,13 @@ Description: package management related utility programs
* apt-extracttemplates is used by debconf to prompt for configuration
questions before installation.
* apt-ftparchive is used to create Packages and other index files
- needed to publish an archive of debian packages
+ needed to publish an archive of Debian packages
* apt-sortpkgs is a Packages/Sources file normalizer.
Package: apt-transport-https
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: ca-certificates
Priority: optional
Description: https download transport for APT
This package enables the usage of 'deb https://foo distro main' lines
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 135522d40..6bad84301 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -4,4 +4,5 @@ postbuild = ./prepare-release post-build
debian-branch = debian/experimental
debian-tag = %(version)s
export-dir = ../build-area
-sign-tags = True \ No newline at end of file
+sign-tags = True
+multimaint-merge = True
diff --git a/debian/libapt-inst1.6.symbols b/debian/libapt-inst1.6.symbols
deleted file mode 100644
index 74c4665a2..000000000
--- a/debian/libapt-inst1.6.symbols
+++ /dev/null
@@ -1,91 +0,0 @@
-libapt-inst.so.1.6 libapt-inst1.6 #MINVER#
-* Build-Depends-Package: libapt-pkg-dev
- (c++)"ExtractTar::Done(bool)@Base" 0.8.0
- (c++)"ExtractTar::Go(pkgDirStream&)@Base" 0.8.0
- (c++)"ExtractTar::StartGzip()@Base" 0.8.0
- (c++)"ExtractTar::ExtractTar(FileFd&, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 1.0.5
- (c++)"ExtractTar::~ExtractTar()@Base" 0.8.0
- (c++)"debDebFile::GotoMember(char const*)@Base" 0.8.0
- (c++)"debDebFile::CheckMember(char const*)@Base" 0.8.0
- (c++)"debDebFile::ControlExtract::DoItem(pkgDirStream::Item&, int&)@Base" 0.8.0
- (c++)"debDebFile::ControlExtract::~ControlExtract()@Base" 0.8.0
- (c++)"debDebFile::ExtractTarMember(pkgDirStream&, char const*)@Base" 0.9.15.4
- (c++)"debDebFile::ExtractArchive(pkgDirStream&)@Base" 0.8.0
- (c++)"debDebFile::MemControlExtract::TakeControl(void const*, unsigned long long)@Base" 1.0.5
- (c++)"debDebFile::MemControlExtract::Read(debDebFile&)@Base" 0.8.0
- (c++)"debDebFile::MemControlExtract::DoItem(pkgDirStream::Item&, int&)@Base" 0.8.0
- (c++)"debDebFile::MemControlExtract::Process(pkgDirStream::Item&, unsigned char const*, unsigned long long, unsigned long long)@Base" 1.0.5
- (c++)"debDebFile::MemControlExtract::~MemControlExtract()@Base" 0.8.0
- (c++)"debDebFile::debDebFile(FileFd&)@Base" 0.8.0
- (c++)"pkgExtract::FinishedFile(pkgDirStream::Item&, int)@Base" 0.8.0
- (c++)"pkgExtract::CheckDirReplace(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)@Base" 0.8.0
- (c++)"pkgExtract::HandleOverwrites(pkgFLCache::NodeIterator, bool)@Base" 0.8.0
- (c++)"pkgExtract::Fail(pkgDirStream::Item&, int)@Base" 0.8.0
- (c++)"pkgExtract::DoItem(pkgDirStream::Item&, int&)@Base" 0.8.0
- (c++)"pkgExtract::Aborted()@Base" 0.8.0
- (c++)"pkgExtract::Finished()@Base" 0.8.0
- (c++)"pkgExtract::pkgExtract(pkgFLCache&, pkgCache::VerIterator)@Base" 0.8.0
- (c++)"pkgExtract::~pkgExtract()@Base" 0.8.0
- (c++)"pkgFLCache::TreeLookup(unsigned int*, char const*, char const*, unsigned long, unsigned int*, bool)@Base" 0.8.0
- (c++)"pkgFLCache::AddConfFile(char const*, char const*, pkgFLCache::PkgIterator const&, unsigned char const*)@Base" 0.8.0
- (c++)"pkgFLCache::AddDiversion(pkgFLCache::PkgIterator const&, char const*, char const*)@Base" 0.8.0
- (c++)"pkgFLCache::BeginDiverLoad()@Base" 0.8.0
- (c++)"pkgFLCache::FinishDiverLoad()@Base" 0.8.0
- (c++)"pkgFLCache::GetPkg(char const*, char const*, bool)@Base" 0.8.0
- (c++)"pkgFLCache::Header::Header()@Base" 0.8.0
- (c++)"pkgFLCache::GetNode(char const*, char const*, unsigned int, bool, bool)@Base" 0.8.0
- (c++)"pkgFLCache::DropNode(unsigned int)@Base" 0.8.0
- (c++)"pkgFLCache::HashNode(pkgFLCache::NodeIterator const&)@Base" 0.8.0
- (c++)"pkgFLCache::PrintTree(unsigned int, unsigned long)@Base" 0.8.0
- (c++)"pkgFLCache::pkgFLCache(DynamicMMap&)@Base" 0.8.0
- (c++)"pkgDirStream::FinishedFile(pkgDirStream::Item&, int)@Base" 0.8.0
- (c++)"pkgDirStream::Fail(pkgDirStream::Item&, int)@Base" 0.8.0
- (c++)"pkgDirStream::DoItem(pkgDirStream::Item&, int&)@Base" 0.8.0
- (c++)"pkgDirStream::Process(pkgDirStream::Item&, unsigned char const*, unsigned long long, unsigned long long)@Base" 1.0.5
- (c++)"pkgDirStream::~pkgDirStream()@Base" 0.8.0
- (c++|optional)"pkgCache::DepIterator::operator++(int)@Base" 0.8.0
- (c++|optional)"pkgCache::DepIterator::operator++()@Base" 0.8.0
- (c++|optional)"pkgCache::VerIterator::operator++(int)@Base" 0.8.0
- (c++|optional)"pkgCache::VerIterator::operator++()@Base" 0.8.0
- (c++)"ARArchive::LoadHeaders()@Base" 0.8.0
- (c++)"ARArchive::ARArchive(FileFd&)@Base" 0.8.0
- (c++)"ARArchive::~ARArchive()@Base" 0.8.0
- (c++)"pkgFLCache::NodeIterator::RealPackage() const@Base" 0.8.0
- (c++)"pkgFLCache::Header::CheckSizes(pkgFLCache::Header&) const@Base" 0.8.0
- (c++|optional)"pkgCache::DepIterator::OwnerPointer() const@Base" 0.8.0
- (c++|optional)"pkgCache::VerIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"ARArchive::FindMember(char const*) const@Base" 0.8.0
- (c++)"typeinfo for ExtractTar@Base" 0.8.0
- (c++)"typeinfo for pkgExtract@Base" 0.8.0
- (c++)"typeinfo for pkgDirStream@Base" 0.8.0
- (c++)"typeinfo for debDebFile::ControlExtract@Base" 0.8.0
- (c++)"typeinfo for debDebFile::MemControlExtract@Base" 0.8.0
- (c++|optional)"typeinfo for pkgCache::DepIterator@Base" 0.8.0
- (c++|optional)"typeinfo for pkgCache::VerIterator@Base" 0.8.0
- (c++|optional)"typeinfo for pkgCache::Iterator<pkgCache::Dependency, pkgCache::DepIterator>@Base" 0.8.0
- (c++|optional)"typeinfo for pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>@Base" 0.8.0
- (c++)"typeinfo name for ExtractTar@Base" 0.8.0
- (c++)"typeinfo name for pkgExtract@Base" 0.8.0
- (c++)"typeinfo name for pkgDirStream@Base" 0.8.0
- (c++)"typeinfo name for debDebFile::ControlExtract@Base" 0.8.0
- (c++)"typeinfo name for debDebFile::MemControlExtract@Base" 0.8.0
- (c++|optional)"typeinfo name for pkgCache::DepIterator@Base" 0.8.0
- (c++|optional)"typeinfo name for pkgCache::VerIterator@Base" 0.8.0
- (c++|optional)"typeinfo name for pkgCache::Iterator<pkgCache::Dependency, pkgCache::DepIterator>@Base" 0.8.0
- (c++|optional)"typeinfo name for pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>@Base" 0.8.0
- (c++)"vtable for ExtractTar@Base" 0.8.0
- (c++)"vtable for pkgExtract@Base" 0.8.0
- (c++)"vtable for pkgDirStream@Base" 0.8.0
- (c++)"vtable for debDebFile::ControlExtract@Base" 0.8.0
- (c++)"vtable for debDebFile::MemControlExtract@Base" 0.8.0
- (c++|optional)"vtable for pkgCache::DepIterator@Base" 0.8.0
- (c++|optional)"vtable for pkgCache::VerIterator@Base" 0.8.0
- (c++|optional)"vtable for pkgCache::Iterator<pkgCache::Dependency, pkgCache::DepIterator>@Base" 0.8.0
- (c++|optional)"vtable for pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>@Base" 0.8.0
-### gcc artefacts
- (c++|optional=std)"std::vector<APT::Configuration::Compressor, std::allocator<APT::Configuration::Compressor> >::~vector()@Base" 0.8.12
-### try to ignore std:: template instances
- (c++|regex|optional=std)"^std::basic_string<.+ >\(.+\)@Base$" 0.8.0
- (c++|regex|optional=std)"^typeinfo name for std::iterator<.*>@Base$" 0.8.0
- (c++|regex|optional=std)"^typeinfo for std::iterator<.*>@Base$" 0.8.0
- (c++|optional=std)"std::ctype<char>::do_widen(char) const@Base" 1.0.3
diff --git a/debian/libapt-inst1.6.install.in b/debian/libapt-inst2.0.install.in
index 8bcce2c28..8bcce2c28 100644
--- a/debian/libapt-inst1.6.install.in
+++ b/debian/libapt-inst2.0.install.in
diff --git a/debian/libapt-inst2.0.symbols b/debian/libapt-inst2.0.symbols
new file mode 100644
index 000000000..11d0d872d
--- /dev/null
+++ b/debian/libapt-inst2.0.symbols
@@ -0,0 +1,72 @@
+libapt-inst.so.2.0 libapt-inst2.0 #MINVER#
+* Build-Depends-Package: libapt-pkg-dev
+ (c++)"ExtractTar::Done(bool)@APTINST_2.0" 0.8.0
+ (c++)"ExtractTar::Go(pkgDirStream&)@APTINST_2.0" 0.8.0
+ (c++)"ExtractTar::StartGzip()@APTINST_2.0" 0.8.0
+ (c++)"ExtractTar::ExtractTar(FileFd&, unsigned long long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTINST_2.0" 1.0.5
+ (c++)"ExtractTar::~ExtractTar()@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::GotoMember(char const*)@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::CheckMember(char const*)@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::ControlExtract::DoItem(pkgDirStream::Item&, int&)@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::ControlExtract::~ControlExtract()@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::ExtractTarMember(pkgDirStream&, char const*)@APTINST_2.0" 0.9.15.4
+ (c++)"debDebFile::ExtractArchive(pkgDirStream&)@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::MemControlExtract::TakeControl(void const*, unsigned long long)@APTINST_2.0" 1.0.5
+ (c++)"debDebFile::MemControlExtract::Read(debDebFile&)@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::MemControlExtract::DoItem(pkgDirStream::Item&, int&)@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::MemControlExtract::Process(pkgDirStream::Item&, unsigned char const*, unsigned long long, unsigned long long)@APTINST_2.0" 1.0.5
+ (c++)"debDebFile::MemControlExtract::~MemControlExtract()@APTINST_2.0" 0.8.0
+ (c++)"debDebFile::debDebFile(FileFd&)@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::FinishedFile(pkgDirStream::Item&, int)@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::CheckDirReplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::HandleOverwrites(pkgFLCache::NodeIterator, bool)@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::Fail(pkgDirStream::Item&, int)@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::DoItem(pkgDirStream::Item&, int&)@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::Aborted()@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::Finished()@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::pkgExtract(pkgFLCache&, pkgCache::VerIterator)@APTINST_2.0" 0.8.0
+ (c++)"pkgExtract::~pkgExtract()@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::TreeLookup(unsigned int*, char const*, char const*, unsigned long, unsigned int*, bool)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::AddConfFile(char const*, char const*, pkgFLCache::PkgIterator const&, unsigned char const*)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::AddDiversion(pkgFLCache::PkgIterator const&, char const*, char const*)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::BeginDiverLoad()@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::FinishDiverLoad()@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::GetPkg(char const*, char const*, bool)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::Header::Header()@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::GetNode(char const*, char const*, unsigned int, bool, bool)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::DropNode(unsigned int)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::HashNode(pkgFLCache::NodeIterator const&)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::PrintTree(unsigned int, unsigned long)@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::pkgFLCache(DynamicMMap&)@APTINST_2.0" 0.8.0
+ (c++)"pkgDirStream::FinishedFile(pkgDirStream::Item&, int)@APTINST_2.0" 0.8.0
+ (c++)"pkgDirStream::Fail(pkgDirStream::Item&, int)@APTINST_2.0" 0.8.0
+ (c++)"pkgDirStream::DoItem(pkgDirStream::Item&, int&)@APTINST_2.0" 0.8.0
+ (c++)"pkgDirStream::Process(pkgDirStream::Item&, unsigned char const*, unsigned long long, unsigned long long)@APTINST_2.0" 1.0.5
+ (c++)"pkgDirStream::~pkgDirStream()@APTINST_2.0" 0.8.0
+ (c++)"ARArchive::LoadHeaders()@APTINST_2.0" 0.8.0
+ (c++)"ARArchive::ARArchive(FileFd&)@APTINST_2.0" 0.8.0
+ (c++)"ARArchive::~ARArchive()@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::NodeIterator::RealPackage() const@APTINST_2.0" 0.8.0
+ (c++)"pkgFLCache::Header::CheckSizes(pkgFLCache::Header&) const@APTINST_2.0" 0.8.0
+ (c++)"ARArchive::FindMember(char const*) const@APTINST_2.0" 0.8.0
+ (c++)"typeinfo for ExtractTar@APTINST_2.0" 0.8.0
+ (c++)"typeinfo for pkgExtract@APTINST_2.0" 0.8.0
+ (c++)"typeinfo for pkgDirStream@APTINST_2.0" 0.8.0
+ (c++)"typeinfo for debDebFile::ControlExtract@APTINST_2.0" 0.8.0
+ (c++)"typeinfo for debDebFile::MemControlExtract@APTINST_2.0" 0.8.0
+ (c++)"typeinfo name for ExtractTar@APTINST_2.0" 0.8.0
+ (c++)"typeinfo name for pkgExtract@APTINST_2.0" 0.8.0
+ (c++)"typeinfo name for pkgDirStream@APTINST_2.0" 0.8.0
+ (c++)"typeinfo name for debDebFile::ControlExtract@APTINST_2.0" 0.8.0
+ (c++)"typeinfo name for debDebFile::MemControlExtract@APTINST_2.0" 0.8.0
+ (c++)"vtable for ExtractTar@APTINST_2.0" 0.8.0
+ (c++)"vtable for pkgExtract@APTINST_2.0" 0.8.0
+ (c++)"vtable for pkgDirStream@APTINST_2.0" 0.8.0
+ (c++)"vtable for debDebFile::ControlExtract@APTINST_2.0" 0.8.0
+ (c++)"vtable for debDebFile::MemControlExtract@APTINST_2.0" 0.8.0
+### gcc artefacts
+ (c++|optional=std)"std::vector<APT::Configuration::Compressor, std::allocator<APT::Configuration::Compressor> >::~vector()@APTINST_2.0" 0.8.12
+### symbol versioning
+ APTINST_2.0@APTINST_2.0 1.1~exp9
+### try to ignore std:: template instances
+ (c++|optional=std)"std::ctype<char>::do_widen(char) const@APTINST_2.0" 1.0.3
diff --git a/debian/libapt-pkg4.15.symbols b/debian/libapt-pkg4.15.symbols
deleted file mode 100644
index ee7f7a66e..000000000
--- a/debian/libapt-pkg4.15.symbols
+++ /dev/null
@@ -1,1431 +0,0 @@
-libapt-pkg.so.4.15 libapt-pkg4.15 #MINVER#
-* Build-Depends-Package: libapt-pkg-dev
- TFRewritePackageOrder@Base 0.8.0
- TFRewriteSourceOrder@Base 0.8.0
- (c++)"FileExists(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"IdentCdrom(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)@Base" 0.8.0
- (c++)"ListUpdate(pkgAcquireStatus&, pkgSourceList&, int)@Base" 0.8.0
- (c++)"MountCdrom(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"ParseCWord(char const*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0
- (c++)"ReadPinDir(pkgPolicy&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"RunScripts(char const*)@Base" 0.8.0
- (c++)"SafeGetCWD()@Base" 0.8.0
- (c++)"QuoteString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)@Base" 0.8.0
- (c++)"ReadPinFile(pkgPolicy&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"RegexChoice(RxChoiceList*, char const**, char const**)@Base" 0.8.0
- (c++)"SetNonBlock(int, bool)@Base" 0.8.0
- (c++)"flExtension(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"Base64Encode(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"ReadMessages(int, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@Base" 0.8.0
- (c++)"SetCloseExec(int, bool)@Base" 0.8.0
- (c++)"StringToBool(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)@Base" 0.8.0
- (c++)"UnmountCdrom(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"_GetErrorObj()@Base" 0.8.0
- (c++)"Base256ToNum(char const*, unsigned long long&, unsigned int)@Base" 1.0.5
- (c++)"pkgFixBroken(pkgDepCache&)@Base" 0.8.0
- (c++)"DeQuoteString(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&)@Base" 0.8.0
- (c++)"DeQuoteString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"OutputInDepth(unsigned long, char const*)@Base" 0.8.0
- (c++)"ReadConfigDir(Configuration&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, unsigned int const&)@Base" 0.8.0
- (c++)"URItoFileName(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"UTF8ToCodeset(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)@Base" 0.8.0
- (c++)"pkgInitConfig(Configuration&)@Base" 0.8.0
- (c++)"pkgInitSystem(Configuration&, pkgSystem*&)@Base" 0.8.0
- (c++)"safe_snprintf(char*, char*, char const*, ...)@Base" 0.8.0
- (c++)"stringcasecmp(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char const*, char const*)@Base" 0.8.0
- (c++)"stringcasecmp(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >)@Base" 0.8.0
-# (c++|optional=inline)"stringcasecmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)@Base" 0.8.0
- (c++)"stringcasecmp(char const*, char const*, char const*, char const*)@Base" 0.8.0
- (c++)"tolower_ascii(int)@Base" 0.8.0
- (c++)"ParseQuoteWord(char const*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0
- (c++)"ReadConfigFile(Configuration&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, unsigned int const&)@Base" 0.8.0
- (c++)"TokSplitString(char, char*, char**, unsigned long)@Base" 0.8.0
- (c++)"maybe_add_auth(URI&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgApplyStatus(pkgDepCache&)@Base" 0.8.0
- (c++)"CheckDomainList(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"CreateDirectory(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"DirectoryExists(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"VectorizeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const&)@Base" 0.8.0
- (c++)"pkgPrioSortList(pkgCache&, pkgCache::Version**)@Base" 0.8.0
- (c++)"pkgMakeStatusCache(pkgSourceList&, OpProgress&, MMap**, bool)@Base" 0.8.0
- (c++)"pkgMinimizeUpgrade(pkgDepCache&)@Base" 0.8.0
- (c++)"pkgAllUpgrade(pkgDepCache&)@Base" 0.8.0
- (c++)"pkgDistUpgrade(pkgDepCache&)@Base" 0.8.0
- (c++)"GetListOfFilesInDir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool const&)@Base" 0.8.0
- (c++)"GetListOfFilesInDir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, bool const&)@Base" 0.8.0
- (c++)"pkgMakeOnlyStatusCache(OpProgress&, DynamicMMap**)@Base" 0.8.0
- (c++)"WaitFd(int, bool, unsigned long)@Base" 0.8.0
- (c++)"GetLock(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@Base" 0.8.0
- (c++)"Hex2Num(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned int)@Base" 0.8.0
- (c++)"CopyFile(FileFd&, FileFd&)@Base" 0.8.0
- (c++)"ExecFork()@Base" 0.8.0
- (c++)"ExecWait(int, char const*, bool)@Base" 0.8.0
- (c++)"StrToNum(char const*, unsigned long&, unsigned int, unsigned int)@Base" 0.8.0
- (c++)"SubstVar(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"SubstVar(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, SubstVar const*)@Base" 0.8.0
- (c++)"flNoLink(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"flNotDir(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"ioprintf(std::basic_ostream<char, std::char_traits<char> >&, char const*, ...)@Base" 0.8.0
- (c++)"IsMounted(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0
- (c++)"LookupTag(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, char const*)@Base" 0.8.0
- (c++)"SizeToStr(double)@Base" 0.8.0
- (c++)"TFRewrite(_IO_FILE*, pkgTagSection const&, char const**, TFRewriteData*)@Base" 0.8.0
- (c++)"TimeToStr(unsigned long)@Base" 0.8.0
- (c++)"_strstrip(char*)@Base" 0.8.0
- (c++)"flCombine(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"flNotFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"stringcmp(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char const*, char const*)@Base" 0.8.0
- (c++)"stringcmp(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >)@Base" 0.8.0
- (c++)"stringcmp(char const*, char const*, char const*, char const*)@Base" 0.8.0
- (c++)"strprintf(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)@Base" 0.8.0
- (c++)"HashString::SupportedHashes()@Base" 0.8.0
- (c++)"HashString::_SupportedHashes@Base" 0.8.0
- (c++)"HashString::HashString(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"HashString::HashString(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"HashString::HashString()@Base" 0.8.0
- (c++)"HashString::~HashString()@Base" 0.8.0
- (c++)"OpProgress::CheckChange(float)@Base" 0.8.0
- (c++)"OpProgress::Done()@Base" 0.8.0
- (c++)"OpProgress::Update()@Base" 0.8.0
- (c++)"OpProgress::OpProgress()@Base" 0.8.0
- (c++)"OpProgress::~OpProgress()@Base" 0.8.0
- (c++)"SourceCopy::GetFileName()@Base" 0.8.0
- (c++)"SourceCopy::RewriteEntry(_IO_FILE*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"SourceCopy::Type()@Base" 0.8.0
- (c++)"SourceCopy::~SourceCopy()@Base" 0.8.0
- (c++)"pkgAcqFile::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0
- (c++)"pkgAcqFile::DescURI()@Base" 0.8.0
- (c++)"pkgAcqFile::~pkgAcqFile()@Base" 0.8.0
- (c++)"pkgAcquire::WorkerStep(pkgAcquire::Worker*)@Base" 0.8.0
- (c++)"pkgAcquire::FetchNeeded()@Base" 0.8.0
- (c++)"pkgAcquire::TotalNeeded()@Base" 0.8.0
- (c++)"pkgAcquire::MethodConfig::MethodConfig()@Base" 0.8.0
- (c++)"pkgAcquire::PartialPresent()@Base" 0.8.0
- (c++)"pkgAcquire::Add(pkgAcquire::Item*)@Base" 0.8.0
- (c++)"pkgAcquire::Add(pkgAcquire::Worker*)@Base" 0.8.0
- (c++)"pkgAcquire::Run(int)@Base" 0.8.0
- (c++)"pkgAcquire::Bump()@Base" 0.8.0
- (c++)"pkgAcquire::Item::ReportMirrorFailure(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcquire::Item::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0
- (c++)"pkgAcquire::Item::Rename(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcquire::Item::Finished()@Base" 0.8.0
- (c++)"pkgAcquire::Item::ShortDesc()@Base" 0.8.0
- (c++)"pkgAcquire::Item::~Item()@Base" 0.8.0
- (c++)"pkgAcquire::Clean(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcquire::Queue::Bump()@Base" 0.8.0
- (c++)"pkgAcquire::Queue::Cycle()@Base" 0.8.0
- (c++)"pkgAcquire::Queue::Dequeue(pkgAcquire::Item*)@Base" 0.8.0
- (c++)"pkgAcquire::Queue::Enqueue(pkgAcquire::ItemDesc&)@Base" 0.8.0
- (c++)"pkgAcquire::Queue::Startup()@Base" 0.8.0
- (c++)"pkgAcquire::Queue::FindItem(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::Worker*)@Base" 0.8.0
- (c++)"pkgAcquire::Queue::ItemDone(pkgAcquire::Queue::QItem*)@Base" 0.8.0
- (c++)"pkgAcquire::Queue::Shutdown(bool)@Base" 0.8.0
- (c++)"pkgAcquire::Queue::Queue(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire*)@Base" 0.8.0
- (c++)"pkgAcquire::Queue::~Queue()@Base" 0.8.0
- (c++)"pkgAcquire::Remove(pkgAcquire::Item*)@Base" 0.8.0
- (c++)"pkgAcquire::Remove(pkgAcquire::Worker*)@Base" 0.8.0
- (c++)"pkgAcquire::RunFds(fd_set*, fd_set*)@Base" 0.8.0
- (c++)"pkgAcquire::SetFds(int&, fd_set*, fd_set*)@Base" 0.8.0
- (c++)"pkgAcquire::UriEnd()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::OutFdReady()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::MediaChange(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcquire::Worker::RunMessages()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::Capabilities(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcquire::Worker::ReadMessages()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::MethodFailure()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::SendConfiguration()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::Pulse()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::Start()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::ItemDone()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::Construct()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::InFdReady()@Base" 0.8.0
- (c++)"pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem*)@Base" 0.8.0
- (c++)"pkgAcquire::Worker::Worker(pkgAcquire::MethodConfig*)@Base" 0.8.0
- (c++)"pkgAcquire::Worker::Worker(pkgAcquire::Queue*, pkgAcquire::MethodConfig*, pkgAcquireStatus*)@Base" 0.8.0
- (c++)"pkgAcquire::Worker::~Worker()@Base" 0.8.0
- (c++)"pkgAcquire::Dequeue(pkgAcquire::Item*)@Base" 0.8.0
- (c++)"pkgAcquire::Enqueue(pkgAcquire::ItemDesc&)@Base" 0.8.0
- (c++)"pkgAcquire::ItemDesc::~ItemDesc()@Base" 0.8.0
- (c++)"pkgAcquire::Shutdown()@Base" 0.8.0
- (c++)"pkgAcquire::UriBegin()@Base" 0.8.0
- (c++)"pkgAcquire::GetConfig(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcquire::QueueName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig const*&)@Base" 0.8.0
- (c++)"pkgAcquire::pkgAcquire(pkgAcquireStatus*)@Base" 0.8.0
- (c++)"pkgAcquire::pkgAcquire()@Base" 0.8.0
- (c++)"pkgAcquire::~pkgAcquire()@Base" 0.8.0
- (c++)"pkgRecords::Lookup(pkgCache::VerFileIterator const&)@Base" 0.8.0
- (c++)"pkgRecords::Lookup(pkgCache::DescFileIterator const&)@Base" 0.8.0
- (c++)"pkgRecords::Parser::Maintainer()@Base" 0.8.0
- (c++)"pkgRecords::Parser::Name()@Base" 0.8.0
- (c++)"pkgRecords::Parser::GetRec(char const*&, char const*&)@Base" 0.8.0
- (c++)"pkgRecords::Parser::FileName()@Base" 0.8.0
- (c++)"pkgRecords::Parser::Homepage()@Base" 0.8.0
- (c++)"pkgRecords::Parser::SourcePkg()@Base" 0.8.0
- (c++)"pkgRecords::Parser::SourceVer()@Base" 0.8.0
- (c++)"pkgRecords::pkgRecords(pkgCache&)@Base" 0.8.0
- (c++)"pkgRecords::~pkgRecords()@Base" 0.8.0
- (c++)"pkgTagFile::Step(pkgTagSection&)@Base" 0.8.0
- (c++)"pkgTagFile::~pkgTagFile()@Base" 0.8.0
- (c++)"CdromDevice::~CdromDevice()@Base" 0.8.0
- (c++)"CommandLine::DispatchArg(CommandLine::Dispatch*, bool)@Base" 0.8.0
- (c++)"CommandLine::SaveInConfig(unsigned int const&, char const* const*)@Base" 0.8.0
- (c++)"CommandLine::Parse(int, char const**)@Base" 0.8.0
- (c++)"CommandLine::HandleOpt(int&, int, char const**, char const*&, CommandLine::Args*, bool)@Base" 0.8.0
- (c++)"CommandLine::CommandLine(CommandLine::Args*, Configuration*)@Base" 0.8.0
- (c++)"CommandLine::~CommandLine()@Base" 0.8.0
- (c++)"DynamicMMap::WriteString(char const*, unsigned long)@Base" 0.8.0
- (c++)"DynamicMMap::Grow()@Base" 0.8.0
- (c++)"DynamicMMap::Allocate(unsigned long)@Base" 0.8.0
- (c++)"DynamicMMap::DynamicMMap(FileFd&, unsigned long, unsigned long const&, unsigned long const&, unsigned long const&)@Base" 0.8.0
- (c++)"DynamicMMap::DynamicMMap(unsigned long, unsigned long const&, unsigned long const&, unsigned long const&)@Base" 0.8.0
- (c++)"DynamicMMap::~DynamicMMap()@Base" 0.8.0
- (c++)"GlobalError::DumpErrors(std::basic_ostream<char, std::char_traits<char> >&, GlobalError::MsgType const&, bool const&)@Base" 0.8.0
- (c++)"GlobalError::PopMessage(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0
- (c++)"GlobalError::InsertErrno(GlobalError::MsgType const&, char const*, char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::PushToStack()@Base" 0.8.0
- (c++)"GlobalError::RevertToStack()@Base" 0.8.0
- (c++)"GlobalError::MergeWithStack()@Base" 0.8.0
- (c++)"GlobalError::Debug(char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::Errno(char const*, char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::Error(char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::Fatal(char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::DebugE(char const*, char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::FatalE(char const*, char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::Insert(GlobalError::MsgType const&, char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::Notice(char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::Discard()@Base" 0.8.0
- (c++)"GlobalError::NoticeE(char const*, char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::Warning(char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::WarningE(char const*, char const*, ...)@Base" 0.8.0
- (c++)"GlobalError::GlobalError()@Base" 0.8.0
- (c++)"PackageCopy::GetFileName()@Base" 0.8.0
- (c++)"PackageCopy::RewriteEntry(_IO_FILE*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"PackageCopy::Type()@Base" 0.8.0
- (c++)"PackageCopy::~PackageCopy()@Base" 0.8.0
- (c++)"pkgDepCache::IsDeleteOk(pkgCache::PkgIterator const&, bool, unsigned long, bool)@Base" 0.8.0
- (c++)"pkgDepCache::MarkDelete(pkgCache::PkgIterator const&, bool, unsigned long, bool)@Base" 0.8.0
- (c++)"pkgDepCache::StateCache::StripEpoch(char const*)@Base" 0.8.0
- (c++)"pkgDepCache::StateCache::Update(pkgCache::PkgIterator, pkgCache&)@Base" 0.8.0
- (c++)"pkgDepCache::ActionGroup::release()@Base" 0.8.0
- (c++)"pkgDepCache::ActionGroup::ActionGroup(pkgDepCache&)@Base" 0.8.0
- (c++)"pkgDepCache::ActionGroup::~ActionGroup()@Base" 0.8.0
- (c++)"pkgDepCache::IsInstallOk(pkgCache::PkgIterator const&, bool, unsigned long, bool)@Base" 0.8.0
- (c++)"pkgDepCache::MarkInstall(pkgCache::PkgIterator const&, bool, unsigned long, bool, bool)@Base" 0.8.0
- (c++)"pkgDepCache::SetReInstall(pkgCache::PkgIterator const&, bool)@Base" 0.8.0
- (c++)"pkgDepCache::VersionState(pkgCache::DepIterator, unsigned char, unsigned char, unsigned char)@Base" 0.8.0
- (c++)"pkgDepCache::BuildGroupOrs(pkgCache::VerIterator const&)@Base" 0.8.0
- (c++)"pkgDepCache::InRootSetFunc::InRootSet(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgDepCache::InRootSetFunc::~InRootSetFunc()@Base" 0.8.0
- (c++)"pkgDepCache::readStateFile(OpProgress*)@Base" 0.8.0
- (c++)"pkgDepCache::GetRootSetFunc()@Base" 0.8.0
- (c++)"pkgDepCache::UpdateVerState(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgDepCache::writeStateFile(OpProgress*, bool)@Base" 0.8.0
- (c++)"pkgDepCache::DependencyState(pkgCache::DepIterator&)@Base" 0.8.0
- (c++)"pkgDepCache::DefaultRootSetFunc::InRootSet(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc()@Base" 0.8.0
- (c++)"pkgDepCache::MarkFollowsSuggests()@Base" 0.8.0
- (c++)"pkgDepCache::MarkFollowsRecommends()@Base" 0.8.0
- (c++)"pkgDepCache::Init(OpProgress*)@Base" 0.8.0
- (c++)"pkgDepCache::Policy::IsImportantDep(pkgCache::DepIterator const&)@Base" 0.8.0
- (c++)"pkgDepCache::Policy::GetCandidateVer(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgDepCache::Policy::~Policy()@Base" 0.8.0
- (c++)"pkgDepCache::Update(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgDepCache::Update(OpProgress*)@Base" 0.8.0
- (c++)"pkgDepCache::Update(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgDepCache::CheckDep(pkgCache::DepIterator, int, pkgCache::PkgIterator&)@Base" 0.8.0
- (c++)"pkgDepCache::MarkAuto(pkgCache::PkgIterator const&, bool)@Base" 0.8.0
- (c++)"pkgDepCache::MarkKeep(pkgCache::PkgIterator const&, bool, bool, unsigned long)@Base" 0.8.0
- (c++)"pkgDepCache::MarkRequired(pkgDepCache::InRootSetFunc&)@Base" 0.8.0
- (c++)"pkgDepCache::Sweep()@Base" 0.8.0
- (c++)"pkgDepCache::pkgDepCache(pkgCache*, pkgDepCache::Policy*)@Base" 0.8.0
- (c++)"pkgDepCache::~pkgDepCache()@Base" 0.8.0
- (c++)"pkgSimulate::Policy::GetCandidateVer(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgSimulate::Policy::~Policy()@Base" 0.8.0
- (c++)"pkgSimulate::Remove(pkgCache::PkgIterator, bool)@Base" 0.8.0
- (c++)"pkgSimulate::Install(pkgCache::PkgIterator, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgSimulate::Configure(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgSimulate::pkgSimulate(pkgDepCache*)@Base" 0.8.0
- (c++)"pkgSimulate::~pkgSimulate()@Base" 0.8.0
- (c++)"indexRecords::Load(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"indexRecords::Lookup(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"indexRecords::MetaKeys()@Base" 0.8.0
- (c++)"indexRecords::~indexRecords()@Base" 0.8.0
- (c++)"pkgAcqMethod::FetchResult::TakeHashes(Hashes&)@Base" 0.8.0
- (c++)"pkgAcqMethod::FetchResult::FetchResult()@Base" 0.8.0
- (c++)"pkgAcqMethod::Configuration(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcqMethod::Log(char const*, ...)@Base" 0.8.0
- (c++)"pkgAcqMethod::Run(bool)@Base" 0.8.0
- (c++)"pkgAcqMethod::Exit()@Base" 0.8.0
- (c++)"pkgAcqMethod::Fail(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@Base" 0.8.0
- (c++)"pkgAcqMethod::Fail(bool)@Base" 0.8.0
- (c++)"pkgAcqMethod::Fetch(pkgAcqMethod::FetchItem*)@Base" 0.8.0
- (c++)"pkgAcqMethod::Status(char const*, ...)@Base" 0.8.0
- (c++)"pkgAcqMethod::URIDone(pkgAcqMethod::FetchResult&, pkgAcqMethod::FetchResult*)@Base" 0.8.0
- (c++)"pkgAcqMethod::Redirect(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"pkgAcqMethod::URIStart(pkgAcqMethod::FetchResult&)@Base" 0.8.0
- (c++)"pkgAcqMethod::MediaFail(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcqMethod::pkgAcqMethod(char const*, unsigned long)@Base" 0.8.0
- (c++)"pkgAcqMethod::~pkgAcqMethod()@Base" 0.8.0
- (c++)"pkgCacheFile::BuildCaches(OpProgress*, bool)@Base" 0.8.0
- (c++)"pkgCacheFile::BuildPolicy(OpProgress*)@Base" 0.8.0
- (c++)"pkgCacheFile::BuildDepCache(OpProgress*)@Base" 0.8.0
- (c++)"pkgCacheFile::BuildSourceList(OpProgress*)@Base" 0.8.0
- (c++)"pkgCacheFile::Open(OpProgress*, bool)@Base" 0.8.0
- (c++)"pkgCacheFile::Close()@Base" 0.8.0
- (c++)"pkgCacheFile::pkgCacheFile()@Base" 0.8.0
- (c++)"pkgCacheFile::~pkgCacheFile()@Base" 0.8.0
- (c++)"pkgIndexFile::LanguageCode()@Base" 0.8.0
- (c++)"pkgIndexFile::CheckLanguageCode(char const*)@Base" 0.8.0
- (c++)"pkgIndexFile::TranslationsAvailable()@Base" 0.8.0
- (c++)"pkgIndexFile::Type::GlobalList@Base" 0.8.0
- (c++)"pkgIndexFile::Type::GlobalListLen@Base" 0.8.0
- (c++)"pkgIndexFile::Type::GetType(char const*)@Base" 0.8.0
- (c++)"pkgIndexFile::Type::Type()@Base" 0.8.0
- (c++)"pkgOrderList::VisitRDeps(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgOrderList::OrderUnpack(std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)@Base" 0.8.0
- (c++)"pkgOrderList::DepConfigure(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::DepUnPackDep(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::DepUnPackPre(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::DepUnPackCrit(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::DepUnPackPreD(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::OrderCompareA(void const*, void const*)@Base" 0.8.0
- (c++)"pkgOrderList::OrderCompareB(void const*, void const*)@Base" 0.8.0
- (c++)"pkgOrderList::OrderCritical()@Base" 0.8.0
- (c++)"pkgOrderList::VisitProvides(pkgCache::DepIterator, bool)@Base" 0.8.0
- (c++)"pkgOrderList::OrderConfigure()@Base" 0.8.0
- (c++)"pkgOrderList::VisitRProvides(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::VerIterator)@Base" 0.8.0
- (c++)"pkgOrderList::Me@Base" 0.8.0
- (c++)"pkgOrderList::DoRun()@Base" 0.8.0
- (c++)"pkgOrderList::Score(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgOrderList::AddLoop(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::FileCmp(pkgCache::PkgIterator, pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgOrderList::CheckDep(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::DepRemove(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgOrderList::IsMissing(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgOrderList::VisitDeps(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgOrderList::WipeFlags(unsigned long)@Base" 0.8.0
- (c++)"pkgOrderList::pkgOrderList(pkgDepCache*)@Base" 0.8.0
- (c++)"pkgOrderList::~pkgOrderList()@Base" 0.8.0
- (c++)"Configuration::MatchAgainstConfig::MatchAgainstConfig(char const*)@Base" 0.8.0
- (c++)"Configuration::MatchAgainstConfig::~MatchAgainstConfig()@Base" 0.8.0
- (c++)"Configuration::Set(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"Configuration::Set(char const*, int const&)@Base" 0.8.0
- (c++)"Configuration::Dump(std::basic_ostream<char, std::char_traits<char> >&)@Base" 0.8.0
- (c++)"Configuration::Clear(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"Configuration::Clear(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&)@Base" 0.8.0
- (c++)"Configuration::Clear(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"Configuration::CndSet(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"Configuration::Lookup(char const*, bool const&)@Base" 0.8.0
- (c++)"Configuration::Lookup(Configuration::Item*, char const*, unsigned long const&, bool const&)@Base" 0.8.0
- (c++)"Configuration::Configuration(Configuration::Item const*)@Base" 0.8.0
- (c++)"Configuration::Configuration()@Base" 0.8.0
- (c++)"Configuration::~Configuration()@Base" 0.8.0
- (c++)"WeakPointable::~WeakPointable()@Base" 0.8.0
- (c++)"debListParser::ParseDepends(char const*, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&, bool const&, bool const&)@Base" 0.8.0
- (c++)"debListParser::ConvertRelation(char const*, unsigned int&)@Base" 0.8.0
- (c++)"debListParser::GetPrio(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgAcqArchive::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0
- (c++)"pkgAcqArchive::DescURI()@Base" 0.8.0
- (c++)"pkgAcqArchive::Finished()@Base" 0.8.0
- (c++)"pkgAcqArchive::QueueNext()@Base" 0.8.0
- (c++)"pkgAcqArchive::ShortDesc()@Base" 0.8.0
- (c++)"pkgAcqArchive::pkgAcqArchive(pkgAcquire*, pkgSourceList*, pkgRecords*, pkgCache::VerIterator const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0
- (c++)"pkgAcqArchive::~pkgAcqArchive()@Base" 0.8.0
- (c++)"pkgSourceList::ReadAppend(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgSourceList::ReadMainList()@Base" 0.8.0
- (c++)"pkgSourceList::ReadSourceDir(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgSourceList::Read(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgSourceList::Type::GlobalList@Base" 0.8.0
- (c++)"pkgSourceList::Type::GlobalListLen@Base" 0.8.0
- (c++)"pkgSourceList::Type::GetType(char const*)@Base" 0.8.0
- (c++)"pkgSourceList::Type::Type()@Base" 0.8.0
- (c++)"pkgSourceList::Reset()@Base" 0.8.0
- (c++)"pkgSourceList::pkgSourceList(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgSourceList::pkgSourceList()@Base" 0.8.0
- (c++)"pkgSourceList::~pkgSourceList()@Base" 0.8.0
- (c++)"pkgSrcRecords::File::~File()@Base" 0.8.0
- (c++)"pkgSrcRecords::Find(char const*, bool const&)@Base" 0.8.0
- (c++)"pkgSrcRecords::Parser::BuildDepRec::~BuildDepRec()@Base" 0.8.0
- (c++)"pkgSrcRecords::Parser::BuildDepType(unsigned char const&)@Base" 0.8.0
- (c++)"pkgSrcRecords::Restart()@Base" 0.8.0
- (c++)"pkgSrcRecords::pkgSrcRecords(pkgSourceList&)@Base" 0.8.0
- (c++)"pkgSrcRecords::~pkgSrcRecords()@Base" 0.8.0
- (c++)"pkgTagSection::TrimRecord(bool, char const*&)@Base" 0.8.0
- (c++)"pkgTagSection::Trim()@Base" 0.8.0
- (c++)"pkgVendorList::CreateList(Configuration&)@Base" 0.8.0
- (c++)"pkgVendorList::FindVendor(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)@Base" 0.8.0
- (c++)"pkgVendorList::ReadMainList()@Base" 0.8.0
- (c++)"pkgVendorList::LookupFingerprint(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgVendorList::Read(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgVendorList::~pkgVendorList()@Base" 0.8.0
- (c++)"OpTextProgress::Done()@Base" 0.8.0
- (c++)"OpTextProgress::Write(char const*)@Base" 0.8.0
- (c++)"OpTextProgress::Update()@Base" 0.8.0
- (c++)"OpTextProgress::OpTextProgress(Configuration&)@Base" 0.8.0
- (c++)"OpTextProgress::~OpTextProgress()@Base" 0.8.0
- (c++)"pkgVersionMatch::ExpressionMatches(char const*, char const*)@Base" 0.8.0
- (c++)"pkgVersionMatch::ExpressionMatches(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)@Base" 0.8.0
- (c++)"pkgVersionMatch::Find(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgVersionMatch::MatchVer(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@Base" 0.8.0
- (c++)"pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator)@Base" 0.8.0
- (c++)"pkgVersionMatch::pkgVersionMatch(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgVersionMatch::MatchType)@Base" 0.8.0
- (c++)"pkgVersionMatch::~pkgVersionMatch()@Base" 0.8.0
- (c++)"TranslationsCopy::CopyTranslations(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, pkgCdromStatus*)@Base" 0.8.0
- (c++)"pkgAcquireStatus::Done(pkgAcquire::ItemDesc&)@Base" 0.8.0
- (c++)"pkgAcquireStatus::Fail(pkgAcquire::ItemDesc&)@Base" 0.8.0
- (c++)"pkgAcquireStatus::Stop()@Base" 0.8.0
- (c++)"pkgAcquireStatus::Fetch(pkgAcquire::ItemDesc&)@Base" 0.8.0
- (c++)"pkgAcquireStatus::Pulse(pkgAcquire*)@Base" 0.8.0
- (c++)"pkgAcquireStatus::Start()@Base" 0.8.0
- (c++)"pkgAcquireStatus::IMSHit(pkgAcquire::ItemDesc&)@Base" 0.8.0
- (c++)"pkgAcquireStatus::pkgAcquireStatus()@Base" 0.8.0
- (c++)"PreferenceSection::TrimRecord(bool, char const*&)@Base" 0.8.0
- (c++)"pkgArchiveCleaner::Go(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgCache&)@Base" 0.8.0
- (c++)"pkgCacheGenerator::MakeStatusCache(pkgSourceList&, OpProgress*, MMap**, bool)@Base" 0.8.0
- (c++)"pkgCacheGenerator::CreateDynamicMMap(FileFd*, unsigned long)@Base" 0.8.0
- (c++)"pkgCacheGenerator::MakeOnlyStatusCache(OpProgress*, DynamicMMap**)@Base" 0.8.0
- (c++)"pkgPackageManager::FixMissing()@Base" 0.8.0
- (c++)"pkgPackageManager::EarlyRemove(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgPackageManager::GetArchives(pkgAcquire*, pkgSourceList*, pkgRecords*)@Base" 0.8.0
- (c++)"pkgPackageManager::SmartRemove(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgPackageManager::SmartUnPack(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgPackageManager::ConfigureAll()@Base" 0.8.0
- (c++)"pkgPackageManager::ImmediateAdd(pkgCache::PkgIterator, bool, unsigned int const&)@Base" 0.8.0
- (c++)"pkgPackageManager::OrderInstall()@Base" 0.8.0
- (c++)"pkgPackageManager::DepAlwaysTrue(pkgCache::DepIterator)@Base" 0.8.0
- (c++)"pkgPackageManager::CheckRConflicts(pkgCache::PkgIterator, pkgCache::DepIterator, char const*)@Base" 0.8.0
- (c++)"pkgPackageManager::CreateOrderList()@Base" 0.8.0
- (c++)"pkgPackageManager::DoInstallPostFork(int)@Base" 0.8.0
- (c++)"pkgPackageManager::Go(int)@Base" 0.8.0
- (c++)"pkgPackageManager::Reset()@Base" 0.8.0
- (c++)"pkgPackageManager::Remove(pkgCache::PkgIterator, bool)@Base" 0.8.0
- (c++)"pkgPackageManager::Install(pkgCache::PkgIterator, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgPackageManager::Configure(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgPackageManager::DoInstall(int)@Base" 0.8.0
- (c++)"pkgPackageManager::pkgPackageManager(pkgDepCache*)@Base" 0.8.0
- (c++)"pkgPackageManager::~pkgPackageManager()@Base" 0.8.0
- (c++)"pkgProblemResolver::InstallProtect()@Base" 0.8.0
- (c++)"pkgProblemResolver::This@Base" 0.8.0
- (c++)"pkgProblemResolver::pkgProblemResolver(pkgDepCache*)@Base" 0.8.0
- (c++)"pkgProblemResolver::~pkgProblemResolver()@Base" 0.8.0
- (c++)"debVersioningSystem::CmpFragment(char const*, char const*, char const*, char const*)@Base" 0.8.0
- (c++)"debVersioningSystem::DoCmpVersion(char const*, char const*, char const*, char const*)@Base" 0.8.0
- (c++)"debVersioningSystem::DoCmpReleaseVer(char const*, char const*, char const*, char const*)@Base" 0.8.0
- (c++)"debVersioningSystem::UpstreamVersion(char const*)@Base" 0.8.0
- (c++)"debVersioningSystem::CheckDep(char const*, int, char const*)@Base" 0.8.0
- (c++)"debVersioningSystem::debVersioningSystem()@Base" 0.8.0
- (c++)"debVersioningSystem::~debVersioningSystem()@Base" 0.8.0
- (c++)"pkgUdevCdromDevices::Scan()@Base" 0.8.0
- (c++)"pkgUdevCdromDevices::Dlopen()@Base" 0.8.0
- (c++)"pkgUdevCdromDevices::pkgUdevCdromDevices()@Base" 0.8.0
- (c++)"pkgUdevCdromDevices::~pkgUdevCdromDevices()@Base" 0.8.0
- (c++)"pkgVersioningSystem::GlobalList@Base" 0.8.0
- (c++)"pkgVersioningSystem::GlobalListLen@Base" 0.8.0
- (c++)"pkgVersioningSystem::TestCompatibility(pkgVersioningSystem const&)@Base" 0.8.0
- (c++)"pkgVersioningSystem::GetVS(char const*)@Base" 0.8.0
- (c++)"pkgVersioningSystem::pkgVersioningSystem()@Base" 0.8.0
- (c++)"APT::CacheFilter::PackageNameMatchesRegEx::PackageNameMatchesRegEx(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"APT::CacheFilter::PackageNameMatchesRegEx::~PackageNameMatchesRegEx()@Base" 0.8.0
- (c++)"APT::CacheFilter::PackageNameMatchesRegEx::operator()(pkgCache::GrpIterator const&)@Base" 0.8.0
- (c++)"APT::CacheFilter::PackageNameMatchesRegEx::operator()(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"APT::Configuration::getLanguages(bool const&, bool const&, char const**)@Base" 0.8.0
- (c++)"APT::Configuration::getArchitectures(bool const&)@Base" 0.8.0
- (c++)"APT::Configuration::checkArchitecture(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"APT::Configuration::getCompressionTypes(bool const&)@Base" 0.8.0
- (c++)"APT::CacheSetHelper::canNotFindPkgName(pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"APT::CacheSetHelper::canNotFindNewestVer(pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"APT::CacheSetHelper::canNotFindCandidateVer(pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"APT::CacheSetHelper::canNotFindInstalledVer(pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"APT::CacheSetHelper::~CacheSetHelper()@Base" 0.8.0
- (c++)"URI::NoUserPassword(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"URI::CopyFrom(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"URI::SiteOnly(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"URI::~URI()@Base" 0.8.0
- (c++)"URI::operator std::basic_string<char, std::char_traits<char>, std::allocator<char> >()@Base" 0.8.0
- (c++)"MMap::Map(FileFd&)@Base" 0.8.0
- (c++)"MMap::Sync(unsigned long, unsigned long)@Base" 0.8.0
- (c++)"MMap::Sync()@Base" 0.8.0
- (c++)"MMap::Close(bool)@Base" 0.8.0
- (c++)"MMap::MMap(FileFd&, unsigned long)@Base" 0.8.0
- (c++)"MMap::MMap(unsigned long)@Base" 0.8.0
- (c++)"MMap::~MMap()@Base" 0.8.0
- (c++)"FileFd::Size()@Base" 0.8.0
- (c++)"FileFd::Sync()@Base" 0.8.0
- (c++)"FileFd::Tell()@Base" 0.8.0
- (c++)"FileFd::Close()@Base" 0.8.0
- (c++)"FileFd::~FileFd()@Base" 0.8.0
- (c++)"Vendor::CheckDist(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"Vendor::Vendor(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<Vendor::Fingerprint*, std::allocator<Vendor::Fingerprint*> >*)@Base" 0.8.0
- (c++)"Vendor::~Vendor()@Base" 0.8.0
- (c++)"pkgCache::CompTypeDeb(unsigned char)@Base" 0.8.0
- (c++)"pkgCache::DepIterator::GlobOr(pkgCache::DepIterator&, pkgCache::DepIterator&)@Base" 0.8.0
- (c++)"pkgCache::DepIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::DepIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::GrpIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::GrpIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::PkgIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::PkgIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::PrvIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::PrvIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::VerIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::VerIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::DescIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::DescIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::PkgFileIterator::IsOk()@Base" 0.8.0
- (c++)"pkgCache::PkgFileIterator::RelStr()@Base" 0.8.0
- (c++)"pkgCache::PkgFileIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::PkgFileIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::VerFileIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::VerFileIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::DescFileIterator::operator++(int)@Base" 0.8.0
- (c++)"pkgCache::DescFileIterator::operator++()@Base" 0.8.0
- (c++)"pkgCache::ReMap(bool const&)@Base" 0.8.0
- (c++)"pkgCache::Header::Header()@Base" 0.8.0
- (c++)"pkgCache::DepType(unsigned char)@Base" 0.8.0
- (c++)"pkgCache::FindGrp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"pkgCache::FindPkg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"pkgCache::FindPkg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
- (c++)"pkgCache::CompType(unsigned char)@Base" 0.8.0
- (c++)"pkgCache::Priority(unsigned char)@Base" 0.8.0
- (c++)"pkgCache::pkgCache(MMap*, bool)@Base" 0.8.0
- (c++)"pkgCache::~pkgCache()@Base" 0.8.0
- (c++)"pkgCdrom::DropRepeats(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, char const*)@Base" 0.8.0
- (c++)"pkgCdrom::FindPackages(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, pkgCdromStatus*, unsigned int)@Base" 0.8.0
- (c++)"pkgCdrom::WriteDatabase(Configuration&)@Base" 0.8.0
- (c++)"pkgCdrom::DropBinaryArch(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@Base" 0.8.0
- (c++)"pkgCdrom::WriteSourceList(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool)@Base" 0.8.0
- (c++)"pkgCdrom::ReduceSourcelist(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@Base" 0.8.0
- (c++)"pkgCdrom::Add(pkgCdromStatus*)@Base" 0.8.0
- (c++)"pkgCdrom::Ident(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, pkgCdromStatus*)@Base" 0.8.0
- (c++)"pkgCdrom::Score(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"IndexCopy::CopyPackages(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, pkgCdromStatus*)@Base" 0.8.0
- (c++)"IndexCopy::ReconstructChop(unsigned long&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"IndexCopy::ReconstructPrefix(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"IndexCopy::ConvertToSourceList(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0
- (c++)"IndexCopy::ChopDirs(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)@Base" 0.8.0
- (c++)"IndexCopy::GrabFirst(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)@Base" 0.8.0
- (c++)"SigVerify::CopyAndVerify(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)@Base" 0.8.0
- (c++)"SigVerify::RunGPGV(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, int*)@Base" 0.8.0
- (c++)"debSystem::Initialize(Configuration&)@Base" 0.8.0
- (c++)"debSystem::AddStatusFiles(std::vector<pkgIndexFile*, std::allocator<pkgIndexFile*> >&)@Base" 0.8.0
- (c++)"debSystem::ArchiveSupported(char const*)@Base" 0.8.0
- (c++)"debSystem::Lock()@Base" 0.8.0
- (c++)"debSystem::Score(Configuration const&)@Base" 0.8.0
- (c++)"debSystem::UnLock(bool)@Base" 0.8.0
- (c++)"debSystem::debSystem()@Base" 0.8.0
- (c++)"debSystem::~debSystem()@Base" 0.8.0
- (c++)"pkgDPkgPM::SendV2Pkgs(_IO_FILE*)@Base" 0.8.0
- (c++)"pkgDPkgPM::DoTerminalPty(int)@Base" 0.8.0
- (c++)"pkgDPkgPM::WriteHistoryTag(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgDPkgPM::WriteApportReport(char const*, char const*)@Base" 0.8.0
- (c++)"pkgDPkgPM::RunScriptsWithPkgs(char const*)@Base" 0.8.0
- (c++)"pkgDPkgPM::Go(int)@Base" 0.8.0
- (c++)"pkgDPkgPM::Reset()@Base" 0.8.0
- (c++)"pkgDPkgPM::Remove(pkgCache::PkgIterator, bool)@Base" 0.8.0
- (c++)"pkgDPkgPM::DoStdin(int)@Base" 0.8.0
- (c++)"pkgDPkgPM::Install(pkgCache::PkgIterator, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
- (c++)"pkgDPkgPM::OpenLog()@Base" 0.8.0
- (c++)"pkgDPkgPM::CloseLog()@Base" 0.8.0
- (c++)"pkgDPkgPM::Configure(pkgCache::PkgIterator)@Base" 0.8.0
- (c++)"pkgDPkgPM::pkgDPkgPM(pkgDepCache*)@Base" 0.8.0
- (c++)"pkgDPkgPM::~pkgDPkgPM()@Base" 0.8.0
- (c++)"pkgPolicy::GetPriority(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgPolicy::InitDefaults()@Base" 0.8.0
- (c++)"pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgPolicy::PkgPin::~PkgPin()@Base" 0.8.0
- (c++)"pkgPolicy::GetMatch(pkgCache::PkgIterator const&)@Base" 0.8.0
- (c++)"pkgPolicy::CreatePin(pkgVersionMatch::MatchType, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, short)@Base" 0.8.0
- (c++)"pkgPolicy::pkgPolicy(pkgCache*)@Base" 0.8.0
- (c++)"pkgPolicy::~pkgPolicy()@Base" 0.8.0
- (c++)"pkgSystem::GlobalList@Base" 0.8.0
- (c++)"pkgSystem::Initialize(Configuration&)@Base" 0.8.0
- (c++)"pkgSystem::GlobalListLen@Base" 0.8.0
- (c++)"pkgSystem::Score(Configuration const&)@Base" 0.8.0
- (c++)"pkgSystem::GetSystem(char const*)@Base" 0.8.0
- (c++)"pkgSystem::pkgSystem()@Base" 0.8.0
- (c++)"HashString::VerifyFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 0.8.0
- (c++)"HashString::empty() const@Base" 0.8.0
- (c++)"HashString::toStr() const@Base" 0.8.0
- (c++)"CommandLine::FileSize() const@Base" 0.8.0
- (c++)"GlobalError::empty(GlobalError::MsgType const&) const@Base" 0.8.0
- (c++)"indexRecords::GetValidUntil() const@Base" 0.8.0
- (c++)"indexRecords::GetExpectedDist() const@Base" 0.8.0
- (c++)"indexRecords::Exists(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@Base" 0.8.0
- (c++)"indexRecords::GetDist() const@Base" 0.8.0
- (c++)"indexRecords::CheckDist(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 0.8.0
- (c++)"pkgIndexFile::ArchiveURI(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 0.8.0
- (c++)"pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const&, pkgSrcRecords::File const&) const@Base" 0.8.0
- (c++)"pkgIndexFile::ArchiveInfo(pkgCache::VerIterator) const@Base" 0.8.0
- (c++)"pkgIndexFile::FindInCache(pkgCache&) const@Base" 0.8.0
- (c++)"pkgIndexFile::CreateSrcParser() const@Base" 0.8.0
- (c++)"pkgIndexFile::MergeFileProvides(pkgCacheGenerator&, OpProgress&) const@Base" 0.8.0
- (c++)"pkgIndexFile::Type::CreatePkgParser(pkgCache::PkgFileIterator) const@Base" 0.8.0
- (c++)"pkgIndexFile::Merge(pkgCacheGenerator&, OpProgress&) const@Base" 0.8.0
- (c++)"Configuration::MatchAgainstConfig::Match(char const*) const@Base" 0.8.0
- (c++)"Configuration::Find(char const*, char const*) const@Base" 0.8.0
- (c++)"Configuration::Item::FullTag(Configuration::Item const*) const@Base" 0.8.0
- (c++)"Configuration::FindB(char const*, bool const&) const@Base" 0.8.0
- (c++)"Configuration::FindI(char const*, int const&) const@Base" 0.8.0
- (c++)"Configuration::Exists(char const*) const@Base" 0.8.0
- (c++)"Configuration::FindAny(char const*, char const*) const@Base" 0.8.0
- (c++)"Configuration::FindDir(char const*, char const*) const@Base" 0.8.0
- (c++)"Configuration::FindFile(char const*, char const*) const@Base" 0.8.0
- (c++)"Configuration::ExistsAny(char const*) const@Base" 0.8.0
- (c++)"pkgSourceList::GetIndexes(pkgAcquire*, bool) const@Base" 0.8.0
- (c++)"pkgSourceList::Type::FixupURI(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const@Base" 0.8.0
- (c++)"pkgSourceList::Type::ParseLine(std::vector<metaIndex*, std::allocator<metaIndex*> >&, char const*, unsigned long const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@Base" 0.8.0
- (c++)"pkgSourceList::FindIndex(pkgCache::PkgFileIterator, pkgIndexFile*&) const@Base" 0.8.0
- (c++)"pkgTagSection::Find(char const*, char const*&, char const*&) const@Base" 0.8.0
- (c++)"pkgTagSection::Find(char const*, unsigned int&) const@Base" 0.8.0
- (c++)"pkgTagSection::FindI(char const*, long) const@Base" 0.8.0
- (c++)"pkgTagSection::FindS(char const*) const@Base" 0.8.0
- (c++)"pkgTagSection::FindULL(char const*, unsigned long long const&) const@Base" 0.8.0
- (c++)"pkgTagSection::FindFlag(char const*, unsigned long&, unsigned long) const@Base" 0.8.0
- (c++)"Vendor::GetVendorID() const@Base" 0.8.0
- (c++)"Vendor::LookupFingerprint(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 0.8.0
- (c++)"pkgCache::DepIterator::AllTargets() const@Base" 0.8.0
- (c++)"pkgCache::DepIterator::IsCritical() const@Base" 0.8.0
- (c++)"pkgCache::DepIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::DepIterator::SmartTargetPkg(pkgCache::PkgIterator&) const@Base" 0.8.0
- (c++)"pkgCache::GrpIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::GrpIterator::FindPreferredPkg(bool const&) const@Base" 0.8.0
- (c++)"pkgCache::GrpIterator::FindPkg(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 0.8.0
- (c++)"pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const&) const@Base" 0.8.0
- (c++)"pkgCache::PkgIterator::CurVersion() const@Base" 0.8.0
- (c++)"pkgCache::PkgIterator::CandVersion() const@Base" 0.8.0
- (c++)"pkgCache::PkgIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::PkgIterator::State() const@Base" 0.8.0
- (c++)"pkgCache::PkgIterator::FullName(bool const&) const@Base" 0.8.0
- (c++)"pkgCache::PrvIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::VerIterator::CompareVer(pkgCache::VerIterator const&) const@Base" 0.8.0
- (c++)"pkgCache::VerIterator::NewestFile() const@Base" 0.8.0
- (c++)"pkgCache::VerIterator::Downloadable() const@Base" 0.8.0
- (c++)"pkgCache::VerIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::VerIterator::TranslatedDescription() const@Base" 0.8.0
- (c++)"pkgCache::VerIterator::RelStr() const@Base" 0.8.0
- (c++)"pkgCache::VerIterator::Automatic() const@Base" 0.8.0
- (c++)"pkgCache::DescIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::PkgFileIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::VerFileIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::DescFileIterator::OwnerPointer() const@Base" 0.8.0
- (c++)"pkgCache::sHash(char const*) const@Base" 0.8.0
- (c++)"pkgCache::sHash(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@Base" 0.8.0
- (c++)"pkgCache::Header::CheckSizes(pkgCache::Header&) const@Base" 0.8.0
- (c++)"debSystem::CreatePM(pkgDepCache*) const@Base" 0.8.0
- (c++)"debSystem::FindIndex(pkgCache::PkgFileIterator, pkgIndexFile*&) const@Base" 0.8.0
- (c++)"metaIndex::GetURI() const@Base" 0.8.0
- (c++)"metaIndex::GetDist() const@Base" 0.8.0
- (c++)"metaIndex::GetType() const@Base" 0.8.0
- (c++)"typeinfo for OpProgress@Base" 0.8.0
- (c++)"typeinfo for SourceCopy@Base" 0.8.0
- (c++)"typeinfo for pkgAcqFile@Base" 0.8.0
- (c++)"typeinfo for pkgAcquire@Base" 0.8.0
- (c++)"typeinfo for DynamicMMap@Base" 0.8.0
- (c++)"typeinfo for PackageCopy@Base" 0.8.0
- (c++)"typeinfo for pkgDepCache@Base" 0.8.0
- (c++)"typeinfo for pkgSimulate@Base" 0.8.0
- (c++)"typeinfo for indexRecords@Base" 0.8.0
- (c++)"typeinfo for pkgAcqMethod@Base" 0.8.0
- (c++)"typeinfo for pkgCacheFile@Base" 0.8.0
- (c++)"typeinfo for pkgIndexFile@Base" 0.8.0
- (c++)"typeinfo for WeakPointable@Base" 0.8.0
- (c++)"typeinfo for pkgAcqArchive@Base" 0.8.0
- (c++)"typeinfo for pkgTagSection@Base" 0.8.0
- (c++)"typeinfo for OpTextProgress@Base" 0.8.0
- (c++)"typeinfo for pkgAcquireStatus@Base" 0.8.0
- (c++)"typeinfo for PreferenceSection@Base" 0.8.0
- (c++)"typeinfo for pkgPackageManager@Base" 0.8.0
- (c++)"typeinfo for debVersioningSystem@Base" 0.8.0
- (c++)"typeinfo for pkgUdevCdromDevices@Base" 0.8.0
- (c++)"typeinfo for pkgVersioningSystem@Base" 0.8.0
- (c++)"typeinfo for MMap@Base" 0.8.0
- (c++)"typeinfo for FileFd@Base" 0.8.0
- (c++)"typeinfo for Vendor@Base" 0.8.0
- (c++)"typeinfo for pkgCache@Base" 0.8.0
- (c++)"typeinfo for IndexCopy@Base" 0.8.0
- (c++)"typeinfo for debSystem@Base" 0.8.0
- (c++)"typeinfo for metaIndex@Base" 0.8.0
- (c++)"typeinfo for pkgDPkgPM@Base" 0.8.0
- (c++)"typeinfo for pkgPolicy@Base" 0.8.0
- (c++)"typeinfo for pkgSystem@Base" 0.8.0
- (c++)"typeinfo for pkgAcquire::Item@Base" 0.8.0
- (c++)"typeinfo for pkgRecords::Parser@Base" 0.8.0
- (c++)"typeinfo for pkgDepCache::InRootSetFunc@Base" 0.8.0
- (c++)"typeinfo for pkgDepCache::DefaultRootSetFunc@Base" 0.8.0
- (c++)"typeinfo for pkgDepCache::Policy@Base" 0.8.0
- (c++)"typeinfo for pkgSimulate::Policy@Base" 0.8.0
- (c++)"typeinfo for pkgIndexFile::Type@Base" 0.8.0
- (c++)"typeinfo for Configuration::MatchAgainstConfig@Base" 0.8.0
- (c++)"typeinfo for pkgSourceList::Type@Base" 0.8.0
- (c++)"typeinfo for pkgSrcRecords::Parser@Base" 0.8.0
- (c++)"typeinfo for APT::CacheSetHelper@Base" 0.8.0
- (c++)"typeinfo for pkgCache::DepIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::GrpIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::PkgIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::PrvIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::VerIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::DescIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::PkgFileIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::VerFileIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::DescFileIterator@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::Dependency, pkgCache::DepIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::Description, pkgCache::DescIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::PackageFile, pkgCache::PkgFileIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::Group, pkgCache::GrpIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::Package, pkgCache::PkgIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::VerFile, pkgCache::VerFileIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::DescFile, pkgCache::DescFileIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Iterator<pkgCache::Provides, pkgCache::PrvIterator>@Base" 0.8.0
- (c++)"typeinfo for pkgCache::Namespace@Base" 0.8.0
- (c++)"typeinfo name for OpProgress@Base" 0.8.0
- (c++)"typeinfo name for SourceCopy@Base" 0.8.0
- (c++)"typeinfo name for pkgAcqFile@Base" 0.8.0
- (c++)"typeinfo name for pkgAcquire@Base" 0.8.0
- (c++)"typeinfo name for DynamicMMap@Base" 0.8.0
- (c++)"typeinfo name for PackageCopy@Base" 0.8.0
- (c++)"typeinfo name for pkgDepCache@Base" 0.8.0
- (c++)"typeinfo name for pkgSimulate@Base" 0.8.0
- (c++)"typeinfo name for indexRecords@Base" 0.8.0
- (c++)"typeinfo name for pkgAcqMethod@Base" 0.8.0
- (c++)"typeinfo name for pkgCacheFile@Base" 0.8.0
- (c++)"typeinfo name for pkgIndexFile@Base" 0.8.0
- (c++)"typeinfo name for WeakPointable@Base" 0.8.0
- (c++)"typeinfo name for pkgAcqArchive@Base" 0.8.0
- (c++)"typeinfo name for pkgTagSection@Base" 0.8.0
- (c++)"typeinfo name for OpTextProgress@Base" 0.8.0
- (c++)"typeinfo name for pkgAcquireStatus@Base" 0.8.0
- (c++)"typeinfo name for PreferenceSection@Base" 0.8.0
- (c++)"typeinfo name for pkgPackageManager@Base" 0.8.0
- (c++)"typeinfo name for debVersioningSystem@Base" 0.8.0
- (c++)"typeinfo name for pkgUdevCdromDevices@Base" 0.8.0
- (c++)"typeinfo name for pkgVersioningSystem@Base" 0.8.0
- (c++)"typeinfo name for MMap@Base" 0.8.0
- (c++)"typeinfo name for FileFd@Base" 0.8.0
- (c++)"typeinfo name for Vendor@Base" 0.8.0
- (c++)"typeinfo name for pkgCache@Base" 0.8.0
- (c++)"typeinfo name for IndexCopy@Base" 0.8.0
- (c++)"typeinfo name for debSystem@Base" 0.8.0
- (c++)"typeinfo name for metaIndex@Base" 0.8.0
- (c++)"typeinfo name for pkgDPkgPM@Base" 0.8.0
- (c++)"typeinfo name for pkgPolicy@Base" 0.8.0
- (c++)"typeinfo name for pkgSystem@Base" 0.8.0
- (c++)"typeinfo name for pkgAcquire::Item@Base" 0.8.0
- (c++)"typeinfo name for pkgRecords::Parser@Base" 0.8.0
- (c++)"typeinfo name for pkgDepCache::InRootSetFunc@Base" 0.8.0
- (c++)"typeinfo name for pkgDepCache::DefaultRootSetFunc@Base" 0.8.0
- (c++)"typeinfo name for pkgDepCache::Policy@Base" 0.8.0
- (c++)"typeinfo name for pkgSimulate::Policy@Base" 0.8.0
- (c++)"typeinfo name for pkgIndexFile::Type@Base" 0.8.0
- (c++)"typeinfo name for Configuration::MatchAgainstConfig@Base" 0.8.0
- (c++)"typeinfo name for pkgSourceList::Type@Base" 0.8.0
- (c++)"typeinfo name for pkgSrcRecords::Parser@Base" 0.8.0
- (c++)"typeinfo name for APT::CacheSetHelper@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::DepIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::GrpIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::PkgIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::PrvIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::VerIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::DescIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::PkgFileIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::VerFileIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::DescFileIterator@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::Dependency, pkgCache::DepIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::Description, pkgCache::DescIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::PackageFile, pkgCache::PkgFileIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::Group, pkgCache::GrpIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::Package, pkgCache::PkgIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::VerFile, pkgCache::VerFileIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::DescFile, pkgCache::DescFileIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Iterator<pkgCache::Provides, pkgCache::PrvIterator>@Base" 0.8.0
- (c++)"typeinfo name for pkgCache::Namespace@Base" 0.8.0
- (c++)"vtable for OpProgress@Base" 0.8.0
- (c++)"vtable for SourceCopy@Base" 0.8.0
- (c++)"vtable for pkgAcqFile@Base" 0.8.0
- (c++)"vtable for pkgAcquire@Base" 0.8.0
- (c++)"vtable for DynamicMMap@Base" 0.8.0
- (c++)"vtable for PackageCopy@Base" 0.8.0
- (c++)"vtable for pkgDepCache@Base" 0.8.0
- (c++)"vtable for pkgSimulate@Base" 0.8.0
- (c++)"vtable for indexRecords@Base" 0.8.0
- (c++)"vtable for pkgAcqMethod@Base" 0.8.0
- (c++)"vtable for pkgCacheFile@Base" 0.8.0
- (c++)"vtable for pkgIndexFile@Base" 0.8.0
- (c++)"vtable for pkgAcqArchive@Base" 0.8.0
- (c++)"vtable for pkgTagSection@Base" 0.8.0
- (c++)"vtable for OpTextProgress@Base" 0.8.0
- (c++)"vtable for pkgAcquireStatus@Base" 0.8.0
- (c++)"vtable for PreferenceSection@Base" 0.8.0
- (c++)"vtable for pkgPackageManager@Base" 0.8.0
- (c++)"vtable for debVersioningSystem@Base" 0.8.0
- (c++)"vtable for pkgUdevCdromDevices@Base" 0.8.0
- (c++)"vtable for pkgVersioningSystem@Base" 0.8.0
- (c++)"vtable for MMap@Base" 0.8.0
- (c++)"vtable for FileFd@Base" 0.8.0
- (c++)"vtable for Vendor@Base" 0.8.0
- (c++)"vtable for pkgCache@Base" 0.8.0
- (c++)"vtable for IndexCopy@Base" 0.8.0
- (c++)"vtable for debSystem@Base" 0.8.0
- (c++)"vtable for metaIndex@Base" 0.8.0
- (c++)"vtable for pkgDPkgPM@Base" 0.8.0
- (c++)"vtable for pkgPolicy@Base" 0.8.0
- (c++)"vtable for pkgSystem@Base" 0.8.0
- (c++)"vtable for pkgAcquire::Item@Base" 0.8.0
- (c++)"vtable for pkgRecords::Parser@Base" 0.8.0
- (c++)"vtable for pkgDepCache::InRootSetFunc@Base" 0.8.0
- (c++)"vtable for pkgDepCache::DefaultRootSetFunc@Base" 0.8.0
- (c++)"vtable for pkgDepCache::Policy@Base" 0.8.0
- (c++)"vtable for pkgSimulate::Policy@Base" 0.8.0
- (c++)"vtable for pkgIndexFile::Type@Base" 0.8.0
- (c++)"vtable for Configuration::MatchAgainstConfig@Base" 0.8.0
- (c++)"vtable for pkgSourceList::Type@Base" 0.8.0
- (c++)"vtable for pkgSrcRecords::Parser@Base" 0.8.0
- (c++)"vtable for APT::CacheSetHelper@Base" 0.8.0
- (c++)"vtable for pkgCache::DepIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::GrpIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::PkgIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::PrvIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::VerIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::DescIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::PkgFileIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::VerFileIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::DescFileIterator@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::Dependency, pkgCache::DepIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::Description, pkgCache::DescIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::PackageFile, pkgCache::PkgFileIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::Group, pkgCache::GrpIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::Package, pkgCache::PkgIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::VerFile, pkgCache::VerFileIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::DescFile, pkgCache::DescFileIterator>@Base" 0.8.0
- (c++)"vtable for pkgCache::Iterator<pkgCache::Provides, pkgCache::PrvIterator>@Base" 0.8.0
- (c++)"non-virtual thunk to pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc()@Base" 0.8.0
- (c++)"operator<<(std::basic_ostream<char, std::char_traits<char> >&, pkgCache::DepIterator)@Base" 0.8.0
- (c++)"operator<<(std::basic_ostream<char, std::char_traits<char> >&, pkgCache::PkgIterator)@Base" 0.8.0
- _config@Base 0.8.0
- _system@Base 0.8.0
- debSys@Base 0.8.0
- debVS@Base 0.8.0
- pkgLibVersion@Base 0.8.0
- pkgVersion@Base 0.8.0
- (c++)"pkgAcquireStatus::~pkgAcquireStatus()@Base" 0.8.0
- (c++)"IndexCopy::~IndexCopy()@Base" 0.8.0
- (c++)"pkgIndexFile::Type::~Type()@Base" 0.8.0
- (c++)"pkgAcqBaseIndex::~pkgAcqBaseIndex()@Base" 0.8.0
- (c++)"pkgArchiveCleaner::~pkgArchiveCleaner()@Base" 0.8.0
- (c++)"typeinfo for pkgArchiveCleaner@Base" 0.8.0
- (c++)"typeinfo name for pkgArchiveCleaner@Base" 0.8.0
- (c++)"vtable for pkgArchiveCleaner@Base" 0.8.0
-### architecture specific: va_list
- (arch=armel armhf|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, std::__va_list&) const@Base" 0.8.15~exp1
- (arch=i386 hurd-i386 kfreebsd-i386 ppc64|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, char*&) const@Base" 0.8.15~exp1
- (arch=hppa ia64 mips mipsel sparc sparc64|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, void*&) const@Base" 0.8.15~exp1
- (arch=amd64 kfreebsd-amd64 powerpc powerpcspe s390 s390x x32|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, __va_list_tag (&) [1]) const@Base" 0.8.15~exp1
- (arch=sh4|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, __builtin_va_list&) const@Base" 0.8.15~exp1
- (arch=alpha|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, __va_list_tag&) const@Base" 0.8.15~exp1
-### architecture specific: va_list & size_t
- (arch=i386 hurd-i386 kfreebsd-i386|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, char*&, unsigned int&)@Base" 0.8.11.4
- (arch=armel armhf|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, std::__va_list&, unsigned int&)@Base" 0.8.11.4
- (arch=alpha|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __va_list_tag&, unsigned long&)@Base" 0.8.11.4
- (arch=powerpc powerpcspe x32|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __va_list_tag (&) [1], unsigned int&)@Base" 0.8.11.4
- (arch=amd64 kfreebsd-amd64 s390 s390x|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __va_list_tag (&) [1], unsigned long&)@Base" 0.8.11.4
- (arch=hppa mips mipsel sparc|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned int&)@Base" 0.8.11.4
- (arch=ia64 sparc64|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned long&)@Base" 0.8.11.4
- (arch=sh4|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __builtin_va_list&, unsigned int&)@Base" 0.8.11.4
- (arch=ppc64|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, char*&, unsigned long&)@Base" 0.8.11.4
- (arch=i386 hurd-i386 kfreebsd-i386|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned int&)@Base" 0.8.11.4
- (arch=armel armhf|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, std::__va_list&, int, unsigned int&)@Base" 0.8.11.4
- (arch=alpha|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag&, int, unsigned long&)@Base" 0.8.11.4
- (arch=powerpc powerpcspe x32|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag (&) [1], int, unsigned int&)@Base" 0.8.11.4
- (arch=amd64 kfreebsd-amd64 s390 s390x|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag (&) [1], int, unsigned long&)@Base" 0.8.11.4
- (arch=hppa mips mipsel sparc|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, void*&, int, unsigned int&)@Base" 0.8.11.4
- (arch=ia64 sparc64|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, void*&, int, unsigned long&)@Base" 0.8.11.4 1
- (arch=sh4|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __builtin_va_list&, int, unsigned int&)@Base" 0.8.11.4
- (arch=ppc64|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned long&)@Base" 0.8.11.4
-### architecture specific: size_t
- (arch=i386 armel armhf hppa hurd-i386 kfreebsd-i386 mips mipsel powerpc powerpcspe sh4 sparc x32|c++)"_strtabexpand(char*, unsigned int)@Base" 0.8.0
- (arch=alpha amd64 ia64 kfreebsd-amd64 s390 s390x sparc64 ppc64|c++)"_strtabexpand(char*, unsigned long)@Base" 0.8.0
-### architecture specific: time_t
- (arch=!x32|c++)"TimeRFC1123(long)@Base" 0.8.0
- (arch=x32|c++)"TimeRFC1123(long long)@Base" 0.8.0
- (arch=!x32|c++)"FTPMDTMStrToTime(char const*, long&)@Base" 0.8.0
- (arch=x32|c++)"FTPMDTMStrToTime(char const*, long long&)@Base" 0.8.0
- (arch=!x32|c++)"StrToTime(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long&)@Base" 0.8.0
- (arch=x32|c++)"StrToTime(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long long&)@Base" 0.8.0
- (arch=!x32|c++)"RFC1123StrToTime(char const*, long&)@Base" 0.8.0
- (arch=x32|c++)"RFC1123StrToTime(char const*, long long&)@Base" 0.8.0
-###
- (c++)"CreateAPTDirectoryIfNeeded(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.2
- (c++)"FileFd::FileSize()@Base" 0.8.8
- (c++)"Base256ToNum(char const*, unsigned long&, unsigned int)@Base" 0.8.11
- (c++)"pkgDepCache::SetCandidateRelease(pkgCache::VerIterator, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator>, std::allocator<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> > >&)@Base" 0.8.11
- (c++)"pkgDepCache::SetCandidateRelease(pkgCache::VerIterator, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.11
- (c++)"RealFileExists(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.11
- (c++)"StripEpoch(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.11
- (c++)"pkgTagSection::FindFlag(unsigned long&, unsigned long, char const*, char const*)@Base" 0.8.11
- (c++)"FindMountPointForDevice(char const*)@Base" 0.8.12
- (c++)"pkgUdevCdromDevices::ScanForRemovable(bool)@Base" 0.8.12
- (c++)"APT::Configuration::Compressor::Compressor(char const*, char const*, char const*, char const*, char const*, unsigned short)@Base" 0.8.12
- (c++)"APT::Configuration::Compressor::~Compressor()@Base" 0.8.12
- (c++)"APT::Configuration::getCompressors(bool)@Base" 0.8.12
- (c++)"APT::Configuration::getCompressorExtensions()@Base" 0.8.12
- (c++)"pkgCache::DepIterator::IsNegative() const@Base" 0.8.15~exp1
- (c++)"Configuration::CndSet(char const*, int)@Base" 0.8.15.3
- (c++)"pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator)@Base" 0.8.15.3
- (c++)"DeEscapeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.15.4
- (c++)"GetModificationTime(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.15.6
- (c++)"pkgSourceList::GetLastModifiedTime()@Base" 0.8.15.6
- (c++)"pkgCacheFile::RemoveCaches()@Base" 0.8.15.7
- (c++)"pkgOrderList::VisitNode(pkgCache::PkgIterator, char const*)@Base" 0.8.15.7
-### external dependency resolver ###
- (c++)"EDSP::WriteError(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _IO_FILE*)@Base" 0.8.16~exp2
- (c++)"EDSP::ReadRequest(int, std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool&, bool&, bool&)@Base" 0.8.16~exp2
- (c++)"EDSP::ApplyRequest(std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, pkgDepCache&)@Base" 0.8.16~exp2
- (c++)"EDSP::ReadResponse(int, pkgDepCache&, OpProgress*)@Base" 0.8.16~exp2
- (c++)"EDSP::WriteRequest(pkgDepCache&, _IO_FILE*, bool, bool, bool, OpProgress*)@Base" 0.8.16~exp2
- (c++)"EDSP::ExecuteSolver(char const*, int*, int*)@Base" 0.8.16~exp2
- (c++)"EDSP::WriteProgress(unsigned short, char const*, _IO_FILE*)@Base" 0.8.16~exp2
- (c++)"EDSP::WriteScenario(pkgDepCache&, _IO_FILE*, OpProgress*)@Base" 0.8.16~exp2
- (c++)"EDSP::WriteSolution(pkgDepCache&, _IO_FILE*)@Base" 0.8.16~exp2
- (c++)"EDSP::ResolveExternal(char const*, pkgDepCache&, bool, bool, bool, OpProgress*)@Base" 0.8.16~exp2
- (c++)"EDSP::DepMap@Base" 0.8.16~exp2
- (c++)"EDSP::PrioMap@Base" 0.8.16~exp2
- (c++)"pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const&)@Base" 0.8.16~exp6
- (c++)"pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const&)@Base" 0.8.16~exp6
-### generalisation of checksums (with lfs) -- mostly api-compatible available (without sha512 in previous versions)
- (c++)"AddCRC16(unsigned short, void const*, unsigned long long)@Base" 0.8.16~exp2
- (c++)"MD5Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6
- (c++)"MD5Summation::Result()@Base" 0.8.16~exp2
- (c++)"MD5Summation::MD5Summation()@Base" 0.8.16~exp2
- (c++)"SHA1Summation::SHA1Summation()@Base" 0.8.16~exp2
- (c++)"SHA1Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6
- (c++)"SHA1Summation::Result()@Base" 0.8.16~exp2
- (c++)"SHA256Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6
- (c++)"SHA512Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6
- (c++)"SummationImplementation::AddFD(int, unsigned long long)@Base" 0.8.16~exp6
- (c++)"typeinfo for MD5Summation@Base" 0.8.16~exp6
- (c++)"typeinfo for SHA1Summation@Base" 0.8.16~exp6
- (c++)"typeinfo for SHA256Summation@Base" 0.8.16~exp6
- (c++)"typeinfo for SHA512Summation@Base" 0.8.16~exp6
- (c++)"typeinfo for SHA2SummationBase@Base" 0.8.16~exp6
- (c++)"typeinfo for SummationImplementation@Base" 0.8.16~exp6
- (c++)"typeinfo name for MD5Summation@Base" 0.8.16~exp6
- (c++)"typeinfo name for SHA1Summation@Base" 0.8.16~exp6
- (c++)"typeinfo name for SHA256Summation@Base" 0.8.16~exp6
- (c++)"typeinfo name for SHA512Summation@Base" 0.8.16~exp6
- (c++)"typeinfo name for SHA2SummationBase@Base" 0.8.16~exp6
- (c++)"typeinfo name for SummationImplementation@Base" 0.8.16~exp6
- (c++)"vtable for MD5Summation@Base" 0.8.16~exp6
- (c++)"vtable for SHA1Summation@Base" 0.8.16~exp6
- (c++)"vtable for SHA256Summation@Base" 0.8.16~exp6
- (c++)"vtable for SHA512Summation@Base" 0.8.16~exp6
- (c++)"vtable for SHA2SummationBase@Base" 0.8.16~exp6
- (c++)"vtable for SummationImplementation@Base" 0.8.16~exp6
-### large file support - available in older api-compatible versions without lfs ###
- (c++)"StrToNum(char const*, unsigned long long&, unsigned int, unsigned int)@Base" 0.8.16~exp6
- (c++)"OpProgress::SubProgress(unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float)@Base" 0.8.16~exp6
- (c++)"OpProgress::OverallProgress(unsigned long long, unsigned long long, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.16~exp6
- (c++)"OpProgress::Progress(unsigned long long)@Base" 0.8.16~exp6
- (c++)"SourceCopy::GetFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long long&)@Base" 0.8.16~exp6
- (c++)"pkgAcquire::UriIterator::~UriIterator()@Base" 0.8.16~exp6
- (c++)"pkgAcquire::MethodConfig::~MethodConfig()@Base" 0.8.16~exp6
- (c++)"pkgAcquire::Item::Start(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long)@Base" 0.8.16~exp6
- (c++)"pkgRecords::Parser::RecordField(char const*)@Base" 0.8.16~exp6
- (c++)"pkgTagFile::Jump(pkgTagSection&, unsigned long long)@Base" 0.8.16~exp6
- (c++)"pkgTagFile::Offset()@Base" 0.8.16~exp6
- (c++)"pkgTagFile::pkgTagFile(FileFd*, unsigned long long)@Base" 0.8.16~exp6
- (c++)"DynamicMMap::RawAllocate(unsigned long long, unsigned long)@Base" 0.8.16~exp6
- (c++)"PackageCopy::GetFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long long&)@Base" 0.8.16~exp6
- (c++)"pkgTagSection::~pkgTagSection()@Base" 0.8.16~exp6
- (c++)"pkgAcquireStatus::Fetched(unsigned long long, unsigned long long)@Base" 0.8.16~exp6
- (c++)"PreferenceSection::~PreferenceSection()@Base" 0.8.16~exp6
- (c++)"FileFd::Read(void*, unsigned long long, unsigned long long*)@Base" 0.8.16~exp6
- (c++)"FileFd::Seek(unsigned long long)@Base" 0.8.16~exp6
- (c++)"FileFd::Skip(unsigned long long)@Base" 0.8.16~exp6
- (c++)"FileFd::Write(void const*, unsigned long long)@Base" 0.8.16~exp6
- (c++)"FileFd::Truncate(unsigned long long)@Base" 0.8.16~exp6
- (c++)"pkgPolicy::GetPriority(pkgCache::PkgFileIterator const&)@Base" 0.8.16~exp6
- (c++)"typeinfo for pkgTagFile@Base" 0.8.16~exp6
- (c++)"typeinfo for pkgSrcRecords@Base" 0.8.16~exp6
- (c++)"typeinfo for pkgAcquire::UriIterator@Base" 0.8.16~exp6
- (c++)"typeinfo for pkgAcquire::MethodConfig@Base" 0.8.16~exp6
- (c++)"typeinfo for pkgAcquire::Queue@Base" 0.8.16~exp6
- (c++)"typeinfo for pkgAcquire::Worker@Base" 0.8.16~exp6
- (c++)"typeinfo name for pkgTagFile@Base" 0.8.16~exp6
- (c++)"typeinfo name for pkgSrcRecords@Base" 0.8.16~exp6
- (c++)"typeinfo name for pkgAcquire::UriIterator@Base" 0.8.16~exp6
- (c++)"typeinfo name for pkgAcquire::MethodConfig@Base" 0.8.16~exp6
- (c++)"typeinfo name for pkgAcquire::Queue@Base" 0.8.16~exp6
- (c++)"typeinfo name for pkgAcquire::Worker@Base" 0.8.16~exp6
- (c++)"vtable for pkgTagFile@Base" 0.8.16~exp6
- (c++)"vtable for pkgSrcRecords@Base" 0.8.16~exp6
- (c++)"vtable for pkgAcquire::UriIterator@Base" 0.8.16~exp6
- (c++)"vtable for pkgAcquire::MethodConfig@Base" 0.8.16~exp6
- (c++)"vtable for pkgAcquire::Queue@Base" 0.8.16~exp6
- (c++)"vtable for pkgAcquire::Worker@Base" 0.8.16~exp6
-### remove deprecated parameter
- (c++)"pkgDepCache::SetCandidateVersion(pkgCache::VerIterator)@Base" 0.8.16~exp6
- (c++)"pkgDepCache::AddSizes(pkgCache::PkgIterator const&, bool)@Base" 0.8.16~exp6
- (c++)"pkgDepCache::AddStates(pkgCache::PkgIterator const&, bool)@Base" 0.8.16~exp6
-### used internally by public interfaces - if you use them directly, you can keep the pieces
- (c++|optional=internal|regex)"^SHA256_.*@Base$" 0.8.16~exp2
- (c++|optional=internal|regex)"^SHA384_.*@Base$" 0.8.16~exp2
- (c++|optional=internal|regex)"^SHA512_.*@Base$" 0.8.16~exp2
-### orderlist rework: the touched methods are protected
- (c++)"SigINT(int)@Base" 0.8.16~exp14
- (c++)"pkgPackageManager::SigINTStop@Base" 0.8.16~exp14
- (c++)"pkgPackageManager::SmartUnPack(pkgCache::PkgIterator, bool, int)@Base" 0.8.16~exp14
- (c++)"pkgPackageManager::SmartConfigure(pkgCache::PkgIterator, int)@Base" 0.8.16~exp14
-### FileFd rework: supporting different on-the-fly (de)compressing needs more parameter (abi), but the api is stable
- (c++)"FileFd::OpenDescriptor(int, unsigned int, FileFd::CompressMode, bool)@Base" 0.8.16~exp9
- (c++)"FileFd::OpenDescriptor(int, unsigned int, APT::Configuration::Compressor const&, bool)@Base" 0.8.16~exp9
- (c++)"FileFd::ModificationTime()@Base" 0.8.16~exp9
- (c++)"FileFd::Open(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, FileFd::CompressMode, unsigned long)@Base" 0.8.16~exp9
- (c++)"FileFd::Open(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, APT::Configuration::Compressor const&, unsigned long)@Base" 0.8.16~exp9
- (c++)"FileFd::ReadLine(char*, unsigned long long)@Base" 0.8.16~exp9
- (c++)"SummationImplementation::AddFD(FileFd&, unsigned long long)@Base" 0.8.16~exp9
- (c++|optional=deprecated,previous-inline)"FileFd::gzFd()@Base" 0.8.0
-### CacheSet rework: making them real containers breaks bigtime the API (for the CacheSetHelper)
- (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::const_iterator::getPkg() const@Base" 0.8.16~exp9
- (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::empty() const@Base" 0.8.16~exp9
- (c++)"APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::const_iterator::getPkg() const@Base" 0.8.16~exp9
- (c++)"APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::empty() const@Base" 0.8.16~exp9
- (c++)"APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::empty() const@Base" 0.8.16~exp9
- (c++)"APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator::getVer() const@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::canNotFindTask(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::canNotFindRegEx(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::canNotFindAllVer(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::canNotFindPackage(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::showTaskSelection(pkgCache::PkgIterator const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const&, pkgCache::VerIterator, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::canNotFindCandInstVer(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 0.8.16~exp9
- (c++)"APT::CacheSetHelper::canNotFindInstCandVer(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 0.8.16~exp9
- (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::clear()@Base" 0.8.16~exp9
- (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::insert(pkgCache::PkgIterator const&)@Base" 0.8.16~exp9
- (c++)"APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::clear()@Base" 0.8.16~exp9
- (c++)"APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::insert(pkgCache::PkgIterator const&)@Base" 0.8.16~exp9
- (c++)"APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::clear()@Base" 0.8.16~exp9
- (c++)"APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::insert(pkgCache::VerIterator const&)@Base" 0.8.16~exp9
- (c++)"APT::VersionContainerInterface::getCandidateVer(pkgCacheFile&, pkgCache::PkgIterator const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
- (c++)"APT::VersionContainerInterface::getInstalledVer(pkgCacheFile&, pkgCache::PkgIterator const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
- (c++)"APT::VersionContainerInterface::FromModifierCommandLine(unsigned short&, APT::VersionContainerInterface*, pkgCacheFile&, char const*, std::list<APT::VersionContainerInterface::Modifier, std::allocator<APT::VersionContainerInterface::Modifier> > const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
- (c++)"EDSP::WriteLimitedScenario(pkgDepCache&, _IO_FILE*, APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > > const&, OpProgress*)@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::PackageContainerInterface::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::PackageContainerInterface@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::VersionContainerInterface::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo for APT::VersionContainerInterface@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::PackageContainerInterface::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::PackageContainerInterface@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::VersionContainerInterface::const_iterator@Base" 0.8.16~exp9
- (c++)"typeinfo name for APT::VersionContainerInterface@Base" 0.8.16~exp9
- (c++)"vtable for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::const_iterator@Base" 0.8.16~exp9
- (c++)"vtable for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >@Base" 0.8.16~exp9
- (c++)"vtable for APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::const_iterator@Base" 0.8.16~exp9
- (c++)"vtable for APT::PackageContainer<std::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >@Base" 0.8.16~exp9
- (c++)"vtable for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator@Base" 0.8.16~exp9
- (c++)"vtable for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >@Base" 0.8.16~exp9
- (c++)"vtable for APT::PackageContainerInterface::const_iterator@Base" 0.8.16~exp9
- (c++)"vtable for APT::PackageContainerInterface@Base" 0.8.16~exp9
- (c++)"vtable for APT::VersionContainerInterface::const_iterator@Base" 0.8.16~exp9
- (c++)"vtable for APT::VersionContainerInterface@Base" 0.8.16~exp9
-### rework of the packagemanager rework
- (c++)"APT::Progress::PackageManager::ConffilePrompt(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::Error(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::HandleSIGWINCH(int)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::~PackageManagerFancy()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::PackageManagerFancy()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::SetupTerminalScrollArea(int)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::StatusChanged(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::Stop()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::fork()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::GetPulseInterval()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::~PackageManager()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::ConffilePrompt(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::Error(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::~PackageManagerProgressDeb822Fd()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::PackageManagerProgressDeb822Fd(int)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::StartDpkg()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::StatusChanged(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::Stop()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressDeb822Fd::WriteToStatusFd(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFactory()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::ConffilePrompt(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::Error(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::~PackageManagerProgressFd()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::PackageManagerProgressFd(int)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::StartDpkg()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::StatusChanged(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::Stop()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerProgressFd::WriteToStatusFd(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::Pulse()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::StartDpkg()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::StatusChanged(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManager::Stop()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerText::~PackageManagerText()@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerText::StatusChanged(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::String::Strip(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.9.13~exp1
- (c++)"pkgDPkgPM::BuildPackagesProgressMap()@Base" 0.9.13~exp1
- (c++)"pkgDPkgPM::DoDpkgStatusFd(int)@Base" 0.9.13~exp1
- (c++)"pkgDPkgPM::ProcessDpkgStatusLine(char*)@Base" 0.9.13~exp1
- (c++)"pkgDPkgPM::StartPtyMagic()@Base" 0.9.13~exp1
- (c++)"pkgDPkgPM::StopPtyMagic()@Base" 0.9.13~exp1
- (c++)"typeinfo for APT::Progress::PackageManager@Base" 0.9.13~exp1
- (c++)"typeinfo for APT::Progress::PackageManagerFancy@Base" 0.9.13~exp1
- (c++)"typeinfo for APT::Progress::PackageManagerProgressDeb822Fd@Base" 0.9.13~exp1
- (c++)"typeinfo for APT::Progress::PackageManagerProgressFd@Base" 0.9.13~exp1
- (c++)"typeinfo for APT::Progress::PackageManagerText@Base" 0.9.13~exp1
- (c++)"typeinfo name for APT::Progress::PackageManager@Base" 0.9.13~exp1
- (c++)"typeinfo name for APT::Progress::PackageManagerFancy@Base" 0.9.13~exp1
- (c++)"typeinfo name for APT::Progress::PackageManagerProgressDeb822Fd@Base" 0.9.13~exp1
- (c++)"typeinfo name for APT::Progress::PackageManagerProgressFd@Base" 0.9.13~exp1
- (c++)"typeinfo name for APT::Progress::PackageManagerText@Base" 0.9.13~exp1
- (c++)"vtable for APT::Progress::PackageManager@Base" 0.9.13~exp1
- (c++)"vtable for APT::Progress::PackageManagerFancy@Base" 0.9.13~exp1
- (c++)"vtable for APT::Progress::PackageManagerProgressDeb822Fd@Base" 0.9.13~exp1
- (c++)"vtable for APT::Progress::PackageManagerProgressFd@Base" 0.9.13~exp1
- (c++)"vtable for APT::Progress::PackageManagerText@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::instances@Base" 0.9.14.2
- (c++)"APT::Progress::PackageManagerFancy::Start(int)@Base" 0.9.14.2
- (c++)"APT::Progress::PackageManager::Start(int)@Base" 0.9.14.2
-### deb822 sources.list format
- (c++)"pkgSourceList::ParseFileDeb822(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.14.3~exp1
- (c++)"pkgSourceList::ParseFileOldStyle(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.14.3~exp1
- (c++)"pkgSourceList::Type::ParseStanza(std::vector<metaIndex*, std::allocator<metaIndex*> >&, pkgTagSection&, int, FileFd&)@Base" 0.9.14.3~exp1
-### install foo.deb support
- (c++)"flAbsPath(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 1.1~exp1
- (c++)"GetTempFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 1.1~exp1
- (c++)"pkgIndexFile::Type::CreateSrcPkgParser(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 1.1~exp1
- (c++)"metaIndex::LocalFileName() const@Base" 1.1~exp1
- (c++)"metaIndex::~metaIndex()@Base" 1.1~exp1
-### CacheFilter functors
- (c++)"APT::CacheFilter::ANDMatcher::AND(APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::~ANDMatcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::operator()(pkgCache::GrpIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::operator()(pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ANDMatcher::operator()(pkgCache::VerIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::FalseMatcher::~FalseMatcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::FalseMatcher::operator()(pkgCache::GrpIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::FalseMatcher::operator()(pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::FalseMatcher::operator()(pkgCache::VerIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::Matcher::~Matcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::NOTMatcher::NOTMatcher(APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::NOTMatcher::~NOTMatcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::NOTMatcher::operator()(pkgCache::GrpIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::NOTMatcher::operator()(pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::NOTMatcher::operator()(pkgCache::VerIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::operator()(pkgCache::GrpIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::operator()(pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::operator()(pkgCache::VerIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::OR(APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::~ORMatcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::ORMatcher::ORMatcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageIsNewInstall::operator()(pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageIsNewInstall::~PackageIsNewInstall()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageIsNewInstall::PackageIsNewInstall(pkgCacheFile*)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageMatcher::operator()(pkgCache::GrpIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageMatcher::operator()(pkgCache::VerIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageMatcher::~PackageMatcher()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::~PackageNameMatchesFnmatch()@Base" 1.1~exp4
- (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::PackageNameMatchesFnmatch(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::TrueMatcher::operator()(pkgCache::GrpIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::TrueMatcher::operator()(pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::TrueMatcher::operator()(pkgCache::VerIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheFilter::TrueMatcher::~TrueMatcher()@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::ANDMatcher@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::FalseMatcher@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::Matcher@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::NOTMatcher@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::ORMatcher@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::PackageArchitectureMatchesSpecification@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::PackageIsNewInstall@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::PackageMatcher@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::PackageNameMatchesFnmatch@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::PackageNameMatchesRegEx@Base" 1.1~exp4
- (c++)"typeinfo for APT::CacheFilter::TrueMatcher@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::ANDMatcher@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::FalseMatcher@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::Matcher@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::NOTMatcher@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::ORMatcher@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::PackageArchitectureMatchesSpecification@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::PackageIsNewInstall@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::PackageMatcher@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::PackageNameMatchesFnmatch@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::PackageNameMatchesRegEx@Base" 1.1~exp4
- (c++)"typeinfo name for APT::CacheFilter::TrueMatcher@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::ANDMatcher@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::FalseMatcher@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::Matcher@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::NOTMatcher@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::ORMatcher@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::PackageArchitectureMatchesSpecification@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::PackageIsNewInstall@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::PackageMatcher@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::PackageNameMatchesFnmatch@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::PackageNameMatchesRegEx@Base" 1.1~exp4
- (c++)"vtable for APT::CacheFilter::TrueMatcher@Base" 1.1~exp4
-### cacheset redesign (API, but not ABI compatible)
-# (c++|optional=inline)"APT::PackageContainerInterface::FromCommandLine(APT::PackageContainerInterface*, pkgCacheFile&, char const**, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++|optional=inline)"APT::PackageContainerInterface::FromModifierCommandLine(unsigned short&, APT::PackageContainerInterface*, pkgCacheFile&, char const*, std::list<APT::PackageContainerInterface::Modifier, std::allocator<APT::PackageContainerInterface::Modifier> > const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++|optional=inline)"APT::PackageContainerInterface::FromName(pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++|optional=inline)"APT::PackageContainerInterface::FromTask(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++|optional=inline)"APT::PackageContainerInterface::FromRegEx(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++|optional=inline)"APT::VersionContainerInterface::FromString(APT::VersionContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::VersionContainerInterface::Version const&, APT::CacheSetHelper&, bool)@Base" 0.8.16~exp9
-# (c++|optional=inline)"APT::VersionContainerInterface::FromPackage(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&, APT::VersionContainerInterface::Version const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++|optional=inline)"APT::VersionContainerInterface::FromCommandLine(APT::VersionContainerInterface*, pkgCacheFile&, char const**, APT::VersionContainerInterface::Version const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++)"APT::PackageContainerInterface::FromString(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, APT::CacheSetHelper&)@Base" 0.8.16~exp9
-# (c++)"APT::PackageContainerInterface::FromGroup(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@Base" 0.9.7
-# (c++)"APT::PackageContainerInterface::FromFnmatch(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@Base" 0.9.11
- (c++)"APT::CacheSetHelper::canNotFindFnmatch(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::canNotFindPackage(APT::CacheSetHelper::PkgSelector, APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::canNotFindVersion(APT::CacheSetHelper::VerSelector, APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::canNotGetCandInstVer(pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::canNotGetInstCandVer(pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::canNotGetVersion(APT::CacheSetHelper::VerSelector, pkgCacheFile&, pkgCache::PkgIterator const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFrom(APT::CacheSetHelper::PkgSelector, APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromCommandLine(APT::PackageContainerInterface*, pkgCacheFile&, char const**)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromFnmatch(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromModifierCommandLine(unsigned short&, APT::PackageContainerInterface*, pkgCacheFile&, char const*, std::list<APT::CacheSetHelper::PkgModifier, std::allocator<APT::CacheSetHelper::PkgModifier> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromName(pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromPackageName(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromRegEx(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromString(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::PackageFromTask(APT::PackageContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::showPackageSelection(pkgCache::PkgIterator const&, APT::CacheSetHelper::PkgSelector, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::CacheSetHelper::showVersionSelection(pkgCache::PkgIterator const&, pkgCache::VerIterator const&, APT::CacheSetHelper::VerSelector, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"APT::VersionContainerInterface::FromCommandLine(APT::VersionContainerInterface*, pkgCacheFile&, char const**, APT::CacheSetHelper::VerSelector, APT::CacheSetHelper&)@Base" 1.1~exp4
- (c++)"APT::VersionContainerInterface::FromPackage(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&, APT::CacheSetHelper::VerSelector, APT::CacheSetHelper&)@Base" 1.1~exp4
- (c++)"APT::VersionContainerInterface::FromString(APT::VersionContainerInterface*, pkgCacheFile&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper::VerSelector, APT::CacheSetHelper&, bool)@Base" 1.1~exp4
-### all the hashes are belong to us
-# (c++|optional=inline)"Hashes::AddFD(int, unsigned long long, bool, bool, bool, bool)@Base" 0.8.16~exp6
-# (c++|optional=inline)"Hashes::AddFD(FileFd&, unsigned long long, bool, bool, bool, bool)@Base" 0.8.16~exp9
-# (c++|optional=inline)"pkgRecords::Parser::MD5Hash()@Base" 0.8.0
-# (c++|optional=inline)"pkgRecords::Parser::SHA1Hash()@Base" 0.8.0
-# (c++|optional=inline)"pkgRecords::Parser::SHA256Hash()@Base" 0.8.0
-# (c++|optional=inline)"pkgRecords::Parser::SHA512Hash()@Base" 0.8.16~exp6
- (c++)"Hashes::AddFD(FileFd&, unsigned long long, unsigned int)@Base" 1.1~exp1
- (c++)"Hashes::AddFD(int, unsigned long long, unsigned int)@Base" 1.1~exp1
- (c++)"Hashes::Add(unsigned char const*, unsigned long long, unsigned int)@Base" 1.1~exp1
- (c++)"Hashes::GetHashStringList()@Base" 1.1~exp1
- (c++)"Hashes::Hashes()@Base" 1.1~exp1
- (c++)"Hashes::~Hashes()@Base" 1.1~exp1
- (c++)"HashStringList::find(char const*) const@Base" 1.1~exp1
- (c++)"HashStringList::operator==(HashStringList const&) const@Base" 1.1~exp1
- (c++)"HashStringList::operator!=(HashStringList const&) const@Base" 1.1~exp1
- (c++)"HashStringList::push_back(HashString const&)@Base" 1.1~exp1
- (c++)"HashStringList::supported(char const*)@Base" 1.1~exp1
- (c++)"HashStringList::usable() const@Base" 1.1~exp1
- (c++)"HashStringList::VerifyFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 1.1~exp1
- (c++)"HashString::operator==(HashString const&) const@Base" 1.1~exp1
- (c++)"HashString::operator!=(HashString const&) const@Base" 1.1~exp1
- (c++)"indexRecords::GetSupportsAcquireByHash() const@Base" 1.1~exp1
- (c++)"pkgAcqArchive::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, HashStringList const&, pkgAcquire::MethodConfig*)@Base" 1.1~exp1
- (c++)"pkgAcqArchive::IsTrusted() const@Base" 1.1~exp1
- (c++)"pkgAcqFile::Custom600Headers() const@Base" 1.1~exp1
- (c++)"pkgAcqFile::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, HashStringList const&, pkgAcquire::MethodConfig*)@Base" 1.1~exp1
- (c++)"pkgAcqFile::pkgAcqFile(pkgAcquire*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, HashStringList const&, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 1.1~exp1
- (c++)"pkgAcqMethod::DropPrivsOrDie()@Base" 1.1~exp1
- (c++)"pkgAcquire::Item::Custom600Headers() const@Base" 1.1~exp1
- (c++)"pkgAcquire::Item::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, HashStringList const&, pkgAcquire::MethodConfig*)@Base" 1.1~exp1
- (c++)"pkgAcquire::Item::IsTrusted() const@Base" 1.1~exp1
- (c++)"pkgRecords::Parser::Hashes() const@Base" 1.1~exp1
- (c++)"pkgRecords::Parser::LongDesc(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp1
- (c++)"pkgRecords::Parser::ShortDesc(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp1
- (c++)"typeinfo for Hashes@Base" 1.1~exp1
- (c++)"typeinfo name for Hashes@Base" 1.1~exp1
- (c++)"vtable for Hashes@Base" 1.1~exp1
- (c++)"typeinfo for pkgAcqBaseIndex@Base" 1.1~exp1
- (c++)"typeinfo name for pkgAcqBaseIndex@Base" 1.1~exp1
- (c++)"vtable for pkgAcqBaseIndex@Base" 1.1~exp1
-### more transactional update
- (c++)"pkgAcqBaseIndex::VerifyHashByMetaKey(HashStringList const&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::AbortTransaction()@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::Add(pkgAcquire::Item*)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::CheckAuthDone(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::CheckDownloadDone(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::CheckStopAuthentication(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::CommitTransaction()@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::GetCustom600Headers(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::QueueForSignatureVerify(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::QueueIndexes(bool)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::TransactionHasError()@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::TransactionStageCopy(pkgAcquire::Item*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::TransactionStageRemoval(pkgAcquire::Item*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::VerifyVendor(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcquire::GetLock(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcquire::Item::Dequeue()@Base" 1.1~exp4
- (c++)"pkgAcquire::Item::Item(pkgAcquire*, HashStringList const&, pkgAcqMetaBase*)@Base" 1.1~exp4
- (c++)"pkgAcquire::Item::QueueURI(pkgAcquire::ItemDesc&)@Base" 1.1~exp4
- (c++)"pkgAcquire::Item::SetActiveSubprocess(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgAcquire::Setup(pkgAcquireStatus*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp4
- (c++)"pkgArchiveCleaner::Erase(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, stat&)@Base" 1.1~exp4
- (c++)"pkgDepCache::MarkAndSweep()@Base" 1.1~exp4
- (c++)"pkgDepCache::MarkAndSweep(pkgDepCache::InRootSetFunc&)@Base" 1.1~exp4
- (c++)"pkgAcqMetaBase::~pkgAcqMetaBase()@Base" 1.1~exp4
- (c++)"typeinfo for pkgAcqMetaBase@Base" 1.1~exp4
- (c++)"typeinfo name for pkgAcqMetaBase@Base" 1.1~exp4
- (c++)"vtable for pkgAcqMetaBase@Base" 1.1~exp4
-### mixed stuff
- (c++)"GetListOfFilesInDir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 0.8.16~exp13
- (c++)"pkgCache::DepIterator::IsIgnorable(pkgCache::PkgIterator const&) const@Base" 0.8.16~exp10
- (c++)"pkgCache::DepIterator::IsIgnorable(pkgCache::PrvIterator const&) const@Base" 0.8.16~exp10
- (c++)"FileFd::Write(int, void const*, unsigned long long)@Base" 0.8.16~exp14
- (c++)"_strrstrip(char*)@Base" 0.9.7.9~exp2
- (c++)"SplitClearSignedFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFd*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, FileFd*)@Base" 0.9.7.9~exp2
- (c++)"OpenMaybeClearSignedFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFd&)@Base" 0.9.7.9~exp2
- (c++)"ExecGPGV(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, int*)@Base" 0.9.7.9~exp2
- (c++)"SigVerify::RunGPGV(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&)@Base" 0.9.7.9~exp2
- (c++)"Configuration::Dump(std::basic_ostream<char, std::char_traits<char> >&, char const*, char const*, bool)@Base" 0.9.3
- (c++)"AcquireUpdate(pkgAcquire&, int, bool, bool)@Base" 0.9.3
- (c++)"pkgCache::DepIterator::IsMultiArchImplicit() const@Base" 0.9.6
- (c++)"pkgCache::PrvIterator::IsMultiArchImplicit() const@Base" 0.9.6
- (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::PackageArchitectureMatchesSpecification(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 0.9.7
- (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::~PackageArchitectureMatchesSpecification()@Base" 0.9.7
- (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::operator()(pkgCache::PkgIterator const&)@Base" 0.9.7
- (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::operator()(char const* const&)@Base" 0.9.7
- (c++)"APT::Configuration::checkLanguage(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@Base" 0.9.7.5
- (c++)"pkgCdrom::DropTranslation(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@Base" 0.9.7.5
- (c++)"pkgCache::DepIterator::IsSatisfied(pkgCache::PrvIterator const&) const@Base" 0.9.8
- (c++)"pkgCache::DepIterator::IsSatisfied(pkgCache::VerIterator const&) const@Base" 0.9.8
- (c++)"operator<<(std::basic_ostream<char, std::char_traits<char> >&, GlobalError::Item)@Base" 0.9.9
- (c++)"pkgDepCache::IsDeleteOkProtectInstallRequests(pkgCache::PkgIterator const&, bool, unsigned long, bool)@Base" 0.9.9.1
- (c++)"pkgDepCache::IsInstallOkMultiArchSameVersionSynced(pkgCache::PkgIterator const&, bool, unsigned long, bool)@Base" 0.9.9.1
- (c++)"pkgDPkgPM::SendPkgsInfo(_IO_FILE*, unsigned int const&)@Base" 0.9.9.1
- (c++)"pkgCache::VerIterator::MultiArchType() const@Base" 0.9.9.1
- (c++)"AutoDetectProxy(URI&)@Base" 0.9.10
- (c++)"CommandLine::GetCommand(CommandLine::Dispatch const*, unsigned int, char const* const*)@Base" 0.9.11
- (c++)"CommandLine::MakeArgs(char, char const*, char const*, unsigned long)@Base" 0.9.11
- (c++)"Configuration::Clear()@Base" 0.9.11
- (c++)"Glob(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)@Base" 0.9.11
- (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::operator()(pkgCache::GrpIterator const&)@Base" 0.9.11
- (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::operator()(pkgCache::PkgIterator const&)@Base" 0.9.11
- (c++)"pkgTagSection::pkgTagSection()@Base" 0.9.11
- (c++)"strv_length(char const**)@Base" 0.9.11
- (c++)"StringSplit(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)@Base" 0.9.11.3
- (c++)"pkgAcquire::Item::RenameOnError(pkgAcquire::Item::RenameOnErrorState)@Base" 0.9.12
- (c++)"APT::String::Endswith(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.9.13.1
- (c++)"ExecFork(std::set<int, std::less<int>, std::allocator<int> >)@Base" 0.9.13.1
- (c++)"MergeKeepFdsFromConfiguration(std::set<int, std::less<int>, std::allocator<int> >&)@Base" 0.9.13.1
- (c++)"HashString::FromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13.1
- (c++)"HashString::GetHashForFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 0.9.13.1
- (c++)"indexRecords::GetSuite() const@Base" 0.9.13.2
- (c++)"GetTempDir()@Base" 0.9.14.2
- (c++)"APT::Configuration::getBuildProfiles()@Base" 0.9.16
- (c++)"APT::Configuration::getBuildProfilesString()@Base" 0.9.16
- (c++)"Configuration::FindVector(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@Base" 0.9.16
- (c++)"debListParser::ParseDepends(char const*, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&)@Base" 0.9.16
- (c++)"debListParser::ParseDepends(char const*, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&, bool const&)@Base" 0.9.16
- (c++)"debListParser::ParseDepends(char const*, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&, bool const&, bool const&, bool const&)@Base" 0.9.16
- (c++)"Rename(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.16
- (c++)"pkgDepCache::IsInstallOkDependenciesSatisfiableByCandidates(pkgCache::PkgIterator const&, bool, unsigned long, bool)@Base" 1.0
- (c++)"APT::Progress::PackageManagerFancy::GetTerminalSize()@Base" 1.0
- (c++)"APT::Progress::PackageManagerFancy::GetTextProgressStr(float, int)@Base" 1.0
- (c++)"pkgCdromStatus::GetOpProgress()@Base" 1.0
- (c++)"pkgCdromStatus::SetTotal(int)@Base" 1.0
- (c++)"EDSP::ExecuteSolver(char const*, int*, int*, bool)@Base" 1.0.4
- (c++)"pkgPackageManager::EarlyRemove(pkgCache::PkgIterator, pkgCache::DepIterator const*)@Base" 1.0.4
- (c++)"pkgSrcRecords::Step()@Base" 1.0.4
- (c++)"debTranslationsParser::Architecture()@Base" 1.0.4
- (c++)"debTranslationsParser::~debTranslationsParser()@Base" 1.0.4
- (c++)"debTranslationsParser::Version()@Base" 1.0.4
- (c++)"typeinfo for debTranslationsParser@Base" 1.0.4
- (c++)"typeinfo name for debTranslationsParser@Base" 1.0.4
- (c++)"vtable for debTranslationsParser@Base" 1.0.4
- (c++)"pkgDPkgPM::SetupSlavePtyMagic()@Base" 1.0.8
- (c++)"HashStringList::find(char const*) const@Base" 1.0.9.4
- (c++)"HashStringList::operator==(HashStringList const&) const@Base" 1.0.9.4
- (c++)"HashStringList::operator!=(HashStringList const&) const@Base" 1.0.9.4
- (c++)"HashStringList::push_back(HashString const&)@Base" 1.0.9.4
- (c++)"HashStringList::supported(char const*)@Base" 1.0.9.4
- (c++)"HashStringList::VerifyFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 1.0.9.4
- (c++)"HashString::operator==(HashString const&) const@Base" 1.0.9.4
- (c++)"HashString::operator!=(HashString const&) const@Base" 1.0.9.4
- (c++)"pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2, std::allocator<pkgSrcRecords::File2> >&)@Base" 1.0.9.4
- (c++)"debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2, std::allocator<pkgSrcRecords::File2> >&)@Base" 1.0.9.4
- (c++)"APT::Progress::PackageManager::PackageManager()@Base" 1.1~exp1
- (c++)"pkgDPkgPM::Go(APT::Progress::PackageManager*)@Base" 1.1~exp1
- (c++)"pkgPackageManager::DoInstall(APT::Progress::PackageManager*)@Base" 1.1~exp1
- (c++)"pkgPackageManager::DoInstallPostFork(APT::Progress::PackageManager*)@Base" 1.1~exp1
- (c++)"pkgPackageManager::Go(APT::Progress::PackageManager*)@Base" 1.1~exp1
- (c++)"pkgTagFile::Init(FileFd*, unsigned long long)@Base" 1.1~exp1
- (c++)"pkgTagSection::Count() const@Base" 1.1~exp1
- (c++)"pkgTagSection::Exists(char const*) const@Base" 1.1~exp1
- (c++)"pkgTagSection::FindB(char const*, bool const&) const@Base" 1.1~exp1
- (c++)"pkgTagSection::Scan(char const*, unsigned long, bool)@Base" 1.1~exp1
- (c++)"StartsWithGPGClearTextSignature(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp1
- (c++)"Popen(char const**, FileFd&, int&, FileFd::OpenMode)@Base" 1.1~exp1
- (c++)"APT::String::Startswith(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp2
- (c++)"APT::Upgrade::Upgrade(pkgDepCache&, int, OpProgress*)@Base" 1.1~exp4
- (c++)"pkgProblemResolver::Resolve(bool, OpProgress*)@Base" 1.1~exp4
- (c++)"pkgProblemResolver::ResolveByKeep(OpProgress*)@Base" 1.1~exp4
- (c++)"pkgCache::PkgIterator::Section() const@Base" 1.1~exp4
- (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::iterator::getPkg() const@Base" 1.1~exp4
- (c++)"typeinfo for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::iterator@Base" 1.1~exp4
- (c++)"typeinfo name for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::iterator@Base" 1.1~exp4
- (c++)"vtable for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::iterator@Base" 1.1~exp4
- (c++)"DropPrivileges()@Base" 1.1~exp4
- (c++)"FileFd::FileFd(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned long)@Base" 1.1~exp4
- (c++)"indexRecords::indexRecords(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp5
- (c++)"indexRecords::IsAlwaysTrusted() const@Base" 1.1~exp5
- (c++)"indexRecords::IsNeverTrusted() const@Base" 1.1~exp5
- (c++)"indexRecords::SetTrusted(bool)@Base" 1.1~exp5
- (c++)"metaIndex::metaIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)@Base" 1.1~exp9
- (c++)"pkgTagSection::Get(char const*&, char const*&, unsigned int) const@Base" 1.1~exp9
-### demangle strangeness - buildd report it as MISSING and as new…
- (c++)"pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<IndexTarget*, std::allocator<IndexTarget*> > const*, indexRecords*)@Base" 0.8.0
-### gcc-4.6 artefacts
-# (c++|optional=implicit)"HashString::operator=(HashString const&)@Base" 0.8.0
-# (c++|optional=implicit)"HashString::HashString(HashString const&)@Base" 0.8.0
-# (c++|optional=inline)"APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator std::max_element<APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, CompareProviders>(APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, CompareProviders)@Base" 0.8.0
-# (c++|optional=inline)"pkgCache::VerIterator::ParentPkg() const@Base" 0.8.0
-### empty destructors included in the .h file
-# (c++|optional=inline)"pkgVersioningSystem::~pkgVersioningSystem()@Base" 0.8.0
-# (c++|optional=inline)"pkgSystem::~pkgSystem()@Base" 0.8.0
-# (c++|optional=inline)"pkgRecords::Parser::~Parser()@Base" 0.8.0
-# (c++|optional=inline)"pkgSrcRecords::Parser::~Parser()@Base" 0.8.0
-# (c++|optional=inline)"pkgIndexFile::Type::~Type()@Base" 0.8.0
-# (c++|optional=inline)"pkgSourceList::Type::~Type()@Base" 0.8.0
-# (c++|optional=inline)"pkgIndexFile::~pkgIndexFile()@Base" 0.8.0
-# (c++|optional=inline)"metaIndex::~metaIndex()@Base" 0.8.0
-### std library artefacts
- (c++|regex|optional=std)"^std::vector<.+ >::(vector|push_back|erase|_[^ ]+)\(.+\)( const|)@Base$" 0.8.0
- (c++|optional=std)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0.8.0
- (c++|optional=std)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0.8.0
- (c++|optional=std)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0.8.0
- (c++|optional=std)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0.8.0
-### try to ignore std:: template instances
- (c++|regex|optional=std)"^(void |)std::[^ ]+<.+ >::(_|~).+\(.*\)@Base$" 0.8.0
- (c++|regex|optional=std)"^std::[^ ]+<.+ >::(append|insert|reserve|operator[^ ]+)\(.*\)@Base$" 0.8.0
- (c++|regex|optional=std)"^(void |DiffInfo\* |)std::_.*@Base$" 0.8.0
- (c++|regex|optional=std)"^std::reverse_iterator<.+ > std::__.+@Base$" 0.8.0
- (c++|regex|optional=std)"^std::basic_string<.+ >\(.+\)@Base$" 0.8.0
- (c++|regex|optional=std)"^__gnu_cxx::__[^ ]+<.*@Base$" 0.8.0
- (c++|regex|optional=std)"^typeinfo name for std::iterator<.*>@Base$" 0.8.0
- (c++|regex|optional=std)"^typeinfo for std::iterator<.*>@Base$" 0.8.0
- (c++|optional=std)"std::ctype<char>::do_widen(char) const@Base" 1.0.3
diff --git a/debian/libapt-pkg4.15.install.in b/debian/libapt-pkg5.0.install.in
index 56bed39d3..56bed39d3 100644
--- a/debian/libapt-pkg4.15.install.in
+++ b/debian/libapt-pkg5.0.install.in
diff --git a/debian/libapt-pkg5.0.symbols b/debian/libapt-pkg5.0.symbols
new file mode 100644
index 000000000..20deaed77
--- /dev/null
+++ b/debian/libapt-pkg5.0.symbols
@@ -0,0 +1,1503 @@
+libapt-pkg.so.5.0 libapt-pkg5.0 #MINVER#
+* Build-Depends-Package: libapt-pkg-dev
+ TFRewritePackageOrder@APTPKG_5.0 0.8.0
+ TFRewriteSourceOrder@APTPKG_5.0 0.8.0
+ (c++)"FileExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"IdentCdrom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)@APTPKG_5.0" 0.8.0
+ (c++)"ListUpdate(pkgAcquireStatus&, pkgSourceList&, int)@APTPKG_5.0" 0.8.0
+ (c++)"MountCdrom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"ParseCWord(char const*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@APTPKG_5.0" 0.8.0
+ (c++)"ReadPinDir(pkgPolicy&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"RunScripts(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"SafeGetCWD[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"QuoteString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"ReadPinFile(pkgPolicy&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"RegexChoice(RxChoiceList*, char const**, char const**)@APTPKG_5.0" 0.8.0
+ (c++)"SetNonBlock(int, bool)@APTPKG_5.0" 0.8.0
+ (c++)"flExtension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"Base64Encode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"ReadMessages(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@APTPKG_5.0" 0.8.0
+ (c++)"SetCloseExec(int, bool)@APTPKG_5.0" 0.8.0
+ (c++)"StringToBool(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)@APTPKG_5.0" 0.8.0
+ (c++)"UnmountCdrom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"_GetErrorObj()@APTPKG_5.0" 0.8.0
+ (c++)"Base256ToNum(char const*, unsigned long long&, unsigned int)@APTPKG_5.0" 1.0.5
+ (c++)"pkgFixBroken(pkgDepCache&)@APTPKG_5.0" 0.8.0
+ (c++)"DeQuoteString(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&)@APTPKG_5.0" 0.8.0
+ (c++)"DeQuoteString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"OutputInDepth[abi:cxx11](unsigned long, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"ReadConfigDir(Configuration&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, unsigned int const&)@APTPKG_5.0" 0.8.0
+ (c++)"URItoFileName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"UTF8ToCodeset(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgInitConfig(Configuration&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgInitSystem(Configuration&, pkgSystem*&)@APTPKG_5.0" 0.8.0
+ (c++)"safe_snprintf(char*, char*, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"stringcasecmp(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"stringcasecmp(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)@APTPKG_5.0" 0.8.0
+ (c++)"stringcasecmp(char const*, char const*, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"tolower_ascii(int)@APTPKG_5.0" 0.8.0
+ (c++)"ParseQuoteWord(char const*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@APTPKG_5.0" 0.8.0
+ (c++)"ReadConfigFile(Configuration&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, unsigned int const&)@APTPKG_5.0" 0.8.0
+ (c++)"TokSplitString(char, char*, char**, unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"maybe_add_auth(URI&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgApplyStatus(pkgDepCache&)@APTPKG_5.0" 0.8.0
+ (c++)"CheckDomainList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"CreateDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"DirectoryExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"VectorizeString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPrioSortList(pkgCache&, pkgCache::Version**)@APTPKG_5.0" 0.8.0
+ (c++)"pkgMakeStatusCache(pkgSourceList&, OpProgress&, MMap**, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgMinimizeUpgrade(pkgDepCache&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAllUpgrade(pkgDepCache&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDistUpgrade(pkgDepCache&)@APTPKG_5.0" 0.8.0
+ (c++)"GetListOfFilesInDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"GetListOfFilesInDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgMakeOnlyStatusCache(OpProgress&, DynamicMMap**)@APTPKG_5.0" 0.8.0
+ (c++)"WaitFd(int, bool, unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"GetLock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@APTPKG_5.0" 0.8.0
+ (c++)"Hex2Num(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned int)@APTPKG_5.0" 0.8.0
+ (c++)"CopyFile(FileFd&, FileFd&)@APTPKG_5.0" 0.8.0
+ (c++)"ExecFork()@APTPKG_5.0" 0.8.0
+ (c++)"ExecWait(int, char const*, bool)@APTPKG_5.0" 0.8.0
+ (c++)"StrToNum(char const*, unsigned long&, unsigned int, unsigned int)@APTPKG_5.0" 0.8.0
+ (c++)"SubstVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"SubstVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, SubstVar const*)@APTPKG_5.0" 0.8.0
+ (c++)"flNoLink(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"flNotDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"ioprintf(std::basic_ostream<char, std::char_traits<char> >&, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"IsMounted(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@APTPKG_5.0" 0.8.0
+ (c++)"LookupTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"SizeToStr[abi:cxx11](double)@APTPKG_5.0" 0.8.0
+ (c++)"TFRewrite(_IO_FILE*, pkgTagSection const&, char const**, TFRewriteData*)@APTPKG_5.0" 0.8.0
+ (c++)"TimeToStr[abi:cxx11](unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"_strstrip(char*)@APTPKG_5.0" 0.8.0
+ (c++)"flCombine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"flNotFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"stringcmp(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"stringcmp(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)@APTPKG_5.0" 0.8.0
+ (c++)"stringcmp(char const*, char const*, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"strprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"HashString::SupportedHashes()@APTPKG_5.0" 0.8.0
+ (c++)"HashString::_SupportedHashes@APTPKG_5.0" 0.8.0
+ (c++)"HashString::HashString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"HashString::HashString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"HashString::HashString()@APTPKG_5.0" 0.8.0
+ (c++)"HashString::~HashString()@APTPKG_5.0" 0.8.0
+ (c++)"OpProgress::CheckChange(float)@APTPKG_5.0" 0.8.0
+ (c++)"OpProgress::Done()@APTPKG_5.0" 0.8.0
+ (c++)"OpProgress::Update()@APTPKG_5.0" 0.8.0
+ (c++)"OpProgress::OpProgress()@APTPKG_5.0" 0.8.0
+ (c++)"OpProgress::~OpProgress()@APTPKG_5.0" 0.8.0
+ (c++)"SourceCopy::GetFileName()@APTPKG_5.0" 0.8.0
+ (c++)"SourceCopy::Type()@APTPKG_5.0" 0.8.0
+ (c++)"SourceCopy::~SourceCopy()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqFile::~pkgAcqFile()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::WorkerStep(pkgAcquire::Worker*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::FetchNeeded()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::TotalNeeded()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::MethodConfig::MethodConfig()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::PartialPresent()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Add(pkgAcquire::Item*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Add(pkgAcquire::Worker*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Run(int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Bump()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Item::Finished()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Item::~Item()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Clean(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::Bump()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::Cycle()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::Dequeue(pkgAcquire::Item*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::Enqueue(pkgAcquire::ItemDesc&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::Startup()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::FindItem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::Worker*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::ItemDone(pkgAcquire::Queue::QItem*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::Shutdown(bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Queue::~Queue()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Remove(pkgAcquire::Item*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Remove(pkgAcquire::Worker*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::RunFds(fd_set*, fd_set*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::SetFds(int&, fd_set*, fd_set*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::UriEnd()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::OutFdReady()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::MediaChange(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::RunMessages()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::Capabilities(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::ReadMessages()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::MethodFailure()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::SendConfiguration()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::Pulse()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::Start()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::ItemDone()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::Construct()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::InFdReady()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::Worker(pkgAcquire::MethodConfig*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::Worker(pkgAcquire::Queue*, pkgAcquire::MethodConfig*, pkgAcquireStatus*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Worker::~Worker()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Dequeue(pkgAcquire::Item*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Enqueue(pkgAcquire::ItemDesc&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::Shutdown()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::UriBegin()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::GetConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::QueueName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig const*&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::pkgAcquire(pkgAcquireStatus*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::pkgAcquire()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquire::~pkgAcquire()@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Lookup(pkgCache::VerFileIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Lookup(pkgCache::DescFileIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Parser::Maintainer[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Parser::Name[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Parser::GetRec(char const*&, char const*&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Parser::FileName[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Parser::Homepage[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Parser::SourcePkg[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::Parser::SourceVer[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::pkgRecords(pkgCache&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgRecords::~pkgRecords()@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagFile::Step(pkgTagSection&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagFile::~pkgTagFile()@APTPKG_5.0" 0.8.0
+ (c++)"CdromDevice::~CdromDevice()@APTPKG_5.0" 0.8.0
+ (c++)"CommandLine::DispatchArg(CommandLine::Dispatch*, bool)@APTPKG_5.0" 0.8.0
+ (c++)"CommandLine::SaveInConfig(unsigned int const&, char const* const*)@APTPKG_5.0" 0.8.0
+ (c++)"CommandLine::Parse(int, char const**)@APTPKG_5.0" 0.8.0
+ (c++)"CommandLine::HandleOpt(int&, int, char const**, char const*&, CommandLine::Args*, bool)@APTPKG_5.0" 0.8.0
+ (c++)"CommandLine::CommandLine(CommandLine::Args*, Configuration*)@APTPKG_5.0" 0.8.0
+ (c++)"CommandLine::~CommandLine()@APTPKG_5.0" 0.8.0
+ (c++)"DynamicMMap::WriteString(char const*, unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"DynamicMMap::Grow()@APTPKG_5.0" 0.8.0
+ (c++)"DynamicMMap::Allocate(unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"DynamicMMap::DynamicMMap(FileFd&, unsigned long, unsigned long const&, unsigned long const&, unsigned long const&)@APTPKG_5.0" 0.8.0
+ (c++)"DynamicMMap::DynamicMMap(unsigned long, unsigned long const&, unsigned long const&, unsigned long const&)@APTPKG_5.0" 0.8.0
+ (c++)"DynamicMMap::~DynamicMMap()@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::DumpErrors(std::basic_ostream<char, std::char_traits<char> >&, GlobalError::MsgType const&, bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::PopMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::InsertErrno(GlobalError::MsgType const&, char const*, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::PushToStack()@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::RevertToStack()@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::MergeWithStack()@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Debug(char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Errno(char const*, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Error(char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Fatal(char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::DebugE(char const*, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::FatalE(char const*, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Insert(GlobalError::MsgType const&, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Notice(char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Discard()@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::NoticeE(char const*, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::Warning(char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::WarningE(char const*, char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::GlobalError()@APTPKG_5.0" 0.8.0
+ (c++)"PackageCopy::GetFileName()@APTPKG_5.0" 0.8.0
+ (c++)"PackageCopy::Type()@APTPKG_5.0" 0.8.0
+ (c++)"PackageCopy::~PackageCopy()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::IsDeleteOk(pkgCache::PkgIterator const&, bool, unsigned long, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::MarkDelete(pkgCache::PkgIterator const&, bool, unsigned long, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::StateCache::StripEpoch(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::StateCache::Update(pkgCache::PkgIterator, pkgCache&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::ActionGroup::release()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::ActionGroup::ActionGroup(pkgDepCache&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::ActionGroup::~ActionGroup()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::IsInstallOk(pkgCache::PkgIterator const&, bool, unsigned long, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::MarkInstall(pkgCache::PkgIterator const&, bool, unsigned long, bool, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::SetReInstall(pkgCache::PkgIterator const&, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::BuildGroupOrs(pkgCache::VerIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::InRootSetFunc::InRootSet(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::InRootSetFunc::~InRootSetFunc()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::readStateFile(OpProgress*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::GetRootSetFunc()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::writeStateFile(OpProgress*, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::DefaultRootSetFunc::InRootSet(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::MarkFollowsSuggests()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::MarkFollowsRecommends()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::Init(OpProgress*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::Policy::GetCandidateVer(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::Policy::~Policy()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::Update(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::Update(OpProgress*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::Update(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::MarkAuto(pkgCache::PkgIterator const&, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::MarkKeep(pkgCache::PkgIterator const&, bool, bool, unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::MarkRequired(pkgDepCache::InRootSetFunc&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::Sweep()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::pkgDepCache(pkgCache*, pkgDepCache::Policy*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDepCache::~pkgDepCache()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSimulate::Policy::GetCandidateVer(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSimulate::Policy::~Policy()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSimulate::Remove(pkgCache::PkgIterator, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSimulate::Install(pkgCache::PkgIterator, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSimulate::Configure(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSimulate::pkgSimulate(pkgDepCache*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSimulate::~pkgSimulate()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::FetchResult::TakeHashes(Hashes&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::FetchResult::FetchResult()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Configuration(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Log(char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Run(bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Exit()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Fail(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Fail(bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Fetch(pkgAcqMethod::FetchItem*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Status(char const*, ...)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::URIDone(pkgAcqMethod::FetchResult&, pkgAcqMethod::FetchResult*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::Redirect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::URIStart(pkgAcqMethod::FetchResult&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::MediaFail(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::pkgAcqMethod(char const*, unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqMethod::~pkgAcqMethod()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::BuildCaches(OpProgress*, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::BuildPolicy(OpProgress*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::BuildDepCache(OpProgress*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::BuildSourceList(OpProgress*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::Open(OpProgress*, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::Close()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::pkgCacheFile()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheFile::~pkgCacheFile()@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::LanguageCode[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::CheckLanguageCode(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::TranslationsAvailable()@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::Type::GlobalList@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::Type::GlobalListLen@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::Type::GetType(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::Type::Type()@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::VisitRDeps(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::OrderUnpack(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::DepConfigure(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::DepUnPackDep(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::DepUnPackPre(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::DepUnPackCrit(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::DepUnPackPreD(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::OrderCompareA(void const*, void const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::OrderCompareB(void const*, void const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::OrderCritical()@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::VisitProvides(pkgCache::DepIterator, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::OrderConfigure()@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::VisitRProvides(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::VerIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::Me@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::DoRun()@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::Score(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::AddLoop(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::FileCmp(pkgCache::PkgIterator, pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::CheckDep(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::DepRemove(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::IsMissing(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::VisitDeps(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::WipeFlags(unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::pkgOrderList(pkgDepCache*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgOrderList::~pkgOrderList()@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::MatchAgainstConfig::MatchAgainstConfig(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::MatchAgainstConfig::~MatchAgainstConfig()@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Set(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Set(char const*, int const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Dump(std::basic_ostream<char, std::char_traits<char> >&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Clear(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Clear(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Clear(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::CndSet(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Lookup(char const*, bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Lookup(Configuration::Item*, char const*, unsigned long const&, bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Configuration(Configuration::Item const*)@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Configuration()@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::~Configuration()@APTPKG_5.0" 0.8.0
+ (c++)"WeakPointable::~WeakPointable()@APTPKG_5.0" 0.8.0
+ (c++)"debListParser::ParseDepends(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&, bool const&, bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"debListParser::ConvertRelation(char const*, unsigned int&)@APTPKG_5.0" 0.8.0
+ (c++)"debListParser::GetPrio(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqArchive::Finished()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqArchive::QueueNext()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqArchive::pkgAcqArchive(pkgAcquire*, pkgSourceList*, pkgRecords*, pkgCache::VerIterator const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcqArchive::~pkgAcqArchive()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::Type::GlobalList@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::Type::GlobalListLen@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::Type::GetType(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::ReadMainList()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::Reset()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::pkgSourceList()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::~pkgSourceList()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSrcRecords::File::~File()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSrcRecords::Find(char const*, bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSrcRecords::Parser::BuildDepRec::~BuildDepRec()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSrcRecords::Parser::BuildDepType(unsigned char const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSrcRecords::Restart()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSrcRecords::pkgSrcRecords(pkgSourceList&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSrcRecords::~pkgSrcRecords()@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::TrimRecord(bool, char const*&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::Trim()@APTPKG_5.0" 0.8.0
+ (c++)"OpTextProgress::Done()@APTPKG_5.0" 0.8.0
+ (c++)"OpTextProgress::Write(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"OpTextProgress::Update()@APTPKG_5.0" 0.8.0
+ (c++)"OpTextProgress::OpTextProgress(Configuration&)@APTPKG_5.0" 0.8.0
+ (c++)"OpTextProgress::~OpTextProgress()@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersionMatch::ExpressionMatches(char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersionMatch::ExpressionMatches(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersionMatch::Find(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersionMatch::MatchVer(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersionMatch::pkgVersionMatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgVersionMatch::MatchType)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersionMatch::~pkgVersionMatch()@APTPKG_5.0" 0.8.0
+ (c++)"TranslationsCopy::CopyTranslations(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, pkgCdromStatus*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::Done(pkgAcquire::ItemDesc&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::Fail(pkgAcquire::ItemDesc&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::Stop()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::Fetch(pkgAcquire::ItemDesc&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::Pulse(pkgAcquire*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::Start()@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::IMSHit(pkgAcquire::ItemDesc&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgAcquireStatus::pkgAcquireStatus()@APTPKG_5.0" 0.8.0
+ (c++)"pkgArchiveCleaner::Go(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgCache&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheGenerator::MakeStatusCache(pkgSourceList&, OpProgress*, MMap**, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCacheGenerator::MakeOnlyStatusCache(OpProgress*, DynamicMMap**)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::FixMissing()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::EarlyRemove(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::GetArchives(pkgAcquire*, pkgSourceList*, pkgRecords*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::SmartRemove(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::SmartUnPack(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::ConfigureAll()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::ImmediateAdd(pkgCache::PkgIterator, bool, unsigned int const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::OrderInstall()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::DepAlwaysTrue(pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::CheckRConflicts(pkgCache::PkgIterator, pkgCache::DepIterator, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::CreateOrderList()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::DoInstallPostFork(int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::Go(int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::Reset()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::Remove(pkgCache::PkgIterator, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::Install(pkgCache::PkgIterator, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::Configure(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::DoInstall(int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::pkgPackageManager(pkgDepCache*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPackageManager::~pkgPackageManager()@APTPKG_5.0" 0.8.0
+ (c++)"pkgProblemResolver::InstallProtect()@APTPKG_5.0" 0.8.0
+ (c++)"pkgProblemResolver::This@APTPKG_5.0" 0.8.0
+ (c++)"pkgProblemResolver::pkgProblemResolver(pkgDepCache*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgProblemResolver::~pkgProblemResolver()@APTPKG_5.0" 0.8.0
+ (c++)"debVersioningSystem::CmpFragment(char const*, char const*, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"debVersioningSystem::DoCmpVersion(char const*, char const*, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"debVersioningSystem::DoCmpReleaseVer(char const*, char const*, char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"debVersioningSystem::UpstreamVersion[abi:cxx11](char const*)@APTPKG_5.0" 0.8.0
+ (c++)"debVersioningSystem::CheckDep(char const*, int, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"debVersioningSystem::debVersioningSystem()@APTPKG_5.0" 0.8.0
+ (c++)"debVersioningSystem::~debVersioningSystem()@APTPKG_5.0" 0.8.0
+ (c++)"pkgUdevCdromDevices::Scan()@APTPKG_5.0" 0.8.0
+ (c++)"pkgUdevCdromDevices::Dlopen()@APTPKG_5.0" 0.8.0
+ (c++)"pkgUdevCdromDevices::pkgUdevCdromDevices()@APTPKG_5.0" 0.8.0
+ (c++)"pkgUdevCdromDevices::~pkgUdevCdromDevices()@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersioningSystem::GlobalList@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersioningSystem::GlobalListLen@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersioningSystem::TestCompatibility(pkgVersioningSystem const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersioningSystem::GetVS(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgVersioningSystem::pkgVersioningSystem()@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheFilter::PackageNameMatchesRegEx::PackageNameMatchesRegEx(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheFilter::PackageNameMatchesRegEx::~PackageNameMatchesRegEx()@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheFilter::PackageNameMatchesRegEx::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheFilter::PackageNameMatchesRegEx::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::Configuration::checkArchitecture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheSetHelper::canNotFindPkgName(pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheSetHelper::canNotFindNewestVer(pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheSetHelper::canNotFindCandidateVer(pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheSetHelper::canNotFindInstalledVer(pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"APT::CacheSetHelper::~CacheSetHelper()@APTPKG_5.0" 0.8.0
+ (c++)"URI::NoUserPassword(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"URI::CopyFrom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"URI::SiteOnly(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"URI::~URI()@APTPKG_5.0" 0.8.0
+ (c++)"URI::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"MMap::Map(FileFd&)@APTPKG_5.0" 0.8.0
+ (c++)"MMap::Sync(unsigned long, unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"MMap::Sync()@APTPKG_5.0" 0.8.0
+ (c++)"MMap::Close(bool)@APTPKG_5.0" 0.8.0
+ (c++)"MMap::MMap(FileFd&, unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"MMap::MMap(unsigned long)@APTPKG_5.0" 0.8.0
+ (c++)"MMap::~MMap()@APTPKG_5.0" 0.8.0
+ (c++)"FileFd::Size()@APTPKG_5.0" 0.8.0
+ (c++)"FileFd::Sync()@APTPKG_5.0" 0.8.0
+ (c++)"FileFd::Tell()@APTPKG_5.0" 0.8.0
+ (c++)"FileFd::Close()@APTPKG_5.0" 0.8.0
+ (c++)"FileFd::~FileFd()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::CompTypeDeb(unsigned char)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::DepIterator::GlobOr(pkgCache::DepIterator&, pkgCache::DepIterator&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::DepIterator::operator++()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::GrpIterator::operator++()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::PkgIterator::operator++()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::PkgFileIterator::IsOk()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::PkgFileIterator::RelStr[abi:cxx11]()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::ReMap(bool const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::Header::Header()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::DepType(unsigned char)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::FindGrp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::FindPkg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::FindPkg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::CompType(unsigned char)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::Priority(unsigned char)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::pkgCache(MMap*, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::~pkgCache()@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::DropRepeats(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::FindPackages(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, pkgCdromStatus*, unsigned int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::WriteDatabase(Configuration&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::DropBinaryArch(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::WriteSourceList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::ReduceSourcelist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::Add(pkgCdromStatus*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::Ident(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, pkgCdromStatus*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgCdrom::Score(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"IndexCopy::CopyPackages(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, pkgCdromStatus*)@APTPKG_5.0" 0.8.0
+ (c++)"IndexCopy::ReconstructChop(unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"IndexCopy::ReconstructPrefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"IndexCopy::ConvertToSourceList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@APTPKG_5.0" 0.8.0
+ (c++)"IndexCopy::ChopDirs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)@APTPKG_5.0" 0.8.0
+ (c++)"IndexCopy::GrabFirst(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)@APTPKG_5.0" 0.8.0
+ (c++)"SigVerify::CopyAndVerify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)@APTPKG_5.0" 0.8.0
+ (c++)"SigVerify::RunGPGV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, int*)@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::Initialize(Configuration&)@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::AddStatusFiles(std::vector<pkgIndexFile*, std::allocator<pkgIndexFile*> >&)@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::ArchiveSupported(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::Lock()@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::Score(Configuration const&)@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::UnLock(bool)@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::debSystem()@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::~debSystem()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::SendV2Pkgs(_IO_FILE*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::DoTerminalPty(int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::WriteHistoryTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::WriteApportReport(char const*, char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::RunScriptsWithPkgs(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::Go(int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::Reset()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::Remove(pkgCache::PkgIterator, bool)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::DoStdin(int)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::Install(pkgCache::PkgIterator, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::OpenLog()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::CloseLog()@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::Configure(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::pkgDPkgPM(pkgDepCache*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgDPkgPM::~pkgDPkgPM()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::GetPriority(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::InitDefaults()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::PkgPin::~PkgPin()@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::GetMatch(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::CreatePin(pkgVersionMatch::MatchType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, short)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::pkgPolicy(pkgCache*)@APTPKG_5.0" 0.8.0
+ (c++)"pkgPolicy::~pkgPolicy()@APTPKG_5.0" 0.8.0
+ (c++)"pkgSystem::GlobalList@APTPKG_5.0" 0.8.0
+ (c++)"pkgSystem::Initialize(Configuration&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSystem::GlobalListLen@APTPKG_5.0" 0.8.0
+ (c++)"pkgSystem::Score(Configuration const&)@APTPKG_5.0" 0.8.0
+ (c++)"pkgSystem::GetSystem(char const*)@APTPKG_5.0" 0.8.0
+ (c++)"HashString::VerifyFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@APTPKG_5.0" 0.8.0
+ (c++)"HashString::empty() const@APTPKG_5.0" 0.8.0
+ (c++)"HashString::toStr[abi:cxx11]() const@APTPKG_5.0" 0.8.0
+ (c++)"CommandLine::FileSize() const@APTPKG_5.0" 0.8.0
+ (c++)"GlobalError::empty(GlobalError::MsgType const&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::FindInCache(pkgCache&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::CreateSrcParser() const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::MatchAgainstConfig::Match(char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Find[abi:cxx11](char const*, char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Item::FullTag[abi:cxx11](Configuration::Item const*) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::FindB(char const*, bool const&) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::FindI(char const*, int const&) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::Exists(char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::FindAny[abi:cxx11](char const*, char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::FindDir[abi:cxx11](char const*, char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::FindFile[abi:cxx11](char const*, char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"Configuration::ExistsAny(char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::GetIndexes(pkgAcquire*, bool) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::Type::FixupURI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgSourceList::FindIndex(pkgCache::PkgFileIterator, pkgIndexFile*&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::Find(char const*, char const*&, char const*&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::Find(char const*, unsigned int&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::FindI(char const*, long) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::FindS[abi:cxx11](char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::FindULL(char const*, unsigned long long const&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgTagSection::FindFlag(char const*, unsigned long&, unsigned long) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::DepIterator::AllTargets() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::DepIterator::IsCritical() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::DepIterator::SmartTargetPkg(pkgCache::PkgIterator&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::GrpIterator::FindPreferredPkg(bool const&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::GrpIterator::FindPkg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::PkgIterator::CurVersion() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::PkgIterator::CandVersion() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::PkgIterator::State() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::VerIterator::CompareVer(pkgCache::VerIterator const&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::VerIterator::NewestFile() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::VerIterator::Downloadable() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::VerIterator::TranslatedDescription() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::VerIterator::RelStr[abi:cxx11]() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::VerIterator::Automatic() const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::sHash(char const*) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::sHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 0.8.0
+ (c++)"pkgCache::Header::CheckSizes(pkgCache::Header&) const@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::CreatePM(pkgDepCache*) const@APTPKG_5.0" 0.8.0
+ (c++)"debSystem::FindIndex(pkgCache::PkgFileIterator, pkgIndexFile*&) const@APTPKG_5.0" 0.8.0
+ (c++)"metaIndex::GetURI[abi:cxx11]() const@APTPKG_5.0" 0.8.0
+ (c++)"metaIndex::GetDist[abi:cxx11]() const@APTPKG_5.0" 0.8.0
+ (c++)"metaIndex::GetType() const@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for OpProgress@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for SourceCopy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgAcqFile@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgAcquire@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for DynamicMMap@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for PackageCopy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgDepCache@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgSimulate@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgAcqMethod@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgCacheFile@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgIndexFile@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for WeakPointable@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgAcqArchive@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgTagSection@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for OpTextProgress@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgAcquireStatus@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgPackageManager@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for debVersioningSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgUdevCdromDevices@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgVersioningSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for MMap@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for FileFd@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgCache@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for IndexCopy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for debSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for metaIndex@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgDPkgPM@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgPolicy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgAcquire::Item@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgRecords::Parser@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgDepCache::InRootSetFunc@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgDepCache::DefaultRootSetFunc@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgDepCache::Policy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgSimulate::Policy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgIndexFile::Type@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for Configuration::MatchAgainstConfig@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgSourceList::Type@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgSrcRecords::Parser@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for APT::CacheSetHelper@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgCache::Namespace@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for OpProgress@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for SourceCopy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgAcqFile@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgAcquire@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for DynamicMMap@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for PackageCopy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgDepCache@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgSimulate@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgAcqMethod@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgCacheFile@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgIndexFile@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for WeakPointable@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgAcqArchive@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgTagSection@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for OpTextProgress@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgAcquireStatus@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgPackageManager@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for debVersioningSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgUdevCdromDevices@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgVersioningSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for MMap@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for FileFd@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgCache@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for IndexCopy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for debSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for metaIndex@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgDPkgPM@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgPolicy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgSystem@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgAcquire::Item@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgRecords::Parser@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgDepCache::InRootSetFunc@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgDepCache::DefaultRootSetFunc@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgDepCache::Policy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgSimulate::Policy@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgIndexFile::Type@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for Configuration::MatchAgainstConfig@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgSourceList::Type@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgSrcRecords::Parser@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for APT::CacheSetHelper@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgCache::Namespace@APTPKG_5.0" 0.8.0
+ (c++)"vtable for OpProgress@APTPKG_5.0" 0.8.0
+ (c++)"vtable for SourceCopy@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgAcqFile@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgAcquire@APTPKG_5.0" 0.8.0
+ (c++)"vtable for DynamicMMap@APTPKG_5.0" 0.8.0
+ (c++)"vtable for PackageCopy@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgDepCache@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgSimulate@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgAcqMethod@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgCacheFile@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgIndexFile@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgAcqArchive@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgTagSection@APTPKG_5.0" 0.8.0
+ (c++)"vtable for OpTextProgress@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgAcquireStatus@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgPackageManager@APTPKG_5.0" 0.8.0
+ (c++)"vtable for debVersioningSystem@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgUdevCdromDevices@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgVersioningSystem@APTPKG_5.0" 0.8.0
+ (c++)"vtable for MMap@APTPKG_5.0" 0.8.0
+ (c++)"vtable for FileFd@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgCache@APTPKG_5.0" 0.8.0
+ (c++)"vtable for IndexCopy@APTPKG_5.0" 0.8.0
+ (c++)"vtable for debSystem@APTPKG_5.0" 0.8.0
+ (c++)"vtable for metaIndex@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgDPkgPM@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgPolicy@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgSystem@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgAcquire::Item@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgRecords::Parser@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgDepCache::InRootSetFunc@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgDepCache::DefaultRootSetFunc@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgDepCache::Policy@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgSimulate::Policy@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgIndexFile::Type@APTPKG_5.0" 0.8.0
+ (c++)"vtable for Configuration::MatchAgainstConfig@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgSourceList::Type@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgSrcRecords::Parser@APTPKG_5.0" 0.8.0
+ (c++)"vtable for APT::CacheSetHelper@APTPKG_5.0" 0.8.0
+ (c++)"non-virtual thunk to pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc()@APTPKG_5.0" 0.8.0
+ (c++)"operator<<(std::basic_ostream<char, std::char_traits<char> >&, pkgCache::DepIterator)@APTPKG_5.0" 0.8.0
+ (c++)"operator<<(std::basic_ostream<char, std::char_traits<char> >&, pkgCache::PkgIterator)@APTPKG_5.0" 0.8.0
+ _config@APTPKG_5.0 0.8.0
+ _system@APTPKG_5.0 0.8.0
+ debSys@APTPKG_5.0 0.8.0
+ debVS@APTPKG_5.0 0.8.0
+ pkgLibVersion@APTPKG_5.0 0.8.0
+ pkgVersion@APTPKG_5.0 0.8.0
+ (c++)"pkgAcquireStatus::~pkgAcquireStatus()@APTPKG_5.0" 0.8.0
+ (c++)"IndexCopy::~IndexCopy()@APTPKG_5.0" 0.8.0
+ (c++)"pkgIndexFile::Type::~Type()@APTPKG_5.0" 0.8.0
+ (c++)"pkgArchiveCleaner::~pkgArchiveCleaner()@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo for pkgArchiveCleaner@APTPKG_5.0" 0.8.0
+ (c++)"typeinfo name for pkgArchiveCleaner@APTPKG_5.0" 0.8.0
+ (c++)"vtable for pkgArchiveCleaner@APTPKG_5.0" 0.8.0
+### architecture specific: va_list
+ (arch=armel armhf|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, std::__va_list&) const@APTPKG_5.0" 0.8.15~exp1
+ (arch=i386 hurd-i386 kfreebsd-i386 ppc64|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, char*&) const@APTPKG_5.0" 0.8.15~exp1
+ (arch=hppa ia64 mips mipsel sparc sparc64|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, void*&) const@APTPKG_5.0" 0.8.15~exp1
+ (arch=amd64 kfreebsd-amd64 powerpc powerpcspe s390 s390x x32|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, __va_list_tag (&) [1]) const@APTPKG_5.0" 0.8.15~exp1
+ (arch=sh4|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, __builtin_va_list&) const@APTPKG_5.0" 0.8.15~exp1
+ (arch=alpha|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, __va_list_tag&) const@APTPKG_5.0" 0.8.15~exp1
+### architecture specific: va_list & size_t
+ (arch=i386 hurd-i386 kfreebsd-i386|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, char*&, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=armel armhf|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, std::__va_list&, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=alpha|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __va_list_tag&, unsigned long&)@APTPKG_5.0" 0.8.11.4
+ (arch=powerpc powerpcspe x32|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __va_list_tag (&) [1], unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=amd64 kfreebsd-amd64 s390 s390x|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __va_list_tag (&) [1], unsigned long&)@APTPKG_5.0" 0.8.11.4
+ (arch=hppa mips mipsel sparc|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=ia64 sparc64|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned long&)@APTPKG_5.0" 0.8.11.4
+ (arch=sh4|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, __builtin_va_list&, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=ppc64|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, char*&, unsigned long&)@APTPKG_5.0" 0.8.11.4
+ (arch=i386 hurd-i386 kfreebsd-i386|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=armel armhf|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, std::__va_list&, int, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=alpha|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag&, int, unsigned long&)@APTPKG_5.0" 0.8.11.4
+ (arch=powerpc powerpcspe x32|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag (&) [1], int, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=amd64 kfreebsd-amd64 s390 s390x|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag (&) [1], int, unsigned long&)@APTPKG_5.0" 0.8.11.4
+ (arch=hppa mips mipsel sparc|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, void*&, int, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=ia64 sparc64|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, void*&, int, unsigned long&)@APTPKG_5.0" 0.8.11.4 1
+ (arch=sh4|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __builtin_va_list&, int, unsigned int&)@APTPKG_5.0" 0.8.11.4
+ (arch=ppc64|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned long&)@APTPKG_5.0" 0.8.11.4
+### architecture specific: size_t
+ (arch=i386 armel armhf hppa hurd-i386 kfreebsd-i386 mips mipsel powerpc powerpcspe sh4 sparc x32|c++)"_strtabexpand(char*, unsigned int)@APTPKG_5.0" 0.8.0
+ (arch=alpha amd64 ia64 kfreebsd-amd64 s390 s390x sparc64 ppc64|c++)"_strtabexpand(char*, unsigned long)@APTPKG_5.0" 0.8.0
+### architecture specific: time_t
+ (arch=!x32|c++)"TimeRFC1123[abi:cxx11](long)@APTPKG_5.0" 0.8.0
+ (arch=x32|c++)"TimeRFC1123(long long)@APTPKG_5.0" 0.8.0
+ (arch=!x32|c++)"FTPMDTMStrToTime(char const*, long&)@APTPKG_5.0" 0.8.0
+ (arch=x32|c++)"FTPMDTMStrToTime(char const*, long long&)@APTPKG_5.0" 0.8.0
+ (arch=!x32|c++)"StrToTime(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long&)@APTPKG_5.0" 0.8.0
+ (arch=x32|c++)"StrToTime(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long long&)@APTPKG_5.0" 0.8.0
+ (arch=!x32|c++)"RFC1123StrToTime(char const*, long&)@APTPKG_5.0" 0.8.0
+ (arch=x32|c++)"RFC1123StrToTime(char const*, long long&)@APTPKG_5.0" 0.8.0
+###
+ (c++)"CreateAPTDirectoryIfNeeded(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.2
+ (c++)"FileFd::FileSize()@APTPKG_5.0" 0.8.8
+ (c++)"Base256ToNum(char const*, unsigned long&, unsigned int)@APTPKG_5.0" 0.8.11
+ (c++)"pkgDepCache::SetCandidateRelease(pkgCache::VerIterator, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator>, std::allocator<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> > >&)@APTPKG_5.0" 0.8.11
+ (c++)"pkgDepCache::SetCandidateRelease(pkgCache::VerIterator, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.11
+ (c++)"RealFileExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.11
+ (c++)"StripEpoch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.11
+ (c++)"pkgTagSection::FindFlag(unsigned long&, unsigned long, char const*, char const*)@APTPKG_5.0" 0.8.11
+ (c++)"FindMountPointForDevice[abi:cxx11](char const*)@APTPKG_5.0" 0.8.12
+ (c++)"pkgUdevCdromDevices::ScanForRemovable(bool)@APTPKG_5.0" 0.8.12
+ (c++)"APT::Configuration::Compressor::Compressor(char const*, char const*, char const*, char const*, char const*, unsigned short)@APTPKG_5.0" 0.8.12
+ (c++)"APT::Configuration::Compressor::~Compressor()@APTPKG_5.0" 0.8.12
+ (c++)"APT::Configuration::getCompressors(bool)@APTPKG_5.0" 0.8.12
+ (c++)"APT::Configuration::getCompressorExtensions[abi:cxx11]()@APTPKG_5.0" 0.8.12
+ (c++)"pkgCache::DepIterator::IsNegative() const@APTPKG_5.0" 0.8.15~exp1
+ (c++)"Configuration::CndSet(char const*, int)@APTPKG_5.0" 0.8.15.3
+ (c++)"pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator)@APTPKG_5.0" 0.8.15.3
+ (c++)"DeEscapeString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.15.4
+ (c++)"GetModificationTime(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.15.6
+ (c++)"pkgSourceList::GetLastModifiedTime()@APTPKG_5.0" 0.8.15.6
+ (c++)"pkgCacheFile::RemoveCaches()@APTPKG_5.0" 0.8.15.7
+ (c++)"pkgOrderList::VisitNode(pkgCache::PkgIterator, char const*)@APTPKG_5.0" 0.8.15.7
+### external dependency resolver ###
+ (c++)"EDSP::WriteError(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _IO_FILE*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::ReadRequest(int, std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool&, bool&, bool&)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::ApplyRequest(std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, pkgDepCache&)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::ReadResponse(int, pkgDepCache&, OpProgress*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::WriteRequest(pkgDepCache&, _IO_FILE*, bool, bool, bool, OpProgress*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::ExecuteSolver(char const*, int*, int*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::WriteProgress(unsigned short, char const*, _IO_FILE*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::WriteScenario(pkgDepCache&, _IO_FILE*, OpProgress*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::WriteSolution(pkgDepCache&, _IO_FILE*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"EDSP::ResolveExternal(char const*, pkgDepCache&, bool, bool, bool, OpProgress*)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const&)@APTPKG_5.0" 0.8.16~exp6
+### generalisation of checksums (with lfs) -- mostly api-compatible available (without sha512 in previous versions)
+ (c++)"AddCRC16(unsigned short, void const*, unsigned long long)@APTPKG_5.0" 0.8.16~exp2
+ (c++)"MD5Summation::Add(unsigned char const*, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"MD5Summation::Result()@APTPKG_5.0" 0.8.16~exp2
+ (c++)"MD5Summation::MD5Summation()@APTPKG_5.0" 0.8.16~exp2
+ (c++)"SHA1Summation::SHA1Summation()@APTPKG_5.0" 0.8.16~exp2
+ (c++)"SHA1Summation::Add(unsigned char const*, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"SHA1Summation::Result()@APTPKG_5.0" 0.8.16~exp2
+ (c++)"SHA256Summation::Add(unsigned char const*, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"SHA512Summation::Add(unsigned char const*, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"SummationImplementation::AddFD(int, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for MD5Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for SHA1Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for SHA256Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for SHA512Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for SHA2SummationBase@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for SummationImplementation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for MD5Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for SHA1Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for SHA256Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for SHA512Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for SHA2SummationBase@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for SummationImplementation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for MD5Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for SHA1Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for SHA256Summation@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for SHA512Summation@APTPKG_5.0" 0.8.16~exp6
+### large file support - available in older api-compatible versions without lfs ###
+ (c++)"StrToNum(char const*, unsigned long long&, unsigned int, unsigned int)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"OpProgress::SubProgress(unsigned long long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"OpProgress::OverallProgress(unsigned long long, unsigned long long, unsigned long long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"OpProgress::Progress(unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"SourceCopy::GetFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long long&)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgAcquire::UriIterator::~UriIterator()@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgAcquire::MethodConfig::~MethodConfig()@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgRecords::Parser::RecordField[abi:cxx11](char const*)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgTagFile::Jump(pkgTagSection&, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgTagFile::Offset()@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgTagFile::pkgTagFile(FileFd*, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"DynamicMMap::RawAllocate(unsigned long long, unsigned long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"PackageCopy::GetFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long long&)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgTagSection::~pkgTagSection()@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgAcquireStatus::Fetched(unsigned long long, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"FileFd::Read(void*, unsigned long long, unsigned long long*)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"FileFd::Seek(unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"FileFd::Skip(unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"FileFd::Write(void const*, unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"FileFd::Truncate(unsigned long long)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgPolicy::GetPriority(pkgCache::PkgFileIterator const&)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for pkgTagFile@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for pkgSrcRecords@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for pkgAcquire::UriIterator@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for pkgAcquire::MethodConfig@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for pkgAcquire::Queue@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo for pkgAcquire::Worker@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for pkgTagFile@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for pkgSrcRecords@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for pkgAcquire::UriIterator@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for pkgAcquire::MethodConfig@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for pkgAcquire::Queue@APTPKG_5.0" 0.8.16~exp6
+ (c++)"typeinfo name for pkgAcquire::Worker@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for pkgTagFile@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for pkgSrcRecords@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for pkgAcquire::UriIterator@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for pkgAcquire::MethodConfig@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for pkgAcquire::Queue@APTPKG_5.0" 0.8.16~exp6
+ (c++)"vtable for pkgAcquire::Worker@APTPKG_5.0" 0.8.16~exp6
+### remove deprecated parameter
+ (c++)"pkgDepCache::SetCandidateVersion(pkgCache::VerIterator)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgDepCache::AddSizes(pkgCache::PkgIterator const&, bool)@APTPKG_5.0" 0.8.16~exp6
+ (c++)"pkgDepCache::AddStates(pkgCache::PkgIterator const&, bool)@APTPKG_5.0" 0.8.16~exp6
+### used internally by public interfaces - if you use them directly, you can keep the pieces
+ (c++|optional=internal|regex)"^SHA256_.*@APTPKG_5.0$" 0.8.16~exp2
+ (c++|optional=internal|regex)"^SHA384_.*@APTPKG_5.0$" 0.8.16~exp2
+ (c++|optional=internal|regex)"^SHA512_.*@APTPKG_5.0$" 0.8.16~exp2
+### orderlist rework: the touched methods are protected
+ (c++)"SigINT(int)@APTPKG_5.0" 0.8.16~exp14
+ (c++)"pkgPackageManager::SigINTStop@APTPKG_5.0" 0.8.16~exp14
+ (c++)"pkgPackageManager::SmartUnPack(pkgCache::PkgIterator, bool, int)@APTPKG_5.0" 0.8.16~exp14
+ (c++)"pkgPackageManager::SmartConfigure(pkgCache::PkgIterator, int)@APTPKG_5.0" 0.8.16~exp14
+### FileFd rework: supporting different on-the-fly (de)compressing needs more parameter (abi), but the api is stable
+ (c++)"FileFd::OpenDescriptor(int, unsigned int, FileFd::CompressMode, bool)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"FileFd::OpenDescriptor(int, unsigned int, APT::Configuration::Compressor const&, bool)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"FileFd::ModificationTime()@APTPKG_5.0" 0.8.16~exp9
+ (c++)"FileFd::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, FileFd::CompressMode, unsigned long)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"FileFd::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, APT::Configuration::Compressor const&, unsigned long)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"FileFd::ReadLine(char*, unsigned long long)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"SummationImplementation::AddFD(FileFd&, unsigned long long)@APTPKG_5.0" 0.8.16~exp9
+ (c++|optional=deprecated,previous-inline)"FileFd::gzFd()@APTPKG_5.0" 0.8.0
+### CacheSet rework: making them real containers breaks bigtime the API (for the CacheSetHelper)
+ (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::empty() const@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::empty() const@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::empty() const@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::canNotFindTask(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::canNotFindRegEx(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::canNotFindAllVer(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::canNotFindPackage(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::showTaskSelection(pkgCache::PkgIterator const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const&, pkgCache::VerIterator, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::canNotFindCandInstVer(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::CacheSetHelper::canNotFindInstCandVer(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::clear()@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::insert(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::clear()@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::insert(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::clear()@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::insert(pkgCache::VerIterator const&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::VersionContainerInterface::getCandidateVer(pkgCacheFile&, pkgCache::PkgIterator const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::VersionContainerInterface::getInstalledVer(pkgCacheFile&, pkgCache::PkgIterator const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"APT::VersionContainerInterface::FromModifierCommandLine(unsigned short&, APT::VersionContainerInterface*, pkgCacheFile&, char const*, std::__cxx11::list<APT::VersionContainerInterface::Modifier, std::allocator<APT::VersionContainerInterface::Modifier> > const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"EDSP::WriteLimitedScenario(pkgDepCache&, _IO_FILE*, APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > > const&, OpProgress*)@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo for APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo for APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo for APT::PackageContainerInterface@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo for APT::VersionContainerInterface@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo name for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo name for APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo name for APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo name for APT::PackageContainerInterface@APTPKG_5.0" 0.8.16~exp9
+ (c++)"typeinfo name for APT::VersionContainerInterface@APTPKG_5.0" 0.8.16~exp9
+ (c++)"vtable for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"vtable for APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"vtable for APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >@APTPKG_5.0" 0.8.16~exp9
+ (c++)"vtable for APT::PackageContainerInterface@APTPKG_5.0" 0.8.16~exp9
+ (c++)"vtable for APT::VersionContainerInterface@APTPKG_5.0" 0.8.16~exp9
+### rework of the packagemanager rework
+ (c++)"APT::Progress::PackageManager::ConffilePrompt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerFancy::HandleSIGWINCH(int)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerFancy::~PackageManagerFancy()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerFancy::PackageManagerFancy()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerFancy::SetupTerminalScrollArea(int)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerFancy::StatusChanged(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerFancy::Stop()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::fork()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::GetPulseInterval()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::~PackageManager()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::ConffilePrompt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::~PackageManagerProgressDeb822Fd()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::PackageManagerProgressDeb822Fd(int)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::StartDpkg()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::StatusChanged(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::Stop()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressDeb822Fd::WriteToStatusFd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFactory()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::ConffilePrompt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::~PackageManagerProgressFd()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::PackageManagerProgressFd(int)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::StartDpkg()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::StatusChanged(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::Stop()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerProgressFd::WriteToStatusFd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::Pulse()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::StartDpkg()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::StatusChanged(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManager::Stop()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerText::~PackageManagerText()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerText::StatusChanged(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::String::Strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"pkgDPkgPM::BuildPackagesProgressMap()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"pkgDPkgPM::DoDpkgStatusFd(int)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"pkgDPkgPM::ProcessDpkgStatusLine(char*)@APTPKG_5.0" 0.9.13~exp1
+ (c++)"pkgDPkgPM::StartPtyMagic()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"pkgDPkgPM::StopPtyMagic()@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo for APT::Progress::PackageManager@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo for APT::Progress::PackageManagerFancy@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo for APT::Progress::PackageManagerProgressDeb822Fd@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo for APT::Progress::PackageManagerProgressFd@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo for APT::Progress::PackageManagerText@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo name for APT::Progress::PackageManager@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo name for APT::Progress::PackageManagerFancy@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo name for APT::Progress::PackageManagerProgressDeb822Fd@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo name for APT::Progress::PackageManagerProgressFd@APTPKG_5.0" 0.9.13~exp1
+ (c++)"typeinfo name for APT::Progress::PackageManagerText@APTPKG_5.0" 0.9.13~exp1
+ (c++)"vtable for APT::Progress::PackageManager@APTPKG_5.0" 0.9.13~exp1
+ (c++)"vtable for APT::Progress::PackageManagerFancy@APTPKG_5.0" 0.9.13~exp1
+ (c++)"vtable for APT::Progress::PackageManagerProgressDeb822Fd@APTPKG_5.0" 0.9.13~exp1
+ (c++)"vtable for APT::Progress::PackageManagerProgressFd@APTPKG_5.0" 0.9.13~exp1
+ (c++)"vtable for APT::Progress::PackageManagerText@APTPKG_5.0" 0.9.13~exp1
+ (c++)"APT::Progress::PackageManagerFancy::instances@APTPKG_5.0" 0.9.14.2
+ (c++)"APT::Progress::PackageManagerFancy::Start(int)@APTPKG_5.0" 0.9.14.2
+ (c++)"APT::Progress::PackageManager::Start(int)@APTPKG_5.0" 0.9.14.2
+### install foo.deb support
+ (c++)"flAbsPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 1.1~exp1
+ (c++)"metaIndex::~metaIndex()@APTPKG_5.0" 1.1~exp1
+### CacheFilter functors
+ (c++)"APT::CacheFilter::ANDMatcher::AND(APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher(APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::ANDMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::~ANDMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ANDMatcher::operator()(pkgCache::VerIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::FalseMatcher::~FalseMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::FalseMatcher::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::FalseMatcher::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::FalseMatcher::operator()(pkgCache::VerIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::Matcher::~Matcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::NOTMatcher::NOTMatcher(APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::NOTMatcher::~NOTMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::NOTMatcher::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::NOTMatcher::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::NOTMatcher::operator()(pkgCache::VerIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::operator()(pkgCache::VerIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::OR(APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*, APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::ORMatcher(APT::CacheFilter::Matcher*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::~ORMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::ORMatcher::ORMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageIsNewInstall::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageIsNewInstall::~PackageIsNewInstall()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageIsNewInstall::PackageIsNewInstall(pkgCacheFile*)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageMatcher::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageMatcher::operator()(pkgCache::VerIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageMatcher::~PackageMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::~PackageNameMatchesFnmatch()@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::PackageNameMatchesFnmatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::TrueMatcher::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::TrueMatcher::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::TrueMatcher::operator()(pkgCache::VerIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheFilter::TrueMatcher::~TrueMatcher()@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::ANDMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::FalseMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::Matcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::NOTMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::ORMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::PackageArchitectureMatchesSpecification@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::PackageIsNewInstall@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::PackageMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::PackageNameMatchesFnmatch@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::PackageNameMatchesRegEx@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo for APT::CacheFilter::TrueMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::ANDMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::FalseMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::Matcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::NOTMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::ORMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::PackageArchitectureMatchesSpecification@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::PackageIsNewInstall@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::PackageMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::PackageNameMatchesFnmatch@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::PackageNameMatchesRegEx@APTPKG_5.0" 1.1~exp4
+ (c++)"typeinfo name for APT::CacheFilter::TrueMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::ANDMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::FalseMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::Matcher@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::NOTMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::ORMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::PackageArchitectureMatchesSpecification@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::PackageIsNewInstall@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::PackageMatcher@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::PackageNameMatchesFnmatch@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::PackageNameMatchesRegEx@APTPKG_5.0" 1.1~exp4
+ (c++)"vtable for APT::CacheFilter::TrueMatcher@APTPKG_5.0" 1.1~exp4
+### cacheset redesign (API, but not ABI compatible)
+# (c++|optional=inline)"APT::PackageContainerInterface::FromCommandLine(APT::PackageContainerInterface*, pkgCacheFile&, char const**, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"APT::PackageContainerInterface::FromModifierCommandLine(unsigned short&, APT::PackageContainerInterface*, pkgCacheFile&, char const*, std::__cxx11::list<APT::PackageContainerInterface::Modifier, std::allocator<APT::PackageContainerInterface::Modifier> > const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"APT::PackageContainerInterface::FromName(pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"APT::PackageContainerInterface::FromTask(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"APT::PackageContainerInterface::FromRegEx(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"APT::VersionContainerInterface::FromString(APT::VersionContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::VersionContainerInterface::Version const&, APT::CacheSetHelper&, bool)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"APT::VersionContainerInterface::FromPackage(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&, APT::VersionContainerInterface::Version const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"APT::VersionContainerInterface::FromCommandLine(APT::VersionContainerInterface*, pkgCacheFile&, char const**, APT::VersionContainerInterface::Version const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++)"APT::PackageContainerInterface::FromString(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, APT::CacheSetHelper&)@APTPKG_5.0" 0.8.16~exp9
+# (c++)"APT::PackageContainerInterface::FromGroup(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@APTPKG_5.0" 0.9.7
+# (c++)"APT::PackageContainerInterface::FromFnmatch(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper&)@APTPKG_5.0" 0.9.11
+ (c++)"APT::CacheSetHelper::canNotFindFnmatch(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::canNotFindPackage(APT::CacheSetHelper::PkgSelector, APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::canNotFindVersion(APT::CacheSetHelper::VerSelector, APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::canNotGetCandInstVer(pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::canNotGetInstCandVer(pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::canNotGetVersion(APT::CacheSetHelper::VerSelector, pkgCacheFile&, pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFrom(APT::CacheSetHelper::PkgSelector, APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromCommandLine(APT::PackageContainerInterface*, pkgCacheFile&, char const**)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromFnmatch(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromModifierCommandLine(unsigned short&, APT::PackageContainerInterface*, pkgCacheFile&, char const*, std::__cxx11::list<APT::CacheSetHelper::PkgModifier, std::allocator<APT::CacheSetHelper::PkgModifier> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromName(pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromPackageName(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromRegEx(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromString(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::PackageFromTask(APT::PackageContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::showPackageSelection(pkgCache::PkgIterator const&, APT::CacheSetHelper::PkgSelector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::CacheSetHelper::showVersionSelection(pkgCache::PkgIterator const&, pkgCache::VerIterator const&, APT::CacheSetHelper::VerSelector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::VersionContainerInterface::FromCommandLine(APT::VersionContainerInterface*, pkgCacheFile&, char const**, APT::CacheSetHelper::VerSelector, APT::CacheSetHelper&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::VersionContainerInterface::FromPackage(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::PkgIterator const&, APT::CacheSetHelper::VerSelector, APT::CacheSetHelper&)@APTPKG_5.0" 1.1~exp4
+ (c++)"APT::VersionContainerInterface::FromString(APT::VersionContainerInterface*, pkgCacheFile&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, APT::CacheSetHelper::VerSelector, APT::CacheSetHelper&, bool)@APTPKG_5.0" 1.1~exp4
+### all the hashes are belong to us
+# (c++|optional=inline)"Hashes::AddFD(int, unsigned long long, bool, bool, bool, bool)@APTPKG_5.0" 0.8.16~exp6
+# (c++|optional=inline)"Hashes::AddFD(FileFd&, unsigned long long, bool, bool, bool, bool)@APTPKG_5.0" 0.8.16~exp9
+# (c++|optional=inline)"pkgRecords::Parser::MD5Hash()@APTPKG_5.0" 0.8.0
+# (c++|optional=inline)"pkgRecords::Parser::SHA1Hash()@APTPKG_5.0" 0.8.0
+# (c++|optional=inline)"pkgRecords::Parser::SHA256Hash()@APTPKG_5.0" 0.8.0
+# (c++|optional=inline)"pkgRecords::Parser::SHA512Hash()@APTPKG_5.0" 0.8.16~exp6
+ (c++)"Hashes::AddFD(FileFd&, unsigned long long, unsigned int)@APTPKG_5.0" 1.1~exp1
+ (c++)"Hashes::AddFD(int, unsigned long long, unsigned int)@APTPKG_5.0" 1.1~exp1
+ (c++)"Hashes::Add(unsigned char const*, unsigned long long, unsigned int)@APTPKG_5.0" 1.1~exp1
+ (c++)"Hashes::GetHashStringList()@APTPKG_5.0" 1.1~exp1
+ (c++)"Hashes::Hashes()@APTPKG_5.0" 1.1~exp1
+ (c++)"Hashes::~Hashes()@APTPKG_5.0" 1.1~exp1
+ (c++)"HashStringList::find(char const*) const@APTPKG_5.0" 1.1~exp1
+ (c++)"HashStringList::operator==(HashStringList const&) const@APTPKG_5.0" 1.1~exp1
+ (c++)"HashStringList::operator!=(HashStringList const&) const@APTPKG_5.0" 1.1~exp1
+ (c++)"HashStringList::push_back(HashString const&)@APTPKG_5.0" 1.1~exp1
+ (c++)"HashStringList::supported(char const*)@APTPKG_5.0" 1.1~exp1
+ (c++)"HashStringList::usable() const@APTPKG_5.0" 1.1~exp1
+ (c++)"HashStringList::VerifyFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@APTPKG_5.0" 1.1~exp1
+ (c++)"HashString::operator==(HashString const&) const@APTPKG_5.0" 1.1~exp1
+ (c++)"HashString::operator!=(HashString const&) const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgAcqArchive::IsTrusted() const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgAcqFile::Custom600Headers[abi:cxx11]() const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgAcqMethod::DropPrivsOrDie()@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgAcquire::Item::Custom600Headers[abi:cxx11]() const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgAcquire::Item::IsTrusted() const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgRecords::Parser::Hashes() const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgRecords::Parser::LongDesc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgRecords::Parser::ShortDesc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp1
+ (c++)"typeinfo for Hashes@APTPKG_5.0" 1.1~exp1
+ (c++)"typeinfo name for Hashes@APTPKG_5.0" 1.1~exp1
+ (c++)"vtable for Hashes@APTPKG_5.0" 1.1~exp1
+### more transactional update
+ (c++)"pkgAcquire::GetLock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgAcquire::Item::Dequeue()@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgAcquire::Item::QueueURI(pkgAcquire::ItemDesc&)@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgAcquire::Item::SetActiveSubprocess(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgAcquire::Setup(pkgAcquireStatus*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgArchiveCleaner::Erase(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, stat&)@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgDepCache::MarkAndSweep()@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgDepCache::MarkAndSweep(pkgDepCache::InRootSetFunc&)@APTPKG_5.0" 1.1~exp4
+### mixed stuff
+ (c++)"GetListOfFilesInDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@APTPKG_5.0" 0.8.16~exp13
+ (c++)"pkgCache::DepIterator::IsIgnorable(pkgCache::PkgIterator const&) const@APTPKG_5.0" 0.8.16~exp10
+ (c++)"pkgCache::DepIterator::IsIgnorable(pkgCache::PrvIterator const&) const@APTPKG_5.0" 0.8.16~exp10
+ (c++)"FileFd::Write(int, void const*, unsigned long long)@APTPKG_5.0" 0.8.16~exp14
+ (c++)"_strrstrip(char*)@APTPKG_5.0" 0.9.7.9~exp2
+ (c++)"SplitClearSignedFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFd*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, FileFd*)@APTPKG_5.0" 0.9.7.9~exp2
+ (c++)"OpenMaybeClearSignedFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFd&)@APTPKG_5.0" 0.9.7.9~exp2
+ (c++)"SigVerify::RunGPGV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&)@APTPKG_5.0" 0.9.7.9~exp2
+ (c++)"Configuration::Dump(std::basic_ostream<char, std::char_traits<char> >&, char const*, char const*, bool)@APTPKG_5.0" 0.9.3
+ (c++)"AcquireUpdate(pkgAcquire&, int, bool, bool)@APTPKG_5.0" 0.9.3
+ (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::PackageArchitectureMatchesSpecification(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@APTPKG_5.0" 0.9.7
+ (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::~PackageArchitectureMatchesSpecification()@APTPKG_5.0" 0.9.7
+ (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.9.7
+ (c++)"APT::CacheFilter::PackageArchitectureMatchesSpecification::operator()(char const* const&)@APTPKG_5.0" 0.9.7
+ (c++)"APT::Configuration::checkLanguage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@APTPKG_5.0" 0.9.7.5
+ (c++)"pkgCdrom::DropTranslation(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)@APTPKG_5.0" 0.9.7.5
+ (c++)"pkgCache::DepIterator::IsSatisfied(pkgCache::PrvIterator const&) const@APTPKG_5.0" 0.9.8
+ (c++)"pkgCache::DepIterator::IsSatisfied(pkgCache::VerIterator const&) const@APTPKG_5.0" 0.9.8
+ (c++)"operator<<(std::basic_ostream<char, std::char_traits<char> >&, GlobalError::Item)@APTPKG_5.0" 0.9.9
+ (c++)"pkgDepCache::IsDeleteOkProtectInstallRequests(pkgCache::PkgIterator const&, bool, unsigned long, bool)@APTPKG_5.0" 0.9.9.1
+ (c++)"pkgDepCache::IsInstallOkMultiArchSameVersionSynced(pkgCache::PkgIterator const&, bool, unsigned long, bool)@APTPKG_5.0" 0.9.9.1
+ (c++)"pkgDPkgPM::SendPkgsInfo(_IO_FILE*, unsigned int const&)@APTPKG_5.0" 0.9.9.1
+ (c++)"pkgCache::VerIterator::MultiArchType() const@APTPKG_5.0" 0.9.9.1
+ (c++)"AutoDetectProxy(URI&)@APTPKG_5.0" 0.9.10
+ (c++)"CommandLine::GetCommand(CommandLine::Dispatch const*, unsigned int, char const* const*)@APTPKG_5.0" 0.9.11
+ (c++)"CommandLine::MakeArgs(char, char const*, char const*, unsigned long)@APTPKG_5.0" 0.9.11
+ (c++)"Configuration::Clear()@APTPKG_5.0" 0.9.11
+ (c++)"Glob(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)@APTPKG_5.0" 0.9.11
+ (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::operator()(pkgCache::GrpIterator const&)@APTPKG_5.0" 0.9.11
+ (c++)"APT::CacheFilter::PackageNameMatchesFnmatch::operator()(pkgCache::PkgIterator const&)@APTPKG_5.0" 0.9.11
+ (c++)"pkgTagSection::pkgTagSection()@APTPKG_5.0" 0.9.11
+ (c++)"strv_length(char const**)@APTPKG_5.0" 0.9.11
+ (c++)"StringSplit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)@APTPKG_5.0" 0.9.11.3
+ (c++)"pkgAcquire::Item::RenameOnError(pkgAcquire::Item::RenameOnErrorState)@APTPKG_5.0" 0.9.12
+ (c++)"APT::String::Endswith(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 0.9.13.1
+ (c++)"ExecFork(std::set<int, std::less<int>, std::allocator<int> >)@APTPKG_5.0" 0.9.13.1
+ (c++)"MergeKeepFdsFromConfiguration(std::set<int, std::less<int>, std::allocator<int> >&)@APTPKG_5.0" 0.9.13.1
+ (c++)"HashString::FromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.13.1
+ (c++)"HashString::GetHashForFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@APTPKG_5.0" 0.9.13.1
+ (c++)"GetTempDir[abi:cxx11]()@APTPKG_5.0" 0.9.14.2
+ (c++)"APT::Configuration::getBuildProfiles[abi:cxx11]()@APTPKG_5.0" 0.9.16
+ (c++)"APT::Configuration::getBuildProfilesString[abi:cxx11]()@APTPKG_5.0" 0.9.16
+ (c++)"debListParser::ParseDepends(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&)@APTPKG_5.0" 0.9.16
+ (c++)"debListParser::ParseDepends(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&, bool const&)@APTPKG_5.0" 0.9.16
+ (c++)"debListParser::ParseDepends(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&, bool const&, bool const&, bool const&)@APTPKG_5.0" 0.9.16
+ (c++)"Rename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)@APTPKG_5.0" 0.9.16
+ (c++)"pkgDepCache::IsInstallOkDependenciesSatisfiableByCandidates(pkgCache::PkgIterator const&, bool, unsigned long, bool)@APTPKG_5.0" 1.0
+ (c++)"APT::Progress::PackageManagerFancy::GetTerminalSize()@APTPKG_5.0" 1.0
+ (c++)"APT::Progress::PackageManagerFancy::GetTextProgressStr[abi:cxx11](float, int)@APTPKG_5.0" 1.0
+ (c++)"pkgCdromStatus::GetOpProgress()@APTPKG_5.0" 1.0
+ (c++)"pkgCdromStatus::SetTotal(int)@APTPKG_5.0" 1.0
+ (c++)"EDSP::ExecuteSolver(char const*, int*, int*, bool)@APTPKG_5.0" 1.0.4
+ (c++)"pkgPackageManager::EarlyRemove(pkgCache::PkgIterator, pkgCache::DepIterator const*)@APTPKG_5.0" 1.0.4
+ (c++)"pkgSrcRecords::Step()@APTPKG_5.0" 1.0.4
+ (c++)"pkgDPkgPM::SetupSlavePtyMagic()@APTPKG_5.0" 1.0.8
+ (c++)"HashStringList::find(char const*) const@APTPKG_5.0" 1.0.9.4
+ (c++)"HashStringList::operator==(HashStringList const&) const@APTPKG_5.0" 1.0.9.4
+ (c++)"HashStringList::operator!=(HashStringList const&) const@APTPKG_5.0" 1.0.9.4
+ (c++)"HashStringList::push_back(HashString const&)@APTPKG_5.0" 1.0.9.4
+ (c++)"HashStringList::supported(char const*)@APTPKG_5.0" 1.0.9.4
+ (c++)"HashStringList::VerifyFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@APTPKG_5.0" 1.0.9.4
+ (c++)"HashString::operator==(HashString const&) const@APTPKG_5.0" 1.0.9.4
+ (c++)"HashString::operator!=(HashString const&) const@APTPKG_5.0" 1.0.9.4
+ (c++)"pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2, std::allocator<pkgSrcRecords::File2> >&)@APTPKG_5.0" 1.0.9.4
+ (c++)"APT::Progress::PackageManager::PackageManager()@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgDPkgPM::Go(APT::Progress::PackageManager*)@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgPackageManager::DoInstall(APT::Progress::PackageManager*)@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgPackageManager::DoInstallPostFork(APT::Progress::PackageManager*)@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgPackageManager::Go(APT::Progress::PackageManager*)@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgTagFile::Init(FileFd*, unsigned long long)@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgTagSection::Count() const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgTagSection::Exists(char const*) const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgTagSection::FindB(char const*, bool const&) const@APTPKG_5.0" 1.1~exp1
+ (c++)"pkgTagSection::Scan(char const*, unsigned long, bool)@APTPKG_5.0" 1.1~exp1
+ (c++)"StartsWithGPGClearTextSignature(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp1
+ (c++)"Popen(char const**, FileFd&, int&, FileFd::OpenMode)@APTPKG_5.0" 1.1~exp1
+ (c++)"APT::String::Startswith(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp2
+ (c++)"APT::Upgrade::Upgrade(pkgDepCache&, int, OpProgress*)@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgProblemResolver::Resolve(bool, OpProgress*)@APTPKG_5.0" 1.1~exp4
+ (c++)"pkgProblemResolver::ResolveByKeep(OpProgress*)@APTPKG_5.0" 1.1~exp4
+ (c++)"DropPrivileges()@APTPKG_5.0" 1.1~exp4
+ (c++)"FileFd::FileFd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned long)@APTPKG_5.0" 1.1~exp4
+ (c++)"metaIndex::metaIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::Get(char const*&, char const*&, unsigned int) const@APTPKG_5.0" 1.1~exp9
+### ABI 5 changed so much (+ abicxx11 transition)
+ (c++)"APT::CacheSetHelper::CacheSetHelper(bool, GlobalError::MsgType)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::Configuration::getArchitectures[abi:cxx11](bool const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::Configuration::getCompressionTypes[abi:cxx11](bool const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::Configuration::getLanguages[abi:cxx11](bool const&, bool const&, char const**)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainerInterface::operator=(APT::PackageContainerInterface const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainerInterface::PackageContainerInterface(APT::CacheSetHelper::PkgSelector)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainerInterface::~PackageContainerInterface()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainerInterface::PackageContainerInterface()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::~PackageContainer()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainer<std::__cxx11::list<pkgCache::PkgIterator, std::allocator<pkgCache::PkgIterator> > >::size() const@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::~PackageContainer()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >::size() const@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageUniverse::empty() const@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageUniverse::~PackageUniverse()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageUniverse::PackageUniverse(pkgCache*)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageUniverse::PackageUniverse(pkgCacheFile*)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::PackageUniverse::size() const@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::Progress::PackageManagerText::PackageManagerText()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::VersionContainerInterface::FromDependency(APT::VersionContainerInterface*, pkgCacheFile&, pkgCache::DepIterator const&, APT::CacheSetHelper::VerSelector, APT::CacheSetHelper&)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::VersionContainerInterface::operator=(APT::VersionContainerInterface const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::VersionContainerInterface::~VersionContainerInterface()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::VersionContainerInterface::VersionContainerInterface()@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::size() const@APTPKG_5.0" 1.1~exp9
+ (c++)"APT::VersionContainer<std::__cxx11::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::~VersionContainer()@APTPKG_5.0" 1.1~exp9
+ (c++)"ChangeOwnerAndPermissionOfFile(char const*, char const*, char const*, char const*, unsigned int)@APTPKG_5.0" 1.1~exp9
+ (c++)"CommandLine::CommandLine()@APTPKG_5.0" 1.1~exp9
+ (c++)"Configuration::FindVector(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebianSourceDirIndex::GetType() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::~debDebPkgFileIndex()@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::debDebPkgFileIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::FindInCache(pkgCache&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::GetArchitecture[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::GetComponent[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::GetContent(std::basic_ostream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::GetIndexFlags() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::GetType() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::HasPackages() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDebPkgFileIndex::OpenListFile(FileFd&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"debDscFileIndex::CreateSrcParser() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDscFileIndex::~debDscFileIndex()@APTPKG_5.0" 1.1~exp9
+ (c++)"debDscFileIndex::debDscFileIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"debDscFileIndex::GetType() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debDscFileIndex::HasPackages() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debPackagesIndex::ArchiveInfo[abi:cxx11](pkgCache::VerIterator const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"debPackagesIndex::~debPackagesIndex()@APTPKG_5.0" 1.1~exp9
+ (c++)"debPackagesIndex::debPackagesIndex(IndexTarget const&, bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"debPackagesIndex::GetIndexFlags() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debPackagesIndex::GetType() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debPackagesIndex::HasPackages() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::CreateSrcParser() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::~debSourcesIndex()@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::debSourcesIndex(IndexTarget const&, bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::GetIndexFlags() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::GetType() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::HasPackages() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::OpenListFile(FileFd&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"debSourcesIndex::SourceInfo[abi:cxx11](pkgSrcRecords::Parser const&, pkgSrcRecords::File const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::~debStatusIndex()@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::debStatusIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::Exists() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::GetArchitecture[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::GetComponent[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::GetIndexFlags() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::GetType() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debStatusIndex::HasPackages() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debTranslationsIndex::~debTranslationsIndex()@APTPKG_5.0" 1.1~exp9
+ (c++)"debTranslationsIndex::debTranslationsIndex(IndexTarget const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"debTranslationsIndex::GetArchitecture[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debTranslationsIndex::GetIndexFlags() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debTranslationsIndex::GetType() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debTranslationsIndex::HasPackages() const@APTPKG_5.0" 1.1~exp9
+ (c++)"debTranslationsIndex::OpenListFile(FileFd&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"ExecGPGV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"ExecGPGV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, int*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"FileFd::FileFd()@APTPKG_5.0" 1.1~exp9
+ (c++)"FileFd::FileFd(int, bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"FileFd::FileFd(int, unsigned int, FileFd::CompressMode)@APTPKG_5.0" 1.1~exp9
+ (c++)"FileFd::FileFd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, FileFd::CompressMode, unsigned long)@APTPKG_5.0" 1.1~exp9
+ (c++)"GetTempFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, FileFd*)@APTPKG_5.0" 1.1~exp9
+ (c++)"Hashes::AddFD(FileFd&, unsigned long long)@APTPKG_5.0" 1.1~exp9
+ (c++)"Hashes::AddFD(int, unsigned long long)@APTPKG_5.0" 1.1~exp9
+ (c++)"Hashes::Add(unsigned char const*, unsigned long long)@APTPKG_5.0" 1.1~exp9
+ (c++)"Hashes::Hashes(HashStringList const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"Hashes::Hashes(unsigned int)@APTPKG_5.0" 1.1~exp9
+ (c++)"HashStringList::FileSize() const@APTPKG_5.0" 1.1~exp9
+ (c++)"HashStringList::FileSize(unsigned long long)@APTPKG_5.0" 1.1~exp9
+ (c++)"IndexCopy::IndexCopy()@APTPKG_5.0" 1.1~exp9
+ (c++)"IndexTarget::Format(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@APTPKG_5.0" 1.1~exp9
+ (c++)"IndexTarget::~IndexTarget()@APTPKG_5.0" 1.1~exp9
+ (c++)"IndexTarget::IndexTarget(IndexTarget const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"IndexTarget::IndexTarget(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"IndexTarget::Option[abi:cxx11](IndexTarget::OptionKeys) const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::CheckDist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::Describe[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::Exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::FindInCache(pkgCache&, bool) const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetCodename[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetDate() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetExpectedDist[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetLoadedSuccessfully() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetSignedBy[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetSuite[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetSupportsAcquireByHash() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetTrusted() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::GetValidUntil() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::Lookup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::MetaKeys[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"metaIndex::swapLoad(metaIndex*)@APTPKG_5.0" 1.1~exp9
+ (c++)"PackageCopy::PackageCopy()@APTPKG_5.0" 1.1~exp9
+ (c++)"PackageCopy::RewriteEntry(FileFd&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqArchive::DescURI[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqArchive::Done(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, HashStringList const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqArchive::Failed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqArchive::GetExpectedHashes() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqArchive::GetFinalFilename[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqArchive::HashesRequired() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqArchive::ShortDesc[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::DescURI[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::Done(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, HashStringList const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::Failed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::GetExpectedHashes() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::HashesRequired() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::~pkgAcqChangelog()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::pkgAcqChangelog(pkgAcquire*, pkgCache::RlsFileIterator const&, char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::pkgAcqChangelog(pkgAcquire*, pkgCache::VerIterator const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::pkgAcqChangelog(pkgAcquire*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::URI[abi:cxx11](pkgCache::RlsFileIterator const&, char const*, char const*, char const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::URI[abi:cxx11](pkgCache::VerIterator const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::URI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, char const*, char const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqChangelog::URITemplate[abi:cxx11](pkgCache::RlsFileIterator const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqFile::DescURI[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqFile::Done(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, HashStringList const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqFile::Failed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqFile::GetExpectedHashes() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqFile::HashesRequired() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqFile::pkgAcqFile(pkgAcquire*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, HashStringList const&, unsigned long long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqMethod::FetchItem::FetchItem()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqMethod::FetchItem::~FetchItem()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqMethod::FetchResult::~FetchResult()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcqMethod::URIAcquire(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgAcqMethod::FetchItem*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::Done(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, HashStringList const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::Failed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::GetFinalFilename[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::GetItemDesc()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::GetOwner() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::HashesRequired() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::HashSum[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::Item(pkgAcquire*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::Rename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::ReportMirrorFailure(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::ShortDesc[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::Start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Item::VerifyDone(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgAcquire::MethodConfig const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Queue::QItem::Custom600Headers[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Queue::QItem::GetExpectedHashes() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Queue::QItem::GetMaximumSize() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Queue::QItem::SyncDestinationFiles() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::Queue::Queue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgAcquire*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgAcquire::UriIterator::UriIterator(pkgAcquire::Queue*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgArchiveCleaner::pkgArchiveCleaner()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCache::DepIterator::IsImplicit() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCacheFile::pkgCacheFile(pkgDepCache*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCache::PkgIterator::FullName[abi:cxx11](bool const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCache::RlsFileIterator::IsOk()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCache::RlsFileIterator::RelStr[abi:cxx11]()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCdrom::~pkgCdrom()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCdrom::pkgCdrom()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCdromStatus::~pkgCdromStatus()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgCdromStatus::pkgCdromStatus()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexFile::FindInCache(pkgCache&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexFile::~pkgDebianIndexFile()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexFile::pkgDebianIndexFile(bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::ArchiveURI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::Describe[abi:cxx11](bool) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::Exists() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::GetProgressDescription[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::IndexFileName[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::OpenListFile(FileFd&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::~pkgDebianIndexRealFile()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::pkgDebianIndexRealFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexRealFile::Size() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::ArchiveURI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::Describe[abi:cxx11](bool) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::Exists() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::GetArchitecture[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::GetComponent[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::GetProgressDescription[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::IndexFileName[abi:cxx11]() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::OpenListFile(FileFd&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::~pkgDebianIndexTargetFile()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::pkgDebianIndexTargetFile(IndexTarget const&, bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDebianIndexTargetFile::Size() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDepCache::CheckDep(pkgCache::DepIterator const&, int, pkgCache::PkgIterator&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDepCache::DependencyState(pkgCache::DepIterator const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDepCache::Policy::IsImportantDep(pkgCache::DepIterator const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDepCache::UpdateVerState(pkgCache::PkgIterator const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgDepCache::VersionState(pkgCache::DepIterator, unsigned char, unsigned char, unsigned char) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgIndexFile::ArchiveInfo[abi:cxx11](pkgCache::VerIterator const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgIndexFile::ArchiveURI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgIndexFile::~pkgIndexFile()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgIndexFile::pkgIndexFile(bool)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgIndexFile::SourceInfo[abi:cxx11](pkgSrcRecords::Parser const&, pkgSrcRecords::File const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgIndexFile::Type::CreatePkgParser(pkgCache::PkgFileIterator const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgIndexFile::Type::CreateSrcPkgParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgRecords::Parser::~Parser()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgRecords::Parser::Parser()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::AddVolatileFile(pkgIndexFile*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::GetVolatileFiles() const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::ReadAppend(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::ReadSourceDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::Read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::Type::ParseLine(std::vector<metaIndex*, std::allocator<metaIndex*> >&, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::Type::ParseStanza(std::vector<metaIndex*, std::allocator<metaIndex*> >&, pkgTagSection&, unsigned int, FileFd&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::Type::~Type()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSourceList::Type::Type(char const*, char const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSrcRecords::Parser::~Parser()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSrcRecords::Parser::Parser(pkgIndexFile const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSystem::~pkgSystem()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgSystem::pkgSystem(char const*, pkgVersioningSystem*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::FindFlag(char const*, unsigned char&, unsigned char) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::FindFlag(unsigned char&, unsigned char, char const*, char const*)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::FindRawS[abi:cxx11](char const*) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::Tag::Remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::Tag::Rename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::Tag::Rewrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::Tag::~Tag()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgTagSection::Write(FileFd&, char const* const*, std::vector<pkgTagSection::Tag, std::allocator<pkgTagSection::Tag> > const&) const@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgUserTagSection::~pkgUserTagSection()@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgUserTagSection::TrimRecord(bool, char const*&)@APTPKG_5.0" 1.1~exp9
+ (c++)"pkgVersioningSystem::~pkgVersioningSystem()@APTPKG_5.0" 1.1~exp9
+ (c++)"SigVerify::~SigVerify()@APTPKG_5.0" 1.1~exp9
+ (c++)"SigVerify::SigVerify()@APTPKG_5.0" 1.1~exp9
+ (c++)"SourceCopy::RewriteEntry(FileFd&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"SourceCopy::SourceCopy()@APTPKG_5.0" 1.1~exp9
+ (c++)"TranslationsCopy::~TranslationsCopy()@APTPKG_5.0" 1.1~exp9
+ (c++)"TranslationsCopy::TranslationsCopy()@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for APT::PackageUniverse@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for debDebianSourceDirIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for debDebPkgFileIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for debDscFileIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for debPackagesIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for debSourcesIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for debStatusIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for debTranslationsIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgAcqChangelog@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgAcqMethod::FetchItem@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgAcqMethod::FetchResult@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgCdrom@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgCdromStatus@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgDebianIndexFile@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgDebianIndexRealFile@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgDebianIndexTargetFile@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgDepCache::ActionGroup@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgOrderList@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgProblemResolver@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgRecords@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgSourceList@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for pkgUserTagSection@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for SigVerify@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo for TranslationsCopy@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for APT::PackageUniverse@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for debDebianSourceDirIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for debDebPkgFileIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for debDscFileIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for debPackagesIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for debSourcesIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for debStatusIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for debTranslationsIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgAcqChangelog@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgAcqMethod::FetchItem@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgAcqMethod::FetchResult@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgCdrom@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgCdromStatus@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgDebianIndexFile@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgDebianIndexRealFile@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgDebianIndexTargetFile@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgDepCache::ActionGroup@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgOrderList@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgProblemResolver@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgRecords@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgSourceList@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for pkgUserTagSection@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for SigVerify@APTPKG_5.0" 1.1~exp9
+ (c++)"typeinfo name for TranslationsCopy@APTPKG_5.0" 1.1~exp9
+ (c++)"URI::ArchiveOnly(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<APT::Configuration::Compressor, std::allocator<APT::Configuration::Compressor> >::emplace_back<APT::Configuration::Compressor>(APT::Configuration::Compressor&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<char const*, std::allocator<char const*> >::emplace_back<char const*>(char const*&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<pkgCache::GrpIterator*, std::allocator<pkgCache::GrpIterator*> >::emplace_back<pkgCache::GrpIterator*>(pkgCache::GrpIterator*&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<pkgCache::PkgIterator*, std::allocator<pkgCache::PkgIterator*> >::emplace_back<pkgCache::PkgIterator*>(pkgCache::PkgIterator*&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<pkgCache::RlsFileIterator*, std::allocator<pkgCache::RlsFileIterator*> >::emplace_back<pkgCache::RlsFileIterator*>(pkgCache::RlsFileIterator*&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<pkgCache::VerIterator*, std::allocator<pkgCache::VerIterator*> >::emplace_back<pkgCache::VerIterator*>(pkgCache::VerIterator*&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<pkgDPkgPM::Item, std::allocator<pkgDPkgPM::Item> >::emplace_back<pkgDPkgPM::Item>(pkgDPkgPM::Item&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<pkgIndexFile*, std::allocator<pkgIndexFile*> >::emplace_back<pkgIndexFile*>(pkgIndexFile*&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<pkgTagSection::Tag, std::allocator<pkgTagSection::Tag> >::emplace_back<pkgTagSection::Tag>(pkgTagSection::Tag&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::emplace_back<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for APT::PackageUniverse@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for debDebianSourceDirIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for debDebPkgFileIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for debDscFileIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for debPackagesIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for debSourcesIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for debStatusIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for debTranslationsIndex@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgAcqChangelog@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgAcqMethod::FetchItem@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgAcqMethod::FetchResult@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgCdrom@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgCdromStatus@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgDebianIndexFile@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgDebianIndexRealFile@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgDebianIndexTargetFile@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgDepCache::ActionGroup@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgOrderList@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgProblemResolver@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgRecords@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgSourceList@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for pkgUserTagSection@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for SigVerify@APTPKG_5.0" 1.1~exp9
+ (c++)"vtable for TranslationsCopy@APTPKG_5.0" 1.1~exp9
+### symbol versioning:
+ APTPKG_5.0@APTPKG_5.0 1.1~exp9
+### try to ignore std:: template instances
+ (c++|regex|optional=std)"^std::vector<.+ >::(vector|push_back|erase|_[^ ]+)\(.+\)( const|)@APTPKG_5.0$" 0.8.0
+ (c++|regex|optional=std)"^(void |)std::[^ ]+<.+ >::(_|~).+\(.*\)@APTPKG_5.0$" 0.8.0
+ (c++|regex|optional=std)"^std::[^ ]+<.+ >::(append|insert|reserve|operator[^ ]+)\(.*\)@APTPKG_5.0$" 0.8.0
+ (c++|regex|optional=std)"^(void |DiffInfo\* |)std::_.*@APTPKG_5.0$" 0.8.0
+ (c++|regex|optional=std)"^__gnu_cxx::__[^ ]+<.*@APTPKG_5.0$" 0.8.0
+ (c++|optional=std)"std::ctype<char>::do_widen(char) const@APTPKG_5.0" 1.0.3
diff --git a/doc/acquire-additional-files.txt b/doc/acquire-additional-files.txt
new file mode 100644
index 000000000..71ce7b0cb
--- /dev/null
+++ b/doc/acquire-additional-files.txt
@@ -0,0 +1,233 @@
+# Acquire additional files in 'update' operations
+
+The download and verification of data from multiple sources in different
+compression formats, with partial downloads and patches is an involved
+process which is hard to implement correctly and securely.
+
+APT frontends share the code and binaries to make this happen in libapt
+with the Acquire system, supported by helpers shipped in the apt package
+itself and additional transports in individual packages like
+apt-transport-https.
+
+For its own operation libapt needs or can make use of Packages, Sources
+and Translation-* files, which it will acquire by default, but
+a repository might contain more data files (e.g. Contents) a frontend
+might want to use and would therefore need to be downloaded as well
+(e.g. apt-file).
+
+This file describes the configuration scheme such a frontend can use to
+instruct the Acquire system to download those additional files.
+
+# The Configuration Stanza
+
+The Acquire system uses the same configuration settings to implement the
+files it downloads by default. These settings are the default, but if
+they would be written in a configuration file the configuration
+instructing the Acquire system to download the Packages files would look
+like this (see also apt.conf(5) manpage for configuration file syntax):
+
+ Acquire::IndexTargets::deb::Packages {
+ MetaKey "$(COMPONENT)/binary-$(ARCHITECTURE)/Packages";
+ ShortDescription "Packages";
+ Description "$(SITE) $(RELEASE)/$(COMPONENT) $(ARCHITECTURE) Packages";
+
+ flatMetaKey "Packages";
+ flatDescription "$(SITE) $(RELEASE) Packages";
+
+ Optional "false";
+ };
+
+All files which should be downloaded (nicknamed 'Targets') are mentioned
+below the Acquire::IndexTargets scope. 'deb' is here the type of the
+sources.list entry the file should be acquired for. The only other
+supported value is hence 'deb-src'. Beware: You can't specify multiple
+types here and you can't download the same (evaluated) MetaKey from
+multiple types!
+
+After the type you can pick any valid and unique string which preferable
+refers to the file it downloads (In the example we picked 'Packages').
+This string is used as identifier for the target class and accessible as
+'Created-By' e.g. in the "apt-get indextargets" output as detailed below.
+
+All targets have three main properties you can define:
+* MetaKey: The identifier of the file to be downloaded as used in the
+ Release file. It is also the relative location of the file from the
+ Release file. You can neither download from a different server
+ entirely (absolute URI) nor access directories above the Release file
+ (e.g. "../../").
+* ShortDescription: Very short string intended to be displayed to the
+ user e.g. while reporting progress. apt will e.g. use this string in
+ the last line to indicate progress of e.g. the download of a specific
+ item.
+* Description: A preferable human understandable and readable identifier
+ of which file is acquired exactly. Mainly used for progress reporting
+ and error messages. apt will e.g. use this string in the Get/Hit/Err
+ progress lines.
+
+Additional optional properties:
+* flat{MetaKey,Description}: APT supports two types of repositories:
+ dists-style repositories which are the default and by far the most
+ common which are named after the fact that the files are in an
+ elaborated directory structure. In contrast a flat-style repositories
+ lumps all files together in one directory. Support for these flat
+ repositories exists mainly for legacy purposes only. It is therefore
+ recommend to not set these values.
+* Optional: The default value is 'true' and should be kept at this
+ value. If enabled the acquire system will skip the download if the
+ file isn't mentioned in the Release file. Otherwise this is treated as
+ a hard error and the update process fails. Note that failures while
+ downloading (e.g. 404 or hash verification errors) are failures,
+ regardless of this setting.
+
+
+The acquire system will automatically choose to download a compressed
+file if it is available and uncompress it for you, just as it will also
+use pdiff patching if provided by the repository and enabled by the
+user. You only have to ensure that the Release file contains the
+information about the compressed files/pdiffs to make this happen.
+NO properties have to be set to enable this.
+
+# More examples
+
+The stanzas for Translation-* files as well as for Sources files would
+look like this:
+
+Acquire::IndexTargets {
+ deb::Translations {
+ MetaKey "$(COMPONENT)/i18n/Translation-$(LANGUAGE)";
+ ShortDescription "Translation-$(LANGUAGE)";
+ Description "$(SITE) $(RELEASE)/$(COMPONENT) Translation-$(LANGUAGE)";
+
+ flatMetaKey "$(LANGUAGE)";
+ flatDescription "$(SITE) $(RELEASE) Translation-$(LANGUAGE)";
+ };
+
+ deb-src::Sources {
+ MetaKey "$(COMPONENT)/source/Sources";
+ ShortDescription "Sources";
+ Description "$(SITE) $(RELEASE)/$(COMPONENT) Sources";
+
+ flatMetaKey "Sources";
+ flatDescription "$(SITE) $(RELEASE) Sources";
+
+ Optional "false";
+ };
+};
+
+# Substitution variables
+
+As seen in the examples, properties can contain placeholders filled in
+by the acquire system. The following variables are known; note that
+unknown variables have no default value nor are they touched: They are
+printed as-is.
+
+* $(SITE): An identifier of the site we access as seen in sources.list,
+ e.g. "http://example.org/debian" or "file:/path/to/a/repository". You
+ can't use this field in {,flat}MetaKey, it is for description proposes
+ only.
+* $(RELEASE): This is usually an archive- or codename, e.g. "stable" or
+ "stretch". Note that flat-style repositories do not have a archive-
+ or codename per-se, so the value might very well be just "/" or so.
+ Again, as seen in the sources.list.
+* $(COMPONENT): as given in the sources.list, e.g. "main", "non-free" or
+ "universe". Note that flat-style repositories again do not really
+ have a meaningful value here.
+* $(LANGUAGE): Values are all entries (expect "none") of configuration
+ option Acquire::Languages, e.g. "en", "de" or "de_AT".
+* $(ARCHITECTURE): Values are all entries of configuration option
+ APT::Architectures (potentially modified by sources.list options),
+ e.g. "amd64", "i386" or "armel" for the 'deb' type. In type 'deb-src'
+ this variable has the value "source".
+
+Note that while more variables might exist in the implementation, these
+are to be considered undefined and their usage strongly discouraged. If
+you have a need for other variables contact us.
+
+# Accessing files
+
+Do NOT hardcode specific file locations, names or compression types in
+your application! You will notice that the configuration options give
+you no choice over where the downloaded files will be stored. This is by
+design so multiple applications can download and use the same file
+rather than each and every one of them potentially downloads and uses
+its own copy somewhere on disk.
+
+"apt-get indextargets" can be used to get the location as well as other
+information about all files downloaded (aka: you will see Packages,
+Sources and Translation-* files here as well). Provide a line of the
+default output format as parameter to filter out all entries which do
+not have such a line. With --format, you can further more define your
+own output style. The variables are what you see in the output, just all
+uppercase and wrapped in $(), as in the configuration file.
+
+To get all the filenames of all Translation-en files you can e.g. call:
+ apt-get indextargets --format '$(FILENAME)' "Created-By: Translations" "Language: en"
+
+The line-based filtering and the formating is rather crude and feature-
+less by design, so it is recommend to use dedicated and more powerful
+tools like 'grep-dctrl'.
+
+Accessing this information via libapt is done by reading the
+sources.lists (pkgSourceList), iterating over the metaIndex objects this
+creates and calling GetIndexTargets() on them. See the sourcecode of
+"apt-get indextargets" for a complete example.
+
+Note that by default targets are not listed if they weren't downloaded.
+If you want to see all targets, you can use the --no-release-info, which
+also removes the Codename, Suite, Version, Origin, Label and Trusted
+fields from the output as these also display data which needs to be
+downloaded first and could hence be inaccurate [on the pro-side: This
+mode is faster as it doesn't require a valid binary cache to operate].
+The most notable difference perhaps is in the Filename field through: By
+default it indicates an existing file, potentially compressed (Hint:
+libapt users can use FileFd to open compressed files transparently). In
+the --no-release-info mode the indicated file doesn't need to exist and
+it will always refer to an uncompressed file, even if the index would be
+(or is) stored compressed.
+
+Remarks on fields only available in (default) --release-info mode:
+* Trusted: Denotes with a 'yes' or 'no' if the data in this file is
+ authenticated by a trustchain rooted in a trusted gpg key. You should
+ be careful with untrusted data and warn the user if you use it.
+* Codename, Suite, Version, Origin and Label are fields from the Release
+ file, are only present if they are present in the Release file and
+ contain the same data.
+
+Remarks on other available fields:
+* MetaKey, ShortDesc, Description, Site, Release: as defined
+ by the configuration and described further above.
+* Created-By: configuration entity responsible for this target
+* Target-Of: type of the sources.list entry
+* URI, Repo-URI: avoid using. Contains potentially username/password.
+ Prefer 'Site', especially for display.
+* Optional: Decodes the option of the same name from the configuration.
+ Note that it is using 'yes' and 'no' instead of 'true' and 'false'.
+* Language, Architecture, Component: as defined further above, but with
+ the catch that they might be missing if they don't effect the target
+ (aka: They weren't used while evaluating the MetaKey template).
+
+Again, additional fields might be visible in certain implementations,
+but you should avoid using them and instead talk to us about a portable
+implementation.
+
+# Multiple application requiring the same files
+
+It is highly encouraged that applications talk to each other and to us
+about which files they require. It is usually best to have a common
+package ship the configuration needed to get the files, but specific
+needs might require specific solutions. Again: talk to us.
+
+# Acquiring files not mentioned in the Release file
+
+You can't. This is by design as these files couldn't be verified to not
+be modified in transit, corrupted by the download process or simple if
+they are present at all on the server, which would require apt to probe
+for them. APT did this in the past for legacy reasons, we do not intend
+to go back to these dark times.
+
+This is also why you can't request files from a different server. It
+would have the additional problem that this server might not even be
+accessible (e.g. proxy settings) or that local sources (file:/, cdrom:/)
+start requesting online files…
+
+In other words: We would be opening Pandora's box.
diff --git a/doc/apt-cache.8.xml b/doc/apt-cache.8.xml
index a9f6c8da2..a8f1b4586 100644
--- a/doc/apt-cache.8.xml
+++ b/doc/apt-cache.8.xml
@@ -122,8 +122,7 @@ Reverse Provides:
</listitem>
<listitem><para><literal>Total distinct</literal> versions is the number of package versions
- found in the cache; this value is therefore at least equal to the
- number of total package names. If more than one distribution is being accessed
+ found in the cache. If more than one distribution is being accessed
(for instance, "stable" and "unstable"), this value
can be considerably larger than the number of total package names.</para>
</listitem>
@@ -172,7 +171,7 @@ Reverse Provides:
If <option>--full</option> is given
then output identical to <literal>show</literal> is produced for each matched
package, and if <option>--names-only</option> is given then the long description
- is not searched, only the package name is.</para>
+ is not searched, only the package name and provided packages are.</para>
<para>
Separate arguments can be used to specify multiple search patterns that
are and'ed together.</para></listitem>
@@ -281,12 +280,23 @@ Reverse Provides:
<term><option>--no-breaks</option></term>
<term><option>--no-replaces</option></term>
<term><option>--no-enhances</option></term>
- <listitem><para>Per default the <literal>depends</literal> and
- <literal>rdepends</literal> print all dependencies. This can be tweaked with
+ <listitem><para>Per default the <command>depends</command> and
+ <command>rdepends</command> print all dependencies. This can be tweaked with
these flags which will omit the specified dependency type.
Configuration Item: <literal>APT::Cache::Show<replaceable>DependencyType</replaceable></literal>
e.g. <literal>APT::Cache::ShowRecommends</literal>.</para></listitem>
</varlistentry>
+
+ <varlistentry><term><option>--implicit</option></term>
+ <listitem><para>Per default <command>depends</command> and <command>rdepends</command>
+ print only dependencies explicitly expressed in the metadata. With this flag
+ it will also show dependencies implicitely added based on the encountered data.
+ A <literal>Conflicts: foo</literal> e.g. expresses implicitely that this package
+ also conflicts with the package foo from any other architecture.
+ Configuration Item: <literal>APT::Cache::ShowImplicit</literal>.
+ </para></listitem>
+ </varlistentry>
+
<varlistentry><term><option>-f</option></term><term><option>--full</option></term>
<listitem><para>Print full package records when searching.
Configuration Item: <literal>APT::Cache::ShowFull</literal>.</para></listitem>
@@ -308,7 +318,7 @@ Reverse Provides:
</varlistentry>
<varlistentry><term><option>--names-only</option></term><term><option>-n</option></term>
- <listitem><para>Only search on the package names, not the long descriptions.
+ <listitem><para>Only search on the package and provided package names, not the long descriptions.
Configuration Item: <literal>APT::Cache::NamesOnly</literal>.</para></listitem>
</varlistentry>
diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml
index a372a0d30..785b4e9a8 100644
--- a/doc/apt-get.8.xml
+++ b/doc/apt-get.8.xml
@@ -214,7 +214,7 @@
<filename>&cachedir;/archives/partial/</filename>.</para></listitem>
</varlistentry>
- <varlistentry><term><option>autoclean</option></term>
+ <varlistentry><term><option>autoclean</option> (and the <option>auto-clean</option> alias since 1.1)</term>
<listitem><para>Like <literal>clean</literal>, <literal>autoclean</literal> clears out the local
repository of retrieved package files. The difference is that it only
removes package files that can no longer be downloaded, and are largely
@@ -224,25 +224,36 @@
erased if it is set to off.</para></listitem>
</varlistentry>
- <varlistentry><term><option>autoremove</option></term>
+ <varlistentry><term><option>autoremove</option> (and the <option>auto-remove</option> alias since 1.1)</term>
<listitem><para><literal>autoremove</literal> is used to remove packages that were automatically
installed to satisfy dependencies for other packages and are now no longer needed.</para></listitem>
</varlistentry>
<varlistentry><term><option>changelog</option></term>
- <listitem><para><literal>changelog</literal> downloads a package changelog and displays
- it through <command>sensible-pager</command>. The server name and base
- directory is defined in the <literal>APT::Changelogs::Server</literal>
- variable (e.g. <ulink url="http://packages.debian.org/changelogs">packages.debian.org/changelogs</ulink> for
- Debian or <ulink url="http://changelogs.ubuntu.com/changelogs">changelogs.ubuntu.com/changelogs</ulink> for
- Ubuntu).
- By default it displays the changelog for the version that is
- installed. However, you can specify the same options as for
- the <option>install</option> command.
- </para>
+ <listitem><para><literal>changelog</literal> tries to download the
+ changelog of a package and displays it through
+ <command>sensible-pager</command>. By default it
+ displays the changelog for the version that is installed.
+ However, you can specify the same options as for the
+ <option>install</option> command.</para>
</listitem>
</varlistentry>
+ <varlistentry><term><option>indextargets</option></term>
+ <listitem><para>Displays by default a deb822 formatted listing of
+ information about all data files (aka index targets) <command>apt-get
+ update</command> would download. Supports a
+ <option>--format</option> option to modify the output format as
+ well as accepts lines of the default output to filter the records
+ by. The command is mainly used as an interface for external tools
+ working with APT to get information as well as filenames for
+ downloaded files so they can use them as well instead of
+ downloading them again on their own. Detailed documentation is
+ omitted here and can instead be found in the source tree in
+ <literal><filename>doc/acquire-additional-files.txt</filename></literal>.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
@@ -316,17 +327,15 @@
<term><option>--dry-run</option></term>
<term><option>--recon</option></term>
<term><option>--no-act</option></term>
- <listitem><para>No action; perform a simulation of events that would occur but do not
- actually change the system.
- Configuration Item: <literal>APT::Get::Simulate</literal>.</para>
-
- <para>Simulated runs performed as a user will automatically deactivate locking
- (<literal>Debug::NoLocking</literal>), and if the option
- <literal>APT::Get::Show-User-Simulation-Note</literal> is set
- (as it is by default) a notice will also be displayed indicating that
- this is only a simulation. Runs performed as root do not trigger either
- NoLocking or the notice - superusers should know what they are doing
- without further warnings from <literal>apt-get</literal>.</para>
+ <listitem><para>No action; perform a simulation of events that would occur
+ based on the current system state but do not actually change the
+ system. Locking will be disabled (<option>Debug::NoLocking</option>)
+ so the system state could change while <command>apt-get</command> is
+ running. Simulations can also be executed by non-root users which might
+ not have read access to all apt configuration distorting the simulation.
+ A notice expressing this warning is also shown by default for non-root
+ users (<option>APT::Get::Show-User-Simulation-Note</option>).
+ Configuration Item: <literal>APT::Get::Simulate</literal>.</para>
<para>Simulated runs print out a series of lines, each representing a <command>dpkg</command>
operation: configure (<literal>Conf</literal>), remove (<literal>Remv</literal>)
@@ -420,12 +429,36 @@
Configuration Item: <literal>APT::Get::Only-Upgrade</literal>.</para></listitem>
</varlistentry>
+ <varlistentry><term><option>--allow-downgrades</option></term>
+ <listitem><para>This is a dangerous option that will cause apt to continue
+ without prompting if it is doing downgrades. It
+ should not be used except in very special situations. Using
+ it can potentially destroy your system!
+ Configuration Item: <literal>APT::Get::allow-downgrades</literal>. Introduced in APT 1.1.</para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><option>--allow-remove-essential</option></term>
+ <listitem><para>Force yes; this is a dangerous option that will cause apt to continue
+ without prompting if it is removing essentials. It
+ should not be used except in very special situations. Using
+ it can potentially destroy your system!
+ Configuration Item: <literal>APT::Get::allow-remove-essential</literal>. Introduced in APT 1.1.</para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><option>--allow-change-held-packages</option></term>
+ <listitem><para>Force yes; this is a dangerous option that will cause apt to continue
+ without prompting if it is changing held packages. It
+ should not be used except in very special situations. Using
+ it can potentially destroy your system!
+ Configuration Item: <literal>APT::Get::allow-change-held-packages</literal>. Introduced in APT 1.1.</para></listitem>
+ </varlistentry>
+
<varlistentry><term><option>--force-yes</option></term>
<listitem><para>Force yes; this is a dangerous option that will cause apt to continue
without prompting if it is doing something potentially harmful. It
should not be used except in very special situations. Using
<literal>force-yes</literal> can potentially destroy your system!
- Configuration Item: <literal>APT::Get::force-yes</literal>.</para></listitem>
+ Configuration Item: <literal>APT::Get::force-yes</literal>. This is deprecated and replaced by <option>--allow-downgrades</option>, <option>--allow-remove-essential</option>, <option>--allow-change-held-packages</option> in 1.1. </para></listitem>
</varlistentry>
<varlistentry><term><option>--print-uris</option></term>
@@ -520,9 +553,13 @@
</varlistentry>
<varlistentry><term><option>--allow-unauthenticated</option></term>
- <listitem><para>Ignore if packages can't be authenticated and don't prompt about it.
- This is useful for tools like pbuilder.
- Configuration Item: <literal>APT::Get::AllowUnauthenticated</literal>.</para></listitem>
+ <listitem><para>Ignore if packages can't be authenticated and don't prompt
+ about it. This can be useful while working with local repositories,
+ but is a huge security risk if data authenticity isn't ensured in
+ another way by the user itself. The usage of the
+ <option>Trusted</option> option for &sources-list; entries should
+ usually be preferred over this global override. Configuration Item:
+ <literal>APT::Get::AllowUnauthenticated</literal>.</para></listitem>
</varlistentry>
<varlistentry><term><option>--no-allow-insecure-repositories</option></term>
diff --git a/doc/apt.8.xml b/doc/apt.8.xml
index 29bf96751..18b97f547 100644
--- a/doc/apt.8.xml
+++ b/doc/apt.8.xml
@@ -44,7 +44,8 @@
display a list of packages. It supports shell pattern for matching
package names and the following options:
<option>--installed</option>,
- <option>--upgradable</option>,
+ <option>--upgradable</option>,
+ <option>--upgradeable</option>,
<option>--all-versions</option>
are supported.
</para></listitem>
@@ -85,6 +86,11 @@
installed instead of removed.</para></listitem>
</varlistentry>
+ <varlistentry><term><option>autoremove</option> (and the <option>auto-remove</option> alias since 1.1)</term>
+ <listitem><para><literal>autoremove</literal> is used to remove packages that were automatically
+ installed to satisfy dependencies for other packages and are now no longer needed.</para></listitem>
+ </varlistentry>
+
<varlistentry><term><option>edit-sources</option></term>
<listitem><para><literal>edit-sources</literal> lets you edit
your sources.list file and provides basic sanity checks.
diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml
index efe986ea8..d5e185757 100644
--- a/doc/apt.conf.5.xml
+++ b/doc/apt.conf.5.xml
@@ -301,6 +301,8 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
<literal>Valid-Until</literal> header, but if they don't or a
stricter value is desired the <literal>Max-ValidTime</literal>
option below can be used.
+ The <option>Check-Valid-Until</option> option of &sources-list; entries should be
+ preferred to disable the check selectively instead of using this global override.
</para></listitem>
</varlistentry>
@@ -312,7 +314,8 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
the earlier date of the two is used as the expiration date.
The default value is <literal>0</literal> which stands for "valid forever".
Archive specific settings can be made by appending the label of the archive
- to the option name.
+ to the option name. Preferably, the same can be achieved for specific
+ &sources-list; entries by using the <option>Valid-Until-Max</option> option there.
</para></listitem>
</varlistentry>
@@ -324,7 +327,8 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
frequently updated archive with a <literal>Valid-Until</literal> header
instead of completely disabling the expiration date checking.
Archive specific settings can and should be used by appending the label of
- the archive to the option name.
+ the archive to the option name. Preferably, the same can be achieved for specific
+ &sources-list; entries by using the <option>Valid-Until-Min</option> option there.
</para></listitem>
</varlistentry>
@@ -618,6 +622,33 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
</para></listitem>
</varlistentry>
+ <varlistentry><term><option>Changelogs::URI</option> scope</term>
+ <listitem><para>
+ Acquiring changelogs can only be done if an URI is known from where to get them.
+ Preferable the Release file indicates this in a 'Changelogs' field. If this isn't
+ available the Label/Origin field of the Release file is used to check if a
+ <literal>Acquire::Changelogs::URI::Label::<replaceable>LABEL</replaceable></literal> or
+ <literal>Acquire::Changelogs::URI::Origin::<replaceable>ORIGIN</replaceable></literal> option
+ exists and if so this value is taken. The value in the Release file can be overridden
+ with <literal>Acquire::Changelogs::URI::Override::Label::<replaceable>LABEL</replaceable></literal>
+ or <literal>Acquire::Changelogs::URI::Override::Origin::<replaceable>ORIGIN</replaceable></literal>.
+
+ The value should be a normal URI to a text file, expect that package specific data is
+ replaced with the placeholder <literal>CHANGEPATH</literal>. The
+ value for it is: 1. if the package is from a component (e.g. <literal>main</literal>)
+ this is the first part otherwise it is omitted, 2. the first letter of source package name,
+ expect if the source package name starts with '<literal>lib</literal>' in which case it will
+ be the first four letters. 3. The complete source package name. 4. the complete name again and
+ 5. the source version.
+ The first (if present), second, third and fourth part are separated by a slash ('<literal>/</literal>')
+ and between the fourth and fifth part is an underscore ('<literal>_</literal>').
+
+ The special value '<literal>no</literal>' is available for this option indicating that
+ this source can't be used to acquire changelog files from. Another source will be tried
+ if available in this case.
+ </para></listitem>
+ </varlistentry>
+
</variablelist>
</refsect1>
@@ -659,7 +690,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
<para>
The configuration item <literal>RootDir</literal> has a special
- meaning. If set, all paths in <literal>Dir::</literal> will be
+ meaning. If set, all paths will be
relative to <literal>RootDir</literal>, <emphasis>even paths that
are specified absolutely</emphasis>. So, for instance, if
<literal>RootDir</literal> is set to
@@ -668,6 +699,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
<filename>/var/lib/dpkg/status</filename>, then the status file
will be looked up in
<filename>/tmp/staging/var/lib/dpkg/status</filename>.
+ If you want to prefix only relative paths, set <literal>Dir</literal> instead.
</para>
<para>
@@ -743,10 +775,34 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
install to the commands, one per line on the requested file descriptor, defaulting
to standard input.</para>
- <para>Version 2 of this protocol dumps more information, including the
- protocol version, the APT configuration space and the packages, files
- and versions being changed. Version 3 adds the architecture and <literal>MultiArch</literal>
- flag to each version being dumped.</para>
+ <para>Version 2 of this protocol sends more information through the requested
+ file descriptor: a line with the text <literal>VERSION 2</literal>,
+ the APT configuration space, and a list of package actions with filename
+ and version information.</para>
+
+ <para>Each configuration directive line has the form
+ <literal>key=value</literal>. Special characters (equal signs, newlines,
+ nonprintable characters, quotation marks, and percent signs in
+ <literal>key</literal> and newlines, nonprintable characters, and percent
+ signs in <literal>value</literal>) are %-encoded. Lists are represented
+ by multiple <literal>key::=value</literal> lines with the same key. The
+ configuration section ends with a blank line.</para>
+
+ <para>Package action lines consist of five fields in Version 2: old version, direction
+ of version change (&lt; for upgrades, &gt; for downgrades, = for no
+ change), new version, action. The version fields are "-" for no version
+ at all (for example when installing a package for the first time; no
+ version is treated as earlier than any real version, so that is an
+ upgrade, indicated as <literal>- &lt; 1.23.4</literal>). The action field
+ is "**CONFIGURE**" if the package is being configured, "**REMOVE**" if it
+ is being removed, or the filename of a .deb file if it is being
+ unpacked.</para>
+
+ <para>In Version 3 after each version field follows the architecture
+ of this version, which is "-" if there is no version, and a field showing
+ the MultiArch type "same", foreign", "allowed" or "none". Note that "none"
+ is an incorrect typename which is just kept to remain compatible, it
+ should be read as "no" and users are encouraged to support both.</para>
<para>The version of the protocol to be used for the command
<literal><replaceable>cmd</replaceable></literal> can be chosen by setting
diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml
index 16e6a7aa0..79132e007 100644
--- a/doc/apt_preferences.5.xml
+++ b/doc/apt_preferences.5.xml
@@ -115,14 +115,17 @@ from archives which in their <filename>Release</filename> files are marked as "N
<varlistentry>
<term>priority 500</term>
-<listitem><simpara>to the versions that are not installed and do not belong to the target release.</simpara></listitem>
+<listitem><simpara>to the versions that do not belong to the target release.</simpara></listitem>
</varlistentry>
<varlistentry>
<term>priority 990</term>
-<listitem><simpara>to the versions that are not installed and belong to the target release.</simpara></listitem>
+<listitem><simpara>to the versions that belong to the target release.</simpara></listitem>
</varlistentry>
</variablelist>
+
+The highest of those priorities whose description matches the version is assigned to the
+version.
</para>
<para>If the target release has not been specified then APT simply assigns
@@ -251,6 +254,11 @@ Pin-Priority: 500
</programlisting>
</listitem>
</itemizedlist>
+
+The effect of the comma operator is similar to an "and" in logic: All
+conditions must be satisfied for the pin to match. There is one exception:
+For any type of condition (such as two "a" conditions), only the last such
+condition is checked.
</para>
</refsect2>
@@ -267,7 +275,7 @@ expression surrounded by slashes).
<programlisting>
Package: gnome* /kde/
-Pin: release n=experimental
+Pin: release a=experimental
Pin-Priority: 500
</programlisting>
@@ -339,14 +347,21 @@ only if there is no installed version of the package</simpara></listitem>
<term>P &lt; 0</term>
<listitem><simpara>prevents the version from being installed</simpara></listitem>
</varlistentry>
+<varlistentry>
+<term>P = 0</term>
+<listitem><simpara>has undefined behaviour, do not use it.</simpara></listitem>
+</varlistentry>
</variablelist>
</para>
-<para>If any specific-form records match an available package version then the
-first such record determines the priority of the package version.
-Failing that,
-if any general-form records match an available package version then the
-first such record determines the priority of the package version.</para>
+<para>
+The first specific-form record matching an available package version determines
+the priority of the package version.
+Failing that, the priority of the package is defined as the maximum of all
+priorities defined by generic-form records matching the version.
+Records defined using patterns in the Pin field other than "*" are treated like
+specific-form records.
+</para>
<para>For example, suppose the APT preferences file contains the three
records presented earlier:</para>
diff --git a/doc/dpkg-tech.dbk b/doc/dpkg-tech.dbk
index 2584cf640..f95716cf4 100644
--- a/doc/dpkg-tech.dbk
+++ b/doc/dpkg-tech.dbk
@@ -404,15 +404,7 @@ As yet unwritten. You can refer to the other manuals for now. See
<itemizedlist>
<listitem>
<para>
-DPKG_NO_TSTP - if set to a non-null value, this variable causes dpkg to run a
-child shell process instead of sending itself a SIGTSTP, when the user selects
-to background the dpkg process when it asks about conffiles.
-</para>
-</listitem>
-<listitem>
-<para>
-SHELL - used to determine which shell to run in the case when DPKG_NO_TSTP
-is set.
+SHELL - used to determine which shell to run.
</para>
</listitem>
<listitem>
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index ef1ae056d..1339335fa 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -117,14 +117,6 @@ APT
// does a ExecFork)
Keep-Fds {};
- Changelogs
- {
- // server the provides the changelogs, the code will assume
- // the changlogs are in the pool/ under a srcpkg_ver directory
- // with the name "changelog"
- Server "http://packages.debian.org/changelogs";
- }:
-
// control parameters for cron jobs by /etc/cron.daily/apt
Periodic
{
@@ -305,6 +297,9 @@ Acquire
"none";
"fr";
};
+
+ // Location of the changelogs with the placeholder CHANGEPATH (e.g. "main/a/apt/apt_1.1")
+ Changelogs::URI::Origin::Debian "http://metadata.ftp-master.debian.org/changelogs/CHANGEPATH_changelog";
};
// Directory layout
diff --git a/doc/files.dbk b/doc/files.dbk
index f513e0008..714255a53 100644
--- a/doc/files.dbk
+++ b/doc/files.dbk
@@ -198,11 +198,11 @@ installation
<section id="s2.4"><title>Binary Package Cache (srcpkgcache.bin and pkgcache.bin)</title>
<para>
Please see cache.sgml for a complete description of what this file
-is. The cache file is updated whenever the contents of the lists
-directory changes. If the cache is erased, corrupted or of a non-matching
+is. The cache file is updated whenever the Packages or Release files of the lists
+directory or the dpkg status file changes. If the cache is erased, corrupted or of a non-matching
version it will be automatically rebuilt by all of the tools that need
it. <emphasis>srcpkgcache.bin</emphasis> contains a cache of all of the
-package files in the source list. This allows regeneration of the cache
+package, release files in the source list. In comparison to <emphasis>pkgcache.bin</emphasis>, it does not include the /var/lib/dpkg/status file. This allows regeneration of the cache
when the status files change to use a prebuilt version for greater speed.
</para>
</section>
diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot
index 98c2b66b5..35db9571d 100644
--- a/doc/po/apt-doc.pot
+++ b/doc/po/apt-doc.pot
@@ -531,7 +531,8 @@ msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
"<option>--installed</option>, <option>--upgradable</option>, "
-"<option>--all-versions</option> are supported."
+"<option>--upgradeable</option>, <option>--all-versions</option> are "
+"supported."
msgstr ""
#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
@@ -4241,7 +4242,7 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
diff --git a/doc/po/de.po b/doc/po/de.po
index 4eb458d17..4f001b85e 100644
--- a/doc/po/de.po
+++ b/doc/po/de.po
@@ -662,13 +662,13 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
"<literal>list</literal> wird benutzt, um eine Paketliste anzuzeigen. Es "
"unterstützt Shell-Muster zur Beschränkung auf passende Paketnamen. Die "
"folgenden Optionen werden unterstützt: <option>--installed</option>, "
-"<option>--upgradable</option>, <option>--all-versions</option>."
+"<option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-versions</option>."
#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
#: apt.8.xml:54
@@ -6071,11 +6071,11 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
#. type: Content of: <refentry><refsect1><refsect2><para>
diff --git a/doc/po/es.po b/doc/po/es.po
index 590ae4aeb..84dd3a127 100644
--- a/doc/po/es.po
+++ b/doc/po/es.po
@@ -36,7 +36,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt 0.9.7.1\n"
+"Project-Id-Version: apt-doc 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2014-11-06 09:45+0100\n"
"PO-Revision-Date: 2014-07-04 01:31+0200\n"
@@ -742,7 +742,7 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
@@ -6126,11 +6126,11 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
#. type: Content of: <refentry><refsect1><refsect2><para>
diff --git a/doc/po/fr.po b/doc/po/fr.po
index 85869a2b7..d1e60a655 100644
--- a/doc/po/fr.po
+++ b/doc/po/fr.po
@@ -9,7 +9,7 @@
# Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>, 2014.
msgid ""
msgstr ""
-"Project-Id-Version: \n"
+"Project-Id-Version: apt-doc 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2014-11-15 17:26+0100\n"
@@ -658,7 +658,7 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
"La commande <literal>list</literal> est utilisée pour afficher une liste de "
@@ -6045,11 +6045,11 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
#. type: Content of: <refentry><refsect1><refsect2><para>
diff --git a/doc/po/it.po b/doc/po/it.po
index 28e97f14b..af5fa2914 100644
--- a/doc/po/it.po
+++ b/doc/po/it.po
@@ -8,7 +8,7 @@
# Beatrice Torracca <beatricet@libero.it>, 2012, 2014, 2015.
msgid ""
msgstr ""
-"Project-Id-Version: \n"
+"Project-Id-Version: apt-doc 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-10 09:48+0100\n"
"PO-Revision-Date: 2015-01-27 14:11+0200\n"
@@ -710,13 +710,13 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
"<literal>list</literal> viene usato per visualizzare un elenco di pacchetti. "
"Permette l'uso dei modelli di shell per la corrispondenza con nomi di "
"pacchetto e sono gestite le seguenti opzioni: <option>--installed</option>, "
-"<option>--upgradable</option>, <option>--all-versions</option>."
+"<option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-versions</option>."
#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
#: apt.8.xml:54
@@ -6072,11 +6072,11 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
#. type: Content of: <refentry><refsect1><refsect2><para>
diff --git a/doc/po/ja.po b/doc/po/ja.po
index 3e0712125..a74d2af3a 100644
--- a/doc/po/ja.po
+++ b/doc/po/ja.po
@@ -6,7 +6,7 @@
# KURASAWA Nozomu, 2003-2006, 2009-2012.
msgid ""
msgstr ""
-"Project-Id-Version: apt 1.0.6\n"
+"Project-Id-Version: apt-doc 1.0.6\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2014-11-06 09:45+0100\n"
"PO-Revision-Date: 2014-07-10 19:52+0900\n"
@@ -704,12 +704,12 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
"パッケージ一覧を表示するには <literal>list</literal> を使います。パッケージ名"
"のマッチングにシェルパターン、そしてオプション <option>--installed</"
-"option>、 <option>--upgradable</option>、 <option>--all-versions</option> を"
+"option>、 <option>--upgradable</option>, <option>--upgradeable</option>、 <option>--all-versions</option> を"
"サポートしています。"
#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
@@ -5812,11 +5812,11 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
#. type: Content of: <refentry><refsect1><refsect2><para>
diff --git a/doc/po/pl.po b/doc/po/pl.po
index 481d85af6..229ac02c1 100644
--- a/doc/po/pl.po
+++ b/doc/po/pl.po
@@ -9,7 +9,7 @@
# Robert Luberda <robert@debian.org> 2000-2004, 2010, 2012.
msgid ""
msgstr ""
-"Project-Id-Version: apt 0.9.7.3\n"
+"Project-Id-Version: apt-doc 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2014-11-06 09:45+0100\n"
"PO-Revision-Date: 2014-07-04 02:13+0200\n"
@@ -700,7 +700,7 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
@@ -5509,11 +5509,11 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
#. type: Content of: <refentry><refsect1><refsect2><para>
diff --git a/doc/po/pt.po b/doc/po/pt.po
index 3aefcc2a9..35efdfe30 100644
--- a/doc/po/pt.po
+++ b/doc/po/pt.po
@@ -5,7 +5,7 @@
# Américo Monteiro <a_monteiro@gmx.com>, 2009 - 2014.
msgid ""
msgstr ""
-"Project-Id-Version: apt 1.0.7\n"
+"Project-Id-Version: apt-doc 1.0.7\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2014-11-06 09:45+0100\n"
"PO-Revision-Date: 2014-08-29 00:34+0100\n"
@@ -707,7 +707,7 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
"<literal>list</literal> é usado para mostrar uma lista de pacotes. Suporta "
@@ -6007,11 +6007,11 @@ msgstr ""
#, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
#. type: Content of: <refentry><refsect1><refsect2><para>
diff --git a/doc/po/pt_BR.po b/doc/po/pt_BR.po
index 88b479e75..9a9f8ec56 100644
--- a/doc/po/pt_BR.po
+++ b/doc/po/pt_BR.po
@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt-doc 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2014-11-06 09:45+0100\n"
"PO-Revision-Date: 2004-09-20 17:02+0000\n"
@@ -523,7 +523,7 @@ msgstr ""
msgid ""
"<literal>list</literal> is used to display a list of packages. It supports "
"shell pattern for matching package names and the following options: "
-"<option>--installed</option>, <option>--upgradable</option>, <option>--all-"
+"<option>--installed</option>, <option>--upgradable</option>, <option>--upgradeable</option>, <option>--all-"
"versions</option> are supported."
msgstr ""
@@ -4393,7 +4393,7 @@ msgstr ""
#, fuzzy, no-wrap
msgid ""
"Package: gnome* /kde/\n"
-"Pin: release n=experimental\n"
+"Pin: release a=experimental\n"
"Pin-Priority: 500\n"
msgstr ""
"<programlisting>\n"
diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml
index da4f571b5..e27eddb0e 100644
--- a/doc/sources.list.5.xml
+++ b/doc/sources.list.5.xml
@@ -31,37 +31,99 @@
<refsect1><title>Description</title>
<para>
- The source list <filename>/etc/apt/sources.list</filename> is designed to support
- any number of active sources and a variety of source media. The file lists one
- source per line, with the most preferred source listed first. The information available
- from the configured sources is acquired by <command>apt-get update</command>
- (or by an equivalent command from another APT front-end).
- </para>
- <para>
- Each line specifying a source starts with type (e.g. <literal>deb-src</literal>)
- followed by options and arguments for this type.
- Individual entries cannot be continued onto a following line. Empty lines
- are ignored, and a <literal>#</literal> character anywhere on a line marks
- the remainder of that line as a comment.
+ The source list <filename>/etc/apt/sources.list</filename> and the the
+ files contained in <filename>/etc/apt/sources.list.d/</filename> are
+ designed to support any number of active sources and a variety of source
+ media. The files list one source per line (one line style) or contain multiline
+ stanzas defining one or more sources per stanza (deb822 style), with the
+ most preferred source listed first (in case a single version is available from more than one source). The information available from the
+ configured sources is acquired by <command>apt-get update</command> (or
+ by an equivalent command from another APT front-end).
</para>
</refsect1>
<refsect1><title>sources.list.d</title>
- <para>The <filename>/etc/apt/sources.list.d</filename> directory provides
- a way to add sources.list entries in separate files.
- The format is the same as for the regular <filename>sources.list</filename> file.
- File names need to end with
- <filename>.list</filename> and may only contain letters (a-z and A-Z),
- digits (0-9), underscore (_), hyphen (-) and period (.) characters.
- Otherwise APT will print a notice that it has ignored a file, unless that
- file matches a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
- configuration list - in which case it will be silently ignored.</para>
+ <para>The <filename>/etc/apt/sources.list.d</filename> directory provides
+ a way to add sources.list entries in separate files.
+ Two different file formats are allowed as described in the next two sections.
+ Filenames need to have either the extension <filename>.list</filename> or
+ <filename>.sources</filename> depending on the contained format.
+ The filenames may only contain letters (a-z and A-Z),
+ digits (0-9), underscore (_), hyphen (-) and period (.) characters.
+ Otherwise APT will print a notice that it has ignored a file, unless that
+ file matches a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
+ configuration list - in which case it will be silently ignored.</para>
+ </refsect1>
+
+ <refsect1><title>one line style format</title>
+ <para>
+ Files in this format have the extension <filename>.list</filename>.
+ Each line specifying a source starts with a type (e.g. <literal>deb-src</literal>)
+ followed by options and arguments for this type.
+
+ Individual entries cannot be continued onto a following line. Empty lines
+ are ignored, and a <literal>#</literal> character anywhere on a line marks
+ the remainder of that line as a comment. Consequently an entry can be
+ disabled by commenting out the entire line.
+
+ If options should be provided they are separated by spaces and all of
+ them together are enclosed by square brackets (<literal>[]</literal>)
+ included in the line after the type separated from it with a space.
+ If an option allows multiple values these are separated from each other
+ with a comma (<literal>,</literal>). An option name is separated from its
+ value(s) by a equal sign (<literal>=</literal>). Multivalue options have
+ also <literal>-=</literal> and <literal>+=</literal> as separator which
+ instead of replacing the default with the given value(s) modify the default
+ value(s) to remove or include the given values.
+ </para><para>
+ This is the traditional format and supported by all apt versions.
+ Note that not all options as described below are supported by all apt versions.
+ Note also that some older applications parsing this format on its own might not
+ expect to encounter options as they were uncommon before the introduction of
+ multi-architecture support.
+ </para>
+ </refsect1>
+
+ <refsect1><title>deb822 style format</title>
+ <para>
+ Files in this format have the extension <filename>.sources</filename>.
+ The format is similar in syntax to other files used by Debian and its
+ derivatives, like the metadata itself apt will download from the configured
+ sources or the <filename>debian/control</filename> file in a Debian source package.
+
+ Individual entries are separated by an empty line, additional empty
+ lines are ignored, and a <literal>#</literal> character at the start of
+ the line marks the entire line as a comment. An entry can hence be
+ disabled by commenting out each line belonging to the stanza, but it is
+ usually easier to add the field "Enabled: no" to the stanza to disable
+ the entry. Removing the field or setting it to yes reenables it.
+
+ Options have the same syntax as every other field: A fieldname separated by
+ a colon (<literal>:</literal>) and optionally spaces from its value(s).
+ Note especially that multiple values are separated by spaces, not by
+ commas as in the one line format. Multivalue fields like <literal>Architectures</literal>
+ also have <literal>Architectures-Add</literal> and <literal>Architectures-Remove</literal>
+ to modify the default value rather than replacing it.
+ </para><para>
+ This is a new format supported by apt itself since version 1.1. Previous
+ versions ignore such files with a notice message as described earlier.
+ It is intended to make this format gradually the default format and
+ deprecating the previously described one line style format as it is
+ easier to create, extend and modify by humans and machines alike
+ especially if a lot of sources and/or options are involved.
+
+ Developers who are working with and/or parsing apt sources are highly
+ encouraged to add support for this format and to contact the APT team
+ to coordinate and share this work. Users can freely adopt this format
+ already, but could encounter problems with software not supporting
+ the format yet.
+ </para>
</refsect1>
- <refsect1><title>The deb and deb-src types</title>
+ <refsect1><title>The deb and deb-src types: General Format</title>
<para>The <literal>deb</literal> type references a typical two-level Debian
archive, <filename>distribution/component</filename>. The
- <literal>distribution</literal> is generally an archive name like
+ <literal>distribution</literal> is generally a suite name like
<literal>stable</literal> or <literal>testing</literal> or a codename like
<literal>&stable-codename;</literal> or <literal>&testing-codename;</literal>
while component is one of <literal>main</literal>, <literal>contrib</literal> or
@@ -70,42 +132,33 @@
code in the same form as the <literal>deb</literal> type.
A <literal>deb-src</literal> line is required to fetch source indexes.</para>
- <para>The format for a <filename>sources.list</filename> entry using the
+ <para>The format for two one line style entries using the
<literal>deb</literal> and <literal>deb-src</literal> types is:</para>
- <literallayout>deb [ options ] uri suite [component1] [component2] [...]</literallayout>
+ <literallayout>deb [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]
+deb-src [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]</literallayout>
- <para>Alternatively a rfc822 style format is also supported:
+ <para>Alternatively the equivalent entry in deb822 style looks like this:
<literallayout>
Types: deb deb-src
- URIs: http://example.com
- Suites: stable testing
- Sections: component1 component2
- Description: short
- long long long
- [option1]: [option1-value]
-
- Types: deb
- URIs: http://another.example.com
- Suites: experimental
- Sections: component1 component2
- Enabled: no
- Description: short
- long long long
- [option1]: [option1-value]
+ URIs: uri
+ Suites: suite
+ Components: [component1] [component2] [...]
+ option1: value1
+ option2: value2
</literallayout>
</para>
<para>The URI for the <literal>deb</literal> type must specify the base of the
- Debian distribution, from which APT will find the information it needs.
- <literal>suite</literal> can specify an exact path, in which case the
+ Debian distribution, from which APT will find the information it needs.
+ <literal>suite</literal> can specify an exact path, in which case the
components must be omitted and <literal>suite</literal> must end with
a slash (<literal>/</literal>). This is useful for the case when only a
- particular sub-section of the archive denoted by the URI is of interest.
+ particular sub-directory of the archive denoted by the URI is of interest.
If <literal>suite</literal> does not specify an exact path, at least
one <literal>component</literal> must be present.</para>
- <para><literal>suite</literal> may also contain a variable,
+ <para><literal>suite</literal> may also contain a variable,
<literal>$(ARCH)</literal>
which expands to the Debian architecture (such as <literal>amd64</literal> or
<literal>armel</literal>) used on the system. This permits architecture-independent
@@ -113,51 +166,123 @@
of interest when specifying an exact path, <literal>APT</literal> will
automatically generate a URI with the current architecture otherwise.</para>
- <para>In the traditional style sources.list format since only one
- distribution can be specified per line it may be necessary to have
- multiple lines for the same URI, if a subset of all available
- distributions or components at that location is desired. APT will
- sort the URI list after it has generated a complete set internally,
- and will collapse multiple references to the same Internet host,
- for instance, into a single connection, so that it does not
- inefficiently establish an FTP connection, close it, do something
- else, and then re-establish a connection to that same host. This
- feature is useful for accessing busy FTP sites with limits on the
- number of simultaneous anonymous users. APT also parallelizes
- connections to different hosts to more effectively deal with sites
- with low bandwidth.</para>
-
- <para><literal>options</literal> is always optional and needs to be surrounded by
- square brackets. It can consist of multiple settings in the form
- <literal><replaceable>setting</replaceable>=<replaceable>value</replaceable></literal>.
- Multiple settings are separated by spaces. The following settings are supported by APT
- (note however that unsupported settings will be ignored silently):
- <itemizedlist>
- <listitem><para><literal>arch=<replaceable>arch1</replaceable>,<replaceable>arch2</replaceable>,…</literal>
- can be used to specify for which architectures information should
- be downloaded. If this option is not set all architectures defined by the
- <literal>APT::Architectures</literal> option will be downloaded.</para></listitem>
- <listitem><para><literal>arch+=<replaceable>arch1</replaceable>,<replaceable>arch2</replaceable>,…</literal>
- and <literal>arch-=<replaceable>arch1</replaceable>,<replaceable>arch2</replaceable>,…</literal>
- which can be used to add/remove architectures from the set which will be downloaded.</para></listitem>
- <listitem><para><literal>trusted=yes</literal> can be set to indicate that packages
- from this source are always authenticated even if the <filename>Release</filename> file
- is not signed or the signature can't be checked. This disables parts of &apt-secure;
- and should therefore only be used in a local and trusted context. <literal>trusted=no</literal>
- is the opposite which handles even correctly authenticated sources as not authenticated.</para></listitem>
- </itemizedlist></para>
+ <para>Especially in the one line style format since only one distribution
+ can be specified per line it may be necessary to have multiple lines for
+ the same URI, if a subset of all available distributions or components at
+ that location is desired. APT will sort the URI list after it has
+ generated a complete set internally, and will collapse multiple
+ references to the same Internet host, for instance, into a single
+ connection, so that it does not inefficiently establish a
+ connection, close it, do something else, and then re-establish a
+ connection to that same host. APT also parallelizes connections to
+ different hosts to more effectively deal with sites with low
+ bandwidth.</para>
<para>It is important to list sources in order of preference, with the most
preferred source listed first. Typically this will result in sorting
by speed from fastest to slowest (CD-ROM followed by hosts on a local
network, followed by distant Internet hosts, for example).</para>
- <para>Some examples:</para>
- <literallayout>
-deb http://ftp.debian.org/debian &stable-codename; main contrib non-free
-deb http://security.debian.org/ &stable-codename;/updates main contrib non-free
- </literallayout>
+ <para>As an example, the sources for your distribution could look like this
+ in one line style format:
+ <literallayout>&sourceslist-list-format;</literallayout> or like this in
+ deb822 style format:
+ <literallayout>&sourceslist-sources-format;</literallayout></para>
+ </refsect1>
+
+ <refsect1><title>The deb and deb-src types: Options</title>
+ <para>Each source entry can have options specified modifying which and how
+ the source is accessed and data acquired from it. Format, syntax and names
+ of the options varies between the two formats one line and deb822 style
+ as described, but they have both the same options available. For simplicity
+ we list the deb822 fieldname and provide the one line name in brackets.
+ Remember that beside setting multivalue options explicitly, there is also
+ the option to modify them based on the default, but we aren't listing those
+ names explicitly here. Unsupported options are silently ignored by all
+ APT versions.
+
+ <itemizedlist>
+ <listitem><para><option>Architectures</option>
+ (<option>arch</option>) is a multivalue option defining for
+ which architectures information should be downloaded. If this
+ option isn't set the default is all architectures as defined by
+ the <option>APT::Architectures</option> config option.
+ </para></listitem>
+ <listitem><para><option>Languages</option>
+ (<option>lang</option>) is a multivalue option defining for
+ which languages information like translated package
+ descriptions should be downloaded. If this option isn't set
+ the default is all languages as defined by the
+ <option>Acquire::Languages</option> config option.
+ </para></listitem>
+
+ <listitem><para><option>Targets</option>
+ (<option>target</option>) is a multivalue option defining
+ which download targets apt will try to acquire from this
+ source. If not specified, the default set is defined by the
+ <option>Acquire::IndexTargets</option> configuration scope.
+ </para></listitem>
+ </itemizedlist>
+
+ Further more, there are options which if set effect
+ <emphasis>all</emphasis> sources with the same URI and Suite, so they
+ have to be set on all such entries and can not be varied between
+ different components. APT will try to detect and error out on such
+ anomalies.
+
+ <itemizedlist>
+ <listitem><para><option>Signed-By</option> (<option>signed-by</option>)
+ is either an absolute path to a keyring file (has to be
+ accessible and readable for the <literal>_apt</literal> user,
+ so ensure everyone has read-permissions on the file) or a
+ fingerprint of a key in either the
+ <filename>trusted.gpg</filename> keyring or in one of the
+ keyrings in the <filename>trusted.gpg.d/</filename> directory
+ (see <command>apt-key fingerprint</command>). If the option is
+ set only the key(s) in this keyring or only the key with this
+ fingerprint is used for the &apt-secure; verification of this
+ repository. Otherwise all keys in the trusted keyrings are
+ considered valid signers for this repository.
+ </para></listitem>
+
+ <listitem><para><option>Check-Valid-Until</option> (<option>check-valid-until</option>)
+ is a yes/no value which controls if APT should try to detect
+ replay attacks. A repository creator can declare until then the
+ data provided in the repository should be considered valid and
+ if this time is reached, but no new data is provided the data
+ is considered expired and an error is raised. Beside
+ increasing security as a malicious attacker can't sent old data
+ forever denying a user to be able to upgrade to a new version,
+ this also helps users identify mirrors which are no longer
+ updated. Some repositories like historic archives aren't
+ updated anymore by design through, so this check can be
+ disabled by setting this option to <literal>no</literal>.
+ Defaults to the value of configuration option
+ <option>Acquire::Check-Valid-Until</option> which itself
+ defaults to <literal>yes</literal>.
+ </para></listitem>
+
+ <listitem><para><option>Valid-Until-Min</option>
+ (<option>check-valid-min</option>) and
+ <option>Valid-Until-Max</option>
+ (<option>valid-until-max</option>) can be used to raise or
+ lower the time period in seconds in which the data from this
+ repository is considered valid. -Max can be especially useful
+ if the repository provides no Valid-Until field on its Release
+ file to set your own value, while -Min can be used to increase
+ the valid time on seldomly updated (local) mirrors of a more
+ frequently updated but less accessible archive (which is in the
+ sources.list as well) instead of disabling the check entirely.
+ Default to the value of the configuration options
+ <option>Acquire::Min-ValidTime</option> and
+ <option>Acquire::Max-ValidTime</option> which are both unset by
+ default.
+ </para></listitem>
+
+ </itemizedlist>
+
+ </para>
</refsect1>
<refsect1><title>URI specification</title>
@@ -231,34 +356,70 @@ deb http://security.debian.org/ &stable-codename;/updates main contrib non-free
</refsect1>
<refsect1><title>Examples</title>
- <para>Uses the archive stored locally (or NFS mounted) at /home/jason/debian
+ <para>Uses the archive stored locally (or NFS mounted) at /home/apt/debian
for stable/main, stable/contrib, and stable/non-free.</para>
- <literallayout>deb file:/home/jason/debian stable main contrib non-free</literallayout>
+ <literallayout>deb file:/home/apt/debian stable main contrib non-free</literallayout>
+ <literallayout>Types: deb
+URIs: file:/home/apt/debian
+Suites: stable
+Components: main contrib non-free</literallayout>
<para>As above, except this uses the unstable (development) distribution.</para>
- <literallayout>deb file:/home/jason/debian unstable main contrib non-free</literallayout>
+ <literallayout>deb file:/home/apt/debian unstable main contrib non-free</literallayout>
+ <literallayout>Types: deb
+URIs: file:/home/apt/debian
+Suites: unstable
+Components: main contrib non-free</literallayout>
<para>Source line for the above</para>
- <literallayout>deb-src file:/home/jason/debian unstable main contrib non-free</literallayout>
+ <literallayout>deb-src file:/home/apt/debian unstable main contrib non-free</literallayout>
+ <literallayout>Types: deb-src
+URIs: file:/home/apt/debian
+Suites: unstable
+Components: main contrib non-free</literallayout>
+
<para>The first line gets package information for the architectures in <literal>APT::Architectures</literal>
while the second always retrieves <literal>amd64</literal> and <literal>armel</literal>.</para>
- <literallayout>deb http://ftp.debian.org/debian &stable-codename; main
-deb [ arch=amd64,armel ] http://ftp.debian.org/debian &stable-codename; main</literallayout>
+ <literallayout>deb http://httpredir.debian.org/debian &stable-codename; main
+deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &stable-codename; main</literallayout>
+ <literallayout>Types: deb
+URIs: http://httpredir.debian.org/debian
+Suites: &stable-codename;
+Components: main
+
+Types: deb
+URIs: http://httpredir.debian.org/debian
+Suites: &stable-codename;
+Components: main
+Architectures: amd64 armel
+</literallayout>
<para>Uses HTTP to access the archive at archive.debian.org, and uses only
the hamm/main area.</para>
<literallayout>deb http://archive.debian.org/debian-archive hamm main</literallayout>
+ <literallayout>Types: deb
+URIs: http://archive.debian.org/debian-archive
+Suites: hamm
+Components: main</literallayout>
<para>Uses FTP to access the archive at ftp.debian.org, under the debian
directory, and uses only the &stable-codename;/contrib area.</para>
<literallayout>deb ftp://ftp.debian.org/debian &stable-codename; contrib</literallayout>
+ <literallayout>Types: deb
+URIs: ftp://ftp.debian.org/debian
+Suites: &stable-codename;
+Components: contrib</literallayout>
<para>Uses FTP to access the archive at ftp.debian.org, under the debian
directory, and uses only the unstable/contrib area. If this line appears as
well as the one in the previous example in <filename>sources.list</filename>
a single FTP session will be used for both resource lines.</para>
<literallayout>deb ftp://ftp.debian.org/debian unstable contrib</literallayout>
+ <literallayout>Types: deb
+URIs: ftp://ftp.debian.org/debian
+Suites: unstable
+Components: contrib</literallayout>
<para>Uses HTTP to access the archive at ftp.tlh.debian.org, under the
universe directory, and uses only files found under
@@ -268,15 +429,32 @@ deb [ arch=amd64,armel ] http://ftp.debian.org/debian &stable-codename; main</li
illustrates how to use the substitution variable; official debian
archives are not structured like this]
<literallayout>deb http://ftp.tlh.debian.org/universe unstable/binary-$(ARCH)/</literallayout>
+ <literallayout>Types: deb
+URIs: http://ftp.tlh.debian.org/universe
+Suites: unstable/binary-$(ARCH)/</literallayout>
</para>
+
+ <para>Uses HTTP to get binary packages as well as sources from the stable, testing and unstable
+ suites and the components main and contrib.</para>
+ <literallayout>deb http://httpredir.debian.org/debian stable main contrib
+deb-src http://httpredir.debian.org/debian stable main contrib
+deb http://httpredir.debian.org/debian testing main contrib
+deb-src http://httpredir.debian.org/debian testing main contrib
+deb http://httpredir.debian.org/debian unstable main contrib
+deb-src http://httpredir.debian.org/debian unstable main contrib</literallayout>
+ <literallayout>Types: deb deb-src
+URIs: http://httpredir.debian.org/debian
+Suites: stable testing unstable
+Components: main contrib
+</literallayout>
+
</refsect1>
-
+
<refsect1><title>See Also</title>
- <para>&apt-cache; &apt-conf;
+ <para>&apt-get;, &apt-conf;
</para>
</refsect1>
&manbugs;
-
-</refentry>
+</refentry>
diff --git a/dselect/install b/dselect/install
index 7104ee280..75f0c0fc4 100755
--- a/dselect/install
+++ b/dselect/install
@@ -49,7 +49,7 @@ yesno() {
if [ "$WAIT" = "true" ]; then
$APTGET $DSELECT_UPGRADE_OPTS $OPTS "$APT_OPT0" "$APT_OPT1" -d dselect-upgrade
- echo $"Press enter to continue." && read RES
+ echo $"Press [Enter] to continue." && read RES
$APTGET $DSELECT_UPGRADE_OPTS $OPTS "$APT_OPT0" "$APT_OPT1" dselect-upgrade
RES=$?
else
@@ -65,7 +65,7 @@ fi
# Finished OK
if [ $RES -eq 0 ]; then
- if [ $(ls $ARCHIVES $ARCHIVES/partial | egrep -v "^lock$|^partial$" | wc -l) \
+ if [ $(ls $ARCHIVES $ARCHIVES/partial | grep -E -v "^lock$|^partial$" | wc -l) \
-eq 0 ]; then
exit 0
fi
@@ -81,18 +81,18 @@ if [ $RES -eq 0 ]; then
case $(echo $CLEAN | tr '[:upper:]' '[:lower:]') in
auto)
$APTGET "$APT_OPT0" "$APT_OPT1" autoclean &&
- echo $"Press enter to continue." && read RES && exit 0;
+ echo $"Press [Enter] to continue." && read RES && exit 0;
;;
always)
$APTGET "$APT_OPT0" "$APT_OPT1" clean &&
- echo $"Press enter to continue." && read RES && exit 0;
+ echo $"Press [Enter] to continue." && read RES && exit 0;
;;
prompt)
exec 3>&1
echo -n $"Do you want to erase any previously downloaded .deb files?"
if [ $(yesno "" y) = y ]; then
$APTGET "$APT_OPT0" "$APT_OPT1" clean &&
- echo $"Press enter to continue." && read RES && exit 0;
+ echo $"Press [Enter] to continue." && read RES && exit 0;
fi
;;
*)
@@ -103,7 +103,7 @@ else
echo $"will be configured. This may result in duplicate errors"
echo $"or errors caused by missing dependencies. This is OK, only the errors"
echo $"above this message are important. Please fix them and run [I]nstall again"
- echo $"Press enter to continue."
+ echo $"Press [Enter] to continue."
read RES && $DPKG "$DPKG_OPTS" --configure -a
exit 100
fi
diff --git a/dselect/update b/dselect/update
index 487fbf226..0ab317ee4 100755
--- a/dselect/update
+++ b/dselect/update
@@ -42,7 +42,7 @@ then
fi
if [ x$PROMPT = "xtrue" ]; then
- echo $"Press enter to continue." && read RES;
+ echo $"Press [Enter] to continue." && read RES;
fi
exit $STATUS
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index 62108f7ca..6f0fb1ac4 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -135,7 +135,7 @@ void PackageMap::GetGeneral(Configuration &Setup,Configuration &Block)
PathPrefix = Block.Find("PathPrefix");
if (Block.FindB("External-Links",true) == false)
- DeLinkLimit = Setup.FindI("Default::DeLinkLimit",UINT_MAX);
+ DeLinkLimit = Setup.FindI("Default::DeLinkLimit", std::numeric_limits<unsigned int>::max());
else
DeLinkLimit = 0;
@@ -180,7 +180,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
// Create a package writer object.
MultiCompress Comp(flCombine(ArchiveDir,PkgFile),
PkgCompress,Permissions);
- PackagesWriter Packages(&Comp.Input, flCombine(CacheDir,BinCacheDB),
+ PackagesWriter Packages(&Comp.Input, TransWriter, flCombine(CacheDir,BinCacheDB),
flCombine(OverrideDir,BinOverride),
flCombine(OverrideDir,ExtraOverride),
Arch);
@@ -193,7 +193,6 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
Packages.DirStrip = ArchiveDir;
Packages.InternalPrefix = flCombine(ArchiveDir,InternalPrefix);
- Packages.TransWriter = TransWriter;
Packages.LongDescription = LongDesc;
Packages.Stats.DeLinkBytes = Stats.DeLinkBytes;
@@ -457,7 +456,7 @@ bool PackageMap::GenContents(Configuration &Setup,
// ---------------------------------------------------------------------
/* This populates the PkgList with all the possible permutations of the
section/arch lists. */
-static void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
+static void LoadTree(vector<PackageMap> &PkgList, std::vector<TranslationWriter*> &TransList, Configuration &Setup)
{
// Load the defaults
string DDir = Setup.Find("TreeDefault::Directory",
@@ -508,16 +507,7 @@ static void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
{NULL, NULL}};
mode_t const Perms = Block.FindI("FileMode", Permissions);
bool const LongDesc = Block.FindB("LongDescription", LongDescription);
- TranslationWriter *TransWriter;
- if (DTrans.empty() == false && LongDesc == false)
- {
- string const TranslationFile = flCombine(Setup.FindDir("Dir::ArchiveDir"),
- SubstVar(Block.Find("Translation", DTrans.c_str()), Vars));
- string const TransCompress = Block.Find("Translation::Compress", TranslationCompress);
- TransWriter = new TranslationWriter(TranslationFile, TransCompress, Perms);
- }
- else
- TransWriter = NULL;
+ TranslationWriter *TransWriter = NULL;
string const Tmp2 = Block.Find("Architectures");
const char *Archs = Tmp2.c_str();
@@ -546,27 +536,34 @@ static void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars);
Itm.Arch = Arch;
Itm.LongDesc = LongDesc;
- if (TransWriter != NULL)
+ if (TransWriter == NULL && DTrans.empty() == false && LongDesc == false && DTrans != "/dev/null")
{
- TransWriter->IncreaseRefCounter();
- Itm.TransWriter = TransWriter;
+ string const TranslationFile = flCombine(Setup.FindDir("Dir::ArchiveDir"),
+ SubstVar(Block.Find("Translation", DTrans.c_str()), Vars));
+ string const TransCompress = Block.Find("Translation::Compress", TranslationCompress);
+ TransWriter = new TranslationWriter(TranslationFile, TransCompress, Perms);
+ TransList.push_back(TransWriter);
}
+ Itm.TransWriter = TransWriter;
Itm.Contents = SubstVar(Block.Find("Contents",DContents.c_str()),Vars);
Itm.ContentsHead = SubstVar(Block.Find("Contents::Header",DContentsH.c_str()),Vars);
Itm.FLFile = SubstVar(Block.Find("FileList",DFLFile.c_str()),Vars);
Itm.ExtraOverride = SubstVar(Block.Find("ExtraOverride"),Vars);
}
- Itm.GetGeneral(Setup,Block);
+ Itm.GetGeneral(Setup,Block);
PkgList.push_back(Itm);
}
- // we didn't use this TransWriter, so we can release it
- if (TransWriter != NULL && TransWriter->GetRefCounter() == 0)
- delete TransWriter;
}
-
+
Top = Top->Next;
- }
+ }
+}
+ /*}}}*/
+static void UnloadTree(std::vector<TranslationWriter*> const &Trans) /*{{{*/
+{
+ for (std::vector<TranslationWriter*>::const_reverse_iterator T = Trans.rbegin(); T != Trans.rend(); ++T)
+ delete *T;
}
/*}}}*/
// LoadBinDir - Load a 'bindirectory' section from the Generate Config /*{{{*/
@@ -671,7 +668,7 @@ static bool SimpleGenPackages(CommandLine &CmdL)
Override = CmdL.FileList[2];
// Create a package writer object.
- PackagesWriter Packages(NULL, _config->Find("APT::FTPArchive::DB"),
+ PackagesWriter Packages(NULL, NULL, _config->Find("APT::FTPArchive::DB"),
Override, "", _config->Find("APT::FTPArchive::Architecture"));
if (_error->PendingError() == true)
return false;
@@ -844,12 +841,6 @@ static bool DoGeneratePackagesAndSources(Configuration &Setup,
delete [] List;
}
-
- // close the Translation master files
- for (vector<PackageMap>::reverse_iterator I = PkgList.rbegin(); I != PkgList.rend(); ++I)
- if (I->TransWriter != NULL && I->TransWriter->DecreaseRefCounter() == 0)
- delete I->TransWriter;
-
return true;
}
@@ -880,7 +871,8 @@ static bool DoGenerateContents(Configuration &Setup,
that describe the debs it indexes. Since the package files contain
hashes of the .debs this means they have not changed either so the
contents must be up to date. */
- unsigned long MaxContentsChange = Setup.FindI("Default::MaxContentsChange",UINT_MAX)*1024;
+ unsigned long MaxContentsChange = Setup.FindI("Default::MaxContentsChange",
+ std::numeric_limits<unsigned int>::max())*1024;
for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ++I)
{
// This record is not relevant
@@ -940,7 +932,8 @@ static bool Generate(CommandLine &CmdL)
return false;
vector<PackageMap> PkgList;
- LoadTree(PkgList,Setup);
+ std::vector<TranslationWriter*> TransList;
+ LoadTree(PkgList, TransList, Setup);
LoadBinDir(PkgList,Setup);
// Sort by cache DB to improve IO locality.
@@ -951,7 +944,10 @@ static bool Generate(CommandLine &CmdL)
if (_config->FindB("APT::FTPArchive::ContentsOnly", false) == false)
{
if(DoGeneratePackagesAndSources(Setup, PkgList, SrcStats, Stats, CmdL) == false)
+ {
+ UnloadTree(TransList);
return false;
+ }
} else {
c1out << "Skipping Packages/Sources generation" << endl;
}
@@ -959,7 +955,10 @@ static bool Generate(CommandLine &CmdL)
// do Contents if needed
if (_config->FindB("APT::FTPArchive::Contents", true) == true)
if (DoGenerateContents(Setup, PkgList, CmdL) == false)
- return false;
+ {
+ UnloadTree(TransList);
+ return false;
+ }
struct timeval NewTime;
gettimeofday(&NewTime,0);
@@ -968,6 +967,7 @@ static bool Generate(CommandLine &CmdL)
c1out << "Done. " << SizeToStr(Stats.Bytes) << "B in " << Stats.Packages
<< " archives. Took " << TimeToStr((long)Delta) << endl;
+ UnloadTree(TransList);
return true;
}
@@ -984,9 +984,12 @@ static bool Clean(CommandLine &CmdL)
Configuration Setup;
if (ReadConfigFile(Setup,CmdL.FileList[1],true) == false)
return false;
+ // we don't need translation creation here
+ Setup.Set("TreeDefault::Translation", "/dev/null");
vector<PackageMap> PkgList;
- LoadTree(PkgList,Setup);
+ std::vector<TranslationWriter*> TransList;
+ LoadTree(PkgList, TransList, Setup);
LoadBinDir(PkgList,Setup);
// Sort by cache DB to improve IO locality.
@@ -1007,14 +1010,13 @@ static bool Clean(CommandLine &CmdL)
_error->DumpErrors();
if (DB_SRC.Clean() == false)
_error->DumpErrors();
-
+
string CacheDB = I->BinCacheDB;
string SrcCacheDB = I->SrcCacheDB;
while(I != PkgList.end() &&
I->BinCacheDB == CacheDB &&
I->SrcCacheDB == SrcCacheDB)
++I;
-
}
diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc
index cc3527ea4..ce6c865f3 100644
--- a/ftparchive/cachedb.cc
+++ b/ftparchive/cachedb.cc
@@ -45,6 +45,7 @@ CacheDB::~CacheDB()
{
ReadyDB();
delete DebFile;
+ CloseFile();
}
// CacheDB::ReadyDB - Ready the DB2 /*{{{*/
diff --git a/ftparchive/contents.h b/ftparchive/contents.h
index 953d0d54b..bc691d473 100644
--- a/ftparchive/contents.h
+++ b/ftparchive/contents.h
@@ -81,7 +81,7 @@ class ContentsExtract : public pkgDirStream
bool Read(debDebFile &Deb);
- virtual bool DoItem(Item &Itm,int &Fd);
+ virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
void Reset() {CurSize = 0;};
bool TakeContents(const void *Data,unsigned long long Length);
void Add(GenContents &Contents,std::string const &Package);
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index 7cf7e6efc..7f09a3758 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -69,22 +69,29 @@ static void ConfigToDoHashes(unsigned int &DoHashes, std::string const &Conf)
/*}}}*/
// FTWScanner::FTWScanner - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
FTWScanner::FTWScanner(FileFd * const GivenOutput, string const &Arch): Arch(Arch), DoHashes(~0)
{
if (GivenOutput == NULL)
{
Output = new FileFd;
+ OwnsOutput = true;
Output->OpenDescriptor(STDOUT_FILENO, FileFd::WriteOnly, false);
}
else
+ {
Output = GivenOutput;
+ OwnsOutput = false;
+ }
ErrorPrinted = false;
NoLinkAct = !_config->FindB("APT::FTPArchive::DeLinkAct",true);
ConfigToDoHashes(DoHashes, "APT::FTPArchive");
}
/*}}}*/
+FTWScanner::~FTWScanner()
+{
+ if (Output != NULL && OwnsOutput)
+ delete Output;
+}
// FTWScanner::Scanner - FTW Scanner /*{{{*/
// ---------------------------------------------------------------------
/* This is the FTW scanner, it processes each directory element in the
@@ -324,9 +331,10 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath,
// PackagesWriter::PackagesWriter - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-PackagesWriter::PackagesWriter(FileFd * const GivenOutput, string const &DB,string const &Overrides,string const &ExtOverrides,
- string const &Arch) :
- FTWScanner(GivenOutput, Arch), Db(DB), Stats(Db.Stats), TransWriter(NULL)
+PackagesWriter::PackagesWriter(FileFd * const GivenOutput, TranslationWriter * const transWriter,
+ string const &DB,string const &Overrides,string const &ExtOverrides,
+ string const &Arch) :
+ FTWScanner(GivenOutput, Arch), Db(DB), Stats(Db.Stats), TransWriter(transWriter)
{
SetExts(".deb .udeb");
DeLinkLimit = 0;
@@ -377,7 +385,6 @@ bool FTWScanner::SetExts(string const &Vals)
return true;
}
-
/*}}}*/
// PackagesWriter::DoPackage - Process a single package /*{{{*/
// ---------------------------------------------------------------------
@@ -413,7 +420,7 @@ bool PackagesWriter::DoPackage(string FileName)
Architecture = Arch;
else
Architecture = Tags.FindS("Architecture");
- auto_ptr<Override::Item> OverItem(Over.GetItem(Package,Architecture));
+ unique_ptr<Override::Item> OverItem(Over.GetItem(Package,Architecture));
if (Package.empty() == true)
return _error->Error(_("Archive had no package field"));
@@ -427,7 +434,7 @@ bool PackagesWriter::DoPackage(string FileName)
ioprintf(c1out, _(" %s has no override entry\n"), Package.c_str());
}
- OverItem = auto_ptr<Override::Item>(new Override::Item);
+ OverItem = unique_ptr<Override::Item>(new Override::Item);
OverItem->FieldOverride["Section"] = Tags.FindS("Section");
OverItem->Priority = Tags.FindS("Priority");
}
@@ -524,12 +531,16 @@ bool PackagesWriter::DoPackage(string FileName)
return Db.Finish();
}
/*}}}*/
+PackagesWriter::~PackagesWriter() /*{{{*/
+{
+}
+ /*}}}*/
// TranslationWriter::TranslationWriter - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Create a Translation-Master file for this Packages file */
TranslationWriter::TranslationWriter(string const &File, string const &TransCompress,
- mode_t const &Permissions) : RefCounter(0)
+ mode_t const &Permissions) : Comp(NULL), Output(NULL)
{
if (File.empty() == true)
return;
@@ -568,10 +579,8 @@ bool TranslationWriter::DoPackage(string const &Pkg, string const &Desc,
/* */
TranslationWriter::~TranslationWriter()
{
- if (Comp == NULL)
- return;
-
- delete Comp;
+ if (Comp != NULL)
+ delete Comp;
}
/*}}}*/
@@ -651,7 +660,7 @@ bool SourcesWriter::DoPackage(string FileName)
string BestPrio;
string Bins = Tags.FindS("Binary");
char Buffer[Bins.length() + 1];
- auto_ptr<Override::Item> OverItem(0);
+ unique_ptr<Override::Item> OverItem(nullptr);
if (Bins.empty() == false)
{
strcpy(Buffer,Bins.c_str());
@@ -664,7 +673,7 @@ bool SourcesWriter::DoPackage(string FileName)
unsigned char BestPrioV = pkgCache::State::Extra;
for (unsigned I = 0; BinList[I] != 0; I++)
{
- auto_ptr<Override::Item> Itm(BOver.GetItem(BinList[I]));
+ unique_ptr<Override::Item> Itm(BOver.GetItem(BinList[I]));
if (Itm.get() == 0)
continue;
@@ -676,7 +685,7 @@ bool SourcesWriter::DoPackage(string FileName)
}
if (OverItem.get() == 0)
- OverItem = Itm;
+ OverItem = std::move(Itm);
}
}
@@ -689,23 +698,23 @@ bool SourcesWriter::DoPackage(string FileName)
ioprintf(c1out, _(" %s has no override entry\n"), Tags.FindS("Source").c_str());
}
- OverItem = auto_ptr<Override::Item>(new Override::Item);
+ OverItem.reset(new Override::Item);
}
struct stat St;
if (stat(FileName.c_str(), &St) != 0)
return _error->Errno("fstat","Failed to stat %s",FileName.c_str());
- auto_ptr<Override::Item> SOverItem(SOver.GetItem(Tags.FindS("Source")));
- // const auto_ptr<Override::Item> autoSOverItem(SOverItem);
+ unique_ptr<Override::Item> SOverItem(SOver.GetItem(Tags.FindS("Source")));
+ // const unique_ptr<Override::Item> autoSOverItem(SOverItem);
if (SOverItem.get() == 0)
{
ioprintf(c1out, _(" %s has no source override entry\n"), Tags.FindS("Source").c_str());
- SOverItem = auto_ptr<Override::Item>(BOver.GetItem(Tags.FindS("Source")));
+ SOverItem = unique_ptr<Override::Item>(BOver.GetItem(Tags.FindS("Source")));
if (SOverItem.get() == 0)
{
ioprintf(c1out, _(" %s has no binary override entry either\n"), Tags.FindS("Source").c_str());
- SOverItem = auto_ptr<Override::Item>(new Override::Item);
+ SOverItem = unique_ptr<Override::Item>(new Override::Item);
*SOverItem = *OverItem;
}
}
diff --git a/ftparchive/writer.h b/ftparchive/writer.h
index 0ba60db5e..98012beee 100644
--- a/ftparchive/writer.h
+++ b/ftparchive/writer.h
@@ -64,6 +64,7 @@ class FTWScanner
public:
FileFd *Output;
+ bool OwnsOutput;
unsigned int DoHashes;
unsigned long DeLinkLimit;
@@ -79,7 +80,7 @@ class FTWScanner
bool SetExts(string const &Vals);
FTWScanner(FileFd * const Output, string const &Arch = string());
- virtual ~FTWScanner() {};
+ virtual ~FTWScanner();
};
class MultiCompress;
@@ -88,17 +89,12 @@ class TranslationWriter
{
MultiCompress *Comp;
std::set<string> Included;
- unsigned short RefCounter;
FileFd *Output;
public:
- void IncreaseRefCounter() { ++RefCounter; };
- unsigned short DecreaseRefCounter() { return (RefCounter == 0) ? 0 : --RefCounter; };
- unsigned short GetRefCounter() const { return RefCounter; };
bool DoPackage(string const &Pkg, string const &Desc, string const &MD5);
TranslationWriter(string const &File, string const &TransCompress, mode_t const &Permissions);
- TranslationWriter() : Comp(NULL), RefCounter(0) {};
~TranslationWriter();
};
@@ -119,18 +115,18 @@ class PackagesWriter : public FTWScanner
string PathPrefix;
string DirStrip;
struct CacheDB::Stats &Stats;
- TranslationWriter *TransWriter;
+ TranslationWriter * const TransWriter;
inline bool ReadOverride(string const &File) {return Over.ReadOverride(File);};
inline bool ReadExtraOverride(string const &File)
{return Over.ReadExtraOverride(File);};
- virtual bool DoPackage(string FileName);
+ virtual bool DoPackage(string FileName) APT_OVERRIDE;
- PackagesWriter(FileFd * const Output, string const &DB,
+ PackagesWriter(FileFd * const Output, TranslationWriter * const TransWriter, string const &DB,
string const &Overrides,
string const &ExtOverrides = "",
string const &Arch = "");
- virtual ~PackagesWriter() {};
+ virtual ~PackagesWriter();
};
class ContentsWriter : public FTWScanner
@@ -146,7 +142,7 @@ class ContentsWriter : public FTWScanner
string Prefix;
bool DoPackage(string FileName,string Package);
- virtual bool DoPackage(string FileName)
+ virtual bool DoPackage(string FileName) APT_OVERRIDE
{return DoPackage(FileName,string());};
bool ReadFromPkgs(string const &PkgFile,string const &PkgCompress);
@@ -175,7 +171,7 @@ class SourcesWriter : public FTWScanner
string DirStrip;
struct CacheDB::Stats &Stats;
- virtual bool DoPackage(string FileName);
+ virtual bool DoPackage(string FileName) APT_OVERRIDE;
SourcesWriter(FileFd * const Output, string const &DB,string const &BOverrides,string const &SOverrides,
string const &ExtOverrides=string());
@@ -186,7 +182,7 @@ class ReleaseWriter : public FTWScanner
{
public:
ReleaseWriter(FileFd * const Output, string const &DB);
- virtual bool DoPackage(string FileName);
+ virtual bool DoPackage(string FileName) APT_OVERRIDE;
void Finish();
// General options
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index 10cb29f66..d9ddecb6a 100644
--- a/methods/cdrom.cc
+++ b/methods/cdrom.cc
@@ -42,9 +42,9 @@ class CDROMMethod : public pkgAcqMethod
bool IsCorrectCD(URI want, string MountPath, string& NewID);
bool AutoDetectAndMount(const URI, string &NewID);
- virtual bool Fetch(FetchItem *Itm);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
string GetID(string Name);
- virtual void Exit();
+ virtual void Exit() APT_OVERRIDE;
public:
@@ -260,7 +260,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
struct stat Buf;
if (stat(Res.Filename.c_str(),&Buf) != 0)
return _error->Error(_("File not found"));
-
+
+ URIStart(Res);
if (NewID.empty() == false)
CurrentID = NewID;
Res.LastModified = Buf.st_mtime;
diff --git a/methods/copy.cc b/methods/copy.cc
index a8e289df5..0c9f322e6 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -27,7 +27,7 @@
class CopyMethod : public pkgAcqMethod
{
- virtual bool Fetch(FetchItem *Itm);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
void CalculateHashes(FetchItem const * const Itm, FetchResult &Res);
public:
@@ -38,11 +38,7 @@ class CopyMethod : public pkgAcqMethod
void CopyMethod::CalculateHashes(FetchItem const * const Itm, FetchResult &Res)
{
Hashes Hash(Itm->ExpectedHashes);
- FileFd::CompressMode CompressMode = FileFd::None;
- if (_config->FindB("Acquire::GzipIndexes", false) == true)
- CompressMode = FileFd::Extension;
-
- FileFd Fd(Res.Filename, FileFd::ReadOnly, CompressMode);
+ FileFd Fd(Res.Filename, FileFd::ReadOnly, FileFd::Extension);
Hash.AddFD(Fd);
Res.TakeHashes(Hash);
}
@@ -53,7 +49,7 @@ void CopyMethod::CalculateHashes(FetchItem const * const Itm, FetchResult &Res)
bool CopyMethod::Fetch(FetchItem *Itm)
{
// this ensures that relative paths work in copy
- std::string File = Itm->Uri.substr(Itm->Uri.find(':')+1);
+ std::string const File = Itm->Uri.substr(Itm->Uri.find(':')+1);
// Stat the file and send a start message
struct stat Buf;
diff --git a/methods/file.cc b/methods/file.cc
index 043ab04b8..40e85bce5 100644
--- a/methods/file.cc
+++ b/methods/file.cc
@@ -30,7 +30,7 @@
class FileMethod : public pkgAcqMethod
{
- virtual bool Fetch(FetchItem *Itm);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
public:
@@ -48,8 +48,27 @@ bool FileMethod::Fetch(FetchItem *Itm)
if (Get.Host.empty() == false)
return _error->Error(_("Invalid URI, local URIS must not start with //"));
- // See if the file exists
struct stat Buf;
+ // deal with destination files which might linger around
+ if (lstat(Itm->DestFile.c_str(), &Buf) == 0)
+ {
+ if ((Buf.st_mode & S_IFREG) != 0)
+ {
+ if (Itm->LastModified == Buf.st_mtime && Itm->LastModified != 0)
+ {
+ HashStringList const hsl = Itm->ExpectedHashes;
+ if (Itm->ExpectedHashes.VerifyFile(File))
+ {
+ Res.Filename = Itm->DestFile;
+ Res.IMSHit = true;
+ }
+ }
+ }
+ }
+ if (Res.IMSHit != true)
+ unlink(Itm->DestFile.c_str());
+
+ // See if the file exists
if (stat(File.c_str(),&Buf) == 0)
{
Res.Size = Buf.st_size;
@@ -57,10 +76,23 @@ bool FileMethod::Fetch(FetchItem *Itm)
Res.LastModified = Buf.st_mtime;
Res.IMSHit = false;
if (Itm->LastModified == Buf.st_mtime && Itm->LastModified != 0)
- Res.IMSHit = true;
+ {
+ unsigned long long const filesize = Itm->ExpectedHashes.FileSize();
+ if (filesize != 0 && filesize == Res.Size)
+ Res.IMSHit = true;
+ }
+
+ Hashes Hash(Itm->ExpectedHashes);
+ FileFd Fd(File, FileFd::ReadOnly);
+ Hash.AddFD(Fd);
+ Res.TakeHashes(Hash);
}
+ if (Res.IMSHit == false)
+ URIStart(Res);
// See if the uncompressed file exists and reuse it
+ FetchResult AltRes;
+ AltRes.Filename.clear();
std::vector<std::string> extensions = APT::Configuration::getCompressorExtensions();
for (std::vector<std::string>::const_iterator ext = extensions.begin(); ext != extensions.end(); ++ext)
{
@@ -69,29 +101,25 @@ bool FileMethod::Fetch(FetchItem *Itm)
std::string const unfile = File.substr(0, File.length() - ext->length() - 1);
if (stat(unfile.c_str(),&Buf) == 0)
{
- FetchResult AltRes;
AltRes.Size = Buf.st_size;
AltRes.Filename = unfile;
AltRes.LastModified = Buf.st_mtime;
AltRes.IMSHit = false;
if (Itm->LastModified == Buf.st_mtime && Itm->LastModified != 0)
AltRes.IMSHit = true;
-
- URIDone(Res,&AltRes);
- return true;
+ break;
}
// no break here as we could have situations similar to '.gz' vs '.tar.gz' here
}
}
- if (Res.Filename.empty() == true)
+ if (AltRes.Filename.empty() == false)
+ URIDone(Res,&AltRes);
+ else if (Res.Filename.empty() == false)
+ URIDone(Res);
+ else
return _error->Error(_("File not found"));
- Hashes Hash(Itm->ExpectedHashes);
- FileFd Fd(Res.Filename, FileFd::ReadOnly);
- Hash.AddFD(Fd);
- Res.TakeHashes(Hash);
- URIDone(Res);
return true;
}
/*}}}*/
diff --git a/methods/ftp.cc b/methods/ftp.cc
index 92d8573f1..1a9a1c4eb 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -39,7 +39,6 @@
// Internet stuff
#include <netinet/in.h>
-#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
@@ -746,7 +745,7 @@ bool FTPConn::CreateDataFd()
}
// Bind and listen
- if (bind(DataListenFd,BindAddr->ai_addr,BindAddr->ai_addrlen) < 0)
+ if (::bind(DataListenFd,BindAddr->ai_addr,BindAddr->ai_addrlen) < 0)
{
freeaddrinfo(BindAddr);
return _error->Errno("bind",_("Could not bind a socket"));
diff --git a/methods/ftp.h b/methods/ftp.h
index 2efd28ec6..2c4e9f57a 100644
--- a/methods/ftp.h
+++ b/methods/ftp.h
@@ -10,8 +10,10 @@
#ifndef APT_FTP_H
#define APT_FTP_H
+#include <apt-pkg/acquire-method.h>
#include <apt-pkg/strutl.h>
+#include <sys/socket.h>
#include <sys/types.h>
#include <time.h>
#include <string>
@@ -71,8 +73,8 @@ class FTPConn
class FtpMethod : public pkgAcqMethod
{
- virtual bool Fetch(FetchItem *Itm);
- virtual bool Configuration(std::string Message);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
FTPConn *Server;
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 41f138be6..490833d8c 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -15,6 +15,8 @@
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
+
+#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
@@ -37,14 +39,15 @@ class GPGVMethod : public pkgAcqMethod
{
private:
string VerifyGetSigners(const char *file, const char *outfile,
- vector<string> &GoodSigners,
+ std::string const &key,
+ vector<string> &GoodSigners,
vector<string> &BadSigners,
vector<string> &WorthlessSigners,
vector<string> &NoPubKeySigners);
protected:
- virtual bool Fetch(FetchItem *Itm);
- virtual bool Configuration(string Message);
+ virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) APT_OVERRIDE;
+ virtual bool Configuration(string Message) APT_OVERRIDE;
public:
GPGVMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig) {};
@@ -61,6 +64,7 @@ bool GPGVMethod::Configuration(string Message)
}
string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
+ std::string const &key,
vector<string> &GoodSigners,
vector<string> &BadSigners,
vector<string> &WorthlessSigners,
@@ -72,6 +76,7 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
std::clog << "inside VerifyGetSigners" << std::endl;
int fd[2];
+ bool const keyIsID = (key.empty() == false && key[0] != '/');
if (pipe(fd) < 0)
return "Couldn't create pipe";
@@ -80,12 +85,13 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
if (pid < 0)
return string("Couldn't spawn new process") + strerror(errno);
else if (pid == 0)
- ExecGPGV(outfile, file, 3, fd);
+ ExecGPGV(outfile, file, 3, fd, (keyIsID ? "" : key));
close(fd[1]);
FILE *pipein = fdopen(fd[0], "r");
// Loop over the output of apt-key (which really is gnupg), and check the signatures.
+ std::vector<std::string> ValidSigners;
size_t buffersize = 0;
char *buffer = NULL;
while (1)
@@ -105,32 +111,31 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
std::clog << "Got BADSIG! " << std::endl;
BadSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
}
-
- if (strncmp(buffer, GNUPGNOPUBKEY, sizeof(GNUPGNOPUBKEY)-1) == 0)
+ else if (strncmp(buffer, GNUPGNOPUBKEY, sizeof(GNUPGNOPUBKEY)-1) == 0)
{
if (Debug == true)
std::clog << "Got NO_PUBKEY " << std::endl;
NoPubKeySigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
}
- if (strncmp(buffer, GNUPGNODATA, sizeof(GNUPGBADSIG)-1) == 0)
+ else if (strncmp(buffer, GNUPGNODATA, sizeof(GNUPGBADSIG)-1) == 0)
{
if (Debug == true)
std::clog << "Got NODATA! " << std::endl;
BadSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
}
- if (strncmp(buffer, GNUPGKEYEXPIRED, sizeof(GNUPGKEYEXPIRED)-1) == 0)
+ else if (strncmp(buffer, GNUPGKEYEXPIRED, sizeof(GNUPGKEYEXPIRED)-1) == 0)
{
if (Debug == true)
std::clog << "Got KEYEXPIRED! " << std::endl;
WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
}
- if (strncmp(buffer, GNUPGREVKEYSIG, sizeof(GNUPGREVKEYSIG)-1) == 0)
+ else if (strncmp(buffer, GNUPGREVKEYSIG, sizeof(GNUPGREVKEYSIG)-1) == 0)
{
if (Debug == true)
std::clog << "Got REVKEYSIG! " << std::endl;
WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
}
- if (strncmp(buffer, GNUPGGOODSIG, sizeof(GNUPGGOODSIG)-1) == 0)
+ else if (strncmp(buffer, GNUPGGOODSIG, sizeof(GNUPGGOODSIG)-1) == 0)
{
char *sig = buffer + sizeof(GNUPGPREFIX);
char *p = sig + sizeof("GOODSIG");
@@ -141,10 +146,48 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
std::clog << "Got GOODSIG, key ID:" << sig << std::endl;
GoodSigners.push_back(string(sig));
}
+ else if (strncmp(buffer, GNUPGVALIDSIG, sizeof(GNUPGVALIDSIG)-1) == 0)
+ {
+ char *sig = buffer + sizeof(GNUPGVALIDSIG);
+ char *p = sig;
+ while (*p && isxdigit(*p))
+ p++;
+ *p = 0;
+ if (Debug == true)
+ std::clog << "Got VALIDSIG, key ID: " << sig << std::endl;
+ ValidSigners.push_back(string(sig));
+ }
}
fclose(pipein);
free(buffer);
+ // apt-key has a --keyid parameter, but this requires gpg, so we call it without it
+ // and instead check after the fact which keyids where used for verification
+ if (keyIsID == true)
+ {
+ if (Debug == true)
+ std::clog << "GoodSigs needs to be limited to keyid " << key << std::endl;
+ std::vector<std::string>::iterator const foundItr = std::find(ValidSigners.begin(), ValidSigners.end(), key);
+ bool const found = (foundItr != ValidSigners.end());
+ std::copy(GoodSigners.begin(), GoodSigners.end(), std::back_insert_iterator<std::vector<std::string> >(NoPubKeySigners));
+ if (found)
+ {
+ // we look for GOODSIG here as well as an expired sig is a valid sig as well (but not a good one)
+ std::string const goodlongkeyid = "GOODSIG " + key.substr(24, 16);
+ bool const foundGood = std::find(GoodSigners.begin(), GoodSigners.end(), goodlongkeyid) != GoodSigners.end();
+ if (Debug == true)
+ std::clog << "Key " << key << " is valid sig, is " << goodlongkeyid << " also a good one? " << (foundGood ? "yes" : "no") << std::endl;
+ GoodSigners.clear();
+ if (foundGood)
+ {
+ GoodSigners.push_back(goodlongkeyid);
+ NoPubKeySigners.erase(std::remove(NoPubKeySigners.begin(), NoPubKeySigners.end(), goodlongkeyid), NoPubKeySigners.end());
+ }
+ }
+ else
+ GoodSigners.clear();
+ }
+
int status;
waitpid(pid, &status, 0);
if (Debug == true)
@@ -154,8 +197,18 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
if (WEXITSTATUS(status) == 0)
{
- if (GoodSigners.empty())
- return _("Internal error: Good signature, but could not determine key fingerprint?!");
+ if (keyIsID)
+ {
+ // gpgv will report success, but we want to enforce a certain keyring
+ // so if we haven't found the key the valid we found is in fact invalid
+ if (GoodSigners.empty())
+ return _("At least one invalid signature was encountered.");
+ }
+ else
+ {
+ if (GoodSigners.empty())
+ return _("Internal error: Good signature, but could not determine key fingerprint?!");
+ }
return "";
}
else if (WEXITSTATUS(status) == 1)
@@ -174,11 +227,11 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
return _("Unknown error executing apt-key");
}
-bool GPGVMethod::Fetch(FetchItem *Itm)
+bool GPGVMethod::URIAcquire(std::string const &Message, FetchItem *Itm)
{
- URI Get = Itm->Uri;
- string Path = Get.Host + Get.Path; // To account for relative paths
- string keyID;
+ URI const Get = Itm->Uri;
+ string const Path = Get.Host + Get.Path; // To account for relative paths
+ std::string const key = LookupTag(Message, "Signed-By");
vector<string> GoodSigners;
vector<string> BadSigners;
// a worthless signature is a expired or revoked one
@@ -190,7 +243,7 @@ bool GPGVMethod::Fetch(FetchItem *Itm)
URIStart(Res);
// Run apt-key on file, extract contents and get the key ID of the signer
- string msg = VerifyGetSigners(Path.c_str(), Itm->DestFile.c_str(),
+ string msg = VerifyGetSigners(Path.c_str(), Itm->DestFile.c_str(), key,
GoodSigners, BadSigners, WorthlessSigners,
NoPubKeySigners);
if (GoodSigners.empty() || !BadSigners.empty() || !NoPubKeySigners.empty())
diff --git a/methods/gzip.cc b/methods/gzip.cc
index 65519633c..637aae124 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -32,8 +32,8 @@ const char *Prog;
class GzipMethod : public pkgAcqMethod
{
- virtual bool Fetch(FetchItem *Itm);
- virtual bool Configuration(std::string Message);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
public:
diff --git a/methods/http.h b/methods/http.h
index e73871931..da6139b02 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -99,23 +99,23 @@ struct HttpServerState: public ServerState
int ServerFd;
protected:
- virtual bool ReadHeaderLines(std::string &Data);
- virtual bool LoadNextResponse(bool const ToFile, FileFd * const File);
- virtual bool WriteResponse(std::string const &Data);
+ virtual bool ReadHeaderLines(std::string &Data) APT_OVERRIDE;
+ virtual bool LoadNextResponse(bool const ToFile, FileFd * const File) APT_OVERRIDE;
+ virtual bool WriteResponse(std::string const &Data) APT_OVERRIDE;
public:
- virtual void Reset() { ServerState::Reset(); ServerFd = -1; };
+ virtual void Reset() APT_OVERRIDE { ServerState::Reset(); ServerFd = -1; };
- virtual bool RunData(FileFd * const File);
+ virtual bool RunData(FileFd * const File) APT_OVERRIDE;
- virtual bool Open();
- virtual bool IsOpen();
- virtual bool Close();
- virtual bool InitHashes(HashStringList const &ExpectedHashes);
- virtual Hashes * GetHashes();
- virtual bool Die(FileFd &File);
- virtual bool Flush(FileFd * const File);
- virtual bool Go(bool ToFile, FileFd * const File);
+ virtual bool Open() APT_OVERRIDE;
+ virtual bool IsOpen() APT_OVERRIDE;
+ virtual bool Close() APT_OVERRIDE;
+ virtual bool InitHashes(HashStringList const &ExpectedHashes) APT_OVERRIDE;
+ virtual Hashes * GetHashes() APT_OVERRIDE;
+ virtual bool Die(FileFd &File) APT_OVERRIDE;
+ virtual bool Flush(FileFd * const File) APT_OVERRIDE;
+ virtual bool Go(bool ToFile, FileFd * const File) APT_OVERRIDE;
HttpServerState(URI Srv, HttpMethod *Owner);
virtual ~HttpServerState() {Close();};
@@ -124,12 +124,12 @@ struct HttpServerState: public ServerState
class HttpMethod : public ServerMethod
{
public:
- virtual void SendReq(FetchItem *Itm);
+ virtual void SendReq(FetchItem *Itm) APT_OVERRIDE;
- virtual bool Configuration(std::string Message);
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
- virtual ServerState * CreateServerState(URI uri);
- virtual void RotateDNS();
+ virtual ServerState * CreateServerState(URI uri) APT_OVERRIDE;
+ virtual void RotateDNS() APT_OVERRIDE;
protected:
std::string AutoDetectProxyCmd;
diff --git a/methods/https.h b/methods/https.h
index 57fc292ee..29b20b921 100644
--- a/methods/https.h
+++ b/methods/https.h
@@ -32,23 +32,23 @@ class HttpsServerState : public ServerState
Hashes * Hash;
protected:
- virtual bool ReadHeaderLines(std::string &/*Data*/) { return false; }
- virtual bool LoadNextResponse(bool const /*ToFile*/, FileFd * const /*File*/) { return false; }
+ virtual bool ReadHeaderLines(std::string &/*Data*/) APT_OVERRIDE { return false; }
+ virtual bool LoadNextResponse(bool const /*ToFile*/, FileFd * const /*File*/) APT_OVERRIDE { return false; }
public:
- virtual bool WriteResponse(std::string const &/*Data*/) { return false; }
+ virtual bool WriteResponse(std::string const &/*Data*/) APT_OVERRIDE { return false; }
/** \brief Transfer the data from the socket */
- virtual bool RunData(FileFd * const /*File*/) { return false; }
+ virtual bool RunData(FileFd * const /*File*/) APT_OVERRIDE { return false; }
- virtual bool Open() { return false; }
- virtual bool IsOpen() { return false; }
- virtual bool Close() { return false; }
- virtual bool InitHashes(HashStringList const &ExpectedHashes);
- virtual Hashes * GetHashes();
- virtual bool Die(FileFd &/*File*/) { return false; }
- virtual bool Flush(FileFd * const /*File*/) { return false; }
- virtual bool Go(bool /*ToFile*/, FileFd * const /*File*/) { return false; }
+ virtual bool Open() APT_OVERRIDE { return false; }
+ virtual bool IsOpen() APT_OVERRIDE { return false; }
+ virtual bool Close() APT_OVERRIDE { return false; }
+ virtual bool InitHashes(HashStringList const &ExpectedHashes) APT_OVERRIDE;
+ virtual Hashes * GetHashes() APT_OVERRIDE;
+ virtual bool Die(FileFd &/*File*/) APT_OVERRIDE { return false; }
+ virtual bool Flush(FileFd * const /*File*/) APT_OVERRIDE { return false; }
+ virtual bool Go(bool /*ToFile*/, FileFd * const /*File*/) APT_OVERRIDE { return false; }
HttpsServerState(URI Srv, HttpsMethod *Owner);
virtual ~HttpsServerState() {Close();};
@@ -59,7 +59,7 @@ class HttpsMethod : public ServerMethod
// minimum speed in bytes/se that triggers download timeout handling
static const int DL_MIN_SPEED = 10;
- virtual bool Fetch(FetchItem *);
+ virtual bool Fetch(FetchItem *) APT_OVERRIDE;
static size_t parse_header(void *buffer, size_t size, size_t nmemb, void *userp);
static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
@@ -70,14 +70,14 @@ class HttpsMethod : public ServerMethod
ServerState *Server;
// Used by ServerMethods unused by https
- virtual void SendReq(FetchItem *) { exit(42); }
- virtual void RotateDNS() { exit(42); }
+ virtual void SendReq(FetchItem *) APT_OVERRIDE { exit(42); }
+ virtual void RotateDNS() APT_OVERRIDE { exit(42); }
public:
FileFd *File;
- virtual bool Configuration(std::string Message);
- virtual ServerState * CreateServerState(URI uri);
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
+ virtual ServerState * CreateServerState(URI uri) APT_OVERRIDE;
using pkgAcqMethod::FetchResult;
using pkgAcqMethod::FetchItem;
diff --git a/methods/mirror.h b/methods/mirror.h
index 6c0ce370e..425bea673 100644
--- a/methods/mirror.h
+++ b/methods/mirror.h
@@ -46,14 +46,14 @@ class MirrorMethod : public HttpMethod
bool Clean(std::string dir);
// we need to overwrite those to transform the url back
- virtual void Fail(std::string Why, bool Transient = false);
- virtual void URIStart(FetchResult &Res);
- virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
- virtual bool Configuration(std::string Message);
+ virtual void Fail(std::string Why, bool Transient = false) APT_OVERRIDE;
+ virtual void URIStart(FetchResult &Res) APT_OVERRIDE;
+ virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0) APT_OVERRIDE;
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
public:
MirrorMethod();
- virtual bool Fetch(FetchItem *Itm);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
};
diff --git a/methods/rred.cc b/methods/rred.cc
index 554ac99b4..91b6dda22 100644
--- a/methods/rred.cc
+++ b/methods/rred.cc
@@ -21,6 +21,7 @@
#include <vector>
#include <assert.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -35,7 +36,7 @@ class MemBlock {
char *start;
size_t size;
char *free;
- struct MemBlock *next;
+ MemBlock *next;
MemBlock(size_t size) : size(size), next(NULL)
{
@@ -116,7 +117,7 @@ struct Change {
size_t add_len; /* bytes */
char *add;
- Change(int off)
+ Change(size_t off)
{
offset = off;
del_cnt = add_cnt = add_len = 0;
@@ -388,28 +389,37 @@ class Patch {
public:
- void read_diff(FileFd &f)
+ bool read_diff(FileFd &f, Hashes * const h)
{
char buffer[BLOCK_SIZE];
bool cmdwanted = true;
- Change ch(0);
- while(f.ReadLine(buffer, sizeof(buffer)))
- {
+ Change ch(std::numeric_limits<size_t>::max());
+ if (f.ReadLine(buffer, sizeof(buffer)) == NULL)
+ return _error->Error("Reading first line of patchfile %s failed", f.Name().c_str());
+ do {
+ if (h != NULL)
+ h->Add(buffer);
if (cmdwanted) {
char *m, *c;
size_t s, e;
- s = strtol(buffer, &m, 10);
- if (m == buffer) {
- s = e = ch.offset + ch.add_cnt;
- c = buffer;
- } else if (*m == ',') {
- m++;
+ errno = 0;
+ s = strtoul(buffer, &m, 10);
+ if (unlikely(m == buffer || s == std::numeric_limits<unsigned long>::max() || errno != 0))
+ return _error->Error("Parsing patchfile %s failed: Expected an effected line start", f.Name().c_str());
+ else if (*m == ',') {
+ ++m;
e = strtol(m, &c, 10);
+ if (unlikely(m == c || e == std::numeric_limits<unsigned long>::max() || errno != 0))
+ return _error->Error("Parsing patchfile %s failed: Expected an effected line end", f.Name().c_str());
+ if (unlikely(e < s))
+ return _error->Error("Parsing patchfile %s failed: Effected lines end %lu is before start %lu", f.Name().c_str(), e, s);
} else {
e = s;
c = m;
}
+ if (s > ch.offset)
+ return _error->Error("Parsing patchfile %s failed: Effected line is after previous effected line", f.Name().c_str());
switch(*c) {
case 'a':
cmdwanted = false;
@@ -420,6 +430,8 @@ class Patch {
ch.del_cnt = 0;
break;
case 'c':
+ if (unlikely(s == 0))
+ return _error->Error("Parsing patchfile %s failed: Change command can't effect line zero", f.Name().c_str());
cmdwanted = false;
ch.add = NULL;
ch.add_cnt = 0;
@@ -428,6 +440,8 @@ class Patch {
ch.del_cnt = e - s + 1;
break;
case 'd':
+ if (unlikely(s == 0))
+ return _error->Error("Parsing patchfile %s failed: Delete command can't effect line zero", f.Name().c_str());
ch.offset = s - 1;
ch.del_cnt = e - s + 1;
ch.add = NULL;
@@ -435,9 +449,11 @@ class Patch {
ch.add_len = 0;
filechanges.add_change(ch);
break;
+ default:
+ return _error->Error("Parsing patchfile %s failed: Unknown command", f.Name().c_str());
}
} else { /* !cmdwanted */
- if (buffer[0] == '.' && buffer[1] == '\n') {
+ if (strcmp(buffer, ".\n") == 0) {
cmdwanted = true;
filechanges.add_change(ch);
} else {
@@ -463,7 +479,8 @@ class Patch {
}
}
}
- }
+ } while(f.ReadLine(buffer, sizeof(buffer)));
+ return true;
}
void write_diff(FILE *f)
@@ -519,8 +536,29 @@ class RredMethod : public pkgAcqMethod {
private:
bool Debug;
+ struct PDiffFile {
+ std::string FileName;
+ HashStringList ExpectedHashes;
+ PDiffFile(std::string const &FileName, HashStringList const &ExpectedHashes) :
+ FileName(FileName), ExpectedHashes(ExpectedHashes) {}
+ };
+
+ HashStringList ReadExpectedHashesForPatch(unsigned int const patch, std::string const &Message)
+ {
+ HashStringList ExpectedHashes;
+ for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type)
+ {
+ std::string tagname;
+ strprintf(tagname, "Patch-%d-%s-Hash", patch, *type);
+ std::string const hashsum = LookupTag(Message, tagname.c_str());
+ if (hashsum.empty() == false)
+ ExpectedHashes.push_back(HashString(*type, hashsum));
+ }
+ return ExpectedHashes;
+ }
+
protected:
- virtual bool Fetch(FetchItem *Itm) {
+ virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) APT_OVERRIDE {
Debug = _config->FindB("Debug::pkgAcquire::RRed", false);
URI Get = Itm->Uri;
std::string Path = Get.Host + Get.Path; // rred:/path - no host
@@ -534,11 +572,17 @@ class RredMethod : public pkgAcqMethod {
} else
URIStart(Res);
- std::vector<std::string> patchpaths;
+ std::vector<PDiffFile> patchfiles;
Patch patch;
if (FileExists(Path + ".ed") == true)
- patchpaths.push_back(Path + ".ed");
+ {
+ HashStringList const ExpectedHashes = ReadExpectedHashesForPatch(0, Message);
+ std::string const FileName = Path + ".ed";
+ if (ExpectedHashes.usable() == false)
+ return _error->Error("No hashes found for uncompressed patch: %s", FileName.c_str());
+ patchfiles.push_back(PDiffFile(FileName, ExpectedHashes));
+ }
else
{
_error->PushToStack();
@@ -546,31 +590,44 @@ class RredMethod : public pkgAcqMethod {
_error->RevertToStack();
std::string const baseName = Path + ".ed.";
+ unsigned int seen_patches = 0;
for (std::vector<std::string>::const_iterator p = patches.begin();
p != patches.end(); ++p)
+ {
if (p->compare(0, baseName.length(), baseName) == 0)
- patchpaths.push_back(*p);
+ {
+ HashStringList const ExpectedHashes = ReadExpectedHashesForPatch(seen_patches, Message);
+ if (ExpectedHashes.usable() == false)
+ return _error->Error("No hashes found for uncompressed patch %d: %s", seen_patches, p->c_str());
+ patchfiles.push_back(PDiffFile(*p, ExpectedHashes));
+ ++seen_patches;
+ }
+ }
}
std::string patch_name;
- for (std::vector<std::string>::iterator I = patchpaths.begin();
- I != patchpaths.end();
+ for (std::vector<PDiffFile>::iterator I = patchfiles.begin();
+ I != patchfiles.end();
++I)
{
- patch_name = *I;
+ patch_name = I->FileName;
if (Debug == true)
std::clog << "Patching " << Path << " with " << patch_name
<< std::endl;
FileFd p;
+ Hashes patch_hash(I->ExpectedHashes);
// all patches are compressed, even if the name doesn't reflect it
- if (p.Open(patch_name, FileFd::ReadOnly, FileFd::Gzip) == false) {
- std::cerr << "Could not open patch file " << patch_name << std::endl;
+ if (p.Open(patch_name, FileFd::ReadOnly, FileFd::Gzip) == false ||
+ patch.read_diff(p, &patch_hash) == false)
+ {
_error->DumpErrors(std::cerr);
- abort();
+ return false;
}
- patch.read_diff(p);
p.Close();
+ HashStringList const hsl = patch_hash.GetHashStringList();
+ if (hsl != I->ExpectedHashes)
+ return _error->Error("Hash Sum mismatch for uncompressed patch %s", patch_name.c_str());
}
if (Debug == true)
@@ -582,7 +639,6 @@ class RredMethod : public pkgAcqMethod {
FILE *out = fopen(Itm->DestFile.c_str(), "w");
Hashes hash(Itm->ExpectedHashes);
-
patch.apply_against_file(out, inp, &hash);
fclose(out);
@@ -615,6 +671,16 @@ class RredMethod : public pkgAcqMethod {
return true;
}
+ bool Configuration(std::string Message) APT_OVERRIDE
+ {
+ if (pkgAcqMethod::Configuration(Message) == false)
+ return false;
+
+ DropPrivsOrDie();
+
+ return true;
+ }
+
public:
RredMethod() : pkgAcqMethod("2.0",SingleInstance | SendConfig), Debug(false) {}
};
@@ -643,7 +709,11 @@ int main(int argc, char **argv)
_error->DumpErrors(std::cerr);
exit(1);
}
- patch.read_diff(p);
+ if (patch.read_diff(p, NULL) == false)
+ {
+ _error->DumpErrors(std::cerr);
+ exit(2);
+ }
}
if (just_diff) {
diff --git a/methods/rsh.cc b/methods/rsh.cc
index 52349c61c..7ef2f7c7a 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -84,7 +84,7 @@ bool RSHConn::Open()
if (Process != -1)
return true;
- if (Connect(ServerName.Host,ServerName.User) == false)
+ if (Connect(ServerName.Host,ServerName.Port,ServerName.User) == false)
return false;
return true;
@@ -93,8 +93,15 @@ bool RSHConn::Open()
// RSHConn::Connect - Fire up rsh and connect /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool RSHConn::Connect(std::string Host, std::string User)
+bool RSHConn::Connect(std::string Host, unsigned int Port, std::string User)
{
+ char *PortStr = NULL;
+ if (Port != 0)
+ {
+ if (asprintf (&PortStr, "%d", Port) == -1 || PortStr == NULL)
+ return _error->Errno("asprintf", _("Failed"));
+ }
+
// Create the pipes
int Pipes[4] = {-1,-1,-1,-1};
if (pipe(Pipes) != 0 || pipe(Pipes+2) != 0)
@@ -140,6 +147,10 @@ bool RSHConn::Connect(std::string Host, std::string User)
Args[i++] = "-l";
Args[i++] = User.c_str();
}
+ if (PortStr != NULL) {
+ Args[i++] = "-p";
+ Args[i++] = PortStr;
+ }
if (Host.empty() == false) {
Args[i++] = Host.c_str();
}
@@ -149,6 +160,9 @@ bool RSHConn::Connect(std::string Host, std::string User)
exit(100);
}
+ if (PortStr != NULL)
+ free(PortStr);
+
ReadFd = Pipes[0];
WriteFd = Pipes[3];
SetNonBlock(Pipes[0],true);
@@ -158,6 +172,10 @@ bool RSHConn::Connect(std::string Host, std::string User)
return true;
}
+bool RSHConn::Connect(std::string Host, std::string User)
+{
+ return Connect(Host, 0, User);
+}
/*}}}*/
// RSHConn::ReadLine - Very simple buffered read with timeout /*{{{*/
// ---------------------------------------------------------------------
diff --git a/methods/rsh.h b/methods/rsh.h
index dd259e744..e6839711b 100644
--- a/methods/rsh.h
+++ b/methods/rsh.h
@@ -36,6 +36,7 @@ class RSHConn
// Raw connection IO
bool WriteMsg(std::string &Text,bool Sync,const char *Fmt,...);
bool Connect(std::string Host, std::string User);
+ bool Connect(std::string Host, unsigned int Port, std::string User);
bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
// Connection control
@@ -56,8 +57,8 @@ class RSHConn
class RSHMethod : public pkgAcqMethod
{
- virtual bool Fetch(FetchItem *Itm);
- virtual bool Configuration(std::string Message);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
RSHConn *Server;
diff --git a/methods/server.h b/methods/server.h
index 8d7d33ee6..f9f6e9071 100644
--- a/methods/server.h
+++ b/methods/server.h
@@ -106,7 +106,7 @@ struct ServerState
class ServerMethod : public pkgAcqMethod
{
protected:
- virtual bool Fetch(FetchItem *);
+ virtual bool Fetch(FetchItem *) APT_OVERRIDE;
ServerState *Server;
std::string NextURI;
@@ -146,7 +146,7 @@ class ServerMethod : public pkgAcqMethod
static time_t FailTime;
static APT_NORETURN void SigTerm(int);
- virtual bool Configuration(std::string Message);
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
virtual bool Flush() { return Server->Flush(File); };
int Loop();
diff --git a/po/apt-all.pot b/po/apt-all.pot
index b68d801ea..4a70213f4 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -200,7 +200,7 @@ msgid "Please provide a name for this Disc, such as 'Debian 5.0.3 Disk 1'"
msgstr ""
#: cmdline/apt-cdrom.cc:92
-msgid "Please insert a Disc in the drive and press enter"
+msgid "Please insert a Disc in the drive and press [Enter]"
msgstr ""
#: cmdline/apt-cdrom.cc:140
@@ -1135,7 +1135,7 @@ msgstr ""
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
+msgid "%s (due to %s)"
msgstr ""
#: apt-private/private-output.cc:696
@@ -1529,19 +1529,23 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
+#, c-format
+msgid "Hit:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:88
-msgid "Get:"
+#, c-format
+msgid "Get:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:119
-msgid "Ign "
+#, c-format
+msgid "Ign:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
+#, c-format
+msgid "Err:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:150
@@ -1559,7 +1563,7 @@ msgstr ""
msgid ""
"Media change: please insert the disc labeled\n"
" '%s'\n"
-"in the drive '%s' and press enter\n"
+"in the drive '%s' and press [Enter]\n"
msgstr ""
#. Only warn if there are no sources.list.d.
@@ -1619,7 +1623,7 @@ msgstr ""
#: dselect/install:52 dselect/install:84 dselect/install:88 dselect/install:95
#: dselect/install:106 dselect/update:45
-msgid "Press enter to continue."
+msgid "Press [Enter] to continue."
msgstr ""
#: dselect/install:92
@@ -2053,7 +2057,7 @@ msgstr ""
#: apt-pkg/acquire-worker.cc:485
#, c-format
-msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
+msgid "Please insert the disc labeled: '%s' in the drive '%s' and press [Enter]."
msgstr ""
#: apt-pkg/cachefile.cc:94
diff --git a/po/ar.po b/po/ar.po
index e2b179d0e..9bf40386f 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -4,7 +4,7 @@
# Ossama M. Khayat <okhayat@yahoo.com>, 2005, 2006.
msgid ""
msgstr ""
-"Project-Id-Version: apt_po\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2006-10-20 21:28+0300\n"
@@ -1151,8 +1151,8 @@ msgstr "سيتم تغيير الحزم المبقاة التالية:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (بسبب %s) "
+msgid "%s (due to %s)"
+msgstr "%s (بسبب %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1555,20 +1555,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
+#, c-format
+msgid "Hit:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "جلب:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "جلب:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "تجاهل"
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "تجاهل:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "خطأ"
+#, c-format
+msgid "Err:%lu %s"
+msgstr "خطأ:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/ast.po b/po/ast.po
index 1efbbc1d2..07888ebe2 100644
--- a/po/ast.po
+++ b/po/ast.po
@@ -1261,8 +1261,8 @@ msgstr "Van camudase los siguientes paquetes reteníos:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (por %s) "
+msgid "%s (due to %s)"
+msgstr "%s (por %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1684,20 +1684,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Oxe "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Oxe:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Des:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Des:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/bg.po b/po/bg.po
index bbe6df3ae..6dc47f5bb 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -1294,8 +1294,8 @@ msgstr "Следните задържани пакети ще бъдат про�
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (поради %s) "
+msgid "%s (due to %s)"
+msgstr "%s (поради %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1720,20 +1720,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Поп "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Поп:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Изт:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Изт:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Игн "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Игн:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Грш "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Грш:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/bs.po b/po/bs.po
index 9cd1adc85..e68cee981 100644
--- a/po/bs.po
+++ b/po/bs.po
@@ -1159,7 +1159,7 @@ msgstr ""
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
+msgid "%s (due to %s)"
msgstr ""
#: apt-private/private-output.cc:696
@@ -1555,19 +1555,19 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
+msgid "Hit:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:88
-msgid "Get:"
+msgid "Get:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:119
-msgid "Ign "
+msgid "Ign:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
+msgid "Err:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:150
diff --git a/po/ca.po b/po/ca.po
index cdb3ceeb8..3f111875d 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -1276,8 +1276,8 @@ msgstr "Es canviaran els paquets retinguts següents:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (per %s) "
+msgid "%s (due to %s)"
+msgstr "%s (per %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1708,20 +1708,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Obj "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Obj:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Bai:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Bai:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/cs.po b/po/cs.po
index 76fc37b6b..2c732fc29 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2014-10-05 06:09+0200\n"
@@ -1301,8 +1301,8 @@ msgstr "Následující podržené balíky budou změněny:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (kvůli %s) "
+msgid "%s (due to %s)"
+msgstr "%s (kvůli %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1734,20 +1734,24 @@ msgid "Full Text Search"
msgstr "Fulltextové hledání"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Cíl "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Cíl:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Mám:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Mám:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/cy.po b/po/cy.po
index e29221cd1..7d2d6366e 100644
--- a/po/cy.po
+++ b/po/cy.po
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: APT\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2005-06-06 13:46+0100\n"
@@ -1288,8 +1288,8 @@ msgstr "Caiff y pecynnau wedi eu dal canlynol eu newid:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (oherwydd %s) "
+msgid "%s (due to %s)"
+msgstr "%s (oherwydd %s)"
#: apt-private/private-output.cc:696
#, fuzzy
@@ -1706,20 +1706,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Presennol "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Presennol:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Cyrchu:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Cyrchu:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Anwybyddu "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Anwybyddu:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Gwall "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Gwall:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/da.po b/po/da.po
index 53d3de059..f337879f6 100644
--- a/po/da.po
+++ b/po/da.po
@@ -1319,8 +1319,8 @@ msgstr "Følgende tilbageholdte pakker vil blive ændret:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (grundet %s) "
+msgid "%s (due to %s)"
+msgstr "%s (grundet %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1749,20 +1749,24 @@ msgid "Full Text Search"
msgstr "Fuldtekst-søgning"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Havde "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Havde:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Henter:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Henter:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ignorerer "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ignorerer:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Fejl "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Fejl:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/de.po b/po/de.po
index 85b0cb7ac..0b363c8de 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1364,8 +1364,8 @@ msgstr "Die folgenden zurückgehaltenen Pakete werden verändert:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (wegen %s) "
+msgid "%s (due to %s)"
+msgstr "%s (wegen %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1810,20 +1810,24 @@ msgid "Full Text Search"
msgstr "Volltextsuche"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "OK "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "OK:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Holen: "
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Holen:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ign:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Fehl "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Fehl:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/dz.po b/po/dz.po
index 8d1e57b35..12b6499f1 100644
--- a/po/dz.po
+++ b/po/dz.po
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt_po.pot\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2006-09-19 09:49+0530\n"
@@ -1256,7 +1256,7 @@ msgstr "འོག་གི་འཆང་ཡོད་པའི་ཐུམ་ས
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
+msgid "%s (due to %s)"
msgstr "%s( %s་གིས་སྦེ)"
#: apt-private/private-output.cc:696
@@ -1674,20 +1674,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "ཨེབ།"
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "ཨེབ།:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "ལེན:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "ལེན:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "ཨེལ་ཇི་ཨེན:"
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "ཨེལ་ཇི་ཨེན:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "ཨི་ཨར་ཨར།"
+#, c-format
+msgid "Err:%lu %s"
+msgstr "ཨི་ཨར་ཨར།:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/el.po b/po/el.po
index e0750b61e..bc3a784b9 100644
--- a/po/el.po
+++ b/po/el.po
@@ -14,7 +14,7 @@
# Θανάσης Νάτσης <natsisthanasis@gmail.com>, 2012.
msgid ""
msgstr ""
-"Project-Id-Version: apt_po_el\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2008-08-26 18:25+0300\n"
@@ -1272,8 +1272,8 @@ msgstr "Τα ακόλουθα κρατημένα πακέτα θα αλλαχθ�
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (λόγω του %s) "
+msgid "%s (due to %s)"
+msgstr "%s (λόγω του %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1695,20 +1695,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Hit "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Hit:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Φέρε:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Φέρε:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Αγνόησε "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Αγνόησε:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Σφάλμα "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Σφάλμα:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/es.po b/po/es.po
index e094ccafa..c071ffb4a 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1388,8 +1388,8 @@ msgstr "Se cambiarán los siguientes paquetes retenidos:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (por %s) "
+msgid "%s (due to %s)"
+msgstr "%s (por %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1820,20 +1820,24 @@ msgid "Full Text Search"
msgstr "Buscar en todo el texto"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Obj "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Obj:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Des:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Des:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/eu.po b/po/eu.po
index e268f6059..9e1647035 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -5,7 +5,7 @@
# Piarres Beobide <pi@beobide.net>, 2005, 2006, 2007, 2008, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: apt_po_eu\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2009-05-17 00:41+0200\n"
@@ -1257,8 +1257,8 @@ msgstr "Ondorengo pakete atxikiak aldatu egingo dira:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (arrazoia: %s) "
+msgid "%s (due to %s)"
+msgstr "%s (arrazoia: %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1678,20 +1678,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Atzituta "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Atzituta:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Hartu:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Hartu:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ez ikusi "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ez ikusi:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/fi.po b/po/fi.po
index d58fb9b04..5a5299255 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -1248,8 +1248,8 @@ msgstr "Seuraavat pysytetyt paketit muutetaan:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (syynä %s) "
+msgid "%s (due to %s)"
+msgstr "%s (syynä %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1669,20 +1669,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Löytyi "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Löytyi:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Nouda:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Nouda:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Siv "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Siv:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Vrhe "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Vrhe:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/fr.po b/po/fr.po
index cb9d82856..eb41bb221 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@
# Julien Patriarca <leatherface@debian.org>, 2013.
msgid ""
msgstr ""
-"Project-Id-Version: fr\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2013-12-15 16:45+0100\n"
@@ -1328,8 +1328,8 @@ msgstr "Les paquets retenus suivants seront changés :"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (en raison de %s) "
+msgid "%s (due to %s)"
+msgstr "%s (en raison de %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1507,7 +1507,7 @@ msgstr ""
#. careful with hard to type or special characters (like non-breaking spaces)
#: apt-private/private-install.cc:195
msgid "Yes, do as I say!"
-msgstr "Oui, faites ce que je vous dis !"
+msgstr "Oui, faites ce que je vous dis !"
#: apt-private/private-install.cc:197
#, c-format
@@ -1774,20 +1774,24 @@ msgid "Full Text Search"
msgstr "Recherche en texte intégral"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Atteint "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Atteint:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Réception de : "
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Réception de:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ign:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Err:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/gl.po b/po/gl.po
index d6bb1e92e..9ad26c4e7 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt_po_gl\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2011-05-12 15:28+0100\n"
@@ -1275,8 +1275,8 @@ msgstr "Vanse modificar os paquetes retidos seguintes:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (por mor de %s) "
+msgid "%s (due to %s)"
+msgstr "%s (por mor de %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1706,20 +1706,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Teño "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Teño:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Rcb:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Rcb:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/he.po b/po/he.po
index b3ef8f831..2c355f863 100644
--- a/po/he.po
+++ b/po/he.po
@@ -610,8 +610,8 @@ msgstr "החבילות המחוזקות הבאות ישונו:"
#: cmdline/apt-get.cc:545
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (בגלל %s) "
+msgid "%s (due to %s)"
+msgstr "%s (בגלל %s)"
#: cmdline/apt-get.cc:553
#, fuzzy
@@ -1188,19 +1188,23 @@ msgid ""
msgstr ""
#: cmdline/acqprogress.cc:55
-msgid "Hit "
+#, c-format
+msgid "Hit:%lu %s"
msgstr ""
#: cmdline/acqprogress.cc:79
-msgid "Get:"
+#, c-format
+msgid "Get:%lu %s"
msgstr ""
#: cmdline/acqprogress.cc:110
-msgid "Ign "
+#, c-format
+msgid "Ign:%lu %s"
msgstr ""
#: cmdline/acqprogress.cc:114
-msgid "Err "
+#, c-format
+msgid "Err:%lu %s"
msgstr ""
#: cmdline/acqprogress.cc:135
diff --git a/po/hu.po b/po/hu.po
index 313f3a492..9475a9f42 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -5,7 +5,7 @@
# Gabor Kelemen <kelemeng at gnome dot hu>, 2004, 2005, 2011, 2012.
msgid ""
msgstr ""
-"Project-Id-Version: apt trunk\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2012-06-25 17:09+0200\n"
@@ -1291,8 +1291,8 @@ msgstr "Az alábbi visszafogott csomagokat cserélem:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (%s miatt) "
+msgid "%s (due to %s)"
+msgstr "%s (%s miatt)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1714,20 +1714,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Találat "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Találat:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Letöltés:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Letöltés:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Mellőz "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Mellőz:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Hiba "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Hiba:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/it.po b/po/it.po
index 36173e92c..ca7a11027 100644
--- a/po/it.po
+++ b/po/it.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-04-11 08:08+0200\n"
"PO-Revision-Date: 2015-04-07 16:51+0100\n"
@@ -1323,8 +1323,8 @@ msgstr "I seguenti pacchetti bloccati saranno cambiati:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (a causa di %s) "
+msgid "%s (due to %s)"
+msgstr "%s (a causa di %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1766,21 +1766,24 @@ msgid "Full Text Search"
msgstr "Ricerca sul testo"
#: apt-private/acqprogress.cc:62
-msgid "Hit "
-msgstr "Trovato "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Trovato:%lu %s"
#: apt-private/acqprogress.cc:83
-msgid "Get:"
-msgstr "Scaricamento di:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Scaricamento di:%lu %s"
-# (ndt) questa non so cosa voglia dire
#: apt-private/acqprogress.cc:113
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:120
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:143
#, c-format
diff --git a/po/ja.po b/po/ja.po
index 6c49f2608..6e0e21418 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1324,8 +1324,8 @@ msgstr "以下の変更禁止パッケージは変更されます:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (%s のため) "
+msgid "%s (due to %s)"
+msgstr "%s (%s のため)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1750,20 +1750,24 @@ msgid "Full Text Search"
msgstr "全文検索"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "ヒット "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "ヒット:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "取得:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "取得:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "無視 "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "無視:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "エラー "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "エラー:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/km.po b/po/km.po
index 26bfe4361..263c30dea 100644
--- a/po/km.po
+++ b/po/km.po
@@ -8,7 +8,7 @@
# Khoem Sokhem <khoemsokhem@khmeros.info>, 2006.
msgid ""
msgstr ""
-"Project-Id-Version: apt_po_km\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2006-10-10 09:48+0700\n"
@@ -1242,8 +1242,8 @@ msgstr "កញ្ចប់​រង់ចាំ​ខាងក្រោម​ន
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (ដោយ​សារតែ​ %s) "
+msgid "%s (due to %s)"
+msgstr "%s (ដោយ​សារតែ​ %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1652,20 +1652,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "វាយ​"
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "វាយ​:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "យក​ ៖"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "យក​ ៖:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/ko.po b/po/ko.po
index 5479ab790..969736cca 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -3,7 +3,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2010-08-30 02:31+0900\n"
@@ -1250,8 +1250,8 @@ msgstr "고정되었던 다음 패키지를 바꿀 것입니다:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (%s때문에) "
+msgid "%s (due to %s)"
+msgstr "%s (%s때문에)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1666,20 +1666,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "기존 "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "기존:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "받기:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "받기:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "무시"
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "무시:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "오류 "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "오류:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/ku.po b/po/ku.po
index c14ca94bd..f66836634 100644
--- a/po/ku.po
+++ b/po/ku.po
@@ -6,7 +6,7 @@
# Erdal Ronahi <erdal dot ronahi at gmail dot com>, 2008.
msgid ""
msgstr ""
-"Project-Id-Version: apt-ku\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2008-05-08 12:48+0200\n"
@@ -1162,7 +1162,7 @@ msgstr ""
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
+msgid "%s (due to %s)"
msgstr "%s (ji ber %s)"
#: apt-private/private-output.cc:696
@@ -1558,20 +1558,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
+#, c-format
+msgid "Hit:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Anîn:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Anîn:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
+#, c-format
+msgid "Ign:%lu %s"
msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Çewt"
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Çewt:%lu %s"
#: apt-private/acqprogress.cc:150
#, fuzzy, c-format
diff --git a/po/lt.po b/po/lt.po
index b85a0fbe1..67ff3c8fb 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2008-08-02 01:47-0400\n"
@@ -1166,8 +1166,8 @@ msgstr "Bus pakeisti šie sulaikyti paketai:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (dėl %s) "
+msgid "%s (due to %s)"
+msgstr "%s (dėl %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1577,20 +1577,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Imamas "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Imamas:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Gauti:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Gauti:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ignoruotas "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ignoruotas:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Klaida "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Klaida:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/mr.po b/po/mr.po
index 286c5d859..69c133592 100644
--- a/po/mr.po
+++ b/po/mr.po
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2008-11-20 23:27+0530\n"
@@ -1240,7 +1240,7 @@ msgstr "पुढिल ठेवलेली पॅकेजेस बदलत
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
+msgid "%s (due to %s)"
msgstr "%s (च्या मुळे %s)"
#: apt-private/private-output.cc:696
@@ -1656,20 +1656,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "दाबा"
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "दाबा:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "मिळवा:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "मिळवा:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "आय.जी.एन."
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "आय.जी.एन.:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "दोष इ.आर.आर."
+#, c-format
+msgid "Err:%lu %s"
+msgstr "दोष इ.आर.आर.:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/nb.po b/po/nb.po
index 07247be4f..41563cecd 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -1258,8 +1258,8 @@ msgstr "Følgende pakker vil bli endret:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (pga. %s) "
+msgid "%s (due to %s)"
+msgstr "%s (pga. %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1684,20 +1684,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Funnet "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Funnet:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Hent:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Hent:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ign:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Feil "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Feil:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/ne.po b/po/ne.po
index 54dd771b4..83ffc1d37 100644
--- a/po/ne.po
+++ b/po/ne.po
@@ -4,7 +4,7 @@
# Shiva Pokharel <pokharelshiva@hotmail.com>, 2006.
msgid ""
msgstr ""
-"Project-Id-Version: apt_po\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2006-06-12 14:35+0545\n"
@@ -1240,8 +1240,8 @@ msgstr "निम्न भइरहेको प्याकेजहरू प
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (%s कारणले) "
+msgid "%s (due to %s)"
+msgstr "%s (%s कारणले)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1652,20 +1652,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "हान्नुहोस्"
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "हान्नुहोस्:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "प्राप्त गर्नुहोस्:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "प्राप्त गर्नुहोस्:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/nl.po b/po/nl.po
index 8d226dfef..2214ac65c 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1337,8 +1337,8 @@ msgstr "De volgende vastgehouden pakketten zullen gewijzigd worden:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (vanwege %s) "
+msgid "%s (due to %s)"
+msgstr "%s (vanwege %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1776,20 +1776,24 @@ msgid "Full Text Search"
msgstr "Volledige tekst doorzoeken"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Geraakt "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Geraakt:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Ophalen:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Ophalen:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Genegeerd "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Genegeerd:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Fout "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Fout:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/nn.po b/po/nn.po
index b3622b6cd..1f079e98a 100644
--- a/po/nn.po
+++ b/po/nn.po
@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt_nn\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2005-02-14 23:30+0100\n"
@@ -1251,8 +1251,8 @@ msgstr "Dei f�lgjande pakkane som er haldne tilbake vil verta endra:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (fordi %s) "
+msgid "%s (due to %s)"
+msgstr "%s (fordi %s)"
#: apt-private/private-output.cc:696
#, fuzzy
@@ -1668,20 +1668,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Treff "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Treff:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Hent:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Hent:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ign:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Feil "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Feil:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/pl.po b/po/pl.po
index 0dda22a47..f248841c9 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1302,8 +1302,8 @@ msgstr "Zostaną zmienione następujące zatrzymane pakiety:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (z powodu %s) "
+msgid "%s (due to %s)"
+msgstr "%s (z powodu %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1749,22 +1749,26 @@ msgstr ""
# Ujednolicono z aptitude
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Stary "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Stary:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Pobieranie:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Pobieranie:%lu %s"
# Wyrównane do Hit i Err.
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign. "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
# Wyrównane do Hit i Ign.
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Błąd "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Błąd:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/pt.po b/po/pt.po
index a4b1105f8..28b8be563 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -5,7 +5,7 @@
# Miguel Figueiredo <elmig@debianpt.org>, 2005-2012.
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2012-06-29 15:45+0100\n"
@@ -1291,8 +1291,8 @@ msgstr "Os seguintes pacotes mantidos serão mudados:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (devido a %s) "
+msgid "%s (due to %s)"
+msgstr "%s (devido a %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1718,20 +1718,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Hit "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Obter:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Obter:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 0c4d92d02..ad8c325c4 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -5,7 +5,7 @@
# Felipe Augusto van de Wiel (faw) <faw@debian.org>, 2006-2008.
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2008-11-17 02:33-0200\n"
@@ -1264,8 +1264,8 @@ msgstr "Os seguintes pacotes mantidos serão mudados:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (por causa de %s) "
+msgid "%s (due to %s)"
+msgstr "%s (por causa de %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1687,20 +1687,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Atingido "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Atingido:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Obter:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Obter:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/ro.po b/po/ro.po
index 63df026ab..68628517b 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -5,7 +5,7 @@
# Eddy Petrișor <eddy.petrisor@gmail.com>, 2008.
msgid ""
msgstr ""
-"Project-Id-Version: ro\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2008-11-15 02:21+0200\n"
@@ -1267,8 +1267,8 @@ msgstr "Următoarele pachete ținute vor fi schimbate:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (datorită %s) "
+msgid "%s (due to %s)"
+msgstr "%s (datorită %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1695,20 +1695,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Atins "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Atins:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Luat:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Luat:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ignorat "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ignorat:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Eroare"
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Eroare:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/ru.po b/po/ru.po
index 260bdd513..5e52b9234 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,4 +1,3 @@
-# translation of apt_0.7.25_ru.po to Russian
# Russian messages for the apt suite.
#
# Vadim Kutchin <amadis@chemi.komisc.ru>, 2002.
@@ -8,20 +7,20 @@
# Dmitry Astapov <adept@umc.com.ua>, 2004.
# Dmitry Astapov <adept@despammed.com>, 2004.
# Yuri Kozlov <kozlov.y@gmail.com>, 2004, 2005, 2006, 2007, 2008.
-# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2010, 2012.
+# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2010, 2012, 2015.
msgid ""
msgstr ""
-"Project-Id-Version: apt rev2227.1.3\n"
+"Project-Id-Version: apt 1.0.9.10\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2015-03-09 02:17+0100\n"
-"PO-Revision-Date: 2012-06-30 08:47+0400\n"
+"POT-Creation-Date: 2015-05-22 17:45+0200\n"
+"PO-Revision-Date: 2015-06-23 20:40+0300\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Lokalize 1.2\n"
+"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
@@ -30,144 +29,148 @@ msgstr ""
msgid "Package %s version %s has an unmet dep:\n"
msgstr "Пакет %s версии %s имеет неудовлетворённую зависимость:\n"
-#: cmdline/apt-cache.cc:320
+#: cmdline/apt-cache.cc:277
msgid "Total package names: "
msgstr "Всего имён пакетов: "
-#: cmdline/apt-cache.cc:322
+#: cmdline/apt-cache.cc:279
msgid "Total package structures: "
msgstr "Всего структур пакетов: "
-#: cmdline/apt-cache.cc:362
+#: cmdline/apt-cache.cc:319
msgid " Normal packages: "
msgstr " Обычных пакетов: "
-#: cmdline/apt-cache.cc:363
+#: cmdline/apt-cache.cc:320
msgid " Pure virtual packages: "
msgstr " Полностью виртуальных пакетов: "
-#: cmdline/apt-cache.cc:364
+#: cmdline/apt-cache.cc:321
msgid " Single virtual packages: "
msgstr " Одиночных виртуальных пакетов: "
-#: cmdline/apt-cache.cc:365
+#: cmdline/apt-cache.cc:322
msgid " Mixed virtual packages: "
msgstr " Смешанных виртуальных пакетов: "
-#: cmdline/apt-cache.cc:366
+#: cmdline/apt-cache.cc:323
msgid " Missing: "
msgstr " Отсутствует: "
-#: cmdline/apt-cache.cc:368
+#: cmdline/apt-cache.cc:325
msgid "Total distinct versions: "
msgstr "Всего уникальных версий: "
-#: cmdline/apt-cache.cc:370
+#: cmdline/apt-cache.cc:327
msgid "Total distinct descriptions: "
msgstr "Всего уникальных описаний: "
-#: cmdline/apt-cache.cc:372
+#: cmdline/apt-cache.cc:329
msgid "Total dependencies: "
msgstr "Всего зависимостей: "
-#: cmdline/apt-cache.cc:375
+#: cmdline/apt-cache.cc:332
msgid "Total ver/file relations: "
msgstr "Всего отношений Версия/Файл: "
-#: cmdline/apt-cache.cc:377
+#: cmdline/apt-cache.cc:334
msgid "Total Desc/File relations: "
msgstr "Всего отношений Описание/Файл: "
-#: cmdline/apt-cache.cc:379
+#: cmdline/apt-cache.cc:336
msgid "Total Provides mappings: "
msgstr "Всего отношений Provides: "
-#: cmdline/apt-cache.cc:433
+#: cmdline/apt-cache.cc:348
msgid "Total globbed strings: "
msgstr "Всего развёрнутых строк: "
-#: cmdline/apt-cache.cc:439
+#: cmdline/apt-cache.cc:362
+msgid "Total dependency version space: "
+msgstr "Всего информации о зависимостях: "
+
+#: cmdline/apt-cache.cc:367
msgid "Total slack space: "
msgstr "Пустого места в кэше: "
-#: cmdline/apt-cache.cc:454
+#: cmdline/apt-cache.cc:375
msgid "Total space accounted for: "
msgstr "Полное учтённое пространство: "
-#: cmdline/apt-cache.cc:590 cmdline/apt-cache.cc:1239
+#: cmdline/apt-cache.cc:506 cmdline/apt-cache.cc:1155
#: apt-private/private-show.cc:58
#, c-format
msgid "Package file %s is out of sync."
msgstr "Список пакетов %s рассинхронизирован."
-#: cmdline/apt-cache.cc:668 cmdline/apt-cache.cc:1526
-#: cmdline/apt-cache.cc:1528 cmdline/apt-cache.cc:1605 cmdline/apt-mark.cc:56
-#: cmdline/apt-mark.cc:103 cmdline/apt-mark.cc:229
+#: cmdline/apt-cache.cc:584 cmdline/apt-cache.cc:1442
+#: cmdline/apt-cache.cc:1444 cmdline/apt-cache.cc:1521 cmdline/apt-mark.cc:59
+#: cmdline/apt-mark.cc:106 cmdline/apt-mark.cc:232
#: apt-private/private-show.cc:171 apt-private/private-show.cc:173
msgid "No packages found"
msgstr "Не найдено ни одного пакета"
-#: cmdline/apt-cache.cc:1338 apt-private/private-search.cc:41
+#: cmdline/apt-cache.cc:1254 apt-private/private-search.cc:41
msgid "You must give at least one search pattern"
msgstr "Вы должны задать не менее одно шаблона поиска"
-#: cmdline/apt-cache.cc:1505
+#: cmdline/apt-cache.cc:1421
msgid "This command is deprecated. Please use 'apt-mark showauto' instead."
msgstr "Эта команда устарела. Используйте вместо неё «apt-mark showauto»."
-#: cmdline/apt-cache.cc:1600 apt-pkg/cacheset.cc:653
+#: cmdline/apt-cache.cc:1516 apt-pkg/cacheset.cc:596
#, c-format
msgid "Unable to locate package %s"
msgstr "Не удалось найти пакет %s"
-#: cmdline/apt-cache.cc:1630
+#: cmdline/apt-cache.cc:1546
msgid "Package files:"
msgstr "Списки пакетов:"
-#: cmdline/apt-cache.cc:1637 cmdline/apt-cache.cc:1728
+#: cmdline/apt-cache.cc:1553 cmdline/apt-cache.cc:1644
msgid "Cache is out of sync, can't x-ref a package file"
msgstr "Кэш рассинхронизирован, невозможно обнаружить ссылку на список пакетов"
#. Show any packages have explicit pins
-#: cmdline/apt-cache.cc:1651
+#: cmdline/apt-cache.cc:1567
msgid "Pinned packages:"
msgstr "Зафиксированные пакеты:"
-#: cmdline/apt-cache.cc:1663 cmdline/apt-cache.cc:1708
+#: cmdline/apt-cache.cc:1579 cmdline/apt-cache.cc:1624
msgid "(not found)"
msgstr "(не найдено)"
-#: cmdline/apt-cache.cc:1671
+#: cmdline/apt-cache.cc:1587
msgid " Installed: "
msgstr " Установлен: "
-#: cmdline/apt-cache.cc:1672
+#: cmdline/apt-cache.cc:1588
msgid " Candidate: "
msgstr " Кандидат: "
-#: cmdline/apt-cache.cc:1690 cmdline/apt-cache.cc:1698
+#: cmdline/apt-cache.cc:1606 cmdline/apt-cache.cc:1614
msgid "(none)"
msgstr "(отсутствует)"
-#: cmdline/apt-cache.cc:1705
+#: cmdline/apt-cache.cc:1621
msgid " Package pin: "
msgstr " Фиксатор пакета: "
#. Show the priority tables
-#: cmdline/apt-cache.cc:1714
+#: cmdline/apt-cache.cc:1630
msgid " Version table:"
msgstr " Таблица версий:"
-#: cmdline/apt-cache.cc:1827 cmdline/apt-cdrom.cc:208 cmdline/apt-config.cc:83
-#: cmdline/apt-get.cc:1610 cmdline/apt-helper.cc:86 cmdline/apt-mark.cc:446
-#: cmdline/apt.cc:42 cmdline/apt-extracttemplates.cc:222
-#: ftparchive/apt-ftparchive.cc:619 cmdline/apt-internal-solver.cc:47
-#: cmdline/apt-sortpkgs.cc:149
+#: cmdline/apt-cache.cc:1743 cmdline/apt-cdrom.cc:207 cmdline/apt-config.cc:83
+#: cmdline/apt-get.cc:1591 cmdline/apt-helper.cc:84 cmdline/apt-mark.cc:388
+#: cmdline/apt.cc:42 cmdline/apt-extracttemplates.cc:217
+#: ftparchive/apt-ftparchive.cc:620 cmdline/apt-internal-solver.cc:45
+#: cmdline/apt-sortpkgs.cc:147
#, c-format
msgid "%s %s for %s compiled on %s %s\n"
msgstr "%s %s для %s скомпилирован %s %s\n"
-#: cmdline/apt-cache.cc:1834
+#: cmdline/apt-cache.cc:1750
msgid ""
"Usage: apt-cache [options] command\n"
" apt-cache [options] showpkg pkg1 [pkg2 ...]\n"
@@ -237,28 +240,34 @@ msgstr ""
" -o=? Задать значение произвольной настройки, например, -o dir::cache=/tmp\n"
"Подробности в справочных страницах apt-cache(8) и apt.conf(5).\n"
-#: cmdline/apt-cdrom.cc:77
+#: cmdline/apt-cdrom.cc:76
msgid "Please provide a name for this Disc, such as 'Debian 5.0.3 Disk 1'"
msgstr "Задайте имя для этого диска, например «Debian 5.0.3 Disk 1»"
-#: cmdline/apt-cdrom.cc:92
+#: cmdline/apt-cdrom.cc:91
msgid "Please insert a Disc in the drive and press enter"
msgstr "Вставьте диск в устройство и нажмите ввод"
-#: cmdline/apt-cdrom.cc:140
+#: cmdline/apt-cdrom.cc:139
#, c-format
msgid "Failed to mount '%s' to '%s'"
msgstr "Не удалось примонтировать «%s» к «%s»"
-#: cmdline/apt-cdrom.cc:179
+#: cmdline/apt-cdrom.cc:178
msgid ""
"No CD-ROM could be auto-detected or found using the default mount point.\n"
"You may try the --cdrom option to set the CD-ROM mount point.\n"
"See 'man apt-cdrom' for more information about the CD-ROM auto-detection and "
"mount point."
msgstr ""
+"Не удалось автоматически обнаружить CD-ROM и в точке монтирования по "
+"умолчанию\n"
+"также ничего нет. Вы можете использовать параметр --cdrom, чтобы указать "
+"точку\n"
+"монтирования CD-ROM. Подробней о точке монтирования и автоматическом\n"
+"обнаружении CD-ROM смотрите в «man apt-cdrom»."
-#: cmdline/apt-cdrom.cc:183
+#: cmdline/apt-cdrom.cc:182
msgid "Repeat this process for the rest of the CDs in your set."
msgstr "Повторите этот процесс для всех имеющихся CD."
@@ -295,48 +304,48 @@ msgstr ""
" -o=? Задать значение произвольной настройке, например, -o dir::cache=/"
"tmp\n"
-#: cmdline/apt-get.cc:224
-#, fuzzy, c-format
+#: cmdline/apt-get.cc:245
+#, c-format
msgid "Can not find a package for architecture '%s'"
-msgstr "Не удалось найти пакет по регулярному выражению «%s»"
+msgstr "Не удалось найти пакет для архитектуры «%s»"
-#: cmdline/apt-get.cc:311
-#, fuzzy, c-format
+#: cmdline/apt-get.cc:327
+#, c-format
msgid "Can not find a package '%s' with version '%s'"
-msgstr "Не удалось найти пакет по регулярному выражению «%s»"
+msgstr "Не удалось найти пакет «%s» версии «%s»"
-#: cmdline/apt-get.cc:314
-#, fuzzy, c-format
+#: cmdline/apt-get.cc:330
+#, c-format
msgid "Can not find a package '%s' with release '%s'"
-msgstr "Не удалось найти пакет по регулярному выражению «%s»"
+msgstr "Не удалось найти пакет «%s» в выпуске «%s»"
-#: cmdline/apt-get.cc:358
+#: cmdline/apt-get.cc:367
#, c-format
msgid "Picking '%s' as source package instead of '%s'\n"
msgstr "Используется «%s» в качестве исходного пакета вместо «%s»\n"
-#: cmdline/apt-get.cc:414
-#, fuzzy, c-format
+#: cmdline/apt-get.cc:423
+#, c-format
msgid "Can not find version '%s' of package '%s'"
-msgstr "Игнорируется недоступная версия «%s» пакета «%s»"
+msgstr "Не удалось найти версию «%s» пакета «%s»"
-#: cmdline/apt-get.cc:445
+#: cmdline/apt-get.cc:454
#, c-format
msgid "Couldn't find package %s"
msgstr "Не удалось найти пакет %s"
-#: cmdline/apt-get.cc:450 cmdline/apt-mark.cc:78
-#: apt-private/private-install.cc:863
+#: cmdline/apt-get.cc:459 cmdline/apt-mark.cc:81
+#: apt-private/private-install.cc:865
#, c-format
msgid "%s set to manually installed.\n"
msgstr "%s установлен вручную.\n"
-#: cmdline/apt-get.cc:452 cmdline/apt-mark.cc:80
+#: cmdline/apt-get.cc:461 cmdline/apt-mark.cc:83
#, c-format
msgid "%s set to automatically installed.\n"
msgstr "%s выбран для автоматической установки.\n"
-#: cmdline/apt-get.cc:460 cmdline/apt-mark.cc:124
+#: cmdline/apt-get.cc:469 cmdline/apt-mark.cc:127
msgid ""
"This command is deprecated. Please use 'apt-mark auto' and 'apt-mark manual' "
"instead."
@@ -344,25 +353,25 @@ msgstr ""
"Эта команда устарела. Используйте вместо неё «apt-mark auto» и «apt-mark "
"manual»."
-#: cmdline/apt-get.cc:529 cmdline/apt-get.cc:537
+#: cmdline/apt-get.cc:538 cmdline/apt-get.cc:546
msgid "Internal error, problem resolver broke stuff"
msgstr "Внутренняя ошибка, решатель проблем всё поломал"
-#: cmdline/apt-get.cc:598
+#: cmdline/apt-get.cc:574 cmdline/apt-get.cc:611
msgid "Unable to lock the download directory"
msgstr "Невозможно заблокировать каталог, куда складываются скачиваемые файлы"
-#: cmdline/apt-get.cc:716
+#: cmdline/apt-get.cc:726
msgid "Must specify at least one package to fetch source for"
msgstr ""
"Укажите как минимум один пакет, исходный код которого необходимо получить"
-#: cmdline/apt-get.cc:760 cmdline/apt-get.cc:1074
+#: cmdline/apt-get.cc:766 cmdline/apt-get.cc:1071
#, c-format
msgid "Unable to find a source package for %s"
msgstr "Невозможно найти пакет с исходным кодом для %s"
-#: cmdline/apt-get.cc:780
+#: cmdline/apt-get.cc:786
#, c-format
msgid ""
"NOTICE: '%s' packaging is maintained in the '%s' version control system at:\n"
@@ -371,7 +380,7 @@ msgstr ""
"ВНИМАНИЕ: упаковка «%s» поддерживается в системе контроля версий «%s»:\n"
"%s\n"
-#: cmdline/apt-get.cc:785
+#: cmdline/apt-get.cc:791
#, c-format
msgid ""
"Please use:\n"
@@ -382,69 +391,80 @@ msgstr ""
"bzr branch %s\n"
"для получения последних (возможно не выпущенных) обновлений пакета.\n"
-#: cmdline/apt-get.cc:833
+#: cmdline/apt-get.cc:839
#, c-format
msgid "Skipping already downloaded file '%s'\n"
msgstr "Пропускаем уже скачанный файл «%s»\n"
+#: cmdline/apt-get.cc:873 cmdline/apt-get.cc:876
+#: apt-private/private-install.cc:187 apt-private/private-install.cc:190
+#, c-format
+msgid "Couldn't determine free space in %s"
+msgstr "Не удалось определить количество свободного места в %s"
+
+#: cmdline/apt-get.cc:886
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Недостаточно места в %s"
+
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB
-#: cmdline/apt-get.cc:863
+#: cmdline/apt-get.cc:895
#, c-format
msgid "Need to get %sB/%sB of source archives.\n"
msgstr "Необходимо получить %sб/%sб архивов исходного кода.\n"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: cmdline/apt-get.cc:868
+#: cmdline/apt-get.cc:900
#, c-format
msgid "Need to get %sB of source archives.\n"
msgstr "Необходимо получить %sб архивов исходного кода.\n"
-#: cmdline/apt-get.cc:874
+#: cmdline/apt-get.cc:906
#, c-format
msgid "Fetch source %s\n"
msgstr "Получение исходного кода %s\n"
-#: cmdline/apt-get.cc:899
+#: cmdline/apt-get.cc:924
msgid "Failed to fetch some archives."
msgstr "Некоторые архивы не удалось получить."
-#: cmdline/apt-get.cc:904 apt-private/private-install.cc:289
+#: cmdline/apt-get.cc:929 apt-private/private-install.cc:314
msgid "Download complete and in download only mode"
msgstr "Указан режим «только скачивание», и скачивание завершено"
-#: cmdline/apt-get.cc:929
+#: cmdline/apt-get.cc:954
#, c-format
msgid "Skipping unpack of already unpacked source in %s\n"
msgstr "Пропускается распаковка уже распакованного исходного кода в %s\n"
-#: cmdline/apt-get.cc:942
+#: cmdline/apt-get.cc:967
#, c-format
msgid "Unpack command '%s' failed.\n"
msgstr "Команда распаковки «%s» завершилась неудачно.\n"
-#: cmdline/apt-get.cc:943
+#: cmdline/apt-get.cc:968
#, c-format
msgid "Check if the 'dpkg-dev' package is installed.\n"
msgstr "Проверьте, установлен ли пакет «dpkg-dev».\n"
-#: cmdline/apt-get.cc:971
+#: cmdline/apt-get.cc:996
#, c-format
msgid "Build command '%s' failed.\n"
msgstr "Команда сборки «%s» завершилась неудачно.\n"
-#: cmdline/apt-get.cc:990
+#: cmdline/apt-get.cc:1015
msgid "Child process failed"
msgstr "Порождённый процесс завершился неудачно"
-#: cmdline/apt-get.cc:1009
+#: cmdline/apt-get.cc:1034
msgid "Must specify at least one package to check builddeps for"
msgstr ""
"Для проверки зависимостей для сборки необходимо указать как минимум один "
"пакет"
-#: cmdline/apt-get.cc:1030
+#: cmdline/apt-get.cc:1059
#, c-format
msgid ""
"No architecture information available for %s. See apt.conf(5) APT::"
@@ -453,27 +473,17 @@ msgstr ""
"У %s отсутствует информация об архитектуре. Для её настройки смотрите apt."
"conf(5) APT::Architectures"
-#: cmdline/apt-get.cc:1047
-#, c-format
-msgid "Note, using directory '%s' to get the build dependencies\n"
-msgstr ""
-
-#: cmdline/apt-get.cc:1057
-#, fuzzy, c-format
-msgid "Note, using file '%s' to get the build dependencies\n"
-msgstr "Обработка зависимостей для сборки завершилась неудачно"
-
-#: cmdline/apt-get.cc:1086 cmdline/apt-get.cc:1089
+#: cmdline/apt-get.cc:1083 cmdline/apt-get.cc:1086
#, c-format
msgid "Unable to get build-dependency information for %s"
msgstr "Невозможно получить информацию о зависимостях для сборки %s"
-#: cmdline/apt-get.cc:1109
+#: cmdline/apt-get.cc:1106
#, c-format
msgid "%s has no build depends.\n"
msgstr "%s не имеет зависимостей для сборки.\n"
-#: cmdline/apt-get.cc:1279
+#: cmdline/apt-get.cc:1276
#, c-format
msgid ""
"%s dependency for %s can't be satisfied because %s is not allowed on '%s' "
@@ -482,7 +492,7 @@ msgstr ""
"Зависимость типа %s для %s не может быть удовлетворена, так как %s не "
"разрешён для пакетов «%s»"
-#: cmdline/apt-get.cc:1297
+#: cmdline/apt-get.cc:1294
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because the package %s cannot be "
@@ -491,14 +501,14 @@ msgstr ""
"Зависимость типа %s для %s не может быть удовлетворена, так как пакет %s не "
"найден"
-#: cmdline/apt-get.cc:1320
+#: cmdline/apt-get.cc:1317
#, c-format
msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
msgstr ""
"Не удалось удовлетворить зависимость типа %s для пакета %s: Установленный "
"пакет %s новее, чем надо"
-#: cmdline/apt-get.cc:1359
+#: cmdline/apt-get.cc:1356
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because candidate version of "
@@ -507,7 +517,7 @@ msgstr ""
"Зависимость типа %s для %s не может быть удовлетворена, так как версия-"
"кандидат пакета %s не может удовлетворить требованиям по версии"
-#: cmdline/apt-get.cc:1365
+#: cmdline/apt-get.cc:1362
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because package %s has no candidate "
@@ -516,30 +526,30 @@ msgstr ""
"Зависимость типа %s для %s не может быть удовлетворена, так как пакет %s не "
"имеет версии-кандидата"
-#: cmdline/apt-get.cc:1388
+#: cmdline/apt-get.cc:1385
#, c-format
msgid "Failed to satisfy %s dependency for %s: %s"
msgstr "Невозможно удовлетворить зависимость типа %s для пакета %s: %s"
-#: cmdline/apt-get.cc:1403
+#: cmdline/apt-get.cc:1400
#, c-format
msgid "Build-dependencies for %s could not be satisfied."
msgstr "Зависимости для сборки %s не могут быть удовлетворены."
-#: cmdline/apt-get.cc:1408
+#: cmdline/apt-get.cc:1405
msgid "Failed to process build dependencies"
msgstr "Обработка зависимостей для сборки завершилась неудачно"
-#: cmdline/apt-get.cc:1501 cmdline/apt-get.cc:1516
+#: cmdline/apt-get.cc:1498 cmdline/apt-get.cc:1510
#, c-format
msgid "Changelog for %s (%s)"
msgstr "Changelog для %s (%s)"
-#: cmdline/apt-get.cc:1615
+#: cmdline/apt-get.cc:1596
msgid "Supported modules:"
msgstr "Поддерживаемые модули:"
-#: cmdline/apt-get.cc:1656
+#: cmdline/apt-get.cc:1637
msgid ""
"Usage: apt-get [options] command\n"
" apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -633,19 +643,17 @@ msgstr ""
#: cmdline/apt-helper.cc:36
msgid "Need one URL as argument"
-msgstr ""
+msgstr "В качестве аргумента требуется URL"
#: cmdline/apt-helper.cc:49
-#, fuzzy
msgid "Must specify at least one pair url/filename"
-msgstr ""
-"Укажите как минимум один пакет, исходный код которого необходимо получить"
+msgstr "Укажите, как минимум, одну пару url/имя файла"
-#: cmdline/apt-helper.cc:75 cmdline/apt-helper.cc:79
+#: cmdline/apt-helper.cc:73 cmdline/apt-helper.cc:77
msgid "Download Failed"
-msgstr ""
+msgstr "Ошибка при скачивании"
-#: cmdline/apt-helper.cc:93
+#: cmdline/apt-helper.cc:91
msgid ""
"Usage: apt-helper [options] command\n"
" apt-helper [options] download-file uri target-path\n"
@@ -658,56 +666,64 @@ msgid ""
"\n"
" This APT helper has Super Meep Powers.\n"
msgstr ""
+"Использование: apt-helper [параметры] команда\n"
+" apt-helper [параметры] download-file uri target-path\n"
+"\n"
+"apt-helper — вспомогательная программа для apt\n"
+"\n"
+"Команды:\n"
+" download-file — скачать файл по заданному uri в target-path\n"
+" auto-detect-proxy — определять прокси с помощью apt.conf\n"
+"\n"
+" В этой программе есть Super Meep Powers.\n"
-#: cmdline/apt-mark.cc:65
+#: cmdline/apt-mark.cc:68
#, c-format
msgid "%s can not be marked as it is not installed.\n"
msgstr "%s не может быть помечен, так он не установлен.\n"
-#: cmdline/apt-mark.cc:71
+#: cmdline/apt-mark.cc:74
#, c-format
msgid "%s was already set to manually installed.\n"
msgstr "%s уже помечен как установленный вручную.\n"
-#: cmdline/apt-mark.cc:73
+#: cmdline/apt-mark.cc:76
#, c-format
msgid "%s was already set to automatically installed.\n"
msgstr "%s уже помечен как установленный автоматически.\n"
-#: cmdline/apt-mark.cc:238
+#: cmdline/apt-mark.cc:241
#, c-format
msgid "%s was already set on hold.\n"
msgstr "%s уже помечен как зафиксированный.\n"
-#: cmdline/apt-mark.cc:240
+#: cmdline/apt-mark.cc:243
#, c-format
msgid "%s was already not hold.\n"
msgstr "%s уже помечен как не зафиксированный.\n"
-#: cmdline/apt-mark.cc:255 cmdline/apt-mark.cc:333 cmdline/apt-mark.cc:397
-#: apt-pkg/contrib/fileutl.cc:834 apt-pkg/contrib/gpgv.cc:192
-#: apt-pkg/deb/dpkgpm.cc:1303
+#: cmdline/apt-mark.cc:258 cmdline/apt-mark.cc:339 apt-pkg/deb/dpkgpm.cc:1317
+#: apt-pkg/contrib/fileutl.cc:813 apt-pkg/contrib/gpgv.cc:219
#, c-format
msgid "Waited for %s but it wasn't there"
msgstr "Ожидалось завершение процесса %s, но он не был запущен"
-#: cmdline/apt-mark.cc:270 cmdline/apt-mark.cc:380
+#: cmdline/apt-mark.cc:273 cmdline/apt-mark.cc:322
#, c-format
msgid "%s set on hold.\n"
msgstr "%s помечен как зафиксированный.\n"
-#: cmdline/apt-mark.cc:272 cmdline/apt-mark.cc:385
+#: cmdline/apt-mark.cc:275 cmdline/apt-mark.cc:327
#, c-format
msgid "Canceled hold on %s.\n"
msgstr "Отмена фиксации для %s.\n"
-#: cmdline/apt-mark.cc:337 cmdline/apt-mark.cc:403
+#: cmdline/apt-mark.cc:345
msgid "Executing dpkg failed. Are you root?"
msgstr ""
"Выполнение dpkg завершилось с ошибкой. У вас есть права суперпользователя?"
-#: cmdline/apt-mark.cc:450
-#, fuzzy
+#: cmdline/apt-mark.cc:392
msgid ""
"Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n"
"\n"
@@ -740,8 +756,13 @@ msgstr ""
"Также может показывать списки помеченных пакетов.\n"
"\n"
"Команды:\n"
-" auto - пометить указанные пакеты, как установленные автоматически\n"
-" manual - пометить указанные пакеты, как установленные вручную\n"
+" auto — пометить указанные пакеты, как установленные автоматически\n"
+" manual — пометить указанные пакеты, как установленные вручную\n"
+" hold — пометить пакет как зафиксированный\n"
+" unhold — снять метку пакета, что он зафиксирован\n"
+" showauto — вывести список автоматически установленных пакетов\n"
+" showmanual — вывести список пакетов установленных вручную\n"
+" showhold — вывести список зафиксированных пакетов\n"
"\n"
"Параметры:\n"
" -h эта справка\n"
@@ -753,7 +774,7 @@ msgstr ""
" -o=? задать значение произвольному параметру настройки,\n"
" например, -o dir::cache=/tmp\n"
"В справочных страницах apt-mark(8) и apt.conf(5)\n"
-"содержится подробная информация и описание параметров."
+"содержится дополнительная информация."
#: cmdline/apt.cc:47
msgid ""
@@ -776,6 +797,23 @@ msgid ""
"\n"
" edit-sources - edit the source information file\n"
msgstr ""
+"Использование: apt [параметры] команда\n"
+"\n"
+"Интерфейс командной строки для apt.\n"
+"Основные команды: \n"
+" list — показать список пакетов из указанных имён пакетов\n"
+" search — искать в описаниях пакетов\n"
+" show — показать дополнительные данные о пакете\n"
+"\n"
+" update — обновить список доступных пакетов\n"
+"\n"
+" install — установить пакеты\n"
+" remove — удалить пакеты\n"
+"\n"
+" upgrade — обновить систему, устанавливая/обновляя пакеты\n"
+" full-upgrade — обновить систему, удаляя/устанавливая/обновляя пакеты\n"
+"\n"
+" edit-sources — редактировать файл с источниками пакетов\n"
#: methods/cdrom.cc:203
#, c-format
@@ -807,12 +845,12 @@ msgstr "Диск не найден."
msgid "File not found"
msgstr "Файл не найден"
-#: methods/copy.cc:61 methods/gzip.cc:127 methods/rred.cc:598
+#: methods/copy.cc:61 methods/gzip.cc:117 methods/rred.cc:598
#: methods/rred.cc:608
msgid "Failed to stat"
msgstr "Не удалось получить атрибуты"
-#: methods/copy.cc:113 methods/gzip.cc:134 methods/rred.cc:605
+#: methods/copy.cc:105 methods/gzip.cc:124 methods/rred.cc:605
msgid "Failed to set modification time"
msgstr "Не удалось установить время модификации"
@@ -821,34 +859,34 @@ msgid "Invalid URI, local URIS must not start with //"
msgstr "Неправильный URI, локальный URI не должен начинаться с //"
#. Login must be before getpeername otherwise dante won't work.
-#: methods/ftp.cc:178
+#: methods/ftp.cc:177
msgid "Logging in"
msgstr "Вход в систему"
-#: methods/ftp.cc:184
+#: methods/ftp.cc:183
msgid "Unable to determine the peer name"
msgstr "Невозможно определить имя удалённого сервера"
-#: methods/ftp.cc:189
+#: methods/ftp.cc:188
msgid "Unable to determine the local name"
msgstr "Невозможно определить локальное имя"
-#: methods/ftp.cc:220 methods/ftp.cc:248
+#: methods/ftp.cc:219 methods/ftp.cc:247
#, c-format
msgid "The server refused the connection and said: %s"
msgstr "Сервер разорвал соединение и сообщил: %s"
-#: methods/ftp.cc:226
+#: methods/ftp.cc:225
#, c-format
msgid "USER failed, server said: %s"
msgstr "Команда USER не выполнена, сервер сообщил: %s"
-#: methods/ftp.cc:233
+#: methods/ftp.cc:232
#, c-format
msgid "PASS failed, server said: %s"
msgstr "Команда PASS не выполнена, сервер сообщил: %s"
-#: methods/ftp.cc:253
+#: methods/ftp.cc:252
msgid ""
"A proxy server was specified but no login script, Acquire::ftp::ProxyLogin "
"is empty."
@@ -856,127 +894,127 @@ msgstr ""
"Proxy-сервер указан, однако нет сценария входа в систему, Acquire::ftp::"
"ProxyLogin пуст."
-#: methods/ftp.cc:281
+#: methods/ftp.cc:280
#, c-format
msgid "Login script command '%s' failed, server said: %s"
msgstr ""
"Команда «%s» сценария входа в систему завершилась неудачно, сервер сообщил: "
"%s"
-#: methods/ftp.cc:307
+#: methods/ftp.cc:306
#, c-format
msgid "TYPE failed, server said: %s"
msgstr "Команда TYPE не выполнена, сервер сообщил: %s"
-#: methods/ftp.cc:345 methods/ftp.cc:457 methods/rsh.cc:195 methods/rsh.cc:243
+#: methods/ftp.cc:344 methods/ftp.cc:456 methods/rsh.cc:195 methods/rsh.cc:243
msgid "Connection timeout"
msgstr "Допустимое время ожидания для соединения истекло"
-#: methods/ftp.cc:351
+#: methods/ftp.cc:350
msgid "Server closed the connection"
msgstr "Сервер прервал соединение"
-#: methods/ftp.cc:354 methods/rsh.cc:202 apt-pkg/contrib/fileutl.cc:1515
-#: apt-pkg/contrib/fileutl.cc:1524 apt-pkg/contrib/fileutl.cc:1529
-#: apt-pkg/contrib/fileutl.cc:1531
+#: methods/ftp.cc:353 methods/rsh.cc:202 apt-pkg/contrib/fileutl.cc:1477
+#: apt-pkg/contrib/fileutl.cc:1486 apt-pkg/contrib/fileutl.cc:1491
+#: apt-pkg/contrib/fileutl.cc:1493
msgid "Read error"
msgstr "Ошибка чтения"
-#: methods/ftp.cc:361 methods/rsh.cc:209
+#: methods/ftp.cc:360 methods/rsh.cc:209
msgid "A response overflowed the buffer."
msgstr "Ответ переполнил буфер."
-#: methods/ftp.cc:378 methods/ftp.cc:390
+#: methods/ftp.cc:377 methods/ftp.cc:389
msgid "Protocol corruption"
msgstr "Искажение протокола"
-#: methods/ftp.cc:463 methods/rsh.cc:249 apt-pkg/contrib/fileutl.cc:911
-#: apt-pkg/contrib/fileutl.cc:1637 apt-pkg/contrib/fileutl.cc:1646
-#: apt-pkg/contrib/fileutl.cc:1651 apt-pkg/contrib/fileutl.cc:1653
-#: apt-pkg/contrib/fileutl.cc:1678
+#: methods/ftp.cc:462 methods/rsh.cc:249 apt-pkg/contrib/fileutl.cc:873
+#: apt-pkg/contrib/fileutl.cc:1599 apt-pkg/contrib/fileutl.cc:1608
+#: apt-pkg/contrib/fileutl.cc:1613 apt-pkg/contrib/fileutl.cc:1615
+#: apt-pkg/contrib/fileutl.cc:1640
msgid "Write error"
msgstr "Ошибка записи"
-#: methods/ftp.cc:702 methods/ftp.cc:708 methods/ftp.cc:743
+#: methods/ftp.cc:701 methods/ftp.cc:707 methods/ftp.cc:742
msgid "Could not create a socket"
msgstr "Не удалось создать сокет"
-#: methods/ftp.cc:713
+#: methods/ftp.cc:712
msgid "Could not connect data socket, connection timed out"
msgstr ""
"Не удалось присоединиться к сокету данных, время на установление соединения "
"истекло"
-#: methods/ftp.cc:717 methods/connect.cc:116
+#: methods/ftp.cc:716 methods/connect.cc:116
msgid "Failed"
msgstr "Неудачно"
-#: methods/ftp.cc:719
+#: methods/ftp.cc:718
msgid "Could not connect passive socket."
msgstr "Невозможно присоединить пассивный сокет"
-#: methods/ftp.cc:736
+#: methods/ftp.cc:735
msgid "getaddrinfo was unable to get a listening socket"
msgstr "Вызов getaddrinfo не смог получить сокет"
-#: methods/ftp.cc:750
+#: methods/ftp.cc:749
msgid "Could not bind a socket"
msgstr "Невозможно присоединиться к сокету"
-#: methods/ftp.cc:754
+#: methods/ftp.cc:753
msgid "Could not listen on the socket"
msgstr "Не удалось принимать соединения на сокете"
-#: methods/ftp.cc:761
+#: methods/ftp.cc:760
msgid "Could not determine the socket's name"
msgstr "Не удалось определить имя сокета"
-#: methods/ftp.cc:793
+#: methods/ftp.cc:792
msgid "Unable to send PORT command"
msgstr "Невозможно послать команду PORT"
-#: methods/ftp.cc:803
+#: methods/ftp.cc:802
#, c-format
msgid "Unknown address family %u (AF_*)"
msgstr "Неизвестное семейство адресов %u (AF_*)"
-#: methods/ftp.cc:812
+#: methods/ftp.cc:811
#, c-format
msgid "EPRT failed, server said: %s"
msgstr "Команда EPRT не выполнена, сервер сообщил: %s"
-#: methods/ftp.cc:832
+#: methods/ftp.cc:831
msgid "Data socket connect timed out"
msgstr "Время установления соединения для сокета данных истекло"
-#: methods/ftp.cc:839
+#: methods/ftp.cc:838
msgid "Unable to accept connection"
msgstr "Невозможно принять соединение"
-#: methods/ftp.cc:879 methods/server.cc:362 methods/rsh.cc:319
+#: methods/ftp.cc:877 methods/server.cc:367 methods/rsh.cc:319
msgid "Problem hashing file"
msgstr "Проблема при хешировании файла"
-#: methods/ftp.cc:892
+#: methods/ftp.cc:890
#, c-format
msgid "Unable to fetch file, server said '%s'"
msgstr "Невозможно получить файл, сервер сообщил: «%s»"
-#: methods/ftp.cc:907 methods/rsh.cc:338
+#: methods/ftp.cc:905 methods/rsh.cc:338
msgid "Data socket timed out"
msgstr "Время ожидания соединения для сокета данных истекло"
-#: methods/ftp.cc:944
+#: methods/ftp.cc:935
#, c-format
msgid "Data transfer failed, server said '%s'"
msgstr "Передача данных завершилась неудачно, сервер сообщил: «%s»"
#. Get the files information
-#: methods/ftp.cc:1027
+#: methods/ftp.cc:1014
msgid "Query"
msgstr "Запрос"
-#: methods/ftp.cc:1141
+#: methods/ftp.cc:1128
msgid "Unable to invoke "
msgstr "Невозможно вызвать "
@@ -1028,9 +1066,9 @@ msgid "Temporary failure resolving '%s'"
msgstr "Временная ошибка при попытке получить IP-адрес «%s»"
#: methods/connect.cc:209
-#, fuzzy, c-format
+#, c-format
msgid "System error resolving '%s:%s'"
-msgstr "Что-то странное произошло при определении «%s:%s» (%i - %s)"
+msgstr "Системная ошибка при определении «%s:%s»"
#: methods/connect.cc:211
#, c-format
@@ -1042,39 +1080,40 @@ msgstr "Что-то странное произошло при определе�
msgid "Unable to connect to %s:%s:"
msgstr "Невозможно соединиться с %s: %s:"
-#: methods/gpgv.cc:158
+#: methods/gpgv.cc:168
msgid ""
"Internal error: Good signature, but could not determine key fingerprint?!"
msgstr ""
"Внутренняя ошибка: Правильная подпись, но не удалось определить отпечаток "
"ключа?!"
-#: methods/gpgv.cc:162
+#: methods/gpgv.cc:172
msgid "At least one invalid signature was encountered."
msgstr "Найдена как минимум одна неправильная подпись."
-#: methods/gpgv.cc:164
+#: methods/gpgv.cc:174
msgid "Could not execute 'apt-key' to verify signature (is gnupg installed?)"
-msgstr ""
-"Не удалось выполнить «apt-key» для проверки подписи (gnupg установлена?)"
+msgstr "Не удалось выполнить «apt-key» для проверки подписи (gnupg установлена?)"
#. TRANSLATORS: %s is a single techy word like 'NODATA'
-#: methods/gpgv.cc:170
+#: methods/gpgv.cc:180
#, c-format
msgid ""
"Clearsigned file isn't valid, got '%s' (does the network require "
"authentication?)"
msgstr ""
+"Некорректный подписанный файл, получено «%s» (возможно в сети "
+"требуется аутентификация?)"
-#: methods/gpgv.cc:174
+#: methods/gpgv.cc:184
msgid "Unknown error executing apt-key"
msgstr "Неизвестная ошибка при выполнении apt-key"
-#: methods/gpgv.cc:207 methods/gpgv.cc:214
+#: methods/gpgv.cc:217 methods/gpgv.cc:224
msgid "The following signatures were invalid:\n"
msgstr "Следующие подписи неверные:\n"
-#: methods/gpgv.cc:221
+#: methods/gpgv.cc:231
msgid ""
"The following signatures couldn't be verified because the public key is not "
"available:\n"
@@ -1082,35 +1121,35 @@ msgstr ""
"Следующие подписи не могут быть проверены, так как недоступен открытый "
"ключ:\n"
-#: methods/gzip.cc:79
+#: methods/gzip.cc:69
msgid "Empty files can't be valid archives"
msgstr "Пустые файлы не могут быть допустимыми архивами"
-#: methods/http.cc:517
+#: methods/http.cc:513
msgid "Error writing to the file"
msgstr "Ошибка записи в файл"
-#: methods/http.cc:531
+#: methods/http.cc:527
msgid "Error reading from server. Remote end closed connection"
msgstr "Ошибка чтения, удалённый сервер прервал соединение"
-#: methods/http.cc:533
+#: methods/http.cc:529
msgid "Error reading from server"
msgstr "Ошибка чтения с сервера"
-#: methods/http.cc:569
+#: methods/http.cc:565
msgid "Error writing to file"
msgstr "Ошибка записи в файл"
-#: methods/http.cc:629
+#: methods/http.cc:625
msgid "Select failed"
msgstr "Ошибка в select"
-#: methods/http.cc:634
+#: methods/http.cc:630
msgid "Connection timed out"
msgstr "Время ожидания для соединения истекло"
-#: methods/http.cc:657
+#: methods/http.cc:653
msgid "Error writing to output file"
msgstr "Ошибка записи в выходной файл"
@@ -1130,327 +1169,69 @@ msgstr "Http-сервер послал неверный заголовок"
msgid "The HTTP server sent an invalid Content-Length header"
msgstr "Http сервер послал неверный заголовок Content-Length"
-#: methods/server.cc:193
+#: methods/server.cc:200
msgid "The HTTP server sent an invalid Content-Range header"
msgstr "Http-сервер послал неверный заголовок Content-Range"
-#: methods/server.cc:195
+#: methods/server.cc:202
msgid "This HTTP server has broken range support"
msgstr "Этот HTTP-сервер не поддерживает скачивание фрагментов файлов"
-#: methods/server.cc:219
+#: methods/server.cc:229
msgid "Unknown date format"
msgstr "Неизвестный формат данных"
-#: methods/server.cc:506
+#: methods/server.cc:504
msgid "Bad header data"
msgstr "Неверный заголовок данных"
-#: methods/server.cc:523 methods/server.cc:617
+#: methods/server.cc:521 methods/server.cc:577
msgid "Connection failed"
msgstr "Соединение разорвано"
-#: methods/server.cc:589
-#, c-format
-msgid ""
-"Automatically disabled %s due to incorrect response from server/proxy. (man "
-"5 apt.conf)"
-msgstr ""
-
-#: methods/server.cc:712
+#: methods/server.cc:669
msgid "Internal error"
msgstr "Внутренняя ошибка"
-#: apt-private/private-list.cc:121
-msgid "Listing"
-msgstr ""
-
-#: apt-private/private-list.cc:151
-#, c-format
-msgid "There is %i additional version. Please use the '-a' switch to see it"
-msgid_plural ""
-"There are %i additional versions. Please use the '-a' switch to see them."
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
-
-#: apt-private/private-cachefile.cc:95
-msgid "Correcting dependencies..."
-msgstr "Исправление зависимостей…"
-
-#: apt-private/private-cachefile.cc:98
-msgid " failed."
-msgstr " не удалось."
-
-#: apt-private/private-cachefile.cc:101
-msgid "Unable to correct dependencies"
-msgstr "Невозможно скорректировать зависимости"
-
-#: apt-private/private-cachefile.cc:104
-msgid "Unable to minimize the upgrade set"
-msgstr "Невозможно минимизировать набор обновлений"
-
-#: apt-private/private-cachefile.cc:106
-msgid " Done"
-msgstr " Готово"
-
-#: apt-private/private-cachefile.cc:110
-msgid "You might want to run 'apt-get -f install' to correct these."
-msgstr ""
-"Возможно, для исправления этих ошибок вы захотите воспользоваться «apt-get -"
-"f install»."
-
-#: apt-private/private-cachefile.cc:113
-msgid "Unmet dependencies. Try using -f."
-msgstr "Неудовлетворённые зависимости. Попытайтесь использовать -f."
-
-#: apt-private/private-output.cc:103 apt-private/private-show.cc:84
-#: apt-private/private-show.cc:89
-msgid "unknown"
-msgstr ""
-
-#: apt-private/private-output.cc:265
-#, fuzzy, c-format
-msgid "[installed,upgradable to: %s]"
-msgstr " [Установлен]"
-
-#: apt-private/private-output.cc:268
-#, fuzzy
-msgid "[installed,local]"
-msgstr " [Установлен]"
-
-#: apt-private/private-output.cc:270
-msgid "[installed,auto-removable]"
-msgstr ""
-
-#: apt-private/private-output.cc:272
-#, fuzzy
-msgid "[installed,automatic]"
-msgstr " [Установлен]"
-
-#: apt-private/private-output.cc:274
-#, fuzzy
-msgid "[installed]"
-msgstr " [Установлен]"
-
-#: apt-private/private-output.cc:277
-#, c-format
-msgid "[upgradable from: %s]"
-msgstr ""
-
-#: apt-private/private-output.cc:281
-msgid "[residual-config]"
-msgstr ""
-
-#: apt-private/private-output.cc:455
-#, c-format
-msgid "but %s is installed"
-msgstr "но %s уже установлен"
-
-#: apt-private/private-output.cc:457
-#, c-format
-msgid "but %s is to be installed"
-msgstr "но %s будет установлен"
-
-#: apt-private/private-output.cc:464
-msgid "but it is not installable"
-msgstr "но он не может быть установлен"
-
-#: apt-private/private-output.cc:466
-msgid "but it is a virtual package"
-msgstr "но это виртуальный пакет"
-
-#: apt-private/private-output.cc:469
-msgid "but it is not installed"
-msgstr "но он не установлен"
-
-#: apt-private/private-output.cc:469
-msgid "but it is not going to be installed"
-msgstr "но он не будет установлен"
-
-#: apt-private/private-output.cc:474
-msgid " or"
-msgstr " или"
-
-#: apt-private/private-output.cc:488 apt-private/private-output.cc:500
-msgid "The following packages have unmet dependencies:"
-msgstr "Пакеты, имеющие неудовлетворённые зависимости:"
-
-#: apt-private/private-output.cc:523
-msgid "The following NEW packages will be installed:"
-msgstr "НОВЫЕ пакеты, которые будут установлены:"
-
-#: apt-private/private-output.cc:549
-msgid "The following packages will be REMOVED:"
-msgstr "Пакеты, которые будут УДАЛЕНЫ:"
-
-#: apt-private/private-output.cc:571
-msgid "The following packages have been kept back:"
-msgstr "Пакеты, которые будут оставлены в неизменном виде:"
-
-#: apt-private/private-output.cc:592
-msgid "The following packages will be upgraded:"
-msgstr "Пакеты, которые будут обновлены:"
-
-#: apt-private/private-output.cc:613
-msgid "The following packages will be DOWNGRADED:"
-msgstr "Пакеты, будут заменены на более СТАРЫЕ версии:"
-
-#: apt-private/private-output.cc:633
-msgid "The following held packages will be changed:"
-msgstr ""
-"Пакеты, которые должны были бы остаться без изменений, но будут заменены:"
-
-#: apt-private/private-output.cc:688
-#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (вследствие %s) "
-
-#: apt-private/private-output.cc:696
-msgid ""
-"WARNING: The following essential packages will be removed.\n"
-"This should NOT be done unless you know exactly what you are doing!"
-msgstr ""
-"ВНИМАНИЕ: Эти существенно важные пакеты будут удалены.\n"
-"НЕ ДЕЛАЙТЕ этого, если вы НЕ представляете себе все возможные последствия!"
-
-#: apt-private/private-output.cc:727
-#, c-format
-msgid "%lu upgraded, %lu newly installed, "
-msgstr "обновлено %lu, установлено %lu новых пакетов, "
-
-#: apt-private/private-output.cc:731
-#, c-format
-msgid "%lu reinstalled, "
-msgstr "переустановлено %lu переустановлено, "
-
-#: apt-private/private-output.cc:733
-#, c-format
-msgid "%lu downgraded, "
-msgstr "%lu пакетов заменены на старые версии, "
-
-#: apt-private/private-output.cc:735
-#, c-format
-msgid "%lu to remove and %lu not upgraded.\n"
-msgstr "для удаления отмечено %lu пакетов, и %lu пакетов не обновлено.\n"
-
-#: apt-private/private-output.cc:739
-#, c-format
-msgid "%lu not fully installed or removed.\n"
-msgstr "не установлено до конца или удалено %lu пакетов.\n"
-
-#. TRANSLATOR: Yes/No question help-text: defaulting to Y[es]
-#. e.g. "Do you want to continue? [Y/n] "
-#. The user has to answer with an input matching the
-#. YESEXPR/NOEXPR defined in your l10n.
-#: apt-private/private-output.cc:761
-msgid "[Y/n]"
-msgstr "[Д/н]"
-
-#. TRANSLATOR: Yes/No question help-text: defaulting to N[o]
-#. e.g. "Should this file be removed? [y/N] "
-#. The user has to answer with an input matching the
-#. YESEXPR/NOEXPR defined in your l10n.
-#: apt-private/private-output.cc:767
-msgid "[y/N]"
-msgstr ""
-
-#. TRANSLATOR: "Yes" answer printed for a yes/no question if --assume-yes is set
-#: apt-private/private-output.cc:778
-msgid "Y"
-msgstr "д"
-
-#. TRANSLATOR: "No" answer printed for a yes/no question if --assume-no is set
-#: apt-private/private-output.cc:784
-msgid "N"
-msgstr "н"
-
-#: apt-private/private-output.cc:806 apt-pkg/cachefilter.cc:40
-#, c-format
-msgid "Regex compilation error - %s"
-msgstr "Ошибка компиляции регулярного выражения — %s"
-
-#: apt-private/private-update.cc:31
-msgid "The update command takes no arguments"
-msgstr "Команде update не нужны аргументы"
-
-#: apt-private/private-update.cc:95
-#, c-format
-msgid "%i package can be upgraded. Run 'apt list --upgradable' to see it.\n"
-msgid_plural ""
-"%i packages can be upgraded. Run 'apt list --upgradable' to see them.\n"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
-
-#: apt-private/private-update.cc:99
-msgid "All packages are up to date."
-msgstr ""
-
#: apt-private/private-cacheset.cc:37 apt-private/private-search.cc:65
msgid "Sorting"
-msgstr ""
+msgstr "Сортировка"
-#: apt-private/private-show.cc:156
-#, c-format
-msgid "There is %i additional record. Please use the '-a' switch to see it"
-msgid_plural ""
-"There are %i additional records. Please use the '-a' switch to see them."
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
-
-#: apt-private/private-show.cc:163
-msgid "not a real package (virtual)"
-msgstr ""
-
-#: apt-private/private-main.cc:32
-msgid ""
-"NOTE: This is only a simulation!\n"
-" apt-get needs root privileges for real execution.\n"
-" Keep also in mind that locking is deactivated,\n"
-" so don't depend on the relevance to the real current situation!"
-msgstr ""
-"ЗАМЕЧАНИЕ: Производить только имитация работы!\n"
-" Для реальной работы apt-get требуются права суперпользователя.\n"
-" Учтите, что блокировка не используется,\n"
-" поэтому нет полного соответствия с текущей реальной ситуацией!"
-
-#: apt-private/private-install.cc:81
+#: apt-private/private-install.cc:82
msgid "Internal error, InstallPackages was called with broken packages!"
msgstr ""
"Внутренняя ошибка, InstallPackages была вызвана с неработоспособными "
"пакетами!"
-#: apt-private/private-install.cc:90
+#: apt-private/private-install.cc:91
msgid "Packages need to be removed but remove is disabled."
msgstr "Пакеты необходимо удалить, но удаление запрещено."
-#: apt-private/private-install.cc:109
+#: apt-private/private-install.cc:110
msgid "Internal error, Ordering didn't finish"
msgstr "Внутренняя ошибка, Ordering не завершилась"
-#: apt-private/private-install.cc:147
+#: apt-private/private-install.cc:148
msgid "How odd... The sizes didn't match, email apt@packages.debian.org"
msgstr "Странно. Несовпадение размеров, напишите на apt@packages.debian.org"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:154
+#: apt-private/private-install.cc:155
#, c-format
msgid "Need to get %sB/%sB of archives.\n"
msgstr "Необходимо скачать %sB/%sB архивов.\n"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:159
+#: apt-private/private-install.cc:160
#, c-format
msgid "Need to get %sB of archives.\n"
msgstr "Необходимо скачать %sБ архивов.\n"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:166
+#: apt-private/private-install.cc:167
#, c-format
msgid "After this operation, %sB of additional disk space will be used.\n"
msgstr ""
@@ -1459,18 +1240,23 @@ msgstr ""
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:171
+#: apt-private/private-install.cc:172
#, c-format
msgid "After this operation, %sB disk space will be freed.\n"
msgstr ""
"После данной операции, объём занятого дискового пространства уменьшится на "
"%sB.\n"
-#: apt-private/private-install.cc:185 apt-private/private-download.cc:117
+#: apt-private/private-install.cc:200
+#, c-format
+msgid "You don't have enough free space in %s."
+msgstr "Недостаточно свободного места в %s."
+
+#: apt-private/private-install.cc:210 apt-private/private-download.cc:59
msgid "There are problems and -y was used without --force-yes"
msgstr "Существуют проблемы, а параметр -y указан без --force-yes"
-#: apt-private/private-install.cc:191 apt-private/private-install.cc:213
+#: apt-private/private-install.cc:216 apt-private/private-install.cc:238
msgid "Trivial Only specified but this is not a trivial operation."
msgstr ""
"Запрошено выполнение только тривиальных операций, но это не тривиальная "
@@ -1478,11 +1264,11 @@ msgstr ""
#. TRANSLATOR: This string needs to be typed by the user as a confirmation, so be
#. careful with hard to type or special characters (like non-breaking spaces)
-#: apt-private/private-install.cc:195
+#: apt-private/private-install.cc:220
msgid "Yes, do as I say!"
msgstr "Да, делать, как я скажу!"
-#: apt-private/private-install.cc:197
+#: apt-private/private-install.cc:222
#, c-format
msgid ""
"You are about to do something potentially harmful.\n"
@@ -1493,19 +1279,19 @@ msgstr ""
"Чтобы продолжить, введите фразу: «%s»\n"
" ?] "
-#: apt-private/private-install.cc:203 apt-private/private-install.cc:221
+#: apt-private/private-install.cc:228 apt-private/private-install.cc:246
msgid "Abort."
msgstr "Аварийное завершение."
-#: apt-private/private-install.cc:218
+#: apt-private/private-install.cc:243
msgid "Do you want to continue?"
msgstr "Хотите продолжить?"
-#: apt-private/private-install.cc:288
+#: apt-private/private-install.cc:313
msgid "Some files failed to download"
msgstr "Некоторые файлы скачать не удалось"
-#: apt-private/private-install.cc:295
+#: apt-private/private-install.cc:320
msgid ""
"Unable to fetch some archives, maybe run apt-get update or try with --fix-"
"missing?"
@@ -1513,19 +1299,19 @@ msgstr ""
"Невозможно получить некоторые архивы, вероятно надо запустить apt-get update "
"или попытаться повторить запуск с ключом --fix-missing"
-#: apt-private/private-install.cc:299
+#: apt-private/private-install.cc:324
msgid "--fix-missing and media swapping is not currently supported"
msgstr "--fix-missing и смена носителя в данный момент не поддерживаются"
-#: apt-private/private-install.cc:304
+#: apt-private/private-install.cc:329
msgid "Unable to correct missing packages."
msgstr "Невозможно исправить ситуацию с пропущенными пакетами."
-#: apt-private/private-install.cc:305
+#: apt-private/private-install.cc:330
msgid "Aborting install."
msgstr "Аварийное завершение установки."
-#: apt-private/private-install.cc:341
+#: apt-private/private-install.cc:366
msgid ""
"The following package disappeared from your system as\n"
"all files have been overwritten by other packages:"
@@ -1542,15 +1328,15 @@ msgstr[2] ""
"Следующие пакеты исчез из системы, так как все их файлы\n"
"теперь берутся из других пакетов:"
-#: apt-private/private-install.cc:345
+#: apt-private/private-install.cc:370
msgid "Note: This is done automatically and on purpose by dpkg."
msgstr "Замечание: это сделано автоматически и специально программой dpkg."
-#: apt-private/private-install.cc:366
+#: apt-private/private-install.cc:391
msgid "We are not supposed to delete stuff, can't start AutoRemover"
msgstr "Не предполагалось удалять stuff, невозможно запустить AutoRemover"
-#: apt-private/private-install.cc:474
+#: apt-private/private-install.cc:499
msgid ""
"Hmm, seems like the AutoRemover destroyed something which really\n"
"shouldn't happen. Please file a bug report against apt."
@@ -1568,15 +1354,15 @@ msgstr ""
#. "that package should be filed.") << std::endl;
#. }
#.
-#: apt-private/private-install.cc:477 apt-private/private-install.cc:627
+#: apt-private/private-install.cc:502 apt-private/private-install.cc:653
msgid "The following information may help to resolve the situation:"
msgstr "Следующая информация, возможно, поможет вам:"
-#: apt-private/private-install.cc:481
+#: apt-private/private-install.cc:506
msgid "Internal Error, AutoRemover broke stuff"
msgstr "Внутренняя ошибка, AutoRemover всё поломал"
-#: apt-private/private-install.cc:488
+#: apt-private/private-install.cc:513
msgid ""
"The following package was automatically installed and is no longer required:"
msgid_plural ""
@@ -1588,7 +1374,7 @@ msgstr[1] ""
msgstr[2] ""
"Следующие пакеты устанавливались автоматически и больше не требуются:"
-#: apt-private/private-install.cc:492
+#: apt-private/private-install.cc:517
#, c-format
msgid "%lu package was automatically installed and is no longer required.\n"
msgid_plural ""
@@ -1597,20 +1383,20 @@ msgstr[0] "%lu пакет был установлен автоматически
msgstr[1] "%lu пакета было установлено автоматически и больше не требуется.\n"
msgstr[2] "%lu пакетов было установлены автоматически и больше не требуются.\n"
-#: apt-private/private-install.cc:494
+#: apt-private/private-install.cc:519
msgid "Use 'apt-get autoremove' to remove it."
msgid_plural "Use 'apt-get autoremove' to remove them."
msgstr[0] "Для его удаления используйте «apt-get autoremove»."
msgstr[1] "Для их удаления используйте «apt-get autoremove»."
msgstr[2] "Для их удаления используйте «apt-get autoremove»."
-#: apt-private/private-install.cc:587
+#: apt-private/private-install.cc:612
msgid "You might want to run 'apt-get -f install' to correct these:"
msgstr ""
"Возможно, для исправления этих ошибок вы захотите воспользоваться «apt-get -"
"f install»:"
-#: apt-private/private-install.cc:589
+#: apt-private/private-install.cc:614
msgid ""
"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
"solution)."
@@ -1618,7 +1404,7 @@ msgstr ""
"Неудовлетворённые зависимости. Попытайтесь выполнить «apt-get -f install», "
"не указывая имени пакета, (или найдите другое решение)."
-#: apt-private/private-install.cc:612
+#: apt-private/private-install.cc:638
msgid ""
"Some packages could not be installed. This may mean that you have\n"
"requested an impossible situation or if you are using the unstable\n"
@@ -1629,145 +1415,389 @@ msgstr ""
"или же используете нестабильную версию дистрибутива, где запрошенные вами\n"
"пакеты ещё не созданы или были удалены из Incoming."
-#: apt-private/private-install.cc:633
+#: apt-private/private-install.cc:659
msgid "Broken packages"
msgstr "Сломанные пакеты"
-#: apt-private/private-install.cc:710
+#: apt-private/private-install.cc:712
msgid "The following extra packages will be installed:"
msgstr "Будут установлены следующие дополнительные пакеты:"
-#: apt-private/private-install.cc:800
+#: apt-private/private-install.cc:802
msgid "Suggested packages:"
msgstr "Предлагаемые пакеты:"
-#: apt-private/private-install.cc:801
+#: apt-private/private-install.cc:803
msgid "Recommended packages:"
msgstr "Рекомендуемые пакеты:"
-#: apt-private/private-install.cc:823
+#: apt-private/private-install.cc:825
#, c-format
msgid "Skipping %s, it is already installed and upgrade is not set.\n"
msgstr "Пропускается %s — пакет уже установлен и нет команды upgrade.\n"
-#: apt-private/private-install.cc:827
+#: apt-private/private-install.cc:829
#, c-format
msgid "Skipping %s, it is not installed and only upgrades are requested.\n"
msgstr ""
"Пропускается %s — пакет не установлен, а запрошено только обновление.\n"
-#: apt-private/private-install.cc:839
+#: apt-private/private-install.cc:841
#, c-format
msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n"
msgstr "Переустановка %s невозможна, он не скачивается.\n"
-#: apt-private/private-install.cc:844
+#: apt-private/private-install.cc:846
#, c-format
msgid "%s is already the newest version.\n"
msgstr "Уже установлена самая новая версия %s.\n"
-#: apt-private/private-install.cc:892
+#: apt-private/private-install.cc:894
#, c-format
msgid "Selected version '%s' (%s) for '%s'\n"
msgstr "Выбрана версия «%s» (%s) для «%s»\n"
-#: apt-private/private-install.cc:897
+#: apt-private/private-install.cc:899
#, c-format
msgid "Selected version '%s' (%s) for '%s' because of '%s'\n"
msgstr "Выбрана версия «%s» (%s) для «%s» из-за «%s»\n"
#. TRANSLATORS: Note, this is not an interactive question
-#: apt-private/private-install.cc:939
+#: apt-private/private-install.cc:941
#, c-format
msgid "Package '%s' is not installed, so not removed. Did you mean '%s'?\n"
msgstr ""
"Пакет «%s» не установлен, поэтому не может быть удалён. Возможно имелся в "
"виду «%s»?\n"
-#: apt-private/private-install.cc:945
+#: apt-private/private-install.cc:947
#, c-format
msgid "Package '%s' is not installed, so not removed\n"
msgstr "Пакет «%s» не установлен, поэтому не может быть удалён\n"
-#: apt-private/private-download.cc:62
+#: apt-private/private-list.cc:129
+msgid "Listing"
+msgstr "Вывод списка"
+
+#: apt-private/private-list.cc:159
#, c-format
+msgid "There is %i additional version. Please use the '-a' switch to see it"
+msgid_plural ""
+"There are %i additional versions. Please use the '-a' switch to see them."
+msgstr[0] "Есть %i дополнительная версия. Используйте «-a» для просмотра"
+msgstr[1] "Есть %i дополнительные версии. Используйте «-a» для их просмотра"
+msgstr[2] "Есть %i дополнительных версий. Используйте «-a» для их просмотра"
+
+#: apt-private/private-cachefile.cc:93
+msgid "Correcting dependencies..."
+msgstr "Исправление зависимостей…"
+
+#: apt-private/private-cachefile.cc:96
+msgid " failed."
+msgstr " не удалось."
+
+#: apt-private/private-cachefile.cc:99
+msgid "Unable to correct dependencies"
+msgstr "Невозможно скорректировать зависимости"
+
+#: apt-private/private-cachefile.cc:102
+msgid "Unable to minimize the upgrade set"
+msgstr "Невозможно минимизировать набор обновлений"
+
+#: apt-private/private-cachefile.cc:104
+msgid " Done"
+msgstr " Готово"
+
+#: apt-private/private-cachefile.cc:108
+msgid "You might want to run 'apt-get -f install' to correct these."
+msgstr ""
+"Возможно, для исправления этих ошибок вы захотите воспользоваться «apt-get -"
+"f install»."
+
+#: apt-private/private-cachefile.cc:111
+msgid "Unmet dependencies. Try using -f."
+msgstr "Неудовлетворённые зависимости. Попытайтесь использовать -f."
+
+#: apt-private/private-output.cc:103 apt-private/private-show.cc:84
+#: apt-private/private-show.cc:89
+msgid "unknown"
+msgstr "неизвестно"
+
+#: apt-private/private-output.cc:265
+#, c-format
+msgid "[installed,upgradable to: %s]"
+msgstr "[установлен, может быть обновлён до: %s]"
+
+#: apt-private/private-output.cc:268
+msgid "[installed,local]"
+msgstr "[установлен, локальный]"
+
+#: apt-private/private-output.cc:270
+msgid "[installed,auto-removable]"
+msgstr "[установлен, удаляется автоматически]"
+
+#: apt-private/private-output.cc:272
+msgid "[installed,automatic]"
+msgstr "[установлен, автоматически]"
+
+#: apt-private/private-output.cc:274
+msgid "[installed]"
+msgstr "[установлен]"
+
+#: apt-private/private-output.cc:277
+#, c-format
+msgid "[upgradable from: %s]"
+msgstr "[может быть обновлён до: %s]"
+
+#: apt-private/private-output.cc:281
+msgid "[residual-config]"
+msgstr "[остались файлы настроек]"
+
+#: apt-private/private-output.cc:455
+#, c-format
+msgid "but %s is installed"
+msgstr "но %s уже установлен"
+
+#: apt-private/private-output.cc:457
+#, c-format
+msgid "but %s is to be installed"
+msgstr "но %s будет установлен"
+
+#: apt-private/private-output.cc:464
+msgid "but it is not installable"
+msgstr "но он не может быть установлен"
+
+#: apt-private/private-output.cc:466
+msgid "but it is a virtual package"
+msgstr "но это виртуальный пакет"
+
+#: apt-private/private-output.cc:469
+msgid "but it is not installed"
+msgstr "но он не установлен"
+
+#: apt-private/private-output.cc:469
+msgid "but it is not going to be installed"
+msgstr "но он не будет установлен"
+
+#: apt-private/private-output.cc:474
+msgid " or"
+msgstr " или"
+
+#: apt-private/private-output.cc:488 apt-private/private-output.cc:500
+msgid "The following packages have unmet dependencies:"
+msgstr "Пакеты, имеющие неудовлетворённые зависимости:"
+
+#: apt-private/private-output.cc:523
+msgid "The following NEW packages will be installed:"
+msgstr "НОВЫЕ пакеты, которые будут установлены:"
+
+#: apt-private/private-output.cc:549
+msgid "The following packages will be REMOVED:"
+msgstr "Пакеты, которые будут УДАЛЕНЫ:"
+
+#: apt-private/private-output.cc:571
+msgid "The following packages have been kept back:"
+msgstr "Пакеты, которые будут оставлены в неизменном виде:"
+
+#: apt-private/private-output.cc:592
+msgid "The following packages will be upgraded:"
+msgstr "Пакеты, которые будут обновлены:"
+
+#: apt-private/private-output.cc:613
+msgid "The following packages will be DOWNGRADED:"
+msgstr "Пакеты, будут заменены на более СТАРЫЕ версии:"
+
+#: apt-private/private-output.cc:633
+msgid "The following held packages will be changed:"
+msgstr ""
+"Пакеты, которые должны были бы остаться без изменений, но будут заменены:"
+
+#: apt-private/private-output.cc:688
+#, c-format
+msgid "%s (due to %s)"
+msgstr "%s (вследствие %s)"
+
+#: apt-private/private-output.cc:696
+msgid ""
+"WARNING: The following essential packages will be removed.\n"
+"This should NOT be done unless you know exactly what you are doing!"
+msgstr ""
+"ВНИМАНИЕ: Эти существенно важные пакеты будут удалены.\n"
+"НЕ ДЕЛАЙТЕ этого, если вы НЕ представляете себе все возможные последствия!"
+
+#: apt-private/private-output.cc:727
+#, c-format
+msgid "%lu upgraded, %lu newly installed, "
+msgstr "обновлено %lu, установлено %lu новых пакетов, "
+
+#: apt-private/private-output.cc:731
+#, c-format
+msgid "%lu reinstalled, "
+msgstr "переустановлено %lu переустановлено, "
+
+#: apt-private/private-output.cc:733
+#, c-format
+msgid "%lu downgraded, "
+msgstr "%lu пакетов заменены на старые версии, "
+
+#: apt-private/private-output.cc:735
+#, c-format
+msgid "%lu to remove and %lu not upgraded.\n"
+msgstr "для удаления отмечено %lu пакетов, и %lu пакетов не обновлено.\n"
+
+#: apt-private/private-output.cc:739
+#, c-format
+msgid "%lu not fully installed or removed.\n"
+msgstr "не установлено до конца или удалено %lu пакетов.\n"
+
+#. TRANSLATOR: Yes/No question help-text: defaulting to Y[es]
+#. e.g. "Do you want to continue? [Y/n] "
+#. The user has to answer with an input matching the
+#. YESEXPR/NOEXPR defined in your l10n.
+#: apt-private/private-output.cc:761
+msgid "[Y/n]"
+msgstr "[Д/н]"
+
+#. TRANSLATOR: Yes/No question help-text: defaulting to N[o]
+#. e.g. "Should this file be removed? [y/N] "
+#. The user has to answer with an input matching the
+#. YESEXPR/NOEXPR defined in your l10n.
+#: apt-private/private-output.cc:767
+msgid "[y/N]"
+msgstr "[д/Н]"
+
+#. TRANSLATOR: "Yes" answer printed for a yes/no question if --assume-yes is set
+#: apt-private/private-output.cc:778
+msgid "Y"
+msgstr "Д"
+
+#. TRANSLATOR: "No" answer printed for a yes/no question if --assume-no is set
+#: apt-private/private-output.cc:784
+msgid "N"
+msgstr "Н"
+
+#: apt-private/private-output.cc:806 apt-pkg/cachefilter.cc:35
+#, c-format
+msgid "Regex compilation error - %s"
+msgstr "Ошибка компиляции регулярного выражения — %s"
+
+#: apt-private/private-update.cc:31
+msgid "The update command takes no arguments"
+msgstr "Команде update не нужны аргументы"
+
+#: apt-private/private-update.cc:97
+#, c-format
+msgid "%i package can be upgraded. Run 'apt list --upgradable' to see it.\n"
+msgid_plural ""
+"%i packages can be upgraded. Run 'apt list --upgradable' to see them.\n"
+msgstr[0] ""
+"Может быть обновлён %i пакет. Запустите «apt list --upgradable» для показа.\n"
+msgstr[1] ""
+"Может быть обновлено %i пакета. Запустите «apt list --upgradable» для их "
+"показа.\n"
+msgstr[2] ""
+"Может быть обновлено %i пакетов. Запустите «apt list --upgradable» для их "
+"показа.\n"
+
+#: apt-private/private-update.cc:101
+msgid "All packages are up to date."
+msgstr "Все пакеты имеют последние версии."
+
+#: apt-private/private-show.cc:156
+#, c-format
+msgid "There is %i additional record. Please use the '-a' switch to see it"
+msgid_plural ""
+"There are %i additional records. Please use the '-a' switch to see them."
+msgstr[0] "Есть %i дополнительная запись. Используйте «-a» для просмотра"
+msgstr[1] "Есть %i дополнительные записи. Используйте «-a» для их просмотра"
+msgstr[2] "Есть %i дополнительных записей. Используйте «-a» для их просмотра"
+
+#: apt-private/private-show.cc:163
+msgid "not a real package (virtual)"
+msgstr "не реальный (виртуальный) пакет"
+
+#: apt-private/private-main.cc:32
msgid ""
-"Can't drop privileges for downloading as file '%s' couldn't be accessed by "
-"user '%s'."
+"NOTE: This is only a simulation!\n"
+" apt-get needs root privileges for real execution.\n"
+" Keep also in mind that locking is deactivated,\n"
+" so don't depend on the relevance to the real current situation!"
msgstr ""
+"ЗАМЕЧАНИЕ: Производить только имитация работы!\n"
+" Для реальной работы apt-get требуются права суперпользователя.\n"
+" Учтите, что блокировка не используется,\n"
+" поэтому нет полного соответствия с текущей реальной ситуацией!"
-#: apt-private/private-download.cc:94
+#: apt-private/private-download.cc:36
msgid "WARNING: The following packages cannot be authenticated!"
msgstr "ВНИМАНИЕ: Следующие пакеты невозможно аутентифицировать!"
-#: apt-private/private-download.cc:98
+#: apt-private/private-download.cc:40
msgid "Authentication warning overridden.\n"
msgstr "Предупреждение об аутентификации не принято в внимание.\n"
-#: apt-private/private-download.cc:103 apt-private/private-download.cc:110
+#: apt-private/private-download.cc:45 apt-private/private-download.cc:52
msgid "Some packages could not be authenticated"
msgstr "Некоторые пакеты невозможно аутентифицировать"
-#: apt-private/private-download.cc:108
+#: apt-private/private-download.cc:50
msgid "Install these packages without verification?"
msgstr "Установить эти пакеты без проверки?"
-#: apt-private/private-download.cc:149 apt-pkg/update.cc:77
+#: apt-private/private-download.cc:91 apt-pkg/update.cc:77
#, c-format
msgid "Failed to fetch %s %s\n"
msgstr "Не удалось получить %s %s\n"
-#: apt-private/private-download.cc:171 apt-private/private-download.cc:174
-#, c-format
-msgid "Couldn't determine free space in %s"
-msgstr "Не удалось определить количество свободного места в %s"
-
-#: apt-private/private-download.cc:188
-#, c-format
-msgid "You don't have enough free space in %s."
-msgstr "Недостаточно свободного места в %s."
-
#: apt-private/private-sources.cc:58
-#, fuzzy, c-format
+#, c-format
msgid "Failed to parse %s. Edit again? "
-msgstr "Не удалось переименовать %s в %s"
+msgstr "Не удалось разобрать «%s». Повторить редактирование? "
#: apt-private/private-sources.cc:70
#, c-format
msgid "Your '%s' file changed, please run 'apt-get update'."
-msgstr ""
+msgstr "Файл «%s» изменён, запустите «apt-get update»."
#: apt-private/private-search.cc:69
msgid "Full Text Search"
-msgstr ""
+msgstr "Полнотекстовый поиск"
+
+#: apt-private/private-upgrade.cc:25
+msgid "Calculating upgrade"
+msgstr "Расчёт обновлений"
+
+#: apt-private/private-upgrade.cc:28
+msgid "Done"
+msgstr "Готово"
#: apt-private/acqprogress.cc:66
msgid "Hit "
msgstr "В кэше "
-#: apt-private/acqprogress.cc:88
+#: apt-private/acqprogress.cc:90
msgid "Get:"
msgstr "Получено:"
-#: apt-private/acqprogress.cc:119
+#: apt-private/acqprogress.cc:121
msgid "Ign "
msgstr "Игн "
-#: apt-private/acqprogress.cc:126
+#: apt-private/acqprogress.cc:125
msgid "Err "
msgstr "Ош "
-#: apt-private/acqprogress.cc:150
+#: apt-private/acqprogress.cc:146
#, c-format
msgid "Fetched %sB in %s (%sB/s)\n"
msgstr "Получено %sБ за %s (%sБ/c)\n"
-#: apt-private/acqprogress.cc:240
+#: apt-private/acqprogress.cc:236
#, c-format
msgid " [Working]"
msgstr " [Обработка]"
-#: apt-private/acqprogress.cc:301
+#: apt-private/acqprogress.cc:297
#, c-format
msgid ""
"Media change: please insert the disc labeled\n"
@@ -1780,18 +1810,18 @@ msgstr ""
#. Only warn if there are no sources.list.d.
#. Only warn if there is no sources.list file.
-#: methods/mirror.cc:95 apt-pkg/init.cc:113 apt-pkg/init.cc:121
-#: apt-pkg/sourcelist.cc:280 apt-pkg/sourcelist.cc:286 apt-pkg/clean.cc:43
-#: apt-pkg/acquire.cc:557 apt-pkg/policy.cc:381 apt-pkg/contrib/fileutl.cc:374
-#: apt-pkg/contrib/fileutl.cc:487 apt-pkg/contrib/cdromutl.cc:205
-#: apt-inst/extract.cc:471
+#: methods/mirror.cc:95 apt-inst/extract.cc:471 apt-pkg/init.cc:103
+#: apt-pkg/init.cc:111 apt-pkg/acquire.cc:494 apt-pkg/clean.cc:43
+#: apt-pkg/policy.cc:381 apt-pkg/sourcelist.cc:280 apt-pkg/sourcelist.cc:286
+#: apt-pkg/contrib/fileutl.cc:368 apt-pkg/contrib/fileutl.cc:481
+#: apt-pkg/contrib/cdromutl.cc:205
#, c-format
msgid "Unable to read %s"
msgstr "Невозможно прочитать %s"
-#: methods/mirror.cc:101 methods/mirror.cc:130 apt-pkg/clean.cc:49
-#: apt-pkg/clean.cc:67 apt-pkg/clean.cc:130 apt-pkg/acquire.cc:563
-#: apt-pkg/acquire.cc:588 apt-pkg/contrib/cdromutl.cc:201
+#: methods/mirror.cc:101 methods/mirror.cc:130 apt-pkg/acquire.cc:500
+#: apt-pkg/acquire.cc:525 apt-pkg/clean.cc:49 apt-pkg/clean.cc:67
+#: apt-pkg/clean.cc:130 apt-pkg/contrib/cdromutl.cc:201
#: apt-pkg/contrib/cdromutl.cc:235
#, c-format
msgid "Unable to change to %s"
@@ -1812,9 +1842,9 @@ msgid "Can not read mirror file '%s'"
msgstr "Невозможно прочитать файл на зеркале «%s»"
#: methods/mirror.cc:315
-#, fuzzy, c-format
+#, c-format
msgid "No entry found in mirror file '%s'"
-msgstr "Невозможно прочитать файл на зеркале «%s»"
+msgstr "Не найден элемент в файл на зеркале «%s»"
#: methods/mirror.cc:445
#, c-format
@@ -1867,460 +1897,205 @@ msgstr ""
msgid "Merging available information"
msgstr "Слияние доступной информации"
-#: cmdline/apt-extracttemplates.cc:229
-msgid ""
-"Usage: apt-extracttemplates file1 [file2 ...]\n"
-"\n"
-"apt-extracttemplates is a tool to extract config and template info\n"
-"from debian packages\n"
-"\n"
-"Options:\n"
-" -h This help text\n"
-" -t Set the temp dir\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
-msgstr ""
-"Использование: apt-extracttemplates файл1 [файл2…]\n"
-"\n"
-"apt-extracttemplates извлекает из пакетов Debian данные config и template\n"
-"\n"
-"Параметры:\n"
-" -h Этот текст\n"
-" -t Задать каталог для временных файлов\n"
-" -c=? Читать указанный файл настройки\n"
-" -o=? Задать значение произвольной настройке, например, -o dir::cache=/tmp\n"
-
-#: cmdline/apt-extracttemplates.cc:259 apt-pkg/contrib/fileutl.cc:2092
-#, fuzzy, c-format
-msgid "Unable to mkstemp %s"
-msgstr "Невозможно получить атрибуты %s"
-
-#: cmdline/apt-extracttemplates.cc:264 apt-pkg/pkgcachegen.cc:1385
-#: apt-pkg/contrib/fileutl.cc:2097
-#, c-format
-msgid "Unable to write to %s"
-msgstr "Невозможно записать в %s"
-
-#: cmdline/apt-extracttemplates.cc:305
-msgid "Cannot get debconf version. Is debconf installed?"
-msgstr "Невозможно определить версию debconf. Он установлен?"
-
-#: ftparchive/apt-ftparchive.cc:186 ftparchive/apt-ftparchive.cc:370
-msgid "Package extension list is too long"
-msgstr "Список расширений, допустимых для пакетов, слишком длинен"
-
-#: ftparchive/apt-ftparchive.cc:188 ftparchive/apt-ftparchive.cc:205
-#: ftparchive/apt-ftparchive.cc:228 ftparchive/apt-ftparchive.cc:282
-#: ftparchive/apt-ftparchive.cc:296 ftparchive/apt-ftparchive.cc:318
-#, c-format
-msgid "Error processing directory %s"
-msgstr "Ошибка обработки каталога %s"
-
-#: ftparchive/apt-ftparchive.cc:280
-msgid "Source extension list is too long"
-msgstr "Список расширений источников слишком длинен"
-
-#: ftparchive/apt-ftparchive.cc:400
-msgid "Error writing header to contents file"
-msgstr ""
-"Ошибка записи заголовка в полный перечень содержимого пакетов (Contents)"
-
-#: ftparchive/apt-ftparchive.cc:430
-#, c-format
-msgid "Error processing contents %s"
-msgstr "ошибка обработки полного перечня содержимого пакетов (Contents) %s"
-
-#: ftparchive/apt-ftparchive.cc:625
-msgid ""
-"Usage: apt-ftparchive [options] command\n"
-"Commands: packages binarypath [overridefile [pathprefix]]\n"
-" sources srcpath [overridefile [pathprefix]]\n"
-" contents path\n"
-" release path\n"
-" generate config [groups]\n"
-" clean config\n"
-"\n"
-"apt-ftparchive generates index files for Debian archives. It supports\n"
-"many styles of generation from fully automated to functional replacements\n"
-"for dpkg-scanpackages and dpkg-scansources\n"
-"\n"
-"apt-ftparchive generates Package files from a tree of .debs. The\n"
-"Package file contains the contents of all the control fields from\n"
-"each package as well as the MD5 hash and filesize. An override file\n"
-"is supported to force the value of Priority and Section.\n"
-"\n"
-"Similarly apt-ftparchive generates Sources files from a tree of .dscs.\n"
-"The --source-override option can be used to specify a src override file\n"
-"\n"
-"The 'packages' and 'sources' command should be run in the root of the\n"
-"tree. BinaryPath should point to the base of the recursive search and \n"
-"override file should contain the override flags. Pathprefix is\n"
-"appended to the filename fields if present. Example usage from the \n"
-"Debian archive:\n"
-" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
-" dists/potato/main/binary-i386/Packages\n"
-"\n"
-"Options:\n"
-" -h This help text\n"
-" --md5 Control MD5 generation\n"
-" -s=? Source override file\n"
-" -q Quiet\n"
-" -d=? Select the optional caching database\n"
-" --no-delink Enable delinking debug mode\n"
-" --contents Control contents file generation\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option"
-msgstr ""
-"Использование: apt-ftparchive [параметры] команда\n"
-"Команды: packages binarypath [overridefile [pathprefix]]\n"
-" sources srcpath [overridefile [pathprefix]]\n"
-" contents path\n"
-" release path\n"
-" generate config [groups]\n"
-" clean config\n"
-"\n"
-"apt-ftparchive генерирует индексные файлы архивов Debian. Он поддерживает\n"
-"множество стилей генерации: от полностью автоматического до функциональной "
-"замены\n"
-"программ dpkg-scanpackages и dpkg-scansources\n"
-"\n"
-"apt-ftparchive генерирует файлы Package (списки пакетов) для дерева\n"
-"каталогов, содержащих файлы .deb. Файл Package включает в себя управляющие\n"
-"поля каждого пакета, а также хеш MD5 и размер файла. Значения управляющих\n"
-"полей «приоритет» (Priority) и «секция» (Section) могут быть изменены с\n"
-"помощью файла override.\n"
-"\n"
-"Кроме того, apt-ftparchive может генерировать файлы Sources из дерева\n"
-"каталогов, содержащих файлы .dsc. Для указания файла override в этом \n"
-"режиме можно использовать параметр --source-override.\n"
-"\n"
-"Команды «packages» и «sources» надо выполнять, находясь в корневом каталоге\n"
-"дерева, которое вы хотите обработать. BinaryPath должен указывать на место,\n"
-"с которого начинается рекурсивный обход, а файл переназначений (override)\n"
-"должен содержать записи о переназначениях управляющих полей. Если был "
-"указан\n"
-"Pathprefix, то его значение добавляется к управляющим полям, содержащим\n"
-"имена файлов. Пример использования для архива Debian:\n"
-" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
-" dists/potato/main/binary-i386/Packages\n"
-"\n"
-"Параметры:\n"
-" -h Этот текст\n"
-" --md5 Управление генерацией MD5-хешей\n"
-" -s=? Указать файл переназначений (override) для источников\n"
-" -q Не выводить сообщения в процессе работы\n"
-" -d=? Указать кэширующую базу данных (не обязательно)\n"
-" --no-delink Включить режим отладки процесса удаления файлов\n"
-" --contents Управление генерацией полного перечня содержимого пакетов\n"
-" (файла Contents)\n"
-" -c=? Использовать указанный файл настройки\n"
-" -o=? Задать значение произвольному параметру настройки"
+#: apt-inst/filelist.cc:380
+msgid "DropNode called on still linked node"
+msgstr "DropNode вызван для узла, который ещё используется"
-#: ftparchive/apt-ftparchive.cc:821
-msgid "No selections matched"
-msgstr "Совпадений не обнаружено"
+#: apt-inst/filelist.cc:412
+msgid "Failed to locate the hash element!"
+msgstr "Не удалось найти элемент хеша!"
-#: ftparchive/apt-ftparchive.cc:906
-#, c-format
-msgid "Some files are missing in the package file group `%s'"
-msgstr "В группе пакетов «%s» отсутствуют некоторые файлы"
+#: apt-inst/filelist.cc:459
+msgid "Failed to allocate diversion"
+msgstr "Не удалось создать diversion"
-#: ftparchive/cachedb.cc:67
-#, c-format
-msgid "DB was corrupted, file renamed to %s.old"
-msgstr "БД была повреждена, файл переименован в %s.old"
+#: apt-inst/filelist.cc:464
+msgid "Internal error in AddDiversion"
+msgstr "Внутренняя ошибка в AddDiversion"
-#: ftparchive/cachedb.cc:85
+#: apt-inst/filelist.cc:477
#, c-format
-msgid "DB is old, attempting to upgrade %s"
-msgstr "DB устарела, попытка обновить %s"
-
-#: ftparchive/cachedb.cc:96
-msgid ""
-"DB format is invalid. If you upgraded from an older version of apt, please "
-"remove and re-create the database."
-msgstr ""
-"Некорректный формат базы данных (DB). Если вы обновляли версию apt, удалите "
-"и создайте базу данных заново."
+msgid "Trying to overwrite a diversion, %s -> %s and %s/%s"
+msgstr "Попытка изменения diversion, %s -> %s и %s/%s"
-#: ftparchive/cachedb.cc:101
+#: apt-inst/filelist.cc:506
#, c-format
-msgid "Unable to open DB file %s: %s"
-msgstr "Не удалось открыть DB файл %s: %s"
+msgid "Double add of diversion %s -> %s"
+msgstr "Двойное добавление diversion %s -> %s"
-#: ftparchive/cachedb.cc:184 apt-inst/extract.cc:186 apt-inst/extract.cc:199
-#: apt-inst/extract.cc:216
+#: apt-inst/filelist.cc:549
#, c-format
-msgid "Failed to stat %s"
-msgstr "Не удалось получить атрибуты %s"
-
-#: ftparchive/cachedb.cc:326
-#, fuzzy
-msgid "Failed to read .dsc"
-msgstr "Не удалось прочесть ссылку %s"
-
-#: ftparchive/cachedb.cc:359
-msgid "Archive has no control record"
-msgstr "В архиве нет поля control"
-
-#: ftparchive/cachedb.cc:526
-msgid "Unable to get a cursor"
-msgstr "Невозможно получить курсор"
+msgid "Duplicate conf file %s/%s"
+msgstr "Повторно указан файл настройки %s/%s"
-#: ftparchive/writer.cc:104
+#: apt-inst/extract.cc:101 apt-inst/extract.cc:172
#, c-format
-msgid "W: Unable to read directory %s\n"
-msgstr "W: Не удалось прочитать каталог %s\n"
+msgid "The path %s is too long"
+msgstr "Слишком длинный путь %s"
-#: ftparchive/writer.cc:109
+#: apt-inst/extract.cc:132
#, c-format
-msgid "W: Unable to stat %s\n"
-msgstr "W: Не удалось прочитать атрибуты %s\n"
-
-#: ftparchive/writer.cc:165
-msgid "E: "
-msgstr "E: "
-
-#: ftparchive/writer.cc:167
-msgid "W: "
-msgstr "W: "
-
-#: ftparchive/writer.cc:174
-msgid "E: Errors apply to file "
-msgstr "E: Ошибки относятся к файлу "
+msgid "Unpacking %s more than once"
+msgstr "Повторная распаковка %s"
-#: ftparchive/writer.cc:192 ftparchive/writer.cc:224
+#: apt-inst/extract.cc:142
#, c-format
-msgid "Failed to resolve %s"
-msgstr "Не удалось проследовать по ссылке %s"
-
-#: ftparchive/writer.cc:205
-msgid "Tree walking failed"
-msgstr "Не удалось совершить обход дерева"
+msgid "The directory %s is diverted"
+msgstr "Каталог %s входит в список diverted"
-#: ftparchive/writer.cc:232
+#: apt-inst/extract.cc:152
#, c-format
-msgid "Failed to open %s"
-msgstr "Не удалось открыть %s"
+msgid "The package is trying to write to the diversion target %s/%s"
+msgstr "Пакет пытается писать в diversion %s/%s"
-#: ftparchive/writer.cc:291
-#, c-format
-msgid " DeLink %s [%s]\n"
-msgstr "DeLink %s [%s]\n"
+#: apt-inst/extract.cc:162 apt-inst/extract.cc:306
+msgid "The diversion path is too long"
+msgstr "Путь diversion слишком длинен"
-#: ftparchive/writer.cc:299
+#: apt-inst/extract.cc:186 apt-inst/extract.cc:199 apt-inst/extract.cc:216
+#: ftparchive/cachedb.cc:182
#, c-format
-msgid "Failed to readlink %s"
-msgstr "Не удалось прочесть ссылку %s"
+msgid "Failed to stat %s"
+msgstr "Не удалось получить атрибуты %s"
-#: ftparchive/writer.cc:303
+#: apt-inst/extract.cc:194 ftparchive/multicompress.cc:374
#, c-format
-msgid "Failed to unlink %s"
-msgstr "Не удалось удалить %s"
+msgid "Failed to rename %s to %s"
+msgstr "Не удалось переименовать %s в %s"
-#: ftparchive/writer.cc:311
+#: apt-inst/extract.cc:249
#, c-format
-msgid "*** Failed to link %s to %s"
-msgstr "*** Не удалось создать ссылку %s на %s"
+msgid "The directory %s is being replaced by a non-directory"
+msgstr "Каталог %s был заменён не-каталогом"
-#: ftparchive/writer.cc:321
-#, c-format
-msgid " DeLink limit of %sB hit.\n"
-msgstr " Превышен лимит в %sB в DeLink.\n"
+#: apt-inst/extract.cc:289
+msgid "Failed to locate node in its hash bucket"
+msgstr "Не удалось разместить узел в хеше"
-#: ftparchive/writer.cc:427
-msgid "Archive had no package field"
-msgstr "В архиве нет поля package"
+#: apt-inst/extract.cc:293
+msgid "The path is too long"
+msgstr "Путь слишком длинен"
-#: ftparchive/writer.cc:435 ftparchive/writer.cc:698
+#: apt-inst/extract.cc:421
#, c-format
-msgid " %s has no override entry\n"
-msgstr " Нет записи о переназначении (override) для %s\n"
+msgid "Overwrite package match with no version for %s"
+msgstr "Файлы заменяются содержимым пакета %s без версии"
-#: ftparchive/writer.cc:502 ftparchive/writer.cc:862
+#: apt-inst/extract.cc:438
#, c-format
-msgid " %s maintainer is %s not %s\n"
-msgstr " пакет %s сопровождает %s, а не %s\n"
+msgid "File %s/%s overwrites the one in the package %s"
+msgstr "Файл %s/%s переписывает файл в пакете %s"
-#: ftparchive/writer.cc:712
+#: apt-inst/extract.cc:498
#, c-format
-msgid " %s has no source override entry\n"
-msgstr " Нет записи source override для %s\n"
+msgid "Unable to stat %s"
+msgstr "Невозможно получить атрибуты %s"
-#: ftparchive/writer.cc:716
+#: apt-inst/dirstream.cc:42 apt-inst/dirstream.cc:49 apt-inst/dirstream.cc:54
#, c-format
-msgid " %s has no binary override entry either\n"
-msgstr " Нет записи binary override для %s\n"
-
-#: ftparchive/contents.cc:351 ftparchive/contents.cc:382
-msgid "realloc - Failed to allocate memory"
-msgstr "realloc — не удалось выделить память"
+msgid "Failed to write file %s"
+msgstr "Не удалось записать в файл %s"
-#: ftparchive/override.cc:38 ftparchive/override.cc:142
+#: apt-inst/dirstream.cc:105
#, c-format
-msgid "Unable to open %s"
-msgstr "Не удалось открыть %s"
-
-#. skip spaces
-#. find end of word
-#: ftparchive/override.cc:68
-#, fuzzy, c-format
-msgid "Malformed override %s line %llu (%s)"
-msgstr "Неправильная запись о переназначении (override) %s в строке %llu #1"
+msgid "Failed to close file %s"
+msgstr "Не удалось закрыть файл %s"
-#: ftparchive/override.cc:127 ftparchive/override.cc:201
+#: apt-inst/deb/debfile.cc:47 apt-inst/deb/debfile.cc:54
+#: apt-inst/deb/debfile.cc:63
#, c-format
-msgid "Failed to read the override file %s"
-msgstr "Не удалось прочесть файл переназначений (override) %s"
+msgid "This is not a valid DEB archive, missing '%s' member"
+msgstr "Это неправильный DEB-архив — отсутствует составная часть «%s»"
-#: ftparchive/override.cc:166
+#: apt-inst/deb/debfile.cc:132
#, c-format
-msgid "Malformed override %s line %llu #1"
-msgstr "Неправильная запись о переназначении (override) %s в строке %llu #1"
+msgid "Internal error, could not locate member %s"
+msgstr "Внутренняя ошибка, не удалось найти составную часть %s"
-#: ftparchive/override.cc:178
-#, c-format
-msgid "Malformed override %s line %llu #2"
-msgstr "Неправильная запись о переназначении (override) %s в строке %llu #2"
+#: apt-inst/deb/debfile.cc:227
+msgid "Unparsable control file"
+msgstr "Не удалось прочесть содержимое control-файла"
-#: ftparchive/override.cc:191
-#, c-format
-msgid "Malformed override %s line %llu #3"
-msgstr "Неправильная запись о переназначении (override) %s в строке %llu #3"
+#: apt-inst/contrib/arfile.cc:76
+msgid "Invalid archive signature"
+msgstr "Неверная сигнатура архива"
-#: ftparchive/multicompress.cc:73
-#, c-format
-msgid "Unknown compression algorithm '%s'"
-msgstr "Неизвестный алгоритм сжатия «%s»"
+#: apt-inst/contrib/arfile.cc:84
+msgid "Error reading archive member header"
+msgstr "Ошибка чтения заголовка элемента архива"
-#: ftparchive/multicompress.cc:103
+#: apt-inst/contrib/arfile.cc:96
#, c-format
-msgid "Compressed output %s needs a compression set"
-msgstr ""
-"Для получения сжатого вывода %s необходимо включить использования сжатия"
+msgid "Invalid archive member header %s"
+msgstr "Неправильный заголовок элемента архива %s"
-#: ftparchive/multicompress.cc:192
-msgid "Failed to create FILE*"
-msgstr "Не удалось создать FILE*"
+#: apt-inst/contrib/arfile.cc:108
+msgid "Invalid archive member header"
+msgstr "Неправильный заголовок элемента архива"
-#: ftparchive/multicompress.cc:195
-msgid "Failed to fork"
-msgstr "Не удалось запустить порождённый процесс"
+#: apt-inst/contrib/arfile.cc:137
+msgid "Archive is too short"
+msgstr "Слишком короткий архив"
-#: ftparchive/multicompress.cc:209
-msgid "Compress child"
-msgstr "Процесс-потомок, производящий сжатие"
+#: apt-inst/contrib/arfile.cc:141
+msgid "Failed to read the archive headers"
+msgstr "Не удалось прочитать заголовки архива"
-#: ftparchive/multicompress.cc:232
-#, c-format
-msgid "Internal error, failed to create %s"
-msgstr "Внутренняя ошибка, не удалось создать %s"
+#: apt-inst/contrib/extracttar.cc:124
+msgid "Failed to create pipes"
+msgstr "Не удалось создать каналы"
-#: ftparchive/multicompress.cc:305
-msgid "IO to subprocess/file failed"
-msgstr "Ошибка ввода/вывода в подпроцесс/файл"
+#: apt-inst/contrib/extracttar.cc:151
+msgid "Failed to exec gzip "
+msgstr "Не удалось выполнить gzip "
-#: ftparchive/multicompress.cc:343
-msgid "Failed to read while computing MD5"
-msgstr "Ошибка чтения во время вычисления MD5"
+#: apt-inst/contrib/extracttar.cc:188 apt-inst/contrib/extracttar.cc:218
+msgid "Corrupted archive"
+msgstr "Повреждённый архив"
-#: ftparchive/multicompress.cc:359
-#, c-format
-msgid "Problem unlinking %s"
-msgstr "Не удалось удалить %s"
+#: apt-inst/contrib/extracttar.cc:203
+msgid "Tar checksum failed, archive corrupted"
+msgstr "Неправильная контрольная сумма Tar, архив повреждён"
-#: ftparchive/multicompress.cc:374 apt-inst/extract.cc:194
+#: apt-inst/contrib/extracttar.cc:308
#, c-format
-msgid "Failed to rename %s to %s"
-msgstr "Не удалось переименовать %s в %s"
-
-#: cmdline/apt-internal-solver.cc:51
-msgid ""
-"Usage: apt-internal-solver\n"
-"\n"
-"apt-internal-solver is an interface to use the current internal\n"
-"like an external resolver for the APT family for debugging or alike\n"
-"\n"
-"Options:\n"
-" -h This help text.\n"
-" -q Loggable output - no progress indicator\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
-msgstr ""
-"Использование: apt-internal-solver\n"
-"\n"
-"apt-internal-solver — интерфейс к внутреннему решателю, предназначен\n"
-"для отладки, подобен интерфейсу внешнего решателя семейства APT\n"
-"\n"
-"Параметры:\n"
-" -h Этот текст\n"
-" -q Вывод протокола работы — индикатор выполнения отключён\n"
-" -c=? Читать указанный файл настройки\n"
-" -o=? Задать значение произвольной настройке, например, -o dir::cache=/tmp\n"
-
-#: cmdline/apt-sortpkgs.cc:91
-msgid "Unknown package record!"
-msgstr "Запись о неизвестном пакете!"
-
-#: cmdline/apt-sortpkgs.cc:155
-msgid ""
-"Usage: apt-sortpkgs [options] file1 [file2 ...]\n"
-"\n"
-"apt-sortpkgs is a simple tool to sort package files. The -s option is used\n"
-"to indicate what kind of file it is.\n"
-"\n"
-"Options:\n"
-" -h This help text\n"
-" -s Use source file sorting\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
-msgstr ""
-"Использование: apt-sortpkgs [параметры] файл1 [файл2…]\n"
-"\n"
-"apt-sortpkgs — простой инструмент для сортировки списков пакетов. Параметр -"
-"s\n"
-"используется для указания типа списка.\n"
-"\n"
-"Параметры:\n"
-" -h этот текст\n"
-" -s сортировать список файлов пакетов исходного кода\n"
-" -c=? читать указанный файл настройки\n"
-" -o=? Задать значение произвольной настройке, например, -o dir::cache=/tmp\n"
+msgid "Unknown TAR header type %u, member %s"
+msgstr "Неизвестный заголовок в архиве TAR. Тип %u, элемент %s"
-#: apt-pkg/install-progress.cc:59
+#: apt-pkg/install-progress.cc:57
#, c-format
msgid "Progress: [%3i%%]"
-msgstr ""
+msgstr "Ход выполнения: [%3i%%]"
-#: apt-pkg/install-progress.cc:93 apt-pkg/install-progress.cc:176
+#: apt-pkg/install-progress.cc:91 apt-pkg/install-progress.cc:174
msgid "Running dpkg"
msgstr "Запускается dpkg"
-#: apt-pkg/init.cc:156
+#: apt-pkg/init.cc:146
#, c-format
msgid "Packaging system '%s' is not supported"
msgstr "Система пакетирования «%s» не поддерживается"
-#: apt-pkg/init.cc:172
+#: apt-pkg/init.cc:162
msgid "Unable to determine a suitable packaging system type"
msgstr "Невозможно определить подходящий тип системы пакетирования"
-#: apt-pkg/indexcopy.cc:236 apt-pkg/indexcopy.cc:775
+#: apt-pkg/indexcopy.cc:236 apt-pkg/indexcopy.cc:773
#, c-format
msgid "Wrote %i records.\n"
msgstr "Сохранено %i записей.\n"
-#: apt-pkg/indexcopy.cc:238 apt-pkg/indexcopy.cc:777
+#: apt-pkg/indexcopy.cc:238 apt-pkg/indexcopy.cc:775
#, c-format
msgid "Wrote %i records with %i missing files.\n"
msgstr "Сохранено %i записей с %i отсутствующими файлами.\n"
-#: apt-pkg/indexcopy.cc:241 apt-pkg/indexcopy.cc:780
+#: apt-pkg/indexcopy.cc:241 apt-pkg/indexcopy.cc:778
#, c-format
msgid "Wrote %i records with %i mismatched files\n"
msgstr "Сохранено %i записей с %i несовпадающими файлами\n"
-#: apt-pkg/indexcopy.cc:244 apt-pkg/indexcopy.cc:783
+#: apt-pkg/indexcopy.cc:244 apt-pkg/indexcopy.cc:781
#, c-format
msgid "Wrote %i records with %i missing files and %i mismatched files\n"
msgstr ""
@@ -2337,26 +2112,6 @@ msgstr "Не удалось найти аутентификационную за
msgid "Hash mismatch for: %s"
msgstr "Не совпадает хеш сумма для: %s"
-#: apt-pkg/acquire-worker.cc:133
-#, c-format
-msgid "The method driver %s could not be found."
-msgstr "Драйвер для метода %s не найден."
-
-#: apt-pkg/acquire-worker.cc:135
-#, fuzzy, c-format
-msgid "Is the package %s installed?"
-msgstr "Проверьте, установлен ли пакет «dpkg-dev».\n"
-
-#: apt-pkg/acquire-worker.cc:186
-#, c-format
-msgid "Method %s did not start correctly"
-msgstr "Метод %s запустился не корректно"
-
-#: apt-pkg/acquire-worker.cc:485
-#, c-format
-msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
-msgstr "Вставьте диск с меткой «%s» в устройство «%s» и нажмите ввод."
-
#: apt-pkg/cachefile.cc:94
msgid "The package lists or status file could not be parsed or opened."
msgstr "Списки пакетов или файл состояния не могут быть открыты или прочитаны."
@@ -2369,434 +2124,345 @@ msgstr "Вы можете запустить «apt-get update» для испр�
msgid "The list of sources could not be read."
msgstr "Не читается перечень источников."
-#: apt-pkg/pkgcache.cc:154
+#: apt-pkg/pkgcache.cc:155
msgid "Empty package cache"
msgstr "Кэш пакетов пуст"
-#: apt-pkg/pkgcache.cc:160 apt-pkg/pkgcache.cc:171
+#: apt-pkg/pkgcache.cc:161
msgid "The package cache file is corrupted"
msgstr "Кэш пакетов повреждён"
-#: apt-pkg/pkgcache.cc:165
+#: apt-pkg/pkgcache.cc:166
msgid "The package cache file is an incompatible version"
msgstr "Не поддерживаемая версия кэша пакетов"
-#: apt-pkg/pkgcache.cc:168
+#: apt-pkg/pkgcache.cc:169
msgid "The package cache file is corrupted, it is too small"
msgstr "Кэш пакетов повреждён, он слишком мал"
-#: apt-pkg/pkgcache.cc:175
+#: apt-pkg/pkgcache.cc:174
#, c-format
msgid "This APT does not support the versioning system '%s'"
msgstr "Эта версия APT не поддерживает систему версий «%s»"
-#: apt-pkg/pkgcache.cc:185
-#, fuzzy, c-format
-msgid "The package cache was built for different architectures: %s vs %s"
+#: apt-pkg/pkgcache.cc:179
+msgid "The package cache was built for a different architecture"
msgstr "Кэш пакетов был собран для другой архитектуры"
-#: apt-pkg/pkgcache.cc:322
+#: apt-pkg/pkgcache.cc:309
msgid "Depends"
msgstr "Зависит"
-#: apt-pkg/pkgcache.cc:322
+#: apt-pkg/pkgcache.cc:309
msgid "PreDepends"
msgstr "ПредЗависит"
-#: apt-pkg/pkgcache.cc:322
+#: apt-pkg/pkgcache.cc:309
msgid "Suggests"
msgstr "Предлагает"
-#: apt-pkg/pkgcache.cc:323
+#: apt-pkg/pkgcache.cc:310
msgid "Recommends"
msgstr "Рекомендует"
-#: apt-pkg/pkgcache.cc:323
+#: apt-pkg/pkgcache.cc:310
msgid "Conflicts"
msgstr "Конфликтует"
-#: apt-pkg/pkgcache.cc:323
+#: apt-pkg/pkgcache.cc:310
msgid "Replaces"
msgstr "Заменяет"
-#: apt-pkg/pkgcache.cc:324
+#: apt-pkg/pkgcache.cc:311
msgid "Obsoletes"
msgstr "Замещает"
-#: apt-pkg/pkgcache.cc:324
+#: apt-pkg/pkgcache.cc:311
msgid "Breaks"
msgstr "Ломает"
-#: apt-pkg/pkgcache.cc:324
+#: apt-pkg/pkgcache.cc:311
msgid "Enhances"
msgstr "Улучшает"
-#: apt-pkg/pkgcache.cc:335
+#: apt-pkg/pkgcache.cc:322
msgid "important"
msgstr "важный"
-#: apt-pkg/pkgcache.cc:335
+#: apt-pkg/pkgcache.cc:322
msgid "required"
msgstr "необходимый"
-#: apt-pkg/pkgcache.cc:335
+#: apt-pkg/pkgcache.cc:322
msgid "standard"
msgstr "стандартный"
-#: apt-pkg/pkgcache.cc:336
+#: apt-pkg/pkgcache.cc:323
msgid "optional"
msgstr "необязательный"
-#: apt-pkg/pkgcache.cc:336
+#: apt-pkg/pkgcache.cc:323
msgid "extra"
msgstr "дополнительный"
-#: apt-pkg/upgrade.cc:34 apt-pkg/upgrade.cc:136 apt-pkg/upgrade.cc:182
-msgid "Calculating upgrade"
-msgstr "Расчёт обновлений"
+#: apt-pkg/acquire-worker.cc:116
+#, c-format
+msgid "The method driver %s could not be found."
+msgstr "Драйвер для метода %s не найден."
+
+#: apt-pkg/acquire-worker.cc:118
+#, c-format
+msgid "Is the package %s installed?"
+msgstr "Проверьте, установлен ли пакет %s?"
+
+#: apt-pkg/acquire-worker.cc:169
+#, c-format
+msgid "Method %s did not start correctly"
+msgstr "Метод %s запустился не корректно"
+
+#: apt-pkg/acquire-worker.cc:455
+#, c-format
+msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
+msgstr "Вставьте диск с меткой «%s» в устройство «%s» и нажмите ввод."
#: apt-pkg/pkgrecords.cc:38
#, c-format
msgid "Index file type '%s' is not supported"
msgstr "Не поддерживается индексный файл типа «%s»"
-#: apt-pkg/sourcelist.cc:127
-#, fuzzy, c-format
-msgid "Malformed stanza %u in source list %s (URI parse)"
-msgstr "Искажённая строка %lu в списке источников %s (анализ URI)"
+#: apt-pkg/depcache.cc:138 apt-pkg/depcache.cc:167
+msgid "Building dependency tree"
+msgstr "Построение дерева зависимостей"
-#: apt-pkg/sourcelist.cc:170
-#, c-format
-msgid "Malformed line %lu in source list %s ([option] unparseable)"
-msgstr "Искажённая строка %lu в списке источников %s ([параметр] неразбираем)"
+#: apt-pkg/depcache.cc:139
+msgid "Candidate versions"
+msgstr "Версии-кандидаты"
-#: apt-pkg/sourcelist.cc:173
-#, c-format
-msgid "Malformed line %lu in source list %s ([option] too short)"
-msgstr ""
-"Искажённая строка %lu в списке источников %s ([параметр] слишком короткий)"
+#: apt-pkg/depcache.cc:168
+msgid "Dependency generation"
+msgstr "Генерирование зависимостей"
-#: apt-pkg/sourcelist.cc:184
-#, c-format
-msgid "Malformed line %lu in source list %s ([%s] is not an assignment)"
-msgstr "Искажённая строка %lu в списке источников %s (([%s] не назначаем)"
+#: apt-pkg/depcache.cc:188 apt-pkg/depcache.cc:221 apt-pkg/depcache.cc:225
+msgid "Reading state information"
+msgstr "Чтение информации о состоянии"
-#: apt-pkg/sourcelist.cc:190
+#: apt-pkg/depcache.cc:250
#, c-format
-msgid "Malformed line %lu in source list %s ([%s] has no key)"
-msgstr "Искажённая строка %lu в списке источников %s ([%s] не имеет ключа)"
+msgid "Failed to open StateFile %s"
+msgstr "Не удалось открыть StateFile %s"
-#: apt-pkg/sourcelist.cc:193
+#: apt-pkg/depcache.cc:256
#, c-format
-msgid "Malformed line %lu in source list %s ([%s] key %s has no value)"
-msgstr ""
-"Искажённая строка %lu в списке источников %s (([%s] ключ %s не имеет "
-"значения)"
+msgid "Failed to write temporary StateFile %s"
+msgstr "Не удалось записать временный StateFile %s"
-#: apt-pkg/sourcelist.cc:206
+#: apt-pkg/acquire-item.cc:148 apt-pkg/contrib/fileutl.cc:2048
#, c-format
-msgid "Malformed line %lu in source list %s (URI)"
-msgstr "Искажённая строка %lu в списке источников %s (проблема в URI)"
+msgid "rename failed, %s (%s -> %s)."
+msgstr "переименовать не удалось, %s (%s -> %s)."
-#: apt-pkg/sourcelist.cc:208
+#: apt-pkg/acquire-item.cc:163
+msgid "Hash Sum mismatch"
+msgstr "Хеш сумма не совпадает"
+
+#: apt-pkg/acquire-item.cc:168
+msgid "Size mismatch"
+msgstr "Не совпадает размер"
+
+#: apt-pkg/acquire-item.cc:173
+msgid "Invalid file format"
+msgstr "Неправильный формат файла"
+
+#: apt-pkg/acquire-item.cc:1650
#, c-format
-msgid "Malformed line %lu in source list %s (dist)"
+msgid ""
+"Unable to find expected entry '%s' in Release file (Wrong sources.list entry "
+"or malformed file)"
msgstr ""
-"Искажённая строка %lu в списке источников %s (проблема в имени дистрибутива)"
+"Невозможно найти ожидаемый элемент «%s» в файле Release (некорректная запись "
+"в sources.list или файл)"
-#: apt-pkg/sourcelist.cc:211
+#: apt-pkg/acquire-item.cc:1666
#, c-format
-msgid "Malformed line %lu in source list %s (URI parse)"
-msgstr "Искажённая строка %lu в списке источников %s (анализ URI)"
+msgid "Unable to find hash sum for '%s' in Release file"
+msgstr "Невозможно найти хеш-сумму «%s» в файле Release"
-#: apt-pkg/sourcelist.cc:217
-#, c-format
-msgid "Malformed line %lu in source list %s (absolute dist)"
-msgstr "Искажённая строка %lu в списке источников %s (absolute dist)"
+#: apt-pkg/acquire-item.cc:1708
+msgid "There is no public key available for the following key IDs:\n"
+msgstr "Недоступен открытый ключ для следующих ID ключей:\n"
-#: apt-pkg/sourcelist.cc:224
+#: apt-pkg/acquire-item.cc:1746
#, c-format
-msgid "Malformed line %lu in source list %s (dist parse)"
-msgstr "Искажённая строка %lu в списке источников %s (dist parse)"
+msgid ""
+"Release file for %s is expired (invalid since %s). Updates for this "
+"repository will not be applied."
+msgstr ""
+"Файл Release для %s просрочен (недостоверный начиная с %s). Обновление этого "
+"репозитория производиться не будет."
-#: apt-pkg/sourcelist.cc:335
+#: apt-pkg/acquire-item.cc:1768
#, c-format
-msgid "Opening %s"
-msgstr "Открытие %s"
+msgid "Conflicting distribution: %s (expected %s but got %s)"
+msgstr "Конфликт распространения: %s (ожидался %s, но получен %s)"
-#: apt-pkg/sourcelist.cc:347 apt-pkg/cdrom.cc:497
+#: apt-pkg/acquire-item.cc:1798
#, c-format
-msgid "Line %u too long in source list %s."
-msgstr "Строка %u в списке источников %s слишком длинна."
+msgid ""
+"An error occurred during the signature verification. The repository is not "
+"updated and the previous index files will be used. GPG error: %s: %s\n"
+msgstr ""
+"Произошла ошибка при проверке подписи. Репозиторий не обновлён и будут "
+"использованы предыдущие индексные файлы. Ошибка GPG: %s: %s\n"
-#: apt-pkg/sourcelist.cc:371
+#. Invalid signature file, reject (LP: #346386) (Closes: #627642)
+#: apt-pkg/acquire-item.cc:1808 apt-pkg/acquire-item.cc:1813
#, c-format
-msgid "Malformed line %u in source list %s (type)"
-msgstr "Искажённая строка %u в списке источников %s (тип)"
+msgid "GPG error: %s: %s"
+msgstr "Ошибка GPG: %s: %s"
-#: apt-pkg/sourcelist.cc:375
+#: apt-pkg/acquire-item.cc:1936
#, c-format
-msgid "Type '%s' is not known on line %u in source list %s"
-msgstr "Неизвестный тип «%s» в строке %u в списке источников %s"
-
-#: apt-pkg/sourcelist.cc:416
-#, fuzzy, c-format
-msgid "Type '%s' is not known on stanza %u in source list %s"
-msgstr "Неизвестный тип «%s» в строке %u в списке источников %s"
+msgid ""
+"I wasn't able to locate a file for the %s package. This might mean you need "
+"to manually fix this package. (due to missing arch)"
+msgstr ""
+"Не удалось обнаружить файл пакета %s. Это может означать, что вам придётся "
+"вручную исправить этот пакет (возможно, пропущен arch)"
-#: apt-pkg/clean.cc:39 apt-pkg/acquire.cc:553
-#, fuzzy, c-format
-msgid "Clean of %s is not supported"
-msgstr "Не поддерживается индексный файл типа «%s»"
+#: apt-pkg/acquire-item.cc:2002
+#, c-format
+msgid "Can't find a source to download version '%s' of '%s'"
+msgstr "Невозможно найти источник для загрузки «%2$s» версии «%1$s»"
-#: apt-pkg/clean.cc:64
+#: apt-pkg/acquire-item.cc:2060
#, c-format
-msgid "Unable to stat %s."
-msgstr "Невозможно получить атрибуты %s."
+msgid ""
+"The package index files are corrupted. No Filename: field for package %s."
+msgstr "Некорректный перечень пакетов. Нет поля Filename: для пакета %s."
-#: apt-pkg/pkgcachegen.cc:113
+#: apt-pkg/pkgcachegen.cc:93
msgid "Cache has an incompatible versioning system"
msgstr "Кэш имеет несовместимую систему версий"
#. TRANSLATOR: The first placeholder is a package name,
#. the other two should be copied verbatim as they include debug info
-#: apt-pkg/pkgcachegen.cc:240 apt-pkg/pkgcachegen.cc:250
-#: apt-pkg/pkgcachegen.cc:316 apt-pkg/pkgcachegen.cc:382
+#: apt-pkg/pkgcachegen.cc:224 apt-pkg/pkgcachegen.cc:234
+#: apt-pkg/pkgcachegen.cc:300 apt-pkg/pkgcachegen.cc:327
+#: apt-pkg/pkgcachegen.cc:340 apt-pkg/pkgcachegen.cc:382
#: apt-pkg/pkgcachegen.cc:386 apt-pkg/pkgcachegen.cc:403
#: apt-pkg/pkgcachegen.cc:411 apt-pkg/pkgcachegen.cc:415
#: apt-pkg/pkgcachegen.cc:419 apt-pkg/pkgcachegen.cc:440
-#: apt-pkg/pkgcachegen.cc:479 apt-pkg/pkgcachegen.cc:525
-#: apt-pkg/pkgcachegen.cc:539 apt-pkg/pkgcachegen.cc:570
-#: apt-pkg/pkgcachegen.cc:584
+#: apt-pkg/pkgcachegen.cc:479 apt-pkg/pkgcachegen.cc:517
+#: apt-pkg/pkgcachegen.cc:524 apt-pkg/pkgcachegen.cc:555
+#: apt-pkg/pkgcachegen.cc:569
#, c-format
msgid "Error occurred while processing %s (%s%d)"
msgstr "Произошла ошибка во время обработки %s (%s%d)"
-#: apt-pkg/pkgcachegen.cc:273
+#: apt-pkg/pkgcachegen.cc:257
msgid "Wow, you exceeded the number of package names this APT is capable of."
msgstr ""
"Превышено допустимое количество имён пакетов, которое способен обработать "
"APT."
-#: apt-pkg/pkgcachegen.cc:276
+#: apt-pkg/pkgcachegen.cc:260
msgid "Wow, you exceeded the number of versions this APT is capable of."
msgstr ""
"Превышено допустимое количество версий, которое способен обработать APT."
-#: apt-pkg/pkgcachegen.cc:279
+#: apt-pkg/pkgcachegen.cc:263
msgid "Wow, you exceeded the number of descriptions this APT is capable of."
msgstr ""
"Превышено допустимое количество описаний, которое способен обработать APT."
-#: apt-pkg/pkgcachegen.cc:282
+#: apt-pkg/pkgcachegen.cc:266
msgid "Wow, you exceeded the number of dependencies this APT is capable of."
msgstr ""
"Превышено допустимое количество зависимостей, которое способен обработать "
"APT."
-#: apt-pkg/pkgcachegen.cc:591
+#: apt-pkg/pkgcachegen.cc:576
#, c-format
msgid "Package %s %s was not found while processing file dependencies"
msgstr "Во время обработки файла зависимостей не найден пакет %s %s"
-#: apt-pkg/pkgcachegen.cc:1196
+#: apt-pkg/pkgcachegen.cc:1211
#, c-format
msgid "Couldn't stat source package list %s"
msgstr "Не удалось получить атрибуты списка пакетов исходного кода %s"
-#: apt-pkg/pkgcachegen.cc:1284 apt-pkg/pkgcachegen.cc:1388
-#: apt-pkg/pkgcachegen.cc:1394 apt-pkg/pkgcachegen.cc:1551
+#: apt-pkg/pkgcachegen.cc:1299 apt-pkg/pkgcachegen.cc:1403
+#: apt-pkg/pkgcachegen.cc:1409 apt-pkg/pkgcachegen.cc:1566
msgid "Reading package lists"
msgstr "Чтение списков пакетов"
-#: apt-pkg/pkgcachegen.cc:1301
+#: apt-pkg/pkgcachegen.cc:1316
msgid "Collecting File Provides"
msgstr "Сбор информации о Provides"
-#: apt-pkg/pkgcachegen.cc:1493 apt-pkg/pkgcachegen.cc:1500
-msgid "IO Error saving source cache"
-msgstr "Ошибка ввода/вывода при попытке сохранить кэш источников"
-
-#: apt-pkg/edsp.cc:52 apt-pkg/edsp.cc:78
-msgid "Send scenario to solver"
-msgstr "Отправка сценария решателю"
-
-#: apt-pkg/edsp.cc:244
-msgid "Send request to solver"
-msgstr "Отправка запроса решателю"
-
-#: apt-pkg/edsp.cc:323
-msgid "Prepare for receiving solution"
-msgstr "Подготовка к приёму решения"
-
-#: apt-pkg/edsp.cc:330
-msgid "External solver failed without a proper error message"
-msgstr "Внешний решатель завершился с ошибкой не передав сообщения об ошибке"
-
-#: apt-pkg/edsp.cc:622 apt-pkg/edsp.cc:625 apt-pkg/edsp.cc:630
-msgid "Execute external solver"
-msgstr "Запустить внешний решатель"
-
-#: apt-pkg/acquire-item.cc:98
-msgid "Use --allow-insecure-repositories to force the update"
-msgstr ""
-
-#: apt-pkg/acquire-item.cc:215 apt-pkg/contrib/fileutl.cc:2108
-#, c-format
-msgid "rename failed, %s (%s -> %s)."
-msgstr "переименовать не удалось, %s (%s -> %s)."
-
-#: apt-pkg/acquire-item.cc:240
-msgid "Hash Sum mismatch"
-msgstr "Хеш сумма не совпадает"
-
-#: apt-pkg/acquire-item.cc:245
-msgid "Size mismatch"
-msgstr "Не совпадает размер"
-
-#: apt-pkg/acquire-item.cc:250
-#, fuzzy
-msgid "Invalid file format"
-msgstr "Неверная операция %s"
-
-#: apt-pkg/acquire-item.cc:255
-#, fuzzy
-msgid "Signature error"
-msgstr "Ошибка записи"
-
-#: apt-pkg/acquire-item.cc:259
-#, fuzzy
-msgid "Does not start with a cleartext signature"
-msgstr "Файл %s не начинается с прозрачно подписанного сообщения"
-
-#: apt-pkg/acquire-item.cc:1584
-#, c-format
-msgid ""
-"An error occurred during the signature verification. The repository is not "
-"updated and the previous index files will be used. GPG error: %s: %s\n"
-msgstr ""
-"Произошла ошибка при проверке подписи. Репозиторий не обновлён и будут "
-"использованы предыдущие индексные файлы. Ошибка GPG: %s: %s\n"
-
-#. Invalid signature file, reject (LP: #346386) (Closes: #627642)
-#: apt-pkg/acquire-item.cc:1594 apt-pkg/acquire-item.cc:1600
-#, c-format
-msgid "GPG error: %s: %s"
-msgstr "Ошибка GPG: %s: %s"
-
-#: apt-pkg/acquire-item.cc:1707
-#, fuzzy, c-format
-msgid "The repository '%s' is no longer signed."
-msgstr "Каталог %s входит в список diverted"
-
-#: apt-pkg/acquire-item.cc:1714
-msgid ""
-"This is normally not allowed, but the option Acquire::"
-"AllowDowngradeToInsecureRepositories was given to override it."
-msgstr ""
-
-#: apt-pkg/acquire-item.cc:1727 apt-pkg/acquire-item.cc:2202
-#, c-format
-msgid ""
-"The data from '%s' is not signed. Packages from that repository can not be "
-"authenticated."
-msgstr ""
-
-#: apt-pkg/acquire-item.cc:1956
-#, c-format
-msgid ""
-"Unable to find expected entry '%s' in Release file (Wrong sources.list entry "
-"or malformed file)"
-msgstr ""
-"Невозможно найти ожидаемый элемент «%s» в файле Release (некорректная запись "
-"в sources.list или файл)"
-
-#: apt-pkg/acquire-item.cc:1975
-#, c-format
-msgid "Unable to find hash sum for '%s' in Release file"
-msgstr "Невозможно найти хеш-сумму «%s» в файле Release"
-
-#: apt-pkg/acquire-item.cc:1999
-msgid "There is no public key available for the following key IDs:\n"
-msgstr "Недоступен открытый ключ для следующих ID ключей:\n"
-
-#: apt-pkg/acquire-item.cc:2037
-#, c-format
-msgid ""
-"Release file for %s is expired (invalid since %s). Updates for this "
-"repository will not be applied."
-msgstr ""
-"Файл Release для %s просрочен (недостоверный начиная с %s). Обновление этого "
-"репозитория производиться не будет."
-
-#: apt-pkg/acquire-item.cc:2059
-#, c-format
-msgid "Conflicting distribution: %s (expected %s but got %s)"
-msgstr "Конфликт распространения: %s (ожидался %s, но получен %s)"
-
-#: apt-pkg/acquire-item.cc:2078
+#: apt-pkg/pkgcachegen.cc:1400 cmdline/apt-extracttemplates.cc:259
#, c-format
-msgid ""
-"The repository '%s' does not have a Release file. This is deprecated, please "
-"contact the owner of the repository."
-msgstr ""
-
-#: apt-pkg/acquire-item.cc:2249
-#, c-format
-msgid ""
-"I wasn't able to locate a file for the %s package. This might mean you need "
-"to manually fix this package. (due to missing arch)"
-msgstr ""
-"Не удалось обнаружить файл пакета %s. Это может означать, что вам придётся "
-"вручную исправить этот пакет (возможно, пропущен arch)"
-
-#: apt-pkg/acquire-item.cc:2315
-#, c-format
-msgid "Can't find a source to download version '%s' of '%s'"
-msgstr "Невозможно найти источник для загрузки «%2$s» версии «%1$s»"
+msgid "Unable to write to %s"
+msgstr "Невозможно записать в %s"
-#: apt-pkg/acquire-item.cc:2351
-#, c-format
-msgid ""
-"The package index files are corrupted. No Filename: field for package %s."
-msgstr "Некорректный перечень пакетов. Нет поля Filename: для пакета %s."
+#: apt-pkg/pkgcachegen.cc:1508 apt-pkg/pkgcachegen.cc:1515
+msgid "IO Error saving source cache"
+msgstr "Ошибка ввода/вывода при попытке сохранить кэш источников"
-#: apt-pkg/vendorlist.cc:83
+#: apt-pkg/vendorlist.cc:85
#, c-format
msgid "Vendor block %s contains no fingerprint"
msgstr "Блок поставщика %s не содержит отпечатка (fingerprint)"
-#: apt-pkg/acquire.cc:126 apt-pkg/acquire.cc:146 apt-pkg/cdrom.cc:832
+#: apt-pkg/acquire.cc:87 apt-pkg/cdrom.cc:829
#, c-format
msgid "List directory %spartial is missing."
msgstr "Каталог списка %spartial отсутствует."
-#: apt-pkg/acquire.cc:129 apt-pkg/acquire.cc:151
+#: apt-pkg/acquire.cc:91
#, c-format
msgid "Archives directory %spartial is missing."
msgstr "Архивный каталог %spartial отсутствует."
-#: apt-pkg/acquire.cc:162
+#: apt-pkg/acquire.cc:99
#, c-format
msgid "Unable to lock directory %s"
msgstr "Невозможно заблокировать каталог %s"
+#: apt-pkg/acquire.cc:490 apt-pkg/clean.cc:39
+#, c-format
+msgid "Clean of %s is not supported"
+msgstr "Очистка «%s» не поддерживается"
+
#. only show the ETA if it makes sense
#. two days
-#: apt-pkg/acquire.cc:981
+#: apt-pkg/acquire.cc:902
#, c-format
msgid "Retrieving file %li of %li (%s remaining)"
msgstr "Скачивается файл %li из %li (осталось %s)"
-#: apt-pkg/acquire.cc:983
+#: apt-pkg/acquire.cc:904
#, c-format
msgid "Retrieving file %li of %li"
msgstr "Скачивается файл %li из %li"
+#: apt-pkg/update.cc:103 apt-pkg/update.cc:105
+msgid ""
+"Some index files failed to download. They have been ignored, or old ones "
+"used instead."
+msgstr ""
+"Некоторые индексные файлы не скачались. Они были проигнорированы или вместо "
+"них были использованы старые версии."
+
#: apt-pkg/srcrecords.cc:53
msgid "You must put some 'source' URIs in your sources.list"
msgstr "Вы должны заполнить sources.list, поместив туда URI источников пакетов"
+#: apt-pkg/clean.cc:64
+#, c-format
+msgid "Unable to stat %s."
+msgstr "Невозможно получить атрибуты %s."
+
#: apt-pkg/policy.cc:83
#, c-format
msgid ""
@@ -2820,7 +2486,7 @@ msgstr "Неизвестный тип фиксации %s"
msgid "No priority (or zero) specified for pin"
msgstr "Для фиксации не указан приоритет (или указан нулевой)"
-#: apt-pkg/packagemanager.cc:304 apt-pkg/packagemanager.cc:984
+#: apt-pkg/packagemanager.cc:303 apt-pkg/packagemanager.cc:957
#, c-format
msgid ""
"Could not perform immediate configuration on '%s'. Please see man 5 apt.conf "
@@ -2829,12 +2495,12 @@ msgstr ""
"Не удалось выполнить оперативную настройку «%s». Подробней, смотрите в man 5 "
"apt.conf о APT::Immediate-Configure. (%d)"
-#: apt-pkg/packagemanager.cc:563 apt-pkg/packagemanager.cc:593
+#: apt-pkg/packagemanager.cc:550 apt-pkg/packagemanager.cc:580
#, c-format
msgid "Could not configure '%s'. "
msgstr "Не удалось настроить «%s»."
-#: apt-pkg/packagemanager.cc:643
+#: apt-pkg/packagemanager.cc:630
#, c-format
msgid ""
"This installation run will require temporarily removing the essential "
@@ -2847,13 +2513,10 @@ msgstr ""
"Если вы действительно хотите продолжить, установите параметр APT::Force-"
"LoopBreak."
-#: apt-pkg/update.cc:103 apt-pkg/update.cc:105
-msgid ""
-"Some index files failed to download. They have been ignored, or old ones "
-"used instead."
-msgstr ""
-"Некоторые индексные файлы не скачались. Они были проигнорированы или вместо "
-"них были использованы старые версии."
+#: apt-pkg/cdrom.cc:497 apt-pkg/sourcelist.cc:347
+#, c-format
+msgid "Line %u too long in source list %s."
+msgstr "Строка %u в списке источников %s слишком длинна."
#: apt-pkg/cdrom.cc:571
msgid "Unmounting CD-ROM...\n"
@@ -2924,11 +2587,11 @@ msgstr ""
msgid "Copying package lists..."
msgstr "Копирование списков пакетов…"
-#: apt-pkg/cdrom.cc:866
+#: apt-pkg/cdrom.cc:863
msgid "Writing new source list\n"
msgstr "Запись нового списка источников\n"
-#: apt-pkg/cdrom.cc:877
+#: apt-pkg/cdrom.cc:874
msgid "Source list entries for this disc are:\n"
msgstr "Записи в списке источников для этого диска:\n"
@@ -2939,7 +2602,7 @@ msgid ""
msgstr ""
"Пакет %s нуждается в переустановке, но найти архив для него не удалось."
-#: apt-pkg/algorithms.cc:1090
+#: apt-pkg/algorithms.cc:1086
msgid ""
"Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
"held packages."
@@ -2947,196 +2610,417 @@ msgstr ""
"Ошибка, pkgProblemResolver::Resolve сгенерировал повреждённые пакеты. Это "
"может быть вызвано отложенными (held) пакетами."
-#: apt-pkg/algorithms.cc:1092
+#: apt-pkg/algorithms.cc:1088
msgid "Unable to correct problems, you have held broken packages."
msgstr "Невозможно исправить ошибки, у вас отложены (held) битые пакеты."
-#: apt-pkg/depcache.cc:138 apt-pkg/depcache.cc:167
-msgid "Building dependency tree"
-msgstr "Построение дерева зависимостей"
+#: apt-pkg/edsp.cc:52 apt-pkg/edsp.cc:78
+msgid "Send scenario to solver"
+msgstr "Отправка сценария решателю"
-#: apt-pkg/depcache.cc:139
-msgid "Candidate versions"
-msgstr "Версии-кандидаты"
+#: apt-pkg/edsp.cc:241
+msgid "Send request to solver"
+msgstr "Отправка запроса решателю"
-#: apt-pkg/depcache.cc:168
-msgid "Dependency generation"
-msgstr "Генерирование зависимостей"
+#: apt-pkg/edsp.cc:320
+msgid "Prepare for receiving solution"
+msgstr "Подготовка к приёму решения"
-#: apt-pkg/depcache.cc:188 apt-pkg/depcache.cc:221 apt-pkg/depcache.cc:225
-msgid "Reading state information"
-msgstr "Чтение информации о состоянии"
+#: apt-pkg/edsp.cc:327
+msgid "External solver failed without a proper error message"
+msgstr "Внешний решатель завершился с ошибкой не передав сообщения об ошибке"
+
+#: apt-pkg/edsp.cc:619 apt-pkg/edsp.cc:622 apt-pkg/edsp.cc:627
+msgid "Execute external solver"
+msgstr "Запустить внешний решатель"
-#: apt-pkg/depcache.cc:252
+#: apt-pkg/tagfile.cc:140
#, c-format
-msgid "Failed to open StateFile %s"
-msgstr "Не удалось открыть StateFile %s"
+msgid "Unable to parse package file %s (1)"
+msgstr "Невозможно разобрать содержимое пакета %s (1)"
-#: apt-pkg/depcache.cc:258
+#: apt-pkg/tagfile.cc:237
#, c-format
-msgid "Failed to write temporary StateFile %s"
-msgstr "Не удалось записать временный StateFile %s"
+msgid "Unable to parse package file %s (2)"
+msgstr "Невозможно разобрать содержимое пакета %s (2)"
+
+#: apt-pkg/indexrecords.cc:78
+#, c-format
+msgid "Unable to parse Release file %s"
+msgstr "Невозможно разобрать содержимое файла Release (%s)"
-#: apt-pkg/tagfile.cc:186 apt-pkg/tagfile.cc:286 apt-pkg/deb/debrecords.cc:207
+#: apt-pkg/indexrecords.cc:86
#, c-format
-msgid "Unable to parse package file %s (%d)"
-msgstr "Невозможно разобрать содержимое пакета %s (%d)"
+msgid "No sections in Release file %s"
+msgstr "Отсутствуют разделы в файле Release (%s)"
+
+#: apt-pkg/indexrecords.cc:117
+#, c-format
+msgid "No Hash entry in Release file %s"
+msgstr "Отсутствуют элементы Hash в файле Release (%s)"
+
+#: apt-pkg/indexrecords.cc:130
+#, c-format
+msgid "Invalid 'Valid-Until' entry in Release file %s"
+msgstr "Неправильный элемент «Valid-Until» в файле Release %s"
+
+#: apt-pkg/indexrecords.cc:149
+#, c-format
+msgid "Invalid 'Date' entry in Release file %s"
+msgstr "Неправильный элемент «Date» в файле Release %s"
-#: apt-pkg/cacheset.cc:501
+#: apt-pkg/sourcelist.cc:127
+#, c-format
+msgid "Malformed stanza %u in source list %s (URI parse)"
+msgstr "Искажённая строфа %u в списке источников %s (анализ URI)"
+
+#: apt-pkg/sourcelist.cc:170
+#, c-format
+msgid "Malformed line %lu in source list %s ([option] unparseable)"
+msgstr "Искажённая строка %lu в списке источников %s ([параметр] неразбираем)"
+
+#: apt-pkg/sourcelist.cc:173
+#, c-format
+msgid "Malformed line %lu in source list %s ([option] too short)"
+msgstr ""
+"Искажённая строка %lu в списке источников %s ([параметр] слишком короткий)"
+
+#: apt-pkg/sourcelist.cc:184
+#, c-format
+msgid "Malformed line %lu in source list %s ([%s] is not an assignment)"
+msgstr "Искажённая строка %lu в списке источников %s (([%s] не назначаем)"
+
+#: apt-pkg/sourcelist.cc:190
+#, c-format
+msgid "Malformed line %lu in source list %s ([%s] has no key)"
+msgstr "Искажённая строка %lu в списке источников %s ([%s] не имеет ключа)"
+
+#: apt-pkg/sourcelist.cc:193
+#, c-format
+msgid "Malformed line %lu in source list %s ([%s] key %s has no value)"
+msgstr ""
+"Искажённая строка %lu в списке источников %s (([%s] ключ %s не имеет "
+"значения)"
+
+#: apt-pkg/sourcelist.cc:206
+#, c-format
+msgid "Malformed line %lu in source list %s (URI)"
+msgstr "Искажённая строка %lu в списке источников %s (проблема в URI)"
+
+#: apt-pkg/sourcelist.cc:208
+#, c-format
+msgid "Malformed line %lu in source list %s (dist)"
+msgstr ""
+"Искажённая строка %lu в списке источников %s (проблема в имени дистрибутива)"
+
+#: apt-pkg/sourcelist.cc:211
+#, c-format
+msgid "Malformed line %lu in source list %s (URI parse)"
+msgstr "Искажённая строка %lu в списке источников %s (анализ URI)"
+
+#: apt-pkg/sourcelist.cc:217
+#, c-format
+msgid "Malformed line %lu in source list %s (absolute dist)"
+msgstr "Искажённая строка %lu в списке источников %s (absolute dist)"
+
+#: apt-pkg/sourcelist.cc:224
+#, c-format
+msgid "Malformed line %lu in source list %s (dist parse)"
+msgstr "Искажённая строка %lu в списке источников %s (dist parse)"
+
+#: apt-pkg/sourcelist.cc:335
+#, c-format
+msgid "Opening %s"
+msgstr "Открытие %s"
+
+#: apt-pkg/sourcelist.cc:371
+#, c-format
+msgid "Malformed line %u in source list %s (type)"
+msgstr "Искажённая строка %u в списке источников %s (тип)"
+
+#: apt-pkg/sourcelist.cc:375
+#, c-format
+msgid "Type '%s' is not known on line %u in source list %s"
+msgstr "Неизвестный тип «%s» в строке %u в списке источников %s"
+
+#: apt-pkg/sourcelist.cc:416
+#, c-format
+msgid "Type '%s' is not known on stanza %u in source list %s"
+msgstr "Неизвестный тип «%s» в строфе %u в списке источников %s"
+
+#: apt-pkg/cacheset.cc:489
#, c-format
msgid "Release '%s' for '%s' was not found"
msgstr "Выпуск «%s» для «%s» не найден"
-#: apt-pkg/cacheset.cc:504
+#: apt-pkg/cacheset.cc:492
#, c-format
msgid "Version '%s' for '%s' was not found"
msgstr "Версия «%s» для «%s» не найдена"
-#: apt-pkg/cacheset.cc:629
+#: apt-pkg/cacheset.cc:603
#, c-format
msgid "Couldn't find task '%s'"
msgstr "Не удалось найти задачу «%s»"
-#: apt-pkg/cacheset.cc:635
+#: apt-pkg/cacheset.cc:609
#, c-format
msgid "Couldn't find any package by regex '%s'"
-msgstr "Не удалось найти пакет по регулярному выражению «%s»"
+msgstr "Не удалось найти пакет с помощью regex «%s»"
-#: apt-pkg/cacheset.cc:641
-#, fuzzy, c-format
+#: apt-pkg/cacheset.cc:615
+#, c-format
msgid "Couldn't find any package by glob '%s'"
-msgstr "Не удалось найти пакет по регулярному выражению «%s»"
+msgstr "Не удалось найти пакет с помощью glob «%s»"
-#: apt-pkg/cacheset.cc:680
+#: apt-pkg/cacheset.cc:626
#, c-format
msgid "Can't select versions from package '%s' as it is purely virtual"
msgstr ""
"Не удалось выбрать версии из пакета «%s», так как он полностью виртуальный"
-#: apt-pkg/cacheset.cc:719
+#: apt-pkg/cacheset.cc:633 apt-pkg/cacheset.cc:640
+#, c-format
+msgid ""
+"Can't select installed nor candidate version from package '%s' as it has "
+"neither of them"
+msgstr ""
+"Не удалось выбрать ни установленную, ни версию кандидата из пакета «%s», так "
+"как в нём нет ни той, ни другой"
+
+#: apt-pkg/cacheset.cc:647
#, c-format
msgid "Can't select newest version from package '%s' as it is purely virtual"
msgstr ""
"Не удалось выбрать самую новую версию из пакета «%s», так как он полностью "
"виртуальный"
-#: apt-pkg/cacheset.cc:727
+#: apt-pkg/cacheset.cc:655
#, c-format
msgid "Can't select candidate version from package %s as it has no candidate"
msgstr ""
"Не удалось выбрать самую версию кандидата из пакета %s, так как у него нет "
"кандидатов"
-#: apt-pkg/cacheset.cc:735
+#: apt-pkg/cacheset.cc:663
#, c-format
msgid "Can't select installed version from package %s as it is not installed"
msgstr ""
"Не удалось выбрать установленную версию из пакета %s, так как он не "
"установлен"
-#: apt-pkg/cacheset.cc:743 apt-pkg/cacheset.cc:751
+#: apt-pkg/deb/dpkgpm.cc:112
#, c-format
-msgid ""
-"Can't select installed nor candidate version from package '%s' as it has "
-"neither of them"
-msgstr ""
-"Не удалось выбрать ни установленную, ни версию кандидата из пакета «%s», так "
-"как в нём нет ни той, ни другой"
+msgid "Installing %s"
+msgstr "Устанавливается %s"
-#: apt-pkg/indexrecords.cc:83
+#: apt-pkg/deb/dpkgpm.cc:113 apt-pkg/deb/dpkgpm.cc:1016
#, c-format
-msgid "Unable to parse Release file %s"
-msgstr "Невозможно разобрать содержимое файла Release (%s)"
+msgid "Configuring %s"
+msgstr "Настраивается %s"
-#: apt-pkg/indexrecords.cc:91
+#: apt-pkg/deb/dpkgpm.cc:114 apt-pkg/deb/dpkgpm.cc:1023
#, c-format
-msgid "No sections in Release file %s"
-msgstr "Отсутствуют разделы в файле Release (%s)"
+msgid "Removing %s"
+msgstr "Удаляется %s"
-#: apt-pkg/indexrecords.cc:132
+#: apt-pkg/deb/dpkgpm.cc:115
#, c-format
-msgid "No Hash entry in Release file %s"
-msgstr "Отсутствуют элементы Hash в файле Release (%s)"
+msgid "Completely removing %s"
+msgstr "Выполняется полное удаление %s"
-#: apt-pkg/indexrecords.cc:145
+#: apt-pkg/deb/dpkgpm.cc:116
#, c-format
-msgid "Invalid 'Valid-Until' entry in Release file %s"
-msgstr "Неправильный элемент «Valid-Until» в файле Release %s"
+msgid "Noting disappearance of %s"
+msgstr "Уведомление об исчезновении %s"
-#: apt-pkg/indexrecords.cc:164
+#: apt-pkg/deb/dpkgpm.cc:117
#, c-format
-msgid "Invalid 'Date' entry in Release file %s"
-msgstr "Неправильный элемент «Date» в файле Release %s"
+msgid "Running post-installation trigger %s"
+msgstr "Выполняется послеустановочный триггер %s"
-#. d means days, h means hours, min means minutes, s means seconds
-#: apt-pkg/contrib/strutl.cc:425
+#. FIXME: use a better string after freeze
+#: apt-pkg/deb/dpkgpm.cc:847
#, c-format
-msgid "%lid %lih %limin %lis"
-msgstr "%liд %liч %liмин %liс"
+msgid "Directory '%s' missing"
+msgstr "Отсутствует каталог «%s»"
-#. h means hours, min means minutes, s means seconds
-#: apt-pkg/contrib/strutl.cc:432
+#: apt-pkg/deb/dpkgpm.cc:862 apt-pkg/deb/dpkgpm.cc:884
#, c-format
-msgid "%lih %limin %lis"
-msgstr "%liч %liмин %liс"
+msgid "Could not open file '%s'"
+msgstr "Не удалось открыть файл «%s»"
-#. min means minutes, s means seconds
-#: apt-pkg/contrib/strutl.cc:439
+#: apt-pkg/deb/dpkgpm.cc:1009
#, c-format
-msgid "%limin %lis"
-msgstr "%liмин %liс"
+msgid "Preparing %s"
+msgstr "Подготавливается %s"
-#. s means seconds
-#: apt-pkg/contrib/strutl.cc:444
+#: apt-pkg/deb/dpkgpm.cc:1010
#, c-format
-msgid "%lis"
-msgstr "%liс"
+msgid "Unpacking %s"
+msgstr "Распаковывается %s"
-#: apt-pkg/contrib/strutl.cc:1290
+#: apt-pkg/deb/dpkgpm.cc:1015
#, c-format
-msgid "Selection %s not found"
-msgstr "Не найдено: %s"
+msgid "Preparing to configure %s"
+msgstr "Подготавливается для настройки %s"
+
+#: apt-pkg/deb/dpkgpm.cc:1017
+#, c-format
+msgid "Installed %s"
+msgstr "Установлен %s"
+
+#: apt-pkg/deb/dpkgpm.cc:1022
+#, c-format
+msgid "Preparing for removal of %s"
+msgstr "Подготавливается для удаления %s"
+
+#: apt-pkg/deb/dpkgpm.cc:1024
+#, c-format
+msgid "Removed %s"
+msgstr "Удалён %s"
+
+#: apt-pkg/deb/dpkgpm.cc:1029
+#, c-format
+msgid "Preparing to completely remove %s"
+msgstr "Подготовка к полному удалению %s"
+
+#: apt-pkg/deb/dpkgpm.cc:1030
+#, c-format
+msgid "Completely removed %s"
+msgstr "%s полностью удалён"
+
+#: apt-pkg/deb/dpkgpm.cc:1091 apt-pkg/deb/dpkgpm.cc:1179
+#, c-format
+msgid "Can not write log (%s)"
+msgstr "Невозможно записать журнал (%s)"
+
+#: apt-pkg/deb/dpkgpm.cc:1091 apt-pkg/deb/dpkgpm.cc:1179
+msgid "Is /dev/pts mounted?"
+msgstr "Смонтирован ли /dev/pts?"
+
+#: apt-pkg/deb/dpkgpm.cc:1670
+msgid "Operation was interrupted before it could finish"
+msgstr "Действие прервано до его завершения"
+
+#: apt-pkg/deb/dpkgpm.cc:1732
+msgid "No apport report written because MaxReports is reached already"
+msgstr "Отчёты apport не записаны, так достигнут MaxReports"
+
+#. check if its not a follow up error
+#: apt-pkg/deb/dpkgpm.cc:1737
+msgid "dependency problems - leaving unconfigured"
+msgstr "проблемы с зависимостями — оставляем ненастроенным"
+
+#: apt-pkg/deb/dpkgpm.cc:1739
+msgid ""
+"No apport report written because the error message indicates its a followup "
+"error from a previous failure."
+msgstr ""
+"Отчёты apport не записаны, так как сообщение об ошибке указывает на "
+"повторную ошибку от предыдущего отказа."
+
+#: apt-pkg/deb/dpkgpm.cc:1745
+msgid ""
+"No apport report written because the error message indicates a disk full "
+"error"
+msgstr ""
+"Отчёты apport не записаны, так как получено сообщение об ошибке о нехватке "
+"места на диске"
+
+#: apt-pkg/deb/dpkgpm.cc:1752
+msgid ""
+"No apport report written because the error message indicates a out of memory "
+"error"
+msgstr ""
+"Отчёты apport не записаны, так как получено сообщение об ошибке о нехватке "
+"памяти"
+
+#: apt-pkg/deb/dpkgpm.cc:1759 apt-pkg/deb/dpkgpm.cc:1765
+msgid ""
+"No apport report written because the error message indicates an issue on the "
+"local system"
+msgstr ""
+"Отчёты apport не записаны, так как получено сообщение о проблеме в локальной "
+"системе"
+
+#: apt-pkg/deb/dpkgpm.cc:1787
+msgid ""
+"No apport report written because the error message indicates a dpkg I/O error"
+msgstr ""
+"Отчёты apport не записаны, так как получено сообщение об ошибке об ошибке "
+"ввода-выводы dpkg"
+
+#: apt-pkg/deb/debsystem.cc:91
+#, c-format
+msgid ""
+"Unable to lock the administration directory (%s), is another process using "
+"it?"
+msgstr ""
+"Не удалось выполнить блокировку управляющего каталога (%s); он уже "
+"используется другим процессом?"
+
+#: apt-pkg/deb/debsystem.cc:94
+#, c-format
+msgid "Unable to lock the administration directory (%s), are you root?"
+msgstr ""
+"Не удалось выполнить блокировку управляющего каталога (%s); у вас есть права "
+"суперпользователя?"
+
+#. TRANSLATORS: the %s contains the recovery command, usually
+#. dpkg --configure -a
+#: apt-pkg/deb/debsystem.cc:110
+#, c-format
+msgid ""
+"dpkg was interrupted, you must manually run '%s' to correct the problem. "
+msgstr ""
+"Работа dpkg прервана, вы должны вручную запустить «%s» для устранения "
+"проблемы. "
+
+#: apt-pkg/deb/debsystem.cc:128
+msgid "Not locked"
+msgstr "Не заблокирован"
-#: apt-pkg/contrib/fileutl.cc:196
+#: apt-pkg/contrib/fileutl.cc:190
#, c-format
msgid "Not using locking for read only lock file %s"
msgstr ""
"Блокировка не используется, так как файл блокировки %s доступен только для "
"чтения"
-#: apt-pkg/contrib/fileutl.cc:201
+#: apt-pkg/contrib/fileutl.cc:195
#, c-format
msgid "Could not open lock file %s"
msgstr "Не удалось открыть файл блокировки %s"
-#: apt-pkg/contrib/fileutl.cc:224
+#: apt-pkg/contrib/fileutl.cc:218
#, c-format
msgid "Not using locking for nfs mounted lock file %s"
msgstr ""
"Блокировка не используется, так как файл блокировки %s находится на файловой "
"системе nfs"
-#: apt-pkg/contrib/fileutl.cc:229
+#: apt-pkg/contrib/fileutl.cc:223
#, c-format
msgid "Could not get lock %s"
msgstr "Не удалось получить доступ к файлу блокировки %s"
-#: apt-pkg/contrib/fileutl.cc:366 apt-pkg/contrib/fileutl.cc:480
+#: apt-pkg/contrib/fileutl.cc:360 apt-pkg/contrib/fileutl.cc:474
#, c-format
msgid "List of files can't be created as '%s' is not a directory"
msgstr "Список файлов не может быть создан, так как «%s» не является каталогом"
-#: apt-pkg/contrib/fileutl.cc:400
+#: apt-pkg/contrib/fileutl.cc:394
#, c-format
msgid "Ignoring '%s' in directory '%s' as it is not a regular file"
msgstr "Файл «%s» в каталоге «%s» игнорируется, так как это необычный файл"
-#: apt-pkg/contrib/fileutl.cc:418
+#: apt-pkg/contrib/fileutl.cc:412
#, c-format
msgid "Ignoring file '%s' in directory '%s' as it has no filename extension"
msgstr "Файл «%s» в каталоге «%s» игнорируется, так как он не имеет расширения"
-#: apt-pkg/contrib/fileutl.cc:427
+#: apt-pkg/contrib/fileutl.cc:421
#, c-format
msgid ""
"Ignoring file '%s' in directory '%s' as it has an invalid filename extension"
@@ -3144,77 +3028,77 @@ msgstr ""
"Файл «%s» в каталоге «%s» игнорируется, так как он не имеет неправильное "
"расширение"
-#: apt-pkg/contrib/fileutl.cc:846
+#: apt-pkg/contrib/fileutl.cc:825
#, c-format
msgid "Sub-process %s received a segmentation fault."
msgstr ""
"Нарушение защиты памяти (segmentation fault) в порождённом процессе %s."
-#: apt-pkg/contrib/fileutl.cc:848
+#: apt-pkg/contrib/fileutl.cc:827
#, c-format
msgid "Sub-process %s received signal %u."
msgstr "Порождённый процесс %s получил сигнал %u."
-#: apt-pkg/contrib/fileutl.cc:852 apt-pkg/contrib/gpgv.cc:212
+#: apt-pkg/contrib/fileutl.cc:831 apt-pkg/contrib/gpgv.cc:239
#, c-format
msgid "Sub-process %s returned an error code (%u)"
msgstr "Порождённый процесс %s вернул код ошибки (%u)"
-#: apt-pkg/contrib/fileutl.cc:854 apt-pkg/contrib/gpgv.cc:205
+#: apt-pkg/contrib/fileutl.cc:833 apt-pkg/contrib/gpgv.cc:232
#, c-format
msgid "Sub-process %s exited unexpectedly"
msgstr "Порождённый процесс %s неожиданно завершился"
-#: apt-pkg/contrib/fileutl.cc:952
+#: apt-pkg/contrib/fileutl.cc:914
#, c-format
msgid "Problem closing the gzip file %s"
msgstr "Проблема закрытия gzip-файла %s"
-#: apt-pkg/contrib/fileutl.cc:1140
+#: apt-pkg/contrib/fileutl.cc:1102
#, c-format
msgid "Could not open file %s"
msgstr "Не удалось открыть файл %s"
-#: apt-pkg/contrib/fileutl.cc:1199 apt-pkg/contrib/fileutl.cc:1246
+#: apt-pkg/contrib/fileutl.cc:1161 apt-pkg/contrib/fileutl.cc:1208
#, c-format
msgid "Could not open file descriptor %d"
msgstr "Не удалось открыть файловый дескриптор %d"
-#: apt-pkg/contrib/fileutl.cc:1354 apt-pkg/contrib/fileutl.cc:2123
+#: apt-pkg/contrib/fileutl.cc:1316
msgid "Failed to create subprocess IPC"
msgstr "Не удалось создать IPC с порождённым процессом"
-#: apt-pkg/contrib/fileutl.cc:1412
+#: apt-pkg/contrib/fileutl.cc:1374
msgid "Failed to exec compressor "
msgstr "Не удалось выполнить компрессор "
-#: apt-pkg/contrib/fileutl.cc:1553
+#: apt-pkg/contrib/fileutl.cc:1515
#, c-format
msgid "read, still have %llu to read but none left"
msgstr ""
"ошибка при чтении; собирались прочесть ещё %llu байт, но ничего больше нет"
-#: apt-pkg/contrib/fileutl.cc:1666 apt-pkg/contrib/fileutl.cc:1688
+#: apt-pkg/contrib/fileutl.cc:1628 apt-pkg/contrib/fileutl.cc:1650
#, c-format
msgid "write, still have %llu to write but couldn't"
msgstr "ошибка при записи; собирались записать ещё %llu байт, но не смогли"
-#: apt-pkg/contrib/fileutl.cc:1954
+#: apt-pkg/contrib/fileutl.cc:1916
#, c-format
msgid "Problem closing the file %s"
msgstr "Проблема закрытия файла %s"
-#: apt-pkg/contrib/fileutl.cc:1965
+#: apt-pkg/contrib/fileutl.cc:1928
#, c-format
msgid "Problem renaming the file %s to %s"
msgstr "Проблема при переименовании файла %s в %s"
-#: apt-pkg/contrib/fileutl.cc:1976
+#: apt-pkg/contrib/fileutl.cc:1939
#, c-format
msgid "Problem unlinking the file %s"
msgstr "Проблема при удалении файла %s"
-#: apt-pkg/contrib/fileutl.cc:1989
+#: apt-pkg/contrib/fileutl.cc:1952
msgid "Problem syncing the file"
msgstr "Проблема при синхронизации файла"
@@ -3238,6 +3122,35 @@ msgstr "…"
msgid "%c%s... %u%%"
msgstr "%c%s… %u%%"
+#. d means days, h means hours, min means minutes, s means seconds
+#: apt-pkg/contrib/strutl.cc:418
+#, c-format
+msgid "%lid %lih %limin %lis"
+msgstr "%liд %liч %liмин %liс"
+
+#. h means hours, min means minutes, s means seconds
+#: apt-pkg/contrib/strutl.cc:425
+#, c-format
+msgid "%lih %limin %lis"
+msgstr "%liч %liмин %liс"
+
+#. min means minutes, s means seconds
+#: apt-pkg/contrib/strutl.cc:432
+#, c-format
+msgid "%limin %lis"
+msgstr "%liмин %liс"
+
+#. s means seconds
+#: apt-pkg/contrib/strutl.cc:437
+#, c-format
+msgid "%lis"
+msgstr "%liс"
+
+#: apt-pkg/contrib/strutl.cc:1258
+#, c-format
+msgid "Selection %s not found"
+msgstr "Не найдено: %s"
+
#: apt-pkg/contrib/mmap.cc:79
msgid "Can't mmap an empty file"
msgstr "Невозможно отобразить в память пустой файл"
@@ -3302,449 +3215,518 @@ msgstr "Невозможно прочитать атрибуты точки мо
msgid "Failed to stat the cdrom"
msgstr "Невозможно получить атрибуты cdrom"
-#: apt-pkg/contrib/configuration.cc:522
+#: apt-pkg/contrib/configuration.cc:519
#, c-format
msgid "Unrecognized type abbreviation: '%c'"
msgstr "Неизвестная аббревиатура типа: «%c»"
-#: apt-pkg/contrib/configuration.cc:636
+#: apt-pkg/contrib/configuration.cc:633
#, c-format
msgid "Opening configuration file %s"
msgstr "Открытие файла настройки %s"
-#: apt-pkg/contrib/configuration.cc:804
+#: apt-pkg/contrib/configuration.cc:801
#, c-format
msgid "Syntax error %s:%u: Block starts with no name."
msgstr "Синтаксическая ошибка %s:%u: в начале блока нет имени."
-#: apt-pkg/contrib/configuration.cc:823
+#: apt-pkg/contrib/configuration.cc:820
#, c-format
msgid "Syntax error %s:%u: Malformed tag"
msgstr "Синтаксическая ошибка %s:%u: искажённый тег"
-#: apt-pkg/contrib/configuration.cc:840
+#: apt-pkg/contrib/configuration.cc:837
#, c-format
msgid "Syntax error %s:%u: Extra junk after value"
msgstr "Синтаксическая ошибка %s:%u: лишние символы после значения"
-#: apt-pkg/contrib/configuration.cc:880
+#: apt-pkg/contrib/configuration.cc:877
#, c-format
msgid "Syntax error %s:%u: Directives can only be done at the top level"
msgstr ""
"Синтаксическая ошибка %s:%u: директивы могут задаваться только на верхнем "
"уровне"
-#: apt-pkg/contrib/configuration.cc:887
+#: apt-pkg/contrib/configuration.cc:884
#, c-format
msgid "Syntax error %s:%u: Too many nested includes"
msgstr "Синтаксическая ошибка %s:%u: слишком много вложенных include"
-#: apt-pkg/contrib/configuration.cc:891 apt-pkg/contrib/configuration.cc:896
+#: apt-pkg/contrib/configuration.cc:888 apt-pkg/contrib/configuration.cc:893
#, c-format
msgid "Syntax error %s:%u: Included from here"
msgstr "Синтаксическая ошибка %s:%u вызвана include из этого места"
-#: apt-pkg/contrib/configuration.cc:900
+#: apt-pkg/contrib/configuration.cc:897
#, c-format
msgid "Syntax error %s:%u: Unsupported directive '%s'"
msgstr "Синтаксическая ошибка %s:%u: не поддерживаемая директива «%s»"
-#: apt-pkg/contrib/configuration.cc:903
+#: apt-pkg/contrib/configuration.cc:900
#, c-format
msgid "Syntax error %s:%u: clear directive requires an option tree as argument"
msgstr ""
"Синтаксическая ошибка %s:%u: для директивы clear требуется третий параметр в "
"качестве аргумента"
-#: apt-pkg/contrib/configuration.cc:953
+#: apt-pkg/contrib/configuration.cc:950
#, c-format
msgid "Syntax error %s:%u: Extra junk at end of file"
msgstr "Синтаксическая ошибка %s:%u: лишние символы в конце файла"
-#: apt-pkg/contrib/cmndline.cc:127
+#. TRANSLATOR: %s is the trusted keyring parts directory
+#: apt-pkg/contrib/gpgv.cc:72
+#, c-format
+msgid "No keyring installed in %s."
+msgstr "Связка ключей в %s не установлена."
+
+#: apt-pkg/contrib/cmndline.cc:124
#, c-format
msgid "Command line option '%c' [from %s] is not known."
msgstr "Неизвестный параметр командной строки «%c» [из %s]."
-#: apt-pkg/contrib/cmndline.cc:152 apt-pkg/contrib/cmndline.cc:161
-#: apt-pkg/contrib/cmndline.cc:169
+#: apt-pkg/contrib/cmndline.cc:149 apt-pkg/contrib/cmndline.cc:158
+#: apt-pkg/contrib/cmndline.cc:166
#, c-format
msgid "Command line option %s is not understood"
msgstr "Не распознанный параметр командной строки %s"
-#: apt-pkg/contrib/cmndline.cc:174
+#: apt-pkg/contrib/cmndline.cc:171
#, c-format
msgid "Command line option %s is not boolean"
msgstr "Параметр командной строки %s — не логический переключатель \"да/нет\""
-#: apt-pkg/contrib/cmndline.cc:215 apt-pkg/contrib/cmndline.cc:236
+#: apt-pkg/contrib/cmndline.cc:212 apt-pkg/contrib/cmndline.cc:233
#, c-format
msgid "Option %s requires an argument."
msgstr "Для параметра %s требуется аргумент."
-#: apt-pkg/contrib/cmndline.cc:249 apt-pkg/contrib/cmndline.cc:255
+#: apt-pkg/contrib/cmndline.cc:246 apt-pkg/contrib/cmndline.cc:252
#, c-format
msgid "Option %s: Configuration item specification must have an =<val>."
msgstr "Значение параметра %s должно иметь вид =<val>."
-#: apt-pkg/contrib/cmndline.cc:284
+#: apt-pkg/contrib/cmndline.cc:281
#, c-format
msgid "Option %s requires an integer argument, not '%s'"
msgstr "Для параметра %s требуется аргумент в виде целого числа, а не «%s»"
-#: apt-pkg/contrib/cmndline.cc:315
+#: apt-pkg/contrib/cmndline.cc:312
#, c-format
msgid "Option '%s' is too long"
msgstr "Параметр «%s» слишком длинный"
-#: apt-pkg/contrib/cmndline.cc:347
+#: apt-pkg/contrib/cmndline.cc:344
#, c-format
msgid "Sense %s is not understood, try true or false."
msgstr "Смысл %s не ясен, используйте true или false."
-#: apt-pkg/contrib/cmndline.cc:397
+#: apt-pkg/contrib/cmndline.cc:394
#, c-format
msgid "Invalid operation %s"
msgstr "Неверная операция %s"
-#: apt-pkg/deb/dpkgpm.cc:112
-#, c-format
-msgid "Installing %s"
-msgstr "Устанавливается %s"
-
-#: apt-pkg/deb/dpkgpm.cc:113 apt-pkg/deb/dpkgpm.cc:1008
-#, c-format
-msgid "Configuring %s"
-msgstr "Настраивается %s"
-
-#: apt-pkg/deb/dpkgpm.cc:114 apt-pkg/deb/dpkgpm.cc:1015
-#, c-format
-msgid "Removing %s"
-msgstr "Удаляется %s"
-
-#: apt-pkg/deb/dpkgpm.cc:115
-#, c-format
-msgid "Completely removing %s"
-msgstr "Выполняется полное удаление %s"
+#: cmdline/apt-extracttemplates.cc:224
+msgid ""
+"Usage: apt-extracttemplates file1 [file2 ...]\n"
+"\n"
+"apt-extracttemplates is a tool to extract config and template info\n"
+"from debian packages\n"
+"\n"
+"Options:\n"
+" -h This help text\n"
+" -t Set the temp dir\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
+msgstr ""
+"Использование: apt-extracttemplates файл1 [файл2…]\n"
+"\n"
+"apt-extracttemplates извлекает из пакетов Debian данные config и template\n"
+"\n"
+"Параметры:\n"
+" -h Этот текст\n"
+" -t Задать каталог для временных файлов\n"
+" -c=? Читать указанный файл настройки\n"
+" -o=? Задать значение произвольной настройке, например, -o dir::cache=/tmp\n"
-#: apt-pkg/deb/dpkgpm.cc:116
+#: cmdline/apt-extracttemplates.cc:254
#, c-format
-msgid "Noting disappearance of %s"
-msgstr "Уведомление об исчезновении %s"
+msgid "Unable to mkstemp %s"
+msgstr "Невозможно выполнить mkstemp %s"
-#: apt-pkg/deb/dpkgpm.cc:117
-#, c-format
-msgid "Running post-installation trigger %s"
-msgstr "Выполняется послеустановочный триггер %s"
+#: cmdline/apt-extracttemplates.cc:300
+msgid "Cannot get debconf version. Is debconf installed?"
+msgstr "Невозможно определить версию debconf. Он установлен?"
-#. FIXME: use a better string after freeze
-#: apt-pkg/deb/dpkgpm.cc:839
-#, c-format
-msgid "Directory '%s' missing"
-msgstr "Отсутствует каталог «%s»"
+#: ftparchive/apt-ftparchive.cc:187 ftparchive/apt-ftparchive.cc:371
+msgid "Package extension list is too long"
+msgstr "Список расширений, допустимых для пакетов, слишком длинен"
-#: apt-pkg/deb/dpkgpm.cc:854 apt-pkg/deb/dpkgpm.cc:876
+#: ftparchive/apt-ftparchive.cc:189 ftparchive/apt-ftparchive.cc:206
+#: ftparchive/apt-ftparchive.cc:229 ftparchive/apt-ftparchive.cc:283
+#: ftparchive/apt-ftparchive.cc:297 ftparchive/apt-ftparchive.cc:319
#, c-format
-msgid "Could not open file '%s'"
-msgstr "Не удалось открыть файл «%s»"
+msgid "Error processing directory %s"
+msgstr "Ошибка обработки каталога %s"
-#: apt-pkg/deb/dpkgpm.cc:1001
-#, c-format
-msgid "Preparing %s"
-msgstr "Подготавливается %s"
+#: ftparchive/apt-ftparchive.cc:281
+msgid "Source extension list is too long"
+msgstr "Список расширений источников слишком длинен"
-#: apt-pkg/deb/dpkgpm.cc:1002
-#, c-format
-msgid "Unpacking %s"
-msgstr "Распаковывается %s"
+#: ftparchive/apt-ftparchive.cc:401
+msgid "Error writing header to contents file"
+msgstr ""
+"Ошибка записи заголовка в полный перечень содержимого пакетов (Contents)"
-#: apt-pkg/deb/dpkgpm.cc:1007
+#: ftparchive/apt-ftparchive.cc:431
#, c-format
-msgid "Preparing to configure %s"
-msgstr "Подготавливается для настройки %s"
+msgid "Error processing contents %s"
+msgstr "ошибка обработки полного перечня содержимого пакетов (Contents) %s"
-#: apt-pkg/deb/dpkgpm.cc:1009
-#, c-format
-msgid "Installed %s"
-msgstr "Установлен %s"
+#: ftparchive/apt-ftparchive.cc:626
+msgid ""
+"Usage: apt-ftparchive [options] command\n"
+"Commands: packages binarypath [overridefile [pathprefix]]\n"
+" sources srcpath [overridefile [pathprefix]]\n"
+" contents path\n"
+" release path\n"
+" generate config [groups]\n"
+" clean config\n"
+"\n"
+"apt-ftparchive generates index files for Debian archives. It supports\n"
+"many styles of generation from fully automated to functional replacements\n"
+"for dpkg-scanpackages and dpkg-scansources\n"
+"\n"
+"apt-ftparchive generates Package files from a tree of .debs. The\n"
+"Package file contains the contents of all the control fields from\n"
+"each package as well as the MD5 hash and filesize. An override file\n"
+"is supported to force the value of Priority and Section.\n"
+"\n"
+"Similarly apt-ftparchive generates Sources files from a tree of .dscs.\n"
+"The --source-override option can be used to specify a src override file\n"
+"\n"
+"The 'packages' and 'sources' command should be run in the root of the\n"
+"tree. BinaryPath should point to the base of the recursive search and \n"
+"override file should contain the override flags. Pathprefix is\n"
+"appended to the filename fields if present. Example usage from the \n"
+"Debian archive:\n"
+" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
+" dists/potato/main/binary-i386/Packages\n"
+"\n"
+"Options:\n"
+" -h This help text\n"
+" --md5 Control MD5 generation\n"
+" -s=? Source override file\n"
+" -q Quiet\n"
+" -d=? Select the optional caching database\n"
+" --no-delink Enable delinking debug mode\n"
+" --contents Control contents file generation\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option"
+msgstr ""
+"Использование: apt-ftparchive [параметры] команда\n"
+"Команды: packages binarypath [overridefile [pathprefix]]\n"
+" sources srcpath [overridefile [pathprefix]]\n"
+" contents path\n"
+" release path\n"
+" generate config [groups]\n"
+" clean config\n"
+"\n"
+"apt-ftparchive генерирует индексные файлы архивов Debian. Он поддерживает\n"
+"множество стилей генерации: от полностью автоматического до функциональной "
+"замены\n"
+"программ dpkg-scanpackages и dpkg-scansources\n"
+"\n"
+"apt-ftparchive генерирует файлы Package (списки пакетов) для дерева\n"
+"каталогов, содержащих файлы .deb. Файл Package включает в себя управляющие\n"
+"поля каждого пакета, а также хеш MD5 и размер файла. Значения управляющих\n"
+"полей «приоритет» (Priority) и «секция» (Section) могут быть изменены с\n"
+"помощью файла override.\n"
+"\n"
+"Кроме того, apt-ftparchive может генерировать файлы Sources из дерева\n"
+"каталогов, содержащих файлы .dsc. Для указания файла override в этом \n"
+"режиме можно использовать параметр --source-override.\n"
+"\n"
+"Команды «packages» и «sources» надо выполнять, находясь в корневом каталоге\n"
+"дерева, которое вы хотите обработать. BinaryPath должен указывать на место,\n"
+"с которого начинается рекурсивный обход, а файл переназначений (override)\n"
+"должен содержать записи о переназначениях управляющих полей. Если был "
+"указан\n"
+"Pathprefix, то его значение добавляется к управляющим полям, содержащим\n"
+"имена файлов. Пример использования для архива Debian:\n"
+" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
+" dists/potato/main/binary-i386/Packages\n"
+"\n"
+"Параметры:\n"
+" -h Этот текст\n"
+" --md5 Управление генерацией MD5-хешей\n"
+" -s=? Указать файл переназначений (override) для источников\n"
+" -q Не выводить сообщения в процессе работы\n"
+" -d=? Указать кэширующую базу данных (не обязательно)\n"
+" --no-delink Включить режим отладки процесса удаления файлов\n"
+" --contents Управление генерацией полного перечня содержимого пакетов\n"
+" (файла Contents)\n"
+" -c=? Использовать указанный файл настройки\n"
+" -o=? Задать значение произвольному параметру настройки"
-#: apt-pkg/deb/dpkgpm.cc:1014
-#, c-format
-msgid "Preparing for removal of %s"
-msgstr "Подготавливается для удаления %s"
+#: ftparchive/apt-ftparchive.cc:822
+msgid "No selections matched"
+msgstr "Совпадений не обнаружено"
-#: apt-pkg/deb/dpkgpm.cc:1016
+#: ftparchive/apt-ftparchive.cc:907
#, c-format
-msgid "Removed %s"
-msgstr "Удалён %s"
+msgid "Some files are missing in the package file group `%s'"
+msgstr "В группе пакетов «%s» отсутствуют некоторые файлы"
-#: apt-pkg/deb/dpkgpm.cc:1021
+#: ftparchive/cachedb.cc:65
#, c-format
-msgid "Preparing to completely remove %s"
-msgstr "Подготовка к полному удалению %s"
+msgid "DB was corrupted, file renamed to %s.old"
+msgstr "БД была повреждена, файл переименован в %s.old"
-#: apt-pkg/deb/dpkgpm.cc:1022
+#: ftparchive/cachedb.cc:83
#, c-format
-msgid "Completely removed %s"
-msgstr "%s полностью удалён"
-
-#: apt-pkg/deb/dpkgpm.cc:1081 apt-pkg/deb/dpkgpm.cc:1169
-#, fuzzy, c-format
-msgid "Can not write log (%s)"
-msgstr "Невозможно записать в %s"
-
-#: apt-pkg/deb/dpkgpm.cc:1081 apt-pkg/deb/dpkgpm.cc:1169
-msgid "Is /dev/pts mounted?"
-msgstr ""
-
-#: apt-pkg/deb/dpkgpm.cc:1656
-msgid "Operation was interrupted before it could finish"
-msgstr "Действие прервано до его завершения"
-
-#: apt-pkg/deb/dpkgpm.cc:1718
-msgid "No apport report written because MaxReports is reached already"
-msgstr "Отчёты apport не записаны, так достигнут MaxReports"
-
-#. check if its not a follow up error
-#: apt-pkg/deb/dpkgpm.cc:1723
-msgid "dependency problems - leaving unconfigured"
-msgstr "проблемы с зависимостями — оставляем ненастроенным"
-
-#: apt-pkg/deb/dpkgpm.cc:1725
-msgid ""
-"No apport report written because the error message indicates its a followup "
-"error from a previous failure."
-msgstr ""
-"Отчёты apport не записаны, так как сообщение об ошибке указывает на "
-"повторную ошибку от предыдущего отказа."
+msgid "DB is old, attempting to upgrade %s"
+msgstr "DB устарела, попытка обновить %s"
-#: apt-pkg/deb/dpkgpm.cc:1731
+#: ftparchive/cachedb.cc:94
msgid ""
-"No apport report written because the error message indicates a disk full "
-"error"
+"DB format is invalid. If you upgraded from an older version of apt, please "
+"remove and re-create the database."
msgstr ""
-"Отчёты apport не записаны, так как получено сообщение об ошибке о нехватке "
-"места на диске"
+"Некорректный формат базы данных (DB). Если вы обновляли версию apt, удалите "
+"и создайте базу данных заново."
-#: apt-pkg/deb/dpkgpm.cc:1738
-msgid ""
-"No apport report written because the error message indicates a out of memory "
-"error"
-msgstr ""
-"Отчёты apport не записаны, так как получено сообщение об ошибке о нехватке "
-"памяти"
+#: ftparchive/cachedb.cc:99
+#, c-format
+msgid "Unable to open DB file %s: %s"
+msgstr "Не удалось открыть DB файл %s: %s"
-#: apt-pkg/deb/dpkgpm.cc:1745 apt-pkg/deb/dpkgpm.cc:1751
-#, fuzzy
-msgid ""
-"No apport report written because the error message indicates an issue on the "
-"local system"
-msgstr ""
-"Отчёты apport не записаны, так как получено сообщение об ошибке о нехватке "
-"места на диске"
+#: ftparchive/cachedb.cc:332
+msgid "Failed to read .dsc"
+msgstr "Не удалось прочесть .dsc"
-#: apt-pkg/deb/dpkgpm.cc:1773
-msgid ""
-"No apport report written because the error message indicates a dpkg I/O error"
-msgstr ""
-"Отчёты apport не записаны, так как получено сообщение об ошибке об ошибке "
-"ввода-выводы dpkg"
+#: ftparchive/cachedb.cc:365
+msgid "Archive has no control record"
+msgstr "В архиве нет поля control"
-#: apt-pkg/deb/debsystem.cc:91
-#, c-format
-msgid ""
-"Unable to lock the administration directory (%s), is another process using "
-"it?"
-msgstr ""
-"Не удалось выполнить блокировку управляющего каталога (%s); он уже "
-"используется другим процессом?"
+#: ftparchive/cachedb.cc:594
+msgid "Unable to get a cursor"
+msgstr "Невозможно получить курсор"
-#: apt-pkg/deb/debsystem.cc:94
+#: ftparchive/writer.cc:91
#, c-format
-msgid "Unable to lock the administration directory (%s), are you root?"
-msgstr ""
-"Не удалось выполнить блокировку управляющего каталога (%s); у вас есть права "
-"суперпользователя?"
+msgid "W: Unable to read directory %s\n"
+msgstr "W: Не удалось прочитать каталог %s\n"
-#. TRANSLATORS: the %s contains the recovery command, usually
-#. dpkg --configure -a
-#: apt-pkg/deb/debsystem.cc:110
+#: ftparchive/writer.cc:96
#, c-format
-msgid ""
-"dpkg was interrupted, you must manually run '%s' to correct the problem. "
-msgstr ""
-"Работа dpkg прервана, вы должны вручную запустить «%s» для устранения "
-"проблемы. "
+msgid "W: Unable to stat %s\n"
+msgstr "W: Не удалось прочитать атрибуты %s\n"
-#: apt-pkg/deb/debsystem.cc:128
-msgid "Not locked"
-msgstr "Не заблокирован"
+#: ftparchive/writer.cc:152
+msgid "E: "
+msgstr "E: "
-#: apt-inst/filelist.cc:380
-msgid "DropNode called on still linked node"
-msgstr "DropNode вызван для узла, который ещё используется"
+#: ftparchive/writer.cc:154
+msgid "W: "
+msgstr "W: "
-#: apt-inst/filelist.cc:412
-msgid "Failed to locate the hash element!"
-msgstr "Не удалось найти элемент хеша!"
+#: ftparchive/writer.cc:161
+msgid "E: Errors apply to file "
+msgstr "E: Ошибки относятся к файлу "
-#: apt-inst/filelist.cc:459
-msgid "Failed to allocate diversion"
-msgstr "Не удалось создать diversion"
+#: ftparchive/writer.cc:179 ftparchive/writer.cc:211
+#, c-format
+msgid "Failed to resolve %s"
+msgstr "Не удалось проследовать по ссылке %s"
-#: apt-inst/filelist.cc:464
-msgid "Internal error in AddDiversion"
-msgstr "Внутренняя ошибка в AddDiversion"
+#: ftparchive/writer.cc:192
+msgid "Tree walking failed"
+msgstr "Не удалось совершить обход дерева"
-#: apt-inst/filelist.cc:477
+#: ftparchive/writer.cc:219
#, c-format
-msgid "Trying to overwrite a diversion, %s -> %s and %s/%s"
-msgstr "Попытка изменения diversion, %s -> %s и %s/%s"
+msgid "Failed to open %s"
+msgstr "Не удалось открыть %s"
-#: apt-inst/filelist.cc:506
+#: ftparchive/writer.cc:278
#, c-format
-msgid "Double add of diversion %s -> %s"
-msgstr "Двойное добавление diversion %s -> %s"
+msgid " DeLink %s [%s]\n"
+msgstr "DeLink %s [%s]\n"
-#: apt-inst/filelist.cc:549
+#: ftparchive/writer.cc:286
#, c-format
-msgid "Duplicate conf file %s/%s"
-msgstr "Повторно указан файл настройки %s/%s"
+msgid "Failed to readlink %s"
+msgstr "Не удалось прочесть ссылку %s"
-#: apt-inst/extract.cc:101 apt-inst/extract.cc:172
+#: ftparchive/writer.cc:290
#, c-format
-msgid "The path %s is too long"
-msgstr "Слишком длинный путь %s"
+msgid "Failed to unlink %s"
+msgstr "Не удалось удалить %s"
-#: apt-inst/extract.cc:132
+#: ftparchive/writer.cc:298
#, c-format
-msgid "Unpacking %s more than once"
-msgstr "Повторная распаковка %s"
+msgid "*** Failed to link %s to %s"
+msgstr "*** Не удалось создать ссылку %s на %s"
-#: apt-inst/extract.cc:142
+#: ftparchive/writer.cc:308
#, c-format
-msgid "The directory %s is diverted"
-msgstr "Каталог %s входит в список diverted"
+msgid " DeLink limit of %sB hit.\n"
+msgstr " Превышен лимит в %sB в DeLink.\n"
-#: apt-inst/extract.cc:152
+#: ftparchive/writer.cc:417
+msgid "Archive had no package field"
+msgstr "В архиве нет поля package"
+
+#: ftparchive/writer.cc:425 ftparchive/writer.cc:684
#, c-format
-msgid "The package is trying to write to the diversion target %s/%s"
-msgstr "Пакет пытается писать в diversion %s/%s"
+msgid " %s has no override entry\n"
+msgstr " Нет записи о переназначении (override) для %s\n"
-#: apt-inst/extract.cc:162 apt-inst/extract.cc:306
-msgid "The diversion path is too long"
-msgstr "Путь diversion слишком длинен"
+#: ftparchive/writer.cc:493 ftparchive/writer.cc:840
+#, c-format
+msgid " %s maintainer is %s not %s\n"
+msgstr " пакет %s сопровождает %s, а не %s\n"
-#: apt-inst/extract.cc:249
+#: ftparchive/writer.cc:698
#, c-format
-msgid "The directory %s is being replaced by a non-directory"
-msgstr "Каталог %s был заменён не-каталогом"
+msgid " %s has no source override entry\n"
+msgstr " Нет записи source override для %s\n"
-#: apt-inst/extract.cc:289
-msgid "Failed to locate node in its hash bucket"
-msgstr "Не удалось разместить узел в хеше"
+#: ftparchive/writer.cc:702
+#, c-format
+msgid " %s has no binary override entry either\n"
+msgstr " Нет записи binary override для %s\n"
-#: apt-inst/extract.cc:293
-msgid "The path is too long"
-msgstr "Путь слишком длинен"
+#: ftparchive/contents.cc:351 ftparchive/contents.cc:382
+msgid "realloc - Failed to allocate memory"
+msgstr "realloc — не удалось выделить память"
-#: apt-inst/extract.cc:421
+#: ftparchive/override.cc:38 ftparchive/override.cc:142
#, c-format
-msgid "Overwrite package match with no version for %s"
-msgstr "Файлы заменяются содержимым пакета %s без версии"
+msgid "Unable to open %s"
+msgstr "Не удалось открыть %s"
-#: apt-inst/extract.cc:438
+#. skip spaces
+#. find end of word
+#: ftparchive/override.cc:68
#, c-format
-msgid "File %s/%s overwrites the one in the package %s"
-msgstr "Файл %s/%s переписывает файл в пакете %s"
+msgid "Malformed override %s line %llu (%s)"
+msgstr "Неправильная запись о переназначении (override) %s в строке %llu (%s)"
-#: apt-inst/extract.cc:498
+#: ftparchive/override.cc:127 ftparchive/override.cc:201
#, c-format
-msgid "Unable to stat %s"
-msgstr "Невозможно получить атрибуты %s"
+msgid "Failed to read the override file %s"
+msgstr "Не удалось прочесть файл переназначений (override) %s"
-#: apt-inst/dirstream.cc:42 apt-inst/dirstream.cc:49 apt-inst/dirstream.cc:54
+#: ftparchive/override.cc:166
#, c-format
-msgid "Failed to write file %s"
-msgstr "Не удалось записать в файл %s"
+msgid "Malformed override %s line %llu #1"
+msgstr "Неправильная запись о переназначении (override) %s в строке %llu #1"
-#: apt-inst/dirstream.cc:104
+#: ftparchive/override.cc:178
#, c-format
-msgid "Failed to close file %s"
-msgstr "Не удалось закрыть файл %s"
+msgid "Malformed override %s line %llu #2"
+msgstr "Неправильная запись о переназначении (override) %s в строке %llu #2"
-#: apt-inst/deb/debfile.cc:47 apt-inst/deb/debfile.cc:54
-#: apt-inst/deb/debfile.cc:63
+#: ftparchive/override.cc:191
#, c-format
-msgid "This is not a valid DEB archive, missing '%s' member"
-msgstr "Это неправильный DEB-архив — отсутствует составная часть «%s»"
+msgid "Malformed override %s line %llu #3"
+msgstr "Неправильная запись о переназначении (override) %s в строке %llu #3"
-#: apt-inst/deb/debfile.cc:132
+#: ftparchive/multicompress.cc:73
#, c-format
-msgid "Internal error, could not locate member %s"
-msgstr "Внутренняя ошибка, не удалось найти составную часть %s"
-
-#: apt-inst/deb/debfile.cc:231
-msgid "Unparsable control file"
-msgstr "Не удалось прочесть содержимое control-файла"
-
-#: apt-inst/contrib/arfile.cc:76
-msgid "Invalid archive signature"
-msgstr "Неверная сигнатура архива"
-
-#: apt-inst/contrib/arfile.cc:84
-msgid "Error reading archive member header"
-msgstr "Ошибка чтения заголовка элемента архива"
+msgid "Unknown compression algorithm '%s'"
+msgstr "Неизвестный алгоритм сжатия «%s»"
-#: apt-inst/contrib/arfile.cc:96
+#: ftparchive/multicompress.cc:103
#, c-format
-msgid "Invalid archive member header %s"
-msgstr "Неправильный заголовок элемента архива %s"
-
-#: apt-inst/contrib/arfile.cc:108
-msgid "Invalid archive member header"
-msgstr "Неправильный заголовок элемента архива"
+msgid "Compressed output %s needs a compression set"
+msgstr ""
+"Для получения сжатого вывода %s необходимо включить использования сжатия"
-#: apt-inst/contrib/arfile.cc:137
-msgid "Archive is too short"
-msgstr "Слишком короткий архив"
+#: ftparchive/multicompress.cc:192
+msgid "Failed to create FILE*"
+msgstr "Не удалось создать FILE*"
-#: apt-inst/contrib/arfile.cc:141
-msgid "Failed to read the archive headers"
-msgstr "Не удалось прочитать заголовки архива"
+#: ftparchive/multicompress.cc:195
+msgid "Failed to fork"
+msgstr "Не удалось запустить порождённый процесс"
-#: apt-inst/contrib/extracttar.cc:128
-msgid "Failed to create pipes"
-msgstr "Не удалось создать каналы"
+#: ftparchive/multicompress.cc:209
+msgid "Compress child"
+msgstr "Процесс-потомок, производящий сжатие"
-#: apt-inst/contrib/extracttar.cc:155
-msgid "Failed to exec gzip "
-msgstr "Не удалось выполнить gzip "
+#: ftparchive/multicompress.cc:232
+#, c-format
+msgid "Internal error, failed to create %s"
+msgstr "Внутренняя ошибка, не удалось создать %s"
-#: apt-inst/contrib/extracttar.cc:192 apt-inst/contrib/extracttar.cc:222
-msgid "Corrupted archive"
-msgstr "Повреждённый архив"
+#: ftparchive/multicompress.cc:305
+msgid "IO to subprocess/file failed"
+msgstr "Ошибка ввода/вывода в подпроцесс/файл"
-#: apt-inst/contrib/extracttar.cc:207
-msgid "Tar checksum failed, archive corrupted"
-msgstr "Неправильная контрольная сумма Tar, архив повреждён"
+#: ftparchive/multicompress.cc:343
+msgid "Failed to read while computing MD5"
+msgstr "Ошибка чтения во время вычисления MD5"
-#: apt-inst/contrib/extracttar.cc:312
+#: ftparchive/multicompress.cc:359
#, c-format
-msgid "Unknown TAR header type %u, member %s"
-msgstr "Неизвестный заголовок в архиве TAR. Тип %u, элемент %s"
-
-#~ msgid "Total dependency version space: "
-#~ msgstr "Всего информации о зависимостях: "
+msgid "Problem unlinking %s"
+msgstr "Не удалось удалить %s"
-#~ msgid "You don't have enough free space in %s"
-#~ msgstr "Недостаточно места в %s"
+#: cmdline/apt-internal-solver.cc:49
+msgid ""
+"Usage: apt-internal-solver\n"
+"\n"
+"apt-internal-solver is an interface to use the current internal\n"
+"like an external resolver for the APT family for debugging or alike\n"
+"\n"
+"Options:\n"
+" -h This help text.\n"
+" -q Loggable output - no progress indicator\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
+msgstr ""
+"Использование: apt-internal-solver\n"
+"\n"
+"apt-internal-solver — интерфейс к внутреннему решателю, предназначен\n"
+"для отладки, подобен интерфейсу внешнего решателя семейства APT\n"
+"\n"
+"Параметры:\n"
+" -h Этот текст\n"
+" -q Вывод протокола работы — индикатор выполнения отключён\n"
+" -c=? Читать указанный файл настройки\n"
+" -o=? Задать значение произвольной настройке, например, -o dir::cache=/tmp\n"
-#~ msgid "Done"
-#~ msgstr "Готово"
+#: cmdline/apt-sortpkgs.cc:89
+msgid "Unknown package record!"
+msgstr "Запись о неизвестном пакете!"
-#~ msgid "No keyring installed in %s."
-#~ msgstr "Связка ключей в %s не установлена."
+#: cmdline/apt-sortpkgs.cc:153
+msgid ""
+"Usage: apt-sortpkgs [options] file1 [file2 ...]\n"
+"\n"
+"apt-sortpkgs is a simple tool to sort package files. The -s option is used\n"
+"to indicate what kind of file it is.\n"
+"\n"
+"Options:\n"
+" -h This help text\n"
+" -s Use source file sorting\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
+msgstr ""
+"Использование: apt-sortpkgs [параметры] файл1 [файл2…]\n"
+"\n"
+"apt-sortpkgs — простой инструмент для сортировки списков пакетов. Параметр -"
+"s\n"
+"используется для указания типа списка.\n"
+"\n"
+"Параметры:\n"
+" -h этот текст\n"
+" -s сортировать список файлов пакетов исходного кода\n"
+" -c=? читать указанный файл настройки\n"
+" -o=? Задать значение произвольной настройке, например, -o dir::cache=/tmp\n"
#, fuzzy
#~ msgid "Internal error, Upgrade broke stuff"
@@ -3836,6 +3818,9 @@ msgstr "Неизвестный заголовок в архиве TAR. Тип %u
#~ "Не удалось записать в журнал, неудачное выполнение openpty() (/dev/pts не "
#~ "смонтирован?)\n"
+#~ msgid "File %s doesn't start with a clearsigned message"
+#~ msgstr "Файл %s не начинается с прозрачно подписанного сообщения"
+
#~ msgid "Skipping nonexistent file %s"
#~ msgstr "Пропускается несуществующий файл %s"
diff --git a/po/sk.po b/po/sk.po
index 912d1fcf7..776b139c1 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2012-06-28 20:49+0100\n"
@@ -1280,8 +1280,8 @@ msgstr "Nasledovné pridržané balíky sa zmenia:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (kvôli %s) "
+msgid "%s (due to %s)"
+msgstr "%s (kvôli %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1716,20 +1716,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Už existuje "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Už existuje:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Získava sa:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Získava sa:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr ""
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Chyba "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Chyba:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/sl.po b/po/sl.po
index 3210fa504..496919956 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -1277,8 +1277,8 @@ msgstr "Naslednji zadržani paketi bodo spremenjeni:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (zaradi %s) "
+msgid "%s (due to %s)"
+msgstr "%s (zaradi %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1717,20 +1717,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Zadetek "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Zadetek:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Dobi:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Dobi:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Prezr "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Prezr:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Nap "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Nap:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/sv.po b/po/sv.po
index 70f4b2d2d..7e7801f84 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2010-08-24 21:18+0100\n"
@@ -1266,8 +1266,8 @@ msgstr "Följande tillbakahållna paket kommer att ändras:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (på grund av %s) "
+msgid "%s (due to %s)"
+msgstr "%s (på grund av %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1698,23 +1698,27 @@ msgstr ""
# Måste vara tre bokstäver(?)
# "Hit" = aktuell version är fortfarande giltig
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Bra "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Bra:%lu %s"
# "Get:" = hämtar ny version
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Läs:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Läs:%lu %s"
# "Ign" = hoppar över
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ign "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ign:%lu %s"
# "Err" = fel vid hämtning
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Fel "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Fel:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/th.po b/po/th.po
index 147c3b8b8..731b1de46 100644
--- a/po/th.po
+++ b/po/th.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2014-12-12 13:00+0700\n"
@@ -1287,8 +1287,8 @@ msgstr "จะเปลี่ยนแปลงรายการคงรุ่
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (เนื่องจาก %s) "
+msgid "%s (due to %s)"
+msgstr "%s (เนื่องจาก %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1696,20 +1696,24 @@ msgid "Full Text Search"
msgstr "ค้นทั่วทั้งเนื้อความ"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "เจอ "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "เจอ:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "ดึง:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "ดึง:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "ข้าม "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "ข้าม:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "ปัญหา "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "ปัญหา:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/tl.po b/po/tl.po
index e3da79c8a..d6e1059e8 100644
--- a/po/tl.po
+++ b/po/tl.po
@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2007-03-29 21:36+0800\n"
@@ -1258,8 +1258,8 @@ msgstr "Ang susunod na mga hinawakang mga pakete ay babaguhin:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (dahil sa %s) "
+msgid "%s (due to %s)"
+msgstr "%s (dahil sa %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1677,20 +1677,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Tumama "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Tumama:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Kunin: "
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Kunin:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "DiPansin "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "DiPansin:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Err "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Err:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/tr.po b/po/tr.po
index 5d9c3cee3..5a5c4fcd5 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,10 +6,10 @@
# Rosetta Contributors, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: apt\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2015-03-09 02:17+0100\n"
-"PO-Revision-Date: 2014-09-29 22:08+0200\n"
+"POT-Creation-Date: 2015-04-13 07:23+0200\n"
+"PO-Revision-Date: 2015-06-21 16:54+0200\n"
"Last-Translator: Mert Dirik <mertdirik@gmail.com>\n"
"Language-Team: Debian l10n Turkish <debian-l10n-turkish@lists.debian.org>\n"
"Language: tr\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Generator: Poedit 1.6.10\n"
"X-Launchpad-Export-Date: 2013-02-04 12:16+0000\n"
#: cmdline/apt-cache.cc:149
@@ -25,146 +25,150 @@ msgstr ""
msgid "Package %s version %s has an unmet dep:\n"
msgstr "%s paketinin (sürüm %s) karşılanamayan bir bağımlılığı var:\n"
-#: cmdline/apt-cache.cc:320
+#: cmdline/apt-cache.cc:277
msgid "Total package names: "
msgstr "Toplam paketlerin adları: "
-#: cmdline/apt-cache.cc:322
+#: cmdline/apt-cache.cc:279
msgid "Total package structures: "
msgstr "Toplam paket yapıları: "
-#: cmdline/apt-cache.cc:362
+#: cmdline/apt-cache.cc:319
msgid " Normal packages: "
msgstr " Normal paketler: "
-#: cmdline/apt-cache.cc:363
+#: cmdline/apt-cache.cc:320
msgid " Pure virtual packages: "
msgstr " Saf sanal paketler: "
-#: cmdline/apt-cache.cc:364
+#: cmdline/apt-cache.cc:321
msgid " Single virtual packages: "
msgstr " Tekil sanal paketler: "
-#: cmdline/apt-cache.cc:365
+#: cmdline/apt-cache.cc:322
msgid " Mixed virtual packages: "
msgstr " Karışık sanal paketler: "
-#: cmdline/apt-cache.cc:366
+#: cmdline/apt-cache.cc:323
msgid " Missing: "
msgstr " Eksik: "
-#: cmdline/apt-cache.cc:368
+#: cmdline/apt-cache.cc:325
msgid "Total distinct versions: "
msgstr "Toplam farklı sürümler: "
-#: cmdline/apt-cache.cc:370
+#: cmdline/apt-cache.cc:327
msgid "Total distinct descriptions: "
msgstr "Toplam farklı açıklamalar: "
-#: cmdline/apt-cache.cc:372
+#: cmdline/apt-cache.cc:329
msgid "Total dependencies: "
msgstr "Toplam bağımlılıklar: "
-#: cmdline/apt-cache.cc:375
+#: cmdline/apt-cache.cc:332
msgid "Total ver/file relations: "
msgstr "Toplam sürüm/dosya ilişkileri: "
-#: cmdline/apt-cache.cc:377
+#: cmdline/apt-cache.cc:334
msgid "Total Desc/File relations: "
msgstr "Toplam Tanım/Dosya ilişkileri: "
-#: cmdline/apt-cache.cc:379
+#: cmdline/apt-cache.cc:336
msgid "Total Provides mappings: "
msgstr "Toplam destekleme eşleştirmeleri: "
-#: cmdline/apt-cache.cc:433
+#: cmdline/apt-cache.cc:348
msgid "Total globbed strings: "
msgstr "Toplam birikmiş dizgiler: "
-#: cmdline/apt-cache.cc:439
+#: cmdline/apt-cache.cc:362
+msgid "Total dependency version space: "
+msgstr "Toplam bağımlılık sürümü alanı: "
+
+#: cmdline/apt-cache.cc:367
msgid "Total slack space: "
msgstr "Toplam serbest alan: "
-#: cmdline/apt-cache.cc:454
+#: cmdline/apt-cache.cc:375
msgid "Total space accounted for: "
msgstr "Hesaplanan toplam alan: "
-#: cmdline/apt-cache.cc:590 cmdline/apt-cache.cc:1239
+#: cmdline/apt-cache.cc:506 cmdline/apt-cache.cc:1155
#: apt-private/private-show.cc:58
#, c-format
msgid "Package file %s is out of sync."
msgstr "%s paket dosyası eşzamansız."
-#: cmdline/apt-cache.cc:668 cmdline/apt-cache.cc:1526
-#: cmdline/apt-cache.cc:1528 cmdline/apt-cache.cc:1605 cmdline/apt-mark.cc:56
-#: cmdline/apt-mark.cc:103 cmdline/apt-mark.cc:229
+#: cmdline/apt-cache.cc:584 cmdline/apt-cache.cc:1442
+#: cmdline/apt-cache.cc:1444 cmdline/apt-cache.cc:1521 cmdline/apt-mark.cc:59
+#: cmdline/apt-mark.cc:106 cmdline/apt-mark.cc:232
#: apt-private/private-show.cc:171 apt-private/private-show.cc:173
msgid "No packages found"
msgstr "Hiç paket bulunamadı"
-#: cmdline/apt-cache.cc:1338 apt-private/private-search.cc:41
+#: cmdline/apt-cache.cc:1254 apt-private/private-search.cc:41
msgid "You must give at least one search pattern"
msgstr "En az bir arama örüntüsü vermelisiniz"
-#: cmdline/apt-cache.cc:1505
+#: cmdline/apt-cache.cc:1421
msgid "This command is deprecated. Please use 'apt-mark showauto' instead."
msgstr ""
"Bu komutun kullanımı bırakılmıştır. Lütfen bunun yerine 'apt-mark showauto' "
"komutunu kullanın."
-#: cmdline/apt-cache.cc:1600 apt-pkg/cacheset.cc:653
+#: cmdline/apt-cache.cc:1516 apt-pkg/cacheset.cc:596
#, c-format
msgid "Unable to locate package %s"
msgstr "%s paketi bulunamadı"
-#: cmdline/apt-cache.cc:1630
+#: cmdline/apt-cache.cc:1546
msgid "Package files:"
msgstr "Paket dosyaları:"
-#: cmdline/apt-cache.cc:1637 cmdline/apt-cache.cc:1728
+#: cmdline/apt-cache.cc:1553 cmdline/apt-cache.cc:1644
msgid "Cache is out of sync, can't x-ref a package file"
msgstr "Önbellek eşzamanlı değil, paket dosyası 'x-ref' yapılamıyor"
#. Show any packages have explicit pins
-#: cmdline/apt-cache.cc:1651
+#: cmdline/apt-cache.cc:1567
msgid "Pinned packages:"
msgstr "Sabitlenmiş paketler:"
-#: cmdline/apt-cache.cc:1663 cmdline/apt-cache.cc:1708
+#: cmdline/apt-cache.cc:1579 cmdline/apt-cache.cc:1624
msgid "(not found)"
msgstr "(bulunamadı)"
-#: cmdline/apt-cache.cc:1671
+#: cmdline/apt-cache.cc:1587
msgid " Installed: "
msgstr " Kurulu: "
-#: cmdline/apt-cache.cc:1672
+#: cmdline/apt-cache.cc:1588
msgid " Candidate: "
msgstr " Aday: "
-#: cmdline/apt-cache.cc:1690 cmdline/apt-cache.cc:1698
+#: cmdline/apt-cache.cc:1606 cmdline/apt-cache.cc:1614
msgid "(none)"
msgstr "(hiçbiri)"
-#: cmdline/apt-cache.cc:1705
+#: cmdline/apt-cache.cc:1621
msgid " Package pin: "
msgstr " Paket sabitleme: "
#. Show the priority tables
-#: cmdline/apt-cache.cc:1714
+#: cmdline/apt-cache.cc:1630
msgid " Version table:"
msgstr " Sürüm çizelgesi:"
-#: cmdline/apt-cache.cc:1827 cmdline/apt-cdrom.cc:208 cmdline/apt-config.cc:83
-#: cmdline/apt-get.cc:1610 cmdline/apt-helper.cc:86 cmdline/apt-mark.cc:446
-#: cmdline/apt.cc:42 cmdline/apt-extracttemplates.cc:222
-#: ftparchive/apt-ftparchive.cc:619 cmdline/apt-internal-solver.cc:47
-#: cmdline/apt-sortpkgs.cc:149
+#: cmdline/apt-cache.cc:1743 cmdline/apt-cdrom.cc:207 cmdline/apt-config.cc:83
+#: cmdline/apt-get.cc:1591 cmdline/apt-helper.cc:84 cmdline/apt-mark.cc:388
+#: cmdline/apt.cc:42 cmdline/apt-extracttemplates.cc:217
+#: ftparchive/apt-ftparchive.cc:620 cmdline/apt-internal-solver.cc:45
+#: cmdline/apt-sortpkgs.cc:147
#, c-format
msgid "%s %s for %s compiled on %s %s\n"
msgstr "%s %s (%s için) %s %s tarihinde derlendi\n"
-#: cmdline/apt-cache.cc:1834
+#: cmdline/apt-cache.cc:1750
msgid ""
"Usage: apt-cache [options] command\n"
" apt-cache [options] showpkg pkg1 [pkg2 ...]\n"
@@ -236,20 +240,20 @@ msgstr ""
"Ayrıntılı bilgi için apt-cache(8) ve apt.conf(5) rehber sayfalarına göz "
"atın.\n"
-#: cmdline/apt-cdrom.cc:77
+#: cmdline/apt-cdrom.cc:76
msgid "Please provide a name for this Disc, such as 'Debian 5.0.3 Disk 1'"
msgstr "Lütfen bu CD/DVD'ye bir ad verin, örneğin 'Debian 5.0.3 Disk 1'"
-#: cmdline/apt-cdrom.cc:92
+#: cmdline/apt-cdrom.cc:91
msgid "Please insert a Disc in the drive and press enter"
msgstr "Lütfen sürücüye bir Disk yerleştirin ve giriş tuşuna (Enter) basın"
-#: cmdline/apt-cdrom.cc:140
+#: cmdline/apt-cdrom.cc:139
#, c-format
msgid "Failed to mount '%s' to '%s'"
msgstr "'%s', '%s' konumuna bağlanamadı"
-#: cmdline/apt-cdrom.cc:179
+#: cmdline/apt-cdrom.cc:178
msgid ""
"No CD-ROM could be auto-detected or found using the default mount point.\n"
"You may try the --cdrom option to set the CD-ROM mount point.\n"
@@ -262,7 +266,7 @@ msgstr ""
"Otomatik CD-ROM ve bağlantı noktası algılama hakkında daha fazla bilgi almak "
"için 'man apt-cdrom' komutunu kullanabilirsiniz."
-#: cmdline/apt-cdrom.cc:183
+#: cmdline/apt-cdrom.cc:182
msgid "Repeat this process for the rest of the CDs in your set."
msgstr "Kalan CD'leriniz için bu işlemi yineleyin."
@@ -299,48 +303,48 @@ msgstr ""
" -o=? İsteğe bağlı ayar seçeneği belirtmenizi sağlar, örneğin -o dir::"
"cache=/tmp\n"
-#: cmdline/apt-get.cc:224
+#: cmdline/apt-get.cc:245
#, c-format
msgid "Can not find a package for architecture '%s'"
msgstr "'%s' mimarisi için bir paket bulunamadı"
-#: cmdline/apt-get.cc:311
+#: cmdline/apt-get.cc:327
#, c-format
msgid "Can not find a package '%s' with version '%s'"
msgstr "'%s' paketinin '%s' sürümü bulunamadı"
-#: cmdline/apt-get.cc:314
+#: cmdline/apt-get.cc:330
#, c-format
msgid "Can not find a package '%s' with release '%s'"
msgstr "'%s' paketi '%s' dağıtım sürümünde bulunamadı"
-#: cmdline/apt-get.cc:358
+#: cmdline/apt-get.cc:367
#, c-format
msgid "Picking '%s' as source package instead of '%s'\n"
msgstr "Kaynak paket olarak '%s' yerine '%s' kullanılacak\n"
-#: cmdline/apt-get.cc:414
+#: cmdline/apt-get.cc:423
#, c-format
msgid "Can not find version '%s' of package '%s'"
msgstr "'%2$s' paketinin '%1$s' sürümünü bulunamadı"
-#: cmdline/apt-get.cc:445
+#: cmdline/apt-get.cc:454
#, c-format
msgid "Couldn't find package %s"
msgstr "%s paketi bulunamadı"
-#: cmdline/apt-get.cc:450 cmdline/apt-mark.cc:78
-#: apt-private/private-install.cc:863
+#: cmdline/apt-get.cc:459 cmdline/apt-mark.cc:81
+#: apt-private/private-install.cc:865
#, c-format
msgid "%s set to manually installed.\n"
msgstr "%s elle kurulmuş olarak ayarlandı.\n"
-#: cmdline/apt-get.cc:452 cmdline/apt-mark.cc:80
+#: cmdline/apt-get.cc:461 cmdline/apt-mark.cc:83
#, c-format
msgid "%s set to automatically installed.\n"
msgstr "%s otomatik olarak kurulmuş şekilde ayarlandı.\n"
-#: cmdline/apt-get.cc:460 cmdline/apt-mark.cc:124
+#: cmdline/apt-get.cc:469 cmdline/apt-mark.cc:127
msgid ""
"This command is deprecated. Please use 'apt-mark auto' and 'apt-mark manual' "
"instead."
@@ -348,24 +352,24 @@ msgstr ""
"Bu komut artık kullanılmamaktadır. Bunun yerine 'apt-mark auto' ve 'apt-mark "
"manual' kullanın."
-#: cmdline/apt-get.cc:529 cmdline/apt-get.cc:537
+#: cmdline/apt-get.cc:538 cmdline/apt-get.cc:546
msgid "Internal error, problem resolver broke stuff"
msgstr "İç hata, sorun çözücü nesneyi bozdu"
-#: cmdline/apt-get.cc:598
+#: cmdline/apt-get.cc:574 cmdline/apt-get.cc:611
msgid "Unable to lock the download directory"
msgstr "İndirme dizini kilitlenemiyor"
-#: cmdline/apt-get.cc:716
+#: cmdline/apt-get.cc:726
msgid "Must specify at least one package to fetch source for"
msgstr "Kaynağının indirileceği en az bir paket seçilmeli"
-#: cmdline/apt-get.cc:760 cmdline/apt-get.cc:1074
+#: cmdline/apt-get.cc:766 cmdline/apt-get.cc:1071
#, c-format
msgid "Unable to find a source package for %s"
msgstr "%s paketinin kaynak paketi bulunamadı"
-#: cmdline/apt-get.cc:780
+#: cmdline/apt-get.cc:786
#, c-format
msgid ""
"NOTICE: '%s' packaging is maintained in the '%s' version control system at:\n"
@@ -375,7 +379,7 @@ msgstr ""
"yapılmaktadır:\n"
"%s\n"
-#: cmdline/apt-get.cc:785
+#: cmdline/apt-get.cc:791
#, c-format
msgid ""
"Please use:\n"
@@ -387,67 +391,78 @@ msgstr ""
"bzr branch %s\n"
"komutunu kullanın.\n"
-#: cmdline/apt-get.cc:833
+#: cmdline/apt-get.cc:839
#, c-format
msgid "Skipping already downloaded file '%s'\n"
msgstr "Zaten indirilmiş olan '%s' dosyası atlanıyor\n"
+#: cmdline/apt-get.cc:873 cmdline/apt-get.cc:876
+#: apt-private/private-install.cc:187 apt-private/private-install.cc:190
+#, c-format
+msgid "Couldn't determine free space in %s"
+msgstr "%s içindeki boş alan miktarı belirlenemedi"
+
+#: cmdline/apt-get.cc:886
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "%s üzerinde yeterli boş alan yok"
+
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB
-#: cmdline/apt-get.cc:863
+#: cmdline/apt-get.cc:895
#, c-format
msgid "Need to get %sB/%sB of source archives.\n"
msgstr "%sB/%sB kaynak arşivi indirilecek.\n"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: cmdline/apt-get.cc:868
+#: cmdline/apt-get.cc:900
#, c-format
msgid "Need to get %sB of source archives.\n"
msgstr "%sB kaynak arşivi indirilecek.\n"
-#: cmdline/apt-get.cc:874
+#: cmdline/apt-get.cc:906
#, c-format
msgid "Fetch source %s\n"
msgstr "%s kaynağını al\n"
-#: cmdline/apt-get.cc:899
+#: cmdline/apt-get.cc:924
msgid "Failed to fetch some archives."
msgstr "Bazı arşivler alınamadı."
-#: cmdline/apt-get.cc:904 apt-private/private-install.cc:289
+#: cmdline/apt-get.cc:929 apt-private/private-install.cc:314
msgid "Download complete and in download only mode"
msgstr "İndirme işlemi tamamlandı ve sadece indirme kipinde"
-#: cmdline/apt-get.cc:929
+#: cmdline/apt-get.cc:954
#, c-format
msgid "Skipping unpack of already unpacked source in %s\n"
msgstr "%s için zaten açılmış bazı paketlerin açılması atlanıyor\n"
-#: cmdline/apt-get.cc:942
+#: cmdline/apt-get.cc:967
#, c-format
msgid "Unpack command '%s' failed.\n"
msgstr "Paket açma komutu '%s' başarısız.\n"
-#: cmdline/apt-get.cc:943
+#: cmdline/apt-get.cc:968
#, c-format
msgid "Check if the 'dpkg-dev' package is installed.\n"
msgstr "'dpkg-dev' paketinin kurulu olduğundan emin olun.\n"
-#: cmdline/apt-get.cc:971
+#: cmdline/apt-get.cc:996
#, c-format
msgid "Build command '%s' failed.\n"
msgstr "İnşa komutu '%s' başarısız oldu.\n"
-#: cmdline/apt-get.cc:990
+#: cmdline/apt-get.cc:1015
msgid "Child process failed"
msgstr "Alt süreç başarısız"
-#: cmdline/apt-get.cc:1009
+#: cmdline/apt-get.cc:1034
msgid "Must specify at least one package to check builddeps for"
msgstr "İnşa bağımlılıklarının denetleneceği en az bir paket belirtilmelidir"
-#: cmdline/apt-get.cc:1030
+#: cmdline/apt-get.cc:1059
#, c-format
msgid ""
"No architecture information available for %s. See apt.conf(5) APT::"
@@ -456,27 +471,17 @@ msgstr ""
"%s mimarisine uygun mimari bilgileri mevcut değil. Kurulumu için apt.conf(5) "
"rehber sayfasındaki APT::Architectures kısmına göz atın"
-#: cmdline/apt-get.cc:1047
-#, c-format
-msgid "Note, using directory '%s' to get the build dependencies\n"
-msgstr ""
-
-#: cmdline/apt-get.cc:1057
-#, fuzzy, c-format
-msgid "Note, using file '%s' to get the build dependencies\n"
-msgstr "İnşa bağımlılıklarını işleme başarısız oldu"
-
-#: cmdline/apt-get.cc:1086 cmdline/apt-get.cc:1089
+#: cmdline/apt-get.cc:1083 cmdline/apt-get.cc:1086
#, c-format
msgid "Unable to get build-dependency information for %s"
msgstr "%s paketinin inşa-bağımlılığı bilgisi alınamıyor"
-#: cmdline/apt-get.cc:1109
+#: cmdline/apt-get.cc:1106
#, c-format
msgid "%s has no build depends.\n"
msgstr "%s paketinin hiç inşa bağımlılığı yok.\n"
-#: cmdline/apt-get.cc:1279
+#: cmdline/apt-get.cc:1276
#, c-format
msgid ""
"%s dependency for %s can't be satisfied because %s is not allowed on '%s' "
@@ -485,7 +490,7 @@ msgstr ""
"'%4$s' paketlerinde %3$s paketine izin verilmediği için %2$s kaynağının %1$s "
"bağımlılığı karşılanamıyor"
-#: cmdline/apt-get.cc:1297
+#: cmdline/apt-get.cc:1294
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because the package %s cannot be "
@@ -493,12 +498,12 @@ msgid ""
msgstr ""
"%2$s için %1$s bağımlılığı, %3$s paketi bulunamadığı için karşılanamadı"
-#: cmdline/apt-get.cc:1320
+#: cmdline/apt-get.cc:1317
#, c-format
msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
msgstr "%2$s için %1$s bağımlılığı karşılanamadı: Kurulu %3$s paketi çok yeni"
-#: cmdline/apt-get.cc:1359
+#: cmdline/apt-get.cc:1356
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because candidate version of "
@@ -507,7 +512,7 @@ msgstr ""
"%2$s için %1$s bağımlılığı sağlanamıyor, çünkü %3$s paketinin aday sürümü "
"gerekli sürüm şartlarını karşılamıyor"
-#: cmdline/apt-get.cc:1365
+#: cmdline/apt-get.cc:1362
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because package %s has no candidate "
@@ -515,30 +520,30 @@ msgid ""
msgstr ""
"%2$s için %1$s bağımlılığı sağlanamıyor, çünkü %3$s paketinin aday sürümü yok"
-#: cmdline/apt-get.cc:1388
+#: cmdline/apt-get.cc:1385
#, c-format
msgid "Failed to satisfy %s dependency for %s: %s"
msgstr "%2$s için %1$s bağımlılığı karşılanamadı: %3$s"
-#: cmdline/apt-get.cc:1403
+#: cmdline/apt-get.cc:1400
#, c-format
msgid "Build-dependencies for %s could not be satisfied."
msgstr "%s için inşa bağımlılıkları karşılanamadı."
-#: cmdline/apt-get.cc:1408
+#: cmdline/apt-get.cc:1405
msgid "Failed to process build dependencies"
msgstr "İnşa bağımlılıklarını işleme başarısız oldu"
-#: cmdline/apt-get.cc:1501 cmdline/apt-get.cc:1516
+#: cmdline/apt-get.cc:1498 cmdline/apt-get.cc:1510
#, c-format
msgid "Changelog for %s (%s)"
msgstr "%s (%s) paketinin değişim günlüğü"
-#: cmdline/apt-get.cc:1615
+#: cmdline/apt-get.cc:1596
msgid "Supported modules:"
msgstr "Desteklenen birimler:"
-#: cmdline/apt-get.cc:1656
+#: cmdline/apt-get.cc:1637
msgid ""
"Usage: apt-get [options] command\n"
" apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -636,11 +641,11 @@ msgstr "Argüman olarak bir adet URL'ye ihtiyaç vardır"
msgid "Must specify at least one pair url/filename"
msgstr "En az bir adet url/dosya-adı çifti belirtilmelidir"
-#: cmdline/apt-helper.cc:75 cmdline/apt-helper.cc:79
+#: cmdline/apt-helper.cc:73 cmdline/apt-helper.cc:77
msgid "Download Failed"
msgstr "İndirme Başarısız"
-#: cmdline/apt-helper.cc:93
+#: cmdline/apt-helper.cc:91
msgid ""
"Usage: apt-helper [options] command\n"
" apt-helper [options] download-file uri target-path\n"
@@ -664,53 +669,53 @@ msgstr ""
"\n"
" Bu APT yardımcısının Süper Meep Güçleri var.\n"
-#: cmdline/apt-mark.cc:65
+#: cmdline/apt-mark.cc:68
#, c-format
msgid "%s can not be marked as it is not installed.\n"
msgstr "%s kurulu olmadığı için işaretlenemedi.\n"
-#: cmdline/apt-mark.cc:71
+#: cmdline/apt-mark.cc:74
#, c-format
msgid "%s was already set to manually installed.\n"
msgstr "%s zaten elle kurulmuş olarak ayarlı.\n"
-#: cmdline/apt-mark.cc:73
+#: cmdline/apt-mark.cc:76
#, c-format
msgid "%s was already set to automatically installed.\n"
msgstr "%s zaten otomatik kurulmuş olarak ayarlı.\n"
-#: cmdline/apt-mark.cc:238
+#: cmdline/apt-mark.cc:241
#, c-format
msgid "%s was already set on hold.\n"
msgstr "%s zaten tutulacak şekilde ayarlanmış.\n"
-#: cmdline/apt-mark.cc:240
+#: cmdline/apt-mark.cc:243
#, c-format
msgid "%s was already not hold.\n"
msgstr "%s zaten tutulmayacak şekilde ayarlanmış.\n"
-#: cmdline/apt-mark.cc:255 cmdline/apt-mark.cc:333 cmdline/apt-mark.cc:397
-#: apt-pkg/contrib/fileutl.cc:834 apt-pkg/contrib/gpgv.cc:192
-#: apt-pkg/deb/dpkgpm.cc:1303
+#: cmdline/apt-mark.cc:258 cmdline/apt-mark.cc:339
+#: apt-pkg/contrib/fileutl.cc:812 apt-pkg/contrib/gpgv.cc:219
+#: apt-pkg/deb/dpkgpm.cc:1317
#, c-format
msgid "Waited for %s but it wasn't there"
msgstr "%s için beklenildi ama o gelmedi"
-#: cmdline/apt-mark.cc:270 cmdline/apt-mark.cc:380
+#: cmdline/apt-mark.cc:273 cmdline/apt-mark.cc:322
#, c-format
msgid "%s set on hold.\n"
msgstr "%s paketi tutuluyor.\n"
-#: cmdline/apt-mark.cc:272 cmdline/apt-mark.cc:385
+#: cmdline/apt-mark.cc:275 cmdline/apt-mark.cc:327
#, c-format
msgid "Canceled hold on %s.\n"
msgstr "%s paketini tutma işlemi iptal edildi.\n"
-#: cmdline/apt-mark.cc:337 cmdline/apt-mark.cc:403
+#: cmdline/apt-mark.cc:345
msgid "Executing dpkg failed. Are you root?"
msgstr "'dpkg' çalıştırılamadı. root olduğunuzdan emin misiniz?"
-#: cmdline/apt-mark.cc:450
+#: cmdline/apt-mark.cc:392
msgid ""
"Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n"
"\n"
@@ -831,12 +836,12 @@ msgstr "Disk bulunamadı."
msgid "File not found"
msgstr "Dosya bulunamadı"
-#: methods/copy.cc:61 methods/gzip.cc:127 methods/rred.cc:598
+#: methods/copy.cc:61 methods/gzip.cc:117 methods/rred.cc:598
#: methods/rred.cc:608
msgid "Failed to stat"
msgstr "Durum bilgisi okunamadı"
-#: methods/copy.cc:113 methods/gzip.cc:134 methods/rred.cc:605
+#: methods/copy.cc:105 methods/gzip.cc:124 methods/rred.cc:605
msgid "Failed to set modification time"
msgstr "Değişiklik zamanı ayarlanamadı"
@@ -845,34 +850,34 @@ msgid "Invalid URI, local URIS must not start with //"
msgstr "Geçersiz URI, yerel URI'ler // ile başlamamalıdır"
#. Login must be before getpeername otherwise dante won't work.
-#: methods/ftp.cc:178
+#: methods/ftp.cc:177
msgid "Logging in"
msgstr "Giriş yapılıyor"
-#: methods/ftp.cc:184
+#: methods/ftp.cc:183
msgid "Unable to determine the peer name"
msgstr "Eş adı belirlenemiyor"
-#: methods/ftp.cc:189
+#: methods/ftp.cc:188
msgid "Unable to determine the local name"
msgstr "Yerel ad belirlenemiyor"
-#: methods/ftp.cc:220 methods/ftp.cc:248
+#: methods/ftp.cc:219 methods/ftp.cc:247
#, c-format
msgid "The server refused the connection and said: %s"
msgstr "Sunucu bağlantıyı reddetti, sunucunun iletisi: %s"
-#: methods/ftp.cc:226
+#: methods/ftp.cc:225
#, c-format
msgid "USER failed, server said: %s"
msgstr "USER başarısız, sunucunun iletisi: %s"
-#: methods/ftp.cc:233
+#: methods/ftp.cc:232
#, c-format
msgid "PASS failed, server said: %s"
msgstr "PASS başarısız, sunucunun iletisi: %s"
-#: methods/ftp.cc:253
+#: methods/ftp.cc:252
msgid ""
"A proxy server was specified but no login script, Acquire::ftp::ProxyLogin "
"is empty."
@@ -880,123 +885,123 @@ msgstr ""
"Bir Vekil sunucu belirtildi ancak oturum açma betiği belirtilmedi, Acquire::"
"ftp::ProxyLogin boş."
-#: methods/ftp.cc:281
+#: methods/ftp.cc:280
#, c-format
msgid "Login script command '%s' failed, server said: %s"
msgstr "Oturum açma betiği komutu '%s' başarısız oldu, sunucunun iletisi: %s"
-#: methods/ftp.cc:307
+#: methods/ftp.cc:306
#, c-format
msgid "TYPE failed, server said: %s"
msgstr "TYPE başarısız, sunucunun iletisi: %s"
-#: methods/ftp.cc:345 methods/ftp.cc:457 methods/rsh.cc:195 methods/rsh.cc:243
+#: methods/ftp.cc:344 methods/ftp.cc:456 methods/rsh.cc:195 methods/rsh.cc:243
msgid "Connection timeout"
msgstr "Bağlantı zaman aşımına uğradı"
-#: methods/ftp.cc:351
+#: methods/ftp.cc:350
msgid "Server closed the connection"
msgstr "Sunucu bağlantıyı kesti"
-#: methods/ftp.cc:354 methods/rsh.cc:202 apt-pkg/contrib/fileutl.cc:1515
-#: apt-pkg/contrib/fileutl.cc:1524 apt-pkg/contrib/fileutl.cc:1529
-#: apt-pkg/contrib/fileutl.cc:1531
+#: methods/ftp.cc:353 methods/rsh.cc:202 apt-pkg/contrib/fileutl.cc:1476
+#: apt-pkg/contrib/fileutl.cc:1485 apt-pkg/contrib/fileutl.cc:1490
+#: apt-pkg/contrib/fileutl.cc:1492
msgid "Read error"
msgstr "Okuma hatası"
-#: methods/ftp.cc:361 methods/rsh.cc:209
+#: methods/ftp.cc:360 methods/rsh.cc:209
msgid "A response overflowed the buffer."
msgstr "Bir yanıt arabelleği taşırdı."
-#: methods/ftp.cc:378 methods/ftp.cc:390
+#: methods/ftp.cc:377 methods/ftp.cc:389
msgid "Protocol corruption"
msgstr "İletişim kuralları bozulması"
-#: methods/ftp.cc:463 methods/rsh.cc:249 apt-pkg/contrib/fileutl.cc:911
-#: apt-pkg/contrib/fileutl.cc:1637 apt-pkg/contrib/fileutl.cc:1646
-#: apt-pkg/contrib/fileutl.cc:1651 apt-pkg/contrib/fileutl.cc:1653
-#: apt-pkg/contrib/fileutl.cc:1678
+#: methods/ftp.cc:462 methods/rsh.cc:249 apt-pkg/contrib/fileutl.cc:872
+#: apt-pkg/contrib/fileutl.cc:1598 apt-pkg/contrib/fileutl.cc:1607
+#: apt-pkg/contrib/fileutl.cc:1612 apt-pkg/contrib/fileutl.cc:1614
+#: apt-pkg/contrib/fileutl.cc:1639
msgid "Write error"
msgstr "Yazma hatası"
-#: methods/ftp.cc:702 methods/ftp.cc:708 methods/ftp.cc:743
+#: methods/ftp.cc:701 methods/ftp.cc:707 methods/ftp.cc:742
msgid "Could not create a socket"
msgstr "Bir soket oluşturulamadı"
-#: methods/ftp.cc:713
+#: methods/ftp.cc:712
msgid "Could not connect data socket, connection timed out"
msgstr "Veri soketine bağlanılamadı, bağlantı zaman aşımına uğradı"
-#: methods/ftp.cc:717 methods/connect.cc:116
+#: methods/ftp.cc:716 methods/connect.cc:116
msgid "Failed"
msgstr "Başarısız"
-#: methods/ftp.cc:719
+#: methods/ftp.cc:718
msgid "Could not connect passive socket."
msgstr "Edilgen sokete bağlanılamadı."
-#: methods/ftp.cc:736
+#: methods/ftp.cc:735
msgid "getaddrinfo was unable to get a listening socket"
msgstr "getaddrinfo bir dinleme soketi alamıyor"
-#: methods/ftp.cc:750
+#: methods/ftp.cc:749
msgid "Could not bind a socket"
msgstr "Bir sokete bağlanılamadı"
-#: methods/ftp.cc:754
+#: methods/ftp.cc:753
msgid "Could not listen on the socket"
msgstr "Soket dinlenemedi"
-#: methods/ftp.cc:761
+#: methods/ftp.cc:760
msgid "Could not determine the socket's name"
msgstr "Soketin adı belirlenemedi"
-#: methods/ftp.cc:793
+#: methods/ftp.cc:792
msgid "Unable to send PORT command"
msgstr "PORT komutu gönderilemedi"
-#: methods/ftp.cc:803
+#: methods/ftp.cc:802
#, c-format
msgid "Unknown address family %u (AF_*)"
msgstr "Bilinmeyen adres ailesi %u (AF_*)"
-#: methods/ftp.cc:812
+#: methods/ftp.cc:811
#, c-format
msgid "EPRT failed, server said: %s"
msgstr "EPRT başarısız, sunucunun iletisi: %s"
-#: methods/ftp.cc:832
+#: methods/ftp.cc:831
msgid "Data socket connect timed out"
msgstr "Veri soketi bağlantısı zaman aşımına uğradı"
-#: methods/ftp.cc:839
+#: methods/ftp.cc:838
msgid "Unable to accept connection"
msgstr "Bağlantı kabul edilemiyor"
-#: methods/ftp.cc:879 methods/server.cc:362 methods/rsh.cc:319
+#: methods/ftp.cc:877 methods/server.cc:357 methods/rsh.cc:319
msgid "Problem hashing file"
msgstr "Dosya sağlaması yapılamadı"
-#: methods/ftp.cc:892
+#: methods/ftp.cc:890
#, c-format
msgid "Unable to fetch file, server said '%s'"
msgstr "Dosya alınamıyor, sunucunun iletisi: '%s'"
-#: methods/ftp.cc:907 methods/rsh.cc:338
+#: methods/ftp.cc:905 methods/rsh.cc:338
msgid "Data socket timed out"
msgstr "Veri soketi zaman aşımına uğradı"
-#: methods/ftp.cc:944
+#: methods/ftp.cc:935
#, c-format
msgid "Data transfer failed, server said '%s'"
msgstr "Veri aktarımı başarısız, sunucunun iletisi: '%s'"
#. Get the files information
-#: methods/ftp.cc:1027
+#: methods/ftp.cc:1014
msgid "Query"
msgstr "Sorgu"
-#: methods/ftp.cc:1141
+#: methods/ftp.cc:1128
msgid "Unable to invoke "
msgstr "Çağrılamıyor "
@@ -1062,21 +1067,21 @@ msgstr "'%s:%s' (%i - %s) adresi çözümlenirken bir şeyler kötü gitti"
msgid "Unable to connect to %s:%s:"
msgstr "Bağlanılamadı %s:%s:"
-#: methods/gpgv.cc:158
+#: methods/gpgv.cc:168
msgid ""
"Internal error: Good signature, but could not determine key fingerprint?!"
msgstr "İç hata: İmza iyi, ancak anahtar parmak izi belirlenemedi?!"
-#: methods/gpgv.cc:162
+#: methods/gpgv.cc:172
msgid "At least one invalid signature was encountered."
msgstr "En az bir geçersiz imza ile karşılaşıldı."
-#: methods/gpgv.cc:164
+#: methods/gpgv.cc:174
msgid "Could not execute 'apt-key' to verify signature (is gnupg installed?)"
msgstr "İmza doğrulama için 'apt-key' çalıştırılamadı (gnupg kurulu mu?)"
#. TRANSLATORS: %s is a single techy word like 'NODATA'
-#: methods/gpgv.cc:170
+#: methods/gpgv.cc:180
#, c-format
msgid ""
"Clearsigned file isn't valid, got '%s' (does the network require "
@@ -1085,49 +1090,49 @@ msgstr ""
"Temiz-imzalı dosya geçerli değil, '%s' hatası alındı (ağ kimlik doğrulama "
"gerektiriyor mu?)"
-#: methods/gpgv.cc:174
+#: methods/gpgv.cc:184
msgid "Unknown error executing apt-key"
msgstr "apt-key çalıştırılırken bilinmeyen hata"
-#: methods/gpgv.cc:207 methods/gpgv.cc:214
+#: methods/gpgv.cc:217 methods/gpgv.cc:224
msgid "The following signatures were invalid:\n"
msgstr "Aşağıdaki imzalar geçersiz:\n"
-#: methods/gpgv.cc:221
+#: methods/gpgv.cc:231
msgid ""
"The following signatures couldn't be verified because the public key is not "
"available:\n"
msgstr "Aşağıdaki imzalar doğrulanamadı, çünkü genel anahtar mevcut değil:\n"
-#: methods/gzip.cc:79
+#: methods/gzip.cc:69
msgid "Empty files can't be valid archives"
msgstr "Boş dosyalar geçerli birer arşiv dosyası olamazlar"
-#: methods/http.cc:517
+#: methods/http.cc:513
msgid "Error writing to the file"
msgstr "Dosyaya yazılamadı"
-#: methods/http.cc:531
+#: methods/http.cc:527
msgid "Error reading from server. Remote end closed connection"
msgstr "Sunucundan okunurken hata. Uzak sonlu kapalı bağlantı"
-#: methods/http.cc:533
+#: methods/http.cc:529
msgid "Error reading from server"
msgstr "Sunucundan okunurken hata"
-#: methods/http.cc:569
+#: methods/http.cc:565
msgid "Error writing to file"
msgstr "Dosyaya yazılamadı"
-#: methods/http.cc:629
+#: methods/http.cc:625
msgid "Select failed"
msgstr "Seçme başarısız"
-#: methods/http.cc:634
+#: methods/http.cc:630
msgid "Connection timed out"
msgstr "Bağlantı zaman aşımına uğradı"
-#: methods/http.cc:657
+#: methods/http.cc:653
msgid "Error writing to output file"
msgstr "Çıktı dosyasına yazılırken hata"
@@ -1159,30 +1164,23 @@ msgstr "HTTP sunucusunun aralık desteği bozuk"
msgid "Unknown date format"
msgstr "Bilinmeyen tarih biçimi"
-#: methods/server.cc:506
+#: methods/server.cc:494
msgid "Bad header data"
msgstr "Kötü başlık verisi"
-#: methods/server.cc:523 methods/server.cc:617
+#: methods/server.cc:511 methods/server.cc:567
msgid "Connection failed"
msgstr "Bağlantı başarısız"
-#: methods/server.cc:589
-#, c-format
-msgid ""
-"Automatically disabled %s due to incorrect response from server/proxy. (man "
-"5 apt.conf)"
-msgstr ""
-
-#: methods/server.cc:712
+#: methods/server.cc:659
msgid "Internal error"
msgstr "İç hata"
-#: apt-private/private-list.cc:121
+#: apt-private/private-list.cc:129
msgid "Listing"
msgstr "Listeleme"
-#: apt-private/private-list.cc:151
+#: apt-private/private-list.cc:159
#, c-format
msgid "There is %i additional version. Please use the '-a' switch to see it"
msgid_plural ""
@@ -1192,33 +1190,33 @@ msgstr[1] ""
"Fazladan %i sürüm daha var. Bu sürümleri görmek için '-a' anahtarını "
"kullanın."
-#: apt-private/private-cachefile.cc:95
+#: apt-private/private-cachefile.cc:93
msgid "Correcting dependencies..."
msgstr "Bağımlılıklar düzeltiliyor..."
-#: apt-private/private-cachefile.cc:98
+#: apt-private/private-cachefile.cc:96
msgid " failed."
msgstr " başarısız oldu."
-#: apt-private/private-cachefile.cc:101
+#: apt-private/private-cachefile.cc:99
msgid "Unable to correct dependencies"
msgstr "Bağımlılıklar düzeltilemedi"
-#: apt-private/private-cachefile.cc:104
+#: apt-private/private-cachefile.cc:102
msgid "Unable to minimize the upgrade set"
msgstr "Yükseltme kümesi küçültülemiyor"
-#: apt-private/private-cachefile.cc:106
+#: apt-private/private-cachefile.cc:104
msgid " Done"
msgstr " Tamamlandı"
-#: apt-private/private-cachefile.cc:110
+#: apt-private/private-cachefile.cc:108
msgid "You might want to run 'apt-get -f install' to correct these."
msgstr ""
"Bu sorunları düzeltmek için 'apt-get -f install' komutunu çalıştırmanız "
"gerekebilir."
-#: apt-private/private-cachefile.cc:113
+#: apt-private/private-cachefile.cc:111
msgid "Unmet dependencies. Try using -f."
msgstr "Karşılanmayan bağımlılıklar. -f kullanmayı deneyin."
@@ -1317,8 +1315,8 @@ msgstr "Aşağıdaki eski sürümlerinde tutulan paketler değiştirilecek:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (%s nedeniyle) "
+msgid "%s (due to %s)"
+msgstr "%s (%s nedeniyle)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1379,7 +1377,7 @@ msgstr "E"
msgid "N"
msgstr "H"
-#: apt-private/private-output.cc:806 apt-pkg/cachefilter.cc:40
+#: apt-private/private-output.cc:806 apt-pkg/cachefilter.cc:35
#, c-format
msgid "Regex compilation error - %s"
msgstr "Regex derleme hatası - %s"
@@ -1388,7 +1386,7 @@ msgstr "Regex derleme hatası - %s"
msgid "The update command takes no arguments"
msgstr "'update' komutu argüman almaz"
-#: apt-private/private-update.cc:95
+#: apt-private/private-update.cc:97
#, c-format
msgid "%i package can be upgraded. Run 'apt list --upgradable' to see it.\n"
msgid_plural ""
@@ -1400,7 +1398,7 @@ msgstr[1] ""
"%i paket yükseltilebilir. Bu paketleri görmek için 'apt list --upgradable' "
"komutunu çalıştırın.\n"
-#: apt-private/private-update.cc:99
+#: apt-private/private-update.cc:101
msgid "All packages are up to date."
msgstr "Tüm paketler güncel."
@@ -1413,10 +1411,11 @@ msgstr "Sıralama"
msgid "There is %i additional record. Please use the '-a' switch to see it"
msgid_plural ""
"There are %i additional records. Please use the '-a' switch to see them."
-msgstr[0] "Fazladan %i kayıt daha var. Görmek için '-a' anahtarını kullanın."
+msgstr[0] ""
+"Fazladan %i kayıt daha var. Görmek için '-a' anahtarını kullanabilirsiniz."
msgstr[1] ""
"Fazladan %i kayıt daha var. Bu kayıtları görmek için '-a' anahtarını "
-"kullanın. kullanabilirsiniz."
+"kullanabilirsiniz."
#: apt-private/private-show.cc:163
msgid "not a real package (virtual)"
@@ -1434,21 +1433,21 @@ msgstr ""
" Unutmayın ki benzetim kipinde kilitleme yapılmaz, bu nedenle\n"
" bu benzetimin gerçekteki durumla birebir aynı olacağına güvenmeyin!"
-#: apt-private/private-install.cc:81
+#: apt-private/private-install.cc:82
msgid "Internal error, InstallPackages was called with broken packages!"
msgstr "İç hata, InstallPackages bozuk paketler ile çağrıldı!"
-#: apt-private/private-install.cc:90
+#: apt-private/private-install.cc:91
msgid "Packages need to be removed but remove is disabled."
msgstr ""
"Paketlerin kaldırılması gerekiyor ancak kaldırma işlemi devre dışı "
"bırakılmış."
-#: apt-private/private-install.cc:109
+#: apt-private/private-install.cc:110
msgid "Internal error, Ordering didn't finish"
msgstr "İç hata, Sıralama tamamlanamadı"
-#: apt-private/private-install.cc:147
+#: apt-private/private-install.cc:148
msgid "How odd... The sizes didn't match, email apt@packages.debian.org"
msgstr ""
"Ne kadar ilginç... Boyutlar eşleşmedi, apt@packages.debian.org adresine "
@@ -1456,47 +1455,52 @@ msgstr ""
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:154
+#: apt-private/private-install.cc:155
#, c-format
msgid "Need to get %sB/%sB of archives.\n"
msgstr "%sB/%sB arşiv dosyası indirilecek.\n"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:159
+#: apt-private/private-install.cc:160
#, c-format
msgid "Need to get %sB of archives.\n"
msgstr "%sB arşiv dosyası indirilecek.\n"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:166
+#: apt-private/private-install.cc:167
#, c-format
msgid "After this operation, %sB of additional disk space will be used.\n"
msgstr "Bu işlem tamamlandıktan sonra %sB ek disk alanı kullanılacak.\n"
#. TRANSLATOR: The required space between number and unit is already included
#. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: apt-private/private-install.cc:171
+#: apt-private/private-install.cc:172
#, c-format
msgid "After this operation, %sB disk space will be freed.\n"
msgstr "Bu işlem tamamlandıktan sonra %sB disk alanı boşalacak.\n"
-#: apt-private/private-install.cc:185 apt-private/private-download.cc:117
+#: apt-private/private-install.cc:200
+#, c-format
+msgid "You don't have enough free space in %s."
+msgstr "%s içinde yeterli boş alanınız yok."
+
+#: apt-private/private-install.cc:210 apt-private/private-download.cc:59
msgid "There are problems and -y was used without --force-yes"
msgstr "Bazı sorunlar çıktı ve -y seçeneği, --force-yes olmadan kullanıldı"
-#: apt-private/private-install.cc:191 apt-private/private-install.cc:213
+#: apt-private/private-install.cc:216 apt-private/private-install.cc:238
msgid "Trivial Only specified but this is not a trivial operation."
msgstr "Sadece Önemsiz seçeneği ayarlandı, ama bu önemsiz bir işlem değil."
#. TRANSLATOR: This string needs to be typed by the user as a confirmation, so be
#. careful with hard to type or special characters (like non-breaking spaces)
-#: apt-private/private-install.cc:195
+#: apt-private/private-install.cc:220
msgid "Yes, do as I say!"
msgstr "Evet, söylediğim şekilde yap!"
-#: apt-private/private-install.cc:197
+#: apt-private/private-install.cc:222
#, c-format
msgid ""
"You are about to do something potentially harmful.\n"
@@ -1507,19 +1511,19 @@ msgstr ""
"Devam etmek için '%s' ifadesini yazınız\n"
" ?] "
-#: apt-private/private-install.cc:203 apt-private/private-install.cc:221
+#: apt-private/private-install.cc:228 apt-private/private-install.cc:246
msgid "Abort."
msgstr "Vazgeç."
-#: apt-private/private-install.cc:218
+#: apt-private/private-install.cc:243
msgid "Do you want to continue?"
msgstr "Devam etmek istiyor musunuz?"
-#: apt-private/private-install.cc:288
+#: apt-private/private-install.cc:313
msgid "Some files failed to download"
msgstr "Bazı dosyalar indirilemedi"
-#: apt-private/private-install.cc:295
+#: apt-private/private-install.cc:320
msgid ""
"Unable to fetch some archives, maybe run apt-get update or try with --fix-"
"missing?"
@@ -1527,19 +1531,19 @@ msgstr ""
"Bazı arşivler alınamıyor, apt-get update'i çalıştırmayı ya da --fix-missing "
"seçeneğini ekleyerek düzeltmeyi deneyin."
-#: apt-private/private-install.cc:299
+#: apt-private/private-install.cc:324
msgid "--fix-missing and media swapping is not currently supported"
msgstr "--fix-missing seçeneği ve ortam takası şu an için desteklenmiyor"
-#: apt-private/private-install.cc:304
+#: apt-private/private-install.cc:329
msgid "Unable to correct missing packages."
msgstr "Eksik paketler düzeltilemedi."
-#: apt-private/private-install.cc:305
+#: apt-private/private-install.cc:330
msgid "Aborting install."
msgstr "Kurulum iptal ediliyor."
-#: apt-private/private-install.cc:341
+#: apt-private/private-install.cc:366
msgid ""
"The following package disappeared from your system as\n"
"all files have been overwritten by other packages:"
@@ -1553,15 +1557,15 @@ msgstr[1] ""
"Tüm dosyalarının üzerine yazıldığı için aşağıdaki paketler\n"
"sisteminizden kayboldu:"
-#: apt-private/private-install.cc:345
+#: apt-private/private-install.cc:370
msgid "Note: This is done automatically and on purpose by dpkg."
msgstr "Not: Bu eylem dpkg tarafından otomatik ve kasıtlı olarak yapılmıştır."
-#: apt-private/private-install.cc:366
+#: apt-private/private-install.cc:391
msgid "We are not supposed to delete stuff, can't start AutoRemover"
msgstr "Nesneleri silmemiz beklenemez, AutoRemover çalıştırılamıyor"
-#: apt-private/private-install.cc:474
+#: apt-private/private-install.cc:499
msgid ""
"Hmm, seems like the AutoRemover destroyed something which really\n"
"shouldn't happen. Please file a bug report against apt."
@@ -1579,15 +1583,15 @@ msgstr ""
#. "that package should be filed.") << std::endl;
#. }
#.
-#: apt-private/private-install.cc:477 apt-private/private-install.cc:627
+#: apt-private/private-install.cc:502 apt-private/private-install.cc:653
msgid "The following information may help to resolve the situation:"
msgstr "Aşağıdaki bilgiler durumu çözmenize yardımcı olabilir:"
-#: apt-private/private-install.cc:481
+#: apt-private/private-install.cc:506
msgid "Internal Error, AutoRemover broke stuff"
msgstr "İç hata, AutoRemover bazı şeyleri bozdu"
-#: apt-private/private-install.cc:488
+#: apt-private/private-install.cc:513
msgid ""
"The following package was automatically installed and is no longer required:"
msgid_plural ""
@@ -1599,7 +1603,7 @@ msgstr[1] ""
"Aşağıdaki paketler otomatik olarak kurulmuş ve artık bu paketlere gerek "
"duyulmuyor:"
-#: apt-private/private-install.cc:492
+#: apt-private/private-install.cc:517
#, c-format
msgid "%lu package was automatically installed and is no longer required.\n"
msgid_plural ""
@@ -1607,19 +1611,19 @@ msgid_plural ""
msgstr[0] "%lu paket otomatik olarak kurulmuş ve artık gerekli değil.\n"
msgstr[1] "%lu paket otomatik olarak kurulmuş ve artık gerekli değil.\n"
-#: apt-private/private-install.cc:494
+#: apt-private/private-install.cc:519
msgid "Use 'apt-get autoremove' to remove it."
msgid_plural "Use 'apt-get autoremove' to remove them."
msgstr[0] "Bu paketi kaldırmak için 'apt-get autoremove' komutunu kullanın."
msgstr[1] "Bu paketleri kaldırmak için 'apt-get autoremove' komutunu kullanın."
-#: apt-private/private-install.cc:587
+#: apt-private/private-install.cc:612
msgid "You might want to run 'apt-get -f install' to correct these:"
msgstr ""
"Bunları düzeltmek için 'apt-get -f install' komutunu çalıştırmanız "
"gerekebilir:"
-#: apt-private/private-install.cc:589
+#: apt-private/private-install.cc:614
msgid ""
"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
"solution)."
@@ -1627,7 +1631,7 @@ msgstr ""
"Karşılanmamış bağımlılıklar. 'apt-get -f install' komutunu paket seçeneği "
"vermeden deneyin (ya da bir çözüm belirtin)."
-#: apt-private/private-install.cc:612
+#: apt-private/private-install.cc:638
msgid ""
"Some packages could not be installed. This may mean that you have\n"
"requested an impossible situation or if you are using the unstable\n"
@@ -1639,105 +1643,88 @@ msgstr ""
"bazı paketlerin henüz oluşturulamamış ya da oluşturulmakta\n"
"olduğunu gösterir."
-#: apt-private/private-install.cc:633
+#: apt-private/private-install.cc:659
msgid "Broken packages"
msgstr "Bozuk paketler"
-#: apt-private/private-install.cc:710
+#: apt-private/private-install.cc:712
msgid "The following extra packages will be installed:"
msgstr "Aşağıdaki ek paketler de kurulacak:"
-#: apt-private/private-install.cc:800
+#: apt-private/private-install.cc:802
msgid "Suggested packages:"
msgstr "Önerilen paketler:"
-#: apt-private/private-install.cc:801
+#: apt-private/private-install.cc:803
msgid "Recommended packages:"
msgstr "Tavsiye edilen paketler:"
-#: apt-private/private-install.cc:823
+#: apt-private/private-install.cc:825
#, c-format
msgid "Skipping %s, it is already installed and upgrade is not set.\n"
msgstr "%s atlanıyor, bu paket zaten kurulu ve yükseltme seçilmemiş.\n"
-#: apt-private/private-install.cc:827
+#: apt-private/private-install.cc:829
#, c-format
msgid "Skipping %s, it is not installed and only upgrades are requested.\n"
msgstr ""
"%s atlanıyor, bu paket kurulu değil ve sadece yükseltmeler isteniyor.\n"
-#: apt-private/private-install.cc:839
+#: apt-private/private-install.cc:841
#, c-format
msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n"
msgstr ""
"%s paketinin yeniden kurulumu mümkün değil, çünkü paket indirilemedi.\n"
-#: apt-private/private-install.cc:844
+#: apt-private/private-install.cc:846
#, c-format
msgid "%s is already the newest version.\n"
msgstr "%s zaten en yeni sürümde.\n"
-#: apt-private/private-install.cc:892
+#: apt-private/private-install.cc:894
#, c-format
msgid "Selected version '%s' (%s) for '%s'\n"
msgstr "'%3$s' paketinin '%1$s' (%2$s) sürümü seçildi\n"
-#: apt-private/private-install.cc:897
+#: apt-private/private-install.cc:899
#, c-format
msgid "Selected version '%s' (%s) for '%s' because of '%s'\n"
msgstr "'%4$s' nedeniyle '%3$s' paketinin '%1$s' (%2$s) sürümü seçildi\n"
#. TRANSLATORS: Note, this is not an interactive question
-#: apt-private/private-install.cc:939
+#: apt-private/private-install.cc:941
#, c-format
msgid "Package '%s' is not installed, so not removed. Did you mean '%s'?\n"
msgstr ""
"'%s' kurulu değildi, dolayısıyla kaldırılmadı. Bunu mu demek istediniz: "
"'%s'?\n"
-#: apt-private/private-install.cc:945
+#: apt-private/private-install.cc:947
#, c-format
msgid "Package '%s' is not installed, so not removed\n"
msgstr "'%s' kurulu değildi, dolayısıyla kaldırılmadı\n"
-#: apt-private/private-download.cc:62
-#, c-format
-msgid ""
-"Can't drop privileges for downloading as file '%s' couldn't be accessed by "
-"user '%s'."
-msgstr ""
-
-#: apt-private/private-download.cc:94
+#: apt-private/private-download.cc:36
msgid "WARNING: The following packages cannot be authenticated!"
msgstr "UYARI: Aşağıdaki paketler doğrulanamıyor!"
-#: apt-private/private-download.cc:98
+#: apt-private/private-download.cc:40
msgid "Authentication warning overridden.\n"
msgstr "Kimlik denetimi uyarısı görmezden geliniyor.\n"
-#: apt-private/private-download.cc:103 apt-private/private-download.cc:110
+#: apt-private/private-download.cc:45 apt-private/private-download.cc:52
msgid "Some packages could not be authenticated"
msgstr "Bazı paketlerin kimlik denetimi yapılamadı"
-#: apt-private/private-download.cc:108
+#: apt-private/private-download.cc:50
msgid "Install these packages without verification?"
msgstr "Paketler doğrulanmadan kurulsun mu?"
-#: apt-private/private-download.cc:149 apt-pkg/update.cc:77
+#: apt-private/private-download.cc:91 apt-pkg/update.cc:77
#, c-format
msgid "Failed to fetch %s %s\n"
msgstr "%s ağdan alınamadı. %s\n"
-#: apt-private/private-download.cc:171 apt-private/private-download.cc:174
-#, c-format
-msgid "Couldn't determine free space in %s"
-msgstr "%s içindeki boş alan miktarı belirlenemedi"
-
-#: apt-private/private-download.cc:188
-#, c-format
-msgid "You don't have enough free space in %s."
-msgstr "%s içinde yeterli boş alanınız yok."
-
#: apt-private/private-sources.cc:58
#, c-format
msgid "Failed to parse %s. Edit again? "
@@ -1752,33 +1739,41 @@ msgstr "'%s' dosyası değişti, lütfen 'apt-get update' komutunu çalıştır�
msgid "Full Text Search"
msgstr "Tam Metin Arama"
+#: apt-private/private-upgrade.cc:25
+msgid "Calculating upgrade"
+msgstr "Yükseltme hesaplanıyor"
+
+#: apt-private/private-upgrade.cc:28
+msgid "Done"
+msgstr "Bitti"
+
#: apt-private/acqprogress.cc:66
msgid "Hit "
msgstr "Bağlandı "
-#: apt-private/acqprogress.cc:88
+#: apt-private/acqprogress.cc:90
msgid "Get:"
msgstr "Alınıyor: "
-#: apt-private/acqprogress.cc:119
+#: apt-private/acqprogress.cc:121
msgid "Ign "
msgstr "Yoksay "
-#: apt-private/acqprogress.cc:126
+#: apt-private/acqprogress.cc:125
msgid "Err "
msgstr "Hata "
-#: apt-private/acqprogress.cc:150
+#: apt-private/acqprogress.cc:146
#, c-format
msgid "Fetched %sB in %s (%sB/s)\n"
msgstr "%2$s'de %1$sB alındı (%3$sB/s)\n"
-#: apt-private/acqprogress.cc:240
+#: apt-private/acqprogress.cc:236
#, c-format
msgid " [Working]"
msgstr " [Çalışıyor]"
-#: apt-private/acqprogress.cc:301
+#: apt-private/acqprogress.cc:297
#, c-format
msgid ""
"Media change: please insert the disc labeled\n"
@@ -1791,18 +1786,18 @@ msgstr ""
#. Only warn if there are no sources.list.d.
#. Only warn if there is no sources.list file.
-#: methods/mirror.cc:95 apt-pkg/init.cc:113 apt-pkg/init.cc:121
-#: apt-pkg/sourcelist.cc:280 apt-pkg/sourcelist.cc:286 apt-pkg/clean.cc:43
-#: apt-pkg/acquire.cc:557 apt-pkg/policy.cc:381 apt-pkg/contrib/fileutl.cc:374
-#: apt-pkg/contrib/fileutl.cc:487 apt-pkg/contrib/cdromutl.cc:205
-#: apt-inst/extract.cc:471
+#: methods/mirror.cc:95 apt-inst/extract.cc:471 apt-pkg/init.cc:103
+#: apt-pkg/init.cc:111 apt-pkg/sourcelist.cc:280 apt-pkg/sourcelist.cc:286
+#: apt-pkg/clean.cc:43 apt-pkg/acquire.cc:494 apt-pkg/policy.cc:381
+#: apt-pkg/contrib/fileutl.cc:368 apt-pkg/contrib/fileutl.cc:481
+#: apt-pkg/contrib/cdromutl.cc:205
#, c-format
msgid "Unable to read %s"
-msgstr "%s okunamıyor"
+msgstr "%s okunamadı"
#: methods/mirror.cc:101 methods/mirror.cc:130 apt-pkg/clean.cc:49
-#: apt-pkg/clean.cc:67 apt-pkg/clean.cc:130 apt-pkg/acquire.cc:563
-#: apt-pkg/acquire.cc:588 apt-pkg/contrib/cdromutl.cc:201
+#: apt-pkg/clean.cc:67 apt-pkg/clean.cc:130 apt-pkg/acquire.cc:500
+#: apt-pkg/acquire.cc:525 apt-pkg/contrib/cdromutl.cc:201
#: apt-pkg/contrib/cdromutl.cc:235
#, c-format
msgid "Unable to change to %s"
@@ -1879,456 +1874,205 @@ msgstr ""
msgid "Merging available information"
msgstr "Kullanılabilir bilgiler birleştiriliyor"
-#: cmdline/apt-extracttemplates.cc:229
-msgid ""
-"Usage: apt-extracttemplates file1 [file2 ...]\n"
-"\n"
-"apt-extracttemplates is a tool to extract config and template info\n"
-"from debian packages\n"
-"\n"
-"Options:\n"
-" -h This help text\n"
-" -t Set the temp dir\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
-msgstr ""
-"Kullanım: apt-extracttemplates dosya1 [dosya2 ...]\n"
-"\n"
-"apt-extracttemplates, Debian paketlerinden ayar ve şablon bilgisini\n"
-"almak için kullanılan bir araçtır\n"
-"\n"
-"Seçenekler:\n"
-" -h Bu yardım dosyası\n"
-" -t Geçici dizini ayarlar\n"
-" -c=? Belirtilen ayar dosyasını kullanır\n"
-" -o=? Ayar seçeneği belirtmeyi sağlar, ör -o dir::cache=/tmp\n"
-
-#: cmdline/apt-extracttemplates.cc:259 apt-pkg/contrib/fileutl.cc:2092
-#, c-format
-msgid "Unable to mkstemp %s"
-msgstr "mkstemp %s başarısız oldu"
-
-#: cmdline/apt-extracttemplates.cc:264 apt-pkg/pkgcachegen.cc:1385
-#: apt-pkg/contrib/fileutl.cc:2097
-#, c-format
-msgid "Unable to write to %s"
-msgstr "%s dosyasına yazılamıyor"
-
-#: cmdline/apt-extracttemplates.cc:305
-msgid "Cannot get debconf version. Is debconf installed?"
-msgstr "debconf sürümü alınamıyor. debconf kurulu mu?"
-
-#: ftparchive/apt-ftparchive.cc:186 ftparchive/apt-ftparchive.cc:370
-msgid "Package extension list is too long"
-msgstr "Paket uzantı listesi çok uzun"
-
-#: ftparchive/apt-ftparchive.cc:188 ftparchive/apt-ftparchive.cc:205
-#: ftparchive/apt-ftparchive.cc:228 ftparchive/apt-ftparchive.cc:282
-#: ftparchive/apt-ftparchive.cc:296 ftparchive/apt-ftparchive.cc:318
-#, c-format
-msgid "Error processing directory %s"
-msgstr "%s dizinini işlemede hata"
-
-#: ftparchive/apt-ftparchive.cc:280
-msgid "Source extension list is too long"
-msgstr "Kaynak uzantı listesi çok uzun"
-
-#: ftparchive/apt-ftparchive.cc:400
-msgid "Error writing header to contents file"
-msgstr "İçindekiler dosyasına başlık yazmada hata"
-
-#: ftparchive/apt-ftparchive.cc:430
-#, c-format
-msgid "Error processing contents %s"
-msgstr "%s içeriğini işlemede hata"
-
-#: ftparchive/apt-ftparchive.cc:625
-msgid ""
-"Usage: apt-ftparchive [options] command\n"
-"Commands: packages binarypath [overridefile [pathprefix]]\n"
-" sources srcpath [overridefile [pathprefix]]\n"
-" contents path\n"
-" release path\n"
-" generate config [groups]\n"
-" clean config\n"
-"\n"
-"apt-ftparchive generates index files for Debian archives. It supports\n"
-"many styles of generation from fully automated to functional replacements\n"
-"for dpkg-scanpackages and dpkg-scansources\n"
-"\n"
-"apt-ftparchive generates Package files from a tree of .debs. The\n"
-"Package file contains the contents of all the control fields from\n"
-"each package as well as the MD5 hash and filesize. An override file\n"
-"is supported to force the value of Priority and Section.\n"
-"\n"
-"Similarly apt-ftparchive generates Sources files from a tree of .dscs.\n"
-"The --source-override option can be used to specify a src override file\n"
-"\n"
-"The 'packages' and 'sources' command should be run in the root of the\n"
-"tree. BinaryPath should point to the base of the recursive search and \n"
-"override file should contain the override flags. Pathprefix is\n"
-"appended to the filename fields if present. Example usage from the \n"
-"Debian archive:\n"
-" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
-" dists/potato/main/binary-i386/Packages\n"
-"\n"
-"Options:\n"
-" -h This help text\n"
-" --md5 Control MD5 generation\n"
-" -s=? Source override file\n"
-" -q Quiet\n"
-" -d=? Select the optional caching database\n"
-" --no-delink Enable delinking debug mode\n"
-" --contents Control contents file generation\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option"
-msgstr ""
-"Kullanım: apt-ftparchive [seçenekler] komut\n"
-"Komutlar: packages ikilikonumu [geçersizkılmadosyası [konumöneki]]\n"
-" sources kaynakkonumu [geçersizkılmadosyası [konumöneki]]\n"
-" contents konum\n"
-" release konum\n"
-" generate yapılandırma [gruplar]\n"
-" clean yapılandırma\n"
-"\n"
-"apt-ftparchive Debian arşivleri için indeks dosyaları üretir. \n"
-"dpkg-scanpackages ve dpkg-scansources için tamamen otomatikten\n"
-"işlevsel yedeklere kadar birçok üretim çeşidini destekler.\n"
-"\n"
-"apt-ftparchive, .deb dizinlerinden 'Package' dosyaları üretir. 'Package'\n"
-"dosyası, her paketin MD5 doğrulama ve dosya büyüklüğü gibi denetim\n"
-"alanlarının bilgilerini içerir. Öncelik (Priority) ve bölüm (Section)\n"
-"değerlerini istenen başka değerlerle değiştirebilmek için bir geçersiz\n"
-"kılma dosyası kullanılabilir.\n"
-"\n"
-"Benzer şekilde, apt-ftparchive, .dscs dosyalarından 'Sources' dosyaları\n"
-"üretir. '--source-override' seçeneği bir src geçersiz kılma dosyası\n"
-"belirtmek için kullanıabilir.\n"
-"\n"
-"'packages' ve 'sources' komutları dizin ağacının kökünde çalıştırıl-\n"
-"malıdır. BinaryPath özyineli aramanın temeline işaret etmeli ve\n"
-"geçersiz kılma dosyası geçersiz kılma bayraklarını içermelidir.\n"
-"Pathprefix mevcutsa dosya adı alanlarının sonuna eklenir. Debian\n"
-"arşivinden örnek kullanım şu şekildedir:\n"
-"\n"
-" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
-" dists/potato/main/binary-i386/Packages\n"
-"\n"
-"Seçenekler:\n"
-" -h Bu yardım metni\n"
-" --md5 MD5 üretimini denetle\n"
-" -s=? Kaynak geçersiz kılma dosyası\n"
-" -q Sessiz\n"
-" -d=? Seçimlik önbellek veritabanını seç\n"
-" --no-delink Bağ kurulmamış hata ayıklama kipini etkinleştir\n"
-" --contents İçerik dosyası üretimini denetle\n"
-" -c=? Belirtilen yapılandırma dosyası kullan\n"
-" -o=? Yapılandırma seçeneği ayarla"
-
-#: ftparchive/apt-ftparchive.cc:821
-msgid "No selections matched"
-msgstr "Hiçbir seçim eşleşmedi"
-
-#: ftparchive/apt-ftparchive.cc:906
-#, c-format
-msgid "Some files are missing in the package file group `%s'"
-msgstr "'%s' paket dosyası grubunda bazı dosyalar eksik"
+#: apt-inst/filelist.cc:380
+msgid "DropNode called on still linked node"
+msgstr "DropNode hâlâ bağlı olan düğüm üzerinde çağrıldı"
-#: ftparchive/cachedb.cc:67
-#, c-format
-msgid "DB was corrupted, file renamed to %s.old"
-msgstr "Veritabanı bozuk, dosya adı %s.old olarak değiştirildi"
+#: apt-inst/filelist.cc:412
+msgid "Failed to locate the hash element!"
+msgstr "Sağlama elementi bulunamadı!"
-#: ftparchive/cachedb.cc:85
-#, c-format
-msgid "DB is old, attempting to upgrade %s"
-msgstr "Veritabanı eski, %s yükseltilmeye çalışılıyor"
+#: apt-inst/filelist.cc:459
+msgid "Failed to allocate diversion"
+msgstr "Yönlendirme tahsisi başarısız oldu"
-#: ftparchive/cachedb.cc:96
-msgid ""
-"DB format is invalid. If you upgraded from an older version of apt, please "
-"remove and re-create the database."
-msgstr ""
-"Veritabanı biçimi geçersiz. Eğer apt'ın eski bir sürümünden yükseltme "
-"yaptıysanız, lütfen veritabanını silin ve yeniden oluşturun."
+#: apt-inst/filelist.cc:464
+msgid "Internal error in AddDiversion"
+msgstr "AddDiversion'da iç hata"
-#: ftparchive/cachedb.cc:101
+#: apt-inst/filelist.cc:477
#, c-format
-msgid "Unable to open DB file %s: %s"
-msgstr "Veritabanı dosyası %s açılamadı: %s"
+msgid "Trying to overwrite a diversion, %s -> %s and %s/%s"
+msgstr "Bir yönlendirmenin üzerine yazılmaya çalışılıyor, %s -> %s ve %s/%s"
-#: ftparchive/cachedb.cc:184 apt-inst/extract.cc:186 apt-inst/extract.cc:199
-#: apt-inst/extract.cc:216
+#: apt-inst/filelist.cc:506
#, c-format
-msgid "Failed to stat %s"
-msgstr "%s durum bilgisi alınamadı"
-
-#: ftparchive/cachedb.cc:326
-msgid "Failed to read .dsc"
-msgstr ".dsc dosyası okunamadı"
-
-#: ftparchive/cachedb.cc:359
-msgid "Archive has no control record"
-msgstr "Arşivin denetim kaydı yok"
-
-#: ftparchive/cachedb.cc:526
-msgid "Unable to get a cursor"
-msgstr "İmleç alınamıyor"
+msgid "Double add of diversion %s -> %s"
+msgstr "Aynı dosya iki kez yönlendirilemez: %s -> %s"
-#: ftparchive/writer.cc:104
+#: apt-inst/filelist.cc:549
#, c-format
-msgid "W: Unable to read directory %s\n"
-msgstr "U: %s dizini okunamıyor\n"
+msgid "Duplicate conf file %s/%s"
+msgstr "%s/%s yapılandırma dosyası zaten mevcut"
-#: ftparchive/writer.cc:109
+#: apt-inst/extract.cc:101 apt-inst/extract.cc:172
#, c-format
-msgid "W: Unable to stat %s\n"
-msgstr "U: %s durum bilgisi alınamıyor\n"
-
-#: ftparchive/writer.cc:165
-msgid "E: "
-msgstr "H: "
-
-#: ftparchive/writer.cc:167
-msgid "W: "
-msgstr "U: "
-
-#: ftparchive/writer.cc:174
-msgid "E: Errors apply to file "
-msgstr "H: Hatalar şu dosya için geçerli: "
+msgid "The path %s is too long"
+msgstr "%s yolu çok uzun"
-#: ftparchive/writer.cc:192 ftparchive/writer.cc:224
+#: apt-inst/extract.cc:132
#, c-format
-msgid "Failed to resolve %s"
-msgstr "%s çözümlenemedi"
-
-#: ftparchive/writer.cc:205
-msgid "Tree walking failed"
-msgstr "Ağaçta gezinme başarısız"
+msgid "Unpacking %s more than once"
+msgstr "%s paketi bir çok kez açıldı"
-#: ftparchive/writer.cc:232
+#: apt-inst/extract.cc:142
#, c-format
-msgid "Failed to open %s"
-msgstr "%s açılamadı"
+msgid "The directory %s is diverted"
+msgstr "%s dizini yönlendirilmiş"
-#: ftparchive/writer.cc:291
+#: apt-inst/extract.cc:152
#, c-format
-msgid " DeLink %s [%s]\n"
-msgstr " DeLink %s [%s]\n"
+msgid "The package is trying to write to the diversion target %s/%s"
+msgstr "Bu paket yönlendirme hedefine (%s/%s) yazmayı deniyor"
-#: ftparchive/writer.cc:299
-#, c-format
-msgid "Failed to readlink %s"
-msgstr "%s readlink çağrısı başarısız oldu"
+#: apt-inst/extract.cc:162 apt-inst/extract.cc:306
+msgid "The diversion path is too long"
+msgstr "Yönlendirme yolu çok uzun"
-#: ftparchive/writer.cc:303
+#: apt-inst/extract.cc:186 apt-inst/extract.cc:199 apt-inst/extract.cc:216
+#: ftparchive/cachedb.cc:182
#, c-format
-msgid "Failed to unlink %s"
-msgstr "%s bağı koparılamadı"
+msgid "Failed to stat %s"
+msgstr "%s durum bilgisi alınamadı"
-#: ftparchive/writer.cc:311
+#: apt-inst/extract.cc:194 ftparchive/multicompress.cc:374
#, c-format
-msgid "*** Failed to link %s to %s"
-msgstr "*** %s, %s konumuna bağlanamadı"
+msgid "Failed to rename %s to %s"
+msgstr "%s, %s olarak yeniden adlandırılamadı"
-#: ftparchive/writer.cc:321
+#: apt-inst/extract.cc:249
#, c-format
-msgid " DeLink limit of %sB hit.\n"
-msgstr " %sB'lik bağ koparma (DeLink) sınırına ulaşıldı.\n"
+msgid "The directory %s is being replaced by a non-directory"
+msgstr "%s dizini dizin olmayan bir öğeyle değiştirildi"
-#: ftparchive/writer.cc:427
-msgid "Archive had no package field"
-msgstr "Arşivde paket alanı yok"
+#: apt-inst/extract.cc:289
+msgid "Failed to locate node in its hash bucket"
+msgstr "Düğüm sağlama kovasında bulunamadı"
-#: ftparchive/writer.cc:435 ftparchive/writer.cc:698
-#, c-format
-msgid " %s has no override entry\n"
-msgstr " %s için geçersiz kılma girdisi yok\n"
+#: apt-inst/extract.cc:293
+msgid "The path is too long"
+msgstr "Yol çok uzun"
-#: ftparchive/writer.cc:502 ftparchive/writer.cc:862
+#: apt-inst/extract.cc:421
#, c-format
-msgid " %s maintainer is %s not %s\n"
-msgstr " %s geliştiricisi %s, %s değil\n"
+msgid "Overwrite package match with no version for %s"
+msgstr "%s paketinin sürümü yok"
-#: ftparchive/writer.cc:712
+#: apt-inst/extract.cc:438
#, c-format
-msgid " %s has no source override entry\n"
-msgstr " '%s' paketinin yerine geçecek bir kaynak paket yok\n"
+msgid "File %s/%s overwrites the one in the package %s"
+msgstr "%s/%s dosyası %s paketindeki aynı adlı dosyanın üzerine yazmak istiyor"
-#: ftparchive/writer.cc:716
+#: apt-inst/extract.cc:498
#, c-format
-msgid " %s has no binary override entry either\n"
-msgstr " '%s' paketinin yerine geçecek bir ikili paket de yok\n"
-
-#: ftparchive/contents.cc:351 ftparchive/contents.cc:382
-msgid "realloc - Failed to allocate memory"
-msgstr "realloc - Bellek ayırma yapılamadı"
+msgid "Unable to stat %s"
+msgstr "%s durum bilgisi alınamadı"
-#: ftparchive/override.cc:38 ftparchive/override.cc:142
+#: apt-inst/dirstream.cc:42 apt-inst/dirstream.cc:49 apt-inst/dirstream.cc:54
#, c-format
-msgid "Unable to open %s"
-msgstr "%s açılamıyor"
+msgid "Failed to write file %s"
+msgstr "%s dosyasına yazılamadı"
-#. skip spaces
-#. find end of word
-#: ftparchive/override.cc:68
+#: apt-inst/dirstream.cc:105
#, c-format
-msgid "Malformed override %s line %llu (%s)"
-msgstr "Hatalı geçersiz kılma %s satır %llu (%s)"
+msgid "Failed to close file %s"
+msgstr "%s dosyası kapatılamadı"
-#: ftparchive/override.cc:127 ftparchive/override.cc:201
+#: apt-inst/deb/debfile.cc:47 apt-inst/deb/debfile.cc:54
+#: apt-inst/deb/debfile.cc:63
#, c-format
-msgid "Failed to read the override file %s"
-msgstr "Geçersiz kılma dosyası %s okunamadı"
+msgid "This is not a valid DEB archive, missing '%s' member"
+msgstr "Bu dosya geçerli bir DEB arşivi değil, '%s' üyesi eksik"
-#: ftparchive/override.cc:166
+#: apt-inst/deb/debfile.cc:132
#, c-format
-msgid "Malformed override %s line %llu #1"
-msgstr "Hatalı geçersiz kılma %s satır %llu #1"
+msgid "Internal error, could not locate member %s"
+msgstr "İç hata, %s üyesi bulunamadı"
-#: ftparchive/override.cc:178
-#, c-format
-msgid "Malformed override %s line %llu #2"
-msgstr "Hatalı geçersiz kılma %s satır %llu #2"
+#: apt-inst/deb/debfile.cc:227
+msgid "Unparsable control file"
+msgstr "Ayrıştırılamayan 'control' dosyası"
-#: ftparchive/override.cc:191
-#, c-format
-msgid "Malformed override %s line %llu #3"
-msgstr "Hatalı geçersiz kılma %s satır %llu #3"
+#: apt-inst/contrib/arfile.cc:76
+msgid "Invalid archive signature"
+msgstr "Geçersiz arşiv imzası"
-#: ftparchive/multicompress.cc:73
-#, c-format
-msgid "Unknown compression algorithm '%s'"
-msgstr "Bilinmeyen sıkıştırma algoritması '%s'"
+#: apt-inst/contrib/arfile.cc:84
+msgid "Error reading archive member header"
+msgstr "Arşiv üyesi başlığı okuma hatası"
-#: ftparchive/multicompress.cc:103
+#: apt-inst/contrib/arfile.cc:96
#, c-format
-msgid "Compressed output %s needs a compression set"
-msgstr "Sıkıştırılmış %s çıktısı bir sıkıştırma kümesine ihtiyaç duymaktadır"
+msgid "Invalid archive member header %s"
+msgstr "Geçersiz arşiv üyesi başlığı %s"
-#: ftparchive/multicompress.cc:192
-msgid "Failed to create FILE*"
-msgstr "DOSYA* oluşturulamadı"
+#: apt-inst/contrib/arfile.cc:108
+msgid "Invalid archive member header"
+msgstr "Geçersiz arşiv üyesi başlığı"
-#: ftparchive/multicompress.cc:195
-msgid "Failed to fork"
-msgstr "fork yapılamadı"
+#: apt-inst/contrib/arfile.cc:137
+msgid "Archive is too short"
+msgstr "Arşiv çok kısa"
-#: ftparchive/multicompress.cc:209
-msgid "Compress child"
-msgstr "Çocuğu sıkıştır"
+#: apt-inst/contrib/arfile.cc:141
+msgid "Failed to read the archive headers"
+msgstr "Arşiv başlıkları okunamadı"
-#: ftparchive/multicompress.cc:232
-#, c-format
-msgid "Internal error, failed to create %s"
-msgstr "İç hata, %s oluşturulamadı"
+#: apt-inst/contrib/extracttar.cc:124
+msgid "Failed to create pipes"
+msgstr "Boru oluşturulamadı"
-#: ftparchive/multicompress.cc:305
-msgid "IO to subprocess/file failed"
-msgstr "Altsürece/dosyaya GÇ işlemi başarısız oldu"
+#: apt-inst/contrib/extracttar.cc:151
+msgid "Failed to exec gzip "
+msgstr "Gzip çalıştırılamadı "
-#: ftparchive/multicompress.cc:343
-msgid "Failed to read while computing MD5"
-msgstr "MD5 hesaplanırken okunamadı"
+#: apt-inst/contrib/extracttar.cc:188 apt-inst/contrib/extracttar.cc:218
+msgid "Corrupted archive"
+msgstr "Bozuk arşiv"
-#: ftparchive/multicompress.cc:359
-#, c-format
-msgid "Problem unlinking %s"
-msgstr "%s bağı koparılırken sorun çıktı"
+#: apt-inst/contrib/extracttar.cc:203
+msgid "Tar checksum failed, archive corrupted"
+msgstr "Tar sağlama toplamı başarısız, arşiv bozulmuş"
-#: ftparchive/multicompress.cc:374 apt-inst/extract.cc:194
+#: apt-inst/contrib/extracttar.cc:308
#, c-format
-msgid "Failed to rename %s to %s"
-msgstr "%s, %s olarak yeniden adlandırılamadı"
-
-#: cmdline/apt-internal-solver.cc:51
-msgid ""
-"Usage: apt-internal-solver\n"
-"\n"
-"apt-internal-solver is an interface to use the current internal\n"
-"like an external resolver for the APT family for debugging or alike\n"
-"\n"
-"Options:\n"
-" -h This help text.\n"
-" -q Loggable output - no progress indicator\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
-msgstr ""
-"Kullanım: apt-internal-solver\n"
-"\n"
-"apt-internal-solver mevcut dâhilî çözücüyü (hata ayıklama\n"
-"gibi sebeplerle) harici çözücü gibi kullanmaya yarayan bir\n"
-"arayüzdür.\n"
-"\n"
-"Seçenekler:\n"
-" -h Bu yardım metni.\n"
-" -q Günlük tutmaya uygun çıktı - İlerleme göstergesi yok\n"
-" -c=? Belirtilen yapılandırma dosyası kullan\n"
-" -o=? Yapılandırma seçeneği ayarla, örneğin -o dir::cache=/tmp\n"
-
-#: cmdline/apt-sortpkgs.cc:91
-msgid "Unknown package record!"
-msgstr "Bilinmeyen paket kaydı!"
-
-#: cmdline/apt-sortpkgs.cc:155
-msgid ""
-"Usage: apt-sortpkgs [options] file1 [file2 ...]\n"
-"\n"
-"apt-sortpkgs is a simple tool to sort package files. The -s option is used\n"
-"to indicate what kind of file it is.\n"
-"\n"
-"Options:\n"
-" -h This help text\n"
-" -s Use source file sorting\n"
-" -c=? Read this configuration file\n"
-" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
-msgstr ""
-"Kullanım: apt-sortpkgs [seçenekler] dosya1 [dosya2 ...]\n"
-"\n"
-"apt-sortpkgs, paket dosyalarını sıralayan basit bir araçtır.\n"
-"-s seçeneği ne tür bir dosya olduğunu göstermekte kullanılır.\n"
-"\n"
-"Seçenekler:\n"
-" -h Bu yardım metni\n"
-" -s Kaynak dosyası sıralamayı kullan\n"
-" -c=? Belirtilen yapılandırma dosyasını oku\n"
-" -o=? Herhangi bir yapılandırma seçeneği ayarla, örneğin -o dir::cache=/"
-"tmp\n"
+msgid "Unknown TAR header type %u, member %s"
+msgstr "Bilinmeyen TAR başlığı türü %u, üye %s"
-#: apt-pkg/install-progress.cc:59
+#: apt-pkg/install-progress.cc:57
#, c-format
msgid "Progress: [%3i%%]"
msgstr "Durum: [%3i%%]"
-#: apt-pkg/install-progress.cc:93 apt-pkg/install-progress.cc:176
+#: apt-pkg/install-progress.cc:91 apt-pkg/install-progress.cc:174
msgid "Running dpkg"
msgstr "dpkg çalıştırılıyor"
-#: apt-pkg/init.cc:156
+#: apt-pkg/init.cc:146
#, c-format
msgid "Packaging system '%s' is not supported"
msgstr "Paketleme sistemi '%s' desteklenmiyor"
-#: apt-pkg/init.cc:172
+#: apt-pkg/init.cc:162
msgid "Unable to determine a suitable packaging system type"
msgstr "Uygun bir paketleme sistemi türü bulunamıyor"
-#: apt-pkg/indexcopy.cc:236 apt-pkg/indexcopy.cc:775
+#: apt-pkg/indexcopy.cc:236 apt-pkg/indexcopy.cc:773
#, c-format
msgid "Wrote %i records.\n"
msgstr "%i kayıt yazıldı.\n"
-#: apt-pkg/indexcopy.cc:238 apt-pkg/indexcopy.cc:777
+#: apt-pkg/indexcopy.cc:238 apt-pkg/indexcopy.cc:775
#, c-format
msgid "Wrote %i records with %i missing files.\n"
msgstr "%2$i eksik dosyayla %1$i kayıt yazıldı.\n"
-#: apt-pkg/indexcopy.cc:241 apt-pkg/indexcopy.cc:780
+#: apt-pkg/indexcopy.cc:241 apt-pkg/indexcopy.cc:778
#, c-format
msgid "Wrote %i records with %i mismatched files\n"
msgstr "%2$i eşleşmeyen dosyayla %1$i kayıt yazıldı\n"
-#: apt-pkg/indexcopy.cc:244 apt-pkg/indexcopy.cc:783
+#: apt-pkg/indexcopy.cc:244 apt-pkg/indexcopy.cc:781
#, c-format
msgid "Wrote %i records with %i missing files and %i mismatched files\n"
msgstr "%2$i eksik dosya ve %3$i eşleşmeyen dosyayla %1$i kayıt yazıldı\n"
@@ -2343,22 +2087,22 @@ msgstr "%s için kimlik doğrulama kaydı bulunamadı"
msgid "Hash mismatch for: %s"
msgstr "Sağlama yapılamadı: %s"
-#: apt-pkg/acquire-worker.cc:133
+#: apt-pkg/acquire-worker.cc:116
#, c-format
msgid "The method driver %s could not be found."
msgstr "Yöntem sürücüsü %s bulunamadı."
-#: apt-pkg/acquire-worker.cc:135
+#: apt-pkg/acquire-worker.cc:118
#, c-format
msgid "Is the package %s installed?"
msgstr "%s paketi kurulu mu?"
-#: apt-pkg/acquire-worker.cc:186
+#: apt-pkg/acquire-worker.cc:169
#, c-format
msgid "Method %s did not start correctly"
msgstr "%s yöntemi düzgün şekilde başlamadı"
-#: apt-pkg/acquire-worker.cc:485
+#: apt-pkg/acquire-worker.cc:455
#, c-format
msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
msgstr ""
@@ -2377,92 +2121,87 @@ msgstr "Bu sorunları gidermek için apt-get update komutunu çalıştırabilirs
msgid "The list of sources could not be read."
msgstr "Kaynak listesi okunamadı."
-#: apt-pkg/pkgcache.cc:154
+#: apt-pkg/pkgcache.cc:155
msgid "Empty package cache"
msgstr "Paket önbelleği boş"
-#: apt-pkg/pkgcache.cc:160 apt-pkg/pkgcache.cc:171
+#: apt-pkg/pkgcache.cc:161
msgid "The package cache file is corrupted"
msgstr "Paket önbelleği dosyası bozulmuş"
-#: apt-pkg/pkgcache.cc:165
+#: apt-pkg/pkgcache.cc:166
msgid "The package cache file is an incompatible version"
msgstr "Paket önbelleği dosyası uyumsuz bir sürümde"
-#: apt-pkg/pkgcache.cc:168
+#: apt-pkg/pkgcache.cc:169
msgid "The package cache file is corrupted, it is too small"
msgstr "Paket önbellek dosyası bozulmuş, çok küçük"
-#: apt-pkg/pkgcache.cc:175
+#: apt-pkg/pkgcache.cc:174
#, c-format
msgid "This APT does not support the versioning system '%s'"
msgstr "Bu APT '%s' sürümleme sistemini desteklemiyor"
-#: apt-pkg/pkgcache.cc:185
-#, fuzzy, c-format
-msgid "The package cache was built for different architectures: %s vs %s"
+#: apt-pkg/pkgcache.cc:179
+msgid "The package cache was built for a different architecture"
msgstr "Paket önbelleği farklı bir mimarı için yapılmış"
-#: apt-pkg/pkgcache.cc:322
+#: apt-pkg/pkgcache.cc:321
msgid "Depends"
msgstr "Bağımlılıklar"
-#: apt-pkg/pkgcache.cc:322
+#: apt-pkg/pkgcache.cc:321
msgid "PreDepends"
msgstr "ÖnBağımlılıklar"
-#: apt-pkg/pkgcache.cc:322
+#: apt-pkg/pkgcache.cc:321
msgid "Suggests"
msgstr "Önerdikleri"
-#: apt-pkg/pkgcache.cc:323
+#: apt-pkg/pkgcache.cc:322
msgid "Recommends"
msgstr "Tavsiye ettikleri"
-#: apt-pkg/pkgcache.cc:323
+#: apt-pkg/pkgcache.cc:322
msgid "Conflicts"
msgstr "Çakışmalar"
-#: apt-pkg/pkgcache.cc:323
+#: apt-pkg/pkgcache.cc:322
msgid "Replaces"
msgstr "Değiştirilenler"
-#: apt-pkg/pkgcache.cc:324
+#: apt-pkg/pkgcache.cc:323
msgid "Obsoletes"
msgstr "Eskiyenler"
-#: apt-pkg/pkgcache.cc:324
+#: apt-pkg/pkgcache.cc:323
msgid "Breaks"
msgstr "Bozdukları"
-#: apt-pkg/pkgcache.cc:324
+#: apt-pkg/pkgcache.cc:323
msgid "Enhances"
msgstr "Geliştirdikleri"
-#: apt-pkg/pkgcache.cc:335
+#: apt-pkg/pkgcache.cc:334
msgid "important"
msgstr "önemli"
-#: apt-pkg/pkgcache.cc:335
+#: apt-pkg/pkgcache.cc:334
msgid "required"
msgstr "gerekli"
-#: apt-pkg/pkgcache.cc:335
+#: apt-pkg/pkgcache.cc:334
msgid "standard"
msgstr "standart"
-#: apt-pkg/pkgcache.cc:336
+#: apt-pkg/pkgcache.cc:335
msgid "optional"
msgstr "seçimlik"
-#: apt-pkg/pkgcache.cc:336
+#: apt-pkg/pkgcache.cc:335
msgid "extra"
msgstr "ilave"
-#: apt-pkg/upgrade.cc:34 apt-pkg/upgrade.cc:136 apt-pkg/upgrade.cc:182
-msgid "Calculating upgrade"
-msgstr "Yükseltme hesaplanıyor"
-
#: apt-pkg/pkgrecords.cc:38
#, c-format
msgid "Index file type '%s' is not supported"
@@ -2560,7 +2299,7 @@ msgstr "'%s' türü bilinmiyor. (Satır: %u, Kaynak Listesi: %s)"
msgid "Type '%s' is not known on stanza %u in source list %s"
msgstr "'%s' türü bilinmiyor (girdi: %u, kaynak listesi: %s)"
-#: apt-pkg/clean.cc:39 apt-pkg/acquire.cc:553
+#: apt-pkg/clean.cc:39 apt-pkg/acquire.cc:490
#, c-format
msgid "Clean of %s is not supported"
msgstr "%s temizliği desteklenmiyor"
@@ -2570,60 +2309,66 @@ msgstr "%s temizliği desteklenmiyor"
msgid "Unable to stat %s."
msgstr "%s için dosya bilgisi alınamadı."
-#: apt-pkg/pkgcachegen.cc:113
+#: apt-pkg/pkgcachegen.cc:93
msgid "Cache has an incompatible versioning system"
msgstr "Önbelleğin uyumsuz bir sürümleme sistemi var"
#. TRANSLATOR: The first placeholder is a package name,
#. the other two should be copied verbatim as they include debug info
-#: apt-pkg/pkgcachegen.cc:240 apt-pkg/pkgcachegen.cc:250
-#: apt-pkg/pkgcachegen.cc:316 apt-pkg/pkgcachegen.cc:382
+#: apt-pkg/pkgcachegen.cc:224 apt-pkg/pkgcachegen.cc:234
+#: apt-pkg/pkgcachegen.cc:300 apt-pkg/pkgcachegen.cc:327
+#: apt-pkg/pkgcachegen.cc:340 apt-pkg/pkgcachegen.cc:382
#: apt-pkg/pkgcachegen.cc:386 apt-pkg/pkgcachegen.cc:403
#: apt-pkg/pkgcachegen.cc:411 apt-pkg/pkgcachegen.cc:415
#: apt-pkg/pkgcachegen.cc:419 apt-pkg/pkgcachegen.cc:440
-#: apt-pkg/pkgcachegen.cc:479 apt-pkg/pkgcachegen.cc:525
-#: apt-pkg/pkgcachegen.cc:539 apt-pkg/pkgcachegen.cc:570
-#: apt-pkg/pkgcachegen.cc:584
+#: apt-pkg/pkgcachegen.cc:479 apt-pkg/pkgcachegen.cc:517
+#: apt-pkg/pkgcachegen.cc:524 apt-pkg/pkgcachegen.cc:555
+#: apt-pkg/pkgcachegen.cc:569
#, c-format
msgid "Error occurred while processing %s (%s%d)"
msgstr "%s paketi işlenirken sorunlarla karşılaşıldı (%s%d)"
-#: apt-pkg/pkgcachegen.cc:273
+#: apt-pkg/pkgcachegen.cc:257
msgid "Wow, you exceeded the number of package names this APT is capable of."
msgstr "Vay canına, bu APT'nin alabileceği paket adları sayısını aştınız."
-#: apt-pkg/pkgcachegen.cc:276
+#: apt-pkg/pkgcachegen.cc:260
msgid "Wow, you exceeded the number of versions this APT is capable of."
msgstr "Vay canına, bu APT'nin alabileceği sürüm sayısını aştınız."
-#: apt-pkg/pkgcachegen.cc:279
+#: apt-pkg/pkgcachegen.cc:263
msgid "Wow, you exceeded the number of descriptions this APT is capable of."
msgstr "Vay canına, bu APT'nin alabileceği açıklama sayısını aştınız."
-#: apt-pkg/pkgcachegen.cc:282
+#: apt-pkg/pkgcachegen.cc:266
msgid "Wow, you exceeded the number of dependencies this APT is capable of."
msgstr "Vay canına, bu APT'nin alabileceği bağımlılık sayısını aştınız."
-#: apt-pkg/pkgcachegen.cc:591
+#: apt-pkg/pkgcachegen.cc:576
#, c-format
msgid "Package %s %s was not found while processing file dependencies"
msgstr "Dosya bağımlılıkları işlenirken %s %s paketi bulunamadı"
-#: apt-pkg/pkgcachegen.cc:1196
+#: apt-pkg/pkgcachegen.cc:1211
#, c-format
msgid "Couldn't stat source package list %s"
msgstr "Kaynak listesinin (%s) dosya bilgisi alınamadı"
-#: apt-pkg/pkgcachegen.cc:1284 apt-pkg/pkgcachegen.cc:1388
-#: apt-pkg/pkgcachegen.cc:1394 apt-pkg/pkgcachegen.cc:1551
+#: apt-pkg/pkgcachegen.cc:1299 apt-pkg/pkgcachegen.cc:1403
+#: apt-pkg/pkgcachegen.cc:1409 apt-pkg/pkgcachegen.cc:1566
msgid "Reading package lists"
msgstr "Paket listeleri okunuyor"
-#: apt-pkg/pkgcachegen.cc:1301
+#: apt-pkg/pkgcachegen.cc:1316
msgid "Collecting File Provides"
msgstr "Dosya Sağlananları Toplanıyor"
-#: apt-pkg/pkgcachegen.cc:1493 apt-pkg/pkgcachegen.cc:1500
+#: apt-pkg/pkgcachegen.cc:1400 cmdline/apt-extracttemplates.cc:259
+#, c-format
+msgid "Unable to write to %s"
+msgstr "%s dosyasına yazılamıyor"
+
+#: apt-pkg/pkgcachegen.cc:1508 apt-pkg/pkgcachegen.cc:1515
msgid "IO Error saving source cache"
msgstr "Kaynak önbelleği kaydedilirken GÇ Hatası"
@@ -2631,87 +2376,40 @@ msgstr "Kaynak önbelleği kaydedilirken GÇ Hatası"
msgid "Send scenario to solver"
msgstr "Çözücüye senaryo gönder"
-#: apt-pkg/edsp.cc:244
+#: apt-pkg/edsp.cc:241
msgid "Send request to solver"
msgstr "Çözücüye istek gönder"
-#: apt-pkg/edsp.cc:323
+#: apt-pkg/edsp.cc:320
msgid "Prepare for receiving solution"
msgstr "Çözüm almak için hazırlan"
-#: apt-pkg/edsp.cc:330
+#: apt-pkg/edsp.cc:327
msgid "External solver failed without a proper error message"
msgstr "Harici çözücü düzgün bir hata iletisi göstermeden başarısız oldu"
-#: apt-pkg/edsp.cc:622 apt-pkg/edsp.cc:625 apt-pkg/edsp.cc:630
+#: apt-pkg/edsp.cc:619 apt-pkg/edsp.cc:622 apt-pkg/edsp.cc:627
msgid "Execute external solver"
msgstr "Harici çözücüyü çalıştır"
-#: apt-pkg/acquire-item.cc:98
-msgid "Use --allow-insecure-repositories to force the update"
-msgstr ""
-
-#: apt-pkg/acquire-item.cc:215 apt-pkg/contrib/fileutl.cc:2108
+#: apt-pkg/acquire-item.cc:148 apt-pkg/contrib/fileutl.cc:2047
#, c-format
msgid "rename failed, %s (%s -> %s)."
msgstr "yeniden adlandırma başarısız, %s (%s -> %s)."
-#: apt-pkg/acquire-item.cc:240
+#: apt-pkg/acquire-item.cc:163
msgid "Hash Sum mismatch"
msgstr "Sağlama toplamları eşleşmiyor"
-#: apt-pkg/acquire-item.cc:245
+#: apt-pkg/acquire-item.cc:168
msgid "Size mismatch"
msgstr "Boyutlar eşleşmiyor"
-#: apt-pkg/acquire-item.cc:250
+#: apt-pkg/acquire-item.cc:173
msgid "Invalid file format"
msgstr "Geçersiz dosya biçimi"
-#: apt-pkg/acquire-item.cc:255
-#, fuzzy
-msgid "Signature error"
-msgstr "Yazma hatası"
-
-#: apt-pkg/acquire-item.cc:259
-#, fuzzy
-msgid "Does not start with a cleartext signature"
-msgstr "%s dosyası açıkimzalı bir iletiyle başlamıyor"
-
-#: apt-pkg/acquire-item.cc:1584
-#, c-format
-msgid ""
-"An error occurred during the signature verification. The repository is not "
-"updated and the previous index files will be used. GPG error: %s: %s\n"
-msgstr ""
-"İmza doğrulama sırasında bir hata meydana geldi. Depo güncel değil ve önceki "
-"indeks dosyaları kullanılacak. GPG hatası: %s:%s\n"
-
-#. Invalid signature file, reject (LP: #346386) (Closes: #627642)
-#: apt-pkg/acquire-item.cc:1594 apt-pkg/acquire-item.cc:1600
-#, c-format
-msgid "GPG error: %s: %s"
-msgstr "GPG hatası: %s: %s"
-
-#: apt-pkg/acquire-item.cc:1707
-#, fuzzy, c-format
-msgid "The repository '%s' is no longer signed."
-msgstr "%s dizini yönlendirilmiş"
-
-#: apt-pkg/acquire-item.cc:1714
-msgid ""
-"This is normally not allowed, but the option Acquire::"
-"AllowDowngradeToInsecureRepositories was given to override it."
-msgstr ""
-
-#: apt-pkg/acquire-item.cc:1727 apt-pkg/acquire-item.cc:2202
-#, c-format
-msgid ""
-"The data from '%s' is not signed. Packages from that repository can not be "
-"authenticated."
-msgstr ""
-
-#: apt-pkg/acquire-item.cc:1956
+#: apt-pkg/acquire-item.cc:1650
#, c-format
msgid ""
"Unable to find expected entry '%s' in Release file (Wrong sources.list entry "
@@ -2720,17 +2418,17 @@ msgstr ""
"'Release' dosyasında olması beklenilen '%s' girdisi bulunamadı (sources.list "
"dosyasındaki girdi ya da satır hatalı)"
-#: apt-pkg/acquire-item.cc:1975
+#: apt-pkg/acquire-item.cc:1666
#, c-format
msgid "Unable to find hash sum for '%s' in Release file"
msgstr "'Release' dosyasında '%s' için uygun bir sağlama toplamı bulunamadı"
-#: apt-pkg/acquire-item.cc:1999
+#: apt-pkg/acquire-item.cc:1708
msgid "There is no public key available for the following key IDs:\n"
msgstr ""
"Aşağıdaki anahtar kimlikleri için kullanılır hiçbir genel anahtar yok:\n"
-#: apt-pkg/acquire-item.cc:2037
+#: apt-pkg/acquire-item.cc:1746
#, c-format
msgid ""
"Release file for %s is expired (invalid since %s). Updates for this "
@@ -2739,19 +2437,27 @@ msgstr ""
"%s konumundaki 'Release' dosyasının vâdesi dolmuş (%s önce). Bu deponun "
"güncelleştirmeleri uygulanmayacak."
-#: apt-pkg/acquire-item.cc:2059
+#: apt-pkg/acquire-item.cc:1768
#, c-format
msgid "Conflicting distribution: %s (expected %s but got %s)"
msgstr "Dağıtım çakışması: %s (beklenen %s ama eldeki %s)"
-#: apt-pkg/acquire-item.cc:2078
+#: apt-pkg/acquire-item.cc:1798
#, c-format
msgid ""
-"The repository '%s' does not have a Release file. This is deprecated, please "
-"contact the owner of the repository."
+"An error occurred during the signature verification. The repository is not "
+"updated and the previous index files will be used. GPG error: %s: %s\n"
msgstr ""
+"İmza doğrulama sırasında bir hata meydana geldi. Depo güncel değil ve önceki "
+"indeks dosyaları kullanılacak. GPG hatası: %s:%s\n"
-#: apt-pkg/acquire-item.cc:2249
+#. Invalid signature file, reject (LP: #346386) (Closes: #627642)
+#: apt-pkg/acquire-item.cc:1808 apt-pkg/acquire-item.cc:1813
+#, c-format
+msgid "GPG error: %s: %s"
+msgstr "GPG hatası: %s: %s"
+
+#: apt-pkg/acquire-item.cc:1936
#, c-format
msgid ""
"I wasn't able to locate a file for the %s package. This might mean you need "
@@ -2760,45 +2466,45 @@ msgstr ""
"%s paketindeki dosyalardan biri konumlandırılamadı. Bu durum, bu paketi elle "
"düzeltmeniz gerektiği anlamına gelebilir. (eksik mimariden dolayı)"
-#: apt-pkg/acquire-item.cc:2315
+#: apt-pkg/acquire-item.cc:2002
#, c-format
msgid "Can't find a source to download version '%s' of '%s'"
msgstr "'%2$s' paketinin '%1$s' sürümü hiçbir kaynakta bulunamadı"
-#: apt-pkg/acquire-item.cc:2351
+#: apt-pkg/acquire-item.cc:2060
#, c-format
msgid ""
"The package index files are corrupted. No Filename: field for package %s."
msgstr "Paket indeks dosyaları bozuk. %s paketinin 'Filename:' alanı yok."
-#: apt-pkg/vendorlist.cc:83
+#: apt-pkg/vendorlist.cc:85
#, c-format
msgid "Vendor block %s contains no fingerprint"
msgstr "Sağlayıcı bloğu %s parmak izi içermiyor"
-#: apt-pkg/acquire.cc:126 apt-pkg/acquire.cc:146 apt-pkg/cdrom.cc:832
+#: apt-pkg/acquire.cc:87 apt-pkg/cdrom.cc:829
#, c-format
msgid "List directory %spartial is missing."
msgstr "Liste dizini %spartial bulunamadı."
-#: apt-pkg/acquire.cc:129 apt-pkg/acquire.cc:151
+#: apt-pkg/acquire.cc:91
#, c-format
msgid "Archives directory %spartial is missing."
msgstr "Arşiv dizini %spartial bulunamadı."
-#: apt-pkg/acquire.cc:162
+#: apt-pkg/acquire.cc:99
#, c-format
msgid "Unable to lock directory %s"
msgstr "%s dizini kilitlenemiyor"
#. only show the ETA if it makes sense
#. two days
-#: apt-pkg/acquire.cc:981
+#: apt-pkg/acquire.cc:902
#, c-format
msgid "Retrieving file %li of %li (%s remaining)"
msgstr "Alınan dosya: %li / %li (%s kaldı)"
-#: apt-pkg/acquire.cc:983
+#: apt-pkg/acquire.cc:904
#, c-format
msgid "Retrieving file %li of %li"
msgstr "Alınan dosya: %li / %li"
@@ -2830,7 +2536,7 @@ msgstr "İğne türü %s anlaşılamadı"
msgid "No priority (or zero) specified for pin"
msgstr "İğne için öncelik belirlenmedi (ya da sıfır)"
-#: apt-pkg/packagemanager.cc:304 apt-pkg/packagemanager.cc:984
+#: apt-pkg/packagemanager.cc:303 apt-pkg/packagemanager.cc:957
#, c-format
msgid ""
"Could not perform immediate configuration on '%s'. Please see man 5 apt.conf "
@@ -2839,12 +2545,12 @@ msgstr ""
"\"%s\" paketinin anında yapılandırması başarısız oldu. Ayrıntılar için apt."
"conf(5) rehber sayfasının APT::Immediate-Configure kısmına bakın. (%d)"
-#: apt-pkg/packagemanager.cc:563 apt-pkg/packagemanager.cc:593
+#: apt-pkg/packagemanager.cc:550 apt-pkg/packagemanager.cc:580
#, c-format
msgid "Could not configure '%s'. "
msgstr "'%s' paketi yapılandırılamadı. "
-#: apt-pkg/packagemanager.cc:643
+#: apt-pkg/packagemanager.cc:630
#, c-format
msgid ""
"This installation run will require temporarily removing the essential "
@@ -2933,11 +2639,11 @@ msgstr ""
msgid "Copying package lists..."
msgstr "Paket listeleri kopyalanıyor..."
-#: apt-pkg/cdrom.cc:866
+#: apt-pkg/cdrom.cc:863
msgid "Writing new source list\n"
msgstr "Yeni kaynak listesi yazılıyor\n"
-#: apt-pkg/cdrom.cc:877
+#: apt-pkg/cdrom.cc:874
msgid "Source list entries for this disc are:\n"
msgstr "Bu disk için olan kaynak listesi girdileri:\n"
@@ -2949,7 +2655,7 @@ msgstr ""
"%s paketinin tekrar kurulması gerekli, ancak gereken arşiv dosyası "
"bulunamıyor."
-#: apt-pkg/algorithms.cc:1090
+#: apt-pkg/algorithms.cc:1086
msgid ""
"Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
"held packages."
@@ -2957,7 +2663,7 @@ msgstr ""
"Hata, pkgProblemResolver::Resolve bozuk paketlere yol açtı, bu sorunun "
"nedeni tutulan paketler olabilir."
-#: apt-pkg/algorithms.cc:1092
+#: apt-pkg/algorithms.cc:1088
msgid "Unable to correct problems, you have held broken packages."
msgstr "Sorunlar giderilemedi, tutulan bozuk paketleriniz var."
@@ -2977,167 +2683,172 @@ msgstr "Bağımlılık oluşturma"
msgid "Reading state information"
msgstr "Durum bilgisi okunuyor"
-#: apt-pkg/depcache.cc:252
+#: apt-pkg/depcache.cc:250
#, c-format
msgid "Failed to open StateFile %s"
msgstr "Durum dosyası (StateFile) %s açılamadı"
-#: apt-pkg/depcache.cc:258
+#: apt-pkg/depcache.cc:256
#, c-format
msgid "Failed to write temporary StateFile %s"
msgstr "Geçici durum dosyasına (%s) yazma başarısız oldu"
-#: apt-pkg/tagfile.cc:186 apt-pkg/tagfile.cc:286 apt-pkg/deb/debrecords.cc:207
+#: apt-pkg/tagfile.cc:140
+#, c-format
+msgid "Unable to parse package file %s (1)"
+msgstr "Paket dosyası %s ayrıştırılamadı (1)"
+
+#: apt-pkg/tagfile.cc:237
#, c-format
-msgid "Unable to parse package file %s (%d)"
-msgstr "Paket dosyası %s ayrıştırılamadı (%d)"
+msgid "Unable to parse package file %s (2)"
+msgstr "Paket dosyası %s ayrıştırılamadı (2)"
-#: apt-pkg/cacheset.cc:501
+#: apt-pkg/cacheset.cc:489
#, c-format
msgid "Release '%s' for '%s' was not found"
msgstr "'%2$s' paketinin '%1$s' sürümü bulunamadı"
-#: apt-pkg/cacheset.cc:504
+#: apt-pkg/cacheset.cc:492
#, c-format
msgid "Version '%s' for '%s' was not found"
msgstr "'%2$s' paketinin '%1$s' sürümü bulunamadı"
-#: apt-pkg/cacheset.cc:629
+#: apt-pkg/cacheset.cc:603
#, c-format
msgid "Couldn't find task '%s'"
msgstr "'%s' görevi bulunamadı"
-#: apt-pkg/cacheset.cc:635
+#: apt-pkg/cacheset.cc:609
#, c-format
msgid "Couldn't find any package by regex '%s'"
msgstr "'%s' düzenli ifadesini içeren herhangi bir paket bulunamadı"
-#: apt-pkg/cacheset.cc:641
+#: apt-pkg/cacheset.cc:615
#, c-format
msgid "Couldn't find any package by glob '%s'"
msgstr "'%s' ifadesine eşleşen herhangi bir paket bulunamadı"
-#: apt-pkg/cacheset.cc:680
+#: apt-pkg/cacheset.cc:626
#, c-format
msgid "Can't select versions from package '%s' as it is purely virtual"
msgstr "'%s' paketi tamamen sanal olduğu için sürümü seçilemiyor"
-#: apt-pkg/cacheset.cc:719
+#: apt-pkg/cacheset.cc:633 apt-pkg/cacheset.cc:640
+#, c-format
+msgid ""
+"Can't select installed nor candidate version from package '%s' as it has "
+"neither of them"
+msgstr ""
+"'%s' paketi kurulu olmadığı ve aday sürüme sahip olmadığı için her ikisi de "
+"seçilemiyor"
+
+#: apt-pkg/cacheset.cc:647
#, c-format
msgid "Can't select newest version from package '%s' as it is purely virtual"
msgstr "'%s' paketi sanal olduğu için en yeni sürümü seçilemiyor"
-#: apt-pkg/cacheset.cc:727
+#: apt-pkg/cacheset.cc:655
#, c-format
msgid "Can't select candidate version from package %s as it has no candidate"
msgstr "'%s' paketinin aday sürümü olmadığı için aday sürüm seçilemiyor"
-#: apt-pkg/cacheset.cc:735
+#: apt-pkg/cacheset.cc:663
#, c-format
msgid "Can't select installed version from package %s as it is not installed"
msgstr "'%s' paketi kurulu olmadığı için kurulu sürüm seçilemiyor"
-#: apt-pkg/cacheset.cc:743 apt-pkg/cacheset.cc:751
-#, c-format
-msgid ""
-"Can't select installed nor candidate version from package '%s' as it has "
-"neither of them"
-msgstr ""
-"'%s' paketi kurulu olmadığı ve aday sürüme sahip olmadığı için her ikisi de "
-"seçilemiyor"
-
-#: apt-pkg/indexrecords.cc:83
+#: apt-pkg/indexrecords.cc:78
#, c-format
msgid "Unable to parse Release file %s"
msgstr "'Release' dosyası (%s) ayrıştırılamadı"
-#: apt-pkg/indexrecords.cc:91
+#: apt-pkg/indexrecords.cc:86
#, c-format
msgid "No sections in Release file %s"
msgstr "'Release' dosyası %s içinde hiç bölüm yok"
-#: apt-pkg/indexrecords.cc:132
+#: apt-pkg/indexrecords.cc:117
#, c-format
msgid "No Hash entry in Release file %s"
msgstr "'Release' dosyasında (%s) sağlama girdisi yok"
-#: apt-pkg/indexrecords.cc:145
+#: apt-pkg/indexrecords.cc:130
#, c-format
msgid "Invalid 'Valid-Until' entry in Release file %s"
msgstr "'Release' dosyasında (%s) geçersiz 'Valid-Until' girdisi"
-#: apt-pkg/indexrecords.cc:164
+#: apt-pkg/indexrecords.cc:149
#, c-format
msgid "Invalid 'Date' entry in Release file %s"
msgstr "'Release' dosyasında (%s) geçersiz 'Date' girdisi"
#. d means days, h means hours, min means minutes, s means seconds
-#: apt-pkg/contrib/strutl.cc:425
+#: apt-pkg/contrib/strutl.cc:418
#, c-format
msgid "%lid %lih %limin %lis"
msgstr "%li gün %li saat %li dk. %li sn."
#. h means hours, min means minutes, s means seconds
-#: apt-pkg/contrib/strutl.cc:432
+#: apt-pkg/contrib/strutl.cc:425
#, c-format
msgid "%lih %limin %lis"
msgstr "%li saat %li dk. %li sn."
#. min means minutes, s means seconds
-#: apt-pkg/contrib/strutl.cc:439
+#: apt-pkg/contrib/strutl.cc:432
#, c-format
msgid "%limin %lis"
msgstr "%li dk. %li sn."
#. s means seconds
-#: apt-pkg/contrib/strutl.cc:444
+#: apt-pkg/contrib/strutl.cc:437
#, c-format
msgid "%lis"
msgstr "%li sn."
-#: apt-pkg/contrib/strutl.cc:1290
+#: apt-pkg/contrib/strutl.cc:1258
#, c-format
msgid "Selection %s not found"
msgstr "%s seçimi bulunamadı"
-#: apt-pkg/contrib/fileutl.cc:196
+#: apt-pkg/contrib/fileutl.cc:190
#, c-format
msgid "Not using locking for read only lock file %s"
msgstr "Kilitleme dosyası %s salt okunur olduğu için kilitleme kullanılmıyor"
-#: apt-pkg/contrib/fileutl.cc:201
+#: apt-pkg/contrib/fileutl.cc:195
#, c-format
msgid "Could not open lock file %s"
msgstr "Kilit dosyası %s açılamadı"
-#: apt-pkg/contrib/fileutl.cc:224
+#: apt-pkg/contrib/fileutl.cc:218
#, c-format
msgid "Not using locking for nfs mounted lock file %s"
msgstr "nfs ile bağlanmış kilit dosyası %s için kilitleme kullanılmıyor"
-#: apt-pkg/contrib/fileutl.cc:229
+#: apt-pkg/contrib/fileutl.cc:223
#, c-format
msgid "Could not get lock %s"
msgstr "%s kilidi alınamadı"
-#: apt-pkg/contrib/fileutl.cc:366 apt-pkg/contrib/fileutl.cc:480
+#: apt-pkg/contrib/fileutl.cc:360 apt-pkg/contrib/fileutl.cc:474
#, c-format
msgid "List of files can't be created as '%s' is not a directory"
msgstr "'%s' dizin olmadığı için dosya listeli oluşturulamıyor"
-#: apt-pkg/contrib/fileutl.cc:400
+#: apt-pkg/contrib/fileutl.cc:394
#, c-format
msgid "Ignoring '%s' in directory '%s' as it is not a regular file"
msgstr ""
"'%2$s' dizinindeki '%1$s' normal bir dosya olmadığı için görmezden geliniyor"
-#: apt-pkg/contrib/fileutl.cc:418
+#: apt-pkg/contrib/fileutl.cc:412
#, c-format
msgid "Ignoring file '%s' in directory '%s' as it has no filename extension"
msgstr ""
"'%2$s' dizinindeki '%1$s' dosyası uzantısı olmadığı için görmezden geliniyor"
-#: apt-pkg/contrib/fileutl.cc:427
+#: apt-pkg/contrib/fileutl.cc:421
#, c-format
msgid ""
"Ignoring file '%s' in directory '%s' as it has an invalid filename extension"
@@ -3145,75 +2856,75 @@ msgstr ""
"'%2$s' dizinindeki '%1$s' dosyası geçersiz bir dosya uzantısı olduğu için "
"yok sayılıyor"
-#: apt-pkg/contrib/fileutl.cc:846
+#: apt-pkg/contrib/fileutl.cc:824
#, c-format
msgid "Sub-process %s received a segmentation fault."
msgstr "%s altsüreci bir bölümleme hatası aldı (segmentation fault)."
-#: apt-pkg/contrib/fileutl.cc:848
+#: apt-pkg/contrib/fileutl.cc:826
#, c-format
msgid "Sub-process %s received signal %u."
msgstr "%s altsüreci %u sinyali aldı."
-#: apt-pkg/contrib/fileutl.cc:852 apt-pkg/contrib/gpgv.cc:212
+#: apt-pkg/contrib/fileutl.cc:830 apt-pkg/contrib/gpgv.cc:239
#, c-format
msgid "Sub-process %s returned an error code (%u)"
msgstr "%s altsüreci bir hata kodu gönderdi (%u)"
-#: apt-pkg/contrib/fileutl.cc:854 apt-pkg/contrib/gpgv.cc:205
+#: apt-pkg/contrib/fileutl.cc:832 apt-pkg/contrib/gpgv.cc:232
#, c-format
msgid "Sub-process %s exited unexpectedly"
msgstr "%s altsüreci beklenmeyen bir şekilde sona erdi"
-#: apt-pkg/contrib/fileutl.cc:952
+#: apt-pkg/contrib/fileutl.cc:913
#, c-format
msgid "Problem closing the gzip file %s"
msgstr "Gzip dosyası %s kapatılamadı"
-#: apt-pkg/contrib/fileutl.cc:1140
+#: apt-pkg/contrib/fileutl.cc:1101
#, c-format
msgid "Could not open file %s"
msgstr "%s dosyası açılamadı"
-#: apt-pkg/contrib/fileutl.cc:1199 apt-pkg/contrib/fileutl.cc:1246
+#: apt-pkg/contrib/fileutl.cc:1160 apt-pkg/contrib/fileutl.cc:1207
#, c-format
msgid "Could not open file descriptor %d"
msgstr "Dosya tanımlayıcı %d açılamadı"
-#: apt-pkg/contrib/fileutl.cc:1354 apt-pkg/contrib/fileutl.cc:2123
+#: apt-pkg/contrib/fileutl.cc:1315
msgid "Failed to create subprocess IPC"
msgstr "Altsüreç IPC'si oluşturulamadı"
-#: apt-pkg/contrib/fileutl.cc:1412
+#: apt-pkg/contrib/fileutl.cc:1373
msgid "Failed to exec compressor "
msgstr "Sıkıştırma programı çalıştırılamadı "
-#: apt-pkg/contrib/fileutl.cc:1553
+#: apt-pkg/contrib/fileutl.cc:1514
#, c-format
msgid "read, still have %llu to read but none left"
msgstr "read, %llu bayt okunması gerekli ama hiç kalmamış"
-#: apt-pkg/contrib/fileutl.cc:1666 apt-pkg/contrib/fileutl.cc:1688
+#: apt-pkg/contrib/fileutl.cc:1627 apt-pkg/contrib/fileutl.cc:1649
#, c-format
msgid "write, still have %llu to write but couldn't"
msgstr "write, yazılması gereken %llu bayt yazılamıyor"
-#: apt-pkg/contrib/fileutl.cc:1954
+#: apt-pkg/contrib/fileutl.cc:1915
#, c-format
msgid "Problem closing the file %s"
msgstr "%s dosyası kapatılamadı"
-#: apt-pkg/contrib/fileutl.cc:1965
+#: apt-pkg/contrib/fileutl.cc:1927
#, c-format
msgid "Problem renaming the file %s to %s"
msgstr "%s dosyası %s olarak yeniden adlandırılamadı"
-#: apt-pkg/contrib/fileutl.cc:1976
+#: apt-pkg/contrib/fileutl.cc:1938
#, c-format
msgid "Problem unlinking the file %s"
msgstr "%s dosyasından bağ kaldırma sorunu"
-#: apt-pkg/contrib/fileutl.cc:1989
+#: apt-pkg/contrib/fileutl.cc:1951
msgid "Problem syncing the file"
msgstr "Dosya eşitlenirken sorun çıktı"
@@ -3301,108 +3012,114 @@ msgstr "Bağlama noktasının (%s) durum bilgisi alınamadı"
msgid "Failed to stat the cdrom"
msgstr "Cdrom durum bilgisi alınamadı"
-#: apt-pkg/contrib/configuration.cc:522
+#: apt-pkg/contrib/configuration.cc:519
#, c-format
msgid "Unrecognized type abbreviation: '%c'"
msgstr "Tanınamayan tür kısaltması: '%c'"
-#: apt-pkg/contrib/configuration.cc:636
+#: apt-pkg/contrib/configuration.cc:633
#, c-format
msgid "Opening configuration file %s"
msgstr "Yapılandırma dosyası (%s) açılıyor"
-#: apt-pkg/contrib/configuration.cc:804
+#: apt-pkg/contrib/configuration.cc:801
#, c-format
msgid "Syntax error %s:%u: Block starts with no name."
msgstr "Sözdizimi hatası %s:%u: Blok ad olmadan başlıyor."
-#: apt-pkg/contrib/configuration.cc:823
+#: apt-pkg/contrib/configuration.cc:820
#, c-format
msgid "Syntax error %s:%u: Malformed tag"
msgstr "Sözdizimi hatası %s:%u: Kötü biçimlendirilmiş etiket"
-#: apt-pkg/contrib/configuration.cc:840
+#: apt-pkg/contrib/configuration.cc:837
#, c-format
msgid "Syntax error %s:%u: Extra junk after value"
msgstr "Sözdizimi hatası %s:%u: Değerden sonra ilave gereksiz"
-#: apt-pkg/contrib/configuration.cc:880
+#: apt-pkg/contrib/configuration.cc:877
#, c-format
msgid "Syntax error %s:%u: Directives can only be done at the top level"
msgstr "Sözdizimi hatası %s:%u: Yönergeler sadece en üst düzeyde bitebilir"
-#: apt-pkg/contrib/configuration.cc:887
+#: apt-pkg/contrib/configuration.cc:884
#, c-format
msgid "Syntax error %s:%u: Too many nested includes"
msgstr "Sözdizimi hatası %s:%u: Çok fazla yuvalanmış 'include'"
-#: apt-pkg/contrib/configuration.cc:891 apt-pkg/contrib/configuration.cc:896
+#: apt-pkg/contrib/configuration.cc:888 apt-pkg/contrib/configuration.cc:893
#, c-format
msgid "Syntax error %s:%u: Included from here"
msgstr "Sözdizimi hatası %s:%u: Buradan 'include' edilmiş"
-#: apt-pkg/contrib/configuration.cc:900
+#: apt-pkg/contrib/configuration.cc:897
#, c-format
msgid "Syntax error %s:%u: Unsupported directive '%s'"
msgstr "Sözdizimi hatası %s:%u: Desteklenmeyen yönerge '%s'"
-#: apt-pkg/contrib/configuration.cc:903
+#: apt-pkg/contrib/configuration.cc:900
#, c-format
msgid "Syntax error %s:%u: clear directive requires an option tree as argument"
msgstr ""
"Sözdizimi hatası %s:%u: clear yönergesi bir seçenek ağacı argümanını "
"gerektirir"
-#: apt-pkg/contrib/configuration.cc:953
+#: apt-pkg/contrib/configuration.cc:950
#, c-format
msgid "Syntax error %s:%u: Extra junk at end of file"
msgstr "Sözdizimi hatası %s:%u: Dosya sonunda ilave gereksiz"
-#: apt-pkg/contrib/cmndline.cc:127
+#. TRANSLATOR: %s is the trusted keyring parts directory
+#: apt-pkg/contrib/gpgv.cc:72
+#, c-format
+msgid "No keyring installed in %s."
+msgstr "%s dizininde kurulu bir anahtar yok."
+
+#: apt-pkg/contrib/cmndline.cc:124
#, c-format
msgid "Command line option '%c' [from %s] is not known."
msgstr "Komut satırı seçeneği '%c' [%s içinden] tanınmıyor."
-#: apt-pkg/contrib/cmndline.cc:152 apt-pkg/contrib/cmndline.cc:161
-#: apt-pkg/contrib/cmndline.cc:169
+#: apt-pkg/contrib/cmndline.cc:149 apt-pkg/contrib/cmndline.cc:158
+#: apt-pkg/contrib/cmndline.cc:166
#, c-format
msgid "Command line option %s is not understood"
msgstr "Komut satırı seçeneği %s anlaşılamadı"
-#: apt-pkg/contrib/cmndline.cc:174
+#: apt-pkg/contrib/cmndline.cc:171
#, c-format
msgid "Command line option %s is not boolean"
msgstr "Komut satırı seçeneği %s mantıksal değer değil"
-#: apt-pkg/contrib/cmndline.cc:215 apt-pkg/contrib/cmndline.cc:236
+#: apt-pkg/contrib/cmndline.cc:212 apt-pkg/contrib/cmndline.cc:233
#, c-format
msgid "Option %s requires an argument."
msgstr "%s seçeneği bir argüman kullanımını gerektirir."
-#: apt-pkg/contrib/cmndline.cc:249 apt-pkg/contrib/cmndline.cc:255
+#: apt-pkg/contrib/cmndline.cc:246 apt-pkg/contrib/cmndline.cc:252
#, c-format
msgid "Option %s: Configuration item specification must have an =<val>."
msgstr ""
"%s seçeneği: Yapılandırma öğesi tanımlaması =<değer> şeklinde değer "
"içermelidir."
-#: apt-pkg/contrib/cmndline.cc:284
+#: apt-pkg/contrib/cmndline.cc:281
#, c-format
msgid "Option %s requires an integer argument, not '%s'"
msgstr ""
"%s seçeneği bir tam sayı argümanının kullanımını gerektirir, '%s' değil"
-#: apt-pkg/contrib/cmndline.cc:315
+#: apt-pkg/contrib/cmndline.cc:312
#, c-format
msgid "Option '%s' is too long"
msgstr "'%s' seçeneği çok uzun"
-#: apt-pkg/contrib/cmndline.cc:347
+#: apt-pkg/contrib/cmndline.cc:344
#, c-format
msgid "Sense %s is not understood, try true or false."
msgstr "%s algılaması anlaşılamadı, true (doğru) ya da false (yanlış) deneyin."
-#: apt-pkg/contrib/cmndline.cc:397
+#: apt-pkg/contrib/cmndline.cc:394
#, c-format
msgid "Invalid operation %s"
msgstr "Geçersiz işlem: %s"
@@ -3412,12 +3129,12 @@ msgstr "Geçersiz işlem: %s"
msgid "Installing %s"
msgstr "%s kuruluyor"
-#: apt-pkg/deb/dpkgpm.cc:113 apt-pkg/deb/dpkgpm.cc:1008
+#: apt-pkg/deb/dpkgpm.cc:113 apt-pkg/deb/dpkgpm.cc:1016
#, c-format
msgid "Configuring %s"
msgstr "%s yapılandırılıyor"
-#: apt-pkg/deb/dpkgpm.cc:114 apt-pkg/deb/dpkgpm.cc:1015
+#: apt-pkg/deb/dpkgpm.cc:114 apt-pkg/deb/dpkgpm.cc:1023
#, c-format
msgid "Removing %s"
msgstr "%s kaldırılıyor"
@@ -3438,80 +3155,80 @@ msgid "Running post-installation trigger %s"
msgstr "Kurulum sonrası tetikleyicisi %s çalıştırılıyor"
#. FIXME: use a better string after freeze
-#: apt-pkg/deb/dpkgpm.cc:839
+#: apt-pkg/deb/dpkgpm.cc:847
#, c-format
msgid "Directory '%s' missing"
msgstr "'%s' dizini bulunamadı"
-#: apt-pkg/deb/dpkgpm.cc:854 apt-pkg/deb/dpkgpm.cc:876
+#: apt-pkg/deb/dpkgpm.cc:862 apt-pkg/deb/dpkgpm.cc:884
#, c-format
msgid "Could not open file '%s'"
msgstr "'%s' dosyası açılamadı"
-#: apt-pkg/deb/dpkgpm.cc:1001
+#: apt-pkg/deb/dpkgpm.cc:1009
#, c-format
msgid "Preparing %s"
msgstr "%s hazırlanıyor"
-#: apt-pkg/deb/dpkgpm.cc:1002
+#: apt-pkg/deb/dpkgpm.cc:1010
#, c-format
msgid "Unpacking %s"
msgstr "%s paketi açılıyor"
-#: apt-pkg/deb/dpkgpm.cc:1007
+#: apt-pkg/deb/dpkgpm.cc:1015
#, c-format
msgid "Preparing to configure %s"
msgstr "%s paketini yapılandırmaya hazırlanılıyor"
-#: apt-pkg/deb/dpkgpm.cc:1009
+#: apt-pkg/deb/dpkgpm.cc:1017
#, c-format
msgid "Installed %s"
msgstr "%s kuruldu"
-#: apt-pkg/deb/dpkgpm.cc:1014
+#: apt-pkg/deb/dpkgpm.cc:1022
#, c-format
msgid "Preparing for removal of %s"
msgstr "%s paketinin kaldırılmasına hazırlanılıyor"
-#: apt-pkg/deb/dpkgpm.cc:1016
+#: apt-pkg/deb/dpkgpm.cc:1024
#, c-format
msgid "Removed %s"
msgstr "%s kaldırıldı"
-#: apt-pkg/deb/dpkgpm.cc:1021
+#: apt-pkg/deb/dpkgpm.cc:1029
#, c-format
msgid "Preparing to completely remove %s"
msgstr "%s paketinin tamamen kaldırılmasına hazırlanılıyor"
-#: apt-pkg/deb/dpkgpm.cc:1022
+#: apt-pkg/deb/dpkgpm.cc:1030
#, c-format
msgid "Completely removed %s"
msgstr "%s tamamen kaldırıldı"
-#: apt-pkg/deb/dpkgpm.cc:1081 apt-pkg/deb/dpkgpm.cc:1169
+#: apt-pkg/deb/dpkgpm.cc:1091 apt-pkg/deb/dpkgpm.cc:1179
#, c-format
msgid "Can not write log (%s)"
msgstr "Günlük dosyasına yazılamıyor (%s)"
-#: apt-pkg/deb/dpkgpm.cc:1081 apt-pkg/deb/dpkgpm.cc:1169
+#: apt-pkg/deb/dpkgpm.cc:1091 apt-pkg/deb/dpkgpm.cc:1179
msgid "Is /dev/pts mounted?"
msgstr "/dev/pts bağlı mı?"
-#: apt-pkg/deb/dpkgpm.cc:1656
+#: apt-pkg/deb/dpkgpm.cc:1670
msgid "Operation was interrupted before it could finish"
msgstr "İşlem yarıda kesildi"
-#: apt-pkg/deb/dpkgpm.cc:1718
+#: apt-pkg/deb/dpkgpm.cc:1732
msgid "No apport report written because MaxReports is reached already"
msgstr ""
"En fazla rapor miktarına (MaxReports) ulaşıldığı için apport raporu yazılmadı"
#. check if its not a follow up error
-#: apt-pkg/deb/dpkgpm.cc:1723
+#: apt-pkg/deb/dpkgpm.cc:1737
msgid "dependency problems - leaving unconfigured"
msgstr "bağımlılık sorunları - yapılandırılmamış durumda bırakılıyor"
-#: apt-pkg/deb/dpkgpm.cc:1725
+#: apt-pkg/deb/dpkgpm.cc:1739
msgid ""
"No apport report written because the error message indicates its a followup "
"error from a previous failure."
@@ -3519,14 +3236,14 @@ msgstr ""
"Apport raporu yazılmadı çünkü hata iletisi bu durumun bir önceki hatadan "
"kaynaklanan bir hata olduğunu belirtiyor."
-#: apt-pkg/deb/dpkgpm.cc:1731
+#: apt-pkg/deb/dpkgpm.cc:1745
msgid ""
"No apport report written because the error message indicates a disk full "
"error"
msgstr ""
"Hata iletisi diskin dolu olduğunu belirttiği için apport raporu yazılamadı"
-#: apt-pkg/deb/dpkgpm.cc:1738
+#: apt-pkg/deb/dpkgpm.cc:1752
msgid ""
"No apport report written because the error message indicates a out of memory "
"error"
@@ -3534,7 +3251,7 @@ msgstr ""
"Hata iletisi bir bellek yetersizliği hatasına işaret ettiği için apport "
"raporu yazılamadı"
-#: apt-pkg/deb/dpkgpm.cc:1745 apt-pkg/deb/dpkgpm.cc:1751
+#: apt-pkg/deb/dpkgpm.cc:1759 apt-pkg/deb/dpkgpm.cc:1765
msgid ""
"No apport report written because the error message indicates an issue on the "
"local system"
@@ -3542,7 +3259,7 @@ msgstr ""
"Hata iletisi yerel bir sistem hatasına işaret ettiği için apport raporu "
"yazılamadı"
-#: apt-pkg/deb/dpkgpm.cc:1773
+#: apt-pkg/deb/dpkgpm.cc:1787
msgid ""
"No apport report written because the error message indicates a dpkg I/O error"
msgstr ""
@@ -3576,171 +3293,404 @@ msgstr ""
msgid "Not locked"
msgstr "Kilitlenmemiş"
-#: apt-inst/filelist.cc:380
-msgid "DropNode called on still linked node"
-msgstr "DropNode hâlâ bağlı olan düğüm üzerinde çağrıldı"
+#: cmdline/apt-extracttemplates.cc:224
+msgid ""
+"Usage: apt-extracttemplates file1 [file2 ...]\n"
+"\n"
+"apt-extracttemplates is a tool to extract config and template info\n"
+"from debian packages\n"
+"\n"
+"Options:\n"
+" -h This help text\n"
+" -t Set the temp dir\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
+msgstr ""
+"Kullanım: apt-extracttemplates dosya1 [dosya2 ...]\n"
+"\n"
+"apt-extracttemplates, Debian paketlerinden ayar ve şablon bilgisini\n"
+"almak için kullanılan bir araçtır\n"
+"\n"
+"Seçenekler:\n"
+" -h Bu yardım dosyası\n"
+" -t Geçici dizini ayarlar\n"
+" -c=? Belirtilen ayar dosyasını kullanır\n"
+" -o=? Ayar seçeneği belirtmeyi sağlar, ör -o dir::cache=/tmp\n"
-#: apt-inst/filelist.cc:412
-msgid "Failed to locate the hash element!"
-msgstr "Sağlama elementi bulunamadı!"
+#: cmdline/apt-extracttemplates.cc:254
+#, c-format
+msgid "Unable to mkstemp %s"
+msgstr "mkstemp %s başarısız oldu"
-#: apt-inst/filelist.cc:459
-msgid "Failed to allocate diversion"
-msgstr "Yönlendirme tahsisi başarısız oldu"
+#: cmdline/apt-extracttemplates.cc:300
+msgid "Cannot get debconf version. Is debconf installed?"
+msgstr "debconf sürümü alınamıyor. debconf kurulu mu?"
-#: apt-inst/filelist.cc:464
-msgid "Internal error in AddDiversion"
-msgstr "AddDiversion'da iç hata"
+#: ftparchive/apt-ftparchive.cc:187 ftparchive/apt-ftparchive.cc:371
+msgid "Package extension list is too long"
+msgstr "Paket uzantı listesi çok uzun"
-#: apt-inst/filelist.cc:477
+#: ftparchive/apt-ftparchive.cc:189 ftparchive/apt-ftparchive.cc:206
+#: ftparchive/apt-ftparchive.cc:229 ftparchive/apt-ftparchive.cc:283
+#: ftparchive/apt-ftparchive.cc:297 ftparchive/apt-ftparchive.cc:319
#, c-format
-msgid "Trying to overwrite a diversion, %s -> %s and %s/%s"
-msgstr "Bir yönlendirmenin üzerine yazılmaya çalışılıyor, %s -> %s ve %s/%s"
+msgid "Error processing directory %s"
+msgstr "%s dizinini işlemede hata"
-#: apt-inst/filelist.cc:506
+#: ftparchive/apt-ftparchive.cc:281
+msgid "Source extension list is too long"
+msgstr "Kaynak uzantı listesi çok uzun"
+
+#: ftparchive/apt-ftparchive.cc:401
+msgid "Error writing header to contents file"
+msgstr "İçindekiler dosyasına başlık yazmada hata"
+
+#: ftparchive/apt-ftparchive.cc:431
#, c-format
-msgid "Double add of diversion %s -> %s"
-msgstr "Aynı dosya iki kez yönlendirilemez: %s -> %s"
+msgid "Error processing contents %s"
+msgstr "%s içeriğini işlemede hata"
-#: apt-inst/filelist.cc:549
+#: ftparchive/apt-ftparchive.cc:626
+msgid ""
+"Usage: apt-ftparchive [options] command\n"
+"Commands: packages binarypath [overridefile [pathprefix]]\n"
+" sources srcpath [overridefile [pathprefix]]\n"
+" contents path\n"
+" release path\n"
+" generate config [groups]\n"
+" clean config\n"
+"\n"
+"apt-ftparchive generates index files for Debian archives. It supports\n"
+"many styles of generation from fully automated to functional replacements\n"
+"for dpkg-scanpackages and dpkg-scansources\n"
+"\n"
+"apt-ftparchive generates Package files from a tree of .debs. The\n"
+"Package file contains the contents of all the control fields from\n"
+"each package as well as the MD5 hash and filesize. An override file\n"
+"is supported to force the value of Priority and Section.\n"
+"\n"
+"Similarly apt-ftparchive generates Sources files from a tree of .dscs.\n"
+"The --source-override option can be used to specify a src override file\n"
+"\n"
+"The 'packages' and 'sources' command should be run in the root of the\n"
+"tree. BinaryPath should point to the base of the recursive search and \n"
+"override file should contain the override flags. Pathprefix is\n"
+"appended to the filename fields if present. Example usage from the \n"
+"Debian archive:\n"
+" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
+" dists/potato/main/binary-i386/Packages\n"
+"\n"
+"Options:\n"
+" -h This help text\n"
+" --md5 Control MD5 generation\n"
+" -s=? Source override file\n"
+" -q Quiet\n"
+" -d=? Select the optional caching database\n"
+" --no-delink Enable delinking debug mode\n"
+" --contents Control contents file generation\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option"
+msgstr ""
+"Kullanım: apt-ftparchive [seçenekler] komut\n"
+"Komutlar: packages ikilikonumu [geçersizkılmadosyası [konumöneki]]\n"
+" sources kaynakkonumu [geçersizkılmadosyası [konumöneki]]\n"
+" contents konum\n"
+" release konum\n"
+" generate yapılandırma [gruplar]\n"
+" clean yapılandırma\n"
+"\n"
+"apt-ftparchive Debian arşivleri için indeks dosyaları üretir. \n"
+"dpkg-scanpackages ve dpkg-scansources için tamamen otomatikten\n"
+"işlevsel yedeklere kadar birçok üretim çeşidini destekler.\n"
+"\n"
+"apt-ftparchive, .deb dizinlerinden 'Package' dosyaları üretir. 'Package'\n"
+"dosyası, her paketin MD5 doğrulama ve dosya büyüklüğü gibi denetim\n"
+"alanlarının bilgilerini içerir. Öncelik (Priority) ve bölüm (Section)\n"
+"değerlerini istenen başka değerlerle değiştirebilmek için bir geçersiz\n"
+"kılma dosyası kullanılabilir.\n"
+"\n"
+"Benzer şekilde, apt-ftparchive, .dscs dosyalarından 'Sources' dosyaları\n"
+"üretir. '--source-override' seçeneği bir src geçersiz kılma dosyası\n"
+"belirtmek için kullanıabilir.\n"
+"\n"
+"'packages' ve 'sources' komutları dizin ağacının kökünde çalıştırıl-\n"
+"malıdır. BinaryPath özyineli aramanın temeline işaret etmeli ve\n"
+"geçersiz kılma dosyası geçersiz kılma bayraklarını içermelidir.\n"
+"Pathprefix mevcutsa dosya adı alanlarının sonuna eklenir. Debian\n"
+"arşivinden örnek kullanım şu şekildedir:\n"
+"\n"
+" apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
+" dists/potato/main/binary-i386/Packages\n"
+"\n"
+"Seçenekler:\n"
+" -h Bu yardım metni\n"
+" --md5 MD5 üretimini denetle\n"
+" -s=? Kaynak geçersiz kılma dosyası\n"
+" -q Sessiz\n"
+" -d=? Seçimlik önbellek veritabanını seç\n"
+" --no-delink Bağ kurulmamış hata ayıklama kipini etkinleştir\n"
+" --contents İçerik dosyası üretimini denetle\n"
+" -c=? Belirtilen yapılandırma dosyası kullan\n"
+" -o=? Yapılandırma seçeneği ayarla"
+
+#: ftparchive/apt-ftparchive.cc:822
+msgid "No selections matched"
+msgstr "Hiçbir seçim eşleşmedi"
+
+#: ftparchive/apt-ftparchive.cc:907
#, c-format
-msgid "Duplicate conf file %s/%s"
-msgstr "%s/%s yapılandırma dosyası zaten mevcut"
+msgid "Some files are missing in the package file group `%s'"
+msgstr "'%s' paket dosyası grubunda bazı dosyalar eksik"
-#: apt-inst/extract.cc:101 apt-inst/extract.cc:172
+#: ftparchive/cachedb.cc:65
#, c-format
-msgid "The path %s is too long"
-msgstr "%s yolu çok uzun"
+msgid "DB was corrupted, file renamed to %s.old"
+msgstr "Veritabanı bozuk, dosya adı %s.old olarak değiştirildi"
-#: apt-inst/extract.cc:132
+#: ftparchive/cachedb.cc:83
#, c-format
-msgid "Unpacking %s more than once"
-msgstr "%s paketi bir çok kez açıldı"
+msgid "DB is old, attempting to upgrade %s"
+msgstr "Veritabanı eski, %s yükseltilmeye çalışılıyor"
-#: apt-inst/extract.cc:142
+#: ftparchive/cachedb.cc:94
+msgid ""
+"DB format is invalid. If you upgraded from an older version of apt, please "
+"remove and re-create the database."
+msgstr ""
+"Veritabanı biçimi geçersiz. Eğer apt'ın eski bir sürümünden yükseltme "
+"yaptıysanız, lütfen veritabanını silin ve yeniden oluşturun."
+
+#: ftparchive/cachedb.cc:99
#, c-format
-msgid "The directory %s is diverted"
-msgstr "%s dizini yönlendirilmiş"
+msgid "Unable to open DB file %s: %s"
+msgstr "Veritabanı dosyası %s açılamadı: %s"
-#: apt-inst/extract.cc:152
+#: ftparchive/cachedb.cc:332
+msgid "Failed to read .dsc"
+msgstr ".dsc dosyası okunamadı"
+
+#: ftparchive/cachedb.cc:365
+msgid "Archive has no control record"
+msgstr "Arşivin denetim kaydı yok"
+
+#: ftparchive/cachedb.cc:594
+msgid "Unable to get a cursor"
+msgstr "İmleç alınamıyor"
+
+#: ftparchive/writer.cc:91
#, c-format
-msgid "The package is trying to write to the diversion target %s/%s"
-msgstr "Bu paket yönlendirme hedefine (%s/%s) yazmayı deniyor"
+msgid "W: Unable to read directory %s\n"
+msgstr "U: %s dizini okunamıyor\n"
-#: apt-inst/extract.cc:162 apt-inst/extract.cc:306
-msgid "The diversion path is too long"
-msgstr "Yönlendirme yolu çok uzun"
+#: ftparchive/writer.cc:96
+#, c-format
+msgid "W: Unable to stat %s\n"
+msgstr "U: %s durum bilgisi alınamıyor\n"
-#: apt-inst/extract.cc:249
+#: ftparchive/writer.cc:152
+msgid "E: "
+msgstr "H: "
+
+#: ftparchive/writer.cc:154
+msgid "W: "
+msgstr "U: "
+
+#: ftparchive/writer.cc:161
+msgid "E: Errors apply to file "
+msgstr "H: Hatalar şu dosya için geçerli: "
+
+#: ftparchive/writer.cc:179 ftparchive/writer.cc:211
#, c-format
-msgid "The directory %s is being replaced by a non-directory"
-msgstr "%s dizini dizin olmayan bir öğeyle değiştirildi"
+msgid "Failed to resolve %s"
+msgstr "%s çözümlenemedi"
-#: apt-inst/extract.cc:289
-msgid "Failed to locate node in its hash bucket"
-msgstr "Düğüm sağlama kovasında bulunamadı"
+#: ftparchive/writer.cc:192
+msgid "Tree walking failed"
+msgstr "Ağaçta gezinme başarısız"
-#: apt-inst/extract.cc:293
-msgid "The path is too long"
-msgstr "Yol çok uzun"
+#: ftparchive/writer.cc:219
+#, c-format
+msgid "Failed to open %s"
+msgstr "%s açılamadı"
-#: apt-inst/extract.cc:421
+#: ftparchive/writer.cc:278
#, c-format
-msgid "Overwrite package match with no version for %s"
-msgstr "%s paketinin sürümü yok"
+msgid " DeLink %s [%s]\n"
+msgstr " DeLink %s [%s]\n"
-#: apt-inst/extract.cc:438
+#: ftparchive/writer.cc:286
#, c-format
-msgid "File %s/%s overwrites the one in the package %s"
-msgstr "%s/%s dosyası %s paketindeki aynı adlı dosyanın üzerine yazmak istiyor"
+msgid "Failed to readlink %s"
+msgstr "%s readlink çağrısı başarısız oldu"
-#: apt-inst/extract.cc:498
+#: ftparchive/writer.cc:290
#, c-format
-msgid "Unable to stat %s"
-msgstr "%s durum bilgisi alınamadı"
+msgid "Failed to unlink %s"
+msgstr "%s bağı koparılamadı"
-#: apt-inst/dirstream.cc:42 apt-inst/dirstream.cc:49 apt-inst/dirstream.cc:54
+#: ftparchive/writer.cc:298
#, c-format
-msgid "Failed to write file %s"
-msgstr "%s dosyasına yazılamadı"
+msgid "*** Failed to link %s to %s"
+msgstr "*** %s, %s konumuna bağlanamadı"
-#: apt-inst/dirstream.cc:104
+#: ftparchive/writer.cc:308
#, c-format
-msgid "Failed to close file %s"
-msgstr "%s dosyası kapatılamadı"
+msgid " DeLink limit of %sB hit.\n"
+msgstr " %sB'lik bağ koparma (DeLink) sınırına ulaşıldı.\n"
-#: apt-inst/deb/debfile.cc:47 apt-inst/deb/debfile.cc:54
-#: apt-inst/deb/debfile.cc:63
+#: ftparchive/writer.cc:417
+msgid "Archive had no package field"
+msgstr "Arşivde paket alanı yok"
+
+#: ftparchive/writer.cc:425 ftparchive/writer.cc:684
#, c-format
-msgid "This is not a valid DEB archive, missing '%s' member"
-msgstr "Bu dosya geçerli bir DEB arşivi değil, '%s' üyesi eksik"
+msgid " %s has no override entry\n"
+msgstr " %s için geçersiz kılma girdisi yok\n"
-#: apt-inst/deb/debfile.cc:132
+#: ftparchive/writer.cc:493 ftparchive/writer.cc:840
#, c-format
-msgid "Internal error, could not locate member %s"
-msgstr "İç hata, %s üyesi bulunamadı"
+msgid " %s maintainer is %s not %s\n"
+msgstr " %s geliştiricisi %s, %s değil\n"
-#: apt-inst/deb/debfile.cc:231
-msgid "Unparsable control file"
-msgstr "Ayrıştırılamayan 'control' dosyası"
+#: ftparchive/writer.cc:698
+#, c-format
+msgid " %s has no source override entry\n"
+msgstr " '%s' paketinin yerine geçecek bir kaynak paket yok\n"
-#: apt-inst/contrib/arfile.cc:76
-msgid "Invalid archive signature"
-msgstr "Geçersiz arşiv imzası"
+#: ftparchive/writer.cc:702
+#, c-format
+msgid " %s has no binary override entry either\n"
+msgstr " '%s' paketinin yerine geçecek bir ikili paket de yok\n"
-#: apt-inst/contrib/arfile.cc:84
-msgid "Error reading archive member header"
-msgstr "Arşiv üyesi başlığı okuma hatası"
+#: ftparchive/contents.cc:351 ftparchive/contents.cc:382
+msgid "realloc - Failed to allocate memory"
+msgstr "realloc - Bellek ayırma yapılamadı"
-#: apt-inst/contrib/arfile.cc:96
+#: ftparchive/override.cc:38 ftparchive/override.cc:142
#, c-format
-msgid "Invalid archive member header %s"
-msgstr "Geçersiz arşiv üyesi başlığı %s"
+msgid "Unable to open %s"
+msgstr "%s açılamıyor"
-#: apt-inst/contrib/arfile.cc:108
-msgid "Invalid archive member header"
-msgstr "Geçersiz arşiv üyesi başlığı"
+#. skip spaces
+#. find end of word
+#: ftparchive/override.cc:68
+#, c-format
+msgid "Malformed override %s line %llu (%s)"
+msgstr "Hatalı geçersiz kılma %s satır %llu (%s)"
-#: apt-inst/contrib/arfile.cc:137
-msgid "Archive is too short"
-msgstr "Arşiv çok kısa"
+#: ftparchive/override.cc:127 ftparchive/override.cc:201
+#, c-format
+msgid "Failed to read the override file %s"
+msgstr "Geçersiz kılma dosyası %s okunamadı"
-#: apt-inst/contrib/arfile.cc:141
-msgid "Failed to read the archive headers"
-msgstr "Arşiv başlıkları okunamadı"
+#: ftparchive/override.cc:166
+#, c-format
+msgid "Malformed override %s line %llu #1"
+msgstr "Hatalı geçersiz kılma %s satır %llu #1"
-#: apt-inst/contrib/extracttar.cc:128
-msgid "Failed to create pipes"
-msgstr "Boru oluşturulamadı"
+#: ftparchive/override.cc:178
+#, c-format
+msgid "Malformed override %s line %llu #2"
+msgstr "Hatalı geçersiz kılma %s satır %llu #2"
-#: apt-inst/contrib/extracttar.cc:155
-msgid "Failed to exec gzip "
-msgstr "Gzip çalıştırılamadı "
+#: ftparchive/override.cc:191
+#, c-format
+msgid "Malformed override %s line %llu #3"
+msgstr "Hatalı geçersiz kılma %s satır %llu #3"
-#: apt-inst/contrib/extracttar.cc:192 apt-inst/contrib/extracttar.cc:222
-msgid "Corrupted archive"
-msgstr "Bozuk arşiv"
+#: ftparchive/multicompress.cc:73
+#, c-format
+msgid "Unknown compression algorithm '%s'"
+msgstr "Bilinmeyen sıkıştırma algoritması '%s'"
-#: apt-inst/contrib/extracttar.cc:207
-msgid "Tar checksum failed, archive corrupted"
-msgstr "Tar sağlama toplamı başarısız, arşiv bozulmuş"
+#: ftparchive/multicompress.cc:103
+#, c-format
+msgid "Compressed output %s needs a compression set"
+msgstr "Sıkıştırılmış %s çıktısı bir sıkıştırma kümesine ihtiyaç duymaktadır"
+
+#: ftparchive/multicompress.cc:192
+msgid "Failed to create FILE*"
+msgstr "DOSYA* oluşturulamadı"
+
+#: ftparchive/multicompress.cc:195
+msgid "Failed to fork"
+msgstr "fork yapılamadı"
-#: apt-inst/contrib/extracttar.cc:312
+#: ftparchive/multicompress.cc:209
+msgid "Compress child"
+msgstr "Çocuğu sıkıştır"
+
+#: ftparchive/multicompress.cc:232
#, c-format
-msgid "Unknown TAR header type %u, member %s"
-msgstr "Bilinmeyen TAR başlığı türü %u, üye %s"
+msgid "Internal error, failed to create %s"
+msgstr "İç hata, %s oluşturulamadı"
+
+#: ftparchive/multicompress.cc:305
+msgid "IO to subprocess/file failed"
+msgstr "Altsürece/dosyaya GÇ işlemi başarısız oldu"
-#~ msgid "Total dependency version space: "
-#~ msgstr "Toplam bağımlılık sürümü alanı: "
+#: ftparchive/multicompress.cc:343
+msgid "Failed to read while computing MD5"
+msgstr "MD5 hesaplanırken okunamadı"
-#~ msgid "You don't have enough free space in %s"
-#~ msgstr "%s üzerinde yeterli boş alan yok"
+#: ftparchive/multicompress.cc:359
+#, c-format
+msgid "Problem unlinking %s"
+msgstr "%s bağı koparılırken sorun çıktı"
+
+#: cmdline/apt-internal-solver.cc:49
+msgid ""
+"Usage: apt-internal-solver\n"
+"\n"
+"apt-internal-solver is an interface to use the current internal\n"
+"like an external resolver for the APT family for debugging or alike\n"
+"\n"
+"Options:\n"
+" -h This help text.\n"
+" -q Loggable output - no progress indicator\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
+msgstr ""
+"Kullanım: apt-internal-solver\n"
+"\n"
+"apt-internal-solver mevcut dâhilî çözücüyü (hata ayıklama\n"
+"gibi sebeplerle) harici çözücü gibi kullanmaya yarayan bir\n"
+"arayüzdür.\n"
+"\n"
+"Seçenekler:\n"
+" -h Bu yardım metni.\n"
+" -q Günlük tutmaya uygun çıktı - İlerleme göstergesi yok\n"
+" -c=? Belirtilen yapılandırma dosyası kullan\n"
+" -o=? Yapılandırma seçeneği ayarla, örneğin -o dir::cache=/tmp\n"
-#~ msgid "Done"
-#~ msgstr "Bitti"
+#: cmdline/apt-sortpkgs.cc:89
+msgid "Unknown package record!"
+msgstr "Bilinmeyen paket kaydı!"
-#~ msgid "No keyring installed in %s."
-#~ msgstr "%s dizininde kurulu bir anahtar yok."
+#: cmdline/apt-sortpkgs.cc:153
+msgid ""
+"Usage: apt-sortpkgs [options] file1 [file2 ...]\n"
+"\n"
+"apt-sortpkgs is a simple tool to sort package files. The -s option is used\n"
+"to indicate what kind of file it is.\n"
+"\n"
+"Options:\n"
+" -h This help text\n"
+" -s Use source file sorting\n"
+" -c=? Read this configuration file\n"
+" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
+msgstr ""
+"Kullanım: apt-sortpkgs [seçenekler] dosya1 [dosya2 ...]\n"
+"\n"
+"apt-sortpkgs, paket dosyalarını sıralayan basit bir araçtır.\n"
+"-s seçeneği ne tür bir dosya olduğunu göstermekte kullanılır.\n"
+"\n"
+"Seçenekler:\n"
+" -h Bu yardım metni\n"
+" -s Kaynak dosyası sıralamayı kullan\n"
+" -c=? Belirtilen yapılandırma dosyasını oku\n"
+" -o=? Herhangi bir yapılandırma seçeneği ayarla, örneğin -o dir::cache=/"
+"tmp\n"
#~ msgid "Is stdout a terminal?"
#~ msgstr "stdout bir uçbirim mi?"
@@ -3835,3 +3785,6 @@ msgstr "Bilinmeyen TAR başlığı türü %u, üye %s"
#~ msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n"
#~ msgstr ""
#~ "Günlük yazılamadı, openpty() başarısız oldu (/dev/pts bağlanmadı mı?)\n"
+
+#~ msgid "File %s doesn't start with a clearsigned message"
+#~ msgstr "%s dosyası açıkimzalı bir iletiyle başlamıyor"
diff --git a/po/uk.po b/po/uk.po
index faeedf941..1494413e9 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -10,7 +10,7 @@
# binary = двійковий
msgid ""
msgstr ""
-"Project-Id-Version: apt-all\n"
+"Project-Id-Version: apt 1.0.5\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2012-09-25 20:19+0300\n"
@@ -1298,8 +1298,8 @@ msgstr "Пакунки, які мали б залишитися без змін,
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (внаслідок %s) "
+msgid "%s (due to %s)"
+msgstr "%s (внаслідок %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1736,20 +1736,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "В кеші "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "В кеші:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Отр:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Отр:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Ігн "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Ігн:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Пом "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Пом:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/vi.po b/po/vi.po
index 089d8461a..73770ce74 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -1334,8 +1334,8 @@ msgstr "Những gói giữ lại sau đây sẽ bị THAY ĐỔI:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (bởi vì %s) "
+msgid "%s (due to %s)"
+msgstr "%s (bởi vì %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1752,20 +1752,24 @@ msgid "Full Text Search"
msgstr "Tìm kiếm toàn văn"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "Tìm thấy "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "Tìm thấy:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "Lấy:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "Lấy:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "Bỏq "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "Bỏq:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "Lỗi "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "Lỗi:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 2ff5bcf01..7e0bcd406 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -4,7 +4,7 @@
# Tchaikov <tchaikov@sjtu.org>, 2005, 2007.
# Carlos Z.F. Liu <carlosliu@users.sourceforge.net>, 2004, 2006.
# Aron Xu <happyaron.xu@gmail.com>, 2009, 2010.
-# Zhou Mo <cdluminate@gmail.com>, 2014.
+# Zhou Mo <cdluminate@gmail.com>, 2014, 2015.
#
msgid ""
msgstr ""
@@ -55,7 +55,7 @@ msgstr " 缺失:"
#: cmdline/apt-cache.cc:368
msgid "Total distinct versions: "
-msgstr "按版本共计:"
+msgstr "按不同的版本共计:"
#: cmdline/apt-cache.cc:370
msgid "Total distinct descriptions: "
@@ -108,12 +108,12 @@ msgstr "您必须明确地给出至少一个表达式"
#: cmdline/apt-cache.cc:1505
msgid "This command is deprecated. Please use 'apt-mark showauto' instead."
-msgstr "该命令已废弃。请使用‘apt-mark showauto’代替。"
+msgstr "该命令已废弃。请使用‘apt-mark showauto’。"
#: cmdline/apt-cache.cc:1600 apt-pkg/cacheset.cc:653
#, c-format
msgid "Unable to locate package %s"
-msgstr "未发现软件包 %s"
+msgstr "无法定位软件包 %s"
#: cmdline/apt-cache.cc:1630
msgid "Package files:"
@@ -138,7 +138,7 @@ msgstr " 已安装:"
#: cmdline/apt-cache.cc:1672
msgid " Candidate: "
-msgstr " 候选软件包:"
+msgstr " 候选:"
#: cmdline/apt-cache.cc:1690 cmdline/apt-cache.cc:1698
msgid "(none)"
@@ -160,7 +160,7 @@ msgstr " 版本列表:"
#: cmdline/apt-sortpkgs.cc:149
#, c-format
msgid "%s %s for %s compiled on %s %s\n"
-msgstr "%s %s,用于 %s 构架,编译于 %s %s\n"
+msgstr "%s %s,用于 %s 体系结构,编译于 %s %s\n"
#: cmdline/apt-cache.cc:1834
msgid ""
@@ -202,8 +202,8 @@ msgstr ""
"    apt-cache [选项] showpkg 软件包1 [软件包2 ...]\n"
"    apt-cache [选项] showsrc 软件包1 [软件包2 ...]\n"
"\n"
-"apt-cache 是一个底层的工具,可以用来\n"
-"在 APT 的二进制缓存文件中查询信息\n"
+"apt-cache 是一个底层的工具,它可以在 APT 的\n"
+"二进制缓存文件中查询信息\n"
"\n"
"命令:\n"
" gencaches - 同时生成软件包和源代码包的缓存\n"
@@ -262,7 +262,7 @@ msgstr "请对您的盘片套件中的其它盘片重复相同的操作。"
#: cmdline/apt-config.cc:48
msgid "Arguments not in pairs"
-msgstr "参数没有成对"
+msgstr "参数不成对"
#: cmdline/apt-config.cc:89
msgid ""
@@ -320,24 +320,24 @@ msgstr "找不到 %2$s 软件包的 %1$s 版本"
#: cmdline/apt-get.cc:445
#, c-format
msgid "Couldn't find package %s"
-msgstr "无法找到软件包 %s"
+msgstr "找不到软件包 %s"
#: cmdline/apt-get.cc:450 cmdline/apt-mark.cc:78
#: apt-private/private-install.cc:863
#, c-format
msgid "%s set to manually installed.\n"
-msgstr "%s 被设置为手动安装。\n"
+msgstr "%s 已设置为手动安装。\n"
#: cmdline/apt-get.cc:452 cmdline/apt-mark.cc:80
#, c-format
msgid "%s set to automatically installed.\n"
-msgstr "%s 被设置为手动安装。\n"
+msgstr "%s 已设置为自动安装。\n"
#: cmdline/apt-get.cc:460 cmdline/apt-mark.cc:124
msgid ""
"This command is deprecated. Please use 'apt-mark auto' and 'apt-mark manual' "
"instead."
-msgstr "该命令已废弃。请用‘apt-mark auto’或‘apt-mark manual’替代。"
+msgstr "该命令已废弃。请用‘apt-mark auto’或‘apt-mark manual’。"
#: cmdline/apt-get.cc:529 cmdline/apt-get.cc:537
msgid "Internal error, problem resolver broke stuff"
@@ -636,15 +636,15 @@ msgid ""
" This APT helper has Super Meep Powers.\n"
msgstr ""
"用法: apt-helper [选项] 命令\n"
-" apt-helper [选项] download-file uri target-path\n"
+" apt-helper [选项] download-file URI 目标路径\n"
"\n"
-"apt-helper 是一个 apt 的内部帮助程序\n"
+"apt-helper 是一个 apt 的内部助手\n"
"\n"
"命令:\n"
-" download-file - 将uri指定的文件下载到指定目标目录\n"
+" download-file - 将 URI 指定的文件下载到目标路径\n"
" auto-detect-proxy - 用 apt.conf 检测代理设置\n"
"\n"
-" This APT helper has Super Meep Powers.\n"
+" 本 APT 助手具有超级喵力。\n"
#: cmdline/apt-mark.cc:65
#, c-format
@@ -1289,8 +1289,8 @@ msgstr "下列被要求保持版本不变的软件包将被改变:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s (是由于 %s) "
+msgid "%s (due to %s)"
+msgstr "%s (是由于 %s)"
#: apt-private/private-output.cc:696
msgid ""
@@ -1693,20 +1693,24 @@ msgid "Full Text Search"
msgstr "全文搜索"
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "命中 "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "命中:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "获取:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "获取:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "忽略 "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "忽略:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "错误 "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "错误:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/po/zh_TW.po b/po/zh_TW.po
index e35910df2..6b78c8340 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -6,7 +6,7 @@
# $Id: zh_TW.po,v 1.11 2004/04/30 04:50:38 mdz Exp $
msgid ""
msgstr ""
-"Project-Id-Version: 0.5.4\n"
+"Project-Id-Version: apt 0.5.4\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2015-03-09 02:17+0100\n"
"PO-Revision-Date: 2009-01-28 10:41+0800\n"
@@ -1236,8 +1236,8 @@ msgstr "下列被保留 (hold) 的套件將會被更改:"
#: apt-private/private-output.cc:688
#, c-format
-msgid "%s (due to %s) "
-msgstr "%s(因為 %s)"
+msgid "%s (due to %s)"
+msgstr "%s(因為 %s"
#: apt-private/private-output.cc:696
msgid ""
@@ -1646,20 +1646,24 @@ msgid "Full Text Search"
msgstr ""
#: apt-private/acqprogress.cc:66
-msgid "Hit "
-msgstr "已有 "
+#, c-format
+msgid "Hit:%lu %s"
+msgstr "已有:%lu %s"
#: apt-private/acqprogress.cc:88
-msgid "Get:"
-msgstr "下載:"
+#, c-format
+msgid "Get:%lu %s"
+msgstr "下載:%lu %s"
#: apt-private/acqprogress.cc:119
-msgid "Ign "
-msgstr "略過 "
+#, c-format
+msgid "Ign:%lu %s"
+msgstr "略過:%lu %s"
#: apt-private/acqprogress.cc:126
-msgid "Err "
-msgstr "錯誤 "
+#, c-format
+msgid "Err:%lu %s"
+msgstr "錯誤:%lu %s"
#: apt-private/acqprogress.cc:150
#, c-format
diff --git a/prepare-release b/prepare-release
index 8a3743ad7..91f65028d 100755
--- a/prepare-release
+++ b/prepare-release
@@ -11,17 +11,18 @@ VERSION=$(dpkg-parsechangelog | sed -n -e '/^Version:/s/^Version: //p')
DISTRIBUTION=$(dpkg-parsechangelog | sed -n -e '/^Distribution:/s/^Distribution: //p')
LIBAPTPKGVERSION="$(awk -v ORS='.' '/^\#define APT_PKG_M/ {print $3}' apt-pkg/contrib/macros.h | sed 's/\.$//')"
-LIBAPTINSTVERSION="$(egrep '^MAJOR=' apt-inst/makefile |cut -d '=' -f 2)"
+LIBAPTINSTVERSION="$(grep '^MAJOR=' apt-inst/makefile |cut -d '=' -f 2)"
librarysymbolsfromfile() {
local MISSING="$(grep '^+#MISSING' "$1")"
+ local SYMVER="$2"
echo '=== Missing optional symbols:'
echo -n "$MISSING" | grep '|optional=' || true
echo '=== Missing required symbols:'
echo -n "$MISSING" | grep -v '|optional=' || true
echo '=== New symbols:'
grep '^+ ' "$1" | cut -d' ' -f 2 | cut -d'@' -f 1 | c++filt | while read line; do
- echo " (c++)\"${line}@Base\" $VERSION"
+ echo " (c++)\"${line}@${SYMVER}\" $VERSION"
done | sort -u
}
@@ -109,7 +110,7 @@ elif [ "$1" = 'library' ]; then
echo "Checking $1 in version $2"
local tmpfile=$(mktemp)
dpkg-gensymbols -p${1}${2} -ebuild/bin/${1}.so.${2} -Idebian/${1}${2}.symbols -O/dev/null 2> /dev/null > $tmpfile || true
- librarysymbolsfromfile "$tmpfile"
+ librarysymbolsfromfile "$tmpfile" "$(echo "${1}" | cut -c 4- | tr -d '-' | tr 'a-z' 'A-Z')_${2}"
rm -f $tmpfile
}
librarysymbols 'libapt-pkg' "${LIBAPTPKGVERSION}"
@@ -117,7 +118,7 @@ elif [ "$1" = 'library' ]; then
librarysymbols 'libapt-inst' "${LIBAPTINSTVERSION}"
elif [ "$1" = 'buildlog' ]; then
while [ -n "$2" ]; do
- librarysymbolsfromfile "$2"
+ librarysymbolsfromfile "$2" 'UNKNOWN'
shift
done
elif [ "$1" = 'travis-ci' ]; then
diff --git a/test/integration/framework b/test/integration/framework
index b253deb91..b443f2a7b 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -99,10 +99,14 @@ msgdone() {
}
getaptconfig() {
if [ -f ./aptconfig.conf ]; then
- echo "./aptconfig.conf"
+ echo "$(readlink -f ./aptconfig.conf)"
elif [ -f ../aptconfig.conf ]; then
- echo "../aptconfig.conf"
- fi
+ echo "$(readlink -f ../aptconfig.conf)"
+ elif [ -f ../../aptconfig.conf ]; then
+ echo "$(readlink -f ../../aptconfig.conf)"
+ elif [ -f "${TMPWORKINGDIRECTORY}/aptconfig.conf" ]; then
+ echo "$(readlink -f "${TMPWORKINGDIRECTORY}/aptconfig.conf")"
+ fi
}
runapt() {
msgdebug "Executing: ${CCMD}$*${CDEBUG} "
@@ -137,7 +141,17 @@ dpkgcheckbuilddeps() {
command dpkg-checkbuilddeps --admindir=${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg "$@"
}
gdb() {
- local CMD="$1"
+ local CMD
+ case "$1" in
+ aptget) CMD="apt-get";;
+ aptcache) CMD="apt-cache";;
+ aptcdrom) CMD="apt-cdrom";;
+ aptconfig) CMD="apt-config";;
+ aptmark) CMD="apt-mark";;
+ apthelper) CMD="apt-helper";;
+ aptftparchive) CMD="apt-ftparchive";;
+ *) CMD="$1";;
+ esac
shift
runapt command gdb --quiet -ex run "${BUILDDIRECTORY}/$CMD" --args "${BUILDDIRECTORY}/$CMD" "$@"
}
@@ -238,7 +252,7 @@ setupenvironment() {
echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf
echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf
echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf
- echo "Dir::Bin::Methods \"${METHODSDIR}\";" >> aptconfig.conf
+ echo "Dir::Bin::Methods \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/methods\";" >> aptconfig.conf
# store apt-key were we can access it, even if we run it as a different user
# destroys coverage reporting though, so just do it for root for now
if [ "$(id -u)" = '0' ]; then
@@ -266,16 +280,19 @@ EOF
chmod +x "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg"
echo "Dir::Bin::dpkg \"${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg\";" > rootdir/etc/apt/apt.conf.d/99dpkg
- if ! command dpkg --assert-multi-arch >/dev/null 2>&1; then
- echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it…
- fi
- echo 'quiet::NoUpdate "true";' >> aptconfig.conf
- echo 'quiet::NoStatistic "true";' >> aptconfig.conf
- # too distracting for users, but helpful to detect changes
- echo 'Acquire::Progress::Ignore::ShowErrorText "true";' >> aptconfig.conf
- # in testcases, it can appear as if localhost has a rotation setup,
- # hide this as we can't really deal with it properly
- echo 'Acquire::Failure::ShowIP "false";' >> aptconfig.conf
+ {
+ if ! command dpkg --assert-multi-arch >/dev/null 2>&1; then
+ echo "DPKG::options:: \"--force-architecture\";" # Added to test multiarch before dpkg is ready for it…
+ fi
+ echo 'quiet::NoUpdate "true";'
+ echo 'quiet::NoStatistic "true";'
+ # too distracting for users, but helpful to detect changes
+ echo 'Acquire::Progress::Ignore::ShowErrorText "true";'
+ echo 'Acquire::Progress::Diffpercent "true";'
+ # in testcases, it can appear as if localhost has a rotation setup,
+ # hide this as we can't really deal with it properly
+ echo 'Acquire::Failure::ShowIP "false";'
+ } >> aptconfig.conf
cp "${TESTDIRECTORY}/apt.pem" "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem"
if [ "$(id -u)" = '0' ]; then
@@ -513,6 +530,12 @@ Package: $NAME" > debian/control
buildsimplenativepackage() {
local NAME="$1"
+ local NM
+ if [ "$(echo "$NAME" | cut -c 1-3)" = 'lib' ]; then
+ NM="$(echo "$NAME" | cut -c 1-4)"
+ else
+ NM="$(echo "$NAME" | cut -c 1)"
+ fi
local ARCH="$2"
local VERSION="$3"
local RELEASE="${4:-unstable}"
@@ -547,10 +570,12 @@ echo '$NAME says \"Hello!\"'" > ${BUILDDIR}/${NAME}
-- Joe Sixpack <joe@example.org> $(date -R)" > ${BUILDDIR}/debian/changelog
echo "Source: $NAME
-Section: $SECTION
Priority: $PRIORITY
Maintainer: Joe Sixpack <joe@example.org>
Standards-Version: 3.9.3" > ${BUILDDIR}/debian/control
+ if [ "$SECTION" != '<none>' ]; then
+ echo "Section: $SECTION" >> ${BUILDDIR}/debian/control
+ fi
local BUILDDEPS="$(echo "$DEPENDENCIES" | grep '^Build-')"
test -z "$BUILDDEPS" || echo "$BUILDDEPS" >> ${BUILDDIR}/debian/control
echo "
@@ -593,15 +618,15 @@ Package: $NAME" >> ${BUILDDIR}/debian/control
(cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$arch)
(cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums)
local LOG="${BUILDDIR}/../${NAME}_${VERSION}_${arch}.dpkg-deb.log"
- # ensure the right permissions as dpkg-deb ensists
+ # ensure the right permissions as dpkg-deb insists
chmod 755 ${BUILDDIR}/debian/tmp/DEBIAN
testsuccess --nomsg dpkg-deb -Z${COMPRESS_TYPE} --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/..
echo "pool/${NAME}_${VERSION}_${arch}.deb" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.pkglist
done
- mkdir -p ${BUILDDIR}/../${NAME}_${VERSION}
- cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}/
- cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}.changelog
+ local CHANGEPATH="${BUILDDIR}/../${DISTSECTION}/${NM}/${NAME}/${NAME}_${VERSION}"
+ mkdir -p $CHANGEPATH
+ cp ${BUILDDIR}/debian/changelog $CHANGEPATH
rm -rf "${BUILDDIR}"
msgdone "info"
}
@@ -773,6 +798,8 @@ insertsource() {
local SPATH="aptarchive/dists/${RELEASE}/main/source"
mkdir -p $SPATH
local FILE="${SPATH}/Sources"
+ local DSCFILE="${NAME}_${VERSION}.dsc"
+ local TARFILE="${NAME}_${VERSION}.tar.gz"
echo "Package: $NAME
Binary: $NAME
Version: $VERSION
@@ -780,8 +807,8 @@ Maintainer: Joe Sixpack <joe@example.org>
Architecture: $ARCH" >> $FILE
test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
echo "Files:
- d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.dsc
- d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.tar.gz
+ $(echo -n "$DSCFILE" | md5sum | cut -d' ' -f 1) $(echo -n "$DSCFILE" | wc -c) $DSCFILE
+ $(echo -n "$TARFILE" | md5sum | cut -d' ' -f 1) $(echo -n "$TARFILE" | wc -c) $TARFILE
" >> $FILE
}
@@ -835,7 +862,9 @@ buildaptarchivefromincoming() {
buildaptarchivefromfiles() {
msginfo "Build APT archive for ${CCMD}$(basename $0)${CINFO} based on prebuild files…"
- find aptarchive -name 'Packages' -o -name 'Sources' -o -name 'Translation-*' | while read line; do
+ local DIR='aptarchive'
+ if [ -d "${DIR}/dists" ]; then DIR="${DIR}/dists"; fi
+ find "$DIR" -name 'Packages' -o -name 'Sources' -o -name 'Translation-*' | while read line; do
msgninfo "\t${line} file… "
compressfile "$line" "$1"
msgdone "info"
@@ -867,6 +896,7 @@ getcodenamefromsuite() {
}
getreleaseversionfromsuite() { true; }
getlabelfromsuite() { true; }
+getoriginfromsuite() { true; }
generatereleasefiles() {
# $1 is the Date header and $2 is the ValidUntil header to be set
@@ -878,16 +908,21 @@ generatereleasefiles() {
local CODENAME="$(getcodenamefromsuite $SUITE)"
local VERSION="$(getreleaseversionfromsuite $SUITE)"
local LABEL="$(getlabelfromsuite $SUITE)"
+ local ORIGIN="$(getoriginfromsuite $SUITE)"
if [ -n "$VERSION" ]; then
VERSION="-o APT::FTPArchive::Release::Version=${VERSION}"
fi
if [ -n "$LABEL" ]; then
LABEL="-o APT::FTPArchive::Release::Label=${LABEL}"
fi
+ if [ -n "$ORIGIN" ]; then
+ ORIGIN="-o APT::FTPArchive::Release::Origin=${ORIGIN}"
+ fi
aptftparchive -qq release $dir \
-o APT::FTPArchive::Release::Suite="${SUITE}" \
-o APT::FTPArchive::Release::Codename="${CODENAME}" \
${LABEL} \
+ ${ORIGIN} \
${VERSION} \
| sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then
@@ -1263,7 +1298,7 @@ testdpkgstatus() {
local PKGS="$(dpkg -l "$@" 2>/dev/null | grep "^${STATE}" | wc -l)"
if [ "$PKGS" != $NR ]; then
echo >&2 $PKGS
- dpkg -l "$@" | grep '^[a-z]' >&2
+ dpkg -l "$@" | grep '^[a-z]' >&2 || true
msgfail
else
msgpass
@@ -1289,6 +1324,17 @@ testmarkedauto() {
fi
aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
}
+testmarkedmanual() {
+ local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testmarkedmanual.comparefile"
+ if [ -n "$1" ]; then
+ msgtest 'Test for correctly marked as manually installed' "$*"
+ while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE
+ else
+ msgtest 'Test for correctly marked as manually installed' 'no package'
+ echo -n > $COMPAREFILE
+ fi
+ aptmark showmanual 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
+}
msgfailoutput() {
local MSG="$1"
@@ -1331,8 +1377,17 @@ testsuccess() {
if expr match "$1" '^apt.*' >/dev/null; then
if grep -q -E ' runtime error: ' "$OUTPUT"; then
msgfailoutput 'compiler detected undefined behavior' "$OUTPUT" "$@"
- elif grep -q -E '^[WE]: ' "$OUTPUT"; then
- msgfailoutput 'successful run, but output contains warnings/errors' "$OUTPUT" "$@"
+ elif grep -E '^[WE]: ' "$OUTPUT" > "${TMPWORKINGDIRECTORY}/rootdir/tmp/checkforwarnings.output" 2>&1; then
+ if [ "$IGNORE_PTY_NOT_MOUNTED" = '1' ]; then
+ if echo 'E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)' \
+ | cmp - "${TMPWORKINGDIRECTORY}/rootdir/tmp/checkforwarnings.output" >/dev/null 2>&1; then
+ msgpass
+ else
+ msgfailoutput 'successful run, but output contains warnings/errors' "$OUTPUT" "$@"
+ fi
+ else
+ msgfailoutput 'successful run, but output contains warnings/errors' "$OUTPUT" "$@"
+ fi
else
msgpass
fi
@@ -1387,12 +1442,23 @@ testfailure() {
else
local EXITCODE=$?
if expr match "$1" '^apt.*' >/dev/null; then
- if grep -q -E ' runtime error: ' "$OUTPUT"; then
- msgfailoutput 'compiler detected undefined behavior' "$OUTPUT" "$@"
- elif ! grep -q -E '^E: ' "$OUTPUT"; then
- msgfailoutput "run failed with exitcode ${EXITCODE}, but with no errors" "$OUTPUT" "$@"
+ if [ "$1" = 'aptkey' ]; then
+ if grep -q -E " Can't check signature: " "$OUTPUT" || \
+ grep -q -E " BAD signature from " "$OUTPUT"; then
+ msgpass
+ else
+ msgfailoutput "run failed with exitcode ${EXITCODE}, but no signature error" "$OUTPUT" "$@"
+ fi
else
- msgpass
+ if grep -q -E ' runtime error: ' "$OUTPUT"; then
+ msgfailoutput 'compiler detected undefined behavior' "$OUTPUT" "$@"
+ elif grep -q -E '==ERROR' "$OUTPUT"; then
+ msgfailoutput 'compiler sanitizers reported errors' "$OUTPUT" "$@"
+ elif ! grep -q -E '^E: ' "$OUTPUT"; then
+ msgfailoutput "run failed with exitcode ${EXITCODE}, but with no errors" "$OUTPUT" "$@"
+ else
+ msgpass
+ fi
fi
else
msgpass
@@ -1441,9 +1507,9 @@ testfilestats() {
msgpass
else
echo >&2
- ls -ld >&2 "$1"
+ ls -ld >&2 "$1" || true
echo -n >&2 "stat(1) reports for $2: "
- stat --format "$2" "$1"
+ stat --format "$2" "$1" || true
msgfail
fi
}
@@ -1529,6 +1595,11 @@ aptautotest() {
}
aptautotest_aptget_update() {
+ local TESTCALL="$1"
+ while [ -n "$2" ]; do
+ if [ "$2" = '--print-uris' ]; then return; fi # simulation mode
+ shift
+ done
if ! test -d "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists"; then return; fi
testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:755"
testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:755"
@@ -1536,7 +1607,7 @@ aptautotest_aptget_update() {
for file in $(find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" -type f ! -name 'lock'); do
testfilestats "$file" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
done
- if [ "$1" = 'testsuccess' ]; then
+ if [ "$TESTCALL" = 'testsuccess' ]; then
# failure cases can retain partial files and such
testempty find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial" -mindepth 1 ! \( -name 'lock' -o -name '*.FAILED' \)
fi
diff --git a/test/integration/skip-aptwebserver b/test/integration/skip-aptwebserver
deleted file mode 100755
index 0622941ce..000000000
--- a/test/integration/skip-aptwebserver
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-set -e
-
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
-
-setupenvironment
-configarchitecture 'amd64'
-
-buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
-
-setupaptarchive
-changetowebserver
-
-rm -rf rootdir/var/lib/apt/lists
-aptget update -qq
-testequal 'Hit http://localhost stable InRelease
-Hit http://localhost stable/main Sources
-Hit http://localhost stable/main amd64 Packages
-Hit http://localhost stable/main Translation-en
-Reading package lists...' aptget update
-
-mv rootdir/var/lib/apt/lists/localhost* rootdir/var/lib/apt/lists/partial
-aptget update
-
diff --git a/test/integration/test-acquire-same-file-multiple-times b/test/integration/test-acquire-same-file-multiple-times
new file mode 100755
index 000000000..526765521
--- /dev/null
+++ b/test/integration/test-acquire-same-file-multiple-times
@@ -0,0 +1,80 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+TESTFILE="$TESTDIR/framework"
+cp $TESTFILE aptarchive/foo
+APTARCHIVE="$(readlink -f ./aptarchive)"
+
+filedown() {
+ msgtest 'Downloading the same URI twice over file' "$1"
+ testsuccess --nomsg apthelper download-file file:///$APTARCHIVE/foo ./downloaded/foo1 '' file:///$APTARCHIVE/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1
+ cp rootdir/tmp/testsuccess.output download.log
+ #cat download.log
+ testsuccess cmp $TESTFILE ./downloaded/foo1
+ testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
+ #testequal '1' grep -c '200%20URI%20Start' ./download.log
+ testequal '1' grep -c '201%20URI%20Done' ./download.log
+ rm -f ./downloaded/foo1 ./downloaded/foo2
+}
+
+testrun() {
+ $1 'no partial'
+ cp $TESTFILE ./downloaded/foo1
+ $1 'complete partial 1'
+ cp $TESTFILE ./downloaded/foo2
+ $1 'complete partial 2'
+ cp $TESTFILE ./downloaded/foo1
+ cp $TESTFILE ./downloaded/foo2
+ $1 'complete partial 1+2'
+ dd if=$TESTFILE of=./downloaded/foo1 bs=500 count=1 2>/dev/null
+ $1 'partial partial 1'
+ dd if=$TESTFILE of=./downloaded/foo2 bs=500 count=1 2>/dev/null
+ $1 'partial partial 2'
+ dd if=$TESTFILE of=./downloaded/foo1 bs=500 count=1 2>/dev/null
+ dd if=$TESTFILE of=./downloaded/foo2 bs=500 count=1 2>/dev/null
+ $1 'partial partial 1+2'
+}
+testrun 'filedown'
+
+changetowebserver -o aptwebserver::redirect::replace::/foo2=/foo
+
+httpdown() {
+ msgtest 'Downloading the same URI to different files' 'twice over http'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
+ cp rootdir/tmp/testsuccess.output download.log
+ testsuccess cmp $TESTDIR/framework ./downloaded/foo1
+ testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
+ testequal '1' grep -c '200%20URI%20Start' ./download.log
+ testequal '1' grep -c '201%20URI%20Done' ./download.log
+ rm -f ./downloaded/foo1 ./downloaded/foo2
+}
+testrun 'httpdown'
+
+httpredirectdown() {
+ msgtest 'Redirect leads' 'first URI to the second URI'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo2 ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
+ cp rootdir/tmp/testsuccess.output download.log
+ testsuccess cmp $TESTDIR/framework ./downloaded/foo1
+ testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
+ testequal '1' grep -c '200%20URI%20Start' ./download.log
+ testequal '1' grep -c '103%20Redirect' ./download.log
+ testequal '1' grep -c '201%20URI%20Done' ./download.log
+ rm -f ./downloaded/foo1 ./downloaded/foo2
+}
+testrun 'httpredirectdown'
+
+httpsamedown() {
+ msgtest 'Downloading two files via the same URI to' 'the same file'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo1 '' -o Debug::pkgAcquire::Worker=1
+ cp rootdir/tmp/testsuccess.output download.log
+ testsuccess cmp $TESTDIR/framework ./downloaded/foo1
+ testequal '1' grep -c '200%20URI%20Start' ./download.log
+ testequal '1' grep -c '201%20URI%20Done' ./download.log
+ rm -f ./downloaded/foo1
+}
+testrun 'httpsamedown'
diff --git a/test/integration/test-acquire-same-repository-multiple-times b/test/integration/test-acquire-same-repository-multiple-times
new file mode 100755
index 000000000..d3cb46c14
--- /dev/null
+++ b/test/integration/test-acquire-same-repository-multiple-times
@@ -0,0 +1,81 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+TESTFILE="$TESTDIR/framework"
+cp $TESTFILE aptarchive/foo
+APTARCHIVE="$(readlink -f ./aptarchive)"
+
+getcodenamefromsuite() { echo "jessie"; }
+buildsimplenativepackage 'foo' 'all' '1.0' 'stable'
+setupaptarchive --no-update
+ln -s "${APTARCHIVE}/dists/stable" "${APTARCHIVE}/dists/jessie"
+for FILE in rootdir/etc/apt/sources.list.d/*-stable-* ; do
+ sed 's#stable#jessie#g' $FILE > $(echo "$FILE" | sed 's#stable#jessie#g')
+done
+
+# install a slowed down file: otherwise its to fast to reproduce combining
+NEWMETHODS="$(readlink -f rootdir)/usr/lib/apt/methods"
+OLDMETHODS="$(readlink -f rootdir/usr/lib/apt/methods)"
+rm $NEWMETHODS
+mkdir $NEWMETHODS
+for METH in $(find $OLDMETHODS ! -type d); do
+ ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
+done
+rm $NEWMETHODS/file
+cat >$NEWMETHODS/file <<EOF
+#!/bin/sh
+while read line; do
+ echo "\$line"
+ if [ -z "\$line" ]; then
+ sleep 0.5
+ fi
+done | $OLDMETHODS/file
+EOF
+chmod +x $NEWMETHODS/file
+
+tworepos() {
+ msgtest "Downloading the same repository twice over $1" "$3"
+ testsuccess --nomsg aptget update -o Debug::pkgAcquire::Worker=1
+ cp rootdir/tmp/testsuccess.output download.log
+ #cat download.log
+ aptget indextargets --format '$(FILENAME)' --no-release-info | sort > file.lst
+ testequal "$(find $(readlink -f ./rootdir/var/lib/apt/lists) -name '*_dists_*' \( ! -name '*InRelease' \) -type f | sort)" cat file.lst
+ testsuccess aptcache policy
+ testequal "foo:
+ Installed: (none)
+ Candidate: 1.0
+ Version table:
+ 1.0 500
+ 500 $1:$2 jessie/main amd64 Packages
+ 500 $1:$2 stable/main amd64 Packages" aptcache policy foo
+ testfailure aptcache show foo/unstable
+ testsuccess aptcache show foo/stable
+ testsuccess aptcache show foo/jessie
+}
+
+tworepos 'file' "$APTARCHIVE" 'no partial'
+testequal '12' grep -c '200%20URI%20Start' ./download.log
+testequal '12' grep -c '201%20URI%20Done' ./download.log
+testequal '6' grep -c '^ @ Queue: Action combined' ./download.log
+tworepos 'file' "$APTARCHIVE" 'hit'
+testequal '6' grep -c '200%20URI%20Start' ./download.log
+testequal '6' grep -c '201%20URI%20Done' ./download.log
+testequal '0' grep -c '^ @ Queue: Action combined' ./download.log
+rm -rf rootdir/var/lib/apt/lists
+
+changetowebserver
+
+tworepos 'http' '//localhost:8080' 'no partial'
+testequal '10' grep -c '200%20URI%20Start' ./download.log
+testequal '10' grep -c '201%20URI%20Done' ./download.log
+testequal '6' grep -c '^ @ Queue: Action combined' ./download.log
+tworepos 'http' '//localhost:8080' 'hit'
+testequal '2' grep -c '200%20URI%20Start' ./download.log
+testequal '4' grep -c '201%20URI%20Done' ./download.log
+testequal '0' grep -c '^ @ Queue: Action combined' ./download.log
+rm -rf rootdir/var/lib/apt/lists
diff --git a/test/integration/test-allow b/test/integration/test-allow
new file mode 100755
index 000000000..3d773ee95
--- /dev/null
+++ b/test/integration/test-allow
@@ -0,0 +1,98 @@
+#!/bin/sh
+#
+# Test for --allow-remove-essential and friends replacing --force-yes
+#
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+insertpackage 'unstable' 'downgrade' 'all' '1'
+insertinstalledpackage 'downgrade' 'all' '2'
+
+insertpackage 'unstable' 'hold' 'all' '2'
+insertinstalledpackage 'hold' 'all' '1'
+
+insertinstalledpackage 'essential' 'all' '1' 'Essential: yes'
+
+setupaptarchive
+
+testsuccess aptmark hold hold
+
+# Test --allow-remove--essential
+
+testfailureequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ essential
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ essential
+0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
+E: Essential packages were removed and -y was used without --allow-remove-essential.' aptget remove essential -y -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ essential
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ essential
+0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
+Remv essential [1]' aptget remove essential -y --allow-remove-essential -s
+
+# Test --allow-change-held-packages (should not influence dist-upgrade, but an install)
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Calculating upgrade...
+The following packages have been kept back:
+ hold
+0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.' aptget dist-upgrade --allow-change-held-packages -s
+
+testfailureequal 'Reading package lists...
+Building dependency tree...
+The following held packages will be changed:
+ hold
+The following packages will be upgraded:
+ hold
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+E: Held packages were changed and -y was used without --allow-change-held-packages.' aptget install hold -y -s
+
+testfailureequal 'Reading package lists...
+Building dependency tree...
+The following held packages will be changed:
+ hold
+The following packages will be upgraded:
+ hold
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+E: Held packages were changed and -y was used without --allow-change-held-packages.' aptget install hold -y -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following held packages will be changed:
+ hold
+The following packages will be upgraded:
+ hold
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+Inst hold [1] (2 unstable [all])
+Conf hold (2 unstable [all])' aptget install hold -y -s --allow-change-held-packages
+
+# Test --allow-downgrades
+
+testfailureequal 'Reading package lists...
+Building dependency tree...
+The following packages will be DOWNGRADED:
+ downgrade
+0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 1 not upgraded.
+E: Packages were downgraded and -y was used without --allow-downgrades.' aptget install downgrade=1 -y -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following packages will be DOWNGRADED:
+ downgrade
+0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 1 not upgraded.
+Inst downgrade [2] (1 unstable [all])
+Conf downgrade (1 unstable [all])' aptget install downgrade=1 --allow-downgrades -y -s
diff --git a/test/integration/test-allow-scores-for-all-dependency-types b/test/integration/test-allow-scores-for-all-dependency-types
index 56cfc9a69..30cc2fc93 100755
--- a/test/integration/test-allow-scores-for-all-dependency-types
+++ b/test/integration/test-allow-scores-for-all-dependency-types
@@ -115,7 +115,7 @@ Inst baz (2 unversioned [amd64])
Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following packages will be REMOVED:
bar
@@ -139,7 +139,7 @@ Inst baz (2 unversioned [amd64])
Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following packages will be REMOVED:
bar
diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files
new file mode 100755
index 000000000..ee7908a2d
--- /dev/null
+++ b/test/integration/test-apt-acquire-additional-files
@@ -0,0 +1,111 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'amd64'
+
+# note that in --print-uri we talk about .bz2 because that is the default.
+# This doesn't mean it is actually attempt to download it.
+configcompression '.' 'gz'
+
+buildsimplenativepackage 'foo' 'amd64' '1' 'unstable'
+
+setupaptarchive --no-update
+changetowebserver
+
+testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0
+'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0
+'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0
+'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris
+
+testsuccessequal "Get:1 http://localhost:8080 unstable InRelease [$(stat -c%s aptarchive/dists/unstable/InRelease) B]
+Get:2 http://localhost:8080 unstable/main Sources [$(stat -c%s aptarchive/dists/unstable/main/source/Sources.gz) B]
+Get:3 http://localhost:8080 unstable/main amd64 Packages [$(stat -c%s aptarchive/dists/unstable/main/binary-amd64/Packages.gz) B]
+Get:4 http://localhost:8080 unstable/main Translation-en [$(stat -c%s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B]
+Reading package lists..." aptget update
+
+testempty find rootdir/var/lib/apt/lists -name '*Contents*'
+
+cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF
+Acquire::IndexTargets::deb::Contents {
+ MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
+ ShortDescription "Contents";
+ Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents";
+};
+EOF
+
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64)" aptget indextargets --no-release-info --format '$(FILENAME)' 'Created-By: Contents'
+testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+# lets fake the existence of a compressed Contents file
+touch ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+
+testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0
+'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0
+'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0
+'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0
+'http://localhost:8080/dists/unstable/main/Contents-amd64.bz2' localhost:8080_dists_unstable_main_Contents-amd64 0 " aptget update --print-uris
+
+testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease
+Get:2 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B]
+Reading package lists..." aptget update
+
+testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' find rootdir/var/lib/apt/lists -name '*Contents*'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' 'aptarchive/dists/unstable/main/Contents-amd64'
+
+rm ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64
+testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+
+# if we asked for keeping it compressed, keep it
+echo 'Acquire::IndexTargets::deb::Contents::KeepCompressed "true";' >> rootdir/etc/apt/apt.conf.d/content-target.conf
+testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease
+Get:2 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B]
+Reading package lists..." aptget update
+
+testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' find rootdir/var/lib/apt/lists -name '*Contents*'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' 'aptarchive/dists/unstable/main/Contents-amd64.gz'
+
+rm ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz
+testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+
+# and no automatic uncompress based on the name please,
+# only if we downloaded a compressed file, but target was uncompressed
+cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF
+Acquire::IndexTargets::deb::Contents {
+ MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE).gz";
+ ShortDescription "Contents.gz";
+ Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents.gz";
+};
+EOF
+
+# the last line is utter bogus of course, but how should apt know…
+testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0
+'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0
+'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0
+'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0
+'http://localhost:8080/dists/unstable/main/Contents-amd64.gz.bz2' localhost:8080_dists_unstable_main_Contents-amd64.gz 0 " aptget update --print-uris
+
+testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease
+Get:2 http://localhost:8080 unstable/main amd64 Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B]
+Reading package lists..." aptget update
+
+testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' find rootdir/var/lib/apt/lists -name '*Contents*'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' 'aptarchive/dists/unstable/main/Contents-amd64.gz'
+
+rm -f rootdir/etc/apt/apt.conf.d/content-target.conf
+
+testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0
+'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0
+'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0
+'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris
+
+testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease
+Reading package lists..." aptget update
+
+testempty find rootdir/var/lib/apt/lists -name '*Contents*'
diff --git a/test/integration/test-apt-by-hash-update b/test/integration/test-apt-by-hash-update
index 8300c532c..2229e991d 100755
--- a/test/integration/test-apt-by-hash-update
+++ b/test/integration/test-apt-by-hash-update
@@ -11,8 +11,6 @@ insertpackage 'unstable' 'foo' 'all' '1.0'
setupaptarchive --no-update
-APTARCHIVE=$(readlink -f ./aptarchive)
-
# make Packages *only* accessable by-hash for this test
mkdir -p aptarchive/dists/unstable/main/binary-i386/by-hash/SHA512
(cd aptarchive/dists/unstable/main/binary-i386/by-hash/SHA512 &&
@@ -26,7 +24,7 @@ mkdir -p aptarchive/dists/unstable/main/source/by-hash/SHA512
)
# we moved the Packages file away, normal update won't work
-testfailure aptget upate
+testfailure aptget update
# ensure we do not know about "foo"
testfailureequal "Reading package lists...
@@ -36,14 +34,18 @@ E: Unable to locate package foo" aptget install -q -s foo
# ensure we can apt-get update by hash
testsuccess aptget update -o APT::Acquire::By-Hash=1 -o Acquire::Languages=none
-# ensure it works
-testsuccessequal "Inst foo (1.0 unstable [all])
+ensureitworks() {
+ testsuccessequal "Inst foo (1.0 unstable [all])
Conf foo (1.0 unstable [all])" aptget install -qq -s foo
+}
+ensureitworks
# add magic string to Release file ...
MAGIC="Acquire-By-Hash: true"
sed -i "s#Suite: unstable#Suite: unstable\n$MAGIC#" aptarchive/dists/unstable/Release
signreleasefiles
# ... and verify that it fetches by hash now
+rm -rf rootdir/var/lib/apt/lists
testsuccess aptget update -o Acquire::Languages=none
+ensureitworks
diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache
index f3db8024f..97d180a74 100755
--- a/test/integration/test-apt-cache
+++ b/test/integration/test-apt-cache
@@ -16,6 +16,9 @@ Recommends: cool (>= 2) | cooler (<< 5)' "$DESCR"
insertpackage 'unstable' 'bar' 'all' '1' 'Depends: bar
Breaks: foo (<< 1)
Replaces: foo (<< 1)' "$DESCR"
+insertpackage 'unstable' 'specific' 'all' '1' 'Depends: bar:i386, specific:amd64
+Breaks: foo:amd64 (<< 1)
+Replaces: foo:i386 (<< 1)' "$DESCR"
setupaptarchive
@@ -44,81 +47,136 @@ testsuccess test -s dump.output
testsuccessequal 'dpkg
bar
+specific
fancy
foo' aptcache pkgnames
testsuccessequal 'bar' aptcache pkgnames bar
testsuccessequal 'fancy
foo' aptcache pkgnames f
-testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive/ unstable/main amd64 Packages" aptcache madison foo
+testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive unstable/main amd64 Packages
+ foo | 1 | file:$(readlink -f .)/aptarchive unstable/main i386 Packages" aptcache madison foo
### depends
testsuccessequal 'foo
Depends: bar
- |Recommends: <cool>
- Recommends: <cooler>
Conflicts: <foobar>
- Conflicts: <foobar:i386>' aptcache depends foo
+ |Recommends: <cool>
+ Recommends: <cooler>' aptcache depends foo
testsuccessequal 'foo
Depends: bar
- Recommends: <cool>
Conflicts: <foobar>
- Conflicts: <foobar:i386>' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1
+ |Recommends: <cool>
+ Recommends: <cooler>' aptcache depends foo --implicit
testsuccessequal 'foo
Depends: bar
- |Recommends: <cool> (>= 2)
- Recommends: <cooler> (<< 5)
Conflicts: <foobar>
- Conflicts: <foobar:i386>' aptcache depends foo -o APT::Cache::ShowVersion=1
+ Recommends: <cool>' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1
testsuccessequal 'foo
Depends: bar
Conflicts: <foobar>
- Conflicts: <foobar:i386>' aptcache depends foo --no-recommends
+ Recommends: <cool>' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1 --implicit
testsuccessequal 'foo
- Depends: bar' aptcache depends foo --important
+ Depends: bar
+ Conflicts: <foobar>
+ |Recommends: <cool> (>= 2)
+ Recommends: <cooler> (<< 5)' aptcache depends foo -o APT::Cache::ShowVersion=1
testsuccessequal 'foo
+ Depends: bar
Conflicts: <foobar>
- Conflicts: <foobar:i386>' aptcache depends foo --important --no-depends --conflicts
+ |Recommends: <cool> (>= 2)
+ Recommends: <cooler> (<< 5)' aptcache depends foo -o APT::Cache::ShowVersion=1 --implicit
testsuccessequal 'foo
Depends: bar
+ Conflicts: <foobar>' aptcache depends foo --no-recommends
+testsuccessequal 'foo
+ Depends: bar
+ Conflicts: <foobar>' aptcache depends foo --no-recommends --implicit
+testsuccessequal 'foo
+ Depends: bar' aptcache depends foo --important --implicit
+testsuccessequal 'foo
+ Conflicts: <foobar>' aptcache depends foo --important --no-depends --conflicts
+testsuccessequal 'foo
+ Conflicts: <foobar>' aptcache depends foo --important --no-depends --conflicts --implicit
+testsuccessequal 'foo
+ Depends: bar
+ Conflicts: <foobar>
|Recommends: <cool>
Recommends: <cooler>
+bar
+ Depends: bar
+ Breaks: foo
+ Replaces: foo
+<foobar>
+<cool>
+<cooler>' aptcache depends foo --recurse
+testsuccessequal 'foo
+ Depends: bar
Conflicts: <foobar>
- Conflicts: <foobar:i386>
+ |Recommends: <cool>
+ Recommends: <cooler>
bar
Depends: bar
Breaks: foo
- Breaks: <foo:i386>
Replaces: foo
+ Breaks: <foo:i386>
Replaces: <foo:i386>
+<foobar>
<cool>
<cooler>
-<foobar>
-<foobar:i386>
-<foo:i386>' aptcache depends foo --recurse
+<foo:i386>' aptcache depends foo --recurse --implicit
+testsuccessequal 'foo
+ Depends: bar
+bar
+ Depends: bar
+ Replaces: foo' aptcache depends foo --recurse --important --replaces
testsuccessequal 'foo
Depends: bar
bar
Depends: bar
Replaces: foo
Replaces: <foo:i386>
-<foo:i386>' aptcache depends foo --recurse --important --replaces
+<foo:i386>' aptcache depends foo --recurse --important --replaces --implicit
+testsuccessequal 'bar
+ Depends: bar
+ Breaks: foo
+ Replaces: foo' aptcache depends bar
+testsuccessequal 'bar
+ Depends: bar
+ Breaks: foo
+ Replaces: foo
+ Breaks: <foo:i386>
+ Replaces: <foo:i386>' aptcache depends bar --implicit
+testsuccessequal 'specific
+ Depends: <bar:i386>
+ Depends: specific:amd64
+ Breaks: foo:amd64
+ Replaces: <foo:i386>' aptcache depends specific
+testsuccessequal 'specific
+ Depends: <bar:i386>
+ Depends: specific:amd64
+ Breaks: foo:amd64
+ Replaces: <foo:i386>' aptcache depends specific --implicit
## rdpends
testsuccessequal 'foo
Reverse Depends:
bar
+ specific
bar' aptcache rdepends foo
testsuccessequal 'foo
Reverse Depends:
- Replaces: bar
- Breaks: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1
+ Breaks: bar
+ Breaks: specific
+ Replaces: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1
testsuccessequal 'foo
Reverse Depends:
- Replaces: bar (<< 1)
- Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1
+ Breaks: bar (<< 1)
+ Breaks: specific (<< 1)
+ Replaces: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1
testsuccessequal 'foo
Reverse Depends:
- Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks
+ Breaks: bar (<< 1)
+ Breaks: specific (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks
diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom
index 34b35f745..ce31b5934 100755
--- a/test/integration/test-apt-cdrom
+++ b/test/integration/test-apt-cdrom
@@ -38,7 +38,7 @@ aptautotest_aptcdromlog_add() { aptautotest_aptget_update "$@"; }
CDROM_PRE="Using CD-ROM mount point $(readlink -f ./rootdir/media)/cdrom/
Unmounting CD-ROM...
Waiting for disc...
-Please insert a Disc in the drive and press enter
+Please insert a Disc in the drive and press [Enter]
Mounting CD-ROM...
Scanning disc for index files..."
CDROM_POST="This disc is called:
@@ -136,13 +136,15 @@ aptcache show testing -o Acquire::Languages=en | grep -q '^Description-en: ' &&
mv rootdir/media/cdrom-unmounted rootdir/media/cdrom-ejected
msgmsg "ensure an update doesn't mess with cdrom sources"
testsuccess aptget update
-testfileequal rootdir/tmp/testsuccess.output 'Reading package lists...'
+testfileequal rootdir/tmp/testsuccess.output 'Hit:1 cdrom://Debian APT Testdisk 0.8.15 stable InRelease
+Reading package lists...'
mv rootdir/media/cdrom-ejected rootdir/media/cdrom-unmounted
testcdromusage
msgmsg 'and again to check that it withstands the temptation even if it could mount'
testsuccess aptget update
-testfileequal rootdir/tmp/testsuccess.output 'Reading package lists...'
+testfileequal rootdir/tmp/testsuccess.output 'Hit:1 cdrom://Debian APT Testdisk 0.8.15 stable InRelease
+Reading package lists...'
testcdromusage
msgmsg 'Check that nothing touched our' 'CD-ROM'
diff --git a/test/integration/test-apt-cli-show b/test/integration/test-apt-cli-show
index 43072cf03..5f4ef1b48 100755
--- a/test/integration/test-apt-cli-show
+++ b/test/integration/test-apt-cli-show
@@ -32,7 +32,7 @@ Maintainer: Joe Sixpack <joe@example.org>
Installed-Size: 43.0 kB
Download-Size: unknown
APT-Manual-Installed: yes
-APT-Sources: file:$APTARCHIVE/ unstable/main i386 Packages
+APT-Sources: file:$APTARCHIVE unstable/main i386 Packages
Description: Some description
That has multiple lines
" apt show foo
diff --git a/test/integration/test-apt-cli-update b/test/integration/test-apt-cli-update
index d68ab25e4..dad365f7e 100755
--- a/test/integration/test-apt-cli-update
+++ b/test/integration/test-apt-cli-update
@@ -13,9 +13,7 @@ insertinstalledpackage 'foo' 'all' '1.0'
setupaptarchive --no-update
-APTARCHIVE=$(readlink -f ./aptarchive)
-
-testfailureequal 'E: The update command takes no arguments' apt update -q arguments
+testfailuremsg 'E: The update command takes no arguments' apt update arguments
testsuccessequal "1 package can be upgraded. Run 'apt list --upgradable' to see it." apt update -q
diff --git a/test/integration/test-apt-download-progress b/test/integration/test-apt-download-progress
index 65c438e8f..bf6a412ad 100755
--- a/test/integration/test-apt-download-progress
+++ b/test/integration/test-apt-download-progress
@@ -13,7 +13,7 @@ changetohttpswebserver
assertprogress() {
T="$1"
testsuccess grep "dlstatus:1:0:Retrieving file 1 of 1" "$T"
- if ! egrep -q "dlstatus:1:[1-9][0-9](\..*)?:Retrieving file 1 of 1" "$T"; then
+ if ! grep -E -q "dlstatus:1:[1-9][0-9](\..*)?:Retrieving file 1 of 1" "$T"; then
cat "$T"
msgfail "Failed to detect download progress"
fi
@@ -24,18 +24,19 @@ assertprogress() {
# actually report progress - but not too big to ensure its not delaying the
# test too much
TESTFILE=testfile.big
-testsuccess dd if=/dev/zero of=./aptarchive/$TESTFILE bs=800k count=1
+testsuccess dd if=/dev/zero of=./aptarchive/$TESTFILE bs=800k count=1
OPT='-o APT::Status-Fd=3 -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1 -o Debug::Acquire::https=1'
msgtest 'download progress works via' 'http'
exec 3> apt-progress.log
-testsuccess --nomsg apthelper download-file "http://localhost:8080/$TESTFILE" http-$TESTFILE $OPT -o Acquire::http::Dl-Limit=800
+testsuccess --nomsg apthelper download-file "http://localhost:8080/$TESTFILE" ./downloaded/http-$TESTFILE $OPT -o Acquire::http::Dl-Limit=800
assertprogress apt-progress.log
msgtest 'download progress works via' 'https'
exec 3> apt-progress.log
-testsuccess --nomsg apthelper download-file "https://localhost:4433/$TESTFILE" https-$TESTFILE $OPT -o Acquire::https::Dl-Limit=800
+testsuccess --nomsg apthelper download-file "https://localhost:4433/$TESTFILE" ./downloaded/https-$TESTFILE $OPT -o Acquire::https::Dl-Limit=800
+assertprogress apt-progress.log
# cleanup
rm -f apt-progress*.log
diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove
index a0e4d3c24..454b47976 100755
--- a/test/integration/test-apt-get-autoremove
+++ b/test/integration/test-apt-get-autoremove
@@ -27,6 +27,19 @@ The following packages will be REMOVED:
po-debconf
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Remv po-debconf [1.0.16]' aptget autoremove -s
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+The following package was automatically installed and is no longer required:
+ po-debconf
+Use 'apt-get autoremove' to remove it.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+1 package was automatically installed and is no longer required.
+Use 'apt-get autoremove' to remove it.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s -o APT::Get::HideAutoRemove=small
testdpkginstalled 'po-debconf'
echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove
@@ -63,6 +76,19 @@ The following packages will be REMOVED:
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Remv debhelper [8.0.0]
Remv po-debconf [1.0.16]' aptget autoremove -s
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages were automatically installed and are no longer required:
+ debhelper po-debconf
+Use 'apt-get autoremove' to remove them.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+2 packages were automatically installed and are no longer required.
+Use 'apt-get autoremove' to remove them.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s -o APT::Get::HideAutoRemove=small
testsuccess aptmark hold debhelper
testsuccessequal 'Reading package lists...
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
index 7e81c71b6..5fa8543b9 100755
--- a/test/integration/test-apt-get-changelog
+++ b/test/integration/test-apt-get-changelog
@@ -5,44 +5,98 @@ TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
-configarchitecture "i386"
+configarchitecture 'native'
-buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
+buildsimplenativepackage 'foo' 'all' '1.0' 'stable'
+buildsimplenativepackage 'libbar' 'all' '1.0' 'stable'
+
+getlabelfromsuite() { echo 'Testcases'; }
+getoriginfromsuite() { echo 'Debian'; }
setupaptarchive --no-update
changetowebserver
testsuccess aptget update
-# simulate normal user with non-existent root-owned directories
-rm -rf rootdir/var/cache/apt/archives/
-mkdir rootdir/var/cache/apt/archives/
-addtrap 'prefix' "chmod -f -R +w $PWD/rootdir/var/cache/apt/archives || true;"
-chmod -R -w rootdir/var/cache/apt/archives
+testsuccessequal "'http://metadata.ftp-master.debian.org/changelogs/main/f/foo/foo_1.0_changelog' foo.changelog
+'http://metadata.ftp-master.debian.org/changelogs/main/libb/libbar/libbar_1.0_changelog' libbar.changelog" aptget changelog foo libbar --print-uris
+
+releasechanger() {
+ # modifying the Release files in lists… bad stuff. Good that this is only a test…
+ sed -i "s#^${1}: .*#${1}: ${2}#" $(find rootdir/var/lib/apt/lists -name '*Release')
+ rm -f rootdir/var/cache/apt/*.bin
+}
+releasechanger 'Origin' 'Ubuntu'
+testsuccessequal "'http://changelogs.ubuntu.com/changelogs/pool/main/f/foo/foo_1.0/changelog' foo.changelog
+'http://changelogs.ubuntu.com/changelogs/pool/main/libb/libbar/libbar_1.0/changelog' libbar.changelog" aptget changelog foo libbar --print-uris
+
+releasechanger 'Label' 'Debian'
+testsuccessequal "'http://changelogs.ubuntu.com/changelogs/pool/main/f/foo/foo_1.0/changelog' foo.changelog
+'http://changelogs.ubuntu.com/changelogs/pool/main/libb/libbar/libbar_1.0/changelog' libbar.changelog" aptget changelog foo libbar --print-uris
+
+testsuccessequal "'http://localhost:8080/main/f/foo/foo_1.0.changelog' foo.changelog
+'http://localhost:8080/main/libb/libbar/libbar_1.0.changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Label::Debian='http://localhost:8080/CHANGEPATH.changelog'
+
+sed -i '/^Origin: / a\
+Changelogs: http://example.org/CHANGEPATH-changelog' $(find rootdir/var/lib/apt/lists -name '*Release')
+rm -f rootdir/var/cache/apt/*.bin
-echo 'Apt::Changelogs::Server "http://localhost:8080/";' > rootdir/etc/apt/apt.conf.d/changelog.conf
+testsuccessequal "'http://example.org/main/f/foo/foo_1.0-changelog' foo.changelog
+'http://example.org/main/libb/libbar/libbar_1.0-changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Label::Debian='http://localhost:8080/CHANGEPATH.changelog'
-testsuccessequal "'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+testsuccessequal "'http://localhost:8080/main/f/foo/foo_1.0.changelog' foo.changelog
+'http://localhost:8080/main/libb/libbar/libbar_1.0.changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Override::Label::Debian='http://localhost:8080/CHANGEPATH.changelog'
-testsuccessequal "'http://localhost:8080/pool/apt_1.0/changelog'
-'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt apt --print-uris
+releasechanger 'Changelogs' 'no'
+testequal 'E: Failed to fetch changelog:/foo.changelog Changelog unavailable for foo=1.0
+' aptget changelog foo -qq -d
+
+sed -i '/^Changelogs: / d' $(find rootdir/var/lib/apt/lists -name '*Release')
+releasechanger 'Label' 'Testcases'
+
+echo 'Acquire::Changelogs::URI::Label::Testcases "http://localhost:8080/CHANGEPATH/change.txt";' > rootdir/etc/apt/apt.conf.d/changelog.conf
+testsuccessequal "'http://localhost:8080/main/f/foo/foo_1.0/change.txt' foo.changelog
+'http://localhost:8080/main/libb/libbar/libbar_1.0/change.txt' libbar.changelog" aptget changelog foo libbar --print-uris
+
+echo 'Acquire::Changelogs::URI::Label::Testcases "http://localhost:8080/pool/CHANGEPATH/changelog";' > rootdir/etc/apt/apt.conf.d/changelog.conf
+testsuccessequal "'http://localhost:8080/pool/main/f/foo/foo_1.0/changelog' foo.changelog" aptget changelog foo --print-uris
cd downloaded
-testsuccess aptget changelog apt -qq
-testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/apt_1.0/changelog)"
+testsuccess aptget changelog foo -qq
+testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)"
+
+testsuccess aptget changelog foo libbar -qq
+testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)
+$(cat ../aptarchive/pool/main/libb/libbar/libbar_1.0/changelog)"
+
+testsuccess aptget changelog foo -d
+testfilestats 'foo.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
+testfileequal 'foo.changelog' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)"
+rm -f foo.changelog
-testsuccess aptget changelog apt -d
-testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0/changelog)"
-testfilestats 'apt.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
-rm -f apt.changelog ../aptarchive/pool/apt_1.0/changelog
+testsuccess aptget changelog libbar foo -d
+testfilestats 'libbar.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
+testfilestats 'foo.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
+testfileequal 'libbar.changelog' "$(cat ../aptarchive/pool/main/libb/libbar/libbar_1.0/changelog)"
+testfileequal 'foo.changelog' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)"
+rm -f libbar.changelog foo.changelog
-testequal "$(cat ../aptarchive/pool/apt_1.0.changelog)" aptget changelog apt \
- -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
+# as such bogus, but can happen with multiple binaries from the same source
+testsuccessequal "'http://localhost:8080/pool/main/f/foo/foo_1.0/changelog' foo.changelog
+'http://localhost:8080/pool/main/f/foo/foo_1.0/changelog' foo.changelog" aptget changelog foo foo --print-uris
+testsuccess aptget changelog foo foo -qq
+testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)
+$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)"
+testsuccess aptget changelog foo foo -d
+testfilestats 'foo.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
+testfileequal 'foo.changelog' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)"
+rm -f foo.changelog
-testsuccess aptget changelog apt -d
-testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0.changelog)"
-testfilestats 'apt.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
-rm -f apt.changelog ../aptarchive/pool/apt_1.0.changelog
+# no CHANGEPATH in the URI
+testequal 'E: Failed to fetch changelog:/foo.changelog Changelog unavailable for foo=1.0
+' aptget changelog foo -qq -d -o Acquire::Changelogs::URI::Label::Testcases='http://localhost:8080/change.txt'
+testfailure test -e foo.changelog
-testequal 'E: changelog download failed' aptget changelog apt -qq -d -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
-testfailure test -e apt.changelog
+testequal 'E: Failed to fetch http://localhost:8080/does/not/exist/main/f/foo/foo_1.0/change.txt Changelog unavailable for foo=1.0 (404 Not Found)
+' aptget changelog foo -qq -d -o Acquire::Changelogs::URI::Label::Testcases='http://localhost:8080/does/not/exist/CHANGEPATH/change.txt'
+testfailure test -e foo.changelog
diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download
index 6503bbd1c..fa0b65672 100755
--- a/test/integration/test-apt-get-download
+++ b/test/integration/test-apt-get-download
@@ -38,7 +38,7 @@ testdownload() {
APT="${APT}/${3}"
fi
msgtest "Test download of package file $1 with" "$APT"
- testsuccess --nomsg aptget download ${APT}
+ testsuccess --nomsg aptget download ${APT} -o Debug::pkgAcquire::Worker=1 -o Debug::pkgAcquire::Auth=1
testsuccess test -f "$1"
rm -f "$1"
}
diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb
index 0f34692fe..bd720bede 100755
--- a/test/integration/test-apt-get-install-deb
+++ b/test/integration/test-apt-get-install-deb
@@ -5,23 +5,58 @@ TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
-configarchitecture "i386"
+configarchitecture 'amd64' 'i386'
# regression test for #754904
testfailureequal 'E: Unable to locate package /dev/null' aptget install -qq /dev/null
-# and ensure we fail for invalid debs
-cat > foo.deb <<EOF
+# only consider .deb files
+cat > foo.rpm <<EOF
I'm not a deb, I'm a teapot.
EOF
+testfailureequal "E: Unable to locate package ./foo.rpm
+E: Couldn't find any package by glob './foo.rpm'
+E: Couldn't find any package by regex './foo.rpm'" aptget install -qq ./foo.rpm
+
+# and ensure we fail for invalid debs
+mv foo.rpm foo.deb
testfailure aptget install ./foo.deb
testsuccess grep '^E: Sub-process Popen returned an error code' rootdir/tmp/testfailure.output
-testequal 'E: Encountered a section with no Package: header
-E: Problem with MergeLister for ./foo.deb
-E: The package lists or status file could not be parsed or opened.' tail -n 3 rootdir/tmp/testfailure.output
+testequal "E: Encountered a section with no Package: header
+E: Problem with MergeList ${TMPWORKINGDIRECTORY}/foo.deb
+E: The package lists or status file could not be parsed or opened." tail -n 3 rootdir/tmp/testfailure.output
# fakeroot is currently not found, framwork needs updating
-buildsimplenativepackage 'foo' 'all' '1.0'
+buildsimplenativepackage 'foo' 'i386,amd64' '1.0'
+
+testfailureequal "Reading package lists...
+Building dependency tree...
+Note, selecting 'foo:i386' instead of './incoming/foo_1.0_i386.deb'
+Note, selecting 'foo' instead of './incoming/foo_1.0_amd64.deb'
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ foo:i386 : Conflicts: foo but 1.0 is to be installed
+ foo : Conflicts: foo:i386 but 1.0 is to be installed
+E: Unable to correct problems, you have held broken packages." aptget install ./incoming/foo_1.0_i386.deb ./incoming/foo_1.0_amd64.deb -s -q=0
+
testdpkgnotinstalled 'foo'
-testsuccess aptget install ./incoming/foo_1.0_all.deb
+testsuccess aptget install ./incoming/foo_1.0_i386.deb -o Debug::pkgCacheGen=1
testdpkginstalled 'foo'
+
+testsuccessequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+Note, selecting 'foo' instead of './incoming/foo_1.0_amd64.deb'
+The following packages will be REMOVED:
+ foo:i386
+The following NEW packages will be installed:
+ foo
+0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+Remv foo:i386 [1.0]
+Inst foo (1.0 local-deb [amd64])
+Conf foo (1.0 local-deb [amd64])" aptget install ./incoming/foo_1.0_amd64.deb -s -q=0
diff --git a/test/integration/test-apt-get-source b/test/integration/test-apt-get-source
index 9db24370f..22f01b997 100755
--- a/test/integration/test-apt-get-source
+++ b/test/integration/test-apt-get-source
@@ -34,43 +34,40 @@ APTARCHIVE=$(readlink -f ./aptarchive)
# normal operation gets highest version number
HEADER="Reading package lists...
Building dependency tree..."
+DOWNLOAD1="Need to get 0 B/25 B of source archives.
+'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 11 MD5Sum:b998e085e36cf162e6a33c2801318fef
+'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 14 MD5Sum:d46b9a02af8487cbeb49165540c88184"
+DOWNLOAD2="Need to get 0 B/25 B of source archives.
+'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 11 MD5Sum:c0de572c6f8aa576c8ff78c81132ed55
+'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 14 MD5Sum:e10bb487c375b2b938d27bd31c2d1f5f"
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo
+$DOWNLOAD2" aptget source -q --print-uris foo
# select by release: suite
testsuccessequal "$HEADER
Selected version '1.0' (stable) for foo
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo/stable
+$DOWNLOAD1" aptget source -q --print-uris foo/stable
testsuccessequal "$HEADER
Selected version '2.0' (unstable) for foo
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo/unstable
+$DOWNLOAD2" aptget source -q --print-uris foo/unstable
# select by release: codename
testsuccessequal "$HEADER
Selected version '2.0' (sid) for foo
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo/sid
+$DOWNLOAD2" aptget source -q --print-uris foo/sid
# select by version
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo=1.0
+$DOWNLOAD1" aptget source -q --print-uris foo=1.0
# select by release with no binary package (Bug#731102) but ensure to get
# highest version
+DOWNLOAD01="Need to get 0 B/25 B of source archives.
+'file://${APTARCHIVE}/foo_0.1.dsc' foo_0.1.dsc 11 MD5Sum:0811a4d85238056c613ea897f49f01af
+'file://${APTARCHIVE}/foo_0.1.tar.gz' foo_0.1.tar.gz 14 MD5Sum:fa1ecb7a1a53e8e6f6551ca7db888a61"
testsuccessequal "$HEADER
Selected version '0.1' (wheezy) for foo
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_0.1.dsc' foo_0.1.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_0.1.tar.gz' foo_0.1.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo/wheezy
+$DOWNLOAD01" aptget source -q --print-uris foo/wheezy
# unavailable one
testfailureequal "$HEADER
@@ -78,11 +75,12 @@ E: Can not find version '9.9-not-there' of package 'foo'
E: Unable to find a source package for foo" aptget source -q --print-uris foo=9.9-not-there
# version and release
+DOWNLOAD001="Need to get 0 B/29 B of source archives.
+'file://${APTARCHIVE}/foo_0.0.1.dsc' foo_0.0.1.dsc 13 MD5Sum:6c819ebf0a21b1a480e1dbf6b8edfebd
+'file://${APTARCHIVE}/foo_0.0.1.tar.gz' foo_0.0.1.tar.gz 16 MD5Sum:a3c7e1ac2159fc0faf522e110d6906fd"
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_0.0.1.dsc' foo_0.0.1.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_0.0.1.tar.gz' foo_0.0.1.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris -t unstable foo=0.0.1
+$DOWNLOAD001" aptget source -q --print-uris -t unstable foo=0.0.1
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
+Need to get 0 B/25 B of source archives.
Fetch source foo" aptget source -q -s foo
diff --git a/test/integration/test-apt-get-source-arch b/test/integration/test-apt-get-source-arch
index c75798209..f54bb6012 100755
--- a/test/integration/test-apt-get-source-arch
+++ b/test/integration/test-apt-get-source-arch
@@ -28,31 +28,30 @@ APTARCHIVE=$(readlink -f ./aptarchive)
HEADER="Reading package lists...
Building dependency tree..."
+DOWNLOAD10="Need to get 0 B/25 B of source archives.
+'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 11 MD5Sum:b998e085e36cf162e6a33c2801318fef
+'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 14 MD5Sum:d46b9a02af8487cbeb49165540c88184"
# pick :amd64
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:amd64
+$DOWNLOAD10" aptget source -q --print-uris foo:amd64
# pick :i386
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:i386
+Need to get 0 B/25 B of source archives.
+'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 11 MD5Sum:c0de572c6f8aa576c8ff78c81132ed55
+'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 14 MD5Sum:e10bb487c375b2b938d27bd31c2d1f5f" aptget source -q --print-uris foo:i386
# pick :i386 by release
testsuccessequal "$HEADER
Selected version '0.1' (oldstable) for foo
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_0.1.dsc' foo_0.1.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_0.1.tar.gz' foo_0.1.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:i386/oldstable
+Need to get 0 B/25 B of source archives.
+'file://${APTARCHIVE}/foo_0.1.dsc' foo_0.1.dsc 11 MD5Sum:0811a4d85238056c613ea897f49f01af
+'file://${APTARCHIVE}/foo_0.1.tar.gz' foo_0.1.tar.gz 14 MD5Sum:fa1ecb7a1a53e8e6f6551ca7db888a61" aptget source -q --print-uris foo:i386/oldstable
# pick :i386 by version
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:i386=1.0
+$DOWNLOAD10" aptget source -q --print-uris foo:i386=1.0
# error on unknown arch
testfailureequal "$HEADER
diff --git a/test/integration/test-apt-get-source-authenticated b/test/integration/test-apt-get-source-authenticated
index 685bc566b..da63f7cb3 100755
--- a/test/integration/test-apt-get-source-authenticated
+++ b/test/integration/test-apt-get-source-authenticated
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Regression test for debian bug #749795. Ensure that we fail with
-# a error if apt-get source foo will download a source that comes
+# an error if apt-get source foo will download a source that comes
# from a unauthenticated repository
#
set -e
diff --git a/test/integration/test-apt-get-source-multisources b/test/integration/test-apt-get-source-multisources
index 03d0400a0..887a30685 100755
--- a/test/integration/test-apt-get-source-multisources
+++ b/test/integration/test-apt-get-source-multisources
@@ -20,11 +20,11 @@ APTARCHIVE=$(readlink -f ./aptarchive)
HEADER="Reading package lists...
Building dependency tree..."
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/adduser_3.113+nmu3.dsc' adduser_3.113+nmu3.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/python-fll_0.9.11.dsc' python-fll_0.9.11.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -qdy --print-uris --dsc-only adduser=3.113 python-fll=0.9.11
+Need to get 0 B/43 B of source archives.
+'file://${APTARCHIVE}/adduser_3.113+nmu3.dsc' adduser_3.113+nmu3.dsc 22 MD5Sum:255405ab5af211238ef53b7a1dd8ca4b
+'file://${APTARCHIVE}/python-fll_0.9.11.dsc' python-fll_0.9.11.dsc 21 MD5Sum:740a9dbf02a295932f15b1415d0dc0df" aptget source -qdy --print-uris --dsc-only adduser=3.113 python-fll=0.9.11
testsuccessequal "$HEADER
-Need to get 0 B of source archives.
-'file://${APTARCHIVE}/python-fll_0.9.11.dsc' python-fll_0.9.11.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/adduser_3.113+nmu3.dsc' adduser_3.113+nmu3.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -qdy --print-uris --dsc-only python-fll=0.9.11 adduser=3.113
+Need to get 0 B/43 B of source archives.
+'file://${APTARCHIVE}/python-fll_0.9.11.dsc' python-fll_0.9.11.dsc 21 MD5Sum:740a9dbf02a295932f15b1415d0dc0df
+'file://${APTARCHIVE}/adduser_3.113+nmu3.dsc' adduser_3.113+nmu3.dsc 22 MD5Sum:255405ab5af211238ef53b7a1dd8ca4b" aptget source -qdy --print-uris --dsc-only python-fll=0.9.11 adduser=3.113
diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning
index 81c01ba3e..4c45f8f26 100755
--- a/test/integration/test-apt-get-update-unauth-warning
+++ b/test/integration/test-apt-get-update-unauth-warning
@@ -9,6 +9,7 @@ TESTDIR=$(readlink -f $(dirname $0))
setupenvironment
configarchitecture "i386"
+configcompression '.' 'gz'
# a "normal" package with source and binary
buildsimplenativepackage 'foo' 'all' '2.0'
@@ -19,11 +20,13 @@ APTARCHIVE=$(readlink -f ./aptarchive)
rm -f $APTARCHIVE/dists/unstable/*Release*
# update without authenticated files leads to warning
-testfailureequal "Ign file: unstable InRelease
+testfailureequal "Get:1 file:$APTARCHIVE unstable InRelease
+Ign:1 file:$APTARCHIVE unstable InRelease
File not found
-Err file: unstable Release
+Get:2 file:$APTARCHIVE unstable Release
+Err:2 file:$APTARCHIVE unstable Release
File not found
-W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository.
+W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository.
E: Use --allow-insecure-repositories to force the update" aptget update --no-allow-insecure-repositories
# no package foo
@@ -31,14 +34,51 @@ testsuccessequal 'Listing...' apt list foo
testequal 'lock
partial' ls rootdir/var/lib/apt/lists
+filesize() {
+ stat -c%s "$(aptget indextargets --no-release-info --format '$(URI)' "Created-By: $1" | cut -d'/' -f 3- ).gz"
+}
# allow override
-testwarningequal "Ign file: unstable InRelease
+#aptget update --allow-insecure-repositories -o Debug::pkgAcquire::worker=1
+#exit
+testwarningequal "Get:1 file:$APTARCHIVE unstable InRelease
+Ign:1 file:$APTARCHIVE unstable InRelease
File not found
-Ign file: unstable Release
+Get:2 file:$APTARCHIVE unstable Release
+Ign:2 file:$APTARCHIVE unstable Release
File not found
+Get:3 file:$APTARCHIVE unstable/main Sources
+Ign:3 file:$APTARCHIVE unstable/main Sources
+ File not found
+Get:4 file:$APTARCHIVE unstable/main i386 Packages
+Ign:4 file:$APTARCHIVE unstable/main i386 Packages
+ File not found
+Get:5 file:$APTARCHIVE unstable/main Translation-en
+Ign:5 file:$APTARCHIVE unstable/main Translation-en
+ File not found
+Get:3 file:$APTARCHIVE unstable/main Sources
+Ign:3 file:$APTARCHIVE unstable/main Sources
+ File not found
+Get:4 file:$APTARCHIVE unstable/main i386 Packages
+Ign:4 file:$APTARCHIVE unstable/main i386 Packages
+ File not found
+Get:5 file:$APTARCHIVE unstable/main Translation-en
+Ign:5 file:$APTARCHIVE unstable/main Translation-en
+ File not found
+Get:3 file:$APTARCHIVE unstable/main Sources
+Ign:3 file:$APTARCHIVE unstable/main Sources
+ File not found
+Get:4 file:$APTARCHIVE unstable/main i386 Packages
+Ign:4 file:$APTARCHIVE unstable/main i386 Packages
+ File not found
+Get:5 file:$APTARCHIVE unstable/main Translation-en
+Ign:5 file:$APTARCHIVE unstable/main Translation-en
+ File not found
+Get:3 file:$APTARCHIVE unstable/main Sources [$(filesize 'Sources') B]
+Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages') B]
+Get:5 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B]
Reading package lists...
-W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." aptget update --allow-insecure-repositories
+W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." aptget update --allow-insecure-repositories
# ensure we can not install the package
testfailureequal "WARNING: The following packages cannot be authenticated!
foo
-E: There are problems and -y was used without --force-yes" aptget install -qq -y foo
+E: There were unauthenticated packages and -y was used without --allow-unauthenticated" aptget install -qq -y foo
diff --git a/test/integration/test-apt-helper b/test/integration/test-apt-helper
index 431210797..00d859ad5 100755
--- a/test/integration/test-apt-helper
+++ b/test/integration/test-apt-helper
@@ -14,32 +14,32 @@ test_apt_helper_download() {
echo 'bar' > aptarchive/foo2
msgtest 'apt-file download-file md5sum'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo2 MD5Sum:d3b07384d113edec49eaa6238ad5ff00
- testfileequal foo2 'foo'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo2 MD5Sum:d3b07384d113edec49eaa6238ad5ff00
+ testfileequal ./downloaded/foo2 'foo'
msgtest 'apt-file download-file sha1'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo1 SHA1:f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
- testfileequal foo1 'foo'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo1 SHA1:f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
+ testfileequal ./downloaded/foo1 'foo'
msgtest 'apt-file download-file sha256'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo3 SHA256:b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
- testfileequal foo3 'foo'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo3 SHA256:b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
+ testfileequal ./downloaded/foo3 'foo'
msgtest 'apt-file download-file no-hash'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo4
- testfileequal foo4 'foo'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo4
+ testfileequal ./downloaded/foo4 'foo'
msgtest 'apt-file download-file wrong hash'
- testfailure --nomsg apthelper -qq download-file http://localhost:8080/foo foo5 MD5Sum:aabbcc
+ testfailure --nomsg apthelper -qq download-file http://localhost:8080/foo ./downloaded/foo5 MD5Sum:aabbcc
testfileequal rootdir/tmp/testfailure.output 'E: Failed to fetch http://localhost:8080/foo Hash Sum mismatch
E: Download Failed'
- testfileequal foo5.FAILED 'foo'
+ testfileequal ./downloaded/foo5.FAILED 'foo'
msgtest 'apt-file download-file md5sum sha1'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo6 MD5Sum:d3b07384d113edec49eaa6238ad5ff00 http://localhost:8080/foo2 foo7 SHA1:e242ed3bffccdf271b7fbaf34ed72d089537b42f
- testfileequal foo6 'foo'
- testfileequal foo7 'bar'
+ testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo6 MD5Sum:d3b07384d113edec49eaa6238ad5ff00 http://localhost:8080/foo2 ./downloaded/foo7 SHA1:e242ed3bffccdf271b7fbaf34ed72d089537b42f
+ testfileequal ./downloaded/foo6 'foo'
+ testfileequal ./downloaded/foo7 'bar'
}
test_apt_helper_detect_proxy() {
diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key
index 486acccc8..a1a0d883d 100755
--- a/test/integration/test-apt-key
+++ b/test/integration/test-apt-key
@@ -13,11 +13,33 @@ cleanplate() {
mkdir rootdir/etc/apt/trusted.gpg.d/
}
+createlistofkeys() {
+ while [ -n "$1" ]; do
+ # gpg 2.1 has a slightly different output format
+ if grep -q ' rsa2048/' aptkey.list; then
+ case "$1" in
+ *Joe*|*Sixpack*) echo 'pub rsa2048/DBAC8DAE 2010-08-18';;
+ *Rex*|*Expired*) echo 'pub rsa2048/27CE74F9 2013-07-12 [expired: 2013-07-13]';;
+ *Marvin*|*Paranoid*) echo 'pub rsa2048/528144E2 2011-01-16';;
+ *) echo 'UNKNOWN KEY';;
+ esac
+ else
+ case "$1" in
+ *Joe*|*Sixpack*) echo 'pub 2048R/DBAC8DAE 2010-08-18';;
+ *Rex*|*Expired*) echo 'pub 2048R/27CE74F9 2013-07-12 [expired: 2013-07-13]';;
+ *Marvin*|*Paranoid*) echo 'pub 2048R/528144E2 2011-01-16';;
+ *) echo 'UNKNOWN KEY';;
+ esac
+ fi
+ shift
+ done
+}
+
testaptkeys() {
if ! aptkey list | grep '^pub' > aptkey.list; then
echo -n > aptkey.list
fi
- testfileequal './aptkey.list' "$1"
+ testfileequal './aptkey.list' "$(createlistofkeys "$@")"
}
echo 'APT::Key::ArchiveKeyring "./keys/joesixpack.pub";
@@ -32,16 +54,15 @@ testrun() {
msgtest 'Check that paths in finger output are not' 'double-slashed'
aptkey finger 2>&1 | grep -q '//' && msgfail || msgpass
-
- testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18'
+ testaptkeys 'Joe Sixpack'
testsuccessequal 'gpg: key DBAC8DAE: "Joe Sixpack (APT Testcases Dummy) <joe@example.org>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1' aptkey --fakeroot update
- testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18'
-
+ testaptkeys 'Joe Sixpack'
testfailure test -e rootdir/etc/apt/trusted.gpg
+
testsuccess aptkey --fakeroot add ./keys/rexexpired.pub
msgtest 'Check if trusted.gpg is created with permissions set to' '0644'
if [ "$(stat -c '%a' rootdir/etc/apt/trusted.gpg )" = '644' ]; then
@@ -50,8 +71,7 @@ gpg: unchanged: 1' aptkey --fakeroot update
msgfail
fi
- testaptkeys 'pub 2048R/27CE74F9 2013-07-12 [expired: 2013-07-13]
-pub 2048R/DBAC8DAE 2010-08-18'
+ testaptkeys 'Rex Expired' 'Joe Sixpack'
msgtest 'Check that Sixpack key can be' 'exported'
aptkey export 'Sixpack' > aptkey.export
@@ -63,17 +83,17 @@ pub 2048R/DBAC8DAE 2010-08-18'
msgtest 'Execute update again to trigger removal of' 'Rex Expired key'
testsuccess --nomsg aptkey --fakeroot update
- testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18'
+ testaptkeys 'Joe Sixpack'
msgtest "Try to remove a key which exists, but isn't in the" 'forced keyring'
testsuccess --nomsg aptkey --fakeroot --keyring rootdir/etc/apt/trusted.gpg del DBAC8DAE
- testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18'
+ testaptkeys 'Joe Sixpack'
testsuccess aptkey --fakeroot del DBAC8DAE
testempty aptkey list
- msgtest 'Test key removal with' 'lowercase key ID' #keylength somewher between 8byte and short
+ msgtest 'Test key removal with' 'lowercase key ID' #keylength somewhere between 8byte and short
cleanplate
cp -a keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
testsuccess --nomsg aptkey --fakeroot del d141dbac8dae
@@ -114,22 +134,21 @@ pub 2048R/DBAC8DAE 2010-08-18'
cleanplate
testsuccess aptkey --fakeroot add ./keys/joesixpack.pub
testsuccess aptkey --fakeroot add ./keys/marvinparanoid.pub
- testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18
-pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Joe Sixpack' 'Marvin Paranoid'
cp -a rootdir/etc/apt/trusted.gpg keys/testcase-multikey.pub # store for reuse
msgtest 'Test key removal with' 'multi key in real file'
cleanplate
cp -a keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg
testsuccess --nomsg aptkey --fakeroot del DBAC8DAE
- testaptkeys 'pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Marvin Paranoid'
testsuccess cmp keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg~
msgtest 'Test key removal with' 'multi key in softlink'
cleanplate
ln -s $(readlink -f ./keys/testcase-multikey.pub) rootdir/etc/apt/trusted.gpg.d/multikey.gpg
testsuccess --nomsg aptkey --fakeroot del DBAC8DAE
- testaptkeys 'pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Marvin Paranoid'
testsuccess cmp keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg~
testfailure test -L rootdir/etc/apt/trusted.gpg.d/multikey.gpg
testsuccess test -L rootdir/etc/apt/trusted.gpg.d/multikey.gpg~
@@ -139,7 +158,7 @@ pub 2048R/528144E2 2011-01-16'
cp -a keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
cp -a keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg
testsuccess --nomsg aptkey --fakeroot del DBAC8DAE
- testaptkeys 'pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Marvin Paranoid'
testfailure test -e rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
testsuccess cmp keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg~
testsuccess cmp keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg~
@@ -147,37 +166,66 @@ pub 2048R/528144E2 2011-01-16'
cleanplate
cp -a keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
cp -a keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg
- testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18
-pub 2048R/DBAC8DAE 2010-08-18
-pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Joe Sixpack' 'Joe Sixpack' 'Marvin Paranoid'
msgtest 'Test merge-back of' 'added keys'
testsuccess --nomsg aptkey adv --batch --yes --import keys/rexexpired.pub
- testaptkeys 'pub 2048R/27CE74F9 2013-07-12 [expired: 2013-07-13]
-pub 2048R/DBAC8DAE 2010-08-18
-pub 2048R/DBAC8DAE 2010-08-18
-pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Rex Expired' 'Joe Sixpack' 'Joe Sixpack' 'Marvin Paranoid'
msgtest 'Test merge-back of' 'removed keys'
testsuccess --nomsg aptkey adv --batch --yes --delete-keys 27CE74F9
- testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18
-pub 2048R/DBAC8DAE 2010-08-18
-pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Joe Sixpack' 'Joe Sixpack' 'Marvin Paranoid'
msgtest 'Test merge-back of' 'removed duplicate keys'
testsuccess --nomsg aptkey adv --batch --yes --delete-keys DBAC8DAE
- testaptkeys 'pub 2048R/528144E2 2011-01-16'
+ testaptkeys 'Marvin Paranoid'
+
+ cleanplate
+ cp -a keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
+ cp -a keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg
+ msgtest 'Test signing a file' 'with a key'
+ echo 'Verify me. This is my signature.' > signature
+ testsuccess --nomsg aptkey --quiet --keyring keys/marvinparanoid.pub --secret-keyring keys/marvinparanoid.sec --readonly \
+ adv --batch --yes --default-key 'Marvin' --armor --detach-sign --sign --output signature.gpg signature
+
+
+ for GPGV in '' 'gpgv' 'gpgv2'; do
+ echo "APT::Key::GPGVCommand \"$GPGV\";" > rootdir/etc/apt/apt.conf.d/00gpgvcmd
+
+ msgtest 'Test verify a file' 'with all keys'
+ testsuccess --nomsg aptkey --quiet --readonly verify signature.gpg signature
+
+ msgtest 'Test verify a file' 'with good keyring'
+ testsuccess --nomsg aptkey --quiet --readonly --keyring keys/testcase-multikey.pub verify signature.gpg signature
+
+ msgtest 'Test fail verify a file' 'with bad keyring'
+ testfailure --nomsg aptkey --quiet --readonly --keyring keys/joesixpack.pub verify signature.gpg signature
+
+ msgtest 'Test fail verify a file' 'with non-existing keyring'
+ testfailure --nomsg aptkey --quiet --readonly --keyring keys/does-not-exist.pub verify signature.gpg signature
+ testfailure test -e keys/does-not-exist.pub
+
+ # note: this isn't how apts gpgv method implements keyid for verify
+ msgtest 'Test verify a file' 'with good keyid'
+ testsuccess --nomsg aptkey --quiet --readonly --keyid 'Paranoid' verify signature.gpg signature
+
+ msgtest 'Test fail verify a file' 'with bad keyid'
+ testfailure --nomsg aptkey --quiet --readonly --keyid 'Sixpack' verify signature.gpg signature
+
+ msgtest 'Test fail verify a file' 'with non-existing keyid'
+ testfailure --nomsg aptkey --quiet --readonly --keyid 'Kalnischkies' verify signature.gpg signature
+
+ msgtest 'Test verify fails on' 'bad file'
+ echo 'lalalalala' > signature2
+ testfailure --nomsg aptkey --quiet --readonly verify signature.gpg signature2
+ done
}
setupgpgcommand() {
echo "APT::Key::GPGCommand \"$1\";" > rootdir/etc/apt/apt.conf.d/00gpgcmd
- msgtest 'Test that apt-key uses for the following tests command' "$1"
- aptkey adv --version >aptkey.version 2>&1
- if grep -q "^Executing: $1 --" aptkey.version; then
- msgpass
- else
- cat aptkey.version
- msgfail
- fi
+ msgmsg 'Force tests to be run with' "$1"
+ testsuccess aptkey --readonly adv --version
+ cp rootdir/tmp/testsuccess.output aptkey.version
+ testsuccess grep "^Executing: $1 --" aptkey.version
}
# run with default (whatever this is)
@@ -187,4 +235,3 @@ setupgpgcommand 'gpg'
testrun
setupgpgcommand 'gpg2'
testrun
-
diff --git a/test/integration/test-apt-move-and-forget-manual-sections b/test/integration/test-apt-move-and-forget-manual-sections
new file mode 100755
index 000000000..845444f53
--- /dev/null
+++ b/test/integration/test-apt-move-and-forget-manual-sections
@@ -0,0 +1,31 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+aptconfig dump --no-empty --format '%v%n' APT::Move-Autobit-Sections > move-autobit.sections
+testsuccess grep '^oldlibs$' move-autobit.sections
+
+buildsimplenativepackage 'libabc' 'amd64' '1' 'stable' '' '' 'libs'
+buildsimplenativepackage 'libabc' 'amd64' '2' 'unstable' 'Depends: libdef' '' 'oldlibs'
+buildsimplenativepackage 'libdef' 'amd64' '1' 'unstable' '' '' 'libs'
+setupaptarchive
+
+testmarkedauto
+testmarkedmanual
+
+testsuccess aptget install libabc/stable -y
+testdpkginstalled 'libabc'
+testdpkgnotinstalled 'libdef'
+
+testmarkedmanual 'libabc'
+testmarkedauto
+
+testsuccess aptget dist-upgrade -y
+testdpkginstalled 'libabc' 'libdef'
+
+testmarkedauto 'libabc'
+testmarkedmanual 'libdef'
diff --git a/test/integration/test-apt-never-markauto-sections b/test/integration/test-apt-never-markauto-sections
new file mode 100755
index 000000000..9f490a1bd
--- /dev/null
+++ b/test/integration/test-apt-never-markauto-sections
@@ -0,0 +1,86 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+aptconfig dump --no-empty --format '%v%n' APT::Never-MarkAuto-Sections > nevermarkauto.sections
+testsuccess grep '^metapackages$' nevermarkauto.sections
+
+buildsimplenativepackage 'mydesktop' 'all' '1' 'unstable' 'Depends: mydesktop-core, foreignpkg
+Recommends: notavailable' '' 'metapackages'
+buildsimplenativepackage 'mydesktop-core' 'amd64' '1' 'unstable' 'Depends: bad-texteditor | texteditor, browser (>= 42), nosection, foreignpkg
+Recommends: notavailable
+Multi-Arch: foreign' '' 'metapackages'
+buildsimplenativepackage 'browser' 'amd64' '41' 'stable'
+buildsimplenativepackage 'browser' 'amd64' '42' 'unstable'
+buildsimplenativepackage 'texteditor' 'amd64' '1' 'stable'
+buildsimplenativepackage 'bad-texteditor' 'amd64' '1' 'stable' 'Depends: texteditor
+Conflicts: mydesktop-core'
+buildsimplenativepackage 'nosection' 'amd64' '1' 'stable' '' '' '<none>'
+buildsimplenativepackage 'foreignpkg' 'i386' '1' 'stable' 'Multi-Arch: foreign'
+setupaptarchive
+
+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
+
+testmarkedmanual 'dpkg' 'mydesktop'
+testmarkedauto 'mydesktop-core' 'foreignpkg:i386' 'texteditor' 'browser' 'nosection'
+
+# if the remove is from a user, don't do manual-bit passing
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ browser foreignpkg:i386 mydesktop mydesktop-core nosection texteditor
+0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
+Remv mydesktop [1]
+Remv mydesktop-core [1]
+Remv browser [42]
+Remv foreignpkg:i386 [1]
+Remv nosection [1]
+Remv texteditor [1]' aptget autoremove mydesktop -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ mydesktop mydesktop-core texteditor
+0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
+Remv mydesktop [1]
+Remv mydesktop-core [1]
+Remv texteditor [1]' aptget autoremove texteditor -s #-o Debug::pkgDepCache::AutoInstall=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1
+testsuccess aptget autoremove texteditor -y
+
+testdpkgnotinstalled mydesktop mydesktop-core texteditor
+testdpkginstalled browser
+
+testmarkedmanual 'browser' 'dpkg' 'foreignpkg:i386' 'nosection'
+testmarkedauto
+
+# test that installed/upgraded auto-pkgs are not set to manual
+
+testsuccess aptget install browser=41 -y --allow-downgrades
+
+testmarkedmanual 'browser' 'dpkg' 'foreignpkg:i386' 'nosection'
+testmarkedauto
+testsuccess aptmark auto browser
+testmarkedauto 'browser'
+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'
diff --git a/test/integration/test-apt-progress-fd b/test/integration/test-apt-progress-fd
index 0c11aba7e..e30d503cb 100755
--- a/test/integration/test-apt-progress-fd
+++ b/test/integration/test-apt-progress-fd
@@ -73,8 +73,6 @@ pmstatus:dpkg-exec:75:Running dpkg'
# install non-native and ensure we get proper progress info
exec 3> apt-progress.log
testsuccess aptget install testing2:i386 -y -o APT::Status-Fd=3
-
-# and compare
testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1
dlstatus:1:20:Retrieving file 1 of 1
pmstatus:dpkg-exec:0:Running dpkg
diff --git a/test/integration/test-apt-showlist-orgroup-in-recommends b/test/integration/test-apt-showlist-orgroup-in-recommends
new file mode 100755
index 000000000..929f7feb9
--- /dev/null
+++ b/test/integration/test-apt-showlist-orgroup-in-recommends
@@ -0,0 +1,158 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'i386'
+
+# simple case
+insertinstalledpackage 'aaa' 'all' '1'
+insertinstalledpackage 'ddd' 'all' '1'
+insertpackage 'unstable' 'aaa' 'all' '1'
+insertpackage 'unstable' 'ddd' 'all' '1'
+insertpackage 'unstable' 'yyy' 'all' '1'
+insertpackage 'unstable' 'zzz' 'all' '1:1'
+insertpackage 'unstable' 'simple' 'all' '1' 'Recommends: aaa, bbb
+Suggests: ccc, ddd'
+insertpackage 'unstable' 'orgroup' 'all' '1' 'Recommends: aaa | bbb
+Suggests: ccc | ddd'
+insertpackage 'unstable' 'orgroup2' 'all' '1' 'Recommends: xxx | yyy
+Suggests: yyy | zzz'
+insertpackage 'unstable' 'orgroup3' 'all' '1' 'Recommends: xxx | yyy
+Suggests: yyy | zzz'
+insertpackage 'unstable' 'orgroup4' 'all' '1' 'Recommends: xxx
+Suggests: zzz'
+insertpackage 'unstable' 'versionedor' 'all' '1' 'Recommends: aaa (>> 2) | bbb
+Suggests: ccc | ddd (>> 2)'
+
+setupaptarchive
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ ccc
+Recommended packages:
+ bbb
+The following NEW packages will be installed:
+ simple
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst simple (1 unstable [all])
+Conf simple (1 unstable [all])' aptget install simple -s --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ ccc
+Recommended packages:
+ aaa bbb
+The following packages will be REMOVED:
+ aaa
+The following NEW packages will be installed:
+ simple
+0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+Remv aaa [1]
+Inst simple (1 unstable [all])
+Conf simple (1 unstable [all])' aptget install simple aaa- -s --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ orgroup
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst orgroup (1 unstable [all])
+Conf orgroup (1 unstable [all])' aptget install orgroup -s --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Recommended packages:
+ aaa | bbb
+The following packages will be REMOVED:
+ aaa
+The following NEW packages will be installed:
+ orgroup
+0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+Remv aaa [1]
+Inst orgroup (1 unstable [all])
+Conf orgroup (1 unstable [all])' aptget install orgroup aaa- -s --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ yyy | zzz
+Recommended packages:
+ xxx | yyy
+The following NEW packages will be installed:
+ orgroup2
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst orgroup2 (1 unstable [all])
+Conf orgroup2 (1 unstable [all])' aptget install orgroup2 -s --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ yyy | zzz
+Recommended packages:
+ xxx | yyy
+The following NEW packages will be installed:
+ orgroup2 orgroup3
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst orgroup2 (1 unstable [all])
+Inst orgroup3 (1 unstable [all])
+Conf orgroup2 (1 unstable [all])
+Conf orgroup3 (1 unstable [all])' aptget install orgroup2 orgroup3 -s --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ yyy | zzz zzz
+Recommended packages:
+ xxx | yyy xxx
+The following NEW packages will be installed:
+ orgroup2 orgroup4
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst orgroup2 (1 unstable [all])
+Inst orgroup4 (1 unstable [all])
+Conf orgroup2 (1 unstable [all])
+Conf orgroup4 (1 unstable [all])' aptget install orgroup2 orgroup4 -s --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ yyy (1)
+ | zzz (1)
+ zzz (1)
+Recommended packages:
+ xxx
+ | yyy (1)
+ xxx
+The following NEW packages will be installed:
+ orgroup2 (1)
+ orgroup4 (1)
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst orgroup2 (1 unstable [all])
+Inst orgroup4 (1 unstable [all])
+Conf orgroup2 (1 unstable [all])
+Conf orgroup4 (1 unstable [all])' aptget install orgroup2 orgroup4 -s -V --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ zzz (1)
+Recommended packages:
+ xxx
+The following NEW packages will be installed:
+ orgroup2 (1)
+ orgroup4 (1)
+ yyy (1)
+0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Inst orgroup2 (1 unstable [all])
+Inst orgroup4 (1 unstable [all])
+Inst yyy (1 unstable [all])
+Conf orgroup2 (1 unstable [all])
+Conf orgroup4 (1 unstable [all])
+Conf yyy (1 unstable [all])' aptget install orgroup2 orgroup4 yyy -s -V --no-install-recommends
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Suggested packages:
+ ccc | ddd
+Recommended packages:
+ aaa | bbb
+The following NEW packages will be installed:
+ versionedor
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst versionedor (1 unstable [all])
+Conf versionedor (1 unstable [all])' aptget install versionedor -s --no-install-recommends
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index d8b2334ad..adfe0e003 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -7,9 +7,8 @@ TESTDIR=$(readlink -f $(dirname $0))
setupenvironment
configarchitecture 'i386'
-echo 'APT::Sources::Use-Deb822 "true";' > rootdir/etc/apt/apt.conf.d/00enabledeb822
-
-SOURCES='rootdir/etc/apt/sources.list'
+LISTS='rootdir/etc/apt/sources.list.d/test.list'
+SOURCES='rootdir/etc/apt/sources.list.d/test.sources'
BASE='# some comment
# that contains a : as well
#Types: meep
@@ -17,64 +16,101 @@ BASE='# some comment
Types: deb
URIs: http://ftp.debian.org/debian
Suites: stable
-Sections: main
+Components: main
Description: summay
and the long part'
-msgtest 'Test sources.list' 'old style'
-echo "deb http://ftp.debian.org/debian stable main" > $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
-'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
+msgcleantest() {
+ rm -f $LISTS $SOURCES
+ msgtest "$@"
+}
-msgtest 'Test sources.list' 'simple deb822'
-echo "$BASE" > $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
-'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
+msgcleantest 'Test sources.list' 'old style'
+echo "deb http://ftp.debian.org/debian stable main" > $LISTS
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
+
+msgcleantest 'Test sources.list' 'old style with options'
+echo "deb [trusted=yes arch+=armel,powerpc] http://ftp.debian.org/debian stable main" > $LISTS
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-powerpc/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-powerpc_Packages 0
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
+
+msgcleantest 'Test sources.list' 'old style with comments'
+echo "deb http://ftp.debian.org/debian stable main # non-free" > $LISTS
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
+
+msgcleantest 'Test sources.list' 'old style with option comments'
+echo "deb [trusted=yes#yeahreally] http://ftp.debian.org/debian stable main # non-free" > $LISTS
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
+msgcleantest 'Test sources.list' 'simple deb822'
+echo "$BASE" > $SOURCES
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
-msgtest 'Test deb822 with' 'two entries'
+msgcleantest 'Test deb822 with' 'two entries'
# Two entries
echo "$BASE" > $SOURCES
echo "" >> $SOURCES
echo "$BASE" | sed s/stable/unstable/ >> $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0
'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0
-'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 " aptget update --print-uris
+'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris
# two suite entries
-msgtest 'Test deb822 with' 'two Suite entries'
+msgcleantest 'Test deb822 with' 'two Suite entries'
echo "$BASE" | sed -e "s/stable/stable unstable/" > $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0
'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0
-'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 " aptget update --print-uris
+'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris
-msgtest 'Test deb822' 'architecture option'
+msgcleantest 'Test deb822' 'architecture option'
echo "$BASE" > $SOURCES
echo "Architectures: amd64 armel" >> $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0
-'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
-
-
-msgtest 'Test old-style sources.list file which has' 'malformed dist'
-echo "deb http://ftp.debian.org" > $SOURCES
-testequal --nomsg "E: Malformed line 1 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (dist)
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
+
+msgcleantest 'Test old-style' 'suite arch variable'
+echo 'deb http://ftp.tlh.debian.org/universe unstable/binary-$(ARCH)/' > $LISTS
+testequal --nomsg "'http://ftp.tlh.debian.org/universe/unstable/binary-i386/InRelease' ftp.tlh.debian.org_universe_unstable_binary-i386_InRelease 0
+'http://ftp.tlh.debian.org/universe/unstable/binary-i386/Packages.bz2' ftp.tlh.debian.org_universe_unstable_binary-i386_Packages 0
+'http://ftp.tlh.debian.org/universe/unstable/binary-i386/en.bz2' ftp.tlh.debian.org_universe_unstable_binary-i386_en 0 " aptget update --print-uris
+
+msgcleantest 'Test deb822' 'suite arch variable'
+echo 'Types: deb
+URIs: http://ftp.tlh.debian.org/universe
+Suites: stable/binary-$(ARCH)/' > $SOURCES
+testequal --nomsg "'http://ftp.tlh.debian.org/universe/stable/binary-i386/InRelease' ftp.tlh.debian.org_universe_stable_binary-i386_InRelease 0
+'http://ftp.tlh.debian.org/universe/stable/binary-i386/Packages.bz2' ftp.tlh.debian.org_universe_stable_binary-i386_Packages 0
+'http://ftp.tlh.debian.org/universe/stable/binary-i386/en.bz2' ftp.tlh.debian.org_universe_stable_binary-i386_en 0 " aptget update --print-uris
+
+msgcleantest 'Test old-style sources.list file which has' 'malformed dist'
+echo "deb http://ftp.debian.org" > $LISTS
+testequal --nomsg "E: Malformed entry 1 in list file $TMPWORKINGDIRECTORY/$LISTS (Suite)
E: The list of sources could not be read." aptget update --print-uris
-msgtest 'Test deb822 sources.list file which has' 'malformed URI'
+msgcleantest 'Test deb822 sources.list file which has' 'malformed URI'
echo "Types: deb
Suites: stable
" > $SOURCES
-testequal --nomsg "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
+testequal --nomsg "E: Malformed entry 1 in sources file $TMPWORKINGDIRECTORY/$SOURCES (URI)
E: The list of sources could not be read." aptget update --print-uris
# with Enabled: false
@@ -83,30 +119,30 @@ echo "Enabled: no" >> $SOURCES
testempty aptget update --print-uris
# multiple URIs
-msgtest 'Test deb822 sources.list file which has' 'Multiple URIs work'
+msgcleantest 'Test deb822 sources.list file which has' 'Multiple URIs work'
echo "$BASE" | sed -e 's#http://ftp.debian.org/debian#http://ftp.debian.org/debian http://ftp.de.debian.org/debian#' > $SOURCES
-testequal --nomsg "'http://ftp.de.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages 0
+testequal --nomsg "'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp.de.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.de.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.de.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.de.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp.de.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
-'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
# multiple Type in one field
-msgtest 'Test deb822 sources.list file which has' 'Multiple Types work'
+msgcleantest 'Test deb822 sources.list file which has' 'Multiple Types work'
echo "$BASE" | sed -e 's#Types: deb#Types: deb deb-src#' > $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/source/Sources.bz2' ftp.debian.org_debian_dists_stable_main_source_Sources 0
+testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/source/Sources.bz2' ftp.debian.org_debian_dists_stable_main_source_Sources 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
-'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
-'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
# a Suite
-msgtest 'Test deb822 sources.list file which has' 'a exact path and no sections'
+msgcleantest 'Test deb822 sources.list file which has' 'an exact path and no sections'
cat > $SOURCES <<EOF
Types: deb
URIs: http://emacs.naquadah.org
Suites: stable/
EOF
-testequal --nomsg "'http://emacs.naquadah.org/stable/Packages.bz2' emacs.naquadah.org_stable_Packages 0
-'http://emacs.naquadah.org/stable/en.bz2' emacs.naquadah.org_stable_en 0
-'http://emacs.naquadah.org/stable/InRelease' emacs.naquadah.org_stable_InRelease 0 " aptget update --print-uris
+testequal --nomsg "'http://emacs.naquadah.org/stable/InRelease' emacs.naquadah.org_stable_InRelease 0
+'http://emacs.naquadah.org/stable/Packages.bz2' emacs.naquadah.org_stable_Packages 0
+'http://emacs.naquadah.org/stable/en.bz2' emacs.naquadah.org_stable_en 0 " aptget update --print-uris
diff --git a/test/integration/test-apt-translation-has-no-packages b/test/integration/test-apt-translation-has-no-packages
index 440fd30cf..ec2e1e43b 100755
--- a/test/integration/test-apt-translation-has-no-packages
+++ b/test/integration/test-apt-translation-has-no-packages
@@ -37,5 +37,5 @@ testsuccessequal "foo:
Installed: (none)
Candidate: 1.0
Version table:
- 1.0 0
- 500 file:$APTARCHIVE/ unstable/main amd64 Packages" aptcache policy foo
+ 1.0 500
+ 500 file:$APTARCHIVE unstable/main amd64 Packages" aptcache policy foo
diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size
index 55a5da848..24ca85133 100755
--- a/test/integration/test-apt-update-expected-size
+++ b/test/integration/test-apt-update-expected-size
@@ -26,7 +26,9 @@ test_inreleasetoobig() {
}
test_packagestoobig() {
- redatereleasefiles '+1hour'
+ insertpackage 'unstable' 'foo' 'all' '1.0'
+ buildaptarchivefromfiles '+1 hour'
+ signreleasefiles
# append junk at the end of the Packages.gz/Packages
SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
find aptarchive/dists -name 'Packages*' | while read pkg; do
@@ -35,7 +37,7 @@ test_packagestoobig() {
done
NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
testfailuremsg "W: Failed to fetch ${1}/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE)
-E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -o Debug::pkgAcquire::Worker=0 -o Debug::Acquire::Transaction=0
+E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::Transaction=0
}
methodtest() {
diff --git a/test/integration/test-apt-update-file b/test/integration/test-apt-update-file
index 1ecf9a38a..94b604f0e 100755
--- a/test/integration/test-apt-update-file
+++ b/test/integration/test-apt-update-file
@@ -22,14 +22,33 @@ addtrap 'prefix' 'chmod 750 aptarchive/dists/unstable/main/binary-amd64;'
chmod 550 aptarchive/dists/unstable/main/binary-amd64
testsuccess aptget update
+
+# the release files aren't an IMS-hit, but the indexes are
+redatereleasefiles '+1 hour'
+
+# we don't download the index if it isn't updated
testsuccess aptget update -o Debug::pkgAcquire::Auth=1
+# file:/ isn't shown in the log, so see if it was downloaded anyhow
cp -a rootdir/tmp/testsuccess.output rootdir/tmp/update.output
+canary="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-amd64/Packages.bz2 | sha512sum |cut -f1 -d' ')"
+testfailure grep -- "$canary" rootdir/tmp/update.output
+
+testfoo() {
+ # foo is still available
+ testsuccess aptget install -s foo
+ testsuccess aptcache showsrc foo
+ testsuccess aptget source foo --print-uris
+}
+testfoo
-# ensure that the hash of the uncompressed file was verified even on a local ims hit
+# the release file is new again, the index still isn't, but it is somehow gone now from disk
+redatereleasefiles '+2 hour'
+find rootdir/var/lib/apt/lists -name '*_Packages*' -delete
+
+testsuccess aptget update -o Debug::pkgAcquire::Auth=1
+# file:/ isn't shown in the log, so see if it was downloaded anyhow
+cp -a rootdir/tmp/testsuccess.output rootdir/tmp/update.output
canary="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-amd64/Packages.bz2 | sha512sum |cut -f1 -d' ')"
testsuccess grep -- "$canary" rootdir/tmp/update.output
-# foo is still available
-testsuccess aptget install -s foo
-testsuccess aptcache showsrc foo
-testsuccess aptget source foo --print-uris
+testfoo
diff --git a/test/integration/test-apt-update-filesize-mismatch b/test/integration/test-apt-update-filesize-mismatch
index f78b83b5f..a23c03c3f 100755
--- a/test/integration/test-apt-update-filesize-mismatch
+++ b/test/integration/test-apt-update-filesize-mismatch
@@ -40,7 +40,7 @@ for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver.
testfailure aptget update -o Debug::pkgAcquire::Worker=1
cp rootdir/tmp/testfailure.output rootdir/tmp/update.output
- testsuccess grep -E "$(basename -s '.gz' "$COMPRESSFILE").*Hash Sum mismatch" rootdir/tmp/update.output
+ testsuccess grep -E "$(basename "$COMPRESSFILE" '.gz').*Hash Sum mismatch" rootdir/tmp/update.output
testfailure aptcache show foo
testfailure aptget install foo -s
diff --git a/test/integration/test-apt-update-hashsum-mismatch b/test/integration/test-apt-update-hashsum-mismatch
index c2c5b3887..4627f7afd 100755
--- a/test/integration/test-apt-update-hashsum-mismatch
+++ b/test/integration/test-apt-update-hashsum-mismatch
@@ -35,7 +35,7 @@ for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver.
testfailure aptget update
cp rootdir/tmp/testfailure.output rootdir/tmp/update.output
- testsuccess grep -E "$(basename -s '.gz' "$get").*Hash Sum mismatch" rootdir/tmp/update.output
+ testsuccess grep -E "$(basename "$get" '.gz').*Hash Sum mismatch" rootdir/tmp/update.output
testfailure aptcache show foo
testfailure aptget install foo -s
diff --git a/test/integration/test-apt-update-ims b/test/integration/test-apt-update-ims
index 7385e701a..33b4ed1b9 100755
--- a/test/integration/test-apt-update-ims
+++ b/test/integration/test-apt-update-ims
@@ -43,7 +43,7 @@ runtest() {
testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
# ensure that we still do a hash check for other files on ims hit of Release
- if grep -q '^Hit .* InRelease$' expected.output || ! grep -q '^Ign .* Release\(\.gpg\)\?$' expected.output; then
+ if grep -q '^Hit:[0-9]\+ .* InRelease$' expected.output || ! grep -q '^Ign:[0-9]\+ .* Release\(\.gpg\)\?$' expected.output; then
$TEST aptget update -o Debug::Acquire::gpgv=1
cp rootdir/tmp/${TEST}.output goodsign.output
testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
@@ -55,7 +55,7 @@ runtest() {
}
msgmsg 'InRelease'
-EXPECT='Hit http://localhost:8080 unstable InRelease
+EXPECT='Hit:1 http://localhost:8080 unstable InRelease
Reading package lists...'
echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex
runtest
@@ -63,9 +63,9 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex
runtest
msgmsg 'Release/Release.gpg'
-EXPECT='Ign http://localhost:8080 unstable InRelease
+EXPECT='Ign:1 http://localhost:8080 unstable InRelease
404 Not Found
-Hit http://localhost:8080 unstable Release
+Hit:2 http://localhost:8080 unstable Release
Reading package lists...'
find aptarchive -name 'InRelease' -delete
echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex
@@ -74,10 +74,10 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex
runtest
msgmsg 'Release only'
-EXPECT="Ign http://localhost:8080 unstable InRelease
+EXPECT="Ign:1 http://localhost:8080 unstable InRelease
404 Not Found
-Hit http://localhost:8080 unstable Release
-Ign http://localhost:8080 unstable Release.gpg
+Hit:2 http://localhost:8080 unstable Release
+Ign:3 http://localhost:8080 unstable Release.gpg
404 Not Found
Reading package lists...
W: The data from 'http://localhost:8080 unstable Release' is not signed. Packages from that repository can not be authenticated."
@@ -96,7 +96,7 @@ Valid-Until: $(date -d '-1 weeks' '+%a, %d %b %Y %H:%M:%S %Z')" '{}' \;
signreleasefiles
msgmsg 'expired InRelease'
-EXPECT='Hit http://localhost:8080 unstable InRelease
+EXPECT='Hit:1 http://localhost:8080 unstable InRelease
E: Release file for http://localhost:8080/dists/unstable/InRelease is expired (invalid since). Updates for this repository will not be applied.'
echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex
runtest 'failure'
@@ -104,9 +104,9 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex
runtest 'failure'
msgmsg 'expired Release/Release.gpg'
-EXPECT='Ign http://localhost:8080 unstable InRelease
+EXPECT='Ign:1 http://localhost:8080 unstable InRelease
404 Not Found
-Hit http://localhost:8080 unstable Release
+Hit:2 http://localhost:8080 unstable Release
E: Release file for http://localhost:8080/dists/unstable/Release is expired (invalid since). Updates for this repository will not be applied.'
find aptarchive -name 'InRelease' -delete
echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex
@@ -115,10 +115,10 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex
runtest 'failure'
msgmsg 'expired Release only'
-EXPECT="Ign http://localhost:8080 unstable InRelease
+EXPECT="Ign:1 http://localhost:8080 unstable InRelease
404 Not Found
-Hit http://localhost:8080 unstable Release
-Ign http://localhost:8080 unstable Release.gpg
+Hit:2 http://localhost:8080 unstable Release
+Ign:3 http://localhost:8080 unstable Release.gpg
404 Not Found
W: The data from 'http://localhost:8080 unstable Release' is not signed. Packages from that repository can not be authenticated.
E: Release file for http://localhost:8080/dists/unstable/Release is expired (invalid since). Updates for this repository will not be applied."
@@ -130,13 +130,31 @@ runtest 'failure' 'warning'
msgmsg 'no Release at all'
-EXPECT="Ign http://localhost:8080 unstable InRelease
+EXPECT="Ign:1 http://localhost:8080 unstable InRelease
404 Not Found
-Ign http://localhost:8080 unstable Release
+Ign:2 http://localhost:8080 unstable Release
404 Not Found
-Hit http://localhost:8080 unstable/main Sources
-Hit http://localhost:8080 unstable/main amd64 Packages
-Hit http://localhost:8080 unstable/main Translation-en
+Ign:3 http://localhost:8080 unstable/main Sources
+ 404 Not Found
+Ign:4 http://localhost:8080 unstable/main amd64 Packages
+ 404 Not Found
+Ign:5 http://localhost:8080 unstable/main Translation-en
+ 404 Not Found
+Ign:3 http://localhost:8080 unstable/main Sources
+ 404 Not Found
+Ign:4 http://localhost:8080 unstable/main amd64 Packages
+ 404 Not Found
+Ign:5 http://localhost:8080 unstable/main Translation-en
+ 404 Not Found
+Ign:3 http://localhost:8080 unstable/main Sources
+ 404 Not Found
+Ign:4 http://localhost:8080 unstable/main amd64 Packages
+ 404 Not Found
+Ign:5 http://localhost:8080 unstable/main Translation-en
+ 404 Not Found
+Hit:3 http://localhost:8080 unstable/main Sources
+Hit:4 http://localhost:8080 unstable/main amd64 Packages
+Hit:5 http://localhost:8080 unstable/main Translation-en
Reading package lists...
W: The repository 'http://localhost:8080 unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository."
find aptarchive -name '*Release*' -delete
diff --git a/test/integration/test-apt-update-nofallback b/test/integration/test-apt-update-nofallback
index db4430ea3..6e9db2cae 100755
--- a/test/integration/test-apt-update-nofallback
+++ b/test/integration/test-apt-update-nofallback
@@ -28,11 +28,12 @@ Description: an autogenerated evil package
EOF
# avoid ims hit
touch -d '+1hour' aptarchive/dists/unstable/main/binary-i386/Packages
+ compressfile aptarchive/dists/unstable/main/binary-i386/Packages
}
assert_update_is_refused_and_last_good_state_used()
{
- testfailuremsg "E: The repository 'file: unstable Release' is no longer signed." aptget update
+ testfailuremsg "E: The repository 'file:${APTARCHIVE} unstable Release' is no longer signed." aptget update
assert_repo_is_intact
}
@@ -87,20 +88,20 @@ test_from_inrelease_to_unsigned_with_override()
{
# setup archive with InRelease file
setupaptarchive_with_lists_clean
- # FIXME: is not what the server reported 4104 4106
- testsuccess aptget update #-o Debug::pkgAcquire::Worker=1
+ testsuccess aptget update
# simulate moving to a unsigned but otherwise valid repo
simulate_mitm_and_inject_evil_package
- generatereleasefiles
+ generatereleasefiles '+2 hours'
+ find $APTARCHIVE -name '*Packages*' -exec touch -d '+2 hours' {} \;
# and ensure we can update to it (with enough force)
testwarning aptget update --allow-insecure-repositories \
- -o Acquire::AllowDowngradeToInsecureRepositories=1
+ -o Acquire::AllowDowngradeToInsecureRepositories=1 -o Debug::pkgAcquire::Worker=1 -o Debug::pkgAcquire::Auth=1
# but that the individual packages are still considered untrusted
testfailureequal "WARNING: The following packages cannot be authenticated!
evil
-E: There are problems and -y was used without --force-yes" aptget install -qq -y evil
+E: There were unauthenticated packages and -y was used without --allow-unauthenticated" aptget install -qq -y evil
}
test_cve_2012_0214()
@@ -150,9 +151,8 @@ test_subvert_inrelease()
# replace InRelease with something else
mv $APTARCHIVE/dists/unstable/Release $APTARCHIVE/dists/unstable/InRelease
- testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease Does not start with a cleartext signature
-
-E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
+ testfailuremsg "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
+E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
# ensure we keep the repo
testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -167,13 +167,11 @@ test_inrelease_to_invalid_inrelease()
listcurrentlistsdirectory > lists.before
# now remove InRelease and subvert Release do no longer verify
- sed -i 's/Codename.*/Codename: evil!'/ $APTARCHIVE/dists/unstable/InRelease
+ sed -i 's/^Codename:.*/Codename: evil!/' $APTARCHIVE/dists/unstable/InRelease
inject_evil_package
- testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
+ testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
# ensure we keep the repo
@@ -194,10 +192,8 @@ test_release_gpg_to_invalid_release_release_gpg()
echo "Some evil data" >> $APTARCHIVE/dists/unstable/Release
inject_evil_package
- testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable Release: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
+ testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable Release: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfailure grep 'evil' rootdir/var/lib/apt/lists/*Release
diff --git a/test/integration/test-apt-update-not-modified b/test/integration/test-apt-update-not-modified
index b1d55c156..3f822586a 100755
--- a/test/integration/test-apt-update-not-modified
+++ b/test/integration/test-apt-update-not-modified
@@ -14,26 +14,47 @@ setupaptarchive --no-update
methodtest() {
msgmsg 'Test InRelease with' "$1"
rm -rf rootdir/var/lib/apt/lists
+ cp -a aptarchive/dists aptarchive/dists.good
# get our cache populated
testsuccess aptget update
listcurrentlistsdirectory > listsdir.lst
# hit again with a good cache
- testsuccessequal "Hit $1 unstable InRelease
+ testsuccessequal "Hit:1 $1 unstable InRelease
Reading package lists..." aptget update
testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
# drop an architecture, which means the file should be gone now
configarchitecture 'i386'
sed '/_binary-amd64_Packages/ d' listsdir.lst > listsdir-without-amd64.lst
- testsuccessequal "Hit $1 unstable InRelease
+ testsuccessequal "Hit:1 $1 unstable InRelease
Reading package lists..." aptget update
testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
- # readd arch so its downloaded again
+ # readd arch so its downloaded again…
configarchitecture 'amd64' 'i386'
- testsuccessequal "Hit $1 unstable InRelease
-Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
+ # … but oh noes, hashsum mismatch!
+ find aptarchive/dists/unstable/main/binary-amd64/ -type f -delete
+ cat >> aptarchive/dists/unstable/main/binary-amd64/Packages <<EOF
+
+Package: thisisbad
+Architecture: amd64
+Version: 1
+EOF
+ compressfile aptarchive/dists/unstable/main/binary-amd64/Packages
+ testfailureequal "Hit:1 $1 unstable InRelease
+Get:2 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
+Err:2 $1 unstable/main amd64 Packages
+ Hash Sum mismatch
+W: Failed to fetch $1/dists/unstable/main/binary-amd64/Packages.gz Hash Sum mismatch
+E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
+ testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
+ rm -rf aptarchive/dists
+ cp -a aptarchive/dists.good aptarchive/dists
+
+ # … now everything is fine again
+ testsuccessequal "Hit:1 $1 unstable InRelease
+Get:2 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
Reading package lists..." aptget update
testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
@@ -46,48 +67,89 @@ Reading package lists..." aptget update
msgmsg 'Test Release.gpg with' "$1"
rm -rf rootdir/var/lib/apt/lists
- cp -a aptarchive/dists aptarchive/dists.good
find aptarchive/dists -name 'InRelease' -delete
# get our cache populated
testsuccess aptget update
listcurrentlistsdirectory > listsdir.lst
# hit again with a good cache
- testsuccessequal "Ign $1 unstable InRelease
+ testsuccessequal "Ign:1 $1 unstable InRelease
404 Not Found
-Hit $1 unstable Release
+Hit:2 $1 unstable Release
Reading package lists..." aptget update
testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
# drop an architecture, which means the file should be gone now
configarchitecture 'i386'
sed '/_binary-amd64_Packages/ d' listsdir.lst > listsdir-without-amd64.lst
- testsuccessequal "Ign $1 unstable InRelease
+ testsuccessequal "Ign:1 $1 unstable InRelease
404 Not Found
-Hit $1 unstable Release
+Hit:2 $1 unstable Release
Reading package lists..." aptget update
testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
- # readd arch so its downloaded again
+ # readd arch so its downloaded again…
configarchitecture 'amd64' 'i386'
- testsuccessequal "Ign $1 unstable InRelease
+ # … but oh noes, hashsum mismatch!
+ find aptarchive/dists/unstable/main/binary-amd64/ -type f -delete
+ cat >> aptarchive/dists/unstable/main/binary-amd64/Packages <<EOF
+
+Package: thisisbad
+Architecture: amd64
+Version: 1
+EOF
+ compressfile aptarchive/dists/unstable/main/binary-amd64/Packages
+ testfailureequal "Ign:1 $1 unstable InRelease
+ 404 Not Found
+Hit:2 $1 unstable Release
+Get:4 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
+Err:4 $1 unstable/main amd64 Packages
+ Hash Sum mismatch
+W: Failed to fetch $1/dists/unstable/main/binary-amd64/Packages.gz Hash Sum mismatch
+E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
+ testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
+ rm -rf aptarchive/dists
+ cp -a aptarchive/dists.good aptarchive/dists
+ find aptarchive/dists -name 'InRelease' -delete
+
+ # … now everything is fine again
+ testsuccessequal "Ign:1 $1 unstable InRelease
404 Not Found
-Hit $1 unstable Release
-Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
+Hit:2 $1 unstable Release
+Get:4 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
Reading package lists..." aptget update
testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
webserverconfig 'aptwebserver::support::modified-since' 'false'
webserverconfig 'aptwebserver::support::last-modified' 'false'
- testsuccessequal "Ign $1 unstable InRelease
+ testsuccessequal "Ign:1 $1 unstable InRelease
404 Not Found
-Get:1 $1 unstable Release [$(stat -c '%s' 'aptarchive/dists/unstable/Release') B]
+Get:2 $1 unstable Release [$(stat -c '%s' 'aptarchive/dists/unstable/Release') B]
Reading package lists..." aptget update
webserverconfig 'aptwebserver::support::modified-since' 'true'
webserverconfig 'aptwebserver::support::last-modified' 'true'
rm -rf aptarchive/dists
cp -a aptarchive/dists.good aptarchive/dists
+
+ # new release file, but the indexes are the same
+ redatereleasefiles '+2 hours'
+
+ rm -rf rootdir/var/lib/apt/lists.good
+ cp -a rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists.good
+ testsuccessequal "Get:1 $1 unstable InRelease [$(stat -c '%s' 'aptarchive/dists/unstable/InRelease') B]
+Reading package lists..." aptget update
+
+ rm -rf rootdir/var/lib/apt/lists
+ cp -a rootdir/var/lib/apt/lists.good rootdir/var/lib/apt/lists
+ find rootdir/var/lib/apt/lists -name '*_Packages*' -delete
+ testsuccessequal "Get:1 $1 unstable InRelease [$(stat -c '%s' 'aptarchive/dists/unstable/InRelease') B]
+Get:2 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
+Get:3 $1 unstable/main i386 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-i386/Packages.gz') B]
+Reading package lists..." aptget update
+
+ rm -rf aptarchive/dists
+ cp -a aptarchive/dists.good aptarchive/dists
}
changetowebserver
diff --git a/test/integration/test-apt-update-rollback b/test/integration/test-apt-update-rollback
index b464a04a1..503b81985 100755
--- a/test/integration/test-apt-update-rollback
+++ b/test/integration/test-apt-update-rollback
@@ -60,8 +60,7 @@ test_inrelease_to_broken_hash_reverts_all() {
break_repository_sources_index '+1hour'
# test the error condition
- testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/main/source/Sources Hash Sum mismatch
-
+ testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/main/source/Sources.gz Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
# ensure that the Packages file is also rolled back
testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -78,7 +77,7 @@ test_inrelease_to_valid_release() {
rm $APTARCHIVE/dists/unstable/Release.gpg
# update fails
- testfailureequal "E: The repository 'file: unstable Release' is no longer signed." aptget update -qq
+ testfailureequal "E: The repository 'file:${APTARCHIVE} unstable Release' is no longer signed." aptget update -qq
# test that security downgrade was not successful
testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -101,7 +100,7 @@ test_inrelease_to_release_reverts_all() {
break_repository_sources_index '+1hour'
# ensure error
- testfailureequal "E: The repository 'file: unstable Release' is no longer signed." aptget update -qq # -o Debug::acquire::transaction=1
+ testfailureequal "E: The repository 'file:${APTARCHIVE} unstable Release' is no longer signed." aptget update -qq # -o Debug::acquire::transaction=1
# ensure that the Packages file is also rolled back
testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -121,21 +120,20 @@ test_unauthenticated_to_invalid_inrelease() {
listcurrentlistsdirectory > lists.before
testfailureequal "WARNING: The following packages cannot be authenticated!
old
-E: There are problems and -y was used without --force-yes" aptget install -qq -y old
+E: There were unauthenticated packages and -y was used without --allow-unauthenticated" aptget install -qq -y old
# go to authenticated but not correct
add_new_package '+1hour'
break_repository_sources_index '+1hour'
- testfailureequal "W: Failed to fetch file:$APTARCHIVE/dists/unstable/main/source/Sources Hash Sum mismatch
-
+ testfailureequal "W: Failed to fetch file:$APTARCHIVE/dists/unstable/main/source/Sources.gz Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfileequal lists.before "$(listcurrentlistsdirectory)"
testfailure ls rootdir/var/lib/apt/lists/*_InRelease
testfailureequal "WARNING: The following packages cannot be authenticated!
old
-E: There are problems and -y was used without --force-yes" aptget install -qq -y old
+E: There were unauthenticated packages and -y was used without --allow-unauthenticated" aptget install -qq -y old
}
test_inrelease_to_unauth_inrelease() {
@@ -144,10 +142,8 @@ test_inrelease_to_unauth_inrelease() {
signreleasefiles 'Marvin Paranoid'
- testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2
-
+ testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2
W: Failed to fetch file:$APTARCHIVE/dists/unstable/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2
-
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -158,7 +154,10 @@ test_inrelease_to_broken_gzip() {
msgmsg "Test InRelease to broken gzip"
start_with_good_inrelease
- redatereleasefiles '+2hours'
+ break_repository_sources_index '+1hour'
+ generatereleasefiles '+2hours'
+ signreleasefiles
+
# append junk at the end of the compressed file
echo "lala" >> $APTARCHIVE/dists/unstable/main/source/Sources.gz
touch -d '+2min' $APTARCHIVE/dists/unstable/main/source/Sources.gz
@@ -166,6 +165,7 @@ test_inrelease_to_broken_gzip() {
rm $APTARCHIVE/dists/unstable/main/source/Sources
testfailure aptget update
+ testsuccess grep 'Hash Sum mismatch' rootdir/tmp/testfailure.output
testfileequal lists.before "$(listcurrentlistsdirectory)"
}
diff --git a/test/integration/test-apt-update-stale b/test/integration/test-apt-update-stale
index 05154641a..8a2703fd1 100755
--- a/test/integration/test-apt-update-stale
+++ b/test/integration/test-apt-update-stale
@@ -18,7 +18,7 @@ setupaptarchive --no-update
changetowebserver
echo "Acquire::Languages \"none\";" > rootdir/etc/apt/apt.conf.d/00nolanguages
-testsuccess aptget update
+testsuccess aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
listcurrentlistsdirectory > lists.before
# insert new version
@@ -26,7 +26,7 @@ mkdir aptarchive/dists/unstable/main/binary-i386/saved
cp -p aptarchive/dists/unstable/main/binary-i386/Packages* \
aptarchive/dists/unstable/main/binary-i386/saved
insertpackage 'unstable' 'foo' 'all' '2.0'
-
+touch -d '+1 hour' aptarchive/dists/unstable/main/binary-i386/Packages
compressfile aptarchive/dists/unstable/main/binary-i386/Packages
# ensure that we do not get a I-M-S hit for the Release file
@@ -39,7 +39,6 @@ cp -p aptarchive/dists/unstable/main/binary-i386/saved/Packages* \
aptarchive/dists/unstable/main/binary-i386/
# ensure this raises an error
-testfailureequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Hash Sum mismatch
-
-E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
+testfailuremsg "W: Failed to fetch copy:$(readlink -f ./rootdir)/var/lib/apt/lists/localhost:8080_dists_unstable_main_binary-i386_Packages Hash Sum mismatch
+E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
testfileequal lists.before "$(listcurrentlistsdirectory)"
diff --git a/test/integration/test-apt-update-transactions b/test/integration/test-apt-update-transactions
index 63b318056..a5dac1737 100755
--- a/test/integration/test-apt-update-transactions
+++ b/test/integration/test-apt-update-transactions
@@ -8,6 +8,7 @@ TESTDIR=$(readlink -f $(dirname $0))
setupenvironment
configarchitecture 'i386'
+configcompression '.' 'gz'
insertpackage 'unstable' 'foo' 'all' '1.0'
insertsource 'unstable' 'foo' 'all' '1.0'
@@ -15,7 +16,8 @@ insertsource 'unstable' 'foo' 'all' '1.0'
setupaptarchive --no-update
breakfile() {
- mv "$1" "${1}.bak"
+ mv "${1}" "${1}.bak"
+ mv "${1}.gz" "${1}.gz.bak"
cat > "$1" <<EOF
Package: bar
EOF
@@ -23,9 +25,16 @@ EOF
}
restorefile() {
mv "${1}.bak" "$1"
+ mv "${1}.gz.bak" "${1}.gz"
}
testrun() {
+ rm -rf aptarchive/dists.good
+ cp -a aptarchive/dists aptarchive/dists.good
+ insertpackage 'unstable' 'bar' 'all' '1.0'
+ insertsource 'unstable' 'bar' 'all' '1.0'
+ buildaptarchivefromfiles '+1 hour'
+
# produce an unsigned repository
find aptarchive \( -name 'Release.gpg' -o -name 'InRelease' \) -delete
testfailure aptget update --no-allow-insecure-repositories
@@ -34,29 +43,36 @@ testrun() {
# signed but broken
signreleasefiles
+ onehashbroken() {
+ testfailure aptget update
+ # each file generates two messages with this string
+ testequal '2' grep --count 'Hash Sum mismatch' rootdir/tmp/testfailure.output
+ testfileequal "$1" "$(listcurrentlistsdirectory)"
+ }
+
breakfile aptarchive/dists/unstable/main/binary-i386/Packages
- testfailure aptget update
- testfileequal "$1" "$(listcurrentlistsdirectory)"
+ onehashbroken "$1"
restorefile aptarchive/dists/unstable/main/binary-i386/Packages
breakfile aptarchive/dists/unstable/main/source/Sources
- testfailure aptget update
- testfileequal "$1" "$(listcurrentlistsdirectory)"
+ onehashbroken "$1"
restorefile aptarchive/dists/unstable/main/source/Sources
+
+ rm -rf aptarchive/dists
+ cp -a aptarchive/dists.good aptarchive/dists
}
testsetup() {
msgmsg 'Test with no initial data over' "$1"
- redatereleasefiles 'now'
rm -rf rootdir/var/lib/apt/lists
mkdir -p rootdir/var/lib/apt/lists/partial
listcurrentlistsdirectory > listsdir.lst
testrun 'listsdir.lst'
msgmsg 'Test with initial data over' "$1"
- testsuccess aptget update
+ rm -rf rootdir/var/lib/apt/lists
+ testsuccess aptget update -o Debug::pkgAcquire::Worker=1
listcurrentlistsdirectory > listsdir.lst
- redatereleasefiles '+1hour'
testrun 'listsdir.lst'
}
diff --git a/test/integration/test-architecture-specification-parsing b/test/integration/test-architecture-specification-parsing
index f5a5b123e..701b10c3e 100755
--- a/test/integration/test-architecture-specification-parsing
+++ b/test/integration/test-architecture-specification-parsing
@@ -28,7 +28,7 @@ setupaptarchive
testsuccessequal "Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo pkg-arch-foo
@@ -48,7 +48,7 @@ Conf pkg-arch-no-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-no-foo -s
testsuccessequal "Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo pkg-arch-foo-unrelated-no
@@ -60,7 +60,7 @@ Conf pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])" aptget install pkg-arch
testsuccessequal "Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo pkg-arch-foo-unrelated-no2
diff --git a/test/integration/test-bug-470115-new-and-tighten-recommends b/test/integration/test-bug-470115-new-and-tighten-recommends
index 0970e2f23..3c159811d 100755
--- a/test/integration/test-bug-470115-new-and-tighten-recommends
+++ b/test/integration/test-bug-470115-new-and-tighten-recommends
@@ -49,7 +49,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
cool
The following packages will be upgraded:
cool tighten-cool
@@ -61,7 +61,7 @@ Conf tighten-cool (2 unstable [all])' aptget install tighten-cool -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
stuff
The following packages will be upgraded:
stuff tighten-coolorstuff
@@ -73,7 +73,7 @@ Conf tighten-coolorstuff (2 unstable [all])' aptget install tighten-coolorstuff
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
cool
The following packages will be upgraded:
cool tighten-coolorstuff2
@@ -85,7 +85,7 @@ Conf tighten-coolorstuff2 (2 unstable [all])' aptget install tighten-coolorstuff
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
cool
The following packages will be upgraded:
cool newrec-cool
@@ -97,7 +97,7 @@ Conf newrec-cool (2 unstable [all])' aptget install newrec-cool -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
super
The following NEW packages will be installed:
super
@@ -111,7 +111,7 @@ Conf super (2 unstable [all])' aptget install newrec-super -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
cool
The following packages will be upgraded:
cool newrec-coolorstuff
@@ -123,7 +123,7 @@ Conf newrec-coolorstuff (2 unstable [all])' aptget install newrec-coolorstuff -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
stuff
The following packages will be upgraded:
cool-gone stuff
@@ -135,7 +135,7 @@ Conf stuff (2 unstable [all])' aptget install cool-gone -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
super
The following NEW packages will be installed:
super
@@ -151,7 +151,7 @@ Conf super-overtake (2 unstable [all])' aptget install super-overtake -s
# the first option in an or-group should be the preferred one…
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
cool
The following packages will be upgraded:
cool upgrade-over-new
@@ -165,6 +165,8 @@ Conf upgrade-over-new (2 unstable [all])' aptget install upgrade-over-new -s
# the user doesn't seem to need it so avoid upgrading it
testsuccessequal 'Reading package lists...
Building dependency tree...
+Recommended packages:
+ cool
The following packages will be upgraded:
now-satisfiable
1 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
diff --git a/test/integration/test-bug-543966-downgrade-below-1000-pin b/test/integration/test-bug-543966-downgrade-below-1000-pin
index e59231608..435b6876e 100755
--- a/test/integration/test-bug-543966-downgrade-below-1000-pin
+++ b/test/integration/test-bug-543966-downgrade-below-1000-pin
@@ -13,15 +13,15 @@ insertinstalledpackage 'base-files' 'all' '5.0.0-1'
setupaptarchive
STATUS=$(readlink -f rootdir/var/lib/dpkg/status)
-APTARCHIVE="$(readlink -f aptarchive)/"
+APTARCHIVE="$(readlink -f aptarchive)"
testsuccessequal "base-files:
Installed: 5.0.0-1
Candidate: 5.0.0-1
Version table:
- *** 5.0.0-1 0
+ *** 5.0.0-1 100
100 $STATUS
- 5.0.0 0
+ 5.0.0 500
500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=0
writepin() {
@@ -33,21 +33,18 @@ Pin-Priority: $2" > rootdir/etc/apt/preferences
testpinning() {
- local PKGPIN=''
- local PKGPINPRIO='0'
+ local PKGPINPRIO=''
local REPPINPRIO=''
if [ "$1" != '*' ]; then
PKGPINPRIO=''
REPPINPRIO=' 500'
- PKGPIN='Package pin: 5.0.0
- '
fi
writepin "$1" '99'
testsuccessequal "base-files:
Installed: 5.0.0-1
Candidate: 5.0.0-1
- ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-99}
+ Version table:
+ *** 5.0.0-1 100
100 $STATUS
5.0.0 ${PKGPINPRIO:-99}
${REPPINPRIO:- 99} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=99
@@ -56,8 +53,8 @@ testpinning() {
testsuccessequal "base-files:
Installed: 5.0.0-1
Candidate: 5.0.0-1
- ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-100}
+ Version table:
+ *** 5.0.0-1 100
100 $STATUS
5.0.0 ${PKGPINPRIO:-100}
${REPPINPRIO:- 100} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=100
@@ -66,8 +63,8 @@ testpinning() {
testsuccessequal "base-files:
Installed: 5.0.0-1
Candidate: 5.0.0-1
- ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-999}
+ Version table:
+ *** 5.0.0-1 100
100 $STATUS
5.0.0 ${PKGPINPRIO:-999}
${REPPINPRIO:- 999} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=999
@@ -76,8 +73,8 @@ testpinning() {
testsuccessequal "base-files:
Installed: 5.0.0-1
Candidate: 5.0.0
- ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-1000}
+ Version table:
+ *** 5.0.0-1 100
100 $STATUS
5.0.0 ${PKGPINPRIO:-1000}
${REPPINPRIO:-1000} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=1000
diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed
index 3ff4807de..1d969fea2 100755
--- a/test/integration/test-bug-549968-install-depends-of-not-installed
+++ b/test/integration/test-bug-549968-install-depends-of-not-installed
@@ -19,6 +19,8 @@ Building dependency tree...
MarkInstall coolstuff [ i386 ] < none -> 1.0 > ( other ) FU=1
Ignore MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) as its mode (Keep) is protected
Package 'extracoolstuff' is not installed, so not removed
+Recommended packages:
+ extracoolstuff
The following NEW packages will be installed:
coolstuff
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
diff --git a/test/integration/test-bug-590041-prefer-non-virtual-packages b/test/integration/test-bug-590041-prefer-non-virtual-packages
index 3bd7d436e..4e2a5142c 100755
--- a/test/integration/test-bug-590041-prefer-non-virtual-packages
+++ b/test/integration/test-bug-590041-prefer-non-virtual-packages
@@ -45,7 +45,7 @@ EOF
setupaptarchive
-testshowvirtual libc6:i386
+testnopackage libc6:i386
testsuccessequal "$pkglibc6" aptcache show libc6:armel
testsuccessequal "$pkglibc6" aptcache show libc6
testsuccessequal "$pkglibdb1" aptcache show libdb1:i386
diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files
index bca07268c..0c02aee30 100755
--- a/test/integration/test-bug-595691-empty-and-broken-archive-files
+++ b/test/integration/test-bug-595691-empty-and-broken-archive-files
@@ -12,8 +12,8 @@ setupflataptarchive
testaptgetupdate() {
rm -rf rootdir/var/lib/apt
- aptget update 2>> testaptgetupdate.diff >> testaptgetupdate.diff || true
- sed -i -e '/Ign /,+1d' -e '/Release/ d' -e 's#Get:[0-9]\+ #Get: #' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff
+ aptget update >testaptgetupdate.diff 2>&1 || true
+ sed -i -e '/Ign /,+1d' -e '/Release/ d' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff
GIVEN="$1"
shift
msgtest "Test for correctness of" "apt-get update with $*"
@@ -27,9 +27,6 @@ testaptgetupdate() {
createemptyarchive() {
find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
- if [ "en" = "$1" ]; then
- echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS
- fi
touch aptarchive/Packages
echo -n "" | $COMPRESSOR_CMD > aptarchive/${1}.$COMPRESS
generatereleasefiles
@@ -39,9 +36,6 @@ createemptyarchive() {
createemptyfile() {
find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
- if [ "en" = "$1" ]; then
- echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS
- fi
touch aptarchive/Packages aptarchive/${1}.$COMPRESS
generatereleasefiles
signreleasefiles
@@ -49,24 +43,18 @@ createemptyfile() {
}
testoverfile() {
+ local APTARCHIVE="$(readlink -f ./aptarchive)"
forcecompressor "$1"
- createemptyfile 'en'
- testaptgetupdate 'Reading package lists...' "empty file en.$COMPRESS over file"
-
- createemptyarchive 'en'
- testaptgetupdate 'Reading package lists...' "empty archive en.$COMPRESS over file"
-
createemptyarchive 'Packages'
- # FIXME: Why omits the file transport the Packages Get line?
- #Get:3 file: Packages []
- testaptgetupdate 'Reading package lists...' "empty archive Packages.$COMPRESS over file"
+ testaptgetupdate "Get:2 file:$APTARCHIVE Packages []
+Reading package lists..." "empty archive Packages.$COMPRESS over file"
createemptyfile 'Packages'
- testaptgetupdate "Err file: Packages
+ testaptgetupdate "Get:2 file:$APTARCHIVE Packages
+Err:2 file:$APTARCHIVE Packages
Empty files can't be valid archives
-W: Failed to fetch ${COMPRESSOR}:$(readlink -f aptarchive/Packages.$COMPRESS) Empty files can't be valid archives
-
+W: Failed to fetch ${COMPRESSOR}:${APTARCHIVE}/Packages.$COMPRESS Empty files can't be valid archives
E: Some index files failed to download. They have been ignored, or old ones used instead." "empty file Packages.$COMPRESS over file"
}
@@ -74,16 +62,15 @@ testoverhttp() {
forcecompressor "$1"
createemptyarchive 'Packages'
- testaptgetupdate "Get: http://localhost:8080 Packages []
+ testaptgetupdate "Get:2 http://localhost:8080 Packages []
Reading package lists..." "empty archive Packages.$COMPRESS over http"
createemptyfile 'Packages'
#FIXME: we should response with a good error message instead
- testaptgetupdate "Get: http://localhost:8080 Packages
-Err http://localhost:8080 Packages
+ testaptgetupdate "Get:2 http://localhost:8080 Packages
+Err:2 http://localhost:8080 Packages
Empty files can't be valid archives
W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages.${COMPRESS}) Empty files can't be valid archives
-
E: Some index files failed to download. They have been ignored, or old ones used instead." "empty file Packages.$COMPRESS over http"
}
diff --git a/test/integration/test-bug-596498-trusted-unsigned-repo b/test/integration/test-bug-596498-trusted-unsigned-repo
index 4eb77b9a4..94f280b81 100755
--- a/test/integration/test-bug-596498-trusted-unsigned-repo
+++ b/test/integration/test-bug-596498-trusted-unsigned-repo
@@ -15,16 +15,20 @@ aptgetupdate() {
${1:-testwarning} aptget update --allow-insecure-repositories
}
-PKGTEXT="$(aptget install cool --assume-no -d | head -n 7)"
-DEBFILE='rootdir/etc/apt/sources.list.d/apt-test-unstable-deb.list'
+PKGTEXT="$(aptget install cool --assume-no -d | head -n 8)"
+DOWNLOG="$(echo "$PKGTEXT" | tail -n 1)"
+PKGTEXT="$(echo "$PKGTEXT" | head -n 7)"
+DEBFILE='rootdir/etc/apt/sources.list.d/apt-test-unstable-*.list'
testsuccessequal "$PKGTEXT
+$DOWNLOG
Download complete and in download only mode" aptget install cool --assume-no -d
testsuccessequal "$PKGTEXT
+$DOWNLOG
Download complete and in download only mode" aptget install cool --assume-no -d --allow-unauthenticated
-sed -i -e 's#deb#deb [trusted=no]#' $DEBFILE
+sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=no] #' $DEBFILE
aptgetupdate 'testsuccess'
testfailureequal "$PKGTEXT
@@ -33,8 +37,17 @@ WARNING: The following packages cannot be authenticated!
Install these packages without verification? [y/N] N
E: Some packages could not be authenticated" aptget install cool --assume-no -d
+configarchitecture 'amd64' 'i386'
+testequal "$(echo "$PKGTEXT" | sed 's#cool$#cool:i386#g')
+WARNING: The following packages cannot be authenticated!
+ cool:i386
+Authentication warning overridden.
+$DOWNLOG
+Download complete and in download only mode" aptget install cool:i386 --assume-no -d --allow-unauthenticated
+configarchitecture 'i386'
+
find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete
-sed -i -e 's#deb \[trusted=no\]#deb#' $DEBFILE
+sed -i -e 's#\(deb\(-src\)\?\) \[trusted=no\] #\1 #' $DEBFILE
aptgetupdate
testfailureequal "$PKGTEXT
@@ -47,10 +60,12 @@ testsuccessequal "$PKGTEXT
WARNING: The following packages cannot be authenticated!
cool
Authentication warning overridden.
+$DOWNLOG
Download complete and in download only mode" aptget install cool --assume-no -d --allow-unauthenticated
-sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE
+sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=yes] #' $DEBFILE
aptgetupdate
testsuccessequal "$PKGTEXT
+$DOWNLOG
Download complete and in download only mode" aptget install cool --assume-no -d
diff --git a/test/integration/test-bug-602412-dequote-redirect b/test/integration/test-bug-602412-dequote-redirect
index ca2378c19..b9d232f90 100755
--- a/test/integration/test-bug-602412-dequote-redirect
+++ b/test/integration/test-bug-602412-dequote-redirect
@@ -21,7 +21,7 @@ testrun() {
testsuccess --nomsg aptget update
# check that I-M-S header is kept in redirections
- testsuccessequal "Hit $1 unstable InRelease
+ testsuccessequal "Hit:1 $1 unstable InRelease
Reading package lists..." aptget update
msgtest 'Test redirection works in' 'package download'
diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove
index 52992680b..e910c70cb 100755
--- a/test/integration/test-bug-604222-new-and-autoremove
+++ b/test/integration/test-bug-604222-new-and-autoremove
@@ -23,13 +23,24 @@ The following NEW packages will be installed:
Inst libavcodec52 (4:0.5.2-6 localhost [i386])
Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s
+testsuccessequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+1 package was automatically installed and is no longer required.
+Use 'apt-get autoremove' to remove it.
+The following NEW packages will be installed:
+ libavcodec52
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst libavcodec52 (4:0.5.2-6 localhost [i386])
+Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s -o APT::Get::HideAutoRemove=small
+
testfailureequal "Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
libvtk5.4
Use 'apt-get autoremove' to remove it.
-The following extra packages will be installed:
+The following additional packages will be installed:
libavcodec52 libopenal-dev libvtk5.4
The following NEW packages will be installed:
dummy-archive libavcodec52 libopenal-dev
@@ -39,6 +50,21 @@ The following packages will be upgraded:
Need to get 0 B/19.4 MB of archives.
After this operation, 17.3 MB of additional disk space will be used.
E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+1 package was automatically installed and is no longer required.
+Use 'apt-get autoremove' to remove it.
+The following additional packages will be installed:
+ libavcodec52 libopenal-dev libvtk5.4
+The following NEW packages will be installed:
+ dummy-archive libavcodec52 libopenal-dev
+The following packages will be upgraded:
+ libvtk5.4
+1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Need to get 0 B/19.4 MB of archives.
+After this operation, 17.3 MB of additional disk space will be used.
+E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small
echo -n > rootdir/var/lib/dpkg/status
rm rootdir/var/lib/apt/extended_states
@@ -52,7 +78,7 @@ Building dependency tree...
MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
MarkDelete libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
-The following extra packages will be installed:
+The following additional packages will be installed:
libavcodec52 libopenal-dev
The following NEW packages will be installed:
dummy-archive libavcodec52 libopenal-dev
diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual
index a7bde393b..31856b2c1 100755
--- a/test/integration/test-bug-611729-mark-as-manual
+++ b/test/integration/test-bug-611729-mark-as-manual
@@ -37,14 +37,14 @@ testmarkedauto 'b'
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-b is already the newest version.
+b is already the newest version (1.0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade
testmarkedauto 'b'
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-b is already the newest version.
+b is already the newest version (1.0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d
testmarkedauto 'b'
@@ -62,7 +62,7 @@ Reinstall: b:i386 (1.0)'
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-b is already the newest version.
+b is already the newest version (1.0).
b set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
testmarkedauto
diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts
index 401b521a5..af8391555 100755
--- a/test/integration/test-bug-612099-multiarch-conflicts
+++ b/test/integration/test-bug-612099-multiarch-conflicts
@@ -41,7 +41,7 @@ Conf foobar (1.0 stable [i386])' aptget install foobar -st stable
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6:amd64
The following packages will be REMOVED:
libc6
@@ -96,7 +96,7 @@ Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6:amd64
The following packages will be REMOVED:
libc6
@@ -145,7 +145,7 @@ Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6-same:amd64
The following NEW packages will be installed:
foobar-same:amd64 libc6-same:amd64
@@ -206,7 +206,7 @@ Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st test
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6-same:amd64
The following packages will be REMOVED:
libc6-same
diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade
index 552330d81..1709af7f2 100755
--- a/test/integration/test-bug-612557-garbage-upgrade
+++ b/test/integration/test-bug-612557-garbage-upgrade
@@ -20,7 +20,7 @@ testmarkedauto python-uno openoffice.org-common
testfailureequal 'Reading package lists...
Building dependency tree...
Reading state information...
-The following extra packages will be installed:
+The following additional packages will be installed:
libreoffice-common
The following packages will be REMOVED:
openoffice.org-common openoffice.org-emailmerge
@@ -38,7 +38,7 @@ testmarkedauto python-uno openoffice.org-common openoffice.org-emailmerge
testfailureequal 'Reading package lists...
Building dependency tree...
Reading state information...
-The following extra packages will be installed:
+The following additional packages will be installed:
libreoffice-common
The following packages will be REMOVED:
openoffice.org-common openoffice.org-emailmerge
diff --git a/test/integration/test-bug-612958-use-dpkg-multiarch-config b/test/integration/test-bug-612958-use-dpkg-multiarch-config
index 7bf5781e8..9556a5aef 100755
--- a/test/integration/test-bug-612958-use-dpkg-multiarch-config
+++ b/test/integration/test-bug-612958-use-dpkg-multiarch-config
@@ -5,22 +5,19 @@ TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture 'i386'
-setupaptarchive
-
-insertinstalledpackage 'libapt' 'i386' '1.0'
-insertinstalledpackage 'libapt' 'amd64' '1.0'
-insertinstalledpackage 'libapt' 'armel' '1.0'
testpass() {
- rm rootdir/var/cache/apt/*.bin
- msgtest 'Test architecture handling' "$1 with $2"
- testsuccess --nomsg aptcache show libapt:$2
+ msgtest 'Test architecture handling success' "$1 with $2"
+ rm -f archs.conf
+ aptconfig dump --no-empty --format='%V%n' APT::Architectures > archs.conf
+ testsuccess --nomsg grep "^$2\$" archs.conf
}
testfail() {
- rm rootdir/var/cache/apt/*.bin
- msgtest 'Test architecture handling' "$1 with $2"
- testfailure --nomsg aptcache show libapt:$2
+ msgtest 'Test architecture handling failure' "$1 with $2"
+ rm -f archs.conf
+ aptconfig dump --no-empty --format='%V%n' APT::Architectures > archs.conf
+ testfailure --nomsg grep "^$2\$" archs.conf
}
testpass 'no config' 'i386'
diff --git a/test/integration/test-bug-613420-new-garbage-dependency b/test/integration/test-bug-613420-new-garbage-dependency
index 5839f8798..8424b10b7 100755
--- a/test/integration/test-bug-613420-new-garbage-dependency
+++ b/test/integration/test-bug-613420-new-garbage-dependency
@@ -24,7 +24,7 @@ Reading state information...
The following packages were automatically installed and are no longer required:
libreoffice-officebean openoffice.org-officebean
Use 'apt-get autoremove' to remove them.
-The following extra packages will be installed:
+The following additional packages will be installed:
libreoffice-core libreoffice-officebean openoffice.org-officebean
The following packages will be REMOVED:
openoffice.org-core
@@ -35,3 +35,19 @@ The following packages will be upgraded:
1 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
After this operation, 126 MB disk space will be freed.
E: Trivial Only specified but this is not a trivial operation." aptget install libreoffice --trivial-only
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+2 packages were automatically installed and are no longer required.
+Use 'apt-get autoremove' to remove them.
+The following additional packages will be installed:
+ libreoffice-core libreoffice-officebean openoffice.org-officebean
+The following packages will be REMOVED:
+ openoffice.org-core
+The following NEW packages will be installed:
+ libreoffice libreoffice-core libreoffice-officebean
+The following packages will be upgraded:
+ openoffice.org-officebean
+1 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
+After this operation, 126 MB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation." aptget install libreoffice --trivial-only -o APT::Get::HideAutoRemove=small
diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction
index 563821173..6444c6110 100755
--- a/test/integration/test-bug-632221-cross-dependency-satisfaction
+++ b/test/integration/test-bug-632221-cross-dependency-satisfaction
@@ -23,7 +23,7 @@ insertpackage 'unstable' 'linux-stuff' 'amd64,armel' '1.0'
insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev, arm-stuff [any-armel] | linux-stuff [ linux-any]'
-insertsource 'unstable' 'forbidden-none' 'any' '1' 'Build-Depends: amdboot:any'
+insertsource 'unstable' 'forbidden-no' 'any' '1' 'Build-Depends: amdboot:any'
insertsource 'unstable' 'forbidden-same' 'any' '1' 'Build-Depends: libc6:any'
insertsource 'unstable' 'forbidden-foreign' 'any' '1' 'Build-Depends: doxygen:any'
@@ -37,7 +37,7 @@ setupaptarchive
testfailureequal "Reading package lists...
Building dependency tree...
-E: Build-Depends dependency for forbidden-none can't be satisfied because amdboot:any is not allowed on 'Multi-Arch: none' packages" aptget build-dep forbidden-none -s -a armel
+E: Build-Depends dependency for forbidden-no can't be satisfied because amdboot:any is not allowed on 'Multi-Arch: no' packages" aptget build-dep forbidden-no -s -a armel
testfailureequal "Reading package lists...
Building dependency tree...
E: Build-Depends dependency for forbidden-same can't be satisfied because libc6:any is not allowed on 'Multi-Arch: same' packages" aptget build-dep forbidden-same -s -a armel
@@ -167,17 +167,17 @@ Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot:amd64 cool doxygen foreigner libc6:amd64 libc6 libc6-dev:amd64
- libc6-dev libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
+ amdboot:amd64 cool doxygen foreigner libc6 libc6:amd64 libc6-dev
+ libc6-dev:amd64 libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
Inst foreigner (1.0 unstable [armel])
-Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [armel])
-Inst libc6-dev:amd64 (1.0 unstable [amd64])
+Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
+Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libfwibble1:amd64 (1.0 unstable [amd64])
Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
Inst linux-stuff:amd64 (1.0 unstable [amd64])
@@ -185,10 +185,10 @@ Conf amdboot:amd64 (1.0 unstable [amd64])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
Conf foreigner (1.0 unstable [armel])
-Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [armel])
-Conf libc6-dev:amd64 (1.0 unstable [amd64])
+Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [armel])
+Conf libc6-dev:amd64 (1.0 unstable [amd64])
Conf libfwibble1:amd64 (1.0 unstable [amd64])
Conf libfwibble-dev:amd64 (1.0 unstable [amd64])
Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
@@ -275,24 +275,24 @@ Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot:amd64 doxygen libc6:amd64 libc6 libc6-dev:amd64 libc6-dev
+ amdboot:amd64 doxygen libc6 libc6:amd64 libc6-dev libc6-dev:amd64
libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
0 upgraded, 9 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [armel])
-Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [armel])
-Inst libc6-dev:amd64 (1.0 unstable [amd64])
+Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
+Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libfwibble1:amd64 (1.0 unstable [amd64])
Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
Inst linux-stuff:amd64 (1.0 unstable [amd64])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [armel])
-Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [armel])
-Conf libc6-dev:amd64 (1.0 unstable [amd64])
+Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [armel])
+Conf libc6-dev:amd64 (1.0 unstable [amd64])
Conf libfwibble1:amd64 (1.0 unstable [amd64])
Conf libfwibble-dev:amd64 (1.0 unstable [amd64])
Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
diff --git a/test/integration/test-bug-675449-essential-are-protected b/test/integration/test-bug-675449-essential-are-protected
index f50507532..e62add938 100755
--- a/test/integration/test-bug-675449-essential-are-protected
+++ b/test/integration/test-bug-675449-essential-are-protected
@@ -87,3 +87,17 @@ Inst pkg-none-native [1] (2 unstable [amd64])
Conf pkg-none-native (2 unstable [amd64])
Inst pkg-none-new (2 unstable [amd64])
Conf pkg-none-new (2 unstable [amd64])' aptget dist-upgrade -s
+
+insertinstalledpackage 'foo' 'amd64' '1' 'Depends: libfoo
+Essential: yes'
+insertinstalledpackage 'libfoo' 'amd64' '1'
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ foo* libfoo*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ foo libfoo (due to foo)
+0 upgraded, 0 newly installed, 2 to remove and 4 not upgraded.
+Purg foo [1]
+Purg libfoo [1]' aptget purge libfoo -s
diff --git a/test/integration/test-bug-686346-package-missing-architecture b/test/integration/test-bug-686346-package-missing-architecture
index d51bbabfe..d9bc0c3f2 100755
--- a/test/integration/test-bug-686346-package-missing-architecture
+++ b/test/integration/test-bug-686346-package-missing-architecture
@@ -11,7 +11,6 @@ insertinstalledpackage 'pkgd' 'none' '1'
insertpackage 'unstable' 'pkga' 'amd64' '2' 'Depends: pkgb'
insertpackage 'unstable' 'pkgb' 'amd64' '2'
insertpackage 'unstable' 'pkgc' 'amd64' '1' 'Conflicts: pkgb'
-insertpackage 'unstable' 'pkge' 'none' '1'
setupaptarchive
@@ -28,7 +27,7 @@ Conf pkgc (1 unstable [amd64])' aptget install pkgc -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
pkgb
The following packages will be REMOVED:
pkgb:none
@@ -41,13 +40,6 @@ Inst pkga (2 unstable [amd64])
Conf pkgb (2 unstable [amd64])
Conf pkga (2 unstable [amd64])' aptget install pkga -s
-# ensure that arch-less stanzas from Packages files are ignored
-msgtest 'Package is distributed in the Packages files' 'pkge'
-grep -q 'Package: pkge' $(find aptarchive -name 'Packages') && msgpass || msgfail
-testnopackage pkge
-testnopackage pkge:none
-testnopackage pkge:*
-
# do not automatically change from none-arch to whatever-arch as
# this breaks other none packages and dpkg has this ruleset as
# this difference seems so important that it has to be maintained …
diff --git a/test/integration/test-bug-709560-set-candidate-release b/test/integration/test-bug-709560-set-candidate-release
index ab41d8f2a..502ade92c 100755
--- a/test/integration/test-bug-709560-set-candidate-release
+++ b/test/integration/test-bug-709560-set-candidate-release
@@ -25,7 +25,7 @@ testsuccessequal "Reading package lists...
Building dependency tree...
Selected version '2.0' (experimental [all]) for 'foo'
Selected version '2.1' (experimental [all]) for 'foo-dep' because of 'foo'
-The following extra packages will be installed:
+The following additional packages will be installed:
foo-dep
The following NEW packages will be installed:
foo foo-dep
diff --git a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch
index 62355a6b5..93a33d30f 100755
--- a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch
+++ b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch
@@ -48,7 +48,7 @@ DPkg::Tools::options::\"./${hook}-v${1}.sh\"::Version \"$1\";" > rootdir/etc/apt
observehook() {
rm -f ${hook}-v2.list ${hook}-v3.list
msgtest 'Observe hooks while' "$*"
- testsuccess --nomsg aptget "$@" -y --force-yes
+ testsuccess --nomsg aptget "$@" -y --allow-downgrades
}
testrun() {
diff --git a/test/integration/test-bug-722207-print-uris-even-if-very-quiet b/test/integration/test-bug-722207-print-uris-even-if-very-quiet
index 2cad929cc..1fa94de7d 100755
--- a/test/integration/test-bug-722207-print-uris-even-if-very-quiet
+++ b/test/integration/test-bug-722207-print-uris-even-if-very-quiet
@@ -12,6 +12,7 @@ insertpackage 'unstable' 'apt' 'all' '2'
insertsource 'unstable' 'apt' 'all' '2'
insertsource 'unstable' 'apt2' 'all' '1'
+getoriginfromsuite() { echo 'Debian'; }
setupaptarchive
APTARCHIVE=$(readlink -f ./aptarchive)
@@ -20,11 +21,11 @@ testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.d
testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget dist-upgrade -qq --print-uris
testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget install apt -qq --print-uris
testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget download apt -qq --print-uris
-testsuccessequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/apt_2.tar.gz' apt_2.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source apt -qq --print-uris
-testsuccessequal "'http://packages.debian.org/changelogs/pool/main/apt/apt_2/changelog'" aptget changelog apt -qq --print-uris
+testsuccessequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 9 MD5Sum:16ff470aaedad0f06fb951ed89ffdd3a
+'file://${APTARCHIVE}/apt_2.tar.gz' apt_2.tar.gz 12 MD5Sum:ab2b546f59ff9e8f5cc7a2d987ff3373" aptget source apt -qq --print-uris
+testsuccessequal "'http://metadata.ftp-master.debian.org/changelogs/main/a/apt/apt_2_changelog' apt.changelog" aptget changelog apt -qq --print-uris
-testsuccessequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/apt_2.tar.gz' apt_2.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/apt2_1.dsc' apt2_1.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
-'file://${APTARCHIVE}/apt2_1.tar.gz' apt2_1.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source apt apt2 -qq --print-uris
+testsuccessequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 9 MD5Sum:16ff470aaedad0f06fb951ed89ffdd3a
+'file://${APTARCHIVE}/apt_2.tar.gz' apt_2.tar.gz 12 MD5Sum:ab2b546f59ff9e8f5cc7a2d987ff3373
+'file://${APTARCHIVE}/apt2_1.dsc' apt2_1.dsc 10 MD5Sum:4c572ce45f1e2bedbb30da7f5e1c241c
+'file://${APTARCHIVE}/apt2_1.tar.gz' apt2_1.tar.gz 13 MD5Sum:2a96fec139f8722d93312a1ff8281232" aptget source apt apt2 -qq --print-uris
diff --git a/test/integration/test-bug-723586-any-stripped-in-single-arch b/test/integration/test-bug-723586-any-stripped-in-single-arch
index 0cf3362cf..78c4eae64 100755
--- a/test/integration/test-bug-723586-any-stripped-in-single-arch
+++ b/test/integration/test-bug-723586-any-stripped-in-single-arch
@@ -17,7 +17,7 @@ setupaptarchive
INSTALLLOG='Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
python3
The following NEW packages will be installed:
python3-gnupg
@@ -50,5 +50,5 @@ configarchitecture 'amd64' 'armhf'
rm rootdir/var/cache/apt/*.bin
testsuccessequal "$INSTALLLOG" aptget install python3-gnupg -s
-testsuccessequal "$(sed 's#3.3.2-16 - python3#3.3.2-16 - python3:any:armhf python3#' showpkg.log)" aptcache showpkg python3
+testsuccessequal "$(cat showpkg.log)" aptcache showpkg python3
testfailureequal "$FAILLOG" aptget install python-mips -s
diff --git a/test/integration/test-bug-723705-tagfile-truncates-fields b/test/integration/test-bug-723705-tagfile-truncates-fields
index 29f98550c..21878ebf0 100755
--- a/test/integration/test-bug-723705-tagfile-truncates-fields
+++ b/test/integration/test-bug-723705-tagfile-truncates-fields
@@ -12,7 +12,7 @@ aptget install --print-uris -y cdebconf-newt-terminal cdebconf-gtk-terminal 2>&1
testfileequal filename.log "Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
cdebconf-gtk-udeb cdebconf-newt-udeb cdebconf-udeb libc6-udeb
libglib2.0-udeb libgtk2.0-0-udeb libvte9-udeb
The following NEW packages will be installed:
diff --git a/test/integration/test-bug-735967-lib32-to-i386-unavailable b/test/integration/test-bug-735967-lib32-to-i386-unavailable
index eb6e1a331..1523b81e0 100755
--- a/test/integration/test-bug-735967-lib32-to-i386-unavailable
+++ b/test/integration/test-bug-735967-lib32-to-i386-unavailable
@@ -78,7 +78,7 @@ Conf lib32nss-mdns (0.10-6 unstable [amd64])' aptget dist-upgrade -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libfoo libfoo-bin:i386
The following NEW packages will be installed:
foo libfoo libfoo-bin:i386
diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol
index f6336ffe3..e86f28824 100755
--- a/test/integration/test-bug-738785-switch-protocol
+++ b/test/integration/test-bug-738785-switch-protocol
@@ -10,6 +10,7 @@ configarchitecture "i386"
buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
# setup http redirecting to https
+getlabelfromsuite() { echo 'Testcases'; }
setupaptarchive --no-update
changetowebserver -o 'aptwebserver::redirect::replace::/redirectme/=https://localhost:4433/' \
-o 'aptwebserver::redirect::replace::/downgrademe/=http://localhost:8080/' \
@@ -20,10 +21,10 @@ sed -i -e 's#:4433/#:8080/redirectme#' -e 's# https:# http:#' rootdir/etc/apt/so
testsuccess aptget update -o Debug::Acquire::http=1 -o Debug::Acquire::https=1 -o Debug::pkgAcquire::Worker=1
msgtest 'Test that the webserver does not answer' 'http requests'
-downloadfile 'http://localhost:8080/pool/apt_1.0/changelog' changelog >/dev/null 2>&1 && msgfail || msgpass
+downloadfile 'http://localhost:8080/pool/main/a/apt/apt_1.0/changelog' changelog >/dev/null 2>&1 && msgfail || msgpass
-echo 'Apt::Changelogs::Server "http://localhost:8080/redirectme";' > rootdir/etc/apt/apt.conf.d/changelog.conf
-testsuccessequal "'http://localhost:8080/redirectme/pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+echo 'Acquire::Changelogs::URI::Label::Testcases "http://localhost:8080/redirectme/pool/CHANGEPATH/changelog";' > rootdir/etc/apt/apt.conf.d/changelog.conf
+testsuccessequal "'http://localhost:8080/redirectme/pool/main/a/apt/apt_1.0/changelog' apt.changelog" aptget changelog apt --print-uris
cd downloaded
testsuccess aptget changelog apt -d
@@ -38,18 +39,15 @@ cd - >/dev/null
testsuccess aptget install apt -y
testdpkginstalled 'apt'
-# create a copy of all methods, expect https
-eval `aptconfig shell METHODS Dir::Bin::Methods/d`
-COPYMETHODS='usr/lib/apt/methods'
-mv rootdir/${COPYMETHODS} rootdir/${COPYMETHODS}.bak
-mkdir -p rootdir/$COPYMETHODS
-cd rootdir/$COPYMETHODS
-find $METHODS \! -type d | while read meth; do
- ln -s $meth
+# install a slowed down file: otherwise its to fast to reproduce combining
+NEWMETHODS="$(readlink -f rootdir)/usr/lib/apt/methods"
+OLDMETHODS="$(readlink -f rootdir/usr/lib/apt/methods)"
+rm $NEWMETHODS
+mkdir $NEWMETHODS
+for METH in $(find $OLDMETHODS ! -type d); do
+ ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
done
-rm https
-cd - >/dev/null
-echo "Dir::Bin::Methods \"${COPYMETHODS}\";" >> aptconfig.conf
+rm $NEWMETHODS/https
cd downloaded
testfailureequal "E: The method driver $(readlink -f './../')/rootdir/usr/lib/apt/methods/https could not be found.
@@ -58,8 +56,7 @@ testfailure test -e apt_1.0_all.deb
cd - >/dev/null
# revert to all methods
-rm -rf rootdir/$COPYMETHODS
-mv rootdir/${COPYMETHODS}.bak rootdir/${COPYMETHODS}
+ln -s $OLDMETHODS/https $NEWMETHODS
# check that downgrades from https to http are not allowed
webserverconfig 'aptwebserver::support::http' 'true'
diff --git a/test/integration/test-bug-758153-versioned-provides-support b/test/integration/test-bug-758153-versioned-provides-support
index 30bc921c3..6d43d9943 100755
--- a/test/integration/test-bug-758153-versioned-provides-support
+++ b/test/integration/test-bug-758153-versioned-provides-support
@@ -30,6 +30,18 @@ insertpackage 'unstable' 'baz' 'i386,amd64' '1' 'Depends: bar'
insertpackage 'experimental' 'baz' 'i386,amd64' '2' 'Depends: bar:i386'
insertpackage 'experimental' 'baz-broken' 'i386' '2' 'Depends: bar:amd64'
+insertpackage 'unstable' 'next' 'amd64' '1' 'Multi-Arch: foreign
+Provides: next (= 2)'
+insertpackage 'unstable' 'needsrealnext' 'amd64,i386' '2' 'Depends: next (>= 2)'
+
+insertpackage 'unstable' 'virtualnext2' 'amd64' '1' 'Multi-Arch: foreign
+Provides: next2 (= 2)'
+insertpackage 'unstable' 'needsnext2' 'amd64,i386' '2' 'Depends: next2 (>= 2)'
+
+insertpackage 'unstable' 'virtualnext3' 'amd64' '1' 'Multi-Arch: no
+Provides: next3 (= 2)'
+insertpackage 'unstable' 'needsnext3' 'amd64,i386' '2' 'Depends: next3 (>= 2)'
+
setupaptarchive
testsuccessequal 'Reading package lists...
@@ -145,7 +157,7 @@ Conf cool-webapp (4 experimental [all])' aptget install cool-webapp foreign-webs
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
baz:i386 foo
@@ -170,7 +182,7 @@ E: Unable to correct problems, you have held broken packages.' aptget install ba
testsuccessequal "Reading package lists...
Building dependency tree...
Selected version '2' (experimental [amd64]) for 'baz'
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
baz foo
@@ -183,7 +195,7 @@ Conf baz (2 experimental [amd64])" aptget install baz/experimental -s -q=0
testsuccessequal "Reading package lists...
Building dependency tree...
Selected version '2' (experimental [i386]) for 'baz:i386'
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
baz:i386 foo
@@ -204,3 +216,75 @@ The following information may help to resolve the situation:
The following packages have unmet dependencies:
baz-broken:i386 : Depends: bar but it is not installable
E: Unable to correct problems, you have held broken packages.' aptget install baz-broken -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ next
+The following NEW packages will be installed:
+ needsrealnext next
+0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
+Inst next (1 unstable [amd64])
+Inst needsrealnext (2 unstable [amd64])
+Conf next (1 unstable [amd64])
+Conf needsrealnext (2 unstable [amd64])' aptget install needsrealnext -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ next
+The following NEW packages will be installed:
+ needsrealnext:i386 next
+0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
+Inst next (1 unstable [amd64])
+Inst needsrealnext:i386 (2 unstable [i386])
+Conf next (1 unstable [amd64])
+Conf needsrealnext:i386 (2 unstable [i386])' aptget install needsrealnext:i386 -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ virtualnext2
+The following NEW packages will be installed:
+ needsnext2 virtualnext2
+0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
+Inst virtualnext2 (1 unstable [amd64])
+Inst needsnext2 (2 unstable [amd64])
+Conf virtualnext2 (1 unstable [amd64])
+Conf needsnext2 (2 unstable [amd64])' aptget install needsnext2 -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ virtualnext2
+The following NEW packages will be installed:
+ needsnext2:i386 virtualnext2
+0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
+Inst virtualnext2 (1 unstable [amd64])
+Inst needsnext2:i386 (2 unstable [i386])
+Conf virtualnext2 (1 unstable [amd64])
+Conf needsnext2:i386 (2 unstable [i386])' aptget install needsnext2:i386 -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ virtualnext3
+The following NEW packages will be installed:
+ needsnext3 virtualnext3
+0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
+Inst virtualnext3 (1 unstable [amd64])
+Inst needsnext3 (2 unstable [amd64])
+Conf virtualnext3 (1 unstable [amd64])
+Conf needsnext3 (2 unstable [amd64])' aptget install needsnext3 -s
+
+testfailureequal 'Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ needsnext3:i386 : Depends: next3:i386 (>= 2) but it is not installable
+E: Unable to correct problems, you have held broken packages.' aptget install needsnext3:i386 -s
diff --git a/test/integration/test-bug-multiarch-upgrade b/test/integration/test-bug-multiarch-upgrade
index 56071f184..b8821126f 100755
--- a/test/integration/test-bug-multiarch-upgrade
+++ b/test/integration/test-bug-multiarch-upgrade
@@ -18,7 +18,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libcups2
The following packages will be upgraded:
libcups2 libcups2:i386
diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes
index c6b292baa..b5d6b8ae4 100755
--- a/test/integration/test-compressed-indexes
+++ b/test/integration/test-compressed-indexes
@@ -60,7 +60,7 @@ testrun() {
msgtest 'Check if package is downloadable'
cd downloaded
testsuccess --nomsg aptget download testpkg
- msgtest '\tdeb file is present'; testsuccess --nomsg test -f testpkg_1.0_i386.deb
+ msgtest 'deb file is present'; testsuccess --nomsg test -f testpkg_1.0_i386.deb
rm -f testpkg_1.0_i386.deb
cd - >/dev/null
testsuccessequal 'Reading package lists...
diff --git a/test/integration/test-cve-2013-1051-InRelease-parsing b/test/integration/test-cve-2013-1051-InRelease-parsing
index e38e40cc9..a503ad0fe 100755
--- a/test/integration/test-cve-2013-1051-InRelease-parsing
+++ b/test/integration/test-cve-2013-1051-InRelease-parsing
@@ -12,7 +12,7 @@ insertpackage 'stable' 'good-pkg' 'all' '1.0'
setupaptarchive
changetowebserver
-ARCHIVE='http://localhost:8080/'
+ARCHIVE='http://localhost:8080'
msgtest 'Initial apt-get update should work with' 'InRelease'
testsuccess --nomsg aptget update
@@ -21,7 +21,7 @@ testsuccessequal "good-pkg:
Installed: (none)
Candidate: 1.0
Version table:
- 1.0 0
+ 1.0 500
500 ${ARCHIVE} stable/main i386 Packages" aptcache policy good-pkg
# now exchange to the Packages file, note that this could be
@@ -39,10 +39,15 @@ sed -i '/^-----BEGIN PGP SIGNATURE-----/,/^-----END PGP SIGNATURE-----/ s/^$/ /
cat aptarchive/dists/stable/Release >> aptarchive/dists/stable/InRelease
touch -d '+1hour' aptarchive/dists/stable/InRelease
-# ensure the update fails
-# useful for debugging to add "-o Debug::pkgAcquire::auth=true"
-msgtest 'apt-get update for should fail with the modified' 'InRelease'
-aptget update 2>&1 | grep -E -q '(Writing more data than expected|Hash Sum mismatch)' > /dev/null && msgpass || msgfail
+# ensure the update doesn't load bad data as good data
+# Note that we will pick up the InRelease itself as we download no other
+# indexes which would trigger a hashsum mismatch, but we ignore the 'bad'
+# part of the InRelease
+listcurrentlistsdirectory | sed '/_InRelease/ d' > listsdir.lst
+msgtest 'apt-get update should ignore unsigned data in the' 'InRelease'
+testsuccessequal "Get:1 http://localhost:8080 stable InRelease [$(stat -c%s aptarchive/dists/stable/InRelease) B]
+Reading package lists..." --nomsg aptget update
+testfileequal './listsdir.lst' "$(listcurrentlistsdirectory | sed '/_InRelease/ d')"
# ensure there is no package
testfailureequal 'Reading package lists...
@@ -57,5 +62,5 @@ testsuccessequal "good-pkg:
Installed: (none)
Candidate: 1.0
Version table:
- 1.0 0
+ 1.0 500
500 ${ARCHIVE} stable/main i386 Packages" aptcache policy good-pkg
diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak
index 50c682d43..86a852c32 100755
--- a/test/integration/test-essential-force-loopbreak
+++ b/test/integration/test-essential-force-loopbreak
@@ -27,7 +27,7 @@ testforcebreak() {
rm -f rootdir/var/lib/apt/extended_states
testfailureequal "Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
sysvinit
The following NEW packages will be installed:
systemd-sysv
diff --git a/test/integration/test-handle-redirect-as-used-mirror-change b/test/integration/test-handle-redirect-as-used-mirror-change
new file mode 100755
index 000000000..08a39a5e6
--- /dev/null
+++ b/test/integration/test-handle-redirect-as-used-mirror-change
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+configcompression '.' 'gz'
+
+buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
+
+setupaptarchive --no-update
+changetowebserver -o 'aptwebserver::redirect::replace::/redirectme/=http://0.0.0.0:8080/'
+rewritesourceslist 'http://localhost:8080/redirectme'
+
+testsuccessequal "Get:1 http://0.0.0.0:8080 unstable InRelease [$(stat -c %s aptarchive/dists/unstable/InRelease) B]
+Get:2 http://0.0.0.0:8080 unstable/main Sources [$(stat -c %s aptarchive/dists/unstable/main/source/Sources.gz) B]
+Get:3 http://0.0.0.0:8080 unstable/main amd64 Packages [$(stat -c %s aptarchive/dists/unstable/main/binary-amd64/Packages.gz) B]
+Get:4 http://0.0.0.0:8080 unstable/main Translation-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B]
+Reading package lists..." aptget update
+
+testsuccessequal 'Hit:1 http://0.0.0.0:8080 unstable InRelease
+Reading package lists...' aptget update
diff --git a/test/integration/test-handling-broken-orgroups b/test/integration/test-handling-broken-orgroups
index 149f05fa9..a465e5234 100755
--- a/test/integration/test-handling-broken-orgroups
+++ b/test/integration/test-handling-broken-orgroups
@@ -25,7 +25,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
cool
The following NEW packages will be installed:
cool coolstuff
@@ -37,7 +37,7 @@ Conf coolstuff (1.0-1 unstable [all])' aptget install coolstuff -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
stuff
The following NEW packages will be installed:
coolstuff2 stuff
@@ -63,7 +63,7 @@ E: Unable to correct problems, you have held broken packages.' aptget install co
testsuccessequal 'Reading package lists...
Building dependency tree...
Recommended packages:
- cool2 stuff2
+ cool2 | stuff2
The following NEW packages will be installed:
coolstuff-brokenrec
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
@@ -72,7 +72,7 @@ Conf coolstuff-brokenrec (1.0-1 unstable [all])' aptget install coolstuff-broken
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
stuff
The following NEW packages will be installed:
coolstuff-conflict stuff
@@ -84,7 +84,7 @@ Conf coolstuff-conflict (1.0-1 unstable [all])' aptget install coolstuff-conflic
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
extrastuff
The following NEW packages will be installed:
coolstuff-provided extrastuff
diff --git a/test/integration/test-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks
index 20424b942..a7d9d4054 100755
--- a/test/integration/test-ignore-provides-if-versioned-breaks
+++ b/test/integration/test-ignore-provides-if-versioned-breaks
@@ -57,7 +57,7 @@ Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo-breaker-3 foo-provider
@@ -95,7 +95,7 @@ Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-prov
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo-foreign:amd64
The following NEW packages will be installed:
foo-foreign-breaker-3 foo-foreign-provider
@@ -133,18 +133,18 @@ Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider f
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
- foo-same:amd64 foo-same
+The following additional packages will be installed:
+ foo-same foo-same:amd64
The following NEW packages will be installed:
foo-same-breaker-3 foo-same-provider
The following packages will be upgraded:
- foo-same:amd64 foo-same
+ foo-same foo-same:amd64
2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
-Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ]
-Inst foo-same [2.0] (4.0 unstable [i386])
+Inst foo-same [2.0] (4.0 unstable [i386]) [foo-same:i386 on foo-same:amd64] [foo-same:amd64 on foo-same:i386] [foo-same:amd64 ]
+Inst foo-same:amd64 [2.0] (4.0 unstable [amd64])
Inst foo-same-breaker-3 (1.0 unstable [i386])
Inst foo-same-provider (1.0 unstable [i386])
-Conf foo-same (4.0 unstable [i386])
Conf foo-same:amd64 (4.0 unstable [amd64])
+Conf foo-same (4.0 unstable [i386])
Conf foo-same-breaker-3 (1.0 unstable [i386])
Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s
diff --git a/test/integration/test-ignore-provides-if-versioned-conflicts b/test/integration/test-ignore-provides-if-versioned-conflicts
index a781d8e44..f30789ea6 100755
--- a/test/integration/test-ignore-provides-if-versioned-conflicts
+++ b/test/integration/test-ignore-provides-if-versioned-conflicts
@@ -57,7 +57,7 @@ Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo-breaker-3 foo-provider
@@ -95,7 +95,7 @@ Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-prov
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo-foreign:amd64
The following NEW packages will be installed:
foo-foreign-breaker-3 foo-foreign-provider
@@ -133,18 +133,18 @@ Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider f
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
- foo-same:amd64 foo-same
+The following additional packages will be installed:
+ foo-same foo-same:amd64
The following NEW packages will be installed:
foo-same-breaker-3 foo-same-provider
The following packages will be upgraded:
- foo-same:amd64 foo-same
+ foo-same foo-same:amd64
2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
-Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ]
-Inst foo-same [2.0] (4.0 unstable [i386])
+Inst foo-same [2.0] (4.0 unstable [i386]) [foo-same:i386 on foo-same:amd64] [foo-same:amd64 on foo-same:i386] [foo-same:amd64 ]
+Inst foo-same:amd64 [2.0] (4.0 unstable [amd64])
Inst foo-same-breaker-3 (1.0 unstable [i386])
Inst foo-same-provider (1.0 unstable [i386])
-Conf foo-same (4.0 unstable [i386])
Conf foo-same:amd64 (4.0 unstable [amd64])
+Conf foo-same (4.0 unstable [i386])
Conf foo-same-breaker-3 (1.0 unstable [i386])
Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s
diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove
index c2fc37ee7..2b020ceca 100755
--- a/test/integration/test-kernel-helper-autoremove
+++ b/test/integration/test-kernel-helper-autoremove
@@ -58,6 +58,22 @@ testprotected() {
testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
+The following packages were automatically installed and are no longer required:
+ linux-headers-1000000-1-generic (100.0.0-1)
+ linux-image-1.0.0-2-generic (1.0.0-2)
+ linux-image-100.0.0-1-generic (100.0.0-1)
+ $CURRENTKERNEL (1)
+Use 'apt-get autoremove' to remove them.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -sV
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+4 packages were automatically installed and are no longer required.
+Use 'apt-get autoremove' to remove them.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s -o APT::Get::HideAutoRemove=small
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
The following packages will be REMOVED:
linux-headers-1000000-1-generic (100.0.0-1)
linux-image-1.0.0-2-generic (1.0.0-2)
diff --git a/test/integration/test-method-rred b/test/integration/test-method-rred
new file mode 100755
index 000000000..a8de3ea28
--- /dev/null
+++ b/test/integration/test-method-rred
@@ -0,0 +1,194 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'i386'
+
+echo 'Package: coolstuff
+Version: 0.8.15
+Description: collection of stuff
+ A lot, too much to iterate all, but at least this:
+ - stuff
+ - more stuff
+ - even more stuff
+ .
+ And a cow.
+
+Package: oldstuff
+Version: 0-1
+Description: collection of outdated stuff
+ A lot, but of no use nowadays, but at least this:
+ - stuff
+ - more stuff
+ - even more stuff
+ .
+ And a dog.' > Packages
+
+testrred() {
+ msgtest "$1" "$2"
+ if [ -z "$3" ]; then
+ echo -n '' > Packages.ed
+ else
+ echo "$3" > Packages.ed
+ fi
+ rred() {
+ cat Packages | runapt "${METHODSDIR}/rred" "$@"
+ }
+ testsuccessequal "$4" --nomsg rred -f Packages.ed
+}
+
+testrred 'Remove' 'first line' '1d' "$(tail -n +2 ./Packages)"
+testrred 'Remove' 'empty line' '10d' "$(head -n 9 ./Packages)
+$(tail -n 9 ./Packages)"
+testrred 'Remove' 'line in a paragraph' '5d' "$(head -n 4 ./Packages)
+$(tail -n 14 ./Packages)"
+testrred 'Remove' 'last line' '19d' "$(head -n -1 ./Packages)"
+testrred 'Remove' 'multiple single lines' '17d
+7d' "$(sed -e '/^ - even more stuff$/ d' ./Packages)"
+testrred 'Remove' 'first paragraph' '1,10d' "$(tail -n 9 ./Packages)"
+testrred 'Remove' 'a few lines in the middle' '5,14d' "$(head -n 4 ./Packages)
+$(tail -n 5 ./Packages)"
+testrred 'Remove' 'second paragraph' '10,19d' "$(head -n 9 ./Packages)"
+testrred 'Mass Remove' 'all stuff lines' '15,17d
+13d
+11d
+5,7d
+3d
+1d' "$(sed '/stuff/ d' ./Packages)"
+
+testrred 'Single line add' 'first line' '0a
+Format: 3.0 (native)
+.' "Format: 3.0 (native)
+$(cat ./Packages)"
+testrred 'Single line add' 'last line' '19a
+Multi-Arch: foreign
+.' "$(cat ./Packages)
+Multi-Arch: foreign"
+testrred 'Single line add' 'middle' '9a
+Multi-Arch: foreign
+.' "$(head -n 9 ./Packages)
+Multi-Arch: foreign
+$(tail -n 10 ./Packages)"
+
+testrred 'Multi line add' 'first line' '0a
+Format: 3.0 (native)
+Source: apt
+.' "Format: 3.0 (native)
+Source: apt
+$(cat ./Packages)"
+testrred 'Multi line add' 'last line' '19a
+Multi-Arch: foreign
+Homepage: https://debian.org
+.' "$(cat ./Packages)
+Multi-Arch: foreign
+Homepage: https://debian.org"
+testrred 'Multi line add' 'middle' '9a
+Multi-Arch: foreign
+Homepage: https://debian.org
+.' "$(head -n 9 ./Packages)
+Multi-Arch: foreign
+Homepage: https://debian.org
+$(tail -n 10 ./Packages)"
+
+testrred 'Single line change' 'first line' '1c
+Package: supercoolstuff
+.' "Package: supercoolstuff
+$(tail -n +2 ./Packages)"
+testrred 'Single line change' 'in the middle' '9c
+ And a super cow.
+.' "$(head -n 8 ./Packages)
+ And a super cow.
+$(tail -n 10 ./Packages)"
+testrred 'Single line change' 'an empty line' '10c
+
+.' "$(head -n 9 ./Packages)
+
+$(tail -n 9 ./Packages)"
+testrred 'Single line change' 'a spacy line' '10c
+
+.' "$(head -n 9 ./Packages)
+
+$(tail -n 9 ./Packages)"
+testrred 'Single line change' 'last line' '19c
+ And a cat.
+.' "$(head -n -1 ./Packages)
+ And a cat."
+
+testrred 'Multi line change' 'exchange' '5,7c
+ - good stuff
+ - more good stuff
+ - even more good stuff
+.' "$(head -n 4 ./Packages)
+ - good stuff
+ - more good stuff
+ - even more good stuff
+$(tail -n 12 ./Packages)"
+testrred 'Multi line change' 'less' '5,7c
+ - good stuff
+ - more good stuff
+.' "$(head -n 4 ./Packages)
+ - good stuff
+ - more good stuff
+$(tail -n 12 ./Packages)"
+testrred 'Multi line change' 'more' '5,7c
+ - good stuff
+ - more good stuff
+ - even more good stuff
+ - bonus good stuff
+.' "$(head -n 4 ./Packages)
+ - good stuff
+ - more good stuff
+ - even more good stuff
+ - bonus good stuff
+$(tail -n 12 ./Packages)"
+
+failrred() {
+ msgtest 'Failure caused by' "$1"
+ echo "$2" > Packages.ed
+ rred() {
+ cat Packages | runapt "${METHODSDIR}/rred" "$@"
+ }
+ testfailure --nomsg rred -f Packages.ed
+}
+
+failrred 'Bogus content' '<html>
+</html>'
+
+# not a problem per-se, but we want our parser to be really strict
+failrred 'Empty patch file' ''
+failrred 'Empty line patch file' '
+'
+failrred 'Empty line before command' '
+1d'
+failrred 'Empty line after command' '1d
+'
+failrred 'Empty line between commands' '17d
+
+7d'
+failrred 'Empty spaces lines before command' '
+1d'
+failrred 'Empty spaces lines after command' '1d
+ '
+failrred 'Empty spaces lines between commands' '17d
+
+7d'
+
+# the line before the first one can't be deleted/changed
+failrred 'zero line delete' '0d'
+failrred 'zero line change' '0c
+Package: supercoolstuff
+.'
+# and this makes no sense at all
+failrred 'negative line delete' '-1d'
+failrred 'negative line change' '-1c
+Package: supercoolstuff
+.'
+failrred 'negative line add' '-1a
+Package: supercoolstuff
+.'
+failrred 'Wrong order of commands' '7d
+17d'
+failrred 'End before start' '7,6d'
diff --git a/test/integration/test-multiarch-allowed b/test/integration/test-multiarch-allowed
new file mode 100755
index 000000000..2eb479c17
--- /dev/null
+++ b/test/integration/test-multiarch-allowed
@@ -0,0 +1,245 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertpackage 'unstable' 'foo' 'amd64,i386' '1' 'Multi-Arch: allowed'
+insertpackage 'unstable' 'needsfoo' 'amd64,i386' '1' 'Depends: foo'
+insertpackage 'unstable' 'needsfooany' 'amd64,i386' '1' 'Depends: foo:any'
+insertpackage 'unstable' 'needsfoover1' 'amd64,i386' '1' 'Depends: foo:any (>= 1)'
+insertpackage 'unstable' 'needsfoover2' 'amd64,i386' '1' 'Depends: foo:any (>= 2)'
+insertpackage 'unstable' 'hatesfoo' 'amd64' '1' 'Conflicts: foo'
+insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no sense…
+insertpackage 'unstable' 'hatesfoonative' 'amd64' '1' 'Conflicts: foo:amd64'
+
+insertpackage 'unstable' 'coolfoo' 'amd64' '1' 'Multi-Arch:allowed
+Provides: coolbar'
+insertpackage 'unstable' 'coolfoover' 'amd64' '1' 'Multi-Arch:allowed
+Provides: coolbar (= 2)'
+insertpackage 'unstable' 'needscoolfoo' 'amd64' '1' 'Depends: coolfoo, coolbar'
+insertpackage 'unstable' 'needscoolfooany' 'amd64' '1' 'Depends: coolfoo:any, coolbar:any'
+insertpackage 'unstable' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar'
+insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar (>= 1)'
+insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 1)'
+insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 3)'
+
+setupaptarchive
+
+BADPREFIX='Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+'
+
+solveableinsinglearch0() {
+ testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo needsfoo
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1 unstable [amd64])
+Inst needsfoo (1 unstable [amd64])
+Conf foo (1 unstable [amd64])
+Conf needsfoo (1 unstable [amd64])' aptget install needsfoo -s
+}
+solveableinsinglearch0
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ foo:i386
+The following NEW packages will be installed:
+ foo:i386 needsfoo:i386
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo:i386 (1 unstable [i386])
+Inst needsfoo:i386 (1 unstable [i386])
+Conf foo:i386 (1 unstable [i386])
+Conf needsfoo:i386 (1 unstable [i386])' aptget install needsfoo:i386 -s
+testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ needsfoo:i386 : Depends: foo:i386 but it is not going to be installed
+E: Unable to correct problems, you have held broken packages." aptget install needsfoo:i386 foo:amd64 -s
+testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ needsfoo : Depends: foo but it is not going to be installed
+E: Unable to correct problems, you have held broken packages." aptget install needsfoo foo:i386 -s
+
+solveableinsinglearch1() {
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo $1
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1 unstable [amd64])
+Inst $1 (1 unstable [amd64])
+Conf foo (1 unstable [amd64])
+Conf $1 (1 unstable [amd64])" aptget install $1 -s
+}
+
+testneedsfooallgood() {
+ solveableinsinglearch1 $1
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo $1:i386
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1 unstable [amd64])
+Inst $1:i386 (1 unstable [i386])
+Conf foo (1 unstable [amd64])
+Conf $1:i386 (1 unstable [i386])" aptget install $1:i386 -s
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo:i386 $1:i386
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo:i386 (1 unstable [i386])
+Inst $1:i386 (1 unstable [i386])
+Conf foo:i386 (1 unstable [i386])
+Conf $1:i386 (1 unstable [i386])" aptget install $1:i386 foo:i386 -s
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo:i386 $1
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo:i386 (1 unstable [i386])
+Inst $1 (1 unstable [amd64])
+Conf foo:i386 (1 unstable [i386])
+Conf $1 (1 unstable [amd64])" aptget install $1 foo:i386 -s
+}
+testneedsfooallgood 'needsfooany'
+testneedsfooallgood 'needsfoover1'
+
+NEEDSFOO2NATIVE="$BADPREFIX
+The following packages have unmet dependencies:
+ needsfoover2 : Depends: foo:any (>= 2)
+E: Unable to correct problems, you have held broken packages."
+NEEDSFOO2FOREIGN="$BADPREFIX
+The following packages have unmet dependencies:
+ needsfoover2:i386 : Depends: foo:any:i386 (>= 2)
+E: Unable to correct problems, you have held broken packages."
+testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s
+testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 -s
+testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 foo:i386 -s
+testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 foo:i386 -s
+
+solveableinsinglearch2() {
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ hatesfoo : Conflicts: foo but 1 is to be installed
+E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoo -s
+ # the message differs slightly between single and multiarch
+ testfailuremsg 'E: Unable to correct problems, you have held broken packages.' aptget install foo hatesfooany -s
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ hatesfoonative : Conflicts: foo but 1 is to be installed
+E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoonative -s
+}
+solveableinsinglearch2
+testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ hatesfoo : Conflicts: foo:i386 but 1 is to be installed
+E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfoo -s
+testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ hatesfooany : Conflicts: foo:any
+ Conflicts: foo:any:i386
+E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfooany -s
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo:i386 hatesfoonative
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo:i386 (1 unstable [i386])
+Inst hatesfoonative (1 unstable [amd64])
+Conf foo:i386 (1 unstable [i386])
+Conf hatesfoonative (1 unstable [amd64])' aptget install foo:i386 hatesfoonative -s
+
+solveableinsinglearch3() {
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ coolfoo
+The following NEW packages will be installed:
+ coolfoo needscoolfoo
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst coolfoo (1 unstable [amd64])
+Inst needscoolfoo (1 unstable [amd64])
+Conf coolfoo (1 unstable [amd64])
+Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo -s
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ coolfoo
+The following NEW packages will be installed:
+ coolfoo coolfoover needscoolfoo
+0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Inst coolfoo (1 unstable [amd64])
+Inst coolfoover (1 unstable [amd64])
+Inst needscoolfoo (1 unstable [amd64])
+Conf coolfoo (1 unstable [amd64])
+Conf coolfoover (1 unstable [amd64])
+Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo coolfoover -s
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ needscoolfooany : Depends: coolbar:any but it is not installable
+E: Unable to correct problems, you have held broken packages." aptget install needscoolfooany -s
+ testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ coolfoo
+The following NEW packages will be installed:
+ coolfoo needscoolfoover0
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst coolfoo (1 unstable [amd64])
+Inst needscoolfoover0 (1 unstable [amd64])
+Conf coolfoo (1 unstable [amd64])
+Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s
+ testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ coolfoo coolfoover
+The following NEW packages will be installed:
+ coolfoo coolfoover needscoolfoover1
+0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Inst coolfoo (1 unstable [amd64])
+Inst coolfoover (1 unstable [amd64])
+Inst needscoolfoover1 (1 unstable [amd64])
+Conf coolfoo (1 unstable [amd64])
+Conf coolfoover (1 unstable [amd64])
+Conf needscoolfoover1 (1 unstable [amd64])' aptget install needscoolfoover1 -s
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ needscoolfoover2 : Depends: coolfoo:any (>= 2)
+E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover2 -s
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ needscoolfoover3 : Depends: coolfoo:any (>= 2)
+ Depends: coolbar (>= 3)
+E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover3 -s
+}
+solveableinsinglearch3
+
+msgmsg 'switch to single architecture'
+configarchitecture 'amd64'
+
+solveableinsinglearch0
+testfailureequal 'Reading package lists...
+Building dependency tree...
+E: Unable to locate package needsfoo' aptget install needsfoo:i386 -s
+
+solveableinsinglearch1 'needsfooany'
+solveableinsinglearch1 'needsfoover1'
+testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s
+solveableinsinglearch2
+solveableinsinglearch3
diff --git a/test/integration/test-multiarch-foreign b/test/integration/test-multiarch-foreign
index 7870126f5..58e5b462a 100755
--- a/test/integration/test-multiarch-foreign
+++ b/test/integration/test-multiarch-foreign
@@ -9,11 +9,17 @@ configarchitecture 'amd64' 'i386' 'armel'
insertpackage 'unstable' 'cool-foo' 'amd64,i386' '1.0' 'Depends: foo'
insertpackage 'unstable' 'cool-foo-x64' 'amd64' '1.0' 'Depends: foo:amd64'
insertpackage 'unstable' 'cool-foo-x32' 'amd64' '1.0' 'Depends: foo:i386'
+insertpackage 'unstable' 'hates-foo' 'amd64,i386' '1.0' 'Conflicts: foo'
+insertpackage 'unstable' 'hates-foo-x64' 'amd64' '1.0' 'Conflicts: foo:amd64'
+insertpackage 'unstable' 'hates-foo-x32' 'amd64' '1.0' 'Conflicts: foo:i386'
insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign'
insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider'
insertpackage 'unstable' 'cool-bar-x64' 'amd64' '1.0' 'Depends: bar-provider:amd64'
insertpackage 'unstable' 'cool-bar-x32' 'amd64' '1.0' 'Depends: bar-provider:i386'
+insertpackage 'unstable' 'hates-bar' 'amd64,i386' '1.0' 'Conflicts: bar-provider'
+insertpackage 'unstable' 'hates-bar-x64' 'amd64' '1.0' 'Conflicts: bar-provider:amd64'
+insertpackage 'unstable' 'hates-bar-x32' 'amd64' '1.0' 'Conflicts: bar-provider:i386'
insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider
Multi-Arch: foreign'
@@ -21,7 +27,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
cool-foo:i386 foo
@@ -53,7 +59,7 @@ Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
bar
The following NEW packages will be installed:
bar cool-bar:i386
@@ -97,7 +103,7 @@ Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386
satisfiable_in_singlearch() {
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
cool-foo foo
@@ -119,7 +125,7 @@ Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
bar
The following NEW packages will be installed:
bar cool-bar
@@ -152,7 +158,7 @@ Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
cool-foo-x64 foo
@@ -163,10 +169,37 @@ Conf foo (1.0 unstable [amd64])
Conf cool-foo-x64 (1.0 unstable [amd64])' aptget install cool-foo-x64 -s
}
+hatersgonnahate() {
+ BADPREFIX='Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+'
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ hates-foo : Conflicts: foo
+ Conflicts: foo:i386
+ Conflicts: foo:armel
+E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo -s
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ hates-foo-x64 : Conflicts: foo
+E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo-x64 -s
+ testfailureequal "$BADPREFIX
+The following packages have unmet dependencies:
+ hates-foo-x32 : Conflicts: foo:i386
+E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo-x32 -s
+}
+hatersgonnahate 'foo'
+hatersgonnahate 'foo:i386'
+
#FIXME: do not work in single-arch as i386 isn't known at cache generation time
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
cool-foo-x32 foo
@@ -178,7 +211,7 @@ Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
bar
The following NEW packages will be installed:
bar cool-bar-x32
@@ -190,7 +223,7 @@ Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s -q=0
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
bar
The following NEW packages will be installed:
bar cool-bar-x64
diff --git a/test/integration/test-ordering-ignore-not-matching-breaks b/test/integration/test-ordering-ignore-not-matching-breaks
deleted file mode 100755
index 7c1365bdd..000000000
--- a/test/integration/test-ordering-ignore-not-matching-breaks
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-set -e
-
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
-setupenvironment
-configarchitecture 'amd64' 'i386'
-
-insertpackage 'unstable-mp' 'crda' 'i386,amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda
-Multi-Arch: foreign'
-insertpackage 'unstable-m' 'crda' 'i386,amd64' '1.1.1-1ubuntu4m' 'Multi-Arch: foreign'
-insertpackage 'unstable-p' 'crda' 'i386,amd64' '1.1.1-1ubuntu4p' 'Provides: wireless-crda'
-insertpackage 'unstable' 'wireless-crda' 'i386,amd64' '1.16'
-
-
-insertinstalledpackage 'wireless-crda' 'amd64' '1.14'
-
-setupaptarchive
-
-testsuccessequal 'Reading package lists...
-Building dependency tree...
-The following NEW packages will be installed:
- crda
-0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
-Inst crda (1.1.1-1ubuntu4m unstable-m [amd64])
-Conf crda (1.1.1-1ubuntu4m unstable-m [amd64])' aptget install crda -s -t unstable-m
-
-testsuccessequal 'Reading package lists...
-Building dependency tree...
-The following NEW packages will be installed:
- crda
-0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
-Inst crda (1.1.1-1ubuntu4p unstable-p [amd64])
-Conf crda (1.1.1-1ubuntu4p unstable-p [amd64])' aptget install crda -s -t unstable-p
-
-testsuccessequal 'Reading package lists...
-Building dependency tree...
-The following NEW packages will be installed:
- crda
-0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
-Inst crda (1.1.1-1ubuntu4mp unstable-mp [amd64])
-Conf crda (1.1.1-1ubuntu4mp unstable-mp [amd64])' aptget install crda -s -t unstable-mp
-
-rm rootdir/var/lib/dpkg/status
-insertinstalledpackage 'crda' 'amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda
-Conflicts: wireless-crda (<< 1.15)
-Replaces: wireless-crda ( << 1.15)
-Multi-arch: foreign'
-
-testsuccessequal 'Reading package lists...
-Building dependency tree...
-The following NEW packages will be installed:
- wireless-crda
-0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
-Inst wireless-crda (1.16 unstable [amd64])
-Conf wireless-crda (1.16 unstable [amd64])' aptget install wireless-crda -s -t unstable
diff --git a/test/integration/test-parse-all-archs-into-cache b/test/integration/test-parse-all-archs-into-cache
new file mode 100755
index 000000000..7741563e3
--- /dev/null
+++ b/test/integration/test-parse-all-archs-into-cache
@@ -0,0 +1,91 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+insertpackage 'unstable' 'bar' 'i386' '1' 'Depends: foo'
+insertpackage 'unstable' 'foo' 'i386' '1' 'Multi-Arch: foreign
+Depends: libfoo1'
+insertpackage 'unstable' 'libfoo1' 'i386' '1' 'Multi-Arch: same'
+insertpackage 'experimental' 'foo' 'i386' '2' 'Multi-Arch: foreign
+Depends: libfoo1 (>= 2)'
+insertpackage 'experimental' 'libfoo1' 'i386' '2' 'Multi-Arch: same'
+
+# note: the system has amd64 not configured!
+insertinstalledpackage 'foo' 'amd64' '1' 'Multi-Arch: foreign
+Depends: libfoo1'
+
+setupaptarchive
+
+testfailureequal "Reading package lists...
+Building dependency tree...
+You might want to run 'apt-get -f install' to correct these.
+The following packages have unmet dependencies:
+ foo:amd64 : Depends: libfoo1:amd64 but it is not installable
+E: Unmet dependencies. Try using -f." aptget check -s
+
+insertinstalledpackage 'libfoo1' 'amd64' '1' 'Multi-Arch: same'
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...' aptget check -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ libfoo1
+The following packages will be REMOVED:
+ foo:amd64
+The following NEW packages will be installed:
+ foo libfoo1
+0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
+Remv foo:amd64 [1]
+Inst libfoo1 (1 unstable [i386])
+Inst foo (1 unstable [i386])
+Conf libfoo1 (1 unstable [i386])
+Conf foo (1 unstable [i386])' aptget install foo -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ libfoo1
+The following packages will be REMOVED:
+ foo:amd64 libfoo1:amd64
+The following NEW packages will be installed:
+ foo libfoo1
+0 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
+Remv foo:amd64 [1]
+Remv libfoo1:amd64 [1]
+Inst libfoo1 (2 experimental [i386])
+Inst foo (2 experimental [i386])
+Conf libfoo1 (2 experimental [i386])
+Conf foo (2 experimental [i386])' aptget install foo/experimental -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ foo libfoo1
+The following packages will be REMOVED:
+ foo:amd64
+The following NEW packages will be installed:
+ bar foo libfoo1
+0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
+Remv foo:amd64 [1]
+Inst libfoo1 (1 unstable [i386])
+Inst foo (1 unstable [i386])
+Inst bar (1 unstable [i386])
+Conf libfoo1 (1 unstable [i386])
+Conf foo (1 unstable [i386])
+Conf bar (1 unstable [i386])' aptget install bar -s
+
+configarchitecture 'i386' 'amd64'
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ bar
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst bar (1 unstable [i386])
+Conf bar (1 unstable [i386])' aptget install bar -s
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index 7d72a6944..e5fe21e0f 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -42,6 +42,8 @@ wasmergeused() {
testrun() {
msgmsg "Testcase: setup the base with: $*"
+ local DOWNLOADHASH=true
+ if [ "$1" = 'nohash' ]; then DOWNLOADHASH=false; shift; fi
find aptarchive -name 'Packages*' -type f -delete
cp ${PKGFILE} aptarchive/Packages
compressfile 'aptarchive/Packages'
@@ -76,6 +78,15 @@ SHA256-History:
SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
$(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
+ if $DOWNLOADHASH; then
+ echo "SHA1-Download:
+ 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
+ $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
+SHA256-Download:
+ d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
+ $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX
+ fi
+
generatereleasefiles '+1hour'
signreleasefiles
find aptarchive -name 'Packages*' -type f -delete
@@ -87,7 +98,7 @@ SHA256-Patches:
msgmsg "Testcase: index is already up-to-date: $*"
find rootdir/var/lib/apt/lists -name '*diff_Index' -type f -delete
testsuccess aptget update "$@"
- testequal 'Hit http://localhost:8080 InRelease
+ testequal 'Hit:1 http://localhost:8080 InRelease
Reading package lists...' aptget update "$@" -o Debug::Acquire::Transaction=0 -o Debug::pkgAcquire::Diffs=0
testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt newstuff
@@ -131,6 +142,17 @@ SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
$(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)
$(sha256sum ${PATCHFILE2} | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}) $(basename ${PATCHFILE2})" > $PATCHINDEX
+ if $DOWNLOADHASH; then
+ echo "SHA1-Download:
+ 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
+ $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
+ $(sha1sum ${PATCHFILE2}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}.gz) $(basename ${PATCHFILE2}.gz)
+SHA256-Download:
+ d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
+ $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
+ $(sha256sum ${PATCHFILE2}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}.gz) $(basename ${PATCHFILE2}.gz)" >> $PATCHINDEX
+ fi
+
generatereleasefiles '+2hour'
signreleasefiles
cp -a aptarchive/Packages Packages-future
@@ -150,6 +172,7 @@ SHA256-Patches:
mkdir -p aptarchive/Packages.diff
PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
+ cat $PATCHFILE | gzip > ${PATCHFILE}.gz
PATCHINDEX='aptarchive/Packages.diff/Index'
echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
SHA1-History:
@@ -165,11 +188,22 @@ SHA256-History:
SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
$(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
- echo 'I am Mallory and I change files' >> $PATCHFILE
+ if $DOWNLOADHASH; then
+ echo "SHA1-Download:
+ 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
+ $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
+SHA256-Download:
+ d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
+ $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX
+ fi
+ # needs to look like a valid command, otherwise the parser will fail before hashes are checked
+ echo '1d' > $PATCHFILE
cat $PATCHFILE | gzip > ${PATCHFILE}.gz
generatereleasefiles '+1hour'
signreleasefiles
testsuccess aptget update "$@"
+ cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output
+ testsuccess grep 'Hash Sum mismatch' rootdir/tmp/aptgetupdate.output
testnopackage oldstuff
testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt newstuff
@@ -198,6 +232,14 @@ SHA256-History:
SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
$(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE)000 $(basename $PATCHFILE)" > $PATCHINDEX
+ if $DOWNLOADHASH; then
+ echo "SHA1-Download:
+ 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
+ $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz)000 $(basename ${PATCHFILE}.gz)
+SHA256-Download:
+ d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
+ $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz)000 $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX
+ fi
generatereleasefiles '+1hour'
signreleasefiles
#find aptarchive -name 'Packages*' -type f -delete
@@ -212,6 +254,9 @@ echo 'Debug::pkgAcquire::Diffs "true";
Debug::Acquire::Transaction "true";
Debug::pkgAcquire::rred "true";' > rootdir/etc/apt/apt.conf.d/rreddebug.conf
+testrun nohash -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1
+testrun nohash -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1
+
testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1
testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1
testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=0
diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning
index 2675b51bc..ea266e934 100755
--- a/test/integration/test-policy-pinning
+++ b/test/integration/test-policy-pinning
@@ -20,9 +20,9 @@ testequalpolicy() {
testsuccessequal "Package files:
$(echo "$SP" | awk '{ printf("%3s\n",$0) }') ${STATUS}
release a=now
- $(echo "$AP" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE}/ Packages
+ $(echo "$AP" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} Packages
release c=
-Pinned packages:" aptcache policy $*
+Pinned packages:" aptcache policy "$@"
}
testglobalpolicy() {
@@ -89,11 +89,6 @@ testequalpolicycoolstuff() {
local AB="$3"
local AS="$4"
local PB="$5"
- local PINVERSION="$6"
- if [ -n "$PINVERSION" ]; then
- PINVERSION="Package pin: $PINVERSION
- "
- fi
local IS=""
local IB=""
local SB=""
@@ -105,11 +100,12 @@ testequalpolicycoolstuff() {
local BPO1ARCHIVE=""
local BPO2ARCHIVE=""
if [ ! "$7" = "2.0~bpo2" ]; then
- BPO1ARCHIVE=" $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE}/ backports/main i386 Packages"
+ BPO1PIN="$AB"
+ BPO1ARCHIVE=" $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main i386 Packages"
else
BPO2ARCHIVE="
- 2.0~bpo2 $PB
- $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE}/ backports/main i386 Packages"
+ 2.0~bpo2 $AB
+ $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main i386 Packages"
SB="$(echo "$SB" | tail -n 1)"
shift
fi
@@ -117,28 +113,28 @@ testequalpolicycoolstuff() {
testsuccessequal "coolstuff:
Installed: $INSTALLED
Candidate: $CANDIDATE
- ${PINVERSION}Version table:${BPO2ARCHIVE}
+ Version table:${BPO2ARCHIVE}
$IB 2.0~bpo1 $PB
${BPO1ARCHIVE}$SB
- $IS 1.0 $PB
- $(echo "$AS" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE}/ stable/main i386 Packages$SS" \
+ $IS 1.0 $AS
+ $(echo "$AS" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} stable/main i386 Packages$SS" \
aptcache policy coolstuff -o Policy=${INSTALLED}-${CANDIDATE}-${AB}-${AS}-${PB} $*
}
-testequalpolicycoolstuff "" "2.0~bpo1" 500 500 0 ""
-testequalpolicycoolstuff "" "1.0" 500 990 0 "" -t stable
-testequalpolicycoolstuff "" "2.0~bpo1" 990 500 0 "" -t backports
+testequalpolicycoolstuff "" "2.0~bpo1" 500 500 500 ""
+testequalpolicycoolstuff "" "1.0" 500 990 500 "" -t stable
+testequalpolicycoolstuff "" "2.0~bpo1" 990 500 990 "" -t backports
echo "Package: *
Pin: release n=backports
Pin-Priority: 200" > rootdir/etc/apt/preferences
-testequalpolicycoolstuff "" "1.0" 200 500 0 "" -o Test=GlobalPin
-testequalpolicycoolstuff "" "1.0" 200 990 0 "" -o Test=GlobalPin -t stable
-testequalpolicycoolstuff "" "2.0~bpo1" 990 500 0 "" -o Test=GlobalPin -t backports
+testequalpolicycoolstuff "" "1.0" 200 500 200 "" -o Test=GlobalPin
+testequalpolicycoolstuff "" "1.0" 200 990 200 "" -o Test=GlobalPin -t stable
+testequalpolicycoolstuff "" "2.0~bpo1" 990 500 990 "" -o Test=GlobalPin -t backports
echo "Package: *
Pin: release n=backports
Pin-Priority: 600" > rootdir/etc/apt/preferences
-testequalpolicycoolstuff "" "2.0~bpo1" 600 500 0 "" -o Test=GlobalPin
-testequalpolicycoolstuff "" "1.0" 600 990 0 "" -o Test=GlobalPin -t stable
+testequalpolicycoolstuff "" "2.0~bpo1" 600 500 600 "" -o Test=GlobalPin
+testequalpolicycoolstuff "" "1.0" 600 990 600 "" -o Test=GlobalPin -t stable
echo "Package: coolstuff
Pin: release n=backports
Pin-Priority: 200" > rootdir/etc/apt/preferences
@@ -165,18 +161,18 @@ sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes"
signreleasefiles
aptgetupdate
-testequalpolicycoolstuff "" "1.0" 1 500 0 "" -o Test=NotAutomatic
-testequalpolicycoolstuff "" "1.0" 1 990 0 "" -o Test=NotAutomatic -t stable
-testequalpolicycoolstuff "" "2.0~bpo1" 990 500 0 "" -o Test=NotAutomatic -t backports
+testequalpolicycoolstuff "" "1.0" 1 500 1 "" -o Test=NotAutomatic
+testequalpolicycoolstuff "" "1.0" 1 990 1 "" -o Test=NotAutomatic -t stable
+testequalpolicycoolstuff "" "2.0~bpo1" 990 500 990 "" -o Test=NotAutomatic -t backports
echo "Package: *
Pin: release n=backports
Pin-Priority: 200" > rootdir/etc/apt/preferences
-testequalpolicycoolstuff "" "1.0" 200 500 0 "" -o Test=NotAutomatic
+testequalpolicycoolstuff "" "1.0" 200 500 200 "" -o Test=NotAutomatic
echo "Package: *
Pin: release n=backports
Pin-Priority: 600" > rootdir/etc/apt/preferences
-testequalpolicycoolstuff "" "2.0~bpo1" 600 500 0 "" -o Test=NotAutomatic
-testequalpolicycoolstuff "" "1.0" 600 990 0 "" -o Test=NotAutomatic -t stable
+testequalpolicycoolstuff "" "2.0~bpo1" 600 500 600 "" -o Test=NotAutomatic
+testequalpolicycoolstuff "" "1.0" 600 990 600 "" -o Test=NotAutomatic -t stable
echo "Package: coolstuff
Pin: release n=backports
Pin-Priority: 200" > rootdir/etc/apt/preferences
@@ -193,18 +189,18 @@ sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes"
signreleasefiles
aptgetupdate
-testequalpolicycoolstuff "" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades
-testequalpolicycoolstuff "" "1.0" 100 990 0 "" -o Test=ButAutomaticUpgrades -t stable
-testequalpolicycoolstuff "" "2.0~bpo1" 990 500 0 "" -o Test=ButAutomaticUpgrades -t backports
+testequalpolicycoolstuff "" "1.0" 100 500 100 "" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "" "1.0" 100 990 100 "" -o Test=ButAutomaticUpgrades -t stable
+testequalpolicycoolstuff "" "2.0~bpo1" 990 500 990 "" -o Test=ButAutomaticUpgrades -t backports
echo "Package: *
Pin: release n=backports
Pin-Priority: 200" > rootdir/etc/apt/preferences
-testequalpolicycoolstuff "" "1.0" 200 500 0 "" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "" "1.0" 200 500 200 "" -o Test=ButAutomaticUpgrades
echo "Package: *
Pin: release n=backports
Pin-Priority: 600" > rootdir/etc/apt/preferences
-testequalpolicycoolstuff "" "2.0~bpo1" 600 500 0 "" -o Test=ButAutomaticUpgrades
-testequalpolicycoolstuff "" "1.0" 600 990 0 "" -o Test=ButAutomaticUpgrades -t stable
+testequalpolicycoolstuff "" "2.0~bpo1" 600 500 600 "" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "" "1.0" 600 990 600 "" -o Test=ButAutomaticUpgrades -t stable
echo "Package: coolstuff
Pin: release n=backports
Pin-Priority: 200" > rootdir/etc/apt/preferences
@@ -218,18 +214,18 @@ testequalpolicycoolstuff "" "1.0" 100 990 600 "2.0~bpo1" -o Test=ButAutomaticUpg
rm rootdir/etc/apt/preferences
testsuccess aptget install coolstuff -y
-testequalpolicycoolstuff "1.0" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "1.0" "1.0" 100 500 100 "" -o Test=ButAutomaticUpgrades
testsuccess aptget dist-upgrade -y
-testequalpolicycoolstuff "1.0" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades
-testequalpolicycoolstuff "1.0" "1.0" 100 990 0 "" -o Test=ButAutomaticUpgrades -t stable
-testequalpolicycoolstuff "1.0" "2.0~bpo1" 990 500 0 "" -o Test=ButAutomaticUpgrades -t backports
+testequalpolicycoolstuff "1.0" "1.0" 100 500 100 "" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "1.0" "1.0" 100 990 100 "" -o Test=ButAutomaticUpgrades -t stable
+testequalpolicycoolstuff "1.0" "2.0~bpo1" 990 500 990 "" -o Test=ButAutomaticUpgrades -t backports
testsuccess aptget install coolstuff -t backports -y
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 100 500 0 "" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 100 500 100 "" -o Test=ButAutomaticUpgrades
testsuccess aptget dist-upgrade -y
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 100 500 0 "" -o Test=ButAutomaticUpgrades
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 100 990 0 "" -o Test=ButAutomaticUpgrades -t stable
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 990 500 0 "" -o Test=ButAutomaticUpgrades -t backports
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 100 500 100 "" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 100 990 100 "" -o Test=ButAutomaticUpgrades -t stable
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 990 500 990 "" -o Test=ButAutomaticUpgrades -t backports
rm incoming/backports.main.pkglist incoming/backports.main.srclist
buildsimplenativepackage "coolstuff" "all" "2.0~bpo2" "backports"
@@ -239,14 +235,74 @@ sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes"
signreleasefiles
aptgetupdate
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 500 0 "" "2.0~bpo2" -o Test=NotAutomatic
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 990 0 "" "2.0~bpo2" -o Test=NotAutomatic -t stable
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 990 500 0 "" "2.0~bpo2" -o Test=NotAutomatic -t backports
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 500 100 "" "2.0~bpo2" -o Test=NotAutomatic
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 990 100 "" "2.0~bpo2" -o Test=NotAutomatic -t stable
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 990 500 100 "" "2.0~bpo2" -o Test=NotAutomatic -t backports
sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes"
signreleasefiles
aptgetupdate
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 500 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 990 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades -t stable
-testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 990 500 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades -t backports
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 500 100 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 990 100 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades -t stable
+testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 990 500 100 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades -t backports
+
+
+tmppath=$(readlink -f .)
+
+# Check 16-bit integers
+echo "Package: coolstuff
+Pin: release n=backports
+Pin-Priority: 32767
+" > rootdir/etc/apt/preferences
+
+testsuccess aptget install -s coolstuff -o PinPriority=32767
+
+echo "Package: coolstuff
+Pin: release n=backports
+Pin-Priority: -32768
+" > rootdir/etc/apt/preferences
+testsuccess aptget install -s coolstuff -o PinPriority=-32768
+
+
+# Check for 32-bit integers
+echo "Package: coolstuff
+Pin: release n=backports
+Pin-Priority: 32768
+" > rootdir/etc/apt/preferences
+
+testfailureequal "Reading package lists...
+E: ${tmppath}/rootdir/etc/apt/preferences: Value 32768 is outside the range of valid pin priorities (-32768 to 32767)" \
+ aptget install -s coolstuff -o PinPriority=32768
+
+
+echo "Package: coolstuff
+Pin: release n=backports
+Pin-Priority: -32769
+" > rootdir/etc/apt/preferences
+
+testfailureequal "Reading package lists...
+E: ${tmppath}/rootdir/etc/apt/preferences: Value -32769 is outside the range of valid pin priorities (-32768 to 32767)" \
+ aptget install -s coolstuff -o PinPriority=-32769
+
+# Check for 64-bit integers
+
+echo "Package: coolstuff
+Pin: release n=backports
+Pin-Priority: 2147483648
+" > rootdir/etc/apt/preferences
+
+testfailureequal "Reading package lists...
+E: Cannot convert 2147483648 to integer - (34: Numerical result out of range)
+E: ${tmppath}/rootdir/etc/apt/preferences: Value 2147483648 is outside the range of valid pin priorities (-32768 to 32767)" \
+ aptget install -s coolstuff -o PinPriority=2147483648
+
+# Check for 0
+echo "Package: coolstuff
+Pin: release n=backports
+Pin-Priority: 0
+" > rootdir/etc/apt/preferences
+
+testfailureequal "Reading package lists...
+E: No priority (or zero) specified for pin" \
+ aptget install -s coolstuff -o PinPriority=0
diff --git a/test/integration/test-prefer-higher-priority-providers b/test/integration/test-prefer-higher-priority-providers
index 85a302fb1..e6da2e151 100755
--- a/test/integration/test-prefer-higher-priority-providers
+++ b/test/integration/test-prefer-higher-priority-providers
@@ -15,7 +15,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
awesome foo
@@ -39,7 +39,7 @@ testsuccessequal "Reading package lists...
Building dependency tree...
Package 'bar' is not installed, so not removed
Package 'baz' is not installed, so not removed
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
The following NEW packages will be installed:
awesome foo
@@ -52,7 +52,7 @@ Conf awesome (1 unstable [all])" aptget install awesome bar- baz- -s
testsuccessequal "Reading package lists...
Building dependency tree...
Package 'foo' is not installed, so not removed
-The following extra packages will be installed:
+The following additional packages will be installed:
bar
The following NEW packages will be installed:
awesome bar
@@ -66,7 +66,7 @@ testsuccessequal "Reading package lists...
Building dependency tree...
Package 'foo' is not installed, so not removed
Package 'baz' is not installed, so not removed
-The following extra packages will be installed:
+The following additional packages will be installed:
bar
The following NEW packages will be installed:
awesome bar
@@ -80,7 +80,7 @@ testsuccessequal "Reading package lists...
Building dependency tree...
Package 'foo' is not installed, so not removed
Package 'bar' is not installed, so not removed
-The following extra packages will be installed:
+The following additional packages will be installed:
baz
The following NEW packages will be installed:
awesome baz
diff --git a/test/integration/test-prefer-native-architecture-over-higher-priority b/test/integration/test-prefer-native-architecture-over-higher-priority
index 7e4f8f34b..e7f8c28e7 100755
--- a/test/integration/test-prefer-native-architecture-over-higher-priority
+++ b/test/integration/test-prefer-native-architecture-over-higher-priority
@@ -14,7 +14,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
m4
The following NEW packages will be installed:
autoconf m4
diff --git a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew
index 5f67c0191..11c120c53 100755
--- a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew
+++ b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew
@@ -83,7 +83,7 @@ E: Unable to correct problems, you have held broken packages.' aptget install de
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libsame3:i386 libsame3
The following NEW packages will be installed:
depender3 libsame3
diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching
index a1a6a6142..1790e8381 100755
--- a/test/integration/test-release-candidate-switching
+++ b/test/integration/test-release-candidate-switching
@@ -56,7 +56,7 @@ setupaptarchive
testfailureequal "Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.1-1+sid)
amarok-utils (2.3.1-1+sid)
libc6 (2.11.2-7+sid)
@@ -75,7 +75,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a
testfailureequal "Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -97,7 +97,7 @@ Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -119,7 +119,7 @@ Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -143,7 +143,7 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -173,7 +173,7 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-higher'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-higher'
Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-higher'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-higher'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -197,7 +197,7 @@ Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null2'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null2'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null2'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -221,7 +221,7 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine'
Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-xine'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -245,7 +245,7 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine2'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine2'
Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine2'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine2'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -270,7 +270,7 @@ Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because
Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine3' because of 'amarok-xine3'
Selected version '2.0' (experimental [all]) for 'intermediatepkg' because of 'phonon-backend-xine3'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine3'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
intermediatepkg (2.0)
@@ -296,7 +296,7 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine4'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine4'
Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine4'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine4'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -320,7 +320,7 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-broken'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-broken'
Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-broken'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-broken'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -343,7 +343,7 @@ Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-recommends'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
amarok-utils (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
@@ -365,12 +365,12 @@ testfailureequal "Reading package lists...
Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
Recommended packages:
amarok-utils (2.3.1-1+sid)
phonon-backend-xine (4.6.0really4.4.2-1+sid)
- phonon-backend ()
+ | phonon-backend
libmtp8 (0.3.1+sid)
libc6 (2.11.2-7+sid)
The following NEW packages will be installed:
@@ -386,7 +386,7 @@ testfailureequal "Reading package lists...
Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends2'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends2'
-The following extra packages will be installed:
+The following additional packages will be installed:
amarok-common (2.3.2-2+exp)
libc6 (2.11.2-7+sid)
libmtp8 (0.3.1+sid)
diff --git a/test/integration/test-releasefile-valid-until b/test/integration/test-releasefile-valid-until
index e000abf5d..43574ec3e 100755
--- a/test/integration/test-releasefile-valid-until
+++ b/test/integration/test-releasefile-valid-until
@@ -46,3 +46,12 @@ runtest 'accepted' 'good Min-Valid (bad Until, good Max-Valid) <' 'now - 7 days'
runtest 'rejected' 'bad Max-Valid (bad Until, good Min-Valid) >' 'now - 7 days' 'now - 2 days' -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=2419200
runtest 'rejected' 'bad Max-Valid (bad Until, bad Min-Valid) <' 'now - 7 days' 'now - 2 days' -o Acquire::Min-ValidTime=12096 -o Acquire::Max-ValidTime=241920
runtest 'rejected' 'bad Max-Valid (bad Until, bad Min-Valid) >' 'now - 7 days' 'now - 2 days' -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=241920
+
+sed -i -e 's#\(deb\(-src\)\?\) #\1 [check-valid-until=no] #' rootdir/etc/apt/sources.list.d/*
+runtest 'accepted' 'bad Until but overriden by sources option' 'now - 7 days' 'now - 4 days'
+
+sed -i -e 's#\(deb\(-src\)\?\) \[check-valid-until=no\] #\1 [valid-until-max=86400] #' rootdir/etc/apt/sources.list.d/*
+runtest 'rejected' 'bad Max-Valid (good Until) via sources option' 'now - 7 days' 'now + 4 days'
+
+sed -i -e 's#\(deb\(-src\)\?\) \[valid-until-max=86400\] #\1 [valid-until-min=1209600] #' rootdir/etc/apt/sources.list.d/*
+runtest 'accepted' 'good Min-Valid (bad Until) via sources option' 'now - 7 days' 'now - 4 days'
diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification
index 469ed34d2..c4d1455eb 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -36,12 +36,12 @@ installaptold() {
testsuccessequal 'Reading package lists...
Building dependency tree...
Suggested packages:
- aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
+ aptitude | synaptic | wajig dpkg-dev apt-doc bzip2 lzma python-apt
The following NEW packages will be installed:
apt
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 5370 kB of additional disk space will be used.
-Get:1 http://localhost:8080/ apt 0.7.25.3
+Get:1 http://localhost:8080 apt 0.7.25.3
Download complete and in download only mode' aptget install apt -dy
}
@@ -49,12 +49,12 @@ installaptnew() {
testsuccessequal 'Reading package lists...
Building dependency tree...
Suggested packages:
- aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
+ aptitude | synaptic | wajig dpkg-dev apt-doc bzip2 lzma python-apt
The following NEW packages will be installed:
apt
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 5808 kB of additional disk space will be used.
-Get:1 http://localhost:8080/ apt 0.8.0~pre1
+Get:1 http://localhost:8080 apt 0.8.0~pre1
Download complete and in download only mode' aptget install apt -dy
}
@@ -62,28 +62,28 @@ failaptold() {
testfailureequal 'Reading package lists...
Building dependency tree...
Suggested packages:
- aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
+ aptitude | synaptic | wajig dpkg-dev apt-doc bzip2 lzma python-apt
The following NEW packages will be installed:
apt
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 5370 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
apt
-E: There are problems and -y was used without --force-yes' aptget install apt -dy
+E: There were unauthenticated packages and -y was used without --allow-unauthenticated' aptget install apt -dy
}
failaptnew() {
testfailureequal 'Reading package lists...
Building dependency tree...
Suggested packages:
- aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
+ aptitude | synaptic | wajig dpkg-dev apt-doc bzip2 lzma python-apt
The following NEW packages will be installed:
apt
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 5808 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
apt
-E: There are problems and -y was used without --force-yes' aptget install apt -dy
+E: There were unauthenticated packages and -y was used without --allow-unauthenticated' aptget install apt -dy
}
# fake our downloadable file
@@ -92,7 +92,7 @@ touch aptarchive/apt.deb
PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')"
updatewithwarnings() {
- testwarning aptget update
+ testwarning aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::gpgv=1
testsuccess grep -E "$1" rootdir/tmp/testwarning.output
}
@@ -139,11 +139,6 @@ runtest() {
failaptold
prepare ${PKGFILE}-new
- # weborf doesn't support If-Range
- for release in $(find rootdir/var/lib/apt/lists/partial/ -name '*Release'); do
- rm $release
- touch $release
- done
signreleasefiles 'Joe Sixpack'
find aptarchive/ -name "$DELETEFILE" -delete
msgmsg 'Bad warm archive signed by' 'Joe Sixpack'
@@ -191,6 +186,48 @@ runtest() {
testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt
installaptnew
+
+ prepare ${PKGFILE}
+ rm -rf rootdir/var/lib/apt/lists
+ signreleasefiles 'Marvin Paranoid'
+ find aptarchive/ -name "$DELETEFILE" -delete
+ msgmsg 'Cold archive signed by good keyring' 'Marvin Paranoid'
+ local MARVIN="$(readlink -f keys/marvinparanoid.pub)"
+ sed -i "s#^\(deb\(-src\)\?\) #\1 [signed-by=$MARVIN] #" rootdir/etc/apt/sources.list.d/*
+ testsuccess aptget update -o Debug::pkgAcquire::Worker=1
+ testsuccessequal "$(cat ${PKGFILE})
+" aptcache show apt
+ installaptold
+
+ rm -rf rootdir/var/lib/apt/lists
+ signreleasefiles 'Joe Sixpack'
+ find aptarchive/ -name "$DELETEFILE" -delete
+ msgmsg 'Cold archive signed by bad keyring' 'Joe Sixpack'
+ updatewithwarnings '^W: .* NO_PUBKEY'
+
+ sed -i "s#^\(deb\(-src\)\?\) \[signed-by=$MARVIN\] #\1 #" rootdir/etc/apt/sources.list.d/*
+ local MARVIN="$(aptkey --keyring $MARVIN finger | grep 'Key fingerprint' | cut -d'=' -f 2 | tr -d ' ')"
+
+ prepare ${PKGFILE}
+ rm -rf rootdir/var/lib/apt/lists
+ signreleasefiles 'Marvin Paranoid'
+ find aptarchive/ -name "$DELETEFILE" -delete
+ msgmsg 'Cold archive signed by good keyid' 'Marvin Paranoid'
+ sed -i "s#^\(deb\(-src\)\?\) #\1 [signed-by=$MARVIN] #" rootdir/etc/apt/sources.list.d/*
+ cp keys/marvinparanoid.pub rootdir/etc/apt/trusted.gpg.d/marvinparanoid.gpg
+ testsuccess aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::gpgv=1
+ testsuccessequal "$(cat ${PKGFILE})
+" aptcache show apt
+ installaptold
+ rm -f rootdir/etc/apt/trusted.gpg.d/marvinparanoid.gpg
+
+ rm -rf rootdir/var/lib/apt/lists
+ signreleasefiles 'Joe Sixpack'
+ find aptarchive/ -name "$DELETEFILE" -delete
+ msgmsg 'Cold archive signed by bad keyid' 'Joe Sixpack'
+ updatewithwarnings '^W: .* be verified because the public key is not available: .*'
+
+ sed -i "s#^\(deb\(-src\)\?\) \[signed-by=$MARVIN\] #\1 #" rootdir/etc/apt/sources.list.d/*
}
runtest2() {
diff --git a/test/integration/test-sourceslist-lang-plusminus-options b/test/integration/test-sourceslist-lang-plusminus-options
new file mode 100755
index 000000000..c61d5a4ca
--- /dev/null
+++ b/test/integration/test-sourceslist-lang-plusminus-options
@@ -0,0 +1,87 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'native'
+
+testlangs() {
+ msgtest 'Test acquired languages for' "$1"
+ local LANGS="$2"
+ shift 2
+ rm -f gotlangs.list
+ aptget indextargets --no-release-info 'Created-By: Translations' "$@" --format '$(LANGUAGE)' | sort -u > gotlangs.list
+ if [ -z "$LANGS" ]; then
+ echo -n | tr ',' '\n' | sort | checkdiff - gotlangs.list && msgpass || msgfail
+ else
+ echo -n "$LANGS" | tr ',' '\n' | sort | checkdiff - gotlangs.list && msgpass || msgfail
+ fi
+}
+echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'default' 'en'
+
+echo 'Acquire::Languages "environment,en";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'default config' 'en'
+
+echo 'Acquire::Languages "en,en,en";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'duplicated config' 'en'
+
+echo 'Acquire::Languages "none";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'none config' ''
+
+echo 'Acquire::Languages "en,none,de,de_DE";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'english + german config' 'en,de,de_DE'
+
+echo 'deb [lang=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=pt' 'pt'
+
+echo 'deb [lang=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=en' 'en'
+
+echo 'deb [lang=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=de_DE' 'de_DE'
+
+echo 'deb [lang=none] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=none' ''
+testequal 'amd64' aptget indextargets --no-release-info 'Created-By: Packages' --format '$(ARCHITECTURE)'
+
+echo 'deb [lang+=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang+=pt' 'en,de,de_DE,pt'
+
+echo 'deb [lang+=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang+=en' 'en,de,de_DE'
+
+echo 'deb [lang+=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang+=de_DE' 'en,de,de_DE'
+
+echo 'deb [lang-=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang-=pt' 'en,de,de_DE'
+
+echo 'deb [lang-=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang-=en' 'de,de_DE'
+
+echo 'deb [lang-=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang-=de_DE' 'en,de'
+
+echo 'deb http://example.org/debian stable rocks
+deb http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'english + german config multicomponent' 'en,de,de_DE'
+
+echo 'deb http://example.org/debian stable rocks
+deb [lang=pt] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'multicomponent one lang= combined' 'en,de,de_DE,pt'
+testlangs 'multicomponent one lang= rocks' 'en,de,de_DE' 'Component: rocks'
+testlangs 'multicomponent one lang= solid' 'pt' 'Component: solid'
+
+echo 'deb [lang=pt] http://example.org/debian stable rocks
+deb [lang=de] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'multicomponent different lang= combined' 'de,pt'
+testlangs 'multicomponent different lang= rocks' 'pt' 'Component: rocks'
+testlangs 'multicomponent different lang= solid' 'de' 'Component: solid'
+
+echo 'deb [lang+=pt] http://example.org/debian stable rocks
+deb [lang-=de] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'multicomponent different lang+-= combined' 'en,de,de_DE,pt'
+testlangs 'multicomponent different lang+-= rocks' 'en,de,de_DE,pt' 'Component: rocks'
+testlangs 'multicomponent different lang+-= solid' 'en,de_DE' 'Component: solid'
diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options
index 5fe4933ce..86036e242 100755
--- a/test/integration/test-sourceslist-trusted-options
+++ b/test/integration/test-sourceslist-trusted-options
@@ -199,3 +199,20 @@ insecureaptgetupdate
everythingfails
everythingfails -t stable
everythingfails -t testing
+
+msgmsg 'Test conflicting trusted options are refused'
+testsource() {
+ echo "$@" > rootdir/etc/apt/sources.list.d/example.list
+ testfailuremsg 'E: Conflicting values set for option Trusted concerning source http://example.org/bad/ unstable
+E: The list of sources could not be read.' aptget update --print-uris
+}
+for VAL in 'yes' 'no'; do
+ testsource "deb http://example.org/bad unstable main
+deb [trusted=${VAL}] http://example.org/bad unstable non-free"
+ testsource "deb [trusted=${VAL}] http://example.org/bad unstable main
+deb http://example.org/bad unstable non-free"
+done
+testsource 'deb [trusted=yes] http://example.org/bad unstable main
+deb [trusted=no] http://example.org/bad unstable non-free'
+testsource 'deb [trusted=no] http://example.org/bad unstable main
+deb [trusted=yes] http://example.org/bad unstable non-free'
diff --git a/test/integration/test-specific-architecture-dependencies b/test/integration/test-specific-architecture-dependencies
index 1c72d7b22..f6635a4d6 100755
--- a/test/integration/test-specific-architecture-dependencies
+++ b/test/integration/test-specific-architecture-dependencies
@@ -35,7 +35,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6:i386
The following NEW packages will be installed:
libc6:i386 pre-depender
@@ -47,7 +47,7 @@ Conf pre-depender (1 unstable [all])' aptget install pre-depender -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6:i386
The following NEW packages will be installed:
depender libc6:i386
@@ -59,7 +59,7 @@ Conf depender (1 unstable [all])' aptget install depender -s
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6:i386
The following NEW packages will be installed:
depender-x32:i386 libc6:i386
@@ -71,7 +71,7 @@ Conf depender-x32:i386 (1 unstable [i386])' aptget install depender-x32:i386 -s
testequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6:i386
The following NEW packages will be installed:
depender-x32 libc6:i386
@@ -83,7 +83,7 @@ Conf depender-x32 (1 unstable [amd64])' aptget install depender-x32:amd64 -s
testequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6
The following NEW packages will be installed:
depender-x64 libc6
@@ -95,7 +95,7 @@ Conf depender-x64 (1 unstable [amd64])' aptget install depender-x64:amd64 -s
testequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6
The following NEW packages will be installed:
depender-x64:i386 libc6
@@ -267,7 +267,7 @@ configarchitecture 'amd64'
testequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libc6
The following NEW packages will be installed:
depender-x64 libc6
@@ -289,12 +289,14 @@ The following NEW packages will be installed:
Inst foo-native-depender (1 unstable [amd64])
Conf foo-native-depender (1 unstable [amd64])' aptget install foo-native-depender -s
-# libold:i386 is installed, but we don't see it as i386 isn't configured
testequal 'Reading package lists...
Building dependency tree...
+The following packages will be REMOVED:
+ libold:i386
The following NEW packages will be installed:
breaker-x32
-0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+Remv libold:i386 [1]
Inst breaker-x32 (1 unstable [amd64])
Conf breaker-x32 (1 unstable [amd64])' aptget install breaker-x32:amd64 -s
diff --git a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
index ec74a750b..48a7f0562 100755
--- a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
+++ b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
@@ -148,8 +148,8 @@ testok() {
testsuccessequal "Reading package lists...
Building dependency tree...
Need to get 6 B of source archives.
-Get:1 http://localhost:8080/ $1 1.0 (dsc) [3 B]
-Get:2 http://localhost:8080/ $1 1.0 (tar) [3 B]
+Get:1 http://localhost:8080 $1 1.0 (dsc) [3 B]
+Get:2 http://localhost:8080 $1 1.0 (tar) [3 B]
Download complete and in download only mode" aptget source -d "$@"
msgtest 'Files were successfully downloaded for' "$1"
testsuccess --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz
@@ -175,8 +175,12 @@ testmismatch() {
testfailureequal "Reading package lists...
Building dependency tree...
Need to get 6 B of source archives.
-Get:1 http://localhost:8080/ $1 1.0 (dsc) [3 B]
-Get:2 http://localhost:8080/ $1 1.0 (tar) [3 B]
+Get:1 http://localhost:8080 $1 1.0 (dsc) [3 B]
+Err:1 http://localhost:8080 $1 1.0 (dsc)
+ Hash Sum mismatch
+Get:2 http://localhost:8080 $1 1.0 (tar) [3 B]
+Err:2 http://localhost:8080 $1 1.0 (tar)
+ Hash Sum mismatch
E: Failed to fetch http://localhost:8080/${1}_1.0.dsc Hash Sum mismatch
E: Failed to fetch http://localhost:8080/${1}_1.0.tar.gz Hash Sum mismatch
@@ -199,8 +203,8 @@ Download complete and in download only mode" aptget source -d "$@" -o Acquire::F
testsuccessequal "Reading package lists...
Building dependency tree...
Need to get 6 B of source archives.
-Get:1 http://localhost:8080/ $1 1.0 (dsc) [3 B]
-Get:2 http://localhost:8080/ $1 1.0 (tar) [3 B]
+Get:1 http://localhost:8080 $1 1.0 (dsc) [3 B]
+Get:2 http://localhost:8080 $1 1.0 (tar) [3 B]
Download complete and in download only mode" aptget source --allow-unauthenticated -d "$@" -o Acquire::ForceHash=ROT26
msgtest 'Files were downloaded unauthenticated as user allowed it' "$1"
testsuccess --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz
@@ -236,8 +240,10 @@ testok pkg-mixed-ok
testfailureequal 'Reading package lists...
Building dependency tree...
Need to get 6 B of source archives.
-Get:1 http://localhost:8080/ pkg-mixed-sha1-bad 1.0 (tar) [3 B]
-Get:2 http://localhost:8080/ pkg-mixed-sha1-bad 1.0 (dsc) [3 B]
+Get:1 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (tar) [3 B]
+Get:2 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (dsc) [3 B]
+Err:2 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (dsc)
+ Hash Sum mismatch
E: Failed to fetch http://localhost:8080/pkg-mixed-sha1-bad_1.0.dsc Hash Sum mismatch
E: Failed to fetch some archives.' aptget source -d pkg-mixed-sha1-bad
@@ -246,8 +252,10 @@ testsuccess --nomsg test ! -e pkg-mixed-sha1-bad_1.0.dsc -a -e pkg-mixed-sha1-ba
testfailureequal 'Reading package lists...
Building dependency tree...
Need to get 6 B of source archives.
-Get:1 http://localhost:8080/ pkg-mixed-sha2-bad 1.0 (tar) [3 B]
-Get:2 http://localhost:8080/ pkg-mixed-sha2-bad 1.0 (dsc) [3 B]
+Get:1 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (tar) [3 B]
+Err:1 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (tar)
+ Hash Sum mismatch
+Get:2 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (dsc) [3 B]
E: Failed to fetch http://localhost:8080/pkg-mixed-sha2-bad_1.0.tar.gz Hash Sum mismatch
E: Failed to fetch some archives.' aptget source -d pkg-mixed-sha2-bad
diff --git a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
index 192ed5efc..2fc67096e 100755
--- a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
+++ b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
@@ -22,7 +22,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libmesa:i386
The following NEW packages will be installed:
libmesa:i386 steam:i386
@@ -33,7 +33,7 @@ Conf libmesa:i386 (1 stable [i386])
Conf steam:i386 (1 stable [i386])' aptget install steam -st stable
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libmesa:i386
The following NEW packages will be installed:
libmesa:i386 steam:i386
@@ -47,7 +47,7 @@ cp rootdir/var/lib/dpkg/status default-status.dpkg
insertinstalledpackage 'libmesa' 'amd64' '1' 'Multi-Arch: same'
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libmesa:i386
The following NEW packages will be installed:
libmesa:i386 steam:i386
@@ -58,7 +58,7 @@ Conf libmesa:i386 (1 stable [i386])
Conf steam:i386 (1 stable [i386])' aptget install steam -st stable
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libmesa libmesa:i386
The following NEW packages will be installed:
libmesa:i386 steam:i386
@@ -78,7 +78,7 @@ Conflicts: libmesa
Multi-Arch: same'
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libmesa-lts:i386
The following NEW packages will be installed:
libmesa-lts:i386 steam:i386
@@ -89,7 +89,7 @@ Conf libmesa-lts:i386 (1 stable [i386])
Conf steam:i386 (1 stable [i386])' aptget install steam -st stable
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libmesa-lts libmesa-lts:i386
The following NEW packages will be installed:
libmesa-lts:i386 steam:i386
diff --git a/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
index ea516fc12..8f468b376 100755
--- a/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
+++ b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
@@ -36,8 +36,8 @@ ensure_n_canary_strings_in_dir() {
LISTS='rootdir/var/lib/apt/lists'
rm -rf rootdir/var/lib/apt/lists
-msgtest 'Got expected failure message' 'apt-get update'
-aptget update -qq 2>&1 | grep -q 'W:.*Does not start with a cleartext signature' && msgpass || msgfail
+testfailure aptget update
+testsuccess grep '^W:.*Clearsigned file .*NOSPLIT.*' rootdir/tmp/testfailure.output
ensure_n_canary_strings_in_dir $LISTS 'ni ni ni' 0
testequal 'lock
@@ -48,8 +48,8 @@ for f in Release Release.gpg main_binary-amd64_Packages main_source_Sources; do
echo 'peng neee-wom' > $LISTS/localhost:8080_dists_stable_${f}
done
-msgtest 'Got expected failure message in' 'apt-get update'
-aptget update -qq 2>&1 | grep -q 'W:.*Does not start with a cleartext signature' && msgpass || msgfail
+testfailure aptget update
+testsuccess grep '^W:.*Clearsigned file .*NOSPLIT.*' rootdir/tmp/testfailure.output
ensure_n_canary_strings_in_dir $LISTS 'peng neee-wom' 4
ensure_n_canary_strings_in_dir $LISTS 'ni ni ni' 0
@@ -58,7 +58,8 @@ ensure_n_canary_strings_in_dir $LISTS 'ni ni ni' 0
echo 'peng neee-wom' > $LISTS/localhost:8080_dists_stable_InRelease
rm -f $LISTS/localhost:8080_dists_stable_Release $LISTS/localhost:8080_dists_stable_Release.gpg
msgtest 'excpected failure of' 'apt-get update'
-aptget update -qq 2>&1 | grep -q 'W:.*Does not start with a cleartext signature' && msgpass || msgfail
+testfailure aptget update
+testsuccess grep '^W:.*Clearsigned file .*NOSPLIT.*' rootdir/tmp/testfailure.output
ensure_n_canary_strings_in_dir $LISTS 'peng neee-wom' 3
ensure_n_canary_strings_in_dir $LISTS 'ni ni ni' 0
diff --git a/test/integration/test-ubuntu-bug-614993 b/test/integration/test-ubuntu-bug-614993
index 7067713e8..6e0a53025 100755
--- a/test/integration/test-ubuntu-bug-614993
+++ b/test/integration/test-ubuntu-bug-614993
@@ -10,7 +10,7 @@ setupaptarchive
# test success
UPGRADE="Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
libdrm-intel1 libdrm-nouveau1 libmtdev1 libutouch-grail1 libx11-xcb1
libxcb-aux0 libxcb-dri2-0 libxfont1 xserver-common xserver-xorg-core
xserver-xorg-input-evdev xserver-xorg-input-mouse
diff --git a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
index 754487a90..dbcb49a41 100755
--- a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
+++ b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
@@ -27,8 +27,9 @@ MD5Sum:
1b895931853981ad8204d2439821b999 4144 Packages.gz'; echo; cat ${RELEASE}.old;) > ${RELEASE}
done
-msgtest 'The unsigned garbage before signed block is' 'ignored'
-aptget update -qq 2>&1 | grep -q 'W:.*Does not start with a cleartext signature' && msgpass || msgfail
+testfailure aptget update
+testsuccess grep '^W:.*Clearsigned file .*NOSPLIT.*' rootdir/tmp/testfailure.output
+
ROOTDIR="$(readlink -f .)"
testsuccessequal "Package files:
diff --git a/test/integration/test-ubuntu-bug-806274-install-suggests b/test/integration/test-ubuntu-bug-806274-install-suggests
index 3f02316f4..2d1cfcd9f 100755
--- a/test/integration/test-ubuntu-bug-806274-install-suggests
+++ b/test/integration/test-ubuntu-bug-806274-install-suggests
@@ -17,7 +17,7 @@ setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
bar foo
Suggested packages:
baz
@@ -34,7 +34,7 @@ Conf bar (1.0 unstable [i386])' aptget install apt -s --install-recommends --no-
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
bar baz foo
The following NEW packages will be installed:
apt bar baz foo
@@ -50,7 +50,7 @@ Conf baz (1.0 unstable [i386])' aptget install apt -s --install-recommends --ins
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
foo
Suggested packages:
baz
@@ -66,7 +66,7 @@ Conf apt (0.8.15 unstable [i386])' aptget install apt -s --no-install-recommends
testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
baz foo
Recommended packages:
bar
diff --git a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
index 269038d0f..9eab1cbfd 100755
--- a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
+++ b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
@@ -16,7 +16,7 @@ setupaptarchive
testequalor2 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
apt:i386 libsame:i386
The following NEW packages will be installed:
libsame
@@ -30,7 +30,7 @@ Conf libsame (2 unstable [amd64]) [apt:i386 ]
Inst apt:i386 [1] (2 unstable [i386])
Conf apt:i386 (2 unstable [i386])' 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
apt:i386 libsame:i386
The following NEW packages will be installed:
libsame
diff --git a/test/integration/test-unpack-different-version-unpacked b/test/integration/test-unpack-different-version-unpacked
index ae121cf4e..cdc187d15 100755
--- a/test/integration/test-unpack-different-version-unpacked
+++ b/test/integration/test-unpack-different-version-unpacked
@@ -32,7 +32,7 @@ insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok
testsuccessequal 'Reading package lists...
Building dependency tree...
Correcting dependencies... Done
-The following extra packages will be installed:
+The following additional packages will be installed:
libqtcore4:i386
The following packages will be upgraded:
libqtcore4:i386
@@ -48,7 +48,7 @@ insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install o
testsuccessequal 'Reading package lists...
Building dependency tree...
Correcting dependencies... Done
-The following extra packages will be installed:
+The following additional packages will be installed:
libqtcore4
The following packages will be upgraded:
libqtcore4
@@ -64,7 +64,7 @@ insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same'
testsuccessequal 'Reading package lists...
Building dependency tree...
Correcting dependencies... Done
-The following extra packages will be installed:
+The following additional packages will be installed:
libqtcore4:i386
The following packages will be upgraded:
libqtcore4:i386
@@ -80,7 +80,7 @@ insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same'
testsuccessequal 'Reading package lists...
Building dependency tree...
Correcting dependencies... Done
-The following extra packages will be installed:
+The following additional packages will be installed:
libqtcore4
The following packages will be upgraded:
libqtcore4
@@ -96,7 +96,7 @@ insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok
testsuccessequal 'Reading package lists...
Building dependency tree...
Correcting dependencies... Done
-The following extra packages will be installed:
+The following additional packages will be installed:
libqtcore4:i386
The following packages will be upgraded:
libqtcore4:i386
@@ -111,7 +111,7 @@ insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install o
testsuccessequal 'Reading package lists...
Building dependency tree...
Correcting dependencies... Done
-The following extra packages will be installed:
+The following additional packages will be installed:
libqtcore4
The following packages will be upgraded:
libqtcore4
diff --git a/test/integration/test-xorg-break-providers b/test/integration/test-xorg-break-providers
index ff1f3b077..57fd0e234 100755
--- a/test/integration/test-xorg-break-providers
+++ b/test/integration/test-xorg-break-providers
@@ -15,7 +15,7 @@ setupaptarchive
testfailureequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
xserver-xorg-video-intel
The following packages will be upgraded:
xserver-xorg-core xserver-xorg-video-intel
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc
index 6aae9f563..69e1ffe0b 100644
--- a/test/interactive-helper/testdeb.cc
+++ b/test/interactive-helper/testdeb.cc
@@ -13,7 +13,7 @@
class NullStream : public pkgDirStream
{
public:
- virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) {return true;};
+ virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) APT_OVERRIDE {return true;};
};
static bool Test(const char *File)
diff --git a/test/libapt/acqprogress_test.cc b/test/libapt/acqprogress_test.cc
index 288e05aca..50792528d 100644
--- a/test/libapt/acqprogress_test.cc
+++ b/test/libapt/acqprogress_test.cc
@@ -1,4 +1,5 @@
#include <config.h>
+#include <apt-pkg/hashes.h>
#include <apt-pkg/acquire.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/configuration.h>
@@ -10,9 +11,10 @@
class TestItem: public pkgAcquire::Item
{
public:
- TestItem(pkgAcquire * const Acq) : pkgAcquire::Item(Acq, "", NULL) {}
+ TestItem(pkgAcquire * const Acq) : pkgAcquire::Item(Acq) {}
- virtual std::string DescURI() { return ""; }
+ virtual std::string DescURI() const APT_OVERRIDE { return ""; }
+ virtual HashStringList GetExpectedHashes() const APT_OVERRIDE { return HashStringList(); }
};
@@ -23,21 +25,23 @@ TEST(AcqProgress, IMSHit)
AcqTextStatus Stat(out, width, 0);
Stat.Start();
+ pkgAcquire Acq(&Stat);
pkgAcquire::ItemDesc hit;
hit.URI = "http://example.org/file";
hit.Description = "Example File from example.org";
hit.ShortDesc = "Example File";
- hit.Owner = NULL;
+ TestItem hitO(&Acq);
+ hit.Owner = &hitO;
EXPECT_EQ("", out.str());
Stat.IMSHit(hit);
- EXPECT_EQ("Hit Example File from example.org\n", out.str());
+ EXPECT_EQ("Hit:1 Example File from example.org\n", out.str());
Stat.IMSHit(hit);
- EXPECT_EQ("Hit Example File from example.org\n"
- "Hit Example File from example.org\n", out.str());
+ EXPECT_EQ("Hit:1 Example File from example.org\n"
+ "Hit:1 Example File from example.org\n", out.str());
Stat.Stop();
- EXPECT_EQ("Hit Example File from example.org\n"
- "Hit Example File from example.org\n", out.str());
+ EXPECT_EQ("Hit:1 Example File from example.org\n"
+ "Hit:1 Example File from example.org\n", out.str());
}
TEST(AcqProgress, FetchNoFileSize)
{
@@ -59,10 +63,10 @@ TEST(AcqProgress, FetchNoFileSize)
EXPECT_EQ("Get:1 Example File from example.org\n", out.str());
Stat.Fetch(fetch);
EXPECT_EQ("Get:1 Example File from example.org\n"
- "Get:2 Example File from example.org\n", out.str());
+ "Get:1 Example File from example.org\n", out.str());
Stat.Stop();
EXPECT_EQ("Get:1 Example File from example.org\n"
- "Get:2 Example File from example.org\n", out.str());
+ "Get:1 Example File from example.org\n", out.str());
}
TEST(AcqProgress, FetchFileSize)
{
@@ -86,10 +90,10 @@ TEST(AcqProgress, FetchFileSize)
fetchO.FileSize = 42;
Stat.Fetch(fetch);
EXPECT_EQ("Get:1 Example File from example.org [100 B]\n"
- "Get:2 Example File from example.org [42 B]\n", out.str());
+ "Get:1 Example File from example.org [42 B]\n", out.str());
Stat.Stop();
EXPECT_EQ("Get:1 Example File from example.org [100 B]\n"
- "Get:2 Example File from example.org [42 B]\n", out.str());
+ "Get:1 Example File from example.org [42 B]\n", out.str());
}
TEST(AcqProgress, Fail)
{
@@ -110,30 +114,34 @@ TEST(AcqProgress, Fail)
EXPECT_EQ("", out.str());
Stat.Fail(fetch);
- EXPECT_EQ("", out.str());
+ EXPECT_EQ("Ign:1 Example File from example.org\n", out.str());
fetchO.Status = pkgAcquire::Item::StatDone;
Stat.Fail(fetch);
- EXPECT_EQ("Ign Example File from example.org\n", out.str());
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n", out.str());
fetchO.Status = pkgAcquire::Item::StatError;
fetchO.ErrorText = "An error test!";
Stat.Fail(fetch);
- EXPECT_EQ("Ign Example File from example.org\n"
- "Err Example File from example.org\n"
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
+ "Err:1 Example File from example.org\n"
" An error test!\n", out.str());
_config->Set("Acquire::Progress::Ignore::ShowErrorText", true);
fetchO.Status = pkgAcquire::Item::StatDone;
Stat.Fail(fetch);
- EXPECT_EQ("Ign Example File from example.org\n"
- "Err Example File from example.org\n"
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
+ "Err:1 Example File from example.org\n"
" An error test!\n"
- "Ign Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
" An error test!\n", out.str());
_config->Set("Acquire::Progress::Ignore::ShowErrorText", true);
Stat.Stop();
- EXPECT_EQ("Ign Example File from example.org\n"
- "Err Example File from example.org\n"
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
+ "Err:1 Example File from example.org\n"
" An error test!\n"
- "Ign Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
" An error test!\n", out.str());
}
TEST(AcqProgress, Pulse)
diff --git a/test/libapt/cdrom_test.cc b/test/libapt/cdrom_test.cc
index 7257eaf1b..b4c51cdb0 100644
--- a/test/libapt/cdrom_test.cc
+++ b/test/libapt/cdrom_test.cc
@@ -91,7 +91,7 @@ TEST(CDROMTest,ReduceSourcelist)
}
TEST(CDROMTest, FindMountPointForDevice)
{
- char * tempfile = NULL;
+ std::string tempfile;
FileFd fd;
createTemporaryFile("mountpoints", fd, &tempfile,
"rootfs / rootfs rw 0 0\n"
@@ -109,7 +109,6 @@ TEST(CDROMTest, FindMountPointForDevice)
EXPECT_EQ("/boot/efi", FindMountPointForDevice("/dev/sda1"));
EXPECT_EQ("/tmp", FindMountPointForDevice("tmpfs"));
- if (tempfile != NULL)
- unlink(tempfile);
- free(tempfile);
+ if (tempfile.empty() == false)
+ unlink(tempfile.c_str());
}
diff --git a/test/libapt/file-helpers.cc b/test/libapt/file-helpers.cc
index 5edb9a9fe..6811c4158 100644
--- a/test/libapt/file-helpers.cc
+++ b/test/libapt/file-helpers.cc
@@ -53,20 +53,26 @@ void helperCreateLink(std::string const &dir, std::string const &targetname, std
link.append(linkname);
ASSERT_EQ(0, symlink(target.c_str(), link.c_str()));
}
-void helperCreateTemporaryFile(std::string const &id, FileFd &fd, char * * const filename, char const * const content)
+void helperCreateTemporaryFile(std::string const &id, FileFd &fd, std::string * const filename, char const * const content)
{
std::string name("apt-test-");
- name.append(id).append(".XXXXXXXX");
+ name.append(id);
+ size_t const giventmp = name.find(".XXXXXX.");
+ if (giventmp == std::string::npos)
+ name.append(".XXXXXX");
char * tempfile = strdup(name.c_str());
- int tempfile_fd = mkstemp(tempfile);
+ ASSERT_STRNE(NULL, tempfile);
+ int tempfile_fd;
+ if (giventmp == std::string::npos)
+ tempfile_fd = mkstemp(tempfile);
+ else
+ tempfile_fd = mkstemps(tempfile, name.length() - (giventmp + 7));
ASSERT_NE(-1, tempfile_fd);
if (filename != NULL)
*filename = tempfile;
else
- {
unlink(tempfile);
- free(tempfile);
- }
+ free(tempfile);
EXPECT_TRUE(fd.OpenDescriptor(tempfile_fd, FileFd::ReadWrite));
if (content != NULL)
diff --git a/test/libapt/file-helpers.h b/test/libapt/file-helpers.h
index e8472d503..f639c1cbc 100644
--- a/test/libapt/file-helpers.h
+++ b/test/libapt/file-helpers.h
@@ -24,6 +24,6 @@ void helperCreateDirectory(std::string const &dir, std::string const &name);
void helperCreateLink(std::string const &dir, std::string const &targetname, std::string const &linkname);
#define createTemporaryFile(id, fd, filename, content) \
ASSERT_NO_FATAL_FAILURE(helperCreateTemporaryFile(id, fd, filename, content))
-void helperCreateTemporaryFile(std::string const &id, FileFd &fd, char * * const filename, char const * const content);
+void helperCreateTemporaryFile(std::string const &id, FileFd &fd, std::string * const filename, char const * const content);
#endif
diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc
index a2c303768..b42261716 100644
--- a/test/libapt/fileutl_test.cc
+++ b/test/libapt/fileutl_test.cc
@@ -290,10 +290,10 @@ TEST(FileUtlTest, Popen)
TEST(FileUtlTest, flAbsPath)
{
std::string cwd = SafeGetCWD();
- int res = chdir("/bin/");
+ int res = chdir("/etc/");
EXPECT_EQ(res, 0);
- std::string p = flAbsPath("ls");
- EXPECT_EQ(p, "/bin/ls");
+ std::string p = flAbsPath("passwd");
+ EXPECT_EQ(p, "/etc/passwd");
res = chdir(cwd.c_str());
EXPECT_EQ(res, 0);
diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc
index edcd8a11a..63c63ecd3 100644
--- a/test/libapt/hashsums_test.cc
+++ b/test/libapt/hashsums_test.cc
@@ -306,6 +306,7 @@ TEST(HashSumsTest, HashStringList)
EXPECT_EQ(NULL, list.find(NULL));
EXPECT_EQ(NULL, list.find(""));
EXPECT_EQ(NULL, list.find("MD5Sum"));
+ EXPECT_EQ(0, list.FileSize());
// empty lists aren't equal
HashStringList list2;
@@ -316,6 +317,8 @@ TEST(HashSumsTest, HashStringList)
list.push_back(HashString("Checksum-FileSize", "29"));
EXPECT_FALSE(list.empty());
EXPECT_FALSE(list.usable());
+ EXPECT_EQ(1, list.size());
+ EXPECT_EQ(29, list.FileSize());
Hashes hashes;
hashes.Add("The quick brown fox jumps over the lazy dog");
diff --git a/test/libapt/indexcopytosourcelist_test.cc b/test/libapt/indexcopytosourcelist_test.cc
index 1b0427564..2d07dba15 100644
--- a/test/libapt/indexcopytosourcelist_test.cc
+++ b/test/libapt/indexcopytosourcelist_test.cc
@@ -15,10 +15,10 @@ class NoCopy : public IndexCopy {
IndexCopy::ConvertToSourceList(CD, Path);
return Path;
}
- bool GetFile(std::string &/*Filename*/, unsigned long long &/*Size*/) { return false; }
- bool RewriteEntry(FileFd & /*Target*/, std::string const &/*File*/) { return false; }
- const char *GetFileName() { return NULL; }
- const char *Type() { return NULL; }
+ bool GetFile(std::string &/*Filename*/, unsigned long long &/*Size*/) APT_OVERRIDE { return false; }
+ bool RewriteEntry(FileFd & /*Target*/, std::string const &/*File*/) APT_OVERRIDE { return false; }
+ const char *GetFileName() APT_OVERRIDE { return NULL; }
+ const char *Type() APT_OVERRIDE { return NULL; }
};
diff --git a/test/libapt/makefile b/test/libapt/makefile
index 61a8aaf31..c078cc568 100644
--- a/test/libapt/makefile
+++ b/test/libapt/makefile
@@ -33,7 +33,7 @@ GTEST_DIR = /usr/src/gtest
# Flags passed to the preprocessor.
# Set Google Test's header directory as a system directory, such that
# the compiler doesn't generate warnings in Google Test headers.
-CPPFLAGS += -isystem $(GTEST_DIR)/include
+#CPPFLAGS += -isystem $(GTEST_DIR)/include
# Flags passed to the C++ compiler.
CXXFLAGS += -pthread
@@ -41,6 +41,7 @@ CXXFLAGS += -pthread
CXXFLAGS+= -Wno-missing-declarations
CXXFLAGS+= -Wno-missing-field-initializers
CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn
+CXXFLAGS+= -Wno-undef
# All Google Test headers. Usually you shouldn't change this definition.
GTEST_HEADERS = /usr/include/gtest/*.h \
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 747ab4957..83c441092 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -12,32 +12,28 @@
#include "file-helpers.h"
-class SourceList : public pkgSourceList {
- public:
- using pkgSourceList::ParseFileDeb822;
-};
-
TEST(SourceListTest,ParseFileDeb822)
{
FileFd fd;
- char * tempfile = NULL;
- createTemporaryFile("parsefiledeb822", fd, &tempfile,
+ std::string tempfile;
+ createTemporaryFile("parsefiledeb822.XXXXXX.sources", fd, &tempfile,
"Types: deb\n"
"URIs: http://ftp.debian.org/debian\n"
"Suites: stable\n"
- "Sections: main\n"
+ "Components: main\n"
"Description: short\n"
" long description that can be very long\n"
"\n"
"Types: deb\n"
"URIs: http://ftp.debian.org/debian\n"
"Suites: unstable\n"
- "Sections: main non-free\n");
+ "Components: main non-free\n");
fd.Close();
- SourceList sources;
- EXPECT_EQ(2, sources.ParseFileDeb822(tempfile));
+ pkgSourceList sources;
+ EXPECT_EQ(true, sources.Read(tempfile));
EXPECT_EQ(2, sources.size());
- unlink(tempfile);
+ if (tempfile.empty() == false)
+ unlink(tempfile.c_str());
}
diff --git a/test/libapt/uri_test.cc b/test/libapt/uri_test.cc
index 5d5ae9679..fe6015e65 100644
--- a/test/libapt/uri_test.cc
+++ b/test/libapt/uri_test.cc
@@ -13,6 +13,9 @@ TEST(URITest, BasicHTTP)
EXPECT_EQ("www.debian.org", U.Host);
EXPECT_EQ("/temp/test", U.Path);
EXPECT_EQ("http://www.debian.org:90/temp/test", (std::string)U);
+ EXPECT_EQ("http://www.debian.org:90", URI::SiteOnly(U));
+ EXPECT_EQ("http://www.debian.org:90/temp/test", URI::ArchiveOnly(U));
+ EXPECT_EQ("http://www.debian.org:90/temp/test", URI::NoUserPassword(U));
// Login data
U = URI("http://jgg:foo@ualberta.ca/blah");
EXPECT_EQ("http", U.Access);
@@ -22,6 +25,9 @@ TEST(URITest, BasicHTTP)
EXPECT_EQ("ualberta.ca", U.Host);
EXPECT_EQ("/blah", U.Path);
EXPECT_EQ("http://jgg:foo@ualberta.ca/blah", (std::string)U);
+ EXPECT_EQ("http://ualberta.ca", URI::SiteOnly(U));
+ EXPECT_EQ("http://ualberta.ca/blah", URI::ArchiveOnly(U));
+ EXPECT_EQ("http://ualberta.ca/blah", URI::NoUserPassword(U));
}
TEST(URITest, SingeSlashFile)
{
@@ -33,6 +39,9 @@ TEST(URITest, SingeSlashFile)
EXPECT_EQ("", U.Host);
EXPECT_EQ("/usr/bin/foo", U.Path);
EXPECT_EQ("file:/usr/bin/foo", (std::string)U);
+ EXPECT_EQ("file:", URI::SiteOnly(U));
+ EXPECT_EQ("file:/usr/bin/foo", URI::ArchiveOnly(U));
+ EXPECT_EQ("file:/usr/bin/foo", URI::NoUserPassword(U));
}
TEST(URITest, BasicCDROM)
{
@@ -44,6 +53,9 @@ TEST(URITest, BasicCDROM)
EXPECT_EQ("Moo Cow Rom", U.Host);
EXPECT_EQ("/debian", U.Path);
EXPECT_EQ("cdrom://Moo Cow Rom/debian", (std::string)U);
+ EXPECT_EQ("cdrom://Moo Cow Rom", URI::SiteOnly(U));
+ EXPECT_EQ("cdrom://Moo Cow Rom/debian", URI::ArchiveOnly(U));
+ EXPECT_EQ("cdrom://Moo Cow Rom/debian", URI::NoUserPassword(U));
}
TEST(URITest, RelativeGzip)
{
@@ -55,6 +67,9 @@ TEST(URITest, RelativeGzip)
EXPECT_EQ(".", U.Host);
EXPECT_EQ("/bar/cow", U.Path);
EXPECT_EQ("gzip://./bar/cow", (std::string)U);
+ EXPECT_EQ("gzip://.", URI::SiteOnly(U));
+ EXPECT_EQ("gzip://./bar/cow", URI::ArchiveOnly(U));
+ EXPECT_EQ("gzip://./bar/cow", URI::NoUserPassword(U));
}
TEST(URITest, NoSlashFTP)
{
@@ -66,6 +81,9 @@ TEST(URITest, NoSlashFTP)
EXPECT_EQ("ftp.fr.debian.org", U.Host);
EXPECT_EQ("/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb", U.Path);
EXPECT_EQ("ftp://ftp.fr.debian.org/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb", (std::string)U);
+ EXPECT_EQ("ftp://ftp.fr.debian.org", URI::SiteOnly(U));
+ EXPECT_EQ("ftp://ftp.fr.debian.org/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb", URI::ArchiveOnly(U));
+ EXPECT_EQ("ftp://ftp.fr.debian.org/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb", URI::NoUserPassword(U));
}
TEST(URITest, RFC2732)
{
@@ -77,6 +95,9 @@ TEST(URITest, RFC2732)
EXPECT_EQ("1080::8:800:200C:417A", U.Host);
EXPECT_EQ("/foo", U.Path);
EXPECT_EQ("http://[1080::8:800:200C:417A]/foo", (std::string)U);
+ EXPECT_EQ("http://[1080::8:800:200C:417A]", URI::SiteOnly(U));
+ EXPECT_EQ("http://[1080::8:800:200C:417A]/foo", URI::ArchiveOnly(U));
+ EXPECT_EQ("http://[1080::8:800:200C:417A]/foo", URI::NoUserPassword(U));
// with port
U = URI("http://[::FFFF:129.144.52.38]:80/index.html");
EXPECT_EQ("http", U.Access);
@@ -86,6 +107,9 @@ TEST(URITest, RFC2732)
EXPECT_EQ("::FFFF:129.144.52.38", U.Host);
EXPECT_EQ("/index.html", U.Path);
EXPECT_EQ("http://[::FFFF:129.144.52.38]:80/index.html", (std::string)U);
+ EXPECT_EQ("http://[::FFFF:129.144.52.38]:80", URI::SiteOnly(U));
+ EXPECT_EQ("http://[::FFFF:129.144.52.38]:80/index.html", URI::ArchiveOnly(U));
+ EXPECT_EQ("http://[::FFFF:129.144.52.38]:80/index.html", URI::NoUserPassword(U));
// extra colon
U = URI("http://[::FFFF:129.144.52.38:]:80/index.html");
EXPECT_EQ("http", U.Access);
@@ -95,6 +119,9 @@ TEST(URITest, RFC2732)
EXPECT_EQ("::FFFF:129.144.52.38:", U.Host);
EXPECT_EQ("/index.html", U.Path);
EXPECT_EQ("http://[::FFFF:129.144.52.38:]:80/index.html", (std::string)U);
+ EXPECT_EQ("http://[::FFFF:129.144.52.38:]:80", URI::SiteOnly(U));
+ EXPECT_EQ("http://[::FFFF:129.144.52.38:]:80/index.html", URI::ArchiveOnly(U));
+ EXPECT_EQ("http://[::FFFF:129.144.52.38:]:80/index.html", URI::NoUserPassword(U));
// extra colon port
U = URI("http://[::FFFF:129.144.52.38:]/index.html");
EXPECT_EQ("http", U.Access);
@@ -104,6 +131,9 @@ TEST(URITest, RFC2732)
EXPECT_EQ("::FFFF:129.144.52.38:", U.Host);
EXPECT_EQ("/index.html", U.Path);
EXPECT_EQ("http://[::FFFF:129.144.52.38:]/index.html", (std::string)U);
+ EXPECT_EQ("http://[::FFFF:129.144.52.38:]", URI::SiteOnly(U));
+ EXPECT_EQ("http://[::FFFF:129.144.52.38:]/index.html", URI::ArchiveOnly(U));
+ EXPECT_EQ("http://[::FFFF:129.144.52.38:]/index.html", URI::NoUserPassword(U));
// My Evil Corruption of RFC 2732 to handle CDROM names!
// Fun for the whole family! */
U = URI("cdrom:[The Debian 1.2 disk, 1/2 R1:6]/debian/");
@@ -114,6 +144,9 @@ TEST(URITest, RFC2732)
EXPECT_EQ("The Debian 1.2 disk, 1/2 R1:6", U.Host);
EXPECT_EQ("/debian/", U.Path);
EXPECT_EQ("cdrom://[The Debian 1.2 disk, 1/2 R1:6]/debian/", (std::string)U);
+ EXPECT_EQ("cdrom://[The Debian 1.2 disk, 1/2 R1:6]", URI::SiteOnly(U));
+ EXPECT_EQ("cdrom://[The Debian 1.2 disk, 1/2 R1:6]/debian", URI::ArchiveOnly(U));
+ EXPECT_EQ("cdrom://[The Debian 1.2 disk, 1/2 R1:6]/debian/", URI::NoUserPassword(U));
// no brackets
U = URI("cdrom:Foo Bar Cow/debian/");
EXPECT_EQ("cdrom", U.Access);
@@ -123,9 +156,15 @@ TEST(URITest, RFC2732)
EXPECT_EQ("Foo Bar Cow", U.Host);
EXPECT_EQ("/debian/", U.Path);
EXPECT_EQ("cdrom://Foo Bar Cow/debian/", (std::string)U);
+ EXPECT_EQ("cdrom://Foo Bar Cow", URI::SiteOnly(U));
+ EXPECT_EQ("cdrom://Foo Bar Cow/debian", URI::ArchiveOnly(U));
+ EXPECT_EQ("cdrom://Foo Bar Cow/debian/", URI::NoUserPassword(U));
// percent encoded
U = URI("ftp://foo:b%40r@example.org");
EXPECT_EQ("foo", U.User);
EXPECT_EQ("b@r", U.Password);
EXPECT_EQ("ftp://foo:b%40r@example.org/", (std::string) U);
+ EXPECT_EQ("ftp://example.org", URI::SiteOnly(U));
+ EXPECT_EQ("ftp://example.org", URI::ArchiveOnly(U));
+ EXPECT_EQ("ftp://example.org/", URI::NoUserPassword(U));
}
diff --git a/vendor/README b/vendor/README
index c2fabbd4c..6846c8455 100644
--- a/vendor/README
+++ b/vendor/README
@@ -44,6 +44,10 @@ apt-key script and the keyring-package in particular as a dependency for apt.
The field current-codename is optional and can be used in sources.list.in.
+The fields sourceslist-list-format and sourceslist-sources-format are used as
+examples in the sources.list manpage and the first one is additionally
+available in the sources.list.in template.
+They should in general reflect the default sources of your distro.
== sources.list.in
@@ -55,6 +59,7 @@ You can use some placeholders in this file, namely:
* &debian-oldstable-codename;
* &debian-testing-codename;
* &ubuntu-codename;
+* &sourceslist-list-format;
with the value you would expect based on the name.
The placeholder &current-codename; is yours and can be set in apt-vendor.ent
@@ -63,4 +68,5 @@ The placeholder &current-codename; is yours and can be set in apt-vendor.ent
== apt.conf-*
Files in your vendor directory following this naming scheme will be picked up
-by the debian/rules file and installed in /etc/apt/apt.conf.d/ directory.
+by the debian/rules file and installed in /etc/apt/apt.conf.d/ directory, with
+"apt.conf-" removed from the beginning of the filename.
diff --git a/vendor/blankon/apt-vendor.ent b/vendor/blankon/apt-vendor.ent
index 2600eb715..ea7625f90 100644
--- a/vendor/blankon/apt-vendor.ent
+++ b/vendor/blankon/apt-vendor.ent
@@ -6,3 +6,12 @@
<!ENTITY keyring-master-filename "/usr/share/keyrings/blankon-master-keyring.gpg">
<!ENTITY keyring-uri "http://arsip.blankonlinux.or.id/blankon/project/blankon-archive-keyring.gpg">
<!ENTITY current-codename "tambora">
+
+<!ENTITY sourceslist-list-format "deb http://arsip.blankonlinux.or.id/blankon &current-codename; main restricted
+deb http://arsip.blankonlinux.or.id/blankon &current-codename;-security main restricted
+deb http://arsip.blankonlinux.or.id/blankon &current-codename;-updates main restricted">
+
+<!ENTITY sourceslist-sources-format "Types: deb
+URIs: http://arsip.blankonlinux.or.id/blankon
+Suites: &current-codename; &current-codename;-security &current-codename;-updates
+Components: main restricted">
diff --git a/vendor/debian/apt-vendor.ent b/vendor/debian/apt-vendor.ent
index 6cda5995c..8b26da385 100644
--- a/vendor/debian/apt-vendor.ent
+++ b/vendor/debian/apt-vendor.ent
@@ -5,3 +5,15 @@
<!ENTITY keyring-removed-filename "<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>">
<!ENTITY keyring-master-filename "">
<!ENTITY keyring-uri "">
+
+<!ENTITY sourceslist-list-format "deb http://httpredir.debian.org/debian &stable-codename; main contrib non-free
+deb http://security.debian.org &stable-codename;/updates main contrib non-free">
+<!ENTITY sourceslist-sources-format "Types: deb
+URIs: http://httpredir.debian.org/debian
+Suites: &stable-codename;
+Components: main contrib non-free
+
+Types: deb
+URIs: http://security.debian.org
+Suites: &stable-codename;/updates
+Components: main contrib non-free">
diff --git a/vendor/debian/sources.list.in b/vendor/debian/sources.list.in
index 2e430296a..c36fb16a7 100644
--- a/vendor/debian/sources.list.in
+++ b/vendor/debian/sources.list.in
@@ -1,7 +1,6 @@
# See sources.list(5) manpage for more information
# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool.
-deb http://ftp.us.debian.org/debian &debian-stable-codename; main contrib non-free
-deb http://security.debian.org &debian-stable-codename;/updates main contrib non-free
+&sourceslist-list-format;
# Uncomment if you want the apt-get source function to work
#deb-src http://ftp.us.debian.org/debian &debian-stable-codename; main contrib non-free
diff --git a/vendor/raspbian/apt-vendor.ent b/vendor/raspbian/apt-vendor.ent
index e359d2001..dc69f3c03 100644
--- a/vendor/raspbian/apt-vendor.ent
+++ b/vendor/raspbian/apt-vendor.ent
@@ -5,3 +5,9 @@
<!ENTITY keyring-removed-filename "<filename>/usr/share/keyrings/raspbian-archive-removed-keys.gpg</filename>">
<!ENTITY keyring-master-filename "">
<!ENTITY keyring-uri "">
+
+<!ENTITY sourceslist-list-format "deb http://mirrordirector.raspbian.org/raspbian &stable-codename; main contrib non-free">
+<!ENTITY sourceslist-sources-format "Types: deb
+URIs: http://mirrordirector.raspbian.org/raspbian
+Suites: &stable-codename;
+Components: main contrib non-free">
diff --git a/vendor/steamos/apt-vendor.ent b/vendor/steamos/apt-vendor.ent
index dc1b798e6..7cf100fc4 100644
--- a/vendor/steamos/apt-vendor.ent
+++ b/vendor/steamos/apt-vendor.ent
@@ -6,3 +6,10 @@
<!ENTITY keyring-master-filename "">
<!ENTITY keyring-uri "">
<!ENTITY current-codename "alchemist">
+
+<!ENTITY sourceslist-list-format "deb http://repo.steampowered.com/steamos &current-codename; main contrib non-free
+deb-src http://repo.steampowered.com/steamos &current-codename; main contrib non-free">
+<!ENTITY sourceslist-sources-format "Types: deb deb-src
+URIs: http://repo.steampowered.com/steamos
+Suites: &current-codename;
+Components: main contrib non-free">
diff --git a/vendor/steamos/sources.list.in b/vendor/steamos/sources.list.in
index 69174d090..246d2e336 100644
--- a/vendor/steamos/sources.list.in
+++ b/vendor/steamos/sources.list.in
@@ -1,5 +1,3 @@
# See sources.list(5) manpage for more information
# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool.
-
-deb http://repo.steampowered.com/steamos &current-codename; main contrib non-free
-deb-src http://repo.steampowered.com/steamos &current-codename; main contrib non-free
+&sourceslist-list-format;
diff --git a/vendor/tanglu/apt-vendor.ent b/vendor/tanglu/apt-vendor.ent
index d2442209c..f5cd813bf 100644
--- a/vendor/tanglu/apt-vendor.ent
+++ b/vendor/tanglu/apt-vendor.ent
@@ -6,3 +6,9 @@
<!ENTITY keyring-master-filename "">
<!ENTITY keyring-uri "">
<!ENTITY current-codename "bartholomea">
+
+<!ENTITY sourceslist-list-format "deb http://archive.tanglu.org/tanglu &current-codename; main contrib non-free">
+<!ENTITY sourceslist-sources-format "Types: deb
+URIs: http://archive.tanglu.org/tanglu
+Suites: &current-codename;
+Components: main contrib non-free">
diff --git a/vendor/ubuntu/apt-vendor.ent b/vendor/ubuntu/apt-vendor.ent
index caa532699..dcebc9209 100644
--- a/vendor/ubuntu/apt-vendor.ent
+++ b/vendor/ubuntu/apt-vendor.ent
@@ -5,3 +5,16 @@
<!ENTITY keyring-removed-filename "<filename>/usr/share/keyrings/ubuntu-archive-removed-keys.gpg</filename>">
<!ENTITY keyring-master-filename "/usr/share/keyrings/ubuntu-master-keyring.gpg">
<!ENTITY keyring-uri "http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg">
+
+<!ENTITY sourceslist-list-format "deb http://us.archive.ubuntu.com/ubuntu &ubuntu-codename; main restricted
+deb http://security.ubuntu.com/ubuntu &ubuntu-codename;-security main restricted
+deb http://us.archive.ubuntu.com/ubuntu &ubuntu-codename;-updates main restricted">
+<!ENTITY sourceslist-sources-format "Types: deb
+URIs: http://us.archive.ubuntu.com/ubuntu
+Suites: &ubuntu-codename; &ubuntu-codename;-updates
+Components: main restricted
+
+Types: deb
+URIs: http://security.ubuntu.com/ubuntu
+Suites: &ubuntu-codename;-security
+Components: main restricted">
diff --git a/vendor/ubuntu/apt.conf-01-vendor-ubuntu b/vendor/ubuntu/apt.conf-01-vendor-ubuntu
index c4092ff44..e69de29bb 100644
--- a/vendor/ubuntu/apt.conf-01-vendor-ubuntu
+++ b/vendor/ubuntu/apt.conf-01-vendor-ubuntu
@@ -1,6 +0,0 @@
-// Server information for apt-changelog
-APT {
- Changelogs {
- Server "http://changelogs.ubuntu.com/changelogs";
- };
-};