From 32123425252313e77a4a45593a5002c54493e779 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 13 Feb 2003 13:28:59 +0000 Subject: [PATCH] 0.5.5cnc1-alt3 - Introduced APT::Ignore-dpkg support and set this flag by default, to address #0002119. --- .gear-rules | 5 +- README.rsync | 59 + apt-0.3.19cnc32-alt-distro.patch | 21 - apt-0.3.19cnc52-alt-INLINEDEPFLAG.patch | 11 - apt-0.3.19cnc53-alt-strsignal.patch | 11 - ...53-stelian-apt-pkg-algorithms-scores.patch | 6 +- ....19cnc55-alt-AllowedDupPkgs-HoldPkgs.patch | 18 - ...9cnc55-alt-apt-pkg-rpmpm-execute_rpm.patch | 56 - apt-0.3.19cnc55-alt-enable-rsh-method.patch | 95 - apt-0.3.19cnc55-alt-genbasedir.patch | 489 - ...=> apt-0.5.4cnc1-alt-configure-build.patch | 38 +- apt-0.5.4cnc3-alt-md5hash-debug.patch | 36 + apt-0.5.4cnc3-alt-select-genlist.patch | 36 + apt-0.5.4cnc8-alt-rpm-fancypercent.patch | 16 + apt-0.5.4cnc8-alt-rpm_cmd.patch | 31 + apt-0.5.4cnc9-alt-bz2.patch | 41 + apt-0.5.4cnc9-alt-getsrc-debug.patch | 17 + apt-0.5.4cnc9-alt-getsrc.patch | 131 + apt-0.5.4cnc9-alt-install_virtual.patch | 18 + ....5.4cnc9-alt-install_virtual_version.patch | 35 + ...9-alt-packagemanager-CheckRConflicts.patch | 16 + apt-0.5.4cnc9-alt-pkgorderlist_score.patch | 35 + apt-0.5.4cnc9-alt-rpmlistparser-kernel.patch | 11 + apt-0.5.4cnc9-alt-rsync.patch | 666 + apt-0.5.4cnc9-alt-specialchars.patch | 37 + apt-0.5.5cnc1-alt-APT_DOMAIN.patch | 12 + apt-0.5.5cnc1-alt-debsystem.patch | 11 + apt-0.5.5cnc1-alt-distro.patch | 33 + apt-0.5.5cnc1-alt-methods_gpg_homedir.patch | 33 + apt-0.5.5cnc1-alt-pkgpriorities.patch | 11 + apt-0.5.5cnc1-mattdm-manbuild.patch | 11 + apt/doc/apt.8 => apt.8 | 17 +- apt.conf | 38 +- apt.ru.po | 1717 ++ apt/.cvsignore | 1 + apt/AUTHORS | 19 +- apt/AUTHORS.RPM | 9 +- apt/COMPILING | 30 +- apt/CVS/Entries | 30 - apt/CVS/Repository | 1 - apt/CVS/Root | 1 - apt/ChangeLog | 1780 -- apt/Makefile | 11 +- apt/README.RPM | 5 +- apt/README.make | 10 +- apt/REPOSITORIO-APT-HOWTO | 117 - apt/TODO | 7 +- apt/aclocal.m4 | 2860 +++ apt/apt-inst/contrib/arfile.cc | 154 + apt/apt-inst/contrib/arfile.h | 68 + apt/apt-inst/contrib/extracttar.cc | 343 + apt/apt-inst/contrib/extracttar.h | 54 + apt/apt-inst/database.cc | 30 + apt/apt-inst/database.h | 56 + apt/apt-inst/deb/debfile.cc | 262 + apt/apt-inst/deb/debfile.h | 92 + apt/apt-inst/deb/dpkgdb.cc | 493 + apt/apt-inst/deb/dpkgdb.h | 53 + apt/apt-inst/dirstream.cc | 103 + apt/apt-inst/dirstream.h | 61 + apt/apt-inst/dpkg-diffs.txt | 5 + apt/apt-inst/extract.cc | 511 + apt/apt-inst/extract.h | 52 + apt/apt-inst/filelist.cc | 590 + apt/apt-inst/filelist.h | 314 + apt/apt-inst/makefile | 31 + apt/apt-pkg/CVS/Entries | 43 - apt/apt-pkg/CVS/Repository | 1 - apt/apt-pkg/CVS/Root | 1 - apt/apt-pkg/acquire-item.cc | 745 +- apt/apt-pkg/acquire-item.h | 70 +- apt/apt-pkg/acquire-method.cc | 65 +- apt/apt-pkg/acquire-method.h | 16 +- apt/apt-pkg/acquire-worker.cc | 41 +- apt/apt-pkg/acquire-worker.h | 6 +- apt/apt-pkg/acquire.cc | 48 +- apt/apt-pkg/acquire.h | 42 +- apt/apt-pkg/algorithms.cc | 602 +- apt/apt-pkg/algorithms.h | 33 +- apt/apt-pkg/cachefile.cc | 139 +- apt/apt-pkg/cachefile.h | 44 +- apt/apt-pkg/cacheiterators.h | 56 +- apt/apt-pkg/clean.cc | 27 +- apt/apt-pkg/clean.h | 2 +- apt/apt-pkg/cnc/CVS/Entries | 1 - apt/apt-pkg/cnc/CVS/Repository | 1 - apt/apt-pkg/cnc/CVS/Root | 1 - apt/apt-pkg/contrib/CVS/Entries | 24 - apt/apt-pkg/contrib/CVS/Repository | 1 - apt/apt-pkg/contrib/CVS/Root | 1 - apt/apt-pkg/contrib/cdromutl.cc | 14 +- apt/apt-pkg/contrib/cdromutl.h | 4 +- apt/apt-pkg/contrib/cmndline.cc | 37 +- apt/apt-pkg/contrib/cmndline.h | 2 +- apt/apt-pkg/contrib/configuration.cc | 127 +- apt/apt-pkg/contrib/configuration.h | 13 +- apt/apt-pkg/contrib/crc-16.cc | 2 +- apt/apt-pkg/contrib/crc-16.h | 2 +- apt/apt-pkg/contrib/error.cc | 14 +- apt/apt-pkg/contrib/error.h | 35 +- apt/apt-pkg/contrib/fileutl.cc | 92 +- apt/apt-pkg/contrib/fileutl.h | 18 +- apt/apt-pkg/contrib/hashes.cc | 43 + apt/apt-pkg/contrib/hashes.h | 40 + apt/apt-pkg/contrib/i18n.h | 54 - apt/apt-pkg/contrib/md5.cc | 4 +- apt/apt-pkg/contrib/md5.h | 6 +- apt/apt-pkg/contrib/mmap.cc | 24 +- apt/apt-pkg/contrib/mmap.h | 6 +- apt/apt-pkg/contrib/progress.cc | 38 +- apt/apt-pkg/contrib/progress.h | 4 +- apt/apt-pkg/contrib/sha1.cc | 356 + apt/apt-pkg/contrib/sha1.h | 68 + apt/apt-pkg/contrib/sptr.h | 2 +- apt/apt-pkg/contrib/strutl.cc | 144 +- apt/apt-pkg/contrib/strutl.h | 62 +- apt/apt-pkg/contrib/system.h | 2 +- apt/apt-pkg/deb/CVS/Entries | 13 - apt/apt-pkg/deb/CVS/Repository | 1 - apt/apt-pkg/deb/CVS/Root | 1 - apt/apt-pkg/deb/debfactory.cc | 197 - apt/apt-pkg/deb/debfactory.h | 31 - apt/apt-pkg/deb/debindexfile.cc | 509 + apt/apt-pkg/deb/debindexfile.h | 112 + apt/apt-pkg/deb/deblistparser.cc | 239 +- apt/apt-pkg/deb/deblistparser.h | 38 +- apt/apt-pkg/deb/debrecords.cc | 33 +- apt/apt-pkg/deb/debrecords.h | 13 +- apt/apt-pkg/deb/debsrcrecords.cc | 102 +- apt/apt-pkg/deb/debsrcrecords.h | 24 +- apt/apt-pkg/deb/debsystem.cc | 224 + apt/apt-pkg/deb/debsystem.h | 47 + apt/apt-pkg/deb/debversion.cc | 238 + apt/apt-pkg/deb/debversion.h | 72 + apt/apt-pkg/deb/dpkginit.cc | 119 - apt/apt-pkg/deb/dpkginit.h | 34 - apt/apt-pkg/deb/dpkgpm.cc | 174 +- apt/apt-pkg/deb/dpkgpm.h | 10 +- apt/apt-pkg/depcache.cc | 311 +- apt/apt-pkg/depcache.h | 131 +- apt/apt-pkg/indexfile.cc | 77 + apt/apt-pkg/indexfile.h | 86 + apt/apt-pkg/init.cc | 137 +- apt/apt-pkg/init.h | 28 +- apt/apt-pkg/makefile | 70 +- apt/apt-pkg/orderlist.cc | 131 +- apt/apt-pkg/orderlist.h | 21 +- apt/apt-pkg/packagemanager.cc | 177 +- apt/apt-pkg/packagemanager.h | 25 +- apt/apt-pkg/pkgcache.cc | 292 +- apt/apt-pkg/pkgcache.h | 81 +- apt/apt-pkg/pkgcachegen.cc | 1133 +- apt/apt-pkg/pkgcachegen.h | 52 +- apt/apt-pkg/pkgrecords.cc | 57 +- apt/apt-pkg/pkgrecords.h | 35 +- apt/apt-pkg/pkgsystem.cc | 45 + apt/apt-pkg/pkgsystem.h | 112 + apt/apt-pkg/policy.cc | 303 + apt/apt-pkg/policy.h | 91 + apt/apt-pkg/repository.cc | 96 + apt/apt-pkg/repository.h | 57 + apt/apt-pkg/rpm/CVS/Entries | 16 - apt/apt-pkg/rpm/CVS/Repository | 1 - apt/apt-pkg/rpm/CVS/Root | 1 - apt/apt-pkg/rpm/rpmfactory.cc | 385 - apt/apt-pkg/rpm/rpmfactory.h | 45 - apt/apt-pkg/rpm/rpmhandler.cc | 233 + apt/apt-pkg/rpm/rpmhandler.h | 100 + apt/apt-pkg/rpm/rpmindexfile.cc | 795 + apt/apt-pkg/rpm/rpmindexfile.h | 161 + apt/apt-pkg/rpm/rpminit.cc | 179 - apt/apt-pkg/rpm/rpminit.h | 60 - apt/apt-pkg/rpm/rpmlistparser.cc | 714 +- apt/apt-pkg/rpm/rpmlistparser.h | 55 +- apt/apt-pkg/rpm/rpmpackagedata.cc | 226 +- apt/apt-pkg/rpm/rpmpackagedata.h | 59 +- apt/apt-pkg/rpm/rpmpm.cc | 443 +- apt/apt-pkg/rpm/rpmpm.h | 37 +- apt/apt-pkg/rpm/rpmrecords.cc | 447 +- apt/apt-pkg/rpm/rpmrecords.h | 31 +- apt/apt-pkg/rpm/rpmsrcrecords.cc | 519 +- apt/apt-pkg/rpm/rpmsrcrecords.h | 37 +- apt/apt-pkg/rpm/rpmsystem.cc | 436 + apt/apt-pkg/rpm/rpmsystem.h | 74 + apt/apt-pkg/rpm/rpmversion.cc | 345 +- apt/apt-pkg/rpm/rpmversion.h | 50 + apt/apt-pkg/sourcelist.cc | 890 +- apt/apt-pkg/sourcelist.h | 156 +- apt/apt-pkg/srcrecords.cc | 85 +- apt/apt-pkg/srcrecords.h | 49 +- apt/apt-pkg/systemfactory.cc | 439 - apt/apt-pkg/systemfactory.h | 65 - apt/apt-pkg/tagfile.cc | 338 +- apt/apt-pkg/tagfile.h | 52 +- apt/apt-pkg/version.cc | 279 +- apt/apt-pkg/version.h | 93 + apt/apt-pkg/versionmatch.cc | 220 + apt/apt-pkg/versionmatch.h | 72 + apt/apt.dia | Bin 6746 -> 0 bytes apt/buildlib/CVS/Entries | 26 - apt/buildlib/CVS/Repository | 1 - apt/buildlib/CVS/Root | 1 - apt/buildlib/acconfig.h | 19 - apt/buildlib/apti18n.h.in | 21 + apt/buildlib/archtable | 1 + apt/buildlib/config.guess | 570 +- apt/buildlib/config.h.in | 21 +- apt/buildlib/config.sub | 334 +- apt/buildlib/configure.mak | 4 +- apt/buildlib/defaults.mak | 6 +- apt/buildlib/environment.mak.in | 17 +- apt/buildlib/library.mak | 8 +- apt/{ => buildlib}/mkinstalldirs | 3 +- apt/buildlib/podomain.mak | 22 + apt/buildlib/program.mak | 3 + apt/buildlib/python.mak | 68 + apt/buildlib/sgml_manpage.mak | 49 + apt/cmdline/CVS/Entries | 12 - apt/cmdline/CVS/Repository | 1 - apt/cmdline/CVS/Root | 1 - apt/cmdline/acqprogress.cc | 39 +- apt/cmdline/acqprogress.h | 2 +- apt/cmdline/apt-cache.cc | 1165 +- apt/cmdline/apt-cdrom.cc | 508 +- apt/cmdline/apt-config.cc | 76 +- apt/cmdline/apt-extracttemplates.cc | 385 + apt/cmdline/apt-extracttemplates.h | 48 + apt/cmdline/apt-get.cc | 1496 +- apt/cmdline/apt-sortpkgs.cc | 208 + apt/cmdline/indexcopy.cc | 112 +- apt/cmdline/indexcopy.h | 14 +- apt/cmdline/makefile | 25 +- apt/cmdline/rpmindexcopy.cc | 94 +- apt/cmdline/rpmindexcopy.h | 22 +- apt/configure | 10338 +++++++++ apt/configure.in | 59 +- apt/debian/CVS/Entries | 15 - apt/debian/CVS/Repository | 1 - apt/debian/CVS/Root | 1 - apt/debian/apt-utils.dirs | 2 + apt/debian/changelog | 275 +- apt/debian/control | 39 +- apt/debian/copyright | 4 - apt/debian/dhelp | 8 +- apt/debian/dirs | 2 +- apt/debian/libapt-pkg-doc.dhelp | 32 +- apt/debian/libapt-pkg-doc.postinst | 2 +- apt/debian/libapt-pkg-doc.prerm | 2 +- apt/debian/postinst | 4 +- apt/debian/postrm | 6 +- apt/debian/preinst | 30 + apt/debian/prerm | 13 + apt/debian/python-apt.dirs | 1 + apt/debian/rules | 194 +- apt/debian/shlibs.local | 2 - apt/deity/CVS/Entries | 1 - apt/deity/CVS/Repository | 1 - apt/deity/CVS/Root | 1 - apt/doc/.cvsignore | 14 + apt/doc/Bugs | 2 +- apt/doc/CVS/Entries | 25 - apt/doc/CVS/Repository | 1 - apt/doc/CVS/Root | 1 - apt/doc/apt-cache.8 | 311 - apt/doc/apt-cache.8.sgml | 383 + apt/doc/apt-cache.8.yo | 280 - apt/doc/apt-cdrom.8 | 127 - apt/doc/apt-cdrom.8.sgml | 147 + apt/doc/apt-cdrom.8.yo | 120 - apt/doc/apt-config.8 | 97 - apt/doc/apt-config.8.sgml | 105 + apt/doc/apt-config.8.yo | 86 - apt/doc/apt-extracttemplates.1.sgml | 80 + apt/doc/apt-ftparchive.1.sgml | 534 + apt/doc/apt-get.8 | 330 - apt/doc/apt-get.8.sgml | 480 + apt/doc/apt-get.8.yo | 302 - apt/doc/apt-sortpkgs.1.sgml | 73 + apt/doc/apt.conf.5 | 290 - apt/doc/apt.conf.5.sgml | 414 + apt/doc/apt.conf.5.yo | 282 - apt/doc/apt.ent | 145 + apt/doc/apt_preferences.5.sgml | 548 + apt/doc/cache.sgml | 91 +- apt/doc/design.sgml | 16 +- apt/doc/dpkg-tech.sgml | 4 +- apt/doc/examples/CVS/Entries | 5 - apt/doc/examples/CVS/Repository | 1 - apt/doc/examples/CVS/Root | 1 - apt/doc/examples/apt.conf | 2 +- apt/doc/examples/configure-index | 42 +- apt/doc/examples/ftp-archive.conf | 81 + apt/doc/examples/sources.list | 2 +- apt/doc/examples/vendors.list | 12 - apt/doc/files.sgml | 48 +- apt/doc/fr/apt-cache.8.fr.sgml | 377 + apt/doc/fr/apt-cdrom.8.fr.sgml | 150 + apt/doc/fr/apt-config.8.fr.sgml | 113 + apt/doc/fr/apt-extracttemplates.1.fr.sgml | 83 + apt/doc/fr/apt-ftparchive.1.fr.sgml | 517 + apt/doc/fr/apt-sortpkgs.1.fr.sgml | 75 + apt/doc/fr/apt.conf.5.fr.sgml | 436 + apt/doc/fr/apt.ent.fr | 173 + apt/doc/fr/apt_preferences.5.fr.sgml | 243 + apt/doc/fr/sources.list.5.fr.sgml | 207 + apt/doc/guide.it.sgml | 585 + apt/doc/guide.sgml | 68 +- apt/doc/libapt-pkg2_to_3.txt | 89 + apt/doc/makefile | 21 +- apt/doc/method.sgml | 32 +- apt/doc/offline.sgml | 29 +- apt/doc/pt_BR/CVS/Entries | 9 - apt/doc/pt_BR/CVS/Repository | 1 - apt/doc/pt_BR/CVS/Root | 1 - apt/doc/pt_BR/apt-cache.8 | 319 - apt/doc/pt_BR/apt-cdrom.8 | 132 - apt/doc/pt_BR/apt-config.8 | 103 - apt/doc/pt_BR/apt-get.8 | 338 - apt/doc/pt_BR/apt.8 | 56 - apt/doc/pt_BR/apt.conf.5 | 280 - apt/doc/pt_BR/sources.list.5 | 220 - apt/doc/pt_BR/vendors.list.5 | 78 - apt/doc/sources.list.5 | 278 - apt/doc/sources.list.5.sgml | 199 + apt/doc/sources.list.5.yo | 148 - apt/doc/style.txt | 75 + apt/doc/vendors.list.5 | 77 - apt/doc/vendors.list.5.sgml | 104 + apt/docs.tar.gz | Bin 64203 -> 0 bytes apt/dselect/CVS/Entries | 7 - apt/dselect/CVS/Repository | 1 - apt/dselect/CVS/Root | 1 - apt/dselect/install | 57 +- apt/dselect/makefile | 6 +- apt/dselect/update | 49 +- apt/ftparchive/apt-ftparchive.cc | 932 + apt/ftparchive/apt-ftparchive.h | 31 + apt/ftparchive/cachedb.cc | 284 + apt/ftparchive/cachedb.h | 119 + apt/ftparchive/contents.cc | 402 + apt/ftparchive/contents.h | 89 + apt/ftparchive/makefile | 20 + apt/ftparchive/multicompress.cc | 497 + apt/ftparchive/multicompress.h | 80 + apt/ftparchive/override.cc | 254 + apt/ftparchive/override.h | 54 + apt/ftparchive/writer.cc | 780 + apt/ftparchive/writer.h | 152 + apt/gui/CVS/Entries | 33 - apt/gui/CVS/Repository | 1 - apt/gui/CVS/Root | 1 - apt/gui/apt.cc | 90 - apt/gui/aptwidgets.cc | 408 - apt/gui/aptwidgets.h | 87 - apt/gui/checkoff.xpm | 24 - apt/gui/checkon.xpm | 24 - apt/gui/conflicts.xpm | 29 - apt/gui/depends.xpm | 37 - apt/gui/downgrade.xpm | 22 - apt/gui/errorshow.cc | 111 - apt/gui/errorshow.h | 20 - apt/gui/extracache.cc | 140 - apt/gui/extracache.h | 62 - apt/gui/makefile | 17 - apt/gui/minus.xpm | 91 - apt/gui/package.xpm | 54 - apt/gui/pkgtree.cc | 344 - apt/gui/pkgtree.h | 75 - apt/gui/pkgtreeitem.cc | 731 - apt/gui/pkgtreeitem.h | 147 - apt/gui/plus.xpm | 90 - apt/gui/policy.cc | 136 - apt/gui/policy.h | 83 - apt/gui/progressmeter.cc | 133 - apt/gui/progressmeter.h | 53 - apt/gui/radiooff.xpm | 62 - apt/gui/radioon.xpm | 64 - apt/gui/recommends.xpm | 40 - apt/gui/section.xpm | 24 - apt/gui/statuswidgets.cc | 116 - apt/gui/statuswidgets.h | 37 - apt/gui/suggests.xpm | 23 - apt/gui/upgrade.xpm | 22 - apt/intl/CVS/Entries | 24 - apt/intl/CVS/Repository | 1 - apt/intl/CVS/Root | 1 - apt/intl/ChangeLog | 1106 - apt/intl/Makefile.in | 218 - apt/intl/VERSION | 1 - apt/intl/bindtextdom.c | 203 - apt/intl/cat-compat.c | 262 - apt/intl/dcgettext.c | 624 - apt/intl/dgettext.c | 59 - apt/intl/explodename.c | 188 - apt/intl/finddomain.c | 216 - apt/intl/gettext.c | 70 - apt/intl/gettext.h | 105 - apt/intl/gettextP.h | 89 - apt/intl/hash-string.h | 59 - apt/intl/intl-compat.c | 76 - apt/intl/l10nflist.c | 411 - apt/intl/libgettext.h | 182 - apt/intl/linux-msg.sed | 100 - apt/intl/loadinfo.h | 76 - apt/intl/loadmsgcat.c | 222 - apt/intl/localealias.c | 424 - apt/intl/po2tbl.sed.in | 106 - apt/intl/textdomain.c | 108 - apt/intl/xopen-msg.sed | 104 - apt/methods/CVS/Entries | 17 - apt/methods/CVS/Repository | 1 - apt/methods/CVS/Root | 1 - apt/methods/cdrom.cc | 27 +- apt/methods/connect.cc | 121 +- apt/methods/connect.h | 3 +- apt/methods/copy.cc | 2 +- apt/methods/file.cc | 12 +- apt/methods/ftp.cc | 375 +- apt/methods/ftp.h | 20 +- apt/methods/gpg.cc | 377 +- apt/methods/gzip.cc | 65 +- apt/methods/http.cc | 165 +- apt/methods/http.h | 17 +- apt/methods/makefile | 58 +- apt/methods/rfc2553emu.cc | 57 +- apt/methods/rfc2553emu.h | 13 +- apt/methods/rsh.cc | 41 +- apt/methods/rsh.h | 5 +- apt/po/CVS/Entries | 10 - apt/po/CVS/Repository | 1 - apt/po/CVS/Root | 1 - apt/po/LINGUAS | 1 + apt/po/Makefile.in.in | 247 - apt/po/POTFILES.in | 32 - apt/po/apt.pot | 1474 -- apt/po/cat-id-tbl.c | 367 - apt/po/de_DE.po | 1599 ++ apt/po/makefile | 74 + apt/po/pt_BR.po | 1960 +- apt/po/stamp-cat-id | 1 - apt/python/Makefile | 27 + apt/python/apt.i | 169 + apt/python/apt.py | 1715 ++ apt/python/apt_wrap.cxx | 18896 ++++++++++++++++ apt/python/swig-1.3.16-cxx.patch | 53 + apt/release | 121 - apt/rpmpriorities | 126 +- apt/test/CVS/Entries | 6 - apt/test/CVS/Repository | 1 - apt/test/CVS/Root | 1 - apt/test/conf.cc | 35 + apt/test/extract-control.cc | 40 + apt/test/hash.cc | 63 + apt/test/makefile | 47 +- apt/test/rpmver.cc | 115 + apt/test/scratch.cc | 1 + apt/test/testdeb.cc | 39 + apt/test/testextract.cc | 96 + apt/test/uri.cc | 34 + apt/test/versiontest.cc | 9 +- apt/tools/CVS/Entries | 13 - apt/tools/CVS/Repository | 1 - apt/tools/CVS/Root | 1 - apt/tools/cached_md5.cc | 179 +- apt/tools/cached_md5.h | 52 +- apt/tools/dumprpmdb.c | 3 - apt/tools/genbasedir | 563 +- apt/tools/genpkglist.cc | 94 +- apt/tools/gensrclist.cc | 149 +- apt/tools/hashtable.c | 5 - apt/tools/hdlist2pkglist.cc | 175 +- apt/tools/{Makefile => makefile} | 0 apt/tools/mkpackages.c | 1 - apt.spec => apt0.5.spec | 559 +- genbasedir | 508 + rpmpriorities | 113 - 476 files changed, 71397 insertions(+), 28711 deletions(-) create mode 100644 README.rsync delete mode 100644 apt-0.3.19cnc32-alt-distro.patch delete mode 100644 apt-0.3.19cnc52-alt-INLINEDEPFLAG.patch delete mode 100644 apt-0.3.19cnc53-alt-strsignal.patch delete mode 100644 apt-0.3.19cnc55-alt-AllowedDupPkgs-HoldPkgs.patch delete mode 100644 apt-0.3.19cnc55-alt-apt-pkg-rpmpm-execute_rpm.patch delete mode 100644 apt-0.3.19cnc55-alt-enable-rsh-method.patch delete mode 100644 apt-0.3.19cnc55-alt-genbasedir.patch rename apt-0.3.19cnc53-alt-configure-build.patch => apt-0.5.4cnc1-alt-configure-build.patch (55%) create mode 100644 apt-0.5.4cnc3-alt-md5hash-debug.patch create mode 100644 apt-0.5.4cnc3-alt-select-genlist.patch create mode 100644 apt-0.5.4cnc8-alt-rpm-fancypercent.patch create mode 100644 apt-0.5.4cnc8-alt-rpm_cmd.patch create mode 100644 apt-0.5.4cnc9-alt-bz2.patch create mode 100644 apt-0.5.4cnc9-alt-getsrc-debug.patch create mode 100644 apt-0.5.4cnc9-alt-getsrc.patch create mode 100644 apt-0.5.4cnc9-alt-install_virtual.patch create mode 100644 apt-0.5.4cnc9-alt-install_virtual_version.patch create mode 100644 apt-0.5.4cnc9-alt-packagemanager-CheckRConflicts.patch create mode 100644 apt-0.5.4cnc9-alt-pkgorderlist_score.patch create mode 100644 apt-0.5.4cnc9-alt-rpmlistparser-kernel.patch create mode 100644 apt-0.5.4cnc9-alt-rsync.patch create mode 100644 apt-0.5.4cnc9-alt-specialchars.patch create mode 100644 apt-0.5.5cnc1-alt-APT_DOMAIN.patch create mode 100644 apt-0.5.5cnc1-alt-debsystem.patch create mode 100644 apt-0.5.5cnc1-alt-distro.patch create mode 100644 apt-0.5.5cnc1-alt-methods_gpg_homedir.patch create mode 100644 apt-0.5.5cnc1-alt-pkgpriorities.patch create mode 100644 apt-0.5.5cnc1-mattdm-manbuild.patch rename apt/doc/apt.8 => apt.8 (72%) create mode 100644 apt.ru.po create mode 100644 apt/.cvsignore delete mode 100644 apt/CVS/Entries delete mode 100644 apt/CVS/Repository delete mode 100644 apt/CVS/Root delete mode 100644 apt/ChangeLog delete mode 100644 apt/REPOSITORIO-APT-HOWTO create mode 100644 apt/aclocal.m4 create mode 100644 apt/apt-inst/contrib/arfile.cc create mode 100644 apt/apt-inst/contrib/arfile.h create mode 100644 apt/apt-inst/contrib/extracttar.cc create mode 100644 apt/apt-inst/contrib/extracttar.h create mode 100644 apt/apt-inst/database.cc create mode 100644 apt/apt-inst/database.h create mode 100644 apt/apt-inst/deb/debfile.cc create mode 100644 apt/apt-inst/deb/debfile.h create mode 100644 apt/apt-inst/deb/dpkgdb.cc create mode 100644 apt/apt-inst/deb/dpkgdb.h create mode 100644 apt/apt-inst/dirstream.cc create mode 100644 apt/apt-inst/dirstream.h create mode 100644 apt/apt-inst/dpkg-diffs.txt create mode 100644 apt/apt-inst/extract.cc create mode 100644 apt/apt-inst/extract.h create mode 100644 apt/apt-inst/filelist.cc create mode 100644 apt/apt-inst/filelist.h create mode 100644 apt/apt-inst/makefile delete mode 100644 apt/apt-pkg/CVS/Entries delete mode 100644 apt/apt-pkg/CVS/Repository delete mode 100644 apt/apt-pkg/CVS/Root delete mode 100644 apt/apt-pkg/cnc/CVS/Entries delete mode 100644 apt/apt-pkg/cnc/CVS/Repository delete mode 100644 apt/apt-pkg/cnc/CVS/Root delete mode 100644 apt/apt-pkg/contrib/CVS/Entries delete mode 100644 apt/apt-pkg/contrib/CVS/Repository delete mode 100644 apt/apt-pkg/contrib/CVS/Root create mode 100644 apt/apt-pkg/contrib/hashes.cc create mode 100644 apt/apt-pkg/contrib/hashes.h delete mode 100644 apt/apt-pkg/contrib/i18n.h create mode 100644 apt/apt-pkg/contrib/sha1.cc create mode 100644 apt/apt-pkg/contrib/sha1.h delete mode 100644 apt/apt-pkg/deb/CVS/Entries delete mode 100644 apt/apt-pkg/deb/CVS/Repository delete mode 100644 apt/apt-pkg/deb/CVS/Root delete mode 100644 apt/apt-pkg/deb/debfactory.cc delete mode 100644 apt/apt-pkg/deb/debfactory.h create mode 100644 apt/apt-pkg/deb/debindexfile.cc create mode 100644 apt/apt-pkg/deb/debindexfile.h create mode 100644 apt/apt-pkg/deb/debsystem.cc create mode 100644 apt/apt-pkg/deb/debsystem.h create mode 100644 apt/apt-pkg/deb/debversion.cc create mode 100644 apt/apt-pkg/deb/debversion.h delete mode 100644 apt/apt-pkg/deb/dpkginit.cc delete mode 100644 apt/apt-pkg/deb/dpkginit.h create mode 100644 apt/apt-pkg/indexfile.cc create mode 100644 apt/apt-pkg/indexfile.h create mode 100644 apt/apt-pkg/pkgsystem.cc create mode 100644 apt/apt-pkg/pkgsystem.h create mode 100644 apt/apt-pkg/policy.cc create mode 100644 apt/apt-pkg/policy.h create mode 100644 apt/apt-pkg/repository.cc create mode 100644 apt/apt-pkg/repository.h delete mode 100644 apt/apt-pkg/rpm/CVS/Entries delete mode 100644 apt/apt-pkg/rpm/CVS/Repository delete mode 100644 apt/apt-pkg/rpm/CVS/Root delete mode 100644 apt/apt-pkg/rpm/rpmfactory.cc delete mode 100644 apt/apt-pkg/rpm/rpmfactory.h create mode 100644 apt/apt-pkg/rpm/rpmhandler.cc create mode 100644 apt/apt-pkg/rpm/rpmhandler.h create mode 100644 apt/apt-pkg/rpm/rpmindexfile.cc create mode 100644 apt/apt-pkg/rpm/rpmindexfile.h delete mode 100644 apt/apt-pkg/rpm/rpminit.cc delete mode 100644 apt/apt-pkg/rpm/rpminit.h create mode 100644 apt/apt-pkg/rpm/rpmsystem.cc create mode 100644 apt/apt-pkg/rpm/rpmsystem.h create mode 100644 apt/apt-pkg/rpm/rpmversion.h delete mode 100644 apt/apt-pkg/systemfactory.cc delete mode 100644 apt/apt-pkg/systemfactory.h create mode 100644 apt/apt-pkg/version.h create mode 100644 apt/apt-pkg/versionmatch.cc create mode 100644 apt/apt-pkg/versionmatch.h delete mode 100644 apt/apt.dia delete mode 100644 apt/buildlib/CVS/Entries delete mode 100644 apt/buildlib/CVS/Repository delete mode 100644 apt/buildlib/CVS/Root delete mode 100644 apt/buildlib/acconfig.h create mode 100644 apt/buildlib/apti18n.h.in rename apt/{ => buildlib}/mkinstalldirs (89%) create mode 100644 apt/buildlib/podomain.mak create mode 100644 apt/buildlib/python.mak create mode 100644 apt/buildlib/sgml_manpage.mak delete mode 100644 apt/cmdline/CVS/Entries delete mode 100644 apt/cmdline/CVS/Repository delete mode 100644 apt/cmdline/CVS/Root create mode 100644 apt/cmdline/apt-extracttemplates.cc create mode 100644 apt/cmdline/apt-extracttemplates.h create mode 100644 apt/cmdline/apt-sortpkgs.cc create mode 100755 apt/configure delete mode 100644 apt/debian/CVS/Entries delete mode 100644 apt/debian/CVS/Repository delete mode 100644 apt/debian/CVS/Root create mode 100644 apt/debian/apt-utils.dirs delete mode 100644 apt/debian/copyright create mode 100755 apt/debian/preinst create mode 100755 apt/debian/prerm create mode 100644 apt/debian/python-apt.dirs delete mode 100644 apt/debian/shlibs.local delete mode 100644 apt/deity/CVS/Entries delete mode 100644 apt/deity/CVS/Repository delete mode 100644 apt/deity/CVS/Root create mode 100644 apt/doc/.cvsignore delete mode 100644 apt/doc/CVS/Entries delete mode 100644 apt/doc/CVS/Repository delete mode 100644 apt/doc/CVS/Root delete mode 100644 apt/doc/apt-cache.8 create mode 100644 apt/doc/apt-cache.8.sgml delete mode 100644 apt/doc/apt-cache.8.yo delete mode 100644 apt/doc/apt-cdrom.8 create mode 100644 apt/doc/apt-cdrom.8.sgml delete mode 100644 apt/doc/apt-cdrom.8.yo delete mode 100644 apt/doc/apt-config.8 create mode 100644 apt/doc/apt-config.8.sgml delete mode 100644 apt/doc/apt-config.8.yo create mode 100644 apt/doc/apt-extracttemplates.1.sgml create mode 100644 apt/doc/apt-ftparchive.1.sgml delete mode 100644 apt/doc/apt-get.8 create mode 100644 apt/doc/apt-get.8.sgml delete mode 100644 apt/doc/apt-get.8.yo create mode 100644 apt/doc/apt-sortpkgs.1.sgml delete mode 100644 apt/doc/apt.conf.5 create mode 100644 apt/doc/apt.conf.5.sgml delete mode 100644 apt/doc/apt.conf.5.yo create mode 100644 apt/doc/apt.ent create mode 100644 apt/doc/apt_preferences.5.sgml delete mode 100644 apt/doc/examples/CVS/Entries delete mode 100644 apt/doc/examples/CVS/Repository delete mode 100644 apt/doc/examples/CVS/Root create mode 100644 apt/doc/examples/ftp-archive.conf delete mode 100644 apt/doc/examples/vendors.list create mode 100644 apt/doc/fr/apt-cache.8.fr.sgml create mode 100644 apt/doc/fr/apt-cdrom.8.fr.sgml create mode 100644 apt/doc/fr/apt-config.8.fr.sgml create mode 100644 apt/doc/fr/apt-extracttemplates.1.fr.sgml create mode 100644 apt/doc/fr/apt-ftparchive.1.fr.sgml create mode 100644 apt/doc/fr/apt-sortpkgs.1.fr.sgml create mode 100644 apt/doc/fr/apt.conf.5.fr.sgml create mode 100644 apt/doc/fr/apt.ent.fr create mode 100644 apt/doc/fr/apt_preferences.5.fr.sgml create mode 100644 apt/doc/fr/sources.list.5.fr.sgml create mode 100644 apt/doc/guide.it.sgml create mode 100644 apt/doc/libapt-pkg2_to_3.txt delete mode 100644 apt/doc/pt_BR/CVS/Entries delete mode 100644 apt/doc/pt_BR/CVS/Repository delete mode 100644 apt/doc/pt_BR/CVS/Root delete mode 100644 apt/doc/pt_BR/apt-cache.8 delete mode 100644 apt/doc/pt_BR/apt-cdrom.8 delete mode 100644 apt/doc/pt_BR/apt-config.8 delete mode 100644 apt/doc/pt_BR/apt-get.8 delete mode 100644 apt/doc/pt_BR/apt.8 delete mode 100644 apt/doc/pt_BR/apt.conf.5 delete mode 100644 apt/doc/pt_BR/sources.list.5 delete mode 100644 apt/doc/pt_BR/vendors.list.5 delete mode 100644 apt/doc/sources.list.5 create mode 100644 apt/doc/sources.list.5.sgml delete mode 100644 apt/doc/sources.list.5.yo create mode 100644 apt/doc/style.txt delete mode 100644 apt/doc/vendors.list.5 create mode 100644 apt/doc/vendors.list.5.sgml delete mode 100644 apt/docs.tar.gz delete mode 100644 apt/dselect/CVS/Entries delete mode 100644 apt/dselect/CVS/Repository delete mode 100644 apt/dselect/CVS/Root create mode 100644 apt/ftparchive/apt-ftparchive.cc create mode 100644 apt/ftparchive/apt-ftparchive.h create mode 100644 apt/ftparchive/cachedb.cc create mode 100644 apt/ftparchive/cachedb.h create mode 100644 apt/ftparchive/contents.cc create mode 100644 apt/ftparchive/contents.h create mode 100644 apt/ftparchive/makefile create mode 100644 apt/ftparchive/multicompress.cc create mode 100644 apt/ftparchive/multicompress.h create mode 100644 apt/ftparchive/override.cc create mode 100644 apt/ftparchive/override.h create mode 100644 apt/ftparchive/writer.cc create mode 100644 apt/ftparchive/writer.h delete mode 100644 apt/gui/CVS/Entries delete mode 100644 apt/gui/CVS/Repository delete mode 100644 apt/gui/CVS/Root delete mode 100644 apt/gui/apt.cc delete mode 100644 apt/gui/aptwidgets.cc delete mode 100644 apt/gui/aptwidgets.h delete mode 100644 apt/gui/checkoff.xpm delete mode 100644 apt/gui/checkon.xpm delete mode 100644 apt/gui/conflicts.xpm delete mode 100644 apt/gui/depends.xpm delete mode 100644 apt/gui/downgrade.xpm delete mode 100644 apt/gui/errorshow.cc delete mode 100644 apt/gui/errorshow.h delete mode 100644 apt/gui/extracache.cc delete mode 100644 apt/gui/extracache.h delete mode 100644 apt/gui/makefile delete mode 100644 apt/gui/minus.xpm delete mode 100644 apt/gui/package.xpm delete mode 100644 apt/gui/pkgtree.cc delete mode 100644 apt/gui/pkgtree.h delete mode 100644 apt/gui/pkgtreeitem.cc delete mode 100644 apt/gui/pkgtreeitem.h delete mode 100644 apt/gui/plus.xpm delete mode 100644 apt/gui/policy.cc delete mode 100644 apt/gui/policy.h delete mode 100644 apt/gui/progressmeter.cc delete mode 100644 apt/gui/progressmeter.h delete mode 100644 apt/gui/radiooff.xpm delete mode 100644 apt/gui/radioon.xpm delete mode 100644 apt/gui/recommends.xpm delete mode 100644 apt/gui/section.xpm delete mode 100644 apt/gui/statuswidgets.cc delete mode 100644 apt/gui/statuswidgets.h delete mode 100644 apt/gui/suggests.xpm delete mode 100644 apt/gui/upgrade.xpm delete mode 100644 apt/intl/CVS/Entries delete mode 100644 apt/intl/CVS/Repository delete mode 100644 apt/intl/CVS/Root delete mode 100644 apt/intl/ChangeLog delete mode 100644 apt/intl/Makefile.in delete mode 100644 apt/intl/VERSION delete mode 100644 apt/intl/bindtextdom.c delete mode 100644 apt/intl/cat-compat.c delete mode 100644 apt/intl/dcgettext.c delete mode 100644 apt/intl/dgettext.c delete mode 100644 apt/intl/explodename.c delete mode 100644 apt/intl/finddomain.c delete mode 100644 apt/intl/gettext.c delete mode 100644 apt/intl/gettext.h delete mode 100644 apt/intl/gettextP.h delete mode 100644 apt/intl/hash-string.h delete mode 100644 apt/intl/intl-compat.c delete mode 100644 apt/intl/l10nflist.c delete mode 100644 apt/intl/libgettext.h delete mode 100644 apt/intl/linux-msg.sed delete mode 100644 apt/intl/loadinfo.h delete mode 100644 apt/intl/loadmsgcat.c delete mode 100644 apt/intl/localealias.c delete mode 100644 apt/intl/po2tbl.sed.in delete mode 100644 apt/intl/textdomain.c delete mode 100644 apt/intl/xopen-msg.sed delete mode 100644 apt/methods/CVS/Entries delete mode 100644 apt/methods/CVS/Repository delete mode 100644 apt/methods/CVS/Root delete mode 100644 apt/po/CVS/Entries delete mode 100644 apt/po/CVS/Repository delete mode 100644 apt/po/CVS/Root create mode 100644 apt/po/LINGUAS delete mode 100644 apt/po/Makefile.in.in delete mode 100644 apt/po/POTFILES.in delete mode 100644 apt/po/apt.pot delete mode 100644 apt/po/cat-id-tbl.c create mode 100644 apt/po/de_DE.po create mode 100644 apt/po/makefile delete mode 100644 apt/po/stamp-cat-id create mode 100644 apt/python/Makefile create mode 100644 apt/python/apt.i create mode 100644 apt/python/apt.py create mode 100644 apt/python/apt_wrap.cxx create mode 100644 apt/python/swig-1.3.16-cxx.patch delete mode 100755 apt/release delete mode 100644 apt/test/CVS/Entries delete mode 100644 apt/test/CVS/Repository delete mode 100644 apt/test/CVS/Root create mode 100644 apt/test/conf.cc create mode 100644 apt/test/extract-control.cc create mode 100644 apt/test/hash.cc create mode 100644 apt/test/rpmver.cc create mode 100644 apt/test/testdeb.cc create mode 100644 apt/test/testextract.cc create mode 100644 apt/test/uri.cc delete mode 100644 apt/tools/CVS/Entries delete mode 100644 apt/tools/CVS/Repository delete mode 100644 apt/tools/CVS/Root rename apt/tools/{Makefile => makefile} (100%) rename apt.spec => apt0.5.spec (50%) create mode 100755 genbasedir delete mode 100644 rpmpriorities diff --git a/.gear-rules b/.gear-rules index bb7c6e7..fee23b7 100644 --- a/.gear-rules +++ b/.gear-rules @@ -1,4 +1,7 @@ +copy: *.8 copy: *.conf copy: *.patch +copy: *.po +copy: *.rsync tar.bz2: apt -copy: rpmpriorities +copy: genbasedir diff --git a/README.rsync b/README.rsync new file mode 100644 index 0000000..ef6e659 --- /dev/null +++ b/README.rsync @@ -0,0 +1,59 @@ +ðÁËÅÔ apt-rsync ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ÍÅÔÏÄ 'rsync' ÄÌÑ APT. +üÔÏ ÚÎÁÞÉÔ, ÞÔÏ apt-get ÓÍÏÖÅÔ ×ÙËÁÞÉ×ÁÔØ ÐÁËÅÔÙ ÐÏ ÐÒÏÔÏËÏÌÕ rsync. +ðÏÄÄÅÒÖÉ×ÁÅÔÓÑ ÒÁÂÏÔÁ ÞÅÒÅÚ HTTP-proxy. +äÌÑ ÒÁÂÏÔÙ ÍÅÔÏÄÁ 'rsync' ÎÅÏÂÈÏÄÉÍÏ, ÞÔÏÂÙ ÂÙÌ ÕÓÔÁÎÏ×ÌÅÎ ÐÁËÅÔ rsync, +ÓËÏÍÐÉÌÉÒÏ×ÁÎÎÙÊ Ó ÐÁÔÞÅÍ ÄÌÑ ÐÏÄÄÅÒÖËÉ ÏÐÃÉÉ "--apt-support". +÷ ALT Linux Sisyphus ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ ÎÁÞÉÎÁÑ Ó rsync-2.5.5-alt3. + +þÔÏÂÙ ÉÓÐÏÌØÚÏ×ÁÔØ ÍÅÔÏÄ 'rsync', ÎÅÏÂÈÏÄÉÍÏ ÄÏÂÁ×ÉÔØ × /etc/apt/sources.list +ÓÔÒÏÞËÉ ×ÉÄÁ: + +rpm [alt] rsync://rsync.altlinux.ru/ALTLinux/Sisyphus i586 classic +rpm-src [alt] rsync://rsync.altlinux.ru/ALTLinux/Sisyphus i586 classic + +äÌÑ ËÏÎÆÉÇÕÒÉÒÏ×ÁÎÉÑ ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÓÌÅÄÕÀÝÉÅ ÐÁÒÁÍÅÔÒÙ +(× /etc/apt/apt.conf ÉÌÉ ÉÚ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ): + +Debug::rsync = "true|false" + òÁÚÒÅÛÁÅÔ ×Ù×ÏÄ ÏÔÌÁÄÏÞÎÏÊ ÉÎÆÏÒÍÁÃÉÉ. + ðÏ ÕÍÏÌÞÁÎÉÀ: false + +Acquire::rsync::program + õËÁÚÙ×ÁÅÔ ÐÕÔØ Ë ÐÒÏÇÒÁÍÍÅ rsync. + ðÏ ÕÍÏÌÞÁÎÉÀ: /usr/bin/rsync + +Acquire::rsync::Timeout + ðÅÒÅÄÁ£Ô ÐÁÒÁÍÅÔÒ "--timeout" Ó ÕËÁÚÁÎÎÙÍ ÚÎÁÞÅÎÉÅÍ ÐÒÏÇÒÁÍÍÅ rsync. + ðÏ ÕÍÏÌÞÁÎÉÀ: ÎÅ ÐÅÒÅÄÁ£Ô ÜÔÏÔ ÐÁÒÁÍÅÔÒ ÄÌÑ rsync. + +Acquire::rsync::proxy +Acquire::rsync::proxy::hostname + õËÁÚÙ×ÁÅÔ, ÞÔÏ ÎÅÏÂÈÏÄÉÍÏ ÉÓÐÏÌØÚÏ×ÁÔØ HTTP-proxy. äÌÑ ÜÔÏÇÏ ÂÕÄÅÔ + ÕÓÔÁÎÏ×ÌÅÎÁ ÐÅÒÅÍÅÎÎÁÑ ÏËÒÕÖÅÎÉÑ RSYNC_PROXY ÐÒÉ ×ÙÚÏ×Å ÐÒÏÇÒÁÍÍÙ + rsync. + ðÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÒÅÐÏÚÉÔÁÒÉÅ× ÎÁ ÒÁÚÎÙÈ ÈÏÓÔÁÈ ×ÏÚÍÏÖÎÏ ÚÁÄÁÎÉÅ + proxy ÄÌÑ ×ÓÅÈ ÈÏÓÔÏ× É ÄÌÑ ËÁÖÄÏÇÏ × ÏÔÄÅÌØÎÏÓÔÉ. + úÎÁÞÅÎÉÅ ÄÌÑ ËÏÎËÒÅÔÎÏÇÏ ÈÏÓÔÁ ÐÅÒÅËÒÙ×ÁÅÔ ÇÌÏÂÁÌØÎÏÅ ÚÎÁÞÅÎÉÅ. + íÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÓÐÅÃÉÁÌØÎÏÅ ÚÎÁÞÅÎÉÅ "none" ÄÌÑ ÕËÁÚÁÎÉÑ, ÞÔÏ + ÎÅÏÂÈÏÄÉÍÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÒÑÍÏÅ ÓÏÅÄÉÎÅÎÉÅ. + æÏÒÍÁÔ: hostname:port ÉÌÉ "none" + ðÒÉÍÅÒ: + + Acquire::rsync::proxy="192.168.1.1:3128" + Acquire::rsync::proxy::mirror.localdomain="none" + + âÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ http-proxy "192.168.1.1:3128" ÄÌÑ ×ÓÅÈ ÈÏÓÔÏ×, + ËÒÏÍÅ mirror.localdomain, ÄÌÑ ËÏÔÏÒÏÇÏ ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ÐÒÑÍÏÅ + ÓÏÅÄÉÎÅÎÉÅ. + +Acquire::rsync::options:: + ðÏÚ×ÏÌÑÅÔ ÚÁÄÁ×ÁÔØ ÌÀÂÙÅ ÄÏÐÏÌÎÉÔÅÌØÎÙÅ ÏÐÃÉÉ ÐÒÉ ×ÙÚÏ×Å ÐÒÏÇÒÁÍÍÙ + rsync. + ðÒÉÍÅÒÙ: + + Acquire::rsync::options:: "-z"; + Acquire::rsync::options { "-z"; "--some-other-option"; }; + + ðÅÒ×ÙÊ ×ÁÒÉÁÎÔ ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ, ÅÓÌÉ ×ÓÅ ÎÅÏÂÈÏÄÉÍÙÅ ÏÐÃÉÉ ÍÏÖÎÏ + ÕËÁÚÁÔØ ÏÄÎÏÊ ÓÔÒÏËÏÊ. ðÒÉ ÎÁÌÉÞÉÉ ÎÅÓËÏÌØËÉÈ ÒÁÚÄÅÌØÎÙÈ ÏÐÃÉÊ + ÎÅÏÂÈÏÄÉÍÏ ÉÓÐÏÌØÚÏ×ÁÔØ ×ÔÏÒÏÊ ×ÁÒÉÁÎÔ. diff --git a/apt-0.3.19cnc32-alt-distro.patch b/apt-0.3.19cnc32-alt-distro.patch deleted file mode 100644 index 4bcd1c0..0000000 --- a/apt-0.3.19cnc32-alt-distro.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -k.orig -urN apt-0.3.19cnc32/cmdline/apt-cdrom.cc.orig apt-0.3.19cnc32/cmdline/apt-cdrom.cc ---- apt-0.3.19cnc32/cmdline/apt-cdrom.cc.orig Thu Jan 4 23:26:14 2001 -+++ apt-0.3.19cnc32/cmdline/apt-cdrom.cc Mon Jan 22 17:22:32 2001 -@@ -723,7 +723,7 @@ - if (0) - return _error->Error(_("Unable to locate any package files, perhaps this is not a Debian Disc")); - else -- return _error->Error(_("Unable to locate any package files, perhaps this is not a Conectiva Disc")); -+ return _error->Error(_("Unable to locate any package files, perhaps this is not a ALT Linux Disc")); - } - // Check if the CD is in the database - string Name; -@@ -748,7 +748,7 @@ - if (_config->FindB("APT::CDROM::Rename",false) == true || - Name.empty() == true) - { -- cout << _("Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1'"); -+ cout << _("Please provide a name for this Disc, such as 'Spring 2001 Disk 1'"); - - while (1) - { diff --git a/apt-0.3.19cnc52-alt-INLINEDEPFLAG.patch b/apt-0.3.19cnc52-alt-INLINEDEPFLAG.patch deleted file mode 100644 index e59f4a6..0000000 --- a/apt-0.3.19cnc52-alt-INLINEDEPFLAG.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- apt-0.3.19cnc52/buildlib/environment.mak.in.orig Thu Aug 2 01:31:58 2001 -+++ apt-0.3.19cnc52/buildlib/environment.mak.in Sun Aug 5 13:49:41 2001 -@@ -22,7 +22,7 @@ - - # Dep generation - this only works for gnu stuff - GCC3DEP = @GCC3DEP@ --INLINEDEPFLAG = -MD -+#INLINEDEPFLAG = -MD - - # Debian doc stuff - DEBIANDOC_HTML = @DEBIANDOC_HTML@ diff --git a/apt-0.3.19cnc53-alt-strsignal.patch b/apt-0.3.19cnc53-alt-strsignal.patch deleted file mode 100644 index a25c452..0000000 --- a/apt-0.3.19cnc53-alt-strsignal.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- apt-0.3.19cnc53/apt-pkg/rpm/rpmpm.cc~ Tue Nov 13 20:32:08 2001 -+++ apt-0.3.19cnc53/apt-pkg/rpm/rpmpm.cc Fri Nov 16 19:10:19 2001 -@@ -402,7 +402,7 @@ - if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) - { - if (WIFSIGNALED(Status) != 0) -- return _error->Error(_("Sub-process %s terminated by signal (%i)") ,Args[0], WTERMSIG(Status) ); -+ return _error->Error(_("Sub-process %s terminated by signal (%s)") ,Args[0], strsignal(WTERMSIG(Status)) ); - - if (WIFEXITED(Status) != 0) - return _error->Error(_("Sub-process %s returned an error code (%u)"),Args[0], diff --git a/apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch b/apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch index 4c934fe..13648d7 100644 --- a/apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch +++ b/apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch @@ -25,9 +25,9 @@ Comments ? Stelian. ---- apt-0.3.19cnc53/apt-pkg/algorithms.cc.orig Wed Nov 21 17:45:34 2001 -+++ apt-0.3.19cnc53/apt-pkg/algorithms.cc Wed Nov 21 17:46:12 2001 -@@ -454,6 +454,8 @@ +--- apt-0.5.4cnc9/apt-pkg/algorithms.cc.orig Wed Nov 21 17:45:34 2001 ++++ apt-0.5.4cnc9/apt-pkg/algorithms.cc Wed Nov 21 17:46:12 2001 +@@ -566,6 +566,8 @@ { if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) Scores[D.TargetPkg()->ID]++; diff --git a/apt-0.3.19cnc55-alt-AllowedDupPkgs-HoldPkgs.patch b/apt-0.3.19cnc55-alt-AllowedDupPkgs-HoldPkgs.patch deleted file mode 100644 index fc3384a..0000000 --- a/apt-0.3.19cnc55-alt-AllowedDupPkgs-HoldPkgs.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ur apt-0.3.19cnc55~/apt-pkg/init.cc apt-0.3.19cnc55/apt-pkg/init.cc ---- apt-0.3.19cnc55~/apt-pkg/init.cc Thu Aug 2 01:35:12 2001 -+++ apt-0.3.19cnc55/apt-pkg/init.cc Thu Mar 21 18:47:24 2002 -@@ -38,12 +38,9 @@ - Cnf.Set("Dir::State::status","/var/lib/dpkg/status"); - } else { - Cnf.Set("Acquire::cdrom::mount", "/mnt/cdrom"); -- Cnf.Set("RPM::AllowedDupPkgs::","^kernel$"); -- Cnf.Set("RPM::AllowedDupPkgs::", "kernel-smp"); -- Cnf.Set("RPM::AllowedDupPkgs::", "kernel-enterprise"); -+ Cnf.Set("RPM::AllowedDupPkgs::", "^(NVIDIA_)?(kernel|alsa)[0-9]*($|-up|-smp|-secure|-custom|-enterprise|-BOOT|-tape|-aureal)"); - -- Cnf.Set("RPM::HoldPkgs::", "kernel-source"); -- Cnf.Set("RPM::HoldPkgs::", "kernel-headers"); -+ Cnf.Set("RPM::HoldPkgs::", "^(kernel|alsa)[0-9]*-source"); - - Cnf.Set("Dir::State::status","/var/lib/rpm/status"); - } diff --git a/apt-0.3.19cnc55-alt-apt-pkg-rpmpm-execute_rpm.patch b/apt-0.3.19cnc55-alt-apt-pkg-rpmpm-execute_rpm.patch deleted file mode 100644 index 92b91b5..0000000 --- a/apt-0.3.19cnc55-alt-apt-pkg-rpmpm-execute_rpm.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- apt-0.3.19cnc55~/apt-pkg/rpm/rpmpm.cc Wed Mar 6 20:17:13 2002 -+++ apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.cc Thu Mar 21 22:35:05 2002 -@@ -287,14 +287,16 @@ - case OInstall: - options = "-i"; - -- Args[n++] = "-i"; -+ Args[n++] = "-iv"; - - Args[n++] = "--replacepkgs"; - - if (noninteractive) - Args[n++] = "--percent"; -- else -+ else { - Args[n++] = "-h"; -+ Args[n++] = "--fancypercent"; -+ } - - if (_config->FindB("RPM::Force", false) == true) - Args[n++] = "--force"; -@@ -309,8 +311,10 @@ - - if (noninteractive) - Args[n++] = "--percent"; -- else -+ else { - Args[n++] = "-h"; -+ Args[n++] = "--fancypercent"; -+ } - - if (_config->FindB("RPM::Force", false) == true) - Args[n++] = "--force"; -@@ -330,6 +334,13 @@ - if (nodeps) - Args[n++] = "--nodeps"; - -+ string cmd; -+ for (unsigned i = 0; i < n; ++i) -+ { -+ if (cmd.length()) -+ cmd += ' '; -+ cmd += Args[i]; -+ } - - for (slist::iterator i = files->begin(); - i != files->end() && n < sizeof(Args); -@@ -349,7 +360,7 @@ - return true; - } - -- cout << _("Executing RPM (")<Errno("read","Problem hashing file"); - return false; - } -@@ -323,7 +323,7 @@ - } - MyLen += Res; - -- Hash.Add(Buffer,Res); -+ MD5.Add(Buffer,Res); - if (To.Write(Buffer,Res) == false) - { - Close(); -@@ -428,7 +428,7 @@ - } - - // Open the file -- Hashes Hash; -+ MD5Summation MD5; - { - FileFd Fd(Itm->DestFile,FileFd::WriteAny); - if (_error->PendingError() == true) -@@ -441,7 +441,7 @@ - FailFd = Fd.Fd(); - - bool Missing; -- if (Server->Get(File,Fd,Res.ResumePoint,Hash,Missing,Res.Size) == false) -+ if (Server->Get(File,Fd,Res.ResumePoint,MD5,Missing,Res.Size) == false) - { - Fd.Close(); - -@@ -462,7 +462,7 @@ - } - - Res.LastModified = FailTime; -- Res.TakeHashes(Hash); -+ Res.MD5Sum = MD5.Result(); - - // Timestamp - struct utimbuf UBuf; -diff -ur apt-0.3.19cnc55/methods/rsh.h apt-0.3.19cnc53/methods/rsh.h ---- apt-0.3.19cnc55/methods/rsh.h Fri Nov 30 23:34:13 2001 -+++ apt-0.3.19cnc53/methods/rsh.h Thu Mar 21 20:05:08 2002 -@@ -12,7 +12,7 @@ - - #include - #include --#include -+#include - #include - #include - -@@ -44,7 +44,7 @@ - bool Size(const char *Path,unsigned long &Size); - bool ModTime(const char *Path, time_t &Time); - bool Get(const char *Path,FileFd &To,unsigned long Resume, -- Hashes &Hash,bool &Missing, unsigned long Size); -+ MD5Summation &MD5,bool &Missing, unsigned long Size); - - RSHConn(URI Srv); - ~RSHConn(); diff --git a/apt-0.3.19cnc55-alt-genbasedir.patch b/apt-0.3.19cnc55-alt-genbasedir.patch deleted file mode 100644 index b7c5b48..0000000 --- a/apt-0.3.19cnc55-alt-genbasedir.patch +++ /dev/null @@ -1,489 +0,0 @@ ---- apt-0.3.19cnc55~/tools/genbasedir Wed Mar 6 20:17:13 2002 -+++ apt-0.3.19cnc55/tools/genbasedir Thu Mar 21 22:15:32 2002 -@@ -69,99 +69,103 @@ - # Language setting to generate a consistent pkglist. - # - --usage="\ --Usage: genbasedir [] [ ... ]\n\ --Options:\n\ -- -s, --sign Generate and sign hashfile\n\ -- --hashonly Do hashfile stuff only\n\ -- --listonly Generate pkglists/srclists and quit\n\ -- --bz2only Generate only compressed lists\n\ -- --topdir=dir Top directory of repository\n\ -- --progress Show progress bars for genpkglist/gensrclist\n\ -- --updateinfo=file Update information file\n" -+PROG="${0##*/}" - - basedir=. - signature=0 - listonly=0 - hashonly=0 --updateinfo="" --mapi=0 --bz2only=0 -+updateinfo= -+mapi= -+gpguid= -+topdir= -+bz2only=k - progress= - - # bloat is necessary for non-Conectiva distros, at least RH, - # because they use file dependencies with a non-predictable - # heuristic. So we can't strip-off paths that will probably - # never appear in dependencies. --bloat="" -- -+bloat= - - # flat is for repositories where RPMS and SRPMS are kept in the - # same directory level. - flat="" - --while test $# -gt 0 ; do -- case "${1}" in -- -h | --help) -- echo -e "${usage}" -- exit 0 -- ;; -- --mapi) -- # hee hee hee.. -- mapi=1 -- ;; -- --listonly) -- listonly=1 -- ;; -- --hashonly) -- hashonly=1 -- ;; -- --bz2only) -- bz2only=1 -- ;; -- --updateinfo=*) -- updateinfo=${1} -- ;; -- --bloat) -- bloat="--bloat" -- ;; -- --flat) -- flat="--flat" -- ;; -- --topdir=*) -- topdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" -- if [ ! -d $topdir ]; then -- echo "Invalid top directory for distribution ${topdir}" 1>&2 -- exit 1 -- fi -- ;; -- --progress) -- progress="--progress" -- ;; -- -s | --sign) -- signature=1; -- ;; -- -*) -- echo -e "${usage}" 1>&2 -- exit 1 -- ;; -- *) -- break -- ;; -- esac -- shift -+USAGE() -+{ -+ cat >&2 <] [ ... ] -+Options: -+ -s, --sign Generate and sign hashfile -+ --hashonly Do hashfile stuff only -+ --listonly Generate pkglists/srclists and quit -+ --bz2only Generate only compressed lists -+ --topdir=dir Top directory of repository -+ --updateinfo=file Update information file -+ --bloat Do not strip the package file list. Needed for some -+ distributions that use non-automatically generated file dependencies -+ --uid=uid Pass different GPG user ID for signing -+ --progress Show progress bars for genpkglist/gensrclist -+EOF -+ [ -n "$1" ] && exit "$1" || exit -+} -+ -+TEMP=`getopt -n $PROG -o hs -l help,mapi,listonly,bz2only,hashonly,updateinfo:,bloat,topdir:,sign,uid:,progress -- "$@"` || USAGE -+eval set -- "$TEMP" -+ -+while :; do -+ case "$1" in -+ --listonly) shift; listonly=1 -+ ;; -+ --bz2only) shift; bz2only= -+ ;; -+ --hashonly) shift; hashonly=1 -+ ;; -+ -s|--sign) shift; signature=1 -+ ;; -+ --bloat) shift; bloat="--bloat" -+ ;; -+ --mapi) shift; mapi="--mapi" -+ ;; -+ --updateinfo) shift; updateinfo="$1"; shift -+ ;; -+ --uid) shift; gpguid="$1"; shift -+ ;; -+ --topdir) shift; topdir="$1"; shift -+ ;; -+ --flat) shift; float="--float" -+ ;; -+ --progress) shift; progress="--progress" -+ ;; -+ -h|--help) USAGE 0 -+ ;; -+ --) shift; break -+ ;; -+ *) echo "$PROG: unrecognized option: $1" >&2; exit 1 -+ ;; -+ esac - done - --distro=${1} --shift -+topdir="$(echo "$topdir" |sed ' -+s:/\(\./\)\+:/:g -+s:/\+:/:g -+s:/$:: -+')" - --components=$* -+[ -n "$topdir" ] || USAGE 1 - --if [ -z "$components" ]; then -- echo -e "${usage}" -- exit 0 -+if [ ! -d "$topdir" ]; then -+ echo "Invalid top directory for distribution: $topdir" >&2 -+ exit 1 - fi - -+distro=${1} -+shift -+ -+components="$*" -+ -+[ -n "$components" ] || USAGE 1 - - getsize() { - tmp=`wc -c $1` -@@ -186,75 +190,88 @@ - basedir_=`echo ${distro}/base|tr -s /` - basedir=${topdir}/$basedir_ - -+WORKDIR= -+ -+Exit() -+{ -+ RETVAL=$? -+ trap '' EXIT -+ [ -z "$WORKDIR" ] || rm -rf "$WORKDIR" -+ exit $RETVAL -+} -+ -+trap 'Exit ' SIGHUP SIGPIPE SIGINT SIGQUIT SIGTERM EXIT -+ -+WORKDIR="$(mktemp -dt "$PROG.XXXXXXXXXX")" -+ -+SRCIDX_COMP="$WORKDIR/comp" -+SRCIDX="$WORKDIR/total" -+ -+saved_list= -+ -+save_file() -+{ -+ saved_list="$1" -+ -+ if [ -f "$saved_list" ]; then -+ mv -f "$saved_list" "$saved_list.old" -+ else -+ saved_list= -+ fi -+} - --# release file --# ------------ -+compare_file() -+{ -+ if [ -n "$saved_list" -a -f "$saved_list.old" ]; then -+ if cmp -s "$saved_list.old" "$saved_list"; then -+ mv -f "$saved_list.old" "$saved_list" -+ else -+ rm -f "$saved_list.old" -+ fi -+ fi -+} - --#for comp in ${components}; do --# true > ${basedir}/release.$comp --# --#done -+for comp in ${components}; do -+ [ -f "$basedir/release.$comp" ] || touch "$basedir/release.$comp" -+done - - --if [ $hashonly -ne 1 ]; then -+if [ "$hashonly" -ne 1 ]; then - # package lists - # ------------- - --true > /tmp/srcidx.$$ -- - for comp in ${components}; do - echo -n "${comp}: " - - echo -n "pkglist " - -+ newlist="$basedir/pkglist.$comp" -+ - # Save older pkglist -- if [ -f $basedir/pkglist.$comp ]; then -- mv -f $basedir/pkglist.$comp $basedir/pkglist.$comp.old -- fi -+ save_file "$newlist" - -- if test x$updateinfo = x; then -- (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ $topdir/${distro} $comp) -+ :>"$SRCIDX_COMP" -+ if [ -z "$updateinfo" ]; then -+ (cd "$basedir"; genpkglist $progress $bloat --index "$SRCIDX_COMP" "$topdir/$distro" "$comp") - else -- (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ --info $updateinfo $topdir/${distro} $comp) -+ (cd "$basedir"; genpkglist $progress $bloat --index "$SRCIDX_COMP" --info "$updateinfo" "$topdir/$distro" "$comp") - fi -+ - if [ $? -ne 0 ]; then - echo - echo "Error executing genpkglist." - exit 1 - fi - -- if [ -f $basedir/pkglist.$comp ]; then -- -- # Compare with older pkglist. -- if [ -f $basedir/pkglist.$comp.old ]; then -- if cmp -s $basedir/pkglist.$comp.old $basedir/pkglist.$comp; then -- mv -f $basedir/pkglist.$comp.old $basedir/pkglist.$comp -- fi -- fi -- -- # Save older compressed pkglist -- if [ -f $basedir/pkglist.$comp.bz2 ]; then -- mv -f $basedir/pkglist.$comp.bz2 $basedir/pkglist.$comp.bz2.old -- fi -- -- bzip2 -c $basedir/pkglist.$comp > $basedir/pkglist.$comp.bz2 -- -- # Compare with older compressed pkglist. -- if [ -f $basedir/pkglist.$comp.bz2.old ]; then -- if cmp -s $basedir/pkglist.$comp.bz2.old $basedir/pkglist.$comp.bz2; then -- mv -f $basedir/pkglist.$comp.bz2.old $basedir/pkglist.$comp.bz2 -- fi -- fi -- -- if [ $bz2only -eq 1 ]; then -- rm -f $basedir/pkglist.$comp -- fi -+ # Compare with older pkglist. -+ compare_file - -- rm -f $basedir/pkglist.$comp.old -- rm -f $basedir/pkglist.$comp.bz2.old -+ if [ -f "$newlist" ]; then -+ rm -f "$newlist.bz2" -+ bzip2 -9$bz2only "$newlist" - fi - -- cat /tmp/srcidx.$comp.$$ >> /tmp/srcidx.$$ -+ cat "$SRCIDX_COMP" >> "$SRCIDX" - - echo "done" - done -@@ -264,77 +281,38 @@ - - echo -n "srclist " - -- # Save older srclist -- if [ -f $basedir/srclist.$comp ]; then -- mv -f $basedir/srclist.$comp $basedir/srclist.$comp.old -- fi -+ newlist="$basedir/srclist.$comp" - -+ # Save older srclist -+ save_file "$newlist" - -- sfix="/.." -- if test x$flat != x; then -- sfix="" -- fi -+ :>"$SRCIDX_COMP" -+ (cd "$basedir"; gensrclist $progress $flat $mapi "$topdir/$distro/.." "$comp" "$SRCIDX_COMP") - -- if [ $mapi -ne 0 ]; then -- (cd $basedir; gensrclist $progress $flat --mapi $topdir/${distro}${sfix} $comp /tmp/srcidx.$comp.$$) -- else -- (cd $basedir; gensrclist $progress $flat $topdir/${distro}${sfix} $comp /tmp/srcidx.$$) -- fi - if [ $? -ne 0 ]; then - echo - echo "Error executing gensrclist." - exit 1 - fi - -+ # Compare with older srclist. -+ compare_file - -- -- if [ -f $basedir/srclist.$comp ]; then -- -- # Compare with older srclist. -- if [ -f $basedir/srclist.$comp.old ]; then -- if cmp -s $basedir/srclist.$comp.old $basedir/srclist.$comp; then -- mv -f $basedir/srclist.$comp.old $basedir/srclist.$comp -- fi -- fi -- -- # Save older compressed srclist -- if [ -f $basedir/srclist.$comp.bz2 ]; then -- mv -f $basedir/srclist.$comp.bz2 $basedir/srclist.$comp.bz2.old -- fi -- -- bzip2 -c $basedir/srclist.$comp > $basedir/srclist.$comp.bz2 -- -- # Compare with older compressed srclist. -- if [ -f $basedir/srclist.$comp.bz2.old ]; then -- if cmp -s $basedir/srclist.$comp.bz2.old $basedir/srclist.$comp.bz2; then -- mv -f $basedir/srclist.$comp.bz2.old $basedir/srclist.$comp.bz2 -- fi -- fi -- -- if [ $bz2only -eq 1 ]; then -- rm -f $basedir/srclist.$comp -- fi -- -- rm -f $basedir/srclist.$comp.old -- rm -f $basedir/srclist.$comp.bz2.old -+ if [ -f "$newlist" ]; then -+ rm -f "$newlist.bz2" -+ bzip2 -9$bz2only "$newlist" - fi - -- rm -f /tmp/srcidx.$comp.$$ -- - echo "done" - done - - fi - --rm -f /tmp/srcidx.$$ -- --if [ $listonly -eq 0 ]; then -+if [ "$listonly" -eq 0 ]; then - # Save older hashfile -- if [ -f $basedir/hashfile ]; then -- mv -f $basedir/hashfile $basedir/hashfile.old -- fi -+ save_file "$basedir/hashfile" - hf=${basedir}/hashfile -- true > $hf -+ : > $hf - else - hf=/dev/null - fi -@@ -348,27 +326,21 @@ - srclist=${basedir}/srclist - release=${basedir}/release - --for comp in ${components}; do -- echo -n "${comp}: " -- -- echo -n "hashfile " -- if [ -f ${pkglist}.$comp ]; then -- phashstuff ${pkglist}.$comp ${pkglist_}.$comp >> $hf -- fi -- if [ -f ${srclist}.$comp ]; then -- phashstuff ${srclist}.$comp ${srclist_}.$comp >> $hf -- fi -+phash() -+{ -+ if [ -f "$1" ]; then -+ phashstuff "$1" "$2" >> "$3" -+ fi -+} - -- if [ -f ${pkglist}.$comp.bz2 ]; then -- phashstuff ${pkglist}.$comp.bz2 ${pkglist_}.$comp.bz2 >> $hf -- fi -- if [ -f ${srclist}.$comp.bz2 ]; then -- phashstuff ${srclist}.$comp.bz2 ${srclist_}.$comp.bz2 >> $hf -- fi -+for comp in ${components}; do -+ echo -n "$comp: hashfile " - -- if [ -f ${release}.$comp ]; then -- phashstuff ${release}.$comp ${release_}.$comp >> $hf -- fi -+ phash "$pkglist.$comp" "$pkglist_.$comp" "$hf" -+ phash "$srclist.$comp" "$srclist_.$comp" "$hf" -+ phash "$pkglist.$comp.bz2" "$pkglist_.$comp.bz2" "$hf" -+ phash "$srclist.$comp.bz2" "$srclist_.$comp.bz2" "$hf" -+ phash "$release.$comp" "$release_.$comp" "$hf" - - echo "done" - done -@@ -377,34 +349,26 @@ - - if [ $listonly -eq 0 ]; then - # Compare with older hashfile. -- if [ -f $basedir/hashfile.old ]; then -- if cmp -s $basedir/hashfile.old $basedir/hashfile; then -- mv -f $basedir/hashfile.old $basedir/hashfile -- fi -- fi -+ compare_file - fi - --if [ $signature -ne 0 -a $listonly -eq 0 ]; then -+if [ "$signature" -ne 0 -a "$listonly" -eq 0 ]; then -+ if [ -n "$gpguid" ]; then -+ DEFAULTKEY="--default-key $gpguid" -+ else -+ DEFAULTKEY= -+ fi - - # Save older hashfile.gpg -- if [ -f $basedir/hashfile.gpg ]; then -- mv -f $basedir/hashfile.gpg $basedir/hashfile.gpg.old -- fi -+ save_file "$basedir/hashfile.gpg" - -- gpg -armour -qs --yes $basedir/hashfile -- mv -f $basedir/hashfile.asc $basedir/hashfile.gpg -- rm -f $basedir/hashfile -+ gpg -armour $DEFAULTKEY -qs --yes $basedir/hashfile -+ mv -f "$basedir/hashfile.asc" "$basedir/hashfile.gpg" -+ rm -f "$basedir/hashfile" - - # Compare with older hashfile.gpg -- if [ -f $basedir/hashfile.gpg.old ]; then -- if cmp -s $basedir/hashfile.gpg.old $basedir/hashfile.gpg; then -- mv -f $basedir/hashfile.gpg.old $basedir/hashfile.gpg -- fi -- fi -+ compare_file - fi -- --rm -f $basedir/hashfile.old --rm -f $basedir/hashfile.gpg.old - - echo "All your base are belong to us !!" - diff --git a/apt-0.3.19cnc53-alt-configure-build.patch b/apt-0.5.4cnc1-alt-configure-build.patch similarity index 55% rename from apt-0.3.19cnc53-alt-configure-build.patch rename to apt-0.5.4cnc1-alt-configure-build.patch index 8afb261..dc71a4c 100644 --- a/apt-0.3.19cnc53-alt-configure-build.patch +++ b/apt-0.5.4cnc1-alt-configure-build.patch @@ -1,20 +1,14 @@ -diff -ur apt-0.3.19cnc55~/configure.in apt-0.3.19cnc55/configure.in ---- apt-0.3.19cnc55~/configure.in Wed Mar 6 20:17:10 2002 -+++ apt-0.3.19cnc55/configure.in Tue Mar 26 21:14:21 2002 -@@ -64,20 +64,12 @@ +--- apt-0.5.4cnc1.orig/configure.in Tue Jul 9 12:28:05 2002 ++++ apt-0.5.4cnc1/configure.in Fri Jul 19 00:11:07 2002 +@@ -64,6 +64,7 @@ dnl AC_MSG_ERROR(failed: I need posix threads, pthread) dnl fi --dnl Check for DB2 --AC_CHECK_HEADER(db2/db.h, -- [AC_CHECK_LIB(db2,db_open, -- [AC_DEFINE(HAVE_DB2) DB2LIB="-ldb2"])]) --AC_SUBST(DB2LIB) -- -- - dnl Check for rpm version --akk - rpm_version="none" - SAVE_LIBS="$LIBS" ++dnl ALT:We need this to build apt-ftparchive + dnl Check for DB2 + AC_CHECK_HEADER(db2/db.h, + [AC_CHECK_LIB(db2,db_open, +@@ -77,7 +78,6 @@ SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" @@ -22,7 +16,7 @@ diff -ur apt-0.3.19cnc55~/configure.in apt-0.3.19cnc55/configure.in AC_CHECK_HEADER(rpm/rpmlib.h, rpm_header_ok=1, rpm_header_ok=0) if test $rpm_header_ok = 1; then -@@ -85,7 +77,7 @@ +@@ -85,7 +85,7 @@ LIBS="$SAVE_LIBS -lrpm -lrpmio -lz -lbz2 -lpopt" AC_CHECK_LIB(rpmdb,rpmdbOpen, [RPMDBLIBS="-lrpmdb"], @@ -31,17 +25,16 @@ diff -ur apt-0.3.19cnc55~/configure.in apt-0.3.19cnc55/configure.in LIBS="$SAVE_LIBS $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt" AC_CHECK_LIB(rpm,rpmdbGetIteratorOffset, -@@ -100,6 +92,7 @@ +@@ -100,6 +100,7 @@ [AC_DEFINE_UNQUOTED(HAVE_RPM, 1) RPMLIBS="-lrpm -ldb1 -lz -lbz2 -lpopt" SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" + AC_CHECK_HEADERS(db1/db.h) rpm_version="3"]) fi - fi -diff -ur apt-0.3.19cnc55~/tools/cached_md5.cc apt-0.3.19cnc55/tools/cached_md5.cc ---- apt-0.3.19cnc55~/tools/cached_md5.cc Sun Feb 17 01:46:11 2002 -+++ apt-0.3.19cnc55/tools/cached_md5.cc Sun Feb 17 01:46:25 2002 + if test $rpm_version != "none"; then +--- apt-0.5.4cnc1.orig/tools/cached_md5.cc Tue Jul 9 02:41:48 2002 ++++ apt-0.5.4cnc1/tools/cached_md5.cc Thu Jul 18 22:47:39 2002 @@ -39,6 +39,7 @@ #include #include @@ -50,9 +43,8 @@ diff -ur apt-0.3.19cnc55~/tools/cached_md5.cc apt-0.3.19cnc55/tools/cached_md5.c #include #include #include -diff -ur apt-0.3.19cnc55~/tools/hdlist2pkglist.cc apt-0.3.19cnc55/tools/hdlist2pkglist.cc ---- apt-0.3.19cnc55~/tools/hdlist2pkglist.cc Sun Feb 17 01:46:11 2002 -+++ apt-0.3.19cnc55/tools/hdlist2pkglist.cc Sun Feb 17 01:46:46 2002 +--- apt-0.5.4cnc1.orig/tools/hdlist2pkglist.cc Tue Jul 9 02:42:13 2002 ++++ apt-0.5.4cnc1/tools/hdlist2pkglist.cc Thu Jul 18 22:48:22 2002 @@ -37,6 +37,7 @@ #include #include diff --git a/apt-0.5.4cnc3-alt-md5hash-debug.patch b/apt-0.5.4cnc3-alt-md5hash-debug.patch new file mode 100644 index 0000000..a4ee141 --- /dev/null +++ b/apt-0.5.4cnc3-alt-md5hash-debug.patch @@ -0,0 +1,36 @@ +--- apt-0.5.4cnc3.orig/apt-pkg/acquire-item.cc Sat Jul 27 13:02:53 2002 ++++ apt-0.5.4cnc3/apt-pkg/acquire-item.cc Sat Jul 27 13:34:34 2002 +@@ -786,7 +786,10 @@ + { + if (Md5Hash != MD5) + { +- Status = StatError; ++ if (_config->FindB("Debug::pkgAcquire::Auth", false)) { ++ cerr << "md5 mismatch: " << Md5Hash << "!=" << MD5 << endl; ++ } ++ Status = StatError; + ErrorText = _("MD5Sum mismatch"); + Rename(DestFile,DestFile + ".FAILED"); + return; +@@ -916,6 +919,9 @@ + { + if (Md5Hash != MD5) + { ++ if (_config->FindB("Debug::pkgAcquire::Auth", false)) { ++ cerr << "md5 mismatch: " << Md5Hash << "!=" << MD5 << endl; ++ } + Status = StatError; + ErrorText = "MD5Sum mismatch"; + Rename(DestFile,DestFile + ".FAILED"); +--- apt-0.5.4cnc3.orig/cmdline/apt-get.cc Sat Jul 27 13:02:53 2002 ++++ apt-0.5.4cnc3/cmdline/apt-get.cc Sat Jul 27 13:41:35 2002 +@@ -1709,6 +1709,9 @@ + I->Type != "tar") + continue; + ++ if (_config->FindB("Debug::pkgAcquire::Auth",false) == true) ++ cerr << "I->Path = " << I->Path << ", I->MD5Hash = " << I->MD5Hash << endl; ++ + new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path), + I->MD5Hash,I->Size, + Last->Index().SourceInfo(*Last,*I),Src); diff --git a/apt-0.5.4cnc3-alt-select-genlist.patch b/apt-0.5.4cnc3-alt-select-genlist.patch new file mode 100644 index 0000000..85f2a56 --- /dev/null +++ b/apt-0.5.4cnc3-alt-select-genlist.patch @@ -0,0 +1,36 @@ +diff -ur apt-0.5.4cnc3.orig/tools/genbasedir apt-0.5.4cnc3/tools/genbasedir +--- apt-0.5.4cnc3.orig/tools/genbasedir Sat Jul 27 13:02:53 2002 ++++ apt-0.5.4cnc3/tools/genbasedir Sat Jul 27 14:05:42 2002 +@@ -26,6 +26,8 @@ + genbasedir /home/ftp/pub/conectiva\n\ + genbasedir /home/ftp/pub/conectiva main extra devel\n\ + " ++GENPKGLIST=genpkglist-0.5 ++GENSRCLIST=gensrclist-0.5 + + getsize() + { +@@ -178,9 +180,9 @@ + fi + + if test x$updateinfo = x; then +- (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ $topdir $comp) ++ (cd $basedir; "$GENPKGLIST" $progress $bloat --index /tmp/srcidx.$comp.$$ $topdir $comp) + else +- (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ --info $updateinfo $topdir $comp) ++ (cd $basedir; "$GENPKGLIST" $progress $bloat --index /tmp/srcidx.$comp.$$ --info $updateinfo $topdir $comp) + fi + + if [ -f $basedir/pkglist.$comp ]; then +@@ -230,9 +232,9 @@ + srctopdir=`cd $topdir; pwd` + fi + if [ $mapi -ne 0 ]; then +- (cd $basedir; gensrclist $progress $flat --mapi $srctopdir $comp /tmp/srcidx.$comp.$$) ++ (cd $basedir; "$GENSRCLIST" $progress $flat --mapi $srctopdir $comp /tmp/srcidx.$comp.$$) + else +- (cd $basedir; gensrclist $progress $flat $srctopdir $comp /tmp/srcidx.$$) ++ (cd $basedir; "$GENSRCLIST" $progress $flat $srctopdir $comp /tmp/srcidx.$$) + fi + + if [ -f $basedir/srclist.$comp ]; then diff --git a/apt-0.5.4cnc8-alt-rpm-fancypercent.patch b/apt-0.5.4cnc8-alt-rpm-fancypercent.patch new file mode 100644 index 0000000..69db335 --- /dev/null +++ b/apt-0.5.4cnc8-alt-rpm-fancypercent.patch @@ -0,0 +1,16 @@ +2002-10-23 Dmitry V. Levin + + * apt-pkg/rpm/rpmpm.cc(pkgRPMPM::ExecRPM): + Pass "fancypercent" option if interactive. + +--- apt-0.5.4cnc8/apt-pkg/rpm/rpmpm.cc.orig 2002-08-05 17:46:44 +0300 ++++ apt-0.5.4cnc8/apt-pkg/rpm/rpmpm.cc 2002-10-23 11:16:13 +0300 +@@ -266,6 +266,8 @@ + + if (Interactive == false && op != Item::RPMErase) + Args[n++] = "--percent"; ++ if (Interactive) ++ Args[n++] = "--fancypercent"; + + string rootdir = _config->Find("RPM::RootDir", ""); + if (!rootdir.empty()) diff --git a/apt-0.5.4cnc8-alt-rpm_cmd.patch b/apt-0.5.4cnc8-alt-rpm_cmd.patch new file mode 100644 index 0000000..4ffceb2 --- /dev/null +++ b/apt-0.5.4cnc8-alt-rpm_cmd.patch @@ -0,0 +1,31 @@ +2002-10-23 Dmitry V. Levin + + * apt-pkg/rpm/rpmpm.cc(pkgRPMPM::ExecRPM): + Report actual options being passed to rpm. + +--- apt-0.5.4cnc8/apt-pkg/rpm/rpmpm.cc.orig 2002-08-05 17:46:44 +0300 ++++ apt-0.5.4cnc8/apt-pkg/rpm/rpmpm.cc 2002-10-23 11:16:13 +0300 +@@ -326,6 +326,14 @@ + if (_config->FindB("RPM::Order",false) == false) + Args[n++] = "--noorder"; + ++ string cmd; ++ for (unsigned i = 0; i < n; ++i) ++ { ++ if (!cmd.empty()) ++ cmd += ' '; ++ cmd += Args[i]; ++ } ++ + for (list::iterator I = files.begin(); I != files.end(); I++) + Args[n++] = *I; + +@@ -339,7 +347,7 @@ + return true; + } + +- cout << _("Executing RPM (")<Find("Acquire::ComprExtension", ".bz2"); + Desc.Description = URIDesc; + Desc.Owner = this; + Desc.ShortDesc = ShortDesc; +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/apt-pkg/init.cc apt-0.5.4cnc9.bz2/apt-pkg/init.cc +--- apt-0.5.4cnc9.orig/apt-pkg/init.cc 2002-12-17 12:00:54 +0300 ++++ apt-0.5.4cnc9.bz2/apt-pkg/init.cc 2002-12-19 17:28:15 +0300 +@@ -71,6 +71,7 @@ + Cnf.Set("Dir::Etc::parts","apt.conf.d"); + Cnf.Set("Dir::Etc::preferences","preferences"); + Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods"); ++ Cnf.Set("Acquire::ComprExtension", ".bz2"); + + bool Res = true; + +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/methods/file.cc apt-0.5.4cnc9.bz2/methods/file.cc +--- apt-0.5.4cnc9.orig/methods/file.cc 2002-07-23 21:54:53 +0400 ++++ apt-0.5.4cnc9.bz2/methods/file.cc 2002-12-19 17:24:32 +0300 +@@ -52,9 +52,11 @@ + Res.IMSHit = true; + } + +- // See if we can compute a file without a .gz exentsion +- string::size_type Pos = File.rfind(".gz"); +- if (Pos + 3 == File.length()) ++ // See if we can compute a file without a .gz or .bz2 exentsion ++ // Should we check here both .gz and .bz2 extensions? ++ string ComprExtension = _config->Find("Acquire::ComprExtension", ".bz2"); ++ string::size_type Pos = File.rfind(ComprExtension); ++ if (Pos + ComprExtension.length() == File.length()) + { + File = string(File,0,Pos); + if (stat(File.c_str(),&Buf) == 0) diff --git a/apt-0.5.4cnc9-alt-getsrc-debug.patch b/apt-0.5.4cnc9-alt-getsrc-debug.patch new file mode 100644 index 0000000..0965b18 --- /dev/null +++ b/apt-0.5.4cnc9-alt-getsrc-debug.patch @@ -0,0 +1,17 @@ +helps to determine which of the branches is really used. +Look at apt-0.5.4cnc9-alt-getsrc.patch for more info. + +imz@altlinux.ru, 28 Sep 2002. + +--- apt-0.5.4cnc9/cmdline/apt-get.cc.getsrc 2002-10-28 22:41:04 +0300 ++++ apt-0.5.4cnc9/cmdline/apt-get.cc 2002-10-28 23:44:30 +0300 +@@ -1184,6 +1184,9 @@ + } + + // No source package name.. ++ // use the "matching against Binaries()" Find()'s feature. ++ // DEBUG: ++ printf("Src1 %s\n",Src.c_str()); + if (Src.empty() == true) + Src = TmpSrc; + diff --git a/apt-0.5.4cnc9-alt-getsrc.patch b/apt-0.5.4cnc9-alt-getsrc.patch new file mode 100644 index 0000000..97b69a7 --- /dev/null +++ b/apt-0.5.4cnc9-alt-getsrc.patch @@ -0,0 +1,131 @@ +This patch is the result of work initiated by Anton Denisov's + feedback (and debug-patches). + +There are three problems with apt-get source , this patch fixes two of them: + +- rpmrecords.cc: SourcePackage() returns empty string because of incorrect + rpmlib's return code interpretation (fixed, now it return in most cases + the source package filename); +- srcrecords.cc: Find() called from apt-get's DoSource() doesn't match anything + because it matches against source package name, but gets a filename as an + argument (in the case of the first branch in DoSource() when the return value + of SourcePackage() is used) (fixed: now matching is done for corresponding + fields). + +This makes the first branch in DoSource() work which is almost all one may want. + +9 July 2002 +imz@altlinux.ru + +A bad side of this patch may be that in the first branch (matching against +src.rpm name), it takes the full filenmame (including version-release) into +account while the second branch does only matching against the name (version +insensitive). + +Ported to apt-0.5.4cnc9. (There is a separate apt-0.5.4cnc9-alt-getsrc-debug.patch +which helps to determine which of the branches is really used.) + +imz@altlinux.ru, 28 Sep 2002. + +--- apt-0.5.4cnc9/apt-pkg/deb/debsrcrecords.h.getsrc 2002-07-25 22:07:18 +0400 ++++ apt-0.5.4cnc9/apt-pkg/deb/debsrcrecords.h 2002-10-29 00:45:07 +0300 +@@ -34,6 +34,9 @@ + virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);}; + virtual bool Jump(unsigned long Off) {iOffset = Off; return Tags.Jump(Sect,Off);}; + ++ // These refer to the archive file for the Version ++ virtual string FileName() const {return Sect.FindS("Filename");}; ++ + virtual string Package() const {return Sect.FindS("Package");}; + virtual string Version() const {return Sect.FindS("Version");}; + virtual string Maintainer() const {return Sect.FindS("Maintainer");}; +--- apt-0.5.4cnc9/apt-pkg/rpm/rpmsrcrecords.h.getsrc 2002-08-09 00:07:33 +0400 ++++ apt-0.5.4cnc9/apt-pkg/rpm/rpmsrcrecords.h 2002-10-29 00:45:07 +0300 +@@ -44,6 +44,8 @@ + virtual bool Step(); + virtual bool Jump(unsigned long Off); + ++ virtual string FileName() const; ++ + virtual string Package() const; + virtual string Version() const; + virtual string Maintainer() const; +--- apt-0.5.4cnc9/apt-pkg/rpm/rpmrecords.cc.getsrc 2002-08-19 20:37:48 +0400 ++++ apt-0.5.4cnc9/apt-pkg/rpm/rpmrecords.cc 2002-10-29 01:02:58 +0300 +@@ -174,7 +174,12 @@ + /* */ + string rpmRecordParser::SourcePkg() + { +- return ""; ++ char *str; ++ int_32 count, type; ++ assert(HeaderP != NULL); ++ int rc = headerGetEntry(HeaderP, RPMTAG_SOURCERPM, ++ &type, (void**)&str, &count); ++ return string(rc?str:""); + } + /*}}}*/ + +--- apt-0.5.4cnc9/apt-pkg/rpm/rpmsrcrecords.cc.getsrc 2002-08-09 00:07:33 +0400 ++++ apt-0.5.4cnc9/apt-pkg/rpm/rpmsrcrecords.cc 2002-10-29 00:57:41 +0300 +@@ -143,6 +143,20 @@ + return true; + } + ++// RecordParser::FileName - Return the archive filename on the site /*{{{*/ ++// --------------------------------------------------------------------- ++/* */ ++string rpmSrcRecordParser::FileName() const ++{ ++ char *str; ++ int_32 count, type; ++ assert(HeaderP != NULL); ++ int rc = headerGetEntry(HeaderP, CRPMTAG_FILENAME, ++ &type, (void**)&str, &count); ++ return string(rc?str:""); ++} ++ /*}}}*/ ++ + string rpmSrcRecordParser::Package() const + { + char *str; +--- apt-0.5.4cnc9/apt-pkg/srcrecords.cc.getsrc 2002-07-23 21:54:50 +0400 ++++ apt-0.5.4cnc9/apt-pkg/srcrecords.cc 2002-10-29 00:45:07 +0300 +@@ -82,7 +82,7 @@ + /*}}}*/ + // SrcRecords::Find - Find the first source package with the given name /*{{{*/ + // --------------------------------------------------------------------- +-/* This searches on both source package names and output binary names and ++/* This searches on both source package filenames and output binary names and + returns the first found. A 'cursor' like system is used to allow this + function to be called multiple times to get successive entries */ + pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool SrcOnly) +@@ -92,6 +92,8 @@ + + while (true) + { ++ // DEBUG: ++ //std::cerr << "start loop" << std::endl; + // Step to the next record, possibly switching files + while ((*Current)->Step() == false) + { +@@ -107,7 +109,7 @@ + return 0; + + // Source name hit +- if ((*Current)->Package() == Package) ++ if ((*Current)->FileName() == Package) + return *Current; + + if (SrcOnly == true) +--- apt-0.5.4cnc9/apt-pkg/srcrecords.h.getsrc 2002-07-25 22:07:18 +0400 ++++ apt-0.5.4cnc9/apt-pkg/srcrecords.h 2002-10-29 00:45:07 +0300 +@@ -66,6 +66,8 @@ + virtual unsigned long Offset() = 0; + virtual string AsStr() = 0; + ++ virtual string FileName() const = 0; ++ + virtual string Package() const = 0; + virtual string Version() const = 0; + virtual string Maintainer() const = 0; diff --git a/apt-0.5.4cnc9-alt-install_virtual.patch b/apt-0.5.4cnc9-alt-install_virtual.patch new file mode 100644 index 0000000..34445f1 --- /dev/null +++ b/apt-0.5.4cnc9-alt-install_virtual.patch @@ -0,0 +1,18 @@ +2003-01-17 Anton Kachalov , + Dmitry V. Levin + + * cmdline/apt-get.cc (TryToInstall): + Add APT::Install::Virtual support. + +--- apt-0.5.4cnc9/cmdline/apt-get.cc.orig 2003-01-17 17:11:11 +0300 ++++ apt-0.5.4cnc9/cmdline/apt-get.cc 2003-01-17 17:19:10 +0300 +@@ -988,7 +988,8 @@ bool TryToInstall(pkgCache::PkgIterator + /* This is a pure virtual package and there is a single available + provides */ + if (Cache[Pkg].CandidateVer == 0 && Pkg->ProvidesList != 0 && +- Pkg.ProvidesList()->NextProvides == 0) ++ (Pkg.ProvidesList()->NextProvides == 0 || ++ _config->FindB("APT::Install::Virtual", false))) + { + pkgCache::PkgIterator Tmp = Pkg.ProvidesList().OwnerPkg(); + ioprintf(c1out,_("Note, selecting %s instead of %s\n"), diff --git a/apt-0.5.4cnc9-alt-install_virtual_version.patch b/apt-0.5.4cnc9-alt-install_virtual_version.patch new file mode 100644 index 0000000..d44e10d --- /dev/null +++ b/apt-0.5.4cnc9-alt-install_virtual_version.patch @@ -0,0 +1,35 @@ +2003-01-21 Anton Kachalov + + * apt-pkg/versionmatch.cc (pkgVersionMatch::Find): + Add APT::Install::VirtualVersion support. + +--- apt-0.5.4cnc9/apt-pkg/versionmatch.cc.orig 2002-07-23 21:54:50 +0400 ++++ apt-0.5.4cnc9/apt-pkg/versionmatch.cc 2003-01-21 16:42:55 +0300 +@@ -15,6 +15,7 @@ + #pragma implementation "apt-pkg/versionmatch.h" + #endif + #include ++#include + + #include + #include +@@ -158,6 +159,19 @@ pkgCache::VerIterator pkgVersionMatch::Find + return Ver; + } + ++ if (_config->FindB("APT::Install::VirtualVersion",false) == false) ++ return Ver; ++ ++ pkgCache::PrvIterator Prv = Pkg.ProvidesList(); ++ for (; Prv.end() == false; Prv++) ++ { ++ if (Type == Version) ++ { ++ if (MatchVer(Prv.ProvideVersion(),VerStr,VerPrefixMatch) == true) ++ return Prv.OwnerVer(); ++ continue; ++ } ++ } + // This will be Ended by now. + return Ver; + } diff --git a/apt-0.5.4cnc9-alt-packagemanager-CheckRConflicts.patch b/apt-0.5.4cnc9-alt-packagemanager-CheckRConflicts.patch new file mode 100644 index 0000000..2bf4864 --- /dev/null +++ b/apt-0.5.4cnc9-alt-packagemanager-CheckRConflicts.patch @@ -0,0 +1,16 @@ +2002-12-26 Anton Kachalov + + * apt-pkg/packagemanager.cc (pkgPackageManager::CheckRConflicts): + Ignore versionless reverse dependencies. + +--- apt-0.5.4cnc9/apt-pkg/packagemanager.cc.orig 2002-12-26 21:29:50 +0300 ++++ apt-0.5.4cnc9/apt-pkg/packagemanager.cc 2002-12-26 21:30:48 +0300 +@@ -216,7 +216,7 @@ bool pkgPackageManager::CheckRConflicts( + if (D.ParentPkg() == Pkg || D.ParentVer() != D.ParentPkg().CurrentVer()) + continue; + +- if (Cache.VS().CheckDep(Ver,D) == false) // CNC:2002-07-10 ++ if (D.TargetVer() == 0 || Cache.VS().CheckDep(Ver,D) == false) // CNC:2002-07-10 + continue; + + if (EarlyRemove(D.ParentPkg()) == false) diff --git a/apt-0.5.4cnc9-alt-pkgorderlist_score.patch b/apt-0.5.4cnc9-alt-pkgorderlist_score.patch new file mode 100644 index 0000000..0ab7f22 --- /dev/null +++ b/apt-0.5.4cnc9-alt-pkgorderlist_score.patch @@ -0,0 +1,35 @@ +--- apt-0.5.4cnc9/apt-pkg/orderlist.cc.orig 2002-07-23 21:54:50 +0400 ++++ apt-0.5.4cnc9/apt-pkg/orderlist.cc 2003-01-21 18:18:22 +0300 +@@ -293,30 +293,30 @@ int pkgOrderList::Score(PkgIterator Pkg) + { + // Removal is always done first + if (Cache[Pkg].Delete() == true) + return 200; + + // This should never happen.. + if (Cache[Pkg].InstVerIter(Cache).end() == true) + return -1; + +- int Score = 0; ++ int Score = 1; + if ((Pkg->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) + Score += 100; + + if (IsFlag(Pkg,Immediate) == true) + Score += 10; + + for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList(); + D.end() == false; D++) + if (D->Type == pkgCache::Dep::PreDepends) + { +- Score += 50; ++ Score -= 1; + break; + } + + // Important Required Standard Optional Extra + signed short PrioMap[] = {0,5,4,3,1,0}; + if (Cache[Pkg].InstVerIter(Cache)->Priority <= 5) + Score += PrioMap[Cache[Pkg].InstVerIter(Cache)->Priority]; + return Score; + } diff --git a/apt-0.5.4cnc9-alt-rpmlistparser-kernel.patch b/apt-0.5.4cnc9-alt-rpmlistparser-kernel.patch new file mode 100644 index 0000000..cd63953 --- /dev/null +++ b/apt-0.5.4cnc9-alt-rpmlistparser-kernel.patch @@ -0,0 +1,11 @@ +--- apt-0.5.4cnc9/apt-pkg/rpm/rpmlistparser.cc.orig 2002-08-05 18:55:56 +0400 ++++ apt-0.5.4cnc9/apt-pkg/rpm/rpmlistparser.cc 2002-12-23 17:21:35 +0300 +@@ -123,8 +123,6 @@ string rpmListParser::Package() + bool DupOk = false; + string Name = str; + +- if (strncmp(str,"kernel", 6)==0) +- DupOk=true; + for (vector::iterator I = AllowedDupPackages.begin(); + I != AllowedDupPackages.end(); I++) + { diff --git a/apt-0.5.4cnc9-alt-rsync.patch b/apt-0.5.4cnc9-alt-rsync.patch new file mode 100644 index 0000000..f0aedaf --- /dev/null +++ b/apt-0.5.4cnc9-alt-rsync.patch @@ -0,0 +1,666 @@ +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/apt-pkg/acquire-item.h apt-0.5.4cnc9.rsync/apt-pkg/acquire-item.h +--- apt-0.5.4cnc9.orig/apt-pkg/acquire-item.h 2002-07-23 21:54:50 +0400 ++++ apt-0.5.4cnc9.rsync/apt-pkg/acquire-item.h 2002-12-17 11:34:33 +0300 +@@ -59,6 +59,9 @@ + + // File to write the fetch into + string DestFile; ++ // Alternative temporary destination ++ // Used if method (e.g. rsync) can't use directly DestFile ++ string TmpFile; + + // Action members invoked by the worker + virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/apt-pkg/acquire-method.cc apt-0.5.4cnc9.rsync/apt-pkg/acquire-method.cc +--- apt-0.5.4cnc9.orig/apt-pkg/acquire-method.cc 2002-07-23 21:54:50 +0400 ++++ apt-0.5.4cnc9.rsync/apt-pkg/acquire-method.cc 2002-12-17 11:34:33 +0300 +@@ -135,7 +135,7 @@ + if (Queue == 0) + abort(); + +- char S[1024] = ""; ++ char S[2048] = ""; + char *End = S; + + End += snprintf(S,sizeof(S),"200 URI Start\nURI: %s\n",Queue->Uri.c_str()); +@@ -150,6 +150,10 @@ + End += snprintf(End,sizeof(S)-4 - (End - S),"Resume-Point: %lu\n", + Res.ResumePoint); + ++ if (!Res.TmpFilename.empty()) ++ End += snprintf(End,sizeof(S)-4 - (End - S),"Tmp-Filename: %s\n", ++ Res.TmpFilename.c_str()); ++ + strcat(End,"\n"); + if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S)) + exit(100); +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/apt-pkg/acquire-method.h apt-0.5.4cnc9.rsync/apt-pkg/acquire-method.h +--- apt-0.5.4cnc9.orig/apt-pkg/acquire-method.h 2002-07-23 21:54:50 +0400 ++++ apt-0.5.4cnc9.rsync/apt-pkg/acquire-method.h 2002-12-17 11:34:33 +0300 +@@ -47,6 +47,7 @@ + time_t LastModified; + bool IMSHit; + string Filename; ++ string TmpFilename; + unsigned long Size; + unsigned long ResumePoint; + +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/apt-pkg/acquire-worker.cc apt-0.5.4cnc9.rsync/apt-pkg/acquire-worker.cc +--- apt-0.5.4cnc9.orig/apt-pkg/acquire-worker.cc 2002-07-23 21:54:50 +0400 ++++ apt-0.5.4cnc9.rsync/apt-pkg/acquire-worker.cc 2002-12-17 11:34:33 +0300 +@@ -235,6 +235,7 @@ + CurrentSize = 0; + TotalSize = atoi(LookupTag(Message,"Size","0").c_str()); + ResumePoint = atoi(LookupTag(Message,"Resume-Point","0").c_str()); ++ Itm->Owner->TmpFile = LookupTag(Message,"Tmp-Filename"); + Itm->Owner->Start(Message,atoi(LookupTag(Message,"Size","0").c_str())); + + // Display update before completion +@@ -526,7 +527,11 @@ + return; + + struct stat Buf; +- if (stat(CurrentItem->Owner->DestFile.c_str(),&Buf) != 0) ++ int res = 1; ++ if (CurrentItem->Owner->TmpFile.empty()==false) ++ res = stat(CurrentItem->Owner->TmpFile.c_str(),&Buf); ++ ++ if (res!=0 && stat(CurrentItem->Owner->DestFile.c_str(),&Buf) != 0) + return; + CurrentSize = Buf.st_size; + +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/methods/makefile apt-0.5.4cnc9.rsync/methods/makefile +--- apt-0.5.4cnc9.orig/methods/makefile 2002-07-25 22:07:19 +0400 ++++ apt-0.5.4cnc9.rsync/methods/makefile 2002-12-17 11:34:33 +0300 +@@ -63,6 +63,13 @@ + SOURCE = gpg.cc + include $(PROGRAM_H) + ++# The rsync method ++PROGRAM=rsync ++SLIBS = -lapt-pkg $(SOCKETLIBS) $(RPMLIBS) ++LIB_MAKES = apt-pkg/makefile ++SOURCE = rsync.cc ++include $(PROGRAM_H) ++ + # SSH and vzip2 method symlink + all: $(BIN)/ssh $(BIN)/bzip2 + veryclean: clean-$(BIN)/ssh clean-$(BIN)/bzip2 +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/methods/rsync.cc apt-0.5.4cnc9.rsync/methods/rsync.cc +--- apt-0.5.4cnc9.orig/methods/rsync.cc 1970-01-01 03:00:00 +0300 ++++ apt-0.5.4cnc9.rsync/methods/rsync.cc 2002-12-17 13:25:56 +0300 +@@ -0,0 +1,468 @@ ++// -*- mode: cpp; mode: fold -*- ++// Description /*{{{*/ ++// $Id$ ++/* ###################################################################### ++ ++RSYNC Aquire Method - This is the RSYNC aquire method for APT. ++ ++##################################################################### */ ++/*}}}*/ ++// Include Files /*{{{*/ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++// Internet stuff ++#include ++#include ++#include ++#include ++ ++#include "rfc2553emu.h" ++#include "connect.h" ++#include "rsync-method.h" ++/*}}}*/ ++ ++RsyncMethod::RsyncConn *RsyncMethod::server = 0; ++RsyncMethod::ConnType RsyncMethod::connType = RsyncMethod::ConnTypeExec; ++bool RsyncMethod::Debug = false; ++unsigned int RsyncMethod::Timeout = 0; ++ ++/* Argv implementation */ ++Argv::Argv(int msize): max_size(msize), size(0) ++{ ++ args = new char*[max_size]; ++ memset(args,0, max_size * sizeof(char*)); ++} ++ ++Argv::~Argv() ++{ ++ for (int i=0; i= max_size && !resize() ) { ++ cerr << "Failed to resize" << endl; ++ return false; ++ } ++ int len = strlen(arg); ++ args[size] = new char[len+1]; ++ strncpy(args[size], arg, len+1); ++ ++size; ++ return true; ++} ++ ++bool Argv::resize() ++{ ++ static const int increment = 5; ++ char **new_args = new char *[max_size+increment]; ++ memcpy(new_args,args,size*sizeof(char*)); ++ memset(new_args+size,0, (max_size+increment-size) * sizeof(char*)); ++ args = new_args; ++ max_size += increment; ++ return true; ++} ++ ++Argv::operator string() ++{ ++ string res; ++ for (char **p=args; *p; p++) ++ res += *p, res += " "; ++ return res; ++} ++ ++/* RsyncConn implementation */ ++ ++/** Static buffer for RSYNC_PROXY variable */ ++char RsyncMethod::RsyncConn::proxy_value[1024]; ++ ++bool RsyncMethod::RsyncConn::initProxy() ++{ ++ if ( proxy.empty() ) ++ return true; ++ if ( proxy == "none" ) { ++ unsetenv("RSYNC_PROXY"); ++ return true; ++ } ++ bool res = true; ++ string var("RSYNC_PROXY="); ++ var += proxy; ++ strncpy(proxy_value, var.c_str(), sizeof(proxy_value) ); ++ if ( proxy_value[sizeof(proxy_value)-1]==0 ) { ++ if ( putenv(proxy_value)!=0 ) { ++ res = false; ++ _error->Error("Failed to set RSYNC_PROXY: %s", proxy_value); ++ } ++ } else { ++ res = false; ++ _error->Error("Failed to set RSYNC_PROXY: not enough space in buffer"); ++ } ++ return res; ++} ++ ++/* RsyncConnExec implementation */ ++ ++RsyncMethod::RsyncConnExec::RsyncConnExec(URI u, const string &_proxy, const string &prog) ++ : RsyncConn(u,_proxy), ChildPid(-1), ChildFd(-1) ++{ ++ program = prog.empty() ? RSYNC_PROGRAM : prog; ++} ++ ++RsyncMethod::RsyncConnExec::~RsyncConnExec() ++{ ++ if ( ChildPid>0 ) { ++ kill(ChildPid, SIGTERM); ++ waitpid(ChildPid, 0, 0); ++ ChildPid = -1; ++ } ++ if ( ChildFd>=0 ) ++ close(ChildFd); ++} ++ ++bool RsyncMethod::RsyncConnExec::WaitChild(pkgAcqMethod *Owner, FetchResult &FRes, const char *To) ++{ ++ static const int buflen = 1024; ++ static char buf[buflen+1]; ++ int saved = 0; ++ int status = 0, res = 0; ++ fd_set readfd; ++ struct timeval tv; ++ if ( RsyncMethod::Debug ) ++ cerr << "RSYNC: WaitChild: fd=" << ChildFd << endl; ++ ++ while (1) { ++ FD_ZERO(&readfd); ++ FD_SET(ChildFd,&readfd); ++ FD_SET(0,&readfd); ++ ++ tv.tv_sec = 1; ++ tv.tv_usec = 0; ++ res = select(ChildFd+1, &readfd, 0, 0, &tv); ++ ++ if (res>0) { ++ if ( FD_ISSET(ChildFd,&readfd) ) { ++ int len = read(ChildFd,buf+saved, buflen-saved); ++ if (len>0) { ++ // Split buffer into single-line strings ++ // and pass each string to ParseOutput. ++ // Strings, that are not terminated with '\n' will ++ // be stored in buffer for later completion. ++ buf[saved+len] = 0; ++ int start = 0; ++ for (int off=saved; off0 ) { ++ if ( RsyncMethod::Debug ) ++ cerr << "RSYNC: Saved " << saved << " byted in buffer:" ++ << endl << start << endl; ++ // Move saved data to the beginning of the buffer ++ // including trailing zero ++ memmove(buf,buf+start,saved+1); ++ } ++ } ++ } ++ } ++ res = waitpid(ChildPid, &status, WNOHANG); ++ if ((res>0 && WIFEXITED(status)) || res<0) { ++ ChildPid = -1; ++ if ( RsyncMethod::Debug ) ++ cerr << endl << "RSYNC: Closing ChildFd: " << ChildFd << endl; ++ close(ChildFd); ++ ChildFd = -1; ++ // Parse end of process output if it was not terminated with '\n' ++ if (saved>0) ++ ParseOutput(Owner,FRes,buf); ++ if (res < 0) { ++ if ( RsyncMethod::Debug ) ++ cerr << endl << "RSYNC: Unknown status of child process " << ChildFd << endl; ++ if (State == Done) ++ return true; ++ return false; ++ } ++ switch (WEXITSTATUS(status)) { ++ case 0: ++ return true; ++ break; ++ default: ++ if ( State != Failed ) { ++ State = Failed; ++ _error->Error("rsync process terminated with exit code %d", WEXITSTATUS(status)); ++ } ++ return false; ++ break; ++ } ++ } ++ } ++ return false; ++} ++ ++void RsyncMethod::RsyncConnExec::ParseOutput(pkgAcqMethod *Owner, FetchResult &FRes, const char *buf) ++{ ++ static const char * TMPFN = "Tmp-Filename: "; ++ static const char * SIZE = "Size: "; ++ static const char * START = "Start: "; ++ static const char * DONE = "Done: "; ++ static const char * FAILED= "Failed: "; ++ const char * ptr; ++ ++ //if ( RsyncMethod::Debug ) ++ // cerr << "ParseOutput: " << buf << endl; ++ ++ ptr = strstr(buf,TMPFN); ++ if (ptr) { ++ ptr += strlen(TMPFN); ++ const char *ptr2 = ptr; ++ while (*ptr2!=0 && !isspace(*ptr2)) ++ ++ptr2; ++ if (ptr!=ptr2) { ++ char *tmpfn = new char[ptr2-ptr+1]; ++ bzero(tmpfn, ptr2-ptr+1); ++ strncpy(tmpfn, ptr, ptr2-ptr); ++ if (RsyncMethod::Debug) ++ cerr << endl << "RSYNC: " << TMPFN << tmpfn << endl; ++ FRes.TmpFilename = string(tmpfn); ++ delete tmpfn; ++ } ++ } ++ ++ ptr = strstr(buf,SIZE); ++ if (ptr) { ++ ptr += strlen(SIZE); ++ unsigned long size = atol(ptr); ++ if (RsyncMethod::Debug) ++ cerr << "RSYNC: " << SIZE << size << endl; ++ FRes.Size = size; ++ } ++ ++ ptr = strstr(buf,START); ++ if (ptr) { ++ State = Fetching; ++ dynamic_cast(Owner)->Start(FRes); ++ } ++ ++ ptr = strstr(buf,DONE); ++ if (ptr) ++ State = Done; ++ ++ ptr = strstr(buf,FAILED); ++ if (ptr) { ++ State = Failed; ++ ptr += strlen(FAILED); ++ const char *ptr2 = ptr; ++ while (*ptr2!=0 && *ptr2!='\n') ++ ++ptr2; ++ if (ptr!=ptr2) { ++ char *tmp = new char[ptr2-ptr+1]; ++ bzero(tmp, ptr2-ptr+1); ++ strncpy(tmp, ptr, ptr2-ptr); ++ _error->Error("%s",tmp); ++ if (RsyncMethod::Debug) ++ cerr << endl << FAILED << tmp << endl; ++ delete tmp; ++ } else { ++ _error->Error("Child process failed (no description)"); ++ } ++ } ++} ++ ++bool RsyncMethod::RsyncConnExec::Get(pkgAcqMethod *Owner, FetchResult &FRes, const char *From, const char *To) ++{ ++ int p[2]; ++ int res = 0; ++ Argv argv(10); ++ ++ State = Starting; ++ if ( RsyncMethod::Debug ) ++ cerr << "RSYNC: Get: " << From << endl; ++ ++ argv.add(program.c_str()); ++ argv.add("-Lpt"); ++ argv.add("--partial"); ++ argv.add("--apt-support"); ++ if (RsyncMethod::Timeout>0) { ++ argv.add("--timeout"); ++ char S[10]; ++ sprintf(S,"%u",RsyncMethod::Timeout); ++ argv.add(S); ++ } ++ // Add optional user-defined options to command line ++ Configuration::Item const *Itm = _config->Tree("Acquire::rsync::options"); ++ if (Itm != 0 && Itm->Child != 0) { ++ Itm = Itm->Child; ++ while (Itm != 0) { ++ if (Itm->Value.empty() == false) ++ argv.add(Itm->Value.c_str()); ++ Itm = Itm->Next; ++ } ++ } ++ ++ char port[12]; ++ if (srv.Port!=0) ++ snprintf(port, sizeof(port), ":%u", srv.Port); ++ else port[0] = 0; ++ argv.add( "rsync://" + srv.Host + port + From); ++ argv.add(To); ++ ++ if ( pipe(p) ) { ++ _error->Error("RSYNC: RsyncConnExec: Can't create pipe"); ++ return false; ++ } ++ if ( RsyncMethod::Debug ) ++ cerr << "RSYNC: Created pipe [" << p[0] << ',' << p[1] << ']' << endl; ++ if ( RsyncMethod::Debug ) ++ cerr << "RSYNC: Starting: " << string(argv) << endl; ++ ++ switch ( ChildPid = fork() ) { ++ case -1: ++ _error->Error("RsyncConnExec: Can't fork"); ++ return false; ++ break; ++ case 0: ++ // Child process ++ initProxy(); ++ //if ( RsyncMethod::Debug ) ++ // cerr << endl << "RSYNC_PROXY(" << srv.Host << "): " << getenv("RSYNC_PROXY") << endl; ++ close(p[0]); ++ res = dup2(p[1], STDOUT_FILENO); ++ if (res==-1) { ++ cout << "Failed: " << "Can't dup2(p[1], STDOUT_FILENO)" << endl; ++ exit(100); ++ } ++ res = dup2(p[1], STDERR_FILENO); ++ if (res==-1) { ++ cout << "Failed: " << "Can't dup2(p[1], STDERR_FILENO)" << endl; ++ exit(100); ++ } ++ ++ close(p[1]); ++ execve(program.c_str(), argv, environ); ++ cout << "Failed: " << "Can not execute " << program << endl; ++ exit(100); ++ break; ++ default: ++ // Parent process ++ close(p[1]); ++ ChildFd = p[0]; ++ return WaitChild(Owner,FRes,To); ++ } ++ return false; ++} ++ ++// RsyncMethod::RsyncMethod - Constructor /*{{{*/ ++// --------------------------------------------------------------------- ++/* */ ++RsyncMethod::RsyncMethod() : pkgAcqMethod("1.0",SendConfig), ++ RsyncProg(RSYNC_PROGRAM) ++{ ++ signal(SIGTERM,SigTerm); ++ signal(SIGINT,SigTerm); ++} ++/*}}}*/ ++// RsyncMethod::SigTerm - Handle a fatal signal /*{{{*/ ++// --------------------------------------------------------------------- ++/* Delete existing server connection */ ++void RsyncMethod::SigTerm(int) ++{ ++ delete server; ++ _exit(100); ++} ++/*}}}*/ ++// RsyncMethod::Configuration - Handle a configuration message /*{{{*/ ++// --------------------------------------------------------------------- ++/* We stash the desired pipeline depth */ ++bool RsyncMethod::Configuration(string Message) ++{ ++ if (pkgAcqMethod::Configuration(Message) == false) ++ return false; ++ ++ Debug = _config->FindB("Debug::rsync",false); ++ Timeout = _config->FindI("Acquire::rsync::Timeout",0); ++ RsyncProg = _config->Find("Acquire::rsync::program",RSYNC_PROGRAM); ++ return true; ++} ++/*}}}*/ ++// RsyncMethod::Fetch - Fetch a file /*{{{*/ ++// --------------------------------------------------------------------- ++/* Fetch a single file, called by the base class.. */ ++bool RsyncMethod::Fetch(FetchItem *Itm) ++{ ++ URI Get = Itm->Uri; ++ const char *File = Get.Path.c_str(); ++ FetchResult Res; ++ Res.Filename = Itm->DestFile; ++ Res.IMSHit = false; ++ ++ struct stat st; ++ if ( stat(Itm->DestFile.c_str(), &st)==0 ) { ++ Res.ResumePoint = st.st_size; ++ } ++ ++ string proxy = _config->Find(string("Acquire::rsync::proxy::")+Get.Host); ++ if ( proxy.empty() ) ++ proxy = _config->Find("Acquire::rsync::proxy"); ++ ++ if (Debug) ++ cerr << endl << "RSYNC: Proxy(" << Get.Host << "): " << proxy << endl; ++ ++ // Don't compare now for the same server uri ++ delete server; ++ server = new RsyncConnExec(Get,proxy,RsyncProg); ++ ++ if ( server->Get(this,Res,File,Itm->DestFile.c_str()) ) { ++ if ( stat(Itm->DestFile.c_str(), &st)==0 ) { ++ Res.Size = st.st_size; ++ // Calculating MD5 ++ // ++ int fd = open(Itm->DestFile.c_str(), O_RDONLY); ++ if (fd>=0) { ++ MD5Summation md5; ++ md5.AddFD(fd,st.st_size); ++ Res.MD5Sum = md5.Result(); ++ close(fd); ++ } ++ } ++ URIDone(Res); ++ return true; ++ } ++ Fail(true); ++ return false; ++} ++/*}}}*/ ++ ++int main(int argc,const char *argv[]) ++{ ++ RsyncMethod Mth; ++ ++ return Mth.Run(); ++} +diff -urN -X apt.excludes apt-0.5.4cnc9.orig/methods/rsync-method.h apt-0.5.4cnc9.rsync/methods/rsync-method.h +--- apt-0.5.4cnc9.orig/methods/rsync-method.h 1970-01-01 03:00:00 +0300 ++++ apt-0.5.4cnc9.rsync/methods/rsync-method.h 2002-12-17 11:34:33 +0300 +@@ -0,0 +1,102 @@ ++// -*- mode: cpp; mode: fold -*- ++// Description /*{{{*/ ++// $Id$ ++/* ###################################################################### ++ ++RSYNC Aquire Method - This is the RSYNC aquire method for APT. ++ ++##################################################################### */ ++/*}}}*/ ++#ifndef APT_RSYNC_H ++#define APT_RSYNC_H ++ ++using namespace std; ++ ++static const char * RSYNC_PROGRAM = "/usr/bin/rsync"; ++ ++class Argv ++{ ++ int max_size; ++ int size; ++ char **args; ++ ++ public: ++ Argv(int msize); ++ ~Argv(); ++ ++ bool add(const char *arg); ++ bool add(const string &arg) { return add( arg.c_str()); } ++ bool resize(); ++ int getSize() { return size; } ++ operator char**() { return args; } ++ operator string(); ++}; ++ ++ ++class RsyncMethod : public pkgAcqMethod ++{ ++ protected: ++ enum ConnType {ConnTypeExec, ConnTypeProto}; ++ ++ class RsyncConn ++ { ++ public: ++ enum ConnState {Idle,Starting,Connecting,Fetching,Failed,Done}; ++ ++ protected: ++ URI srv; ++ const string proxy; ++ ConnState State; ++ ++ static char proxy_value[1024]; ++ bool initProxy(); ++ ++ public: ++ RsyncConn(URI u, const string &_proxy = ""): srv(u), proxy(_proxy) {} ++ virtual ~RsyncConn() {} ++ ++ virtual bool Get(pkgAcqMethod *Owner, FetchResult &FRes, const char *From, const char *To) = 0; ++ }; ++ ++ class RsyncConnExec: public RsyncConn ++ { ++ // pid of child process ++ pid_t ChildPid; ++ // output of child process (stdout&stderr) ++ int ChildFd; ++ // Program to execute ++ string program; ++ ++ protected: ++ bool WaitChild(pkgAcqMethod *Owner, FetchResult &FRes, const char *To); ++ void ParseOutput(pkgAcqMethod *Owner, FetchResult &FRes, const char *buf); ++ ++ public: ++ RsyncConnExec(URI u, const string &_proxy, const string &prog); ++ virtual ~RsyncConnExec(); ++ ++ virtual bool Get(pkgAcqMethod *Owner, FetchResult &FRes, const char *From, const char *To); ++ }; ++ ++ static RsyncConn *server; ++ static ConnType connType; ++ static bool Debug; ++ static unsigned int Timeout; ++ ++ string RsyncProg; ++ ++ static void SigTerm(int); ++ ++ protected: ++ virtual bool Fetch(FetchItem *Itm); ++ virtual bool Configuration(string Message); ++ ++ void Start(FetchResult &FRes) ++ { URIStart(FRes); } ++ ++ public: ++ ++ RsyncMethod(); ++}; ++ ++#endif diff --git a/apt-0.5.4cnc9-alt-specialchars.patch b/apt-0.5.4cnc9-alt-specialchars.patch new file mode 100644 index 0000000..db350cd --- /dev/null +++ b/apt-0.5.4cnc9-alt-specialchars.patch @@ -0,0 +1,37 @@ +2002-12-20 Anton V. Denisov + + * cmdline/apt-cdrom.cc (DoAdd): + Simple workaround for ParseQuoteWord(Buffer,URI) == false + if URI contains symbol '#'. + ParseQuoteWord() need to be tested. + +--- apt-0.5.4cnc9.orig/cmdline/apt-cdrom.cc 2002-12-14 14:35:00 +1200 ++++ apt-0.5.4cnc9/cmdline/apt-cdrom.cc 2002-12-20 00:17:51 +1200 +@@ -631,7 +631,7 @@ bool DoAdd(CommandLine &) + // Escape special characters + string::iterator J = Name.begin(); + for (; J != Name.end(); J++) +- if (*J == '"' || *J == ']' || *J == '[') ++ if (*J == '"' || *J == ']' || *J == '[' || *J == '#') + *J = '_'; + + cout << "Found label '" << Name << "'" << endl; +@@ -650,7 +650,8 @@ bool DoAdd(CommandLine &) + if (Name.empty() == false && + Name.find('"') == string::npos && + Name.find('[') == string::npos && +- Name.find(']') == string::npos) ++ Name.find(']') == string::npos && ++ Name.find('#') == string::npos) + break; + cout << "That is not a valid name, try again " << endl; + } +@@ -662,7 +663,7 @@ bool DoAdd(CommandLine &) + // Escape special characters + string::iterator J = Name.begin(); + for (; J != Name.end(); J++) +- if (*J == '"' || *J == ']' || *J == '[') ++ if (*J == '"' || *J == ']' || *J == '[' || *J == '#') + *J = '_'; + + Database.Set("CD::" + ID,Name); diff --git a/apt-0.5.5cnc1-alt-APT_DOMAIN.patch b/apt-0.5.5cnc1-alt-APT_DOMAIN.patch new file mode 100644 index 0000000..d5f1459 --- /dev/null +++ b/apt-0.5.5cnc1-alt-APT_DOMAIN.patch @@ -0,0 +1,12 @@ +--- apt-0.5.5cnc1/apt-pkg/init.cc.orig 2003-02-07 19:14:18 +0300 ++++ apt-0.5.5cnc1/apt-pkg/init.cc 2003-02-07 19:26:23 +0300 +@@ -98,7 +98,9 @@ + + if (Cnf.Exists("Dir::Locale")) + { ++#ifdef APT_DOMAIN + bindtextdomain(APT_DOMAIN,Cnf.FindDir("Dir::Locale").c_str()); ++#endif + bindtextdomain(textdomain(0),Cnf.FindDir("Dir::Locale").c_str()); + } + diff --git a/apt-0.5.5cnc1-alt-debsystem.patch b/apt-0.5.5cnc1-alt-debsystem.patch new file mode 100644 index 0000000..05edc71 --- /dev/null +++ b/apt-0.5.5cnc1-alt-debsystem.patch @@ -0,0 +1,11 @@ +--- apt-0.5.5cnc1/apt-pkg/deb/debsystem.cc.orig 2002-07-23 21:54:51 +0400 ++++ apt-0.5.5cnc1/apt-pkg/deb/debsystem.cc 2003-02-13 16:05:56 +0300 +@@ -185,6 +185,8 @@ + signed debSystem::Score(Configuration const &Cnf) + { + signed Score = 0; ++ if (Cnf.FindB("APT::Ignore-dpkg",true) == true) ++ return Score; + if (FileExists(Cnf.FindFile("Dir::State::status","/var/lib/dpkg/status")) == true) + Score += 10; + if (FileExists(Cnf.FindFile("Dir::Bin::dpkg","/usr/bin/dpkg")) == true) diff --git a/apt-0.5.5cnc1-alt-distro.patch b/apt-0.5.5cnc1-alt-distro.patch new file mode 100644 index 0000000..94448f9 --- /dev/null +++ b/apt-0.5.5cnc1-alt-distro.patch @@ -0,0 +1,33 @@ +--- apt-0.5.5cnc1/apt-pkg/rpm/rpmsystem.cc.orig 2002-11-25 21:25:28 +0300 ++++ apt-0.5.5cnc1/apt-pkg/rpm/rpmsystem.cc 2003-02-07 18:13:09 +0300 +@@ -125,7 +125,7 @@ + Cnf.CndSet("Dir::Etc::translateparts", "translate.list.d"); + Cnf.CndSet("Dir::State::prefetch", "prefetch"); + Cnf.CndSet("Dir::Locale","/usr/share/locale"); +- Cnf.CndSet("Acquire::DistroID","Conectiva"); // hee hee ++ Cnf.CndSet("Acquire::DistroID","ALT Linux"); // hee hee + Cnf.CndSet("Acquire::CDROM::Mount", "/mnt/cdrom"); + Cnf.CndSet("Acquire::CDROM::Copy-All", "true"); + +--- apt-0.5.5cnc1/cmdline/apt-cdrom.cc.orig 2003-01-29 18:11:14 +0300 ++++ apt-0.5.5cnc1/cmdline/apt-cdrom.cc 2003-02-07 18:11:58 +0300 +@@ -668,7 +668,7 @@ + Name.empty() == true) + { + // CNC:2002-07-11 +- cout << "Please provide a name for this Disc, such as 'Conectiva Disk 1'"; ++ cout << "Please provide a name for this Disc, such as 'ALT Linux Disk 1'"; + while (1) + { + Name = PromptLine(""); +--- apt-0.5.5cnc1/methods/ftp.cc.orig 2002-07-25 22:07:19 +0400 ++++ apt-0.5.5cnc1/methods/ftp.cc 2003-01-29 15:46:54 +0300 +@@ -185,7 +185,7 @@ bool FTPConn::Login() + + // Setup the variables needed for authentication + string User = "anonymous"; +- string Pass = "apt_get_ftp_2.1@debian.linux.user"; ++ string Pass = "apt_get_ftp_2.1@alt.linux.user"; + + // Fill in the user/pass + if (ServerName.User.empty() == false) diff --git a/apt-0.5.5cnc1-alt-methods_gpg_homedir.patch b/apt-0.5.5cnc1-alt-methods_gpg_homedir.patch new file mode 100644 index 0000000..5a8b1c4 --- /dev/null +++ b/apt-0.5.5cnc1-alt-methods_gpg_homedir.patch @@ -0,0 +1,33 @@ +--- apt-0.5.5cnc1/methods/gpg.cc.orig 2003-01-31 16:58:32 +0300 ++++ apt-0.5.5cnc1/methods/gpg.cc 2003-02-07 19:09:05 +0300 +@@ -195,7 +195,7 @@ char *getFileSigner(const char *file, co + else if (pid == 0) + { + string path = _config->Find("Dir::Bin::gpg", "/usr/bin/gpg"); +- string pubring = ""; ++ string homedir = ""; + const char *argv[16]; + int argc = 0; + +@@ -206,17 +206,16 @@ char *getFileSigner(const char *file, co + dup2(fd[1], STDERR_FILENO); + + unsetenv("LANG"); ++ unsetenv("LANGUAGE"); + unsetenv("LC_ALL"); + unsetenv("LC_MESSAGES"); ++ unsetenv("LC_CTYPE"); + + argv[argc++] = "gpg"; + argv[argc++] = "--batch"; + argv[argc++] = "--no-secmem-warning"; +- pubring = _config->Find("APT::GPG::Pubring"); +- if (pubring.empty() == false) +- { +- argv[argc++] = "--keyring"; argv[argc++] = pubring.c_str(); +- } ++ homedir = _config->Find("APT::GPG::Homedir", "/usr/lib/alt-gpgkeys"); ++ argv[argc++] = "--homedir"; argv[argc++] = homedir.c_str(); + argv[argc++] = "--status-fd"; argv[argc++] = "2"; + + if (outfile != NULL) diff --git a/apt-0.5.5cnc1-alt-pkgpriorities.patch b/apt-0.5.5cnc1-alt-pkgpriorities.patch new file mode 100644 index 0000000..df8d8c0 --- /dev/null +++ b/apt-0.5.5cnc1-alt-pkgpriorities.patch @@ -0,0 +1,11 @@ +--- apt-0.5.5cnc1/apt-pkg/rpm/rpmpackagedata.cc.orig 2003-01-29 16:52:32 +0300 ++++ apt-0.5.5cnc1/apt-pkg/rpm/rpmpackagedata.cc 2003-02-07 18:31:11 +0300 +@@ -16,7 +16,7 @@ + RPMPackageData::RPMPackageData() + { + // Populate priorities +- string FileName = _config->FindFile("Dir::Etc::rpmpriorities"); ++ string FileName = _config->FindFile("Dir::Etc") + "pkgpriorities"; + FileFd F(FileName, FileFd::ReadOnly); + if (_error->PendingError()) + { diff --git a/apt-0.5.5cnc1-mattdm-manbuild.patch b/apt-0.5.5cnc1-mattdm-manbuild.patch new file mode 100644 index 0000000..599b7db --- /dev/null +++ b/apt-0.5.5cnc1-mattdm-manbuild.patch @@ -0,0 +1,11 @@ +--- apt-0.5.5cnc1_rc2/buildlib/environment.mak.in.orig 2003-02-02 12:34:15.000000000 -0500 ++++ apt-0.5.5cnc1_rc2/buildlib/environment.mak.in 2003-02-02 12:35:17.000000000 -0500 +@@ -35,7 +35,7 @@ + # SGML for the man pages + NSGMLS = @NSGMLS@ + SGMLSPL = @SGMLSPL@ +-DOCBOOK2MAN := $(wildcard /usr/lib/perl5/sgmlspl-specs/docbook2man-spec.pl) ++DOCBOOK2MAN := $(wildcard /usr/share/sgml/docbook/utils-*/helpers/docbook2man-spec.pl) + + # Gettext settings + GMSGFMT = @GMSGFMT@ diff --git a/apt/doc/apt.8 b/apt.8 similarity index 72% rename from apt/doc/apt.8 rename to apt.8 index 151d2a2..f628460 100644 --- a/apt/doc/apt.8 +++ b/apt.8 @@ -1,6 +1,4 @@ .\" This manpage is copyright (C) 1998 Branden Robinson . -.\" -.\" Updated for Conectiva by Alfredo K. Kojima . .\" .\" This is free software; you may redistribute it and/or modify .\" it under the terms of the GNU General Public License as @@ -16,7 +14,7 @@ .\" License along with APT; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA .\" 02111-1307 USA -.TH apt 8 "25 Oct 2000" "Debian GNU/Linux" +.TH apt 8 "16 June 1998" "Debian GNU/Linux" .SH NAME apt \- Advanced Package Tool .SH SYNOPSIS @@ -33,23 +31,20 @@ None. .SH SEE ALSO .BR apt-cache (8), .BR apt-get (8), +.BR apt.conf (5), .BR sources.list (5) .SH DIAGNOSTICS apt returns zero on normal operation, decimal 100 on error. .SH BUGS This manpage isn't even started. .PP -See . If you wish to report a +See . If you wish to report a bug in .BR apt , please see -.I /usr/doc/debian/bug-reporting.txt +.I /usr/share/doc/debian/bug-reporting.txt or the .BR bug (1) -command. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. - +command. .SH AUTHOR -apt was written by the APT team -and updated for RPM based systems by -Conectiva S.A. +apt was written by the APT team . diff --git a/apt.conf b/apt.conf index 767039b..287880d 100644 --- a/apt.conf +++ b/apt.conf @@ -3,34 +3,50 @@ Dir Bin { Methods "/usr/lib/apt"; - } -} + }; +}; APT { Get { Show-Upgraded "true"; - } + }; GPG { - PubringPath "/usr/lib/rpm/gnupg"; - } + Pubring "/usr/lib/alt-gpgkeys/pubring.gpg"; + }; Architecture "i586"; -} +}; Debug { + Acquire::cdrom "false"; + Acquire::Ftp "false"; + Acquire::http "false"; + aptcdrom "false"; + NoLocking "false"; pkgRPMPM "false"; -} + pkgAcquire::Auth "false"; + pkgAcquire::Worker "false"; + pkgAcquire "false"; + pkgProblemResolver "false"; + pkgInitConfig "false"; + pkgOrderList "false"; + pkgPackageManager "false"; + pkgPolicy "false"; + identcdrom "false"; +}; Acquire::CDROM::Copy "true"; +Acquire::CDROM::mount "/mnt/cdrom"; RPM { - Options "-vv"; -} - - + Allow-Duplicated {"^(NVIDIA_)?(kernel|alsa)[0-9]*(-adv|-linus)?($|-up|-smp|-secure|-custom|-enterprise|-BOOT|-tape|-aureal)";}; + Hold {"^(kernel|alsa)[0-9]*-source";}; + Interactive "true"; + Order "true"; +}; diff --git a/apt.ru.po b/apt.ru.po new file mode 100644 index 0000000..9987b1d --- /dev/null +++ b/apt.ru.po @@ -0,0 +1,1717 @@ +# Russian translation for APT. +# Copyright (C) 2001-2003 Free Software Foundation, Inc. +# Alexander Bokovoy , 2001. +# Dmitry V. Levin , 2002-2003 +# Vyacheslav Dikonov , 2003 +# +msgid "" +msgstr "" +"Project-Id-Version: apt-0.3.19cnc52-alt5\n" +"POT-Creation-Date: 2003-02-12 12:32+0300\n" +"PO-Revision-Date: 2003-02-12 12:32+0300\n" +"Last-Translator: Vyacheslav Dikonov \n" +"Language-Team: ALT Linux Team \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=koi8-r\n" +"Content-Transfer-Encoding: 8 bit\n" + +#: cmdline/apt-cache.cc:133 +#, c-format +msgid "Package %s version %s has an unmet dep:\n" +msgstr "ðÁËÅÔ %s ×ÅÒÓÉÉ %s ÉÍÅÅÔ ÎÅÕÄÏ×ÌÅÔ×ÏÒÅÎÎÙÅ ÚÁ×ÉÓÉÍÏÓÔÉ:\n" + +#: cmdline/apt-cache.cc:173 cmdline/apt-cache.cc:541 cmdline/apt-cache.cc:687 +#: cmdline/apt-cache.cc:1064 cmdline/apt-cache.cc:1210 +#, c-format +msgid "Unable to locate package %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÐÁËÅÔ %s" + +#: cmdline/apt-cache.cc:230 +msgid "Total Package Names : " +msgstr "éͣΠÐÁËÅÔÏ×: " + +#: cmdline/apt-cache.cc:270 +msgid " Normal Packages: " +msgstr " îÏÒÍÁÌØÎÙÅ ÐÁËÅÔÙ: " + +#: cmdline/apt-cache.cc:271 +msgid " Pure Virtual Packages: " +msgstr " ãÅÌÉËÏÍ ×ÉÒÔÕÁÌØÎÙÅ ÐÁËÅÔÙ: " + +#: cmdline/apt-cache.cc:272 +msgid " Single Virtual Packages: " +msgstr " ïÄÉÎÏÞÎÙÅ ×ÉÒÔÕÁÌØÎÙÅ ÐÁËÅÔÙ: " + +#: cmdline/apt-cache.cc:273 +msgid " Mixed Virtual Packages: " +msgstr " óÍÅÛÁÎÎÙÅ ×ÉÒÔÕÁÌØÎÙÅ ÐÁËÅÔÙ: " + +#: cmdline/apt-cache.cc:274 +msgid " Missing: " +msgstr " ïÔÓÕÔÓÔ×ÕÀÔ: " + +#: cmdline/apt-cache.cc:276 +msgid "Total Distinct Versions: " +msgstr "òÁÚÌÉÞÎÙÈ ×ÅÒÓÉÊ: " + +#: cmdline/apt-cache.cc:278 +msgid "Total Dependencies: " +msgstr "÷ÓÅÇÏ ÚÁ×ÉÓÉÍÏÓÔÅÊ: " + +#: cmdline/apt-cache.cc:281 +msgid "Total Ver/File relations: " +msgstr "÷ÓÅÇÏ ÏÔÎÏÛÅÎÉÊ ÷ÅÒÓÉÑ/æÁÊÌ: " + +#: cmdline/apt-cache.cc:283 +msgid "Total Provides Mappings: " +msgstr "÷ÓÅÇÏ ÓÏÏÔ×ÅÔÓÔ×ÉÊ ÓÅÒ×ÉÓÏ×: " + +#: cmdline/apt-cache.cc:295 +msgid "Total Globbed Strings: " +msgstr "÷ÓÅÇÏ ÓÏ×ÐÁ×ÛÉÈ ÓÔÒÏË: " + +#: cmdline/apt-cache.cc:309 +msgid "Total Dependency Version space: " +msgstr "÷ÓÅÇÏ ÚÁ×ÉÓÉÍÏÓÔÅÊ: " + +#: cmdline/apt-cache.cc:314 +msgid "Total Slack space: " +msgstr "÷ÓÅÇÏ ÚÁÎÑÔÏ ÍÅÓÔÁ: " + +#: cmdline/apt-cache.cc:322 +msgid "Total Space Accounted for: " +msgstr "÷ÓÅÇÏ ÂÕÄÅÔ ÚÁÎÑÔÏ ÍÅÓÔÁ: " + +#: cmdline/apt-cache.cc:460 cmdline/apt-cache.cc:897 +#, c-format +msgid "Package file %s is out of sync." +msgstr "æÁÊÌ ÐÁËÅÔÁ %s ×ÙÛÅÌ ÉÚ ÐÏÄ ËÏÎÔÒÏÌÑ." + +#: cmdline/apt-cache.cc:940 +msgid "You must give exactly one pattern" +msgstr "îÅÏÂÈÏÄÉÍÏ ÕËÁÚÁÔØ ÔÏÌØËÏ ÏÄÉÎ ÏÂÒÁÚÅÃ" + +#: cmdline/apt-cache.cc:1164 +msgid "Package Files:" +msgstr "æÁÊÌÙ ÐÁËÅÔÏ×:" + +#: cmdline/apt-cache.cc:1171 cmdline/apt-cache.cc:1257 +msgid "Cache is out of sync, can't x-ref a package file" +msgstr "óÏÄÅÒÖÉÍÏÅ ËÜÛÁ ÕÓÔÁÒÅÌÏ, ÎÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÄÁÎÎÙÅ Ï ÐÁËÅÔÅ." + +#: cmdline/apt-cache.cc:1172 +#, c-format +msgid "%4i %s\n" +msgstr "%4i %s\n" + +#. Show any packages have explicit pins +#: cmdline/apt-cache.cc:1184 +msgid "Pinned Packages:" +msgstr "ðÒÅÄÐÏÞÉÔÁÅÍÙÅ ÐÁËÅÔÙ:" + +#: cmdline/apt-cache.cc:1196 cmdline/apt-cache.cc:1237 +msgid "(not found)" +msgstr "(ÎÅ ÎÁÊÄÅÎÏ)" + +#. Installed version +#: cmdline/apt-cache.cc:1217 +msgid " Installed: " +msgstr " õÓÔÁÎÏ×ÌÅÎ: " + +#: cmdline/apt-cache.cc:1219 cmdline/apt-cache.cc:1227 +msgid "(none)" +msgstr "(ÎÅÔ)" + +#. Candidate Version +#: cmdline/apt-cache.cc:1224 +msgid " Candidate: " +msgstr " ëÁÎÄÉÄÁÔ: " + +#: cmdline/apt-cache.cc:1234 +msgid " Package Pin: " +msgstr " ðÒÅÄÐÏÞÔÅÎÉÅ: " + +#. Show the priority tables +#: cmdline/apt-cache.cc:1243 +msgid " Version Table:" +msgstr " ôÁÂÌÉÃÁ ×ÅÒÓÉÊ:" + +#: cmdline/apt-cache.cc:1258 +#, c-format +msgid " %4i %s\n" +msgstr " %4i %s\n" + +#: cmdline/apt-cache.cc:1285 cmdline/apt-cdrom.cc:801 cmdline/apt-config.cc:70 +#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:544 +#: cmdline/apt-get.cc:2148 cmdline/apt-sortpkgs.cc:144 +#, c-format +msgid "%s %s for %s %s compiled on %s %s\n" +msgstr "%s %s ÄÌÑ %s %s ÓÏÂÒÁÎ %s %s\n" + +#: cmdline/apt-cache.cc:1289 +msgid "" +"Usage: apt-cache [options] command\n" +" apt-cache [options] add file1 [file1 ...]\n" +" apt-cache [options] showpkg pkg1 [pkg2 ...]\n" +" apt-cache [options] showsrc pkg1 [pkg2 ...]\n" +"\n" +"apt-cache is a low-level tool used to manipulate APT's binary\n" +"cache files, and query information from them\n" +"\n" +"Commands:\n" +" add - Add an package file to the source cache\n" +" gencaches - Build both the package and source cache\n" +" showpkg - Show some general information for a single package\n" +" showsrc - Show source records\n" +" stats - Show some basic statistics\n" +" dump - Show the entire file in a terse form\n" +" dumpavail - Print an available file to stdout\n" +" unmet - Show unmet dependencies\n" +" search - Search the package list for a regex pattern\n" +" show - Show a readable record for the package\n" +" depends - Show raw dependency information for a package\n" +" pkgnames - List the names of all packages\n" +" dotty - Generate package graphs for GraphVis\n" +" policy - Show policy settings\n" +"\n" +"Options:\n" +" -h This help text.\n" +" -p=? The package cache.\n" +" -s=? The source cache.\n" +" -q Disable progress indicator.\n" +" -i Show only important deps for the unmet command.\n" +" -c=? Read this configuration file\n" +" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" +"See the apt-cache(8) and apt.conf(5) manual pages for more information.\n" +msgstr "" +"éÓÐÏÌØÚÏ×ÁÎÉÅ: apt-cache [ÏÐÃÉÉ] ËÏÍÁÎÄÁ\n" +" apt-cache [ÏÐÃÉÉ] ÄÏÂÁ×ÉÔØ ÆÁÊÌ1 [ÆÁÊÌ2 ...]\n" +" apt-cache [ÏÐÃÉÉ] showpkg ÐÁËÅÔ1 [ÐÁËÅÔ2 ...]\n" +" apt-cache [ÏÐÃÉÉ] showsrc ÐÁËÅÔ1 [ÐÁËÅÔ2 ...]\n" +"\n" +"apt-cache - ÎÉÚËÏÕÒÏ×ÎÅ×ÏÅ ÓÒÅÄÓÔ×Ï ÄÌÑ ÒÁÂÏÔÙ Ó Ä×ÏÉÞÎÙÍÉ ÆÁÊÌÁÍÉ ËÜÛÁ APT\n" +"É ÐÏÌÕÞÅÎÉÑ ÉÚ ÎÉÈ ÉÎÆÏÒÍÁÃÉÉ.\n" +"\n" +"ëÏÍÁÎÄÙ:\n" +" add - äÏÂÁ×ÉÔØ ÐÁËÅÔ × ËÜÛ ÉÓÈÏÄÎÉËÏ×\n" +" gencaches - óÏÚÄÁÔØ ÆÁÊÌÙ ËÜÛÅÊ ÐÁËÅÔÏ× É ÉÓÈÏÄÎÉËÏ×\n" +" showpkg - ðÏËÁÚÁÔØ ÏÂÝÉÅ Ó×ÅÄÅÎÉÑ Ï ÐÁËÅÔÅ\n" +" showsrc - ðÏËÁÚÁÔØ ÏÂÝÉÅ Ó×ÅÄÅÎÉÑ Ï ÉÓÈÏÄÎÏÍ ÐÁËÅÔÅ\n" +" stats - ðÏËÁÚÁÔØ ÏÂÝÕÀ ÓÔÁÔÉÓÔÉËÕ\n" +" dump - ÷ÙÄÁÔØ ×Ó£ ÓÏÄÅÒÖÉÍÏÅ ËÜÛÁ × ÓÖÁÔÏÊ ÆÏÒÍÅ\n" +" dumpavail - ÷Ù×ÅÓÔÉ ÓÐÉÓÏË ÄÏÓÔÕÐÎÙÈ ÐÁËÅÔÏ× ÎÁ ÓÔÁÎÄÁÒÔÎÙÊ ×Ù×ÏÄ\n" +" unmet - ðÏÌÕÞÉÔØ ÓÐÉÓÏË ÎÅÕÄÏ×ÌÅÔ×ÏÒ£ÎÎÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ\n" +" search - éÓËÁÔØ × ÓÐÉÓËÅ ÐÁËÅÔÏ× Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÒÅÇÕÌÑÒÎÙÈ ×ÙÒÁÖÅÎÉÊ\n" +" show - ðÏËÁÚÁÔØ Ó×ÅÄÅÎÉÑ Ï ÐÁËÅÔÅ × ÕÄÏÂÎÏÊ ÄÌÑ ÞÔÅÎÉÑ ÆÏÒÍÅ\n" +" depends - ðÏËÁÚÁÔØ Ó×ÅÄÅÎÉÑ Ï ÚÁ×ÉÓÉÍÏÓÔÑÈ ÕËÁÚÁÎÎÏÇÏ ÐÁËÅÔÁ\n" +" pkgnames - ðÏÌÕÞÉÔØ ÐÏÌÎÙÊ ÓÐÉÓÏË ÉͣΠÐÁËÅÔÏ× Ó ×ÏÚÍÏÖÎÏÓÔØÀ ÚÁÄÁÎÉÑ " +"ÆÉÌØÔÒÏ×\n" +" dotty - ðÏÓÔÒÏÉÔØ ÇÒÁÆÉË ÚÁ×ÉÓÉÍÏÓÔÅÊ × ÆÏÒÍÁÔÅ GraphVis\n" +" policy - óÏÏÂÝÉÔØ Ó×ÅÄÅÎÉÑ Ï ÐÒÉÏÒÉÔÅÔÎÏÓÔÉ ÉÓÔÏÞÎÉËÏ× ÐÁËÅÔÏ×\n" +"\n" +"ïÐÃÉÉ:\n" +" -h ëÒÁÔËÁÑ ÓÐÒÁ×ËÁ\n" +" -p=? éÍÑ ÆÁÊÌÁ ÄÌÑ ÈÒÁÎÅÎÉÑ ËÜÛÁ ÐÁËÅÔÏ×\n" +" -s=? éÍÑ ÆÁÊÌÁ ÄÌÑ ÈÒÁÎÅÎÉÑ ËÜÛÁ ÉÓÈÏÄÎÉËÏ×\n" +" -q ïÔËÌÀÞÉÔØ ÉÎÄÉËÁÔÏÒ ÐÒÏÃÅÓÓÁ\n" +" -i ðÏËÁÚÙ×ÁÔØ ÔÏÌØËÏ ÓÁÍÙÅ ×ÁÖÎÙÅ ÚÁ×ÉÓÍÏÓÔÉ ÄÌÑ ËÏÍÁÎÄÙ unmet\n" +" -c=? éÓÐÏÌØÚÏ×ÁÔØ ÕËÁÚÁÎÎÙÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ\n" +" -o=? éÚÍÅÎÉÔØ ÌÀÂÏÊ ÉÚ ÐÁÒÁÍÅÔÒÏ× ÎÁÓÔÒÏÊËÉ (ÎÁÐÒÉÍÅÒ: -o dir::cache=/" +"tmp)\n" +"äÌÑ ÂÏÌÅÅ ÐÏÌÎÏÇÏ ÏÐÉÓÁÎÉÑ ÓÍ. ÓÔÒÁÎÉÃÙ ÒÕËÏ×ÏÄÓÔ×Á: apt-cache(8) É apt.conf" +"(5).\n" + +#: cmdline/apt-config.cc:41 +msgid "Arguments not in pairs" +msgstr "áÒÇÕÍÅÎÔÙ ÄÏÌÖÎÙ ÂÙÔØ ÐÁÒÎÙÍÉ" + +#: cmdline/apt-config.cc:76 +msgid "" +"Usage: apt-config [options] command\n" +"\n" +"apt-config is a simple tool to read the APT config file\n" +"\n" +"Commands:\n" +" shell - Shell mode\n" +" dump - Show the configuration\n" +"\n" +"Options:\n" +" -h This help text.\n" +" -c=? Read this configuration file\n" +" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" +msgstr "" +"éÓÐÏÌØÚÏ×ÁÎÉÅ: apt-config [ÏÐÃÉÉ] ËÏÍÁÎÄÁ\n" +"\n" +"apt-config - ÉÎÓÔÒÕÍÅÎÔ ÄÌÑ ÞÔÅÎÉÑ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÏÇÏ ÆÁÊÌÁ APT.\n" +"\n" +"ëÏÍÁÎÄÙ:\n" +" shell - òÅÖÉÍ ÏÂÏÌÏÞËÉ\n" +" dump - ðÏËÁÚÁÔØ ÎÁÓÔÒÏÊËÉ\n" +"\n" +"ïÐÃÉÉ:\n" +" -h ëÒÁÔËÁÑ ÓÐÒÁ×ËÁ\n" +" -c=? éÓÐÏÌØÚÏ×ÁÔØ ÕËÁÚÁÎÎÙÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ\n" +" -o=? éÚÍÅÎÉÔØ ÌÀÂÏÊ ÉÚ ÐÁÒÁÍÅÔÒÏ× ÎÁÓÔÒÏÊËÉ (ÎÁÐÒÉÍÅÒ: -o dir::cache=/" +"tmp)\n" + +#: cmdline/apt-extracttemplates.cc:98 +#, c-format +msgid "%s not a valid DEB package." +msgstr "%s ÎÅ Ñ×ÌÑÅÔÓÑ ÐÒÉÇÏÄÎÙÍ ÄÌÑ ÕÓÔÁÎÏ×ËÉ ÐÁËÅÔÏÍ." + +#: cmdline/apt-extracttemplates.cc:232 +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 arbitary configuration option, eg -o dir::cache=/tmp\n" +msgstr "" +"éÓÐÏÌØÚÏ×ÁÎÉÅ: apt-extracttemplates ÆÁÊÌ1 [ÆÁÊÌ2 ...]\n" +"\n" +"apt-extracttemplates - ÓÒÅÄÓÔ×Ï ÄÌÑ ÉÚ×ÌÅÞÅÎÉÑ ÛÁÂÌÏÎÏ× É ËÏÎÆÉÇÕÒÁÃÉÉ ÉÚ\n" +"ÉÚ ÐÁËÅÔÏ× ÄÌÑ debian.\n" +"\n" +"ïÐÃÉÉ:\n" +" -h ëÒÁÔËÁÑ ÓÐÒÁ×ËÁ\n" +" -t õËÁÚÁÔØ ËÁÔÁÌÏÇ ÄÌÑ ×ÒÅÍÅÎÎÙÈ ÆÁÊÌÏ×\n" +" -c=? éÓÐÏÌØÚÏ×ÁÔØ ÕËÁÚÁÎÎÙÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ\n" +" -o=? éÚÍÅÎÉÔØ ÌÀÂÏÊ ÉÚ ÐÁÒÁÍÅÔÒÏ× ÎÁÓÔÒÏÊËÉ (ÎÁÐÒÉÍÅÒ: -o dir::cache=/" +"tmp)\n" + +#: cmdline/apt-extracttemplates.cc:259 apt-pkg/pkgcachegen.cc:709 +#, c-format +msgid "Unable to write to %s" +msgstr "úÁÐÉÓØ × %s ÎÅ×ÏÚÍÏÖÎÁ" + +#: cmdline/apt-extracttemplates.cc:302 +msgid "Cannot get debconf version. Is debconf installed?" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ×ÅÒÓÉÀ debconf." + +#. This needs to be a capital +#: cmdline/apt-get.cc:116 +msgid "Y" +msgstr "Y" + +#: cmdline/apt-get.cc:193 +msgid "The following packages have unmet dependencies:" +msgstr "óÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ ÉÍÅÀÔ ÎÅÕÄÏ×ÌÅÔ×ÏÒÅÎÎÙÅ ÚÁ×ÉÓÉÍÏÓÔÉ:" + +#: cmdline/apt-get.cc:283 +#, c-format +msgid "but %s is installed" +msgstr "ÎÏ %s ÕÖÅ ÕÓÔÁÎÏ×ÌÅÎ" + +#: cmdline/apt-get.cc:285 +#, c-format +msgid "but %s is to be installed" +msgstr "ÎÏ %s ÂÕÄÅÔ ÕÓÔÁÎÏ×ÌÅÎ" + +#: cmdline/apt-get.cc:292 +msgid "but it is not installable" +msgstr "ÎÏ ÐÁËÅÔ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÕÓÔÁÎÏ×ÌÅÎ" + +#: cmdline/apt-get.cc:294 +msgid "but it is a virtual package" +msgstr "ÎÏ ÐÁËÅÔ Ñ×ÌÑÅÔÓÑ ×ÉÒÔÕÁÌØÎÙÍ ÐÁËÅÔÏÍ" + +#: cmdline/apt-get.cc:297 +msgid "but it is not installed" +msgstr "ÎÏ ÐÁËÅÔ ÎÅ ÕÓÔÁÎÏ×ÌÅÎ" + +#: cmdline/apt-get.cc:297 +msgid "but it is not going to be installed" +msgstr "ÎÏ ÐÁËÅÔ ÎÅ ÂÕÄÅÔ ÕÓÔÁÎÏ×ÌÅÎ" + +#: cmdline/apt-get.cc:302 +msgid " or" +msgstr " ÉÌÉ" + +#: cmdline/apt-get.cc:328 +msgid "The following NEW packages will be installed:" +msgstr "óÌÅÄÕÀÝÉÅ îï÷ùå ÐÁËÅÔÙ ÂÕÄÕÔ ÕÓÔÁÎÏ×ÌÅÎÙ:" + +#. CNC:2002-07-25 +#: cmdline/apt-get.cc:376 +msgid "The following packages will be REPLACED:" +msgstr "óÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ ÂÕÄÕÔ úáíåîåîù:" + +#: cmdline/apt-get.cc:377 +msgid "The following packages will be REMOVED:" +msgstr "óÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ ÂÕÄÕÔ õäáìåîù:" + +#: cmdline/apt-get.cc:397 +msgid "The following packages have been kept back" +msgstr "óÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ ÂÕÄÕÔ óïèòáîåîù:" + +#: cmdline/apt-get.cc:416 +msgid "The following packages will be upgraded" +msgstr "óÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ ÂÕÄÕÔ ïâîï÷ìåîù:" + +#: cmdline/apt-get.cc:435 +msgid "The following packages will be DOWNGRADED" +msgstr "óÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ ÂÕÄÕÔ úáíåîåîù âïìåå óôáòùíé ÷åòóéñíé:" + +#: cmdline/apt-get.cc:452 +msgid "The following held packages will be changed:" +msgstr "óÌÅÄÕÀÝÉÅ ÕÄÅÒÖÉ×ÁÅÍÙÅ ÐÁËÅÔÙ ÂÕÄÕÔ ÉÚÍÅÎÅÎÙ:" + +#: cmdline/apt-get.cc:503 +#, c-format +msgid "%s (due to %s) " +msgstr "%s (ÐÏ ÐÒÉÞÉÎÅ %s)" + +#: cmdline/apt-get.cc:510 +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" +"ïÂÙÞÎÏ ÜÔÏÇÏ ÄÅÌÁÔØ ÎÅ ÓÌÅÄÕÅÔ. ÷Ù ÄÏÌÖÎÙ ÔÏÞÎÏ ÐÏÎÉÍÁÔØ ×ÏÚÍÏÖÎÙÅ " +"ÐÏÓÌÅÄÓÔ×ÉÑ!" + +#: cmdline/apt-get.cc:564 +#, c-format +msgid "%lu packages upgraded, %lu newly installed, " +msgstr "%lu ÐÁËÅÔÏ× ÂÕÄÅÔ ÏÂÎÏ×ÌÅÎÏ É %lu ÎÏ×ÙÈ ÕÓÔÁÎÏ×ÌÅÎÏ, " + +#: cmdline/apt-get.cc:568 +#, c-format +msgid "%lu reinstalled, " +msgstr "%lu ÐÁËÅÔÏ× ÂÕÄÅÔ ÐÅÒÅÕÓÔÁÎÏ×ÌÅÎÏ, " + +#: cmdline/apt-get.cc:570 +#, c-format +msgid "%lu downgraded, " +msgstr "%lu ÐÁËÅÔÏ× ÂÕÄÅÔ ÚÁÍÅÎÅÎÏ ÎÁ ÓÔÁÒÙÅ ×ÅÒÓÉÉ, " + +#: cmdline/apt-get.cc:573 +#, c-format +msgid "%lu replaced, " +msgstr "%lu ÐÁËÅÔÏ× ÂÕÄÅÔ ÚÁÍÅÎÅÎÏ, " + +#. CNC:2002-07-29 +#: cmdline/apt-get.cc:576 +#, c-format +msgid "%lu removed and %lu not upgraded.\n" +msgstr "%lu ÐÁËÅÔÏ× ÂÕÄÅÔ ÕÄÁÌÅÎÏ É %lu ÎÅ ÂÕÄÅÔ ÏÂÎÏ×ÌÅÎÏ.\n" + +#: cmdline/apt-get.cc:580 +#, c-format +msgid "%lu packages not fully installed or removed.\n" +msgstr "%lu ÐÁËÅÔÏ× ÎÅ ÕÓÔÁÎÏ×ÌÅÎÏ ÉÌÉ ÎÅ ÕÄÁÌÅÎÏ ÃÅÌÉËÏÍ.\n" + +#: cmdline/apt-get.cc:640 +msgid "Correcting dependencies..." +msgstr "éÓÐÒÁ×ÌÅÎÉÅ ÚÁ×ÉÓÉÍÏÓÔÅÊ..." + +#: cmdline/apt-get.cc:643 +msgid " failed." +msgstr " ÎÅ×ÏÚÍÏÖÎÏ." + +#: cmdline/apt-get.cc:646 +msgid "Unable to correct dependencies" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÉÓÐÒÁ×ÉÔØ ÚÁ×ÉÓÉÍÏÓÔÉ" + +#: cmdline/apt-get.cc:649 +msgid "Unable to minimize the upgrade set" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÍÅÎØÛÉÔØ ËÏÌÉÞÅÓÔ×Ï ÏÂÎÏ×ÌÅÎÉÊ" + +#: cmdline/apt-get.cc:651 +msgid " Done" +msgstr " úÁ×ÅÒÛÅÎÏ" + +#: cmdline/apt-get.cc:655 +msgid "You might want to run `apt-get -f install' to correct these." +msgstr "" +"÷ÏÚÍÏÖÎÏ, ÷ÁÍ ÐÏÔÒÅÂÕÅÔÓÑ ÚÁÐÕÓÔÉÔØ `apt-get -f install' ÄÌÑ ÉÓÐÒÁ×ÌÅÎÉÑ." + +#: cmdline/apt-get.cc:658 +msgid "Unmet dependencies. Try using -f." +msgstr "îÅÕÄÏ×ÌÅÔ×ÏÒÅÎÎÙÅ ÚÁ×ÉÓÉÍÏÓÔÉ. ðÏÐÒÏÂÕÊÔÅ ÄÏÂÁ×ÉÔØ ÏÐÃÉÀ -f." + +#: cmdline/apt-get.cc:715 +msgid "Packages need to be removed but Remove is disabled." +msgstr "" +"îÅÏÂÈÏÄÉÍÏ ÕÄÁÌÉÔØ ÎÅËÏÔÏÒÙÅ ÐÁËÅÔÙ, ÎÏ ÜÔÏ ÂÙÌÏ ÚÁÐÒÅÝÅÎÏ ÏÐÃÉÅÊ No Remove " +"(ÎÅ ÕÄÁÌÑÔØ)." + +#: cmdline/apt-get.cc:741 cmdline/apt-get.cc:1678 cmdline/apt-get.cc:1711 +msgid "Unable to lock the download directory" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÒÁÚÂÌÏËÉÒÏ×ÁÔØ ×ÒÅÍÅÎÎÙÊ ËÁÔÁÌÏÇ ÄÌÑ ÓËÁÞÉ×ÁÅÍÙÈ ÆÁÊÌÏ×" + +#: cmdline/apt-get.cc:751 cmdline/apt-get.cc:1759 cmdline/apt-get.cc:2003 apt-pkg/cachefile.cc:71 +msgid "The list of sources could not be read." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÓÐÉÓÏË ÉÓÈÏÄÎÙÈ ÐÁËÅÔÏ×." + +#: cmdline/apt-get.cc:771 +#, c-format +msgid "Need to get %sB/%sB of archives.\n" +msgstr "îÅÏÂÈÏÄÉÍÏ ÐÏÌÕÞÉÔØ %sB/%sB ÁÒÈÉ×Ï×.\n" + +#: cmdline/apt-get.cc:774 +#, c-format +msgid "Need to get %sB of archives.\n" +msgstr "îÅÏÂÈÏÄÉÍÏ ÐÏÌÕÞÉÔØ %sB ÁÒÈÉ×Ï×.\n" + +#: cmdline/apt-get.cc:779 +#, c-format +msgid "After unpacking %sB of additional disk space will be used.\n" +msgstr "ðÏÓÌÅ ÒÁÓÐÁËÏ×ËÉ ÐÏÔÒÅÂÕÅÔÓÑ ÄÏÐÏÌÎÉÔÅÌØÎÏ %sB ÄÉÓËÏ×ÏÇÏ ÐÒÏÓÔÒÁÎÓÔ×Á.\n" + +#: cmdline/apt-get.cc:782 +#, c-format +msgid "After unpacking %sB disk space will be freed.\n" +msgstr "ðÏÓÌÅ ÒÁÓÐÁËÏ×ËÉ ÂÕÄÅÔ ÏÓ×ÏÂÏÖÄÅÎÏ %sB ÄÉÓËÏ×ÏÇÏ ÐÒÏÓÔÒÁÎÓÔ×Á.\n" + +#: cmdline/apt-get.cc:800 +#, c-format +msgid "Sorry, you don't have enough free space in %s to hold all packages." +msgstr "" +"éÚ×ÉÎÉÔÅ, ÎÏ × %s ÎÅÄÏÓÔÁÔÏÞÎÏ Ó×ÏÂÏÄÎÏÇÏ ÍÅÓÔÁ ÄÌÑ ÒÁÚÍÅÝÅÎÉÑ ×ÓÅÈ ÐÁËÅÔÏ×." + +#: cmdline/apt-get.cc:809 +msgid "There are problems and -y was used without --force-yes" +msgstr "ïÂÎÁÒÕÖÅÎÙ ÐÒÏÂÌÅÍÙ, Á ÏÐÃÉÑ -y ÂÙÌÁ ÉÓÐÏÌØÚÏ×ÁÎÁ ÂÅÚ --force-yes" + +#: cmdline/apt-get.cc:815 cmdline/apt-get.cc:835 +msgid "Trivial Only specified but this is not a trivial operation." +msgstr "" +"ïÐÃÉÑ Trivial Only ÂÙÌÁ ÕËÁÚÁÎÁ, ÎÏ ÓÏ×ÅÒÛÁÅÍÏÅ ÄÅÊÓÔ×ÉÅ ÎÅ ÏÔÎÏÓÉÔÓÑ Ë " +"ÒÁÚÒÑÄÕ ÔÒÉ×ÉÁÌØÎÙÈ." + +#: cmdline/apt-get.cc:817 +msgid "Yes, do as I say!" +msgstr "äÁ, ÐÒÏÄÏÌÖÉÔØ!" + +#: cmdline/apt-get.cc:819 +#, c-format +msgid "" +"You are about to do something potentially harmful\n" +"To continue type in the phrase '%s'\n" +" ?] " +msgstr "" +"÷Ù ÄÅÌÁÅÔÅ ÎÅÞÔÏ ÐÏÔÅÎÃÉÁÌØÎÏ ÏÐÁÓÎÏÅ!\n" +"÷×ÅÄÉÔÅ ÆÒÁÚÕ '%s' ÞÔÏÂÙ ÐÒÏÄÏÌÖÉÔØ.\n" +" " + +#: cmdline/apt-get.cc:825 cmdline/apt-get.cc:844 +msgid "Abort." +msgstr "ðÒÅÒ×ÁÎÏ." + +#: cmdline/apt-get.cc:840 +msgid "Do you want to continue? [Y/n] " +msgstr "ðÒÏÄÏÌÖÉÔØ? [Y/n] " + +#: cmdline/apt-get.cc:909 cmdline/apt-get.cc:1315 cmdline/apt-get.cc:1873 +#, c-format +msgid "Failed to fetch %s %s\n" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ %s %s\n" + +#: cmdline/apt-get.cc:927 +msgid "Some files failed to download" +msgstr "îÅËÏÔÏÒÙÅ ÆÁÊÌÙ ÎÅ ÕÄÁÌÏÓØ ÐÏÌÕÞÉÔØ" + +#: cmdline/apt-get.cc:928 cmdline/apt-get.cc:1882 +msgid "Download complete and in download only mode" +msgstr "óËÁÞËÁ ÐÁËÅÔÏ× ÚÁ×ÅÒÛÅÎÁ × ÒÅÖÉÍÅ 'ÔÏÌØËÏ ÓËÁÞÁÔØ'." + +#: cmdline/apt-get.cc:934 +msgid "" +"Unable to fetch some archives, maybe run apt-get update or try with --fix-" +"missing?" +msgstr "" +"ðÏÌÕÞÉÔØ ÎÅËÏÔÏÒÙÅ ÁÒÈÉ×Ù ÎÅ×ÏÚÍÏÖÎÏ. ðÏÐÒÏÂÕÊÔÅ ××ÅÓÔÉ ËÏÍÁÎÄÕ apt-get " +"updateÉÌÉ ÄÏÂÁ×ÉÔØ ÏÐÃÉÀ --fix-missing." + +#: cmdline/apt-get.cc:938 +msgid "--fix-missing and media swapping is not currently supported" +msgstr "" +"ïÐÃÉÑ --fix-missing É ÓÍÅÎÁ ÎÏÓÉÔÅÌÅÊ Ó ÁÒÈÉ×ÁÍÉ ÓÅÊÞÁÓ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÔÓÑ." + +#: cmdline/apt-get.cc:943 +msgid "Unable to correct missing packages." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÉÓÐÒÁ×ÉÔØ ÏÔÓÕÔÓÔ×ÕÀÝÉÅ ÐÁËÅÔÙ." + +#: cmdline/apt-get.cc:944 +msgid "Aborting Install." +msgstr "ðÒÅÒÙ×ÁÎÉÅ ÕÓÔÁÎÏ×ËÉ." + +#: cmdline/apt-get.cc:994 +#, c-format +msgid "Note, selecting %s instead of %s\n" +msgstr "ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ: ÐÁËÅÔ %s ×ÙÂÒÁÎ ×ÍÅÓÔÏ %s.\n" + +#: cmdline/apt-get.cc:1004 +#, c-format +msgid "Skipping %s, it is already installed and upgrade is not set.\n" +msgstr "" +"ðÁËÅÔ %s ÐÒÏÐÕÝÅÎ, ÔÁË ËÁË ÏÎ ÕÖÅ ÕÓÔÁÎÏ×ÌÅÎ, Á ËÏÍÁÎÄÙ ÏÂÎÏ×ÌÅÎÉÑ ÎÅ ÂÙÌÏ.\n" + +#: cmdline/apt-get.cc:1022 +#, c-format +msgid "Package %s is not installed, so not removed\n" +msgstr "ðÁËÅÔ %s ÎÅ ÕÓÔÁÎÏ×ÌÅÎ, É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÕÄÁÌ£Î.\n" + +#: cmdline/apt-get.cc:1033 +#, c-format +msgid "Package %s is a virtual package provided by:\n" +msgstr "÷ÉÒÔÕÁÌØÎÙÊ ÐÁËÅÔ %s ÐÒÅÄÏÓÔÁ×ÌÑÅÔÓÑ ÓÌÅÄÕÀÝÉÍÉ ÐÁËÅÔÁÍÉ:\n" + +#: cmdline/apt-get.cc:1045 +msgid " [Installed]" +msgstr " [õÓÔÁÎÏ×ÌÅÎÏ]" + +#: cmdline/apt-get.cc:1050 +msgid "You should explicitly select one to install." +msgstr "îÅÏÂÈÏÄÉÍÏ ÔÏÞÎÏ ÕËÁÚÁÔØ, ËÁËÏÊ ÉÚ ÐÁËÅÔÏ× ÄÏÌÖÅÎ ÂÙÔØ ÕÓÔÁÎÏ×ÌÅÎ." + +#: cmdline/apt-get.cc:1055 +#, c-format +msgid "" +"Package %s has no available version, but exists in the database.\n" +"This typically means that the package was mentioned in a dependency and\n" +"never uploaded, has been obsoleted or is not available with the contents\n" +"of sources.list\n" +msgstr "" +"ðÁËÅÔ %s ÐÒÉÓÕÔÓÔ×ÕÅÔ × ÂÁÚÅ ÄÁÎÎÙÈ, ÎÏ ÎÅ ÉÍÅÅÔ ×ÅÒÓÉÉ.\n" +"ëÁË ÐÒÁ×ÉÌÏ ÜÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÈÏÔÑ ÐÁËÅÔ ÕÐÏÍÉÎÁÅÔÓÑ × ÓÐÉÓËÅ ÚÁ×ÉÓÉÍÏÓÔÅÊ,\n" +"ÏÎ ÏÔÓÕÔÓÔ×ÕÅÔ × ÒÅÐÏÚÉÔÏÒÉÉ, ÂÙÌ ×ÙÔÅÓÎÅÎ, ÌÉÂÏ × sources.list ÎÅÔ ÁÄÒÅÓÁ\n" +"ÒÅÐÏÚÉÔÏÒÉÑ, ÓÏÄÅÒÖÁÝÅÇÏ ÐÁËÅÔ.\n" + +#: cmdline/apt-get.cc:1075 +msgid "However the following packages replace it:" +msgstr "ôÅÍ ÎÅ ÍÅÎÅÅ, ÓÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ ÚÁÍÅÎÑÀÔ ÅÇÏ:" + +#: cmdline/apt-get.cc:1078 +#, c-format +msgid "Package %s has no installation candidate" +msgstr "äÌÑ ÐÁËÅÔÁ %s ÎÅ ÎÁÊÄÅÎÏ ÐÏÄÈÏÄÑÝÅÇÏ ËÁÎÄÉÄÁÔÁ ÄÌÑ ÕÓÔÁÎÏ×ËÉ" + +#: cmdline/apt-get.cc:1098 +#, c-format +msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n" +msgstr "ðÅÒÅÕÓÔÁÎÏ×ÉÔØ %s ÎÅ×ÏÚÍÏÖÎÏ, ÐÏÔÏÍÕ ÞÔÏ ÜÔÏÔ ÐÁËÅÔ ÎÅÌØÚÑ ÓËÁÞÁÔØ.\n" + +#: cmdline/apt-get.cc:1106 +#, c-format +msgid "%s is already the newest version.\n" +msgstr "ðÏÓÌÅÄÎÑÑ ×ÅÒÓÉÑ %s ÕÖÅ ÕÓÔÁÎÏ×ÌÅÎÁ.\n" + +#: cmdline/apt-get.cc:1133 +#, c-format +msgid "Release '%s' for '%s' was not found" +msgstr "ïÐÉÓÁÎÉÅ '%s' ÄÌÑ '%s' ÎÅ ÎÁÊÄÅÎÏ." + +#: cmdline/apt-get.cc:1135 +#, c-format +msgid "Version '%s' for '%s' was not found" +msgstr "÷ÅÒÓÉÑ '%s' ÄÌÑ '%s' ÎÅ ÎÁÊÄÅÎÁ" + +#: cmdline/apt-get.cc:1141 +#, c-format +msgid "Selected version %s (%s) for %s\n" +msgstr "÷ÙÂÒÁÎÁ ×ÅÒÓÉÑ %s (%s) ÄÌÑ %s\n" + +#: cmdline/apt-get.cc:1251 +msgid "The update command takes no arguments" +msgstr "ëÏÍÁÎÄÁ `update' ÎÅ ÉÓÐÏÌØÚÕÅÔ ÁÒÇÕÍÅÎÔÙ" + +#: cmdline/apt-get.cc:1264 +msgid "Unable to lock the list directory" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁÂÌÏËÉÒÏ×ÁÔØ ËÁÔÁÌÏÇ" + +#: cmdline/apt-get.cc:1287 +msgid "" +"Release files for some repositories could not be retrieved or authenticated. " +"Such repositories are being ignored." +msgstr "" +"îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÉÌÉ ÐÒÏ×ÅÒÉÔØ ÆÁÊÌÙ ÏÐÉÓÁÎÉÑ ÎÅËÏÔÏÒÙÈ ÒÅÐÏÚÉÔÏÒÉÅ×. üÔÉ " +"ÒÅÐÏÚÉÔÏÒÉÉ ÂÕÄÕÔ ÉÇÎÏÒÉÒÏ×ÁÔØÓÑ." + +#: cmdline/apt-get.cc:1334 +msgid "" +"Some index files failed to download, they have been ignored, or old ones " +"used instead." +msgstr "" +"îÅËÏÔÏÒÙÅ ÉÎÄÅËÓÎÙÅ ÆÁÊÌÙ ÎÅ ÕÄÁÌÏÓØ ÓËÁÞÁÔØ, ÏÎÉ ÌÉÂÏ ÂÙÌÉ ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÙ, " +"ÌÉÂÏ ×ÍÅÓÔÏ ÎÉÈ ÂÙÌÉ ÉÓÐÏÌØÚÏ×ÁÎÙ ÓÔÁÒÙÅ ×ÅÒÓÉÉ." + +#: cmdline/apt-get.cc:1353 +msgid "Internal Error, AllUpgrade broke stuff" +msgstr "÷ÎÕÔÒÅÎÎÑÑ ÏÛÉÂËÁ, ÒÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ AllUpgrade ×ÓÅ ÉÓÐÏÒÔÉÌ" + +#: cmdline/apt-get.cc:1443 cmdline/apt-get.cc:1479 +#, c-format +msgid "Couldn't find package %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÐÁËÅÔ %s" + +#: cmdline/apt-get.cc:1456 +#, c-format +msgid "Regex compilation error - %s" +msgstr "ïÛÉÂËÁ ËÏÍÐÉÌÑÃÉÉ ÒÅÇÕÌÑÒÎÏÇÏ ×ÙÒÁÖÅÎÉÑ - %s" + +#: cmdline/apt-get.cc:1466 +#, c-format +msgid "Note, selecting %s for regex '%s'\n" +msgstr "ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ: %s ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÒÅÇÕÌÑÒÎÏÍÕ ×ÙÒÁÖÅÎÉÀ '%s'\n" + +#: cmdline/apt-get.cc:1500 +msgid "You might want to run `apt-get -f install' to correct these:" +msgstr "" +"÷ÏÚÍÏÖÎÏ, ÷ÁÍ ÐÏÔÒÅÂÕÅÔÓÑ ÚÁÐÕÓÔÉÔØ `apt-get -f install' ÄÌÑ ÉÓÐÒÁ×ÌÅÎÉÑ:" + +#: cmdline/apt-get.cc:1503 +msgid "" +"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " +"solution)." +msgstr "" +"îÅËÏÔÏÒÙÅ ÚÁ×ÉÓÉÍÏÓÔÉ ÎÅ ÂÙÌÉ ÎÁÊÄÅÎÙ. ðÏÐÒÏÂÕÊÔÅ `apt-get -f install' ÂÅÚ " +"ÕËÁÚÁÎÉÑ ÐÁËÅÔÏ× ÉÌÉ ÕËÁÖÉÔÅ ÐÁËÅÔ-ÒÅÛÅÎÉÅ." + +#: cmdline/apt-get.cc:1515 +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" +"distribution that some required packages have not yet been created\n" +"or been moved out of Incoming." +msgstr "" +"îÅËÏÔÏÒÙÅ ÐÁËÅÔÙ ÕÓÔÁÎÏ×ÉÔØ ÎÅ×ÏÚÍÏÖÎÏ. üÔÏ ÍÏÖÅÔ ÏÚÎÁÞÁÔØ, ÞÔÏ ÷Ù\n" +"ÐÏÔÒÅÂÏ×ÁÌÉ ÎÅ×ÏÚÍÏÖÎÏÇÏ, ÌÉÂÏ ÐÏÌØÚÕÅÔÅÓØ ÎÅÓÔÁÂÉÌØÎÙÍ ÒÅÐÏÚÉÔÏÒÉÅÍ.\n" +"þÁÓÔØ ÎÅÏÂÈÏÄÉÍÙÈ ÐÁËÅÔÏ× ÌÉÂÏ ÅÝ£ ÎÅ ÓÏÚÄÁÎÁ, ÌÉÂÏ ÂÙÌÁ ÕÄÁÌÅÎÁ\n" +"ÉÚ ËÁÔÁÌÏÇÁ '÷ÈÏÄÑÝÉÅ'." + +#: cmdline/apt-get.cc:1523 +msgid "" +"Since you only requested a single operation it is extremely likely that\n" +"the package is simply not installable and a bug report against\n" +"that package should be filed." +msgstr "" +"ôÁË ËÁË ÄÌÑ ×ÙÐÏÌÎÅÉÑ ÷ÁÛÅÇÏ ÚÁÐÒÏÓÁ ÄÏÓÔÁÔÏÞÎÏ ÏÄÎÏÊ ÏÐÅÒÁÃÉÉ, ÔÏ\n" +"ÓËÏÒÅÅ ×ÓÅÇÏ ÜÔÏÔ ÐÁËÅÔ ÐÒÏÓÔÏ ÎÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ. óÏÏÂÝÉÔÅ, ÐÏÖÁÌÕÊÓÔÁ,\n" +"Ï ÜÔÏÍ ËÁË Ï ÎÁÊÄÅÎÎÏÊ ÏÛÉÂËÅ × ÐÁËÅÔÅ." + +#: cmdline/apt-get.cc:1528 +msgid "The following information may help to resolve the situation:" +msgstr "üÔÉ Ó×ÅÄÅÎÉÑ ÍÏÇÕÔ ÐÏÍÏÞØ ÎÁÊÔÉ ×ÙÈÏÄ ÉÚ ÓÉÔÕÁÃÉÉ:" + +#: cmdline/apt-get.cc:1531 +msgid "Broken packages" +msgstr "éÚ×ÉÎÉÔÅ, `ÂÉÔÙÅ' ÐÁËÅÔÙ" + +#: cmdline/apt-get.cc:1554 +msgid "The following extra packages will be installed:" +msgstr "óÌÅÄÕÀÝÉÅ ÄÏÐÏÌÎÉÔÅÌØÎÙÅ ÐÁËÅÔÙ ÂÕÄÕÔ ÕÓÔÁÎÏ×ÌÅÎÙ:" + +#: cmdline/apt-get.cc:1573 +msgid "Calculating Upgrade... " +msgstr "ðÏÄÓÞÅÔ ÏÂÎÏ×ÌÅÎÉÊ... " + +#: cmdline/apt-get.cc:1576 +msgid "Failed" +msgstr "ïÛÉÂËÁ" + +#: cmdline/apt-get.cc:1581 +msgid "Done" +msgstr "úÁ×ÅÒÛÅÎÏ" + +#: cmdline/apt-get.cc:1754 +msgid "Must specify at least one package to fetch source for" +msgstr "äÌÑ ÓËÁÞÉ×ÁÎÉÑ ÉÓÈÏÄÎÉËÁ ÎÅÏÂÈÏÄÉÍÏ ÕËÁÚÁÔØ ÈÏÔÑ ÂÙ ÏÄÉÎ ÐÁËÅÔ." + +#: cmdline/apt-get.cc:1781 cmdline/apt-get.cc:2021 +#, c-format +msgid "Unable to find a source package for %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÉÓÈÏÄÎÙÊ ÐÁËÅÔ ÄÌÑ %s" + +#: cmdline/apt-get.cc:1833 +#, c-format +msgid "Sorry, you don't have enough free space in %s" +msgstr "éÚ×ÉÎÉÔÅ, ÎÅÄÏÓÔÁÔÏÞÎÏ Ó×ÏÂÏÄÎÏÇÏ ÍÅÓÔÁ × %s" + +#: cmdline/apt-get.cc:1838 +#, c-format +msgid "Need to get %sB/%sB of source archives.\n" +msgstr "îÅÏÂÈÏÄÉÍÏ %sB/%sB ÐÏÌÕÞÉÔØ ÉÓÈÏÄÎÙÈ ÁÒÈÉ×Ï×.\n" + +#: cmdline/apt-get.cc:1841 +#, c-format +msgid "Need to get %sB of source archives.\n" +msgstr "îÅÏÂÈÏÄÉÍÏ ÐÏÌÕÞÉÔØ %sB ÉÓÈÏÄÎÙÈ ÁÒÈÉ×Ï×.\n" + +#: cmdline/apt-get.cc:1847 +#, c-format +msgid "Fetch Source %s\n" +msgstr "ðÏÌÕÞÅÎÉÅ ÉÓÈÏÄÎÉËÁ ÐÁËÅÔÁ %s\n" + +#: cmdline/apt-get.cc:1878 +msgid "Failed to fetch some archives." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓËÁÞÁÔØ ÎÅËÏÔÏÒÙÅ ÁÒÈÉ×Ù." + +#: cmdline/apt-get.cc:1911 cmdline/apt-get.cc:1962 +#, c-format +msgid "Build command '%s' failed.\n" +msgstr "ëÏÍÁÎÄÁ ÓÂÏÒËÉ ÐÁËÅÔÁ '%s' ×ÙÚ×ÁÌÁ ÏÛÉÂËÕ.\n" + +#: cmdline/apt-get.cc:1923 cmdline/apt-get.cc:1945 +#, c-format +msgid "Unpack command '%s' failed.\n" +msgstr "ëÏÍÁÎÄÁ ÒÁÓÐÁËÏ×ËÉ '%s' ×ÙÚ×ÁÌÁ ÏÛÉÂËÕ.\n" + +#: cmdline/apt-get.cc:1933 +#, c-format +msgid "Skipping unpack of already unpacked source in %s\n" +msgstr "ðÒÏÐÕÓË ÒÁÓÐÁËÏ×ËÉ ÕÖÅ ÒÁÓÐÁËÏ×ÁÎÎÙÈ ÉÓÈÏÄÎÉËÏ× ÐÁËÅÔÁ × %s\n" + +#: cmdline/apt-get.cc:1982 +msgid "Child process failed" +msgstr "÷ÓÐÏÍÏÇÁÔÅÌØÎÙÊ ÐÒÏÃÅÓÓ ÚÁ×ÅÒÛÉÌÓÑ Ó ÏÛÉÂËÏÊ" + +#: cmdline/apt-get.cc:1998 +msgid "Must specify at least one package to check builddeps for" +msgstr "õËÁÖÉÔÅ ÈÏÔÑ ÂÙ ÏÄÉÎ ÐÁËÅÔ ÄÌÑ ÐÒÏ×ÅÒËÉ ÅÇÏ ÓÂÏÒÏÞÎÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ." + +#: cmdline/apt-get.cc:2026 +#, c-format +msgid "Unable to get build-dependency information for %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÓÂÏÒÏÞÎÙÅ ÚÁ×ÉÓÉÍÏÓÔÉ ÄÌÑ %s." + +#: cmdline/apt-get.cc:2046 +#, c-format +msgid "%s has no build depends.\n" +msgstr "%s ÎÅ ÉÍÅÅÔ ÓÂÏÒÏÞÎÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ.\n" + +#: cmdline/apt-get.cc:2064 +#, c-format +msgid "" +"%s dependency on %s cannot be satisfied because the package %s cannot be " +"found" +msgstr "" +"îÅ×ÏÚÍÏÖÎÏ ÕÄÏ×ÌÅÔ×ÏÒÉÔØ ÚÁ×ÉÓÉÍÏÓÔØ %s ÏÔ %s, ÐÏÔÏÍÕ ÞÔÏ ÏÔÓÕÔÓÔ×ÕÅÔ ÐÁËÅÔ %" +"s." + +#: cmdline/apt-get.cc:2116 +msgid "" +"Some broken packages were found while trying to process build-dependencies.\n" +"You might want to run `apt-get -f install' to correct these." +msgstr "" +"ðÒÉ ÏÂÒÁÂÏÔËÅ ÓÂÏÒÏÞÎÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ ÏÂÎÁÒÕÖÅÎÙ ÐÏ×ÒÅÖÄ£ÎÎÙÅ ÐÁËÅÔÙ." +"÷ÏÚÍÏÖÎÏ, ÐÏÔÒÅÂÕÅÔÓÑ ÚÁÐÕÓÔÉÔØ `apt-get -f install' ÄÌÑ ÉÓÐÒÁ×ÌÅÎÉÑ." + +#: cmdline/apt-get.cc:2121 +msgid "Failed to process build dependencies" +msgstr "ïÛÉÂËÁ ÏÂÒÁÂÏÔËÉ ÓÂÏÒÏÞÎÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ" + +#: cmdline/apt-get.cc:2153 +msgid "Supported Modules:" +msgstr "ðÏÄÄÅÒÖÉ×ÁÅÍÙÅ ÍÏÄÕÌÉ:" + +#. CNC:2002-08-01 +#. " dselect-upgrade - Follow dselect selections\n" +#. CNC:2002-08-02 +#: cmdline/apt-get.cc:2194 +msgid "" +"Usage: apt-get [options] command\n" +" apt-get [options] install|remove pkg1 [pkg2 ...]\n" +" apt-get [options] source pkg1 [pkg2 ...]\n" +"\n" +"apt-get is a simple command line interface for downloading and\n" +"installing packages. The most frequently used commands are update\n" +"and install.\n" +"\n" +"Commands:\n" +" update - Retrieve new lists of packages\n" +" upgrade - Perform an upgrade\n" +" install - Install new packages (pkg is libc6 not libc6.deb)\n" +" remove - Remove packages\n" +" source - Download source archives\n" +" build-dep - Configure build-dependencies for source packages\n" +" dist-upgrade - Distribution upgrade, see apt-get(8)\n" +" clean - Erase downloaded archive files\n" +" autoclean - Erase old downloaded archive files\n" +" check - Verify that there are no broken dependencies\n" +"\n" +"Options:\n" +" -h This help text.\n" +" -q Loggable output - no progress indicator\n" +" -qq No output except for errors\n" +" -d Download only - do NOT install or unpack archives\n" +" -s No-act. Perform ordering simulation\n" +" -y Assume Yes to all queries and do not prompt\n" +" -f Attempt to continue if the integrity check fails\n" +" -m Attempt to continue if archives are unlocatable\n" +" -u Show a list of upgraded packages as well\n" +" -b Build the source package after fetching it\n" +" -D When removing packages, remove dependencies as possible\n" +" -c=? Read this configuration file\n" +" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" +"See the apt-get(8), sources.list(5) and apt.conf(5) manual\n" +"pages for more information and options.\n" +" This APT has Super Cow Powers.\n" +msgstr "" +"éÓÐÏÌØÚÏ×ÁÎÉÅ: apt-get [ÏÐÃÉÉ] ËÏÍÁÎÄÁ\n" +" apt-get [ÏÐÃÉÉ] install|remove ÐÁËÅÔ1 [ÐÁËÅÔ2 ...]\n" +" apt-get [ÏÐÃÉÉ] ÉÓÈÏÄÎÙÊ ÐÁËÅÔ1 [ÐÁËÅÔ2 ...]\n" +"\n" +"apt-get ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ÐÒÏÓÔÏÊ ËÏÍÁÎÄÎÙÊ ÉÎÔÅÒÆÅÊÓ ÄÌÑ ÐÏÌÕÞÅÎÉÑ É\n" +"ÕÓÔÁÎÏ×ËÉ ÐÁËÅÔÏ×. þÁÝÅ ÄÒÕÇÉÈ ÉÓÐÏÌØÚÕÀÔÓÑ ËÏÍÁÎÄÙ update (ÏÂÎÏ×ÉÔØ)\n" +"É install (ÕÓÔÁÎÏ×ÉÔØ).\n" +"\n" +"ëÏÍÁÎÄÙ:\n" +" update - ðÏÌÕÞÉÔØ ÏÂÎÏ×Ì£ÎÎÙÅ ÓÐÉÓËÉ ÐÁËÅÔÏ×\n" +" upgrade - ðÒÏÉÚ×ÅÓÔÉ ÏÂÎÏ×ÌÅÎÉÅ\n" +" install - õÓÔÁÎÏ×ÉÔØ ÎÏ×ÙÅ ÐÁËÅÔÙ\n" +" remove - õÄÁÌÉÔØ ÐÁËÅÔÙ\n" +" source - óËÁÞÁÔØ ÁÒÈÉ×Ù ÉÓÈÏÄÎÉËÏ×\n" +" build-dep - õÓÔÁÎÏ×ÉÔØ ×Ó£ ÎÅÏÂÈÏÄÉÍÏÅ ÄÌÑ ÓÂÏÒËÉ ÉÓÈÏÄÎÙÈ ÐÁËÅÔÏ×\n" +" dist-upgrade - ïÂÎÏ×ÌÅÎÉÅ ÓÉÓÔÅÍÙ × ÃÅÌÏÍ, ÓÍ. apt-get(8)\n" +" clean - õÄÁÌÉÔØ ÓËÁÞÁÎÎÙÅ ÒÁÎÅÅ ÁÒÈÉ×ÎÙÅ ÆÁÊÌÙ\n" +" autoclean - õÄÁÌÉÔØ ÄÁ×ÎÏ ÓËÁÞÁÎÎÙÅ ÁÒÈÉ×ÎÙÅ ÆÁÊÌÙ\n" +" check - õÄÏÓÔÏ×ÅÒÉÔØÓÑ × ÏÔÓÕÔÓÔ×ÉÉ ÎÅÕÄÏ×ÌÅÔ×ÏÒ£ÎÎÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ\n" +"\n" +"ïÐÃÉÉ:\n" +" -h ëÒÁÔËÁÑ ÓÐÒÁ×ËÁ\n" +" -q óËÒÙÔØ ÉÎÄÉËÁÔÏÒ ÐÒÏÃÅÓÓÁ\n" +" -qq îÅ ÐÏËÁÚÙ×ÁÔØ ÎÉÞÅÇÏ ËÒÏÍÅ ÓÏÏÂÝÅÎÉÊ Ï ÏÛÉÂËÁÈ\n" +" -d ðÏÌÕÞÉÔØ ÐÁËÅÔÙ É ×ÙÊÔÉ âåú ÉÈ ÕÓÔÁÎÏ×ËÉ ÉÌÉ ÒÁÓÐÁËÏ×ËÉ\n" +" -s óÉÍÕÌÉÒÏ×ÁÔØ ÕÐÏÒÑÄÏÞÅÎÉÅ ×ÍÅÓÔÏ ÒÅÁÌØÎÏÇÏ ÉÓÐÏÌÎÅÎÉÑ\n" +" -y á×ÔÏÍÁÔÉÞÅÓËÉ ÏÔ×ÅÞÁÔØ 'äá' ÎÁ ×ÓÅ ×ÏÐÒÏÓÙ\n" +" -f ðÙÔÁÔØÓÑ ÉÓÐÒÁ×ÉÔØ ÐÏÌÏÖÅÎÉÅ ÅÓÌÉ ÎÁÊÄÅÎÙ ÎÅÕÄÏ×ÌÅÔ×ÏÒ£ÎÎÙÅ " +"ÚÁ×ÉÓÉÍÏÓÔÉ\n" +" -m ðÙÔÁÔØÓÑ ÐÒÏÄÏÌÖÉÔØ ÅÓÌÉ ÞÁÓÔØ ÁÒÈÉ×Ï× ÎÅÄÏÓÔÕÐÎÁ\n" +" -u ðÏËÁÚÁÔØ ÓÐÉÓÏË ÏÂÎÏ×ÌÑÅÍÙÈ ÐÁËÅÔÏ×\n" +" -b óÏÂÒÁÔØ ÐÁËÅÔ ÐÏÓÌÅ ÐÏÌÕÞÅÎÉÑ ÅÇÏ ÉÓÈÏÄÎÉËÁ\n" +" -D ðÒÉ ÕÄÁÌÅÎÉÉ ÐÁËÅÔÁ ÓÔÒÅÍÉÔØÓÑ ÕÄÁÌÉÔØ ËÏÍÐÏÎÅÎÔÙ, ÏÔ ËÏÔÏÒÙÈ ÏÎ " +"ÚÁ×ÉÓÉÔ\n" +" -c=? éÓÐÏÌØÚÏ×ÁÔØ ÕËÁÚÁÎÎÙÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ\n" +" -o=? éÚÍÅÎÉÔØ ÌÀÂÏÊ ÉÚ ÐÁÒÁÍÅÔÒÏ× ÎÁÓÔÒÏÊËÉ (ÎÁÐÒÉÍÅÒ: -o dir::cache=/" +"tmp)\n" +"âÏÌÅÅ ÐÏÌÎÏÅ ÏÐÉÓÁÎÉÅ ÄÏÓÔÕÐÎÏ ÎÁ ÓÔÒÁÎÉÃÁÈ ÒÕËÏ×ÏÄÓÔ×Á man:\n" +"apt-get(8), sources.list(5) É apt.conf(5).\n" +"\n" + +#: cmdline/acqprogress.cc:55 +msgid "Hit " +msgstr "îÁÊÄÅÎÏ " + +#: cmdline/acqprogress.cc:79 +msgid "Get:" +msgstr "ðÏÌÕÞÅÎÏ: " + +#: cmdline/acqprogress.cc:110 +msgid "Ign " +msgstr "ðÒÏÐÕÝÅÎÏ " + +#: cmdline/acqprogress.cc:114 +msgid "Err " +msgstr "ïÛÉÂËÁ " + +#: cmdline/acqprogress.cc:135 +#, c-format +msgid "Fetched %sB in %s (%sB/s)\n" +msgstr "ðÏÌÕÞÅÎÏ %sB ÚÁ %s (%sB/s).\n" + +#: cmdline/acqprogress.cc:225 +msgid " [Working]" +msgstr " [ðÏÄÏÖÄÉÔÅ]" + +#: cmdline/acqprogress.cc:271 +#, c-format +msgid "" +"Media Change: Please insert the disc labeled '%s' in the drive '%s' and " +"press enter\n" +msgstr "" +"óÍÅÎÁ ÄÉÓËÁ: ÷ÓÔÁ×ØÔÅ, ÐÏÖÁÌÕÊÓÔÁ, ÄÉÓË Ó ÍÅÔËÏÊ '%s' × ÕÓÔÒÏÊÓÔ×Ï '%s' É " +"ÎÁÖÍÉÔÅ .\n" + +#: cmdline/apt-sortpkgs.cc:86 +msgid "Unknown package record!" +msgstr "îÅÐÏÎÑÔÎÁÑ ÚÁÐÉÓØ Ï ÐÁËÅÔÅ!" + +#: cmdline/apt-sortpkgs.cc:150 +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 arbitary 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" + +#: apt-pkg/contrib/mmap.cc:82 +msgid "Can't mmap an empty file" +msgstr "îÅ×ÏÚÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ mmap ÄÌÑ ÐÕÓÔÏÇÏ ÆÁÊÌÁ" + +#: apt-pkg/contrib/mmap.cc:87 +#, c-format +msgid "Couldn't make mmap of %lu bytes" +msgstr "îÅ×ÏÚÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ mmap ÄÌÑ %lu ÂÁÊÔ" + +#: apt-pkg/contrib/strutl.cc:941 +#, c-format +msgid "Selection %s not found" +msgstr "óÔÒÏË, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÈ %s, ÎÅ ÎÁÊÄÅÎÏ." + +#: apt-pkg/contrib/configuration.cc:449 +#, c-format +msgid "Opening configuration file %s" +msgstr "ïÔËÒÙÔÉÅ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÏÇÏ ÆÁÊÌÁ %s" + +#: apt-pkg/contrib/configuration.cc:559 +#, c-format +msgid "Syntax error %s:%u: Block starts with no name." +msgstr "óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: îÁÞÁÌÏ ÂÌÏËÁ ÂÅÚ ÉÍÅÎÉ." + +#: apt-pkg/contrib/configuration.cc:578 +#, c-format +msgid "Syntax error %s:%u: Malformed Tag" +msgstr "óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: ïÛÉÂÏÞÎÁÑ ÍÅÔËÁ." + +#: apt-pkg/contrib/configuration.cc:595 +#, c-format +msgid "Syntax error %s:%u: Extra junk after value" +msgstr "óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: ìÉÛÎÉÅ ÓÉÍ×ÏÌÙ ÐÏÓÌÅ ÚÎÁÞÅÎÉÑ." + +#: apt-pkg/contrib/configuration.cc:635 +#, c-format +msgid "Syntax error %s:%u: Directives can only be done at the top level" +msgstr "" +"óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: äÉÒÅËÔÉ×Ù ÍÏÇÕÔ ÚÁÄÁ×ÁÔØÓÑ ÔÏÌØËÏ ÎÁ ×ÙÓÛÅÍ " +"ÕÒÏ×ÎÅ." + +#: apt-pkg/contrib/configuration.cc:642 +#, c-format +msgid "Syntax error %s:%u: Too many nested includes" +msgstr "óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: óÌÉÛËÏÍ ÍÎÏÇÏ ×ÌÏÖÅÎÎÙÈ ×ËÌÀÞÅÎÉÊ." + +#: apt-pkg/contrib/configuration.cc:646 apt-pkg/contrib/configuration.cc:651 +#, c-format +msgid "Syntax error %s:%u: Included from here" +msgstr "óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: ÷ËÌÀÞÅÎÉÅ ÉÚ ÕËÁÚÁÎÎÏÇÏ ÍÅÓÔÁ." + +#: apt-pkg/contrib/configuration.cc:655 +#, c-format +msgid "Syntax error %s:%u: Unsupported directive '%s'" +msgstr "óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: îÅÉÚ×ÅÓÔÎÁÑ ÄÉÒÅËÔÉ×Á '%s'." + +#: apt-pkg/contrib/configuration.cc:689 +#, c-format +msgid "Syntax error %s:%u: Extra junk at end of file" +msgstr "óÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ %s:%u: ìÉÛÎÉÅ ÄÁÎÎÙÅ × ËÏÎÃÅ ÆÁÊÌÁ." + +#: apt-pkg/contrib/configuration.cc:701 apt-pkg/contrib/cdromutl.cc:153 +#: apt-pkg/acquire.cc:412 apt-pkg/clean.cc:38 +#, c-format +msgid "Unable to read %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ %s." + +#: apt-pkg/contrib/progress.cc:154 +#, c-format +msgid "%c%s... Error!" +msgstr "%c%s... ïÛÉÂËÁ!" + +#: apt-pkg/contrib/progress.cc:156 +#, =c-format +msgid "%c%s... Done" +msgstr "%c%s... úÁ×ÅÒÛÅÎÏ" + +#: apt-pkg/contrib/cmndline.cc:80 +#, c-format +msgid "Command line option '%c' [from %s] is not known." +msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÏÐÃÉÑ '%c' [ÉÚ %s]." + +#: apt-pkg/contrib/cmndline.cc:106 apt-pkg/contrib/cmndline.cc:114 +#: apt-pkg/contrib/cmndline.cc:122 +#, c-format +msgid "Command line option %s is not understood" +msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÏÐÃÉÑ %s." + +#: apt-pkg/contrib/cmndline.cc:127 +#, c-format +msgid "Command line option %s is not boolean" +msgstr "ïÐÃÉÑ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ %s ÄÏÌÖÎÁ ÉÍÅÔØ ÌÏÇÉÞÅÓËÏÅ ÚÎÁÞÅÎÉÅ." + +#: apt-pkg/contrib/cmndline.cc:166 apt-pkg/contrib/cmndline.cc:187 +#, c-format +msgid "Option %s requires an argument." +msgstr "ïÐÃÉÑ %s ÎÕÖÄÁÅÔÓÑ × ÁÒÇÕÍÅÎÔÅ." + +#: apt-pkg/contrib/cmndline.cc:201 apt-pkg/contrib/cmndline.cc:207 +#, c-format +msgid "Option %s: Configuration item sepecification must have an =." +msgstr "" +"ïÐÃÉÑ %s: úÁÐÉÓØ ÐÁÒÁÍÅÔÒÁ ÎÁÓÔÒÏÊËÉ ÄÏÌÖÎÁ ÏËÁÎÞÉ×ÁÔØÓÑ ÎÁ =<ÚÎÁÞÅÎÉÅ>." + +#: apt-pkg/contrib/cmndline.cc:237 +#, c-format +msgid "Option %s requires an integer argument, not '%s'" +msgstr "ïÐÃÉÑ %s ÔÒÅÂÕÅÔ ÞÉÓÌÅÎÎÏÇÏ ÁÒÇÕÍÅÎÔÁ ×ÍÅÓÔÏ '%s'." + +#: apt-pkg/contrib/cmndline.cc:268 +#, c-format +msgid "Option '%s' is too long" +msgstr "óÌÉÛËÏÍ ÄÌÉÎÎÁÑ ÏÐÃÉÑ '%s'" + +#: apt-pkg/contrib/cmndline.cc:301 +#, c-format +msgid "Sense %s is not understood, try true or false." +msgstr "îÅÒÁÓÐÏÚÎÁ×ÁÅÍÏÅ ÚÎÁÞÅÎÉÅ %s, ÉÓÐÏÌØÚÕÊÔÅ true ÉÌÉ false." + +#: apt-pkg/contrib/cmndline.cc:351 +#, c-format +msgid "Invalid operation %s" +msgstr "ïÛÉÂÏÞÎÁÑ ÏÐÅÒÁÃÉÑ %s" + +#: apt-pkg/contrib/cdromutl.cc:55 +#, c-format +msgid "Unable to stat the mount point %s" +msgstr "îÅ ÎÁÊÄÅÎÁ ÔÏÞËÁ ÐÏÄËÌÀÞÅÎÉÑ ÄÉÓËÁ %s." + +#: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:418 apt-pkg/clean.cc:44 +#, c-format +msgid "Unable to change to %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÊÔÉ Ë %s." + +#: apt-pkg/contrib/cdromutl.cc:190 +msgid "Failed to stat the cdrom" +msgstr "îÅ ÎÁÊÄÅÎ CD-ROM." + +#: apt-pkg/contrib/fileutl.cc:80 +#, c-format +msgid "Not using locking for read only lock file %s" +msgstr "âÌÏËÉÒÏ×ËÁ ÏÔËÌÀÞÅÎÁ × Ó×ÑÚÉ Ó ÎÅÄÏÓÔÕÐÎÏÓÔØÀ ÆÁÊÌÁ %s ÐÏ ÚÁÐÉÓÉ." + +#: apt-pkg/contrib/fileutl.cc:85 +#, c-format +msgid "Could not open lock file %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ÂÌÏËÉÒÏ×ËÉ %s." + +#: apt-pkg/contrib/fileutl.cc:103 +#, c-format +msgid "Not using locking for nfs mounted lock file %s" +msgstr "âÌÏËÉÒÏ×ËÁ ÏÔËÌÀÞÅÎÁ, ÔÁË ËÁË ÆÁÊÌ ÎÁÈÏÄÉÔÓÑ ÎÁ ÓÅÔÅ×ÏÍ ÒÁÚÄÅÌÅ nfs." + +#: apt-pkg/contrib/fileutl.cc:107 +#, c-format +msgid "Could not get lock %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁÂÌÏËÉÒÏ×ÁÔØ %s." + +#: apt-pkg/contrib/fileutl.cc:358 +#, c-format +msgid "Waited, for %s but it wasn't there" +msgstr "ðÏÄÐÒÏÃÅÓÓ %s ÎÅ ÏÔ×ÅÞÁÅÔ." + +#: apt-pkg/contrib/fileutl.cc:368 +#, c-format +msgid "Sub-process %s received a segmentation fault." +msgstr "ðÏÄÐÒÏÃÅÓÓ %s ×ÙÐÏÌÎÉÌ ÎÅÄÏÐÕÓÔÉÍÕÀ ÏÐÅÒÁÃÉÀ." + +#: apt-pkg/contrib/fileutl.cc:371 apt-pkg/rpm/rpmpm.cc:419 +#, c-format +msgid "Sub-process %s returned an error code (%u)" +msgstr "ðÏÄÐÒÏÃÅÓÓ %s ÚÁ×ÅÒÛÉÌÓÑ Ó ÏÛÉÂËÏÊ (%u)." + +#: apt-pkg/contrib/fileutl.cc:373 apt-pkg/rpm/rpmpm.cc:422 +#, c-format +msgid "Sub-process %s exited unexpectedly" +msgstr "ðÏÄÐÒÏÃÅÓÓ %s ÚÁ×ÅÒÛÉÌÓÑ ÎÅÐÒÅÄÕÓÍÏÔÒÅÎÎÙÍ ÏÂÒÁÚÏÍ." + +#: apt-pkg/contrib/fileutl.cc:417 +#, c-format +msgid "Could not open file %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ %s." + +#: apt-pkg/contrib/fileutl.cc:452 +msgid "Read error" +msgstr "ïÛÉÂËÁ ÞÔÅÎÉÑ." + +#: apt-pkg/contrib/fileutl.cc:473 +#, c-format +msgid "read, still have %lu to read but none left" +msgstr "ïÓÔÁÌÏÓØ ÐÒÏÞÅÓÔØ %lu, ÎÏ ÂÙÌ ÄÏÓÔÉÇÎÕÔ ËÏÎÅà ÆÁÊÌÁ." + +#: apt-pkg/contrib/fileutl.cc:491 +msgid "Write error" +msgstr "ïÛÉÂËÁ ÚÁÐÉÓÉ" + +#: apt-pkg/contrib/fileutl.cc:503 +#, c-format +msgid "write, still have %lu to write but couldn't" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ %lu." + +#: apt-pkg/contrib/fileutl.cc:578 +msgid "Problem closing the file" +msgstr "ïÛÉÂËÁ ÚÁËÒÙÔÉÑ ÆÁÊÌÁ." + +#: apt-pkg/contrib/fileutl.cc:584 +msgid "Problem unlinking the file" +msgstr "ïÛÉÂËÁ ÏÔÓÏÅÄÉÎÅÎÉÑ ÆÁÊÌÁ." + +#: apt-pkg/contrib/fileutl.cc:595 +msgid "Problem syncing the file" +msgstr "ïÛÉÂËÁ ÓÉÎÈÒÏÎÉÚÁÃÉÉ ÆÁÊÌÁ." + +#: apt-pkg/pkgcache.cc:126 +msgid "Empty package cache" +msgstr "âÕÆÅÒ ÐÁËÅÔÏ× ÐÕÓÔ." + +#: apt-pkg/pkgcache.cc:132 +msgid "The package cache file is corrupted" +msgstr "æÁÊÌ Ó ËÜÛÅÍ ÐÁËÅÔÏ× ÐÏ×ÒÅÖÄÅÎ" + +#: apt-pkg/pkgcache.cc:137 +msgid "The package cache file is an incompatible version" +msgstr "æÁÊÌ Ó ËÜÛÅÍ ÐÁËÅÔÏ× ÓÆÏÒÍÉÒÏ×ÁÎ ÎÅÓÏ×ÍÅÓÔÉÍÏÊ ×ÅÒÓÉÅÊ APT" + +#: apt-pkg/pkgcache.cc:142 +#, c-format +msgid "This APT does not support the Versioning System '%s'" +msgstr "äÁÎÎÁÑ ×ÅÒÓÉÑ APT ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÓÉÓÔÅÍÕ ×ÅÒÓÉÊ '%s'." + +#: apt-pkg/pkgcache.cc:147 +msgid "The package cache was build for a different architecture" +msgstr "ëÜÛ ÐÁËÅÔÏ× ÐÒÅÄÎÁÎÁÞÅÎ ÄÌÑ ÄÒÕÇÏÊ ÐÌÁÔÆÏÒÍÙ." + +#: apt-pkg/pkgcache.cc:218 +msgid "Depends" +msgstr "ôÒÅÂÕÅÔ" + +#: apt-pkg/pkgcache.cc:218 +msgid "PreDepends" +msgstr "äÌÑ ÕÓÔÁÎÏ×ËÉ ÔÒÅÂÕÅÔ" + +#: apt-pkg/pkgcache.cc:218 +msgid "Suggests" +msgstr "ðÒÅÄÌÁÇÁÅÔ" + +#: apt-pkg/pkgcache.cc:219 +msgid "Recommends" +msgstr "òÅËÏÍÅÎÄÕÅÔ" + +#: apt-pkg/pkgcache.cc:219 +msgid "Conflicts" +msgstr "éÓËÌÀÞÁÅÔ" + +#: apt-pkg/pkgcache.cc:219 +msgid "Replaces" +msgstr "úÁÍÅÎÑÅÔ" + +#: apt-pkg/pkgcache.cc:220 +msgid "Obsoletes" +msgstr "÷ÙÔÅÓÎÑÅÔ" + +#: apt-pkg/pkgcache.cc:231 +msgid "important" +msgstr "×ÁÖÎÏ" + +#: apt-pkg/pkgcache.cc:231 +msgid "required" +msgstr "ÔÒÅÂÕÅÔÓÑ" + +#: apt-pkg/pkgcache.cc:231 +msgid "standard" +msgstr "ÏÂÙÞÎÏ" + +#: apt-pkg/pkgcache.cc:232 +msgid "optional" +msgstr "ÎÅÏÂÑÚÁÔÅÌØÎÏ" + +#: apt-pkg/pkgcache.cc:232 +msgid "extra" +msgstr "ÄÏÐÏÌÎÉÔÅÌØÎÏ" + +#: apt-pkg/depcache.cc:63 apt-pkg/depcache.cc:92 +msgid "Building Dependency Tree" +msgstr "ðÏÓÔÒÏÅÎÉÅ ÄÅÒÅ×Á ÚÁ×ÉÓÉÍÏÓÔÅÊ" + +#: apt-pkg/depcache.cc:64 +msgid "Candidate Versions" +msgstr "ïÐÒÅÄÅÌÅÎÉÅ ÎÅÏÂÈÏÄÉÍÙÈ ×ÅÒÓÉÊ" + +#: apt-pkg/depcache.cc:93 +msgid "Dependency Generation" +msgstr "óÏÚÄÁÎÉÅ ÚÁ×ÉÓÉÍÏÓÔÅÊ" + +#: apt-pkg/tagfile.cc:71 +#, c-format +msgid "Unable to parse package file %s (1)" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÐÁËÅÔÎÙÊ ÆÁÊÌ %s (1)" + +#: apt-pkg/tagfile.cc:158 +#, c-format +msgid "Unable to parse package file %s (2)" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÐÁËÅÔÎÙÊ ÆÁÊÌ %s (2)" + +#: apt-pkg/sourcelist.cc:88 +#, c-format +msgid "Malformed line %lu in source list %s (URI)" +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ÓÔÒÏËÁ %lu × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× (URI)" + +#: apt-pkg/sourcelist.cc:90 +#, c-format +msgid "Malformed line %lu in source list %s (dist)" +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ÓÔÒÏËÁ %lu × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× (ÄÉÓÔÒÉÂÕÔÉ×)" + +#: apt-pkg/sourcelist.cc:93 +#, c-format +msgid "Malformed line %lu in source list %s (URI parse)" +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ÓÔÒÏËÁ %lu × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× (ÏÂÒÁÂÏÔËÁ URI)" + +#: apt-pkg/sourcelist.cc:99 +#, c-format +msgid "Malformed line %lu in source list %s (Absolute dist)" +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ÓÔÒÏËÁ %lu × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× (ÁÂÓÏÌÀÔÎÙÊ ÄÉÓÔÒÉÂÕÔÉ×)" + +#: apt-pkg/sourcelist.cc:106 +#, c-format +msgid "Malformed line %lu in source list %s (dist parse)" +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ÓÔÒÏËÁ %lu × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× (ÏÂÒÁÂÏÔËÁ ÄÉÓÔÒÉÂÕÔÉ×Á)" + +#: apt-pkg/sourcelist.cc:196 apt-pkg/sourcelist.cc:220 +#, c-format +msgid "Vendor block %s is invalid" +msgstr "îÅ×ÅÒÎÙÊ ÂÌÏË ÄÁÎÎÙÈ ÐÏÓÔÁ×ÝÉËÁ %s." + +#: apt-pkg/sourcelist.cc:248 +#, c-format +msgid "Opening %s" +msgstr "ïÔËÒÙÔÉÅ %s" + +#: apt-pkg/sourcelist.cc:262 +#, c-format +msgid "Line %u too long in source list %s." +msgstr "óÌÉÛËÏÍ ÄÌÉÎÎÁÑ ÚÁÐÉÓØ %u × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× %s." + +#: apt-pkg/sourcelist.cc:279 +#, c-format +msgid "Malformed line %u in source list %s (type)" +msgstr "ïÛÉÂÏÞÎÁÑ ÚÁÐÉÓØ × ÓÔÒÏËÅ %u × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× (ÔÉÐ ÉÓÔÏÞÎÉËÁ)" + +#: apt-pkg/sourcelist.cc:283 +#, c-format +msgid "Type '%s' is not known in on line %u in source list %s" +msgstr "îÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ '%s' × ÓÔÒÏËÅ %u ÓÐÉÓËÁ ÉÓÔÏÞÎÉËÏ× %s." + +#: apt-pkg/sourcelist.cc:292 apt-pkg/sourcelist.cc:295 +#, c-format +msgid "Malformed line %u in source list %s (vendor id)" +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ÓÔÒÏËÁ %u × ÓÐÉÓËÅ ÉÓÔÏÞÎÉËÏ× (ID ÐÏÓÔÁ×ÝÉËÁ)" + +#: apt-pkg/sourcelist.cc:309 +#, c-format +msgid "Unknown vendor ID '%s' in line %u of source list %s" +msgstr "îÅÉÚ×ÅÓÔÎÙÊ ID ÐÏÓÔÁ×ÝÉËÁ '%s' × ÓÔÒÏËÅ %u ÓÐÉÓËÁ ÉÓÔÏÞÎÉËÏ× %s." + +#: apt-pkg/packagemanager.cc:402 +#, c-format +msgid "" +"This installation run will require temporarily removing the essential " +"package %s due to a Conflicts/Pre-Depends loop. This is often bad, but if " +"you really want to do it, activate the APT::Force-LoopBreak option." +msgstr "" +"üÔÏÔ ÓÅÁÎÓ ÕÓÔÁÎÏ×ËÉ ÔÒÅÂÕÅÔ ×ÒÅÍÅÎÎÏÇÏ ÕÄÁÌÅÎÉÑ ÓÉÓÔÅÍÎÏÇÏ ÐÁËÅÔÁ %s × " +"Ó×ÑÚÉ Ó ËÏÎÆÌÉËÔÏÍ ÉÌÉ ÚÁÃÉËÌÉ×ÁÎÉÅÍ ÐÒÅÄ×ÁÒÉÔÅÌØÎÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ. þÁÝÅ " +"×ÓÅÇÏ ÜÔÏ ÎÅÐÒÁ×ÉÌØÎÏ, ÎÏ ÅÓÌÉ ×Ù ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÜÔÏÇÏ ÈÏÔÉÔÅ, ÔÏ " +"ÁËÔÉ×ÉÚÉÒÕÊÔÅ ÏÐÃÉÀ APT::Force-LoopBreak." + +#: apt-pkg/pkgrecords.cc:37 +#, c-format +msgid "Index file type '%s' is not supported" +msgstr "ôÉÐ ÉÎÄÅËÓÎÏÇÏ ÆÁÊÌÁ '%s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ" + +#: apt-pkg/algorithms.cc:242 +#, c-format +msgid "" +"The package %s needs to be reinstalled, but I can't find an archive for it." +msgstr "" +"îÅÏÂÈÏÄÉÍÏ ÐÅÒÅÕÓÔÁÎÏ×ÉÔØ ÐÁËÅÔ %s, ÎÏ ÎÁÊÔÉ ÅÇÏ ÁÒÈÉ×ÎÕÀ ËÏÐÉÀ ÎÅ×ÏÚÍÏÖÎÏ." + +#: apt-pkg/algorithms.cc:1124 +msgid "" +"Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " +"held packages." +msgstr "" +"ïÛÉÂËÁ. ðÒÏÃÅÄÕÒÁ pkgProblemResolver::Resolve ×ÙÚ×ÁÌÁ ÏÓÔÁÎÏ×ËÕ. üÔÏ ÍÏÖÅÔ " +"ÂÙÔØ ×ÙÚ×ÁÎÏ ÓÏÈÒÁÎÑÅÍÙÍÉ ÐÁËÅÔÁÍÉ." + +#: apt-pkg/algorithms.cc:1126 +msgid "Unable to correct problems, you have held broken packages." +msgstr "" +"òÅÛÉÔØ ÐÒÏÂÌÅÍÕ ÎÅ×ÏÚÍÏÖÎÏ. ÷Ù ÐÏÔÒÅÂÏ×ÁÌÉ ÓÏÈÒÁÎÉÔØ ÐÁËÅÔÙ ÓÏ ÓÌÏÍÁÎÎÙÍÉ " +"ÚÁ×ÉÓÉÍÏÓÔÑÍÉ." + +#: apt-pkg/acquire.cc:61 +#, c-format +msgid "Lists directory %spartial is missing." +msgstr "äÉÒÅËÔÏÒÉÑ ÓÏ ÓÐÉÓËÁÍÉ ÐÁËÅÔÏ× %spartial ÏÔÓÕÔÓÔ×ÕÅÔ." + +#: apt-pkg/acquire.cc:65 +#, c-format +msgid "Archive directory %spartial is missing." +msgstr "äÉÒÅËÔÏÒÉÑ Ó ÁÒÈÉ×ÎÙÍÉ ÐÁËÅÔÁÍÉ %spartial ÏÔÓÕÔÓÔ×ÕÅÔ." + +#: apt-pkg/acquire-worker.cc:112 +#, c-format +msgid "The method driver %s could not be found." +msgstr "ðÒÏÇÒÁÍÍÁ ÏÂÒÁÂÏÔËÉ ÍÅÔÏÄÁ %s ÎÅ ÎÁÊÄÅÎÁ." + +#: apt-pkg/acquire-worker.cc:161 +#, c-format +msgid "Method %s did not start correctly" +msgstr "ðÒÏÇÒÁÍÍÁ ÏÂÒÁÂÏÔËÉ ÍÅÔÏÄÁ %s ÎÅ ÓÍÏÇÌÁ ÐÒÁ×ÉÌØÎÏ ÚÁÐÕÓÔÉÔØÓÑ" + +#: apt-pkg/init.cc:121 +#, c-format +msgid "Packaging system '%s' is not supported" +msgstr "ðÁËÅÔÎÁÑ ÓÉÓÔÅÍÁ %s ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ." + +#: apt-pkg/init.cc:137 +msgid "Unable to determine a suitable system type" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÔÉÐ ÓÉÓÔÅÍÙ." + +#: apt-pkg/clean.cc:61 +#, c-format +msgid "Unable to stat %s." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ %s" + +#: apt-pkg/srcrecords.cc:49 +msgid "You must put some 'source' URIs in your sources.list" +msgstr "÷ sources.list ÄÏÌÖÎÙ ÂÙÔØ ÕËÁÚÁÎÙ ÁÄÒÅÓÁ ÒÅÐÏÚÉÔÏÒÉÅ×." + +#: apt-pkg/cachefile.cc:77 +msgid "The package lists or status file could not be parsed or opened." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÓÐÉÓÏË ÐÁËÅÔÏ× ÉÌÉ ÆÁÊÌ ÓÔÁÔÕÓÁ." + +# +#: apt-pkg/cachefile.cc:81 +msgid "You may want to run apt-get update to correct these problems" +msgstr "÷ÏÚÍÏÖÎÏ, ÷ÁÍ ÐÏÔÒÅÂÕÅÔÓÑ ÚÁÐÕÓÔÉÔØ `apt-get update' ÄÌÑ ÉÓÐÒÁ×ÌÅÎÉÑ." + +#: apt-pkg/policy.cc:269 +msgid "Invalid record in the preferences file, no Package header" +msgstr "" +"ïÛÉÂÏÞÎÁÑ ÚÁÐÉÓØ × ËÏÎÆÉÇÕÒÁÃÉÏÎÎÏÍ ÆÁÊÌÅ. ïÔÓÕÔÓÔ×ÕÅÔ ÚÁÇÏÌÏ×ÏË ÐÁËÅÔÁ." + +#: apt-pkg/policy.cc:291 +#, c-format +msgid "Did not understand pin type %s" +msgstr "îÅÐÒÉÇÏÄÎÙÊ ËÒÉÔÅÒÉÊ ÏÔÂÏÒÁ ÐÒÅÄÐÏÞÉÔÁÅÍÙÈ ÐÁËÅÔÏ× %s." + +#: apt-pkg/pkgcachegen.cc:74 +msgid "Cache has an incompatible versioning system" +msgstr "÷ ËÜÛÅ ÉÓÐÏÌØÚÏ×ÁÎÁ ÎÅÓÏ×ÍÅÓÔÉÍÁÑ ÓÉÓÔÅÍÁ ×ÅÒÓÉÊ" + +#: apt-pkg/pkgcachegen.cc:117 +#, c-format +msgid "Error occured while processing %s (NewPackage)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (NewPackage) ÐÒÏÉÚÏÛÌÁ ÏÛÉÂËÁ" + +#: apt-pkg/pkgcachegen.cc:129 +#, c-format +msgid "Error occured while processing %s (UsePackage1)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (UsePackage1) ÐÒÏÉÚÏÛÌÁ ÏÛÉÂËÁ" + +#: apt-pkg/pkgcachegen.cc:154 +#, c-format +msgid "Error occured while processing %s (UsePackage2)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (UsePackage2) ×ÏÚÎÉËÌÁ ÏÛÉÂËÁ" + +#: apt-pkg/pkgcachegen.cc:158 +#, c-format +msgid "Error occured while processing %s (NewFileVer1)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (NewFileVer1) ×ÏÚÎÉËÌÁ ÏÛÉÂËÁ" + +#: apt-pkg/pkgcachegen.cc:190 +#, c-format +msgid "Error occured while processing %s (NewVersion1)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (NewVersion1) ×ÏÚÎÉËÌÁ ÏÛÉÂËÁ" + +#: apt-pkg/pkgcachegen.cc:194 +#, c-format +msgid "Error occured while processing %s (UsePackage3)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (UsePackage2) ×ÏÚÎÉËÌÁ ÏÛÉÂËÁ" + +#: apt-pkg/pkgcachegen.cc:198 +#, c-format +msgid "Error occured while processing %s (NewVersion2)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (NewVersion2) ×ÏÚÎÉËÌÁ ÏÛÉÂËÁ" + +#: apt-pkg/pkgcachegen.cc:213 +msgid "Wow, you exceeded the number of package names this APT is capable of." +msgstr "" +"ëÏÌÉÞÅÓÔ×Ï ÉͣΠÐÁËÅÔÏ× ÐÒÅ×ÙÛÁÅÔ ÍÁËÓÉÍÁÌØÎÏ ÄÏÐÕÓÔÉÍÏÅ ÄÌÑ ÄÁÎÎÏÊ ×ÅÒÓÉÉ " +"APT!" + +#: apt-pkg/pkgcachegen.cc:216 +msgid "Wow, you exceeded the number of versions this APT is capable of." +msgstr "" +"ëÏÌÉÞÅÓÔ×Ï ÒÁÚÌÉÞÎÙÈ ×ÅÒÓÉÊ ÐÒÅ×ÙÛÁÅÔ ÍÁËÓÉÍÁÌØÎÏ ÄÏÐÕÓÔÉÍÏÅ ÄÌÑ ÄÁÎÎÏÊ " +"×ÅÒÓÉÉ APT!" + +#: apt-pkg/pkgcachegen.cc:219 +msgid "Wow, you exceeded the number of dependencies this APT is capable of." +msgstr "" +"ëÏÌÉÞÅÓÔ×Ï ÚÁ×ÉÓÉÍÏÓÔÅÊ ÐÒÅ×ÙÛÁÅÔ ÍÁËÓÉÍÁÌØÎÏ ÄÏÐÕÓÔÉÍÏÅ ÄÌÑ ÄÁÎÎÏÊ ×ÅÒÓÉÉ " +"APT!" + +#: apt-pkg/pkgcachegen.cc:247 +#, c-format +msgid "Error occured while processing %s (FindPkg)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (FindPkg) ÐÒÏÉÚÏÛÌÁ ÏÛÉÂËÁ." + +#: apt-pkg/pkgcachegen.cc:261 +#, c-format +msgid "Error occured while processing %s (CollectFileProvides)" +msgstr "ðÒÉ ÏÂÒÁÂÏÔËÅ %s (CollectFileProvides) ÐÒÏÉÚÏÛÌÁ ÏÛÉÂËÁ." + +#: apt-pkg/pkgcachegen.cc:267 +#, c-format +msgid "Package %s %s was not found while processing file dependencies" +msgstr "îÅ ÎÁÊÄÅÎ ÐÁËÅÔ %s %s ÐÒÉ ÏÂÒÁÂÏÔËÅ ÆÁÊÌÏ×ÙÈ ÚÁ×ÉÓÉÍÏÓÔÅÊ." + +#. Build the status cache +#: apt-pkg/pkgcachegen.cc:651 apt-pkg/pkgcachegen.cc:711 +#: apt-pkg/pkgcachegen.cc:716 apt-pkg/pkgcachegen.cc:861 +#: apt-pkg/rpm/rpmsystem.cc:355 +msgid "Reading Package Lists" +msgstr "þÔÅÎÉÅ ÓÐÉÓËÏ× ÐÁËÅÔÏ×" + +#: apt-pkg/pkgcachegen.cc:666 +msgid "Collecting File Provides" +msgstr "óÏÚÄÁÎÉÅ ÓÐÉÓËÁ ÉÍ£Î" + +#: apt-pkg/pkgcachegen.cc:724 +msgid "Error pre-processing package lists" +msgstr "÷Ï ×ÒÅÍÑ ÐÒÅÄ×ÁÒÉÔÅÌØÎÏÊ ÏÂÒÁÂÏÔËÉ ÓÐÉÓËÏ× ÐÁËÅÔÏ× ÐÒÏÉÚÏÛÌÁ ÏÛÉÂËÁ." + +#: apt-pkg/pkgcachegen.cc:793 apt-pkg/pkgcachegen.cc:800 +msgid "IO Error saving source cache" +msgstr "ïÛÉÂËÁ ××ÏÄÁ-×Ù×ÏÄÁ × ÍÏÍÅÎÔ ÓÏÈÒÁÎÅÎÉÑ ËÜÛÁ ÒÅÐÏÚÉÔÏÒÉÑ" + +#. CNC:2003-01-29 - Fix potential buffer overflow bug. */ +#: apt-pkg/acquire-item.cc:167 +#, c-format +msgid "rename failed, %s (%s -> %s)." +msgstr "ïÛÉÂËÁ ÐÅÒÅÉÍÅÎÏ×ÁÎÉÑ, %s (%s -> %s)." + +#: apt-pkg/acquire-item.cc:211 apt-pkg/acquire-item.cc:404 +#, c-format +msgid "%s is not listed in the checksum list for its repository" +msgstr "%s ÏÔÓÕÔÓÔ×ÕÅÔ × ÓÐÉÓËÅ ËÏÎÔÒÏÌØÎÙÈ ÓÕÍÍ Ó×ÏÅÇÏ ÒÅÐÏÚÉÔÏÒÉÑ." + +#: apt-pkg/acquire-item.cc:231 apt-pkg/acquire-item.cc:424 +#, c-format +msgid "Release information not available for %s" +msgstr "ïÐÉÓÁÎÉÅ %s ÎÅ ÎÁÊÄÅÎÏ." + +#: apt-pkg/acquire-item.cc:281 apt-pkg/acquire-item.cc:557 +#: apt-pkg/acquire-item.cc:789 +msgid "Size mismatch" +msgstr "îÅÓÏ×ÐÁÄÅÎÉÅ ÒÁÚÍÅÒÁ" + +#: apt-pkg/acquire-item.cc:292 apt-pkg/acquire-item.cc:567 +#: apt-pkg/acquire-item.cc:802 +msgid "MD5Sum mismatch" +msgstr "îÅÓÏ×ÐÁÄÅÎÉÅ ËÏÎÔÒÏÌØÎÏÊ ÓÕÍÍÙ MD5" + +#: apt-pkg/acquire-item.cc:473 +msgid "No valid signatures found in Release file" +msgstr "æÁÊÌ ÏÐÉÓÁÎÉÑ" + +#: apt-pkg/acquire-item.cc:481 +msgid "Signature fingerprint of Release file does not match (expected " +msgstr "îÅ×ÅÒÎÁÑ ÐÏÄÐÉÓØ ÆÁÊÌÁ ÏÐÉÓÁÎÉÑ (ÄÏÌÖÎÏ ÂÙÔØ " + +#: apt-pkg/acquire-item.cc:482 +msgid ", got " +msgstr ", Á ÐÏÌÕÞÅÎÏ " + +#: apt-pkg/acquire-item.cc:507 +msgid "Could not read checksum list from Release file" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÓÐÉÓÏË ËÏÎÔÒÏÌØÎÙÈ ÓÕÍÍ ÉÚ ÆÁÊÌÁ ÏÐÉÓÁÎÉÑ." + +#: apt-pkg/acquire-item.cc:641 +#, 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. ÷ÏÚÍÏÖÎÏ, ÐÏÔÒÅÂÕÅÔÓÑ ÉÓÐÒÁ×ÉÔØ ÐÁËÅÔ " +"×ÒÕÞÎÕÀ (× Ó×ÑÚÉ Ó ÏÔÓÕÔÓÔ×ÉÅÍ ÎÕÖÎÏÊ ÐÌÁÔÆÏÒÍÙ)." + +#: apt-pkg/acquire-item.cc:676 +#, c-format +msgid "" +"I wasn't able to locate file for the %s package. This might mean you need to " +"manually fix this package." +msgstr "" +"îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÆÁÊÌ ÐÁËÅÔÁ %s. ÷ÏÚÍÏÖÎÏ, ÐÏÔÒÅÂÕÅÔÓÑ ÉÓÐÒÁ×ÉÔØ ÐÁËÅÔ " +"×ÒÕÞÎÕÀ." + +#: apt-pkg/acquire-item.cc:707 +#, c-format +msgid "" +"The package index files are corrupted. No Filename: field for package %s." +msgstr "ðÏ×ÒÅÖÄÅÎÙ ÉÎÄÅËÓÎÙÅ ÆÁÊÌÙ. ïÔÓÕÔÓÔ×ÕÅÔ ÐÏÌÅ Filename: ÄÌÑ ÐÁËÅÔÁ %s." + +#: apt-pkg/repository.cc:40 +#, c-format +msgid "could not open Release file '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ÏÐÉÓÁÎÉÑ '%s'." + +#: apt-pkg/repository.cc:55 +#, c-format +msgid "No MD5Sum data in Release file '%s'" +msgstr "÷ ÆÁÊÌÅ ÏÐÉÓÁÎÉÑ '%s' ÎÅÔ ËÏÎÔÒÏÌØÎÏÊ ÓÕÍÍÙ MD5." + +#: apt-pkg/repository.cc:72 +#, c-format +msgid "Error parsing MD5Sum hash record on Release file '%s'" +msgstr "ïÛÉÂËÁ ÐÏÌÕÞÅÎÉÑ ÈÜÛ ÚÁÐÉÓÉ MD5 ÉÚ ÆÁÊÌÁ ÏÐÉÓÁÎÉÑ '%s'." + +#: apt-pkg/rpm/rpmhandler.cc:94 +msgid "could not rewind RPMFileHandler" +msgstr "ÏÔËÁÔ RPMFileHandler ÎÅ×ÏÚÍÏÖÅÎ" + +#: apt-pkg/rpm/rpmhandler.cc:111 apt-pkg/rpm/rpmhandler.cc:120 +msgid "could not open RPM database" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÂÁÚÕ ÄÁÎÎÙÈ RPM" + +#: apt-pkg/rpm/rpmhandler.cc:127 +msgid "could not create RPM database iterator" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÉÔÅÒÁÔÏÒ ÂÁÚÙ ÄÁÎÎÙÈ RPM" + +#: apt-pkg/rpm/rpmindexfile.cc:473 +#, c-format +msgid "Problem with SelectFile %s" +msgstr "ïÛÉÂËÁ SelectFile %s" + +#: apt-pkg/rpm/rpmindexfile.cc:491 apt-pkg/rpm/rpmindexfile.cc:528 +#, c-format +msgid "Problem opening %s" +msgstr "ïÛÉÂËÁ ÏÔËÒÙÔÉÑ %s" + +#: apt-pkg/rpm/rpmindexfile.cc:497 apt-pkg/rpm/rpmindexfile.cc:607 +#, c-format +msgid "Problem with MergeList %s" +msgstr "ïÛÉÂËÁ MergeList %s" + +#: apt-pkg/rpm/rpmindexfile.cc:532 apt-pkg/rpm/rpmindexfile.cc:624 +#, c-format +msgid "Problem with MergeFileProvides %s" +msgstr "ïÛÉÂËÁ MergeList %s" + +#: apt-pkg/rpm/rpmindexfile.cc:592 apt-pkg/rpm/rpmindexfile.cc:621 +msgid "Problem opening RPM database" +msgstr "ïÛÉÂËÁ ÏÔËÒÙÔÉÑ ÂÁÚÙ ÄÁÎÎÙÈ RPM" + +#: apt-pkg/rpm/rpmindexfile.cc:596 +msgid "Problem with SelectFile RPM Database" +msgstr "ïÛÉÂËÁ SelectFile ÂÁÚÙ ÄÁÎÎÙÈ RPM." + +#: apt-pkg/rpm/rpmlistparser.cc:71 +#, c-format +msgid "Bad regular expression '%s' in option RPM::AllowedDupPkgs." +msgstr "" +"îÅÄÏÐÕÓÔÉÍÏÅ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ '%s' × ÐÁÒÁÍÅÔÒÅ RPM::AllowedDupPkgs." + +#: apt-pkg/rpm/rpmlistparser.cc:153 +#, c-format +msgid "" +"There are two or more versions of the package '%s' installed in your system, " +"which is a situation APT can't handle cleanly at the moment.\n" +"Please do one of the following:\n" +"1) Keep at most one version of the package in the system; or\n" +"2) If you do want to keep multiple versions of that package, lookup RPM::" +"Allow-Duplicated in the documentation.\n" +msgstr "" +"÷ ÓÉÓÔÅÍÅ ÏÂÎÁÒÕÖÅÎÙ Ä×Å ÉÌÉ ÂÏÌÅÅ ×ÅÒÓÉÊ ÐÁËÅÔÁ '%s'. APT ÎÅ " +"ÍÏÖÅÔÓÁÍÏÓÔÏÑÔÅÌØÎÏ ÎÁÊÔÉ ×ÙÈÏÄ ÉÚ ÜÔÏÊ ÓÉÔÕÁÃÉÉ.\n" +"ðÏÖÁÌÕÊÓÔÁ, ×ÙÂÅÒÉÔÅ ÏÄÉÎ ÉÚ Ä×ÕÈ ×ÁÒÉÁÎÔÏ×:\n" +"1) õÄÁÌÉÔØ ÄÕÂÌÉÒÕÀÝÉÅ ÄÒÕÇ ÄÒÕÇÁ ÐÁËÅÔÙ, ÏÓÔÁ×É× ÔÏÌØËÏ ÏÄÎÕ ×ÅÒÓÉÀ; ÉÌÉ\n" +"2) åÓÌÉ ÎÅÏÂÈÏÄÉÍÏ ÓÏÈÒÁÎÉÔØ ÎÅÓËÏÌØËÏ ×ÅÒÓÉÊ ÐÁËÅÔÁ, ÔÏ ÓÌÅÄÕÅÔ ×ÎÅÓÔÉ " +"ÉÍÅÎÁ ÜÔÉÈ ÐÁËÅÔÏ× × ÓÐÉÓÏË ÚÎÁÞÅÎÉÊ ÐÁÒÁÍÅÔÒÁ RPM::AllowedDupPkgs.\n" + +#: apt-pkg/rpm/rpmpackagedata.cc:23 +#, c-format +msgid "could not open package priority file %s" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ c ÏÐÉÓÁÎÉÅÍ ÐÒÉÏÒÉÔÅÔÏ× ÐÁËÅÔÏ× %s" + +#: apt-pkg/rpm/rpmpackagedata.cc:32 +#, c-format +msgid "no data in %s" +msgstr "ÎÅÔ ÄÁÎÎÙÈ × %s" + +#: apt-pkg/rpm/rpmpackagedata.cc:83 +#, c-format +msgid "Bad regular expression '%s' in option RPM::HoldPackages." +msgstr "îÅÄÏÐÕÓÔÉÍÏÅ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ %s' × ÐÁÒÁÍÅÔÒÅ RPM::HoldPackages." + +#: apt-pkg/rpm/rpmpackagedata.cc:105 +#, c-format +msgid "Bad entry '%s' in option RPM::FakeProvides." +msgstr "îÅÄÏÐÕÓÔÉÍÁÑ ÚÁÐÉÓØ %s' × ÐÁÒÁÍÅÔÒÅ RPM::HoldPackages." + +#: apt-pkg/rpm/rpmpackagedata.cc:159 +#, c-format +msgid "Bad regular expression '%s' in URI translation" +msgstr "îÅÄÏÐÕÓÔÉÍÏÅ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ %s' × URI translation" + +#: apt-pkg/rpm/rpmpm.cc:59 +#, c-format +msgid "Internal Error, No file name for %s" +msgstr "÷ÎÕÔÒÅÎÎÑÑ ÏÛÉÂËÁ, îÅ ÕËÁÚÁÎÏ ÉÍÑ ÆÁÊÌÁ ÄÌÑ ÐÁËÅÔÁ %s" + +#: apt-pkg/rpm/rpmpm.cc:128 +#, c-format +msgid "Problem executing scripts %s '%s'" +msgstr "ïÛÉÂËÁ ×ÙÐÏÌÎÅÎÉÑ ÓËÒÉÐÔÏ× %s '%s'" + +#: apt-pkg/rpm/rpmpm.cc:139 +msgid "Sub-process returned an error code" +msgstr "ðÏÄÐÒÏÃÅÓÓ ÚÁ×ÅÒÛÉÌÓÑ Ó ÏÛÉÂËÏÊ" + +#: apt-pkg/rpm/rpmpm.cc:209 apt-pkg/rpm/rpmpm.cc:216 +#, c-format +msgid "Failure running script %s" +msgstr "ïÛÉÂËÁ ×ÙÐÏÌÎÅÎÉÑ ÓËÒÉÐÔÁ %s" + +#: apt-pkg/rpm/rpmpm.cc:353 +msgid "Executing RPM (" +msgstr "úÁÐÕÓË RPM (" + +#: apt-pkg/rpm/rpmpm.cc:416 +#, c-format +msgid "Sub-process %s recieved a segmentation fault." +msgstr "ðÏÄÐÒÏÃÅÓÓ %s ×ÙÐÏÌÎÉÌ ÎÅÄÏÐÕÓÔÉÍÕÀ ÏÐÅÒÁÃÉÀ." + +#: apt-pkg/rpm/rpmsrcrecords.cc:93 apt-pkg/rpm/rpmsrcrecords.cc:98 +#: apt-pkg/rpm/rpmsrcrecords.cc:103 apt-pkg/rpm/rpmsrcrecords.cc:108 +#, c-format +msgid "error parsing file record %s" +msgstr "ÏÛÉÂËÁ ÏÂÒÁÂÏÔËÉ ÆÁÊÌÏ×ÏÊ ÚÁÐÉÓÉ %s" + +#: apt-pkg/rpm/rpmsrcrecords.cc:189 apt-pkg/rpm/rpmsrcrecords.cc:196 +#, c-format +msgid "error parsing source list %s" +msgstr "ÏÛÉÂËÁ ÏÂÒÁÂÏÔËÉ ÓÐÉÓËÁ ÉÓÔÏÞÎÉËÏ× %s" diff --git a/apt/.cvsignore b/apt/.cvsignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/apt/.cvsignore @@ -0,0 +1 @@ +build diff --git a/apt/AUTHORS b/apt/AUTHORS index 07cd919..d8c341f 100644 --- a/apt/AUTHORS +++ b/apt/AUTHORS @@ -1,19 +1,16 @@ The project hierachy stands at: CVS:jgg Jason Gunthorpe -- Project leader - -CVS:srivasta Manoj Srivastava -- Dependency Expert +- The Mad Cow incarnate CVS:che Ben Gertzfield - Packaging and Releases -CVS:branden Branden Robinson -- Man Page Documentation +CVS:bod Brendan O'Dea +- Perl Bindings -CVS:doogie Adam Heath -- FTP method author +CVS:tausq Randolph Chung +- Patches, Fixes, Debugging, GUIs and Releases Past Contributures: @@ -21,8 +18,12 @@ Brian White - Project originator Tom Lees - DPKG documentation and ideas Behan Webster - Original GUI design Scott Ellis - Original packaging and beta releases +Branden Robinson - Man Page Documentation +Manoj Srivastava - 1st Generation FTP method and + dselect setup script +Adam Heath - 2nd Generation FTP method author +Ben Collins - Initial RSH method Many other bug reports through the Debian Bug system NOTE: The ChangeLog generator will parse for names and email addresses. The 'CVS:' tag should indicate who this pair refers to. - diff --git a/apt/AUTHORS.RPM b/apt/AUTHORS.RPM index eb1c437..29a98ef 100644 --- a/apt/AUTHORS.RPM +++ b/apt/AUTHORS.RPM @@ -1,15 +1,20 @@ -RPM port brought to you by +0.5 RPM port brought to you by +Gustavo Niemeyer Alfredo K. Kojima + +0.3 RPM port brought to you by +Alfredo K. Kojima + with consulting help from: Packaging: Ruda Moura Security: Andreas Hasenack Misc.: Claudio Matsuoka - added user specified public keyring option for gpg, fixed a bug in the file method with authentication Alexander Bokovoy solaris portability fixes AUSTIN MURPHY + diff --git a/apt/COMPILING b/apt/COMPILING index 7b12572..66e53ca 100644 --- a/apt/COMPILING +++ b/apt/COMPILING @@ -8,10 +8,19 @@ To compile this you need a couple things - A working ANSI C++ compiler, this is not g++ 2.7.* g++ 2.8 works OK and newer egcs work well also. Nobody has tried it on other compilers :< You will need a properly working STL as well. + g++ 3 does not presently work because they made the STL headers + use namespaces. - A C library with the usual POSIX functions and a BSD socket layer. - If you OS conforms to the Single User Spec then you are fine: + If you OS conforms to the Single Unix Spec then you are fine: http://www.opengroup.org/onlinepubs/7908799/index.html +** NOTICE ** +The C++ global constructors do not link correctly when using non-shared +libaries. This is probably the correct behavior of the linker, but I have +not yet had time to devise a work around for it. The correct thing to +do is add a reference to debSystem in apt-pkg/init.cc, +assert(&debSystem == 0) would be fine for instance. + Guidelines ~~~~~~~~~~ I am not interested in making 'ultra portable code'. I will accept patches @@ -27,12 +36,12 @@ functionality. Patches to make autoconf detect these cases and generate the required shims are OK. Current shims: - * C9x integer types 'inttypes.h' - * sys/statvfs.h to convert from BSD/Linux statfs to SUS statvfs + * C99 integer types 'inttypes.h' + * sys/statvfs.h to convert from BSD/old-glibc statfs to SUS statvfs * rfc2553 hostname resolution (methods/rfc*), shims to normal gethostbyname. The more adventerous could steal the KAME IPv6 enabled resolvers for those OS's with IPv6 support but no rfc2553 (why?) - * define _XOPEN_EXTENDES_SOURCE to bring in h_errno on HP-UX + * define _XOPEN_EXTENDED_SOURCE to bring in h_errno on HP-UX * socklen_t shim in netdb.h if the OS does not have socklen_t The only completely non-shimed OS is Linux with glibc2.1, glibc2.0 requires @@ -42,24 +51,29 @@ Platform Notes ~~~~~~~~~~~~~~ Debian GNU Linux 2.1 'slink' Debian GNU Linux 'potato' +Debian GNU Linux 'woody' * All Archs - Works flawlessly - - You will want to have debiandoc-sgml and yodl installed to get + - You will want to have debiandoc-sgml and docbook2man installed to get best results. - No IPv6 Support in glibc's < 2.1. Sun Solaris SunOS cab101 5.7 Generic_106541-04 sun4u sparc + SunOS csu201 5.8 Generic_108528-04 sun4u sparc - Works fine - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution OpenBSD OpenBSD gsb086 2.5 CMPUT#0 i386 unknown - - Works fine + OpenBSD csu101 2.7 CMPUT#1 i386 unknown - OS needs 'ranlib' to generate the symbol table after 'ar'.. (not using GNU ar with the gnu tool chain :<) - - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution - + - '2.5' does not have RFC 2553 hostname resolution, but '2.7' does + - Testing on '2.7' suggests the OS has a bug in its handling of + ftruncate on files that have been written via mmap. It fills the page + that crosses the truncation boundary with 0's. + HP-UX HP-UX nyquist B.10.20 C 9000/780 2016574337 32-user license - Evil OS, does not conform very well to SUS diff --git a/apt/CVS/Entries b/apt/CVS/Entries deleted file mode 100644 index e3bed12..0000000 --- a/apt/CVS/Entries +++ /dev/null @@ -1,30 +0,0 @@ -/AUTHORS.RPM/1.4/Wed Aug 1 21:35:12 2001// -/Makefile/1.4/Wed Aug 1 22:05:11 2001// -D/apt-pkg//// -D/buildlib//// -D/cmdline//// -D/debian//// -D/deity//// -D/doc//// -D/dselect//// -D/gui//// -D/intl//// -D/methods//// -D/po//// -D/test//// -D/tools//// -/AUTHORS/1.1.1.1/Fri Aug 10 13:57:00 2001// -/COMPILING/1.1.1.1/Fri Aug 10 13:57:00 2001// -/COPYING/1.1.1.1/Fri Aug 10 13:57:01 2001// -/COPYING.GPL/1.1.1.1/Fri Aug 10 13:57:02 2001// -/ChangeLog/1.2/Fri Aug 10 13:57:23 2001// -/README.RPM/1.12/Fri Aug 10 13:57:23 2001// -/README.make/1.1.1.1/Fri Aug 10 13:57:24 2001// -/REPOSITORIO-APT-HOWTO/1.2/Fri Aug 10 13:57:24 2001// -/TODO/1.2/Fri Aug 10 13:57:24 2001// -/apt.dia/1.3/Fri Aug 10 13:57:26 2001// -/docs.tar.gz/1.1/Fri Aug 10 13:58:18 2001// -/mkinstalldirs/1.1/Fri Aug 10 13:58:18 2001// -/rpmpriorities/1.2/Fri Aug 10 13:58:19 2001// -/configure.in/1.75/Wed Mar 6 17:17:10 2002// -/release/1.73/Wed Mar 6 17:17:10 2002// diff --git a/apt/CVS/Repository b/apt/CVS/Repository deleted file mode 100644 index 935fcea..0000000 --- a/apt/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt diff --git a/apt/CVS/Root b/apt/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/ChangeLog b/apt/ChangeLog deleted file mode 100644 index 402e058..0000000 --- a/apt/ChangeLog +++ /dev/null @@ -1,1780 +0,0 @@ -2002-01-14 18:53 kojima - - * release, apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmversion.cc: fixed - bug in order of rpm --nodeps - -2001-12-12 16:50 kojima - - * tools/: genbasedir, gensrclist.cc: fixed genbasedir for --flat - and relative --topdir specifications fixed --flat in gensrclist - -2001-12-11 22:50 kojima - - * configure.in, release, apt-pkg/pkgcachegen.cc, - apt-pkg/rpm/rpmlistparser.cc: minor fixes release cnc55 - -2001-12-11 15:51 kojima - - * tools/gensrclist.cc: added --flat option to srclist, patched - gensrclist with stelian's patch - -2001-11-30 22:40 kojima - - * tools/: genbasedir, genpkglist.cc: patched --progress stuff from - stelian - -2001-11-30 22:34 kojima - - * configure.in, release, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmlistparser.h, apt-pkg/rpm/rpmpm.cc, methods/rsh.cc, - methods/rsh.h: added RPM::IgnorePkgs kluge - -2001-11-13 22:33 kojima - - * deity/: anchor.cc, anchor.h, basic.cc, basic.h, button.cc, - button.h, columnbar.cc, columnbar.h, event.cc, event.h, gpmdev.cc, - gpmdev.h, graphics.cc, graphics.h, makefile, menubar.cc, menubar.h, - notify.cc, notify.h, progress.cc, progress.h, selectloop.cc, - selectloop.h, slangdev.cc, slangdev.h, tabdialog.cc, tabdialog.h, - textwidg.cc, textwidg.h, tree.cc, tree.h, utils.cc, utils.h, - widget-thread.cc, widget-thread.h, widget.cc, widget.h, - widgetinit.cc, widgetinit.h, window.cc, window.h, x11dev.cc, - x11dev.h, x11xpm.cc, xpm.cc, xpm.h: removed junk - -2001-11-13 20:00 kojima - - * cmdline/apt-get.cc: removed stale code - -2001-11-13 19:32 kojima - - * configure.in, release, apt-pkg/algorithms.cc, - apt-pkg/depcache.cc, apt-pkg/depcache.h, apt-pkg/packagemanager.cc, - apt-pkg/contrib/i18n.h, apt-pkg/contrib/progress.cc, - apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpminit.cc, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmpackagedata.cc, - apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmsrcrecords.cc, - cmdline/apt-cdrom.cc, cmdline/apt-get.cc, methods/gpg.cc, - po/POTFILES.in, po/ru.po, tools/cached_md5.cc: Patches from Dmitry - Levin apt-0.3.19cnc52-configure.patch -- patch - for configure to add Russian - translation and better support of - RPM4's db3 usage. apt-0.3.19cnc52-i18n.patch -- i18n patch. - All APT messages now can be - localized. apt-0.3.19cnc52-replace-support.patch - -- support for Replace option. It is - better detection whether package is truly - removed or is going to be replaced by - package with different name. Patch from - Ivan Zakharyashev: apt-cdrom.newfix_imz.patch -- Fixes - apt-cdrom to better manage - repository search when CD has both RPMS - and SRPMS. Alexander Bokovoy : - apt-gpg-pubring.patch -- uses --homedir instead of - --keyring option to GPG. It is - generally better because you - also can specify GPG options in - ${Apt::GPG::PubringPath}/options - apt-ru.po -- updated Russian translation for - APT (Dmitry Levin and me). - -2001-11-12 18:34 kojima - - * apt-pkg/: acquire-item.cc, acquire-item.h, sourcelist.cc, - sourcelist.h: cleanup half-way mirror support - -2001-11-12 18:04 kojima - - * configure.in, release, apt-pkg/acquire-item.cc, - apt-pkg/acquire-item.h, apt-pkg/pkgcachegen.cc, - apt-pkg/sourcelist.cc, apt-pkg/sourcelist.h, - apt-pkg/contrib/error.cc, apt-pkg/rpm/rpmpm.cc, - apt-pkg/rpm/rpmpm.h, buildlib/archtable, cmdline/apt-get.cc, - methods/connect.cc, po/pt_BR.po, tools/Makefile: added -K option, - new release (cnc53) - -2001-11-09 23:14 kojima - - * configure.in: * Enables configure to autodetect the - presence of - rpmdb library, enabling apt to build correctly - on RedHat 7.2 as well as oldest versions. - -2001-11-09 23:13 kojima - - * tools/genbasedir: * Skips correctly over empty package - directories - - * Adds the --bz2only argument which makes genbasedir - to generate only the .bz2 compressed versions of pkglist - and srclist (space gain...) - - * Doesn't change the timestamps on pkglists/srclists if - the contents are not modified (making possible for example - to make several consecutive runs of genbasedir without - having the apt clients download the indexes again and - again). - - * Some minor cleanups (remove the temporary files in /tmp - at the end of the script etc). - -2001-11-09 23:13 kojima - - * tools/genpkglist.cc: * Corrects the use of 'scandir' and - makes genpkglist behave - correctly when it finds empty RPMS directories (instead of - dumping core). - - * Better package progression indicator. - -2001-11-09 23:11 kojima - - * tools/gensrclist.cc: * Use 'scandir' for directory traversal - (instead of opendir/ readdir) like in genpkglist. * Better - package progression indicator. - -2001-08-07 23:46 kojima - - * tools/: Makefile, cached_md5.cc, cached_md5.h, genpkglist.cc, - gensrclist.cc: Alexander Bokovoy 's - patch for cleaning up genpkglist - -2001-08-02 19:28 kojima - - * configure.in: [no log message] - -2001-08-02 17:38 kojima - - * configure.in: [no log message] - -2001-08-02 17:30 kojima - - * configure.in, buildlib/configure.mak: various make fixes - -2001-08-02 17:15 kojima - - * buildlib/fail.mak: [no log message] - -2001-08-02 01:11 kojima - - * configure.in: readded po dir - -2001-08-02 01:05 kojima - - * Makefile: readded tools dir - -2001-08-02 00:57 kojima - - * release, apt-pkg/rpm/rpmpm.cc, cmdline/apt-cache.cc, - cmdline/apt-cdrom.cc, cmdline/apt-config.cc, cmdline/apt-get.cc: - fixed tipoes - -2001-08-02 00:38 kojima - - * aclocal.m4: removed stale file - -2001-08-02 00:35 kojima - - * AUTHORS.RPM, Makefile, acinclude.m4, aclocal.m4, configure.in, - apt-pkg/init.cc, apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpminit.cc, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmpm.cc, - apt-pkg/rpm/rpmrecords.cc, methods/file.cc: misc changes bug fix in - file method with auth start using 0.5 build system - -2001-08-02 00:31 kojima - - * buildlib/: config.guess, config.h.in, config.sub, copy.mak, - debiandoc.mak, defaults.mak, environment.mak.in, library.mak, - makefile.in, manpage.mak, mkChangeLog, ostable, program.mak, - sizetable, staticlibrary.mak, tools.m4: added ostable updated to - 0.5 buildsystem - -2001-07-13 00:47 kojima - - * configure.in, release, apt-pkg/cachefile.cc, apt-pkg/cachefile.h, - apt-pkg/depcache.cc, apt-pkg/pkgcachegen.cc, - apt-pkg/systemfactory.cc, apt-pkg/contrib/error.cc, - apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpminit.cc, - apt-pkg/rpm/rpmpackagedata.cc, apt-pkg/rpm/rpmpm.cc, - cmdline/apt-cache.cc, cmdline/apt-get.cc, methods/gpg.cc, - po/pt_BR.po, tools/genpkglist.cc, tools/gensrclist.cc, - tools/hdlist2pkglist.cc: ignore duplicated version/diff deps - packages new release (cnc51) - -2001-06-29 09:49 kojima - - * configure.in, release, cmdline/apt-cdrom.cc: fixed bug in - apt-cdrom detection of srclists - -2001-06-27 23:47 kojima - - * configure.in, release: new release - -2001-06-27 23:37 kojima - - * apt-pkg/rpm/: rpminit.cc, rpmpm.cc, rpmpm.h: added --nodeps when - isntalling packages - -2001-06-26 06:51 kojima - - * apt-pkg/: init.cc, rpm/rpmpackagedata.cc: added config option - Dir::Etc::RpmPriorities - -2001-06-26 01:35 kojima - - * configure.in, release, apt-pkg/rpm/rpmpm.cc: added - RPM::AutoRebuildDB - -2001-06-25 19:16 kojima - - * apt-pkg/pkgcache.cc, apt-pkg/rpm/rpminit.cc, cmdline/apt-get.cc, - methods/cdrom.cc: added some misc enhancements - -2001-06-22 21:21 kojima - - * configure.in, release, apt-pkg/rpm/rpmlistparser.cc, - cmdline/apt-get.cc: removed debug msg fixed HoldPkgs - -2001-06-19 21:08 kojima - - * configure.in, release: new release - -2001-06-19 18:19 kojima - - * apt-pkg/rpm/rpminit.cc: iterate over Packages instead of Names to - figure package coutn - -2001-06-18 23:52 kojima - - * apt-pkg/rpm/rpmfactory.cc: fixed arch selection - -2001-06-16 04:59 kojima - - * apt-pkg/acquire-item.cc: added a delay before file fetch retry - -2001-06-16 04:51 kojima - - * release, cmdline/apt-get.cc, methods/cdrom.cc: added - acquire::cdrom::copy which will copy all files from all cds before - installing - -2001-06-16 04:50 kojima - - * apt-pkg/: acquire-item.cc, acquire-method.cc, acquire.cc, - packagemanager.cc: fixed typos - -2001-06-14 01:29 kojima - - * configure.in, apt-pkg/sourcelist.cc, apt-pkg/rpm/rpmfactory.cc, - apt-pkg/rpm/rpminit.cc, cmdline/apt-cdrom.cc: fixed cache update - progress info - -2001-06-11 20:57 kojima - - * configure.in, release, apt-pkg/init.cc, tools/Makefile: [no log - message] - -2001-06-11 20:56 kojima - - * apt-pkg/rpm/: rpmlistparser.cc, rpmlistparser.h: added holdpkgs - and renamed allowedduppackages -> allowedduppkgs - -2001-06-05 20:14 kojima - - * release, apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmrecords.h, - cmdline/apt-get.cc: added rpm::post-invoke-pkgs - -2001-06-05 15:26 kojima - - * tools/genpkglist.cc: added fileflags tag to pkglist - -2001-05-21 18:01 kojima - - * apt-pkg/rpm/rpminit.cc: consertado: mrbrocoli: Parece - que o apt está dando core-dump quando executando "apt-get install - blah" como usuário normal. Não sei se vais ter tempo de ver isso ou - se mando pro bugzilla... - -2001-05-18 20:55 kojima - - * configure.in: new release - -2001-05-18 20:55 kojima - - * apt-pkg/rpm/rpmsrcrecords.cc: fixed apt-get source crash bug - -2001-05-18 20:38 kojima - - * apt-pkg/rpm/rpminit.cc: fixed bug with record offset tracking in - rpm4 - -2001-05-18 03:45 kojima - - * apt-pkg/: acquire-item.cc, acquire-item.h: added Acquire::Retries - to pkglist and hashfile retrieval - -2001-05-18 01:28 kojima - - * release, cmdline/makefile: [no log message] - -2001-05-18 01:22 kojima - - * configure.in: [no log message] - -2001-05-18 01:22 kojima - - * apt-pkg/rpm/rpminit.cc, cmdline/makefile: fixed dumb errors.. - -2001-05-18 01:18 kojima - - * release, apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpminit.cc, - apt-pkg/rpm/rpminit.h, apt-pkg/rpm/rpmlistparser.cc, - buildlib/archtable, cmdline/apt-cache.cc, cmdline/apt-get.cc, - cmdline/makefile: merged patches for ia64, some code cleanup on - rpminit (niemeyer) and cosmetic line-break stuff (vanyaz) - -2001-03-29 23:19 kojima - - * apt-pkg/rpm/: rpminit.cc, rpmpm.cc: rpmdbrebuild fixes - -2001-03-29 23:19 kojima - - * configure.in: new release - -2001-03-29 22:11 kojima - - * apt-pkg/rpm/rpmpm.cc: rpmrebuild on rpm upgrade - -2001-03-28 00:18 kojima - - * configure.in: new release - -2001-03-28 00:18 kojima - - * apt-pkg/: depcache.cc, makefile, packagemanager.cc, - pkgcachegen.cc, contrib/sptr.h: started backport of (commented out) - new MarkInstall from 0.5 custom, stripped down OrderInstall() - -2001-03-23 20:25 kojima - - * apt-pkg/rpm/: rpmfactory.cc, rpmrecords.cc: extra headers for rpm - stuff - -2001-03-23 18:52 kojima - - * configure.in: new release - -2001-03-23 18:47 kojima - - * apt-pkg/rpm/: rpmfactory.cc, rpmrecords.cc: fixed bug with rpm4 - -2001-03-22 14:11 kojima - - * apt-pkg/algorithms.cc: uncommented previous fix on dep resolver - :P - -2001-03-22 14:03 kojima - - * configure.in: new release (38) - -2001-03-22 14:01 kojima - - * AUTHORS.RPM, configure.in, rpmpriorities, apt-pkg/depcache.cc, - apt-pkg/packagemanager.cc, apt-pkg/pkgcachegen.cc, - apt-pkg/sourcelist.h, cmdline/apt-cache.cc, cmdline/apt-get.cc, - methods/gpg.cc, methods/gzip.cc, methods/makefile, po/it_IT.po, - po/pt_BR.po: italian potfile many fixes - -2001-03-22 14:00 kojima - - * apt-pkg/algorithms.cc: fixed upstream bug on dep resolution - -2001-03-11 16:36 claudio - - * tools/genbasedir: Added appropriate message at the end of script. - -2001-02-20 20:20 kojima - - * configure.in, release, methods/ftp.cc, methods/http.cc: fixed - bugs in no_proxy handling - -2001-02-17 21:36 kojima - - * configure.in, release, apt-pkg/acquire-item.cc, - apt-pkg/cachefile.cc, apt-pkg/cachefile.h, - apt-pkg/packagemanager.cc, apt-pkg/pkgcache.cc, - apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpminit.cc, - apt-pkg/rpm/rpminit.h, apt-pkg/rpm/rpmlistparser.cc: fixed arch - selection code. really. this time it works. I SWEAR IT DOES!!! - -2001-02-15 00:42 kojima - - * configure.in: new release - -2001-02-15 00:41 kojima - - * apt-pkg/: pkgcache.cc, rpm/rpmlistparser.cc: fixed problem with - package name case sensitiveness - -2001-02-14 21:59 kojima - - * configure.in, release, apt-pkg/rpm/rpminit.cc: [no log message] - -2001-02-14 21:51 kojima - - * release, apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmpm.cc, cmdline/apt-get.cc: [no log message] - -2001-01-25 01:07 kojima - - * configure.in: new release - -2001-01-25 01:07 kojima - - * apt-pkg/rpm/: rpmpm.cc, rpmpm.h: added hooks for GUI - -2001-01-24 20:42 kojima - - * configure.in, release, apt-pkg/rpm/rpmfactory.cc, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmrecords.cc, - cmdline/apt-get.cc: fixed prob with rpm4 - -2001-01-19 19:32 kojima - - * apt-pkg/: makefile, rpm/rpmlistparser.cc, rpm/rpmpackagedata.h: - fixed bug with section/priority in packages - -2001-01-19 17:23 kojima - - * po/pt_BR.po: [no log message] - -2001-01-18 02:36 kojima - - * apt-pkg/rpm/: rpmfactory.cc, rpmlistparser.cc: fixed arch - selection bug - -2001-01-16 21:28 kojima - - * configure.in, release, po/es_ES.po, po/pt_BR.po: updated potfiles - new release - -2001-01-16 01:58 kojima - - * apt-pkg/: depcache.cc, rpm/rpmversion.cc: fixed bug upgrading - packages and missing reverse dependency upgrades - -2001-01-15 20:14 kojima - - * configure.in, release, apt-pkg/rpm/rpminit.h: new release - -2001-01-15 17:29 kojima - - * po/: es_ES.po, pt_BR.po: new potfiles - -2001-01-13 19:05 kojima - - * release, apt-pkg/cachefile.cc, apt-pkg/rpm/rpminit.cc, - apt-pkg/rpm/rpminit.h, cmdline/apt-cache.cc: fixed a few bugs - -2001-01-13 04:17 kojima - - * configure.in: new release - -2001-01-13 03:50 kojima - - * apt-pkg/: packagemanager.cc, rpm/rpmlistparser.cc, - rpm/rpmlistparser.h, rpm/rpmrecords.cc: fixed early remove bug with - vim-enhanced prob - -2001-01-11 04:03 kojima - - * release, apt-pkg/acquire-item.cc, apt-pkg/acquire-worker.cc, - apt-pkg/acquire.cc, apt-pkg/cachefile.cc, apt-pkg/clean.cc, - apt-pkg/depcache.cc, apt-pkg/packagemanager.cc, - apt-pkg/pkgcache.cc, apt-pkg/pkgcachegen.cc, apt-pkg/pkgrecords.cc, - apt-pkg/sourcelist.cc, apt-pkg/srcrecords.cc, - apt-pkg/systemfactory.cc, apt-pkg/tagfile.cc, - apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmlistparser.h, apt-pkg/rpm/rpmrecords.cc, - po/POTFILES.in, po/apt.pot, po/cat-id-tbl.c, po/es_ES.po, - po/pt_BR.po: fixed several bugs - -2001-01-04 23:26 kojima - - * AUTHORS.RPM, configure.in, release, apt-pkg/acquire-item.cc, - apt-pkg/acquire-method.cc, apt-pkg/sourcelist.h, - apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmrecords.cc, - apt-pkg/rpm/rpmsrcrecords.cc, buildlib/config.guess, - cmdline/apt-cdrom.cc, cmdline/apt-get.cc, doc/apt-cache.8, - doc/apt.conf.5, doc/sources.list.5, doc/vendors.list.5, - doc/examples/configure-index, methods/gpg.cc, tools/genbasedir, - tools/genpkglist.cc: fixed some mem leaks - -2001-01-02 16:08 kojima - - * apt-pkg/rpm/rpmrecords.cc: fixed mem leaks - -2000-12-10 15:42 claudio - - * tools/genbasedir: Added linefeeds to usage message, replaced - spaces for tabs - -2000-12-05 22:51 kojima - - * release, apt-pkg/acquire-item.cc, apt-pkg/acquire-item.h, - apt-pkg/sourcelist.cc: finished md5 verificatoin of already - downloaded files - -2000-12-05 18:40 kojima - - * apt-pkg/rpm/rpmlistparser.cc: fixed stupid bug in arch handling - -2000-12-05 06:28 kojima - - * apt-pkg/: pkgcachegen.cc, rpm/rpmlistparser.cc: removed some - debug msgs - -2000-12-05 06:17 kojima - - * apt-pkg/rpm/rpmfactory.cc: fixed bug in arch selection - -2000-12-05 06:07 kojima - - * apt-pkg/rpm/rpmfactory.cc: temp bla - -2000-12-05 05:56 kojima - - * apt-pkg/rpm/rpmlistparser.cc: fixed bug in rpmlistparser, wrt - arch selection - -2000-12-05 05:30 kojima - - * apt-pkg/: init.cc, pkgcachegen.cc, systemfactory.h, - rpm/rpmfactory.cc, rpm/rpmfactory.h, rpm/rpmlistparser.cc, - rpm/rpmlistparser.h: remade multi-arch support - -2000-12-04 22:16 kojima - - * apt-pkg/pkgcachegen.cc: tmp test stuff for arch - -2000-12-04 21:15 kojima - - * configure.in, release, apt-pkg/acquire-item.cc, apt-pkg/init.cc, - apt-pkg/pkgcachegen.cc, apt-pkg/rpm/rpmfactory.cc, - apt-pkg/rpm/rpmfactory.h, apt-pkg/rpm/rpmlistparser.cc, - cmdline/apt-get.cc: added some architecture handling stuffs - -2000-12-02 20:44 kojima - - * apt-pkg/rpm/rpmlistparser.cc: fixed stupid little bug - -2000-12-02 20:02 kojima - - * apt-pkg/: acquire-item.cc, packagemanager.cc, pkgcachegen.cc, - pkgcachegen.h, systemfactory.h, rpm/rpmfactory.cc, - rpm/rpmfactory.h, rpm/rpmlistparser.cc, rpm/rpmlistparser.h, - rpm/rpmpm.cc: added better multi-architecture support - -2000-12-02 17:48 kojima - - * apt-pkg/rpm/rpmlistparser.cc: merged PreReq and Req into Depends - -2000-12-01 00:12 kojima - - * apt-pkg/rpm/rpmfactory.cc: fixed crash with apt-get source when - srclist is undownloaded - -2000-11-30 20:31 kojima - - * tools/genpkglist.cc: removed kluges in filelist stripper and - added a --bloat flag - -2000-11-29 22:27 kojima - - * apt-pkg/rpm/rpmlistparser.cc: made all packages that are - installed ignore the architecture check - -2000-11-29 22:13 kojima - - * tools/genpkglist.cc: added lib to filelist - -2000-11-29 21:48 kojima - - * tools/genpkglist.cc: include /etc files in list of files in - pkglist - -2000-11-28 00:02 kojima - - * apt-pkg/rpm/rpmlistparser.cc: fixed more rpm4 incompats - -2000-11-27 23:00 kojima - - * apt-pkg/rpm/: rpminit.cc, rpmlistparser.cc: added handling of - rpmlib(blal) style requires - -2000-11-27 22:23 kojima - - * apt-pkg/rpm/rpminit.cc: fixed some more rpm4 compat stuff - -2000-11-27 20:39 kojima - - * apt-pkg/rpm/: rpmfactory.cc, rpminit.cc, rpmrecords.cc: some new - rpm4 compat changes - -2000-11-27 20:01 kojima - - * doc/pt_BR/: apt-cache.8, apt-cdrom.8, apt-config.8, apt-get.8, - apt.8, apt.conf.5, sources.list.5, vendors.list.5: added portuguese - transl. of docs - -2000-11-08 23:30 kojima - - * configure.in, release, apt-pkg/sourcelist.cc, tools/genbasedir: - fixed bug in release retrieval code - -2000-11-08 22:40 kojima - - * tools/genbasedir: fixed compat prob with bash1 - -2000-11-08 21:09 kojima - - * apt-pkg/rpm/: rpminit.cc, rpminit.h: fixed bug with rpm4 support - -2000-11-08 20:25 kojima - - * TODO, configure.in, apt-pkg/rpm/rpminit.h, buildlib/config.h.in, - buildlib/environment.mak.in, cmdline/makefile, methods/makefile, - po/pt_BR.po, tools/Makefile: support for rpm4 - -2000-11-08 19:52 kojima - - * apt-pkg/rpm/rpminit.cc: added support for rpm4 - -2000-11-06 18:36 kojima - - * README.RPM: updated docs to point at HOWTO - -2000-11-06 14:53 kojima - - * configure.in, release, apt-pkg/acquire.h, apt-pkg/algorithms.cc, - apt-pkg/pkgcachegen.h, apt-pkg/systemfactory.cc, - apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmsrcrecords.cc, - cmdline/apt-cache.cc, cmdline/apt-cdrom.cc, cmdline/apt-get.cc, - cmdline/rpmindexcopy.cc, tools/genbasedir, tools/genpkglist.cc, - tools/gensrclist.cc, tools/hdlist2pkglist.cc: fixed compile errors - for RedHat 6.x (with gcc -Wall -Werror) - -2000-11-02 23:04 kojima - - * apt-pkg/: sourcelist.cc, rpm/rpmlistparser.cc: fixed bug in - vendor authentication - -2000-11-02 03:44 kojima - - * po/pt_BR.po: fixed trans - -2000-11-02 00:38 kojima - - * apt-pkg/init.cc: [no log message] - -2000-11-02 00:29 kojima - - * doc/: apt-cache.8.pt_BR, apt-cdrom.8.pt_BR, apt-config.8.pt_BR, - apt-get.8.pt_BR, apt.8.pt_BR, apt.conf.5.pt_BR, makefile, - sources.list.5.pt_BR, vendors.list.5.pt_BR: fixed manpage dir struc - -2000-11-01 23:54 kojima - - * configure.in, release, doc/makefile: fixed manpage makefile - -2000-11-01 23:32 kojima - - * doc/apt-cache.8, doc/apt-cache.8.pt_BR, doc/apt-cdrom.8.pt_BR, - doc/apt-config.8.pt_BR, doc/apt-get.8, doc/apt-get.8.pt_BR, - doc/apt.8.pt_BR, doc/apt.conf.5.pt_BR, doc/sources.list.5.pt_BR, - doc/vendors.list.5.pt_BR, tools/genpkglist.cc, tools/gensrclist.cc: - added manpage - -2000-11-01 20:27 kojima - - * tools/: Makefile, genpkglist.cc, gensrclist.cc, - hdlist2pkglist.cc: added md5 caching to pkglist generators - -2000-10-31 22:30 kojima - - * configure.in, release, apt-pkg/init.cc, cmdline/apt-get.cc, - doc/apt-cache.8, methods/ftp.cc, methods/http.cc, tools/Makefile, - tools/genbasedir, tools/genpkglist.cc: some updates - -2000-10-30 20:49 kojima - - * apt-pkg/sourcelist.cc, apt-pkg/contrib/configuration.cc, - apt-pkg/contrib/configuration.h, apt-pkg/contrib/strutl.cc, - apt-pkg/contrib/strutl.h, doc/sources.list.5, doc/vendors.list.5, - doc/examples/vendors.list: new vendor.list format and parser, from - Jason - -2000-10-30 18:41 kojima - - * tools/genbasedir: fixed genbasedir - -2000-10-30 04:17 kojima - - * configure.in, release, apt-pkg/sourcelist.cc, cmdline/apt-get.cc, - tools/genbasedir, tools/gensrclist.cc: fixed bugs in source d/l - -2000-10-29 23:50 kojima - - * configure.in: new release - -2000-10-29 23:49 kojima - - * tools/: genbasedir, genpkglist.cc: fixed gensrclist/pkglist bug - -2000-10-29 22:37 kojima - - * configure.in, release: new release - -2000-10-29 22:25 kojima - - * apt-pkg/rpm/: rpmsrcrecords.cc, rpmsrcrecords.h: srcrecord for - rpm - -2000-10-29 22:25 kojima - - * release, apt-pkg/makefile, apt-pkg/pkgrecords.cc, - apt-pkg/sourcelist.cc, apt-pkg/srcrecords.cc, apt-pkg/srcrecords.h, - apt-pkg/systemfactory.h, apt-pkg/deb/debfactory.cc, - apt-pkg/deb/debfactory.h, apt-pkg/deb/debsrcrecords.cc, - apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpmfactory.h, - apt-pkg/rpm/rpminit.h, apt-pkg/rpm/rpmpm.cc, - apt-pkg/rpm/rpmrecords.cc, cmdline/apt-get.cc, tools/genpkglist.cc, - tools/gensrclist.cc: added support for source download - -2000-10-28 05:23 kojima - - * apt-pkg/sourcelist.cc, cmdline/apt-get.cc, tools/Makefile, - tools/gensrclist.cc: started source support - -2000-10-28 04:49 kojima - - * configure.in: new release - -2000-10-28 04:48 kojima - - * apt-pkg/depcache.cc, apt-pkg/pkgrecords.h, - apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpmfactory.h, - apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmlistparser.h, apt-pkg/rpm/rpmrecords.h, - cmdline/apt-cache.cc, po/apt.pot, po/cat-id-tbl.c, po/es_ES.po, - po/pt_BR.po: fixed bug with apt-cache fixed bug with package - descriptions/pkgRecords - -2000-10-27 00:15 kojima - - * release, apt-pkg/orderlist.cc, apt-pkg/pkgcache.cc, - tools/genpkglist.cc: [no log message] - -2000-10-26 19:32 kojima - - * doc/makefile: updated doc manpage - -2000-10-26 19:23 kojima - - * release, apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpmpm.cc, - configure.in: new release - -2000-10-26 19:22 kojima - - * doc/: apt-cache.8, apt-cdrom.8, apt-config.8, apt-get.8, apt.8, - apt.conf.5, sources.list.5, vendors.list.5: updated manpages for - cnc - -2000-10-25 20:17 kojima - - * tools/genbasedir: [no log message] - -2000-10-25 18:49 kojima - - * configure.in: new release - -2000-10-25 18:48 kojima - - * release, apt-pkg/rpm/rpmrecords.cc, cmdline/apt-get.cc, - tools/genbasedir: [no log message] - -2000-10-23 17:31 kojima - - * tools/genbasedir: [no log message] - -2000-10-22 23:08 kojima - - * release, buildlib/makefile.in: [no log message] - -2000-10-22 23:05 kojima - - * tools/genpkglist.c: [no log message] - -2000-10-22 22:57 kojima - - * tools/genpkglist.cc: added new c++ genpkglist - -2000-10-22 22:49 kojima - - * configure.in, release: new release - -2000-10-22 22:48 kojima - - * Makefile, release, apt-pkg/rpm/extra_rpmtags.h, - apt-pkg/rpm/rpminit.h, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmpackagedata.cc, apt-pkg/rpm/rpmpackagedata.h, - apt-pkg/rpm/rpmpm.h, apt-pkg/rpm/rpmrecords.cc, - cmdline/apt-cache.cc, cmdline/apt-get.cc, cmdline/makefile, - tools/Makefile: added upgrade summary information - -2000-10-21 21:30 kojima - - * configure.in, release: new release - -2000-10-21 21:29 kojima - - * apt-pkg/: packagemanager.cc, rpm/rpmlistparser.cc: added release - # to the kernel name hack for supporting multiple installed - versions - -2000-10-19 22:33 claudio - - * ChangeLog: Updated from CVS logs. - -2000-10-19 22:32 claudio - - * tools/: genbasedir, genpkglist.c: Language setting to generate a - consistent pkglist. - -2000-10-19 22:30 claudio - - * po/: es_ES.po, pt_BR.po: Updated es_ES, pt_BR translations. - -2000-10-19 22:28 claudio - - * apt-pkg/rpm/: rpmfactory.cc, rpminit.cc, rpmlistparser.cc: Fixed - uninitialized variables in dependency checking progress bar. - -2000-10-19 22:26 claudio - - * FAQ, apt.spec, configure: Repository cleanup. - -2000-10-16 22:29 kojima - - * rpmpriorities: added priorities file - -2000-10-16 21:22 kojima - - * apt.spec: [no log message] - -2000-10-16 17:28 kojima - - * apt.spec, configure, release, apt-pkg/rpm/rpmfactory.cc, - apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpminit.h, - apt-pkg/rpm/rpmpm.cc, cmdline/apt-get.cc: [no log message] - -2000-10-15 00:56 kojima - - * apt.spec, configure.in, release, apt-pkg/rpm/rpmlistparser.cc, - cmdline/apt-cache.cc, cmdline/apt-cdrom.cc, cmdline/apt-config.cc, - po/POTFILES.in, po/apt.pot, po/cat-id-tbl.c, tools/genpkglist.c: - i18nlazation of other utilities - -2000-10-14 22:30 kojima - - * apt-pkg/: makefile, systemfactory.cc, rpm/rpmlistparser.cc, - rpm/rpmlistparser.h, rpm/rpmpackagedata.cc, rpm/rpmpackagedata.h: - replaced package priority hardcoded kluge with a dynamic kluge - -2000-10-14 20:19 kojima - - * po/pt_BR.po: updated potfiles - -2000-10-14 03:52 kojima - - * apt.spec, apt.spec.in, apt-pkg/acquire-item.cc, apt-pkg/init.cc, - apt-pkg/sourcelist.cc, apt-pkg/sourcelist.h: cdrom support sutff - and others - -2000-10-14 03:51 kojima - - * cmdline/: apt-cdrom.cc, makefile, rpmindexcopy.cc, - rpmindexcopy.h: support for cdrom stuff - -2000-10-14 03:50 kojima - - * tools/: Makefile, genbasedir, genpkglist.c: genpkglist heuristic - file stripping - -2000-10-13 19:39 kojima - - * apt-pkg/rpm/rpminit.h: - #ifndef RPMINIT_H_ - -2000-10-12 22:31 kojima - - * apt.spec, release, apt-pkg/depcache.cc, apt-pkg/systemfactory.cc, - apt-pkg/rpm/rpmlistparser.cc, cmdline/apt-cdrom.cc, - tools/genbasedir: fixed some stuffs added release file support - -2000-10-11 21:35 kojima - - * apt.spec, configure, configure.in, release, apt-pkg/init.cc, - apt-pkg/systemfactory.cc, apt-pkg/rpm/rpmfactory.cc, - apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmpm.cc: fixed cache up-to-dateness check new release - -2000-10-11 20:51 kojima - - * buildlib/sizetable: fixed buglet in sizetable (tab vs space) - -2000-10-11 01:47 kojima - - * tools/genbasedir: fixed bug in genbasedir - -2000-10-11 00:36 kojima - - * apt-pkg/acquire-item.cc, apt-pkg/sourcelist.cc, - apt-pkg/sourcelist.h, methods/gpg.cc: made gpg stuff use - fingerprints - -2000-10-10 23:19 kojima - - * apt.spec.in, docs.tar, docs.tar.gz: aupdate docs tarball - -2000-10-10 23:05 kojima - - * docs.tar: fixed docs tarball - -2000-10-10 22:56 kojima - - * cmdline/makefile, methods/makefile: make it compile dyamic - -2000-10-10 22:41 kojima - - * apt.spec, buildlib/environment.mak.in: [no log message] - -2000-10-10 21:49 kojima - - * configure: new release - -2000-10-10 21:49 kojima - - * README.RPM, REPOSITORIO-APT-HOWTO, apt.spec.in, configure.in, - docs.tar, release, apt-pkg/acquire-item.cc, apt-pkg/depcache.cc, - apt-pkg/init.cc, apt-pkg/packagemanager.cc, apt-pkg/pkgcachegen.cc, - apt-pkg/sourcelist.cc, apt-pkg/sourcelist.h, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmpm.cc, - buildlib/environment.mak.in, cmdline/apt-get.cc, po/apt.pot, - po/cat-id-tbl.c, po/es_ES.po: new release updates changed - authentication code to comply to Jason's stuff use bzip2 - -2000-10-10 19:37 kojima - - * tools/: genbasedir, genbasedir.tcl, genpkglist.c: updated basedir - generator - -2000-10-05 20:55 kojima - - * po/: es_ES.po, pt_BR.po: updated pots - -2000-09-29 00:51 kojima - - * FAQ, apt.spec, apt.spec.in, release, apt-pkg/contrib/strutl.cc, - apt-pkg/contrib/strutl.h, apt-pkg/rpm/rpmrecords.cc, - cmdline/acqprogress.cc, cmdline/apt-cache.cc, cmdline/apt-get.cc, - tools/mkpackages.c: added claudio's patch to make it work with - aptitude - -2000-09-26 20:03 kojima - - * AUTHORS.RPM: added RPM port credits file - -2000-09-26 19:58 kojima - - * configure, configure.in: enw release - -2000-09-26 19:58 kojima - - * apt.spec, apt.spec.in, release, apt-pkg/contrib/error.cc, - cmdline/apt-get.cc, doc/examples/vendors.list, methods/gpg.cc, - po/apt.pot, po/cat-id-tbl.c, tools/genbasedir.tcl: better msgs for - gpg errors - -2000-09-26 18:05 kojima - - * FAQ: updated with auth stuff - -2000-09-26 17:42 kojima - - * methods/gpg.cc: added gpg method - -2000-09-26 17:37 kojima - - * configure, configure.in, release, apt-pkg/sourcelist.cc: more - authentication stuff new release - -2000-09-26 17:22 kojima - - * REPOSITORIO-APT-HOWTO, apt.spec, apt.spec.in, release, - apt-pkg/acquire-item.cc, apt-pkg/acquire-item.h, - apt-pkg/acquire-method.cc, apt-pkg/acquire-method.h, - apt-pkg/init.cc, apt-pkg/makefile, apt-pkg/packagemanager.h, - apt-pkg/sourcelist.cc, apt-pkg/sourcelist.h, apt-pkg/srcrecords.cc, - apt-pkg/systemfactory.cc, apt-pkg/systemfactory.h, - apt-pkg/contrib/fileutl.cc, apt-pkg/contrib/fileutl.h, - apt-pkg/deb/debfactory.cc, apt-pkg/rpm/rpmfactory.cc, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmlistparser.h, - apt-pkg/rpm/rpmpm.cc, cmdline/apt-get.cc, cmdline/makefile, - methods/makefile, po/apt.pot, po/pt_BR.po: digital signature - authentication - -2000-09-25 23:26 kojima - - * tools/: genbasedir.tcl, genpkglist.c: added base dir generator - -2000-09-22 03:07 kojima - - * po/pt_BR.po: update portug. po - -2000-09-20 20:12 kojima - - * FAQ: updated faq - -2000-09-20 18:20 kojima - - * configure, configure.in: new release - -2000-09-20 18:20 kojima - - * FAQ, apt.spec, apt.spec.in, release, apt-pkg/acquire-item.cc, - apt-pkg/cacheiterators.h, apt-pkg/depcache.cc, apt-pkg/pkgcache.cc, - apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h, - apt-pkg/rpm/rpmfactory.cc, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmpm.h, - apt-pkg/rpm/rpmrecords.cc, cmdline/apt-get.cc, po/pt_BR.po: added - pt_BR potfile added support for duplicated package names - -2000-09-18 21:34 kojima - - * README.RPM, apt.spec, apt.spec.in, configure, configure.in, - release, apt-pkg/acquire-item.cc, apt-pkg/algorithms.cc, - apt-pkg/depcache.cc, apt-pkg/orderlist.cc, - apt-pkg/packagemanager.cc, apt-pkg/pkgcache.cc, apt-pkg/pkgcache.h, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmrecords.cc: new - release fixed md5 stuff - -2000-09-18 20:56 kojima - - * tools/genpkglist.c: fixed bug with md5 data - -2000-09-16 22:37 kojima - - * po/pt_BR.gmo: [no log message] - -2000-09-16 22:36 kojima - - * apt.spec, apt.spec.in, configure, configure.in, release, - apt-pkg/depcache.cc, apt-pkg/init.cc, apt-pkg/pkgcachegen.cc, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmlistparser.h, - apt-pkg/rpm/rpmpm.cc, cmdline/makefile, po/apt.pot, po/pt_BR.gmo: - made obsoleter packages automatically add conflicts new release - -2000-09-16 00:49 kojima - - * po/pt_BR.po: [no log message] - -2000-09-16 00:37 kojima - - * configure, configure.in: added AC_PROG_INSTALL in configure - -2000-09-15 23:06 kojima - - * release, apt-pkg/depcache.cc, apt-pkg/rpm/rpmversion.cc, - cmdline/apt-cache.cc, cmdline/apt-get.cc, po/apt.pot: fixed bug - with versioned requires and unversioned provides - -2000-09-15 22:23 kojima - - * README.RPM: update doc to apt-get isntead of rapt - -2000-09-14 02:27 kojima - - * apt-pkg/: makefile, cnc/cncfactory.cc, cnc/cncfactory.h, - cnc/cncversion.cc, rpm/rpmfactory.cc, rpm/rpmfactory.h, - rpm/rpminit.cc, rpm/rpminit.h, rpm/rpmversion.cc: [no log message] - -2000-09-14 00:58 kojima - - * mkinstalldirs, configure, configure.in: [no log message] - -2000-09-14 00:55 kojima - - * apt.spec, release, intl/ChangeLog, intl/Makefile.in, - intl/VERSION, intl/bindtextdom.c, intl/cat-compat.c, - intl/dcgettext.c, intl/dgettext.c, intl/explodename.c, - intl/finddomain.c, intl/gettext.c, intl/gettext.h, intl/gettextP.h, - intl/hash-string.h, intl/intl-compat.c, intl/l10nflist.c, - intl/libgettext.h, intl/linux-msg.sed, intl/loadinfo.h, - intl/loadmsgcat.c, intl/localealias.c, intl/po2tbl.sed.in, - intl/textdomain.c, intl/xopen-msg.sed: added gettext - -2000-09-14 00:50 kojima - - * apt.spec.in, release, cmdline/apt-get.cc, po/apt.pot: some i18n - updates - -2000-09-14 00:39 kojima - - * FAQ, acinclude.m4, aclocal.m4, apt.spec, apt.spec.in, configure, - configure.in, release, apt-pkg/makefile, apt-pkg/contrib/i18n.h, - apt-pkg/rpm/rpmlistparser.cc, buildlib/acconfig.h, - buildlib/config.h.in, buildlib/environment.mak.in, - cmdline/apt-get.cc, cmdline/makefile, po/Makefile.in.in, - po/POTFILES.in, po/apt.pot, po/cat-id-tbl.c, po/pt_BR.gmo, - po/pt_BR.po, po/stamp-cat-id: i18n - -2000-09-13 17:59 kojima - - * apt-pkg/rpm/rpmlistparser.cc: faster file dependency processing - -2000-09-13 00:58 kojima - - * apt-pkg/algorithms.cc: removed temp test code - -2000-09-13 00:22 kojima - - * apt.spec, apt.spec.in, release, doc/examples/rapt.conf, - doc/examples/rsources.list: new release changed specs - -2000-09-13 00:11 kojima - - * FAQ, apt.spec, apt.spec.in, rapt.spec, rapt.spec.in, release, - apt-pkg/rpm/rpmlistparser.cc, cmdline/apt-cache.cc: new release, - test code to fix prob with conflict/obsolete - -2000-09-13 00:00 kojima - - * doc/examples/rsources.list: fixed typo - -2000-09-12 23:17 kojima - - * apt-pkg/depcache.cc: removed debug msgs - -2000-09-12 23:13 kojima - - * apt-pkg/algorithms.cc: fixed problem with dependencies that can - be resolved by a package that's not installed - -2000-09-12 20:44 kojima - - * doc/examples/rsources.list: config file suitable for outside use - -2000-09-12 20:03 kojima - - * rapt.spec, release, cmdline/makefile: back to static - -2000-09-12 00:04 kojima - - * configure, configure.in, rapt.spec, release, - apt-pkg/algorithms.cc, apt-pkg/depcache.cc, apt-pkg/init.cc, - apt-pkg/sourcelist.cc, apt-pkg/rpm/rpmlistparser.cc, - cmdline/makefile, doc/examples/rsources.list: new release changed - source.list format - -2000-09-06 22:02 kojima - - * configure, configure.in, rapt.spec, release, apt-pkg/init.cc, - apt-pkg/rpm/rpmlistparser.cc, cmdline/makefile, tools/Makefile: new - release fixed bug with versionhashing - -2000-09-06 17:44 kojima - - * rapt.spec, rapt.spec.in: localizado p/ portugues - -2000-09-06 17:34 kojima - - * FAQ, README.RPM, configure, configure.in, prepare, rapt.spec, - rapt.spec.in, release, cmdline/apt-get.cc: renamed everything back - from rapt to apt/apt-get - -2000-09-06 17:04 kojima - - * configure: new release - -2000-09-06 17:03 kojima - - * rapt.spec.in, cmdline/makefile: changed name of binaries - -2000-09-06 16:57 kojima - - * FAQ, configure.in, rapt.spec, rapt.spec.in, release, - apt-pkg/init.cc, apt-pkg/pkgcachegen.cc, - apt-pkg/rpm/rpmlistparser.h: new release changed some error - messages - -2000-09-05 22:21 kojima - - * apt-pkg/rpm/rpmlistparser.cc: added exception package list config - option support - -2000-09-05 20:59 kojima - - * cmdline/apt-get.cc: removed lc_all lang kluge message - -2000-09-05 20:58 kojima - - * tools/genpkglist.c: fix cmd line parse - -2000-09-05 01:29 kojima - - * configure, configure.in: new release - -2000-09-05 01:29 kojima - - * FAQ, rapt.spec, rapt.spec.in, release, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmpm.cc, - cmdline/apt-get.cc: new release added message before exec()ing rpm - temp hack to not upgrade kernel - -2000-09-04 23:39 kojima - - * configure, configure.in, rapt.spec, rapt.spec.in, release: new - version - -2000-09-04 23:39 kojima - - * cmdline/apt-get.cc: put back dist-upgrade - -2000-09-04 23:32 kojima - - * apt-pkg/rpm/rpmlistparser.cc: added tmp hardcoded - essential/required packages - -2000-09-04 18:58 kojima - - * FAQ, configure, configure.in, rapt.spec, rapt.spec.in, release, - cmdline/apt-cache.cc, cmdline/apt-get.cc: updated release +stuffs - -2000-09-04 18:55 kojima - - * apt-pkg/: algorithms.cc, cachefile.cc, depcache.cc, - distrofactory.cc, distrofactory.h, makefile, packagemanager.cc, - pkgcache.cc, pkgcachegen.cc, pkgrecords.cc, systemfactory.cc, - systemfactory.h, version.cc, cnc/cncfactory.h, deb/debfactory.h, - rpm/rpminit.h, rpm/rpmlistparser.cc: renamed abstract distribut6ion - factory to from distro to system added temp kluge to add - essential/important tags to packages - -2000-09-01 03:12 kojima - - * rapt.spec, release, apt-pkg/distrofactory.cc: remove debug msg - -2000-09-01 03:12 kojima - - * doc/examples/rsources.list: fixed typo - -2000-09-01 02:53 kojima - - * apt-pkg/contrib/progress.cc, cmdline/apt-get.cc: fixed prob with - progress update ingterval - -2000-09-01 02:50 kojima - - * configure, configure.in, rapt.spec, release, - apt-pkg/packagemanager.cc, apt-pkg/rpm/rpmpm.cc, - cmdline/apt-get.cc: version 0.6 removed cmd line length limitation - to be passed to rpm by rpmpm - -2000-09-01 02:13 kojima - - * apt-pkg/cnc/cncfactory.cc: progress indicator sorta fixed - -2000-08-31 22:25 kojima - - * release: updated release script - -2000-08-31 22:15 kojima - - * rapt.spec, rapt.spec.in, release, doc/examples/rsources.list: - added zaphod to the list of repositories (to get latest rapt from - here) - -2000-08-31 21:18 kojima - - * configure, configure.in: udpated version to 0.5 - -2000-08-31 21:09 kojima - - * apt-pkg/: acquire-item.cc, rpm/rpmlistparser.cc, - rpm/rpmrecords.cc: fixed problem with provides - -2000-08-31 20:48 kojima - - * apt-pkg/rpm/rpmlistparser.cc: added versioned provides - -2000-08-31 20:42 kojima - - * tools/genpkglist.c: added full provide tags - -2000-08-31 18:52 kojima - - * FAQ: added faq - -2000-08-31 18:50 kojima - - * tools/genpkglist.c: added m5d sum tag to pkglist - -2000-08-31 18:49 kojima - - * apt-pkg/rpm/extra_rpmtags.h: new md5 tag - -2000-08-31 18:48 kojima - - * apt-pkg/rpm/rpmrecords.cc: MD5 sum works - -2000-08-31 16:59 kojima - - * cmdline/apt-cache.cc: fixed rapt-cache show for rpm - -2000-08-31 02:17 kojima - - * apt-pkg/rpm/rpmpm.cc: debug msgs - -2000-08-31 00:50 kojima - - * apt-pkg/rpm/rpmpm.cc: removed debug message for pkg configuration - -2000-08-31 00:27 kojima - - * cmdline/: apt-cache.cc, apt-get.cc: removed stale version.h - -2000-08-31 00:13 kojima - - * cmdline/makefile: changed binary name from rapt to rapt-get - -2000-08-31 00:11 kojima - - * apt-pkg/: orderlist.cc, pkgcachegen.cc, version.cc: removed stale - version.h references - -2000-08-31 00:07 kojima - - * configure, configure.in: updated version - -2000-08-31 00:05 kojima - - * README.RPM, apt-pkg/pkgcachegen.cc, apt-pkg/cnc/cncfactory.h, - apt-pkg/cnc/cncversion.cc, apt-pkg/rpm/rpmlistparser.cc: fixed some - versioning check bugs - -2000-08-30 21:32 kojima - - * apt-pkg/depcache.cc, apt-pkg/distrofactory.h, apt-pkg/makefile, - apt-pkg/packagemanager.cc, apt-pkg/pkgcache.cc, - apt-pkg/pkgcachegen.cc, apt-pkg/version.cc, apt-pkg/version.h, - apt-pkg/cnc/cncfactory.h, apt-pkg/cnc/cncversion.cc, - apt-pkg/rpm/rpmlistparser.cc, cmdline/apt-cache.cc, - cmdline/apt-get.cc, tools/genpkglist.c: made version comparison - code distribution dependent - - added code for rpm version comparison (partially ripped from rpm) - -2000-08-30 17:32 kojima - - * configure: removed architecture kluge - -2000-08-30 17:18 kojima - - * configure, configure.in, rapt.spec, rapt.spec.in, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmlistparser.h, - cmdline/apt-get.cc: fixed ix86 architecture family problem - -2000-08-30 15:04 kojima - - * configure.in: changed ARCHITECTURE define to include the real - machine architecture too, along the family - -2000-08-30 13:46 kojima - - * apt-pkg/rpm/rpmlistparser.cc: added more kluges for ix86 family - detection - -2000-08-30 03:21 kojima - - * apt-pkg/sourcelist.cc: removed some debug msgs - -2000-08-30 02:51 kojima - - * methods/makefile: make everything static - -2000-08-30 02:45 kojima - - * apt-pkg/sourcelist.cc: fixed typo - -2000-08-30 02:32 kojima - - * cmdline/makefile: make everything static - -2000-08-30 01:51 kojima - - * doc/examples/rsources.list: [no log message] - -2000-08-30 00:02 kojima - - * apt-pkg/sourcelist.cc: typo fix - -2000-08-29 23:59 kojima - - * configure, rapt.spec, rapt.spec.in, apt-pkg/sourcelist.cc, - doc/examples/rapt.conf, doc/examples/rsources.list: [no log - message] - -2000-08-29 23:31 kojima - - * buildlib/environment.mak.in: update to make only static lib - -2000-08-29 23:23 kojima - - * configure.in: updated vesion number - -2000-08-29 23:15 kojima - - * rapt.spec, apt-pkg/pkgcachegen.cc, tools/genpkglist.c: [no log - message] - -2000-08-29 23:10 kojima - - * rapt.spec, rapt.spec.in, apt-pkg/sourcelist.cc, - apt-pkg/rpm/rpmpm.cc, cmdline/apt-get.cc, cmdline/makefile: - modified stuff to build as static - -2000-08-29 22:38 kojima - - * README.RPM: [no log message] - -2000-08-29 20:32 kojima - - * README.RPM, apt-pkg/makefile, apt-pkg/rpm/rpmpm.cc, - cmdline/makefile, methods/makefile, tools/genpkglist.c: fixed - problem with halfway system ugprade - -2000-08-26 00:15 kojima - - * apt-pkg/rpm/: rpminit.cc, rpmstatusgen.cc, rpmstatusgen.h: [no - log message] - -2000-08-26 00:07 kojima - - * rapt.spec, apt-pkg/rpm/extra_rpmtags.h, apt-pkg/rpm/rpmpm.cc, - tools/genpkglist.c: [no log message] - -2000-08-25 22:58 kojima - - * apt-pkg/: cachefile.cc, distrofactory.cc, pkgcache.cc, - sourcelist.cc, cnc/cncfactory.cc, rpm/rpmrecords.cc: fixed pkg - cache check - -2000-08-25 22:58 kojima - - * README.RPM: [no log message] - -2000-08-25 17:39 kojima - - * tools/Makefile: [no log message] - -2000-08-25 17:39 kojima - - * cmdline/: apt-cache.cc, apt-get.cc, makefile: updated cmd line - utils - -2000-08-25 17:39 kojima - - * apt-pkg/rpm/: rpmlistparser.cc, rpmlistparser.h, rpmrecords.cc: - fixed list parser and finished reocrd parser - -2000-08-25 17:39 kojima - - * apt-pkg/deb/: debfactory.cc, debfactory.h: updated classes with - new factory methods - -2000-08-25 17:38 kojima - - * apt-pkg/: acquire-item.cc, algorithms.cc, depcache.cc, - depcache.h, distrofactory.cc, distrofactory.h, pkgcachegen.cc, - pkgrecords.cc, pkgrecords.h, cnc/cncfactory.cc, cnc/cncfactory.h: - updated record parsing to rpm - -2000-08-25 17:38 kojima - - * configure.in: version change - -2000-08-22 22:24 kojima - - * apt.dia, rapt.spec, apt-pkg/cachefile.h, apt-pkg/depcache.cc, - apt-pkg/distrofactory.cc, apt-pkg/distrofactory.h, - apt-pkg/makefile, apt-pkg/pkgcachegen.cc, apt-pkg/sourcelist.cc, - apt-pkg/cnc/cncfactory.cc, apt-pkg/cnc/cncfactory.h, - apt-pkg/contrib/fileutl.cc, apt-pkg/deb/debfactory.cc, - apt-pkg/deb/debfactory.h, apt-pkg/rpm/rpminit.cc, - apt-pkg/rpm/rpminit.h, apt-pkg/rpm/rpmlistparser.cc, - apt-pkg/rpm/rpmlistparser.h, apt-pkg/rpm/rpmrecords.cc, - apt-pkg/rpm/rpmrecords.h, cmdline/apt-cache.cc, cmdline/makefile, - tools/mkpackages.c: [no log message] - -2000-08-19 00:08 kojima - - * apt-pkg/cachefile.cc, apt-pkg/distrofactory.cc, - apt-pkg/distrofactory.h, apt-pkg/pkgcachegen.cc, - apt-pkg/pkgcachegen.h, apt-pkg/cnc/cncfactory.cc, - apt-pkg/cnc/cncfactory.h, apt-pkg/deb/debfactory.cc, - apt-pkg/deb/debfactory.h, cmdline/apt-cache.cc, cmdline/makefile: - cache generator abstracted for debian and cnc - -2000-08-17 23:40 kojima - - * README.RPM, apt.dia: documentation update - -2000-08-17 03:31 kojima - - * apt-pkg/rpm/rpmpm.cc: [no log message] - -2000-08-17 00:35 kojima - - * tools/mkpackages.c: [no log message] - -2000-08-11 00:10 kojima - - * README.RPM, prepare, rapt.spec, doc/examples/rapt.conf, - doc/examples/rsources.list: [no log message] - -2000-08-10 23:20 kojima - - * prepare, rapt.spec: [no log message] - -2000-08-10 22:47 kojima - - * tools/: Packages, hdlist.pkgs, status, Makefile, dumprpmdb, - mkpackages, mkstatus, update: [no log message] - -2000-08-10 22:47 kojima - - * prepare: added file - -2000-08-10 22:43 kojima - - * README.RPM, apt.dia, cmdline/apt-get.cc, cmdline/makefile: added - some docs files - -2000-08-10 18:57 kojima - - * status: [no log message] - -2000-08-10 15:42 kojima - - * AUTHORS, COMPILING, COPYING, COPYING.GPL, ChangeLog, Makefile, - README.make, TODO, aclocal.m4, configure, configure.in, status, - cmdline/acqprogress.cc, cmdline/apt-cache.cc, cmdline/apt-get.cc, - cmdline/indexcopy.cc, cmdline/makefile, deity/anchor.cc, - deity/anchor.h, deity/basic.cc, deity/basic.h, deity/button.cc, - deity/button.h, deity/columnbar.cc, deity/columnbar.h, - deity/event.cc, deity/event.h, deity/gpmdev.cc, deity/gpmdev.h, - deity/graphics.cc, deity/graphics.h, deity/makefile, - deity/menubar.cc, deity/menubar.h, deity/notify.cc, deity/notify.h, - deity/progress.cc, deity/progress.h, deity/selectloop.cc, - deity/selectloop.h, deity/slangdev.cc, deity/slangdev.h, - deity/tabdialog.cc, deity/tabdialog.h, deity/textwidg.cc, - deity/textwidg.h, deity/tree.cc, deity/tree.h, deity/utils.cc, - deity/utils.h, deity/widget-thread.cc, deity/widget-thread.h, - deity/widget.cc, deity/widget.h, deity/widgetinit.cc, - deity/widgetinit.h, deity/window.cc, deity/window.h, - deity/x11dev.cc, deity/x11dev.h, deity/x11xpm.cc, deity/xpm.cc, - deity/xpm.h, methods/cdrom.cc, methods/connect.cc, - methods/connect.h, methods/copy.cc, methods/file.cc, - methods/ftp.cc, methods/ftp.h, methods/gzip.cc, methods/http.cc, - methods/http.h, methods/makefile, methods/rfc2553emu.cc, - methods/rfc2553emu.h, apt-pkg/acquire-item.cc, - apt-pkg/acquire-item.h, apt-pkg/acquire-method.cc, - apt-pkg/acquire-method.h, apt-pkg/acquire-worker.cc, - apt-pkg/acquire-worker.h, apt-pkg/acquire.cc, apt-pkg/acquire.h, - apt-pkg/algorithms.cc, apt-pkg/algorithms.h, apt-pkg/cachefile.cc, - apt-pkg/cachefile.h, apt-pkg/cacheiterators.h, apt-pkg/clean.cc, - apt-pkg/clean.h, apt-pkg/depcache.cc, apt-pkg/depcache.h, - apt-pkg/distrofactory.cc, apt-pkg/distrofactory.h, apt-pkg/init.cc, - apt-pkg/init.h, apt-pkg/makefile, apt-pkg/orderlist.cc, - apt-pkg/orderlist.h, apt-pkg/packagemanager.cc, - apt-pkg/packagemanager.h, apt-pkg/pkgcache.cc, apt-pkg/pkgcache.h, - apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h, - apt-pkg/pkgrecords.cc, apt-pkg/pkgrecords.h, apt-pkg/sourcelist.cc, - apt-pkg/sourcelist.h, apt-pkg/srcrecords.cc, apt-pkg/srcrecords.h, - apt-pkg/tagfile.cc, apt-pkg/tagfile.h, apt-pkg/version.cc, - apt-pkg/version.h, apt-pkg/cnc/cncfactory.cc, - apt-pkg/cnc/cncfactory.h, apt-pkg/contrib/cdromutl.cc, - apt-pkg/contrib/cdromutl.h, apt-pkg/contrib/cmndline.cc, - apt-pkg/contrib/cmndline.h, apt-pkg/contrib/configuration.cc, - apt-pkg/contrib/configuration.h, apt-pkg/contrib/crc-16.cc, - apt-pkg/contrib/crc-16.h, apt-pkg/contrib/error.cc, - apt-pkg/contrib/error.h, apt-pkg/contrib/fileutl.cc, - apt-pkg/contrib/fileutl.h, apt-pkg/contrib/md5.cc, - apt-pkg/contrib/md5.h, apt-pkg/contrib/mmap.cc, - apt-pkg/contrib/mmap.h, apt-pkg/contrib/progress.cc, - apt-pkg/contrib/progress.h, apt-pkg/contrib/strutl.cc, - apt-pkg/contrib/strutl.h, apt-pkg/contrib/system.h, - apt-pkg/deb/debfactory.cc, apt-pkg/deb/debfactory.h, - apt-pkg/deb/deblistparser.cc, apt-pkg/deb/deblistparser.h, - apt-pkg/deb/debrecords.cc, apt-pkg/deb/debrecords.h, - apt-pkg/deb/debsrcrecords.cc, apt-pkg/deb/debsrcrecords.h, - apt-pkg/deb/dpkginit.cc, apt-pkg/deb/dpkginit.h, - apt-pkg/deb/dpkgpm.cc, apt-pkg/deb/dpkgpm.h, - apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpminit.h, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmlistparser.h, - apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmpm.h, - apt-pkg/rpm/rpmstatusgen.cc, apt-pkg/rpm/rpmstatusgen.h, - buildlib/archtable, buildlib/config.guess, buildlib/config.h.in, - buildlib/config.sub, buildlib/configure.mak, buildlib/copy.mak, - buildlib/debiandoc.mak, buildlib/defaults.mak, - buildlib/environment.mak.in, buildlib/install-sh, - buildlib/inttypes.h.in, buildlib/library.mak, buildlib/makefile.in, - buildlib/manpage.mak, buildlib/mkChangeLog, buildlib/netdb.h.in, - buildlib/program.mak, buildlib/sizetable, - buildlib/staticlibrary.mak, buildlib/statvfs.h.in, - buildlib/tools.m4, buildlib/yodl_manpage.mak, - cmdline/acqprogress.h, cmdline/apt-cdrom.cc, cmdline/apt-config.cc, - cmdline/indexcopy.h, debian/changelog, debian/control, - debian/copyright, debian/dhelp, debian/dirs, debian/examples, - debian/libapt-pkg-dev.dirs, debian/libapt-pkg-doc.dhelp, - debian/libapt-pkg-doc.postinst, debian/libapt-pkg-doc.prerm, - debian/postinst, debian/postrm, debian/rules, debian/shlibs.local, - doc/Bugs, doc/apt-cache.8, doc/apt-cache.8.yo, doc/apt-cdrom.8, - doc/apt-cdrom.8.yo, doc/apt-config.8, doc/apt-config.8.yo, - doc/apt-get.8, doc/apt-get.8.yo, doc/apt.8, doc/apt.conf.5, - doc/apt.conf.5.yo, doc/cache.sgml, doc/design.sgml, - doc/dpkg-tech.sgml, doc/files.sgml, doc/guide.sgml, doc/makefile, - doc/method.sgml, doc/offline.sgml, doc/sources.list.5, - doc/sources.list.5.yo, doc/examples/apt.conf, - doc/examples/configure-index, doc/examples/sources.list, - dselect/desc.apt, dselect/install, dselect/makefile, dselect/names, - dselect/setup, dselect/update, gui/apt.cc, gui/aptwidgets.cc, - gui/aptwidgets.h, gui/checkoff.xpm, gui/checkon.xpm, - gui/conflicts.xpm, gui/depends.xpm, gui/downgrade.xpm, - gui/errorshow.cc, gui/errorshow.h, gui/extracache.cc, - gui/extracache.h, gui/makefile, gui/minus.xpm, gui/package.xpm, - gui/pkgtree.cc, gui/pkgtree.h, gui/pkgtreeitem.cc, - gui/pkgtreeitem.h, gui/plus.xpm, gui/policy.cc, gui/policy.h, - gui/progressmeter.cc, gui/progressmeter.h, gui/radiooff.xpm, - gui/radioon.xpm, gui/recommends.xpm, gui/section.xpm, - gui/statuswidgets.cc, gui/statuswidgets.h, gui/suggests.xpm, - gui/upgrade.xpm, test/makefile, test/mthdcat.cc, test/scratch.cc, - test/versions.lst, test/versiontest.cc, tools/Makefile, - tools/Packages, tools/dumprpmdb, tools/dumprpmdb.c, - tools/hashtable.c, tools/hashtable.h, tools/hdlist.pkgs, - tools/mkpackages, tools/mkpackages.c, tools/mkstatus, - tools/mkstatus.c, tools/status, tools/update: Initial revision - -2000-08-10 15:42 kojima - - * AUTHORS, COMPILING, COPYING, COPYING.GPL, ChangeLog, Makefile, - README.make, TODO, aclocal.m4, configure, configure.in, status, - cmdline/acqprogress.cc, cmdline/apt-cache.cc, cmdline/apt-get.cc, - cmdline/indexcopy.cc, cmdline/makefile, deity/anchor.cc, - deity/anchor.h, deity/basic.cc, deity/basic.h, deity/button.cc, - deity/button.h, deity/columnbar.cc, deity/columnbar.h, - deity/event.cc, deity/event.h, deity/gpmdev.cc, deity/gpmdev.h, - deity/graphics.cc, deity/graphics.h, deity/makefile, - deity/menubar.cc, deity/menubar.h, deity/notify.cc, deity/notify.h, - deity/progress.cc, deity/progress.h, deity/selectloop.cc, - deity/selectloop.h, deity/slangdev.cc, deity/slangdev.h, - deity/tabdialog.cc, deity/tabdialog.h, deity/textwidg.cc, - deity/textwidg.h, deity/tree.cc, deity/tree.h, deity/utils.cc, - deity/utils.h, deity/widget-thread.cc, deity/widget-thread.h, - deity/widget.cc, deity/widget.h, deity/widgetinit.cc, - deity/widgetinit.h, deity/window.cc, deity/window.h, - deity/x11dev.cc, deity/x11dev.h, deity/x11xpm.cc, deity/xpm.cc, - deity/xpm.h, methods/cdrom.cc, methods/connect.cc, - methods/connect.h, methods/copy.cc, methods/file.cc, - methods/ftp.cc, methods/ftp.h, methods/gzip.cc, methods/http.cc, - methods/http.h, methods/makefile, methods/rfc2553emu.cc, - methods/rfc2553emu.h, apt-pkg/acquire-item.cc, - apt-pkg/acquire-item.h, apt-pkg/acquire-method.cc, - apt-pkg/acquire-method.h, apt-pkg/acquire-worker.cc, - apt-pkg/acquire-worker.h, apt-pkg/acquire.cc, apt-pkg/acquire.h, - apt-pkg/algorithms.cc, apt-pkg/algorithms.h, apt-pkg/cachefile.cc, - apt-pkg/cachefile.h, apt-pkg/cacheiterators.h, apt-pkg/clean.cc, - apt-pkg/clean.h, apt-pkg/depcache.cc, apt-pkg/depcache.h, - apt-pkg/distrofactory.cc, apt-pkg/distrofactory.h, apt-pkg/init.cc, - apt-pkg/init.h, apt-pkg/makefile, apt-pkg/orderlist.cc, - apt-pkg/orderlist.h, apt-pkg/packagemanager.cc, - apt-pkg/packagemanager.h, apt-pkg/pkgcache.cc, apt-pkg/pkgcache.h, - apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h, - apt-pkg/pkgrecords.cc, apt-pkg/pkgrecords.h, apt-pkg/sourcelist.cc, - apt-pkg/sourcelist.h, apt-pkg/srcrecords.cc, apt-pkg/srcrecords.h, - apt-pkg/tagfile.cc, apt-pkg/tagfile.h, apt-pkg/version.cc, - apt-pkg/version.h, apt-pkg/cnc/cncfactory.cc, - apt-pkg/cnc/cncfactory.h, apt-pkg/contrib/cdromutl.cc, - apt-pkg/contrib/cdromutl.h, apt-pkg/contrib/cmndline.cc, - apt-pkg/contrib/cmndline.h, apt-pkg/contrib/configuration.cc, - apt-pkg/contrib/configuration.h, apt-pkg/contrib/crc-16.cc, - apt-pkg/contrib/crc-16.h, apt-pkg/contrib/error.cc, - apt-pkg/contrib/error.h, apt-pkg/contrib/fileutl.cc, - apt-pkg/contrib/fileutl.h, apt-pkg/contrib/md5.cc, - apt-pkg/contrib/md5.h, apt-pkg/contrib/mmap.cc, - apt-pkg/contrib/mmap.h, apt-pkg/contrib/progress.cc, - apt-pkg/contrib/progress.h, apt-pkg/contrib/strutl.cc, - apt-pkg/contrib/strutl.h, apt-pkg/contrib/system.h, - apt-pkg/deb/debfactory.cc, apt-pkg/deb/debfactory.h, - apt-pkg/deb/deblistparser.cc, apt-pkg/deb/deblistparser.h, - apt-pkg/deb/debrecords.cc, apt-pkg/deb/debrecords.h, - apt-pkg/deb/debsrcrecords.cc, apt-pkg/deb/debsrcrecords.h, - apt-pkg/deb/dpkginit.cc, apt-pkg/deb/dpkginit.h, - apt-pkg/deb/dpkgpm.cc, apt-pkg/deb/dpkgpm.h, - apt-pkg/rpm/rpminit.cc, apt-pkg/rpm/rpminit.h, - apt-pkg/rpm/rpmlistparser.cc, apt-pkg/rpm/rpmlistparser.h, - apt-pkg/rpm/rpmpm.cc, apt-pkg/rpm/rpmpm.h, - apt-pkg/rpm/rpmstatusgen.cc, apt-pkg/rpm/rpmstatusgen.h, - buildlib/archtable, buildlib/config.guess, buildlib/config.h.in, - buildlib/config.sub, buildlib/configure.mak, buildlib/copy.mak, - buildlib/debiandoc.mak, buildlib/defaults.mak, - buildlib/environment.mak.in, buildlib/install-sh, - buildlib/inttypes.h.in, buildlib/library.mak, buildlib/makefile.in, - buildlib/manpage.mak, buildlib/mkChangeLog, buildlib/netdb.h.in, - buildlib/program.mak, buildlib/sizetable, - buildlib/staticlibrary.mak, buildlib/statvfs.h.in, - buildlib/tools.m4, buildlib/yodl_manpage.mak, - cmdline/acqprogress.h, cmdline/apt-cdrom.cc, cmdline/apt-config.cc, - cmdline/indexcopy.h, debian/changelog, debian/control, - debian/copyright, debian/dhelp, debian/dirs, debian/examples, - debian/libapt-pkg-dev.dirs, debian/libapt-pkg-doc.dhelp, - debian/libapt-pkg-doc.postinst, debian/libapt-pkg-doc.prerm, - debian/postinst, debian/postrm, debian/rules, debian/shlibs.local, - doc/Bugs, doc/apt-cache.8, doc/apt-cache.8.yo, doc/apt-cdrom.8, - doc/apt-cdrom.8.yo, doc/apt-config.8, doc/apt-config.8.yo, - doc/apt-get.8, doc/apt-get.8.yo, doc/apt.8, doc/apt.conf.5, - doc/apt.conf.5.yo, doc/cache.sgml, doc/design.sgml, - doc/dpkg-tech.sgml, doc/files.sgml, doc/guide.sgml, doc/makefile, - doc/method.sgml, doc/offline.sgml, doc/sources.list.5, - doc/sources.list.5.yo, doc/examples/apt.conf, - doc/examples/configure-index, doc/examples/sources.list, - dselect/desc.apt, dselect/install, dselect/makefile, dselect/names, - dselect/setup, dselect/update, gui/apt.cc, gui/aptwidgets.cc, - gui/aptwidgets.h, gui/checkoff.xpm, gui/checkon.xpm, - gui/conflicts.xpm, gui/depends.xpm, gui/downgrade.xpm, - gui/errorshow.cc, gui/errorshow.h, gui/extracache.cc, - gui/extracache.h, gui/makefile, gui/minus.xpm, gui/package.xpm, - gui/pkgtree.cc, gui/pkgtree.h, gui/pkgtreeitem.cc, - gui/pkgtreeitem.h, gui/plus.xpm, gui/policy.cc, gui/policy.h, - gui/progressmeter.cc, gui/progressmeter.h, gui/radiooff.xpm, - gui/radioon.xpm, gui/recommends.xpm, gui/section.xpm, - gui/statuswidgets.cc, gui/statuswidgets.h, gui/suggests.xpm, - gui/upgrade.xpm, test/makefile, test/mthdcat.cc, test/scratch.cc, - test/versions.lst, test/versiontest.cc, tools/Makefile, - tools/Packages, tools/dumprpmdb, tools/dumprpmdb.c, - tools/hashtable.c, tools/hashtable.h, tools/hdlist.pkgs, - tools/mkpackages, tools/mkpackages.c, tools/mkstatus, - tools/mkstatus.c, tools/status, tools/update: inicial - diff --git a/apt/Makefile b/apt/Makefile index 04f75a6..91a7d74 100644 --- a/apt/Makefile +++ b/apt/Makefile @@ -6,14 +6,20 @@ ifndef NOISY .SILENT: endif +.PHONY: default +default: startup all + .PHONY: headers library clean veryclean all binary program doc all headers library clean veryclean binary program doc dirs: $(MAKE) -C apt-pkg $@ + $(MAKE) -C apt-inst $@ $(MAKE) -C methods $@ $(MAKE) -C cmdline $@ + $(MAKE) -C ftparchive $@ $(MAKE) -C dselect $@ - $(MAKE) -C tools $@ $(MAKE) -C doc $@ + $(MAKE) -C po $@ + $(MAKE) -C tools $@ # Some very common aliases .PHONY: maintainer-clean dist-clean distclean pristine sanity @@ -21,8 +27,9 @@ maintainer-clean dist-clean distclean pristine sanity: veryclean # The startup target builds the necessary configure scripts. It should # be used after a CVS checkout. -CONVERTED=environment.mak include/config.h makefile +CONVERTED=environment.mak include/config.h include/apti18n.h makefile include buildlib/configure.mak $(BUILDDIR)/include/config.h: buildlib/config.h.in +$(BUILDDIR)/include/apti18n.h: buildlib/apti18n.h.in $(BUILDDIR)/environment.mak: buildlib/environment.mak.in $(BUILDDIR)/makefile: buildlib/makefile.in diff --git a/apt/README.RPM b/apt/README.RPM index 46a7d7c..3343637 100644 --- a/apt/README.RPM +++ b/apt/README.RPM @@ -1,5 +1,4 @@ - RPM enabled APT WARNING @@ -12,7 +11,7 @@ DO NOT TRY TO COMPILE THIS ON A DEBIAN SYSTEM. THIS IS A WORK IN PROGRESS AND WILL NOT WORK ON DEBIAN RIGHT NOW. -If you find a problem, contact kojima@conectiva.com.br, +If you find a problem, contact niemeyer@conectiva.com, not the original developers. @@ -37,5 +36,3 @@ want simpler/friendlier documentation, you can get the APT+RPM HOWTO at: http://bazar.conectiva.com.br/~godoy/apt-howto/ - - diff --git a/apt/README.make b/apt/README.make index 7fd6ae5..c043f10 100644 --- a/apt/README.make +++ b/apt/README.make @@ -26,12 +26,12 @@ and configure substitutions across build makefiles is not used at all. Furthermore, the make system runs with a current directory equal to the source directory irregardless of the destination directory. This means -#include "" and #include <> work as epected and more importantly +#include "" and #include <> work as expected and more importantly running 'make' in the source directory will work as expected. The -environment variable or make parameter 'BUILD' set the build directory. +environment variable or make parameter 'BUILD' sets the build directory. It may be an absolute path or a path relative to the top level directory. -By default build/ will be used with a fall back to ./ This means -you can get all the advantages of a build directory without having to +By default build-arch/ then build/ will be used with a fall back to ./ This +means you can get all the advantages of a build directory without having to cd into it to edit your source code! The make system also performs dependency generation on the fly as the @@ -49,10 +49,8 @@ the source directory but is logically divided in the following manner examples/ include/ apt-pkg/ - deity/ obj/ apt-pkg/ - deity/ cmndline/ [...] Only .o and .d files are placed in the obj/ subdirectory. The final compiled diff --git a/apt/REPOSITORIO-APT-HOWTO b/apt/REPOSITORIO-APT-HOWTO deleted file mode 100644 index 7a548b4..0000000 --- a/apt/REPOSITORIO-APT-HOWTO +++ /dev/null @@ -1,117 +0,0 @@ - - -Repositório de APT HOWTO - - -** Ingredientes - -- 1 máquina com acesso rápido à rede e bastante largura de banda -- 1 servidor de ftp (anônimo) ou http rodando - -** Modo de Preparo - -1) Vá ao diretório raiz do servidor de ftp/http -2) Crie a seguinte estrutura de diretórios nele: - -/SRPMS/ -/conectiva/RPMS./ -/conectiva/RPMS./ - ... -/conectiva/RPMS./ -/conectiva/base/ - -Você pode substituir pela versão da distribuição -que será disponibilizada ou se você estiver disponibilizando -algum outro software, a versão da distribuição a que se destinam -os pacotes. - -... são os diretórios dos componentes da distribuição -e podem ser qualquer string. - -No diretório SRPMS devem estar contidos os srpms dos pacotes -do repositório. - -3) Crie os arquivos de índice do apt (os pkglists) no diretório base. -Para isso, vá ao diretório base e execute o seguinte comando para -cada componente: - -genpkglist / - -Onde: - -/ é o caminho completo até o topo do diretório onde -está o repositório - - é o nome do componente. - -Repita a operação para cada um dos componentes que você criou. - -4) Comprima os arquivos de índice com gzip. - -5) Distribua a linha do sources.list para o seu repositório. Ela -tem o seguinte formato: - -rpm URL/ /conectiva ... - ^ ^ ^ ^ ^ ^ ^ - | | | +------+------+-----+- Nomes dos - | | | componentes - | | | - | | versao da distribuição e nome da distribuição - | | - | URL para o diretório raiz do repositório - | - Tipo de distribuição. No caso, rpm - -** Exemplos: - -## Quer se fazer um repositório de pacotes para o Conectiva 6.0, na máquina -repo.conectiva.com.br, usando http: - -cd /home/httpd -mkdir -p coisas/6.0 -cd coisas/6.0 -mkdir SRPMS -mkdir -p conectiva/RPMS.bla -mkdir -p conectiva/base -cp /meus/pacotes/*src.rpm SRPMS -cp /meus/pacotes/*i386.rpm conectiva/RPMS.bla -cd conectiva/base -genpkglist /home/httpd/coisas/6.0/conectiva bla -gzip pkglist.bla - -Em sources.list deve se adicionar: - -rpm http://repo.conectiva.com.br/coisas 6.0/conectiva bla - - -## Quer se fazer um repositório de pacotes para a distribuição RedRat 20.0, -em bla.redrat.com, usando ftp: - -cd /home/ftp/pub -mkdir -p stuff/20.0 -cd stuff/20.0 -mkdir SRPMS -mkdir -p redrat/RPMS.1 -mkdir -p redrat/RPMS.2 -mkdir -p redrat/base -cp /tmp/pacotes*src.rpm SRPMS -cp redrat/RPMS.1 -cp redrat/RPMS.2 -cd redrat/base -genpkglist /home/ftp/stuff/20.0/redrat 1 -genpkglist /home/ftp/stuff/20.0/redrat 2 -gzip pkglist.1 -gzip pkglist.2 - -Em sources.list deve se adicionar: - -rpm ftp://bla.redrat.com/pub/stuff 20.0/redrat 1 2 - - - - - - - - - diff --git a/apt/TODO b/apt/TODO index ed746b3..29fb32f 100644 --- a/apt/TODO +++ b/apt/TODO @@ -1,6 +1 @@ -- check support for installation of packages scattered across multiple CDs -- port the authentication stuff to the aliencode branch of APT -- port the RPM support to the aliencode branch of APT -- rewrite rpm repository maintenance tools -- package "hold"ing -- package ignoring (exclude from apt-get check) +- Implement hashing in file method. diff --git a/apt/aclocal.m4 b/apt/aclocal.m4 new file mode 100644 index 0000000..ed9fdf1 --- /dev/null +++ b/apt/aclocal.m4 @@ -0,0 +1,2860 @@ +# generated automatically by aclocal 1.7.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 8 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +AC_PREREQ([2.54]) + +# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow +# the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl + AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG(AMTAR, tar) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl + +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[_am_stamp_count=`expr ${_am_stamp_count-0} + 1` +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.7.1])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# +# Check to make sure that the build environment is sane. +# + +# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# -*- Autoconf -*- + + +# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# AM_AUX_DIR_EXPAND + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +# Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50]) + +AC_DEFUN([AM_AUX_DIR_EXPAND], [ +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# AM_PROG_INSTALL_STRIP + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# serial 4 -*- Autoconf -*- + +# Copyright 1999, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + echo '#include "conftest.h"' > conftest.c + echo 'int i;' > conftest.h + echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=conftest.c object=conftest.o \ + depfile=conftest.Po tmpdepfile=conftest.TPo \ + $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && + grep conftest.h conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[rm -f .deps 2>/dev/null +mkdir .deps 2>/dev/null +if test -d .deps; then + DEPDIR=.deps +else + # MS-DOS does not allow filenames that begin with a dot. + DEPDIR=_deps +fi +rmdir .deps 2>/dev/null +AC_SUBST([DEPDIR]) +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +doit: + @echo done +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST(am__include) +AC_SUBST(am__quote) +AC_MSG_RESULT($_am_result) +rm -f confinc confmf +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 5 + +AC_PREREQ(2.52) + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]) +fi])]) + +# isc-posix.m4 serial 2 (gettext-0.11.2) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. + +# This test replaces the one in autoconf. +# Currently this macro should have the same name as the autoconf macro +# because gettext's gettext.m4 (distributed in the automake package) +# still uses it. Otherwise, the use in gettext.m4 makes autoheader +# give these diagnostics: +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX + +undefine([AC_ISC_POSIX]) + +AC_DEFUN([AC_ISC_POSIX], + [ + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) + ] +) + +AC_DEFUN(ah_HAVE_GETCONF, + [AC_ARG_WITH(getconf, + [ --with-getconf Enable automagical buildtime configuration], + [if test "$withval" = "yes"; then + AC_PATH_PROG(GETCONF, getconf) + elif test ! "$withval" = "no";then + AC_MSG_CHECKING([getconf]) + AC_MSG_RESULT([$withval]) + GETCONF=$withval + fi], + [AC_PATH_PROG(GETCONF, getconf)] + ) + AC_SUBST(GETCONF) +]) + +dnl ah_GET_CONF(variable, value ..., [default]) +AC_DEFUN(ah_GET_GETCONF, + [AC_REQUIRE([ah_HAVE_GETCONF]) + if test ! -z "$GETCONF";then + old_args="[$]@" + set -- $2 + while eval test -z \"\$$1\" -a ! -z \"[$]1\";do + eval $1=`$GETCONF "[$]1" 2>/dev/null` + shift + done + fi + if eval test -z \"\$$1\" -o \"\$$1\" = "-1";then + eval $1="$3" + fi +]) +AC_DEFUN(ah_NUM_CPUS, + [AC_MSG_CHECKING([number of cpus]) + AC_ARG_WITH(cpus, + [ --with-cpus The number of cpus to be used for building(see --with-procs, default 1)], + [ + if test "$withval" = "yes"; then + ah_GET_GETCONF(NUM_CPUS, SC_NPROCESSORS_ONLN _NPROCESSORS_ONLN, 1) + elif test ! "$withval" = "no";then + NUM_CPUS=$withval + elif test "$withval" = "no";then + NUM_CPUS=1 + fi], + [ah_GET_GETCONF(NUM_CPUS, SC_NPROCESSORS_ONLN _NPROCESSORS_ONLN, 1)] + ) + ah_NUM_CPUS_msg="$NUM_CPUS" + if test "$NUM_CPUS" = "0"; then + # broken getconf, time to bitch. + ah_NUM_CPUS_msg="found 0 cpus. Has someone done a lobotomy?" + NUM_CPUS=1 + fi + if test $NUM_CPUS = 1 ;then + default_PROC_MULTIPLY=1 + else + default_PROC_MULTIPLY=2 + fi + AC_MSG_RESULT([$ah_NUM_CPUS_msg]) + AC_SUBST(NUM_CPUS) +]) +AC_DEFUN(ah_PROC_MULTIPLY, + [AC_REQUIRE([ah_NUM_CPUS]) + AC_MSG_CHECKING([processor multiplier]) + AC_ARG_WITH(proc-multiply, + [ --with-proc-multiply Multiply this * number of cpus for parallel making(default 2).], + [if test "$withval" = "yes"; then + PROC_MULTIPLY=$default_PROC_MULTIPLY + elif test ! "$withval" = "no";then + PROC_MULTIPLY=$withval + fi], + [PROC_MULTIPLY=$default_PROC_MULTIPLY] + ) + AC_MSG_RESULT([$PROC_MULTIPLY]) + AC_SUBST(PROC_MULTIPLY) +]) + +AC_DEFUN(ah_NUM_PROCS, + [AC_REQUIRE([ah_PROC_MULTIPLY]) + AC_REQUIRE([ah_NUM_CPUS]) + AC_MSG_CHECKING([number of processes to run during make]) + AC_ARG_WITH(procs, + [ --with-procs The number of processes to run in parallel during make(num_cpus * multiplier).], + [if test "$withval" = "yes"; then + NUM_PROCS=`expr $NUM_CPUS \* $PROC_MULTIPLY` + elif test ! "$withval" = "no";then + NUM_PROCS=$withval + fi], + [NUM_PROCS=`expr $NUM_CPUS \* $PROC_MULTIPLY`] + ) + AC_MSG_RESULT([$NUM_PROCS]) + AC_SUBST(NUM_PROCS) +]) + +AC_DEFUN(rc_GLIBC_VER, + [AC_MSG_CHECKING([glibc version]) + dummy=if$$ + cat <<_GLIBC_>$dummy.c +#include +#include +#include +int main(int argc, char **argv) { printf("libc6.%d",__GLIBC_MINOR__); exit(0); } +_GLIBC_ + ${CC-cc} $dummy.c -o $dummy > /dev/null 2>&1 + if test "$?" = 0; then + GLIBC_VER=`./$dummy` + AC_MSG_RESULT([$GLIBC_VER]) + GLIBC_VER="-$GLIBC_VER" + else + AC_MSG_WARN([cannot determine GNU C library minor version number]) + fi + rm -f $dummy $dummy.c + AC_SUBST(GLIBC_VER) +]) + +AC_DEFUN(rc_LIBSTDCPP_VER, + [AC_MSG_CHECKING([libstdc++ version]) + dummy=if$$ + cat <<_LIBSTDCPP_>$dummy.cc +#include +#include +#include +int main(int argc, char **argv) { exit(0); } +_LIBSTDCPP_ + ${CXX-c++} $dummy.cc -o $dummy > /dev/null 2>&1 + + if test "$?" = 0; then + soname=`objdump -p ./$dummy |grep NEEDED|grep libstd` + LIBSTDCPP_VER=`echo $soname | sed -e 's/.*NEEDED.*libstdc++\(-libc.*\(-.*\)\)\?.so.\(.*\)/\3\2/'` + fi + rm -f $dummy $dummy.cc + + if test -z "$LIBSTDCPP_VER"; then + AC_MSG_WARN([cannot determine standard C++ library version number]) + else + AC_MSG_RESULT([$LIBSTDCPP_VER]) + LIBSTDCPP_VER="-$LIBSTDCPP_VER" + fi + AC_SUBST(LIBSTDCPP_VER) +]) + +AC_DEFUN(ah_GCC3DEP,[ + AC_MSG_CHECKING(if $CXX -MD works) + touch gcc3dep.cc + ${CXX-c++} -MD -o gcc3dep_test.o -c gcc3dep.cc + rm -f gcc3dep.cc gcc3dep_test.o + if test -e gcc3dep.d; then + rm -f gcc3dep.d + GCC_MD=input + GCC3DEP= + elif test -e gcc3dep_test.d; then + rm -f gcc3dep_test.d + GCC_MD=output + GCC3DEP=yes + else + AC_MSG_ERROR(no) + fi + AC_MSG_RESULT([yes, for $GCC_MD]) + AC_SUBST(GCC3DEP) +]) + +# gettext.m4 serial 17 (gettext-0.11.5) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2002. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define(gt_included_intl, ifelse([$1], [external], [no], [yes])) + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + dnl Add a version number to the cache macros. + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) + + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, + [AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], + gt_cv_func_gnugettext_libc=yes, + gt_cv_func_gnugettext_libc=no)]) + + if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + gt_cv_func_gnugettext_libintl, + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + gt_cv_func_gnugettext_libintl=yes, + gt_cv_func_gnugettext_libintl=no) + dnl Now see whether libintl exists and depends on libiconv. + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext_libintl=yes + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if test "$gt_cv_func_gnugettext_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + AC_SUBST(INTLOBJS) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +dnl Checks for all prerequisites of the po subdirectory, +dnl except for USE_NLS. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Search for GNU xgettext 0.11 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU msgfmt. + if test "$GMSGFMT" != ":"; then + dnl If it is no GNU msgfmt we define it as : so that the + dnl Makefiles still can work. + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + AC_MSG_RESULT( + [found $GMSGFMT program is not GNU msgfmt; ignore it]) + GMSGFMT=":" + fi + fi + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + fi + + AC_OUTPUT_COMMANDS([ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # from automake. + eval 'ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + + +dnl Checks for all prerequisites of the intl subdirectory, +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. +AC_DEFUN([AM_INTL_SUBDIR], +[ + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) + + AM_ICONV + AM_LANGINFO_CODESET + if test $ac_cv_header_locale_h = yes; then + AM_LC_MESSAGES + fi + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-1.26 because earlier versions generate a plural.c that doesn't + dnl compile. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) +changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) +changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi +]) + + +AC_DEFUN([AM_MKINSTALLDIRS], +[ + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + +# lib-prefix.m4 serial 1 (gettext-0.11) +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +# lib-link.m4 serial 3 (gettext-0.11.3) +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, +dnl hardcode_direct, hardcode_minus_L, +dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec. +AC_DEFUN([AC_LIB_RPATH], +[ + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH([lib$1-prefix], +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +# lib-ld.m4 serial 1 (gettext-0.11) +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi]) +with_gnu_ld=$acl_cv_prog_gnu_ld +]) + +dnl From libtool-1.4. Sets the variable LD. +AC_DEFUN([AC_LIB_PROG_LD], +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) + +# iconv.m4 serial AM4 (gettext-0.11.3) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) + +# progtest.m4 serial 2 (gettext-0.10.40) +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) + +# intdiv0.m4 serial 1 (gettext-0.11.3) +dnl Copyright (C) 2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([gt_INTDIV0], +[ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + AC_TRY_RUN([ +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, + [ + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + ]) + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + [Define if integer division by zero raises signal SIGFPE.]) +]) + +# uintmax_t.m4 serial 6 (gettext-0.11) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_PREREQ(2.13) + +# Define uintmax_t to `unsigned long' or `unsigned long long' +# if does not exist. + +AC_DEFUN([jm_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define to unsigned long or unsigned long long + if and don't define.]) + fi +]) + +# inttypes_h.m4 serial 4 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_inttypes_h=yes, + jm_ac_cv_header_inttypes_h=no)]) + if test $jm_ac_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) + +# stdint_h.m4 serial 2 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_stdint_h=yes, + jm_ac_cv_header_stdint_h=no)]) + if test $jm_ac_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) + +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], + [unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], + ac_cv_type_unsigned_long_long=yes, + ac_cv_type_unsigned_long_long=no)]) + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the unsigned long long type.]) + fi +]) + +# inttypes.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H if exists and doesn't clash with +# . + +AC_DEFUN([gt_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, + [ + AC_TRY_COMPILE( + [#include +#include ], + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) + ]) + if test $gt_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, + [Define if exists and doesn't clash with .]) + fi +]) + +# inttypes-pri.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_REQUIRE([gt_HEADER_INTTYPES_H]) + if test $gt_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + gt_cv_inttypes_pri_broken, + [ + AC_TRY_COMPILE([#include +#ifdef PRId32 +char *p = PRId32; +#endif +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + [Define if exists and defines unusable PRI* macros.]) + fi +]) + +# codeset.m4 serial AM1 (gettext-0.10.40) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) + +# lcmessage.m4 serial 3 (gettext-0.11.3) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995. + +# Check whether LC_MESSAGES is available in . + +AC_DEFUN([AM_LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi +]) + diff --git a/apt/apt-inst/contrib/arfile.cc b/apt/apt-inst/contrib/arfile.cc new file mode 100644 index 0000000..e678a0d --- /dev/null +++ b/apt/apt-inst/contrib/arfile.cc @@ -0,0 +1,154 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: arfile.cc,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + AR File - Handle an 'AR' archive + + AR Archives have plain text headers at the start of each file + section. The headers are aligned on a 2 byte boundry. + + Information about the structure of AR files can be found in ar(5) + on a BSD system, or in the binutils source. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/arfile.h" +#endif +#include +#include +#include + +#include + /*}}}*/ + +struct ARArchive::MemberHeader +{ + char Name[16]; + char MTime[12]; + char UID[6]; + char GID[6]; + char Mode[8]; + char Size[10]; + char Magic[2]; +}; + +// ARArchive::ARArchive - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +ARArchive::ARArchive(FileFd &File) : List(0), File(File) +{ + LoadHeaders(); +} + /*}}}*/ +// ARArchive::~ARArchive - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +ARArchive::~ARArchive() +{ + while (List != 0) + { + Member *Tmp = List; + List = List->Next; + delete Tmp; + } +} + /*}}}*/ +// ARArchive::LoadHeaders - Load the headers from each file /*{{{*/ +// --------------------------------------------------------------------- +/* AR files are structured with a 8 byte magic string followed by a 60 + byte plain text header then the file data, another header, data, etc */ +bool ARArchive::LoadHeaders() +{ + signed long Left = File.Size(); + + // Check the magic byte + char Magic[8]; + if (File.Read(Magic,sizeof(Magic)) == false) + return false; + if (memcmp(Magic,"!\012",sizeof(Magic)) != 0) + return _error->Error("Invalid archive signature"); + Left -= sizeof(Magic); + + // Read the member list + while (Left > 0) + { + MemberHeader Head; + if (File.Read(&Head,sizeof(Head)) == false) + return _error->Error("Error reading archive member header"); + Left -= sizeof(Head); + + // Convert all of the integer members + Member *Memb = new Member(); + if (StrToNum(Head.MTime,Memb->MTime,sizeof(Head.MTime)) == false || + StrToNum(Head.UID,Memb->UID,sizeof(Head.UID)) == false || + StrToNum(Head.GID,Memb->GID,sizeof(Head.GID)) == false || + StrToNum(Head.Mode,Memb->Mode,sizeof(Head.Mode),8) == false || + StrToNum(Head.Size,Memb->Size,sizeof(Head.Size)) == false) + { + delete Memb; + return _error->Error("Invalid archive member header"); + } + + // Check for an extra long name string + if (memcmp(Head.Name,"#1/",3) == 0) + { + char S[300]; + unsigned long Len; + if (StrToNum(Head.Name+3,Len,sizeof(Head.Size)-3) == false || + Len >= strlen(S)) + { + delete Memb; + return _error->Error("Invalid archive member header"); + } + if (File.Read(S,Len) == false) + return false; + S[Len] = 0; + Memb->Name = S; + Memb->Size -= Len; + Left -= Len; + } + else + { + unsigned int I = sizeof(Head.Name) - 1; + for (; Head.Name[I] == ' '; I--); + Memb->Name = string(Head.Name,0,I+1); + } + + // Account for the AR header alignment + unsigned Skip = Memb->Size % 2; + + // Add it to the list + Memb->Next = List; + List = Memb; + Memb->Start = File.Tell(); + if (File.Skip(Memb->Size + Skip) == false) + return false; + if (Left < (signed)(Memb->Size + Skip)) + return _error->Error("Archive is too short"); + Left -= Memb->Size + Skip; + } + if (Left != 0) + return _error->Error("Failed to read the archive headers"); + + return true; +} + /*}}}*/ +// ARArchive::FindMember - Find a name in the member list /*{{{*/ +// --------------------------------------------------------------------- +/* Find a member with the given name */ +const ARArchive::Member *ARArchive::FindMember(const char *Name) const +{ + const Member *Res = List; + while (Res != 0) + { + if (Res->Name == Name) + return Res; + Res = Res->Next; + } + + return 0; +} + /*}}}*/ diff --git a/apt/apt-inst/contrib/arfile.h b/apt/apt-inst/contrib/arfile.h new file mode 100644 index 0000000..02f7400 --- /dev/null +++ b/apt/apt-inst/contrib/arfile.h @@ -0,0 +1,68 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: arfile.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + AR File - Handle an 'AR' archive + + This is a reader for the usual 4.4 BSD AR format. It allows raw + stream access to a single member at a time. Basically all this class + provides is header parsing and verification. It is up to the client + to correctly make use of the stream start/stop points. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_ARFILE_H +#define PKGLIB_ARFILE_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/arfile.h" +#endif + +#include +#include + +class ARArchive +{ + struct MemberHeader; + public: + struct Member; + + protected: + + // Linked list of members + Member *List; + + bool LoadHeaders(); + + public: + + // The stream file + FileFd &File; + + // Locate a member by name + const Member *FindMember(const char *Name) const; + + ARArchive(FileFd &File); + ~ARArchive(); +}; + +// A member of the archive +struct ARArchive::Member +{ + // Fields from the header + string Name; + unsigned long MTime; + unsigned long UID; + unsigned long GID; + unsigned long Mode; + unsigned long Size; + + // Location of the data. + unsigned long Start; + Member *Next; + + Member() : Start(0), Next(0) {}; +}; + +#endif diff --git a/apt/apt-inst/contrib/extracttar.cc b/apt/apt-inst/contrib/extracttar.cc new file mode 100644 index 0000000..06c6798 --- /dev/null +++ b/apt/apt-inst/contrib/extracttar.cc @@ -0,0 +1,343 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: extracttar.cc,v 1.4 2003/01/29 18:43:47 niemeyer Exp $ +/* ###################################################################### + + Extract a Tar - Tar Extractor + + Some performance measurements showed that zlib performed quite poorly + in comparision to a forked gzip process. This tar extractor makes use + of the fact that dup'd file descriptors have the same seek pointer + and that gzip will not read past the end of a compressed stream, + even if there is more data. We use the dup property to track extraction + progress and the gzip feature to just feed gzip a fd in the middle + of an AR file. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/extracttar.h" +#endif +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + /*}}}*/ +using namespace std; + +// The on disk header for a tar file. +struct ExtractTar::TarHeader +{ + char Name[100]; + char Mode[8]; + char UserID[8]; + char GroupID[8]; + char Size[12]; + char MTime[12]; + char Checksum[8]; + char LinkFlag; + char LinkName[100]; + char MagicNumber[8]; + char UserName[32]; + char GroupName[32]; + char Major[8]; + char Minor[8]; +}; + +// ExtractTar::ExtractTar - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +ExtractTar::ExtractTar(FileFd &Fd,unsigned long Max) : File(Fd), + MaxInSize(Max) + +{ + GZPid = -1; + InFd = -1; + Eof = false; +} + /*}}}*/ +// ExtractTar::ExtractTar - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +ExtractTar::~ExtractTar() +{ + // Error close + Done(true); +} + /*}}}*/ +// ExtractTar::Done - Reap the gzip sub process /*{{{*/ +// --------------------------------------------------------------------- +/* If the force flag is given then error messages are suppressed - this + means we hit the end of the tar file but there was still gzip data. */ +bool ExtractTar::Done(bool Force) +{ + InFd.Close(); + if (GZPid <= 0) + return true; + + /* If there is a pending error then we are cleaning up gzip and are + not interested in it's failures */ + if (_error->PendingError() == true) + Force = true; + + // Make sure we clean it up! + kill(GZPid,SIGINT); + if (ExecWait(GZPid,_config->Find("dir::bin::gzip","/bin/gzip").c_str(), + Force) == false) + { + GZPid = -1; + return Force; + } + + GZPid = -1; + return true; +} + /*}}}*/ +// ExtractTar::StartGzip - Startup gzip /*{{{*/ +// --------------------------------------------------------------------- +/* This creates a gzip sub process that has its input as the file itself. + If this tar file is embedded into something like an ar file then + gzip will efficiently ignore the extra bits. */ +bool ExtractTar::StartGzip() +{ + int Pipes[2]; + if (pipe(Pipes) != 0) + return _error->Errno("pipe","Failed to create pipes"); + + // Fork off the process + GZPid = ExecFork(); + + // Spawn the subprocess + if (GZPid == 0) + { + // Setup the FDs + dup2(Pipes[1],STDOUT_FILENO); + dup2(File.Fd(),STDIN_FILENO); + int Fd = open("/dev/null",O_RDWR); + if (Fd == -1) + _exit(101); + dup2(Fd,STDERR_FILENO); + close(Fd); + SetCloseExec(STDOUT_FILENO,false); + SetCloseExec(STDIN_FILENO,false); + SetCloseExec(STDERR_FILENO,false); + + const char *Args[3]; + Args[0] = _config->Find("dir::bin::gzip","/bin/gzip").c_str(); + Args[1] = "-d"; + Args[2] = 0; + execv(Args[0],(char **)Args); + cerr << "Failed to exec gzip " << Args[0] << endl; + _exit(100); + } + + // Fix up our FDs + InFd.Fd(Pipes[0]); + close(Pipes[1]); + return true; +} + /*}}}*/ +// ExtractTar::Go - Perform extraction /*{{{*/ +// --------------------------------------------------------------------- +/* This reads each 512 byte block from the archive and extracts the header + information into the Item structure. Then it resolves the UID/GID and + invokes the correct processing function. */ +bool ExtractTar::Go(pkgDirStream &Stream) +{ + if (StartGzip() == false) + return false; + + // Loop over all blocks + string LastLongLink; + string LastLongName; + while (1) + { + bool BadRecord = false; + unsigned char Block[512]; + if (InFd.Read(Block,sizeof(Block),true) == false) + return false; + + if (InFd.Eof() == true) + break; + + // Get the checksum + TarHeader *Tar = (TarHeader *)Block; + unsigned long CheckSum; + if (StrToNum(Tar->Checksum,CheckSum,sizeof(Tar->Checksum),8) == false) + return _error->Error("Corrupted archive"); + + /* Compute the checksum field. The actual checksum is blanked out + with spaces so it is not included in the computation */ + unsigned long NewSum = 0; + memset(Tar->Checksum,' ',sizeof(Tar->Checksum)); + for (int I = 0; I != sizeof(Block); I++) + NewSum += Block[I]; + + /* Check for a block of nulls - in this case we kill gzip, GNU tar + does this.. */ + if (NewSum == ' '*sizeof(Tar->Checksum)) + return Done(true); + + if (NewSum != CheckSum) + return _error->Error("Tar Checksum failed, archive corrupted"); + + // Decode all of the fields + pkgDirStream::Item Itm; + if (StrToNum(Tar->Mode,Itm.Mode,sizeof(Tar->Mode),8) == false || + StrToNum(Tar->UserID,Itm.UID,sizeof(Tar->UserID),8) == false || + StrToNum(Tar->GroupID,Itm.GID,sizeof(Tar->GroupID),8) == false || + StrToNum(Tar->Size,Itm.Size,sizeof(Tar->Size),8) == false || + StrToNum(Tar->MTime,Itm.MTime,sizeof(Tar->MTime),8) == false || + StrToNum(Tar->Major,Itm.Major,sizeof(Tar->Major),8) == false || + StrToNum(Tar->Minor,Itm.Minor,sizeof(Tar->Minor),8) == false) + return _error->Error("Corrupted archive"); + + // Grab the filename + if (LastLongName.empty() == false) + Itm.Name = (char *)LastLongName.c_str(); + else + { + Tar->Name[sizeof(Tar->Name)] = 0; + Itm.Name = Tar->Name; + } + if (Itm.Name[0] == '.' && Itm.Name[1] == '/' && Itm.Name[2] != 0) + Itm.Name += 2; + + // Grab the link target + Tar->Name[sizeof(Tar->LinkName)] = 0; + Itm.LinkTarget = Tar->LinkName; + + if (LastLongLink.empty() == false) + Itm.LinkTarget = (char *)LastLongLink.c_str(); + + // Convert the type over + switch (Tar->LinkFlag) + { + case NormalFile0: + case NormalFile: + Itm.Type = pkgDirStream::Item::File; + break; + + case HardLink: + Itm.Type = pkgDirStream::Item::HardLink; + break; + + case SymbolicLink: + Itm.Type = pkgDirStream::Item::SymbolicLink; + break; + + case CharacterDevice: + Itm.Type = pkgDirStream::Item::CharDevice; + break; + + case BlockDevice: + Itm.Type = pkgDirStream::Item::BlockDevice; + break; + + case Directory: + Itm.Type = pkgDirStream::Item::Directory; + break; + + case FIFO: + Itm.Type = pkgDirStream::Item::FIFO; + break; + + case GNU_LongLink: + { + unsigned long Length = Itm.Size; + unsigned char Block[512]; + while (Length > 0) + { + if (InFd.Read(Block,sizeof(Block),true) == false) + return false; + if (Length <= sizeof(Block)) + { + LastLongLink.append(Block,Block+sizeof(Block)); + break; + } + LastLongLink.append(Block,Block+sizeof(Block)); + Length -= sizeof(Block); + } + continue; + } + + case GNU_LongName: + { + unsigned long Length = Itm.Size; + unsigned char Block[512]; + while (Length > 0) + { + if (InFd.Read(Block,sizeof(Block),true) == false) + return false; + if (Length < sizeof(Block)) + { + LastLongName.append(Block,Block+sizeof(Block)); + break; + } + LastLongName.append(Block,Block+sizeof(Block)); + Length -= sizeof(Block); + } + continue; + } + + default: + BadRecord = true; + _error->Warning("Unkown TAR header type %u, member %s",(unsigned)Tar->LinkFlag,Tar->Name); + break; + } + + int Fd = -1; + if (BadRecord == false) + if (Stream.DoItem(Itm,Fd) == false) + return false; + + // Copy the file over the FD + unsigned long Size = Itm.Size; + while (Size != 0) + { + unsigned char Junk[32*1024]; + unsigned long Read = MIN(Size,sizeof(Junk)); + if (InFd.Read(Junk,((Read+511)/512)*512) == false) + return false; + + if (BadRecord == false) + { + if (Fd > 0) + { + if (write(Fd,Junk,Read) != (signed)Read) + return Stream.Fail(Itm,Fd); + } + else + { + /* An Fd of -2 means to send to a special processing + function */ + if (Fd == -2) + if (Stream.Process(Itm,Junk,Read,Itm.Size - Size) == false) + return Stream.Fail(Itm,Fd); + } + } + + Size -= Read; + } + + // And finish up + if (Itm.Size != 0 && BadRecord == false) + if (Stream.FinishedFile(Itm,Fd) == false) + return false; + + LastLongName.erase(); + LastLongLink.erase(); + } + + return Done(false); +} + /*}}}*/ diff --git a/apt/apt-inst/contrib/extracttar.h b/apt/apt-inst/contrib/extracttar.h new file mode 100644 index 0000000..c973af6 --- /dev/null +++ b/apt/apt-inst/contrib/extracttar.h @@ -0,0 +1,54 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: extracttar.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Extract a Tar - Tar Extractor + + The tar extractor takes an ordinary gzip compressed tar stream from + the given file and explodes it, passing the individual items to the + given Directory Stream for processing. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_EXTRACTTAR_H +#define PKGLIB_EXTRACTTAR_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/extracttar.h" +#endif + +#include +#include + +class ExtractTar +{ + protected: + + struct TarHeader; + + // The varios types items can be + enum ItemType {NormalFile0 = '\0',NormalFile = '0',HardLink = '1', + SymbolicLink = '2',CharacterDevice = '3', + BlockDevice = '4',Directory = '5',FIFO = '6', + GNU_LongLink = 'K',GNU_LongName = 'L'}; + + FileFd &File; + unsigned long MaxInSize; + int GZPid; + FileFd InFd; + bool Eof; + + // Fork and reap gzip + bool StartGzip(); + bool Done(bool Force); + + public: + + bool Go(pkgDirStream &Stream); + + ExtractTar(FileFd &Fd,unsigned long Max); + virtual ~ExtractTar(); +}; + +#endif diff --git a/apt/apt-inst/database.cc b/apt/apt-inst/database.cc new file mode 100644 index 0000000..9f78dc2 --- /dev/null +++ b/apt/apt-inst/database.cc @@ -0,0 +1,30 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: database.cc,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Data Base Abstraction + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/database.h" +#endif + +#include + /*}}}*/ + +// DataBase::GetMetaTmp - Get the temp dir /*{{{*/ +// --------------------------------------------------------------------- +/* This re-initializes the meta temporary directory if it hasn't yet + been inited for this cycle. The flag is the emptyness of MetaDir */ +bool pkgDataBase::GetMetaTmp(string &Dir) +{ + if (MetaDir.empty() == true) + if (InitMetaTmp(MetaDir) == false) + return false; + Dir = MetaDir; + return true; +} + /*}}}*/ diff --git a/apt/apt-inst/database.h b/apt/apt-inst/database.h new file mode 100644 index 0000000..b715ab0 --- /dev/null +++ b/apt/apt-inst/database.h @@ -0,0 +1,56 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: database.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Data Base Abstraction + + This class provides a simple interface to an abstract notion of a + database directory for storing state information about the system. + + The 'Meta' information for a package is the control information and + setup scripts stored inside the archive. GetMetaTmp returns the name of + a directory that is used to store named files containing the control + information. + + The File Listing is the database of installed files. It is loaded + into the memory/persistent cache structure by the ReadFileList method. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_DATABASE_H +#define PKGLIB_DATABASE_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/database.h" +#endif + +#include +#include + +class pkgDataBase +{ + protected: + + pkgCacheGenerator *Cache; + pkgFLCache *FList; + string MetaDir; + virtual bool InitMetaTmp(string &Dir) = 0; + + public: + + // Some manipulators for the cache and generator + inline pkgCache &GetCache() {return Cache->GetCache();}; + inline pkgFLCache &GetFLCache() {return *FList;}; + inline pkgCacheGenerator &GetGenerator() {return *Cache;}; + + bool GetMetaTmp(string &Dir); + virtual bool ReadyFileList(OpProgress &Progress) = 0; + virtual bool ReadyPkgCache(OpProgress &Progress) = 0; + virtual bool LoadChanges() = 0; + + pkgDataBase() : Cache(0), FList(0) {}; + virtual ~pkgDataBase() {delete Cache; delete FList;}; +}; + +#endif diff --git a/apt/apt-inst/deb/debfile.cc b/apt/apt-inst/deb/debfile.cc new file mode 100644 index 0000000..93a5105 --- /dev/null +++ b/apt/apt-inst/deb/debfile.cc @@ -0,0 +1,262 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debfile.cc,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Debian Archive File (.deb) + + .DEB archives are AR files containing two tars and an empty marker + member called 'debian-binary'. The two tars contain the meta data and + the actual archive contents. Thus this class is a very simple wrapper + around ar/tar to simply extract the right tar files. + + It also uses the deb package list parser to parse the control file + into the cache. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/debfile.h" +#endif + +#include +#include +#include +#include + +#include +#include + /*}}}*/ + +// DebFile::debDebFile - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Open the AR file and check for consistency */ +debDebFile::debDebFile(FileFd &File) : File(File), AR(File) +{ + if (_error->PendingError() == true) + return; + + // Check the members for validity + if (CheckMember("debian-binary") == false || + CheckMember("control.tar.gz") == false || + CheckMember("data.tar.gz") == false) + return; +} + /*}}}*/ +// DebFile::CheckMember - Check if a named member is in the archive /*{{{*/ +// --------------------------------------------------------------------- +/* This is used to check for a correct deb and to give nicer error messages + for people playing around. */ +bool debDebFile::CheckMember(const char *Name) +{ + if (AR.FindMember(Name) == 0) + return _error->Error("This is not a valid DEB archive, missing '%s' member",Name); + return true; +} + /*}}}*/ +// DebFile::GotoMember - Jump to a Member /*{{{*/ +// --------------------------------------------------------------------- +/* Jump in the file to the start of a named member and return the information + about that member. The caller can then read from the file up to the + returned size. Note, since this relies on the file position this is + a destructive operation, it also changes the last returned Member + structure - so don't nest them! */ +const ARArchive::Member *debDebFile::GotoMember(const char *Name) +{ + // Get the archive member and positition the file + const ARArchive::Member *Member = AR.FindMember(Name); + if (Member == 0) + { + _error->Error("Internal Error, could not locate member %s",Name); + return 0; + } + if (File.Seek(Member->Start) == false) + return 0; + + return Member; +} + /*}}}*/ +// DebFile::ExtractControl - Extract Control information /*{{{*/ +// --------------------------------------------------------------------- +/* Extract the control information into the Database's temporary + directory. */ +bool debDebFile::ExtractControl(pkgDataBase &DB) +{ + // Get the archive member and positition the file + const ARArchive::Member *Member = GotoMember("control.tar.gz"); + if (Member == 0) + return false; + + // Prepare Tar + ControlExtract Extract; + ExtractTar Tar(File,Member->Size); + if (_error->PendingError() == true) + return false; + + // Get into the temporary directory + string Cwd = SafeGetCWD(); + string Tmp; + if (DB.GetMetaTmp(Tmp) == false) + return false; + if (chdir(Tmp.c_str()) != 0) + return _error->Errno("chdir","Couldn't change to %s",Tmp.c_str()); + + // Do extraction + if (Tar.Go(Extract) == false) + return false; + + // Switch out of the tmp directory. + if (chdir(Cwd.c_str()) != 0) + chdir("/"); + + return true; +} + /*}}}*/ +// DebFile::ExtractArchive - Extract the archive data itself /*{{{*/ +// --------------------------------------------------------------------- +/* Simple wrapper around tar.. */ +bool debDebFile::ExtractArchive(pkgDirStream &Stream) +{ + // Get the archive member and positition the file + const ARArchive::Member *Member = AR.FindMember("data.tar.gz"); + if (Member == 0) + return _error->Error("Internal Error, could not locate member"); + if (File.Seek(Member->Start) == false) + return false; + + // Prepare Tar + ExtractTar Tar(File,Member->Size); + if (_error->PendingError() == true) + return false; + return Tar.Go(Stream); +} + /*}}}*/ +// DebFile::MergeControl - Merge the control information /*{{{*/ +// --------------------------------------------------------------------- +/* This reads the extracted control file into the cache and returns the + version that was parsed. All this really does is select the correct + parser and correct file to parse. */ +pkgCache::VerIterator debDebFile::MergeControl(pkgDataBase &DB) +{ + // Open the control file + string Tmp; + if (DB.GetMetaTmp(Tmp) == false) + return pkgCache::VerIterator(DB.GetCache()); + FileFd Fd(Tmp + "control",FileFd::ReadOnly); + if (_error->PendingError() == true) + return pkgCache::VerIterator(DB.GetCache()); + + // Parse it + debListParser Parse(&Fd); + pkgCache::VerIterator Ver(DB.GetCache()); + if (DB.GetGenerator().MergeList(Parse,&Ver) == false) + return pkgCache::VerIterator(DB.GetCache()); + + if (Ver.end() == true) + _error->Error("Failed to locate a valid control file"); + return Ver; +} + /*}}}*/ + +// DebFile::ControlExtract::DoItem - Control Tar Extraction /*{{{*/ +// --------------------------------------------------------------------- +/* This directory stream handler for the control tar handles extracting + it into the temporary meta directory. It only extracts files, it does + not create directories, links or anything else. */ +bool debDebFile::ControlExtract::DoItem(Item &Itm,int &Fd) +{ + if (Itm.Type != Item::File) + return true; + + /* Cleanse the file name, prevent people from trying to unpack into + absolute paths, .., etc */ + for (char *I = Itm.Name; *I != 0; I++) + if (*I == '/') + *I = '_'; + + /* Force the ownership to be root and ensure correct permissions, + go-w, the rest are left untouched */ + Itm.UID = 0; + Itm.GID = 0; + Itm.Mode &= ~(S_IWGRP | S_IWOTH); + + return pkgDirStream::DoItem(Itm,Fd); +} + /*}}}*/ + +// MemControlExtract::DoItem - Check if it is the control file /*{{{*/ +// --------------------------------------------------------------------- +/* This sets up to extract the control block member file into a memory + block of just the right size. All other files go into the bit bucket. */ +bool debDebFile::MemControlExtract::DoItem(Item &Itm,int &Fd) +{ + // At the control file, allocate buffer memory. + if (Member == Itm.Name) + { + delete [] Control; + Control = new char[Itm.Size+2]; + IsControl = true; + Fd = -2; // Signal to pass to Process + Length = Itm.Size; + } + else + IsControl = false; + + return true; +} + /*}}}*/ +// MemControlExtract::Process - Process extracting the control file /*{{{*/ +// --------------------------------------------------------------------- +/* 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, + unsigned long Size,unsigned long Pos) +{ + memcpy(Control + Pos, Data,Size); + return true; +} + /*}}}*/ +// MemControlExtract::Read - Read the control information from the deb /*{{{*/ +// --------------------------------------------------------------------- +/* This uses the internal tar extractor to fetch the control file, and then + it parses it into a tag section parser. */ +bool debDebFile::MemControlExtract::Read(debDebFile &Deb) +{ + // Get the archive member and positition the file + const ARArchive::Member *Member = Deb.GotoMember("control.tar.gz"); + if (Member == 0) + return false; + + // Extract it. + ExtractTar Tar(Deb.GetFile(),Member->Size); + if (Tar.Go(*this) == false) + return false; + + if (Control == 0) + return true; + + Control[Length] = '\n'; + Control[Length+1] = '\n'; + if (Section.Scan(Control,Length+2) == false) + return _error->Error("Unparsible control file"); + return true; +} + /*}}}*/ +// MemControlExtract::TakeControl - Parse a memory block /*{{{*/ +// --------------------------------------------------------------------- +/* The given memory block is loaded into the parser and parsed as a control + record. */ +bool debDebFile::MemControlExtract::TakeControl(const void *Data,unsigned long Size) +{ + delete [] Control; + Control = new char[Size+2]; + Length = Size; + memcpy(Control,Data,Size); + + Control[Length] = '\n'; + Control[Length+1] = '\n'; + return Section.Scan(Control,Length+2); +} + /*}}}*/ + diff --git a/apt/apt-inst/deb/debfile.h b/apt/apt-inst/deb/debfile.h new file mode 100644 index 0000000..f868b98 --- /dev/null +++ b/apt/apt-inst/deb/debfile.h @@ -0,0 +1,92 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debfile.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Debian Archive File (.deb) + + This Class handles all the operations performed directly on .deb + files. It makes use of the AR and TAR classes to give the necessary + external interface. + + There are only two things that can be done with a raw package, + extract it's control information and extract the contents itself. + + This should probably subclass an as-yet unwritten super class to + produce a generic archive mechanism. + + The memory control file extractor is useful to extract a single file + into memory from the control.tar.gz + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_DEBFILE_H +#define PKGLIB_DEBFILE_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/debfile.h" +#endif + +#include +#include +#include +#include + +class debDebFile +{ + protected: + + FileFd &File; + ARArchive AR; + + bool CheckMember(const char *Name); + + public: + + class ControlExtract; + class MemControlExtract; + + bool ExtractControl(pkgDataBase &DB); + bool ExtractArchive(pkgDirStream &Stream); + pkgCache::VerIterator MergeControl(pkgDataBase &DB); + const ARArchive::Member *GotoMember(const char *Name); + inline FileFd &GetFile() {return File;}; + + debDebFile(FileFd &File); +}; + +class debDebFile::ControlExtract : public pkgDirStream +{ + public: + + virtual bool DoItem(Item &Itm,int &Fd); +}; + +class debDebFile::MemControlExtract : public pkgDirStream +{ + bool IsControl; + + public: + + char *Control; + pkgTagSection Section; + unsigned long Length; + string Member; + + // Members from DirStream + virtual bool DoItem(Item &Itm,int &Fd); + virtual bool Process(Item &Itm,const unsigned char *Data, + unsigned long Size,unsigned long Pos); + + + // Helpers + bool Read(debDebFile &Deb); + bool TakeControl(const void *Data,unsigned long Size); + + MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {}; + MemControlExtract(string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; + ~MemControlExtract() {delete [] Control;}; +}; + /*}}}*/ + +#endif diff --git a/apt/apt-inst/deb/dpkgdb.cc b/apt/apt-inst/deb/dpkgdb.cc new file mode 100644 index 0000000..0a1efd7 --- /dev/null +++ b/apt/apt-inst/deb/dpkgdb.cc @@ -0,0 +1,493 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: dpkgdb.cc,v 1.4 2003/01/29 18:43:47 niemeyer Exp $ +/* ###################################################################### + + DPKGv1 Database Implemenation + + This class provides parsers and other implementations for the DPKGv1 + database. It reads the diversion file, the list files and the status + file to build both the list of currently installed files and the + currently installed package list. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/dpkgdb.h" +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + /*}}}*/ +using namespace std; + +// EraseDir - Erase A Directory /*{{{*/ +// --------------------------------------------------------------------- +/* This is necessary to create a new empty sub directory. The caller should + invoke mkdir after this with the proper permissions and check for + error. Maybe stick this in fileutils */ +static bool EraseDir(const char *Dir) +{ + // First we try a simple RM + if (rmdir(Dir) == 0 || + errno == ENOENT) + return true; + + // A file? Easy enough.. + if (errno == ENOTDIR) + { + if (unlink(Dir) != 0) + return _error->Errno("unlink","Failed to remove %s",Dir); + return true; + } + + // Should not happen + if (errno != ENOTEMPTY) + return _error->Errno("rmdir","Failed to remove %s",Dir); + + // Purge it using rm + int Pid = ExecFork(); + + // Spawn the subprocess + if (Pid == 0) + { + execlp(_config->Find("Dir::Bin::rm","/bin/rm").c_str(), + "rm","-rf","--",Dir,0); + _exit(100); + } + return ExecWait(Pid,_config->Find("dir::bin::rm","/bin/rm").c_str()); +} + /*}}}*/ +// DpkgDB::debDpkgDB - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debDpkgDB::debDpkgDB() : CacheMap(0), FileMap(0) +{ + AdminDir = flNotFile(_config->Find("Dir::State::status")); + DiverInode = 0; + DiverTime = 0; +} + /*}}}*/ +// DpkgDB::~debDpkgDB - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debDpkgDB::~debDpkgDB() +{ + delete Cache; + Cache = 0; + delete CacheMap; + CacheMap = 0; + + delete FList; + FList = 0; + delete FileMap; + FileMap = 0; +} + /*}}}*/ +// DpkgDB::InitMetaTmp - Get the temp dir for meta information /*{{{*/ +// --------------------------------------------------------------------- +/* This creats+empties the meta temporary directory /var/lib/dpkg/tmp.ci + Only one package at a time can be using the returned meta directory. */ +bool debDpkgDB::InitMetaTmp(string &Dir) +{ + string Tmp = AdminDir + "tmp.ci/"; + if (EraseDir(Tmp.c_str()) == false) + return _error->Error("Unable to create %s",Tmp.c_str()); + if (mkdir(Tmp.c_str(),0755) != 0) + return _error->Errno("mkdir","Unable to create %s",Tmp.c_str()); + + // Verify it is on the same filesystem as the main info directory + dev_t Dev; + struct stat St; + if (stat((AdminDir + "info").c_str(),&St) != 0) + return _error->Errno("stat","Failed to stat %sinfo",AdminDir.c_str()); + Dev = St.st_dev; + if (stat(Tmp.c_str(),&St) != 0) + return _error->Errno("stat","Failed to stat %s",Tmp.c_str()); + if (Dev != St.st_dev) + return _error->Error("The info and temp directories need to be on the same filesystem"); + + // Done + Dir = Tmp; + return true; +} + /*}}}*/ +// DpkgDB::ReadyPkgCache - Prepare the cache with the current status /*{{{*/ +// --------------------------------------------------------------------- +/* This reads in the status file into an empty cache. This really needs + to be somehow unified with the high level APT notion of the Database + directory, but there is no clear way on how to do that yet. */ +bool debDpkgDB::ReadyPkgCache(OpProgress &Progress) +{ + if (Cache != 0) + { + Progress.OverallProgress(1,1,1,"Reading Package Lists"); + return true; + } + + if (CacheMap != 0) + { + delete CacheMap; + CacheMap = 0; + } + + if (pkgMakeOnlyStatusCache(Progress,&CacheMap) == false) + return false; + Cache->DropProgress(); + + return true; +} + /*}}}*/ +// DpkgDB::ReadFList - Read the File Listings in /*{{{*/ +// --------------------------------------------------------------------- +/* This reads the file listing in from the state directory. This is a + performance critical routine, as it needs to parse about 50k lines of + text spread over a hundred or more files. For an initial cold start + most of the time is spent in reading file inodes and so on, not + actually parsing. */ +bool debDpkgDB::ReadFList(OpProgress &Progress) +{ + // Count the number of packages we need to read information for + unsigned long Total = 0; + pkgCache &Cache = this->Cache->GetCache(); + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + { + // Only not installed packages have no files. + if (I->CurrentState == pkgCache::State::NotInstalled) + continue; + Total++; + } + + /* Switch into the admin dir, this prevents useless lookups for the + path components */ + string Cwd = SafeGetCWD(); + if (chdir((AdminDir + "info/").c_str()) != 0) + return _error->Errno("chdir","Failed to change to the admin dir %sinfo",AdminDir.c_str()); + + // Allocate a buffer. Anything larger than this buffer will be mmaped + unsigned long BufSize = 32*1024; + char *Buffer = new char[BufSize]; + + // Begin Loading them + unsigned long Count = 0; + char Name[300]; + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + { + /* Only not installed packages have no files. ConfFile packages have + file lists but we don't want to read them in */ + if (I->CurrentState == pkgCache::State::NotInstalled || + I->CurrentState == pkgCache::State::ConfigFiles) + continue; + + // Fetch a package handle to associate with the file + pkgFLCache::PkgIterator FlPkg = FList->GetPkg(I.Name(),0,true); + if (FlPkg.end() == true) + { + _error->Error("Internal Error getting a Package Name"); + break; + } + + Progress.OverallProgress(Count,Total,1,"Reading File Listing"); + + // Open the list file + snprintf(Name,sizeof(Name),"%s.list",I.Name()); + int Fd = open(Name,O_RDONLY); + + /* Okay this is very strange and bad.. Best thing is to bail and + instruct the user to look into it. */ + struct stat Stat; + if (Fd == -1 || fstat(Fd,&Stat) != 0) + { + _error->Errno("open","Failed to open the list file '%sinfo/%s'. If you " + "cannot restore this file then make it empty " + "and immediately re-install the same version of the package!", + AdminDir.c_str(),Name); + break; + } + + // Set File to be a memory buffer containing the whole file + char *File; + if ((unsigned)Stat.st_size < BufSize) + { + if (read(Fd,Buffer,Stat.st_size) != Stat.st_size) + { + _error->Errno("read","Failed reading the list file %sinfo/%s", + AdminDir.c_str(),Name); + close(Fd); + break; + } + File = Buffer; + } + else + { + // Use mmap + File = (char *)mmap(0,Stat.st_size,PROT_READ,MAP_PRIVATE,Fd,0); + if (File == (char *)(-1)) + { + _error->Errno("mmap","Failed reading the list file %sinfo/%s", + AdminDir.c_str(),Name); + close(Fd); + break; + } + } + + // Parse it + const char *Start = File; + const char *End = File; + const char *Finish = File + Stat.st_size; + for (; End < Finish; End++) + { + // Not an end of line + if (*End != '\n' && End + 1 < Finish) + continue; + + // Skip blank lines + if (End - Start > 1) + { + pkgFLCache::NodeIterator Node = FList->GetNode(Start,End, + FlPkg.Offset(),true,false); + if (Node.end() == true) + { + _error->Error("Internal Error getting a Node"); + break; + } + } + + // Skip past the end of line + for (; *End == '\n' && End < Finish; End++); + Start = End; + } + + close(Fd); + if ((unsigned)Stat.st_size >= BufSize) + munmap((caddr_t)File,Stat.st_size); + + // Failed + if (End < Finish) + break; + + Count++; + } + + delete [] Buffer; + if (chdir(Cwd.c_str()) != 0) + chdir("/"); + + return !_error->PendingError(); +} + /*}}}*/ +// DpkgDB::ReadDiversions - Load the diversions file /*{{{*/ +// --------------------------------------------------------------------- +/* Read the diversion file in from disk. This is usually invoked by + LoadChanges before performing an operation that uses the FLCache. */ +bool debDpkgDB::ReadDiversions() +{ + struct stat Stat; + if (stat((AdminDir + "diversions").c_str(),&Stat) != 0) + return true; + + if (_error->PendingError() == true) + return false; + + FILE *Fd = fopen((AdminDir + "diversions").c_str(),"r"); + if (Fd == 0) + return _error->Errno("fopen","Failed to open the diversions file %sdiversions",AdminDir.c_str()); + + FList->BeginDiverLoad(); + while (1) + { + char From[300]; + char To[300]; + char Package[100]; + + // Read the three lines in + if (fgets(From,sizeof(From),Fd) == 0) + break; + if (fgets(To,sizeof(To),Fd) == 0 || + fgets(Package,sizeof(Package),Fd) == 0) + { + _error->Error("The diversion file is corrupted"); + break; + } + + // Strip the \ns + unsigned long Len = strlen(From); + if (Len < 2 || From[Len-1] != '\n') + _error->Error("Invalid line in the diversion file: %s",From); + else + From[Len-1] = 0; + Len = strlen(To); + if (Len < 2 || To[Len-1] != '\n') + _error->Error("Invalid line in the diversion file: %s",To); + else + To[Len-1] = 0; + Len = strlen(Package); + if (Len < 2 || Package[Len-1] != '\n') + _error->Error("Invalid line in the diversion file: %s",Package); + else + Package[Len-1] = 0; + + // Make sure the lines were parsed OK + if (_error->PendingError() == true) + break; + + // Fetch a package + if (strcmp(Package,":") == 0) + Package[0] = 0; + pkgFLCache::PkgIterator FlPkg = FList->GetPkg(Package,0,true); + if (FlPkg.end() == true) + { + _error->Error("Internal Error getting a Package Name"); + break; + } + + // Install the diversion + if (FList->AddDiversion(FlPkg,From,To) == false) + { + _error->Error("Internal Error adding a diversion"); + break; + } + } + if (_error->PendingError() == false) + FList->FinishDiverLoad(); + + DiverInode = Stat.st_ino; + DiverTime = Stat.st_mtime; + + fclose(Fd); + return !_error->PendingError(); +} + /*}}}*/ +// DpkgDB::ReadFileList - Read the file listing /*{{{*/ +// --------------------------------------------------------------------- +/* Read in the file listing. The file listing is created from three + sources, *.list, Conffile sections and the Diversion table. */ +bool debDpkgDB::ReadyFileList(OpProgress &Progress) +{ + if (Cache == 0) + return _error->Error("The pkg cache must be initialize first"); + if (FList != 0) + { + Progress.OverallProgress(1,1,1,"Reading File List"); + return true; + } + + // Create the cache and read in the file listing + FileMap = new DynamicMMap(MMap::Public); + FList = new pkgFLCache(*FileMap); + if (_error->PendingError() == true || + ReadFList(Progress) == false || + ReadConfFiles() == false || + ReadDiversions() == false) + { + delete FList; + delete FileMap; + FileMap = 0; + FList = 0; + return false; + } + + cout << "Node: " << FList->HeaderP->NodeCount << ',' << FList->HeaderP->UniqNodes << endl; + cout << "Dir: " << FList->HeaderP->DirCount << endl; + cout << "Package: " << FList->HeaderP->PackageCount << endl; + cout << "HashSize: " << FList->HeaderP->HashSize << endl; + cout << "Size: " << FileMap->Size() << endl; + cout << endl; + + return true; +} + /*}}}*/ +// DpkgDB::ReadConfFiles - Read the conf file sections from the s-file /*{{{*/ +// --------------------------------------------------------------------- +/* Reading the conf files is done by reparsing the status file. This is + actually rather fast so it is no big deal. */ +bool debDpkgDB::ReadConfFiles() +{ + FileFd File(_config->FindFile("Dir::State::status"),FileFd::ReadOnly); + pkgTagFile Tags(&File); + if (_error->PendingError() == true) + return false; + + pkgTagSection Section; + while (1) + { + // Skip to the next section + unsigned long Offset = Tags.Offset(); + if (Tags.Step(Section) == false) + break; + + // Parse the line + const char *Start; + const char *Stop; + if (Section.Find("Conffiles",Start,Stop) == false) + continue; + + const char *PkgStart; + const char *PkgEnd; + if (Section.Find("Package",PkgStart,PkgEnd) == false) + return _error->Error("Failed to find a Package: Header, offset %lu",Offset); + + // Snag a package record for it + pkgFLCache::PkgIterator FlPkg = FList->GetPkg(PkgStart,PkgEnd,true); + if (FlPkg.end() == true) + return _error->Error("Internal Error getting a Package Name"); + + // Parse the conf file lines + while (1) + { + for (; isspace(*Start) != 0 && Start < Stop; Start++); + if (Start == Stop) + break; + + // Split it into words + const char *End = Start; + for (; isspace(*End) == 0 && End < Stop; End++); + const char *StartMd5 = End; + for (; isspace(*StartMd5) != 0 && StartMd5 < Stop; StartMd5++); + const char *EndMd5 = StartMd5; + for (; isspace(*EndMd5) == 0 && EndMd5 < Stop; EndMd5++); + if (StartMd5 == EndMd5 || Start == End) + return _error->Error("Bad ConfFile section in the status file. Offset %lu",Offset); + + // Insert a new entry + unsigned char MD5[16]; + if (Hex2Num(string(StartMd5,EndMd5-StartMd5),MD5,16) == false) + return _error->Error("Error parsing MD5. Offset %lu",Offset); + + if (FList->AddConfFile(Start,End,FlPkg,MD5) == false) + return false; + Start = EndMd5; + } + } + + return true; +} + /*}}}*/ +// DpkgDB::LoadChanges - Read in any changed state files /*{{{*/ +// --------------------------------------------------------------------- +/* The only file in the dpkg system that can change while packages are + unpacking is the diversions file. */ +bool debDpkgDB::LoadChanges() +{ + struct stat Stat; + if (stat((AdminDir + "diversions").c_str(),&Stat) != 0) + return true; + if (DiverInode == Stat.st_ino && DiverTime == Stat.st_mtime) + return true; + return ReadDiversions(); +} + /*}}}*/ diff --git a/apt/apt-inst/deb/dpkgdb.h b/apt/apt-inst/deb/dpkgdb.h new file mode 100644 index 0000000..067c205 --- /dev/null +++ b/apt/apt-inst/deb/dpkgdb.h @@ -0,0 +1,53 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: dpkgdb.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + DPKGv1 Data Base Implemenation + + The DPKGv1 database is typically stored in /var/lib/dpkg/. For + DPKGv1 the 'meta' information is the contents of the .deb control.tar.gz + member prepended by the package name. The meta information is unpacked + in its temporary directory and then migrated into the main list dir + at a checkpoint. + + Journaling is providing by syncronized file writes to the updates sub + directory. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_DPKGDB_H +#define PKGLIB_DPKGDB_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/dpkgdb.h" +#endif + +#include + +class debDpkgDB : public pkgDataBase +{ + protected: + + string AdminDir; + DynamicMMap *CacheMap; + DynamicMMap *FileMap; + unsigned long DiverInode; + signed long DiverTime; + + virtual bool InitMetaTmp(string &Dir); + bool ReadFList(OpProgress &Progress); + bool ReadDiversions(); + bool ReadConfFiles(); + + public: + + virtual bool ReadyFileList(OpProgress &Progress); + virtual bool ReadyPkgCache(OpProgress &Progress); + virtual bool LoadChanges(); + + debDpkgDB(); + virtual ~debDpkgDB(); +}; + +#endif diff --git a/apt/apt-inst/dirstream.cc b/apt/apt-inst/dirstream.cc new file mode 100644 index 0000000..a74c01c --- /dev/null +++ b/apt/apt-inst/dirstream.cc @@ -0,0 +1,103 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: dirstream.cc,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Directory Stream + + This class provides a simple basic extractor that can be used for + a number of purposes. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/dirstream.h" +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include + /*}}}*/ + +// DirStream::DoItem - Process an item /*{{{*/ +// --------------------------------------------------------------------- +/* This is a very simple extractor, it does not deal with things like + overwriting directories with files and so on. */ +bool pkgDirStream::DoItem(Item &Itm,int &Fd) +{ + switch (Itm.Type) + { + case Item::File: + { + /* Open the output file, NDELAY is used to prevent this from + blowing up on device special files.. */ + int iFd = open(Itm.Name,O_NDELAY|O_WRONLY|O_CREAT|O_TRUNC|O_APPEND, + Itm.Mode); + if (iFd < 0) + return _error->Errno("open","Failed write file %s", + Itm.Name); + + // fchmod deals with umask and fchown sets the ownership + if (fchmod(iFd,Itm.Mode) != 0) + return _error->Errno("fchmod","Failed write file %s", + Itm.Name); + if (fchown(iFd,Itm.UID,Itm.GID) != 0 && errno != EPERM) + return _error->Errno("fchown","Failed write file %s", + Itm.Name); + Fd = iFd; + return true; + } + + case Item::HardLink: + case Item::SymbolicLink: + case Item::CharDevice: + case Item::BlockDevice: + case Item::Directory: + case Item::FIFO: + break; + } + + return true; +} + /*}}}*/ +// DirStream::FinishedFile - Finished processing a file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgDirStream::FinishedFile(Item &Itm,int Fd) +{ + if (Fd < 0) + return true; + + if (close(Fd) != 0) + return _error->Errno("close","Failed to close file %s",Itm.Name); + + /* Set the modification times. The only way it can fail is if someone + has futzed with our file, which is intolerable :> */ + struct utimbuf Time; + Time.actime = Itm.MTime; + Time.modtime = Itm.MTime; + if (utime(Itm.Name,&Time) != 0) + _error->Errno("utime","Failed to close file %s",Itm.Name); + + return true; +} + /*}}}*/ +// DirStream::Fail - Failed processing a file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgDirStream::Fail(Item &Itm,int Fd) +{ + if (Fd < 0) + return true; + + close(Fd); + return false; +} + /*}}}*/ diff --git a/apt/apt-inst/dirstream.h b/apt/apt-inst/dirstream.h new file mode 100644 index 0000000..a0dc91f --- /dev/null +++ b/apt/apt-inst/dirstream.h @@ -0,0 +1,61 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: dirstream.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Directory Stream + + When unpacking the contents of the archive are passed into a directory + stream class for analysis and processing. The class controls all aspects + of actually writing the directory stream from disk. The low level + archive handlers are only responsible for decoding the archive format + and sending events (via method calls) to the specified directory + stream. + + When unpacking a real file the archive handler is passed back a file + handle to write the data to, this is to support strange + archives+unpacking methods. If that fd is -1 then the file data is + simply ignored. + + The provided defaults do the 'Right Thing' for a normal unpacking + process (ie 'tar') + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_DIRSTREAM_H +#define PKGLIB_DIRSTREAM_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/dirstream.h" +#endif + +class pkgDirStream +{ + public: + + // All possible information about a component + struct Item + { + enum Type_t {File, HardLink, SymbolicLink, CharDevice, BlockDevice, + Directory, FIFO} Type; + char *Name; + char *LinkTarget; + unsigned long Mode; + unsigned long UID; + unsigned long GID; + unsigned long Size; + unsigned long MTime; + unsigned long Major; + unsigned long Minor; + }; + + virtual bool DoItem(Item &Itm,int &Fd); + virtual bool Fail(Item &Itm,int Fd); + virtual bool FinishedFile(Item &Itm,int Fd); + virtual bool Process(Item &Itm,const unsigned char *Data, + unsigned long Size,unsigned long Pos) {return true;}; + + virtual ~pkgDirStream() {}; +}; + +#endif diff --git a/apt/apt-inst/dpkg-diffs.txt b/apt/apt-inst/dpkg-diffs.txt new file mode 100644 index 0000000..d161055 --- /dev/null +++ b/apt/apt-inst/dpkg-diffs.txt @@ -0,0 +1,5 @@ +- Replacing directories with files + dpkg permits this with the weak condition that the directory is owned only + by the package. APT requires that the directory have no files that are not + owned by the package. Replaces are specifically not checked to prevent + file list corruption. diff --git a/apt/apt-inst/extract.cc b/apt/apt-inst/extract.cc new file mode 100644 index 0000000..25aa4cf --- /dev/null +++ b/apt/apt-inst/extract.cc @@ -0,0 +1,511 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: extract.cc,v 1.4 2003/01/29 18:43:47 niemeyer Exp $ +/* ###################################################################### + + Archive Extraction Directory Stream + + Extraction for each file is a bit of an involved process. Each object + undergoes an atomic backup, overwrite, erase sequence. First the + object is unpacked to '.dpkg.new' then the original is hardlinked to + '.dpkg.tmp' and finally the new object is renamed to overwrite the old + one. From an external perspective the file never ceased to exist. + After the archive has been sucessfully unpacked the .dpkg.tmp files + are erased. A failure causes all the .dpkg.tmp files to be restored. + + Decisions about unpacking go like this: + - Store the original filename in the file listing + - Resolve any diversions that would effect this file, all checks + below apply to the diverted name, not the real one. + - Resolve any symlinked configuration files. + - If the existing file does not exist then .dpkg-tmp is checked for. + [Note, this is reduced to only check if a file was expected to be + there] + - If the existing link/file is not a directory then it is replaced + irregardless + - If the existing link/directory is being replaced by a directory then + absolutely nothing happens. + - If the existing link/directory is being replaced by a link then + absolutely nothing happens. + - If the existing link/directory is being replaced by a non-directory + then this will abort if the package is not the sole owner of the + directory. [Note, this is changed to not happen if the directory + non-empty - that is, it only includes files that are part of this + package - prevents removing user files accidentally.] + - If the non-directory exists in the listing database and it + does not belong to the current package then an overwrite condition + is invoked. + + As we unpack we record the file list differences in the FL cache. If + we need to unroll the the FL cache knows which files have been unpacked + and can undo. When we need to erase then it knows which files have not + been unpacked. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/extract.h" +#endif +#include +#include +#include + +#include +#include +#include +#include +#include +#include + /*}}}*/ +using namespace std; + +static const char *TempExt = "dpkg-tmp"; +//static const char *NewExt = "dpkg-new"; + +// Extract::pkgExtract - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgExtract::pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver) : + FLCache(FLCache), Ver(Ver) +{ + FLPkg = FLCache.GetPkg(Ver.ParentPkg().Name(),true); + if (FLPkg.end() == true) + return; + Debug = true; +} + /*}}}*/ +// Extract::DoItem - Handle a single item from the stream /*{{{*/ +// --------------------------------------------------------------------- +/* This performs the setup for the extraction.. */ +bool pkgExtract::DoItem(Item &Itm,int &Fd) +{ + char Temp[sizeof(FileName)]; + + /* Strip any leading/trailing /s from the filename, then copy it to the + temp buffer and re-apply the leading / We use a class variable + to store the new filename for use by the three extraction funcs */ + char *End = FileName+1; + const char *I = Itm.Name; + for (; *I != 0 && *I == '/'; I++); + *FileName = '/'; + for (; *I != 0 && End < FileName + sizeof(FileName); I++, End++) + *End = *I; + if (End + 20 >= FileName + sizeof(FileName)) + return _error->Error("The path %s is too long",Itm.Name); + for (; End > FileName && End[-1] == '/'; End--); + *End = 0; + Itm.Name = FileName; + + /* Lookup the file. Nde is the file [group] we are going to write to and + RealNde is the actual node we are manipulating. Due to diversions + they may be entirely different. */ + pkgFLCache::NodeIterator Nde = FLCache.GetNode(Itm.Name,End,0,false,false); + pkgFLCache::NodeIterator RealNde = Nde; + + // See if the file is already in the file listing + unsigned long FileGroup = RealNde->File; + for (; RealNde.end() == false && FileGroup == RealNde->File; RealNde++) + if (RealNde.RealPackage() == FLPkg) + break; + + // Nope, create an entry + if (RealNde.end() == true) + { + RealNde = FLCache.GetNode(Itm.Name,End,FLPkg.Offset(),true,false); + if (RealNde.end() == true) + return false; + RealNde->Flags |= pkgFLCache::Node::NewFile; + } + + /* Check if this entry already was unpacked. The only time this should + ever happen is if someone has hacked tar to support capabilities, in + which case this needs to be modified anyhow.. */ + if ((RealNde->Flags & pkgFLCache::Node::Unpacked) == + pkgFLCache::Node::Unpacked) + return _error->Error("Unpacking %s more than once",Itm.Name); + + if (Nde.end() == true) + Nde = RealNde; + + /* Consider a diverted file - We are not permitted to divert directories, + but everything else is fair game (including conf files!) */ + if ((Nde->Flags & pkgFLCache::Node::Diversion) != 0) + { + if (Itm.Type == Item::Directory) + return _error->Error("The directory %s is diverted",Itm.Name); + + /* A package overwriting a diversion target is just the same as + overwriting a normally owned file and is checked for below in + the overwrites mechanism */ + + /* If this package is trying to overwrite the target of a diversion, + that is never, ever permitted */ + pkgFLCache::DiverIterator Div = Nde.Diversion(); + if (Div.DivertTo() == Nde) + return _error->Error("The package is trying to write to the " + "diversion target %s/%s",Nde.DirN(),Nde.File()); + + // See if it is us and we are following it in the right direction + if (Div->OwnerPkg != FLPkg.Offset() && Div.DivertFrom() == Nde) + { + Nde = Div.DivertTo(); + End = FileName + snprintf(FileName,sizeof(FileName)-20,"%s/%s", + Nde.DirN(),Nde.File()); + if (End <= FileName) + return _error->Error("The diversion path is too long"); + } + } + + // Deal with symlinks and conf files + if ((RealNde->Flags & pkgFLCache::Node::NewConfFile) == + pkgFLCache::Node::NewConfFile) + { + string Res = flNoLink(Itm.Name); + if (Res.length() > sizeof(FileName)) + return _error->Error("The path %s is too long",Res.c_str()); + if (Debug == true) + clog << "Followed conf file from " << FileName << " to " << Res << endl; + Itm.Name = strcpy(FileName,Res.c_str()); + } + + /* Get information about the existing file, and attempt to restore + a backup if it does not exist */ + struct stat LExisting; + bool EValid = false; + if (lstat(Itm.Name,&LExisting) != 0) + { + // This is bad news. + if (errno != ENOENT) + return _error->Errno("stat","Failed to stat %s",Itm.Name); + + // See if we can recover the backup file + if (Nde.end() == false) + { + snprintf(Temp,sizeof(Temp),"%s.%s",Itm.Name,TempExt); + if (rename(Temp,Itm.Name) != 0 && errno != ENOENT) + return _error->Errno("rename","Failed to rename %s to %s", + Temp,Itm.Name); + if (stat(Itm.Name,&LExisting) != 0) + { + if (errno != ENOENT) + return _error->Errno("stat","Failed to stat %s",Itm.Name); + } + else + EValid = true; + } + } + else + EValid = true; + + /* If the file is a link we need to stat its destination, get the + existing file modes */ + struct stat Existing = LExisting; + if (EValid == true && S_ISLNK(Existing.st_mode)) + { + if (stat(Itm.Name,&Existing) != 0) + { + if (errno != ENOENT) + return _error->Errno("stat","Failed to stat %s",Itm.Name); + Existing = LExisting; + } + } + + // We pretend a non-existing file looks like it is a normal file + if (EValid == false) + Existing.st_mode = S_IFREG; + + /* Okay, at this point 'Existing' is the stat information for the + real non-link file */ + + /* The only way this can be a no-op is if a directory is being + replaced by a directory or by a link */ + if (S_ISDIR(Existing.st_mode) != 0 && + (Itm.Type == Item::Directory || Itm.Type == Item::SymbolicLink)) + return true; + + /* Non-Directory being replaced by non-directory. We check for over + writes here. */ + if (Nde.end() == false) + { + if (HandleOverwrites(Nde) == false) + return false; + } + + /* Directory being replaced by a non-directory - this needs to see if + the package is the owner and then see if the directory would be + empty after the package is removed [ie no user files will be + erased] */ + if (S_ISDIR(Existing.st_mode) != 0) + { + if (CheckDirReplace(Itm.Name) == false) + return _error->Error("The directory %s is being replaced by a non-directory",Itm.Name); + } + + if (Debug == true) + clog << "Extract " << string(Itm.Name,End) << endl; +/* if (Count != 0) + return _error->Error("Done");*/ + + return true; +} + /*}}}*/ +// Extract::Finished - Sequence finished, erase the temp files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgExtract::Finished() +{ + return true; +} + /*}}}*/ +// Extract::Aborted - Sequence aborted, undo all our unpacking /*{{{*/ +// --------------------------------------------------------------------- +/* This undoes everything that was done by all calls to the DoItem method + and restores the File Listing cache to its original form. It bases its + actions on the flags value for each node in the cache. */ +bool pkgExtract::Aborted() +{ + if (Debug == true) + clog << "Aborted, backing out" << endl; + + pkgFLCache::NodeIterator Files = FLPkg.Files(); + map_ptrloc *Last = &FLPkg->Files; + + /* Loop over all files, restore those that have been unpacked from their + dpkg-tmp entires */ + while (Files.end() == false) + { + // Locate the hash bucket for the node and locate its group head + pkgFLCache::NodeIterator Nde(FLCache,FLCache.HashNode(Files)); + for (; Nde.end() == false && Files->File != Nde->File; Nde++); + if (Nde.end() == true) + return _error->Error("Failed to locate node in its hash bucket"); + + if (snprintf(FileName,sizeof(FileName)-20,"%s/%s", + Nde.DirN(),Nde.File()) <= 0) + return _error->Error("The path is too long"); + + // Deal with diversions + if ((Nde->Flags & pkgFLCache::Node::Diversion) != 0) + { + pkgFLCache::DiverIterator Div = Nde.Diversion(); + + // See if it is us and we are following it in the right direction + if (Div->OwnerPkg != FLPkg.Offset() && Div.DivertFrom() == Nde) + { + Nde = Div.DivertTo(); + if (snprintf(FileName,sizeof(FileName)-20,"%s/%s", + Nde.DirN(),Nde.File()) <= 0) + return _error->Error("The diversion path is too long"); + } + } + + // Deal with overwrites+replaces + for (; Nde.end() == false && Files->File == Nde->File; Nde++) + { + if ((Nde->Flags & pkgFLCache::Node::Replaced) == + pkgFLCache::Node::Replaced) + { + if (Debug == true) + clog << "De-replaced " << FileName << " from " << Nde.RealPackage()->Name << endl; + Nde->Flags &= ~pkgFLCache::Node::Replaced; + } + } + + // Undo the change in the filesystem + if (Debug == true) + clog << "Backing out " << FileName; + + // Remove a new node + if ((Files->Flags & pkgFLCache::Node::NewFile) == + pkgFLCache::Node::NewFile) + { + if (Debug == true) + clog << " [new node]" << endl; + pkgFLCache::Node *Tmp = Files; + Files++; + *Last = Tmp->NextPkg; + Tmp->NextPkg = 0; + + FLCache.DropNode(Tmp - FLCache.NodeP); + } + else + { + if (Debug == true) + clog << endl; + + Last = &Files->NextPkg; + Files++; + } + } + + return true; +} + /*}}}*/ +// Extract::Fail - Extraction of a file Failed /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgExtract::Fail(Item &Itm,int Fd) +{ + return pkgDirStream::Fail(Itm,Fd); +} + /*}}}*/ +// Extract::FinishedFile - Finished a file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgExtract::FinishedFile(Item &Itm,int Fd) +{ + return pkgDirStream::FinishedFile(Itm,Fd); +} + /*}}}*/ +// Extract::HandleOverwrites - See if a replaces covers this overwrite /*{{{*/ +// --------------------------------------------------------------------- +/* Check if the file is in a package that is being replaced by this + package or if the file is being overwritten. Note that if the file + is really a directory but it has been erased from the filesystem + this will fail with an overwrite message. This is a limitation of the + dpkg file information format. + + XX If a new package installs and another package replaces files in this + package what should we do? */ +bool pkgExtract::HandleOverwrites(pkgFLCache::NodeIterator Nde, + bool DiverCheck) +{ + pkgFLCache::NodeIterator TmpNde = Nde; + unsigned long DiverOwner = 0; + unsigned long FileGroup = Nde->File; + const char *FirstOwner = 0; + for (; Nde.end() == false && FileGroup == Nde->File; Nde++) + { + if ((Nde->Flags & pkgFLCache::Node::Diversion) != 0) + { + /* Store the diversion owner if this is the forward direction + of the diversion */ + if (DiverCheck == true) + DiverOwner = Nde.Diversion()->OwnerPkg; + continue; + } + + pkgFLCache::PkgIterator FPkg(FLCache,Nde.RealPackage()); + if (FPkg.end() == true || FPkg == FLPkg) + continue; + + /* This tests trips when we are checking a diversion to see + if something has already been diverted by this diversion */ + if (FPkg.Offset() == DiverOwner) + continue; + FirstOwner = FPkg.Name(); + + // Now see if this package matches one in a replace depends + pkgCache::DepIterator Dep = Ver.DependsList(); + bool Ok = false; + for (; Dep.end() == false; Dep++) + { + if (Dep->Type != pkgCache::Dep::Replaces) + continue; + + // Does the replaces apply to this package? + if (strcmp(Dep.TargetPkg().Name(),FPkg.Name()) != 0) + continue; + + /* Check the version for match. I do not think CurrentVer can be + 0 if we are here.. */ + pkgCache::PkgIterator Pkg = Dep.TargetPkg(); + if (Pkg->CurrentVer == 0) + { + _error->Warning("Overwrite package match with no version for %s",Pkg.Name()); + continue; + } + + // Replaces is met + if (debVS.CheckDep(Pkg.CurrentVer().VerStr(),Dep->CompareOp,Dep.TargetVer()) == true) + { + if (Debug == true) + clog << "Replaced file " << Nde.DirN() << '/' << Nde.File() << " from " << Pkg.Name() << endl; + Nde->Flags |= pkgFLCache::Node::Replaced; + Ok = true; + break; + } + } + + // Negative Hit + if (Ok == false) + return _error->Error("File %s/%s overwrites the one in the package %s", + Nde.DirN(),Nde.File(),FPkg.Name()); + } + + /* If this is a diversion we might have to recurse to process + the other side of it */ + if ((TmpNde->Flags & pkgFLCache::Node::Diversion) != 0) + { + pkgFLCache::DiverIterator Div = TmpNde.Diversion(); + if (Div.DivertTo() == TmpNde) + return HandleOverwrites(Div.DivertFrom(),true); + } + + return true; +} + /*}}}*/ +// Extract::CheckDirReplace - See if this directory can be erased /*{{{*/ +// --------------------------------------------------------------------- +/* If this directory is owned by a single package and that package is + replacing it with something non-directoryish then dpkg allows this. + We increase the requirement to be that the directory is non-empty after + the package is removed */ +bool pkgExtract::CheckDirReplace(string Dir,unsigned int Depth) +{ + // Looping? + if (Depth > 40) + return false; + + if (Dir[Dir.size() - 1] != '/') + Dir += '/'; + + DIR *D = opendir(Dir.c_str()); + if (D == 0) + return _error->Errno("opendir","Unable to read %s",Dir.c_str()); + + string File; + for (struct dirent *Dent = readdir(D); Dent != 0; Dent = readdir(D)) + { + // Skip some files + if (strcmp(Dent->d_name,".") == 0 || + strcmp(Dent->d_name,"..") == 0) + continue; + + // Look up the node + File = Dir + Dent->d_name; + pkgFLCache::NodeIterator Nde = FLCache.GetNode(File.c_str(), + File.c_str() + File.length(),0,false,false); + + // The file is not owned by this package + if (Nde.end() != false || Nde.RealPackage() != FLPkg) + { + closedir(D); + return false; + } + + // See if it is a directory + struct stat St; + if (lstat(File.c_str(),&St) != 0) + { + closedir(D); + return _error->Errno("lstat","Unable to stat %s",File.c_str()); + } + + // Recurse down directories + if (S_ISDIR(St.st_mode) != 0) + { + if (CheckDirReplace(File,Depth + 1) == false) + { + closedir(D); + return false; + } + } + } + + // No conflicts + closedir(D); + return true; +} + /*}}}*/ diff --git a/apt/apt-inst/extract.h b/apt/apt-inst/extract.h new file mode 100644 index 0000000..7e71b26 --- /dev/null +++ b/apt/apt-inst/extract.h @@ -0,0 +1,52 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: extract.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + Archive Extraction Directory Stream + + This Directory Stream implements extraction of an archive into the + filesystem. It makes the choices on what files should be unpacked and + replaces as well as guiding the actual unpacking. + + When the unpacking sequence is completed one of the two functions, + Finished or Aborted must be called. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_EXTRACT_H +#define PKGLIB_EXTRACT_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/extract.h" +#endif + +#include +#include +#include + +class pkgExtract : public pkgDirStream +{ + pkgFLCache &FLCache; + pkgCache::VerIterator Ver; + pkgFLCache::PkgIterator FLPkg; + char FileName[1024]; + bool Debug; + + bool HandleOverwrites(pkgFLCache::NodeIterator Nde, + bool DiverCheck = false); + bool CheckDirReplace(string Dir,unsigned int Depth = 0); + + public: + + virtual bool DoItem(Item &Itm,int &Fd); + virtual bool Fail(Item &Itm,int Fd); + virtual bool FinishedFile(Item &Itm,int Fd); + + bool Finished(); + bool Aborted(); + + pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver); +}; + +#endif diff --git a/apt/apt-inst/filelist.cc b/apt/apt-inst/filelist.cc new file mode 100644 index 0000000..1536efc --- /dev/null +++ b/apt/apt-inst/filelist.cc @@ -0,0 +1,590 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: filelist.cc,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + File Listing - Manages a Cache of File -> Package names. + + Diversions add some signficant complexity to the system. To keep + storage space down in the very special case of a diverted file no + extra bytes are allocated in the Node structure. Instead a diversion + is inserted directly into the hash table and its flag bit set. Every + lookup for that filename will always return the diversion. + + The hash buckets are stored in sorted form, with diversions having + the higest sort order. Identical files are assigned the same file + pointer, thus after a search all of the nodes owning that file can be + found by iterating down the bucket. + + Re-updates of diversions (another extremely special case) are done by + marking all diversions as untouched, then loading the entire diversion + list again, touching each diversion and then finally going back and + releasing all untouched diversions. It is assumed that the diversion + table will always be quite small and be a very irregular case. + + Diversions that are user-installed are represented by a package with + an empty name string. + + Conf files are handled like diversions by changing the meaning of the + Pointer field to point to a conf file entry - again to reduce over + head for a special case. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/filelist.h" +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include + /*}}}*/ + +using namespace std; + +// FlCache::Header::Header - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Initialize the header variables. These are the defaults used when + creating new caches */ +pkgFLCache::Header::Header() +{ + Signature = 0xEA3F1295; + + /* Whenever the structures change the major version should be bumped, + whenever the generator changes the minor version should be bumped. */ + MajorVersion = 1; + MinorVersion = 0; + Dirty = true; + + HeaderSz = sizeof(pkgFLCache::Header); + NodeSz = sizeof(pkgFLCache::Node); + DirSz = sizeof(pkgFLCache::Directory); + PackageSz = sizeof(pkgFLCache::Package); + DiversionSz = sizeof(pkgFLCache::Diversion); + ConfFileSz = sizeof(pkgFLCache::ConfFile); + + NodeCount = 0; + DirCount = 0; + PackageCount = 0; + DiversionCount = 0; + ConfFileCount = 0; + HashSize = 1 << 14; + + FileHash = 0; + DirTree = 0; + Packages = 0; + Diversions = 0; + UniqNodes = 0; + memset(Pools,0,sizeof(Pools)); +} + /*}}}*/ +// FLCache::Header::CheckSizes - Check if the two headers have same *sz /*{{{*/ +// --------------------------------------------------------------------- +/* Compare to make sure we are matching versions */ +bool pkgFLCache::Header::CheckSizes(Header &Against) const +{ + if (HeaderSz == Against.HeaderSz && + NodeSz == Against.NodeSz && + DirSz == Against.DirSz && + DiversionSz == Against.DiversionSz && + PackageSz == Against.PackageSz && + ConfFileSz == Against.ConfFileSz) + return true; + return false; +} + /*}}}*/ + +// FLCache::pkgFLCache - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* If this is a new cache then a new header and hash table are instantaited + otherwise the existing ones are mearly attached */ +pkgFLCache::pkgFLCache(DynamicMMap &Map) : Map(Map) +{ + if (_error->PendingError() == true) + return; + + LastTreeLookup = 0; + LastLookupSize = 0; + + // Apply the typecasts + HeaderP = (Header *)Map.Data(); + NodeP = (Node *)Map.Data(); + DirP = (Directory *)Map.Data(); + DiverP = (Diversion *)Map.Data(); + PkgP = (Package *)Map.Data(); + ConfP = (ConfFile *)Map.Data(); + StrP = (char *)Map.Data(); + AnyP = (unsigned char *)Map.Data(); + + // New mapping, create the basic cache structures + if (Map.Size() == 0) + { + Map.RawAllocate(sizeof(pkgFLCache::Header)); + *HeaderP = pkgFLCache::Header(); + HeaderP->FileHash = Map.RawAllocate(sizeof(pkgFLCache::Node)*HeaderP->HashSize, + sizeof(pkgFLCache::Node))/sizeof(pkgFLCache::Node); + } + + FileHash = NodeP + HeaderP->FileHash; + + // Setup the dynamic map manager + HeaderP->Dirty = true; + Map.Sync(0,sizeof(pkgFLCache::Header)); + Map.UsePools(*HeaderP->Pools,sizeof(HeaderP->Pools)/sizeof(HeaderP->Pools[0])); +} + /*}}}*/ +// FLCache::TreeLookup - Perform a lookup in a generic tree /*{{{*/ +// --------------------------------------------------------------------- +/* This is a simple generic tree lookup. The first three entries of + the Directory structure are used as a template, but any other similar + structure could be used in it's place. */ +map_ptrloc pkgFLCache::TreeLookup(map_ptrloc *Base,const char *Text, + const char *TextEnd,unsigned long Size, + unsigned int *Count,bool Insert) +{ + pkgFLCache::Directory *Dir; + + // Check our last entry cache + if (LastTreeLookup != 0 && LastLookupSize == Size) + { + Dir = (pkgFLCache::Directory *)(AnyP + LastTreeLookup*Size); + if (stringcmp(Text,TextEnd,StrP + Dir->Name) == 0) + return LastTreeLookup; + } + + while (1) + { + // Allocate a new one + if (*Base == 0) + { + if (Insert == false) + return 0; + + *Base = Map.Allocate(Size); + if (*Base == 0) + return 0; + + (*Count)++; + Dir = (pkgFLCache::Directory *)(AnyP + *Base*Size); + Dir->Name = Map.WriteString(Text,TextEnd - Text); + LastTreeLookup = *Base; + LastLookupSize = Size; + return *Base; + } + + // Compare this node + Dir = (pkgFLCache::Directory *)(AnyP + *Base*Size); + int Res = stringcmp(Text,TextEnd,StrP + Dir->Name); + if (Res == 0) + { + LastTreeLookup = *Base; + LastLookupSize = Size; + return *Base; + } + + if (Res > 0) + Base = &Dir->Left; + if (Res < 0) + Base = &Dir->Right; + } +} + /*}}}*/ +// FLCache::PrintTree - Print out a tree /*{{{*/ +// --------------------------------------------------------------------- +/* This is a simple generic tree dumper, ment for debugging. */ +void pkgFLCache::PrintTree(map_ptrloc Base,unsigned long Size) +{ + if (Base == 0) + return; + + pkgFLCache::Directory *Dir = (pkgFLCache::Directory *)(AnyP + Base*Size); + PrintTree(Dir->Left,Size); + cout << (StrP + Dir->Name) << endl; + PrintTree(Dir->Right,Size); +} + /*}}}*/ +// FLCache::GetPkg - Get a package pointer /*{{{*/ +// --------------------------------------------------------------------- +/* Locate a package by name in it's tree, this is just a wrapper for + TreeLookup */ +pkgFLCache::PkgIterator pkgFLCache::GetPkg(const char *Name,const char *NameEnd, + bool Insert) +{ + if (NameEnd == 0) + NameEnd = Name + strlen(Name); + + map_ptrloc Pos = TreeLookup(&HeaderP->Packages,Name,NameEnd, + sizeof(pkgFLCache::Package), + &HeaderP->PackageCount,Insert); + if (Pos == 0) + return pkgFLCache::PkgIterator(); + return pkgFLCache::PkgIterator(*this,PkgP + Pos); +} + /*}}}*/ +// FLCache::GetNode - Get the node associated with the filename /*{{{*/ +// --------------------------------------------------------------------- +/* Lookup a node in the hash table. If Insert is true then a new node is + always inserted. The hash table can have multiple instances of a + single name available. A search returns the first. It is important + that additions for the same name insert after the first entry of + the name group. */ +pkgFLCache::NodeIterator pkgFLCache::GetNode(const char *Name, + const char *NameEnd, + map_ptrloc Loc, + bool Insert,bool Divert) +{ + // Split the name into file and directory, hashing as it is copied + const char *File = Name; + unsigned long HashPos = 0; + for (const char *I = Name; I < NameEnd; I++) + { + HashPos = 1637*HashPos + *I; + if (*I == '/') + File = I; + } + + // Search for it + Node *Hash = NodeP + HeaderP->FileHash + (HashPos % HeaderP->HashSize); + int Res = 0; + map_ptrloc FilePtr = 0; + while (Hash->Pointer != 0) + { + // Compare + Res = stringcmp(File+1,NameEnd,StrP + Hash->File); + if (Res == 0) + Res = stringcmp(Name,File,StrP + DirP[Hash->Dir].Name); + + // Diversion? + if (Res == 0 && Insert == true) + { + /* Dir and File match exactly, we need to reuse the file name + when we link it in */ + FilePtr = Hash->File; + Res = Divert - ((Hash->Flags & Node::Diversion) == Node::Diversion); + } + + // Is a match + if (Res == 0) + { + if (Insert == false) + return NodeIterator(*this,Hash); + + // Only one diversion per name! + if (Divert == true) + return NodeIterator(*this,Hash); + break; + } + + // Out of sort order + if (Res > 0) + break; + + if (Hash->Next != 0) + Hash = NodeP + Hash->Next; + else + break; + } + + // Fail, not found + if (Insert == false) + return NodeIterator(*this); + + // Find a directory node + map_ptrloc Dir = TreeLookup(&HeaderP->DirTree,Name,File, + sizeof(pkgFLCache::Directory), + &HeaderP->DirCount,true); + if (Dir == 0) + return NodeIterator(*this); + + // Allocate a new node + if (Hash->Pointer != 0) + { + // Overwrite or append + if (Res > 0) + { + Node *Next = NodeP + Map.Allocate(sizeof(*Hash)); + if (Next == NodeP) + return NodeIterator(*this); + *Next = *Hash; + Hash->Next = Next - NodeP; + } + else + { + unsigned long NewNext = Map.Allocate(sizeof(*Hash)); + if (NewNext == 0) + return NodeIterator(*this); + NodeP[NewNext].Next = Hash->Next; + Hash->Next = NewNext; + Hash = NodeP + Hash->Next; + } + } + + // Insert into the new item + Hash->Dir = Dir; + Hash->Pointer = Loc; + Hash->Flags = 0; + if (Divert == true) + Hash->Flags |= Node::Diversion; + + if (FilePtr != 0) + Hash->File = FilePtr; + else + { + HeaderP->UniqNodes++; + Hash->File = Map.WriteString(File+1,NameEnd - File-1); + } + + // Link the node to the package list + if (Divert == false && Loc == 0) + { + Hash->Next = PkgP[Loc].Files; + PkgP[Loc].Files = Hash - NodeP; + } + + HeaderP->NodeCount++; + return NodeIterator(*this,Hash); +} + /*}}}*/ +// FLCache::HashNode - Return the hash bucket for the node /*{{{*/ +// --------------------------------------------------------------------- +/* This is one of two hashing functions. The other is inlined into the + GetNode routine. */ +pkgFLCache::Node *pkgFLCache::HashNode(NodeIterator const &Nde) +{ + // Hash the node + unsigned long HashPos = 0; + for (const char *I = Nde.DirN(); *I != 0; I++) + HashPos = 1637*HashPos + *I; + HashPos = 1637*HashPos + '/'; + for (const char *I = Nde.File(); *I != 0; I++) + HashPos = 1637*HashPos + *I; + return NodeP + HeaderP->FileHash + (HashPos % HeaderP->HashSize); +} + /*}}}*/ +// FLCache::DropNode - Drop a node from the hash table /*{{{*/ +// --------------------------------------------------------------------- +/* This erases a node from the hash table. Note that this does not unlink + the node from the package linked list. */ +void pkgFLCache::DropNode(map_ptrloc N) +{ + if (N == 0) + return; + + NodeIterator Nde(*this,NodeP + N); + + if (Nde->NextPkg != 0) + _error->Warning("DropNode called on still linked node"); + + // Locate it in the hash table + Node *Last = 0; + Node *Hash = HashNode(Nde); + while (Hash->Pointer != 0) + { + // Got it + if (Hash == Nde) + { + // Top of the bucket.. + if (Last == 0) + { + Hash->Pointer = 0; + if (Hash->Next == 0) + return; + *Hash = NodeP[Hash->Next]; + // Release Hash->Next + return; + } + Last->Next = Hash->Next; + // Release Hash + return; + } + + Last = Hash; + if (Hash->Next != 0) + Hash = NodeP + Hash->Next; + else + break; + } + + _error->Error("Failed to locate the hash element!"); +} + /*}}}*/ +// FLCache::BeginDiverLoad - Start reading new diversions /*{{{*/ +// --------------------------------------------------------------------- +/* Tag all the diversions as untouched */ +void pkgFLCache::BeginDiverLoad() +{ + for (DiverIterator I = DiverBegin(); I.end() == false; I++) + I->Flags = 0; +} + /*}}}*/ +// FLCache::FinishDiverLoad - Finish up a new diversion load /*{{{*/ +// --------------------------------------------------------------------- +/* This drops any untouched diversions. In effect removing any diversions + that where not loaded (ie missing from the diversion file) */ +void pkgFLCache::FinishDiverLoad() +{ + map_ptrloc *Cur = &HeaderP->Diversions; + while (*Cur != 0) + { + Diversion *Div = DiverP + *Cur; + if ((Div->Flags & Diversion::Touched) == Diversion::Touched) + { + Cur = &Div->Next; + continue; + } + + // Purge! + DropNode(Div->DivertTo); + DropNode(Div->DivertFrom); + *Cur = Div->Next; + } +} + /*}}}*/ +// FLCache::AddDiversion - Add a new diversion /*{{{*/ +// --------------------------------------------------------------------- +/* Add a new diversion to the diverion tables and make sure that it is + unique and non-chaining. */ +bool pkgFLCache::AddDiversion(PkgIterator const &Owner, + const char *From,const char *To) +{ + /* Locate the two hash nodes we are going to manipulate. If there + are pre-existing diversions then they will be returned */ + NodeIterator FromN = GetNode(From,From+strlen(From),0,true,true); + NodeIterator ToN = GetNode(To,To+strlen(To),0,true,true); + if (FromN.end() == true || ToN.end() == true) + return _error->Error("Failed to allocate diversion"); + + // Should never happen + if ((FromN->Flags & Node::Diversion) != Node::Diversion || + (ToN->Flags & Node::Diversion) != Node::Diversion) + return _error->Error("Internal Error in AddDiversion"); + + // Now, try to reclaim an existing diversion.. + map_ptrloc Diver = 0; + if (FromN->Pointer != 0) + Diver = FromN->Pointer; + + /* Make sure from and to point to the same diversion, if they dont + then we are trying to intermix diversions - very bad */ + if (ToN->Pointer != 0 && ToN->Pointer != Diver) + { + // It could be that the other diversion is no longer in use + if ((DiverP[ToN->Pointer].Flags & Diversion::Touched) == Diversion::Touched) + return _error->Error("Trying to overwrite a diversion, %s -> %s and %s/%s", + From,To,ToN.File(),ToN.Dir().Name()); + + // We can erase it. + Diversion *Div = DiverP + ToN->Pointer; + ToN->Pointer = 0; + + if (Div->DivertTo == ToN.Offset()) + Div->DivertTo = 0; + if (Div->DivertFrom == ToN.Offset()) + Div->DivertFrom = 0; + + // This diversion will be cleaned up by FinishDiverLoad + } + + // Allocate a new diversion + if (Diver == 0) + { + Diver = Map.Allocate(sizeof(Diversion)); + if (Diver == 0) + return false; + DiverP[Diver].Next = HeaderP->Diversions; + HeaderP->Diversions = Diver; + HeaderP->DiversionCount++; + } + + // Can only have one diversion of the same files + Diversion *Div = DiverP + Diver; + if ((Div->Flags & Diversion::Touched) == Diversion::Touched) + return _error->Error("Double add of diversion %s -> %s",From,To); + + // Setup the From/To links + if (Div->DivertFrom != FromN.Offset() && Div->DivertFrom != ToN.Offset()) + DropNode(Div->DivertFrom); + Div->DivertFrom = FromN.Offset(); + if (Div->DivertTo != FromN.Offset() && Div->DivertTo != ToN.Offset()) + DropNode(Div->DivertTo); + Div->DivertTo = ToN.Offset(); + + // Link it to the two nodes + FromN->Pointer = Diver; + ToN->Pointer = Diver; + + // And the package + Div->OwnerPkg = Owner.Offset(); + Div->Flags |= Diversion::Touched; + + return true; +} + /*}}}*/ +// FLCache::AddConfFile - Add a new configuration file /*{{{*/ +// --------------------------------------------------------------------- +/* This simply adds a new conf file node to the hash table. This is only + used by the status file reader. It associates a hash with each conf + file entry that exists in the status file and the list file for + the proper package. Duplicate conf files (across packages) are left + up to other routines to deal with. */ +bool pkgFLCache::AddConfFile(const char *Name,const char *NameEnd, + PkgIterator const &Owner, + const unsigned char *Sum) +{ + NodeIterator Nde = GetNode(Name,NameEnd,0,false,false); + if (Nde.end() == true) + return true; + + unsigned long File = Nde->File; + for (; Nde->File == File && Nde.end() == false; Nde++) + { + if (Nde.RealPackage() != Owner) + continue; + + if ((Nde->Flags & Node::ConfFile) == Node::ConfFile) + return _error->Error("Duplicate conf file %s/%s",Nde.DirN(),Nde.File()); + + // Allocate a new conf file structure + map_ptrloc Conf = Map.Allocate(sizeof(ConfFile)); + if (Conf == 0) + return false; + ConfP[Conf].OwnerPkg = Owner.Offset(); + memcpy(ConfP[Conf].MD5,Sum,sizeof(ConfP[Conf].MD5)); + + Nde->Pointer = Conf; + Nde->Flags |= Node::ConfFile; + return true; + } + + /* This means the conf file has been replaced, but the entry in the + status file was not updated */ + return true; +} + /*}}}*/ + +// NodeIterator::RealPackage - Return the package for this node /*{{{*/ +// --------------------------------------------------------------------- +/* Since the package pointer is indirected in all sorts of interesting ways + this is used to get a pointer to the owning package */ +pkgFLCache::Package *pkgFLCache::NodeIterator::RealPackage() const +{ + if (Nde->Pointer == 0) + return 0; + + if ((Nde->Flags & Node::ConfFile) == Node::ConfFile) + return Owner->PkgP + Owner->ConfP[Nde->Pointer].OwnerPkg; + + // Diversions are ignored + if ((Nde->Flags & Node::Diversion) == Node::Diversion) + return 0; + + return Owner->PkgP + Nde->Pointer; +} + /*}}}*/ diff --git a/apt/apt-inst/filelist.h b/apt/apt-inst/filelist.h new file mode 100644 index 0000000..6050a83 --- /dev/null +++ b/apt/apt-inst/filelist.h @@ -0,0 +1,314 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: filelist.h,v 1.2 2002/07/25 18:07:17 niemeyer Exp $ +/* ###################################################################### + + File Listing - Manages a Cache of File -> Package names. + + This is identical to the Package cache, except that the generator + (which is much simpler) is integrated directly into the main class, + and it has been designed to handle live updates. + + The storage content of the class is maintained in a memory map and is + written directly to the file system. Performance is traded against + space to give something that performs well and remains small. + The average per file usage is 32 bytes which yeilds about a meg every + 36k files. Directory paths are collected into a binary tree and stored + only once, this offsets the cost of the hash nodes enough to keep + memory usage slightly less than the sum of the filenames. + + The file names are stored into a fixed size chained hash table that is + linked to the package name and to the directory component. + + Each file node has a set of associated flags that indicate the current + state of the file. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_FILELIST_H +#define PKGLIB_FILELIST_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/filelist.h" +#endif + +#include + +class pkgFLCache +{ + public: + struct Header; + struct Node; + struct Directory; + struct Package; + struct Diversion; + struct ConfFile; + + class NodeIterator; + class DirIterator; + class PkgIterator; + class DiverIterator; + + protected: + string CacheFile; + DynamicMMap ⤅ + map_ptrloc LastTreeLookup; + unsigned long LastLookupSize; + + // Helpers for the addition algorithms + map_ptrloc TreeLookup(map_ptrloc *Base,const char *Text,const char *TextEnd, + unsigned long Size,unsigned int *Count = 0, + bool Insert = false); + + public: + + // Pointers to the arrays of items + Header *HeaderP; + Node *NodeP; + Directory *DirP; + Package *PkgP; + Diversion *DiverP; + ConfFile *ConfP; + char *StrP; + unsigned char *AnyP; + + // Quick accessors + Node *FileHash; + + // Accessors + Header &Head() {return *HeaderP;}; + void PrintTree(map_ptrloc Base,unsigned long Size); + + // Add/Find things + PkgIterator GetPkg(const char *Name,const char *End,bool Insert); + inline PkgIterator GetPkg(const char *Name,bool Insert); + NodeIterator GetNode(const char *Name, + const char *NameEnd, + map_ptrloc Loc, + bool Insert,bool Divert); + Node *HashNode(NodeIterator const &N); + void DropNode(map_ptrloc Node); + + inline DiverIterator DiverBegin(); + + // Diversion control + void BeginDiverLoad(); + void FinishDiverLoad(); + bool AddDiversion(PkgIterator const &Owner,const char *From, + const char *To); + bool AddConfFile(const char *Name,const char *NameEnd, + PkgIterator const &Owner,const unsigned char *Sum); + + pkgFLCache(DynamicMMap &Map); +// ~pkgFLCache(); +}; + +struct pkgFLCache::Header +{ + // Signature information + unsigned long Signature; + short MajorVersion; + short MinorVersion; + bool Dirty; + + // Size of structure values + unsigned HeaderSz; + unsigned NodeSz; + unsigned DirSz; + unsigned PackageSz; + unsigned DiversionSz; + unsigned ConfFileSz; + + // Structure Counts; + unsigned int NodeCount; + unsigned int DirCount; + unsigned int PackageCount; + unsigned int DiversionCount; + unsigned int ConfFileCount; + unsigned int HashSize; + unsigned long UniqNodes; + + // Offsets + map_ptrloc FileHash; + map_ptrloc DirTree; + map_ptrloc Packages; + map_ptrloc Diversions; + + /* Allocation pools, there should be one of these for each structure + excluding the header */ + DynamicMMap::Pool Pools[5]; + + bool CheckSizes(Header &Against) const; + Header(); +}; + +/* The bit field is used to advoid incurring an extra 4 bytes x 40000, + Pointer is the most infrequently used member of the structure */ +struct pkgFLCache::Node +{ + map_ptrloc Dir; // Dir + map_ptrloc File; // String + unsigned Pointer:24; // Package/Diversion/ConfFile + unsigned Flags:8; // Package + map_ptrloc Next; // Node + map_ptrloc NextPkg; // Node + + enum Flags {Diversion = (1<<0),ConfFile = (1<<1), + NewConfFile = (1<<2),NewFile = (1<<3), + Unpacked = (1<<4),Replaced = (1<<5)}; +}; + +struct pkgFLCache::Directory +{ + map_ptrloc Left; // Directory + map_ptrloc Right; // Directory + map_ptrloc Name; // String +}; + +struct pkgFLCache::Package +{ + map_ptrloc Left; // Package + map_ptrloc Right; // Package + map_ptrloc Name; // String + map_ptrloc Files; // Node +}; + +struct pkgFLCache::Diversion +{ + map_ptrloc OwnerPkg; // Package + map_ptrloc DivertFrom; // Node + map_ptrloc DivertTo; // String + + map_ptrloc Next; // Diversion + unsigned long Flags; + + enum Flags {Touched = (1<<0)}; +}; + +struct pkgFLCache::ConfFile +{ + map_ptrloc OwnerPkg; // Package + unsigned char MD5[16]; +}; + +class pkgFLCache::PkgIterator +{ + Package *Pkg; + pkgFLCache *Owner; + + public: + + inline bool end() const {return Owner == 0 || Pkg == Owner->PkgP?true:false;} + + // Accessors + inline Package *operator ->() {return Pkg;}; + inline Package const *operator ->() const {return Pkg;}; + inline Package const &operator *() const {return *Pkg;}; + inline operator Package *() {return Pkg == Owner->PkgP?0:Pkg;}; + inline operator Package const *() const {return Pkg == Owner->PkgP?0:Pkg;}; + + inline unsigned long Offset() const {return Pkg - Owner->PkgP;}; + inline const char *Name() const {return Pkg->Name == 0?0:Owner->StrP + Pkg->Name;}; + inline pkgFLCache::NodeIterator Files() const; + + PkgIterator() : Pkg(0), Owner(0) {}; + PkgIterator(pkgFLCache &Owner,Package *Trg) : Pkg(Trg), Owner(&Owner) {}; +}; + +class pkgFLCache::DirIterator +{ + Directory *Dir; + pkgFLCache *Owner; + + public: + + // Accessors + inline Directory *operator ->() {return Dir;}; + inline Directory const *operator ->() const {return Dir;}; + inline Directory const &operator *() const {return *Dir;}; + inline operator Directory *() {return Dir == Owner->DirP?0:Dir;}; + inline operator Directory const *() const {return Dir == Owner->DirP?0:Dir;}; + + inline const char *Name() const {return Dir->Name == 0?0:Owner->StrP + Dir->Name;}; + + DirIterator() : Dir(0), Owner(0) {}; + DirIterator(pkgFLCache &Owner,Directory *Trg) : Dir(Trg), Owner(&Owner) {}; +}; + +class pkgFLCache::DiverIterator +{ + Diversion *Diver; + pkgFLCache *Owner; + + public: + + // Iteration + void operator ++(int) {if (Diver != Owner->DiverP) Diver = Owner->DiverP + Diver->Next;}; + inline void operator ++() {operator ++(0);}; + inline bool end() const {return Owner == 0 || Diver == Owner->DiverP;}; + + // Accessors + inline Diversion *operator ->() {return Diver;}; + inline Diversion const *operator ->() const {return Diver;}; + inline Diversion const &operator *() const {return *Diver;}; + inline operator Diversion *() {return Diver == Owner->DiverP?0:Diver;}; + inline operator Diversion const *() const {return Diver == Owner->DiverP?0:Diver;}; + + inline PkgIterator OwnerPkg() const {return PkgIterator(*Owner,Owner->PkgP + Diver->OwnerPkg);}; + inline NodeIterator DivertFrom() const; + inline NodeIterator DivertTo() const; + + DiverIterator() : Diver(0), Owner(0) {}; + DiverIterator(pkgFLCache &Owner,Diversion *Trg) : Diver(Trg), Owner(&Owner) {}; +}; + +class pkgFLCache::NodeIterator +{ + Node *Nde; + enum {NdePkg, NdeHash} Type; + pkgFLCache *Owner; + + public: + + // Iteration + void operator ++(int) {if (Nde != Owner->NodeP) Nde = Owner->NodeP + + (Type == NdePkg?Nde->NextPkg:Nde->Next);}; + inline void operator ++() {operator ++(0);}; + inline bool end() const {return Owner == 0 || Nde == Owner->NodeP;}; + + // Accessors + inline Node *operator ->() {return Nde;}; + inline Node const *operator ->() const {return Nde;}; + inline Node const &operator *() const {return *Nde;}; + inline operator Node *() {return Nde == Owner->NodeP?0:Nde;}; + inline operator Node const *() const {return Nde == Owner->NodeP?0:Nde;}; + inline unsigned long Offset() const {return Nde - Owner->NodeP;}; + inline DirIterator Dir() const {return DirIterator(*Owner,Owner->DirP + Nde->Dir);}; + inline DiverIterator Diversion() const {return DiverIterator(*Owner,Owner->DiverP + Nde->Pointer);}; + inline const char *File() const {return Nde->File == 0?0:Owner->StrP + Nde->File;}; + inline const char *DirN() const {return Owner->StrP + Owner->DirP[Nde->Dir].Name;}; + Package *RealPackage() const; + + NodeIterator() : Nde(0), Type(NdeHash), Owner(0) {}; + NodeIterator(pkgFLCache &Owner) : Nde(Owner.NodeP), Type(NdeHash), Owner(&Owner) {}; + NodeIterator(pkgFLCache &Owner,Node *Trg) : Nde(Trg), Type(NdeHash), Owner(&Owner) {}; + NodeIterator(pkgFLCache &Owner,Node *Trg,Package *) : Nde(Trg), Type(NdePkg), Owner(&Owner) {}; +}; + +/* Inlines with forward references that cannot be included directly in their + respsective classes */ +inline pkgFLCache::NodeIterator pkgFLCache::DiverIterator::DivertFrom() const + {return NodeIterator(*Owner,Owner->NodeP + Diver->DivertFrom);}; +inline pkgFLCache::NodeIterator pkgFLCache::DiverIterator::DivertTo() const + {return NodeIterator(*Owner,Owner->NodeP + Diver->DivertTo);}; + +inline pkgFLCache::NodeIterator pkgFLCache::PkgIterator::Files() const + {return NodeIterator(*Owner,Owner->NodeP + Pkg->Files,Pkg);}; + +inline pkgFLCache::DiverIterator pkgFLCache::DiverBegin() + {return DiverIterator(*this,DiverP + HeaderP->Diversions);}; + +inline pkgFLCache::PkgIterator pkgFLCache::GetPkg(const char *Name,bool Insert) + {return GetPkg(Name,Name+strlen(Name),Insert);}; + +#endif diff --git a/apt/apt-inst/makefile b/apt/apt-inst/makefile new file mode 100644 index 0000000..3aa7b45 --- /dev/null +++ b/apt/apt-inst/makefile @@ -0,0 +1,31 @@ +# -*- make -*- +BASE=.. +SUBDIR=apt-inst + +# Header location +SUBDIRS = contrib deb +HEADER_TARGETDIRS = apt-pkg + +# Bring in the default rules +include ../buildlib/defaults.mak + +# The library name +LIBRARY=apt-inst +LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) +MAJOR=1.0 +MINOR=0 +SLIBS=$(PTHREADLIB) -lapt-pkg + +# Source code for the contributed non-core things +SOURCE = contrib/extracttar.cc contrib/arfile.cc + +# Source code for the main library +SOURCE+= filelist.cc database.cc dirstream.cc extract.cc \ + deb/dpkgdb.cc deb/debfile.cc + +# Public header files +HEADERS = extracttar.h arfile.h filelist.h database.h extract.h \ + dpkgdb.h dirstream.h debfile.h + +HEADERS := $(addprefix apt-pkg/,$(HEADERS)) +include $(LIBRARY_H) diff --git a/apt/apt-pkg/CVS/Entries b/apt/apt-pkg/CVS/Entries deleted file mode 100644 index 4ba56bb..0000000 --- a/apt/apt-pkg/CVS/Entries +++ /dev/null @@ -1,43 +0,0 @@ -/init.cc/1.16/Wed Aug 1 21:35:12 2001// -D/cnc//// -D/contrib//// -D/deb//// -D/rpm//// -/acquire-method.cc/1.4/Fri Aug 10 13:58:21 2001// -/acquire-method.h/1.2/Fri Aug 10 13:58:24 2001// -/acquire-worker.cc/1.2/Fri Aug 10 13:58:24 2001// -/acquire-worker.h/1.1.1.1/Fri Aug 10 13:58:24 2001// -/acquire.cc/1.3/Fri Aug 10 13:58:24 2001// -/acquire.h/1.2/Fri Aug 10 13:58:26 2001// -/algorithms.h/1.1.1.1/Fri Aug 10 13:58:29 2001// -/cachefile.cc/1.8/Fri Aug 10 13:58:29 2001// -/cachefile.h/1.4/Fri Aug 10 13:58:29 2001// -/cacheiterators.h/1.2/Fri Aug 10 13:58:31 2001// -/clean.cc/1.2/Fri Aug 10 13:58:31 2001// -/clean.h/1.1.1.1/Fri Aug 10 13:58:31 2001// -/init.h/1.1.1.1/Fri Aug 10 13:58:33 2001// -/makefile/1.12/Fri Aug 10 13:58:33 2001// -/orderlist.cc/1.4/Fri Aug 10 13:58:34 2001// -/orderlist.h/1.1.1.1/Fri Aug 10 13:58:34 2001// -/packagemanager.h/1.2/Fri Aug 10 13:59:57 2001// -/pkgcache.cc/1.11/Fri Aug 10 14:00:19 2001// -/pkgcache.h/1.2/Fri Aug 10 14:00:19 2001// -/pkgcachegen.h/1.5/Fri Aug 10 14:00:20 2001// -/pkgrecords.cc/1.5/Fri Aug 10 14:00:20 2001// -/pkgrecords.h/1.3/Fri Aug 10 14:00:20 2001// -/srcrecords.cc/1.4/Fri Aug 10 14:00:21 2001// -/srcrecords.h/1.2/Fri Aug 10 14:00:21 2001// -/systemfactory.cc/1.8/Fri Aug 10 14:00:23 2001// -/systemfactory.h/1.5/Fri Aug 10 14:00:23 2001// -/tagfile.cc/1.2/Fri Aug 10 14:00:23 2001// -/tagfile.h/1.1.1.1/Fri Aug 10 14:00:23 2001// -/version.cc/1.4/Fri Aug 10 14:00:23 2001// -/acquire-item.cc/1.20/Tue Nov 13 14:24:16 2001// -/acquire-item.h/1.6/Tue Nov 13 14:24:16 2001// -/sourcelist.cc/1.25/Tue Nov 13 14:24:16 2001// -/sourcelist.h/1.9/Tue Nov 13 14:24:16 2001// -/algorithms.cc/1.11/Fri Nov 16 01:13:06 2001// -/depcache.cc/1.20/Fri Nov 16 01:13:06 2001// -/depcache.h/1.3/Fri Nov 16 01:13:06 2001// -/packagemanager.cc/1.15/Fri Nov 16 01:13:06 2001// -/pkgcachegen.cc/1.24/Wed Mar 6 17:17:10 2002// diff --git a/apt/apt-pkg/CVS/Repository b/apt/apt-pkg/CVS/Repository deleted file mode 100644 index 33b04e4..0000000 --- a/apt/apt-pkg/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/apt-pkg diff --git a/apt/apt-pkg/CVS/Root b/apt/apt-pkg/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/apt-pkg/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/apt-pkg/acquire-item.cc b/apt/apt-pkg/acquire-item.cc index e5be322..0982b31 100644 --- a/apt/apt-pkg/acquire-item.cc +++ b/apt/apt-pkg/acquire-item.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-item.cc,v 1.20 2001/11/12 16:34:00 kojima Exp $ +// $Id: acquire-item.cc,v 1.6 2003/01/29 14:03:40 niemeyer Exp $ /* ###################################################################### Acquire Item - Item to acquire @@ -10,8 +10,7 @@ time. The pkgAcqIndex class creates a second class upon instantiation to fetch the other index files because of this. - ##################################################################### - */ + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ @@ -19,23 +18,64 @@ #endif #include #include +#include #include #include #include -#include -#include -#include +// CNC:2002-07-03 +#include +#include +#include +using namespace std; + +#include + #include #include #include -#include +#include #include - -#include - /*}}}*/ +using std::string; + +// CNC:2002-07-03 +// VerifyChecksums - Check MD5 and SHA-1 checksums of a file /*{{{*/ +// --------------------------------------------------------------------- +/* Returns false only if the checksums fail (the file not existing is not + a checksum mismatch) */ +bool VerifyChecksums(string File,unsigned long Size,string MD5) +{ + struct stat Buf; + + if (stat(File.c_str(),&Buf) != 0) + return true; + + if (Buf.st_size != Size) + { + if (_config->FindB("Acquire::Verbose", false) == true) + cout << "Size of "<FindB("Acquire::Verbose", false) == true) + cout << "MD5Sum of "< %s).",strerror(errno), + // CNC:2003-01-29 - Fix potential buffer overflow bug. */ + snprintf(S,sizeof(S),_("rename failed, %s (%s -> %s)."),strerror(errno), From.c_str(),To.c_str()); Status = StatError; ErrorText = S; - } + } } /*}}}*/ -bool pkgAcquire::Item::RecheckFile(string path, string MD5, unsigned long Size) -{ - struct stat Buf; - - if (stat(path.c_str(),&Buf) == 0) - { - if (Buf.st_size != Size) - { - if (_config->FindB("Acquire::Verbose", false) == true) - _error->Warning(_("Size of %s did not match what's in the hashfile and was redownloaded."), - path.c_str()); - return false; - } - - MD5Summation md5sum = MD5Summation(); - FileFd file = FileFd(path, FileFd::ReadOnly); - - md5sum.AddFD(file.Fd(), file.Size()); - if (md5sum.Result().Value() != MD5) - { - if (_config->FindB("Acquire::Verbose", false) == true) - _error->Warning(_("MD5 of %s did not match what's int the hashfile and was redownloaded."), - path.c_str()); - return false; - } - file.Close(); - } - - return true; -} - // 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,const pkgSourceList::Item *Location) : - Item(Owner), Location(Location) + instantiated to fetch the revision file */ +// CNC:2002-07-03 +pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,pkgRepository *Repository, + string URI,string URIDesc,string ShortDesc) : + Item(Owner), RealURI(URI), Repository(Repository) { Decompression = false; Erase = false; - + DestFile = _config->FindDir("Dir::State::lists") + "partial/"; - DestFile += URItoFileName(Location->PackagesURI()); + DestFile += URItoFileName(URI); // Create the item - Desc.URI = Location->PackagesURI()+_config->Find("Acquire::ComprExtension"); - Desc.Description = Location->PackagesInfo(); + // CNC:2002-07-03 + Desc.URI = URI + ".bz2"; + Desc.Description = URIDesc; Desc.Owner = this; - + Desc.ShortDesc = ShortDesc; + + // CNC:2002-07-03 // If we're verifying authentication, check whether the size and - // MD5 matches, if not, delete the cached files and force redownload - string fname = Location->PackagesURI(true); - string hash; - unsigned int size; + // checksums match, if not, delete the cached files and force redownload + string MD5Hash; + unsigned long Size; - if (Location->Repository->MD5HashForFile(fname, hash, size) - && !hash.empty() && size != 0) + if (Repository != NULL) { - string FinalFile = _config->FindDir("Dir::State::lists"); - FinalFile += URItoFileName(Location->PackagesURI()); - - if (!RecheckFile(FinalFile, hash, size)) + if (Repository->HasRelease() == true) { - unlink(FinalFile.c_str()); - unlink(DestFile.c_str()); + if (Repository->FindChecksums(RealURI,Size,MD5Hash) == false) + { + if (Repository->IsAuthenticated() == true) + { + _error->Error(_("%s is not listed in the checksum list for its repository"), + RealURI.c_str()); + return; + } + else + _error->Warning("Release file did not contain checksum information for %s", + RealURI.c_str()); + } + + string FinalFile = _config->FindDir("Dir::State::lists"); + FinalFile += URItoFileName(RealURI); + + if (VerifyChecksums(FinalFile,Size,MD5Hash) == false) + { + unlink(FinalFile.c_str()); + unlink(DestFile.c_str()); + } + } + else if (Repository->IsAuthenticated() == true) + { + _error->Error(_("Release information not available for %s"), + URI.c_str()); + return; } } - // Set the short description to the archive component - if (Location->Dist[Location->Dist.size() - 1] == '/') - Desc.ShortDesc = Location->Dist; - else - Desc.ShortDesc = Location->Dist + '/' + Location->Section; - QueueURI(Desc); - - // Create the Release fetch class - new pkgAcqIndexRel(Owner,Location); } /*}}}*/ // AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/ @@ -217,7 +243,7 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,const pkgSourceList::Item *Location) string pkgAcqIndex::Custom600Headers() { string Final = _config->FindDir("Dir::State::lists"); - Final += URItoFileName(Location->PackagesURI()); + Final += URItoFileName(RealURI); struct stat Buf; if (stat(Final.c_str(),&Buf) != 0) @@ -240,57 +266,60 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5, if (Decompression == true) { - unsigned int size; - string hash; - - string fname = Location->PackagesURI(true); - - if (!Location->Repository->MD5HashForFile(fname, hash, size)) - { - Status = StatAuthError; - ErrorText = "Unauthenticated file"; - return; - } - // Check the size - if (size != 0 && Size != size) - { - Status = StatAuthError; - if (_config->FindB("Debug::pkgAcquire::Auth", false)) { - cout << "size mismatch: " << size << "!=" <FindB("Debug::pkgAcquire::Auth", false)) { - cout << "md5 mismatch: " << hash << "!=" << MD5 << endl; - } - Rename(DestFile,DestFile + ".FAILED"); - return; - } + // CNC:2002-07-03 + unsigned long FSize; + string MD5Hash; + if (Repository != NULL && Repository->HasRelease() == true && + Repository->FindChecksums(RealURI,FSize,MD5Hash) == true) + { + // We must always get here if the repository is authenticated + + if (FSize != Size) + { + Status = StatError; + ErrorText = _("Size mismatch"); + Rename(DestFile,DestFile + ".FAILED"); + if (_config->FindB("Acquire::Verbose",false) == true) + _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul", + RealURI.c_str(), Size, FSize); + return; + } + + if (MD5.empty() == false && MD5Hash != MD5) + { + Status = StatError; + ErrorText = _("MD5Sum mismatch"); + Rename(DestFile,DestFile + ".FAILED"); + if (_config->FindB("Acquire::Verbose",false) == true) + _error->Warning("MD5Sum mismatch of index file %s: %s was supposed to be %s", + RealURI.c_str(), MD5.c_str(), MD5Hash.c_str()); + return; + } + } + else + { + // Redundant security check + assert(Repository == NULL || Repository->IsAuthenticated() == false); + } + // Done, move it into position string FinalFile = _config->FindDir("Dir::State::lists"); - FinalFile += URItoFileName(Location->PackagesURI()); + FinalFile += URItoFileName(RealURI); Rename(DestFile,FinalFile); + chmod(FinalFile.c_str(),0644); /* We restore the original name to DestFile so that the clean operation will work OK */ DestFile = _config->FindDir("Dir::State::lists") + "partial/"; - DestFile += URItoFileName(Location->PackagesURI()); + DestFile += URItoFileName(RealURI); // Remove the compressed version. if (Erase == true) unlink(DestFile.c_str()); - return; } - + Erase = false; Complete = true; @@ -321,41 +350,6 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5, // The files timestamp matches if (StringToBool(LookupTag(Message,"IMS-Hit"),false) == true) return; - - unsigned int size; - string hash; - - string fname = Location->PackagesURI(true) - + _config->Find("Acquire::ComprExtension"); - - if (!Location->Repository->MD5HashForFile(fname, hash, size)) - { - Status = StatAuthError; - ErrorText = "Unauthenticated file"; - return; - } - - // Check the size - if (size != 0 && Size != size) - { - Status = StatAuthError; - if (_config->FindB("Debug::pkgAcquire::Auth", false)) { - cout << "compressed size: " << size << "!=" <FindB("Debug::pkgAcquire::Auth", false)) { - cout << "compressed md5: " << hash << "!=" << MD5 << endl; - } - Rename(DestFile,DestFile + ".FAILED"); - return; - } if (FileName == DestFile) Erase = true; @@ -364,163 +358,75 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5, Decompression = true; DestFile += ".decomp"; - Desc.URI = "gzip:" + FileName,Location->PackagesInfo(); + // CNC:2002-07-03 + Desc.URI = "bzip2:" + FileName; QueueURI(Desc); - Mode = "gzip"; + // CNC:2002-07-03 + Mode = "bzip2"; } /*}}}*/ -// AcqHashes::AcqHashes - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* The package file is added to the queue and a second class is - instantiated to fetch the revision file */ -pkgAcqHashes::pkgAcqHashes(pkgAcquire *Owner, - pkgSourceList::RepositoryItem *Location) : - Item(Owner), Location(Location) -{ - Retries = _config->FindI("Acquire::Retries",0); - - Authentication = false; - - DestFile = _config->FindDir("Dir::State::lists") + "partial/"; - DestFile += URItoFileName(Location->HashesURI()); - - // Remove the file, it must be always downloaded - unlink(DestFile.c_str()); - string OldFile = _config->FindDir("Dir::State::lists"); - OldFile += URItoFileName(Location->HashesURI()); - unlink(OldFile.c_str()); - - // Create the item - Desc.URI = Location->HashesURI() + ".gpg"; - Desc.Description = Location->HashesInfo(); - Desc.Owner = this; - - Desc.ShortDesc = Location->Dist; - - QueueURI(Desc); -} - /*}}}*/ -// AcqHashes::Done - Finished a fetch /*{{{*/ -// --------------------------------------------------------------------- -void pkgAcqHashes::Done(string Message,unsigned long Size,string MD5, - pkgAcquire::MethodConfig *Cfg) -{ - Item::Done(Message,Size,MD5,Cfg); - - if (Authentication == true) - { - // Done, move it into position - string FinalFile = _config->FindDir("Dir::State::lists"); - FinalFile += URItoFileName(Location->HashesURI()); - Rename(DestFile,FinalFile); - - /* We restore the original name to DestFile so that the clean operation - will work OK */ - DestFile = _config->FindDir("Dir::State::lists") + "partial/"; - DestFile += URItoFileName(Location->HashesURI()); - - string SignerFingerprint = LookupTag(Message,"Signature-Key"); - - if (SignerFingerprint != Location->Vendor->Fingerprint) - { - Status = StatError; - ErrorText = _("Hashfile signer is not who it's supposed to be " - "(expected ")+Location->Vendor->Fingerprint - +_(", got ")+SignerFingerprint+")"; - return; - } - - // Update the hashes and file sizes for this repository - if (!Location->UpdateHashes(FinalFile)) { - Status = StatError; - ErrorText = "Could not stash MD5 hashes to index files"; - } - - return; - } - - Complete = true; - - string FileName = LookupTag(Message,"Filename"); - if (FileName.empty() == true) - { - Status = StatError; - ErrorText = "Method gave a blank filename"; - } - - if (FileName != DestFile) - Local = true; - - Authentication = true; - DestFile += ".extracted"; - Desc.URI = "gpg:" + FileName,Location->HashesInfo(); - QueueURI(Desc); - Mode = "gpg"; -} - /*}}}*/ -// AcqHashes::Failed - Failure handler /*{{{*/ -// --------------------------------------------------------------------- -/* Here we try other sources */ -void pkgAcqHashes::Failed(string Message,pkgAcquire::MethodConfig *Cnf) -{ - ErrorText = LookupTag(Message,"Message"); - - // This is the retry counter - if (Retries != 0 && - Cnf->LocalOnly == false && - StringToBool(LookupTag(Message,"Transient-Failure"),false) == true) - { - Retries--; - // wait a little before retrying - sleep(1); - QueueURI(Desc); - return; - } - - Item::Failed(Message,Cnf); -} - /*}}}*/ // AcqIndexRel::pkgAcqIndexRel - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The Release file is added to the queue */ -pkgAcqIndexRel::pkgAcqIndexRel(pkgAcquire *Owner, - const pkgSourceList::Item *Location) : - Item(Owner), Location(Location) +// CNC:2002-07-03 +pkgAcqIndexRel::pkgAcqIndexRel(pkgAcquire *Owner,pkgRepository *Repository, + string URI,string URIDesc,string ShortDesc, + bool Master) : + Item(Owner), RealURI(URI), Master(Master), + Repository(Repository) { - Retries = _config->FindI("Acquire::Retries",0); - + // CNC:2002-07-09 + assert(Master == false || Repository != NULL); + Authentication = false; + Erase = false; + DestFile = _config->FindDir("Dir::State::lists") + "partial/"; - DestFile += URItoFileName(Location->ReleaseURI()); + DestFile += URItoFileName(URI); // Create the item - Desc.URI = Location->ReleaseURI(); - Desc.Description = Location->ReleaseInfo(); + Desc.URI = URI; + Desc.Description = URIDesc; + Desc.ShortDesc = ShortDesc; Desc.Owner = this; - // If we're verifying authentication, check whether the size and - // MD5 matches, if not, delete the cached files and force redownload - string hash; - unsigned int size; - if (Location->Repository->MD5HashForFile(Location->ReleaseURI(true), hash, size) - && !hash.empty() && size != 0) + // CNC:2002-07-09 + string MD5Hash; + unsigned long Size; + if (Master == false && Repository != NULL) { - string FinalFile = _config->FindDir("Dir::State::lists"); - FinalFile += URItoFileName(Location->ReleaseURI()); - - if (!RecheckFile(FinalFile, hash, size)) + if (Repository->HasRelease() == true) { - unlink(FinalFile.c_str()); - unlink(DestFile.c_str()); + if (Repository->FindChecksums(RealURI,Size,MD5Hash) == false) + { + if (Repository->IsAuthenticated() == true) + { + _error->Error(_("%s is not listed in the checksum list for its repository"), + RealURI.c_str()); + return; + } + else + _error->Warning("Release file did not contain checksum information for %s", + RealURI.c_str()); + } + + string FinalFile = _config->FindDir("Dir::State::lists"); + FinalFile += URItoFileName(RealURI); + + if (VerifyChecksums(FinalFile,Size,MD5Hash) == false) + { + unlink(FinalFile.c_str()); + unlink(DestFile.c_str()); // Necessary? + } + } + else if (Repository->IsAuthenticated() == true) + { + _error->Error(_("Release information not available for %s"), + URI.c_str()); + return; } } - // Set the short description to the archive component - if (Location->Dist[Location->Dist.size() - 1] == '/') - Desc.ShortDesc = Location->Dist; - else - Desc.ShortDesc = Location->Dist + '/' + Location->Section; - QueueURI(Desc); } /*}}}*/ @@ -530,13 +436,17 @@ pkgAcqIndexRel::pkgAcqIndexRel(pkgAcquire *Owner, string pkgAcqIndexRel::Custom600Headers() { string Final = _config->FindDir("Dir::State::lists"); - Final += URItoFileName(Location->ReleaseURI()); + Final += URItoFileName(RealURI); struct stat Buf; if (stat(Final.c_str(),&Buf) != 0) return "\nIndex-File: true"; - - return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); + + // CNC:2002-07-11 + string LOI = ""; + if (Master == true) + LOI = "\nLocal-Only-IMS: true"; + return LOI + "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } /*}}}*/ // AcqIndexRel::Done - Item downloaded OK /*{{{*/ @@ -549,6 +459,56 @@ void pkgAcqIndexRel::Done(string Message,unsigned long Size,string MD5, { Item::Done(Message,Size,MD5,Cfg); + // CNC:2002-07-03 + if (Authentication == true) + { + if (Repository->IsAuthenticated() == true) + { + // Do the fingerprint matching magic + string FingerPrint = LookupTag(Message,"Signature-Fingerprint"); + + if (FingerPrint.empty() == true) + { + Status = StatError; + ErrorText = _("No valid signatures found in Release file"); + return; + } + + // Match fingerprint of Release file + if (Repository->Vendor->FingerPrint != FingerPrint) + { + Status = StatError; + ErrorText = _("Signature fingerprint of Release file does not match (expected ") + +Repository->Vendor->FingerPrint+_(", got ")+FingerPrint+")"; + return; + } + } + + // Done, move it into position + string FinalFile = _config->FindDir("Dir::State::lists"); + FinalFile += URItoFileName(RealURI); + Rename(DestFile,FinalFile); + chmod(FinalFile.c_str(),0644); + + /* We restore the original name to DestFile so that the clean operation + will work OK */ + DestFile = _config->FindDir("Dir::State::lists") + "partial/"; + DestFile += URItoFileName(RealURI); + + // Remove the compressed version. + if (Erase == true) + unlink(DestFile.c_str()); + + // Update the hashes and file sizes for this repository + if (Repository->ParseRelease(FinalFile) == false && + Repository->IsAuthenticated() == true) + { + Status = StatError; + ErrorText = _("Could not read checksum list from Release file"); + } + return; + } + string FileName = LookupTag(Message,"Filename"); if (FileName.empty() == true) { @@ -556,48 +516,24 @@ void pkgAcqIndexRel::Done(string Message,unsigned long Size,string MD5, ErrorText = "Method gave a blank filename"; return; } - - - - unsigned int size; - string hash; - - string fname = Location->ReleaseURI(true); - - if (!Location->Repository->MD5HashForFile(fname, hash, size)) - { - Status = StatAuthError; - ErrorText = "Unauthenticated file"; - return; - } - - // Check the size - if (size != 0 && Size != 0 && Size != size) - { - if (_config->FindB("Debug::pkgAcquire::Auth", false)) { - cout << "size: " << size << "!=" <FindB("Debug::pkgAcquire::Auth", false)) { - cout << "md5: " << hash << "!=" <FindDir("Dir::State::lists"); + FinalFile += URItoFileName(RealURI); + Repository->ParseRelease(FinalFile); + } return; + } // We have to copy it into place if (FileName != DestFile) @@ -608,10 +544,61 @@ void pkgAcqIndexRel::Done(string Message,unsigned long Size,string MD5, return; } - // Done, move it into position - string FinalFile = _config->FindDir("Dir::State::lists"); - FinalFile += URItoFileName(Location->ReleaseURI()); - Rename(DestFile,FinalFile); + // CNC:2002-07-03 + unsigned long FSize; + string MD5Hash; + if (Master == false && Repository != NULL + && Repository->HasRelease() == true + && Repository->FindChecksums(RealURI,FSize,MD5Hash) == true) + { + if (FSize != Size) + { + Status = StatError; + ErrorText = _("Size mismatch"); + Rename(DestFile,DestFile + ".FAILED"); + if (_config->FindB("Acquire::Verbose",false) == true) + _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul", + RealURI.c_str(), Size, FSize); + return; + } + if (MD5.empty() == false && MD5Hash != MD5) + { + Status = StatError; + ErrorText = _("MD5Sum mismatch"); + Rename(DestFile,DestFile + ".FAILED"); + if (_config->FindB("Acquire::Verbose",false) == true) + _error->Warning("MD5Sum mismatch of index file %s: %s was supposed to be %s", + RealURI.c_str(), MD5.c_str(), MD5Hash.c_str()); + return; + } + } + + if (Master == false || Repository->IsAuthenticated() == false) + { + // Done, move it into position + string FinalFile = _config->FindDir("Dir::State::lists"); + FinalFile += URItoFileName(RealURI); + Rename(DestFile,FinalFile); + chmod(FinalFile.c_str(),0644); + + // extract checksums from the Release file + if (Master == true) + Repository->ParseRelease(FinalFile); + } + else + { + if (FileName == DestFile) + Erase = true; + else + Local = true; + + // Still have the authentication phase + Authentication = true; + DestFile += ".auth"; + Desc.URI = "gpg:" + FileName; + QueueURI(Desc); + Mode = "gpg"; + } } /*}}}*/ // AcqIndexRel::Failed - Silence failure messages for missing rel files /*{{{*/ @@ -619,30 +606,18 @@ void pkgAcqIndexRel::Done(string Message,unsigned long Size,string MD5, /* */ void pkgAcqIndexRel::Failed(string Message,pkgAcquire::MethodConfig *Cnf) { - - ErrorText = LookupTag(Message,"Message"); - - // This is the retry counter - if (Retries != 0 && - Cnf->LocalOnly == false && - StringToBool(LookupTag(Message,"Transient-Failure"),false) == true) - { - Retries--; - // wait a little before retrying - sleep(1); - QueueURI(Desc); - return; - } - - if (Cnf->LocalOnly == true || - StringToBool(LookupTag(Message,"Transient-Failure"),false) == false) + StringToBool(LookupTag(Message,"Transient-Failure"),false) == false) { - // Ignore this - Status = StatDone; - Complete = false; - Dequeue(); - return; + // CNC:2002-07-03 + if (Master == false || Repository->IsAuthenticated() == false) + { + // Ignore this + Status = StatDone; + Complete = false; + Dequeue(); + return; + } } Item::Failed(Message,Cnf); @@ -656,15 +631,16 @@ void pkgAcqIndexRel::Failed(string Message,pkgAcquire::MethodConfig *Cnf) pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords *Recs,pkgCache::VerIterator const &Version, string &StoreFilename) : - Item(Owner), Version(Version), Sources(Sources), Recs(Recs), + Item(Owner), Version(Version), Sources(Sources), Recs(Recs), StoreFilename(StoreFilename), Vf(Version.FileList()) { Retries = _config->FindI("Acquire::Retries",0); if (Version.Arch() == 0) { - _error->Error("I wasn't able to locate file for the %s package. " - "This might mean you need to manually fix this package. (due to missing arch)", + _error->Error(_("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)"), Version.ParentPkg().Name()); return; } @@ -687,7 +663,7 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords::Parser &Parse = Recs->Lookup(Vf); if (_error->PendingError() == true) return; - + // Generate the final file name as: package_version_arch.foo StoreFilename = QuoteString(Version.ParentPkg().Name(),"_:") + '_' + QuoteString(Version.VerStr(),"_:") + '_' + @@ -697,8 +673,8 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, // Select a source if (QueueNext() == false && _error->PendingError() == false) - _error->Error("I wasn't able to locate file for the %s package. " - "This might mean you need to manually fix this package.", + _error->Error(_("I wasn't able to locate file for the %s package. " + "This might mean you need to manually fix this package."), Version.ParentPkg().Name()); } /*}}}*/ @@ -708,7 +684,7 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, the archive is already available in the cache and stashs the MD5 for checking later. */ bool pkgAcqArchive::QueueNext() -{ +{ for (; Vf.end() == false; Vf++) { // Ignore not source sources @@ -716,26 +692,21 @@ bool pkgAcqArchive::QueueNext() continue; // Try to cross match against the source list - string PkgFile = flNotDir(Vf.File().FileName()); - pkgSourceList::const_iterator Location; - for (Location = Sources->begin(); Location != Sources->end(); Location++) - if (PkgFile == URItoFileName(Location->PackagesURI())) - break; - - if (Location == Sources->end()) - continue; + pkgIndexFile *Index; + if (Sources->FindIndex(Vf.File(),Index) == false) + continue; // Grab the text package record pkgRecords::Parser &Parse = Recs->Lookup(Vf); if (_error->PendingError() == true) return false; - PkgFile = Parse.FileName(); + string PkgFile = Parse.FileName(); MD5 = Parse.MD5Hash(); if (PkgFile.empty() == true) - return _error->Error("The package index files are corrupted. No Filename: " - "field for package %s." - ,Version.ParentPkg().Name()); + return _error->Error(_("The package index files are corrupted. No Filename: " + "field for package %s."), + Version.ParentPkg().Name()); // See if we already have the file. (Legacy filenames) FileSize = Version->Size; @@ -790,8 +761,9 @@ bool pkgAcqArchive::QueueNext() } // Create the item - Desc.URI = Location->ArchiveURI(PkgFile); - Desc.Description = Location->ArchiveInfo(Version); + Local = false; + Desc.URI = Index->ArchiveURI(PkgFile); + Desc.Description = Index->ArchiveInfo(Version); Desc.Owner = this; Desc.ShortDesc = Version.ParentPkg().Name(); QueueURI(Desc); @@ -809,12 +781,12 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash, pkgAcquire::MethodConfig *Cfg) { Item::Done(Message,Size,Md5Hash,Cfg); - + // Check the size if (Size != Version->Size) { Status = StatError; - ErrorText = "Size mismatch"; + ErrorText = _("Size mismatch"); return; } @@ -824,7 +796,7 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash, if (Md5Hash != MD5) { Status = StatError; - ErrorText = "MD5Sum mismatch"; + ErrorText = _("MD5Sum mismatch"); Rename(DestFile,DestFile + ".FAILED"); return; } @@ -864,6 +836,20 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash, void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf) { ErrorText = LookupTag(Message,"Message"); + + /* 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 && + StringToBool(LookupTag(Message,"Transient-Failure"),false) == true) + { + // Vf = Version.FileList(); + while (Vf.end() == false) Vf++; + StoreFilename = string(); + Item::Failed(Message,Cnf); + return; + } + if (QueueNext() == false) { // This is the retry counter @@ -872,12 +858,11 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf) StringToBool(LookupTag(Message,"Transient-Failure"),false) == true) { Retries--; - // wait a little before retrying - sleep(1); Vf = Version.FileList(); if (QueueNext() == true) return; } + StoreFilename = string(); Item::Failed(Message,Cnf); } @@ -894,6 +879,7 @@ void pkgAcqArchive::Finished() StoreFilename = string(); } /*}}}*/ + // AcqFile::pkgAcqFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The file is added to the queue */ @@ -944,8 +930,8 @@ void pkgAcqFile::Done(string Message,unsigned long Size,string MD5, Rename(DestFile,DestFile + ".FAILED"); return; } - } - + } + Item::Done(Message,Size,MD5,Cnf); string FileName = LookupTag(Message,"Filename"); @@ -955,7 +941,7 @@ void pkgAcqFile::Done(string Message,unsigned long Size,string MD5, ErrorText = "Method gave a blank filename"; return; } - + Complete = true; // The files timestamp matches @@ -1005,8 +991,6 @@ void pkgAcqFile::Failed(string Message,pkgAcquire::MethodConfig *Cnf) StringToBool(LookupTag(Message,"Transient-Failure"),false) == true) { Retries--; - // wait a little before retrying - sleep(1); QueueURI(Desc); return; } @@ -1014,3 +998,4 @@ void pkgAcqFile::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Item::Failed(Message,Cnf); } /*}}}*/ +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/acquire-item.h b/apt/apt-pkg/acquire-item.h index 65dd9ae..03b8242 100644 --- a/apt/apt-pkg/acquire-item.h +++ b/apt/apt-pkg/acquire-item.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-item.h,v 1.6 2001/11/12 16:34:00 kojima Exp $ +// $Id: acquire-item.h,v 1.2 2003/01/29 13:04:48 niemeyer Exp $ /* ###################################################################### Acquire Item - Item to acquire @@ -21,7 +21,7 @@ #define PKGLIB_ACQUIRE_ITEM_H #include -#include +#include #include #ifdef __GNUG__ @@ -30,10 +30,9 @@ // Item to acquire class pkgAcquire::Item -{ +{ protected: - bool RecheckFile(string path, string MD5, unsigned long Size); - + // Some private helper methods for registering URIs pkgAcquire *Owner; inline void QueueURI(ItemDesc &Item) @@ -46,11 +45,13 @@ class pkgAcquire::Item public: // State of the item - enum {StatIdle, StatFetching, StatDone, StatError, StatAuthError} Status; + /* CNC:2002-11-22 + * Do not use anonyomus enums, as this breaks swig in some cases */ + enum StatusFlags {StatIdle, StatFetching, StatDone, StatError} Status; string ErrorText; unsigned long FileSize; unsigned long PartialSize; - char *Mode; + const char *Mode; unsigned long ID; bool Complete; bool Local; @@ -78,16 +79,21 @@ class pkgAcquire::Item virtual ~Item(); }; +// CNC:2002-07-03 +class pkgRepository; + // Item class for index files class pkgAcqIndex : public pkgAcquire::Item { protected: - const pkgSourceList::Item *Location; bool Decompression; bool Erase; pkgAcquire::ItemDesc Desc; - unsigned int Retries; + string RealURI; + + // CNC:2002-07-03 + pkgRepository *Repository; public: @@ -95,9 +101,11 @@ class pkgAcqIndex : public pkgAcquire::Item virtual void Done(string Message,unsigned long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); - virtual string DescURI() {return Location->PackagesURI();}; + virtual string DescURI() {return RealURI;}; - pkgAcqIndex(pkgAcquire *Owner,const pkgSourceList::Item *Location); + // CNC:2002-07-03 + pkgAcqIndex(pkgAcquire *Owner,pkgRepository *Repository,string URI, + string URIDesc,string ShortDesct); }; // Item class for index files @@ -105,9 +113,14 @@ class pkgAcqIndexRel : public pkgAcquire::Item { protected: - const pkgSourceList::Item *Location; pkgAcquire::ItemDesc Desc; - unsigned int Retries; + string RealURI; + + // CNC:2002-07-03 + bool Authentication; + bool Master; + bool Erase; + pkgRepository *Repository; public: @@ -116,9 +129,11 @@ class pkgAcqIndexRel : public pkgAcquire::Item virtual void Done(string Message,unsigned long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); - virtual string DescURI() {return Location->ReleaseURI();}; + virtual string DescURI() {return RealURI;}; - pkgAcqIndexRel(pkgAcquire *Owner,const pkgSourceList::Item *Location); + // CNC:2002-07-03 + pkgAcqIndexRel(pkgAcquire *Owner,pkgRepository *Repository,string URI, + string URIDesc,string ShortDesc,bool Master=false); }; // Item class for archive files @@ -154,29 +169,6 @@ class pkgAcqArchive : public pkgAcquire::Item string &StoreFilename); }; - -// Item class for index files -class pkgAcqHashes : public pkgAcquire::Item -{ - protected: - - bool Authentication; - pkgSourceList::RepositoryItem *Location; - pkgAcquire::ItemDesc Desc; - unsigned int Retries; - - public: - - // Specialized action members - virtual void Done(string Message,unsigned long Size,string Md5Hash, - pkgAcquire::MethodConfig *Cnf); - virtual string DescURI() {return Location->HashesURI();}; - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - - pkgAcqHashes(pkgAcquire *Owner, - pkgSourceList::RepositoryItem *Location); -}; - // Fetch a generic file to the current directory class pkgAcqFile : public pkgAcquire::Item { @@ -194,7 +186,7 @@ class pkgAcqFile : public pkgAcquire::Item virtual string DescURI() {return Desc.URI;}; pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,unsigned long Size, - string Desc,string ShortDesc); + string Desc,string ShortDesc); }; #endif diff --git a/apt/apt-pkg/acquire-method.cc b/apt/apt-pkg/acquire-method.cc index 1d43761..ca4c32e 100644 --- a/apt/apt-pkg/acquire-method.cc +++ b/apt/apt-pkg/acquire-method.cc @@ -1,12 +1,12 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-method.cc,v 1.4 2001/06/16 01:50:22 kojima Exp $ +// $Id: acquire-method.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Acquire Method This is a skeleton class that implements most of the functionality - of a method and some usefull functions to make method implementation + of a method and some useful functions to make method implementation simpler. The methods all derive this and specialize it. The most complex implementation is the http method which needs to provide pipelining, it runs the message engine at the same time it is @@ -23,21 +23,26 @@ #include #include #include +#include +#include #include #include #include /*}}}*/ +using namespace std; + // AcqMethod::pkgAcqMethod - Constructor /*{{{*/ // --------------------------------------------------------------------- /* This constructs the initialization text */ pkgAcqMethod::pkgAcqMethod(const char *Ver,unsigned long Flags) + : Flags(Flags) // CNC:2002-07-11 { char S[300] = ""; char *End = S; strcat(End,"100 Capabilities\n"); - snprintf(End+strlen(End),sizeof(S),"Version: %s\n",Ver); + sprintf(End+strlen(End),"Version: %s\n",Ver); if ((Flags & SingleInstance) == SingleInstance) strcat(End,"Single-Instance: true\n"); @@ -85,7 +90,7 @@ void pkgAcqMethod::Fail(bool Transient) void pkgAcqMethod::Fail(string Err,bool Transient) { // Strip out junk from the error messages - for (char *I = Err.begin(); I != Err.end(); I++) + for (string::iterator I = Err.begin(); I != Err.end(); I++) { if (*I == '\r') *I = ' '; @@ -97,7 +102,8 @@ void pkgAcqMethod::Fail(string Err,bool Transient) if (Queue != 0) { snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n" - "Message: %s\n",Queue->Uri.c_str(),Err.c_str()); + "Message: %s %s\n",Queue->Uri.c_str(),Err.c_str(), + FailExtra.c_str()); // Dequeue FetchItem *Tmp = Queue; @@ -108,7 +114,8 @@ void pkgAcqMethod::Fail(string Err,bool Transient) } else snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: \n" - "Message: %s\n",Err.c_str()); + "Message: %s %s\n",Err.c_str(), + FailExtra.c_str()); // Set the transient flag if (Transient == true) @@ -173,10 +180,12 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt) if (Res.MD5Sum.empty() == false) End += snprintf(End,sizeof(S)-50 - (End - S),"MD5-Hash: %s\n",Res.MD5Sum.c_str()); + if (Res.SHA1Sum.empty() == false) + End += snprintf(End,sizeof(S)-50 - (End - S),"SHA1-Hash: %s\n",Res.SHA1Sum.c_str()); - if (Res.SignatureKeyID.empty() == false) - End += snprintf(End,sizeof(S)-80 - (End - S),"Signature-Key: %s\n", - Res.SignatureKeyID.c_str()); + // CNC:2002-07-04 + if (Res.SignatureFP.empty() == false) + End += snprintf(End,sizeof(S)-50 - (End - S),"Signature-Fingerprint: %s\n",Res.SignatureFP.c_str()); if (Res.ResumePoint != 0) End += snprintf(End,sizeof(S)-50 - (End - S),"Resume-Point: %lu\n", @@ -201,11 +210,10 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt) if (Alt->MD5Sum.empty() == false) End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-MD5-Hash: %s\n", Alt->MD5Sum.c_str()); - - if (Alt->SignatureKeyID.empty() == false) - End += snprintf(End,sizeof(S)-80 - (End - S),"Alt-Signature-Key: %s\n", - Alt->SignatureKeyID.c_str()); - + if (Alt->SHA1Sum.empty() == false) + End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-SHA1-Hash: %s\n", + Alt->SHA1Sum.c_str()); + if (Alt->IMSHit == true) strcat(End,"Alt-IMS-Hit: true\n"); } @@ -268,7 +276,7 @@ bool pkgAcqMethod::MediaFail(string Required,string Drive) MyMessages.erase(MyMessages.begin()); } - return !StringToBool(LookupTag(Message,"Failed"),false); + return !StringToBool(LookupTag(Message,"Fail"),false); } Messages.push_back(Message); @@ -283,10 +291,11 @@ bool pkgAcqMethod::Configuration(string Message) { ::Configuration &Cnf = *_config; - const char *I = Message.begin(); + const char *I = Message.c_str(); + const char *MsgEnd = I + Message.length(); unsigned int Length = strlen("Config-Item"); - for (; I + Length < Message.end(); I++) + for (; I + Length < MsgEnd; I++) { // Not a config item if (I[Length] != ':' || stringcasecmp(I,I+Length,"Config-Item") != 0) @@ -294,11 +303,11 @@ bool pkgAcqMethod::Configuration(string Message) I += Length + 1; - for (; I < Message.end() && *I == ' '; I++); + for (; I < MsgEnd && *I == ' '; I++); const char *Equals = I; - for (; Equals < Message.end() && *Equals != '='; Equals++); + for (; Equals < MsgEnd && *Equals != '='; Equals++); const char *End = Equals; - for (; End < Message.end() && *End != '\n'; End++); + for (; End < MsgEnd && *End != '\n'; End++); if (End == Equals) return false; @@ -362,6 +371,11 @@ int pkgAcqMethod::Run(bool Single) Tmp->LastModified = 0; Tmp->IndexFile = StringToBool(LookupTag(Message,"Index-File"),false); Tmp->Next = 0; + + // CNC:2002-07-11 + if (StringToBool(LookupTag(Message,"Local-Only-IMS"),false) == true + && (Flags & LocalOnly) == 0) + Tmp->LastModified = 0; // Append it to the list FetchItem **I = &Queue; @@ -440,3 +454,14 @@ pkgAcqMethod::FetchResult::FetchResult() : LastModified(0), { } /*}}}*/ +// AcqMethod::FetchResult::TakeHashes - Load hashes /*{{{*/ +// --------------------------------------------------------------------- +/* This hides the number of hashes we are supporting from the caller. + It just deals with the hash class. */ +void pkgAcqMethod::FetchResult::TakeHashes(Hashes &Hash) +{ + MD5Sum = Hash.MD5.Result(); + SHA1Sum = Hash.SHA1.Result(); +} + /*}}}*/ +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/acquire-method.h b/apt/apt-pkg/acquire-method.h index 4322ead..7790366 100644 --- a/apt/apt-pkg/acquire-method.h +++ b/apt/apt-pkg/acquire-method.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-method.h,v 1.2 2000/09/26 14:22:14 kojima Exp $ +// $Id: acquire-method.h,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Acquire Method - Method helper class + functions @@ -20,10 +20,14 @@ #pragma interface "apt-pkg/acquire-method.h" #endif +class Hashes; class pkgAcqMethod { protected: + // CNC:2002-07-11 + unsigned long Flags; + struct FetchItem { FetchItem *Next; @@ -37,12 +41,16 @@ class pkgAcqMethod struct FetchResult { string MD5Sum; - string SignatureKeyID; + string SHA1Sum; + // CNC:2002-07-03 + string SignatureFP; time_t LastModified; bool IMSHit; string Filename; unsigned long Size; unsigned long ResumePoint; + + void TakeHashes(Hashes &Hash); FetchResult(); }; @@ -50,7 +58,8 @@ class pkgAcqMethod vector Messages; FetchItem *Queue; FetchItem *QueueBack; - + string FailExtra; + // Handlers for messages virtual bool Configuration(string Message); virtual bool Fetch(FetchItem * /*Item*/) {return true;}; @@ -75,6 +84,7 @@ class pkgAcqMethod void Status(const char *Format,...); int Run(bool Single = false); + inline void SetFailExtraMsg(string Msg) {FailExtra = Msg;}; pkgAcqMethod(const char *Ver,unsigned long Flags = 0); virtual ~pkgAcqMethod() {}; diff --git a/apt/apt-pkg/acquire-worker.cc b/apt/apt-pkg/acquire-worker.cc index b24160b..ab5e955 100644 --- a/apt/apt-pkg/acquire-worker.cc +++ b/apt/apt-pkg/acquire-worker.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-worker.cc,v 1.2 2001/01/11 02:03:26 kojima Exp $ +// $Id: acquire-worker.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Acquire Worker @@ -22,17 +22,21 @@ #include #include +#include + +#include +#include + #include #include #include #include #include #include - -#include - /*}}}*/ +using namespace std; + // Worker::Worker - Constructor for Queue startup /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -114,7 +118,7 @@ bool pkgAcquire::Worker::Start() int Pipes[4] = {-1,-1,-1,-1}; if (pipe(Pipes) != 0 || pipe(Pipes+2) != 0) { - _error->Errno("pipe",_("Failed to create IPC pipe to subprocess")); + _error->Errno("pipe","Failed to create IPC pipe to subprocess"); for (int I = 0; I != 4; I++) close(Pipes[I]); return false; @@ -124,14 +128,11 @@ bool pkgAcquire::Worker::Start() // Fork off the process Process = ExecFork(); - - // Spawn the subprocess if (Process == 0) { // Setup the FDs dup2(Pipes[1],STDOUT_FILENO); dup2(Pipes[2],STDIN_FILENO); - dup2(((filebuf *)clog.rdbuf())->fd(),STDERR_FILENO); SetCloseExec(STDOUT_FILENO,false); SetCloseExec(STDIN_FILENO,false); SetCloseExec(STDERR_FILENO,false); @@ -194,7 +195,7 @@ bool pkgAcquire::Worker::RunMessages() char *End; int Number = strtol(Message.c_str(),&End,10); if (End == Message.c_str()) - return _error->Error(_("Invalid message from method %s: %s"),Access.c_str(),Message.c_str()); + 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; @@ -207,7 +208,7 @@ bool pkgAcquire::Worker::RunMessages() // 100 Capabilities case 100: if (Capabilities(Message) == false) - return _error->Error(_("Unable to process Capabilities message from %s"),Access.c_str()); + return _error->Error("Unable to process Capabilities message from %s",Access.c_str()); break; // 101 Log @@ -226,7 +227,7 @@ bool pkgAcquire::Worker::RunMessages() { if (Itm == 0) { - _error->Error(_("Method gave invalid 200 URI Start message")); + _error->Error("Method gave invalid 200 URI Start message"); break; } @@ -263,9 +264,9 @@ bool pkgAcquire::Worker::RunMessages() Log->Pulse(Owner->GetOwner()); OwnerQ->ItemDone(Itm); - if (TotalSize != 0 && + if (TotalSize != 0 && (unsigned)atoi(LookupTag(Message,"Size","0").c_str()) != TotalSize) - _error->Warning(_("Bizzar Error - File size is not what the server reported %s %u"), + _error->Warning("Bizarre Error - File size is not what the server reported %s %lu", LookupTag(Message,"Size","0").c_str(),TotalSize); Owner->Done(Message,atoi(LookupTag(Message,"Size","0").c_str()), @@ -294,7 +295,7 @@ bool pkgAcquire::Worker::RunMessages() { if (Itm == 0) { - _error->Error(_("Method gave invalid 400 URI Failure message")); + _error->Error("Method gave invalid 400 URI Failure message"); break; } @@ -316,7 +317,7 @@ bool pkgAcquire::Worker::RunMessages() // 401 General Failure case 401: - _error->Error(_("Method %s General failure: %s"),LookupTag(Message,"Message").c_str()); + _error->Error("Method %s General failure: %s",Access.c_str(),LookupTag(Message,"Message").c_str()); break; // 403 Media Change @@ -370,7 +371,7 @@ bool pkgAcquire::Worker::MediaChange(string Message) LookupTag(Message,"Drive")) == false) { char S[300]; - sprintf(S,"603 Media Changed\nFailed: true\n\n"); + snprintf(S,sizeof(S),"603 Media Changed\nFailed: true\n\n"); if (Debug == true) clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl; OutQueue += S; @@ -379,7 +380,7 @@ bool pkgAcquire::Worker::MediaChange(string Message) } char S[300]; - sprintf(S,"603 Media Changed\n\n"); + snprintf(S,sizeof(S),"603 Media Changed\n\n"); if (Debug == true) clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl; OutQueue += S; @@ -408,7 +409,7 @@ bool pkgAcquire::Worker::SendConfiguration() { if (Top->Value.empty() == false) { - string Line = "Config-Item: " + Top->FullTag() + "="; + string Line = "Config-Item: " + QuoteString(Top->FullTag(),"=\"\n") + "="; Line += QuoteString(Top->Value,"\n") + '\n'; Message += Line; } @@ -465,7 +466,7 @@ bool pkgAcquire::Worker::OutFdReady() int Res; do { - Res = write(OutFd,OutQueue.begin(),OutQueue.length()); + Res = write(OutFd,OutQueue.c_str(),OutQueue.length()); } while (Res < 0 && errno == EINTR); @@ -500,7 +501,7 @@ bool pkgAcquire::Worker::InFdReady() read returned -1. */ bool pkgAcquire::Worker::MethodFailure() { - _error->Error(_("Method %s has died unexpectedly!"),Access.c_str()); + _error->Error("Method %s has died unexpectedly!",Access.c_str()); ExecWait(Process,Access.c_str(),true); Process = -1; diff --git a/apt/apt-pkg/acquire-worker.h b/apt/apt-pkg/acquire-worker.h index 49c96b5..5835589 100644 --- a/apt/apt-pkg/acquire-worker.h +++ b/apt/apt-pkg/acquire-worker.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-worker.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: acquire-worker.h,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Acquire Worker - Worker process manager @@ -21,10 +21,10 @@ // Interfacing to the method process class pkgAcquire::Worker { - friend pkgAcquire; + friend class pkgAcquire; protected: - friend Queue; + friend class Queue; /* Linked list starting at a Queue and a linked list starting at Acquire */ diff --git a/apt/apt-pkg/acquire.cc b/apt/apt-pkg/acquire.cc index 003dfe9..0885c57 100644 --- a/apt/apt-pkg/acquire.cc +++ b/apt/apt-pkg/acquire.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire.cc,v 1.3 2001/06/16 01:50:22 kojima Exp $ +// $Id: acquire.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Acquire - File Acquiration @@ -23,15 +23,18 @@ #include #include +#include + +#include + #include #include #include #include - -#include - /*}}}*/ +using namespace std; + // Acquire::pkgAcquire - Constructor /*{{{*/ // --------------------------------------------------------------------- /* We grab some runtime state from the configuration space */ @@ -110,10 +113,15 @@ void pkgAcquire::Remove(Item *Itm) { Dequeue(Itm); - for (vector::iterator I = Items.begin(); I < Items.end(); I++) + for (ItemIterator I = Items.begin(); I != Items.end();) { if (*I == Itm) + { Items.erase(I); + I = Items.begin(); + } + else + I++; } } /*}}}*/ @@ -365,7 +373,7 @@ pkgAcquire::RunResult pkgAcquire::Run() I->Shutdown(false); // Shut down the items - for (Item **I = Items.begin(); I != Items.end(); I++) + for (ItemIterator I = Items.begin(); I != Items.end(); I++) (*I)->Finished(); if (_error->PendingError()) @@ -401,13 +409,13 @@ bool pkgAcquire::Clean(string Dir) { DIR *D = opendir(Dir.c_str()); if (D == 0) - return _error->Errno("opendir","Unable to read %s",Dir.c_str()); + return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); string StartDir = SafeGetCWD(); if (chdir(Dir.c_str()) != 0) { closedir(D); - return _error->Errno("chdir","Unable to change to ",Dir.c_str()); + return _error->Errno("chdir",_("Unable to change to %s"),Dir.c_str()); } for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D)) @@ -420,7 +428,7 @@ bool pkgAcquire::Clean(string Dir) continue; // Look in the get list - vector::iterator I = Items.begin(); + ItemCIterator I = Items.begin(); for (; I != Items.end(); I++) if (flNotDir((*I)->DestFile) == Dir->d_name) break; @@ -438,10 +446,10 @@ bool pkgAcquire::Clean(string Dir) // Acquire::TotalNeeded - Number of bytes to fetch /*{{{*/ // --------------------------------------------------------------------- /* This is the total number of bytes needed */ -unsigned long pkgAcquire::TotalNeeded() +double pkgAcquire::TotalNeeded() { - unsigned long Total = 0; - for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++) + double Total = 0; + for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++) Total += (*I)->FileSize; return Total; } @@ -449,10 +457,10 @@ unsigned long pkgAcquire::TotalNeeded() // Acquire::FetchNeeded - Number of bytes needed to get /*{{{*/ // --------------------------------------------------------------------- /* This is the number of bytes that is not local */ -unsigned long pkgAcquire::FetchNeeded() +double pkgAcquire::FetchNeeded() { - unsigned long Total = 0; - for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++) + double Total = 0; + for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++) if ((*I)->Local == false) Total += (*I)->FileSize; return Total; @@ -461,10 +469,10 @@ unsigned long pkgAcquire::FetchNeeded() // Acquire::PartialPresent - Number of partial bytes we already have /*{{{*/ // --------------------------------------------------------------------- /* This is the number of bytes that is not local */ -unsigned long pkgAcquire::PartialPresent() +double pkgAcquire::PartialPresent() { - unsigned long Total = 0; - for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++) + double Total = 0; + for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++) if ((*I)->Local == false) Total += (*I)->PartialSize; return Total; @@ -729,7 +737,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) // Compute the total number of bytes to fetch unsigned int Unknown = 0; unsigned int Count = 0; - for (pkgAcquire::Item **I = Owner->ItemsBegin(); I != Owner->ItemsEnd(); + for (pkgAcquire::ItemCIterator I = Owner->ItemsBegin(); I != Owner->ItemsEnd(); I++, Count++) { TotalItems++; @@ -739,7 +747,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) // Totally ignore local items if ((*I)->Local == true) continue; - + TotalBytes += (*I)->FileSize; if ((*I)->Complete == true) CurrentBytes += (*I)->FileSize; diff --git a/apt/apt-pkg/acquire.h b/apt/apt-pkg/acquire.h index 3a5ef64..11b6c5a 100644 --- a/apt/apt-pkg/acquire.h +++ b/apt/apt-pkg/acquire.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire.h,v 1.2 2000/11/06 12:53:49 kojima Exp $ +// $Id: acquire.h,v 1.2 2003/01/29 13:04:48 niemeyer Exp $ /* ###################################################################### Acquire - File Acquiration @@ -35,6 +35,9 @@ #include #include +using std::vector; +using std::string; + #ifdef __GNUG__ #pragma interface "apt-pkg/acquire.h" #endif @@ -52,8 +55,11 @@ class pkgAcquire class Worker; struct MethodConfig; struct ItemDesc; - friend Item; - friend Queue; + friend class Item; + friend class Queue; + + typedef vector::iterator ItemIterator; + typedef vector::const_iterator ItemCIterator; protected: @@ -100,8 +106,8 @@ class pkgAcquire // Simple iteration mechanism inline Worker *WorkersBegin() {return Workers;}; Worker *WorkerStep(Worker *I); - inline Item **ItemsBegin() {return Items.begin();}; - inline Item **ItemsEnd() {return Items.end();}; + inline ItemIterator ItemsBegin() {return Items.begin();}; + inline ItemIterator ItemsEnd() {return Items.end();}; // Iterate over queued Item URIs class UriIterator; @@ -112,9 +118,9 @@ class pkgAcquire bool Clean(string Dir); // Returns the size of the total download set - unsigned long TotalNeeded(); - unsigned long FetchNeeded(); - unsigned long PartialPresent(); + double TotalNeeded(); + double FetchNeeded(); + double PartialPresent(); pkgAcquire(pkgAcquireStatus *Log = 0); virtual ~pkgAcquire(); @@ -132,11 +138,14 @@ struct pkgAcquire::ItemDesc // List of possible items queued for download. class pkgAcquire::Queue { - friend pkgAcquire; - friend pkgAcquire::UriIterator; + friend class pkgAcquire; + friend class pkgAcquire::UriIterator; + friend class pkgAcquire::Worker; Queue *Next; - public: + protected: + +#ifndef SWIG // Queued item struct QItem : pkgAcquire::ItemDesc { @@ -151,7 +160,8 @@ class pkgAcquire::Queue Owner = I.Owner; }; }; - protected: +#endif + // Name of the queue string Name; @@ -240,11 +250,11 @@ class pkgAcquireStatus struct timeval Time; struct timeval StartTime; - unsigned long LastBytes; + double LastBytes; double CurrentCPS; - unsigned long CurrentBytes; - unsigned long TotalBytes; - unsigned long FetchedBytes; + double CurrentBytes; + double TotalBytes; + double FetchedBytes; unsigned long ElapsedTime; unsigned long TotalItems; unsigned long CurrentItems; diff --git a/apt/apt-pkg/algorithms.cc b/apt/apt-pkg/algorithms.cc index 0a37d76..fb82fff 100644 --- a/apt/apt-pkg/algorithms.cc +++ b/apt/apt-pkg/algorithms.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.cc,v 1.11 2001/11/13 17:32:07 kojima Exp $ +// $Id: algorithms.cc,v 1.11 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -20,27 +20,62 @@ #include #include #include -#include +#include + +// CNC:2002-07-04 +#include +#include + +#include + +#include /*}}}*/ -#include +using namespace std; pkgProblemResolver *pkgProblemResolver::This = 0; // Simulate::Simulate - Constructor /*{{{*/ // --------------------------------------------------------------------- -/* */ -pkgSimulate::pkgSimulate(pkgDepCache &Cache) : pkgPackageManager(Cache), - Sim(Cache.GetMap()) +/* 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), + Sim(&Cache->GetCache(),&iPolicy) { - Flags = new unsigned char[Cache.HeaderP->PackageCount]; - memset(Flags,0,sizeof(*Flags)*Cache.HeaderP->PackageCount); + Sim.Init(0); + Flags = new unsigned char[Cache->Head().PackageCount]; + memset(Flags,0,sizeof(*Flags)*Cache->Head().PackageCount); // Fake a filename so as not to activate the media swapping string Jnk = "SIMULATE"; - for (unsigned int I = 0; I != Cache.Head().PackageCount; I++) + for (unsigned int I = 0; I != Cache->Head().PackageCount; I++) FileNames[I] = Jnk; } /*}}}*/ +// Simulate::Describe - Describe a package /*{{{*/ +// --------------------------------------------------------------------- +/* Parameter Now == true gives both current and available varsion, + Parameter Now == false gives only the available package version */ +void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Now) +{ + VerIterator Ver(Sim); + + out << Pkg.Name(); + + if (Now == true) + { + Ver = Pkg.CurrentVer(); + if (Ver.end() == false) + out << " [" << Ver.VerStr() << ']'; + } + + Ver = Sim[Pkg].CandidateVerIter(Sim); + if (Ver.end() == true) + return; + + out << " (" << Ver.VerStr() << ' ' << Ver.RelStr() << ')'; +} + /*}}}*/ // Simulate::Install - Simulate unpacking of a package /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -50,7 +85,8 @@ bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/) PkgIterator Pkg = Sim.FindPkg(iPkg.Name()); Flags[Pkg->ID] = 1; - cout << "Inst " << Pkg.Name(); + cout << "Inst "; + Describe(Pkg,cout,true); Sim.MarkInstall(Pkg,false); // Look for broken conflicts+predepends. @@ -59,18 +95,23 @@ bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/) if (Sim[I].InstallVer == 0) continue; - for (DepIterator D = Sim[I].InstVerIter(Sim).DependsList(); D.end() == false; D++) - if (D->Type == pkgCache::Dep::Conflicts - || D->Type == pkgCache::Dep::Obsoletes - || D->Type == pkgCache::Dep::PreDepends) + for (DepIterator D = Sim[I].InstVerIter(Sim).DependsList(); D.end() == false;) + { + DepIterator Start; + DepIterator End; + D.GlobOr(Start,End); + if (Start->Type == pkgCache::Dep::Conflicts || + Start->Type == pkgCache::Dep::Obsoletes || + End->Type == pkgCache::Dep::PreDepends) { - if ((Sim[D] & pkgDepCache::DepInstall) == 0) + if ((Sim[End] & pkgDepCache::DepGInstall) == 0) { - cout << " [" << I.Name() << " on " << D.TargetPkg().Name() << ']'; - if (D->Type == pkgCache::Dep::Conflicts) + cout << " [" << I.Name() << " on " << Start.TargetPkg().Name() << ']'; + if (Start->Type == pkgCache::Dep::Conflicts) _error->Error("Fatal, conflicts violated %s",I.Name()); } - } + } + } } if (Sim.BrokenCount() != 0) @@ -104,7 +145,7 @@ bool pkgSimulate::Configure(PkgIterator iPkg) if (Sim.IsImportantDep(D) == false || (Sim[D] & pkgDepCache::DepInstall) != 0) continue; - + if (D->Type == pkgCache::Dep::Obsoletes) cout << " Obsoletes:" << D.TargetPkg().Name(); else if (D->Type == pkgCache::Dep::Conflicts) @@ -117,7 +158,10 @@ bool pkgSimulate::Configure(PkgIterator iPkg) _error->Error("Conf Broken %s",Pkg.Name()); } else - cout << "Conf " << Pkg.Name(); + { + cout << "Conf "; + Describe(Pkg,cout,false); + } if (Sim.BrokenCount() != 0) ShortBreaks(); @@ -138,9 +182,10 @@ bool pkgSimulate::Remove(PkgIterator iPkg,bool Purge) Flags[Pkg->ID] = 3; Sim.MarkDelete(Pkg); if (Purge == true) - cout << "Purg " << Pkg.Name(); + cout << "Purg "; else - cout << "Remv " << Pkg.Name(); + cout << "Remv "; + Describe(Pkg,cout,false); if (Sim.BrokenCount() != 0) ShortBreaks(); @@ -178,16 +223,20 @@ bool pkgApplyStatus(pkgDepCache &Cache) { for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { + if (I->VersionList == 0) + continue; + // Only choice for a ReInstReq package is to reinstall if (I->InstState == pkgCache::State::ReInstReq || I->InstState == pkgCache::State::HoldReInstReq) { - if (I.CurrentVer().Downloadable() == true) + if (I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) Cache.MarkKeep(I); else { // Is this right? Will dpkg choke on an upgrade? - if (Cache[I].CandidateVerIter(Cache).Downloadable() == true) + if (Cache[I].CandidateVer != 0 && + Cache[I].CandidateVerIter(Cache).Downloadable() == true) Cache.MarkInstall(I); else return _error->Error(_("The package %s needs to be reinstalled, " @@ -203,12 +252,13 @@ bool pkgApplyStatus(pkgDepCache &Cache) re-unpacked (probably) */ case pkgCache::State::UnPacked: case pkgCache::State::HalfConfigured: - if (I.CurrentVer().Downloadable() == true || + if ((I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) || I.State() != pkgCache::PkgIterator::NeedsUnpack) Cache.MarkKeep(I); else { - if (Cache[I].CandidateVerIter(Cache).Downloadable() == true) + if (Cache[I].CandidateVer != 0 && + Cache[I].CandidateVerIter(Cache).Downloadable() == true) Cache.MarkInstall(I); else Cache.MarkDelete(I); @@ -222,8 +272,8 @@ bool pkgApplyStatus(pkgDepCache &Cache) default: if (I->InstState != pkgCache::State::Ok) - return _error->Error(_("The package %s is not ok and I " - "don't know how to fix it!"),I.Name()); + return _error->Error("The package %s is not ok and I " + "don't know how to fix it!",I.Name()); } } return true; @@ -254,11 +304,18 @@ bool pkgFixBroken(pkgDepCache &Cache) Cache.MarkInstall(I,true); } - pkgProblemResolver Fix(Cache); + pkgProblemResolver Fix(&Cache); + + // CNC:2002-07-04 + _system->ProcessCache(Cache,Fix); + + // CNC:2002-08-08 + if (_config->FindB("APT::Remove-Depends",false) == true) + Fix.RemoveDepends(); + return Fix.Resolve(true); } /*}}}*/ - // DistUpgrade - Distribution upgrade /*{{{*/ // --------------------------------------------------------------------- /* This autoinstalls every package and then force installs every @@ -272,8 +329,29 @@ bool pkgDistUpgrade(pkgDepCache &Cache) /* Auto upgrade all installed packages, this provides the basis for the installation */ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) - if (I->CurrentVer != 0) - Cache.MarkInstall(I,true); + { + // CNC:2002-07-23 + if (I->CurrentVer != 0) + { + // Was it obsoleted? + bool Obsoleted = false; + for (pkgCache::DepIterator D = I.RevDependsList(); D.end() == false; D++) + { + if (D->Type == pkgCache::Dep::Obsoletes && + Cache[D.ParentPkg()].CandidateVer != 0 && + Cache[D.ParentPkg()].CandidateVerIter(Cache).Downloadable() == true && + (pkgCache::Version*)D.ParentVer() == Cache[D.ParentPkg()].CandidateVer && + Cache.VS().CheckDep(I.CurrentVer().VerStr(), D) == true) + { + Cache.MarkInstall(D.ParentPkg(),true); + Obsoleted = true; + break; + } + } + if (Obsoleted == false) + Cache.MarkInstall(I,true); + } + } /* Now, auto upgrade all essential packages - this ensures that the essential packages are present and working */ @@ -284,10 +362,34 @@ bool pkgDistUpgrade(pkgDepCache &Cache) /* We do it again over all previously installed packages to force conflict resolution on them all. */ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + { + // CNC:2002-07-23 if (I->CurrentVer != 0) - Cache.MarkInstall(I,false); + { + // Was it obsoleted? + bool Obsoleted = false; + for (pkgCache::DepIterator D = I.RevDependsList(); D.end() == false; D++) + { + if (D->Type == pkgCache::Dep::Obsoletes && + Cache[D.ParentPkg()].CandidateVer != 0 && + Cache[D.ParentPkg()].CandidateVerIter(Cache).Downloadable() == true && + (pkgCache::Version*)D.ParentVer() == Cache[D.ParentPkg()].CandidateVer && + Cache.VS().CheckDep(I.CurrentVer().VerStr(), D) == true) + { + Cache.MarkInstall(D.ParentPkg(),false); + Obsoleted = true; + break; + } + } + if (Obsoleted == false) + Cache.MarkInstall(I,false); + } + } - pkgProblemResolver Fix(Cache); + pkgProblemResolver Fix(&Cache); + + // CNC:2002-07-04 + _system->ProcessCache(Cache,Fix); // Hold back held packages. if (_config->FindB("APT::Ignore-Hold",false) == false) @@ -301,6 +403,10 @@ bool pkgDistUpgrade(pkgDepCache &Cache) } } } + + // CNC:2002-08-08 + if (_config->FindB("APT::Remove-Depends",false) == true) + Fix.RemoveDepends(); return Fix.Resolve(); } @@ -312,7 +418,7 @@ bool pkgDistUpgrade(pkgDepCache &Cache) to install packages not marked for install */ bool pkgAllUpgrade(pkgDepCache &Cache) { - pkgProblemResolver Fix(Cache); + pkgProblemResolver Fix(&Cache); if (Cache.BrokenCount() != 0) return false; @@ -323,15 +429,16 @@ bool pkgAllUpgrade(pkgDepCache &Cache) if (Cache[I].Install() == true) Fix.Protect(I); - if (_config->FindB("APT::Ignore-Hold",false) == false) { + if (_config->FindB("APT::Ignore-Hold",false) == false) if (I->SelectedState == pkgCache::State::Hold) - continue; - } + continue; - if (I->CurrentVer != 0 && Cache[I].InstallVer != 0) { + if (I->CurrentVer != 0 && Cache[I].InstallVer != 0) Cache.MarkInstall(I,false); - } } + + // CNC:2002-07-04 + _system->ProcessCache(Cache,Fix); return Fix.ResolveByKeep(); } @@ -346,7 +453,7 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) if (Cache.BrokenCount() != 0) return false; - // We loop indefinately to get the minimal set size. + // We loop for 10 tries to get the minimal set size. bool Change = false; unsigned int Count = 0; do @@ -374,7 +481,7 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) while (Change == true && Count < 10); if (Cache.BrokenCount() != 0) - return _error->Error(_("Internal Error in pkgMinimizeUpgrade")); + return _error->Error("Internal Error in pkgMinimizeUpgrade"); return true; } @@ -383,10 +490,10 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) // ProblemResolver::pkgProblemResolver - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgProblemResolver::pkgProblemResolver(pkgDepCache &Cache) : Cache(Cache) +pkgProblemResolver::pkgProblemResolver(pkgDepCache *pCache) : Cache(*pCache) { // Allocate memory - unsigned long Size = Cache.HeaderP->PackageCount; + unsigned long Size = Cache.Head().PackageCount; Scores = new signed short[Size]; Flags = new unsigned char[Size]; memset(Flags,0,sizeof(*Flags)*Size); @@ -395,6 +502,15 @@ pkgProblemResolver::pkgProblemResolver(pkgDepCache &Cache) : Cache(Cache) Debug = _config->FindB("Debug::pkgProblemResolver",false); } /*}}}*/ +// ProblemResolver::~pkgProblemResolver - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgProblemResolver::~pkgProblemResolver() +{ + delete [] Scores; + delete [] Flags; +} + /*}}}*/ // ProblemResolver::ScoreSort - Sort the list by score /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -414,7 +530,7 @@ int pkgProblemResolver::ScoreSort(const void *a,const void *b) /* */ void pkgProblemResolver::MakeScores() { - unsigned long Size = Cache.HeaderP->PackageCount; + unsigned long Size = Cache.Head().PackageCount; memset(Scores,0,sizeof(*Scores)*Size); // Generate the base scores for a package based on its properties @@ -458,7 +574,7 @@ void pkgProblemResolver::MakeScores() } // Copy the scores to advoid additive looping - signed short *OldScores = new signed short[Size]; + SPtrArray OldScores = new signed short[Size]; memcpy(OldScores,Scores,sizeof(*Scores)*Size); /* Now we cause 1 level of dependency inheritance, that is we add the @@ -501,9 +617,7 @@ void pkgProblemResolver::MakeScores() Scores[I->ID] += 10000; if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) Scores[I->ID] += 5000; - } - - delete [] OldScores; + } } /*}}}*/ // ProblemResolver::DoUpgrade - Attempt to upgrade this package /*{{{*/ @@ -514,6 +628,8 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) { if ((Flags[Pkg->ID] & Upgradable) == 0 || Cache[Pkg].Upgradable() == false) return false; + if ((Flags[Pkg->ID] & Protected) == Protected) + return false; Flags[Pkg->ID] &= ~Upgradable; @@ -581,9 +697,9 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) { /* We let the algorithm deal with conflicts on its next iteration, it is much smarter than us */ - if (Start->Type == pkgCache::Dep::Conflicts - || Start->Type == pkgCache::Dep::Obsoletes) - break; + if (Start->Type == pkgCache::Dep::Conflicts || + Start->Type == pkgCache::Dep::Obsoletes) + break; if (Debug == true) clog << " Reinst Failed early because of " << Start.TargetPkg().Name() << endl; @@ -630,8 +746,8 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) upgrade packages to advoid problems. */ bool pkgProblemResolver::Resolve(bool BrokenFix) { - unsigned long Size = Cache.HeaderP->PackageCount; - + unsigned long Size = Cache.Head().PackageCount; + // Record which packages are marked for install bool Again = false; do @@ -666,7 +782,7 @@ bool pkgProblemResolver::Resolve(bool 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. */ - pkgCache::Package **PList = new pkgCache::Package *[Size]; + SPtrArray PList = new pkgCache::Package *[Size]; pkgCache::Package **PEnd = PList; for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) *PEnd++ = I; @@ -684,7 +800,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Debug == true) clog << "Starting 2" << endl; - + /* Now consider all broken packages. For each broken package we either remove the package or fix it's problem. We do this once, it should not be possible for a loop to form (that is a < b < c and fixing b by @@ -728,13 +844,16 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Cache[I].InstallVer == 0 || Cache[I].InstBroken() == false) continue; + if (Debug == true) + cout << "Investigating " << I.Name() << endl; + // Isolate the problem dependency PackageKill KillList[100]; PackageKill *LEnd = KillList; bool InOr = false; pkgCache::DepIterator Start; pkgCache::DepIterator End; - PackageKill *OldEnd = 0; + PackageKill *OldEnd = LEnd; enum {OrRemove,OrKeep} OrOp = OrRemove; for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); @@ -749,36 +868,54 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (OldEnd == LEnd && OrOp == OrRemove) { if ((Flags[I->ID] & Protected) != Protected) + { + if (Debug == true) + clog << " Or group remove for " << I.Name() << endl; Cache.MarkDelete(I); + Change = true; + } } if (OldEnd == LEnd && OrOp == OrKeep) + { + if (Debug == true) + clog << " Or group keep for " << I.Name() << endl; Cache.MarkKeep(I); + Change = true; + } } + /* We do an extra loop (as above) to finalize the or group + processing */ + InOr = false; OrOp = OrRemove; D.GlobOr(Start,End); + if (Start.end() == true) + break; + + // We only worry about critical deps. + if (End.IsCritical() != true) + continue; + InOr = Start != End; OldEnd = LEnd; - } + } else Start++; - // We only worry about critical deps. - if (End.IsCritical() != true) - continue; - // Dep is ok if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) + { + InOr = false; continue; - + } + if (Debug == true) clog << "Package " << I.Name() << " has broken dep on " << Start.TargetPkg().Name() << endl; /* 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 cant be found */ - pkgCache::Version **VList = Start.AllTargets(); - + SPtrArray VList = Start.AllTargets(); if (*VList == 0 && (Flags[I->ID] & Protected) != Protected && Start->Type != pkgCache::Dep::Conflicts && Start->Type != pkgCache::Dep::Obsoletes && @@ -801,10 +938,13 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) { pkgCache::VerIterator Ver(Cache,*V); pkgCache::PkgIterator Pkg = Ver.ParentPkg(); - + if (Debug == true) clog << " Considering " << Pkg.Name() << ' ' << (int)Scores[Pkg->ID] << " as a solution to " << I.Name() << ' ' << (int)Scores[I->ID] << endl; + + /* Try to fix the package under consideration rather than + fiddle with the VList package */ if (Scores[I->ID] <= Scores[Pkg->ID] || ((Cache[Start] & pkgDepCache::DepNow) == 0 && End->Type != pkgCache::Dep::Conflicts && @@ -813,10 +953,10 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) // Try a little harder to fix protected packages.. if ((Flags[I->ID] & Protected) == Protected) { - if (DoUpgrade(Pkg) == true) { - Scores[Pkg->ID] = Scores[I->ID]; + if (Scores[Pkg->ID] > Scores[I->ID]) + Scores[Pkg->ID] = Scores[I->ID]; break; } @@ -841,23 +981,20 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) clog << " Holding Back " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; } else - { + { if (BrokenFix == false || DoUpgrade(I) == false) { // Consider other options if (InOr == false) { - pkgCache::Version **VV = V; - VV++; - if (*VV!=0) { - // Consider other options that might not be in a Or - continue; - } if (Debug == true) clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; Cache.MarkDelete(I); if (Counter > 1) - Scores[I->ID] = Scores[Pkg->ID]; + { + if (Scores[Pkg->ID] > Scores[I->ID]) + Scores[I->ID] = Scores[Pkg->ID]; + } } } } @@ -868,25 +1005,39 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) } else { + /* This is a conflicts, and the version we are looking + at is not the currently selected version of the + package, which means it is not necessary to + remove/keep */ + if (Cache[Pkg].InstallVer != Ver && + (Start->Type == pkgCache::Dep::Conflicts || + Start->Type == pkgCache::Dep::Obsoletes)) + continue; + // Skip adding to the kill list if it is protected if ((Flags[Pkg->ID] & Protected) != 0) continue; + + if (Debug == true) + clog << " Added " << Pkg.Name() << " to the remove list" << endl; - if (*(V+1) != 0)//xxx look for other solutions? + // CNC:2002-07-09 + if (*(V+1) != 0) //XXX Look for other solutions? continue; LEnd->Pkg = Pkg; LEnd->Dep = End; LEnd++; - if (Start->Type != pkgCache::Dep::Conflicts - || Start->Type != pkgCache::Dep::Obsoletes) + if (Start->Type != pkgCache::Dep::Conflicts && + Start->Type != pkgCache::Dep::Obsoletes) break; } } // Hm, nothing can possibly satisify this dep. Nuke it. - if (VList[0] == 0 && Start->Type != pkgCache::Dep::Conflicts && + if (VList[0] == 0 && + Start->Type != pkgCache::Dep::Conflicts && Start->Type != pkgCache::Dep::Obsoletes && (Flags[I->ID] & Protected) != Protected) { @@ -917,8 +1068,6 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) Done = true; } - delete [] VList; - // Try some more if (InOr == true) continue; @@ -935,29 +1084,26 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) Change = true; if ((Cache[J->Dep] & pkgDepCache::DepGNow) == 0) { - if (J->Dep->Type == pkgCache::Dep::Conflicts - || J->Dep->Type == pkgCache::Dep::Obsoletes) + if (J->Dep->Type == pkgCache::Dep::Conflicts || + J->Dep->Type == pkgCache::Dep::Obsoletes) { if (Debug == true) clog << " Fixing " << I.Name() << " via remove of " << J->Pkg.Name() << endl; - Cache.MarkDelete(J->Pkg, J->Dep->Type == pkgCache::Dep::Obsoletes); + Cache.MarkDelete(J->Pkg); } } else { - if (Cache[J->Pkg].Install()) { - if (Debug == true) - clog << " Fixing " << I.Name() << " via keep of " << J->Pkg.Name() << endl; - Cache.MarkKeep(J->Pkg); - } else { - if (Debug == true) - clog << " Fixing " << I.Name() << " via install of " << J->Pkg.Name() << endl; - Cache.MarkInstall(J->Pkg, true); - } + if (Debug == true) + clog << " Fixing " << I.Name() << " via keep of " << J->Pkg.Name() << endl; + Cache.MarkKeep(J->Pkg); } - + if (Counter > 1) - Scores[J->Pkg->ID] = Scores[I->ID]; + { + if (Scores[I->ID] > Scores[J->Pkg->ID]) + Scores[J->Pkg->ID] = Scores[I->ID]; + } } } } @@ -965,10 +1111,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Debug == true) clog << "Done" << endl; - - delete [] Scores; - delete [] PList; - + if (Cache.BrokenCount() != 0) { // See if this is the result of a hold @@ -993,7 +1136,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) system was non-broken previously. */ bool pkgProblemResolver::ResolveByKeep() { - unsigned long Size = Cache.HeaderP->PackageCount; + unsigned long Size = Cache.Head().PackageCount; if (Debug == true) clog << "Entering ResolveByKeep" << endl; @@ -1021,7 +1164,7 @@ bool pkgProblemResolver::ResolveByKeep() continue; /* Keep the package. If this works then great, otherwise we have - to be significantly more agressive and manipulate its dependencies */ + to be significantly more agressive and manipulate its dependencies */ if ((Flags[I->ID] & Protected) == 0) { if (Debug == true) @@ -1029,7 +1172,7 @@ bool pkgProblemResolver::ResolveByKeep() Cache.MarkKeep(I); if (Cache[I].InstBroken() == false) { - K = PList; + K = PList - 1; continue; } } @@ -1037,18 +1180,10 @@ bool pkgProblemResolver::ResolveByKeep() // Isolate the problem dependencies for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false;) { - // Compute a single dependency element (glob or) - pkgCache::DepIterator Start = D; - pkgCache::DepIterator End = D; - unsigned char State = 0; - for (bool LastOR = true; D.end() == false && LastOR == true; D++) - { - State |= Cache[D]; - LastOR = (D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; - if (LastOR == true) - End = D; - } - + DepIterator Start; + DepIterator End; + D.GlobOr(Start,End); + // We only worry about critical deps. if (End.IsCritical() != true) continue; @@ -1056,42 +1191,48 @@ bool pkgProblemResolver::ResolveByKeep() // Dep is ok if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) continue; - - // Hm, the group is broken.. I have no idea how to handle this - if (Start != End) + + /* Hm, the group is broken.. I suppose the best thing to do is to + is to try every combination of keep/not-keep for the set, but thats + slow, and this never happens, just be conservative and assume the + list of ors is in preference and keep till it starts to work. */ + while (true) { - clog << _("Note, a broken package or group was found in ") << I.Name() << "." << endl; - if ((Flags[I->ID] & Protected) == 0) - Cache.MarkKeep(I); - break; - } - - if (Debug == true) - clog << "Package " << I.Name() << " has broken dep on " << End.TargetPkg().Name() << endl; - - // Look at all the possible provides on this package - pkgCache::Version **VList = End.AllTargets(); - for (pkgCache::Version **V = VList; *V != 0; V++) - { - pkgCache::VerIterator Ver(Cache,*V); - pkgCache::PkgIterator Pkg = Ver.ParentPkg(); + if (Debug == true) + clog << "Package " << I.Name() << " has broken dep on " << Start.TargetPkg().Name() << endl; - // It is not keepable - if (Cache[Pkg].InstallVer == 0 || - Pkg->CurrentVer == 0) - continue; - - if ((Flags[I->ID] & Protected) == 0) + // Look at all the possible provides on this package + SPtrArray VList = Start.AllTargets(); + for (pkgCache::Version **V = VList; *V != 0; V++) { - if (Debug == true) - clog << " Keeping Package " << Pkg.Name() << " due to dep" << endl; - Cache.MarkKeep(Pkg); + pkgCache::VerIterator Ver(Cache,*V); + pkgCache::PkgIterator Pkg = Ver.ParentPkg(); + + // It is not keepable + if (Cache[Pkg].InstallVer == 0 || + Pkg->CurrentVer == 0) + continue; + + // CNC:2002-08-05 + if ((Flags[Pkg->ID] & Protected) == 0) + { + if (Debug == true) + clog << " Keeping Package " << Pkg.Name() << " due to dep" << endl; + Cache.MarkKeep(Pkg); + } + + if (Cache[I].InstBroken() == false) + break; } if (Cache[I].InstBroken() == false) break; - } + if (Start == End) + break; + Start++; + } + if (Cache[I].InstBroken() == false) break; } @@ -1103,11 +1244,12 @@ bool pkgProblemResolver::ResolveByKeep() if (K == LastStop) return _error->Error("Internal Error, pkgProblemResolver::ResolveByKeep is looping on package %s.",I.Name()); LastStop = K; - K = PList; + K = PList - 1; } return true; -} /*}}}*/ +} + /*}}}*/ // ProblemResolver::InstallProtect - Install all protected packages /*{{{*/ // --------------------------------------------------------------------- /* This is used to make sure protected packages are installed */ @@ -1125,53 +1267,143 @@ void pkgProblemResolver::InstallProtect() } } /*}}}*/ -#if 0 +// CNC:2002-08-01 +// ProblemSolver::RemoveDepends - Remove dependencies selectively /*{{{*/ +// --------------------------------------------------------------------- +// This will remove every dependency which is required only by packages +// already being removed. This will allow one to reverse the effect a +// task package, for example. +bool pkgProblemResolver::RemoveDepends() +{ + bool Debug = _config->FindB("Debug::pkgRemoveDepends",false); + bool MoreSteps = true; + while (MoreSteps == true) + { + MoreSteps = false; + for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); + Pkg.end() == false; Pkg++) + { + if (Cache[Pkg].Delete() == false) + continue; + for (pkgCache::DepIterator D = Pkg.CurrentVer().DependsList(); + D.end() == false; D++) + { + if (D->Type != pkgCache::Dep::Depends && + D->Type != pkgCache::Dep::PreDepends) + continue; + + pkgCache::PkgIterator DPkg = D.TargetPkg(); + if (DPkg->CurrentVer == 0 || Cache[DPkg].Delete() == true) + continue; + if ((Flags[DPkg->ID] & Protected) == Protected) + continue; + + bool Remove = true; -class pkgMyUpgrader { - pkgCache::Package *packL; - - void topoSort(); - - public: - pkgMyUpgrader(pkgDepCache &Cache); - ~pkgMyUpgrader(); -}; + // Check if another package not being removed or being + // installed requires this dependency. + for (pkgCache::DepIterator R = DPkg.RevDependsList(); + R.end() == false; R++) + { + pkgCache::PkgIterator RPkg = R.ParentPkg(); + if (R->Type != pkgCache::Dep::Depends && + R->Type != pkgCache::Dep::PreDepends) + continue; -pkgMyUpgrader::pkgMyUpgrader(pkgDepCache &Cache) -{ - unsigned long size = Cache.HeaderP->PackageCount; - int i; + if ((Cache[RPkg].Install() && + (pkgCache::Version*)R.ParentVer() == Cache[RPkg].InstallVer && + Cache.VS().CheckDep(DPkg.CurrentVer().VerStr(), R) == true) || + (RPkg->CurrentVer != 0 && + Cache[RPkg].Install() == false && + Cache[RPkg].Delete() == false && + Cache.VS().CheckDep(DPkg.CurrentVer().VerStr(), R) == true)) + { + Remove = false; + break; + } + } - packL = new PackInfo[size]; - - // topologically sort the packages, so that if A depends on B, - // then index of B is < index of A - topoSort(); + if (Remove == false) + continue; + + // Also check every virtual package provided by this + // dependency is required by packages not being removed, + // or being installed. + for (pkgCache::PrvIterator P = DPkg.CurrentVer().ProvidesList(); + P.end() == false; P++) + { + pkgCache::PkgIterator PPkg = P.ParentPkg(); + for (pkgCache::DepIterator R = PPkg.RevDependsList(); + R.end() == false; R++) + { + pkgCache::PkgIterator RPkg = R.ParentPkg(); + + if (R->Type != pkgCache::Dep::Depends && + R->Type != pkgCache::Dep::PreDepends) + continue; + + if ((Cache[RPkg].Install() && + (pkgCache::Version*)R.ParentVer() == Cache[RPkg].InstallVer && + Cache.VS().CheckDep(P.ProvideVersion(), R) == true) || + (RPkg->CurrentVer != 0 && + Cache[RPkg].Install() == false && + Cache[RPkg].Delete() == false && + Cache.VS().CheckDep(P.ProvideVersion(), R) == true)) + { + Remove = false; + break; + } + } + } + + if (Remove == false) + continue; + + if (Debug == true) + clog << "Marking " << DPkg.Name() << " as a removable dependency of " << Pkg.Name() << endl; + + Cache.MarkDelete(DPkg); + + // Do at least one more step, to ensure that packages which + // were being hold because of this one also get removed. + MoreSteps = true; + } + } + } + return true; } + /*}}}*/ - - -pkgMyUpgrader::~pkgMyUpgrader() +// PrioSortList - Sort a list of versions by priority /*{{{*/ +// --------------------------------------------------------------------- +/* This is ment to be used in conjunction with AllTargets to get a list + of versions ordered by preference. */ +static pkgCache *PrioCache; +static int PrioComp(const void *A,const void *B) { - free(packL); + pkgCache::VerIterator L(*PrioCache,*(pkgCache::Version **)A); + pkgCache::VerIterator R(*PrioCache,*(pkgCache::Version **)B); + + // CNC:2002-11-27 + if ((R.ParentPkg()->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential && + (L.ParentPkg()->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential) + return 1; + if ((R.ParentPkg()->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential && + (L.ParentPkg()->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) + return -1; + + if (L->Priority != R->Priority) + return R->Priority - L->Priority; + return strcmp(L.ParentPkg().Name(),R.ParentPkg().Name()); } - - - -void pkgMyUpgrader::topoSort() +void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List) { - char *colours = new char[Size]; - - - - - - delete [] colours; + unsigned long Count = 0; + PrioCache = &Cache; + for (pkgCache::Version **I = List; *I != 0; I++) + Count++; + qsort(List,Count,sizeof(*List),PrioComp); } - - - - - -#endif + /*}}}*/ +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/algorithms.h b/apt/apt-pkg/algorithms.h index 1ba31a1..1b510e2 100644 --- a/apt/apt-pkg/algorithms.h +++ b/apt/apt-pkg/algorithms.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: algorithms.h,v 1.4 2003/01/29 13:04:48 niemeyer Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -27,7 +27,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_ALGORITHMS_H #define PKGLIB_ALGORITHMS_H @@ -38,12 +37,31 @@ #include #include +#include + +using std::ostream; + +#ifndef SWIG class pkgSimulate : public pkgPackageManager { protected: + class Policy : public pkgDepCache::Policy + { + pkgDepCache *Cache; + public: + + virtual VerIterator GetCandidateVer(PkgIterator Pkg) + { + return (*Cache)[Pkg].CandidateVerIter(*Cache); + } + + Policy(pkgDepCache *Cache) : Cache(Cache) {}; + }; + unsigned char *Flags; + Policy iPolicy; pkgDepCache Sim; // The Actuall installation implementation @@ -51,11 +69,13 @@ class pkgSimulate : public pkgPackageManager virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge); void ShortBreaks(); + void Describe(PkgIterator iPkg,ostream &out,bool Now); public: - pkgSimulate(pkgDepCache &Cache); + pkgSimulate(pkgDepCache *Cache); }; +#endif class pkgProblemResolver { @@ -100,8 +120,11 @@ class pkgProblemResolver bool ResolveByKeep(); void InstallProtect(); + + bool RemoveDepends(); // CNC:2002-08-01 - pkgProblemResolver(pkgDepCache &Cache); + pkgProblemResolver(pkgDepCache *Cache); + ~pkgProblemResolver(); }; bool pkgDistUpgrade(pkgDepCache &Cache); @@ -110,4 +133,6 @@ bool pkgFixBroken(pkgDepCache &Cache); bool pkgAllUpgrade(pkgDepCache &Cache); bool pkgMinimizeUpgrade(pkgDepCache &Cache); +void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List); + #endif diff --git a/apt/apt-pkg/cachefile.cc b/apt/apt-pkg/cachefile.cc index af8831b..217c503 100644 --- a/apt/apt-pkg/cachefile.cc +++ b/apt/apt-pkg/cachefile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cachefile.cc,v 1.8 2001/07/12 21:47:32 kojima Exp $ +// $Id: cachefile.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### CacheFile - Simple wrapper class for opening, generating and whatnot @@ -16,65 +16,52 @@ #pragma implementation "apt-pkg/cachefile.h" #endif - #include #include #include #include #include -#include - -#include - +#include +#include + +#include /*}}}*/ // CacheFile::CacheFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgCacheFile::pkgCacheFile() : Map(0), Cache(0), -#if 0//akk -Lock(0), -#endif -RPM(0) +pkgCacheFile::pkgCacheFile() : Map(0), Cache(0), DCache(0), Policy(0) { } /*}}}*/ -// CacheFile::~CacheFile - Destructor /*{{{*/ +// CacheFile::~CacheFile - Destructor /*{{{*/ // --------------------------------------------------------------------- /* */ pkgCacheFile::~pkgCacheFile() { + delete DCache; + delete Policy; delete Cache; delete Map; -#if 0//akk - if (Lock) - delete Lock; -#endif - if (RPM) - delete RPM; + _system->UnLock(true); } /*}}}*/ -// CacheFile::Open - Open the cache files, creating if necessary /*{{{*/ +// CacheFile::BuildCaches - Open and build the cache files /*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) +bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock) { - if (WithLock == true) - { -#if 0 //akk - if (0)//akk - { - Lock = new pkgDpkgLock; - } else - { - - } -#endif - } - if (1) { - RPM = new pkgRpmLock(WithLock); - } + if (WithLock == true) + if (_system->Lock() == false) + return false; + + // CNC:2002-07-06 + if (WithLock == false) + _system->LockRead(); + if (_config->FindB("Debug::NoLocking",false) == true) + WithLock = false; + if (_error->PendingError() == true) return false; @@ -82,38 +69,44 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) pkgSourceList List; if (List.ReadMainList() == false) return _error->Error(_("The list of sources could not be read.")); - - /* Build all of the caches, using the cache files if we are locking - (ie as root) */ - if (WithLock == true) - { - _system->makeStatusCache(List, Progress); - Progress.Done(); - if (_error->PendingError() == true) - return _error->Error(_("The package lists or status file could not be parsed or opened.")); - if (_error->empty() == false) - _error->Warning(_("You may want to run apt-get update to correct these missing files")); - - // Open the cache file - FileFd File(_config->FindFile("Dir::Cache::pkgcache"),FileFd::ReadOnly); - if (_error->PendingError() == true) - return false; - - Map = new MMap(File,MMap::Public | MMap::ReadOnly); - if (_error->PendingError() == true) - return false; - } - else - { - Map = _system->makeStatusCacheMem(List,Progress); - Progress.Done(); - if (Map == 0) - return false; - } + // Read the caches + bool Res = pkgMakeStatusCache(List,Progress,&Map,!WithLock); + Progress.Done(); + if (Res == false) + return _error->Error(_("The package lists or status file could not be parsed or opened.")); + + /* This sux, remove it someday */ + if (_error->empty() == false) + _error->Warning(_("You may want to run apt-get update to correct these problems")); + + Cache = new pkgCache(Map); + if (_error->PendingError() == true) + return false; + return true; +} + /*}}}*/ +// CacheFile::Open - Open the cache files, creating if necessary /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) +{ + if (BuildCaches(Progress,WithLock) == false) + return false; + + // The policy engine + Policy = new pkgPolicy(Cache); + if (_error->PendingError() == true) + return false; + if (ReadPinFile(*Policy) == false) + return false; // Create the dependency cache - Cache = new pkgDepCache(*Map,Progress); + DCache = new pkgDepCache(Cache,Policy); + if (_error->PendingError() == true) + return false; + + DCache->Init(&Progress); Progress.Done(); if (_error->PendingError() == true) return false; @@ -121,3 +114,21 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) return true; } /*}}}*/ + +// CacheFile::Close - close the cache files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void pkgCacheFile::Close() +{ + delete DCache; + delete Policy; + delete Cache; + delete Map; + _system->UnLock(true); + + Map = 0; + DCache = 0; + Policy = 0; + Cache = 0; +} + /*}}}*/ diff --git a/apt/apt-pkg/cachefile.h b/apt/apt-pkg/cachefile.h index 158f5b3..d8f2088 100644 --- a/apt/apt-pkg/cachefile.h +++ b/apt/apt-pkg/cachefile.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cachefile.h,v 1.4 2001/07/12 21:47:32 kojima Exp $ +// $Id: cachefile.h,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### CacheFile - Simple wrapper class for opening, generating and whatnot @@ -9,6 +9,9 @@ of caches. It can operate as root, as not root, show progress and so on, it transparently handles everything necessary. + This means it can rebuild caches from the source list and instantiates + and prepares the standard policy mechanism. + ##################################################################### */ /*}}}*/ #ifndef PKGLIB_CACHEFILE_H @@ -18,43 +21,34 @@ #pragma interface "apt-pkg/cachefile.h" #endif - #include -#include -#include +class pkgPolicy; class pkgCacheFile { protected: MMap *Map; - pkgDepCache *Cache; -#if 0//akk - pkgDpkgLock *Lock; -#endif - pkgRpmLock *RPM; + pkgCache *Cache; + pkgDepCache *DCache; public: + + pkgPolicy *Policy; // We look pretty much exactly like a pointer to a dep cache - inline operator pkgDepCache &() {return *Cache;}; - inline operator pkgDepCache *() {return Cache;}; - inline pkgDepCache *operator ->() {return Cache;}; - inline pkgDepCache &operator *() {return *Cache;}; - inline pkgDepCache::StateCache &operator [](pkgCache::PkgIterator const &I) {return (*Cache)[I];}; - inline unsigned char &operator [](pkgCache::DepIterator const &I) {return (*Cache)[I];}; + inline operator pkgCache &() {return *Cache;}; + inline operator pkgCache *() {return Cache;}; + inline operator pkgDepCache &() {return *DCache;}; + inline operator pkgDepCache *() {return DCache;}; + 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];}; - // Release the dpkg status lock - inline void ReleaseLock() { -#if 0//akk - if (0) - Lock->Close(); - else -#endif - RPM->Close(); - };//akk - + bool BuildCaches(OpProgress &Progress,bool WithLock = true); bool Open(OpProgress &Progress,bool WithLock = true); + void Close(); pkgCacheFile(); ~pkgCacheFile(); diff --git a/apt/apt-pkg/cacheiterators.h b/apt/apt-pkg/cacheiterators.h index bb0ae84..e9c3ac6 100644 --- a/apt/apt-pkg/cacheiterators.h +++ b/apt/apt-pkg/cacheiterators.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cacheiterators.h,v 1.2 2000/09/20 15:20:06 kojima Exp $ +// $Id: cacheiterators.h,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Cache Iterators - Iterators for navigating the cache structure @@ -28,7 +28,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_CACHEITERATORS_H #define PKGLIB_CACHEITERATORS_H @@ -39,10 +38,20 @@ // Package Iterator class pkgCache::PkgIterator { + friend class pkgCache; Package *Pkg; pkgCache *Owner; long HashIndex; + protected: + + // This constructor is the 'begin' constructor, never use it. + inline PkgIterator(pkgCache &Owner) : Owner(&Owner), HashIndex(-1) + { + Pkg = Owner.PkgP; + operator ++(0); + }; + public: enum OkState {NeedsNothing,NeedsUnpack,NeedsConfigure}; @@ -62,10 +71,10 @@ class pkgCache::PkgIterator inline Package const &operator *() const {return *Pkg;}; inline operator Package *() {return Pkg == Owner->PkgP?0:Pkg;}; inline operator Package const *() const {return Pkg == Owner->PkgP?0:Pkg;}; + inline pkgCache *Cache() {return Owner;}; inline const char *Name() const {return Pkg->Name == 0?0:Owner->StrP + Pkg->Name;}; inline const char *Section() const {return Pkg->Section == 0?0:Owner->StrP + Pkg->Section;}; - inline const char *TargetDist() const {return Pkg->TargetDist == 0?0:Owner->StrP + Pkg->TargetDist;}; inline bool Purge() const {return Pkg->CurrentState == pkgCache::State::Purge || (Pkg->CurrentVer == 0 && Pkg->CurrentState == pkgCache::State::NotInstalled);}; inline VerIterator VersionList() const; @@ -77,11 +86,6 @@ class pkgCache::PkgIterator OkState State() const; // Constructors - inline PkgIterator(pkgCache &Owner) : Owner(&Owner), HashIndex(-1) - { - Pkg = Owner.PkgP; - operator ++(0); - }; inline PkgIterator(pkgCache &Owner,Package *Trg) : Pkg(Trg), Owner(&Owner), HashIndex(0) { @@ -119,7 +123,8 @@ class pkgCache::VerIterator inline Version const &operator *() const {return *Ver;}; inline operator Version *() {return Ver == Owner->VerP?0:Ver;}; inline operator Version const *() const {return Ver == Owner->VerP?0:Ver;}; - + inline pkgCache *Cache() {return Owner;}; + inline const char *VerStr() const {return Ver->VerStr == 0?0:Owner->StrP + Ver->VerStr;}; inline const char *Section() const {return Ver->Section == 0?0:Owner->StrP + Ver->Section;}; inline const char *Arch() const {return Ver->Arch == 0?0:Owner->StrP + Ver->Arch;}; @@ -129,8 +134,9 @@ class pkgCache::VerIterator inline VerFileIterator FileList() const; inline unsigned long Index() const {return Ver - Owner->VerP;}; bool Downloadable() const; - const char *PriorityType(); - + inline const char *PriorityType() {return Owner->Priority(Ver->Priority);}; + string RelStr(); + bool Automatic() const; VerFileIterator NewestFile() const; @@ -171,10 +177,11 @@ class pkgCache::DepIterator inline Dependency const &operator *() const {return *Dep;}; inline operator Dependency *() {return Dep == Owner->DepP?0:Dep;}; inline operator Dependency const *() const {return Dep == Owner->DepP?0:Dep;}; + inline pkgCache *Cache() {return Owner;}; inline const char *TargetVer() const {return Dep->Version == 0?0:Owner->StrP + Dep->Version;}; inline PkgIterator TargetPkg() {return PkgIterator(*Owner,Owner->PkgP + Dep->Package);}; - inline PkgIterator SmartTargetPkg() {PkgIterator R(*Owner);SmartTargetPkg(R);return R;}; + inline PkgIterator SmartTargetPkg() {PkgIterator R(*Owner,0);SmartTargetPkg(R);return R;}; inline VerIterator ParentVer() {return VerIterator(*Owner,Owner->VerP + Dep->ParentVer);}; inline PkgIterator ParentPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Dep->ParentVer].ParentPkg);}; inline bool Reverse() {return Type == DepRev;}; @@ -183,8 +190,8 @@ class pkgCache::DepIterator void GlobOr(DepIterator &Start,DepIterator &End); Version **AllTargets(); bool SmartTargetPkg(PkgIterator &Result); - const char *CompType(); - const char *DepType(); + inline const char *CompType() {return Owner->CompType(Dep->CompareOp);}; + inline const char *DepType() {return Owner->DepType(Dep->Type);}; inline DepIterator(pkgCache &Owner,Dependency *Trg,Version * = 0) : Dep(Trg), Type(DepVer), Owner(&Owner) @@ -229,6 +236,7 @@ class pkgCache::PrvIterator inline Provides const &operator *() const {return *Prv;}; inline operator Provides *() {return Prv == Owner->ProvideP?0:Prv;}; inline operator Provides const *() const {return Prv == Owner->ProvideP?0:Prv;}; + inline pkgCache *Cache() {return Owner;}; inline const char *Name() const {return Owner->StrP + Owner->PkgP[Prv->ParentPkg].Name;}; inline const char *ProvideVersion() const {return Prv->ProvideVersion == 0?0:Owner->StrP + Prv->ProvideVersion;}; @@ -274,6 +282,7 @@ class pkgCache::PkgFileIterator inline PackageFile const &operator *() const {return *File;}; inline operator PackageFile *() {return File == Owner->PkgFileP?0:File;}; inline operator PackageFile const *() const {return File == Owner->PkgFileP?0:File;}; + inline pkgCache *Cache() {return Owner;}; inline const char *FileName() const {return File->FileName == 0?0:Owner->StrP + File->FileName;}; inline const char *Archive() const {return File->Archive == 0?0:Owner->StrP + File->Archive;}; @@ -281,14 +290,18 @@ class pkgCache::PkgFileIterator inline const char *Version() const {return File->Version == 0?0:Owner->StrP + File->Version;}; inline const char *Origin() const {return File->Origin == 0?0:Owner->StrP + File->Origin;}; inline const char *Label() const {return File->Origin == 0?0:Owner->StrP + File->Label;}; - inline const char *Architecture() const {return File->Origin == 0?0:Owner->StrP + File->Architecture;}; + inline const char *Site() const {return File->Site == 0?0:Owner->StrP + File->Site;}; + inline const char *Architecture() const {return File->Architecture == 0?0:Owner->StrP + File->Architecture;}; + inline const char *IndexType() const {return File->IndexType == 0?0:Owner->StrP + File->IndexType;}; inline unsigned long Index() const {return File - Owner->PkgFileP;}; bool IsOk(); + string RelStr(); // Constructors - inline PkgFileIterator(pkgCache &Owner) : Owner(&Owner), File(Owner.PkgFileP + Owner.Head().FileList) {}; + inline PkgFileIterator() : Owner(0), File(0) {}; + inline PkgFileIterator(pkgCache &Owner) : Owner(&Owner), File(Owner.PkgFileP) {}; inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Owner(&Owner), File(Trg) {}; }; @@ -315,35 +328,28 @@ class pkgCache::VerFileIterator inline VerFile const &operator *() const {return *FileP;}; inline operator VerFile *() {return FileP == Owner->VerFileP?0:FileP;}; inline operator VerFile const *() const {return FileP == Owner->VerFileP?0:FileP;}; + inline pkgCache *Cache() {return Owner;}; inline PkgFileIterator File() const {return PkgFileIterator(*Owner,FileP->File + Owner->PkgFileP);}; inline unsigned long Index() const {return FileP - Owner->VerFileP;}; + inline VerFileIterator() : Owner(0), FileP(0) {}; inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Owner(&Owner), FileP(Trg) {}; }; // Inlined Begin functions cant be in the class because of order problems inline pkgCache::VerIterator pkgCache::PkgIterator::VersionList() const {return VerIterator(*Owner,Owner->VerP + Pkg->VersionList);}; - inline pkgCache::VerIterator pkgCache::PkgIterator::CurrentVer() const {return VerIterator(*Owner,Owner->VerP + Pkg->CurrentVer);}; - -inline pkgCache::VerIterator pkgCache::PkgIterator::TargetVer() const - {return VerIterator(*Owner,Owner->VerP + Pkg->TargetVer);}; - inline pkgCache::DepIterator pkgCache::PkgIterator::RevDependsList() const {return DepIterator(*Owner,Owner->DepP + Pkg->RevDepends,Pkg);}; - inline pkgCache::PrvIterator pkgCache::PkgIterator::ProvidesList() const {return PrvIterator(*Owner,Owner->ProvideP + Pkg->ProvidesList,Pkg);}; - inline pkgCache::PrvIterator pkgCache::VerIterator::ProvidesList() const {return PrvIterator(*Owner,Owner->ProvideP + Ver->ProvidesList,Ver);}; - inline pkgCache::DepIterator pkgCache::VerIterator::DependsList() const {return DepIterator(*Owner,Owner->DepP + Ver->DependsList,Ver);}; - inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const {return VerFileIterator(*Owner,Owner->VerFileP + Ver->FileList);}; diff --git a/apt/apt-pkg/clean.cc b/apt/apt-pkg/clean.cc index 2950810..8faf3b0 100644 --- a/apt/apt-pkg/clean.cc +++ b/apt/apt-pkg/clean.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: clean.cc,v 1.2 2001/01/11 02:03:26 kojima Exp $ +// $Id: clean.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Clean - Clean out downloaded directories @@ -17,12 +17,11 @@ #include #include +#include + #include #include #include - -#include - /*}}}*/ // ArchiveCleaner::Go - Perform smart cleanup of the archive /*{{{*/ @@ -32,16 +31,17 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) { bool CleanInstalled = _config->FindB("APT::Clean-Installed",true); - - DIR *D = opendir(Dir.c_str()); + string MyArch = _config->Find("APT::Architecture"); + + DIR *D = opendir(Dir.c_str()); if (D == 0) return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); - + string StartDir = SafeGetCWD(); if (chdir(Dir.c_str()) != 0) { closedir(D); - return _error->Errno("chdir",_("Unable to change to "),Dir.c_str()); + return _error->Errno("chdir",_("Unable to change to %s"),Dir.c_str()); } for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D)) @@ -55,8 +55,12 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) struct stat St; if (stat(Dir->d_name,&St) != 0) + { + chdir(StartDir.c_str()); + closedir(D); return _error->Errno("stat",_("Unable to stat %s."),Dir->d_name); - + } + // Grab the package name const char *I = Dir->d_name; for (; *I != 0 && *I != '_';I++); @@ -77,7 +81,10 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) if (*I != '.') continue; string Arch = DeQuoteString(string(Start,I-Start)); - + + if (Arch != "all" && Arch != MyArch) + continue; + // Lookup the package pkgCache::PkgIterator P = Cache.FindPkg(Pkg); if (P.end() != true) diff --git a/apt/apt-pkg/clean.h b/apt/apt-pkg/clean.h index 807349a..3aa8194 100644 --- a/apt/apt-pkg/clean.h +++ b/apt/apt-pkg/clean.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: clean.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: clean.h,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Clean - Clean out downloaded directories diff --git a/apt/apt-pkg/cnc/CVS/Entries b/apt/apt-pkg/cnc/CVS/Entries deleted file mode 100644 index 1784810..0000000 --- a/apt/apt-pkg/cnc/CVS/Entries +++ /dev/null @@ -1 +0,0 @@ -D diff --git a/apt/apt-pkg/cnc/CVS/Repository b/apt/apt-pkg/cnc/CVS/Repository deleted file mode 100644 index 95f956e..0000000 --- a/apt/apt-pkg/cnc/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/apt-pkg/cnc diff --git a/apt/apt-pkg/cnc/CVS/Root b/apt/apt-pkg/cnc/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/apt-pkg/cnc/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/apt-pkg/contrib/CVS/Entries b/apt/apt-pkg/contrib/CVS/Entries deleted file mode 100644 index 845f523..0000000 --- a/apt/apt-pkg/contrib/CVS/Entries +++ /dev/null @@ -1,24 +0,0 @@ -/cdromutl.cc/1.1.1.1/Fri Aug 10 14:00:24 2001// -/cdromutl.h/1.1.1.1/Fri Aug 10 14:00:24 2001// -/cmndline.cc/1.1.1.1/Fri Aug 10 14:00:24 2001// -/cmndline.h/1.1.1.1/Fri Aug 10 14:00:28 2001// -/configuration.cc/1.2/Fri Aug 10 14:00:30 2001// -/configuration.h/1.2/Fri Aug 10 14:00:30 2001// -/crc-16.cc/1.1.1.1/Fri Aug 10 14:00:30 2001// -/crc-16.h/1.1.1.1/Fri Aug 10 14:00:30 2001// -/error.h/1.1.1.1/Fri Aug 10 14:00:30 2001// -/fileutl.cc/1.3/Fri Aug 10 14:00:30 2001// -/fileutl.h/1.2/Fri Aug 10 14:00:30 2001// -/md5.cc/1.1.1.1/Fri Aug 10 14:00:32 2001// -/md5.h/1.1.1.1/Fri Aug 10 14:00:32 2001// -/mmap.cc/1.1.1.1/Fri Aug 10 14:00:32 2001// -/mmap.h/1.1.1.1/Fri Aug 10 14:00:32 2001// -/progress.h/1.1.1.1/Fri Aug 10 14:00:32 2001// -/sptr.h/1.1/Fri Aug 10 14:00:34 2001// -/strutl.cc/1.3/Fri Aug 10 14:00:34 2001// -/strutl.h/1.3/Fri Aug 10 14:00:34 2001// -/system.h/1.1.1.1/Fri Aug 10 14:00:34 2001// -/error.cc/1.4/Tue Nov 13 14:24:16 2001// -/i18n.h/1.2/Fri Nov 16 01:13:06 2001// -/progress.cc/1.3/Fri Nov 16 01:13:06 2001// -D diff --git a/apt/apt-pkg/contrib/CVS/Repository b/apt/apt-pkg/contrib/CVS/Repository deleted file mode 100644 index 7939259..0000000 --- a/apt/apt-pkg/contrib/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/apt-pkg/contrib diff --git a/apt/apt-pkg/contrib/CVS/Root b/apt/apt-pkg/contrib/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/apt-pkg/contrib/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/apt-pkg/contrib/cdromutl.cc b/apt/apt-pkg/contrib/cdromutl.cc index 3ba7b13..513507a 100644 --- a/apt/apt-pkg/contrib/cdromutl.cc +++ b/apt/apt-pkg/contrib/cdromutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cdromutl.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: cdromutl.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### CDROM Utilities - Some functions to manipulate CDROM mounts. @@ -19,6 +19,8 @@ #include #include +#include + #include #include #include @@ -50,7 +52,7 @@ bool IsMounted(string &Path) struct stat Buf,Buf2; if (stat(Path.c_str(),&Buf) != 0 || stat((Path + "../").c_str(),&Buf2) != 0) - return _error->Errno("stat","Unable to stat the mount point %s",Path.c_str()); + return _error->Errno("stat",_("Unable to stat the mount point %s"),Path.c_str()); if (Buf.st_dev == Buf2.st_dev) return false; @@ -93,7 +95,7 @@ bool UnmountCdrom(string Path) } // Wait for mount - return ExecWait(Child,"mount",true); + return ExecWait(Child,"umount",true); } /*}}}*/ // MountCdrom - Mount a cdrom /*{{{*/ @@ -144,11 +146,11 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version) string StartDir = SafeGetCWD(); if (chdir(CD.c_str()) != 0) - return _error->Errno("chdir","Unable to change to %s",CD.c_str()); + return _error->Errno("chdir",_("Unable to change to %s"),CD.c_str()); DIR *D = opendir("."); if (D == 0) - return _error->Errno("opendir","Unable to read %s",CD.c_str()); + return _error->Errno("opendir",_("Unable to read %s"),CD.c_str()); /* Run over the directory, we assume that the reader order will never change as the media is read-only. In theory if the kernel did @@ -185,7 +187,7 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version) { struct statvfs Buf; if (statvfs(CD.c_str(),&Buf) != 0) - return _error->Errno("statfs","Failed to stat the cdrom"); + return _error->Errno("statfs",_("Failed to stat the cdrom")); // We use a kilobyte block size to advoid overflow sprintf(S,"%lu %lu",(long)(Buf.f_blocks*(Buf.f_bsize/1024)), diff --git a/apt/apt-pkg/contrib/cdromutl.h b/apt/apt-pkg/contrib/cdromutl.h index 34a01ed..4ab870b 100644 --- a/apt/apt-pkg/contrib/cdromutl.h +++ b/apt/apt-pkg/contrib/cdromutl.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cdromutl.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: cdromutl.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### CDROM Utilities - Some functions to manipulate CDROM mounts. @@ -12,6 +12,8 @@ #include +using std::string; + #ifdef __GNUG__ #pragma interface "apt-pkg/cdromutl.h" #endif diff --git a/apt/apt-pkg/contrib/cmndline.cc b/apt/apt-pkg/contrib/cmndline.cc index 8a5a29d..4bc201e 100644 --- a/apt/apt-pkg/contrib/cmndline.cc +++ b/apt/apt-pkg/contrib/cmndline.cc @@ -1,10 +1,13 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cmndline.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: cmndline.cc,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### Command Line Class - Sophisticated command line parser + This source is placed in the Public Domain, do with it what you will + It was originally written by Jason Gunthorpe . + ##################################################################### */ /*}}}*/ // Include files /*{{{*/ @@ -14,7 +17,10 @@ #include #include #include + +#include /*}}}*/ +using namespace std; // CommandLine::CommandLine - Constructor /*{{{*/ // --------------------------------------------------------------------- @@ -56,7 +62,10 @@ bool CommandLine::Parse(int argc,const char **argv) // Double dash signifies the end of option processing if (*Opt == '-' && Opt[1] == 0) + { + I++; break; + } // Single dash is a short option if (*Opt != '-') @@ -68,7 +77,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 known."),*Opt,argv[I]); if (HandleOpt(I,argc,argv,Opt,A) == false) return false; @@ -94,7 +103,7 @@ bool CommandLine::Parse(int argc,const char **argv) for (; Opt != OptEnd && *Opt != '-'; Opt++); if (Opt == OptEnd) - return _error->Error("Command line option %s is not understood",argv[I]); + return _error->Error(_("Command line option %s is not understood"),argv[I]); Opt++; for (A = ArgList; A->end() == false && @@ -102,7 +111,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"),argv[I]); // The option could be a single letter option prefixed by a no-.. if (A->end() == true) @@ -110,12 +119,12 @@ 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"),argv[I]); } // The option is not boolean if (A->IsBoolean() == false) - return _error->Error("Command line option %s is not boolean",argv[I]); + return _error->Error(_("Command line option %s is not boolean"),argv[I]); PreceedMatch = true; } @@ -154,7 +163,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], // Equals was specified but we fell off the end! if (Opt[1] == '=' && Argument == 0) - return _error->Error("Option %s requires an argument.",argv[I]); + return _error->Error(_("Option %s requires an argument."),argv[I]); if (Opt[1] == '=') CertainArg = true; @@ -175,7 +184,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], if ((A->Flags & HasArg) == HasArg) { if (Argument == 0) - return _error->Error("Option %s requires an argument.",argv[I]); + return _error->Error(_("Option %s requires an argument."),argv[I]); Opt += strlen(Opt); I += IncI; @@ -189,13 +198,13 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], const char *J; for (J = Argument; *J != 0 && *J != '='; J++); if (*J == 0) - return _error->Error("Option %s: Configuration item sepecification must have an =.",argv[I]); + return _error->Error(_("Option %s: Configuration item sepecification must have an =."),argv[I]); // = is trailing if (J[1] == 0) { if (I+1 >= argc) - return _error->Error("Option %s: Configuration item sepecification must have an =.",argv[I]); + return _error->Error(_("Option %s: Configuration item sepecification must have an =."),argv[I]); Conf->Set(string(Argument,J-Argument),string(argv[I++ +1])); } else @@ -225,7 +234,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], // Conversion failed and the argument was specified with an =s if (EndPtr == Argument && CertainArg == true) - return _error->Error("Option %s requires an integer argument, not '%s'",argv[I],Argument); + return _error->Error(_("Option %s requires an integer argument, not '%s'"),argv[I],Argument); // Conversion was ok, set the value and return if (EndPtr != 0 && EndPtr != Argument && *EndPtr == 0) @@ -256,7 +265,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], break; if (strlen(argv[I]) >= sizeof(Buffer)) - return _error->Error("Option '%s' is too long",argv[I]); + return _error->Error(_("Option '%s' is too long"),argv[I]); // Skip the leading dash const char *J = argv[I]; @@ -289,7 +298,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], } if (CertainArg == true) - return _error->Error("Sense %s is not understood, try true or false.",Argument); + return _error->Error(_("Sense %s is not understood, try true or false."),Argument); Argument = 0; } @@ -339,7 +348,7 @@ bool CommandLine::DispatchArg(Dispatch *Map,bool NoMatch) if (Map[I].Match == 0) { if (NoMatch == true) - _error->Error("Invalid operation %s",FileList[0]); + _error->Error(_("Invalid operation %s"),FileList[0]); } return false; diff --git a/apt/apt-pkg/contrib/cmndline.h b/apt/apt-pkg/contrib/cmndline.h index 6684798..a77b010 100644 --- a/apt/apt-pkg/contrib/cmndline.h +++ b/apt/apt-pkg/contrib/cmndline.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cmndline.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: cmndline.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### Command Line Class - Sophisticated command line parser diff --git a/apt/apt-pkg/contrib/configuration.cc b/apt/apt-pkg/contrib/configuration.cc index 9aa98ea..df6465d 100644 --- a/apt/apt-pkg/contrib/configuration.cc +++ b/apt/apt-pkg/contrib/configuration.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.cc,v 1.2 2000/10/30 18:49:49 kojima Exp $ +// $Id: configuration.cc,v 1.4 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### Configuration Class @@ -8,6 +8,9 @@ This class provides a configuration file and command line parser for a tree-oriented configuration environment. All runtime configuration is stored in here. + + This source is placed in the Public Domain, do with it what you will + It was originally written by Jason Gunthorpe . ##################################################################### */ /*}}}*/ @@ -18,9 +21,20 @@ #include #include #include +#include +#include +#include +#include +#include +#include + #include -#include +#include +#include +#include + +using namespace std; /*}}}*/ Configuration *_config = new Configuration; @@ -84,7 +98,7 @@ Configuration::Item *Configuration::Lookup(Item *Head,const char *S, if (Len != 0) { for (; I != 0; Last = &I->Next, I = I->Next) - if ((Res = stringcasecmp(I->Tag.begin(),I->Tag.end(),S,S + Len)) == 0) + if ((Res = stringcasecmp(I->Tag,S,S + Len)) == 0) break; } else @@ -173,17 +187,17 @@ string Configuration::FindFile(const char *Name,const char *Default) const string val = Itm->Value; while (Itm->Parent != 0 && Itm->Parent->Value.empty() == false) - { + { // Absolute - if (val[0] == '/') + if (val.length() >= 1 && val[0] == '/') break; // ~/foo or ./foo - if ((val[0] == '~' || val[0] == '.') && val[1] == '/') + if (val.length() >= 2 && (val[0] == '~' || val[0] == '.') && val[1] == '/') break; // ../foo - if (val[0] == '.' && val[1] == '.' && val[2] == '/') + if (val.length() >= 3 && val[0] == '.' && val[1] == '.' && val[2] == '/') break; if (Itm->Parent->Value.end()[-1] != '/') @@ -268,7 +282,7 @@ string Configuration::FindAny(const char *Name,const char *Default) const case 'i': { char buf[16]; - snprintf(buf, sizeof(buf)-1, "%d", FindI(key, Default)); + snprintf(buf, sizeof(buf)-1, "%d", FindI(key, Default ? atoi(Default) : 0 )); return buf; } } @@ -336,11 +350,12 @@ void Configuration::Clear(string Name) while (Top != 0 && Top->Next == 0) { - if (Top == Stop) - return; Item *Tmp = Top; Top = Top->Parent; delete Tmp; + + if (Top == Stop) + return; } Item *Tmp = Top; @@ -382,14 +397,14 @@ bool Configuration::ExistsAny(const char *Name) const // Configuration::Dump - Dump the config /*{{{*/ // --------------------------------------------------------------------- /* Dump the entire configuration space */ -void Configuration::Dump() +void Configuration::Dump(ostream& str) { /* Write out all of the configuration directives by walking the configuration tree */ const Configuration::Item *Top = Tree(0); for (; Top != 0;) { - clog << Top->FullTag() << " \"" << Top->Value << "\";" << endl; + str << Top->FullTag() << " \"" << Top->Value << "\";" << endl; if (Top->Child != 0) { @@ -424,14 +439,14 @@ string Configuration::Item::FullTag(const Item *Stop) const Sectional config files are like bind's named.conf where there are sections like 'zone "foo.org" { .. };' This causes each section to be added in with a tag like "zone::foo.org" instead of being split - tag/value. */ + tag/value. AsSectional enables Sectional parsing.*/ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional, unsigned Depth) { // Open the stream for reading - ifstream F(FName.c_str(),ios::in | ios::nocreate); + ifstream F(FName.c_str(),ios::in); if (!F != 0) - return _error->Errno("ifstream::ifstream","Opening configuration file %s",FName.c_str()); + return _error->Errno("ifstream::ifstream",_("Opening configuration file %s"),FName.c_str()); char Buffer[300]; string LineBuffer; @@ -541,7 +556,7 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional, // Syntax Error if (TermChar == '{' && LineBuffer.empty() == true) - return _error->Error("Syntax error %s:%u: Block starts with no name.",FName.c_str(),CurLine); + return _error->Error(_("Syntax error %s:%u: Block starts with no name."),FName.c_str(),CurLine); // No string on this line if (LineBuffer.empty() == true) @@ -560,10 +575,11 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional, string Tag; const char *Pos = LineBuffer.c_str(); if (ParseQuoteWord(Pos,Tag) == false) - return _error->Error("Syntax error %s:%u: Malformed Tag",FName.c_str(),CurLine); + return _error->Error(_("Syntax error %s:%u: Malformed Tag"),FName.c_str(),CurLine); // Parse off the word string Word; + bool NoWord = false; if (ParseCWord(Pos,Word) == false && ParseQuoteWord(Pos,Word) == false) { @@ -571,10 +587,12 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional, { Word = Tag; Tag = ""; - } + } + else + NoWord = true; } if (strlen(Pos) != 0) - return _error->Error("Syntax error %s:%u: Extra junk after value",FName.c_str(),CurLine); + return _error->Error(_("Syntax error %s:%u: Extra junk after value"),FName.c_str(),CurLine); // Go down a level if (TermChar == '{') @@ -611,27 +629,36 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional, } // Specials - if (Tag[0] == '#') + if (Tag.length() >= 1 && Tag[0] == '#') { if (ParentTag.empty() == false) - return _error->Error("Syntax error %s:%u: Directives can only be done at the top level",FName.c_str(),CurLine); + return _error->Error(_("Syntax error %s:%u: Directives can only be done at the top level"),FName.c_str(),CurLine); Tag.erase(Tag.begin()); if (Tag == "clear") Conf.Clear(Word); else if (Tag == "include") { if (Depth > 10) - return _error->Error("Syntax error %s:%u: Too many nested includes",FName.c_str(),CurLine); - if (ReadConfigFile(Conf,Word,AsSectional,Depth+1) == false) - return _error->Error("Syntax error %s:%u: Included from here",FName.c_str(),CurLine); + return _error->Error(_("Syntax error %s:%u: Too many nested includes"),FName.c_str(),CurLine); + if (Word.length() > 2 && Word.end()[-1] == '/') + { + if (ReadConfigDir(Conf,Word,AsSectional,Depth+1) == false) + return _error->Error(_("Syntax error %s:%u: Included from here"),FName.c_str(),CurLine); + } + else + { + if (ReadConfigFile(Conf,Word,AsSectional,Depth+1) == false) + return _error->Error(_("Syntax error %s:%u: Included from here"),FName.c_str(),CurLine); + } } else - return _error->Error("Syntax error %s:%u: Unsupported directive '%s'",FName.c_str(),CurLine,Tag.c_str()); + return _error->Error(_("Syntax error %s:%u: Unsupported directive '%s'"),FName.c_str(),CurLine,Tag.c_str()); } else { // Set the item in the configuration class - Conf.Set(Item,Word); + if (NoWord == false) + Conf.Set(Item,Word); } // Empty the buffer @@ -659,7 +686,53 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional, } if (LineBuffer.empty() == false) - return _error->Error("Syntax error %s:%u: Extra junk at end of file",FName.c_str(),CurLine); + return _error->Error(_("Syntax error %s:%u: Extra junk at end of file"),FName.c_str(),CurLine); + return true; +} + /*}}}*/ +// ReadConfigDir - Read a directory of config files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool ReadConfigDir(Configuration &Conf,string Dir,bool AsSectional, + unsigned Depth) +{ + DIR *D = opendir(Dir.c_str()); + if (D == 0) + return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); + + vector List; + + for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) + { + if (Ent->d_name[0] == '.') + continue; + + // Skip bad file names ala run-parts + const char *C = Ent->d_name; + for (; *C != 0; C++) + // CNC:2002-11-25 + if (isalpha(*C) == 0 && isdigit(*C) == 0 + && *C != '_' && *C != '-' && *C != '.') + break; + if (*C != 0) + continue; + + // Make sure it is a file and not something else + string File = flCombine(Dir,Ent->d_name); + struct stat St; + if (stat(File.c_str(),&St) != 0 || S_ISREG(St.st_mode) == 0) + continue; + + List.push_back(File); + } + closedir(D); + + sort(List.begin(),List.end()); + + // Read the files + for (vector::const_iterator I = List.begin(); I != List.end(); I++) + if (ReadConfigFile(Conf,*I,AsSectional,Depth) == false) + return false; return true; } /*}}}*/ diff --git a/apt/apt-pkg/contrib/configuration.h b/apt/apt-pkg/contrib/configuration.h index 9e0ab79..d885733 100644 --- a/apt/apt-pkg/contrib/configuration.h +++ b/apt/apt-pkg/contrib/configuration.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.h,v 1.2 2000/10/30 18:49:49 kojima Exp $ +// $Id: configuration.h,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### Configuration Class @@ -33,6 +33,9 @@ #endif #include +#include + +using std::string; class Configuration { @@ -70,7 +73,7 @@ class Configuration string FindFile(const char *Name,const char *Default = 0) const; string FindDir(const char *Name,const char *Default = 0) const; int FindI(const char *Name,int Default = 0) const; - int FindI(string Name,bool Default = 0) const {return FindI(Name.c_str(),Default);}; + int FindI(string Name,int Default = 0) const {return FindI(Name.c_str(),Default);}; bool FindB(const char *Name,bool Default = false) const; bool FindB(string Name,bool Default = false) const {return FindB(Name.c_str(),Default);}; string FindAny(const char *Name,const char *Default = 0) const; @@ -88,7 +91,8 @@ class Configuration inline const Item *Tree(const char *Name) const {return Lookup(Name);}; - void Dump(); + inline void Dump() { Dump(std::clog); }; + void Dump(std::ostream& str); Configuration(const Item *Root); Configuration(); @@ -100,4 +104,7 @@ extern Configuration *_config; bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional = false, unsigned Depth = 0); +bool ReadConfigDir(Configuration &Conf,string Dir,bool AsSectional = false, + unsigned Depth = 0); + #endif diff --git a/apt/apt-pkg/contrib/crc-16.cc b/apt/apt-pkg/contrib/crc-16.cc index e8bb7fd..6cd641b 100644 --- a/apt/apt-pkg/contrib/crc-16.cc +++ b/apt/apt-pkg/contrib/crc-16.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: crc-16.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: crc-16.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### CRC16 - Compute a 16bit crc very quickly diff --git a/apt/apt-pkg/contrib/crc-16.h b/apt/apt-pkg/contrib/crc-16.h index 3b9ca71..ecae79d 100644 --- a/apt/apt-pkg/contrib/crc-16.h +++ b/apt/apt-pkg/contrib/crc-16.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: crc-16.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: crc-16.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### CRC16 - Compute a 16bit crc very quickly diff --git a/apt/apt-pkg/contrib/error.cc b/apt/apt-pkg/contrib/error.cc index 412daec..6bf0522 100644 --- a/apt/apt-pkg/contrib/error.cc +++ b/apt/apt-pkg/contrib/error.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: error.cc,v 1.4 2001/11/12 16:04:37 kojima Exp $ +// $Id: error.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Global Erorr Class - Global error mechanism @@ -20,21 +20,24 @@ #include +#include #include #include -#include +#include #include #include #include "config.h" /*}}}*/ +using namespace std; + // Global Error Object /*{{{*/ /* If the implementation supports posix threads then the accessor function is compiled to be thread safe otherwise a non-safe version is used. A Per-Thread error object is maintained in much the same manner as libc manages errno */ -#if _POSIX_THREADS == 1 && defined(HAVE_PTHREAD) +#if defined(_POSIX_THREADS) && defined(HAVE_PTHREAD) #include static pthread_key_t ErrorKey; @@ -225,11 +228,6 @@ void GlobalError::Discard() /* */ void GlobalError::Insert(Item *Itm) { - if (0) {//akk don't leave this here or it will have evil side effects - // on acquire methods - cerr << Itm->Text.c_str() << endl; - return; - } Item **End = &List; for (Item *I = List; I != 0; I = I->Next) End = &I->Next; diff --git a/apt/apt-pkg/contrib/error.h b/apt/apt-pkg/contrib/error.h index 5ab802d..d710114 100644 --- a/apt/apt-pkg/contrib/error.h +++ b/apt/apt-pkg/contrib/error.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: error.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: error.h,v 1.2 2003/01/29 13:04:48 niemeyer Exp $ /* ###################################################################### Global Erorr Class - Global error mechanism @@ -44,8 +44,19 @@ #pragma interface "apt-pkg/error.h" #endif +#ifdef __GNUG__ +// Methods have a hidden this parameter that is visible to this attribute +#define APT_MFORMAT1 __attribute__ ((format (printf, 2, 3))) +#define APT_MFORMAT2 __attribute__ ((format (printf, 3, 4))) +#else +#define APT_MFORMAT1 +#define APT_MFORMAT2 +#endif + #include +using std::string; + class GlobalError { struct Item @@ -61,14 +72,25 @@ class GlobalError public: +#ifndef SWIG // Call to generate an error from a library call. - bool Errno(const char *Function,const char *Description,...); - bool WarningE(const char *Function,const char *Description,...); + bool Errno(const char *Function,const char *Description,...) APT_MFORMAT2; + bool WarningE(const char *Function,const char *Description,...) APT_MFORMAT2; /* A warning should be considered less severe than an error, and may be ignored by the client. */ - bool Error(const char *Description,...); - bool Warning(const char *Description,...); + bool Error(const char *Description,...) APT_MFORMAT1; + bool Warning(const char *Description,...) APT_MFORMAT1; +#else + // Call to generate an error from a library call. + bool Errno(const char *Function,const char *Description) APT_MFORMAT2; + bool WarningE(const char *Function,const char *Description) APT_MFORMAT2; + + /* A warning should be considered less severe than an error, and may be + ignored by the client. */ + bool Error(const char *Description) APT_MFORMAT1; + bool Warning(const char *Description) APT_MFORMAT1; +#endif // Simple accessors inline bool PendingError() {return PendingFlag;}; @@ -86,4 +108,7 @@ class GlobalError GlobalError *_GetErrorObj(); #define _error _GetErrorObj() +#undef APT_MFORMAT1 +#undef APT_MFORMAT2 + #endif diff --git a/apt/apt-pkg/contrib/fileutl.cc b/apt/apt-pkg/contrib/fileutl.cc index da09eb6..7900bb2 100644 --- a/apt/apt-pkg/contrib/fileutl.cc +++ b/apt/apt-pkg/contrib/fileutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.cc,v 1.3 2000/09/26 14:22:14 kojima Exp $ +// $Id: fileutl.cc,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ /* ###################################################################### File Utilities @@ -9,7 +9,7 @@ GetLock - dpkg compatible lock file manipulation (fcntl) This source is placed in the Public Domain, do with it what you will - It was originally written by Jason Gunthorpe. + It was originally written by Jason Gunthorpe . ##################################################################### */ /*}}}*/ @@ -19,7 +19,11 @@ #endif #include #include +#include +#include + +#include #include #include #include @@ -30,6 +34,8 @@ #include /*}}}*/ +using namespace std; + // CopyFile - Buffered copy of a file /*{{{*/ // --------------------------------------------------------------------- /* The caller is expected to set things so that failure causes erasure */ @@ -39,7 +45,7 @@ bool CopyFile(FileFd &From,FileFd &To) return false; // Buffered copy between fds - unsigned char *Buf = new unsigned char[64000]; + SPtrArray Buf = new unsigned char[64000]; unsigned long Size = From.Size(); while (Size != 0) { @@ -49,15 +55,11 @@ bool CopyFile(FileFd &From,FileFd &To) if (From.Read(Buf,ToRead) == false || To.Write(Buf,ToRead) == false) - { - delete [] Buf; return false; - } Size -= ToRead; } - delete [] Buf; return true; } /*}}}*/ @@ -75,12 +77,15 @@ int GetLock(string File,bool Errors) // Read only .. cant have locking problems there. if (errno == EROFS) { - _error->Warning("Not using locking for read only lock file %s",File.c_str()); + _error->Warning(_("Not using locking for read only lock file %s"),File.c_str()); return dup(0); // Need something for the caller to close } if (Errors == true) - _error->Errno("open","Could not open lock file %s",File.c_str()); + _error->Errno("open",_("Could not open lock file %s"),File.c_str()); + + // Feh.. We do this to distinguish the lock vs open case.. + errno = EPERM; return -1; } SetCloseExec(FD,true); @@ -95,12 +100,15 @@ int GetLock(string File,bool Errors) { if (errno == ENOLCK) { - _error->Warning("Not using locking for nfs mounted lock file %s",File.c_str()); - return true; + _error->Warning(_("Not using locking for nfs mounted lock file %s"),File.c_str()); + return dup(0); // Need something for the caller to close } if (Errors == true) - _error->Errno("open","Could not get lock %s",File.c_str()); + _error->Errno("open",_("Could not get lock %s"),File.c_str()); + + int Tmp = errno; close(FD); + errno = Tmp; return -1; } @@ -148,12 +156,12 @@ string flNotDir(string File) /*}}}*/ // flNotFile - Strip the file from the directory name /*{{{*/ // --------------------------------------------------------------------- -/* */ +/* Result ends in a / */ string flNotFile(string File) { string::size_type Res = File.rfind('/'); if (Res == string::npos) - return File; + return "./"; Res++; return string(File,0,Res); } @@ -329,7 +337,7 @@ int ExecFork() /*}}}*/ // ExecWait - Fancy waitpid /*{{{*/ // --------------------------------------------------------------------- -/* Waits for the given sub process. If Reap is set the no errors are +/* Waits for the given sub process. If Reap is set then no errors are generated. Otherwise a failed subprocess will generate a proper descriptive message */ bool ExecWait(int Pid,const char *Name,bool Reap) @@ -347,7 +355,7 @@ bool ExecWait(int Pid,const char *Name,bool Reap) if (Reap == true) return false; - return _error->Error("Waited, for %s but it wasn't there",Name); + return _error->Error(_("Waited, for %s but it wasn't there"),Name); } @@ -357,12 +365,12 @@ bool ExecWait(int Pid,const char *Name,bool Reap) if (Reap == true) return false; if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) - return _error->Error("Sub-process %s recieved a segmentation fault.",Name); + return _error->Error(_("Sub-process %s received a segmentation fault."),Name); if (WIFEXITED(Status) != 0) - return _error->Error("Sub-process %s returned an error code (%u)",Name,WEXITSTATUS(Status)); + return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status)); - return _error->Error("Sub-process %s exited unexpectedly",Name); + return _error->Error(_("Sub-process %s exited unexpectedly"),Name); } return true; @@ -398,10 +406,15 @@ bool FileFd::Open(string FileName,OpenMode Mode, unsigned long Perms) case WriteAny: iFd = open(FileName.c_str(),O_RDWR | O_CREAT,Perms); break; + + case WriteTemp: + unlink(FileName.c_str()); + iFd = open(FileName.c_str(),O_RDWR | O_CREAT | O_EXCL,Perms); + break; } if (iFd < 0) - return _error->Errno("open","Could not open file %s",FileName.c_str()); + return _error->Errno("open",_("Could not open file %s"),FileName.c_str()); this->FileName = FileName; SetCloseExec(iFd,true); @@ -421,10 +434,13 @@ FileFd::~FileFd() // --------------------------------------------------------------------- /* We are carefull to handle interruption by a signal while reading gracefully. */ -bool FileFd::Read(void *To,unsigned long Size,bool AllowEof) +bool FileFd::Read(void *To,unsigned long Size,unsigned long *Actual) { int Res; errno = 0; + if (Actual != 0) + *Actual = 0; + do { Res = read(iFd,To,Size); @@ -433,11 +449,13 @@ bool FileFd::Read(void *To,unsigned long Size,bool AllowEof) if (Res < 0) { Flags |= Fail; - return _error->Errno("read","Read error"); + return _error->Errno("read",_("Read error")); } To = (char *)To + Res; Size -= Res; + if (Actual != 0) + *Actual += Res; } while (Res > 0 && Size > 0); @@ -445,14 +463,14 @@ bool FileFd::Read(void *To,unsigned long Size,bool AllowEof) return true; // Eof handling - if (AllowEof == true) + if (Actual != 0) { Flags |= HitEof; return true; } Flags |= Fail; - return _error->Error("read, still have %u to read but none left",Size); + return _error->Error(_("read, still have %lu to read but none left"),Size); } /*}}}*/ // FileFd::Write - Write to the file /*{{{*/ @@ -470,7 +488,7 @@ bool FileFd::Write(const void *From,unsigned long Size) if (Res < 0) { Flags |= Fail; - return _error->Errno("write","Write error"); + return _error->Errno("write",_("Write error")); } From = (char *)From + Res; @@ -482,7 +500,7 @@ bool FileFd::Write(const void *From,unsigned long Size) return true; Flags |= Fail; - return _error->Error("write, still have %u to write but couldn't",Size); + return _error->Error(_("write, still have %lu to write but couldn't"),Size); } /*}}}*/ // FileFd::Seek - Seek in the file /*{{{*/ @@ -493,7 +511,7 @@ bool FileFd::Seek(unsigned long To) if (lseek(iFd,To,SEEK_SET) != (signed)To) { Flags |= Fail; - return _error->Error("Unable to seek to %u",To); + return _error->Error("Unable to seek to %lu",To); } return true; @@ -507,7 +525,7 @@ bool FileFd::Skip(unsigned long Over) if (lseek(iFd,Over,SEEK_CUR) < 0) { Flags |= Fail; - return _error->Error("Unable to seek ahead %u",Over); + return _error->Error("Unable to seek ahead %lu",Over); } return true; @@ -521,7 +539,7 @@ bool FileFd::Truncate(unsigned long To) if (ftruncate(iFd,To) != 0) { Flags |= Fail; - return _error->Error("Unable to truncate to %u",To); + return _error->Error("Unable to truncate to %lu",To); } return true; @@ -557,13 +575,25 @@ bool FileFd::Close() bool Res = true; if ((Flags & AutoClose) == AutoClose) if (iFd >= 0 && close(iFd) != 0) - Res &= _error->Errno("close","Problem closing the file"); + Res &= _error->Errno("close",_("Problem closing the file")); iFd = -1; if ((Flags & Fail) == Fail && (Flags & DelOnFail) == DelOnFail && FileName.empty() == false) if (unlink(FileName.c_str()) != 0) - Res &= _error->Warning("unlnk","Problem unlinking the file"); + Res &= _error->WarningE("unlnk",_("Problem unlinking the file")); return Res; } /*}}}*/ +// FileFd::Sync - Sync the file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool FileFd::Sync() +{ +#ifdef _POSIX_SYNCHRONIZED_IO + if (fsync(iFd) != 0) + return _error->Errno("sync",_("Problem syncing the file")); +#endif + return true; +} + /*}}}*/ diff --git a/apt/apt-pkg/contrib/fileutl.h b/apt/apt-pkg/contrib/fileutl.h index e3b18a8..b36a439 100644 --- a/apt/apt-pkg/contrib/fileutl.h +++ b/apt/apt-pkg/contrib/fileutl.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.h,v 1.2 2000/09/26 14:22:14 kojima Exp $ +// $Id: fileutl.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### File Utilities @@ -27,6 +27,8 @@ #include +using std::string; + class FileFd { protected: @@ -38,9 +40,16 @@ class FileFd string FileName; public: - enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny}; + enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny,WriteTemp}; - bool Read(void *To,unsigned long Size,bool AllowEof = false); + inline bool Read(void *To,unsigned long Size,bool AllowEof) + { + unsigned long Jnk; + if (AllowEof) + return Read(To,Size,&Jnk); + return Read(To,Size); + } + bool Read(void *To,unsigned long Size,unsigned long *Actual = 0); bool Write(const void *From,unsigned long Size); bool Seek(unsigned long To); bool Skip(unsigned long To); @@ -49,7 +58,8 @@ class FileFd unsigned long Size(); bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666); bool Close(); - + bool Sync(); + // Simple manipulators inline int Fd() {return iFd;}; inline void Fd(int fd) {iFd = fd;}; diff --git a/apt/apt-pkg/contrib/hashes.cc b/apt/apt-pkg/contrib/hashes.cc new file mode 100644 index 0000000..6a11c42 --- /dev/null +++ b/apt/apt-pkg/contrib/hashes.cc @@ -0,0 +1,43 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: hashes.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + Hashes - Simple wrapper around the hash functions + + This is just used to make building the methods simpler, this is the + only interface required.. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/hashes.h" +#endif + +#include + +#include +#include + /*}}}*/ + +// Hashes::AddFD - Add the contents of the FD /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool Hashes::AddFD(int Fd,unsigned long Size) +{ + unsigned char Buf[64*64]; + int Res = 0; + while (Size != 0) + { + Res = read(Fd,Buf,MIN(Size,sizeof(Buf))); + if (Res < 0 || (unsigned)Res != MIN(Size,sizeof(Buf))) + return false; + Size -= Res; + MD5.Add(Buf,Res); + SHA1.Add(Buf,Res); + } + return true; +} + /*}}}*/ + diff --git a/apt/apt-pkg/contrib/hashes.h b/apt/apt-pkg/contrib/hashes.h new file mode 100644 index 0000000..0d25def --- /dev/null +++ b/apt/apt-pkg/contrib/hashes.h @@ -0,0 +1,40 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: hashes.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + Hashes - Simple wrapper around the hash functions + + This is just used to make building the methods simpler, this is the + only interface required.. + + ##################################################################### */ + /*}}}*/ +#ifndef APTPKG_HASHES_H +#define APTPKG_HASHES_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/hashes.h" +#endif + +#include +#include + +class Hashes +{ + public: + + MD5Summation MD5; + SHA1Summation SHA1; + + inline bool Add(const unsigned char *Data,unsigned long Size) + { + return MD5.Add(Data,Size) && SHA1.Add(Data,Size); + }; + inline bool Add(const char *Data) {return Add((unsigned char *)Data,strlen(Data));}; + bool AddFD(int Fd,unsigned long Size); + inline bool Add(const unsigned char *Beg,const unsigned char *End) + {return Add(Beg,End-Beg);}; +}; + +#endif diff --git a/apt/apt-pkg/contrib/i18n.h b/apt/apt-pkg/contrib/i18n.h deleted file mode 100644 index f60e77b..0000000 --- a/apt/apt-pkg/contrib/i18n.h +++ /dev/null @@ -1,54 +0,0 @@ -/* i18n.h -- Internationalization stuff (ripped from bash) - - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. - - Modified 9/2000 by Alfredo K. Kojima for apt - - Bash is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2, or (at your option) any later - version. - - Bash is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with Bash; see the file COPYING. If not, write to the Free Software - Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ - -#if !defined (_I18N_H_) -#define _I18N_H_ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#if defined (HAVE_LIBINTL_H) -# include -#endif - -#if defined (HAVE_LOCALE_H) -# include -#endif - -#if defined (HAVE_SETLOCALE) && !defined (LC_ALL) -# undef HAVE_SETLOCALE -#endif - -#if ENABLE_NLS -# define _(a) (const char*)gettext(a) -#else -# undef bindtextdomain -# define bindtextdomain(Domain, Directory) /* empty */ -# undef textdomain -# define textdomain(Domain) /* empty */ -# undef setlocale -# define setlocale(cat, log) -# define _(a) a -#endif - -#endif /* !_I18N_H_ */ diff --git a/apt/apt-pkg/contrib/md5.cc b/apt/apt-pkg/contrib/md5.cc index 1c042bf..029e336 100644 --- a/apt/apt-pkg/contrib/md5.cc +++ b/apt/apt-pkg/contrib/md5.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: md5.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: md5.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### MD5Sum - MD5 Message Digest Algorithm. @@ -191,7 +191,7 @@ MD5SumValue::MD5SumValue() /* Converts the hex string into a set of chars */ bool MD5SumValue::Set(string Str) { - return Hex2Num(Str.begin(),Str.end(),Sum,sizeof(Sum)); + return Hex2Num(Str,Sum,sizeof(Sum)); } /*}}}*/ // MD5SumValue::Value - Convert the number into a string /*{{{*/ diff --git a/apt/apt-pkg/contrib/md5.h b/apt/apt-pkg/contrib/md5.h index 8503664..5895966 100644 --- a/apt/apt-pkg/contrib/md5.h +++ b/apt/apt-pkg/contrib/md5.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: md5.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: md5.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### MD5SumValue - Storage for a MD5Sum @@ -29,11 +29,13 @@ #include +using std::string; + class MD5Summation; class MD5SumValue { - friend MD5Summation; + friend class MD5Summation; unsigned char Sum[4*4]; public: diff --git a/apt/apt-pkg/contrib/mmap.cc b/apt/apt-pkg/contrib/mmap.cc index e5359bf..ed3cd78 100644 --- a/apt/apt-pkg/contrib/mmap.cc +++ b/apt/apt-pkg/contrib/mmap.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: mmap.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: mmap.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### MMap Class - Provides 'real' mmap or a faked mmap using read(). @@ -29,6 +29,8 @@ #include #include +#include + #include #include #include @@ -77,12 +79,12 @@ bool MMap::Map(FileFd &Fd) Map = MAP_PRIVATE; if (iSize == 0) - return _error->Error("Can't mmap an empty file"); + return _error->Error(_("Can't mmap an empty file")); // Map it. Base = mmap(0,iSize,Prot,Map,Fd.Fd(),0); if (Base == (void *)-1) - return _error->Errno("mmap","Couldn't make mmap of %u bytes",iSize); + return _error->Errno("mmap",_("Couldn't make mmap of %lu bytes"),iSize); return true; } @@ -102,6 +104,7 @@ bool MMap::Close(bool DoSync) _error->Warning("Unable to munmap"); iSize = 0; + Base = 0; return true; } /*}}}*/ @@ -150,9 +153,15 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) return; unsigned long EndOfFile = Fd->Size(); - Fd->Seek(WorkSpace); - char C = 0; - Fd->Write(&C,sizeof(C)); + if (EndOfFile > WorkSpace) + WorkSpace = EndOfFile; + else + { + Fd->Seek(WorkSpace); + char C = 0; + Fd->Write(&C,sizeof(C)); + } + Map(F); iSize = EndOfFile; } @@ -167,6 +176,7 @@ DynamicMMap::DynamicMMap(unsigned long Flags,unsigned long WorkSpace) : return; Base = new unsigned char[WorkSpace]; + memset(Base,0,WorkSpace); iSize = 0; } /*}}}*/ @@ -182,11 +192,9 @@ DynamicMMap::~DynamicMMap() } unsigned long EndOfFile = iSize; - Sync(); iSize = WorkSpace; Close(false); ftruncate(Fd->Fd(),EndOfFile); - Fd->Close(); } /*}}}*/ // DynamicMMap::RawAllocate - Allocate a raw chunk of unaligned space /*{{{*/ diff --git a/apt/apt-pkg/contrib/mmap.h b/apt/apt-pkg/contrib/mmap.h index 0f373a1..f8dd82b 100644 --- a/apt/apt-pkg/contrib/mmap.h +++ b/apt/apt-pkg/contrib/mmap.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: mmap.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: mmap.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### MMap Class - Provides 'real' mmap or a faked mmap using read(). @@ -32,6 +32,8 @@ #include #include +using std::string; + /* This should be a 32 bit type, larger tyes use too much ram and smaller types are too small. Where ever possible 'unsigned long' should be used instead of this internal type */ @@ -92,7 +94,7 @@ class DynamicMMap : public MMap unsigned long RawAllocate(unsigned long Size,unsigned long Aln = 0); unsigned long Allocate(unsigned long ItemSize); unsigned long WriteString(const char *String,unsigned long Len = (unsigned long)-1); - inline unsigned long WriteString(string S) {return WriteString(S.begin(),S.size());}; + inline unsigned long WriteString(string S) {return WriteString(S.c_str(),S.length());}; void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;}; DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace = 2*1024*1024); diff --git a/apt/apt-pkg/contrib/progress.cc b/apt/apt-pkg/contrib/progress.cc index 97b3a71..0027ffc 100644 --- a/apt/apt-pkg/contrib/progress.cc +++ b/apt/apt-pkg/contrib/progress.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: progress.cc,v 1.3 2001/11/13 17:32:08 kojima Exp $ +// $Id: progress.cc,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### OpProgress - Operation Progress @@ -14,9 +14,14 @@ #include #include #include + +#include + +#include #include /*}}}*/ -#include + +using namespace std; // OpProgress::OpProgress - Constructor /*{{{*/ // --------------------------------------------------------------------- @@ -34,7 +39,10 @@ OpProgress::OpProgress() : Current(0), Total(0), Size(0), SubTotal(1), percent of Total SubTotal is. */ void OpProgress::Progress(unsigned long Cur) { - Percent = (Current + Cur/((float)SubTotal)*Size)*100.0/Total; + if (Total == 0 || Size == 0 || SubTotal == 0) + Percent = 0; + else + Percent = (Current + Cur/((float)SubTotal)*Size)*100.0/Total; Update(); } /*}}}*/ @@ -49,7 +57,10 @@ void OpProgress::OverallProgress(unsigned long Current, unsigned long Total, this->Size = Size; this->Op = Op; SubOp = string(); - Percent = Current*100.0/Total; + if (Total == 0) + Percent = 0; + else + Percent = Current*100.0/Total; Update(); } /*}}}*/ @@ -60,7 +71,10 @@ void OpProgress::SubProgress(unsigned long SubTotal,string Op) { this->SubTotal = SubTotal; SubOp = Op; - Percent = Current*100.0/Total; + if (Total == 0) + Percent = 0; + else + Percent = Current*100.0/Total; Update(); } /*}}}*/ @@ -70,7 +84,10 @@ void OpProgress::SubProgress(unsigned long SubTotal,string Op) void OpProgress::SubProgress(unsigned long SubTotal) { this->SubTotal = SubTotal; - Percent = Current*100.0/Total; + if (Total == 0) + Percent = 0; + else + Percent = Current*100.0/Total; Update(); } /*}}}*/ @@ -99,6 +116,9 @@ bool OpProgress::CheckChange(float Interval) if ((int)LastPercent == (int)Percent) return false; + if (Interval == 0) + return false; + // Check time delta struct timeval Now; gettimeofday(&Now,0); @@ -131,9 +151,9 @@ void OpTextProgress::Done() { char S[300]; if (_error->PendingError() == true) - snprintf(S,sizeof(S),"\r%s... %s",OldOp.c_str(),_("Error!")); + snprintf(S,sizeof(S),_("%c%s... Error!"),'\r',OldOp.c_str()); else - snprintf(S,sizeof(S),"\r%s... %s",OldOp.c_str(),_("Done")); + snprintf(S,sizeof(S),_("%c%s... Done"),'\r',OldOp.c_str()); Write(S); cout << endl; OldOp = string(); @@ -151,7 +171,7 @@ void OpTextProgress::Done() /* */ void OpTextProgress::Update() { - if (CheckChange(0.1) == false) + if (CheckChange((NoUpdate == true?0:0.7)) == false) return; // No percent spinner diff --git a/apt/apt-pkg/contrib/progress.h b/apt/apt-pkg/contrib/progress.h index c39a146..0581115 100644 --- a/apt/apt-pkg/contrib/progress.h +++ b/apt/apt-pkg/contrib/progress.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: progress.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: progress.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### OpProgress - Operation Progress @@ -28,6 +28,8 @@ #include #include +using std::string; + class Configuration; class OpProgress { diff --git a/apt/apt-pkg/contrib/sha1.cc b/apt/apt-pkg/contrib/sha1.cc new file mode 100644 index 0000000..7934a47 --- /dev/null +++ b/apt/apt-pkg/contrib/sha1.cc @@ -0,0 +1,356 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: sha1.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + SHA1 - SHA-1 Secure Hash Algorithm. + + This file is a Public Domain wrapper for the Public Domain SHA1 + calculation code that is at it's end. + + The algorithm was originally implemented by + Steve Reid and later modified by + James H. Brown . + + Modifications for APT were done by Alfredo K. Kojima and Jason + Gunthorpe. + + Still in the public domain. + + Test Vectors (from FIPS PUB 180-1) + "abc" + A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D + "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" + 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 + A million repetitions of "a" + 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F + + ##################################################################### + */ + /*}}} */ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/sha1.h" +#endif + +#include +#include + +#include +#include +#include +#include +#include + /*}}}*/ + +// SHA1Transform - Alters an existing SHA-1 hash /*{{{*/ +// --------------------------------------------------------------------- +/* The core of the SHA-1 algorithm. This alters an existing SHA-1 hash to + reflect the addition of 16 longwords of new data. Other routines convert + incoming stream data into 16 long word chunks for this routine */ + +#define rol(value,bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +/* blk0() and blk() perform the initial expand. */ +/* I got the idea of expanding during the round function from SSLeay */ +#ifndef WORDS_BIGENDIAN +#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ + |(rol(block->l[i],8)&0x00FF00FF)) +#else +#define blk0(i) block->l[i] +#endif +#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ + ^block->l[(i+2)&15]^block->l[i&15],1)) + +/* (R0+R1),R2,R3,R4 are the different operations used in SHA1 */ +#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); +#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); +#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); + +static void SHA1Transform(uint32_t state[5],uint8_t const buffer[64]) +{ + uint32_t a,b,c,d,e; + typedef union + { + uint8_t c[64]; + uint32_t l[16]; + } + CHAR64LONG16; + CHAR64LONG16 *block; + + uint8_t workspace[64]; + block = (CHAR64LONG16 *)workspace; + memcpy(block,buffer,sizeof(workspace)); + + /* Copy context->state[] to working vars */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + + /* 4 rounds of 20 operations each. Loop unrolled. */ + R0(a,b,c,d,e,0); + R0(e,a,b,c,d,1); + R0(d,e,a,b,c,2); + R0(c,d,e,a,b,3); + R0(b,c,d,e,a,4); + R0(a,b,c,d,e,5); + R0(e,a,b,c,d,6); + R0(d,e,a,b,c,7); + R0(c,d,e,a,b,8); + R0(b,c,d,e,a,9); + R0(a,b,c,d,e,10); + R0(e,a,b,c,d,11); + R0(d,e,a,b,c,12); + R0(c,d,e,a,b,13); + R0(b,c,d,e,a,14); + R0(a,b,c,d,e,15); + R1(e,a,b,c,d,16); + R1(d,e,a,b,c,17); + R1(c,d,e,a,b,18); + R1(b,c,d,e,a,19); + R2(a,b,c,d,e,20); + R2(e,a,b,c,d,21); + R2(d,e,a,b,c,22); + R2(c,d,e,a,b,23); + R2(b,c,d,e,a,24); + R2(a,b,c,d,e,25); + R2(e,a,b,c,d,26); + R2(d,e,a,b,c,27); + R2(c,d,e,a,b,28); + R2(b,c,d,e,a,29); + R2(a,b,c,d,e,30); + R2(e,a,b,c,d,31); + R2(d,e,a,b,c,32); + R2(c,d,e,a,b,33); + R2(b,c,d,e,a,34); + R2(a,b,c,d,e,35); + R2(e,a,b,c,d,36); + R2(d,e,a,b,c,37); + R2(c,d,e,a,b,38); + R2(b,c,d,e,a,39); + R3(a,b,c,d,e,40); + R3(e,a,b,c,d,41); + R3(d,e,a,b,c,42); + R3(c,d,e,a,b,43); + R3(b,c,d,e,a,44); + R3(a,b,c,d,e,45); + R3(e,a,b,c,d,46); + R3(d,e,a,b,c,47); + R3(c,d,e,a,b,48); + R3(b,c,d,e,a,49); + R3(a,b,c,d,e,50); + R3(e,a,b,c,d,51); + R3(d,e,a,b,c,52); + R3(c,d,e,a,b,53); + R3(b,c,d,e,a,54); + R3(a,b,c,d,e,55); + R3(e,a,b,c,d,56); + R3(d,e,a,b,c,57); + R3(c,d,e,a,b,58); + R3(b,c,d,e,a,59); + R4(a,b,c,d,e,60); + R4(e,a,b,c,d,61); + R4(d,e,a,b,c,62); + R4(c,d,e,a,b,63); + R4(b,c,d,e,a,64); + R4(a,b,c,d,e,65); + R4(e,a,b,c,d,66); + R4(d,e,a,b,c,67); + R4(c,d,e,a,b,68); + R4(b,c,d,e,a,69); + R4(a,b,c,d,e,70); + R4(e,a,b,c,d,71); + R4(d,e,a,b,c,72); + R4(c,d,e,a,b,73); + R4(b,c,d,e,a,74); + R4(a,b,c,d,e,75); + R4(e,a,b,c,d,76); + R4(d,e,a,b,c,77); + R4(c,d,e,a,b,78); + R4(b,c,d,e,a,79); + + /* Add the working vars back into context.state[] */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; +} + /*}}}*/ + +// SHA1SumValue::SHA1SumValue - Constructs the summation from a string /*{{{*/ +// --------------------------------------------------------------------- +/* The string form of a SHA1 is a 40 character hex number */ +SHA1SumValue::SHA1SumValue(string Str) +{ + memset(Sum,0,sizeof(Sum)); + Set(Str); +} + + /*}}} */ +// SHA1SumValue::SHA1SumValue - Default constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Sets the value to 0 */ +SHA1SumValue::SHA1SumValue() +{ + memset(Sum,0,sizeof(Sum)); +} + + /*}}} */ +// SHA1SumValue::Set - Set the sum from a string /*{{{*/ +// --------------------------------------------------------------------- +/* Converts the hex string into a set of chars */ +bool SHA1SumValue::Set(string Str) +{ + return Hex2Num(Str,Sum,sizeof(Sum)); +} + + /*}}} */ +// SHA1SumValue::Value - Convert the number into a string /*{{{*/ +// --------------------------------------------------------------------- +/* Converts the set of chars into a hex string in lower case */ +string SHA1SumValue::Value() const +{ + char Conv[16] = + { '0','1','2','3','4','5','6','7','8','9','a','b', + 'c','d','e','f' + }; + char Result[41]; + Result[40] = 0; + + // Convert each char into two letters + int J = 0; + int I = 0; + for (; I != 40; J++,I += 2) + { + Result[I] = Conv[Sum[J] >> 4]; + Result[I + 1] = Conv[Sum[J] & 0xF]; + } + + return string(Result); +} + + /*}}} */ +// SHA1SumValue::operator == - Comparator /*{{{*/ +// --------------------------------------------------------------------- +/* Call memcmp on the buffer */ +bool SHA1SumValue::operator == (const SHA1SumValue & rhs) const +{ + return memcmp(Sum,rhs.Sum,sizeof(Sum)) == 0; +} + /*}}}*/ +// SHA1Summation::SHA1Summation - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +SHA1Summation::SHA1Summation() +{ + uint32_t *state = (uint32_t *)State; + uint32_t *count = (uint32_t *)Count; + + /* SHA1 initialization constants */ + state[0] = 0x67452301; + state[1] = 0xEFCDAB89; + state[2] = 0x98BADCFE; + state[3] = 0x10325476; + state[4] = 0xC3D2E1F0; + count[0] = 0; + count[1] = 0; + Done = false; +} + /*}}}*/ +// SHA1Summation::Result - Return checksum value /*{{{*/ +// --------------------------------------------------------------------- +/* Add() may not be called after this */ +SHA1SumValue SHA1Summation::Result() +{ + uint32_t *state = (uint32_t *)State; + uint32_t *count = (uint32_t *)Count; + + // Apply the padding + if (Done == false) + { + unsigned char finalcount[8]; + + for (unsigned i = 0; i < 8; i++) + { + // Endian independent + finalcount[i] = (unsigned char) ((count[(i >= 4 ? 0 : 1)] + >> ((3 - (i & 3)) * 8)) & 255); + } + + Add((unsigned char *) "\200",1); + while ((count[0] & 504) != 448) + Add((unsigned char *) "\0",1); + + Add(finalcount,8); /* Should cause a SHA1Transform() */ + + } + + Done = true; + + // Transfer over the result + SHA1SumValue Value; + for (unsigned i = 0; i < 20; i++) + { + Value.Sum[i] = (unsigned char) + ((state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); + } + return Value; +} + /*}}}*/ +// SHA1Summation::Add - Adds content of buffer into the checksum /*{{{*/ +// --------------------------------------------------------------------- +/* May not be called after Result() is called */ +bool SHA1Summation::Add(const unsigned char *data,unsigned long len) +{ + if (Done) + return false; + + uint32_t *state = (uint32_t *)State; + uint32_t *count = (uint32_t *)Count; + uint8_t *buffer = (uint8_t *)Buffer; + uint32_t i,j; + + j = (count[0] >> 3) & 63; + if ((count[0] += len << 3) < (len << 3)) + count[1]++; + count[1] += (len >> 29); + if ((j + len) > 63) + { + memcpy(&buffer[j],data,(i = 64 - j)); + SHA1Transform(state,buffer); + for (; i + 63 < len; i += 64) + { + SHA1Transform(state,&data[i]); + } + j = 0; + } + else + i = 0; + memcpy(&buffer[j],&data[i],len - i); + + return true; +} + /*}}}*/ +// SHA1Summation::AddFD - Add content of file into the checksum /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool SHA1Summation::AddFD(int Fd,unsigned long Size) +{ + unsigned char Buf[64 * 64]; + int Res = 0; + while (Size != 0) + { + Res = read(Fd,Buf,MIN(Size,sizeof(Buf))); + if (Res < 0 || (unsigned) Res != MIN(Size,sizeof(Buf))) + return false; + Size -= Res; + Add(Buf,Res); + } + return true; +} + /*}}}*/ diff --git a/apt/apt-pkg/contrib/sha1.h b/apt/apt-pkg/contrib/sha1.h new file mode 100644 index 0000000..fb2c7df --- /dev/null +++ b/apt/apt-pkg/contrib/sha1.h @@ -0,0 +1,68 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: sha1.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + SHA1SumValue - Storage for a SHA-1 hash. + SHA1Summation - SHA-1 Secure Hash Algorithm. + + This is a C++ interface to a set of SHA1Sum functions, that mirrors + the equivalent MD5 classes. + + ##################################################################### */ + /*}}}*/ +#ifndef APTPKG_SHA1_H +#define APTPKG_SHA1_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/sha1.h" +#endif + +#include + +using std::string; + +class SHA1Summation; + +class SHA1SumValue +{ + friend class SHA1Summation; + unsigned char Sum[20]; + + public: + + // Accessors + bool operator ==(const SHA1SumValue &rhs) const; + string Value() const; + inline void Value(unsigned char S[20]) + {for (int I = 0; I != sizeof(Sum); I++) S[I] = Sum[I];}; + inline operator string() const {return Value();}; + bool Set(string Str); + inline void Set(unsigned char S[20]) + {for (int I = 0; I != sizeof(Sum); I++) Sum[I] = S[I];}; + + SHA1SumValue(string Str); + SHA1SumValue(); +}; + +class SHA1Summation +{ + /* assumes 64-bit alignment just in case */ + unsigned char Buffer[64] __attribute__((aligned(8))); + unsigned char State[5*4] __attribute__((aligned(8))); + unsigned char Count[2*4] __attribute__((aligned(8))); + bool Done; + + public: + + bool Add(const unsigned char *inbuf,unsigned long inlen); + inline bool Add(const char *Data) {return Add((unsigned char *)Data,strlen(Data));}; + bool AddFD(int Fd,unsigned long Size); + inline bool Add(const unsigned char *Beg,const unsigned char *End) + {return Add(Beg,End-Beg);}; + SHA1SumValue Result(); + + SHA1Summation(); +}; + +#endif diff --git a/apt/apt-pkg/contrib/sptr.h b/apt/apt-pkg/contrib/sptr.h index 3fd05c7..32e332b 100644 --- a/apt/apt-pkg/contrib/sptr.h +++ b/apt/apt-pkg/contrib/sptr.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sptr.h,v 1.1 2001/03/27 21:18:18 kojima Exp $ +// $Id: sptr.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### Trivial non-ref counted 'smart pointer' diff --git a/apt/apt-pkg/contrib/strutl.cc b/apt/apt-pkg/contrib/strutl.cc index b26963a..a5f410a 100644 --- a/apt/apt-pkg/contrib/strutl.cc +++ b/apt/apt-pkg/contrib/strutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: strutl.cc,v 1.3 2000/10/30 18:49:49 kojima Exp $ +// $Id: strutl.cc,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### String Util - Some useful string functions. @@ -23,12 +23,19 @@ #include #include +#include + #include #include #include #include #include #include +#include + +#include "config.h" + +using namespace std; /*}}}*/ // strstrip - Remove white space from the front and back of a string /*{{{*/ @@ -216,7 +223,7 @@ string QuoteString(string Str,const char *Bad) string DeQuoteString(string Str) { string Res; - for (string::iterator I = Str.begin(); I != Str.end(); I++) + for (string::const_iterator I = Str.begin(); I != Str.end(); I++) { if (*I == '%' && I + 2 < Str.end()) { @@ -435,6 +442,43 @@ int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd) return -1; return 1; } + +#if __GNUC__ >= 3 +int stringcmp(string::const_iterator A,string::const_iterator AEnd, + const char *B,const char *BEnd) +{ + for (; A != AEnd && B != BEnd; A++, B++) + if (*A != *B) + break; + + if (A == AEnd && B == BEnd) + return 0; + if (A == AEnd) + return 1; + if (B == BEnd) + return -1; + if (*A < *B) + return -1; + return 1; +} +int stringcmp(string::const_iterator A,string::const_iterator AEnd, + string::const_iterator B,string::const_iterator BEnd) +{ + for (; A != AEnd && B != BEnd; A++, B++) + if (*A != *B) + break; + + if (A == AEnd && B == BEnd) + return 0; + if (A == AEnd) + return 1; + if (B == BEnd) + return -1; + if (*A < *B) + return -1; + return 1; +} +#endif /*}}}*/ // stringcasecmp - Arbitary case insensitive string compare /*{{{*/ // --------------------------------------------------------------------- @@ -455,6 +499,42 @@ int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd) return -1; return 1; } +#if __GNUC__ >= 3 +int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, + const char *B,const char *BEnd) +{ + for (; A != AEnd && B != BEnd; A++, B++) + if (toupper(*A) != toupper(*B)) + break; + + if (A == AEnd && B == BEnd) + return 0; + if (A == AEnd) + return 1; + if (B == BEnd) + return -1; + if (toupper(*A) < toupper(*B)) + return -1; + return 1; +} +int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, + string::const_iterator B,string::const_iterator BEnd) +{ + for (; A != AEnd && B != BEnd; A++, B++) + if (toupper(*A) != toupper(*B)) + break; + + if (A == AEnd && B == BEnd) + return 0; + if (A == AEnd) + return 1; + if (B == BEnd) + return -1; + if (toupper(*A) < toupper(*B)) + return -1; + return 1; +} +#endif /*}}}*/ // LookupTag - Lookup the value of a tag in a taged string /*{{{*/ // --------------------------------------------------------------------- @@ -476,7 +556,7 @@ string LookupTag(string Message,const char *Tag,const char *Default) for (J = I; *J != '\n' && J < Message.end(); J++); for (; J > I && isspace(J[-1]) != 0; J--); - return string(I,J-I); + return string(I,J); } for (; *I != '\n' && I < Message.end(); I++); @@ -492,7 +572,7 @@ string LookupTag(string Message,const char *Tag,const char *Default) // --------------------------------------------------------------------- /* This inspects the string to see if it is true or if it is false and then returns the result. Several varients on true/false are checked. */ -int StringToBool(string Text,int Default = -1) +int StringToBool(string Text,int Default) { char *End; int Res = strtol(Text.c_str(),&End,0); @@ -544,7 +624,7 @@ string TimeRFC1123(time_t Date) fancy buffering is used. */ bool ReadMessages(int Fd, vector &List) { - char Buffer[4000]; + char Buffer[64000]; char *End = Buffer; while (1) @@ -634,7 +714,11 @@ static int MonthConv(char *Month) Contributed by Roger Beeman , with the help of Mark Baushke and the rest of the Gurus at CISCO. */ -#ifndef __USE_MISC // glib sets this + +/* Turned it into an autoconf check, because GNU is not the only thing which + can provide timegm. -- 2002-09-22, Joel Baker */ + +#ifndef HAVE_TIMEGM // Now with autoconf! static time_t timegm(struct tm *t) { time_t tl, tb; @@ -741,15 +825,14 @@ static int HexDigit(int c) // Hex2Num - Convert a long hex number into a buffer /*{{{*/ // --------------------------------------------------------------------- /* The length of the buffer must be exactly 1/2 the length of the string. */ -bool Hex2Num(const char *Start,const char *End,unsigned char *Num, - unsigned int Length) +bool Hex2Num(string Str,unsigned char *Num,unsigned int Length) { - if (End - Start != (signed)(Length*2)) + if (Str.length() != Length*2) return false; // Convert each digit. We store it in the same order as the string int J = 0; - for (const char *I = Start; I < End;J++, I += 2) + for (string::const_iterator I = Str.begin(); I != Str.end();J++, I += 2) { if (isxdigit(*I) == 0 || isxdigit(I[1]) == 0) return false; @@ -855,12 +938,51 @@ unsigned long RegexChoice(RxChoiceList *Rxs,const char **ListBegin, regfree(&Pattern); if (Done == false) - _error->Warning("Selection %s not found",*ListBegin); + _error->Warning(_("Selection %s not found"),*ListBegin); } return Hits; } /*}}}*/ +// ioprintf - C format string outputter to C++ iostreams /*{{{*/ +// --------------------------------------------------------------------- +/* This is used to make the internationalization strinc easier to translate + and to allow reordering of parameters */ +void ioprintf(ostream &out,const char *format,...) +{ + va_list args; + va_start(args,format); + + // sprintf the description + char S[400]; + vsnprintf(S,sizeof(S),format,args); + out << S; +} + /*}}}*/ + +// CheckDomainList - See if Host is in a , seperate list /*{{{*/ +// --------------------------------------------------------------------- +/* The domain list is a comma seperate list of domains that are suffix + matched against the argument */ +bool CheckDomainList(string Host,string List) +{ + string::const_iterator Start = List.begin(); + for (string::const_iterator Cur = List.begin(); Cur <= List.end(); Cur++) + { + if (Cur < List.end() && *Cur != ',') + continue; + + // Match the end of the string.. + if ((Host.size() >= (unsigned)(Cur - Start)) && + Cur - Start != 0 && + stringcasecmp(Host.end() - (Cur - Start),Host.end(),Start,Cur) == 0) + return true; + + Start = Cur + 1; + } + return false; +} + /*}}}*/ // URI::CopyFrom - Copy from an object /*{{{*/ // --------------------------------------------------------------------- diff --git a/apt/apt-pkg/contrib/strutl.h b/apt/apt-pkg/contrib/strutl.h index f86be18..44fc504 100644 --- a/apt/apt-pkg/contrib/strutl.h +++ b/apt/apt-pkg/contrib/strutl.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: strutl.h,v 1.3 2000/10/30 18:49:49 kojima Exp $ +// $Id: strutl.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### String Util - These are some useful string functions @@ -23,7 +23,19 @@ #include #include #include +#include #include + +using std::string; +using std::vector; +using std::ostream; + +#ifdef __GNUG__ +// Methods have a hidden this parameter that is visible to this attribute +#define APT_FORMAT2 __attribute__ ((format (printf, 2, 3))) +#else +#define APT_FORMAT2 +#endif char *_strstrip(char *String); char *_strtabexpand(char *String,size_t Len); @@ -41,18 +53,48 @@ string LookupTag(string Message,const char *Tag,const char *Default = 0); int StringToBool(string Text,int Default = -1); bool ReadMessages(int Fd, vector &List); bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0); -bool Hex2Num(const char *Start,const char *End,unsigned char *Num, - unsigned int Length); +bool Hex2Num(string Str,unsigned char *Num,unsigned int Length); bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); - +void ioprintf(ostream &out,const char *format,...) APT_FORMAT2; +bool CheckDomainList(string Host,string List); + +#define APT_MKSTRCMP(name,func) \ +inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ +inline int name(string A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \ +inline int name(string A,string B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \ +inline int name(string A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);}; + +#define APT_MKSTRCMP2(name,func) \ +inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ +inline int name(string A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));}; \ +inline int name(string A,string B) {return func(A.begin(),A.end(),B.begin(),B.end());}; \ +inline int name(string A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);}; + int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd); -inline int stringcmp(const char *A,const char *AEnd,const char *B) {return stringcmp(A,AEnd,B,B+strlen(B));}; -inline int stringcmp(string A,const char *B) {return stringcmp(A.begin(),A.end(),B,B+strlen(B));}; int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd); -inline int stringcasecmp(const char *A,const char *AEnd,const char *B) {return stringcasecmp(A,AEnd,B,B+strlen(B));}; -inline int stringcasecmp(string A,const char *B) {return stringcasecmp(A.begin(),A.end(),B,B+strlen(B));}; -inline int stringcasecmp(string A,string B) {return stringcasecmp(A.begin(),A.end(),B.begin(),B.end());}; + +/* We assume that GCC 3 indicates that libstdc++3 is in use too. In that + case the definition of string::const_iterator is not the same as + const char * and we need these extra functions */ +#if __GNUC__ >= 3 +int stringcmp(string::const_iterator A,string::const_iterator AEnd, + const char *B,const char *BEnd); +int stringcmp(string::const_iterator A,string::const_iterator AEnd, + string::const_iterator B,string::const_iterator BEnd); +int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, + const char *B,const char *BEnd); +int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, + string::const_iterator B,string::const_iterator BEnd); + +inline int stringcmp(string::const_iterator A,string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));}; +inline int stringcasecmp(string::const_iterator A,string::const_iterator Aend,const char *B) {return stringcasecmp(A,Aend,B,B+strlen(B));}; +#endif + +APT_MKSTRCMP2(stringcmp,stringcmp); +APT_MKSTRCMP2(stringcasecmp,stringcasecmp); + +inline const char *DeNull(const char *s) {return (s == 0?"(null)":s);}; class URI { @@ -93,4 +135,6 @@ struct RxChoiceList unsigned long RegexChoice(RxChoiceList *Rxs,const char **ListBegin, const char **ListEnd); +#undef APT_FORMAT2 + #endif diff --git a/apt/apt-pkg/contrib/system.h b/apt/apt-pkg/contrib/system.h index 8e31828..7528671 100644 --- a/apt/apt-pkg/contrib/system.h +++ b/apt/apt-pkg/contrib/system.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: system.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: system.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### System Header - Usefull private definitions diff --git a/apt/apt-pkg/deb/CVS/Entries b/apt/apt-pkg/deb/CVS/Entries deleted file mode 100644 index 4a3a09e..0000000 --- a/apt/apt-pkg/deb/CVS/Entries +++ /dev/null @@ -1,13 +0,0 @@ -/debfactory.cc/1.6/Fri Aug 10 14:00:34 2001// -/debfactory.h/1.6/Fri Aug 10 14:00:34 2001// -/deblistparser.cc/1.1.1.1/Fri Aug 10 14:00:36 2001// -/deblistparser.h/1.1.1.1/Fri Aug 10 14:00:36 2001// -/debrecords.cc/1.1.1.1/Fri Aug 10 14:00:36 2001// -/debrecords.h/1.1.1.1/Fri Aug 10 14:00:37 2001// -/debsrcrecords.cc/1.2/Fri Aug 10 14:00:37 2001// -/debsrcrecords.h/1.1.1.1/Fri Aug 10 14:00:37 2001// -/dpkginit.cc/1.1.1.1/Fri Aug 10 14:00:37 2001// -/dpkginit.h/1.1.1.1/Fri Aug 10 14:00:37 2001// -/dpkgpm.cc/1.1.1.1/Fri Aug 10 14:00:37 2001// -/dpkgpm.h/1.1.1.1/Fri Aug 10 14:00:37 2001// -D diff --git a/apt/apt-pkg/deb/CVS/Repository b/apt/apt-pkg/deb/CVS/Repository deleted file mode 100644 index b73f528..0000000 --- a/apt/apt-pkg/deb/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/apt-pkg/deb diff --git a/apt/apt-pkg/deb/CVS/Root b/apt/apt-pkg/deb/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/apt-pkg/deb/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/apt-pkg/deb/debfactory.cc b/apt/apt-pkg/deb/debfactory.cc deleted file mode 100644 index e5e2fa6..0000000 --- a/apt/apt-pkg/deb/debfactory.cc +++ /dev/null @@ -1,197 +0,0 @@ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - - -pkgPackageManager *DebianFactory::CreatePackageManager(pkgDepCache &Cache) -{ - return new pkgDPkgPM(Cache); -} - - -pkgRecords::Parser *DebianFactory::CreateRecordParser(string File, pkgCache &Cache) -{ - FileFd f; - - f = FileFd(File, FileFd::ReadOnly); - if (_error->PendingError()) - return NULL; - - return new debRecordParser(f, Cache); -} - - -pkgSrcRecords::Parser *DebianFactory::CreateSrcRecordParser(string File, - pkgSourceList::const_iterator SrcItem) -{ - FileFd *f; - - f = new FileFd(File, FileFd::ReadOnly); - if (_error->PendingError()) { - delete f; - return NULL; - } - - return new debSrcRecordParser(f, SrcItem); -} - - -bool DebianFactory::checkSourceType(int type, bool binary) -{ - if (binary) - return (type == pkgSourceList::Deb); - else - return (type == pkgSourceList::DebSrc); -} - - -pkgCacheGenerator::ListParser *DebianFactory::CreateListParser(FileFd &File) -{ - return new debListParser(File); -} - - - /*}}}*/ -// PkgCacheCheck - Check if the package cache is uptodate /*{{{*/ -// --------------------------------------------------------------------- -/* This does a simple check of all files used to compose the cache */ -bool DebianFactory::packageCacheCheck(string CacheFile) -{ - if (_error->PendingError() == true) - return false; - - // Open the source package cache - if (FileExists(CacheFile) == false) - return false; - - FileFd CacheF(CacheFile,FileFd::ReadOnly); - if (_error->PendingError() == true) - { - _error->Discard(); - return false; - } - - MMap Map(CacheF,MMap::Public | MMap::ReadOnly); - if (_error->PendingError() == true || Map.Size() == 0) - { - _error->Discard(); - return false; - } - - pkgCache Cache(Map); - if (_error->PendingError() == true) - { - _error->Discard(); - return false; - } - - // Status files that must be in the cache - string Status[3]; - Status[0] = _config->FindFile("Dir::State::xstatus"); - Status[1]= _config->FindFile("Dir::State::userstatus"); - Status[2] = _config->FindFile("Dir::State::status"); - - // Cheack each file - for (pkgCache::PkgFileIterator F(Cache); F.end() == false; F++) - { - if (F.IsOk() == false) - return false; - - // See if this is one of the status files - for (int I = 0; I != 3; I++) - if (F.FileName() == Status[I]) - Status[I] = string(); - } - - // Make sure all the status files are loaded. - for (int I = 0; I != 3; I++) - { - if (Status[I].empty() == false && FileExists(Status[I]) == true) - return false; - } - - return true; -} - /*}}}*/ -// AddStatusSize - Add the size of the status files /*{{{*/ -// --------------------------------------------------------------------- -/* This adds the size of all the status files to the size counter */ -bool DebianFactory::addStatusSize(unsigned long &TotalSize) -{ - // Grab the file names - string xstatus = _config->FindFile("Dir::State::xstatus"); - string userstatus = _config->FindFile("Dir::State::userstatus"); - string status = _config->FindFile("Dir::State::status"); - - // Grab the sizes - struct stat Buf; - if (stat(xstatus.c_str(),&Buf) == 0) - TotalSize += Buf.st_size; - if (stat(userstatus.c_str(),&Buf) == 0) - TotalSize += Buf.st_size; - if (stat(status.c_str(),&Buf) != 0) - return _error->Errno("stat","Couldn't stat the status file %s",status.c_str()); - TotalSize += Buf.st_size; - - return true; -} - /*}}}*/ -// MergeInstalledPackages (was MergeStatus) - Add the status files to the cache /*{{{*/ -// --------------------------------------------------------------------- -/* This adds the status files to the map */ -bool DebianFactory::mergeInstalledPackages(OpProgress &Progress, - pkgCacheGenerator &Gen, - unsigned long &CurrentSize, - unsigned long TotalSize) -{ - // Grab the file names - string Status[3]; - Status[0] = _config->FindFile("Dir::State::xstatus"); - Status[1]= _config->FindFile("Dir::State::userstatus"); - Status[2] = _config->FindFile("Dir::State::status"); - - for (int I = 0; I != 3; I++) - { - pkgCacheGenerator::ListParser *Parser; - - // Check if the file exists and it is not the primary status file. - string File = Status[I]; - if (I != 2 && FileExists(File) == false) - continue; - - FileFd Pkg(File,FileFd::ReadOnly); - Parser = new debListParser(Pkg); - - Progress.OverallProgress(CurrentSize,TotalSize,Pkg.Size(),"Reading Package Lists"); - if (_error->PendingError() == true) - return _error->Error("Problem opening %s",File.c_str()); - CurrentSize += Pkg.Size(); - - Progress.SubProgress(0,"Local Package State - " + flNotDir(File)); - if (Gen.SelectFile(File,pkgCache::Flag::NotSource) == false) - return _error->Error("Problem with SelectFile %s",File.c_str()); - - if (Gen.MergeList(*Parser) == false) - return _error->Error("Problem with MergeList %s",File.c_str()); - Progress.Progress(Pkg.Size()); - - delete Parser; - } - - return true; -} - /*}}}*/ diff --git a/apt/apt-pkg/deb/debfactory.h b/apt/apt-pkg/deb/debfactory.h deleted file mode 100644 index f25f965..0000000 --- a/apt/apt-pkg/deb/debfactory.h +++ /dev/null @@ -1,31 +0,0 @@ - -#ifndef _DEBIANFACTORY_H_ -#define _DEBIANFACTORY_H_ - -#include - - -class DebianFactory : public SystemFactory -{ -// for cache generation - protected: - bool addStatusSize(unsigned long &TotalSize); - - bool mergeInstalledPackages(OpProgress &Progress,pkgCacheGenerator &Gen, - unsigned long &CurrentSize, - unsigned long TotalSize); - - protected: - bool packageCacheCheck(string CacheFile); - - bool checkSourceType(int type, bool binary=true); - - public: -// other stuffs - pkgCacheGenerator::ListParser *CreateListParser(FileFd &File); - pkgRecords::Parser *CreateRecordParser(string File, pkgCache &Cache); - pkgSrcRecords::Parser *CreateSrcRecordParser(string File, pkgSourceList::const_iterator SrcItem); - pkgPackageManager *CreatePackageManager(pkgDepCache &Cache); -}; - -#endif diff --git a/apt/apt-pkg/deb/debindexfile.cc b/apt/apt-pkg/deb/debindexfile.cc new file mode 100644 index 0000000..bbe50db --- /dev/null +++ b/apt/apt-pkg/deb/debindexfile.cc @@ -0,0 +1,509 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debindexfile.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ +/* ###################################################################### + + Debian Specific sources.list types and the three sorts of Debian + index files. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/debindexfile.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + /*}}}*/ + +// SourcesIndex::debSourcesIndex - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debSourcesIndex::debSourcesIndex(string URI,string Dist,string Section) : + URI(URI), Dist(Dist), Section(Section) +{ +} + /*}}}*/ +// SourcesIndex::SourceInfo - Short 1 liner describing a source /*{{{*/ +// --------------------------------------------------------------------- +/* The result looks like: + http://foo/ stable/main src 1.1.1 (dsc) */ +string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record, + pkgSrcRecords::File const &File) const +{ + string Res; + Res = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res += Dist; + } + else + Res += Dist + '/' + Section; + + Res += " "; + Res += Record.Package(); + Res += " "; + Res += Record.Version(); + if (File.Type.empty() == false) + Res += " (" + File.Type + ")"; + return Res; +} + /*}}}*/ +// SourcesIndex::CreateSrcParser - Get a parser for the source files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const +{ + string SourcesURI = URItoFileName(IndexURI("Sources")); + return new debSrcRecordParser(_config->FindDir("Dir::State::lists") + + SourcesURI,this); +} + /*}}}*/ +// 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("Packages").c_str()); + else + snprintf(S,sizeof(S),"%s (%s)",Info("Packages").c_str(), + IndexFile("Sources").c_str()); + + return S; +} + /*}}}*/ +// SourcesIndex::Info - One liner describing the index URI /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string debSourcesIndex::Info(const char *Type) const +{ + string Info = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Info += Dist; + } + else + Info += Dist + '/' + Section; + Info += " "; + Info += Type; + return Info; +} + /*}}}*/ +// SourcesIndex::Index* - Return the URI to the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +inline string debSourcesIndex::IndexFile(const char *Type) const +{ + return URItoFileName(IndexURI(Type)); +} +string debSourcesIndex::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 + + "/source/"; + + Res += Type; + return Res; +} + /*}}}*/ +// SourcesIndex::GetIndexes - Fetch the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debSourcesIndex::GetIndexes(pkgAcquire *Owner) const +{ + // CNC:2002-07-03 + new pkgAcqIndex(Owner,NULL,IndexURI("Sources"),Info("Sources"),"Sources"); + new pkgAcqIndexRel(Owner,NULL,IndexURI("Release"),Info("Release"),"Release"); + return true; +} + /*}}}*/ +// SourcesIndex::Exists - Check if the index is available /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debSourcesIndex::Exists() const +{ + return FileExists(IndexFile("Sources")); +} + /*}}}*/ +// SourcesIndex::Size - Return the size of the index /*{{{*/ +// --------------------------------------------------------------------- +/* */ +unsigned long debSourcesIndex::Size() const +{ + struct stat S; + if (stat(IndexFile("Sources").c_str(),&S) != 0) + return 0; + return S.st_size; +} + /*}}}*/ + +// PackagesIndex::debPackagesIndex - Contructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debPackagesIndex::debPackagesIndex(string URI,string Dist,string Section) : + URI(URI), Dist(Dist), Section(Section) +{ +} + /*}}}*/ +// 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::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res += Dist; + } + else + Res += Dist + '/' + Section; + + Res += " "; + Res += Ver.ParentPkg().Name(); + Res += " "; + 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 +{ + string Info = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Info += Dist; + } + else + Info += Dist + '/' + Section; + Info += " "; + Info += Type; + return Info; +} + /*}}}*/ +// PackagesIndex::Index* - Return the URI to the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +inline string debPackagesIndex::IndexFile(const char *Type) const +{ + return _config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); +} +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-" + _config->Find("APT::Architecture") + '/'; + + Res += Type; + return Res; +} + /*}}}*/ +// PackagesIndex::GetIndexes - Fetch the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debPackagesIndex::GetIndexes(pkgAcquire *Owner) const +{ + // CNC:2002-07-03 + new pkgAcqIndex(Owner,NULL,IndexURI("Packages"),Info("Packages"),"Packages"); + new pkgAcqIndexRel(Owner,NULL,IndexURI("Release"),Info("Release"),"Release"); + return true; +} + /*}}}*/ +// 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 +{ + struct stat S; + if (stat(IndexFile("Packages").c_str(),&S) != 0) + return 0; + return S.st_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); + debListParser Parser(&Pkg); + if (_error->PendingError() == true) + return _error->Error("Problem opening %s",PackageFile.c_str()); + + 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(); + struct stat St; + if (fstat(Pkg.Fd(),&St) != 0) + return _error->Errno("fstat","Failed to stat"); + File->Size = St.st_size; + File->mtime = St.st_mtime; + + if (Gen.MergeList(Parser) == false) + return _error->Error("Problem with MergeList %s",PackageFile.c_str()); + + // Check the release file + string ReleaseFile = IndexFile("Release"); + if (FileExists(ReleaseFile) == true) + { + FileFd Rel(ReleaseFile,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + Parser.LoadReleaseInfo(File,Rel); + } + + 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 (FileName != File.FileName()) + continue; + + struct stat St; + if (stat(File.FileName(),&St) != 0) + return pkgCache::PkgFileIterator(Cache); + if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime) + return pkgCache::PkgFileIterator(Cache); + return File; + } + + return File; +} + /*}}}*/ + +// StatusIndex::debStatusIndex - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debStatusIndex::debStatusIndex(string File) : File(File) +{ +} + /*}}}*/ +// 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); + if (_error->PendingError() == true) + return false; + debListParser Parser(&Pkg); + if (_error->PendingError() == true) + return false; + + 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(); + struct stat St; + if (fstat(Pkg.Fd(),&St) != 0) + return _error->Errno("fstat","Failed to stat"); + CFile->Size = St.st_size; + CFile->mtime = St.st_mtime; + CFile->Archive = Gen.WriteUniqString("now"); + + 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 +{ + 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) + return pkgCache::PkgFileIterator(Cache); + if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime) + return pkgCache::PkgFileIterator(Cache); + return File; + } + return File; +} + /*}}}*/ +// StatusIndex::Exists - Check if the index is available /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debStatusIndex::Exists() const +{ + // Abort if the file does not exist. + return true; +} + /*}}}*/ + +// Source List types for Debian /*{{{*/ +class debSLTypeDeb : public pkgSourceList::Type +{ + public: + + bool CreateItem(vector &List,string URI, + string Dist,string Section, + pkgSourceList::Vendor const *Vendor) const + { + List.push_back(new debPackagesIndex(URI,Dist,Section)); + return true; + }; + + debSLTypeDeb() + { + Name = "deb"; + Label = "Standard Debian binary tree"; + } +}; + +class debSLTypeDebSrc : public pkgSourceList::Type +{ + public: + + bool CreateItem(vector &List,string URI, + string Dist,string Section, + pkgSourceList::Vendor const *Vendor) const + { + List.push_back(new debSourcesIndex(URI,Dist,Section)); + return true; + }; + + debSLTypeDebSrc() + { + Name = "deb-src"; + Label = "Standard Debian source tree"; + } +}; + +debSLTypeDeb _apt_DebType; +debSLTypeDebSrc _apt_DebSrcType; + /*}}}*/ +// Index File types for Debian /*{{{*/ +class debIFTypeSrc : public pkgIndexFile::Type +{ + public: + + debIFTypeSrc() {Label = "Debian Source Index";}; +}; +class debIFTypePkg : public pkgIndexFile::Type +{ + public: + + virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const + { + return new debRecordParser(File.FileName(),*File.Cache()); + }; + debIFTypePkg() {Label = "Debian Package Index";}; +}; +class debIFTypeStatus : public pkgIndexFile::Type +{ + public: + + virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const + { + return new debRecordParser(File.FileName(),*File.Cache()); + }; + debIFTypeStatus() {Label = "Debian dpkg status file";}; +}; +static debIFTypeSrc _apt_Src; +static debIFTypePkg _apt_Pkg; +static debIFTypeStatus _apt_Status; + +const pkgIndexFile::Type *debSourcesIndex::GetType() const +{ + return &_apt_Src; +} +const pkgIndexFile::Type *debPackagesIndex::GetType() const +{ + return &_apt_Pkg; +} +const pkgIndexFile::Type *debStatusIndex::GetType() const +{ + return &_apt_Status; +} + + /*}}}*/ diff --git a/apt/apt-pkg/deb/debindexfile.h b/apt/apt-pkg/deb/debindexfile.h new file mode 100644 index 0000000..9d64244 --- /dev/null +++ b/apt/apt-pkg/deb/debindexfile.h @@ -0,0 +1,112 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debindexfile.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + Debian Index Files + + There are three sorts currently + + Package files that have File: tags + Package files that don't (/var/lib/dpkg/status) + Source files + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_DEBINDEXFILE_H +#define PKGLIB_DEBINDEXFILE_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/debindexfile.h" +#endif + +#include + +class debStatusIndex : public pkgIndexFile +{ + string File; + + public: + + virtual const Type *GetType() const; + + // Interface for acquire + virtual 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; + virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; + + debStatusIndex(string File); +}; + +class debPackagesIndex : public pkgIndexFile +{ + string URI; + string Dist; + string Section; + + string Info(const char *Type) const; + string IndexFile(const char *Type) const; + string IndexURI(const char *Type) const; + + public: + + virtual const Type *GetType() const; + + // Stuff for accessing files on remote items + virtual string ArchiveInfo(pkgCache::VerIterator Ver) const; + virtual string ArchiveURI(string File) const {return URI + File;}; + + // Interface for acquire + virtual string Describe(bool Short) const; + virtual bool GetIndexes(pkgAcquire *Owner) const; + + // 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(string URI,string Dist,string Section); +}; + +class debSourcesIndex : public pkgIndexFile +{ + string URI; + string Dist; + string Section; + + string Info(const char *Type) const; + string IndexFile(const char *Type) const; + string IndexURI(const char *Type) const; + + public: + + virtual const Type *GetType() const; + + // Stuff for accessing files on remote items + virtual string SourceInfo(pkgSrcRecords::Parser const &Record, + pkgSrcRecords::File const &File) const; + virtual string ArchiveURI(string File) const {return URI + File;}; + + // Interface for acquire + virtual string Describe(bool Short) const; + virtual bool GetIndexes(pkgAcquire *Owner) const; + + // Interface for the record parsers + virtual pkgSrcRecords::Parser *CreateSrcParser() const; + + // Interface for the Cache Generator + virtual bool Exists() const; + virtual bool HasPackages() const {return false;}; + virtual unsigned long Size() const; + + debSourcesIndex(string URI,string Dist,string Section); +}; + +#endif diff --git a/apt/apt-pkg/deb/deblistparser.cc b/apt/apt-pkg/deb/deblistparser.cc index 710ff70..a3d41f7 100644 --- a/apt/apt-pkg/deb/deblistparser.cc +++ b/apt/apt-pkg/deb/deblistparser.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: deblistparser.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: deblistparser.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -16,13 +16,22 @@ #include #include +#include + #include /*}}}*/ +static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important}, + {"required",pkgCache::State::Required}, + {"standard",pkgCache::State::Standard}, + {"optional",pkgCache::State::Optional}, + {"extra",pkgCache::State::Extra}, + {}}; + // ListParser::debListParser - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -debListParser::debListParser(FileFd &File) : Tags(File) +debListParser::debListParser(FileFd *File) : Tags(File) { Arch = _config->Find("APT::architecture"); } @@ -80,14 +89,8 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) const char *Start; const char *Stop; if (Section.Find("Priority",Start,Stop) == true) - { - WordList PrioList[] = {{"important",pkgCache::State::Important}, - {"required",pkgCache::State::Required}, - {"standard",pkgCache::State::Standard}, - {"optional",pkgCache::State::Optional}, - {"extra",pkgCache::State::Extra}}; - if (GrabWord(string(Start,Stop-Start),PrioList, - _count(PrioList),Ver->Priority) == false) + { + if (GrabWord(string(Start,Stop-Start),PrioList,Ver->Priority) == false) Ver->Priority = pkgCache::State::Extra; } @@ -104,6 +107,10 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Replaces) == false) return false; + // Obsolete. + if (ParseDepends(Ver,"Optional",pkgCache::Dep::Suggests) == false) + return false; + if (ParseProvides(Ver) == false) return false; @@ -145,7 +152,7 @@ unsigned short debListParser::VersionHash() "Conflicts", "Replaces",0}; unsigned long Result = INIT_FCS; - char S[300]; + char S[1024]; for (const char **I = Sections; *I != 0; I++) { const char *Start; @@ -166,7 +173,7 @@ unsigned short debListParser::VersionHash() if (*Start == '>' && Start[1] != '>' && Start[1] != '=') *I++ = '='; } - + Result = AddCRC16(Result,S,I - S); } @@ -205,9 +212,9 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator Pkg, {"install",pkgCache::State::Install}, {"hold",pkgCache::State::Hold}, {"deinstall",pkgCache::State::DeInstall}, - {"purge",pkgCache::State::Purge}}; - if (GrabWord(string(Start,I-Start),WantList, - _count(WantList),Pkg->SelectedState) == false) + {"purge",pkgCache::State::Purge}, + {}}; + if (GrabWord(string(Start,I-Start),WantList,Pkg->SelectedState) == false) return _error->Error("Malformed 1st word in the Status line"); // Isloate the next word @@ -221,9 +228,9 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator Pkg, WordList FlagList[] = {{"ok",pkgCache::State::Ok}, {"reinstreq",pkgCache::State::ReInstReq}, {"hold",pkgCache::State::HoldInst}, - {"hold-reinstreq",pkgCache::State::HoldReInstReq}}; - if (GrabWord(string(Start,I-Start),FlagList, - _count(FlagList),Pkg->InstState) == false) + {"hold-reinstreq",pkgCache::State::HoldReInstReq}, + {}}; + if (GrabWord(string(Start,I-Start),FlagList,Pkg->InstState) == false) return _error->Error("Malformed 2nd word in the Status line"); // Isloate the last word @@ -241,9 +248,9 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator Pkg, {"half-installed",pkgCache::State::HalfInstalled}, {"config-files",pkgCache::State::ConfigFiles}, {"post-inst-failed",pkgCache::State::HalfConfigured}, - {"removal-failed",pkgCache::State::HalfInstalled}}; - if (GrabWord(string(Start,I-Start),StatusList, - _count(StatusList),Pkg->CurrentState) == false) + {"removal-failed",pkgCache::State::HalfInstalled}, + {}}; + if (GrabWord(string(Start,I-Start),StatusList,Pkg->CurrentState) == false) return _error->Error("Malformed 3rd word in the Status line"); /* A Status line marks the package as indicating the current @@ -266,9 +273,67 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator Pkg, // --------------------------------------------------------------------- /* This parses the dependency elements out of a standard string in place, bit by bit. */ +const char *debListParser::ConvertRelation(const char *I,unsigned int &Op) +{ + // Determine the operator + switch (*I) + { + case '<': + I++; + if (*I == '=') + { + I++; + Op = pkgCache::Dep::LessEq; + break; + } + + if (*I == '<') + { + I++; + Op = pkgCache::Dep::Less; + break; + } + + // < is the same as <= and << is really Cs < for some reason + Op = pkgCache::Dep::LessEq; + break; + + case '>': + I++; + if (*I == '=') + { + I++; + Op = pkgCache::Dep::GreaterEq; + break; + } + + if (*I == '>') + { + I++; + Op = pkgCache::Dep::Greater; + break; + } + + // > is the same as >= and >> is really Cs > for some reason + Op = pkgCache::Dep::GreaterEq; + break; + + case '=': + Op = pkgCache::Dep::Equals; + I++; + break; + + // HACK around bad package definitions + default: + Op = pkgCache::Dep::Equals; + break; + } + return I; +} + const char *debListParser::ParseDepends(const char *Start,const char *Stop, string &Package,string &Ver, - unsigned int &Op) + unsigned int &Op, bool ParseArchFlags) { // Strip off leading space for (;Start != Stop && isspace(*Start) != 0; Start++); @@ -298,60 +363,7 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, for (I++; I != Stop && isspace(*I) != 0 ; I++); if (I + 3 >= Stop) return 0; - - // Determine the operator - switch (*I) - { - case '<': - I++; - if (*I == '=') - { - I++; - Op = pkgCache::Dep::LessEq; - break; - } - - if (*I == '<') - { - I++; - Op = pkgCache::Dep::Less; - break; - } - - // < is the same as <= and << is really Cs < for some reason - Op = pkgCache::Dep::LessEq; - break; - - case '>': - I++; - if (*I == '=') - { - I++; - Op = pkgCache::Dep::GreaterEq; - break; - } - - if (*I == '>') - { - I++; - Op = pkgCache::Dep::Greater; - break; - } - - // > is the same as >= and >> is really Cs > for some reason - Op = pkgCache::Dep::GreaterEq; - break; - - case '=': - Op = pkgCache::Dep::Equals; - I++; - break; - - // HACK around bad package definitions - default: - Op = pkgCache::Dep::Equals; - break; - } + I = ConvertRelation(I,Op); // Skip whitespace for (;I != Stop && isspace(*I) != 0; I++); @@ -375,6 +387,60 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, // Skip whitespace for (;I != Stop && isspace(*I) != 0; I++); + + if (ParseArchFlags == true) + { + string arch = _config->Find("APT::Architecture"); + + // Parse an architecture + if (I != Stop && *I == '[') + { + // malformed + I++; + if (I == Stop) + return 0; + + const char *End = I; + bool Found = false; + bool NegArch = false; + while (I != Stop) + { + // look for whitespace or ending ']' + while (End != Stop && !isspace(*End) && *End != ']') + End++; + + if (End == Stop) + return 0; + + if (*I == '!') + { + NegArch = true; + I++; + } + + if (stringcmp(arch,I,End) == 0) + Found = true; + + if (*End++ == ']') { + I = End; + break; + } + + I = End; + for (;I != Stop && isspace(*I) != 0; I++); + } + + if (NegArch) + Found = !Found; + + if (Found == false) + Package = ""; /* not for this arch */ + } + + // Skip whitespace + for (;I != Stop && isspace(*I) != 0; I++); + } + if (I != Stop && *I == '|') Op |= pkgCache::Dep::Or; @@ -453,10 +519,9 @@ bool debListParser::ParseProvides(pkgCache::VerIterator Ver) // ListParser::GrabWord - Matches a word and returns /*{{{*/ // --------------------------------------------------------------------- /* Looks for a word in a list of words - for ParseStatus */ -bool debListParser::GrabWord(string Word,WordList *List,int Count, - unsigned char &Out) +bool debListParser::GrabWord(string Word,WordList *List,unsigned char &Out) { - for (int C = 0; C != Count; C++) + for (unsigned int C = 0; List[C].Str != 0; C++) { if (strcasecmp(Word.c_str(),List[C].Str) == 0) { @@ -483,7 +548,7 @@ bool debListParser::Step() if (Section.Find("Architecture",Start,Stop) == false) return true; - if (stringcmp(Start,Stop,Arch.begin(),Arch.end()) == 0) + if (stringcmp(Arch,Start,Stop) == 0) return true; if (stringcmp(Start,Stop,"all") == 0) @@ -500,7 +565,7 @@ bool debListParser::Step() bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, FileFd &File) { - pkgTagFile Tags(File); + pkgTagFile Tags(&File); pkgTagSection Section; if (Tags.Step(Section) == false) return false; @@ -527,3 +592,15 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, return !_error->PendingError(); } /*}}}*/ +// ListParser::GetPrio - Convert the priority from a string /*{{{*/ +// --------------------------------------------------------------------- +/* */ +unsigned char debListParser::GetPrio(string Str) +{ + unsigned char Out; + if (GrabWord(Str,PrioList,Out) == false) + Out = pkgCache::State::Extra; + + return Out; +} + /*}}}*/ diff --git a/apt/apt-pkg/deb/deblistparser.h b/apt/apt-pkg/deb/deblistparser.h index 9807458..9ba033c 100644 --- a/apt/apt-pkg/deb/deblistparser.h +++ b/apt/apt-pkg/deb/deblistparser.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: deblistparser.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: deblistparser.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### Debian Package List Parser - This implements the abstract parser @@ -8,7 +8,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_DEBLISTPARSER_H #define PKGLIB_DEBLISTPARSER_H @@ -17,29 +16,33 @@ class debListParser : public pkgCacheGenerator::ListParser { + public: + + // Parser Helper + struct WordList + { + const char *Str; + unsigned char Val; + }; + + private: + pkgTagFile Tags; pkgTagSection Section; unsigned long iOffset; string Arch; - // Parser Helper - struct WordList - { - char *Str; - unsigned char Val; - }; - unsigned long UniqFindTagWrite(const char *Tag); bool ParseStatus(pkgCache::PkgIterator Pkg,pkgCache::VerIterator Ver); - const char *ParseDepends(const char *Start,const char *Stop, - string &Package,string &Ver,unsigned int &Op); bool ParseDepends(pkgCache::VerIterator Ver,const char *Tag, unsigned int Type); bool ParseProvides(pkgCache::VerIterator Ver); - bool GrabWord(string Word,WordList *List,int Count,unsigned char &Out); + static bool GrabWord(string Word,WordList *List,unsigned char &Out); public: - + + static unsigned char GetPrio(string Str); + // These all operate against the current section virtual string Package(); virtual string Version(); @@ -51,10 +54,15 @@ class debListParser : public pkgCacheGenerator::ListParser virtual unsigned long Size() {return Section.size();}; virtual bool Step(); - + bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI,FileFd &File); - debListParser(FileFd &File); + static const char *ParseDepends(const char *Start,const char *Stop, + string &Package,string &Ver,unsigned int &Op, + bool ParseArchFlags = false); + static const char *ConvertRelation(const char *I,unsigned int &Op); + + debListParser(FileFd *File); }; #endif diff --git a/apt/apt-pkg/deb/debrecords.cc b/apt/apt-pkg/deb/debrecords.cc index d818444..aa6253a 100644 --- a/apt/apt-pkg/deb/debrecords.cc +++ b/apt/apt-pkg/deb/debrecords.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debrecords.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: debrecords.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### Debian Package Records - Parser for debian package records @@ -18,8 +18,9 @@ // RecordParser::debRecordParser - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -debRecordParser::debRecordParser(FileFd &File,pkgCache &Cache) : - Tags(File,Cache.Head().MaxVerFileSize + 20) +debRecordParser::debRecordParser(string FileName,pkgCache &Cache) : + File(FileName,FileFd::ReadOnly), + Tags(&File,Cache.Head().MaxVerFileSize + 200) { } /*}}}*/ @@ -39,12 +40,28 @@ string debRecordParser::FileName() return Section.FindS("Filename"); } /*}}}*/ +// RecordParser::Name - Return the package name /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string debRecordParser::Name() +{ + return Section.FindS("Package"); +} + /*}}}*/ // RecordParser::MD5Hash - Return the archive hash /*{{{*/ // --------------------------------------------------------------------- /* */ string debRecordParser::MD5Hash() { - return Section.FindS("MD5sum"); + return Section.FindS("MD5Sum"); +} + /*}}}*/ +// RecordParser::SHA1Hash - Return the archive hash /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string debRecordParser::SHA1Hash() +{ + return Section.FindS("SHA1Sum"); } /*}}}*/ // RecordParser::Maintainer - Return the maintainer email /*{{{*/ @@ -87,3 +104,11 @@ string debRecordParser::SourcePkg() return string(Res,0,Pos); } /*}}}*/ +// RecordParser::GetRec - Return the whole record /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void debRecordParser::GetRec(const char *&Start,const char *&Stop) +{ + Section.GetSection(Start,Stop); +} + /*}}}*/ diff --git a/apt/apt-pkg/deb/debrecords.h b/apt/apt-pkg/deb/debrecords.h index 914702e..8760c38 100644 --- a/apt/apt-pkg/deb/debrecords.h +++ b/apt/apt-pkg/deb/debrecords.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debrecords.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: debrecords.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### Debian Package Records - Parser for debian package records @@ -11,7 +11,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_DEBRECORDS_H #define PKGLIB_DEBRECORDS_H @@ -24,9 +23,10 @@ class debRecordParser : public pkgRecords::Parser { + FileFd File; pkgTagFile Tags; pkgTagSection Section; - + protected: virtual bool Jump(pkgCache::VerFileIterator const &Ver); @@ -36,15 +36,18 @@ class debRecordParser : public pkgRecords::Parser // These refer to the archive file for the Version virtual string FileName(); virtual string MD5Hash(); + virtual string SHA1Hash(); virtual string SourcePkg(); // These are some general stats about the package virtual string Maintainer(); virtual string ShortDesc(); virtual string LongDesc(); + virtual string Name(); + + virtual void GetRec(const char *&Start,const char *&Stop); - debRecordParser(FileFd &File,pkgCache &Cache); + debRecordParser(string FileName,pkgCache &Cache); }; - #endif diff --git a/apt/apt-pkg/deb/debsrcrecords.cc b/apt/apt-pkg/deb/debsrcrecords.cc index 6b93a52..df9ffa3 100644 --- a/apt/apt-pkg/deb/debsrcrecords.cc +++ b/apt/apt-pkg/deb/debsrcrecords.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debsrcrecords.cc,v 1.2 2000/10/29 20:25:10 kojima Exp $ +// $Id: debsrcrecords.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Debian Source Package Records - Parser implementation for Debian style @@ -13,9 +13,11 @@ #pragma implementation "apt-pkg/debsrcrecords.h" #endif +#include #include #include #include +#include /*}}}*/ // SrcRecordParser::Binaries - Return the binaries field /*{{{*/ @@ -23,43 +25,66 @@ /* This member parses the binaries field into a pair of class arrays and returns a list of strings representing all of the components of the binaries field. The returned array need not be freed and will be - reused by the next Binaries function call. */ + reused by the next Binaries function call. This function is commonly + used during scanning to find the right package */ const char **debSrcRecordParser::Binaries() { + // This should use Start/Stop too, it is supposed to be efficient after all. string Bins = Sect.FindS("Binary"); - char *Buf = Buffer; - unsigned int Bin = 0; - if (Bins.empty() == true) + if (Bins.empty() == true || Bins.length() >= sizeof(Buffer)) return 0; - // XXX no bounds check: exploitable? - // Strip any leading spaces - string::const_iterator Start = Bins.begin(); - for (; Start != Bins.end() && isspace(*Start) != 0; Start++); + + strcpy(Buffer,Bins.c_str()); + if (TokSplitString(',',Buffer,StaticBinList, + sizeof(StaticBinList)/sizeof(StaticBinList[0])) == false) + return 0; + return (const char **)StaticBinList; +} + /*}}}*/ +// SrcRecordParser::BuildDepends - Return the Build-Depends information /*{{{*/ +// --------------------------------------------------------------------- +/* This member parses the build-depends information and returns a list of + package/version records representing the build dependency. The returned + array need not be freed and will be reused by the next call to this + function */ +bool debSrcRecordParser::BuildDepends(vector &BuildDeps, bool ArchOnly) +{ + unsigned int I; + const char *Start, *Stop; + BuildDepRec rec; + const char *fields[] = {"Build-Depends", + "Build-Depends-Indep", + "Build-Conflicts", + "Build-Conflicts-Indep"}; - string::const_iterator Pos = Start; - while (Pos != Bins.end()) + BuildDeps.clear(); + + for (I = 0; I < 4; I++) { - // Skip to the next ',' - for (; Pos != Bins.end() && *Pos != ','; Pos++); + if (ArchOnly && (I == 1 || I == 3)) + continue; + + if (Sect.Find(fields[I], Start, Stop) == false) + continue; - // Back remove spaces - string::const_iterator End = Pos; - for (; End > Start && (End[-1] == ',' || isspace(End[-1]) != 0); End--); - - // Stash the string - memcpy(Buf,Start,End-Start); - StaticBinList[Bin] = Buf; - Bin++; - Buf += End-Start; - *Buf++ = 0; - - // Advance pos - for (; Pos != Bins.end() && (*Pos == ',' || isspace(*Pos) != 0); Pos++); - Start = Pos; + while (1) + { + Start = debListParser::ParseDepends(Start, Stop, + rec.Package,rec.Version,rec.Op,true); + + if (Start == 0) + return _error->Error("Problem parsing dependency: %s", fields[I]); + rec.Type = I; + + if (rec.Package != "") + BuildDeps.push_back(rec); + + if (Start == Stop) + break; + } } - StaticBinList[Bin] = 0; - return StaticBinList; + return true; } /*}}}*/ // SrcRecordParser::Files - Return a list of files for this source /*{{{*/ @@ -95,6 +120,25 @@ bool debSrcRecordParser::Files(vector &List) // Parse the size and append the directory F.Size = atoi(Size.c_str()); F.Path = Base + F.Path; + + // Try to guess what sort of file it is we are getting. + string::size_type Pos = F.Path.length()-1; + while (1) + { + string::size_type Tmp = F.Path.rfind('.',Pos); + if (Tmp == string::npos) + break; + F.Type = string(F.Path,Tmp+1,Pos-Tmp); + + if (F.Type == "gz" || F.Type == "bz2") + { + Pos = Tmp-1; + continue; + } + + break; + } + List.push_back(F); } diff --git a/apt/apt-pkg/deb/debsrcrecords.h b/apt/apt-pkg/deb/debsrcrecords.h index 5316889..ff14045 100644 --- a/apt/apt-pkg/deb/debsrcrecords.h +++ b/apt/apt-pkg/deb/debsrcrecords.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debsrcrecords.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: debsrcrecords.h,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Debian Source Package Records - Parser implementation for Debian style @@ -17,13 +17,15 @@ #include #include +#include class debSrcRecordParser : public pkgSrcRecords::Parser { + FileFd Fd; pkgTagFile Tags; pkgTagSection Sect; char Buffer[10000]; - const char *StaticBinList[400]; + char *StaticBinList[400]; unsigned long iOffset; public: @@ -32,11 +34,12 @@ class debSrcRecordParser : public pkgSrcRecords::Parser virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);}; virtual bool Jump(unsigned long Off) {iOffset = Off; return Tags.Jump(Sect,Off);}; - virtual string Package() {return Sect.FindS("Package");}; - virtual string Version() {return Sect.FindS("Version");}; - virtual string Maintainer() {return Sect.FindS("Maintainer");}; - virtual string Section() {return Sect.FindS("Section");}; + virtual string Package() const {return Sect.FindS("Package");}; + virtual string Version() const {return Sect.FindS("Version");}; + virtual string Maintainer() const {return Sect.FindS("Maintainer");}; + virtual string Section() const {return Sect.FindS("Section");}; virtual const char **Binaries(); + virtual bool BuildDepends(vector &BuildDeps, bool ArchOnly); virtual unsigned long Offset() {return iOffset;}; virtual string AsStr() { @@ -45,10 +48,11 @@ class debSrcRecordParser : public pkgSrcRecords::Parser return string(Start,Stop); }; virtual bool Files(vector &F); - - debSrcRecordParser(FileFd *File,pkgSourceList::const_iterator SrcItem) : - Parser(File,SrcItem), - Tags(*File,sizeof(Buffer)) {}; + + debSrcRecordParser(string File,pkgIndexFile const *Index) : + Parser(Index), + Fd(File,FileFd::ReadOnly), + Tags(&Fd,sizeof(Buffer)) {}; }; #endif diff --git a/apt/apt-pkg/deb/debsystem.cc b/apt/apt-pkg/deb/debsystem.cc new file mode 100644 index 0000000..5f5e7db --- /dev/null +++ b/apt/apt-pkg/deb/debsystem.cc @@ -0,0 +1,224 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debsystem.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + System - Abstraction for running on different systems. + + Basic general structure.. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/debsystem.h" +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + /*}}}*/ + +debSystem debSys; + +// System::debSystem - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debSystem::debSystem() +{ + LockFD = -1; + LockCount = 0; + + Label = "Debian dpkg interface"; + VS = &debVS; +} + /*}}}*/ +// System::~debSystem - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debSystem::~debSystem() +{ + delete StatusFile; +} + /*}}}*/ +// System::Lock - Get the lock /*{{{*/ +// --------------------------------------------------------------------- +/* This mirrors the operations dpkg does when it starts up. Note the + checking of the updates directory. */ +bool debSystem::Lock() +{ + // Disable file locking + if (_config->FindB("Debug::NoLocking",false) == true || LockCount > 1) + { + LockCount++; + return true; + } + + // Create the lockfile + string AdminDir = flNotFile(_config->Find("Dir::State::status")); + LockFD = GetLock(AdminDir + "lock"); + if (LockFD == -1) + { + if (errno == EACCES || errno == EAGAIN) + return _error->Error("Unable to lock the administration directory (%s), " + "is another process using it?",AdminDir.c_str()); + else + return _error->Error("Unable to lock the administration directory (%s), " + "are you root?",AdminDir.c_str()); + } + + // See if we need to abort with a dirty journal + if (CheckUpdates() == true) + { + close(LockFD); + LockFD = -1; + return _error->Error("dpkg was interrupted, you must manually " + "run 'dpkg --configure -a' to correct the problem. "); + } + + LockCount++; + + return true; +} + /*}}}*/ +// System::UnLock - Drop a lock /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debSystem::UnLock(bool NoErrors) +{ + if (LockCount == 0 && NoErrors == true) + return false; + + if (LockCount < 1) + return _error->Error("Not locked"); + if (--LockCount == 0) + { + close(LockFD); + LockCount = 0; + } + + return true; +} + /*}}}*/ +// System::CheckUpdates - Check if the updates dir is dirty /*{{{*/ +// --------------------------------------------------------------------- +/* This does a check of the updates directory (dpkg journal) to see if it has + any entries in it. */ +bool debSystem::CheckUpdates() +{ + // Check for updates.. (dirty) + string File = flNotFile(_config->Find("Dir::State::status")) + "updates/"; + DIR *DirP = opendir(File.c_str()); + if (DirP == 0) + return false; + + /* We ignore any files that are not all digits, this skips .,.. and + some tmp files dpkg will leave behind.. */ + bool Damaged = false; + for (struct dirent *Ent = readdir(DirP); Ent != 0; Ent = readdir(DirP)) + { + Damaged = true; + for (unsigned int I = 0; Ent->d_name[I] != 0; I++) + { + // Check if its not a digit.. + if (isdigit(Ent->d_name[I]) == 0) + { + Damaged = false; + break; + } + } + if (Damaged == true) + break; + } + closedir(DirP); + + return Damaged; +} + /*}}}*/ +// System::CreatePM - Create the underlying package manager /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgPackageManager *debSystem::CreatePM(pkgDepCache *Cache) const +{ + return new pkgDPkgPM(Cache); +} + /*}}}*/ +// System::Initialize - Setup the configuration space.. /*{{{*/ +// --------------------------------------------------------------------- +/* These are the Debian specific configuration variables.. */ +bool debSystem::Initialize(Configuration &Cnf) +{ + /* These really should be jammed into a generic 'Local Database' engine + which is yet to be determined. The functions in pkgcachegen should + be the only users of these */ + Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct + Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status"); + Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); + + return true; +} + /*}}}*/ +// System::ArchiveSupported - Is a file format supported /*{{{*/ +// --------------------------------------------------------------------- +/* The standard name for a deb is 'deb'.. There are no seperate versions + of .deb to worry about.. */ +bool debSystem::ArchiveSupported(const char *Type) +{ + if (strcmp(Type,"deb") == 0) + return true; + return false; +} + /*}}}*/ +// System::Score - Determine how 'Debiany' this sys is.. /*{{{*/ +// --------------------------------------------------------------------- +/* We check some files that are sure tell signs of this being a Debian + System.. */ +signed debSystem::Score(Configuration const &Cnf) +{ + signed Score = 0; + if (FileExists(Cnf.FindFile("Dir::State::status","/var/lib/dpkg/status")) == true) + Score += 10; + if (FileExists(Cnf.FindFile("Dir::Bin::dpkg","/usr/bin/dpkg")) == true) + Score += 10; + if (FileExists("/etc/debian_version") == true) + Score += 10; + return Score; +} + /*}}}*/ +// System::AddStatusFiles - Register the status files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debSystem::AddStatusFiles(vector &List) +{ + if (StatusFile == 0) + StatusFile = new debStatusIndex(_config->FindFile("Dir::State::status")); + List.push_back(StatusFile); + return true; +} + /*}}}*/ +// System::FindIndex - Get an index file for status files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debSystem::FindIndex(pkgCache::PkgFileIterator File, + pkgIndexFile *&Found) const +{ + if (StatusFile == 0) + return false; + if (StatusFile->FindInCache(*File.Cache()) == File) + { + Found = StatusFile; + return true; + } + + return false; +} + /*}}}*/ diff --git a/apt/apt-pkg/deb/debsystem.h b/apt/apt-pkg/deb/debsystem.h new file mode 100644 index 0000000..5019d21 --- /dev/null +++ b/apt/apt-pkg/deb/debsystem.h @@ -0,0 +1,47 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debsystem.h,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + System - Debian version of the System Class + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_DEBSYSTEM_H +#define PKGLIB_DEBSYSTEM_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/debsystem.h" +#endif + +#include + +class debStatusIndex; +class debSystem : public pkgSystem +{ + // For locking support + int LockFD; + unsigned LockCount; + bool CheckUpdates(); + + debStatusIndex *StatusFile; + + 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 &List); + virtual bool FindIndex(pkgCache::PkgFileIterator File, + pkgIndexFile *&Found) const; + + debSystem(); + ~debSystem(); +}; + +extern debSystem debSys; + +#endif diff --git a/apt/apt-pkg/deb/debversion.cc b/apt/apt-pkg/deb/debversion.cc new file mode 100644 index 0000000..33e91a6 --- /dev/null +++ b/apt/apt-pkg/deb/debversion.cc @@ -0,0 +1,238 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debversion.cc,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + Debian Version - Versioning system for Debian + + This implements the standard Debian versioning system. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#define APT_COMPATIBILITY 986 +#ifdef __GNUG__ +#pragma implementation "apt-pkg/debversion.h" +#endif + +#include +#include + +#include +#include + /*}}}*/ + +debVersioningSystem debVS; + +// debVS::debVersioningSystem - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debVersioningSystem::debVersioningSystem() +{ + Label = "Standard .deb"; +} + /*}}}*/ + +// 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) +{ + if (A >= AEnd && B >= BEnd) + return 0; + if (A >= AEnd) + return -1; + if (B >= BEnd) + return 1; + + /* Iterate over the whole string + What this does is to spilt the whole string into groups of + numeric and non numeric portions. For instance: + a67bhgs89 + Has 4 portions 'a', '67', 'bhgs', '89'. A more normal: + 2.7.2-linux-1 + Has '2', '.', '7', '.' ,'-linux-','1' */ + const char *lhs = A; + const char *rhs = B; + while (lhs != AEnd && rhs != BEnd) + { + int first_diff = 0; + + while ((lhs != AEnd && !isdigit(*lhs)) || + (rhs != BEnd && !isdigit(*rhs)) ) + { + int vc = order(*lhs); + int rc = order(*rhs); + if (vc != rc) + return vc - rc; + lhs++; rhs++; + } + + while (*lhs == '0') + lhs++; + while (*rhs == '0') + rhs++; + while (isdigit(*lhs) && isdigit(*rhs)) + { + if (!first_diff) + first_diff = *lhs - *rhs; + lhs++; + rhs++; + } + + if (isdigit(*lhs)) + return 1; + if (isdigit(*rhs)) + return -1; + if (first_diff) + return first_diff; + } + + // The strings must be equal + if (lhs == AEnd && rhs == BEnd) + return 0; + + // lhs is shorter + if (lhs == AEnd) + return -1; + + // rhs is shorter + if (rhs == BEnd) + return 1; + + // Shouldnt happen + return 1; +} + /*}}}*/ +// debVS::CmpVersion - Comparison for versions /*{{{*/ +// --------------------------------------------------------------------- +/* This fragments the version into E:V-R triples and compares each + portion separately. */ +int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd, + const char *B,const char *BEnd) +{ + // Strip off the epoch and compare it + const char *lhs = A; + const char *rhs = B; + for (;lhs != AEnd && *lhs != ':'; lhs++); + for (;rhs != BEnd && *rhs != ':'; rhs++); + if (lhs == AEnd) + lhs = A; + if (rhs == BEnd) + rhs = B; + + // Compare the epoch + int Res = CmpFragment(A,lhs,B,rhs); + if (Res != 0) + return Res; + + // Skip the : + if (lhs != A) + lhs++; + if (rhs != B) + rhs++; + + // Find the last - + const char *dlhs = AEnd-1; + const char *drhs = BEnd-1; + for (;dlhs > lhs && *dlhs != '-'; dlhs--); + for (;drhs > rhs && *drhs != '-'; drhs--); + + if (dlhs == lhs) + dlhs = AEnd; + if (drhs == rhs) + drhs = BEnd; + + // Compare the main version + Res = CmpFragment(lhs,dlhs,rhs,drhs); + if (Res != 0) + return Res; + + // Skip the - + if (dlhs != lhs) + dlhs++; + if (drhs != rhs) + drhs++; + + return CmpFragment(dlhs,AEnd,drhs,BEnd); +} + /*}}}*/ +// debVS::CheckDep - Check a single dependency /*{{{*/ +// --------------------------------------------------------------------- +/* This simply preforms the version comparison and switch based on + operator. If DepVer is 0 then we are comparing against a provides + with no version. */ +bool debVersioningSystem::CheckDep(const char *PkgVer, + int Op,const char *DepVer) +{ + if (DepVer == 0 || DepVer[0] == 0) + return true; + if (PkgVer == 0 || PkgVer[0] == 0) + return false; + + // Perform the actual comparision. + int Res = CmpVersion(PkgVer,DepVer); + switch (Op & 0x0F) + { + case pkgCache::Dep::LessEq: + if (Res <= 0) + return true; + break; + + case pkgCache::Dep::GreaterEq: + if (Res >= 0) + return true; + break; + + case pkgCache::Dep::Less: + if (Res < 0) + return true; + break; + + case pkgCache::Dep::Greater: + if (Res > 0) + return true; + break; + + case pkgCache::Dep::Equals: + if (Res == 0) + return true; + break; + + case pkgCache::Dep::NotEquals: + if (Res != 0) + return true; + break; + } + + return false; +} + /*}}}*/ +// debVS::UpstreamVersion - Return the upstream version string /*{{{*/ +// --------------------------------------------------------------------- +/* This strips all the debian specific information from the version number */ +string debVersioningSystem::UpstreamVersion(const char *Ver) +{ + // Strip off the bit before the first colon + const char *I = Ver; + for (; *I != 0 && *I != ':'; I++); + if (*I == ':') + Ver = I + 1; + + // Chop off the trailing - + I = Ver; + unsigned Last = strlen(Ver); + for (; *I != 0; I++) + if (*I == '-') + Last = I - Ver; + + return string(Ver,Last); +} + /*}}}*/ diff --git a/apt/apt-pkg/deb/debversion.h b/apt/apt-pkg/deb/debversion.h new file mode 100644 index 0000000..6d2ce33 --- /dev/null +++ b/apt/apt-pkg/deb/debversion.h @@ -0,0 +1,72 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: debversion.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + Debian Version - Versioning system for Debian + + This implements the standard Debian versioning system. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_DEBVERSION_H +#define PKGLIB_DEBVERSION_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/debversion.h" +#endif + +#include + +class debVersioningSystem : public pkgVersioningSystem +{ + public: + + static int CmpFragment(const char *A, const char *AEnd, const char *B, + const char *BEnd); + + // Compare versions.. + virtual int DoCmpVersion(const char *A,const char *Aend, + const char *B,const char *Bend); + virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer); + virtual int DoCmpReleaseVer(const char *A,const char *Aend, + const char *B,const char *Bend) + { + return DoCmpVersion(A,Aend,B,Bend); + } + virtual string UpstreamVersion(const char *A); + + debVersioningSystem(); +}; + +extern debVersioningSystem debVS; + +#ifdef APT_COMPATIBILITY +#if APT_COMPATIBILITY != 986 +#warning "Using APT_COMPATIBILITY" +#endif + +inline int pkgVersionCompare(const char *A, const char *B) +{ + return debVS.CmpVersion(A,B); +} +inline int pkgVersionCompare(const char *A, const char *AEnd, + const char *B, const char *BEnd) +{ + return debVS.DoCmpVersion(A,AEnd,B,BEnd); +} +inline int pkgVersionCompare(string A,string B) +{ + return debVS.CmpVersion(A,B); +} +inline bool pkgCheckDep(const char *DepVer,const char *PkgVer,int Op) +{ + return debVS.CheckDep(PkgVer,Op,DepVer); +} +inline string pkgBaseVersion(const char *Ver) +{ + return debVS.UpstreamVersion(Ver); +} +#endif + +#endif diff --git a/apt/apt-pkg/deb/dpkginit.cc b/apt/apt-pkg/deb/dpkginit.cc deleted file mode 100644 index 1cb3866..0000000 --- a/apt/apt-pkg/deb/dpkginit.cc +++ /dev/null @@ -1,119 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: dpkginit.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - DPKG init - Initialize the dpkg stuff - - This class provides the locking mechanism used by dpkg for its - database area. It does the proper consistency checks and acquires the - correct kind of lock. - - ##################################################################### */ - /*}}}*/ -// Includes /*{{{*/ -#ifdef __GNUG__ -#pragma implementation "apt-pkg/dpkginit.h" -#endif -#include -#include -#include -#include - -#include -#include -#include - /*}}}*/ - -// DpkgLock::pkgDpkgLock - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -pkgDpkgLock::pkgDpkgLock(bool WithUpdates) -{ - LockFD = -1; - GetLock(WithUpdates); -} - /*}}}*/ -// DpkgLock::~pkgDpkgLock - Destructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -pkgDpkgLock::~pkgDpkgLock() -{ - Close(); -} - /*}}}*/ -// DpkgLock::GetLock - Get the lock /*{{{*/ -// --------------------------------------------------------------------- -/* This mirrors the operations dpkg does when it starts up. Note the - checking of the updates directory. */ -bool pkgDpkgLock::GetLock(bool WithUpdates) -{ - // Disable file locking - if (_config->FindB("Debug::NoLocking",false) == true) - return true; - - Close(); - - // Create the lockfile - string AdminDir = flNotFile(_config->Find("Dir::State::status")); - LockFD = ::GetLock(AdminDir + "lock"); - if (LockFD == -1) - return _error->Error("Unable to lock the administration directory, " - "are you root?"); - - // See if we need to abort with a dirty journal - if (WithUpdates == true && CheckUpdates() == true) - { - Close(); - return _error->Error("dpkg was interrupted, you must manually " - "run 'dpkg --configure -a' to correct the problem. "); - } - - return true; -} - /*}}}*/ -// DpkgLock::Close - Close the lock /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void pkgDpkgLock::Close() -{ - close(LockFD); - LockFD = -1; -} - /*}}}*/ -// DpkgLock::CheckUpdates - Check if the updates dir is dirty /*{{{*/ -// --------------------------------------------------------------------- -/* This does a check of the updates directory to see if it has any entries - in it. */ -bool pkgDpkgLock::CheckUpdates() -{ - // Check for updates.. (dirty) - string File = flNotFile(_config->Find("Dir::State::status")) + "updates/"; - DIR *DirP = opendir(File.c_str()); - if (DirP == 0) - return false; - - /* We ignore any files that are not all digits, this skips .,.. and - some tmp files dpkg will leave behind.. */ - bool Damaged = false; - for (struct dirent *Ent = readdir(DirP); Ent != 0; Ent = readdir(DirP)) - { - Damaged = true; - for (unsigned int I = 0; Ent->d_name[I] != 0; I++) - { - // Check if its not a digit.. - if (isdigit(Ent->d_name[I]) == 0) - { - Damaged = false; - break; - } - } - if (Damaged == true) - break; - } - closedir(DirP); - - return Damaged; -} - /*}}}*/ - diff --git a/apt/apt-pkg/deb/dpkginit.h b/apt/apt-pkg/deb/dpkginit.h deleted file mode 100644 index 8f72131..0000000 --- a/apt/apt-pkg/deb/dpkginit.h +++ /dev/null @@ -1,34 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: dpkginit.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - DPKG init - Initialize the dpkg stuff - - This basically gets a lock in /var/lib/dpkg and checks the updates - directory - - ##################################################################### */ - /*}}}*/ -#ifndef PKGLIB_DPKGINIT_H -#define PKGLIB_DPKGINIT_H - -#ifdef __GNUG__ -#pragma interface "apt-pkg/dpkginit.h" -#endif - -class pkgDpkgLock -{ - int LockFD; - - public: - - bool CheckUpdates(); - bool GetLock(bool WithUpdates); - void Close(); - - pkgDpkgLock(bool WithUpdates = true); - ~pkgDpkgLock(); -}; - -#endif diff --git a/apt/apt-pkg/deb/dpkgpm.cc b/apt/apt-pkg/deb/dpkgpm.cc index dc3c6c4..287fa64 100644 --- a/apt/apt-pkg/deb/dpkgpm.cc +++ b/apt/apt-pkg/deb/dpkgpm.cc @@ -1,6 +1,5 @@ -// -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: dpkgpm.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: dpkgpm.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### DPKG Package Manager - Provide an interface to dpkg @@ -14,6 +13,8 @@ #include #include #include +#include +#include #include #include @@ -23,12 +24,15 @@ #include #include #include +#include /*}}}*/ +using namespace std; + // DPkgPM::pkgDPkgPM - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgDPkgPM::pkgDPkgPM(pkgDepCache &Cache) : pkgPackageManager(Cache) +pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache) : pkgPackageManager(Cache) { } /*}}}*/ @@ -139,8 +143,91 @@ bool pkgDPkgPM::RunScripts(const char *Cnf) return true; } - /*}}}*/ +// DPkgPM::SendV2Pkgs - Send version 2 package info /*{{{*/ +// --------------------------------------------------------------------- +/* This is part of the helper script communication interface, it sends + very complete information down to the other end of the pipe.*/ +bool pkgDPkgPM::SendV2Pkgs(FILE *F) +{ + fprintf(F,"VERSION 2\n"); + + /* Write out all of the configuration directives by walking the + configuration tree */ + const Configuration::Item *Top = _config->Tree(0); + for (; Top != 0;) + { + if (Top->Value.empty() == false) + { + fprintf(F,"%s=%s\n", + QuoteString(Top->FullTag(),"=\"\n").c_str(), + QuoteString(Top->Value,"\n").c_str()); + } + + if (Top->Child != 0) + { + Top = Top->Child; + continue; + } + + while (Top != 0 && Top->Next == 0) + Top = Top->Parent; + if (Top != 0) + Top = Top->Next; + } + fprintf(F,"\n"); + + // Write out the package actions in order. + for (vector::iterator I = List.begin(); I != List.end(); I++) + { + pkgDepCache::StateCache &S = Cache[I->Pkg]; + + fprintf(F,"%s ",I->Pkg.Name()); + // Current version + if (I->Pkg->CurrentVer == 0) + fprintf(F,"- "); + else + fprintf(F,"%s ",I->Pkg.CurrentVer().VerStr()); + + // Show the compare operator + // Target version + if (S.InstallVer != 0) + { + int Comp = 2; + if (I->Pkg->CurrentVer != 0) + Comp = S.InstVerIter(Cache).CompareVer(I->Pkg.CurrentVer()); + if (Comp < 0) + fprintf(F,"> "); + if (Comp == 0) + fprintf(F,"= "); + if (Comp > 0) + fprintf(F,"< "); + fprintf(F,"%s ",S.InstVerIter(Cache).VerStr()); + } + else + fprintf(F,"> - "); + + // Show the filename/operation + if (I->Op == Item::Install) + { + // No errors here.. + if (I->File[0] != '/') + fprintf(F,"**ERROR**\n"); + else + fprintf(F,"%s\n",I->File.c_str()); + } + if (I->Op == Item::Configure) + fprintf(F,"**CONFIGURE**\n"); + if (I->Op == Item::Remove || + I->Op == Item::Purge) + fprintf(F,"**REMOVE**\n"); + + if (ferror(F) != 0) + return false; + } + return true; +} + /*}}}*/ // DPkgPM::RunScriptsWithPkgs - Run scripts with package names on stdin /*{{{*/ // --------------------------------------------------------------------- /* This looks for a list of scripts to run from the configuration file @@ -158,7 +245,16 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) { if (Opts->Value.empty() == true) continue; - + + // Determine the protocol version + string OptSec = Opts->Value; + string::size_type Pos; + if ((Pos = OptSec.find(' ')) == string::npos || Pos == 0) + Pos = OptSec.length(); + OptSec = "DPkg::Tools::Options::" + string(Opts->Value.c_str(),Pos); + + unsigned int Version = _config->FindI(OptSec+"::Version",1); + // Create the pipes int Pipes[2]; if (pipe(Pipes) != 0) @@ -185,31 +281,38 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) _exit(100); } close(Pipes[0]); - FileFd Fd(Pipes[1]); - + FILE *F = fdopen(Pipes[1],"w"); + if (F == 0) + return _error->Errno("fdopen","Faild to open new FD"); + // Feed it the filenames. - for (vector::iterator I = List.begin(); I != List.end(); I++) + bool Die = false; + if (Version <= 1) { - // Only deal with packages to be installed from .deb - if (I->Op != Item::Install) - continue; - - // No errors here.. - if (I->File[0] != '/') - continue; - - /* Feed the filename of each package that is pending install - into the pipe. */ - if (Fd.Write(I->File.begin(),I->File.length()) == false || - Fd.Write("\n",1) == false) + for (vector::iterator I = List.begin(); I != List.end(); I++) { - kill(Process,SIGINT); - Fd.Close(); - ExecWait(Process,Opts->Value.c_str(),true); - return _error->Error("Failure running script %s",Opts->Value.c_str()); + // Only deal with packages to be installed from .deb + if (I->Op != Item::Install) + continue; + + // No errors here.. + if (I->File[0] != '/') + continue; + + /* Feed the filename of each package that is pending install + into the pipe. */ + fprintf(F,"%s\n",I->File.c_str()); + if (ferror(F) != 0) + { + Die = true; + break; + } } } - Fd.Close(); + else + Die = !SendV2Pkgs(F); + + fclose(F); // Clean up the sub process if (ExecWait(Process,Opts->Value.c_str()) == false) @@ -218,13 +321,15 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) return true; } - /*}}}*/ // DPkgPM::Go - Run the sequence /*{{{*/ // --------------------------------------------------------------------- /* This globs the operations and calls dpkg */ bool pkgDPkgPM::Go() { + unsigned int MaxArgs = _config->FindI("Dpkg::MaxArgs",350); + unsigned int MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes",1024); + if (RunScripts("DPkg::Pre-Invoke") == false) return false; @@ -237,13 +342,14 @@ bool pkgDPkgPM::Go() for (; J != List.end() && J->Op == I->Op; J++); // Generate the argument list - const char *Args[400]; - if (J - I > 350) - J = I + 350; + const char *Args[MaxArgs + 50]; + if (J - I > (signed)MaxArgs) + J = I + MaxArgs; unsigned int n = 0; unsigned long Size = 0; - Args[n++] = _config->Find("Dir::Bin::dpkg","dpkg").c_str(); + string Tmp = _config->Find("Dir::Bin::dpkg","dpkg"); + Args[n++] = Tmp.c_str(); Size += strlen(Args[n-1]); // Stick in any custom dpkg options @@ -294,7 +400,7 @@ bool pkgDPkgPM::Go() // Write in the file or package names if (I->Op == Item::Install) { - for (;I != J && Size < 1024; I++) + for (;I != J && Size < MaxArgBytes; I++) { if (I->File[0] != '/') return _error->Error("Internal Error, Pathname to install is not absolute '%s'",I->File.c_str()); @@ -304,7 +410,7 @@ bool pkgDPkgPM::Go() } else { - for (;I != J && Size < 1024; I++) + for (;I != J && Size < MaxArgBytes; I++) { Args[n++] = I->Pkg.Name(); Size += strlen(Args[n-1]); @@ -384,8 +490,8 @@ bool pkgDPkgPM::Go() { RunScripts("DPkg::Post-Invoke"); if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) - return _error->Error("Sub-process %s recieved a segmentation fault.",Args[0]); - + return _error->Error("Sub-process %s received a segmentation fault.",Args[0]); + if (WIFEXITED(Status) != 0) return _error->Error("Sub-process %s returned an error code (%u)",Args[0],WEXITSTATUS(Status)); diff --git a/apt/apt-pkg/deb/dpkgpm.h b/apt/apt-pkg/deb/dpkgpm.h index ad822f7..90dd5c5 100644 --- a/apt/apt-pkg/deb/dpkgpm.h +++ b/apt/apt-pkg/deb/dpkgpm.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: dpkgpm.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: dpkgpm.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### DPKG Package Manager - Provide an interface to dpkg @@ -16,6 +16,9 @@ #include #include +#include + +using std::vector; class pkgDPkgPM : public pkgPackageManager { @@ -26,7 +29,7 @@ class pkgDPkgPM : public pkgPackageManager enum Ops {Install, Configure, Remove, Purge} Op; string File; PkgIterator Pkg; - Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op), + Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op), File(File), Pkg(Pkg) {}; Item() {}; @@ -36,6 +39,7 @@ class pkgDPkgPM : public pkgPackageManager // Helpers bool RunScripts(const char *Cnf); bool RunScriptsWithPkgs(const char *Cnf); + bool SendV2Pkgs(FILE *F); // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,string File); @@ -46,7 +50,7 @@ class pkgDPkgPM : public pkgPackageManager public: - pkgDPkgPM(pkgDepCache &Cache); + pkgDPkgPM(pkgDepCache *Cache); virtual ~pkgDPkgPM(); }; diff --git a/apt/apt-pkg/depcache.cc b/apt/apt-pkg/depcache.cc index c0f83e9..bfc3005 100644 --- a/apt/apt-pkg/depcache.cc +++ b/apt/apt-pkg/depcache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: depcache.cc,v 1.20 2001/11/13 17:32:07 kojima Exp $ +// $Id: depcache.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Dependency Cache - Caches Dependency information. @@ -12,27 +12,27 @@ #pragma implementation "apt-pkg/depcache.h" #endif #include -#include +#include #include #include +#include -#include +// CNC:2002-07-05 +#include + +#include /*}}}*/ // DepCache::pkgDepCache - Constructors /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgDepCache::pkgDepCache(MMap &Map,OpProgress &Prog) : - pkgCache(Map), PkgState(0), DepState(0) +pkgDepCache::pkgDepCache(pkgCache *pCache,Policy *Plcy) : + Cache(pCache), PkgState(0), DepState(0) { - if (_error->PendingError() == false) - Init(&Prog); -} -pkgDepCache::pkgDepCache(MMap &Map) : - pkgCache(Map), PkgState(0), DepState(0) -{ - if (_error->PendingError() == false) - Init(0); + delLocalPolicy = 0; + LocalPolicy = Plcy; + if (LocalPolicy == 0) + delLocalPolicy = LocalPolicy = new Policy; } /*}}}*/ // DepCache::~pkgDepCache - Destructor /*{{{*/ @@ -42,6 +42,7 @@ pkgDepCache::~pkgDepCache() { delete [] PkgState; delete [] DepState; + delete delLocalPolicy; } /*}}}*/ // DepCache::Init - Generate the initial extra structures. /*{{{*/ @@ -55,7 +56,7 @@ bool pkgDepCache::Init(OpProgress *Prog) DepState = new unsigned char[Head().DependsCount]; memset(PkgState,0,sizeof(*PkgState)*Head().PackageCount); memset(DepState,0,sizeof(*DepState)*Head().DependsCount); - + if (Prog != 0) { Prog->OverallProgress(0,2*Head().PackageCount,Head().PackageCount, @@ -97,29 +98,6 @@ bool pkgDepCache::Init(OpProgress *Prog) return true; } /*}}}*/ -// DepCache::GetCandidateVer - Returns the Candidate install version /*{{{*/ -// --------------------------------------------------------------------- -/* The default just returns the target version if it exists or the - highest version. */ -pkgDepCache::VerIterator pkgDepCache::GetCandidateVer(PkgIterator Pkg, - bool AllowCurrent) -{ - // Try to use an explicit target - if (Pkg->TargetVer == 0 || - (AllowCurrent == false && Pkg.TargetVer() == Pkg.CurrentVer())) - return pkgCache::GetCandidateVer(Pkg,AllowCurrent); - else - return Pkg.TargetVer(); -} - /*}}}*/ -// DepCache::IsImportantDep - True if the dependency is important /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool pkgDepCache::IsImportantDep(DepIterator Dep) -{ - return Dep.IsCritical(); -} - /*}}}*/ // DepCache::CheckDep - Checks a single dependency /*{{{*/ // --------------------------------------------------------------------- @@ -134,45 +112,39 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res) /* Check simple depends. A depends -should- never self match but we allow it anyhow because dpkg does. Technically it is a packaging bug. Conflicts may never self match */ - if (Dep.TargetPkg() != Dep.ParentPkg() - || (Dep->Type != Dep::Conflicts - && Dep->Type != Dep::Obsoletes)) + if (Dep.TargetPkg() != Dep.ParentPkg() || + (Dep->Type != Dep::Conflicts && Dep->Type != Dep::Obsoletes)) { PkgIterator Pkg = Dep.TargetPkg(); - // Check the base package if (Type == NowVersion && Pkg->CurrentVer != 0) - if (_system->checkDep(Dep.TargetVer(), - Pkg.CurrentVer().VerStr(),Dep->CompareOp) == true) + if (VS().CheckDep(Pkg.CurrentVer().VerStr(),Dep) == true) // CNC:2002-07-10 return true; if (Type == InstallVersion && PkgState[Pkg->ID].InstallVer != 0) - if (_system->checkDep(Dep.TargetVer(), - PkgState[Pkg->ID].InstVerIter(*this).VerStr(), - Dep->CompareOp) == true) + if (VS().CheckDep(PkgState[Pkg->ID].InstVerIter(*this).VerStr(), + Dep) == true) // CNC:2002-07-10 return true; if (Type == CandidateVersion && PkgState[Pkg->ID].CandidateVer != 0) - if (_system->checkDep(Dep.TargetVer(), - PkgState[Pkg->ID].CandidateVerIter(*this).VerStr(), - Dep->CompareOp) == true) + if (VS().CheckDep(PkgState[Pkg->ID].CandidateVerIter(*this).VerStr(), + Dep) == true) // CNC:2002-07-10 return true; } if (Dep->Type == Dep::Obsoletes) - return false; - + return false; + // Check the providing packages PrvIterator P = Dep.TargetPkg().ProvidesList(); PkgIterator Pkg = Dep.ParentPkg(); - for (; P.end() != true; P++) { /* Provides may never be applied against the same package if it is a conflicts. See the comment above. */ if (P.OwnerPkg() == Pkg && Dep->Type == Dep::Conflicts) continue; - + // Check if the provides is a hit if (Type == NowVersion) { @@ -195,17 +167,19 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res) } // Compare the versions. - if (_system->checkDep(Dep.TargetVer(),P.ProvideVersion(),Dep->CompareOp) == true) + if (VS().CheckDep(P.ProvideVersion(),Dep) == true) // CNC:2002-07-10 { Res = P.OwnerPkg(); - /* - if (Dep->Type == Dep::Conflicts) - cout << "MATCH: " << Res.Name() << "::"<IgnoreDep(VS(),Dep) == true) + { + Res = Dep.TargetPkg(); + return true; + } return false; } @@ -213,10 +187,13 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res) // DepCache::AddSizes - Add the packages sizes to the counters /*{{{*/ // --------------------------------------------------------------------- /* Call with Mult = -1 to preform the inverse opration */ -void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult) +void pkgDepCache::AddSizes(const PkgIterator &Pkg,signed long Mult) { StateCache &P = PkgState[Pkg->ID]; + if (Pkg->VersionList == 0) + return; + if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure && P.Keep() == true) return; @@ -224,8 +201,8 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult) // Compute the size data if (P.NewInstall() == true) { - iUsrSize += Mult*P.InstVerIter(*this)->InstalledSize; - iDownloadSize += Mult*P.InstVerIter(*this)->Size; + iUsrSize += (signed)(Mult*P.InstVerIter(*this)->InstalledSize); + iDownloadSize += (signed)(Mult*P.InstVerIter(*this)->Size); return; } @@ -234,9 +211,9 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult) (P.InstallVer != (Version *)Pkg.CurrentVer() || (P.iFlags & ReInstall) == ReInstall) && P.InstallVer != 0) { - iUsrSize += Mult*((signed)P.InstVerIter(*this)->InstalledSize - - (signed)Pkg.CurrentVer()->InstalledSize); - iDownloadSize += Mult*P.InstVerIter(*this)->Size; + iUsrSize += (signed)(Mult*((signed)P.InstVerIter(*this)->InstalledSize - + (signed)Pkg.CurrentVer()->InstalledSize)); + iDownloadSize += (signed)(Mult*P.InstVerIter(*this)->Size); return; } @@ -244,14 +221,14 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult) if (Pkg.State() == pkgCache::PkgIterator::NeedsUnpack && P.Delete() == false) { - iDownloadSize += Mult*P.InstVerIter(*this)->Size; + iDownloadSize += (signed)(Mult*P.InstVerIter(*this)->Size); return; } // Removing if (Pkg->CurrentVer != 0 && P.InstallVer == 0) { - iUsrSize -= Mult*Pkg.CurrentVer()->InstalledSize; + iUsrSize -= (signed)(Mult*Pkg.CurrentVer()->InstalledSize); return; } } @@ -289,7 +266,7 @@ void pkgDepCache::AddStates(const PkgIterator &Pkg,int Add) } // Installed, no upgrade - if (State.Upgradable() == false) + if (State.Status == 0) { if (State.Mode == ModeDelete) iDelCount += Add; @@ -459,7 +436,7 @@ void pkgDepCache::Update(OpProgress *Prog) { // Build the dependency state. unsigned char &State = DepState[D->ID]; - State = DependencyState(D);; + State = DependencyState(D); // Add to the group if we are within an or.. Group |= State; @@ -498,7 +475,7 @@ void pkgDepCache::Update(DepIterator D) // Invert for Conflicts if (D->Type == Dep::Conflicts || D->Type == Dep::Obsoletes) State = ~State; - + RemoveStates(D.ParentPkg()); BuildGroupOrs(D.ParentVer()); UpdateVerState(D.ParentPkg()); @@ -511,7 +488,7 @@ void pkgDepCache::Update(DepIterator D) /* This is called whenever the state of a package changes. It updates all cached dependencies related to this package. */ void pkgDepCache::Update(PkgIterator const &Pkg) -{ +{ // Recompute the dep of the package RemoveStates(Pkg); UpdateVerState(Pkg); @@ -586,7 +563,7 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg,bool Soft) // DepCache::MarkDelete - Put the package in the delete state /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool fReplace, bool rPurge) +void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge) { // Simplifies other routines. if (Pkg.end() == true) @@ -595,7 +572,6 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool fReplace, bool rPurge) // Check that it is not already marked for delete StateCache &P = PkgState[Pkg->ID]; P.iFlags &= ~(AutoKept | Purge); - if ( fReplace ) P.iFlags |= Replaced; if (rPurge == true) P.iFlags |= Purge; @@ -622,111 +598,6 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool fReplace, bool rPurge) AddSizes(Pkg); } /*}}}*/ -#if 1 -// DepCache::MarkInstall - Put the package in the install state /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst) -{ - // Simplifies other routines. - if (Pkg.end() == true) - return; - - /* Check that it is not already marked for install and that it can be - installed */ - StateCache &P = PkgState[Pkg->ID]; - P.iFlags &= ~AutoKept; - if (P.InstBroken() == false && (P.Mode == ModeInstall || - P.CandidateVer == (Version *)Pkg.CurrentVer())) - { - if (P.CandidateVer == (Version *)Pkg.CurrentVer() && P.InstallVer == 0) - MarkKeep(Pkg); - return; - } - - // We dont even try to install virtual packages.. - if (Pkg->VersionList == 0) - return; - - /* Target the candidate version and remove the autoflag. We reset the - autoflag below if this was called recursively. Otherwise the user - should have the ability to de-auto a package by changing its state */ - RemoveSizes(Pkg); - RemoveStates(Pkg); - - P.Mode = ModeInstall; - P.InstallVer = P.CandidateVer; - P.Flags &= ~Flag::Auto; - if (P.CandidateVer == (Version *)Pkg.CurrentVer()) - P.Mode = ModeKeep; - - AddStates(Pkg); - Update(Pkg); - AddSizes(Pkg); - - - if (AutoInst == false) - return; - - DepIterator Dep = P.InstVerIter(*this).DependsList(); - for (; Dep.end() != true;) - { - // Grok or groups - DepIterator Start = Dep; - bool Result = true; - for (bool LastOR = true; Dep.end() == false && LastOR == true; Dep++) - { - LastOR = (Dep->CompareOp & Dep::Or) == Dep::Or; - - if ((DepState[Dep->ID] & DepInstall) == DepInstall) - Result = false; - } - - // Dep is satisfied okay. - if (Result == false) { - continue; - } - - /* Check if this dep should be consider for install. If it is a user - defined important dep and we are installed a new package then - it will be installed. Otherwise we only worry about critical deps */ - if (IsImportantDep(Start) == false) - continue; - if (Pkg->CurrentVer != 0 && Start.IsCritical() == false) - continue; - - // Now we have to take action... - PkgIterator P = Start.SmartTargetPkg(); - if ((DepState[Start->ID] & DepCVer) == DepCVer) - { - MarkInstall(P,true); - - // Set the autoflag, after MarkInstall because MarkInstall unsets it - if (P->CurrentVer == 0) - PkgState[P->ID].Flags |= Flag::Auto; - - continue; - } - - // For conflicts we just de-install the package and mark as auto - if (Start->Type == Dep::Conflicts || Start->Type == Dep::Obsoletes) - { - Version **List = Start.AllTargets(); - for (Version **I = List; *I != 0; I++) - { - VerIterator Ver(*this,*I); - PkgIterator Pkg = Ver.ParentPkg(); - - MarkDelete(Pkg, Start->Type == Dep::Obsoletes); - PkgState[Pkg->ID].Flags |= Flag::Auto; - } - delete [] List; - continue; - } - } -} - /*}}}*/ -#else // DepCache::MarkInstall - Put the package in the install state /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -810,7 +681,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, succeed. We have already cached this.. */ for (; Ors > 1 && (DepState[Start->ID] & DepCVer) != DepCVer; Ors--) Start++; - + /* This bit is for processing the possibilty of an install/upgrade fixing the problem */ SPtrArray List = Start.AllTargets(); @@ -832,7 +703,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } // Select the highest priority providing package - if (InstPkg.end() == false) + if (InstPkg.end() == true) { pkgPrioSortList(*Cache,Cur); for (; *Cur != 0; Cur++) @@ -866,7 +737,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, VerIterator Ver(*this,*I); PkgIterator Pkg = Ver.ParentPkg(); - MarkDelete(Pkg, Start->Type == Dep::Obsoletes); + MarkDelete(Pkg); PkgState[Pkg->ID].Flags |= Flag::Auto; } continue; @@ -874,7 +745,6 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } } /*}}}*/ -#endif // DepCache::SetReInstall - Set the reinstallation flag /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -892,7 +762,28 @@ void pkgDepCache::SetReInstall(PkgIterator const &Pkg,bool To) AddStates(Pkg); AddSizes(Pkg); } + /*}}}*/ +// DepCache::SetCandidateVersion - Change the candidate version /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void pkgDepCache::SetCandidateVersion(VerIterator TargetVer) +{ + pkgCache::PkgIterator Pkg = TargetVer.ParentPkg(); + StateCache &P = PkgState[Pkg->ID]; + + RemoveSizes(Pkg); + RemoveStates(Pkg); + if (P.CandidateVer == P.InstallVer) + P.InstallVer = (Version *)TargetVer; + P.CandidateVer = (Version *)TargetVer; + P.Update(Pkg,*this); + + AddStates(Pkg); + Update(Pkg); + AddSizes(Pkg); +} + /*}}}*/ // StateCache::Update - Compute the various static display things /*{{{*/ // --------------------------------------------------------------------- /* This is called whenever the Candidate version changes. */ @@ -900,28 +791,26 @@ void pkgDepCache::StateCache::Update(PkgIterator Pkg,pkgCache &Cache) { // Some info VerIterator Ver = CandidateVerIter(Cache); - + // Use a null string or the version string if (Ver.end() == true) CandVersion = ""; else CandVersion = Ver.VerStr(); - + // Find the current version CurVersion = ""; if (Pkg->CurrentVer != 0) CurVersion = Pkg.CurrentVer().VerStr(); - + // Strip off the epochs for display CurVersion = StripEpoch(CurVersion); CandVersion = StripEpoch(CandVersion); // Figure out if its up or down or equal Status = Ver.CompareVer(Pkg.CurrentVer()); - - if (Pkg->CurrentVer == 0 || Pkg->VersionList == 0 || CandidateVer == 0) { + if (Pkg->CurrentVer == 0 || Pkg->VersionList == 0 || CandidateVer == 0) Status = 2; - } } /*}}}*/ // StateCache::StripEpoch - Remove the epoch specifier from the version /*{{{*/ @@ -939,3 +828,49 @@ const char *pkgDepCache::StateCache::StripEpoch(const char *Ver) return Ver; } /*}}}*/ + +// Policy::GetCandidateVer - Returns the Candidate install version /*{{{*/ +// --------------------------------------------------------------------- +/* The default just returns the highest available version that is not + a source and automatic. */ +pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator Pkg) +{ + /* Not source/not automatic versions cannot be a candidate version + unless they are already installed */ + VerIterator Last(*(pkgCache *)this,0); + + for (VerIterator I = Pkg.VersionList(); I.end() == false; I++) + { + if (Pkg.CurrentVer() == I) + return I; + + for (VerFileIterator J = I.FileList(); J.end() == false; J++) + { + if ((J.File()->Flags & Flag::NotSource) != 0) + 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) + { + if (Last.end() == true) + Last = I; + continue; + } + + return I; + } + } + + return Last; +} + /*}}}*/ +// Policy::IsImportantDep - True if the dependency is important /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep) +{ + return Dep.IsCritical(); +} + /*}}}*/ +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/depcache.h b/apt/apt-pkg/depcache.h index 627265a..021d3d6 100644 --- a/apt/apt-pkg/depcache.h +++ b/apt/apt-pkg/depcache.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: depcache.h,v 1.3 2001/11/13 17:32:07 kojima Exp $ +// $Id: depcache.h,v 1.2 2003/01/29 13:04:48 niemeyer Exp $ /* ###################################################################### DepCache - Dependency Extension data for the cache @@ -35,7 +35,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_DEPCACHE_H #define PKGLIB_DEPCACHE_H @@ -46,7 +45,7 @@ #include #include -class pkgDepCache : public pkgCache +class pkgDepCache : protected pkgCache::Namespace { public: @@ -60,10 +59,10 @@ class pkgDepCache : public pkgCache DepCandPolicy = (1 << 4), DepCandMin = (1 << 5)}; // These flags are used in StateCache::iFlags - enum InternalFlags {AutoKept = (1 << 0), Purge = (1 << 1), ReInstall = (1 << 2), Replaced = (1 << 3)}; + enum InternalFlags {AutoKept = (1 << 0), Purge = (1 << 1), ReInstall = (1 << 2)}; enum VersionTypes {NowVersion, InstallVersion, CandidateVersion}; - enum ModeList {ModeDelete = 0, ModeKeep, ModeInstall}; + enum ModeList {ModeDelete = 0, ModeKeep = 1, ModeInstall = 2}; struct StateCache { // Epoch stripped text versions of the two version fields @@ -75,28 +74,27 @@ class pkgDepCache : public pkgCache // Pointer to the install version. Version *InstallVer; + + // Copy of Package::Flags + unsigned short Flags; + unsigned short iFlags; // Internal flags // Various tree indicators signed char Status; // -1,0,1,2 unsigned char Mode; // ModeList unsigned char DepState; // DepState Flags - // Copy of Package::Flags - unsigned short Flags; - unsigned short iFlags; // Internal flags - // Update of candidate version const char *StripEpoch(const char *Ver); void Update(PkgIterator Pkg,pkgCache &Cache); - + // Various test members for the current status of the package inline bool NewInstall() const {return Status == 2 && Mode == ModeInstall;}; inline bool Delete() const {return Mode == ModeDelete;}; - inline bool Replaced() const {return iFlags & pkgDepCache::Replaced;}; inline bool Keep() const {return Mode == ModeKeep;}; inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;}; inline bool Upgradable() const {return Status >= 1;}; - inline bool Downgrade() const {return Status < 0;}; + 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;}; inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;}; @@ -111,29 +109,42 @@ class pkgDepCache : public pkgCache void BuildGroupOrs(VerIterator const &V); void UpdateVerState(PkgIterator Pkg); - bool Init(OpProgress *Prog); - + // User Policy control + class Policy + { + public: + + virtual VerIterator GetCandidateVer(PkgIterator Pkg); + virtual bool IsImportantDep(DepIterator Dep); + + virtual ~Policy() {}; + }; + protected: // State information + pkgCache *Cache; StateCache *PkgState; unsigned char *DepState; - signed long iUsrSize; - unsigned long iDownloadSize; + double iUsrSize; + double iDownloadSize; unsigned long iInstCount; unsigned long iDelCount; unsigned long iKeepCount; unsigned long iBrokenCount; unsigned long iBadCount; - + + Policy *delLocalPolicy; // For memory clean up.. + Policy *LocalPolicy; + // Check for a matching provides bool CheckDep(DepIterator Dep,int Type,PkgIterator &Res); inline bool CheckDep(DepIterator Dep,int Type) { - PkgIterator Res(*this); + PkgIterator Res(*this,0); return CheckDep(Dep,Type,Res); - } + } // Computes state information for deps and versions (w/o storing) unsigned char DependencyState(DepIterator &D); @@ -146,42 +157,102 @@ class pkgDepCache : public pkgCache void Update(PkgIterator const &P); // Count manipulators - void AddSizes(const PkgIterator &Pkg,long Mult = 1); + void AddSizes(const PkgIterator &Pkg,signed long Mult = 1); inline void RemoveSizes(const PkgIterator &Pkg) {AddSizes(Pkg,-1);}; void AddStates(const PkgIterator &Pkg,int Add = 1); inline void RemoveStates(const PkgIterator &Pkg) {AddStates(Pkg,-1);}; - + public: + // Legacy.. We look like a pkgCache + inline operator pkgCache &() {return *Cache;}; + inline Header &Head() {return *Cache->HeaderP;}; + inline PkgIterator PkgBegin() {return Cache->PkgBegin();}; + inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);}; + + inline pkgCache &GetCache() {return *Cache;}; + inline pkgVersioningSystem &VS() {return *Cache->VS;}; + // Policy implementation - virtual VerIterator GetCandidateVer(PkgIterator Pkg,bool AllowCurrent = true); - virtual bool IsImportantDep(DepIterator Dep); - + inline VerIterator GetCandidateVer(PkgIterator Pkg) {return LocalPolicy->GetCandidateVer(Pkg);}; + inline bool IsImportantDep(DepIterator Dep) {return LocalPolicy->IsImportantDep(Dep);}; + inline Policy &GetPolicy() {return *LocalPolicy;}; + // Accessors inline StateCache &operator [](PkgIterator const &I) {return PkgState[I->ID];}; inline unsigned char &operator [](DepIterator const &I) {return DepState[I->ID];}; // Manipulators void MarkKeep(PkgIterator const &Pkg,bool Soft = false); - void MarkDelete(PkgIterator const &Pkg, bool fReplace = false, bool Purge = false); - void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true); + void MarkDelete(PkgIterator const &Pkg,bool Purge = false); + void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, + unsigned long Depth = 0); void SetReInstall(PkgIterator const &Pkg,bool To); + void SetCandidateVersion(VerIterator TargetVer); // This is for debuging void Update(OpProgress *Prog = 0); // Size queries - inline signed long UsrSize() {return iUsrSize;}; - inline unsigned long DebSize() {return iDownloadSize;}; + inline double UsrSize() {return iUsrSize;}; + inline double DebSize() {return iDownloadSize;}; inline unsigned long DelCount() {return iDelCount;}; inline unsigned long KeepCount() {return iKeepCount;}; inline unsigned long InstCount() {return iInstCount;}; inline unsigned long BrokenCount() {return iBrokenCount;}; inline unsigned long BadCount() {return iBadCount;}; + + bool Init(OpProgress *Prog); - pkgDepCache(MMap &Map,OpProgress &Prog); - pkgDepCache(MMap &Map); + pkgDepCache(pkgCache *Cache,Policy *Plcy = 0); virtual ~pkgDepCache(); }; +/* This is an exact copy of the structure above, nested in pkgDepCache. + * This is defined again here since SWIG doesn't know how to handle nested + * structures yet. It will be dropped once that situation changes. */ +#ifdef SWIG + struct pkgDepCache::StateCache + { + // Epoch stripped text versions of the two version fields + const char *CandVersion; + const char *CurVersion; + + // Pointer to the candidate install version. + Version *CandidateVer; + + // Pointer to the install version. + Version *InstallVer; + + // Copy of Package::Flags + unsigned short Flags; + unsigned short iFlags; // Internal flags + + // Various tree indicators + signed char Status; // -1,0,1,2 + unsigned char Mode; // ModeList + unsigned char DepState; // DepState Flags + + // Update of candidate version + const char *StripEpoch(const char *Ver); + void Update(PkgIterator Pkg,pkgCache &Cache); + + // Various test members for the current status of the package + inline bool NewInstall() const {return Status == 2 && Mode == ModeInstall;}; + inline bool Delete() const {return Mode == ModeDelete;}; + inline bool Keep() const {return Mode == ModeKeep;}; + inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;}; + inline bool Upgradable() const {return Status >= 1;}; + 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;}; + inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;}; + inline bool Install() const {return Mode == ModeInstall;}; + inline VerIterator InstVerIter(pkgCache &Cache) + {return VerIterator(Cache,InstallVer);}; + inline VerIterator CandidateVerIter(pkgCache &Cache) + {return VerIterator(Cache,CandidateVer);}; + }; +#endif + #endif diff --git a/apt/apt-pkg/indexfile.cc b/apt/apt-pkg/indexfile.cc new file mode 100644 index 0000000..378f1e0 --- /dev/null +++ b/apt/apt-pkg/indexfile.cc @@ -0,0 +1,77 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: indexfile.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ +/* ###################################################################### + + Index File - Abstraction for an index of archive/souce file. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/indexfile.h" +#endif + +#include +#include + /*}}}*/ + +// Global list of Item supported +static pkgIndexFile::Type *ItmList[10]; +pkgIndexFile::Type **pkgIndexFile::Type::GlobalList = ItmList; +unsigned long pkgIndexFile::Type::GlobalListLen = 0; + +// Type::Type - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgIndexFile::Type::Type() +{ + ItmList[GlobalListLen] = this; + GlobalListLen++; +} + /*}}}*/ +// Type::GetType - Locate the type by name /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type) +{ + for (unsigned I = 0; I != GlobalListLen; I++) + if (strcmp(GlobalList[I]->Label,Type) == 0) + return GlobalList[I]; + return 0; +} + /*}}}*/ + +// IndexFile::GetIndexes - Stub /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgIndexFile::GetIndexes(pkgAcquire *Owner) const +{ + return _error->Error("Internal Error, this index file is not downloadable"); +} + /*}}}*/ +// IndexFile::ArchiveInfo - Stub /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const +{ + return string(); +} + /*}}}*/ +// IndexFile::FindInCache - Stub /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const +{ + return pkgCache::PkgFileIterator(Cache); +} + /*}}}*/ +// IndexFile::SourceIndex - Stub /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record, + pkgSrcRecords::File const &File) const +{ + return string(); +} + /*}}}*/ diff --git a/apt/apt-pkg/indexfile.h b/apt/apt-pkg/indexfile.h new file mode 100644 index 0000000..b247e22 --- /dev/null +++ b/apt/apt-pkg/indexfile.h @@ -0,0 +1,86 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: indexfile.h,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ +/* ###################################################################### + + Index File - Abstraction for an index of archive/source file. + + There are 3 primary sorts of index files, all represented by this + class: + + Binary index files + Bianry index files decribing the local system + Source index files + + They are all bundled together here, and the interfaces for + sources.list, acquire, cache gen and record parsing all use this class + to acess the underlying representation. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_INDEXFILE_H +#define PKGLIB_INDEXFILE_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/indexfile.h" +#endif + +#include +#include +#include +#include + +using std::string; + +class pkgAcquire; +class pkgCacheGenerator; +class OpProgress; +class pkgIndexFile +{ + public: + + class Type + { + public: + + // Global list of Items supported + static Type **GlobalList; + static unsigned long GlobalListLen; + static Type *GetType(const char *Type); + + const char *Label; + + virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator /*File*/) const {return 0;}; + Type(); + }; + + virtual const Type *GetType() const = 0; + + // Return descriptive strings of various sorts + virtual string ArchiveInfo(pkgCache::VerIterator Ver) const; + virtual string SourceInfo(pkgSrcRecords::Parser const &Record, + pkgSrcRecords::File const &File) const; + virtual string Describe(bool Short = false) const = 0; + + // Interface for acquire + virtual string ArchiveURI(string /*File*/) const {return string();}; + virtual bool GetIndexes(pkgAcquire *Owner) const; + + // CNC:2002-07-04 + virtual bool GetReleases(pkgAcquire *Owner) const {return true;}; + + // Interface for the record parsers + virtual pkgSrcRecords::Parser *CreateSrcParser() const {return 0;}; + + // Interface for the Cache Generator + 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;}; + virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/,OpProgress &/*Prog*/) const {return true;}; + virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; + + virtual ~pkgIndexFile() {}; +}; + +#endif diff --git a/apt/apt-pkg/init.cc b/apt/apt-pkg/init.cc index 38678bf..52c5d52 100644 --- a/apt/apt-pkg/init.cc +++ b/apt/apt-pkg/init.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: init.cc,v 1.16 2001/08/01 21:35:12 kojima Exp $ +// $Id: init.cc,v 1.5 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### Init - Initialize the package library @@ -11,84 +11,129 @@ #include #include #include + +#include #include +#include /*}}}*/ - -// pkgInitialize - Initialize the configuration class /*{{{*/ +#define Stringfy_(x) # x +#define Stringfy(x) Stringfy_(x) +const char *pkgVersion = VERSION; +const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "." + Stringfy(APT_PKG_MINOR) "." + Stringfy(APT_PKG_RELEASE); +const char *pkgCPU = COMMON_CPU; +const char *pkgOS = COMMON_OS; + +// pkgInitConfig - Initialize the configuration class /*{{{*/ // --------------------------------------------------------------------- /* Directories are specified in such a way that the FindDir function will understand them. That is, if they don't start with a / then their parent is prepended, this allows a fair degree of flexability. */ -bool pkgInitialize(Configuration &Cnf) +bool pkgInitConfig(Configuration &Cnf) { // General APT things - Cnf.Set("APT::Architecture",COMMON_CPU); - - // State - Cnf.Set("Dir::State","/var/state/apt/"); - Cnf.Set("Dir::State::lists","lists/"); + if (strcmp(COMMON_OS,"linux") == 0 || + strcmp(COMMON_OS,"unknown") == 0) + Cnf.Set("APT::Architecture",COMMON_CPU); + else + Cnf.Set("APT::Architecture",COMMON_OS "-" COMMON_CPU); + // CNC:2002-09-10 + //Cnf.Set("APT::Build-Essential::", "build-essential"); + Cnf.Set("Dir","/"); - /* These really should be jammed into a generic 'Local Database' engine - which is yet to be determined. The functions in pkgcachegen should - be the only users of these */ - Cnf.Set("Dir::State::xstatus","xstatus"); - Cnf.Set("Dir::State::userstatus","status.user"); - if (0) {//akk - Cnf.Set("Dir::State::status","/var/lib/dpkg/status"); - } else { - Cnf.Set("Acquire::cdrom::mount", "/mnt/cdrom"); - Cnf.Set("RPM::AllowedDupPkgs::","^kernel$"); - Cnf.Set("RPM::AllowedDupPkgs::", "kernel-smp"); - Cnf.Set("RPM::AllowedDupPkgs::", "kernel-enterprise"); - - Cnf.Set("RPM::HoldPkgs::", "kernel-source"); - Cnf.Set("RPM::HoldPkgs::", "kernel-headers"); - - Cnf.Set("Dir::State::status","/var/lib/rpm/status"); - } + // State + Cnf.Set("Dir::State","var/lib/apt/"); + + /* Just in case something goes horribly wrong, we can fall back to the + old /var/state paths.. */ + struct stat St; + if (stat("/var/lib/apt/.",&St) != 0 && + stat("/var/state/apt/.",&St) == 0) + Cnf.Set("Dir::State","var/state/apt/"); + + Cnf.Set("Dir::State::lists","lists/"); Cnf.Set("Dir::State::cdroms","cdroms.list"); // Cache - Cnf.Set("Dir::Cache","/var/cache/apt/"); + Cnf.Set("Dir::Cache","var/cache/apt/"); Cnf.Set("Dir::Cache::archives","archives/"); Cnf.Set("Dir::Cache::srcpkgcache","srcpkgcache.bin"); Cnf.Set("Dir::Cache::pkgcache","pkgcache.bin"); // Configuration - Cnf.Set("Dir::Etc","/etc/apt/"); + Cnf.Set("Dir::Etc","etc/apt/"); Cnf.Set("Dir::Etc::sourcelist","sources.list"); Cnf.Set("Dir::Etc::vendorlist","vendors.list"); + Cnf.Set("Dir::Etc::vendorparts","vendors.list.d"); Cnf.Set("Dir::Etc::main","apt.conf"); - Cnf.Set("Dir::Bin::gpg","/usr/bin/gpg"); + Cnf.Set("Dir::Etc::parts","apt.conf.d"); + Cnf.Set("Dir::Etc::preferences","preferences"); Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods"); - if (0) {//akk - Cnf.Set("Dir::Bin::dpkg","/usr/bin/dpkg"); - Cnf.Set("Acquire::ComprExtension", ".gz"); - } else { - Cnf.Set("Dir::Etc::RpmPriorities", "rpmpriorities"); - Cnf.Set("Dir::bin::gzip","/usr/bin/bzip2"); - Cnf.Set("Dir::Bin::rpm","/bin/rpm"); - Cnf.Set("Acquire::ComprExtension", ".bz2"); - } - - // Read the main config file - string FName = Cnf.FindFile("Dir::Etc::main"); + bool Res = true; - if (FileExists(FName) == true) - Res &= ReadConfigFile(Cnf,FName); // Read an alternate config file const char *Cfg = getenv("APT_CONFIG"); if (Cfg != 0 && FileExists(Cfg) == true) Res &= ReadConfigFile(Cnf,Cfg); + // Read the configuration parts dir + string Parts = Cnf.FindDir("Dir::Etc::parts"); + if (FileExists(Parts) == true) + Res &= ReadConfigDir(Cnf,Parts); + + // Read the main config file + string FName = Cnf.FindFile("Dir::Etc::main"); + if (FileExists(FName) == true) + Res &= ReadConfigFile(Cnf,FName); + if (Res == false) return false; - if (Cnf.FindB("Debug::pkgInitialize",false) == true) + if (Cnf.FindB("Debug::pkgInitConfig",false) == true) Cnf.Dump(); - + + if (Cnf.Exists("Dir::Locale")) + { + bindtextdomain(APT_DOMAIN,Cnf.FindDir("Dir::Locale").c_str()); + bindtextdomain(textdomain(0),Cnf.FindDir("Dir::Locale").c_str()); + } + return true; } /*}}}*/ +// pkgInitSystem - Initialize the _system calss /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys) +{ + Sys = 0; + string Label = Cnf.Find("Apt::System",""); + if (Label.empty() == false) + { + Sys = pkgSystem::GetSystem(Label.c_str()); + if (Sys == 0) + return _error->Error(_("Packaging system '%s' is not supported"),Label.c_str()); + } + else + { + signed MaxScore = 0; + for (unsigned I = 0; I != pkgSystem::GlobalListLen; I++) + { + signed Score = pkgSystem::GlobalList[I]->Score(Cnf); + if (Score > MaxScore) + { + MaxScore = Score; + Sys = pkgSystem::GlobalList[I]; + } + } + + if (Sys == 0) + return _error->Error(_("Unable to determine a suitable system type")); + } + + return Sys->Initialize(Cnf); +} + /*}}}*/ diff --git a/apt/apt-pkg/init.h b/apt/apt-pkg/init.h index 4f76764..ce77fc6 100644 --- a/apt/apt-pkg/init.h +++ b/apt/apt-pkg/init.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: init.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: init.h,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Init - Initialize the package library @@ -10,12 +10,34 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_INIT_H #define PKGLIB_INIT_H #include +#include -bool pkgInitialize(Configuration &Cnf); +// See the makefile +#define APT_PKG_MAJOR 3 +#define APT_PKG_MINOR 3 +#define APT_PKG_RELEASE 0 + +extern const char *pkgVersion; +extern const char *pkgLibVersion; +extern const char *pkgOS; +extern const char *pkgCPU; + +bool pkgInitConfig(Configuration &Cnf); +bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys); + +#ifdef APT_COMPATIBILITY +#if APT_COMPATIBILITY != 986 +#warning "Using APT_COMPATIBILITY" +#endif + +inline bool pkgInitialize(Configuration &Cnf) +{ + return pkgInitConfig(Cnf) && pkgInitSystem(Cnf,_system); +}; +#endif #endif diff --git a/apt/apt-pkg/makefile b/apt/apt-pkg/makefile index 6ec3936..37183b6 100644 --- a/apt/apt-pkg/makefile +++ b/apt/apt-pkg/makefile @@ -3,59 +3,67 @@ BASE=.. SUBDIR=apt-pkg # Header location +# CNC:2002-07-03 SUBDIRS = rpm deb contrib HEADER_TARGETDIRS = apt-pkg # Bring in the default rules include ../buildlib/defaults.mak -# The library name +# The library name, don't forget to update init.h and the copy in +# methods/makefile - FIXME LIBRARY=apt-pkg -MAJOR=3.1 +LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) +MAJOR=3.3 MINOR=0 -SLIBS=$(PTHREADLIB) +# CNC:2002-07-03 +SLIBS=$(PTHREADLIB) $(RPMLIBS) +APT_DOMAIN:=libapt-pkg$(MAJOR) # Source code for the contributed non-core things SOURCE = contrib/mmap.cc contrib/error.cc contrib/strutl.cc \ contrib/configuration.cc contrib/progress.cc contrib/cmndline.cc \ - contrib/md5.cc contrib/cdromutl.cc contrib/crc-16.cc + contrib/md5.cc contrib/sha1.cc contrib/hashes.cc \ + contrib/cdromutl.cc contrib/crc-16.cc \ + contrib/fileutl.cc +HEADERS = mmap.h error.h configuration.h fileutl.h cmndline.h \ + md5.h crc-16.h cdromutl.h strutl.h sptr.h sha1.h hashes.h -# Source code for the main library -SOURCE+= pkgcache.cc version.cc fileutl.cc pkgcachegen.cc depcache.cc \ +# Source code for the core main library +# CNC:2002-07-03 +SOURCE+= pkgcache.cc version.cc depcache.cc \ orderlist.cc tagfile.cc sourcelist.cc packagemanager.cc \ - pkgrecords.cc algorithms.cc acquire.cc acquire-item.cc \ + pkgrecords.cc algorithms.cc acquire.cc\ acquire-worker.cc acquire-method.cc init.cc clean.cc \ - srcrecords.cc cachefile.cc systemfactory.cc + srcrecords.cc cachefile.cc versionmatch.cc policy.cc \ + pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \ + repository.cc +HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \ + orderlist.h sourcelist.h packagemanager.h tagfile.h \ + init.h pkgcache.h version.h progress.h pkgrecords.h \ + acquire.h acquire-worker.h acquire-item.h acquire-method.h \ + clean.h srcrecords.h cachefile.h versionmatch.h policy.h \ + pkgsystem.h indexfile.h repository.h # Source code for the debian specific components -SOURCE+= deb/deblistparser.cc deb/debrecords.cc deb/dpkgpm.cc deb/dpkginit.cc \ - deb/debsrcrecords.cc \ - deb/debfactory.cc +# In theory the deb headers do not need to be exported.. +SOURCE+= deb/deblistparser.cc deb/debrecords.cc deb/dpkgpm.cc \ + deb/debsrcrecords.cc deb/debversion.cc deb/debsystem.cc \ + deb/debindexfile.cc deb/debindexfile.cc +HEADERS+= debversion.h debsrcrecords.h dpkgpm.h debrecords.h \ + deblistparser.h debsystem.h debindexfile.h +# CNC:2002-07-03 # Source code for the rpm specific components -SOURCE+= rpm/rpminit.cc rpm/rpmlistparser.cc rpm/rpmpm.cc\ - rpm/rpmrecords.cc rpm/rpmsrcrecords.cc - -SOURCE+= rpm/rpmfactory.cc rpm/rpmversion.cc rpm/rpmpackagedata.cc - -# Public apt-pkg header files -HEADERS = algorithms.h depcache.h mmap.h pkgcachegen.h cacheiterators.h \ - error.h orderlist.h sourcelist.h configuration.h fileutl.h \ - packagemanager.h tagfile.h deblistparser.h init.h pkgcache.h \ - progress.h pkgrecords.h debrecords.h cmndline.h \ - acquire.h acquire-worker.h acquire-item.h acquire-method.h md5.h \ - dpkgpm.h dpkginit.h cdromutl.h strutl.h clean.h srcrecords.h \ - debsrcrecords.h cachefile.h crc-16.h systemfactory.h sptr.h - -HEADERS+= rpmfactory.h debfactory.h - -HEADERS+= rpminit.h rpmlistparser.h rpmpm.h rpmrecords.h rpmpackagedata.h\ - rpmsrcrecords.h - +SOURCE+= rpm/rpmhandler.cc rpm/rpmindexfile.cc rpm/rpmlistparser.cc \ + rpm/rpmpackagedata.cc rpm/rpmpm.cc rpm/rpmrecords.cc \ + rpm/rpmsrcrecords.cc rpm/rpmsystem.cc rpm/rpmversion.cc +HEADERS+= rpmhandler.h rpmindexfile.h rpmlistparser.h rpmpackagedata.h \ + rpmpm.h rpmrecords.h rpmsrcrecords.h rpmsystem.h rpmversion.h HEADERS := $(addprefix apt-pkg/,$(HEADERS)) # Private header files -HEADERS+= system.h i18n.h +HEADERS+= system.h include $(LIBRARY_H) diff --git a/apt/apt-pkg/orderlist.cc b/apt/apt-pkg/orderlist.cc index cbd7ac3..28d508b 100644 --- a/apt/apt-pkg/orderlist.cc +++ b/apt/apt-pkg/orderlist.cc @@ -1,13 +1,13 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: orderlist.cc,v 1.4 2000/10/26 21:15:21 kojima Exp $ +// $Id: orderlist.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Order List - Represents and Manipulates an ordered list of packages. A list of packages can be ordered by a number of conflicting criteria each given a specific priority. Each package also has a set of flags - indicating some usefull things about it that are derived in the + indicating some useful things about it that are derived in the course of sorting. The pkgPackageManager class uses this class for all of it's installation ordering needs. @@ -54,6 +54,12 @@ after flag set. This forces them and all their dependents to be ordered toward the end. + There are complications in this algorithm when presented with cycles. + For all known practical cases it works, all cases where it doesn't work + is fixable by tweaking the package descriptions. However, it should be + possible to impove this further to make some better choices when + presented with cycles. + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ @@ -63,14 +69,21 @@ #include #include #include +#include +#include +#include + +#include /*}}}*/ +using namespace std; + pkgOrderList *pkgOrderList::Me = 0; // OrderList::pkgOrderList - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgOrderList::pkgOrderList(pkgDepCache &Cache) : Cache(Cache) +pkgOrderList::pkgOrderList(pkgDepCache *pCache) : Cache(*pCache) { FileList = 0; Primary = 0; @@ -78,10 +91,11 @@ pkgOrderList::pkgOrderList(pkgDepCache &Cache) : Cache(Cache) RevDepends = 0; Remove = 0; LoopCount = -1; - + Debug = _config->FindB("Debug::pkgOrderList",false); + /* Construct the arrays, egcs 1.0.1 bug requires the package count hack */ - unsigned long Size = Cache.HeaderP->PackageCount; + unsigned long Size = Cache.Head().PackageCount; Flags = new unsigned short[Size]; End = List = new Package *[Size]; memset(Flags,0,sizeof(*Flags)*Size); @@ -109,8 +123,11 @@ bool pkgOrderList::IsMissing(PkgIterator Pkg) if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure && Cache[Pkg].Keep() == true) return false; + + if (FileList == 0) + return false; - if (FileList != 0 && FileList[Pkg->ID].empty() == false) + if (FileList[Pkg->ID].empty() == false) return false; return true; } @@ -122,9 +139,9 @@ bool pkgOrderList::IsMissing(PkgIterator Pkg) bool pkgOrderList::DoRun() { // Temp list - unsigned long Size = Cache.HeaderP->PackageCount; - Package **NList = new Package *[Size]; - AfterList = new Package *[Size]; + unsigned long Size = Cache.Head().PackageCount; + SPtrArray NList = new Package *[Size]; + SPtrArray AfterList = new Package *[Size]; AfterEnd = AfterList; Depth = 0; @@ -140,8 +157,6 @@ bool pkgOrderList::DoRun() if (VisitNode(PkgIterator(Cache,*I)) == false) { End = OldEnd; - delete [] NList; - delete [] AfterList; return false; } @@ -151,8 +166,7 @@ bool pkgOrderList::DoRun() // Swap the main list to the new list delete [] List; - delete [] AfterList; - List = NList; + List = NList.UnGuard(); return true; } /*}}}*/ @@ -215,32 +229,43 @@ bool pkgOrderList::OrderUnpack(string *FileList) Me = this; qsort(List,End - List,sizeof(*List),&OrderCompareA); + if (Debug == true) + clog << "** Pass A" << endl; if (DoRun() == false) return false; + if (Debug == true) + clog << "** Pass B" << endl; Secondary = 0; if (DoRun() == false) return false; + if (Debug == true) + clog << "** Pass C" << endl; LoopCount = 0; RevDepends = 0; Remove = 0; // Otherwise the libreadline remove problem occures if (DoRun() == false) return false; - + + if (Debug == true) + clog << "** Pass D" << endl; LoopCount = 0; Primary = &pkgOrderList::DepUnPackPre; if (DoRun() == false) return false; -/* cout << "----------END" << endl; - - for (iterator I = List; I != End; I++) + if (Debug == true) { - PkgIterator P(Cache,*I); - if (IsNow(P) == true) - cout << P.Name() << ' ' << IsMissing(P) << ',' << IsFlag(P,After) << endl; - }*/ + clog << "** Unpack ordering done" << endl; + + for (iterator I = List; I != End; I++) + { + PkgIterator P(Cache,*I); + if (IsNow(P) == true) + clog << P.Name() << ' ' << IsMissing(P) << ',' << IsFlag(P,After) << endl; + } + } return true; } @@ -277,10 +302,10 @@ int pkgOrderList::Score(PkgIterator Pkg) int Score = 0; if ((Pkg->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) Score += 100; - + if (IsFlag(Pkg,Immediate) == true) Score += 10; - + for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList(); D.end() == false; D++) if (D->Type == pkgCache::Dep::PreDepends) @@ -377,7 +402,7 @@ int pkgOrderList::OrderCompareA(const void *a, const void *b) /*}}}*/ // OrderList::OrderCompareB - Order the installation by source /*{{{*/ // --------------------------------------------------------------------- -/* This orders by installation source. This is usefull to handle +/* This orders by installation source. This is useful to handle inter-source breaks */ int pkgOrderList::OrderCompareB(const void *a, const void *b) { @@ -456,7 +481,7 @@ bool pkgOrderList::VisitRProvides(DepFunc F,VerIterator Ver) /* This routine calls visit on all providing packages. */ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical) { - Version **List = D.AllTargets(); + SPtrArray List = D.AllTargets(); for (Version **I = List; *I != 0; I++) { VerIterator Ver(Cache,*I); @@ -465,12 +490,14 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical) if (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing) continue; - if (D->Type != pkgCache::Dep::Conflicts && D->Type != pkgCache::Dep::Obsoletes - && Cache[Pkg].InstallVer != *I) + if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::Obsoletes && + Cache[Pkg].InstallVer != *I) continue; - if ((D->Type == pkgCache::Dep::Conflicts || D->Type == pkgCache::Dep::Obsoletes) - && (Version *)Pkg.CurrentVer() != *I) + if ((D->Type == pkgCache::Dep::Conflicts || + D->Type == pkgCache::Dep::Obsoletes) && + (Version *)Pkg.CurrentVer() != *I) continue; // Skip over missing files @@ -478,12 +505,8 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical) continue; if (VisitNode(Pkg) == false) - { - delete [] List; return false; - } } - delete [] List; return true; } /*}}}*/ @@ -500,8 +523,12 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg) IsFlag(Pkg,AddPending) == true || IsFlag(Pkg,InList) == false) return true; -/* for (int j = 0; j != Depth; j++) cout << ' '; - cout << "Visit " << Pkg.Name() << endl;*/ + if (Debug == true) + { + for (int j = 0; j != Depth; j++) clog << ' '; + clog << "Visit " << Pkg.Name() << endl; + } + Depth++; // Color grey @@ -554,10 +581,13 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg) Primary = Old; Depth--; - -/* for (int j = 0; j != Depth; j++) cout << ' '; - cout << "Leave " << Pkg.Name() << ' ' << IsFlag(Pkg,Added) << ',' << IsFlag(Pkg,AddPending) << endl;*/ + if (Debug == true) + { + for (int j = 0; j != Depth; j++) clog << ' '; + clog << "Leave " << Pkg.Name() << ' ' << IsFlag(Pkg,Added) << ',' << IsFlag(Pkg,AddPending) << endl; + } + return true; } /*}}}*/ @@ -577,7 +607,8 @@ bool pkgOrderList::DepUnPackCrit(DepIterator D) { /* Reverse depenanices are only interested in conflicts, predepend breakage is ignored here */ - if (D->Type != pkgCache::Dep::Conflicts && D->Type != pkgCache::Dep::Obsoletes) + if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::Obsoletes) continue; // Duplication elimination, consider only the current version @@ -598,7 +629,8 @@ bool pkgOrderList::DepUnPackCrit(DepIterator D) { /* Forward critical dependencies MUST be correct before the package can be unpacked. */ - if (D->Type != pkgCache::Dep::Conflicts && D->Type != pkgCache::Dep::Obsoletes && + if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::Obsoletes && D->Type != pkgCache::Dep::PreDepends) continue; @@ -707,7 +739,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D) else continue; } - + /* We wish to check if the dep is okay in the now state of the target package against the install state of this package. */ if (CheckDep(D) == true) @@ -717,7 +749,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D) if (IsFlag(D.TargetPkg(),AddPending) == false) continue; } - + // This is the loop detection if (IsFlag(D.TargetPkg(),Added) == true || IsFlag(D.TargetPkg(),AddPending) == true) @@ -880,7 +912,7 @@ bool pkgOrderList::AddLoop(DepIterator D) /* */ void pkgOrderList::WipeFlags(unsigned long F) { - unsigned long Size = Cache.HeaderP->PackageCount; + unsigned long Size = Cache.Head().PackageCount; for (unsigned long I = 0; I != Size; I++) Flags[I] &= ~F; } @@ -894,7 +926,7 @@ void pkgOrderList::WipeFlags(unsigned long F) this fails to produce a suitable result. */ bool pkgOrderList::CheckDep(DepIterator D) { - Version **List = D.AllTargets(); + SPtrArray List = D.AllTargets(); bool Hit = false; for (Version **I = List; *I != 0; I++) { @@ -917,10 +949,11 @@ bool pkgOrderList::CheckDep(DepIterator D) if ((Version *)Pkg.CurrentVer() != *I || Pkg.State() != PkgIterator::NeedsNothing) continue; - + /* Conflicts requires that all versions are not present, depends just needs one */ - if (D->Type != pkgCache::Dep::Conflicts && D->Type != pkgCache::Dep::Obsoletes) + if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::Obsoletes) { /* Try to find something that does not have the after flag set if at all possible */ @@ -930,7 +963,6 @@ bool pkgOrderList::CheckDep(DepIterator D) continue; } - delete [] List; return true; } else @@ -938,11 +970,9 @@ bool pkgOrderList::CheckDep(DepIterator D) if (IsFlag(Pkg,After) == true) Flag(D.ParentPkg(),After); - delete [] List; return false; } } - delete [] List; // We found a hit, but it had the after flag set if (Hit == true && D->Type == pkgCache::Dep::PreDepends) @@ -953,7 +983,8 @@ bool pkgOrderList::CheckDep(DepIterator D) /* Conflicts requires that all versions are not present, depends just needs one */ - if (D->Type == pkgCache::Dep::Conflicts || D->Type == pkgCache::Dep::Obsoletes) + if (D->Type == pkgCache::Dep::Conflicts || + D->Type == pkgCache::Dep::Obsoletes) return true; return false; } diff --git a/apt/apt-pkg/orderlist.h b/apt/apt-pkg/orderlist.h index caca764..fc90b68 100644 --- a/apt/apt-pkg/orderlist.h +++ b/apt/apt-pkg/orderlist.h @@ -1,19 +1,18 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: orderlist.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: orderlist.h,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Order List - Represents and Manipulates an ordered list of packages. A list of packages can be ordered by a number of conflicting criteria each given a specific priority. Each package also has a set of flags - indicating some usefull things about it that are derived in the + indicating some useful things about it that are derived in the course of sorting. The pkgPackageManager class uses this class for all of it's installation ordering needs. ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_ORDERLIST_H #define PKGLIB_ORDERLIST_H @@ -24,19 +23,11 @@ #include class pkgDepCache; -class pkgOrderList +class pkgOrderList : protected pkgCache::Namespace { protected: - pkgDepCache &Cache; - - // Bring some usefull types into the local scope - typedef pkgCache::PkgIterator PkgIterator; - typedef pkgCache::VerIterator VerIterator; - typedef pkgCache::DepIterator DepIterator; - typedef pkgCache::PrvIterator PrvIterator; - typedef pkgCache::Package Package; - typedef pkgCache::Version Version; + pkgDepCache &Cache; typedef bool (pkgOrderList::*DepFunc)(DepIterator D); // These are the currently selected ordering functions @@ -48,13 +39,13 @@ class pkgOrderList // State Package **End; Package **List; - Package **AfterList; Package **AfterEnd; string *FileList; DepIterator Loops[20]; int LoopCount; int Depth; unsigned short *Flags; + bool Debug; // Main visit function bool VisitNode(PkgIterator Pkg); @@ -122,7 +113,7 @@ class pkgOrderList int Score(PkgIterator Pkg); - pkgOrderList(pkgDepCache &Cache); + pkgOrderList(pkgDepCache *Cache); ~pkgOrderList(); }; diff --git a/apt/apt-pkg/packagemanager.cc b/apt/apt-pkg/packagemanager.cc index dd5972d..c894487 100644 --- a/apt/apt-pkg/packagemanager.cc +++ b/apt/apt-pkg/packagemanager.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.cc,v 1.15 2001/11/13 17:32:07 kojima Exp $ +// $Id: packagemanager.cc,v 1.8 2003/01/31 16:32:30 niemeyer Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -16,23 +16,27 @@ #ifdef __GNUG__ #pragma implementation "apt-pkg/packagemanager.h" #endif + #include #include #include #include -#include +#include #include #include #include - -#include - +#include + +#include +#include /*}}}*/ +using namespace std; + // PM::PackageManager - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgPackageManager::pkgPackageManager(pkgDepCache &Cache) : Cache(Cache) +pkgPackageManager::pkgPackageManager(pkgDepCache *pCache) : Cache(*pCache) { FileNames = new string[Cache.Head().PackageCount]; List = 0; @@ -77,8 +81,8 @@ bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources, // Skip already processed packages if (List->IsNow(Pkg) == false) continue; - - new pkgAcqArchive(Owner,Sources,Recs,Cache[Pkg].InstVerIter(Cache), + + new pkgAcqArchive(Owner,Sources,Recs,Cache[Pkg].InstVerIter(Cache), FileNames[Pkg->ID]); } @@ -91,7 +95,7 @@ bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources, be downloaded. */ bool pkgPackageManager::FixMissing() { - pkgProblemResolver Resolve(Cache); + pkgProblemResolver Resolve(&Cache); List->SetFileList(FileNames); bool Bad = false; @@ -127,13 +131,17 @@ bool pkgPackageManager::CreateOrderList() return true; delete List; - List = new pkgOrderList(Cache); + List = new pkgOrderList(&Cache); bool NoImmConfigure = _config->FindB("APT::Immediate-Configure",false); // Generate the list of affected packages and sort it for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { + // Ignore no-version packages + if (I->VersionList == 0) + continue; + // Mark the package and its dependends for immediate configuration if (((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential || (I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important) && @@ -143,7 +151,7 @@ bool pkgPackageManager::CreateOrderList() // Look for other packages to make immediate configurea if (Cache[I].InstallVer != 0) - for (DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); + for (DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; D++) if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) List->Flag(D.TargetPkg(),pkgOrderList::Immediate); @@ -196,7 +204,8 @@ bool pkgPackageManager::CheckRConflicts(PkgIterator Pkg,DepIterator D, { for (;D.end() == false; D++) { - if (D->Type != pkgCache::Dep::Conflicts && D->Type != pkgCache::Dep::Obsoletes) + if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::Obsoletes) continue; // The package hasnt been changed @@ -207,9 +216,9 @@ bool pkgPackageManager::CheckRConflicts(PkgIterator Pkg,DepIterator D, if (D.ParentPkg() == Pkg || D.ParentVer() != D.ParentPkg().CurrentVer()) continue; - if (_system->checkDep(D.TargetVer(),Ver,D->CompareOp) == false) + if (Cache.VS().CheckDep(Ver,D) == false) // CNC:2002-07-10 continue; - + if (EarlyRemove(D.ParentPkg()) == false) return _error->Error("Reverse conflicts early remove for package '%s' failed", Pkg.Name()); @@ -223,8 +232,8 @@ bool pkgPackageManager::CheckRConflicts(PkgIterator Pkg,DepIterator D, that the final configuration is valid. */ bool pkgPackageManager::ConfigureAll() { - pkgOrderList OList(Cache); - + pkgOrderList OList(&Cache); + // Populate the order list for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++) if (List->IsFlag(pkgCache::PkgIterator(Cache,*I), @@ -254,36 +263,29 @@ bool pkgPackageManager::ConfigureAll() of it's dependents. */ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg) { - pkgOrderList OList(Cache); + pkgOrderList OList(&Cache); + + if (DepAdd(OList,Pkg) == false) + return false; - if (DepAdd(OList,Pkg) == false) { - cout<<"AAA"<Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); } // Sanity Check - if (List->IsFlag(Pkg,pkgOrderList::Configured) == false) { - cout<<"DDD"<IsFlag(Pkg,pkgOrderList::Configured) == false) return _error->Error("Internal error, could not immediate configure %s",Pkg.Name()); - } + return true; } /*}}}*/ @@ -298,8 +300,7 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) return true; if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == false) return false; - - + // Put the package on the list OList.push_back(Pkg); OList.Flag(Pkg,pkgOrderList::Added); @@ -324,7 +325,7 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) if (Bad == false) continue; - Version **VList = D.AllTargets(); + SPtrArray VList = D.AllTargets(); for (Version **I = VList; *I != 0 && Bad == true; I++) { VerIterator Ver(Cache,*I); @@ -342,12 +343,12 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) if (Cache[Pkg].InstallVer != *I || (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing)) continue; + if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == true) Bad = !DepAdd(OList,Pkg,Depth); if (List->IsFlag(Pkg,pkgOrderList::Configured) == true) Bad = false; } - delete [] VList; } if (Bad == true) @@ -399,10 +400,10 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg) { if (_config->FindB("APT::Force-LoopBreak",false) == false) return _error->Error(_("This installation run will require temporarily " - "removing the essential package %s due to a " - "Conflicts/Pre-Depends loop. This is often bad, " - "but if you really want to do it, activate the " - "APT::Force-LoopBreak option."),Pkg.Name()); + "removing the essential package %s due to a " + "Conflicts/Pre-Depends loop. This is often bad, " + "but if you really want to do it, activate the " + "APT::Force-LoopBreak option."),Pkg.Name()); } bool Res = SmartRemove(Pkg); @@ -421,8 +422,19 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg) return true; List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); - if (Cache[Pkg].Replaced()) - return true; + + /* CNC:2003-01-29 - Do not remove obsoleted packages. */ + for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() == false; D++) + { + if (D->Type == pkgCache::Dep::Obsoletes && + Cache[D.ParentPkg()].Install() && + (pkgCache::Version*)D.ParentVer() == Cache[D.ParentPkg()].InstallVer && + Cache.VS().CheckDep(Pkg.CurrentVer().VerStr(), D) == true) + { + return true; + } + } + return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge); } /*}}}*/ @@ -431,16 +443,16 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg) /* This performs the task of handling pre-depends. */ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) { +// CNC:2003-01-30 - Configuring makes no sense for rpm packages. +#if 0 // Check if it is already unpacked if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure && Cache[Pkg].Keep() == true) { List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); - if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true) { + if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true) if (SmartConfigure(Pkg) == false) - return _error->Error("Internal Error, Could not perform immediate configuration: %s", - Pkg.Name()); - } + return _error->Error("Internal Error, Could not perform immediate configuration (1) on %s",Pkg.Name()); return true; } @@ -457,13 +469,13 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) while (End->Type == pkgCache::Dep::PreDepends) { // Look for possible ok targets. - Version **VList = Start.AllTargets(); + SPtrArray VList = Start.AllTargets(); bool Bad = true; for (Version **I = VList; *I != 0 && Bad == true; I++) { VerIterator Ver(Cache,*I); PkgIterator Pkg = Ver.ParentPkg(); - + // See if the current version is ok if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true && Pkg.State() == PkgIterator::NeedsNothing) @@ -478,7 +490,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) { VerIterator Ver(Cache,*I); PkgIterator Pkg = Ver.ParentPkg(); - + // Not the install version if (Cache[Pkg].InstallVer != *I || (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing)) @@ -486,44 +498,51 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) Bad = !SmartConfigure(Pkg); } - - delete [] VList; /* If this or element did not match then continue on to the - next or element until a matching element is found*/ + next or element until a matching element is found */ if (Bad == true) - { + { + // This triggers if someone make a pre-depends/depend loop. if (Start == End) - return _error->Error("Internal Error, Couldn't configure a pre-depend: %s", - Pkg.Name()); + { + return _error->Error("Couldn't configure pre-depend %s for %s, " + "probably a dependency cycle.", + End.TargetPkg().Name(),Pkg.Name()); + } Start++; } else break; } - if (End->Type == pkgCache::Dep::Conflicts || End->Type == pkgCache::Dep::Obsoletes) +// CNC:2002-10-18 +// RPM seems to handle well cases where an upgraded package removes +// a conflict which would be created between the current version of +// itself and the install version of a second package. OTOH, removing +// a package temporarily could move a configuration file to a .rpmsave +// file, or even have catastrophic results (think about glibc). + if (End->Type == pkgCache::Dep::Conflicts || + End->Type == pkgCache::Dep::Obsoletes) { /* Look for conflicts. Two packages that are both in the install state cannot conflict so we don't check.. */ - Version **VList = End.AllTargets(); + SPtrArray VList = End.AllTargets(); for (Version **I = VList; *I != 0; I++) { VerIterator Ver(Cache,*I); PkgIterator Pkg = Ver.ParentPkg(); // See if the current version is conflicting - // and that it's not obsoleting a virtual package - if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true && - !(Pkg->ProvidesList == 0 && End->Type == pkgCache::Dep::Obsoletes)) + if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true) { if (EarlyRemove(Pkg) == false) return _error->Error("Internal Error, Could not early remove %s",Pkg.Name()); } } - delete [] VList; } } +#endif // Check for reverse conflicts. if (CheckRConflicts(Pkg,Pkg.RevDependsList(), @@ -538,12 +557,15 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) return false; List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); - + +// CNC:2003-01-30 - Configuring makes no sense for rpm packages. +#if 0 // Perform immedate configuration of the package. - if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true) { + if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true) if (SmartConfigure(Pkg) == false) - return _error->Error("Internal Error, Could not perform immediate configuration"); - } + return _error->Error("Internal Error, Could not perform immediate configuration (2) on %s",Pkg.Name()); +#endif + return true; } /*}}}*/ @@ -552,29 +574,6 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) /* */ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() { - for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) - { - // Not interesting - if ((Cache[I].Keep() == true || - Cache[I].InstVerIter(Cache) == I.CurrentVer()) && - I.State() == pkgCache::PkgIterator::NeedsNothing && - (Cache[I].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall && - (I.Purge() != false || Cache[I].Mode != pkgDepCache::ModeDelete || - (Cache[I].iFlags & pkgDepCache::Purge) != pkgDepCache::Purge)) - continue; - - // Perform a delete or an install - if (Cache[I].Delete() == true) - { - if (!Cache[I].Replaced() && !Remove(I)) - return Failed; - } - else - if (Install(I, FileNames[I->ID]) == false) - return Failed; - } - return Completed; -#if 0 if (CreateOrderList() == false) return Failed; @@ -653,7 +652,6 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() } return Completed; -#endif } /*}}}*/ // PM::DoInstall - Does the installation /*{{{*/ @@ -669,3 +667,4 @@ pkgPackageManager::OrderResult pkgPackageManager::DoInstall() return Res; } /*}}}*/ +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/packagemanager.h b/apt/apt-pkg/packagemanager.h index 5347801..4cce5d4 100644 --- a/apt/apt-pkg/packagemanager.h +++ b/apt/apt-pkg/packagemanager.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.h,v 1.2 2000/09/26 14:22:14 kojima Exp $ +// $Id: packagemanager.h,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -20,7 +20,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_PACKAGEMANAGER_H #define PKGLIB_PACKAGEMANAGER_H @@ -31,12 +30,14 @@ #include #include +using std::string; + class pkgAcquire; class pkgDepCache; class pkgSourceList; class pkgOrderList; class pkgRecords; -class pkgPackageManager +class pkgPackageManager : protected pkgCache::Namespace { public: @@ -47,17 +48,9 @@ class pkgPackageManager pkgDepCache &Cache; pkgOrderList *List; bool Debug; - - // Bring some usefull types into the local scope - typedef pkgCache::PkgIterator PkgIterator; - typedef pkgCache::VerIterator VerIterator; - typedef pkgCache::DepIterator DepIterator; - typedef pkgCache::PrvIterator PrvIterator; - typedef pkgCache::Version Version; - typedef pkgCache::Package Package; - + bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0); - OrderResult OrderInstall(); + virtual OrderResult OrderInstall(); bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver); bool CreateOrderList(); @@ -71,13 +64,13 @@ class pkgPackageManager bool SmartRemove(PkgIterator Pkg); bool EarlyRemove(PkgIterator Pkg); - // The Actuall installation implementation + // The Actual installation implementation virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;}; virtual bool Configure(PkgIterator /*Pkg*/) {return false;}; virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;}; virtual bool Go() {return true;}; virtual void Reset() {}; - + public: // Main action members @@ -86,7 +79,7 @@ class pkgPackageManager OrderResult DoInstall(); bool FixMissing(); - pkgPackageManager(pkgDepCache &Cache); + pkgPackageManager(pkgDepCache *Cache); virtual ~pkgPackageManager(); }; diff --git a/apt/apt-pkg/pkgcache.cc b/apt/apt-pkg/pkgcache.cc index 3297b8a..a410e50 100644 --- a/apt/apt-pkg/pkgcache.cc +++ b/apt/apt-pkg/pkgcache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.cc,v 1.11 2001/06/25 16:16:18 kojima Exp $ +// $Id: pkgcache.cc,v 1.2 2002/07/23 20:50:56 niemeyer Exp $ /* ###################################################################### Package Cache - Accessor code for the cache @@ -24,21 +24,25 @@ #pragma implementation "apt-pkg/pkgcache.h" #pragma implementation "apt-pkg/cacheiterators.h" #endif + #include +#include #include #include -#include - -#include +#include +#include + #include #include #include +#include #include - /*}}}*/ +using std::string; + // Cache::Header::Header - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Simply initialize the header */ @@ -48,9 +52,9 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ - MajorVersion = 3; - MinorVersion = 7; - Dirty = true; + MajorVersion = 4; + MinorVersion = 0; + Dirty = false; HeaderSz = sizeof(pkgCache::Header); PackageSz = sizeof(pkgCache::Package); @@ -70,6 +74,8 @@ pkgCache::Header::Header() FileList = 0; StringList = 0; + VerSysName = 0; + Architecture = 0; memset(HashTable,0,sizeof(HashTable)); memset(Pools,0,sizeof(Pools)); } @@ -94,9 +100,10 @@ bool pkgCache::Header::CheckSizes(Header &Against) const // Cache::pkgCache - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgCache::pkgCache(MMap &Map) : Map(Map) +pkgCache::pkgCache(MMap *Map, bool DoMap) : Map(*Map) { - ReMap(); + if (DoMap == true) + ReMap(); } /*}}}*/ // Cache::ReMap - Reopen the cache file /*{{{*/ @@ -115,8 +122,8 @@ bool pkgCache::ReMap() StringItemP = (StringItem *)Map.Data(); StrP = (char *)Map.Data(); - if (Map.Size() == 0) - return false; + if (Map.Size() == 0 || HeaderP == 0) + return _error->Error(_("Empty package cache")); // Check the header Header DefHeader; @@ -128,7 +135,16 @@ bool pkgCache::ReMap() HeaderP->MinorVersion != DefHeader.MinorVersion || HeaderP->CheckSizes(DefHeader) == false) return _error->Error(_("The package cache file is an incompatible version")); - + + // Locate our VS.. + if (HeaderP->VerSysName == 0 || + (VS = pkgVersioningSystem::GetVS(StrP + HeaderP->VerSysName)) == 0) + return _error->Error(_("This APT does not support the Versioning System '%s'"),StrP + HeaderP->VerSysName); + + // Chcek the arhcitecture + if (HeaderP->Architecture == 0 || + _config->Find("APT::Architecture") != StrP + HeaderP->Architecture) + return _error->Error(_("The package cache was build for a different architecture")); return true; } /*}}}*/ @@ -140,26 +156,16 @@ bool pkgCache::ReMap() unsigned long pkgCache::sHash(string Str) const { unsigned long Hash = 0; -#if 0 - for (const char *I = Str.begin(); I != Str.end(); I++) + for (string::const_iterator I = Str.begin(); I != Str.end(); I++) Hash = 5*Hash + tolower(*I); -#else - for (const char *I = Str.begin(); I != Str.end(); I++) - Hash = 5*Hash + *I; -#endif return Hash % _count(HeaderP->HashTable); } unsigned long pkgCache::sHash(const char *Str) const { unsigned long Hash = 0; -#if 0 for (const char *I = Str; *I != 0; I++) Hash = 5*Hash + tolower(*I); -#else - for (const char *I = Str; *I != 0; I++) - Hash = 5*Hash + *I; -#endif return Hash % _count(HeaderP->HashTable); } @@ -173,67 +179,62 @@ pkgCache::PkgIterator pkgCache::FindPkg(string Name) Package *Pkg = PkgP + HeaderP->HashTable[Hash(Name)]; for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage) { -#if 0 if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] && - stringcasecmp(Name.begin(),Name.end(),StrP + Pkg->Name) == 0) + stringcmp(Name,StrP + Pkg->Name) == 0) // CNC:2002-07-23 return PkgIterator(*this,Pkg); -#else - if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] && - stringcmp(Name.begin(),Name.end(),StrP + Pkg->Name) == 0) - return PkgIterator(*this,Pkg); -#endif } return PkgIterator(*this,0); } /*}}}*/ +// Cache::CompTypeDeb - Return a string describing the compare type /*{{{*/ +// --------------------------------------------------------------------- +/* This returns a string representation of the dependency compare + type in the weird debian style.. */ +const char *pkgCache::CompTypeDeb(unsigned char Comp) +{ + const char *Ops[] = {"","<=",">=","<<",">>","=","!="}; + if ((unsigned)(Comp & 0xF) < 7) + return Ops[Comp & 0xF]; + return ""; +} + /*}}}*/ +// Cache::CompType - Return a string describing the compare type /*{{{*/ +// --------------------------------------------------------------------- +/* This returns a string representation of the dependency compare + type */ +const char *pkgCache::CompType(unsigned char Comp) +{ + const char *Ops[] = {"","<=",">=","<",">","=","!="}; + if ((unsigned)(Comp & 0xF) < 7) + return Ops[Comp & 0xF]; + return ""; +} + /*}}}*/ +// Cache::DepType - Return a string describing the dep type /*{{{*/ +// --------------------------------------------------------------------- +/* */ +const char *pkgCache::DepType(unsigned char Type) +{ + const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"), + _("Recommends"),_("Conflicts"),_("Replaces"), + _("Obsoletes")}; + if (Type < 8) + return Types[Type]; + return ""; +} + /*}}}*/ // Cache::Priority - Convert a priority value to a string /*{{{*/ // --------------------------------------------------------------------- /* */ const char *pkgCache::Priority(unsigned char Prio) { - const char *Mapping[] = {0,"important","required","standard","optional","extra"}; + const char *Mapping[] = {0,_("important"),_("required"),_("standard"), + _("optional"),_("extra")}; if (Prio < _count(Mapping)) return Mapping[Prio]; return 0; } /*}}}*/ -// Cache::GetCandidateVer - Returns the Candidate install version /*{{{*/ -// --------------------------------------------------------------------- -/* The default just returns the highest available version that is not - a source and automatic */ -pkgCache::VerIterator pkgCache::GetCandidateVer(PkgIterator Pkg, - bool AllowCurrent) -{ - /* Not source/not automatic versions cannot be a candidate version - unless they are already installed */ - VerIterator Last(*this,0); - - for (VerIterator I = Pkg.VersionList(); I.end() == false; I++) - { - if (Pkg.CurrentVer() == I && AllowCurrent == true) - return I; - - for (VerFileIterator J = I.FileList(); J.end() == false; J++) - { - if ((J.File()->Flags & Flag::NotSource) != 0) - 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) - { - if (Last.end() == true) - Last = I; - continue; - } - - return I; - } - } - - return Last; -} - /*}}}*/ // Bases for iterator classes /*{{{*/ void pkgCache::VerIterator::_dummy() {} @@ -248,9 +249,9 @@ void pkgCache::PkgIterator::operator ++(int) // Follow the current links if (Pkg != Owner->PkgP) Pkg = Owner->PkgP + Pkg->NextPackage; - + // Follow the hash table - while (Pkg == Owner->PkgP && HashIndex < (signed)_count(Owner->HeaderP->HashTable)) + while (Pkg == Owner->PkgP && (HashIndex+1) < (signed)_count(Owner->HeaderP->HashTable)) { HashIndex++; Pkg = Owner->PkgP + Owner->HeaderP->HashTable[HashIndex]; @@ -299,7 +300,11 @@ bool pkgCache::DepIterator::IsCritical() then it returned. Otherwise the providing list is looked at to see if there is one one unique providing package if so it is returned. Otherwise true is returned and the target package is set. The return - result indicates whether the node should be expandable */ + result indicates whether the node should be expandable + + In Conjunction with the DepCache the value of Result may not be + super-good since the policy may have made it uninstallable. Using + AllTargets is better in this case. */ bool pkgCache::DepIterator::SmartTargetPkg(PkgIterator &Result) { Result = TargetPkg(); @@ -333,17 +338,19 @@ bool pkgCache::DepIterator::SmartTargetPkg(PkgIterator &Result) if (PStart.OwnerPkg() != P.OwnerPkg()) break; } - + Result = PStart.OwnerPkg(); + // Check for non dups if (P.end() != true) return true; + return false; } /*}}}*/ // DepIterator::AllTargets - Returns the set of all possible targets /*{{{*/ // --------------------------------------------------------------------- -/* This is a more usefull version of TargetPkg() that follows versioned +/* This is a more useful version of TargetPkg() that follows versioned provides. It includes every possible package-version that could satisfy the dependency. The last item in the list has a 0. The resulting pointer must be delete [] 'd */ @@ -359,11 +366,11 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() // Walk along the actual package providing versions for (VerIterator I = DPkg.VersionList(); I.end() == false; I++) { - if (_system->checkDep(TargetVer(),I.VerStr(),Dep->CompareOp) == false) + if (Owner->VS->CheckDep(I.VerStr(),*this) == false) // CNC:2002-07-10 continue; - if ((Dep->Type == pkgCache::Dep::Conflicts - || Dep->Type == pkgCache::Dep::Obsoletes) && + if ((Dep->Type == pkgCache::Dep::Conflicts || + Dep->Type == pkgCache::Dep::Obsoletes) && ParentPkg() == I.ParentPkg()) continue; @@ -375,11 +382,11 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() // Follow all provides for (PrvIterator I = DPkg.ProvidesList(); I.end() == false; I++) { - if (_system->checkDep(TargetVer(),I.ProvideVersion(),Dep->CompareOp) == false) + if (Owner->VS->CheckDep(I.ProvideVersion(),*this) == false) // CNC:2002-07-10 continue; - if ((Dep->Type == pkgCache::Dep::Conflicts - || Dep->Type == pkgCache::Dep::Obsoletes) && + if ((Dep->Type == pkgCache::Dep::Conflicts || + Dep->Type == pkgCache::Dep::Obsoletes) && ParentPkg() == I.OwnerPkg()) continue; @@ -404,30 +411,6 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() return Res; } /*}}}*/ -// DepIterator::CompType - Return a string describing the compare type /*{{{*/ -// --------------------------------------------------------------------- -/* This returns a string representation of the dependency compare - type */ -const char *pkgCache::DepIterator::CompType() -{ - const char *Ops[] = {"","<=",">=","<",">","=","!="}; - if ((unsigned)(Dep->CompareOp & 0xF) < 7) - return Ops[Dep->CompareOp & 0xF]; - return ""; -} - /*}}}*/ -// DepIterator::DepType - Return a string describing the dep type /*{{{*/ -// --------------------------------------------------------------------- -/* */ -const char *pkgCache::DepIterator::DepType() -{ - const char *Types[] = {"","Depends","PreDepends","Suggests", - "Recommends","Conflicts","Replaces","Obsoletes"}; - if (Dep->Type < 8) - return Types[Dep->Type]; - return ""; -} - /*}}}*/ // DepIterator::GlobOr - Compute an OR group /*{{{*/ // --------------------------------------------------------------------- /* This Takes an iterator, iterates past the current dependency grouping @@ -483,18 +466,6 @@ bool pkgCache::VerIterator::Downloadable() const return false; } /*}}}*/ -// VerIterator::PriorityType - Return a string describing the priority /*{{{*/ -// --------------------------------------------------------------------- -/* */ -const char *pkgCache::VerIterator::PriorityType() -{ - const char *Types[] = {"","Important","Required","Standard", - "Optional","Extra"}; - if (Ver->Priority < 6) - return Types[Ver->Priority]; - return ""; -} - /*}}}*/ // VerIterator::Automatic - Check if this version is 'automatic' /*{{{*/ // --------------------------------------------------------------------- /* This checks to see if any of the versions files are not NotAutomatic. @@ -518,13 +489,80 @@ pkgCache::VerFileIterator pkgCache::VerIterator::NewestFile() const VerFileIterator Highest = Files; for (; Files.end() == false; Files++) { - if (_system->versionCompare(Files.File().Version(),Highest.File().Version()) > 0) + if (Owner->VS->CmpReleaseVer(Files.File().Version(),Highest.File().Version()) > 0) Highest = Files; } return Highest; } /*}}}*/ +// VerIterator::RelStr - Release description string /*{{{*/ +// --------------------------------------------------------------------- +/* This describes the version from a release-centric manner. The output is a + list of Label:Version/Archive */ +string pkgCache::VerIterator::RelStr() +{ + bool First = true; + string Res; + 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) + 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) + 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(); + } + } + 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 @@ -533,7 +571,6 @@ pkgCache::VerFileIterator pkgCache::VerIterator::NewestFile() const bool pkgCache::PkgFileIterator::IsOk() { struct stat Buf; - if (stat(FileName(),&Buf) != 0) return false; @@ -543,3 +580,22 @@ bool pkgCache::PkgFileIterator::IsOk() return true; } /*}}}*/ +// PkgFileIterator::RelStr - Return the release string /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string pkgCache::PkgFileIterator::RelStr() +{ + string Res; + if (Version() != 0) + Res = Res + (Res.empty() == true?"v=":",v=") + Version(); + if (Origin() != 0) + Res = Res + (Res.empty() == true?"o=":",o=") + Origin(); + if (Archive() != 0) + Res = Res + (Res.empty() == true?"a=":",a=") + Archive(); + if (Label() != 0) + Res = Res + (Res.empty() == true?"l=":",l=") + Label(); + if (Component() != 0) + Res = Res + (Res.empty() == true?"c=":",c=") + Component(); + return Res; +} + /*}}}*/ diff --git a/apt/apt-pkg/pkgcache.h b/apt/apt-pkg/pkgcache.h index da911da..3f615ab 100644 --- a/apt/apt-pkg/pkgcache.h +++ b/apt/apt-pkg/pkgcache.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.h,v 1.2 2000/09/18 18:34:42 kojima Exp $ +// $Id: pkgcache.h,v 1.2 2003/01/29 13:04:48 niemeyer Exp $ /* ###################################################################### Cache - Structure definitions for the cache file @@ -16,7 +16,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_PKGCACHE_H #define PKGLIB_PKGCACHE_H @@ -28,6 +27,9 @@ #include #include +using std::string; + +class pkgVersioningSystem; class pkgCache { public: @@ -48,12 +50,14 @@ class pkgCache class PrvIterator; class PkgFileIterator; class VerFileIterator; - friend PkgIterator; - friend VerIterator; - friend DepIterator; - friend PrvIterator; - friend PkgFileIterator; - friend VerFileIterator; + friend class PkgIterator; + friend class VerIterator; + friend class DepIterator; + friend class PrvIterator; + friend class PkgFileIterator; + friend class VerFileIterator; + + class Namespace; // These are all the constants used in the cache structures struct Dep @@ -78,6 +82,25 @@ class pkgCache enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)}; enum PkgFFlags {NotSource=(1<<0),NotAutomatic=(1<<1)}; }; + + /* Unnested structures for SWIG. Don't use them for APT internal + * purposes as this will be dropped as soon as SWIG starts + * supporting nested structures. Use definitions above instead. */ + enum _DepType {DepDepends=1,DepPreDepends=2,DepSuggests=3,DepRecommends=4, + DepConflicts=5,DepReplaces=6,DepObsoletes=7}; + enum _DepCompareOp {DepOr=0x10,DepNoOp=0,DepLessEq=0x1,DepGreaterEq=0x2, + DepLess=0x3,DepGreater=0x4,DepEquals=0x5,DepNotEquals=0x6}; + enum _VerPriority {StateImportant=1,StateRequired=2,StateStandard=3, + StateOptional=4,StateExtra=5}; + enum _PkgSelectedState {StateUnknown=0,StateInstall=1,StateHold=2, + StateDeInstall=3,StatePurge=4}; + enum _PkgInstState {StateOk=0,StateReInstReq=1,StateHoldInst=2, + StateHoldReInstReq=3}; + enum _PkgCurrentState {StateNotInstalled=0,StateUnPacked=1, + StateHalfConfigured=2,StateHalfInstalled=4,StateConfigFiles=5, + StateInstalled=6}; + enum _PkgFlags {FlagAuto=(1<<0),FlagEssential=(1<<3),FlagImportant=(1<<4)}; + enum _PkgFFlags {FlagNotSource=(1<<0),FlagNotAutomatic=(1<<1)}; protected: @@ -104,7 +127,8 @@ class pkgCache virtual bool ReMap(); inline bool Sync() {return Map.Sync();}; inline MMap &GetMap() {return Map;}; - + inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();}; + // String hashing function (512 range) inline unsigned long Hash(string S) const {return sHash(S);}; inline unsigned long Hash(const char *S) const {return sHash(S);}; @@ -119,9 +143,16 @@ class pkgCache inline PkgIterator PkgEnd(); inline PkgFileIterator FileBegin(); inline PkgFileIterator FileEnd(); - VerIterator GetCandidateVer(PkgIterator Pkg,bool AllowCurrent = true); + + // Make me a function + pkgVersioningSystem *VS; - pkgCache(MMap &Map); + // Converters + static const char *CompTypeDeb(unsigned char Comp); + static const char *CompType(unsigned char Comp); + static const char *DepType(unsigned char Dep); + + pkgCache(MMap *Map,bool DoMap = true); virtual ~pkgCache() {}; }; @@ -154,6 +185,8 @@ struct pkgCache::Header // Offsets map_ptrloc FileList; // struct PackageFile map_ptrloc StringList; // struct StringItem + map_ptrloc VerSysName; // StringTable + map_ptrloc Architecture; // StringTable unsigned long MaxVerFileSize; /* Allocation pools, there should be one of these for each structure @@ -172,9 +205,7 @@ struct pkgCache::Package // Pointers map_ptrloc Name; // Stringtable map_ptrloc VersionList; // Version - map_ptrloc TargetVer; // Version map_ptrloc CurrentVer; // Version - map_ptrloc TargetDist; // StringTable (StringItem) map_ptrloc Section; // StringTable (StringItem) // Linked list @@ -201,6 +232,8 @@ struct pkgCache::PackageFile map_ptrloc Origin; // Stringtable map_ptrloc Label; // Stringtable map_ptrloc Architecture; // Stringtable + map_ptrloc Site; // Stringtable + map_ptrloc IndexType; // Stringtable unsigned long Size; unsigned long Flags; @@ -247,9 +280,9 @@ struct pkgCache::Dependency map_ptrloc ParentVer; // Version // Specific types of depends + map_ptrloc ID; unsigned char Type; unsigned char CompareOp; - unsigned short ID; }; struct pkgCache::Provides @@ -274,8 +307,26 @@ inline pkgCache::PkgIterator pkgCache::PkgBegin() inline pkgCache::PkgIterator pkgCache::PkgEnd() {return PkgIterator(*this,PkgP);}; inline pkgCache::PkgFileIterator pkgCache::FileBegin() - {return PkgFileIterator(*this);}; + {return PkgFileIterator(*this,PkgFileP + HeaderP->FileList);}; inline pkgCache::PkgFileIterator pkgCache::FileEnd() {return PkgFileIterator(*this,PkgFileP);}; +// Oh I wish for Real Name Space Support +class pkgCache::Namespace +{ + public: + + typedef pkgCache::PkgIterator PkgIterator; + typedef pkgCache::VerIterator VerIterator; + typedef pkgCache::DepIterator DepIterator; + typedef pkgCache::PrvIterator PrvIterator; + typedef pkgCache::PkgFileIterator PkgFileIterator; + typedef pkgCache::VerFileIterator VerFileIterator; + typedef pkgCache::Version Version; + typedef pkgCache::Package Package; + typedef pkgCache::Header Header; + typedef pkgCache::Dep Dep; + typedef pkgCache::Flag Flag; +}; + #endif diff --git a/apt/apt-pkg/pkgcachegen.cc b/apt/apt-pkg/pkgcachegen.cc index d6e6004..818b37c 100644 --- a/apt/apt-pkg/pkgcachegen.cc +++ b/apt/apt-pkg/pkgcachegen.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.cc,v 1.24 2001/12/11 20:50:12 kojima Exp $ +// $Id: pkgcachegen.cc,v 1.5 2002/10/03 22:21:23 niemeyer Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -14,16 +14,21 @@ #pragma implementation "apt-pkg/pkgcachegen.h" #endif +#define APT_COMPATIBILITY 986 + #include #include +#include #include #include #include #include +#include +#include -#include +#include -#include +#include #include #include @@ -31,227 +36,303 @@ #include #include /*}}}*/ +typedef vector::iterator FileIterator; + // CacheGenerator::pkgCacheGenerator - Constructor /*{{{*/ // --------------------------------------------------------------------- /* We set the diry flag and make sure that is written to the disk */ -pkgCacheGenerator::pkgCacheGenerator(DynamicMMap &Map,OpProgress &Prog) : Map(Map), Cache(Map), Progress(&Prog) +pkgCacheGenerator::pkgCacheGenerator(DynamicMMap *pMap,OpProgress *Prog) : + Map(*pMap), Cache(pMap,false), Progress(Prog), + FoundFileDeps(0) { - CurrentFile = 0; - - if (_error->PendingError() == true) - return; - - if (Map.Size() == 0) - { - Map.RawAllocate(sizeof(pkgCache::Header)); - *Cache.HeaderP = pkgCache::Header(); - } - Cache.HeaderP->Dirty = true; - Map.Sync(0,sizeof(pkgCache::Header)); - Map.UsePools(*Cache.HeaderP->Pools,sizeof(Cache.HeaderP->Pools)/sizeof(Cache.HeaderP->Pools[0])); - memset(UniqHash,0,sizeof(UniqHash)); + CurrentFile = 0; + memset(UniqHash,0,sizeof(UniqHash)); + + if (_error->PendingError() == true) + return; + + if (Map.Size() == 0) + { + // Setup the map interface.. + Cache.HeaderP = (pkgCache::Header *)Map.Data(); + Map.RawAllocate(sizeof(pkgCache::Header)); + Map.UsePools(*Cache.HeaderP->Pools,sizeof(Cache.HeaderP->Pools)/sizeof(Cache.HeaderP->Pools[0])); + + // Starting header + *Cache.HeaderP = pkgCache::Header(); + Cache.HeaderP->VerSysName = Map.WriteString(_system->VS->Label); + Cache.HeaderP->Architecture = Map.WriteString(_config->Find("APT::Architecture")); + Cache.ReMap(); + } + else + { + // Map directly from the existing file + Cache.ReMap(); + Map.UsePools(*Cache.HeaderP->Pools,sizeof(Cache.HeaderP->Pools)/sizeof(Cache.HeaderP->Pools[0])); + if (Cache.VS != _system->VS) + { + _error->Error(_("Cache has an incompatible versioning system")); + return; + } + } + + Cache.HeaderP->Dirty = true; + Map.Sync(0,sizeof(pkgCache::Header)); } -/*}}}*/ + /*}}}*/ // CacheGenerator::~pkgCacheGenerator - Destructor /*{{{*/ // --------------------------------------------------------------------- /* We sync the data then unset the dirty flag in two steps so as to - advoid a problem during a crash */ + advoid a problem during a crash */ pkgCacheGenerator::~pkgCacheGenerator() { - if (_error->PendingError() == true) - return; - if (Map.Sync() == false) - return; - - Cache.HeaderP->Dirty = false; - Map.Sync(0,sizeof(pkgCache::Header)); + if (_error->PendingError() == true) + return; + if (Map.Sync() == false) + return; + + Cache.HeaderP->Dirty = false; + Map.Sync(0,sizeof(pkgCache::Header)); } - /*}}}*/ + /*}}}*/ // CacheGenerator::MergeList - Merge the package list /*{{{*/ // --------------------------------------------------------------------- /* This provides the generation of the entries in the cache. Each loop - goes through a single package record from the underlying parse engine. */ + goes through a single package record from the underlying parse engine. */ bool pkgCacheGenerator::MergeList(ListParser &List, pkgCache::VerIterator *OutVer) { - List.Owner = this; - - unsigned int Counter = 0; - while (List.Step() == true) - { - // Get a pointer to the package structure - string PackageName = List.Package(); + List.Owner = this; - if (PackageName.empty() == true) - return false; - - pkgCache::PkgIterator Pkg; - if (NewPackage(Pkg,PackageName) == false) - return _error->Error(_("Error occured while processing %s (NewPackage)"),PackageName.c_str()); - Counter++; - if (Counter % 100 == 0 && Progress != 0) - Progress->Progress(List.Offset()); - - /* Get a pointer to the version structure. We know the list is sorted + unsigned int Counter = 0; + while (List.Step() == true) + { + // Get a pointer to the package structure + string PackageName = List.Package(); + if (PackageName.empty() == true) + return false; + + pkgCache::PkgIterator Pkg; + if (NewPackage(Pkg,PackageName) == false) + return _error->Error(_("Error occured while processing %s (NewPackage)"),PackageName.c_str()); + Counter++; + if (Counter % 100 == 0 && Progress != 0) + Progress->Progress(List.Offset()); + + /* Get a pointer to the version structure. We know the list is sorted so we use that fact in the search. Insertion of new versions is done with correct sorting */ - string Version = List.Version(); - if (Version.empty() == true) - { - if (List.UsePackage(Pkg,pkgCache::VerIterator(Cache)) == false) - return _error->Error(_("Error occured while processing %s (UsePackage1)"),PackageName.c_str()); - continue; - } - - pkgCache::VerIterator Ver = Pkg.VersionList(); - map_ptrloc *Last = &Pkg->VersionList; - int Res = 1; - for (; Ver.end() == false; Last = &Ver->NextVer, Ver++) - { - Res = _system->versionCompare(Version.begin(),Version.end(),Ver.VerStr(), - Ver.VerStr() + strlen(Ver.VerStr())); - if (Res >= 0) { - break; - } - } - - /* We already have a version for this item, record that we saw it */ - unsigned long Hash = List.VersionHash(); - bool ToEnd = true; + string Version = List.Version(); + if (Version.empty() == true) + { + if (List.UsePackage(Pkg,pkgCache::VerIterator(Cache)) == false) + return _error->Error(_("Error occured while processing %s (UsePackage1)"), + PackageName.c_str()); + continue; + } - if (Res == 0 && Ver->Hash == Hash) - { - if (List.UsePackage(Pkg,Ver) == false) - return _error->Error(_("Error occured while processing %s (UsePackage2)"),PackageName.c_str()); - - if (NewFileVer(Ver,List) == false) - return _error->Error(_("Error occured while processing %s (NewFileVer1)"),PackageName.c_str()); - - // Read only a single record and return - if (OutVer != 0) - { - *OutVer = Ver; - return true; - } - continue; - } else if (Res == 0) { - cout << _("WARNING: '") << PackageName << _("' has 2 packages with same version but different dependencies. "); - cout << _("That usually means a packaging bug.") << endl; - - if (Pkg.CurrentVer() == Ver) { - // if this is the currently installed version, then - // keep it as the 1st in the same version set - ToEnd = false; - } else { - // if this one is not the currently installed version, - // just ignore it. and hope that this package doesn't - // have an extra dependency that would fix some - // situation... which would be severe a packaging bug anyway -// cout << "Skipping package"<NextVer, Ver++) - { - Res = _system->versionCompare(Version.begin(),Version.end(),Ver.VerStr(), - Ver.VerStr() + strlen(Ver.VerStr())); - if (Res != 0) - break; - } - } - - // Add a new version - *Last = NewVersion(Ver,Version,*Last); - Ver->ParentPkg = Pkg.Index(); - Ver->Hash = Hash; - if (List.NewVersion(Ver) == false) - return _error->Error(_("Error occured while processing %s (NewVersion1)"),PackageName.c_str()); - - if (List.UsePackage(Pkg,Ver) == false) - return _error->Error(_("Error occured while processing %s (UsePackage3)"),PackageName.c_str()); - - if (NewFileVer(Ver,List) == false) - return _error->Error(_("Error occured while processing %s (NewVersion2)"),PackageName.c_str()); - - // Read only a single record and return - if (OutVer != 0) - { + // CNC:2002-07-09 + string Arch = List.Architecture(); + + pkgCache::VerIterator Ver = Pkg.VersionList(); + map_ptrloc *Last = &Pkg->VersionList; + int Res = 1; + for (; Ver.end() == false; Last = &Ver->NextVer, Ver++) + { + // CNC:2002-07-09 + Res = Cache.VS->CmpVersionArch(Version,Arch,Ver.VerStr(),Ver.Arch()); + if (Res >= 0) + break; + } + + /* We already have a version for this item, record that we + saw it */ + unsigned long Hash = List.VersionHash(); + if (Res == 0 && Ver->Hash == Hash) + { + if (List.UsePackage(Pkg,Ver) == false) + return _error->Error(_("Error occured while processing %s (UsePackage2)"), + PackageName.c_str()); + + if (NewFileVer(Ver,List) == false) + return _error->Error(_("Error occured while processing %s (NewFileVer1)"), + PackageName.c_str()); + + // Read only a single record and return + if (OutVer != 0) + { *OutVer = Ver; + FoundFileDeps |= List.HasFileDeps(); return true; - } - } - - return true; + } + + continue; + } + + // Skip to the end of the same version set. + if (Res == 0) + { + for (; Ver.end() == false; Last = &Ver->NextVer, Ver++) + { + // CNC:2002-07-09 + Res = Cache.VS->CmpVersionArch(Version,Arch, + Ver.VerStr(),Ver.Arch()); + if (Res != 0) + break; + } + } + + // Add a new version + *Last = NewVersion(Ver,Version,*Last); + Ver->ParentPkg = Pkg.Index(); + Ver->Hash = Hash; + if (List.NewVersion(Ver) == false) + return _error->Error(_("Error occured while processing %s (NewVersion1)"), + PackageName.c_str()); + + if (List.UsePackage(Pkg,Ver) == false) + return _error->Error(_("Error occured while processing %s (UsePackage3)"), + PackageName.c_str()); + + if (NewFileVer(Ver,List) == false) + return _error->Error(_("Error occured while processing %s (NewVersion2)"), + PackageName.c_str()); + + // Read only a single record and return + if (OutVer != 0) + { + *OutVer = Ver; + FoundFileDeps |= List.HasFileDeps(); + return true; + } + } + + FoundFileDeps |= List.HasFileDeps(); + + if (Cache.HeaderP->PackageCount >= (1ULL<ID)*8)-1) + return _error->Error(_("Wow, you exceeded the number of package " + "names this APT is capable of.")); + if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID)*8))-1) + return _error->Error(_("Wow, you exceeded the number of versions " + "this APT is capable of.")); + if (Cache.HeaderP->DependsCount >= (1ULL<<(sizeof(Cache.DepP->ID)*8))-1ULL) + return _error->Error(_("Wow, you exceeded the number of dependencies " + "this APT is capable of.")); + return true; } - /*}}}*/ + /*}}}*/ +// 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); + if (Pkg.end() == true) + return _error->Error(_("Error occured while processing %s (FindPkg)"), + PackageName.c_str()); + Counter++; + if (Counter % 100 == 0 && Progress != 0) + Progress->Progress(List.Offset()); + + unsigned long Hash = List.VersionHash(); + pkgCache::VerIterator Ver = Pkg.VersionList(); + for (; Ver.end() == false; Ver++) + { + // CNC:2002-07-25 + if (Ver->Hash == Hash && strcmp(Version.c_str(), Ver.VerStr()) == 0) + { + if (List.CollectFileProvides(Cache,Ver) == false) + return _error->Error(_("Error occured while processing %s (CollectFileProvides)"),PackageName.c_str()); + 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::NewPackage - Add a new package /*{{{*/ // --------------------------------------------------------------------- /* This creates a new package structure and adds it to the hash table */ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,string Name) { - Pkg = Cache.FindPkg(Name); - if (Pkg.end() == false) - return true; - - // Get a structure - unsigned long Package = Map.Allocate(sizeof(pkgCache::Package)); - if (Package == 0) - return false; - - Pkg = pkgCache::PkgIterator(Cache,Cache.PkgP + Package); - - // Insert it into the hash table - unsigned long Hash = Cache.Hash(Name); - Pkg->NextPackage = Cache.HeaderP->HashTable[Hash]; - Cache.HeaderP->HashTable[Hash] = Package; - - // Set the name and the ID - Pkg->Name = Map.WriteString(Name); - if (Pkg->Name == 0) - return false; - Pkg->ID = Cache.HeaderP->PackageCount++; - - return true; + Pkg = Cache.FindPkg(Name); + if (Pkg.end() == false) + return true; + + // Get a structure + unsigned long Package = Map.Allocate(sizeof(pkgCache::Package)); + if (Package == 0) + return false; + + Pkg = pkgCache::PkgIterator(Cache,Cache.PkgP + Package); + + // Insert it into the hash table + unsigned long Hash = Cache.Hash(Name); + Pkg->NextPackage = Cache.HeaderP->HashTable[Hash]; + Cache.HeaderP->HashTable[Hash] = Package; + + // Set the name and the ID + Pkg->Name = Map.WriteString(Name); + if (Pkg->Name == 0) + return false; + Pkg->ID = Cache.HeaderP->PackageCount++; + + return true; } -/*}}}*/ + /*}}}*/ // CacheGenerator::NewFileVer - Create a new File<->Version association /*{{{*/ // --------------------------------------------------------------------- /* */ bool pkgCacheGenerator::NewFileVer(pkgCache::VerIterator &Ver, ListParser &List) { - if (CurrentFile == 0) - return true; - - // Get a structure - unsigned long VerFile = Map.Allocate(sizeof(pkgCache::VerFile)); - if (VerFile == 0) - return false; - - pkgCache::VerFileIterator VF(Cache,Cache.VerFileP + VerFile); - VF->File = CurrentFile - Cache.PkgFileP; - - // Link it to the end of the list - map_ptrloc *Last = &Ver->FileList; - for (pkgCache::VerFileIterator V = Ver.FileList(); V.end() == false; V++) - Last = &V->NextFile; - VF->NextFile = *Last; - *Last = VF.Index(); - - VF->Offset = List.Offset(); - VF->Size = List.Size(); - if (Cache.HeaderP->MaxVerFileSize < VF->Size) - Cache.HeaderP->MaxVerFileSize = VF->Size; - Cache.HeaderP->VerFileCount++; - - return true; + if (CurrentFile == 0) + return true; + + // Get a structure + unsigned long VerFile = Map.Allocate(sizeof(pkgCache::VerFile)); + if (VerFile == 0) + return 0; + + pkgCache::VerFileIterator VF(Cache,Cache.VerFileP + VerFile); + VF->File = CurrentFile - Cache.PkgFileP; + + // Link it to the end of the list + map_ptrloc *Last = &Ver->FileList; + for (pkgCache::VerFileIterator V = Ver.FileList(); V.end() == false; V++) + Last = &V->NextFile; + VF->NextFile = *Last; + *Last = VF.Index(); + + VF->Offset = List.Offset(); + VF->Size = List.Size(); + if (Cache.HeaderP->MaxVerFileSize < VF->Size) + Cache.HeaderP->MaxVerFileSize = VF->Size; + Cache.HeaderP->VerFileCount++; + + return true; } -/*}}}*/ + /*}}}*/ // CacheGenerator::NewVersion - Create a new Version /*{{{*/ // --------------------------------------------------------------------- /* This puts a version structure in the linked list */ @@ -259,85 +340,88 @@ unsigned long pkgCacheGenerator::NewVersion(pkgCache::VerIterator &Ver, string VerStr, unsigned long Next) { - // Get a structure - unsigned long Version = Map.Allocate(sizeof(pkgCache::Version)); - if (Version == 0) - return 0; - - // Fill it in - Ver = pkgCache::VerIterator(Cache,Cache.VerP + Version); - Ver->NextVer = Next; - Ver->ID = Cache.HeaderP->VersionCount++; - Ver->VerStr = Map.WriteString(VerStr); - if (Ver->VerStr == 0) - return 0; - - return Version; + // Get a structure + unsigned long Version = Map.Allocate(sizeof(pkgCache::Version)); + if (Version == 0) + return 0; + + // Fill it in + Ver = pkgCache::VerIterator(Cache,Cache.VerP + Version); + Ver->NextVer = Next; + Ver->ID = Cache.HeaderP->VersionCount++; + Ver->VerStr = Map.WriteString(VerStr); + if (Ver->VerStr == 0) + return 0; + + return Version; } -/*}}}*/ + /*}}}*/ // ListParser::NewDepends - Create a dependency element /*{{{*/ - // --------------------------------------------------------------------- +// --------------------------------------------------------------------- /* This creates a dependency element in the tree. It is linked to the - version and to the package that it is pointing to. */ + version and to the package that it is pointing to. */ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, string PackageName, string Version, unsigned int Op, unsigned int Type) { - pkgCache &Cache = Owner->Cache; - - // Get a structure - unsigned long Dependency = Owner->Map.Allocate(sizeof(pkgCache::Dependency)); - if (Dependency == 0) - return false; - - // Fill it in - pkgCache::DepIterator Dep(Cache,Cache.DepP + Dependency); - Dep->ParentVer = Ver.Index(); - Dep->Type = Type; - Dep->CompareOp = Op; - Dep->ID = Cache.HeaderP->DependsCount++; - - // Locate the target package - pkgCache::PkgIterator Pkg; - if (Owner->NewPackage(Pkg,PackageName) == false) - return false; - - // Probe the reverse dependency list for a version string that matches - if (Version.empty() == false) - { - /* for (pkgCache::DepIterator I = Pkg.RevDependsList(); I.end() == false; I++, Hit++) + pkgCache &Cache = Owner->Cache; + + // Get a structure + unsigned long Dependency = Owner->Map.Allocate(sizeof(pkgCache::Dependency)); + if (Dependency == 0) + return false; + + // Fill it in + pkgCache::DepIterator Dep(Cache,Cache.DepP + Dependency); + Dep->ParentVer = Ver.Index(); + Dep->Type = Type; + Dep->CompareOp = Op; + Dep->ID = Cache.HeaderP->DependsCount++; + + // Locate the target package + pkgCache::PkgIterator Pkg; + if (Owner->NewPackage(Pkg,PackageName) == false) + return false; + + // Probe the reverse dependency list for a version string that matches + if (Version.empty() == false) + { +/* for (pkgCache::DepIterator I = Pkg.RevDependsList(); I.end() == false; I++) if (I->Version != 0 && I.TargetVer() == Version) - Dep->Version = I->Version;*/ - if (Dep->Version == 0) - if ((Dep->Version = WriteString(Version)) == 0) - return false; - } - - // Link it to the package - Dep->Package = Pkg.Index(); - Dep->NextRevDepends = Pkg->RevDepends; - Pkg->RevDepends = Dep.Index(); - - /* Link it to the version (at the end of the list) - Caching the old end point speeds up generation substantially */ - if (OldDepVer != Ver) - { - OldDepLast = &Ver->DependsList; - for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) - OldDepLast = &D->NextDepends; - OldDepVer = Ver; - } - - - Dep->NextDepends = *OldDepLast; - *OldDepLast = Dep.Index(); - OldDepLast = &Dep->NextDepends; - - return true; + Dep->Version = I->Version;*/ + if (Dep->Version == 0) + if ((Dep->Version = WriteString(Version)) == 0) + return false; + } + + // Link it to the package + Dep->Package = Pkg.Index(); + Dep->NextRevDepends = Pkg->RevDepends; + Pkg->RevDepends = Dep.Index(); + + /* Link it to the version (at the end of the list) + Caching the old end point speeds up generation substantially */ + if (OldDepVer != Ver) + { + OldDepLast = &Ver->DependsList; + for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) + OldDepLast = &D->NextDepends; + OldDepVer = Ver; + } + + // Is it a file dependency? + if (PackageName[0] == '/') + FoundFileDeps = true; + + Dep->NextDepends = *OldDepLast; + *OldDepLast = Dep.Index(); + OldDepLast = &Dep->NextDepends; + + return true; } -/*}}}*/ + /*}}}*/ // ListParser::NewProvides - Create a Provides element /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -345,124 +429,449 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver, string PackageName, string Version) { - pkgCache &Cache = Owner->Cache; - - // We do not add self referencing provides - if (Ver.ParentPkg().Name() == PackageName) - return true; - - // Get a structure - unsigned long Provides = Owner->Map.Allocate(sizeof(pkgCache::Provides)); - if (Provides == 0) - return false; - Cache.HeaderP->ProvidesCount++; - - // Fill it in - pkgCache::PrvIterator Prv(Cache,Cache.ProvideP + Provides,Cache.PkgP); - Prv->Version = Ver.Index(); - Prv->NextPkgProv = Ver->ProvidesList; - Ver->ProvidesList = Prv.Index(); - - if (Version.empty() == false) - { - if (Prv->ProvideVersion == 0) - if ((Prv->ProvideVersion = WriteString(Version)) == 0) - return false; - } - - // Locate the target package - pkgCache::PkgIterator Pkg; - if (Owner->NewPackage(Pkg,PackageName) == false) - return false; - - // Link it to the package - Prv->ParentPkg = Pkg.Index(); - Prv->NextProvides = Pkg->ProvidesList; - Pkg->ProvidesList = Prv.Index(); + pkgCache &Cache = Owner->Cache; - return true; + // We do not add self referencing provides + if (Ver.ParentPkg().Name() == PackageName) + return true; + + // Get a structure + unsigned long Provides = Owner->Map.Allocate(sizeof(pkgCache::Provides)); + if (Provides == 0) + return false; + Cache.HeaderP->ProvidesCount++; + + // Fill it in + pkgCache::PrvIterator Prv(Cache,Cache.ProvideP + Provides,Cache.PkgP); + Prv->Version = Ver.Index(); + Prv->NextPkgProv = Ver->ProvidesList; + Ver->ProvidesList = Prv.Index(); + if (Version.empty() == false && (Prv->ProvideVersion = WriteString(Version)) == 0) + return false; + + // Locate the target package + pkgCache::PkgIterator Pkg; + if (Owner->NewPackage(Pkg,PackageName) == false) + return false; + + // Link it to the package + Prv->ParentPkg = Pkg.Index(); + Prv->NextProvides = Pkg->ProvidesList; + Pkg->ProvidesList = Prv.Index(); + + 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. */ -bool pkgCacheGenerator::SelectFile(string File,unsigned long Flags) + added versions. The caller is responsible for setting the IMS fields. */ +bool pkgCacheGenerator::SelectFile(string File,string Site, + const pkgIndexFile &Index, + unsigned long Flags) { - struct stat Buf; - if (stat(File.c_str(),&Buf) == -1) - return _error->Errno("stat","Couldn't stat %s",File.c_str()); - - // Get some space for the structure - CurrentFile = Cache.PkgFileP + Map.Allocate(sizeof(*CurrentFile)); - if (CurrentFile == Cache.PkgFileP) - return false; - - // Fill it in - CurrentFile->FileName = Map.WriteString(File); - CurrentFile->Size = Buf.st_size; - CurrentFile->mtime = Buf.st_mtime; - CurrentFile->NextFile = Cache.HeaderP->FileList; - CurrentFile->Flags = Flags; - CurrentFile->ID = Cache.HeaderP->PackageFileCount; - PkgFileName = File; - Cache.HeaderP->FileList = CurrentFile - Cache.PkgFileP; - Cache.HeaderP->PackageFileCount++; - - if (CurrentFile->FileName == 0) - return false; - - if (Progress != 0) - Progress->SubProgress(Buf.st_size); - return true; + // Get some space for the structure + CurrentFile = Cache.PkgFileP + Map.Allocate(sizeof(*CurrentFile)); + if (CurrentFile == Cache.PkgFileP) + return false; + + // Fill it in + CurrentFile->FileName = Map.WriteString(File); + CurrentFile->Site = WriteUniqString(Site); + CurrentFile->NextFile = Cache.HeaderP->FileList; + CurrentFile->Flags = Flags; + CurrentFile->ID = Cache.HeaderP->PackageFileCount; + CurrentFile->IndexType = WriteUniqString(Index.GetType()->Label); + PkgFileName = File; + Cache.HeaderP->FileList = CurrentFile - Cache.PkgFileP; + Cache.HeaderP->PackageFileCount++; + + if (CurrentFile->FileName == 0) + return false; + + if (Progress != 0) + Progress->SubProgress(Index.Size()); + return true; } -/*}}}*/ + /*}}}*/ // CacheGenerator::WriteUniqueString - Insert a unique string /*{{{*/ // --------------------------------------------------------------------- /* This is used to create handles to strings. Given the same text it - always returns the same number */ + always returns the same number */ unsigned long pkgCacheGenerator::WriteUniqString(const char *S, unsigned int Size) { - /* We use a very small transient hash table here, this speeds up generation - by a fair amount on slower machines */ - pkgCache::StringItem *&Bucket = UniqHash[(S[0]*5 + S[1]) % _count(UniqHash)]; - if (Bucket != 0 && - stringcmp(S,S+Size,Cache.StrP + Bucket->String) == 0) - return Bucket->String; - - // Search for an insertion point - pkgCache::StringItem *I = Cache.StringItemP + Cache.HeaderP->StringList; - int Res = 1; - map_ptrloc *Last = &Cache.HeaderP->StringList; - for (; I != Cache.StringItemP; Last = &I->NextItem, - I = Cache.StringItemP + I->NextItem) - { - Res = stringcmp(S,S+Size,Cache.StrP + I->String); - if (Res >= 0) - break; - } - - // Match - if (Res == 0) - { - Bucket = I; - return I->String; - } - - // Get a structure - unsigned long Item = Map.Allocate(sizeof(pkgCache::StringItem)); - if (Item == 0) - return 0; - - // Fill in the structure - pkgCache::StringItem *ItemP = Cache.StringItemP + Item; - ItemP->NextItem = I - Cache.StringItemP; - *Last = Item; - ItemP->String = Map.WriteString(S,Size); - if (ItemP->String == 0) - return 0; - - Bucket = ItemP; - return ItemP->String; + /* We use a very small transient hash table here, this speeds up generation + by a fair amount on slower machines */ + pkgCache::StringItem *&Bucket = UniqHash[(S[0]*5 + S[1]) % _count(UniqHash)]; + if (Bucket != 0 && + stringcmp(S,S+Size,Cache.StrP + Bucket->String) == 0) + return Bucket->String; + + // Search for an insertion point + pkgCache::StringItem *I = Cache.StringItemP + Cache.HeaderP->StringList; + int Res = 1; + map_ptrloc *Last = &Cache.HeaderP->StringList; + for (; I != Cache.StringItemP; Last = &I->NextItem, + I = Cache.StringItemP + I->NextItem) + { + Res = stringcmp(S,S+Size,Cache.StrP + I->String); + if (Res >= 0) + break; + } + + // Match + if (Res == 0) + { + Bucket = I; + return I->String; + } + + // Get a structure + unsigned long Item = Map.Allocate(sizeof(pkgCache::StringItem)); + if (Item == 0) + return 0; + + // Fill in the structure + pkgCache::StringItem *ItemP = Cache.StringItemP + Item; + ItemP->NextItem = I - Cache.StringItemP; + *Last = Item; + ItemP->String = Map.WriteString(S,Size); + if (ItemP->String == 0) + return 0; + + Bucket = ItemP; + return ItemP->String; } + /*}}}*/ + +// CheckValidity - Check that a cache is up-to-date /*{{{*/ +// --------------------------------------------------------------------- +/* 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(string CacheFile, FileIterator Start, + FileIterator End,MMap **OutMap = 0) +{ + // No file, certainly invalid + if (CacheFile.empty() == true || FileExists(CacheFile) == false) + return false; + + // Map it + FileFd CacheF(CacheFile,FileFd::ReadOnly); + SPtr Map = new MMap(CacheF,MMap::Public | MMap::ReadOnly); + pkgCache Cache(Map); + if (_error->PendingError() == true || Map->Size() == 0) + { + _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 Visited = new bool[Cache.HeaderP->PackageFileCount]; + memset(Visited,0,sizeof(*Visited)*Cache.HeaderP->PackageFileCount); + for (; Start != End; Start++) + { + if ((*Start)->HasPackages() == false) + continue; + + if ((*Start)->Exists() == false) + { + // CNC:2002-07-04 + /*_error->WarningE("stat",_("Couldn't stat source package list %s"), + (*Start)->Describe().c_str());*/ + continue; + } + + // FindInCache is also expected to do an IMS check. + pkgCache::PkgFileIterator File = (*Start)->FindInCache(Cache); + if (File.end() == true) + return false; + + Visited[File->ID] = true; + } + + for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++) + if (Visited[I] == false) + return false; + + if (_error->PendingError() == true) + { + _error->Discard(); + return false; + } + + if (OutMap != 0) + *OutMap = Map.UnGuard(); + return true; +} + /*}}}*/ +// ComputeSize - Compute the total size of a bunch of files /*{{{*/ +// --------------------------------------------------------------------- +/* Size is kind of an abstract notion that is only used for the progress + meter */ +static unsigned long ComputeSize(FileIterator Start,FileIterator End) +{ + unsigned long TotalSize = 0; + for (; Start != End; Start++) + { + if ((*Start)->HasPackages() == false) + continue; + TotalSize += (*Start)->Size(); + } + return TotalSize; +} + /*}}}*/ +// BuildCache - Merge the list of index files into the cache /*{{{*/ +// --------------------------------------------------------------------- +/* */ +static bool BuildCache(pkgCacheGenerator &Gen, + OpProgress &Progress, + unsigned long &CurrentSize,unsigned long TotalSize, + FileIterator Start, FileIterator End) +{ + FileIterator I; + for (I = Start; I != End; I++) + { + if ((*I)->HasPackages() == false) + continue; + + if ((*I)->Exists() == false) + continue; + + if ((*I)->FindInCache(Gen.GetCache()).end() == false) + { + _error->Warning("Duplicate sources.list entry %s", + (*I)->Describe().c_str()); + continue; + } + + unsigned long Size = (*I)->Size(); + Progress.OverallProgress(CurrentSize,TotalSize,Size,_("Reading Package Lists")); + CurrentSize += Size; + + if ((*I)->Merge(Gen,Progress) == false) + return false; + } + + if (Gen.HasFileDeps() == true) + { + Progress.Done(); + TotalSize = ComputeSize(Start, End); + CurrentSize = 0; + for (I = Start; I != End; I++) + { + unsigned long Size = (*I)->Size(); + Progress.OverallProgress(CurrentSize,TotalSize,Size,_("Collecting File Provides")); + CurrentSize += Size; + if ((*I)->MergeFileProvides(Gen,Progress) == false) + return false; + } + // CNC:2002-07-04 + Progress.Done(); + } + + return true; +} + /*}}}*/ +// 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. */ +bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, + MMap **OutMap,bool AllowMem) +{ + unsigned long MapSize = _config->FindI("APT::Cache-Limit",6*1024*1024); + + vector Files(List.begin(),List.end()); + unsigned long EndOfSource = Files.size(); + if (_system->AddStatusFiles(Files) == false) + return false; + + // Decide if we can write to the files.. + string CacheFile = _config->FindFile("Dir::Cache::pkgcache"); + string SrcCacheFile = _config->FindFile("Dir::Cache::srcpkgcache"); + + // 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 (Writeable == false && AllowMem == false && CacheFile.empty() == false) + return _error->Error(_("Unable to write to %s"),flNotFile(CacheFile).c_str()); + + Progress.OverallProgress(0,1,1,_("Reading Package Lists")); + + // Cache is OK, Fin. + if (CheckValidity(CacheFile,Files.begin(),Files.end(),OutMap) == true) + { + Progress.OverallProgress(1,1,1,_("Reading Package Lists")); + return true; + } + + // CNC:2002-07-03 +#if DYING + if (_system->PreProcess(Files.begin(),Files.end(),Progress) == false) + { + _error->Error(_("Error pre-processing package lists")); + return false; + } +#endif + /* At this point we know we need to reconstruct the package cache, + begin. */ + SPtr CacheF; + SPtr Map; + if (Writeable == true && CacheFile.empty() == false) + { + unlink(CacheFile.c_str()); + CacheF = new FileFd(CacheFile,FileFd::WriteEmpty); + fchmod(CacheF->Fd(),0644); + Map = new DynamicMMap(*CacheF,MMap::Public,MapSize); + if (_error->PendingError() == true) + return false; + } + else + { + // Just build it in memory.. + Map = new DynamicMMap(MMap::Public,MapSize); + } + + // Lets try the source cache. + unsigned long CurrentSize = 0; + unsigned long TotalSize = 0; +#if DISABLED + if (CheckValidity(SrcCacheFile,Files.begin(), + Files.begin()+EndOfSource) == true) + { + // Preload the map with the source cache + FileFd SCacheF(SrcCacheFile,FileFd::ReadOnly); + if (SCacheF.Read((unsigned char *)Map->Data() + Map->RawAllocate(SCacheF.Size()), + SCacheF.Size()) == false) + return false; + + TotalSize = ComputeSize(Files.begin()+EndOfSource,Files.end()); + + // 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) + return false; + } + else + { + 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) + return false; + + // Write it back + if (Writeable == true && SrcCacheFile.empty() == false) + { + FileFd SCacheF(SrcCacheFile,FileFd::WriteEmpty); + 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(); + } + + // Build the status cache + if (BuildCache(Gen,Progress,CurrentSize,TotalSize, + Files.begin()+EndOfSource,Files.end()) == false) + return false; + } +#else + { + TotalSize = ComputeSize(Files.begin(),Files.end()); + + // Build the whole cache at once + pkgCacheGenerator Gen(Map.Get(),&Progress); + if (_error->PendingError() == true) + return false; + if (BuildCache(Gen,Progress,CurrentSize,TotalSize, + Files.begin(),Files.end()) == false) + return false; + } +#endif + + if (_error->PendingError() == true) + return false; + if (OutMap != 0) + { + if (CacheF != 0) + { + delete Map.UnGuard(); + *OutMap = new MMap(*CacheF,MMap::Public | MMap::ReadOnly); + } + else + { + *OutMap = Map.UnGuard(); + } + } + + return true; +} + /*}}}*/ +// MakeOnlyStatusCache - Build a cache with just the status files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap) +{ + unsigned long MapSize = _config->FindI("APT::Cache-Limit",4*1024*1024); + vector Files; + unsigned long EndOfSource = Files.size(); + if (_system->AddStatusFiles(Files) == false) + return false; + + SPtr Map; + Map = new DynamicMMap(MMap::Public,MapSize); + unsigned long CurrentSize = 0; + unsigned long TotalSize = 0; + + TotalSize = ComputeSize(Files.begin()+EndOfSource,Files.end()); + + // Build the status cache + Progress.OverallProgress(0,1,1,_("Reading Package Lists")); + pkgCacheGenerator Gen(Map.Get(),&Progress); + if (_error->PendingError() == true) + return false; + if (BuildCache(Gen,Progress,CurrentSize,TotalSize, + Files.begin()+EndOfSource,Files.end()) == false) + return false; + + if (_error->PendingError() == true) + return false; + *OutMap = Map.UnGuard(); + + return true; +} + /*}}}*/ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/pkgcachegen.h b/apt/apt-pkg/pkgcachegen.h index 8258ad0..5329728 100644 --- a/apt/apt-pkg/pkgcachegen.h +++ b/apt/apt-pkg/pkgcachegen.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.h,v 1.5 2000/12/02 18:02:53 kojima Exp $ +// $Id: pkgcachegen.h,v 1.3 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -16,7 +16,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_PKGCACHEGEN_H #define PKGLIB_PKGCACHEGEN_H @@ -29,6 +28,7 @@ class pkgSourceList; class OpProgress; class MMap; +class pkgIndexFile; class pkgCacheGenerator { @@ -39,7 +39,7 @@ class pkgCacheGenerator public: class ListParser; - friend ListParser; + friend class ListParser; protected: @@ -49,24 +49,31 @@ class pkgCacheGenerator string PkgFileName; pkgCache::PackageFile *CurrentFile; + + // Flag file dependencies + bool FoundFileDeps; bool NewPackage(pkgCache::PkgIterator &Pkg,string Pkg); bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List); unsigned long NewVersion(pkgCache::VerIterator &Ver,string VerStr,unsigned long Next); + public: + unsigned long WriteUniqString(const char *S,unsigned int Size); inline unsigned long WriteUniqString(string S) {return WriteUniqString(S.c_str(),S.length());}; - public: - void DropProgress() {Progress = 0;}; - bool SelectFile(string File,unsigned long Flags = 0); + bool SelectFile(string File,string Site,pkgIndexFile const &Index, + unsigned long Flags = 0); bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0); inline pkgCache &GetCache() {return Cache;}; inline pkgCache::PkgFileIterator GetCurFile() {return pkgCache::PkgFileIterator(Cache,CurrentFile);}; + + bool HasFileDeps() {return FoundFileDeps;}; + bool MergeFileProvides(ListParser &List); - pkgCacheGenerator(DynamicMMap &Map,OpProgress &Progress); + pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress); ~pkgCacheGenerator(); }; @@ -74,12 +81,15 @@ class pkgCacheGenerator class pkgCacheGenerator::ListParser { pkgCacheGenerator *Owner; - friend pkgCacheGenerator; + friend class pkgCacheGenerator; // Some cache items pkgCache::VerIterator OldDepVer; map_ptrloc *OldDepLast; + // Flag file dependencies + bool FoundFileDeps; + protected: inline unsigned long WriteUniqString(string S) {return Owner->WriteUniqString(S);}; @@ -96,7 +106,8 @@ class pkgCacheGenerator::ListParser // These all operate against the current section virtual string Package() = 0; virtual string Version() = 0; - inline virtual string Architecture() { return string(); } + // CNC:2002-07-09 + virtual string Architecture() {return string();}; virtual bool NewVersion(pkgCache::VerIterator Ver) = 0; virtual unsigned short VersionHash() = 0; virtual bool UsePackage(pkgCache::PkgIterator Pkg, @@ -106,10 +117,29 @@ class pkgCacheGenerator::ListParser virtual bool Step() = 0; - virtual bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI,FileFd &File) = 0; - + inline bool HasFileDeps() {return FoundFileDeps;}; + virtual bool CollectFileProvides(pkgCache &Cache, + pkgCache::VerIterator Ver) {return true;}; + + ListParser() : FoundFileDeps(false) {}; virtual ~ListParser() {}; }; +bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, + MMap **OutMap = 0,bool AllowMem = false); +bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap); + +#ifdef APT_COMPATIBILITY +#if APT_COMPATIBILITY != 986 +#warning "Using APT_COMPATIBILITY" +#endif +MMap *pkgMakeStatusCacheMem(pkgSourceList &List,OpProgress &Progress) +{ + MMap *Map = 0; + if (pkgMakeStatusCache(List,Progress,&Map,true) == false) + return 0; + return Map; +} +#endif #endif diff --git a/apt/apt-pkg/pkgrecords.cc b/apt/apt-pkg/pkgrecords.cc index f658ab0..79ab5c6 100644 --- a/apt/apt-pkg/pkgrecords.cc +++ b/apt/apt-pkg/pkgrecords.cc @@ -1,24 +1,23 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgrecords.cc,v 1.5 2001/01/11 02:03:27 kojima Exp $ +// $Id: pkgrecords.cc,v 1.2 2002/11/28 18:54:15 niemeyer Exp $ /* ###################################################################### Package Records - Allows access to complete package description records directly from the file. - ##################################################################### - */ + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ #pragma implementation "apt-pkg/pkgrecords.h" #endif #include +#include #include #include -#include - -#include + +#include /*}}}*/ // Records::pkgRecords - Constructor /*{{{*/ @@ -26,28 +25,28 @@ /* This will create the necessary structures to access the status files */ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) { - Files = new PkgFile[Cache.HeaderP->PackageFileCount]; + Files = new Parser *[Cache.HeaderP->PackageFileCount]; + memset(Files,0,sizeof(*Files)*Cache.HeaderP->PackageFileCount); + for (pkgCache::PkgFileIterator I = Cache.FileBegin(); I.end() == false; I++) { - // We can not initialize if the cache is out of sync. - if (I.IsOk() == false) + const pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(I.IndexType()); + if (Type == 0) { - _error->Error(_("Package file %s is out of sync."),I.FileName()); + _error->Error(_("Index file type '%s' is not supported"),I.IndexType()); return; } - - // Create the file - Files[I->ID].File = string(I.FileName()); - - // Create the parser - Files[I->ID].Parse = _system->CreateRecordParser(Files[I->ID].File,Cache); - if (_error->PendingError() == true) { - if (Files[I->ID].Parse) - delete Files[I->ID].Parse; + + Files[I->ID] = Type->CreatePkgParser(I); + if (Files[I->ID] == 0) return; - } } + + // CNC:2002-11-28 + // We store that to make sure that the destructor won't segfault, + // even if the Cache object was destructed before this instance. + PackageFileCount = Cache.HeaderP->PackageFileCount; } /*}}}*/ // Records::~pkgRecords - Destructor /*{{{*/ @@ -55,6 +54,10 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) /* */ pkgRecords::~pkgRecords() { + // CNC:2002-11-28 + // See comments above. + for (unsigned I = 0; I != PackageFileCount; I++) + delete Files[I]; delete [] Files; } /*}}}*/ @@ -63,17 +66,7 @@ pkgRecords::~pkgRecords() /* */ pkgRecords::Parser &pkgRecords::Lookup(pkgCache::VerFileIterator const &Ver) { - PkgFile &File = Files[Ver.File()->ID]; - File.Parse->Jump(Ver); - - return *File.Parse; -} - /*}}}*/ -// Records::Pkgfile::~PkgFile - Destructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -pkgRecords::PkgFile::~PkgFile() -{ - delete Parse; + Files[Ver.File()->ID]->Jump(Ver); + return *Files[Ver.File()->ID]; } /*}}}*/ diff --git a/apt/apt-pkg/pkgrecords.h b/apt/apt-pkg/pkgrecords.h index 122e516..c90cb79 100644 --- a/apt/apt-pkg/pkgrecords.h +++ b/apt/apt-pkg/pkgrecords.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgrecords.h,v 1.3 2000/10/28 01:48:45 kojima Exp $ +// $Id: pkgrecords.h,v 1.2 2002/11/28 18:54:15 niemeyer Exp $ /* ###################################################################### Package Records - Allows access to complete package description records @@ -14,7 +14,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_PKGRECORDS_H #define PKGLIB_PKGRECORDS_H @@ -33,17 +32,10 @@ class pkgRecords private: pkgCache &Cache; - - // List of package files - struct PkgFile - { - string File; - Parser *Parse; - - PkgFile() : Parse(0) { File=""; }; - ~PkgFile(); - }; - PkgFile *Files; + Parser **Files; + + // CNC:2002-11-28 + int PackageFileCount; public: @@ -58,22 +50,27 @@ class pkgRecords class pkgRecords::Parser { protected: - - public: - friend pkgRecords; virtual bool Jump(pkgCache::VerFileIterator const &Ver) = 0; - + + public: + friend class pkgRecords; + // These refer to the archive file for the Version virtual string FileName() {return string();}; virtual string MD5Hash() {return string();}; + virtual string SHA1Hash() {return string();}; virtual string SourcePkg() {return string();}; - + // These are some general stats about the package virtual string Maintainer() {return string();}; virtual string ShortDesc() {return string();}; virtual string LongDesc() {return string();}; - + virtual string Name() {return string();}; + + // The record in binary form + virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;}; + virtual ~Parser() {}; }; diff --git a/apt/apt-pkg/pkgsystem.cc b/apt/apt-pkg/pkgsystem.cc new file mode 100644 index 0000000..e8ada85 --- /dev/null +++ b/apt/apt-pkg/pkgsystem.cc @@ -0,0 +1,45 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: pkgsystem.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ +/* ###################################################################### + + System - Abstraction for running on different systems. + + Basic general structure.. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/pkgsystem.h" +#endif + +#include +#include + /*}}}*/ + +pkgSystem *_system = 0; +static pkgSystem *SysList[10]; +pkgSystem **pkgSystem::GlobalList = SysList; +unsigned long pkgSystem::GlobalListLen = 0; + +// System::pkgSystem - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Add it to the global list.. */ +pkgSystem::pkgSystem() +{ + SysList[GlobalListLen] = this; + GlobalListLen++; +} + /*}}}*/ +// System::GetSystem - Get the named system /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgSystem *pkgSystem::GetSystem(const char *Label) +{ + for (unsigned I = 0; I != GlobalListLen; I++) + if (strcmp(SysList[I]->Label,Label) == 0) + return SysList[I]; + return 0; +} + /*}}}*/ diff --git a/apt/apt-pkg/pkgsystem.h b/apt/apt-pkg/pkgsystem.h new file mode 100644 index 0000000..08dc2bc --- /dev/null +++ b/apt/apt-pkg/pkgsystem.h @@ -0,0 +1,112 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: pkgsystem.h,v 1.4 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + System - Abstraction for running on different systems. + + Instances of this class can be thought of as factories or meta-classes + for a variety of more specialized classes. Together this class and + it's speciallized offspring completely define the environment and how + to access resources for a specific system. There are several sub + areas that are all orthogonal - each system has a unique combination of + these sub areas: + - Versioning. Different systems have different ideas on versions. + Within a system all sub classes must follow the same versioning + rules. + - Local tool locking to prevent multiple tools from accessing the + same database. + - Candidate Version selection policy - this is probably almost always + managed using a standard APT class + - Actual Package installation + * Indication of what kind of binary formats are supported + - Selection of local 'status' indexes that make up the pkgCache. + + It is important to note that the handling of index files is not a + function of the system. Index files are handled through a seperate + abstraction - the only requirement is that the index files have the + same idea of versioning as the target system. + + Upon startup each supported system instantiates an instance of the + pkgSystem class (using a global constructor) which will make itself + available to the main APT init routine. That routine will select the + proper system and make it the global default. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_PKGSYSTEM_H +#define PKGLIB_PKGSYSTEM_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/pkgsystem.h" +#endif + +#include +#include + +class pkgPackageManager; +class pkgVersioningSystem; +class Configuration; +class pkgIndexFile; + +// CNC:2002-07-05 +class pkgProblemResolver; + +class pkgSystem +{ + public: + + // Global list of supported systems + static pkgSystem **GlobalList; + static unsigned long GlobalListLen; + static pkgSystem *GetSystem(const char *Label); + + const char *Label; + pkgVersioningSystem *VS; + + /* Prevent other programs from touching shared data not covered by + other locks (cache or state locks) */ + virtual bool Lock() = 0; + virtual bool UnLock(bool NoErrors = false) = 0; + + // CNC:2002-07-06 + virtual bool LockRead() {return true;}; + + /* Various helper classes to interface with specific bits of this + environment */ + virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const = 0; + + /* Load environment specific configuration and perform any other setup + necessary */ + virtual bool Initialize(Configuration &/*Cnf*/) {return true;}; + + /* Type is some kind of Globally Unique way of differentiating + archive file types.. */ + virtual bool ArchiveSupported(const char *Type) = 0; + + // Return a list of system index files.. + virtual bool AddStatusFiles(std::vector &List) = 0; + virtual bool FindIndex(pkgCache::PkgFileIterator File, + pkgIndexFile *&Found) const = 0; + + /* Evauluate how 'right' we are for this system based on the filesystem + etc.. */ + virtual signed Score(Configuration const &/*Cnf*/) {return 0;}; + + // CNC:2002-07-03 + // Do environment specific pre-processing over the Index Files + virtual bool PreProcess(pkgIndexFile **Start,pkgIndexFile **End, + OpProgress &Progress) {return true;}; + virtual bool ProcessCache(pkgDepCache &Cache, pkgProblemResolver &Fix) + {return true;}; + virtual bool IgnoreDep(pkgVersioningSystem &VS, pkgCache::DepIterator &Dep) + {return false;}; + + pkgSystem(); + virtual ~pkgSystem() {}; +}; + +// The environment we are operating in. +extern pkgSystem *_system; + +#endif diff --git a/apt/apt-pkg/policy.cc b/apt/apt-pkg/policy.cc new file mode 100644 index 0000000..c0c4d17 --- /dev/null +++ b/apt/apt-pkg/policy.cc @@ -0,0 +1,303 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: policy.cc,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + Package Version Policy implementation + + This is just a really simple wrapper around pkgVersionMatch with + some added goodies to manage the list of things.. + + Priority Table: + + 1000 -> inf = Downgradeable priorities + 1000 = The 'no downgrade' pseduo-status file + 100 -> 1000 = Standard priorities + 990 = Config file override package files + 989 = Start for preference auto-priorities + 500 = Default package files + 100 = The status file + 0 -> 100 = NotAutomatic sources like experimental + -inf -> 0 = Never selected + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/policy.h" +#endif +#include +#include +#include +#include +#include +#include + +#include + +#include + /*}}}*/ + +using namespace std; + +// Policy::Init - Startup and bind to a cache /*{{{*/ +// --------------------------------------------------------------------- +/* 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) +{ + PFPriority = new signed short[Owner->Head().PackageFileCount]; + Pins = new Pin[Owner->Head().PackageCount]; + + for (unsigned long I = 0; I != Owner->Head().PackageCount; I++) + Pins[I].Type = pkgVersionMatch::None; + + // The config file has a master override. + string DefRel = _config->Find("APT::Default-Release"); + if (DefRel.empty() == false) + CreatePin(pkgVersionMatch::Release,"",DefRel,990); + + InitDefaults(); +} + /*}}}*/ +// Policy::InitDefaults - Compute the default selections /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgPolicy::InitDefaults() +{ + // Initialize the priorities based on the status of the package file + for (pkgCache::PkgFileIterator I = Cache->FileBegin(); I != Cache->FileEnd(); I++) + { + PFPriority[I->ID] = 500; + if ((I->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource) + PFPriority[I->ID] = 100; + else + if ((I->Flags & pkgCache::Flag::NotAutomatic) == pkgCache::Flag::NotAutomatic) + PFPriority[I->ID] = 1; + } + + // Apply the defaults.. + SPtrArray Fixed = new bool[Cache->HeaderP->PackageFileCount]; + memset(Fixed,0,sizeof(*Fixed)*Cache->HeaderP->PackageFileCount); + signed Cur = 989; + StatusOverride = false; + for (vector::const_iterator I = Defaults.begin(); I != Defaults.end(); + I++, Cur--) + { + pkgVersionMatch Match(I->Data,I->Type); + for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); F++) + { + if (Match.FileMatch(F) == true && Fixed[F->ID] == false) + { + if (I->Priority != 0 && I->Priority > 0) + Cur = I->Priority; + + if (I->Priority < 0) + PFPriority[F->ID] = I->Priority; + else + PFPriority[F->ID] = Cur; + + if (PFPriority[F->ID] > 1000) + StatusOverride = true; + + Fixed[F->ID] = true; + } + } + } + + if (_config->FindB("Debug::pkgPolicy",false) == true) + for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); F++) + cout << "Prio of " << F.FileName() << ' ' << PFPriority[F->ID] << endl; + + return true; +} + /*}}}*/ +// 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::GetCandidateVer(pkgCache::PkgIterator Pkg) +{ + // Look for a package pin and evaluate it. + signed Max = GetPriority(Pkg); + pkgCache::VerIterator Pref = GetMatch(Pkg); + + /* Falling through to the default version.. Setting Max to zero + effectively excludes everything <= 0 which are the non-automatic + priorities.. The status file is given a prio of 100 which will exclude + not-automatic sources, except in a single shot not-installed mode. + The second pseduo-status file is at prio 1000, above which will permit + the user to force-downgrade things. + + The user pin is subject to the same priority rules as default + selections. Thus there are two ways to create a pin - a pin that + tracks the default when the default is taken away, and a permanent + pin that stays at that setting. + */ + for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; Ver++) + { + for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++) + { + /* 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 ((VF.File()->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource && + Pkg.CurrentVer() != Ver) + continue; + + signed Prio = PFPriority[VF.File()->ID]; + if (Prio > Max) + { + Pref = Ver; + Max = Prio; + } + } + + if (Pkg.CurrentVer() == Ver && Max < 1000) + { + /* Elevate our current selection (or the status file itself) + to the Pseudo-status priority. */ + if (Pref.end() == true) + Pref = Ver; + Max = 1000; + + // Fast path optimize. + if (StatusOverride == false) + break; + } + } + return Pref; +} + /*}}}*/ +// Policy::CreatePin - Create an entry in the pin table.. /*{{{*/ +// --------------------------------------------------------------------- +/* For performance we have 3 tables, the default table, the main cache + table (hashed to the cache). A blank package name indicates the pin + belongs to the default table. Order of insertion matters here, the + earlier defaults override later ones. */ +void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name, + string Data,signed short Priority) +{ + Pin *P = 0; + + if (Name.empty() == true) + P = &*Defaults.insert(Defaults.end(),PkgPin()); + else + { + // Get a spot to put the pin + pkgCache::PkgIterator Pkg = Cache->FindPkg(Name); + if (Pkg.end() == true) + { + // Check the unmatched table + for (vector::iterator I = Unmatched.begin(); + I != Unmatched.end() && P == 0; I++) + if (I->Pkg == Name) + P = &*I; + + if (P == 0) + P = &*Unmatched.insert(Unmatched.end(),PkgPin()); + } + else + { + P = Pins + Pkg->ID; + } + } + + // Set.. + P->Type = Type; + P->Priority = Priority; + P->Data = Data; +} + /*}}}*/ +// Policy::GetMatch - Get the matching version for a package pin /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgCache::VerIterator pkgPolicy::GetMatch(pkgCache::PkgIterator Pkg) +{ + const Pin &PPkg = Pins[Pkg->ID]; + if (PPkg.Type != pkgVersionMatch::None) + { + pkgVersionMatch Match(PPkg.Data,PPkg.Type); + return Match.Find(Pkg); + } + return pkgCache::VerIterator(*Pkg.Cache()); +} + /*}}}*/ +// Policy::GetPriority - Get the priority of the package pin /*{{{*/ +// --------------------------------------------------------------------- +/* */ +signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg) +{ + if (Pins[Pkg->ID].Type != pkgVersionMatch::None) + { + // In this case 0 means default priority + if (Pins[Pkg->ID].Priority == 0) + return 989; + return Pins[Pkg->ID].Priority; + } + + return 0; +} + /*}}}*/ + +// ReadPinFile - Load the pin file into a Policy /*{{{*/ +// --------------------------------------------------------------------- +/* I'd like to see the preferences file store more than just pin information + but right now that is the only stuff I have to store. Later there will + have to be some kind of combined super parser to get the data into all + the right classes.. */ +bool ReadPinFile(pkgPolicy &Plcy,string File) +{ + if (File.empty() == true) + File = _config->FindFile("Dir::Etc::Preferences"); + + if (FileExists(File) == false) + return true; + + FileFd Fd(File,FileFd::ReadOnly); + pkgTagFile TF(&Fd); + if (_error->PendingError() == true) + return false; + + pkgTagSection Tags; + while (TF.Step(Tags) == true) + { + string Name = Tags.FindS("Package"); + if (Name.empty() == true) + return _error->Error(_("Invalid record in the preferences file, no Package header")); + if (Name == "*") + Name = string(); + + const char *Start; + const char *End; + if (Tags.Find("Pin",Start,End) == false) + continue; + + const char *Word = Start; + for (; Word != End && isspace(*Word) == 0; Word++); + + // Parse the type.. + pkgVersionMatch::MatchType Type; + if (stringcasecmp(Start,Word,"version") == 0 && Name.empty() == false) + Type = pkgVersionMatch::Version; + else if (stringcasecmp(Start,Word,"release") == 0) + Type = pkgVersionMatch::Release; + else if (stringcasecmp(Start,Word,"origin") == 0) + Type = pkgVersionMatch::Origin; + else + { + _error->Warning(_("Did not understand pin type %s"),string(Start,Word).c_str()); + continue; + } + for (; Word != End && isspace(*Word) != 0; Word++); + + Plcy.CreatePin(Type,Name,string(Word,End), + Tags.FindI("Pin-Priority")); + } + + Plcy.InitDefaults(); + return true; +} + /*}}}*/ diff --git a/apt/apt-pkg/policy.h b/apt/apt-pkg/policy.h new file mode 100644 index 0000000..09c361e --- /dev/null +++ b/apt/apt-pkg/policy.h @@ -0,0 +1,91 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: policy.h,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ +/* ###################################################################### + + Package Version Policy implementation + + This implements the more advanced 'Version 4' APT policy engine. The + standard 'Version 0' engine is included inside the DepCache which is + it's historical location. + + The V4 engine allows the user to completly control all aspects of + version selection. There are three primary means to choose a version + * Selection by version match + * Selection by Release file match + * Selection by origin server + + Each package may be 'pinned' with a single criteria, which will ultimately + result in the selection of a single version, or no version, for each + package. + + Furthermore, the default selection can be influenced by specifying + the ordering of package files. The order is derived by reading the + package file preferences and assigning a priority to each package + file. + + A special flag may be set to indicate if no version should be returned + if no matching versions are found, otherwise the default matching + rules are used to locate a hit. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_POLICY_H +#define PKGLIB_POLICY_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/policy.h" +#endif + +#include +#include +#include + +using std::vector; + +class pkgPolicy : public pkgDepCache::Policy +{ + struct Pin + { + pkgVersionMatch::MatchType Type; + string Data; + signed short Priority; + Pin() : Type(pkgVersionMatch::None), Priority(0) {}; + }; + + struct PkgPin : Pin + { + string Pkg; + }; + + protected: + + Pin *Pins; + signed short *PFPriority; + vector Defaults; + vector Unmatched; + pkgCache *Cache; + bool StatusOverride; + + public: + + // Things for manipulating pins + void CreatePin(pkgVersionMatch::MatchType Type,string Pkg, + string Data,signed short Priority); + inline signed short GetPriority(pkgCache::PkgFileIterator const &File) + {return PFPriority[File->ID];}; + signed short GetPriority(pkgCache::PkgIterator const &Pkg); + pkgCache::VerIterator GetMatch(pkgCache::PkgIterator Pkg); + + // Things for the cache interface. + virtual pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator Pkg); + virtual bool IsImportantDep(pkgCache::DepIterator Dep) {return pkgDepCache::Policy::IsImportantDep(Dep);}; + bool InitDefaults(); + + pkgPolicy(pkgCache *Owner); + virtual ~pkgPolicy() {delete [] PFPriority; delete [] Pins;}; +}; + +bool ReadPinFile(pkgPolicy &Plcy,string File = ""); + +#endif diff --git a/apt/apt-pkg/repository.cc b/apt/apt-pkg/repository.cc new file mode 100644 index 0000000..7cbc92f --- /dev/null +++ b/apt/apt-pkg/repository.cc @@ -0,0 +1,96 @@ +// CNC:2002-07-03 + +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: repository.cc,v 1.4 2002/07/29 18:13:52 niemeyer Exp $ +/* ###################################################################### + + Repository abstraction for 1 or more unique URI+Dist + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/repository.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + /*}}}*/ +using namespace std; + +// Repository::ParseRelease - Parse Release file for checksums /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgRepository::ParseRelease(string File) +{ + // Open the stream for reading + FileFd F(File, FileFd::ReadOnly); + if (_error->PendingError()) + return _error->Error(_("could not open Release file '%s'"),File.c_str()); + + pkgTagFile Tags(&F); + pkgTagSection Section; + + if (!Tags.Step(Section)) + return false; + + GotRelease = true; + + string Files = Section.FindS("MD5Sum"); + // Lack of checksum is only fatal if authentication is on + if (Files.empty()) + { + if (IsAuthenticated()) + return _error->Error(_("No MD5Sum data in Release file '%s'"), + Files.c_str()); + else + return true; + } + + // Iterate over the entire list grabbing each triplet + const char *C = Files.c_str(); + while (*C != 0) + { + string Hash = ""; + string Size = ""; + string Path = ""; + + if (ParseQuoteWord(C,Hash) == false || Hash.empty() == true || + ParseQuoteWord(C,Size) == false || atoi(Size.c_str()) < 0 || + ParseQuoteWord(C,Path) == false || Path.empty() == true) + return _error->Error(_("Error parsing MD5Sum hash record on Release file '%s'"), + File.c_str()); + + // Parse the size and append the directory + IndexChecksums[Path].Size = atoi(Size.c_str()); + IndexChecksums[Path].MD5 = Hash; + } + + return true; +} + /*}}}*/ +// Repository::FindChecksums - Get checksum info for file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgRepository::FindChecksums(string URI,unsigned long &Size, string &MD5) +{ + string Path = string(URI,RootURI.size()); + if (IndexChecksums.find(Path) == IndexChecksums.end()) + return false; + Size = IndexChecksums[Path].Size; + MD5 = IndexChecksums[Path].MD5; + return true; +} + /*}}}*/ +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/repository.h b/apt/apt-pkg/repository.h new file mode 100644 index 0000000..743ebc5 --- /dev/null +++ b/apt/apt-pkg/repository.h @@ -0,0 +1,57 @@ +// CNC:2002-07-03 + +#ifndef PKGLIB_REPOSITORY_H +#define PKBLIB_REPOSITORY_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/repository.h" +#endif + +#include +#include + +#include + +using std::map; + +class pkgRepository +{ + protected: + + + struct Checksum { + unsigned long Size; + string MD5; + string SHA1; + }; + + map IndexChecksums; // path -> checksum data + + bool GotRelease; + + public: + + string URI; + string Dist; + const pkgSourceList::Vendor *Vendor; + string RootURI; + + bool Acquire; + + bool ParseRelease(string File); + bool HasRelease() const { return GotRelease; } + + bool IsAuthenticated() const { return Vendor != NULL; }; + bool FindChecksums(string URI,unsigned long &Size, string &MD5); + + pkgRepository(string URI,string Dist, const pkgSourceList::Vendor *Vendor, + string RootURI) + : GotRelease(0), URI(URI), Dist(Dist), Vendor(Vendor), RootURI(RootURI), + Acquire(1) + {}; + +}; + +#endif + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/CVS/Entries b/apt/apt-pkg/rpm/CVS/Entries deleted file mode 100644 index fad1da5..0000000 --- a/apt/apt-pkg/rpm/CVS/Entries +++ /dev/null @@ -1,16 +0,0 @@ -/rpmrecords.cc/1.20/Wed Aug 1 21:35:12 2001// -/rpmfactory.h/1.6/Fri Aug 10 14:00:38 2001// -/rpminit.h/1.14/Fri Aug 10 14:00:38 2001// -/rpmpackagedata.h/1.3/Fri Aug 10 14:00:39 2001// -/rpmrecords.h/1.3/Fri Aug 10 14:00:39 2001// -/rpmsrcrecords.h/1.1/Fri Aug 10 14:00:39 2001// -/rpmpm.h/1.6/Tue Nov 13 14:24:16 2001// -/rpmfactory.cc/1.27/Fri Nov 16 01:13:06 2001// -/rpminit.cc/1.32/Fri Nov 16 01:13:06 2001// -/rpmpackagedata.cc/1.5/Fri Nov 16 01:13:06 2001// -/rpmsrcrecords.cc/1.5/Fri Nov 16 01:13:06 2001// -/rpmlistparser.cc/1.60/Wed Mar 6 17:17:10 2002// -/rpmlistparser.h/1.15/Wed Mar 6 17:17:10 2002// -/rpmpm.cc/1.34/Wed Mar 6 17:17:13 2002// -/rpmversion.cc/1.4/Wed Mar 6 17:17:13 2002// -D diff --git a/apt/apt-pkg/rpm/CVS/Repository b/apt/apt-pkg/rpm/CVS/Repository deleted file mode 100644 index 50f634e..0000000 --- a/apt/apt-pkg/rpm/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/apt-pkg/rpm diff --git a/apt/apt-pkg/rpm/CVS/Root b/apt/apt-pkg/rpm/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/apt-pkg/rpm/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/apt-pkg/rpm/rpmfactory.cc b/apt/apt-pkg/rpm/rpmfactory.cc deleted file mode 100644 index 1f52a2b..0000000 --- a/apt/apt-pkg/rpm/rpmfactory.cc +++ /dev/null @@ -1,385 +0,0 @@ -/* - * $Id: rpmfactory.cc,v 1.27 2001/11/13 17:32:08 kojima Exp $ - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -RPMFactory::RPMFactory() -{ - filedeps = new map(); - multiarchs = new map(); -} - - -pkgPackageManager *RPMFactory::CreatePackageManager(pkgDepCache &Cache) -{ - return new pkgRPMPM(Cache); -} - - -pkgRecords::Parser *RPMFactory::CreateRecordParser(string File, pkgCache &Cache) -{ - if (File == pkgRpmLock::RPMDBPath()) - return new rpmRecordParser("", Cache); - else - return new rpmRecordParser(File, Cache); -} - - -pkgSrcRecords::Parser *RPMFactory::CreateSrcRecordParser(string File, - pkgSourceList::const_iterator SrcItem) -{ - FileFd *Fd = new FileFd(File, FileFd::ReadOnly); - if (_error->PendingError()) - { - delete Fd; - return NULL; - } - - return new rpmSrcRecordParser(Fd, SrcItem); -} - - -bool RPMFactory::checkSourceType(int type, bool binary) -{ - if (binary) - return (type == pkgSourceList::Rpm); - else - return (type == pkgSourceList::RpmSrc); -} - - -bool RPMFactory::packageCacheCheck(string CacheFile) -{ - if (_error->PendingError()) - return false; - - // Open the source package cache - if (!FileExists(CacheFile)) { - return false; - } - - FileFd CacheF(CacheFile,FileFd::ReadOnly); - if (_error->PendingError()) - { - _error->Discard(); - return false; - } - - MMap Map(CacheF,MMap::Public | MMap::ReadOnly); - if (_error->PendingError() || Map.Size() == 0) - { - _error->Discard(); - return false; - } - - pkgCache Cache(Map); - if (_error->PendingError()) - { - _error->Discard(); - return false; - } - - string blaa="packages.rpm"; -#ifdef HAVE_RPM4 - if (rpmExpandNumeric("%{_dbapi}") == 3) - blaa = "Packages"; -#endif - - string rpmdb_path = pkgRpmLock::RPMDBPath() + blaa; - - int bla = 0; - - // Check each file - for (pkgCache::PkgFileIterator F(Cache); F.end() == false; F++) - { - if (F.IsOk() == false) { - return false; - } - if (strcmp(rpmdb_path.c_str(), F.FileName()) != 0) { - continue; - } - bla++; - } - - // only one file - if (bla != 1) { - return false; - } - - return true; -} - - -pkgCacheGenerator::ListParser *RPMFactory::CreateListParser(FileFd &File) -{ - return new rpmListParser(File, filedeps, multiarchs); -} - - - /*}}}*/ -// AddStatusSize - Add the size of the status files /*{{{*/ -// --------------------------------------------------------------------- -bool RPMFactory::addStatusSize(unsigned long &TotalSize) -{ - //struct stat Buf; - unsigned size, bla; - - pkgRpmLock::SharedRPM()->Offset(size, bla); - - TotalSize += size; - - return true; -} - /*}}}*/ - -// MergeInstalledPackages (was MergeStatus) - Add the status files to the cache /*{{{*/ -// --------------------------------------------------------------------- -/* This adds the status files to the map */ -bool RPMFactory::mergeInstalledPackages(OpProgress &Progress, - pkgCacheGenerator &Gen, - unsigned long &CurrentSize, - unsigned long TotalSize) -{ - unsigned size, bla; - string suffix = "packages.rpm"; -#ifdef HAVE_RPM4 - if (rpmExpandNumeric("%{_dbapi}") == 3) - suffix = "Packages"; -#endif - - string tmp = string(pkgRpmLock::RPMDBPath()+suffix).c_str(); - - const char *dbpath = tmp.c_str(); - - pkgRpmLock::SharedRPM()->Rewind(); - // Check if the file exists and it is not the primary status file. - rpmListParser *Parser = new rpmListParser(filedeps, multiarchs); - - - pkgRpmLock::SharedRPM()->Offset(size, bla); - - Progress.OverallProgress(CurrentSize,TotalSize, size,_("Reading Package Lists")); - if (_error->PendingError() == true) - return _error->Error(_("Problem opening %s"), dbpath); - CurrentSize += size; - - Progress.SubProgress(0,_("Local Package State - ") + flNotDir(dbpath)); - if (Gen.SelectFile(dbpath,pkgCache::Flag::NotSource) == false) - return _error->Error(_("Problem with SelectFile %s"), dbpath); - - if (Gen.MergeList(*Parser) == false) - return _error->Error(_("Problem with MergeList %s"), dbpath); - Progress.Progress(size); - - return true; -} - - - - -void gatherFileDependencies(map*filedeps, Header header) -{ - int type, count; - char **namel; - char **verl; - int *flagl; - int res; - - res = headerGetEntry(header, RPMTAG_REQUIRENAME, &type, - (void **)&namel, &count); - res = headerGetEntry(header, RPMTAG_REQUIREVERSION, &type, - (void **)&verl, &count); - res = headerGetEntry(header, RPMTAG_REQUIREFLAGS, &type, - (void **)&flagl, &count); - - while (count--) { - if (*namel[count] == '/') { // ugh file dep! - (*filedeps)[string(namel[count])] = 1; - } - } -} - - -bool RPMFactory::preProcess(pkgSourceList &List, OpProgress &Progress) -{ - string ListDir = _config->FindDir("Dir::State::lists"); - unsigned total, complete; - struct stat stbuf; - const char *baseArch; - const char *thisArch; - struct utsname un; - map archmap; - - baseArch = _config->Find("APT::architecture").c_str(); - - if (uname(&un) < 0) { - thisArch = baseArch; - } else { - thisArch = un.machine; - } - - // calculate size of files - - pkgRpmLock::SharedRPM()->Offset(total, complete); - - for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) - { - // Only check relevant source types. - if (!checkSourceType(I->Type())) - continue; - - string File = ListDir + URItoFileName(I->PackagesURI()); - - if (FileExists(File) == false) - continue; - - if (stat(File.c_str(), &stbuf) == 0) - { - total += stbuf.st_size; - } - } - - - complete = 0; - Progress.OverallProgress(0, 100, 100, _("Processing File Dependencies")); - Progress.SubProgress(total, _("Looking for file dependencies")); - - for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) - { - // Only check relevant source types. - if (!checkSourceType(I->Type())) - continue; - - string File = ListDir + URItoFileName(I->PackagesURI()); - - if (FileExists(File) == false) - continue; - - FileFd F(File, FileFd::ReadOnly); - if (_error->PendingError() == true) - return _error->Error(_("Problem opening %s"),File.c_str()); - - FD_t fdt = fdDup(F.Fd()); - while (1) - { - Header hdr; - int type, count, res; - char *arch; - - hdr = headerRead(fdt, HEADER_MAGIC_YES); - if (!hdr) - break; - gatherFileDependencies(filedeps, hdr); - - - /* - * Make it so that for each version, we keep track of the best - * architecture. - */ - res = headerGetEntry(hdr, RPMTAG_ARCH, &type, - (void **)&arch, &count); - assert(type == RPM_STRING_TYPE); - if (res) { - char *name; - char *version; - char *release; - int_32 *epoch; - int res; - char buf[256]; - - headerGetEntry(hdr, RPMTAG_NAME, &type, - (void **)&name, &count); - headerGetEntry(hdr, RPMTAG_VERSION, &type, - (void **)&version, &count); - headerGetEntry(hdr, RPMTAG_RELEASE, &type, - (void **)&release, &count); - res = headerGetEntry(hdr, RPMTAG_EPOCH, &type, - (void **)&epoch, &count); - - if (res == 1) { - snprintf(buf, 255, "%i:%s-%s", *epoch, version, release); - } else { - snprintf(buf, 255, "%s-%s", version, release); - } - string n = string(name)+"#"+string(buf); - - if (archmap.find(n) != archmap.end()) - { - if (strcmp(archmap[n].c_str(), arch) != 0) { - int a = rpmMachineScore(RPM_MACHTABLE_INSTARCH, archmap[n].c_str()); - int b = rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch); - - if (b < a && b > 0) { - (*multiarchs)[n] = string(arch); - // this is a multiarch pkg - archmap[n] = (*multiarchs)[n]; - } else { - (*multiarchs)[n] = archmap[n]; - } - } - } - else - { - int a = rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch); - if (a > 0) - { - archmap[n] = string(arch); - (*multiarchs)[n] = string(arch); - } - } - } - headerFree(hdr); - - Progress.Progress(complete+F.Tell()); - } - fdClose(fdt); - complete += F.Size(); - } - - pkgRpmLock::SharedRPM()->Rewind(); - while (1) - { - Header hdr; - unsigned comp; - - hdr = pkgRpmLock::SharedRPM()->NextHeader(); - if (!hdr) - break; - gatherFileDependencies(filedeps, hdr); - headerFree(hdr); - pkgRpmLock::SharedRPM()->Offset(total, comp); - Progress.Progress(complete+comp); - } - Progress.Done(); - - return true; -} diff --git a/apt/apt-pkg/rpm/rpmfactory.h b/apt/apt-pkg/rpm/rpmfactory.h deleted file mode 100644 index a79500b..0000000 --- a/apt/apt-pkg/rpm/rpmfactory.h +++ /dev/null @@ -1,45 +0,0 @@ - -#ifndef _RPMFACTORY_H_ -#define _RPMFACTORY_H_ - -#include -#include -#include -#include - -class RPMFactory : public SystemFactory -{ - map *filedeps; - map *multiarchs; // pkgs with multiple architectures - - protected: - bool addStatusSize(unsigned long &TotalSize); - - bool mergeInstalledPackages(OpProgress &Progress,pkgCacheGenerator &Gen, - unsigned long &CurrentSize, - unsigned long TotalSize); - - virtual bool packageCacheCheck(string CacheFile); - - virtual bool checkSourceType(int type, bool binary=true); - - bool preProcess(pkgSourceList &List, OpProgress &Progress); - - public: - virtual int versionCompare(const char *A, const char *B); - virtual int versionCompare(const char *A, const char *AEnd, const char *B, - const char *BEnd); - virtual int versionCompare(string A,string B); - virtual bool checkDep(const char *DepVer,const char *PkgVer,int Op); - virtual string baseVersion(const char *Ver); - - public: - pkgCacheGenerator::ListParser *CreateListParser(FileFd &File); - pkgRecords::Parser *CreateRecordParser(string File, pkgCache &Cache); - pkgSrcRecords::Parser *CreateSrcRecordParser(string File, pkgSourceList::const_iterator SrcItem); - pkgPackageManager *CreatePackageManager(pkgDepCache &Cache); - - RPMFactory::RPMFactory(); -}; - -#endif diff --git a/apt/apt-pkg/rpm/rpmhandler.cc b/apt/apt-pkg/rpm/rpmhandler.cc new file mode 100644 index 0000000..c8428d2 --- /dev/null +++ b/apt/apt-pkg/rpm/rpmhandler.cc @@ -0,0 +1,233 @@ + +/* + ###################################################################### + + RPM database and hdlist related handling + + ###################################################################### + */ + +#include + +#ifdef HAVE_RPM + +#include +#include + +#include +#include + +#include + +#include + +#ifdef HAVE_RPM41 +#include +#include +#define rpmxxInitIterator(a,b,c,d) rpmtsInitIterator(a,(rpmTag)b,c,d) +#else +#define rpmxxInitIterator(a,b,c,d) rpmdbInitIterator(a,b,c,d) +#endif + +RPMFileHandler::RPMFileHandler(string File) +{ + FD = Fopen(File.c_str(), "r"); + if (FD == NULL) + { + /* + _error->Error(_("could not open RPM package list file %s: %s"), + File.c_str(), rpmErrorString()); + */ + return; + } + iSize = fdSize(FD); +} + +RPMFileHandler::RPMFileHandler(FileFd *File) +{ + FD = fdDup(File->Fd()); + if (FD == NULL) + { + /* + _error->Error(_("could not create RPM file descriptor: %s"), + rpmErrorString()); + */ + return; + } + iSize = fdSize(FD); +} + +RPMFileHandler::~RPMFileHandler() +{ + if (HeaderP != NULL) + headerFree(HeaderP); + if (FD != NULL) + Fclose(FD); +} + +bool RPMFileHandler::Skip() +{ + if (FD == NULL) + return false; + iOffset = lseek(Fileno(FD),0,SEEK_CUR); + if (HeaderP != NULL) + headerFree(HeaderP); + HeaderP = headerRead(FD, HEADER_MAGIC_YES); + return (HeaderP != NULL); +} + +bool RPMFileHandler::Jump(unsigned Offset) +{ + if (FD == NULL) + return false; + if (lseek(Fileno(FD),Offset,SEEK_SET) != Offset) + return false; + return Skip(); +} + +void RPMFileHandler::Rewind() +{ + if (FD == NULL) + return; + iOffset = lseek(Fileno(FD),0,SEEK_SET); + if (iOffset != 0) + _error->Error(_("could not rewind RPMFileHandler")); +} + +RPMDBHandler::RPMDBHandler(bool WriteLock) + : WriteLock(WriteLock) +{ + string Dir = _config->Find("RPM::RootDir"); + rpmReadConfigFiles(NULL, NULL); +#ifdef HAVE_RPM4 + RpmIter = NULL; +#endif +#ifdef HAVE_RPM41 + Handler = rpmtsCreate(); + if (!Dir.empty()) + rpmtsSetRootDir(Handler, Dir.c_str()); + if (rpmtsOpenDB(Handler, WriteLock?O_RDWR:O_RDONLY) != 0) + { + _error->Error(_("could not open RPM database")); + return; + } +#else + const char *RootDir = NULL; + if (!Dir.empty()) + RootDir = Dir.c_str(); + if (rpmdbOpen(RootDir, &Handler, WriteLock?O_RDWR:O_RDONLY, 0644) != 0) + { + _error->Error(_("could not open RPM database")); + return; + } +#endif +#ifdef HAVE_RPM4 + RpmIter = rpmxxInitIterator(Handler, RPMDBI_PACKAGES, NULL, 0); + if (RpmIter == NULL) { + _error->Error(_("could not create RPM database iterator")); + return; + } + iSize = rpmdbGetIteratorCount(RpmIter); +#else + struct stat st; + stat(DataPath(false).c_str(), &st); + iSize = st.st_size; +#endif +} + +RPMDBHandler::~RPMDBHandler() +{ +#ifdef HAVE_RPM4 + if (RpmIter == NULL) + return; + rpmdbFreeIterator(RpmIter); + RpmIter = NULL; +#else + if (HeaderP != NULL) + headerFree(HeaderP); +#endif + +#ifdef HAVE_RPM41 + rpmtsFree(Handler); +#else + rpmdbClose(Handler); +#endif +} + +string RPMDBHandler::DataPath(bool DirectoryOnly) +{ + string File = "packages.rpm"; +#ifdef HAVE_RPM4 + if (rpmExpandNumeric("%{_dbapi}") >= 3) + File = "Packages"; +#endif + if (DirectoryOnly == true) + return _config->Find("RPM::RootDir")+"/var/lib/rpm"; + else + return _config->Find("RPM::RootDir")+"/var/lib/rpm/"+File; +} + +bool RPMDBHandler::Skip() +{ +#ifdef HAVE_RPM4 + if (RpmIter == NULL) + return false; + HeaderP = rpmdbNextIterator(RpmIter); + iOffset = rpmdbGetIteratorOffset(RpmIter); + if (HeaderP == NULL) + return false; +#else + if (iOffset == 0) + iOffset = rpmdbFirstRecNum(Handler); + else + iOffset = rpmdbNextRecNum(Handler, iOffset); + if (HeaderP != NULL) + { + headerFree(HeaderP); + HeaderP = NULL; + } + if (iOffset == 0) + return false; + HeaderP = rpmdbGetRecord(Handler, iOffset); +#endif + return true; +} + +bool RPMDBHandler::Jump(unsigned int Offset) +{ + iOffset = Offset; +#ifdef HAVE_RPM4 + if (RpmIter == NULL) + return false; + rpmdbFreeIterator(RpmIter); + if (iOffset == 0) + RpmIter = rpmxxInitIterator(Handler, RPMDBI_PACKAGES, NULL, 0); + else + RpmIter = rpmxxInitIterator(Handler, RPMDBI_PACKAGES, + &iOffset, sizeof(iOffset)); + HeaderP = rpmdbNextIterator(RpmIter); +#else + HeaderP = rpmdbGetRecord(Handler, iOffset); +#endif + return true; +} + +void RPMDBHandler::Rewind() +{ +#ifdef HAVE_RPM4 + if (RpmIter == NULL) + return; + rpmdbFreeIterator(RpmIter); + RpmIter = rpmxxInitIterator(Handler, RPMDBI_PACKAGES, NULL, 0); +#else + if (HeaderP != NULL) + { + headerFree(HeaderP); + HeaderP = NULL; + } +#endif + iOffset = 0; +} +#endif + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmhandler.h b/apt/apt-pkg/rpm/rpmhandler.h new file mode 100644 index 0000000..d69e161 --- /dev/null +++ b/apt/apt-pkg/rpm/rpmhandler.h @@ -0,0 +1,100 @@ + +/* ###################################################################### + + RPM database and hdlist related handling + + ###################################################################### + */ + + +#ifndef PKGLIB_RPMHANDLER_H +#define PKGLIB_RPMHANDLER_H + +#include + +#include +#include + +#include + +class RPMHandler +{ + protected: + + unsigned int iOffset; + unsigned int iSize; + Header HeaderP; + + public: + + virtual bool Skip() = 0; + virtual bool Jump(unsigned int Offset) = 0; + virtual void Rewind() = 0; + inline unsigned Offset() {return iOffset;}; + inline unsigned Size() {return iSize;}; + inline Header GetHeader() {return HeaderP;}; + virtual bool IsDatabase() = 0; + + RPMHandler() : iOffset(0), iSize(0), HeaderP(0) {}; + virtual ~RPMHandler() {}; +}; + + +class RPMFileHandler : public RPMHandler +{ + FD_t FD; + + public: + + virtual bool Skip(); + virtual bool Jump(unsigned int Offset); + virtual void Rewind(); + virtual inline bool IsDatabase() {return false;}; + + RPMFileHandler(FileFd *File); + RPMFileHandler(string File); + virtual ~RPMFileHandler(); +}; + + +class RPMDBHandler : public RPMHandler +{ +#ifdef HAVE_RPM41 + rpmts Handler; +#else + rpmdb Handler; +#endif +#ifdef HAVE_RPM4 + rpmdbMatchIterator RpmIter; +#endif + bool WriteLock; + + public: + + static string DataPath(bool DirectoryOnly=true); + virtual bool Skip(); + virtual bool Jump(unsigned Offset); + virtual void Rewind(); + virtual inline bool IsDatabase() {return true;}; + virtual bool HasWriteLock() {return WriteLock;}; + + RPMDBHandler(bool WriteLock=false); + virtual ~RPMDBHandler(); +}; + + +// Our Extra RPM tags +#define CRPMTAG_FILENAME 1000000 +#define CRPMTAG_FILESIZE 1000001 +#define CRPMTAG_MD5 1000005 +#define CRPMTAG_SHA1 1000006 + +#define CRPMTAG_DIRECTORY 1000010 +#define CRPMTAG_BINARY 1000011 + +#define CRPMTAG_UPDATE_SUMMARY 1000020 +#define CRPMTAG_UPDATE_IMPORTANCE 1000021 +#define CRPMTAG_UPDATE_DATE 1000022 +#define CRPMTAG_UPDATE_URL 1000023 + +#endif diff --git a/apt/apt-pkg/rpm/rpmindexfile.cc b/apt/apt-pkg/rpm/rpmindexfile.cc new file mode 100644 index 0000000..41c8f79 --- /dev/null +++ b/apt/apt-pkg/rpm/rpmindexfile.cc @@ -0,0 +1,795 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: rpmindexfile.cc,v 1.4 2002/11/27 16:22:40 niemeyer Exp $ +/* ###################################################################### + + RPM Specific sources.list types and the three sorts of RPM + index files. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/rpmindexfile.h" +#endif + +#include + +#ifdef HAVE_RPM + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + /*}}}*/ +vector RepList; + +// rpmListIndex::Release* - Return the URI to the release file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +inline string rpmListIndex::ReleaseFile(string Type) const +{ + return URItoFileName(ReleaseURI(Type)); +} + +string rpmListIndex::ReleaseURI(string Type) const +{ + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + string Res; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res = URI + Dist; + else + Res = URI; + } + else + Res = URI + Dist + "/base/"; + + Res += Type; + + if (rpmdata->HasIndexTranslation() == true) + { + map Dict; + Dict["uri"] = URI; + Dict["dist"] = Dist; + Dict["sect"] = ""; + Dict["type"] = Type; + rpmdata->TranslateIndex(Res, Dict); + } + + return Res; +} + /*}}}*/ +// rpmListIndex::ReleaseInfo - One liner describing the index URI /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string rpmListIndex::ReleaseInfo(string Type) const +{ + string Info = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Info += Dist; + } + else + Info += Dist; + Info += " "; + Info += Type; + return Info; +} + /*}}}*/ +// rpmListIndex::GetReleases - Fetch the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmListIndex::GetReleases(pkgAcquire *Owner) const +{ + if (!Repository->Acquire) + return true; + Repository->Acquire = false; + new pkgAcqIndexRel(Owner,Repository,ReleaseURI("release"), + ReleaseInfo("release"), "release", true); + return true; +} + /*}}}*/ +// SrcListIndex::CreateHandler - Create a RPMHandler for this file /*{{{*/ +// --------------------------------------------------------------------- +RPMHandler *rpmSrcListIndex::CreateHandler() const +{ + return new RPMFileHandler(IndexFile("srclist")); +} + /*}}}*/ +// SrcListIndex::SourceInfo - Short 1 liner describing a source /*{{{*/ +// --------------------------------------------------------------------- +string rpmSrcListIndex::SourceInfo(pkgSrcRecords::Parser const &Record, + pkgSrcRecords::File const &File) const +{ + string Res; + Res = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res += Dist; + } + else + Res += Dist + '/' + Section; + + Res += " "; + Res += Record.Package(); + Res += " "; + Res += Record.Version(); + if (File.Type.empty() == false) + Res += " (" + File.Type + ")"; + return Res; +} + /*}}}*/ + +// SrcListIndex::ArchiveURI - URI for the archive /*{{{*/ +// --------------------------------------------------------------------- +string rpmSrcListIndex::ArchiveURI(string File) const +{ + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + string Res; + + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res = URI + Dist; + else + Res = URI; + } + else + Res = URI + Dist; + + /* This should be fixed to include only the filename in + * the parameter. Right now it includes the SRPMS. directory + * information as well. It was written that way to make --flat work. */ + Res += "/" + File; + + if (rpmdata->HasSourceTranslation() == true) + { + map Dict; + Dict["uri"] = URI; + Dict["dist"] = Dist; + Dict["sect"] = Section; + string::size_type pos = File.rfind("/"); + if (pos != string::npos) + Dict["file"] = string(File, pos+1); + else + Dict["file"] = File; + + rpmdata->TranslateSource(Res, Dict); + } + + return Res; +} + /*}}}*/ +// SrcListIndex::CreateSrcParser - Get a parser for the source files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgSrcRecords::Parser *rpmSrcListIndex::CreateSrcParser() const +{ + string SourcesURI; + SourcesURI = IndexFile("srclist"); + return new rpmSrcRecordParser(_config->FindDir("Dir::State::lists") + + SourcesURI, this); +} + /*}}}*/ +// SrcListIndex::Describe - Give a descriptive path to the index /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string rpmSrcListIndex::Describe(bool Short) const +{ + char S[300]; + if (Short == true) + snprintf(S,sizeof(S),"%s",Info("pkglist").c_str()); + else + snprintf(S,sizeof(S),"%s (%s)",Info("pkglist").c_str(), + IndexFile("srclist").c_str()); + return S; +} + /*}}}*/ +// SrcListIndex::Info - One liner describing the index URI /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string rpmSrcListIndex::Info(string Type) const +{ + string Info = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Info += Dist; + } + else + Info += Dist + '/' + Section; + Info += " "; + Info += Type; + return Info; +} + /*}}}*/ +// SrcListIndex::Index* - Return the URI to the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +inline string rpmSrcListIndex::IndexFile(string Type) const +{ + return URItoFileName(IndexURI(Type)); +} + +string rpmSrcListIndex::IndexURI(string Type) const +{ + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + string Res; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res = URI + Dist; + else + Res = URI; + } + else + Res = URI + Dist + "/base/"; + + Res += Type+'.'+Section; + + if (rpmdata->HasIndexTranslation() == true) + { + map Dict; + Dict["uri"] = URI; + Dict["dist"] = Dist; + Dict["sect"] = Section; + Dict["type"] = Type; + rpmdata->TranslateIndex(Res, Dict); + } + + return Res; +} + /*}}}*/ +// SrcListIndex::GetIndexes - Fetch the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmSrcListIndex::GetIndexes(pkgAcquire *Owner) const +{ + // Ignore indexes for repositories that could not be authenticated + if (Repository->IsAuthenticated() == true && + Repository->HasRelease() == false) + return true; + new pkgAcqIndex(Owner,Repository,IndexURI("srclist"),Info("srclist"), + "srclist"); + return true; +} + /*}}}*/ +// SrcListIndex::Exists - Check if the index is available /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmSrcListIndex::Exists() const +{ + return FileExists(IndexFile("srclist")); +} + /*}}}*/ +// SrcListIndex::Size - Return the size of the index /*{{{*/ +// --------------------------------------------------------------------- +/* */ +unsigned long rpmSrcListIndex::Size() const +{ + struct stat S; + if (stat(IndexFile("srclist").c_str(),&S) != 0) + return 0; + return S.st_size; +} + /*}}}*/ + +// PkgListIndex::CreateHandler - Create a RPMHandler for this file /*{{{*/ +// --------------------------------------------------------------------- +RPMHandler *rpmPkgListIndex::CreateHandler() const +{ + return new RPMFileHandler(IndexFile("pkglist")); +} + /*}}}*/ +// PkgListIndex::ArchiveInfo - Short version of the archive url /*{{{*/ +// --------------------------------------------------------------------- +/* This is a shorter version that is designed to be < 60 chars or so */ +string rpmPkgListIndex::ArchiveInfo(pkgCache::VerIterator Ver) const +{ + string Res = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res += Dist; + } + else + Res += Dist + '/' + Section; + + Res += " "; + Res += Ver.ParentPkg().Name(); + Res += " "; + Res += Ver.VerStr(); + return Res; +} + /*}}}*/ +// PkgListIndex::ArchiveURI - URI for the archive /*{{{*/ +// --------------------------------------------------------------------- +string rpmPkgListIndex::ArchiveURI(string File) const +{ + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + string Res; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res = URI + Dist; + else + Res = URI; + } + else + Res = URI + Dist; + + Res += "/RPMS."+Section + '/' + File; + + if (rpmdata->HasBinaryTranslation() == true) + { + map Dict; + Dict["uri"] = URI; + Dict["dist"] = Dist; + Dict["sect"] = Section; + Dict["file"] = File; + rpmdata->TranslateBinary(Res, Dict); + } + + return Res; +} + /*}}}*/ +// PkgListIndex::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 rpmPkgListIndex::Describe(bool Short) const +{ + char S[300]; + if (Short == true) + snprintf(S,sizeof(S),"%s",Info("pkglist").c_str()); + else + snprintf(S,sizeof(S),"%s (%s)",Info("pkglist").c_str(), + IndexFile("pkglist").c_str()); + return S; +} + /*}}}*/ +// PkgListIndex::Info - One liner describing the index URI /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string rpmPkgListIndex::Info(string Type) const +{ + string Info = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Info += Dist; + } + else + Info += Dist + '/' + Section; + Info += " "; + Info += Type; + return Info; +} + /*}}}*/ +// PkgListIndex::Index* - Return the URI to the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +inline string rpmPkgListIndex::IndexFile(string Type) const +{ + return _config->FindDir("Dir::State::lists")+URItoFileName(IndexURI(Type)); +} + + +string rpmPkgListIndex::IndexURI(string Type) const +{ + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + string Res; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res = URI + Dist; + else + Res = URI; + } + else + Res = URI + Dist + "/base/"; + + Res += Type + '.' + Section; + + if (rpmdata->HasIndexTranslation() == true) + { + map Dict; + Dict["uri"] = URI; + Dict["dist"] = Dist; + Dict["sect"] = Section; + Dict["type"] = Type; + rpmdata->TranslateIndex(Res, Dict); + } + + return Res; +} + /*}}}*/ +// PkgListIndex::GetIndexes - Fetch the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmPkgListIndex::GetIndexes(pkgAcquire *Owner) const +{ + // Ignore indexes for repositories that could not be authenticated + if (Repository->IsAuthenticated() == true && + Repository->HasRelease() == false) + return true; + new pkgAcqIndex(Owner,Repository,IndexURI("pkglist"),Info("pkglist"), + "pkglist"); + new pkgAcqIndexRel(Owner,Repository,IndexURI("release"),Info("release"), + "release"); + return true; +} + /*}}}*/ +// PkgListIndex::Exists - Check if the index is available /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmPkgListIndex::Exists() const +{ + return FileExists(IndexFile("pkglist")); +} + /*}}}*/ +// PkgListIndex::Size - Return the size of the index /*{{{*/ +// --------------------------------------------------------------------- +/* This is really only used for progress reporting. */ +unsigned long rpmPkgListIndex::Size() const +{ + struct stat S; + if (stat(IndexFile("pkglist").c_str(),&S) != 0) + return 0; + return S.st_size; +} + /*}}}*/ +// PkgListIndex::Merge - Load the index file into a cache /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmPkgListIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const +{ + string PackageFile = IndexFile("pkglist"); + RPMHandler *Handler = CreateHandler(); + + Prog.SubProgress(0,Info("pkglist")); + ::URI Tmp(URI); + if (Gen.SelectFile(PackageFile,Tmp.Host,*this) == false) + { + delete Handler; + return _error->Error(_("Problem with SelectFile %s"),PackageFile.c_str()); + } + + // Store the IMS information + pkgCache::PkgFileIterator File = Gen.GetCurFile(); + struct stat St; + if (stat(PackageFile.c_str(),&St) != 0) + { + delete Handler; + return _error->Errno("stat","Failed to stat"); + } + File->Size = St.st_size; + File->mtime = St.st_mtime; + + rpmListParser Parser(Handler); + if (_error->PendingError() == true) + { + delete Handler; + return _error->Error(_("Problem opening %s"),PackageFile.c_str()); + } + + if (Gen.MergeList(Parser) == false) + { + delete Handler; + return _error->Error(_("Problem with MergeList %s"),PackageFile.c_str()); + } + + delete Handler; + + // Check the release file + string RelFile = IndexFile("release"); + if (FileExists(RelFile) == true) + { + FileFd Rel(RelFile,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + Parser.LoadReleaseInfo(File,Rel); + Rel.Seek(0); + } + + return true; +} + /*}}}*/ +// PkgListIndex::MergeFileProvides - Process file dependencies if any /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmPkgListIndex::MergeFileProvides(pkgCacheGenerator &Gen, + OpProgress &Prog) const +{ + string PackageFile = IndexFile("pkglist"); + RPMHandler *Handler = CreateHandler(); + rpmListParser Parser(Handler); + if (_error->PendingError() == true) + { + delete Handler; + return _error->Error(_("Problem opening %s"),PackageFile.c_str()); + } + Prog.SubProgress(0,Info("pkglist")); + if (Gen.MergeFileProvides(Parser) == false) + return _error->Error(_("Problem with MergeFileProvides %s"), + PackageFile.c_str()); + delete Handler; + return true; +} + /*}}}*/ +// PkgListIndex::FindInCache - Find this index /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgCache::PkgFileIterator rpmPkgListIndex::FindInCache(pkgCache &Cache) const +{ + string FileName = IndexFile("pkglist"); + pkgCache::PkgFileIterator File = Cache.FileBegin(); + for (; File.end() == false; File++) + { + if (FileName != File.FileName()) + continue; + + struct stat St; + if (stat(File.FileName(),&St) != 0) + return pkgCache::PkgFileIterator(Cache); + if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime) + return pkgCache::PkgFileIterator(Cache); + return File; + } + + return File; +} + /*}}}*/ + +// DatabaseIndex::rpmDatabaseIndex - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +rpmDatabaseIndex::rpmDatabaseIndex() +{ +} + /*}}}*/ +// DatabaseIndex::Size - Return the size of the index /*{{{*/ +// --------------------------------------------------------------------- +/* */ +unsigned long rpmDatabaseIndex::Size() const +{ + return rpmSys.GetDBHandler()->Size(); +} + /*}}}*/ +// DatabaseIndex::CreateHandler - Create a RPMHandler for this file /*{{{*/ +// --------------------------------------------------------------------- +RPMHandler *rpmDatabaseIndex::CreateHandler() const +{ + return rpmSys.GetDBHandler(); +} + /*}}}*/ +// DatabaseIndex::Merge - Load the index file into a cache /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmDatabaseIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const +{ + RPMDBHandler *Handler = rpmSys.GetDBHandler(); + rpmListParser Parser(Handler); + if (_error->PendingError() == true) + return _error->Error(_("Problem opening RPM database")); + + Prog.SubProgress(0,"RPM Database"); + if (Gen.SelectFile(Handler->DataPath(false),string(),*this,pkgCache::Flag::NotSource) == false) + return _error->Error(_("Problem with SelectFile RPM Database")); + + // Store the IMS information + pkgCache::PkgFileIterator CFile = Gen.GetCurFile(); + struct stat St; + if (stat(Handler->DataPath(false).c_str(),&St) != 0) + return _error->Errno("fstat","Failed to stat"); + CFile->Size = St.st_size; + CFile->mtime = St.st_mtime; + + if (Gen.MergeList(Parser) == false) + return _error->Error(_("Problem with MergeList %s"), + Handler->DataPath(false).c_str()); + return true; +} + /*}}}*/ +// DatabaseIndex::MergeFileProvides - Process file dependencies if any /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmDatabaseIndex::MergeFileProvides(pkgCacheGenerator &Gen, + OpProgress &Prog) const +{ + RPMDBHandler *Handler = rpmSys.GetDBHandler(); + rpmListParser Parser(Handler); + if (_error->PendingError() == true) + return _error->Error(_("Problem opening RPM database")); + Prog.SubProgress(0,"RPM Database"); + if (Gen.MergeFileProvides(Parser) == false) + return _error->Error(_("Problem with MergeFileProvides %s"), + Handler->DataPath(false).c_str()); + return true; +} + /*}}}*/ +// DatabaseIndex::FindInCache - Find this index /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgCache::PkgFileIterator rpmDatabaseIndex::FindInCache(pkgCache &Cache) const +{ + pkgCache::PkgFileIterator File = Cache.FileBegin(); + for (; File.end() == false; File++) + { + if (rpmSys.GetDBHandler()->DataPath(false) != File.FileName()) + continue; + struct stat St; + if (stat(File.FileName(),&St) != 0) + return pkgCache::PkgFileIterator(Cache); + if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime) + return pkgCache::PkgFileIterator(Cache); + return File; + } + return File; +} + /*}}}*/ + +// Source List types for rpm /*{{{*/ + +class rpmSLTypeGen : public pkgSourceList::Type +{ + public: + + rpmSLTypeGen() + { + Name = "rpm"; + Label = "Standard RPM source tree"; + } + + pkgRepository *FindRepository(string URI,string Dist, + const pkgSourceList::Vendor *Vendor) const + { + for (vector::const_iterator iter = RepList.begin(); + iter != RepList.end(); iter++) + { + if ((*iter)->URI == URI && (*iter)->Dist == Dist) + { + // The registered object has no vendor, but the new one does + // so, we make the previous one have the vendor too. + if ((*iter)->Vendor == NULL && Vendor != NULL) + (*iter)->Vendor = Vendor; + return *iter; + } + } + return NULL; + } + + pkgRepository *GetRepository(string URI,string Dist, + const pkgSourceList::Vendor *Vendor) const + { + pkgRepository *Rep = FindRepository(URI,Dist,Vendor); + if (Rep != NULL) + return Rep; + + string BaseURI; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + BaseURI = URI + Dist; + else + BaseURI = URI + '/'; + } + else + BaseURI = URI + Dist + '/'; + + Rep = new pkgRepository(URI,Dist,Vendor,BaseURI); + RepList.push_back(Rep); + return Rep; + } +}; + + +class rpmSLTypeRpm : public rpmSLTypeGen +{ + public: + + bool CreateItem(vector &List, + string URI, string Dist, string Section, + pkgSourceList::Vendor const *Vendor) const + { + pkgRepository *Rep = GetRepository(URI,Dist,Vendor); + List.push_back(new rpmPkgListIndex(URI,Dist,Section,Rep)); + return true; + }; + + rpmSLTypeRpm() + { + Name = "rpm"; + Label = "Standard RPM binary tree"; + } +}; + +class rpmSLTypeSrpm : public rpmSLTypeGen +{ + public: + + bool CreateItem(vector &List, + string URI, string Dist, string Section, + pkgSourceList::Vendor const *Vendor) const + { + pkgRepository *Rep = GetRepository(URI,Dist,Vendor); + List.push_back(new rpmSrcListIndex(URI,Dist,Section,Rep)); + return true; + }; + + rpmSLTypeSrpm() + { + Name = "rpm-src"; + Label = "Standard RPM source tree"; + } +}; + +rpmSLTypeRpm _apt_rpmType; +rpmSLTypeSrpm _apt_rpmSrcType; + /*}}}*/ +// Index File types for rpm /*{{{*/ +class rpmIFTypeSrc : public pkgIndexFile::Type +{ + public: + + rpmIFTypeSrc() {Label = "RPM Source Index";}; +}; +class rpmIFTypePkg : public pkgIndexFile::Type +{ + public: + + virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const + { + return new rpmRecordParser(File.FileName(),*File.Cache()); + }; + rpmIFTypePkg() {Label = "RPM Package Index";}; +}; +class rpmIFTypeDatabase : public pkgIndexFile::Type +{ + public: + + virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const + { + return new rpmRecordParser(File.FileName(),*File.Cache()); + }; + rpmIFTypeDatabase() {Label = "RPM Database";}; +}; +static rpmIFTypeSrc _apt_Src; +static rpmIFTypePkg _apt_Pkg; +static rpmIFTypeDatabase _apt_DB; + +const pkgIndexFile::Type *rpmSrcListIndex::GetType() const +{ + return &_apt_Src; +} +const pkgIndexFile::Type *rpmPkgListIndex::GetType() const +{ + return &_apt_Pkg; +} +const pkgIndexFile::Type *rpmDatabaseIndex::GetType() const +{ + return &_apt_DB; +} + + /*}}}*/ +#endif /* HAVE_RPM */ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmindexfile.h b/apt/apt-pkg/rpm/rpmindexfile.h new file mode 100644 index 0000000..9253b92 --- /dev/null +++ b/apt/apt-pkg/rpm/rpmindexfile.h @@ -0,0 +1,161 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id $ +/* ###################################################################### + + RPM Index Files + + There are three sorts currently + + pkglist files + The system RPM database + srclist files + + ##################################################################### + */ + /*}}}*/ +#ifndef PKGLIB_RPMINDEXFILE_H +#define PKGLIB_RPMINDEXFILE_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/rpmindexfile.h" +#endif + +#include + +class RPMHandler; +class RPMDBHandler; +class pkgRepository; + +class rpmIndexFile : public pkgIndexFile +{ + + public: + + virtual RPMHandler *CreateHandler() const = 0; + +}; + +class rpmDatabaseIndex : public rpmIndexFile +{ + public: + + virtual const Type *GetType() const; + + // Creates a RPMHandler suitable for usage with this object + virtual RPMHandler *CreateHandler() const; + + // Interface for acquire + virtual string Describe(bool Short) const {return "RPM Database";}; + + // Interface for the Cache Generator + virtual bool Exists() const {return true;}; + virtual bool HasPackages() const {return true;}; + virtual unsigned long Size() const; + virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const; + virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/, + OpProgress &/*Prog*/) const; + virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; + + rpmDatabaseIndex(); +}; + +class rpmListIndex : public pkgIndexFile +{ + + protected: + + string URI; + string Dist; + string Section; + pkgRepository *Repository; + + string ReleaseFile(string Type) const; + string ReleaseURI(string Type) const; + string ReleaseInfo(string Type) const; + + public: + + bool GetReleases(pkgAcquire *Owner) const; + + rpmListIndex(string URI,string Dist,string Section, + pkgRepository *Repository) : + URI(URI), Dist(Dist), Section(Section), + Repository(Repository) + {}; +}; + +class rpmPkgListIndex : public rpmListIndex +{ + string Info(string Type) const; + string IndexFile(string Type) const; + string IndexURI(string Type) const; + + public: + + virtual const Type *GetType() const; + + // Creates a RPMHandler suitable for usage with this object + virtual RPMHandler *CreateHandler() const; + + // Stuff for accessing files on remote items + virtual string ArchiveInfo(pkgCache::VerIterator Ver) const; + virtual string ArchiveURI(string File) const; + + // Interface for acquire + virtual string Describe(bool Short) const; + virtual bool GetIndexes(pkgAcquire *Owner) const; + + // 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 bool MergeFileProvides(pkgCacheGenerator &/*Gen*/, + OpProgress &/*Prog*/) const; + virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; + + rpmPkgListIndex(string URI,string Dist,string Section, + pkgRepository *Repository) : + rpmListIndex(URI,Dist,Section,Repository) + {}; +}; + + +class rpmSrcListIndex : public rpmListIndex +{ + string Info(string Type) const; + string IndexFile(string Type) const; + string IndexURI(string Type) const; + + public: + + virtual const Type *GetType() const; + + // Creates a RPMHandler suitable for usage with this object + virtual RPMHandler *CreateHandler() const; + + // Stuff for accessing files on remote items + virtual string SourceInfo(pkgSrcRecords::Parser const &Record, + pkgSrcRecords::File const &File) const; + virtual string ArchiveURI(string File) const; + + // Interface for acquire + virtual string Describe(bool Short) const; + virtual bool GetIndexes(pkgAcquire *Owner) const; + + // Interface for the record parsers + virtual pkgSrcRecords::Parser *CreateSrcParser() const; + + // Interface for the Cache Generator + virtual bool Exists() const; + virtual bool HasPackages() const {return false;}; + virtual unsigned long Size() const; + + rpmSrcListIndex(string URI,string Dist,string Section, + pkgRepository *Repository) : + rpmListIndex(URI,Dist,Section,Repository) + {}; +}; + +#endif diff --git a/apt/apt-pkg/rpm/rpminit.cc b/apt/apt-pkg/rpm/rpminit.cc deleted file mode 100644 index 526dfb7..0000000 --- a/apt/apt-pkg/rpm/rpminit.cc +++ /dev/null @@ -1,179 +0,0 @@ -/* - * $Id: rpminit.cc,v 1.32 2001/11/13 17:32:08 kojima Exp $ - * Copyright (c) 2000 Conectiva S/A - * - * Author: Alfredo K. Kojima - * Hacks: Gustavo Niemeyer - */ - -#include - -#include -#include - -#include - -#include -#include -#include - -#include - -static pkgRpmLock *global_me = NULL; - - -#define Rpmiter *(rpmdbMatchIterator*)rpmiter - - -pkgRpmLock::pkgRpmLock(bool exclusive) -{ - struct stat stbuf; - -#ifndef HAVE_RPM4 - string rpmdb_path = pkgRpmLock::RPMDBPath() + "packages.rpm"; - stat(rpmdb_path.c_str(), &stbuf); - size = stbuf.st_size; -#endif - - rpmiter = 0; - offset = 0; - global_me = this; - GetLock(exclusive); -} - -pkgRpmLock::~pkgRpmLock() -{ -#ifdef HAVE_RPM4 - if (rpmiter) - delete (rpmdbMatchIterator*)rpmiter; -#endif -} - - - -pkgRpmLock *pkgRpmLock::SharedRPM() -{ - return global_me; -} - -string pkgRpmLock::RPMDBPath() -{ - string root; - - root = _config->FindDir("RPM::DBPath", ""); - if (root.empty() || root == "/") { - root = _config->FindDir("RPM::RootDir", "/"); - - return string(root+"var/lib/rpm/"); - } else { - return root; - } -} - - -/* - * Well, this actually does more than just locking the rpm db. - */ -bool pkgRpmLock::GetLock(bool exclusive) -{ - rpmReadConfigFiles(NULL, NULL); - - string root = _config->Find("RPM::RootDir"); - const char *rootdir = NULL; - - if (!root.empty()) - rootdir = root.c_str(); - - // we use O_RDWR although we won't write anything on the DB, - // (the spawned rpm will) so that we effectively get an exclusive - // lock on it. That's needed to avoid anyone from running rpm - // at all while we're running. - if (rpmdbOpen(rootdir, &db, exclusive ? O_RDWR : O_RDONLY, 0644) != 0) { - _error->Error(_("could not open RPM database:%s"), rpmErrorString()); - if (getuid() != 0) - _error->Error(_("You need to run it as the root user.")); - return false; - } -#ifdef HAVE_RPM4 - rpmiter = new rpmdbMatchIterator; - - Rpmiter = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); - if (!Rpmiter) { - _error->Error(_("could not create RPM database iterator:%s"), rpmErrorString()); - return false; - } - - while (rpmdbNextIterator(Rpmiter)); - size = rpmdbGetIteratorOffset(Rpmiter); - - rpmdbFreeIterator(Rpmiter); - Rpmiter = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); - -#endif - return true; -} - - -void pkgRpmLock::Close() -{ -#ifdef HAVE_RPM4 - if (Rpmiter) - rpmdbFreeIterator(Rpmiter); -#endif - rpmdbClose(db); -} - - -void pkgRpmLock::Rewind() -{ - offset = 0; -#ifdef HAVE_RPM4 - rpmdbFreeIterator(Rpmiter); - Rpmiter = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); -#endif -} - - -Header pkgRpmLock::NextHeader() -{ -#ifdef HAVE_RPM4 - Header h; - if ((h = rpmdbNextIterator(Rpmiter))) { - h = headerLink(h); - } - offset = rpmdbGetIteratorOffset(Rpmiter); - return h; -#else - if (offset == 0) { - offset = rpmdbFirstRecNum(db); - } else { - offset = rpmdbNextRecNum(db, offset); - } - if (offset==0) - return NULL; - - return rpmdbGetRecord(db, offset); -#endif -} - - - -Header pkgRpmLock::GetRecord(unsigned offset) -{ -#ifdef HAVE_RPM4 - Header h = NULL; - rpmdbMatchIterator i; - if (offset == 0) { - i = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); - } else { - i = rpmdbInitIterator(db, RPMDBI_PACKAGES, &offset, sizeof(offset)); - } - if ((h = rpmdbNextIterator(i))) { - h = headerLink(h); - } - rpmdbFreeIterator(i); - return h; -#else - return rpmdbGetRecord(db, offset); -#endif -} diff --git a/apt/apt-pkg/rpm/rpminit.h b/apt/apt-pkg/rpm/rpminit.h deleted file mode 100644 index 819a2b4..0000000 --- a/apt/apt-pkg/rpm/rpminit.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2000 Conectiva S/A - * - * Author: Alfredo K. Kojima - */ - -#ifndef _RPMINIT_H_ -#define _RPMINIT_H_ - -#include - -#include - -#include - - -class pkgRpmLock -{ - rpmdb db; - unsigned int size; - unsigned int offset; - - void *rpmiter; // only used in rpm4 - - public: - bool GetLock(bool exclusive); - void Close(); - - static pkgRpmLock *SharedRPM(); - - static string RPMDBPath(); - - void Rewind(); - Header NextHeader(); - Header GetRecord(unsigned offset); - inline void Offset(unsigned &total, unsigned ¤t) - { - total = size; - current = offset; - } - - pkgRpmLock(bool exclusive); - ~pkgRpmLock(); -}; - -#define CRPMTAG_FILENAME 1000000 -#define CRPMTAG_FILESIZE 1000001 -#define CRPMTAG_MD5 1000005 - -#define CRPMTAG_DIRECTORY 1000010 -#define CRPMTAG_BINARY 1000011 - -#define CRPMTAG_UPDATE_SUMMARY 1000020 -#define CRPMTAG_UPDATE_IMPORTANCE 1000021 -#define CRPMTAG_UPDATE_DATE 1000022 -#define CRPMTAG_UPDATE_URL 1000023 - - - -#endif diff --git a/apt/apt-pkg/rpm/rpmlistparser.cc b/apt/apt-pkg/rpm/rpmlistparser.cc index ed12fa6..8587b66 100644 --- a/apt/apt-pkg/rpm/rpmlistparser.cc +++ b/apt/apt-pkg/rpm/rpmlistparser.cc @@ -1,136 +1,80 @@ // Description -// $Id: rpmlistparser.cc,v 1.60 2001/12/11 20:50:12 kojima Exp $ +// $Id: rpmlistparser.cc,v 1.7 2003/01/29 18:55:03 niemeyer Exp $ // /* ###################################################################### + * * Package Cache Generator - Generator for the cache structure. * This builds the cache structure from the abstract package list parser. * ##################################################################### */ -#include // Include Files +#include + +#ifdef HAVE_RPM + #include -#include +#include +#include +#include #include #include #include #include #include -#include -#include + +#include #include -#include - -#define DUPPACK - +#ifdef HAVE_RPM41 +#include +#endif // ListParser::rpmListParser - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -rpmListParser::rpmListParser(FileFd &File, map *fdeps, - map *marchs) +rpmListParser::rpmListParser(RPMHandler *Handler) + : Handler(Handler) { - file = &File; + Handler->Rewind(); header = NULL; - filedeps = fdeps; - multiarchs = marchs; - - parsing_hdlist = true; - - DupPackages = NULL; - - GetConfig(); -} - -rpmListParser::rpmListParser(map *fdeps, map *marchs) -{ - file = 0; - header = NULL; - filedeps = fdeps; - multiarchs = marchs; - - parsing_hdlist = false; - - DupPackages = new map(); - + if (Handler->IsDatabase() == true) + DupPackages = new map(); + else + DupPackages = NULL; GetConfig(); } + /*}}}*/ rpmListParser::~rpmListParser() { -#ifndef HAVE_RPM4 - if (header) - headerFree(header); -#endif - delete AllowedDupPackages; - if (DupPackages) - delete DupPackages; + delete DupPackages; +} + +unsigned long rpmListParser::Offset() +{ + return Handler->Offset(); } -/*}}}*/ bool rpmListParser::GetConfig() { - string str; - char *begin, *end; - char *p; - -#ifdef DUPPACK - AllowedDupPackages = new slist; - - const Configuration::Item *Top = _config->Tree("RPM::AllowedDupPkgs"); - - if (Top) { - for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) - { - regex_t *ptrn = new regex_t; - - if (regcomp(ptrn,Top->Value.c_str(),REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0) - { - _error->Warning(_("Bad regular expression '%s' in option RPM::AllowedDupPkgs."), - Top->Value.c_str()); - delete ptrn; - } - else - AllowedDupPackages->push_front(ptrn); - } - } else { - str = _config->Find("RPM::AllowedDupPackages"); - if (!str.empty()) { - return _error->Error(_("Option RPM::AllowedDupPackages was replaced with RPM::AllowedDupPkgs, which is a list of regular expressions (apt-config dump for an example). Please update.")); - } - } -#else - AllowedDupPackages = NULL;//akk -#endif - - HoldPackages = new slist; - - Top = _config->Tree("RPM::HoldPkgs"); - + const Configuration::Item *Top = _config->Tree("RPM::Allow-Duplicated"); for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) { regex_t *ptrn = new regex_t; - if (regcomp(ptrn,Top->Value.c_str(),REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0) { - _error->Warning(_("Bad regular expression '%s' in option RPM::HoldPackages."), + _error->Warning(_("Bad regular expression '%s' in option RPM::AllowedDupPkgs."), Top->Value.c_str()); delete ptrn; } else - HoldPackages->push_front(ptrn); + AllowedDupPackages.push_back(ptrn); } - - - str = _config->Find("APT::architecture"); - - BaseArch = strdup(str.c_str()); - return true; } @@ -139,22 +83,25 @@ bool rpmListParser::GetConfig() /* */ unsigned long rpmListParser::UniqFindTagWrite(int Tag) { - char *str; + char *Start; + char *Stop; int type; int count; void *data; - if (headerGetEntry(header, Tag, &type, &data, &count) != 1) { + if (headerGetEntry(header, Tag, &type, &data, &count) != 1) return 0; - } - if (type == RPM_STRING_TYPE) { - str = (char*)data; + + if (type == RPM_STRING_TYPE) + { + Start = (char*)data; + Stop = Start + strlen(Start); } else { - cout << _("oh shit, not handled for ")<Error(_("Corrupt pkglist: no RPMTAG_NAME in header entry")); + _error->Error("Corrupt pkglist: no RPMTAG_NAME in header entry"); return string(); } - else + + bool DupOk = false; + string Name = str; + + if (strncmp(str,"kernel", 6)==0) + DupOk=true; + for (vector::iterator I = AllowedDupPackages.begin(); + I != AllowedDupPackages.end(); I++) { - bool dupok = false; - string name = string(str); - - if (AllowedDupPackages != NULL) + if (regexec(*I,str,0,0,0) == 0) { - for (slist::iterator iter = AllowedDupPackages->begin(); - iter != AllowedDupPackages->end(); - iter++) - { - if (regexec(*iter,str,0,0,0) == 0) - { - dupok = true; - break; - } - } + DupOk = true; + break; } - -#ifdef DUPPACK - /* - * If this package can have multiple versions installed at - * the same time, then we make it so that the name of the - * package is NAME+"#"+VERSION and also adds a provides - * with the original name and version, to satisfy the - * dependencies. - */ - if (dupok) - { - string bla = name+"#"+Version(); - duplicated = true; - return bla; - } else if (DupPackages) { - string res = string(str); - - if (DupPackages->find(res) != DupPackages->end() - && (*DupPackages)[res] != offset) { - _error->Error(_("There are two or more versions of the package '%s' installed in your " - "system, which is a situation APT can't handle cleanly at the moment.\n" - "Please do one of the following:\n" - "1) Remove the older packages, leaving only one version installed; or\n" - "2) If you do want to have multiple versions of that package, add the " - "package names to the RPM::AllowedDupPkgs option.\n"), - str); - (*DupPackages)[res] = offset; - return string(); - } - (*DupPackages)[res] = offset; - } -#endif - return name; } + + /* + * If this package can have multiple versions installed at + * the same time, then we make it so that the name of the + * package is NAME+"#"+VERSION+"@"+ARCH and also adds a provides + * with the original name and version, to satisfy the + * dependencies. + */ + if (DupOk == true) + { + Name += "#"+Version()+"@"+Architecture(); + Duplicated = true; + } + else if (DupPackages != NULL) + { + if (DupPackages->find(Name) != DupPackages->end() && + (*DupPackages)[Name] != Offset()) + { + _error->Error(_("There are two or more versions of the package '%s' installed in your " + "system, which is a situation APT can't handle cleanly at the moment.\n" + "Please do one of the following:\n" + "1) Keep at most one version of the package in the system; or\n" + "2) If you do want to keep multiple versions of that package, lookup " + "RPM::Allow-Duplicated in the documentation.\n"), + Name.c_str()); + (*DupPackages)[Name] = Offset(); + return string(); + } + else + (*DupPackages)[Name] = Offset(); + } + return Name; } /*}}}*/ // ListParser::Arch - Return the architecture string /*{{{*/ @@ -234,12 +175,8 @@ string rpmListParser::Architecture() int type, count; char *arch; int res; - res = headerGetEntry(header, RPMTAG_ARCH, &type, (void **)&arch, &count); - - assert(res); - - return string(arch); + return string(res?arch:""); } /*}}}*/ // ListParser::Version - Return the version string /*{{{*/ @@ -251,35 +188,28 @@ string rpmListParser::Version() { char *ver, *rel; int_32 *ser; - bool has_serial = false; + bool has_epoch = false; int type, count; string str; - - if (headerGetEntry(header, RPMTAG_EPOCH, &type, (void **)&ser, &count)==1 + + if (headerGetEntry(header, RPMTAG_EPOCH, &type, (void **)&ser, &count) == 1 && count > 0) - { - has_serial = true; - } + has_epoch = true; headerGetEntry(header, RPMTAG_VERSION, &type, (void **)&ver, &count); - headerGetEntry(header, RPMTAG_RELEASE, &type, (void **)&rel, &count); - - if (has_serial) + + if (has_epoch == true) { char buf[32]; - snprintf(buf, sizeof(buf), "%i", *ser); - + snprintf(buf, sizeof(buf), "%i", ser[0]); str = string(buf)+":"+string(ver)+"-"+string(rel); } else - { - str = string(ver)+"-"+string(rel); - } - + str = string(ver)+"-"+string(rel); return str; } -/*}}}*/ + /*}}}*/ // ListParser::NewVersion - Fill in the version structure /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -291,7 +221,7 @@ bool rpmListParser::NewVersion(pkgCache::VerIterator Ver) // Parse the section Ver->Section = UniqFindTagWrite(RPMTAG_GROUP); Ver->Arch = UniqFindTagWrite(RPMTAG_ARCH); - + // Archive Size headerGetEntry(header, CRPMTAG_FILESIZE, &type, (void**)&num, &count); if (count > 0) @@ -302,62 +232,46 @@ bool rpmListParser::NewVersion(pkgCache::VerIterator Ver) // Unpacked Size (in kbytes) headerGetEntry(header, RPMTAG_SIZE, &type, (void**)&num, &count); Ver->InstalledSize = (unsigned)num[0]; - -// Ver->InstalledSize /= 1024; - + if (ParseDepends(Ver,pkgCache::Dep::Depends) == false) return false; - /* - * We consider both Requires and PreRequires as simple Depends, - * because that differentiation is only used for package ordering. - * Since we delegate package ordering to rpm, it won't be usefull - * in APT anyway. if (ParseDepends(Ver,pkgCache::Dep::PreDepends) == false) return false; - */ if (ParseDepends(Ver,pkgCache::Dep::Conflicts) == false) return false; if (ParseDepends(Ver,pkgCache::Dep::Obsoletes) == false) return false; +#ifdef OLD_FILEDEPS if (ProcessFileProvides(Ver) == false) return false; +#endif if (ParseProvides(Ver) == false) return false; return true; } -/*}}}*/ + /*}}}*/ // ListParser::UsePackage - Update a package structure /*{{{*/ // --------------------------------------------------------------------- /* This is called to update the package with any new information - that might be found in the section */ + that might be found in the section */ bool rpmListParser::UsePackage(pkgCache::PkgIterator Pkg, pkgCache::VerIterator Ver) { - RPMPackageData *rpmdata; - - rpmdata = RPMPackageData::Singleton(); - if (_error->PendingError()) - return false; if (Pkg->Section == 0) - Pkg->Section = UniqFindTagWrite(RPMTAG_GROUP); - - Ver->Priority = rpmdata->PackagePriority(string(Pkg.Name())); - - if (Ver->Priority == pkgCache::State::Important) - Pkg->Flags |= pkgCache::Flag::Essential; - - if (Ver->Priority == pkgCache::State::Required || - Ver->Priority == pkgCache::State::Important) - Pkg->Flags |= pkgCache::Flag::Important; - + Pkg->Section = UniqFindTagWrite(RPMTAG_GROUP); + RPMPackageData *rpmdata; + rpmdata = RPMPackageData::Singleton(); + if (_error->PendingError()) + return false; + Ver->Priority = rpmdata->VerPriority(Pkg.Name()); + Pkg->Flags |= rpmdata->PkgFlags(Pkg.Name()); if (ParseStatus(Pkg,Ver) == false) return false; - return true; } -/*}}}*/ + /*}}}*/ // ListParser::VersionHash - Compute a unique hash for this version /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -370,13 +284,14 @@ static int compare(const void *a, const void *b) unsigned short rpmListParser::VersionHash() { - int Sections[] ={ - RPMTAG_REQUIRENAME, - RPMTAG_OBSOLETENAME, - RPMTAG_CONFLICTNAME, + int Sections[] = { + RPMTAG_VERSION, + RPMTAG_RELEASE, + RPMTAG_ARCH, + RPMTAG_REQUIRENAME, + RPMTAG_OBSOLETENAME, + RPMTAG_CONFLICTNAME, 0 - // "Pre-Depends", - // "Conflicts", }; unsigned long Result = INIT_FCS; char S[300]; @@ -386,114 +301,80 @@ unsigned short rpmListParser::VersionHash() { char *Start; char *End; + int Len; int type, count; int res; char **strings; res = headerGetEntry(header, *sec, &type, (void **)&strings, &count); - if (res != 1 || count == 0) { + if (res != 1 || count == 0) continue; - } - qsort(strings, count, sizeof(char*), compare); - - switch (type) { - case RPM_STRING_ARRAY_TYPE: - while (count-- > 0) { + switch (type) + { + case RPM_STRING_ARRAY_TYPE: + qsort(strings, count, sizeof(char*), compare); + + while (count-- > 0) + { Start = strings[count]; + Len = strlen(Start); + End = Start+Len; - End = Start+strlen(Start); - - if (End - Start >= (signed)sizeof(S)) - continue; + if (Len >= (signed)sizeof(S)) + continue; + + /* Suse patch.rpm hack. */ + if (*sec == RPMTAG_REQUIRENAME && Len == 17 && *Start == 'r' && + strcmp(Start, "rpmlib(PatchRPMs)") == 0) + continue; /* Strip out any spaces from the text */ - I = S; - for (; Start != End; Start++) { + for (I = S; Start != End; Start++) if (isspace(*Start) == 0) - *I++ = *Start; - } + *I++ = *Start; Result = AddCRC16(Result,S,I - S); - -// free(strings); } break; - case RPM_STRING_TYPE: + case RPM_STRING_TYPE: Start = (char*)strings; + Len = strlen(Start); + End = Start+Len; - End = Start+strlen(Start); - - if (End - Start >= (signed)sizeof(S)) - continue; + if (Len >= (signed)sizeof(S)) + continue; /* Strip out any spaces from the text */ - I = S; - for (; Start != End; Start++) { + for (I = S; Start != End; Start++) if (isspace(*Start) == 0) - *I++ = *Start; - } - Result = AddCRC16(Result,S,I - S); + *I++ = *Start; + Result = AddCRC16(Result,S,I - S); + break; } } return Result; } -/*}}}*/ + /*}}}*/ // ListParser::ParseStatus - Parse the status field /*{{{*/ // --------------------------------------------------------------------- bool rpmListParser::ParseStatus(pkgCache::PkgIterator Pkg, pkgCache::VerIterator Ver) { - if (parsing_hdlist) { // this means we're parsing a hdlist, so it's not installed + if (!Handler->IsDatabase()) // this means we're parsing an hdlist, so it's not installed return true; - } // if we're reading from the rpmdb, then it's installed - - bool hold = false; - - if (HoldPackages != NULL) - { - const char *str = Package().c_str(); - - for (slist::iterator iter = HoldPackages->begin(); - iter != HoldPackages->end(); - iter++) - { - if (regexec(*iter,str,0,0,0) == 0) - { - hold = true; - break; - } - } - } - - if (hold) { - Pkg->SelectedState = pkgCache::State::Hold; - } else { - Pkg->SelectedState = pkgCache::State::Install; - } - Pkg->InstState = pkgCache::State::Ok; - - + // + Pkg->SelectedState = pkgCache::State::Install; + Pkg->InstState = pkgCache::State::Ok; Pkg->CurrentState = pkgCache::State::Installed; - /* A Status line marks the package as indicating the current - version as well. Only if it is actually installed.. Otherwise - the interesting dpkg handling of the status file creates bogus - entries. */ - if (!(Pkg->CurrentState == pkgCache::State::NotInstalled || - Pkg->CurrentState == pkgCache::State::ConfigFiles)) - { - if (Ver.end() == true) - _error->Warning(_("Encountered status field in a non-version description")); - else - Pkg->CurrentVer = Ver.Index(); - } + Pkg->CurrentVer = Ver.Index(); return true; } @@ -506,9 +387,9 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver, int i; unsigned int Op = 0; - for (i = 0; i < count; i++) { + for (i = 0; i < count; i++) + { - /* if (Type == pkgCache::Dep::Depends) { if (flagl[i] & RPMSENSE_PREREQ) continue; @@ -516,44 +397,54 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver, if (!(flagl[i] & RPMSENSE_PREREQ)) continue; } - */ - /* - * strip-off requires for rpmlib features.. - */ - if (strncmp(namel[i], "rpmlib", 6) == 0) { - if (_config->FindB("RPM::IgnoreRpmlibDeps", false) == false || - rpmCheckRpmlibProvides(namel[i], - verl ? verl[i] : NULL, - flagl[i])) { - continue; - } + if (strncmp(namel[i], "rpmlib", 6) == 0) + { +#ifdef HAVE_RPM41 + rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME, + namel[i], verl?verl[i]:NULL, flagl[i]); + int res = rpmCheckRpmlibProvides(ds); + rpmdsFree(ds); +#else + int res = rpmCheckRpmlibProvides(namel[i], verl?verl[i]:NULL, + flagl[i]); +#endif + if (res) continue; } - - if (verl) { - if (!*verl[i]) { + + if (verl) + { + if (!*verl[i]) + { Op = pkgCache::Dep::NoOp; - } else { - if (flagl[i] & RPMSENSE_LESS) { - if (flagl[i] & RPMSENSE_EQUAL) { - Op = pkgCache::Dep::LessEq; - } else { - Op = pkgCache::Dep::Less; - } - } else if (flagl[i] & RPMSENSE_GREATER) { - if (flagl[i] & RPMSENSE_EQUAL) { - Op = pkgCache::Dep::GreaterEq; - } else { - Op = pkgCache::Dep::Greater; - } - } else if (flagl[i] & RPMSENSE_EQUAL) { + } + else + { + if (flagl[i] & RPMSENSE_LESS) + { + if (flagl[i] & RPMSENSE_EQUAL) + Op = pkgCache::Dep::LessEq; + else + Op = pkgCache::Dep::Less; + } + else if (flagl[i] & RPMSENSE_GREATER) + { + if (flagl[i] & RPMSENSE_EQUAL) + Op = pkgCache::Dep::GreaterEq; + else + Op = pkgCache::Dep::Greater; + } + else if (flagl[i] & RPMSENSE_EQUAL) + { Op = pkgCache::Dep::Equals; } } - + if (NewDepends(Ver,string(namel[i]),string(verl[i]),Op,Type) == false) return false; - } else { + } + else + { if (NewDepends(Ver,string(namel[i]),string(),pkgCache::Dep::NoOp, Type) == false) return false; @@ -561,9 +452,7 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver, } return true; } -/*}}}*/ - - + /*}}}*/ // ListParser::ParseDepends - Parse a dependency list /*{{{*/ // --------------------------------------------------------------------- /* This is the higher level depends parser. It takes a tag and generates @@ -576,9 +465,10 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver, int *flagl = NULL; int res, type, count; - switch (Type) { - case pkgCache::Dep::Depends: - case pkgCache::Dep::PreDepends: + switch (Type) + { + case pkgCache::Dep::Depends: + case pkgCache::Dep::PreDepends: res = headerGetEntry(header, RPMTAG_REQUIRENAME, &type, (void **)&namel, &count); if (res != 1) @@ -589,7 +479,7 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver, (void **)&flagl, &count); break; - case pkgCache::Dep::Obsoletes: + case pkgCache::Dep::Obsoletes: res = headerGetEntry(header, RPMTAG_OBSOLETENAME, &type, (void **)&namel, &count); if (res != 1) @@ -600,7 +490,7 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver, (void **)&flagl, &count); break; - case pkgCache::Dep::Conflicts: + case pkgCache::Dep::Conflicts: res = headerGetEntry(header, RPMTAG_CONFLICTNAME, &type, (void **)&namel, &count); if (res != 1) @@ -610,55 +500,50 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver, res = headerGetEntry(header, RPMTAG_CONFLICTFLAGS, &type, (void **)&flagl, &count); break; - - default: - cout << "not implemented!!!\n"; - abort(); } ParseDepends(Ver, namel, verl, flagl, count, Type); -// free(namel); -// if (verl) free(verl); - return true; } -/*}}}*/ - - - + /*}}}*/ +#ifdef OLD_FILEDEPS bool rpmListParser::ProcessFileProvides(pkgCache::VerIterator Ver) { const char **names = NULL; int count = 0; - - rpmBuildFileList(header, &names, &count); - -#if 1 - while (count--) { - /* if some pkg depends on the file, add it to the provides list */ - if (filedeps->find(string(names[count])) != filedeps->end()) { - if (!NewProvides(Ver, string(names[count]), string())) { -// free(names); - return false; - } - } - } -#else - for (map::iterator i = filedeps->begin(); - i!=filedeps->end(); - i++) { - const char *file = (*i).first.c_str(); - - if (bsearch(file, names, count, sizeof(char*), - (int (*)(const void *, const void *))strcmp)) { - if (!NewProvides(Ver, string(file), string())) + + rpmHeaderGetEntry(header, RPMTAG_OLDFILENAMES, NULL, &names, &count); + + while (count--) + { + if (rpmSys.IsFileDep(string(names[count]))) + { + if (!NewProvides(Ver, string(names[count]), string())) return false; } } + + return true; +} #endif -// free(names); +bool rpmListParser::CollectFileProvides(pkgCache &Cache, + pkgCache::VerIterator Ver) +{ + const char **names = NULL; + int_32 count = 0; + rpmHeaderGetEntry(header, RPMTAG_OLDFILENAMES, + NULL, (void **) &names, &count); + while (count--) + { + pkgCache::PkgIterator Pkg = Cache.FindPkg(names[count]); + if (Pkg.end() == false) + { + if (!NewProvides(Ver, string(names[count]), string())) + return false; + } + } return true; } @@ -674,13 +559,12 @@ bool rpmListParser::ParseProvides(pkgCache::VerIterator Ver) int res; bool ok = true; -#ifdef DUPPACK - if (duplicated) { + if (Duplicated == true) + { char *name; headerGetEntry(header, RPMTAG_NAME, &type, (void **)&name, &count); NewProvides(Ver, string(name), Version()); } -#endif res = headerGetEntry(header, RPMTAG_PROVIDENAME, &type, (void **)&namel, &count); @@ -697,14 +581,20 @@ bool rpmListParser::ParseProvides(pkgCache::VerIterator Ver) if (res != 1) verl = NULL; - for (int i = 0; i < count; i++) { - if (verl && *verl[i]) { - if (NewProvides(Ver,string(namel[i]),string(verl[i])) == false) { + for (int i = 0; i < count; i++) + { + if (verl && *verl[i]) + { + if (NewProvides(Ver,string(namel[i]),string(verl[i])) == false) + { ok = false; break; } - } else { - if (NewProvides(Ver,string(namel[i]),string()) == false) { + } + else + { + if (NewProvides(Ver,string(namel[i]),string()) == false) + { ok = false; break; } @@ -713,106 +603,56 @@ bool rpmListParser::ParseProvides(pkgCache::VerIterator Ver) return ok; } -/*}}}*/ - -Header rpmListParser::NextHeader() -{ - Header h; - - if (parsing_hdlist) { - FD_t fdt = fdDup(file->Fd()); - offset = file->Tell(); - h = headerRead(fdt, HEADER_MAGIC_YES); - fdClose(fdt); - } else { - unsigned bla1, bla2; - h = pkgRpmLock::SharedRPM()->NextHeader(); - pkgRpmLock::SharedRPM()->Offset(bla1, bla2); - offset = bla2; - } - - return h; -} - - -bool rpmListParser::ShouldBeIgnored(string pkg) -{ - // check whether this package must be ignored - // usually because user installed it with --nodeps - // use with moderation - - const Configuration::Item *Top = _config->Tree("RPM::IgnorePkgs"); - - for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) - { - if (Top->Value == pkg) - return true; - } - - return false; -} - + /*}}}*/ // ListParser::Step - Move to the next section in the file /*{{{*/ // --------------------------------------------------------------------- /* This has to be carefull to only process the correct architecture */ bool rpmListParser::Step() { - Header tmp; - - while ((tmp = NextHeader()) != NULL) + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + while (Handler->Skip() == true) { /* See if this is the correct Architecture, if it isn't then we drop the whole section. A missing arch tag can't happen to us */ - int type; - string arch; - int count; - bool res; - bool archOk = false; - - if (header) - headerFree(header); - header = tmp; - + string arch, pkg, tmp; + + header = Handler->GetHeader(); + pkg = Package(); arch = Architecture(); + + if (Duplicated == false) + pkg = pkg+'#'+Version(); - string pkg = Package(); - if (!duplicated) { - pkg = pkg+'#'+Version(); - } - - if (ShouldBeIgnored(string(pkg.c_str(),pkg.find('#'))) == true) - continue; - - if (multiarchs->find(pkg) != multiarchs->end()) { - if (arch == (*multiarchs)[pkg]) { - archOk = true; - } - } else { - if (rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch.c_str()) > 0) - archOk = true; - else - archOk = false; - } - - if (!parsing_hdlist || archOk) { - return true; - } + if (rpmdata->IgnorePackage(pkg.substr(0,pkg.find('#'))) == true) + continue; + +#if OLD_BESTARCH + bool archOk = false; + tmp = rpmSys.BestArchForPackage(pkg); + if (tmp.empty() == true && // has packages for a single arch only + rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch.c_str()) > 0) + archOk = true; + else if (arch == tmp) + archOk = true; + if (Handler->IsDatabase() == true || archOk == true) + return true; +#else + if (Handler->IsDatabase() == true || + rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch.c_str()) > 0) + return true; +#endif } - - if (header) - headerFree(header); header = NULL; - return false; } -/*}}}*/ + /*}}}*/ // ListParser::LoadReleaseInfo - Load the release information /*{{{*/ // --------------------------------------------------------------------- /* */ bool rpmListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, FileFd &File) { - pkgTagFile Tags(File); + pkgTagFile Tags(&File); pkgTagSection Section; if (!Tags.Step(Section)) return false; @@ -838,7 +678,7 @@ bool rpmListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, return !_error->PendingError(); } -/*}}}*/ + /*}}}*/ unsigned long rpmListParser::Size() @@ -849,5 +689,9 @@ unsigned long rpmListParser::Size() if (headerGetEntry(header, RPMTAG_SIZE, &type, (void **)&size, &count)!=1) return 1; - return size[0]/1024; + return (size[0]+512)/1024; } + +#endif /* HAVE_RPM */ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmlistparser.h b/apt/apt-pkg/rpm/rpmlistparser.h index 43f125c..4a945d4 100644 --- a/apt/apt-pkg/rpm/rpmlistparser.h +++ b/apt/apt-pkg/rpm/rpmlistparser.h @@ -1,10 +1,10 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rpmlistparser.h,v 1.15 2001/11/30 20:34:13 kojima Exp $ +// $Id: rpmlistparser.h,v 1.2 2002/07/26 17:39:28 niemeyer Exp $ /* ###################################################################### - Debian Package List Parser - This implements the abstract parser - interface for rpmian package files + RPM Package List Parser - This implements the abstract parser + interface for RPM package files ##################################################################### */ @@ -16,44 +16,27 @@ #include #include #include -#include #include #include +using namespace std; + +class RPMHandler; + class rpmListParser : public pkgCacheGenerator::ListParser { + RPMHandler *Handler; Header header; - FileFd *file; - unsigned long offset; + map *DupPackages; vector Essentials; vector Importants; - map *filedeps; - map *multiarchs; - - map *DupPackages; - slist *AllowedDupPackages; - bool duplicated; - - slist *HoldPackages; - - bool parsing_hdlist; - - char *Arch; - char *BaseArch; - - // Parser Helper - struct WordList - { - char *Str; - unsigned char Val; - }; + vector AllowedDupPackages; + bool Duplicated; bool GetConfig(); - bool IsMultiArch(string package); - unsigned long UniqFindTagWrite(int Tag); bool ParseStatus(pkgCache::PkgIterator Pkg,pkgCache::VerIterator Ver); bool ParseDepends(pkgCache::VerIterator Ver, @@ -62,14 +45,12 @@ class rpmListParser : public pkgCacheGenerator::ListParser bool ParseDepends(pkgCache::VerIterator Ver, unsigned int Type); bool ParseProvides(pkgCache::VerIterator Ver); +#ifdef OLD_FILEDEPS bool ProcessFileProvides(pkgCache::VerIterator Ver); +#endif - Header NextHeader(); - - bool ShouldBeIgnored(string pkg); - public: - + // These all operate against the current header virtual string Package(); virtual string Version(); @@ -78,15 +59,15 @@ class rpmListParser : public pkgCacheGenerator::ListParser virtual unsigned short VersionHash(); virtual bool UsePackage(pkgCache::PkgIterator Pkg, pkgCache::VerIterator Ver); - virtual unsigned long Offset() {return offset;}; + virtual unsigned long Offset(); virtual unsigned long Size(); - + virtual bool CollectFileProvides(pkgCache &Cache, + pkgCache::VerIterator Ver); virtual bool Step(); bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI,FileFd &File); - rpmListParser(FileFd &File, map *fdeps, map *marchs); - rpmListParser(map *fdeps, map *marchs); + rpmListParser(RPMHandler *Handler); ~rpmListParser(); }; diff --git a/apt/apt-pkg/rpm/rpmpackagedata.cc b/apt/apt-pkg/rpm/rpmpackagedata.cc index 0ebd481..07d4ee4 100644 --- a/apt/apt-pkg/rpm/rpmpackagedata.cc +++ b/apt/apt-pkg/rpm/rpmpackagedata.cc @@ -1,47 +1,61 @@ -#include +#include + +#ifdef HAVE_RPM + #include #include #include #include #include +#include -#include - - +#include RPMPackageData::RPMPackageData() { - string path = _config->FindFile("Dir::Etc::RpmPriorities"); - FileFd F(path, FileFd::ReadOnly); + // Populate priorities + string FileName = _config->FindFile("Dir::Etc::rpmpriorities"); + FileFd F(FileName, FileFd::ReadOnly); if (_error->PendingError()) { - _error->Error(_("could not open package priority file %s"), path.c_str()); + _error->Error(_("could not open package priority file %s"), + FileName.c_str()); return; } - pkgTagFile Tags(F); + pkgTagFile Tags(&F); pkgTagSection Section; if (!Tags.Step(Section)) { - _error->Error(_("no data in %s"), path.c_str()); + _error->Error(_("no data in %s"), FileName.c_str()); return; } - for (int i = 0; i < 5; i++) + for (int i = 0; i != 6; i++) { static const char *priorities[] = { - "Important", "Required", "Standard", "Optional", "Extra" + "Essential", "Important", "Required", "Standard", "Optional", "Extra" }; static pkgCache::State::VerPriority states[] = { - pkgCache::State::Important, + pkgCache::State::Important, + pkgCache::State::Important, pkgCache::State::Required, pkgCache::State::Standard, pkgCache::State::Optional, pkgCache::State::Extra }; + static pkgCache::Flag::PkgFlags flags[] = { + pkgCache::Flag::Essential, + pkgCache::Flag::Important, + pkgCache::Flag::Important, + (pkgCache::Flag::PkgFlags)0, + (pkgCache::Flag::PkgFlags)0, + (pkgCache::Flag::PkgFlags)0 + }; + string Packages = Section.FindS(priorities[i]); if (Packages.empty()) @@ -51,20 +65,192 @@ RPMPackageData::RPMPackageData() while (*C != 0) { string pkg; - if (ParseQuoteWord(C,pkg)) - Priorities[pkg] = states[i]; + { + Priorities[pkg] = states[i]; + Flags[pkg] = flags[i]; + } + } + } + + // Populate holding packages + const Configuration::Item *Top = _config->Tree("RPM::Hold"); + for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) + { + regex_t *ptrn = new regex_t; + if (regcomp(ptrn,Top->Value.c_str(),REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0) + { + _error->Warning(_("Bad regular expression '%s' in option RPM::HoldPackages."), + Top->Value.c_str()); + delete ptrn; + } + else + HoldPackages.push_front(ptrn); + } + + // Populate ignored packages + Top = _config->Tree("RPM::Ignore"); + for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) + IgnorePackages[Top->Value] = 1; + + // Populate fake provides + Top = _config->Tree("RPM::Fake-Provides"); + for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) + { + string Name = ""; + string Version = ""; + const char *C = Top->Value.c_str(); + if (ParseQuoteWord(C,Name) == false) + { + _error->Warning(_("Bad entry '%s' in option RPM::FakeProvides."), + Top->Value.c_str()); + continue; + } + ParseQuoteWord(C,Version); + + if (Version.empty() == true) + { + delete FakeProvides[Name]; + FakeProvides[Name] = NULL; + } + else + { + if (FakeProvides.find(Name) != FakeProvides.end()) + { + // If it's NULL, it was provided with an empty version + if (FakeProvides[Name] != NULL) + FakeProvides[Name]->push_front(Version); + } + else + { + list *VerList = new list; + VerList->push_front(Version); + FakeProvides[Name] = VerList; + } + } + } + + + // Populate translations + Configuration Cnf; + string CnfFile = _config->FindDir("Dir::Etc::translateparts"); + if (FileExists(CnfFile) == true) + if (ReadConfigDir(Cnf,CnfFile,true) == false) + return; + CnfFile = _config->FindFile("Dir::Etc::translatelist"); + if (FileExists(CnfFile) == true) + if (ReadConfigFile(Cnf,CnfFile,true) == false) + return; + + const char *TString[] = {"translate-binary", + "translate-source", + "translate-index"}; + list *TList[] = {&BinaryTranslations, + &SourceTranslations, + &IndexTranslations}; + for (int i = 0; i != 3; i++) + { + Top = Cnf.Tree(TString[i]); + for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) + { + Translate *t = new Translate(); + if (regcomp(&t->Pattern,Top->Tag.c_str(),REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0) + { + _error->Warning(_("Bad regular expression '%s' in URI translation"), + Top->Tag.c_str()); + delete t; + } + else + { + Configuration Block(Top); + t->Template = Block.Find("Template"); + TList[i]->push_front(t); + } } } } +bool RPMPackageData::HoldPackage(const char *name) +{ + for (list::iterator I = HoldPackages.begin(); + I != HoldPackages.end(); I++) + if (regexec(*I,name,0,0,0) == 0) + return true; + return false; +} + +bool RPMPackageData::IgnorePackage(string Name) +{ + if (IgnorePackages.find(Name) != IgnorePackages.end()) + return true; + return false; +} + +bool RPMPackageData::IgnoreDep(pkgVersioningSystem &VS, + pkgCache::DepIterator &Dep) +{ + const char *name = Dep.TargetPkg().Name(); + if (FakeProvides.find(name) != FakeProvides.end()) { + list *VerList = FakeProvides[name]; + if (VerList == NULL) + return true; + for (list::iterator I = VerList->begin(); + I != VerList->end(); I++) + { + if (VS.CheckDep(I->c_str(),Dep->CompareOp,Dep.TargetVer()) == true) + return true; + } + } + return false; +} + +static void ParseTemplate(string &Template, map &Dict) +{ + string::size_type start(string::npos); + string::size_type end(string::npos); + string::size_type last_start; + while (true) + { + last_start = start; + start = Template.rfind("%(", end); + if (start == string::npos) + break; + end = Template.find(")", start); + if (end < last_start) + { + string Key(Template,start+2,end-(start+2)); + map::const_iterator I = Dict.find(Key); + if (I != Dict.end()) + Template.replace(start, end-start+1, I->second); + } + if (start == 0) + break; + end = start-1; + } +} + +void RPMPackageData::GenericTranslate(list &TList, string &FullURI, + map &Dict) +{ + const char *fulluri = FullURI.c_str(); + for (list::iterator I = TList.begin(); I != TList.end(); I++) + { + if (regexec(&(*I)->Pattern,fulluri,0,0,0) == 0) + { + FullURI = (*I)->Template; + ParseTemplate(FullURI, Dict); + break; + } + } +} RPMPackageData *RPMPackageData::Singleton() { - static RPMPackageData *data = NULL; - - if (!data) - data = new RPMPackageData(); - - return data; + static RPMPackageData *data = NULL; + if (!data) + data = new RPMPackageData(); + return data; } + +#endif /* HAVE_RPM */ +// vim:sw=3:sts=3 diff --git a/apt/apt-pkg/rpm/rpmpackagedata.h b/apt/apt-pkg/rpm/rpmpackagedata.h index 640dbd6..d4faa1d 100644 --- a/apt/apt-pkg/rpm/rpmpackagedata.h +++ b/apt/apt-pkg/rpm/rpmpackagedata.h @@ -7,23 +7,60 @@ #include #include +#include +#include + +using namespace std; class RPMPackageData { -protected: - map Priorities; + protected: -public: - inline pkgCache::State::VerPriority PackagePriority(string Package) - { - if (Priorities.find(Package) == Priorities.end()) - return pkgCache::State::Standard; - else - return Priorities[Package]; - } + map Priorities; + map Flags; + map*> FakeProvides; + map IgnorePackages; + list HoldPackages; + + struct Translate { + regex_t Pattern; + string Template; + }; + list BinaryTranslations; + list SourceTranslations; + list IndexTranslations; + + void GenericTranslate(list &TList, string &FullURI, + map &Dict); + + public: + + inline pkgCache::State::VerPriority VerPriority(string Package) + {return Priorities[Package];}; + inline pkgCache::Flag::PkgFlags PkgFlags(string Package) + {return Flags[Package];}; + + bool HoldPackage(const char *name); + bool IgnorePackage(string Name); + bool IgnoreDep(pkgVersioningSystem &VS,pkgCache::DepIterator &Dep); + static RPMPackageData *Singleton(); - + + void TranslateBinary(string &FullURI, map &Dict) + {return GenericTranslate(BinaryTranslations, FullURI, Dict);}; + void TranslateSource(string &FullURI, map &Dict) + {return GenericTranslate(SourceTranslations, FullURI, Dict);}; + void TranslateIndex(string &FullURI, map &Dict) + {return GenericTranslate(IndexTranslations, FullURI, Dict);}; + + bool HasBinaryTranslation() + {return !BinaryTranslations.empty();}; + bool HasSourceTranslation() + {return !SourceTranslations.empty();}; + bool HasIndexTranslation() + {return !IndexTranslations.empty();}; + RPMPackageData(); }; diff --git a/apt/apt-pkg/rpm/rpmpm.cc b/apt/apt-pkg/rpm/rpmpm.cc index e37c739..398151c 100644 --- a/apt/apt-pkg/rpm/rpmpm.cc +++ b/apt/apt-pkg/rpm/rpmpm.cc @@ -12,10 +12,16 @@ #pragma implementation "apt-pkg/rpmpm.h" #endif +#include + +#ifdef HAVE_RPM + #include #include #include +#include + #include #include #include @@ -24,19 +30,17 @@ #include #include #include +#include -#include - -#include #include /*}}}*/ + // RPMPM::pkgRPMPM - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgRPMPM::pkgRPMPM(pkgDepCache &Cache) : pkgPackageManager(Cache) +pkgRPMPM::pkgRPMPM(pkgDepCache *Cache) : pkgPackageManager(Cache) { - noninteractive = false; } /*}}}*/ // RPMPM::pkgRPMPM - Destructor /*{{{*/ @@ -67,7 +71,7 @@ bool pkgRPMPM::Configure(PkgIterator Pkg) return false; } -// List.push_back(Item(Item::Configure,Pkg)); + List.push_back(Item(Item::Configure,Pkg)); return true; } /*}}}*/ @@ -79,9 +83,9 @@ bool pkgRPMPM::Remove(PkgIterator Pkg,bool Purge) if (Pkg.end() == true) return false; -// if (Purge == true) -// List.push_back(Item(Item::Purge,Pkg)); -// else + if (Purge == true) + List.push_back(Item(Item::Purge,Pkg)); + else List.push_back(Item(Item::Remove,Pkg)); return true; } @@ -97,53 +101,42 @@ bool pkgRPMPM::RunScripts(const char *Cnf) return true; Opts = Opts->Child; - // Fork for running the system calls - pid_t Child = ExecFork(); - - // This is the child - if (Child == 0) + bool error = false; + for (; Opts != 0; Opts = Opts->Next) { - if (chdir("/tmp/") != 0) - _exit(100); - - unsigned int Count = 1; - for (; Opts != 0; Opts = Opts->Next, Count++) + if (Opts->Value.empty() == true) + continue; + + // Purified Fork for running the script + pid_t Process = ExecFork(); + if (Process == 0) { - if (Opts->Value.empty() == true) - continue; - - if (system(Opts->Value.c_str()) != 0) - _exit(100+Count); + if (chdir("/tmp") != 0) + _exit(100); + + const char *Args[4]; + Args[0] = "/bin/sh"; + Args[1] = "-c"; + Args[2] = Opts->Value.c_str(); + Args[3] = 0; + execv(Args[0],(char **)Args); + _exit(100); + } + + // Clean up the sub process + if (ExecWait(Process,Opts->Value.c_str()) == false) { + _error->Error(_("Problem executing scripts %s '%s'"),Cnf, + Opts->Value.c_str()); + error = true; } - _exit(0); - } - - // Wait for the child - int Status = 0; - while (waitpid(Child,&Status,0) != Child) - { - if (errno == EINTR) - continue; - return _error->Errno("waitpid",_("Couldn't wait() for subprocess")); } - + // Restore sig int/quit signal(SIGQUIT,SIG_DFL); signal(SIGINT,SIG_DFL); - // Check for an error code. - if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) - { - unsigned int Count = WEXITSTATUS(Status); - if (Count > 100) - { - Count -= 100; - for (; Opts != 0 && Count != 1; Opts = Opts->Next, Count--); - _error->Error(_("Problem executing scripts %s '%s'"),Cnf,Opts->Value.c_str()); - } - + if (error) return _error->Error(_("Sub-process returned an error code")); - } return true; } @@ -161,8 +154,7 @@ bool pkgRPMPM::RunScriptsWithPkgs(const char *Cnf) return true; Opts = Opts->Child; - unsigned int Count = 1; - for (; Opts != 0; Opts = Opts->Next, Count++) + for (; Opts != 0; Opts = Opts->Next) { if (Opts->Value.empty() == true) continue; @@ -170,7 +162,7 @@ bool pkgRPMPM::RunScriptsWithPkgs(const char *Cnf) // Create the pipes int Pipes[2]; if (pipe(Pipes) != 0) - return _error->Errno("pipe",_("Failed to create IPC pipe to subprocess")); + return _error->Errno("pipe","Failed to create IPC pipe to subprocess"); SetCloseExec(Pipes[0],true); SetCloseExec(Pipes[1],true); @@ -208,7 +200,7 @@ bool pkgRPMPM::RunScriptsWithPkgs(const char *Cnf) /* Feed the filename of each package that is pending install into the pipe. */ - if (Fd.Write(I->File.begin(),I->File.length()) == false || + if (Fd.Write(I->File.c_str(),I->File.length()) == false || Fd.Write("\n",1) == false) { kill(Process,SIGINT); @@ -229,118 +221,117 @@ bool pkgRPMPM::RunScriptsWithPkgs(const char *Cnf) /*}}}*/ -bool pkgRPMPM::ExecRPM(Operation operation, slist *files, bool nodeps) +bool pkgRPMPM::ExecRPM(Item::RPMOps op, list &files) { - // Generate the argument list const char *Args[10000]; + const char *operation; unsigned int n = 0; - string options; - - Args[n++] = _config->Find("Dir::Bin::rpm","rpm").c_str(); - - // Stick in any custom rpm options - Configuration::Item const *Opts = _config->Tree("RPM::Options"); - if (Opts != 0) - { - Opts = Opts->Child; - for (; Opts != 0; Opts = Opts->Next) - { - if (Opts->Value.empty() == true) - continue; - Args[n++] = Opts->Value.c_str(); - } - } - - switch (operation) { - case OInstall: - case OUpgrade: - Opts = _config->Tree("RPM::UpgradeOptions"); - break; - - case ORemove: - Opts = _config->Tree("RPM::RemoveOptions"); - break; - - case OCheckSignature: - break; - } + bool Interactive = _config->FindB("RPM::Interactive",true); - if (Opts != 0) - { - Opts = Opts->Child; - for (; Opts != 0; Opts = Opts->Next) - { - if (Opts->Value.empty() == true) - continue; - Args[n++] = Opts->Value.c_str(); - } - } + Args[n++] = _config->Find("Dir::Bin::rpm","rpm").c_str(); + switch (op) + { + case Item::RPMInstall: + if (Interactive) + operation = "-ivh"; + else + operation = "-i"; + break; + + case Item::RPMUpgrade: + if (Interactive) + operation = "-Uvh"; + else + operation = "-U"; + break; + + case Item::RPMErase: + operation = "-e"; + break; + } + Args[n++] = operation; + + if (Interactive == false && op != Item::RPMErase) + Args[n++] = "--percent"; + string rootdir = _config->Find("RPM::RootDir", ""); - if (!rootdir.empty()) { + if (!rootdir.empty()) + { Args[n++] = "-r"; Args[n++] = rootdir.c_str(); } - - switch (operation) { - case OInstall: - options = "-i"; - - Args[n++] = "-i"; - - Args[n++] = "--replacepkgs"; - - if (noninteractive) - Args[n++] = "--percent"; - else - Args[n++] = "-h"; - - if (_config->FindB("RPM::Force", false) == true) - Args[n++] = "--force"; - - break; - - case OUpgrade: - options = "-U"; - Args[n++] = "-Uv"; - - Args[n++] = "--replacepkgs"; - - if (noninteractive) - Args[n++] = "--percent"; - else - Args[n++] = "-h"; - - if (_config->FindB("RPM::Force", false) == true) - Args[n++] = "--force"; - break; - - case ORemove: - options = "-e"; - Args[n++] = "-e"; - break; - - case OCheckSignature: - options = "-K"; - Args[n++] = "-Kv"; - break; - } - - if (nodeps) - Args[n++] = "--nodeps"; - - - for (slist::iterator i = files->begin(); - i != files->end() && n < sizeof(Args); - i++) + Configuration::Item const *Opts; + if (op == Item::RPMErase) { - Args[n++] = *i; + bool nodeps = true; + Opts = _config->Tree("RPM::Erase-Options"); + if (Opts != 0) + { + Opts = Opts->Child; + for (; Opts != 0; Opts = Opts->Next) + { + if (Opts->Value == "--nodeps") + nodeps = false; + else if (Opts->Value.empty() == true) + continue; + Args[n++] = Opts->Value.c_str(); + } + } + if (nodeps == true) + Args[n++] = "--nodeps"; } + else + { + bool oldpackage = _config->FindB("RPM::OldPackage",true); + bool replacepkgs = _config->FindB("APT::Get::ReInstall",false); + bool replacefiles = _config->FindB("APT::Get::ReInstall",false); + Opts = _config->Tree("RPM::Install-Options"); + if (Opts != 0) + { + Opts = Opts->Child; + for (; Opts != 0; Opts = Opts->Next) + { + if (Opts->Value == "--oldpackage") + oldpackage = false; + else if (Opts->Value == "--replacepkgs") + replacepkgs = false; + else if (Opts->Value == "--replacefiles") + replacefiles = false; + else if (Opts->Value.empty() == true) + continue; + Args[n++] = Opts->Value.c_str(); + } + } + if (oldpackage == true) + Args[n++] = "--oldpackage"; + if (replacepkgs == true) + Args[n++] = "--replacepkgs"; + if (replacefiles == true) + Args[n++] = "--replacefiles"; + } + + Opts = _config->Tree("RPM::Options"); + if (Opts != 0) + { + Opts = Opts->Child; + for (; Opts != 0; Opts = Opts->Next) + { + if (Opts->Value.empty() == true) + continue; + Args[n++] = Opts->Value.c_str(); + } + } + + if (_config->FindB("RPM::Order",false) == false) + Args[n++] = "--noorder"; + + for (list::iterator I = files.begin(); I != files.end(); I++) + Args[n++] = *I; + Args[n++] = 0; - - // spit out command line for debugging if (_config->FindB("Debug::pkgRPMPM",false) == true) { for (unsigned int k = 0; k < n; k++) @@ -349,7 +340,7 @@ bool pkgRPMPM::ExecRPM(Operation operation, slist *files, bool nodeps) return true; } - cout << _("Executing RPM (")< *files, bool nodeps) if ((Flags = fcntl(STDIN_FILENO,F_GETFL,dummy)) < 0) _exit(100); - // Discard everything in stdin before forking + // Discard everything in stdin before forking dpkg if (fcntl(STDIN_FILENO,F_SETFL,Flags | O_NONBLOCK) < 0) _exit(100); @@ -389,7 +380,7 @@ bool pkgRPMPM::ExecRPM(Operation operation, slist *files, bool nodeps) } execvp(Args[0],(char **)Args); - cerr << _("Could not exec() ") << Args[0] << endl; + cerr << "Could not exec " << Args[0] << endl; _exit(100); } @@ -399,7 +390,8 @@ bool pkgRPMPM::ExecRPM(Operation operation, slist *files, bool nodeps) { if (errno == EINTR) continue; - return _error->Errno("waitpid",_("Couldn't wait for subprocess")); + RunScripts("RPM::Post-Invoke"); + return _error->Errno("waitpid","Couldn't wait for subprocess"); } // Restore sig int/quit @@ -409,8 +401,9 @@ bool pkgRPMPM::ExecRPM(Operation operation, slist *files, bool nodeps) // Check for an error code. if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) { - if (WIFSIGNALED(Status) != 0) - return _error->Error(_("Sub-process %s terminated by signal (%i)") ,Args[0], WTERMSIG(Status) ); + RunScripts("RPM::Post-Invoke"); + if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) + return _error->Error(_("Sub-process %s recieved a segmentation fault."),Args[0]); if (WIFEXITED(Status) != 0) return _error->Error(_("Sub-process %s returned an error code (%u)"),Args[0], @@ -418,41 +411,21 @@ bool pkgRPMPM::ExecRPM(Operation operation, slist *files, bool nodeps) return _error->Error(_("Sub-process %s exited unexpectedly"),Args[0]); } - + return true; } -bool pkgRPMPM::Process(slist *install, - slist *upgrade, - slist *uninstall) +bool pkgRPMPM::Process(list &install, + list &upgrade, + list &uninstall) { - if (_config->FindB("RPM::Check-Signatures", false) == true) - { - cout << "Verifying signatures for individual packages..." << endl; - cout << "Package operations will not be performed." << endl; - - if (!install->empty()) - ExecRPM(OCheckSignature, install, false); - - if (!upgrade->empty()) - ExecRPM(OCheckSignature, upgrade, false); - - if (_error->PendingError() == true) - return _error->Error("Errors found while verifying individual package signatures."); - else - return true; - } - - if (!uninstall->empty()) - ExecRPM(ORemove, uninstall, true); - - if (!install->empty()) - ExecRPM(OInstall, install, true); - - if (!upgrade->empty()) - ExecRPM(OUpgrade, upgrade, false); - + if (uninstall.empty() == false) + ExecRPM(Item::RPMErase, uninstall); + if (install.empty() == false) + ExecRPM(Item::RPMInstall, install); + if (upgrade.empty() == false) + ExecRPM(Item::RPMUpgrade, upgrade); return true; } @@ -462,103 +435,59 @@ bool pkgRPMPM::Process(slist *install, /* This globs the operations and calls rpm */ bool pkgRPMPM::Go() { - bool RPMUpgrade = false; - if (RunScripts("RPM::Pre-Invoke") == false) return false; if (RunScriptsWithPkgs("RPM::Pre-Install-Pkgs") == false) return false; - slist *install = new slist; - slist *upgrade = new slist; - slist *uninstall = new slist; + list install; + list upgrade; + list uninstall; + + list unalloc; for (vector::iterator I = List.begin(); I != List.end(); I++) { switch (I->Op) { - case Item::Purge: - case Item::Remove: - if (strchr(I->Pkg.Name(), '#')) + case Item::Purge: + case Item::Remove: + if (strchr(I->Pkg.Name(), '#') != NULL) { - char *ptr = strdup(I->Pkg.Name()); - char *p1 = strchr(ptr, '#'); - char *p2 = strrchr(ptr, '#'); - if (p1 == p2) - { - *p1 = '-'; - uninstall->push_front(ptr); // akk: leak - } - else - { - p2 = strrchr(I->Pkg.Name(), '#'); - strcpy(p1, p2); - *p1 = '-'; - uninstall->push_front(ptr); - } - } - else - { - uninstall->push_front((char*)I->Pkg.Name()); + const char *pkgname = I->Pkg.Name(); + string Name = string(pkgname, strchr(pkgname, '#')-pkgname) + + "-" + string(I->Pkg.CurrentVer().VerStr()); + char *name = strdup(Name.c_str()); + unalloc.push_back(name); + uninstall.push_back(name); } + else + uninstall.push_back(I->Pkg.Name()); break; case Item::Configure: -// cout << __FUNCTION__ << ": ignoring request for configure\n"; break; case Item::Install: - // eeek!! yuck!!! bleh!!! blame rpm - if (strcmp(I->Pkg.Name(), "rpm") == 0 - || strcmp(I->Pkg.Name(), "librpm") == 0) - RPMUpgrade = true; - - if (strchr(I->Pkg.Name(), '#')) - { - install->push_front((char*)I->File.c_str()); - } + if (strchr(I->Pkg.Name(), '#') != NULL) + install.push_back(I->File.c_str()); else - { - upgrade->push_front((char*)I->File.c_str()); - } + upgrade.push_back(I->File.c_str()); break; default: - cout << __FUNCTION__ << "UNKNOWN OPERATION!!!!\n"; - break; + return _error->Error("Unknown pkgRPMPM operation."); } } - - if (RPMUpgrade == true && _config->FindB("RPM::AutoRebuildDB", true) == true) - { - int res; - - cerr << (_("Rebuilding RPM database (this may take a few minutes)...")) << endl; - - res = rpmdbRebuild(_config->FindDir("RPM::RootDir", "/").c_str()); - if (res != 0) - return _error->Error(_("could not rebuild RPM database for upgrade of RPM")); - } - bool result = Process(install, upgrade, uninstall); + if (Process(install, upgrade, uninstall) == false) + return false; - delete install; - delete upgrade; - delete uninstall; - - if (!result) { - RunScripts("RPM::Post-Invoke"); - return false; - } - - if (RunScripts("RPM::Post-Invoke") == false) - return false; - - if (RunScriptsWithPkgs("RPM::Post-Invoke-Pkgs") == false) - return false; - - return true; + for (list::iterator I = unalloc.begin(); I != unalloc.end(); I++) + free(*I); + + return RunScripts("RPM::Post-Invoke"); } /*}}}*/ // pkgRPMPM::Reset - Dump the contents of the command list /*{{{*/ @@ -569,3 +498,7 @@ void pkgRPMPM::Reset() List.erase(List.begin(),List.end()); } /*}}}*/ + +#endif /* HAVE_RPM */ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmpm.h b/apt/apt-pkg/rpm/rpmpm.h index 19d56aa..d5afd5b 100644 --- a/apt/apt-pkg/rpm/rpmpm.h +++ b/apt/apt-pkg/rpm/rpmpm.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rpmpm.h,v 1.6 2001/11/12 16:04:38 kojima Exp $ +// $Id: rpmpm.h,v 1.4 2003/01/29 13:52:32 niemeyer Exp $ /* ###################################################################### rpm Package Manager - Provide an interface to rpm @@ -17,28 +17,25 @@ #include #include -#include +#include + +using namespace std; - class pkgRPMPM : public pkgPackageManager { - bool noninteractive; - protected: - + struct Item { enum Ops {Install, Configure, Remove, Purge} Op; + enum RPMOps {RPMInstall, RPMUpgrade, RPMErase}; string File; PkgIterator Pkg; - Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op), - File(File), Pkg(Pkg) {}; + Item(Ops Op,PkgIterator Pkg,string File = "") + : Op(Op), File(File), Pkg(Pkg) {}; Item() {}; }; - - enum Operation { OInstall, OUpgrade, ORemove, OCheckSignature }; - vector List; // Helpers @@ -50,24 +47,20 @@ class pkgRPMPM : public pkgPackageManager virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge = false); - bool ExecRPM(Operation operation, slist *files, bool nodeps); - bool Process(slist *install, - slist *upgrade, - slist *uninstall); + bool ExecRPM(Item::RPMOps op, list &files); + bool Process(list &install, + list &upgrade, + list &uninstall); virtual bool Go(); virtual void Reset(); public: - pkgRPMPM(pkgDepCache &Cache); + pkgRPMPM(pkgDepCache *Cache); virtual ~pkgRPMPM(); - - void setNonInteractive() { noninteractive = true; }; }; - - - - #endif + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmrecords.cc b/apt/apt-pkg/rpm/rpmrecords.cc index bd4693b..3931fda 100644 --- a/apt/apt-pkg/rpm/rpmrecords.cc +++ b/apt/apt-pkg/rpm/rpmrecords.cc @@ -14,65 +14,49 @@ #include +#ifdef HAVE_RPM + +#include + #include #include -#include - -#include +#include +#include // RecordParser::rpmRecordParser - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ rpmRecordParser::rpmRecordParser(string File, pkgCache &Cache) + : FileHandler(0), HeaderP(0), Buffer(0), BufSize(0), BufUsed(0) { - string RPMFile = "packages.rpm"; -#ifdef HAVE_RPM4 - if (rpmExpandNumeric("%{_dbapi}") == 3) - RPMFile = "Packages"; -#endif - - if (File.find(RPMFile) != string::npos) { - // read from the rpm db - Fd = NULL; - pkgRpmLock::SharedRPM()->Rewind(); - } else { - Fd = new FileFd(File, FileFd::ReadOnly); - } - Offset = 0; - header = NULL; + if (File != RPMDBHandler::DataPath(false)) + FileHandler = new RPMFileHandler(File); } /*}}}*/ +// RecordParser::~rpmRecordParser - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ rpmRecordParser::~rpmRecordParser() { - if (Fd) { - delete Fd; - } - if (header) - headerFree(header); + delete FileHandler; + free(Buffer); } + /*}}}*/ // RecordParser::Jump - Jump to a specific record /*{{{*/ // --------------------------------------------------------------------- /* */ bool rpmRecordParser::Jump(pkgCache::VerFileIterator const &Ver) { - if (header) - headerFree(header); - - if (Fd) { - Offset = Ver->Offset; - Fd->Seek(Offset); - FD_t fdt = fdDup(Fd->Fd()); - header = headerRead(fdt, HEADER_MAGIC_YES); - fdClose(fdt); - } else { - Offset = Ver->Offset; - header = pkgRpmLock::SharedRPM()->GetRecord(Offset); - } - - if (header != NULL) - return true; - else - return false; + RPMHandler *Handler = FileHandler; + if (Handler == NULL) + { + Handler = rpmSys.GetDBHandler(); + if (Handler == NULL) + return false; + } + Handler->Jump(Ver->Offset); + HeaderP = Handler->GetHeader(); + return (HeaderP != NULL); } /*}}}*/ // RecordParser::FileName - Return the archive filename on the site /*{{{*/ @@ -82,12 +66,23 @@ string rpmRecordParser::FileName() { char *str; int_32 count, type; - - headerGetEntry(header, CRPMTAG_FILENAME, &type, (void**)&str, &count); - - string tmp = string(str); - - return tmp; + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, CRPMTAG_FILENAME, + &type, (void**)&str, &count); + return string(rc?str:""); +} + /*}}}*/ +// RecordParser::Name - Return the package name /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string rpmRecordParser::Name() +{ + char *str; + int_32 count, type; + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, RPMTAG_NAME, + &type, (void**)&str, &count); + return string(rc?str:""); } /*}}}*/ // RecordParser::MD5Hash - Return the archive hash /*{{{*/ @@ -97,12 +92,10 @@ string rpmRecordParser::MD5Hash() { char *str; int_32 count, type; - - if (headerGetEntry(header, CRPMTAG_MD5, &type, (void**)&str, &count)!=1) { - return string(); - } else { - return string(str); - } + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, CRPMTAG_MD5, + &type, (void**)&str, &count); + return string(rc?str:""); } /*}}}*/ // RecordParser::Maintainer - Return the maintainer email /*{{{*/ @@ -110,16 +103,12 @@ string rpmRecordParser::MD5Hash() /* */ string rpmRecordParser::Maintainer() { - char *str = NULL; + char *str; int_32 count, type; - - headerGetEntry(header, RPMTAG_PACKAGER, &type, (void**)&str, &count); - - if (!str) - return ""; - - string tmp = string(str); - return tmp; + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, RPMTAG_PACKAGER, + &type, (void**)&str, &count); + return string(rc?str:""); } /*}}}*/ // RecordParser::ShortDesc - Return a 1 line description /*{{{*/ @@ -127,20 +116,15 @@ string rpmRecordParser::Maintainer() /* */ string rpmRecordParser::ShortDesc() { - string Res; - char *str = NULL; - int_32 count, type; - - headerGetEntry(header, RPMTAG_SUMMARY, &type, (void**)&str, &count); - - if (!str) - return ""; - - Res = string(str); - string::size_type Pos = Res.find('\n'); - if (Pos == string::npos) - return Res; - return string(Res,0,Pos); + char *str; + int_32 count, type; + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, RPMTAG_SUMMARY, + &type, (void**)&str, &count); + if (rc != 1) + return string(); + else + return string(str,0,string(str).find('\n')); } /*}}}*/ // RecordParser::LongDesc - Return a longer description /*{{{*/ @@ -148,35 +132,41 @@ string rpmRecordParser::ShortDesc() /* */ string rpmRecordParser::LongDesc() { - char *str = NULL, *str2, *x, *y; + char *str, *ret, *x, *y; int_32 count, type; - int n, s; - - headerGetEntry(header, RPMTAG_DESCRIPTION, &type, (void**)&str, &count); + int len; + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, RPMTAG_DESCRIPTION, + &type, (void**)&str, &count); + if (rc != 1) + return ""; - if (!str) - return ""; - - // Ouch! - for (x = str, s = n = 0; *x; x++, s++) { - if (*x == '\n') - n++; - } - str2 = (char *)malloc (s + n + 4); - for (x = str, y = str2; *x; x++, y++) { - *y = *x; - if (*x == '\n') - *++y = ' '; + // Count size plus number of newlines + for (x = str, len = 0; *x; x++, len++) + if (*x == '\n') + len++; + + ret = (char*)malloc(len+1); + if (ret == NULL) + return "out of mem"; + + // Copy string, inserting a space after each newline + for (x = str, y = ret; *x; x++, y++) + { + *y = *x; + if (*x == '\n') + *++y = ' '; } *y = 0; - for (y--; (*y == ' ' || *y == '\n') && y > str2; y--) - *y = 0; - - string tmp = string(str2); - free(str2); - - return tmp; + // Remove spaces and newlines from end of string + for (y--; y > ret && (*y == ' ' || *y == '\n'); y--) + *y = 0; + + string Ret = string(ret); + free(ret); + + return Ret; } /*}}}*/ // RecordParser::SourcePkg - Return the source package name if any /*{{{*/ @@ -184,13 +174,254 @@ string rpmRecordParser::LongDesc() /* */ string rpmRecordParser::SourcePkg() { - char *str; - int_32 count, type; - - if (headerGetEntry(header, RPMTAG_SOURCERPM, &type, (void**)&str, &count)==0) { - string tmp = string(str); - return tmp; - } else - return string(); + return ""; } /*}}}*/ + +void rpmRecordParser::BufCat(char *text) +{ + if (text != NULL) + BufCat(text, text+strlen(text)); +} + +void rpmRecordParser::BufCat(char *begin, char *end) +{ + unsigned len = end - begin; + + if (BufUsed+len+1 >= BufSize) + { + BufSize += 512; + char *tmp = (char*)realloc(Buffer, BufSize); + if (tmp == NULL) + { + _error->Errno("realloc", "could not allocate buffer for record text"); + return; + } + Buffer = tmp; + } + + strncpy(Buffer+BufUsed, begin, len); + BufUsed += len; +} + +void rpmRecordParser::BufCatTag(char *tag, char *value) +{ + BufCat(tag); + BufCat(value); +} + +void rpmRecordParser::BufCatDep(char *pkg, char *version, int flags) +{ + char buf[16]; + char *ptr = (char*)buf; + + BufCat(pkg); + if (*version) + { + int c = 0; + *ptr++ = ' '; + *ptr++ = '('; + if (flags & RPMSENSE_LESS) + { + *ptr++ = '<'; + c = '<'; + } + if (flags & RPMSENSE_GREATER) + { + *ptr++ = '>'; + c = '>'; + } + if (flags & RPMSENSE_EQUAL) + { + *ptr++ = '='; + }/* else { + if (c) + fputc(c, f); + }*/ + *ptr++ = ' '; + *ptr = '\0'; + + BufCat(buf); + BufCat(version); + BufCat(")"); + } +} + +void rpmRecordParser::BufCatDescr(char *descr) +{ + char *begin = descr; + + while (*descr) + { + if (*descr=='\n') + { + BufCat(" "); + BufCat(begin, descr+1); + begin = descr+1; + } + descr++; + } + BufCat(" "); + BufCat(begin, descr); + BufCat("\n"); +} + + +// RecordParser::GetRec - The record in raw text, in std Debian format /*{{{*/ +// --------------------------------------------------------------------- +void rpmRecordParser::GetRec(const char *&Start,const char *&Stop) +{ + int type, type2, type3, count; + char *str; + char **strv; + char **strv2; + int num; + int_32 *numv; + char buf[32]; + + BufUsed = 0; + + assert(HeaderP != NULL); + + headerGetEntry(HeaderP, RPMTAG_NAME, &type, (void **)&str, &count); + BufCatTag("Package: ", str); + + headerGetEntry(HeaderP, RPMTAG_GROUP, &type, (void **)&str, &count); + BufCatTag("\nSection: ", str); + + headerGetEntry(HeaderP, RPMTAG_SIZE, &type, (void **)&numv, &count); + snprintf(buf, sizeof(buf), "%d", numv[0] / 1000); + BufCatTag("\nInstalled Size: ", buf); + + str = NULL; + headerGetEntry(HeaderP, RPMTAG_PACKAGER, &type, (void **)&str, &count); + if (!str) + headerGetEntry(HeaderP, RPMTAG_VENDOR, &type, (void **)&str, &count); + BufCatTag("\nMaintainer: ", str); + + BufCat("\nVersion: "); + headerGetEntry(HeaderP, RPMTAG_VERSION, &type, (void **)&str, &count); + if (headerGetEntry(HeaderP, RPMTAG_EPOCH, &type, (void **)&numv, &count)==1) + snprintf(buf, sizeof(buf), "%i:%s-", numv[0], str); + else + snprintf(buf, sizeof(buf), "%s-", str); + BufCat(buf); + headerGetEntry(HeaderP, RPMTAG_RELEASE, &type, (void **)&str, &count); + BufCat(str); + +// headerGetEntry(HeaderP, RPMTAG_DISTRIBUTION, &type, (void **)&str, &count); +// fprintf(f, "Distribution: %s\n", str); + + headerGetEntry(HeaderP, RPMTAG_REQUIRENAME, &type, (void **)&strv, &count); + assert(type == RPM_STRING_ARRAY_TYPE || count == 0); + + headerGetEntry(HeaderP, RPMTAG_REQUIREVERSION, &type2, (void **)&strv2, &count); + headerGetEntry(HeaderP, RPMTAG_REQUIREFLAGS, &type3, (void **)&numv, &count); + + if (count > 0) + { + int i, j; + + for (j = i = 0; i < count; i++) + { + if ((numv[i] & RPMSENSE_PREREQ)) + { + if (j == 0) + BufCat("\nPre-Depends: "); + else + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + j++; + } + } + + for (j = 0, i = 0; i < count; i++) + { + if (!(numv[i] & RPMSENSE_PREREQ)) + { + if (j == 0) + BufCat("\nDepends: "); + else + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + j++; + } + } + } + + headerGetEntry(HeaderP, RPMTAG_CONFLICTNAME, &type, (void **)&strv, &count); + assert(type == RPM_STRING_ARRAY_TYPE || count == 0); + + headerGetEntry(HeaderP, RPMTAG_CONFLICTVERSION, &type2, (void **)&strv2, &count); + headerGetEntry(HeaderP, RPMTAG_CONFLICTFLAGS, &type3, (void **)&numv, &count); + + if (count > 0) + { + BufCat("\nConflicts: "); + for (int i = 0; i < count; i++) + { + if (i > 0) + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + } + } + + headerGetEntry(HeaderP, RPMTAG_PROVIDENAME, &type, (void **)&strv, &count); + assert(type == RPM_STRING_ARRAY_TYPE || count == 0); + + headerGetEntry(HeaderP, RPMTAG_PROVIDEVERSION, &type2, (void **)&strv2, &count); + headerGetEntry(HeaderP, RPMTAG_PROVIDEFLAGS, &type3, (void **)&numv, &count); + + if (count > 0) + { + BufCat("\nProvides: "); + for (int i = 0; i < count; i++) + { + if (i > 0) + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + } + } + + headerGetEntry(HeaderP, RPMTAG_OBSOLETENAME, &type, (void **)&strv, &count); + assert(type == RPM_STRING_ARRAY_TYPE || count == 0); + + headerGetEntry(HeaderP, RPMTAG_OBSOLETEVERSION, &type2, (void **)&strv2, &count); + headerGetEntry(HeaderP, RPMTAG_OBSOLETEFLAGS, &type3, (void **)&numv, &count); + if (count > 0) { + BufCat("\nObsoletes: "); + for (int i = 0; i < count; i++) + { + if (i > 0) + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + } + } + + headerGetEntry(HeaderP, RPMTAG_ARCH, &type, (void **)&str, &count); + BufCatTag("\nArchitecture: ", str); + + headerGetEntry(HeaderP, CRPMTAG_FILESIZE, &type, (void **)&num, &count); + snprintf(buf, sizeof(buf), "%d", num); + BufCatTag("\nSize: ", buf); + + headerGetEntry(HeaderP, CRPMTAG_MD5, &type, (void **)&str, &count); + BufCatTag("\nMD5Sum: ", str); + + headerGetEntry(HeaderP, CRPMTAG_FILENAME, &type, (void **)&str, &count); + BufCatTag("\nFilename: ", str); + + headerGetEntry(HeaderP, RPMTAG_SUMMARY, &type, (void **)&str, &count); + BufCatTag("\nDescription: ", str); + BufCat("\n"); + headerGetEntry(HeaderP, RPMTAG_DESCRIPTION, &type, (void **)&str, &count); + BufCatDescr(str); + BufCat("\n"); + + Start = Buffer; + Stop = Buffer + BufUsed; +} + /*}}}*/ +#endif /* HAVE_RPM */ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmrecords.h b/apt/apt-pkg/rpm/rpmrecords.h index 049ca4b..68520fe 100644 --- a/apt/apt-pkg/rpm/rpmrecords.h +++ b/apt/apt-pkg/rpm/rpmrecords.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rpmrecords.h,v 1.3 2001/06/05 17:14:24 kojima Exp $ +// $Id: rpmrecords.h,v 1.3 2002/08/08 20:07:33 niemeyer Exp $ /* ###################################################################### RPM Package Records - Parser for RPM hdlist/rpmdb files @@ -19,18 +19,29 @@ #pragma interface "apt-pkg/rpmrecords.h" #endif - #include #include #include + +class RPMFileHandler; + class rpmRecordParser : public pkgRecords::Parser { - FileFd *Fd; - unsigned Offset; + RPMFileHandler *FileHandler; + + Header HeaderP; + + char *Buffer; + unsigned BufSize; + unsigned BufUsed; + + void BufCat(char *text); + void BufCat(char *begin, char *end); + void BufCatTag(char *tag, char *value); + void BufCatDep(char *pkg, char *version, int flags); + void BufCatDescr(char *descr); - Header header; - protected: virtual bool Jump(pkgCache::VerFileIterator const &Ver); @@ -46,9 +57,13 @@ class rpmRecordParser : public pkgRecords::Parser virtual string Maintainer(); virtual string ShortDesc(); virtual string LongDesc(); - - inline Header GetRecord() { return header; }; + virtual string Name(); + inline Header GetRecord() { return HeaderP; }; + + // The record in raw text, in standard Debian format + virtual void GetRec(const char *&Start,const char *&Stop); + rpmRecordParser(string File,pkgCache &Cache); ~rpmRecordParser(); }; diff --git a/apt/apt-pkg/rpm/rpmsrcrecords.cc b/apt/apt-pkg/rpm/rpmsrcrecords.cc index fbe4108..a950d1b 100644 --- a/apt/apt-pkg/rpm/rpmsrcrecords.cc +++ b/apt/apt-pkg/rpm/rpmsrcrecords.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rpmsrcrecords.cc,v 1.5 2001/11/13 17:32:08 kojima Exp $ +// $Id: rpmsrcrecords.cc,v 1.9 2003/01/29 15:19:02 niemeyer Exp $ /* ###################################################################### SRPM Records - Parser implementation for RPM style source indexes @@ -13,22 +13,41 @@ #pragma implementation "apt-pkg/rpmsrcrecords.h" #endif +#include + +#ifdef HAVE_RPM + + #include #include #include -#include /*}}}*/ +#include +#include -#include +#include -rpmSrcRecordParser::rpmSrcRecordParser(FileFd *F, pkgSourceList::const_iterator SrcItem) - : Parser(F, SrcItem) +#ifdef HAVE_RPM41 +#include +#endif + +// SrcRecordParser::rpmSrcRecordParser - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +rpmSrcRecordParser::rpmSrcRecordParser(string File,pkgIndexFile const *Index) + : Parser(Index), HeaderP(0), Buffer(0), BufSize(0), BufUsed(0) { + FileHandler = new RPMFileHandler(File); } - - - - - + /*}}}*/ +// SrcRecordParser::~rpmSrcRecordParser - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +rpmSrcRecordParser::~rpmSrcRecordParser() +{ + delete FileHandler; + free(Buffer); +} + /*}}}*/ // SrcRecordParser::Binaries - Return the binaries field /*{{{*/ // --------------------------------------------------------------------- /* This member parses the binaries field into a pair of class arrays and @@ -40,16 +59,15 @@ const char **rpmSrcRecordParser::Binaries() int i = 0; char **bins; int type, count; - - if (headerGetEntry(header, CRPMTAG_BINARY, &type, (void**)&bins, &count)!=1) + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, CRPMTAG_BINARY, + &type, (void**)&bins, &count); + if (rc != 1) return NULL; - for (i = 0; (unsigned)i < sizeof(StaticBinList)/sizeof(char*) && i < count; i++) - { + for (i = 0; (unsigned)i < sizeof(StaticBinList)/sizeof(char*) && i < count; + i++) StaticBinList[i] = bins[i]; - } StaticBinList[i] = 0; -// free(bins); - return StaticBinList; } /*}}}*/ @@ -63,35 +81,48 @@ bool rpmSrcRecordParser::Files(vector &List) char *dir; int type, count; int_32 *size; + int rc; + + assert(HeaderP != NULL); - List.erase(List.begin(),List.end()); + List.clear(); - if (headerGetEntry(header, CRPMTAG_FILENAME, &type, (void**)&srpm, &count)==0) - return false; - - if (headerGetEntry(header, CRPMTAG_MD5, &type, (void**)&md5, &count)==0) - { - return _error->Error(_("error parsing file record")); - return false; - } - - if (headerGetEntry(header, CRPMTAG_FILESIZE, &type, (void**)&size, &count)==0) - { - return _error->Error(_("error parsing file record")); - return false; - } - - if (headerGetEntry(header, CRPMTAG_DIRECTORY, &type, (void**)&dir, &count)==0) - { - return _error->Error(_("error parsing file record")); - return false; - } + rc = headerGetEntry(HeaderP, CRPMTAG_FILENAME, + &type, (void**)&srpm, &count); + if (rc != 1) + return _error->Error(_("error parsing file record %s"), + "(CRPMTAG_FILENAME)"); + rc = headerGetEntry(HeaderP, CRPMTAG_MD5, + &type, (void**)&md5, &count); + if (rc != 1) + return _error->Error(_("error parsing file record %s"), + "(CRPMTAG_MD5)"); + rc = headerGetEntry(HeaderP, CRPMTAG_FILESIZE, + &type, (void**)&size, &count); + if (rc != 1) + return _error->Error(_("error parsing file record %s"), + "(CRPMTAG_FILESIZE)"); + rc = headerGetEntry(HeaderP, CRPMTAG_DIRECTORY, + &type, (void**)&dir, &count); + if (rc != 1) + return _error->Error(_("error parsing file record %s"), + "(CRPMTAG_DIRECTORY)"); pkgSrcRecords::File F; F.MD5Hash = string(md5); F.Size = size[0]; F.Path = string(dir)+"/"+string(srpm); + F.Type = "srpm"; + +#ifndef REMOVE_THIS_SOMEDAY + /* This code is here to detect if that's a "new" style SRPM directory + * scheme, or an old style. Someday, when most repositories were already + * rebuilt with the new gensrclist tool, this code may be safely + * removed. */ + if (F.Path[0] != '.') + F.Path = "../" + F.Path; +#endif List.push_back(F); @@ -99,127 +130,393 @@ bool rpmSrcRecordParser::Files(vector &List) } /*}}}*/ - bool rpmSrcRecordParser::Restart() { - iOffset = 0; + FileHandler->Rewind(); return true; } - bool rpmSrcRecordParser::Step() { - FD_t fdt = fdDup(File->Fd()); - iOffset = File->Tell(); - header = headerRead(fdt, HEADER_MAGIC_YES); - fdClose(fdt); - - if (header != NULL) - return true; - else - return false; + if (FileHandler->Skip() == false) + return false; + HeaderP = FileHandler->GetHeader(); + return true; } - bool rpmSrcRecordParser::Jump(unsigned long Off) { - iOffset = Off; - - File->Seek(iOffset); - FD_t fdt = fdDup(File->Fd()); - header = headerRead(fdt, HEADER_MAGIC_YES); - fdClose(fdt); - - if (header != NULL) - return true; - else - return false; + if (!FileHandler->Jump(Off)) + return false; + HeaderP = FileHandler->GetHeader(); + return true; } -string rpmSrcRecordParser::Package() +string rpmSrcRecordParser::Package() const { char *str; int_32 count, type; - - headerGetEntry(header, RPMTAG_NAME, &type, (void**)&str, &count); - - string tmp = string(str); -// free(str); - - return tmp; + int rc = headerGetEntry(HeaderP, RPMTAG_NAME, + &type, (void**)&str, &count); + return string(rc?str:""); } - -string rpmSrcRecordParser::Version() +string rpmSrcRecordParser::Version() const { - char *ver, *rel; - int_32 *ser; - bool has_serial = false; + char *version, *release; + int_32 *epoch; int type, count; - string str; + int rc; - if (headerGetEntry(header, RPMTAG_EPOCH, &type, (void **)&ser, &count)==1 - && count > 0) + rc = headerGetEntry(HeaderP, RPMTAG_VERSION, + &type, (void **)&version, &count); + if (rc != 1) { - has_serial = true; + _error->Error(_("error parsing source list %s"), "(RPMTAG_VERSION)"); + return ""; } - - headerGetEntry(header, RPMTAG_VERSION, &type, (void **)&ver, &count); - - headerGetEntry(header, RPMTAG_RELEASE, &type, (void **)&rel, &count); - - if (has_serial) + rc = headerGetEntry(HeaderP, RPMTAG_RELEASE, + &type, (void **)&release, &count); + if (rc != 1) + { + _error->Error(_("error parsing source list %s"), "(RPMTAG_RELEASE)"); + return ""; + } + + rc = headerGetEntry(HeaderP, RPMTAG_EPOCH, + &type, (void **)&epoch, &count); + string ret; + if (rc == 1 && count > 0) { char buf[32]; - snprintf(buf, sizeof(buf), "%i", *ser); - - str = string(buf)+":"+string(ver)+"-"+string(rel); + sprintf(buf, "%i", *epoch); + ret = string(buf)+":"+string(version)+"-"+string(release); } else - { - str = string(ver)+"-"+string(rel); - } + ret = string(version)+"-"+string(release); - return str; + return ret; } // RecordParser::Maintainer - Return the maintainer email /*{{{*/ // --------------------------------------------------------------------- /* */ -string rpmSrcRecordParser::Maintainer() +string rpmSrcRecordParser::Maintainer() const { char *str; int_32 count, type; - - headerGetEntry(header, RPMTAG_PACKAGER, &type, (void**)&str, &count); - - string tmp = string(str); - - return tmp; + int rc = headerGetEntry(HeaderP, RPMTAG_PACKAGER, + &type, (void**)&str, &count); + return string(rc?str:""); } - /*}}}*/ - -string rpmSrcRecordParser::Section() +string rpmSrcRecordParser::Section() const { char *str; int_32 count, type; - - headerGetEntry(header, RPMTAG_GROUP, &type, (void**)&str, &count); - - string tmp = string(str); - - return tmp; + int rc = headerGetEntry(HeaderP, RPMTAG_GROUP, + &type, (void**)&str, &count); + return string(rc?str:""); } unsigned long rpmSrcRecordParser::Offset() { - return iOffset; + return FileHandler->Offset(); } -string rpmSrcRecordParser::AsStr() +void rpmSrcRecordParser::BufCat(char *text) { - return "NOT IMPLEMENTED!!!\n\n"; + if (text != NULL) + BufCat(text, text+strlen(text)); } +void rpmSrcRecordParser::BufCat(char *begin, char *end) +{ + unsigned len = end - begin; + + if (BufUsed+len+1 >= BufSize) + { + BufSize += 512; + char *tmp = (char*)realloc(Buffer, BufSize); + if (tmp == NULL) + { + _error->Errno("realloc", "could not allocate buffer for record text"); + return; + } + Buffer = tmp; + } + + strncpy(Buffer+BufUsed, begin, len); + BufUsed += len; +} + +void rpmSrcRecordParser::BufCatTag(char *tag, char *value) +{ + BufCat(tag); + BufCat(value); +} + +void rpmSrcRecordParser::BufCatDep(char *pkg, char *version, int flags) +{ + char buf[16]; + char *ptr = (char*)buf; + + BufCat(pkg); + if (*version) + { + int c = 0; + *ptr++ = ' '; + *ptr++ = '('; + if (flags & RPMSENSE_LESS) + { + *ptr++ = '<'; + c = '<'; + } + if (flags & RPMSENSE_GREATER) + { + *ptr++ = '>'; + c = '>'; + } + if (flags & RPMSENSE_EQUAL) + { + *ptr++ = '='; + }/* else { + if (c) + fputc(c, f); + }*/ + *ptr++ = ' '; + *ptr = '\0'; + + BufCat(buf); + BufCat(version); + BufCat(")"); + } +} + +void rpmSrcRecordParser::BufCatDescr(char *descr) +{ + char *begin = descr; + + while (*descr) + { + if (*descr=='\n') + { + BufCat(" "); + BufCat(begin, descr+1); + begin = descr+1; + } + descr++; + } + BufCat(" "); + BufCat(begin, descr); + BufCat("\n"); +} + +// SrcRecordParser::AsStr - The record in raw text +// ----------------------------------------------- +string rpmSrcRecordParser::AsStr() +{ + int type, type2, type3, count; + char *str; + char **strv; + char **strv2; + int num; + int_32 *numv; + char buf[32]; + + BufUsed = 0; + + headerGetEntry(HeaderP, RPMTAG_NAME, &type, (void **)&str, &count); + BufCatTag("Package: ", str); + + headerGetEntry(HeaderP, RPMTAG_GROUP, &type, (void **)&str, &count); + BufCatTag("\nSection: ", str); + + headerGetEntry(HeaderP, RPMTAG_SIZE, &type, (void **)&numv, &count); + snprintf(buf, sizeof(buf), "%d", numv[0] / 1000); + BufCatTag("\nInstalled Size: ", buf); + + str = NULL; + headerGetEntry(HeaderP, RPMTAG_PACKAGER, &type, (void **)&str, &count); + if (!str) + headerGetEntry(HeaderP, RPMTAG_VENDOR, &type, (void **)&str, &count); + BufCatTag("\nMaintainer: ", str); + + BufCat("\nVersion: "); + headerGetEntry(HeaderP, RPMTAG_VERSION, &type, (void **)&str, &count); + if (headerGetEntry(HeaderP, RPMTAG_EPOCH, &type, (void **)&numv, &count)==1) + snprintf(buf, sizeof(buf), "%i:%s-", numv[0], str); + else + snprintf(buf, sizeof(buf), "%s-", str); + BufCat(buf); + headerGetEntry(HeaderP, RPMTAG_RELEASE, &type, (void **)&str, &count); + BufCat(str); + + headerGetEntry(HeaderP, RPMTAG_REQUIRENAME, &type, (void **)&strv, &count); + assert(type == RPM_STRING_ARRAY_TYPE || count == 0); + + headerGetEntry(HeaderP, RPMTAG_REQUIREVERSION, &type2, (void **)&strv2, &count); + headerGetEntry(HeaderP, RPMTAG_REQUIREFLAGS, &type3, (void **)&numv, &count); + + if (count > 0) + { + int i, j; + + for (j = i = 0; i < count; i++) + { + if ((numv[i] & RPMSENSE_PREREQ)) + { + if (j == 0) + BufCat("\nPre-Depends: "); + else + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + j++; + } + } + + for (j = 0, i = 0; i < count; i++) + { + if (!(numv[i] & RPMSENSE_PREREQ)) + { + if (j == 0) + BufCat("\nDepends: "); + else + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + j++; + } + } + } + + headerGetEntry(HeaderP, RPMTAG_CONFLICTNAME, &type, (void **)&strv, &count); + assert(type == RPM_STRING_ARRAY_TYPE || count == 0); + + headerGetEntry(HeaderP, RPMTAG_CONFLICTVERSION, &type2, (void **)&strv2, &count); + headerGetEntry(HeaderP, RPMTAG_CONFLICTFLAGS, &type3, (void **)&numv, &count); + + if (count > 0) + { + BufCat("\nConflicts: "); + for (int i = 0; i < count; i++) + { + if (i > 0) + BufCat(", "); + BufCatDep(strv[i], strv2[i], numv[i]); + } + } + + headerGetEntry(HeaderP, CRPMTAG_FILESIZE, &type, (void **)&num, &count); + snprintf(buf, sizeof(buf), "%d", num); + BufCatTag("\nSize: ", buf); + + headerGetEntry(HeaderP, CRPMTAG_MD5, &type, (void **)&str, &count); + BufCatTag("\nMD5Sum: ", str); + + headerGetEntry(HeaderP, CRPMTAG_FILENAME, &type, (void **)&str, &count); + BufCatTag("\nFilename: ", str); + + headerGetEntry(HeaderP, RPMTAG_SUMMARY, &type, (void **)&str, &count); + BufCatTag("\nDescription: ", str); + BufCat("\n"); + headerGetEntry(HeaderP, RPMTAG_DESCRIPTION, &type, (void **)&str, &count); + BufCatDescr(str); + BufCat("\n"); + + return string(Buffer, BufUsed); +} + + +// SrcRecordParser::BuildDepends - Return the Build-Depends information /*{{{*/ +// --------------------------------------------------------------------- +bool rpmSrcRecordParser::BuildDepends(vector &BuildDeps, + bool ArchOnly) +{ + int RpmTypeTag[] = {RPMTAG_REQUIRENAME, + RPMTAG_REQUIREVERSION, + RPMTAG_REQUIREFLAGS, + RPMTAG_CONFLICTNAME, + RPMTAG_CONFLICTVERSION, + RPMTAG_CONFLICTFLAGS}; + int BuildType[] = {pkgSrcRecords::Parser::BuildDepend, + pkgSrcRecords::Parser::BuildConflict}; + BuildDepRec rec; + + BuildDeps.clear(); + + for (unsigned char Type = 0; Type != 2; Type++) + { + char **namel = NULL; + char **verl = NULL; + int *flagl = NULL; + int res, type, count; + + res = headerGetEntry(HeaderP, RpmTypeTag[0+Type*3], &type, + (void **)&namel, &count); + if (res != 1) + return true; + res = headerGetEntry(HeaderP, RpmTypeTag[1+Type*3], &type, + (void **)&verl, &count); + res = headerGetEntry(HeaderP, RpmTypeTag[2+Type*3], &type, + (void **)&flagl, &count); + + for (int i = 0; i < count; i++) + { + if (strncmp(namel[i], "rpmlib", 6) == 0) + { +#ifdef HAVE_RPM41 + rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME, + namel[i], verl?verl[i]:NULL, flagl[i]); + int res = rpmCheckRpmlibProvides(ds); + rpmdsFree(ds); +#else + int res = rpmCheckRpmlibProvides(namel[i], verl?verl[i]:NULL, + flagl[i]); +#endif + if (res) continue; + } + + if (verl) + { + if (!*verl[i]) + rec.Op = pkgCache::Dep::NoOp; + else + { + if (flagl[i] & RPMSENSE_LESS) + { + if (flagl[i] & RPMSENSE_EQUAL) + rec.Op = pkgCache::Dep::LessEq; + else + rec.Op = pkgCache::Dep::Less; + } + else if (flagl[i] & RPMSENSE_GREATER) + { + if (flagl[i] & RPMSENSE_EQUAL) + rec.Op = pkgCache::Dep::GreaterEq; + else + rec.Op = pkgCache::Dep::Greater; + } + else if (flagl[i] & RPMSENSE_EQUAL) + rec.Op = pkgCache::Dep::Equals; + } + + rec.Version = verl[i]; + } + else + { + rec.Op = pkgCache::Dep::NoOp; + rec.Version = ""; + } + + rec.Type = BuildType[Type]; + rec.Package = namel[i]; + BuildDeps.push_back(rec); + } + } + return true; +} + /*}}}*/ +#endif /* HAVE_RPM */ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmsrcrecords.h b/apt/apt-pkg/rpm/rpmsrcrecords.h index f467c43..3deaec2 100644 --- a/apt/apt-pkg/rpm/rpmsrcrecords.h +++ b/apt/apt-pkg/rpm/rpmsrcrecords.h @@ -1,11 +1,12 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rpmsrcrecords.h,v 1.1 2000/10/29 20:25:46 kojima Exp $ +// $Id: rpmsrcrecords.h,v 1.5 2002/08/08 20:07:33 niemeyer Exp $ /* ###################################################################### SRPM Records - Parser implementation for RPM style source indexes - ##################################################################### */ + ##################################################################### + */ /*}}}*/ #ifndef PKGLIB_RPMSRCRECORDS_H #define PKGLIB_RPMSRCRECORDS_H @@ -18,27 +19,43 @@ #include #include + +class RPMFileHandler; + class rpmSrcRecordParser : public pkgSrcRecords::Parser { - long iOffset; - Header header; + RPMFileHandler *FileHandler; + Header HeaderP; + const char *StaticBinList[400]; + + char *Buffer; + unsigned int BufSize; + unsigned int BufUsed; + void BufCat(char *text); + void BufCat(char *begin, char *end); + void BufCatTag(char *tag, char *value); + void BufCatDep(char *pkg, char *version, int flags); + void BufCatDescr(char *descr); + public: virtual bool Restart(); virtual bool Step(); virtual bool Jump(unsigned long Off); - virtual string Package(); - virtual string Version(); - virtual string Maintainer(); - virtual string Section(); + virtual string Package() const; + virtual string Version() const; + virtual string Maintainer() const; + virtual string Section() const; virtual const char **Binaries(); virtual unsigned long Offset(); virtual string AsStr(); virtual bool Files(vector &F); - - rpmSrcRecordParser(FileFd *F,pkgSourceList::const_iterator SrcItem); + virtual bool BuildDepends(vector &BuildDeps, bool ArchOnly); + + rpmSrcRecordParser(string File,pkgIndexFile const *Index); + ~rpmSrcRecordParser(); }; #endif diff --git a/apt/apt-pkg/rpm/rpmsystem.cc b/apt/apt-pkg/rpm/rpmsystem.cc new file mode 100644 index 0000000..bb0930e --- /dev/null +++ b/apt/apt-pkg/rpm/rpmsystem.cc @@ -0,0 +1,436 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: rpmsystem.cc,v 1.9 2002/11/25 18:25:28 niemeyer Exp $ +/* ###################################################################### + + System - Abstraction for running on different systems. + + RPM version of the system stuff + + ##################################################################### + */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/rpmsystem.h" +#endif + +#include + +#ifdef HAVE_RPM + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + /*}}}*/ + +rpmSystem rpmSys; + +// System::rpmSystem - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +rpmSystem::rpmSystem() +{ + LockCount = 0; + RpmDB = NULL; + StatusFile = NULL; + Label = "rpm interface"; + VS = &rpmVS; +} + /*}}}*/ +rpmSystem::~rpmSystem() +{ + delete StatusFile; + delete RpmDB; +} + +RPMDBHandler *rpmSystem::GetDBHandler() +{ + if (RpmDB == NULL) + RpmDB = new RPMDBHandler(); + return RpmDB; +} + +bool rpmSystem::LockRead() +{ + GetDBHandler(); + return true; +} + +// +// System::Lock - Get the lock /*{{{*/ +// --------------------------------------------------------------------- +/* this will open the rpm database through rpmlib, which will lock the db */ +bool rpmSystem::Lock() +{ + if (RpmDB != NULL && RpmDB->HasWriteLock() == false) + { + delete RpmDB; + RpmDB = NULL; + } + if (RpmDB == NULL) + RpmDB = new RPMDBHandler(true); + if (_error->PendingError() == true) + return false; + LockCount++; + return true; +} + /*}}}*/ +// System::UnLock - Drop a lock /*{{{*/ +// --------------------------------------------------------------------- +/* Close the rpmdb, effectively dropping it's lock */ +bool rpmSystem::UnLock(bool NoErrors) +{ + if (LockCount == 0 && NoErrors == true) + return false; + if (LockCount < 1) + return _error->Error("Not locked"); + if (--LockCount == 0) + { + delete RpmDB; + RpmDB = NULL; + } + return true; +} + /*}}}*/ +// System::CreatePM - Create the underlying package manager /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgPackageManager *rpmSystem::CreatePM(pkgDepCache *Cache) const +{ + return new pkgRPMPM(Cache); +} + /*}}}*/ +// System::Initialize - Setup the configuration space.. /*{{{*/ +// --------------------------------------------------------------------- +/* These are the rpm specific configuration variables.. */ +bool rpmSystem::Initialize(Configuration &Cnf) +{ + Cnf.CndSet("Dir::Bin::rpm","/bin/rpm"); + Cnf.CndSet("Dir::Etc::rpmpriorities", "rpmpriorities"); + Cnf.CndSet("Dir::Etc::translatelist", "translate.list"); + Cnf.CndSet("Dir::Etc::translateparts", "translate.list.d"); + Cnf.CndSet("Dir::State::prefetch", "prefetch"); + Cnf.CndSet("Dir::Locale","/usr/share/locale"); + Cnf.CndSet("Acquire::DistroID","Conectiva"); // hee hee + Cnf.CndSet("Acquire::CDROM::Mount", "/mnt/cdrom"); + Cnf.CndSet("Acquire::CDROM::Copy-All", "true"); + + // Compatibility with obsoleted options + if (Cnf.Exists("APT::PostInstall")) + { + _error->Warning("Rename obsoleted option APT::PostInstall to APT::Post-Install"); + Cnf.CndSet("APT::Post-Install::Clean", + Cnf.Find("APT::PostInstall::Clean","false")); + Cnf.CndSet("APT::Post-Install::AutoClean", + Cnf.Find("APT::PostInstall::AutoClean","false")); + } + const Configuration::Item *Top; + Top = _config->Tree("RPM::HoldPkgs"); + if (Top != 0) + { + _error->Warning("Rename obsoleted option RPM::HoldPkgs to RPM::Hold"); + for (Top = Top->Child; Top != 0; Top = Top->Next) + Cnf.Set("RPM::Hold::", Top->Value.c_str()); + } + Top = _config->Tree("RPM::AllowedDupPkgs"); + if (Top != 0) + { + _error->Warning("Rename obsoleted option RPM::AllowedDupPkgs to RPM::Allow-Duplicated"); + for (Top = Top->Child; Top != 0; Top = Top->Next) + Cnf.Set("RPM::Allow-Duplicated::", Top->Value.c_str()); + } + Top = _config->Tree("RPM::IgnorePkgs"); + if (Top != 0) + { + _error->Warning("Rename obsoleted option RPM::IgnorePkgs to RPM::Ignore"); + for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) + Cnf.Set("RPM::Ignore::", Top->Value.c_str()); + } + if (Cnf.Exists("RPM::Force")) + { + _error->Warning("RPM::Force is obsoleted. Add \"--force\" to RPM::Options instead."); + if (Cnf.FindB("RPM::Force",false)) + Cnf.Set("RPM::Options::", "--force"); + } + if (Cnf.Exists("RPM::Force")) + { + _error->Warning("RPM::NoDeps is obsoleted. Add \"--nodeps\" to RPM::Options and RPM::Erase-Options instead."); + if (Cnf.FindB("RPM::NoDeps",false)) + { + Cnf.Set("RPM::Options::", "--nodeps"); + Cnf.Set("RPM::Erase-Options::", "--nodeps"); + } + } + + return true; +} + /*}}}*/ +// System::ArchiveSupported - Is a file format supported /*{{{*/ +// --------------------------------------------------------------------- +/* The standard name for a rpm is 'rpm'.. There are no seperate versions + of .rpm to worry about.. */ +bool rpmSystem::ArchiveSupported(const char *Type) +{ + if (strcmp(Type,"rpm") == 0) + return true; + return false; +} + /*}}}*/ +// System::Score - Determine how Re**at'ish this sys is.. /*{{{*/ +// --------------------------------------------------------------------- +/* Check some symptoms that this is a Re**at like system */ +signed rpmSystem::Score(Configuration const &Cnf) +{ + signed Score = 0; + + if (FileExists(RPMDBHandler::DataPath(false))) + Score += 10; + if (FileExists(Cnf.FindFile("Dir::Bin::rpm","/bin/rpm")) == true) + Score += 10; + + return Score; +} + /*}}}*/ +// System::AddStatusFiles - Register the status files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmSystem::AddStatusFiles(vector &List) +{ + if (StatusFile == NULL) + StatusFile = new rpmDatabaseIndex(); + List.push_back(StatusFile); + return true; +} + /*}}}*/ +#ifdef OLD_FILEDEPS +static void gatherFileDependencies(map &filedeps, Header header) +{ + int type, count; + char **namel; + //char **verl; + //int *flagl; + int res; + + res = headerGetEntry(header, RPMTAG_REQUIRENAME, &type, + (void **)&namel, &count); + /* + res = headerGetEntry(header, RPMTAG_REQUIREVERSION, &type, + (void **)&verl, &count); + res = headerGetEntry(header, RPMTAG_REQUIREFLAGS, &type, + (void **)&flagl, &count); + */ + + while (count--) + { + if (*namel[count] == '/') + filedeps[string(namel[count])] = 1; + } +} +#endif + + +#ifdef OLD_BESTARCH +bool rpmSystem::processIndexFile(rpmIndexFile *Index,OpProgress &Progress) +{ + Header hdr; + map archmap; + + RPMHandler *Handler = Index->CreateHandler(); + if (_error->PendingError() == true) + return false; + + Progress.SubProgress(0, Index->Describe()); + + Handler->Rewind(); + + while (Handler->Skip() == true) + { + int type, count, res; + char *arch; + + hdr = Handler->GetHeader(); + if (!hdr) + break; + +#ifdef OLD_FILEDEPS + gatherFileDependencies(FileDeps, hdr); +#endif + + /* + * Make it so that for each version, we keep track of the best + * architecture. + */ + res = headerGetEntry(hdr, RPMTAG_ARCH, &type, + (void **)&arch, &count); + assert(type == RPM_STRING_TYPE); + if (res) + { + char *name; + char *version; + char *release; + int_32 *epoch; + int res; + char buf[256]; + + headerGetEntry(hdr, RPMTAG_NAME, &type, + (void **)&name, &count); + headerGetEntry(hdr, RPMTAG_VERSION, &type, + (void **)&version, &count); + headerGetEntry(hdr, RPMTAG_RELEASE, &type, + (void **)&release, &count); + res = headerGetEntry(hdr, RPMTAG_EPOCH, &type, + (void **)&epoch, &count); + + if (res == 1) + snprintf(buf, sizeof(buf), "%i:%s-%s", *epoch, version, release); + else + snprintf(buf, sizeof(buf), "%s-%s", version, release); + string n = string(name)+"#"+string(buf); + + if (archmap.find(n) != archmap.end()) + { + if (strcmp(archmap[n].c_str(), arch) != 0) + { + int a = rpmMachineScore(RPM_MACHTABLE_INSTARCH, archmap[n].c_str()); + int b = rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch); + + if (b < a) + { + MultiArchPkgs[n] = string(arch); + // this is a multiarch pkg + archmap[n] = MultiArchPkgs[n]; + } + else + { + MultiArchPkgs[n] = archmap[n]; + } + } + } + else + { + archmap[n] = string(arch); + } + } + } + + if (Handler->IsDatabase() == false) + delete Handler; + + return true; +} + + +bool rpmSystem::PreProcess(pkgIndexFile **Start,pkgIndexFile **End, + OpProgress &Progress) +{ + string ListDir = _config->FindDir("Dir::State::lists"); + unsigned total, complete; + unsigned long TotalSize = 0, CurrentSize = 0; + + // calculate size of files + + for (; Start != End; Start++) + { + if ((*Start)->HasPackages() == false) + continue; + + if ((*Start)->Exists() == false) + continue; + + unsigned long Size = (*Start)->Size(); + Progress.OverallProgress(CurrentSize,TotalSize,Size,_("Reading Package Lists")); + CurrentSize += Size; + + if (processIndexFile((rpmIndexFile*)*Start,Progress) == false) + return false; + } + + return true; +} + +string rpmSystem::BestArchForPackage(string Pkg) +{ + if (MultiArchPkgs.find(Pkg) != MultiArchPkgs.end()) + return MultiArchPkgs[Pkg]; + else + return string(); +} +#endif + +#ifdef OLD_FILEDEPS +bool rpmSystem::IsFileDep(string File) +{ + return (FileDeps.find(File) != FileDeps.end()); +} +#endif + +// System::FindIndex - Get an index file for status files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmSystem::FindIndex(pkgCache::PkgFileIterator File, + pkgIndexFile *&Found) const +{ + if (StatusFile == 0) + return false; + if (StatusFile->FindInCache(*File.Cache()) == File) + { + Found = StatusFile; + return true; + } + + return false; +} + /*}}}*/ + +// System::ProcessCache - Do specific changes in the cache /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool rpmSystem::ProcessCache(pkgDepCache &Cache,pkgProblemResolver &Fix) +{ + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + { + // Ignore virtual packages + if (I->VersionList == 0) + continue; + + // Do package holding + if (I->CurrentVer != 0) + { + if (rpmdata->HoldPackage(I.Name())) + { + Cache.MarkKeep(I); + Fix.Protect(I); + } + } + } + return true; +} + /*}}}*/ + +// System::IgnoreDep - Check if this dependency should be ignored /*{{{*/ +// --------------------------------------------------------------------- +/* For strong hearts only */ +bool rpmSystem::IgnoreDep(pkgVersioningSystem &VS,pkgCache::DepIterator &Dep) +{ + RPMPackageData *rpmdata = RPMPackageData::Singleton(); + return rpmdata->IgnoreDep(VS,Dep); +} + /*}}}*/ +#endif /* HAVE_RPM */ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmsystem.h b/apt/apt-pkg/rpm/rpmsystem.h new file mode 100644 index 0000000..18022ad --- /dev/null +++ b/apt/apt-pkg/rpm/rpmsystem.h @@ -0,0 +1,74 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: rpmsystem.h,v 1.2 2002/07/30 20:43:41 niemeyer Exp $ +/* ###################################################################### + + System - RPM version of the System Class + + ##################################################################### + */ + /*}}}*/ +#ifndef PKGLIB_RPMSYSTEM_H +#define PKGLIB_RPMSYSTEM_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/rpmsystem.h" +#endif + +#include +#include +#include + +#include + +class RPMDBHandler; +class pkgSourceList; +class rpmIndexFile; + +class rpmSystem : public pkgSystem +{ + int LockCount; + RPMDBHandler *RpmDB; + rpmDatabaseIndex *StatusFile; + +#ifdef OLD_FILEDEPS + map FileDeps; // file dependencies +#endif +#ifdef OLD_BESTARCH + map MultiArchPkgs; // packages with multi-archs +#endif + + bool processIndexFile(rpmIndexFile *Handler,OpProgress &Progress); + + public: + +#ifdef OLD_FILEDEPS + bool IsFileDep(string File); +#endif +#ifdef OLD_BESTARCH + string BestArchForPackage(string Pkg); + virtual bool PreProcess(pkgIndexFile **Start,pkgIndexFile **End, + OpProgress &Progress); +#endif + RPMDBHandler *GetDBHandler(); + + virtual bool LockRead(); + 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(vector &List); + virtual bool FindIndex(pkgCache::PkgFileIterator File, + pkgIndexFile *&Found) const; + virtual bool ProcessCache(pkgDepCache &Cache,pkgProblemResolver &Fix); + virtual bool IgnoreDep(pkgVersioningSystem &VS,pkgCache::DepIterator &Dep); + + rpmSystem(); + virtual ~rpmSystem(); +}; + +extern rpmSystem rpmSys; + +#endif diff --git a/apt/apt-pkg/rpm/rpmversion.cc b/apt/apt-pkg/rpm/rpmversion.cc index 29179e9..a25f744 100644 --- a/apt/apt-pkg/rpm/rpmversion.cc +++ b/apt/apt-pkg/rpm/rpmversion.cc @@ -1,224 +1,158 @@ -// $Id: rpmversion.cc,v 1.4 2002/01/14 16:53:12 kojima Exp $ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: rpmversion.cc,v 1.4 2002/11/19 13:03:29 niemeyer Exp $ +/* ###################################################################### + RPM Version - Versioning system for RPM + + This implements the standard RPM versioning system. + + ##################################################################### + */ + /*}}}*/ +// Include Files /*{{{*/ #ifdef __GNUG__ #pragma implementation "apt-pkg/rpmversion.h" -#endif +#endif -#include +#include -#include -#include +#ifdef HAVE_RPM + +#include +#include #include #include -// VersionCompare (op) - Greater than comparison for versions +#include + +#ifdef HAVE_RPM41 +#include +#endif + +rpmVersioningSystem rpmVS; + +// rpmVS::rpmVersioningSystem - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -int RPMFactory::versionCompare(const char *A, const char *B) +rpmVersioningSystem::rpmVersioningSystem() { - return versionCompare(A,A + strlen(A),B,B + strlen(B)); + Label = "Standard .rpm"; } - -int RPMFactory::versionCompare(string A,string B) -{ - return versionCompare(A.begin(),A.end(),B.begin(),B.end()); -} - - - + /*}}}*/ +// rpmVS::ParseVersion - Parse a version into it's components /*{{{*/ +// --------------------------------------------------------------------- /* Code ripped from rpmlib */ -static void ParseVersion(const char *V, const char *VEnd, - char **Epoch, - char **Version, - char **Release) +void rpmVersioningSystem::ParseVersion(const char *V, const char *VEnd, + char **Epoch, + char **Version, + char **Release) { string tmp = string(V, VEnd); - const char *evr = tmp.c_str(); - const char *epoch, *epoend; - const char *version, *verend; /* assume only version is present */ - const char *release, *relend; - char *s, *se; + char *evr = strdup(tmp.c_str()); + const char *epoch = NULL; + const char *version = NULL; + const char *release = NULL; + char *s; - s = (char*)evr; - while (*evr && isdigit(*s)) s++; /* s points to epoch terminator */ - se = strrchr(s, '-'); /* se points to version terminator */ - - if (*s == ':') { + assert(evr != NULL); + + s = strrchr(evr, '-'); + if (s) { + *s++ = '\0'; + release = s; + } + s = evr; + while (isdigit(*s)) s++; + if (*s == ':') + { epoch = evr; *s++ = '\0'; version = s; if (*epoch == '\0') epoch = "0"; - } else { - epoch = NULL; /* XXX disable epoch compare if missing */ + } + else version = evr; - } - if (se) { - *se++ = '\0'; - release = se; - } else { - release = NULL; - } #define Xstrdup(a) (a) ? strdup(a) : NULL *Epoch = Xstrdup(epoch); *Version = Xstrdup(version); *Release = Xstrdup(release); #undef Xstrdup + free(evr); } - + /*}}}*/ +// rpmVS::CmpVersion - Comparison for versions /*{{{*/ +// --------------------------------------------------------------------- /* This fragments the version into E:V-R triples and compares each - portion seperately. */ -int RPMFactory::versionCompare(const char *A, const char *AEnd, - const char *B, const char *BEnd) + portion separately. */ +int rpmVersioningSystem::DoCmpVersion(const char *A,const char *AEnd, + const char *B,const char *BEnd) { -#if 0 - char *AE, *AV, *AS; - char *BE, *BV, *BS; - int rc; - -#define FREE(x) if (x) free(x) - - ParseVersion(A, AEnd, &AE, &AV, &AS); - ParseVersion(B, BEnd, &BE, &BV, &BS); - - if (AE && !BE) { - FREE(AE); FREE(AV); FREE(AS); - FREE(BE); FREE(BV); FREE(BS); - return 1; - } else if (!AE && BE) { - FREE(AE); FREE(AV); FREE(AS); - FREE(BE); FREE(BV); FREE(BS); - return -1; - } else if (AE && BE) + char *AE, *AV, *AR; + char *BE, *BV, *BR; + int rc = 0; + ParseVersion(A, AEnd, &AE, &AV, &AR); + ParseVersion(B, BEnd, &BE, &BV, &BR); + if (AE && !BE) + rc = 1; + else if (!AE && BE) + rc = -1; + else if (AE && BE) { - int Aep, Bep; - - Aep = atoi(AE); - Bep = atoi(BE); - - FREE(AE); FREE(AV); FREE(AS); - FREE(BE); FREE(BV); FREE(BS); - - if (Aep < Bep) - return -1; - else - return 1; + int AEi, BEi; + AEi = atoi(AE); + BEi = atoi(BE); + if (AEi < BEi) + rc = -1; + else if (AEi > BEi) + rc = 1; } - - rc = rpmvercmp(AV, BV); - - if (rc) { - FREE(AE); FREE(AV); FREE(AS); - FREE(BE); FREE(BV); FREE(BS); - - return rc; + if (rc == 0) + { + rc = rpmvercmp(AV, BV); + if (rc == 0) + rc = rpmvercmp(AR, BR); } - - rc = rpmvercmp(AS, BS); - FREE(AE); FREE(AV); FREE(AS); - FREE(BE); FREE(BV); FREE(BS); - - return rc; -#else - char *bufA; - char *bufB; - char *p; - bool okA, okB; - char *verA, *verB; - char *relA, *relB; - int res; - - bufA = (char*)alloca(AEnd-A+4); - bufB = (char*)alloca(BEnd-B+4); - - bufA = strncpy(bufA, A, AEnd-A); - bufA[AEnd-A] = 0; - - bufB = strncpy(bufB, B, BEnd-B); - bufB[BEnd-B] = 0; - - // compare epoch - p = strchr(bufA, ':'); - okA = (p != NULL); - - p = strchr(bufB, ':'); - okB = (p != NULL); - - if (okA && !okB) - return 2; - else if (!okA && okB) - return -2; - else if (okA && okB) { - int epoA, epoB; - - p = strchr(bufA, ':'); - *p = 0; - epoA = atoi(bufA); - verA = p+1; - - p = strchr(bufB, ':'); - *p = 0; - verB = p+1; - - epoB = atoi(bufB); - if (epoA < epoB) - return -1; - else if (epoA > epoB) - return 1; - } else { - verA = bufA; - verB = bufB; - } - - // compare version - p = strchr(verA, '-'); - if (p) { - *p = 0; - relA = p+1; - } else { - relA = NULL; - } - - p = strchr(verB, '-'); - if (p) { - *p = 0; - relB = p+1; - } else { - relB = NULL; - } - - res = rpmvercmp(verA, verB); - if (res) - return res; - - // compare release - if (!relA) - return 0; - - if (!relB) - return 0; - - res = rpmvercmp(relA, relB); - - return res; -#endif + free(AE);free(AV);free(AR);; + return rc; } - - -// CheckDep - Check a single dependency /*{{{*/ + /*}}}*/ +// rpmVS::DoCmpVersionArch - Compare versions, using architecture /*{{{*/ +// --------------------------------------------------------------------- +/* */ +int rpmVersioningSystem::DoCmpVersionArch(const char *A,const char *Aend, + const char *AA,const char *AAend, + const char *B,const char *Bend, + const char *BA,const char *BAend) +{ + int rc = DoCmpVersion(A, Aend, B, Bend); + if (rc == 0) + { + int aa = rpmMachineScore(RPM_MACHTABLE_INSTARCH, AA); + int ba = rpmMachineScore(RPM_MACHTABLE_INSTARCH, BA); + if (aa < ba) + rc = 1; + else if (aa > ba) + rc = -1; + } + return rc; +} + /*}}}*/ +// rpmVS::CheckDep - Check a single dependency /*{{{*/ // --------------------------------------------------------------------- /* This simply preforms the version comparison and switch based on - operator. */ -bool RPMFactory::checkDep(const char *DepVer,const char *PkgVer,int Op) + operator. If DepVer is 0 then we are comparing against a provides + with no version. */ +bool rpmVersioningSystem::CheckDep(const char *PkgVer, + int Op,const char *DepVer) { - int rc; - int PkgFlags; - int DepFlags; + int PkgFlags = RPMSENSE_EQUAL; + int DepFlags = 0; bool invert = false; + int rc; - DepFlags = 0; - PkgFlags = RPMSENSE_EQUAL; switch (Op & 0x0F) { case pkgCache::Dep::LessEq: @@ -247,24 +181,41 @@ bool RPMFactory::checkDep(const char *DepVer,const char *PkgVer,int Op) break; default: - DepFlags = RPMSENSE_ANY; // any version is ok + DepFlags = RPMSENSE_ANY; break; } - - rc = rpmRangesOverlap("", PkgVer, PkgFlags, // provide - "", DepVer, DepFlags); // request - - if (invert) - return !(rc == 1); - else - return (rc == 1); -} +#ifdef HAVE_RPM41 + rpmds pds = rpmdsSingle(RPMTAG_PROVIDENAME, "", PkgVer, PkgFlags); + rpmds dds = rpmdsSingle(RPMTAG_REQUIRENAME, "", DepVer, DepFlags); + rc = rpmdsCompare(pds, dds); + rpmdsFree(pds); + rpmdsFree(dds); +#else + rc = rpmRangesOverlap("", PkgVer, PkgFlags, "", DepVer, DepFlags); +#endif + + return (!invert && rc) || (invert && !rc); +} /*}}}*/ -// BaseVersion - Return the upstream version string /*{{{*/ +// rpmVS::CheckDep - Check a single dependency /*{{{*/ // --------------------------------------------------------------------- -/* This strips all the debian specific information from the version number */ -string RPMFactory::baseVersion(const char *Ver) +/* This prototype is a wrapper over CheckDep above. It's useful in the + cases where the kind of dependency matters to decide if it matches + or not */ +bool rpmVersioningSystem::CheckDep(const char *PkgVer, + pkgCache::DepIterator Dep) +{ + if (Dep->Type == pkgCache::Dep::Obsoletes && + (PkgVer == 0 || PkgVer[0] == 0)) + return false; + return CheckDep(PkgVer,Dep->CompareOp,Dep.TargetVer()); +} + /*}}}*/ +// rpmVS::UpstreamVersion - Return the upstream version string /*{{{*/ +// --------------------------------------------------------------------- +/* This strips all the vendor specific information from the version number */ +string rpmVersioningSystem::UpstreamVersion(const char *Ver) { // Strip off the bit before the first colon const char *I = Ver; @@ -278,7 +229,11 @@ string RPMFactory::baseVersion(const char *Ver) for (; *I != 0; I++) if (*I == '-') Last = I - Ver; - + return string(Ver,Last); } /*}}}*/ + +#endif /* HAVE_RPM */ + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/rpm/rpmversion.h b/apt/apt-pkg/rpm/rpmversion.h new file mode 100644 index 0000000..dcbf930 --- /dev/null +++ b/apt/apt-pkg/rpm/rpmversion.h @@ -0,0 +1,50 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: rpmversion.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + RPM Version - Versioning system for RPM + + This implements the RPM versioning system. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_RPMVERSION_H +#define PKGLIB_RPMVERSION_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/rpmversion.h" +#endif + +#include +#include + +class rpmVersioningSystem : public pkgVersioningSystem +{ + void ParseVersion(const char *V, const char *VEnd, + char **Epoch, char **Version, char **Release); + + public: + + // Compare versions.. + virtual int DoCmpVersion(const char *A,const char *Aend, + const char *B,const char *Bend); + virtual int DoCmpVersionArch(const char *A,const char *Aend, + const char *AA,const char *AAend, + const char *B,const char *Bend, + const char *BA,const char *BAend); + virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer); + virtual bool CheckDep(const char *PkgVer,pkgCache::DepIterator Dep); + virtual int DoCmpReleaseVer(const char *A,const char *Aend, + const char *B,const char *Bend) + { + return DoCmpVersion(A,Aend,B,Bend); + } + virtual string UpstreamVersion(const char *A); + + rpmVersioningSystem(); +}; + +extern rpmVersioningSystem rpmVS; + +#endif diff --git a/apt/apt-pkg/sourcelist.cc b/apt/apt-pkg/sourcelist.cc index 270356a..247cbd1 100644 --- a/apt/apt-pkg/sourcelist.cc +++ b/apt/apt-pkg/sourcelist.cc @@ -1,9 +1,9 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sourcelist.cc,v 1.25 2001/11/12 16:34:00 kojima Exp $ +// $Id: sourcelist.cc,v 1.3 2002/08/15 20:51:37 niemeyer Exp $ /* ###################################################################### - List of Sources and Vendors + List of Sources ##################################################################### */ /*}}}*/ @@ -17,15 +17,103 @@ #include #include #include -#include -#include +#include -#include -#include -#include -#include -#include +#include + /*}}}*/ + +using namespace std; + +// Global list of Items supported +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() +{ + ItmList[GlobalListLen] = this; + GlobalListLen++; +} + /*}}}*/ +// 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++) + if (strcmp(GlobalList[I]->Name,Type) == 0) + return GlobalList[I]; + return 0; +} + /*}}}*/ +// Type::FixupURI - Normalize the URI and check it.. /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgSourceList::Type::FixupURI(string &URI) const +{ + if (URI.empty() == true) + return false; + + if (URI.find(':') == string::npos) + return false; + + URI = SubstVar(URI,"$(ARCH)",_config->Find("APT::Architecture")); + + // Make sure that the URI is / postfixed + if (URI[URI.size() - 1] != '/') + URI += '/'; + + 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 &List, + Vendor const *Vendor, + const char *Buffer, + unsigned long CurLine, + string File) const +{ + string URI; + string Dist; + string Section; + + if (ParseQuoteWord(Buffer,URI) == false) + return _error->Error(_("Malformed line %lu in source list %s (URI)"),CurLine,File.c_str()); + if (ParseQuoteWord(Buffer,Dist) == false) + return _error->Error(_("Malformed line %lu in source list %s (dist)"),CurLine,File.c_str()); + + if (FixupURI(URI) == false) + return _error->Error(_("Malformed line %lu in source list %s (URI parse)"),CurLine,File.c_str()); + + // 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()); + Dist = SubstVar(Dist,"$(ARCH)",_config->Find("APT::Architecture")); + return CreateItem(List,URI,Dist,Section,Vendor); + } + + // 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()); + + do + { + if (CreateItem(List,URI,Dist,Section,Vendor) == false) + return false; + } + while (ParseQuoteWord(Buffer,Section) == true); + + return true; +} /*}}}*/ // SourceList::pkgSourceList - Constructors /*{{{*/ @@ -34,67 +122,134 @@ pkgSourceList::pkgSourceList() { } -/* + pkgSourceList::pkgSourceList(string File) { - ReadVendors(_config->FindFile("Dir::Etc::vendorlist")); - Read(File); } -*/ /*}}}*/ -// SourceList::ReadMainList - Read the main source list from etc /*{{{*/ + /*}}}*/ +// SourceList::~pkgSourceList - Destructor /*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgSourceList::ReadMainList() +pkgSourceList::~pkgSourceList() { - ReadVendors(_config->FindFile("Dir::Etc::vendorlist")); - - return Read(_config->FindFile("Dir::Etc::sourcelist")); + for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + delete *I; + for (vector::const_iterator I = VendorList.begin(); + I != VendorList.end(); I++) + delete *I; } /*}}}*/ - -bool pkgSourceList::ReadVendors(string File) +// SourceList::ReadVendors - 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 pkgSourceList::ReadVendors() { Configuration Cnf; - - ReadConfigFile(Cnf, File, true); + + string CnfFile = _config->FindDir("Dir::Etc::vendorparts"); + if (FileExists(CnfFile) == true) + if (ReadConfigDir(Cnf,CnfFile,true) == false) + return false; + CnfFile = _config->FindFile("Dir::Etc::vendorlist"); + if (FileExists(CnfFile) == true) + if (ReadConfigFile(Cnf,CnfFile,true) == false) + return false; + + for (vector::const_iterator I = VendorList.begin(); + I != VendorList.end(); I++) + delete *I; + VendorList.erase(VendorList.begin(),VendorList.end()); // Process 'simple-key' type sections const Configuration::Item *Top = Cnf.Tree("simple-key"); for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) { Configuration Block(Top); - VendorItem *vendor; + Vendor *Vendor; + + Vendor = new pkgSourceList::Vendor; + + Vendor->VendorID = Top->Tag; + Vendor->FingerPrint = Block.Find("Fingerprint"); + Vendor->Description = Block.Find("Name"); - vendor = new VendorItem; - - vendor->VendorID = Top->Tag; - vendor->Fingerprint = Block.Find("Fingerprint"); - vendor->Name = Block.Find("Name"); // Description? - - if (vendor->Fingerprint.empty() == true || vendor->Name.empty() == true) - _error->Error(_("Block %s is invalid"), vendor->VendorID.c_str()); - - Vendors.push_back(vendor); + // CNC:2002-08-15 + char *buffer = new char[Vendor->FingerPrint.length()+1]; + char *p = buffer;; + for (string::const_iterator I = Vendor->FingerPrint.begin(); + I != Vendor->FingerPrint.end(); I++) + { + if (*I != ' ' && *I != '\t') + *p++ = *I; + } + *p = 0; + Vendor->FingerPrint = buffer; + delete [] buffer; + + if (Vendor->FingerPrint.empty() == true || + Vendor->Description.empty() == true) + { + _error->Error(_("Vendor block %s is invalid"), Vendor->VendorID.c_str()); + delete Vendor; + continue; + } + + VendorList.push_back(Vendor); } - if (_error->PendingError()) - return false; + /* XXX Process 'group-key' type sections + This is currently faked out so that the vendors file format is + parsed but nothing is done with it except check for validity */ + Top = Cnf.Tree("group-key"); + for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) + { + Configuration Block(Top); + Vendor *Vendor; + + Vendor = new pkgSourceList::Vendor; + + Vendor->VendorID = Top->Tag; + Vendor->Description = Block.Find("Name"); - return true; + if (Vendor->Description.empty() == true) + { + _error->Error(_("Vendor block %s is invalid"), + Vendor->VendorID.c_str()); + delete Vendor; + continue; + } + + VendorList.push_back(Vendor); + } + + return !_error->PendingError(); } - + /*}}}*/ +// SourceList::ReadMainList - Read the main source list from etc /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgSourceList::ReadMainList() +{ + return ReadVendors() && Read(_config->FindFile("Dir::Etc::sourcelist")); +} + /*}}}*/ // SourceList::Read - Parse the sourcelist file /*{{{*/ // --------------------------------------------------------------------- /* */ bool pkgSourceList::Read(string File) -{ +{ // Open the stream for reading - ifstream F(File.c_str(),ios::in | ios::nocreate); + ifstream F(File.c_str(),ios::in /*| ios::nocreate*/); if (!F != 0) - return _error->Errno("ifstream::ifstream","Opening %s",File.c_str()); + return _error->Errno("ifstream::ifstream",_("Opening %s"),File.c_str()); - List.erase(List.begin(),List.end()); + for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + delete *I; + SrcList.erase(SrcList.begin(),SrcList.end()); char Buffer[300]; int CurLine = 0; @@ -103,621 +258,102 @@ bool pkgSourceList::Read(string File) F.getline(Buffer,sizeof(Buffer)); CurLine++; _strtabexpand(Buffer,sizeof(Buffer)); - _strstrip(Buffer); + if (F.fail() && !F.eof()) + return _error->Error(_("Line %u too long in source list %s."), + CurLine,File.c_str()); + + + char *I; + for (I = Buffer; *I != 0 && *I != '#'; I++); + *I = 0; + + const char *C = _strstrip(Buffer); // Comment or blank - if (Buffer[0] == '#' || Buffer[0] == 0) + if (C[0] == '#' || C[0] == 0) continue; - + // Grok it - string Type; - string URI; - string VendorID; - - RepositoryItem *Rep = new RepositoryItem; - - const char *C = Buffer; - if (ParseQuoteWord(C,Type) == false) + string LineType; + if (ParseQuoteWord(C,LineType) == false) return _error->Error(_("Malformed line %u in source list %s (type)"),CurLine,File.c_str()); - if (ParseQuoteWord(C,URI) == false) - return _error->Error(_("Malformed line %u in source list %s (URI)"),CurLine,File.c_str()); - if (URI[0] == '[') { - const char *begin = URI.c_str()+1; - const char *end = strchr(begin, ']'); - - if (!end) - return _error->Error(_("Malformed line %u in source list %s (vendor ID)"),CurLine,File.c_str()); - - VendorID = string(begin, end); - - if (ParseQuoteWord(C,URI) == false) - return _error->Error(_("Malformed line %u in source list %s (URI)"),CurLine,File.c_str()); - } else { - VendorID = ""; - Rep->Vendor = NULL; - } - if (ParseQuoteWord(C,Rep->Dist) == false) - return _error->Error(_("Malformed line %u in source list %s (dist)"),CurLine,File.c_str()); - - if (!VendorID.empty()) { - if (Rep->SetVendor(Vendors, VendorID) == false) - return _error->Error(_("Malformed line %u in source list %s (bad vendor ID)"),CurLine,File.c_str()); - } - if (Rep->SetType(Type) == false) - return _error->Error(_("Malformed line %u in source list %s (bad type)"),CurLine,File.c_str()); - - if (Rep->SetURI(URI) == false) - return _error->Error(_("Malformed line %u in source list %s (bad URI)"),CurLine,File.c_str()); - - // Check for an absolute dists specification. - if (Rep->Dist.empty() == false && Rep->Dist[Rep->Dist.size() - 1] == '/') - { - Item Itm; - Itm.Dist = Rep->Dist; - Itm.Repository = Rep; - - if (ParseQuoteWord(C,Itm.Section) == true) - return _error->Error(_("Malformed line %u in source list %s (Absolute dist)"),CurLine,File.c_str()); - Rep->Dist = SubstVar(Rep->Dist,"$(ARCH)",_config->Find("APT::Architecture")); - - List.push_back(Itm); - - Repositories.push_back(Rep); - continue; - } - - string Section; - - // Grab the rest of the dists - if (ParseQuoteWord(C,Section) == false) - return _error->Error(_("Malformed line %u in source list %s (dist parse)"),CurLine,File.c_str()); - - do - { - Item Itm; - - Itm.Section = Section; - Itm.Dist = SubstVar(Rep->Dist,"$(ARCH)",_config->Find("APT::Architecture")); - Itm.Repository = Rep; - List.push_back(Itm); - } - while (ParseQuoteWord(C, Section) == true); + Type *Parse = Type::GetType(LineType.c_str()); + if (Parse == 0) + return _error->Error(_("Type '%s' is not known in on line %u in source list %s"),LineType.c_str(),CurLine,File.c_str()); - Repositories.push_back(Rep); + // Authenticated repository + Vendor const *Vndr = 0; + if (C[0] == '[') + { + string VendorID; + + if (ParseQuoteWord(C,VendorID) == false) + return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str()); + + if (VendorID.length() < 2 || VendorID.end()[-1] != ']') + return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str()); + VendorID = string(VendorID,1,VendorID.size()-2); + + for (vector::const_iterator iter = VendorList.begin(); + iter != VendorList.end(); iter++) + { + if ((*iter)->VendorID == VendorID) + { + Vndr = *iter; + break; + } + } + + if (Vndr == 0) + return _error->Error(_("Unknown vendor ID '%s' in line %u of source list %s"), + VendorID.c_str(),CurLine,File.c_str()); + } - + if (Parse->ParseLine(SrcList,Vndr,C,CurLine,File) == false) + return false; } return true; } /*}}}*/ -// SourceList::Item << - Writes the item to a stream /*{{{*/ -// --------------------------------------------------------------------- -/* This is not suitable for rebuilding the sourcelist file but it good for - debugging. */ -ostream &operator <<(ostream &O,pkgSourceList::Item &Itm) -{ - O << (int)Itm.Type() << ' ' << Itm.URI() << ' ' << Itm.Dist << ' ' << Itm.Section; - return O; -} - /*}}}*/ -// SourceList::Repository::SetType - Sets the distribution type /*{{{*/ +// SourceList::FindIndex - Get the index associated with a file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgSourceList::RepositoryItem::SetType(string S) +bool pkgSourceList::FindIndex(pkgCache::PkgFileIterator File, + pkgIndexFile *&Found) const { - if (S == "deb") + for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) { - Type = Deb; - return true; - } - - if (S == "deb-src") - { - Type = DebSrc; - return true; + if ((*I)->FindInCache(*File.Cache()) == File) + { + Found = *I; + return true; + } } - //akk - if (S == "rpm") - { - Type = Rpm; - return true; - } - - if (S == "rpm-src") - { - Type = RpmSrc; - return true; - } - return false; } /*}}}*/ - -bool pkgSourceList::RepositoryItem::SetVendor(vector vendors, - string S) -{ - vector::const_iterator iter; - - if (S.empty()) - { - Vendor = NULL; - return false; - } - - for (iter = vendors.begin(); - iter != vendors.end(); - iter++) - { - Vendor = *iter; - - if (Vendor->VendorID == S) - { - return true; - } - } - - Vendor = NULL; - - return false; -} - - -// SourceList::RepositoryItem::SetURI - Set the URI /*{{{*/ +// SourceList::GetIndexes - Load the index files into the downloader /*{{{*/ // --------------------------------------------------------------------- -/* For simplicity we strip the scheme off the uri */ -bool pkgSourceList::RepositoryItem::SetURI(string S) +/* */ +bool pkgSourceList::GetIndexes(pkgAcquire *Owner) const { - if (S.empty() == true) - return false; - - if (S.find(':') == string::npos) - return false; - - S = SubstVar(S,"$(ARCH)",_config->Find("APT::Architecture")); - - // Make sure that the URN is / postfixed - URI = S; - if (URI[URI.size() - 1] != '/') - URI += '/'; - + for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + if ((*I)->GetIndexes(Owner) == false) + return false; return true; } /*}}}*/ -// SourceList::Item::SiteOnly - Strip off the path part of a URI /*{{{*/ +// CNC:2002-07-04 +// SourceList::GetReleases - Load release files into the downloader /*{{{*/ // --------------------------------------------------------------------- /* */ -string pkgSourceList::RepositoryItem::SiteOnly(string URI) +bool pkgSourceList::GetReleases(pkgAcquire *Owner) const { - ::URI U(URI); - U.User = string(); - U.Password = string(); - U.Path = string(); - U.Port = 0; - return U; -} - /*}}}*/ - - -string pkgSourceList::RepositoryItem::HashesURI() -{ - string Res; - switch (Type) - { - case Deb: - break; - - case DebSrc: - break; - - case Rpm: - Res = URI + Dist + "/base/hashfile"; - break; - - case RpmSrc: - Res = URI + Dist + "/base/hashfile"; - break; - }; - return Res; -} - - -string pkgSourceList::RepositoryItem::HashesInfo() -{ - string Res; - switch (Type) - { - case Deb: - break; - - case DebSrc: - break; - - case Rpm: - case RpmSrc: - Res = SiteOnly(URI) + ' '; - Res += Dist + "/"; - Res += "base/hashfile"; - break; - }; - return Res; -} - - -bool pkgSourceList::RepositoryItem::UpdateHashes(string File) -{ - // Open the stream for reading - FileFd F(File, FileFd::ReadOnly); - if (_error->PendingError()) - return _error->Error(_("could not open hash index"),File.c_str()); - - pkgTagFile Tags(F); - pkgTagSection Section; - - if (!Tags.Step(Section)) - return false; - - string Files = Section.FindS("MD5SUM"); - if (Files.empty()) { - return _error->Error(_("No MD5SUM data in hashfile")); - } - // Iterate over the entire list grabbing each triplet - const char *C = Files.c_str(); - while (*C != 0) - { - string Size; - string Hash; - string Path; - - // Parse each of the elements - if (ParseQuoteWord(C,Hash) == false || - ParseQuoteWord(C,Size) == false || - ParseQuoteWord(C,Path) == false) - return _error->Error(_("Error parsing MD5 hash record")); - - // Parse the size and append the directory - HashIndex[Path].size = atoi(Size.c_str()); - HashIndex[Path].md5_hash = Hash; - } - + for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + if ((*I)->GetReleases(Owner) == false) + return false; return true; } - - - -bool pkgSourceList::RepositoryItem::MD5HashForFile(string file, - string &hash, - unsigned int &size) -{ - - if (Vendor == NULL) { - // means authentication is disabled - size = 0; - hash = ""; - return true; - } - if (HashIndex.count(file) == 0) { - return _error->Error(_("Repository entry in sources.list contains extra components that are not listed in the signed hash file: %s"), - file.c_str()); - } - if (HashIndex[file].md5_hash.empty()) - return false; - hash = HashIndex[file].md5_hash; - size = HashIndex[file].size; - return true; -} - - -// SourceList::Item::PackagesURI - Returns a URI to the packages file /*{{{*/ -// --------------------------------------------------------------------- -/* */ -string pkgSourceList::Item::PackagesURI(bool PathOnly) const -{ - string Res; - string Prefix; - - if (PathOnly) - Prefix = ""; - else - Prefix = URI(); - - switch (Type()) - { - case Deb: - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res = Prefix + Dist; - else - Res = Prefix; - } - else - Res = Prefix + "dists/" + Dist + '/' + Section + - "/binary-" + _config->Find("APT::Architecture") + '/'; - - Res += "Packages"; - break; - - case DebSrc: - if (Dist[Dist.size() - 1] == '/') - Res = Prefix + Dist; - else - Res = Prefix + "dists/" + Dist + '/' + Section + - "/source/"; - - Res += "Sources"; - break; - - case Rpm: - if (Dist[Dist.size()-1] == '/') - Res = Prefix + (Dist != "/" ? Dist : "") + "pkglist"; - else - Res = Prefix + Dist + "/base/pkglist."+Section; - break; - - case RpmSrc: - if (Dist[Dist.size()-1] == '/') - Res = Prefix + (Dist != "/" ? Dist : "") + "srclist"; - else - Res = Prefix + Dist + "/base/srclist."+Section; - break; - - default: - cout << "SHIT!!!"<SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res += Dist; - } - else - Res += Dist + '/' + Section; - - Res += " Packages"; - break; - - case DebSrc: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - Res += Dist; - else - Res += Dist + '/' + Section; - - Res += " Sources"; - break; - - case Rpm: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - Res += (Dist != "/" ? Dist : "") + "pkglist"; - else - Res += Dist + "/base/pkglist." + Section; - break; - - case RpmSrc: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - Res += (Dist != "/" ? Dist : "") + "srclist"; - else - Res += Dist + "/base/srclist." + Section; - break; - }; - return Res; -} -/*}}}*/ - -// SourceList::Item::ReleaseURI - Returns a URI to the release file /*{{{*/ -// --------------------------------------------------------------------- -/* */ -string pkgSourceList::Item::ReleaseURI(bool PathOnly) const -{ - string Res; - string Prefix; - - if (PathOnly) - Prefix = ""; - else - Prefix = URI(); - - switch (Type()) - { - case Deb: - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res = Prefix + Dist; - else - Res = Prefix; - } - else - Res = Prefix + "dists/" + Dist + '/' + Section + - "/binary-" + _config->Find("APT::Architecture") + '/'; - - Res += "Release"; - break; - - case DebSrc: - if (Dist[Dist.size() - 1] == '/') - Res = Prefix + Dist; - else - Res = Prefix + "dists/" + Dist + '/' + Section + - "/source/"; - - Res += "Release"; - break; - - case Rpm: - case RpmSrc: - if (Dist[Dist.size() - 1] == '/') - Res = Prefix + (Dist != "/" ? Dist : "") + "release"; - else - Res = Prefix + Dist + "/base/release."+Section; - break; - }; - return Res; -} - /*}}}*/ -// SourceList::Item::ReleaseInfo - Shorter version of the URI /*{{{*/ -// --------------------------------------------------------------------- -/* This is a shorter version that is designed to be < 60 chars or so */ -string pkgSourceList::Item::ReleaseInfo() const -{ - string Res; - - switch (Type()) - { - case Deb: - case DebSrc: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res += Dist; - } - else - Res += Dist + '/' + Section; - - Res += " Release"; - break; - - case Rpm: - case RpmSrc: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res += Dist; - Res += " release"; - } else { - Res += Dist; - - Res += " release."+Section; - } - break; - }; - return Res; -} - /*}}}*/ - -// SourceList::Item::ArchiveInfo - Shorter version of the archive spec /*{{{*/ -// --------------------------------------------------------------------- -/* This is a shorter version that is designed to be < 60 chars or so */ -string pkgSourceList::Item::ArchiveInfo(pkgCache::VerIterator Ver) const -{ - string Res; - - switch (Type()) - { - case DebSrc: - case Deb: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res += Dist; - } - else - Res += Dist + '/' + Section; - - Res += " "; - Res += Ver.ParentPkg().Name(); - Res += " "; - Res += Ver.VerStr(); - - break; - - case Rpm: - case RpmSrc: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res += Dist; - } - else - Res += Dist + '/' + Section; - - Res += " "; - Res += Ver.ParentPkg().Name(); - Res += " "; - Res += Ver.VerStr(); - break; - }; - return Res; -} - /*}}}*/ -// SourceList::Item::ArchiveURI - Returns a URI to the given archive /*{{{*/ -// --------------------------------------------------------------------- -/* */ -string pkgSourceList::Item::ArchiveURI(string File) const -{ - string Res; - switch (Type()) - { - case Deb: - case DebSrc: - Res = URI() + File; - break; - case Rpm: - if (Dist[Dist.size()-1] == '/') - Res = URI()+(Dist != "/" ? Dist : "")+File; - else - Res = URI() + Dist + "/RPMS." + Section + "/" + File; - break; - case RpmSrc: - if (Dist[Dist.size()-1] == '/') - Res = URI()+(Dist != "/" ? Dist : "")+File; - else - Res = URI() + Dist + "/../" + File; - break; - }; - return Res; -} - /*}}}*/ -// SourceList::Item::SourceInfo - Returns an info line for a source /*{{{*/ -// --------------------------------------------------------------------- -/* */ -string pkgSourceList::Item::SourceInfo(string Pkg,string Ver,string Comp) const -{ - string Res; - - switch (Type()) - { - case DebSrc: - case Deb: - case RpmSrc: - case Rpm: - Res += Repository->SiteOnly(URI()) + ' '; - if (Dist[Dist.size() - 1] == '/') - { - if (Dist != "/") - Res += Dist; - } - else - Res += Dist + '/' + Section; - - Res += " "; - Res += Pkg; - Res += " "; - Res += Ver; - if (Comp.empty() == false) - Res += " (" + Comp + ")"; - break; - }; - return Res; -} diff --git a/apt/apt-pkg/sourcelist.h b/apt/apt-pkg/sourcelist.h index 80dc270..f1062d6 100644 --- a/apt/apt-pkg/sourcelist.h +++ b/apt/apt-pkg/sourcelist.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sourcelist.h,v 1.9 2001/11/12 16:34:00 kojima Exp $ +// $Id: sourcelist.h,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### SourceList - Manage a list of sources @@ -13,19 +13,28 @@ of the archive. The exact format of the file is documented in files.sgml. - ##################################################################### - */ + The types are mapped through a list of type definitions which handle + the actual construction of the back end type. After loading a source + 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 preform. + + ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_SOURCELIST_H #define PKGLIB_SOURCELIST_H #include #include -#include -#include #include +#include +using std::string; +using std::vector; + #ifdef __GNUG__ #pragma interface "apt-pkg/sourcelist.h" #endif @@ -34,107 +43,74 @@ class pkgAquire; class pkgSourceList { public: - - struct Item; - - struct VendorItem + + // An available vendor + struct Vendor { string VendorID; - string Fingerprint; - string Name; + string FingerPrint; + string Description; + + /* Lets revisit these.. + bool MatchFingerPrint(string FingerPrint); + string FingerPrintDescr();*/ }; - enum RepositoryType {Deb, DebSrc, Rpm, RpmSrc}; - - struct FileData + // List of supported source list types + class Type { - string md5_hash; - unsigned int size; + public: + + // Global list of Items supported + static Type **GlobalList; + static unsigned long GlobalListLen; + static Type *GetType(const char *Type); + + const char *Name; + const char *Label; + + bool FixupURI(string &URI) const; + virtual bool ParseLine(vector &List, + Vendor const *Vendor, + const char *Buffer, + unsigned long CurLine,string File) const; + virtual bool CreateItem(vector &List,string URI, + string Dist,string Section, + Vendor const *Vendor) const = 0; + + Type(); + virtual ~Type() {}; }; - - struct RepositoryItem - { - RepositoryType Type; - map HashIndex; // filename -> filedata - - VendorItem *Vendor; - - string URI; - string Dist; - - bool SetType(string S); - bool SetURI(string S); - bool SetVendor(vector vendors, string S); - - bool AuthSucceeded() { HashIndex.size() > 0; }; - - bool MD5HashForFile(string file, string &hash, unsigned int &size); - - string SiteOnly(string URI); - - string HashesURI(); - string HashesInfo(); - - bool UpdateHashes(string File); - - bool ParseHashData(string str, string &hash, unsigned long &size, - string &file); - }; - typedef vector::iterator rep_iterator; - - /* Each item in the source list, each line can have more than one - item */ - struct Item - { - RepositoryItem *Repository; - string Section; - - inline RepositoryType Type() const { return Repository->Type; }; - inline string URI() const { return Repository->URI; }; - string Dist; - - string PackagesURI(bool PathOnly = false) const; - string PackagesInfo() const; - - string ReleaseURI(bool PathOnly = false) const; - string ReleaseInfo() const; - - string SourceInfo(string Pkg,string Ver,string Comp) const; - - string ArchiveInfo(pkgCache::VerIterator Ver) const; - string ArchiveURI(string File) const; - }; - typedef vector::const_iterator const_iterator; - + typedef vector::const_iterator const_iterator; - protected: + protected: - vector Repositories; - vector Vendors; - vector List; + vector SrcList; + vector VendorList; - public: + public: bool ReadMainList(); bool Read(string File); + bool ReadVendors(); - bool ReadVendors(string File); - - // Repository accessors - inline rep_iterator rep_begin() {return Repositories.begin();}; - inline rep_iterator rep_end() {return Repositories.end();}; - // List accessors - inline const_iterator begin() const {return List.begin();}; - inline const_iterator end() const {return List.end();}; - inline unsigned int size() const {return List.size();}; - inline bool empty() const {return List.empty();}; + inline const_iterator begin() const {return SrcList.begin();}; + inline const_iterator end() const {return SrcList.end();}; + inline unsigned int size() const {return SrcList.size();}; + inline bool empty() const {return SrcList.empty();}; + + bool FindIndex(pkgCache::PkgFileIterator File, + pkgIndexFile *&Found) const; + bool GetIndexes(pkgAcquire *Owner) const; + + // CNC:2002-07-04 + bool GetReleases(pkgAcquire *Owner) const; pkgSourceList(); -// pkgSourceList(string File); + pkgSourceList(string File); + ~pkgSourceList(); }; -ostream &operator <<(ostream &O,pkgSourceList::Item &Itm); - #endif diff --git a/apt/apt-pkg/srcrecords.cc b/apt/apt-pkg/srcrecords.cc index 77d8ac8..1c08134 100644 --- a/apt/apt-pkg/srcrecords.cc +++ b/apt/apt-pkg/srcrecords.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: srcrecords.cc,v 1.4 2001/01/11 02:03:27 kojima Exp $ +// $Id: srcrecords.cc,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### Source Package Records - Allows access to source package records @@ -8,8 +8,7 @@ Parses and allows access to the list of source records and searching by source name on that list. - ##################################################################### - */ + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ @@ -18,61 +17,40 @@ #include #include -#include +#include #include -#include + +#include /*}}}*/ -#include - -#include - - // SrcRecords::pkgSrcRecords - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Open all the source index files */ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0) { - pkgSourceList::const_iterator I = List.begin(); + Files = new Parser *[List.end() - List.begin() + 1]; + memset(Files,0,sizeof(*Files)*(List.end() - List.begin() + 1)); - // Count how many items we will need unsigned int Count = 0; + pkgSourceList::const_iterator I = List.begin(); for (; I != List.end(); I++) - if (_system->checkSourceType(I->Type(), false)) + { + Files[Count] = (*I)->CreateSrcParser(); + if (_error->PendingError() == true) + return; + if (Files[Count] != 0) Count++; - - // Doesnt work without any source index files + } + Files[Count] = 0; + + // Doesn't work without any source index files if (Count == 0) { - _error->Error(_("Sorry, you must put some 'source' uris" + _error->Error(_("You must put some 'source' URIs" " in your sources.list")); return; } - Files = new Parser *[Count+1]; - memset(Files,0,sizeof(*Files)*(Count+1)); - - // Create the parser objects - Count = 0; - string Dir = _config->FindDir("Dir::State::lists"); - for (I = List.begin(); I != List.end(); I++) - { - if (!_system->checkSourceType(I->Type(), false)) - continue; - - string path = Dir + URItoFileName(I->PackagesURI()); - - Files[Count] = _system->CreateSrcRecordParser(path,I); - - if (Files[Count] == NULL || _error->PendingError() == true) - { - if (Files[Count]) - delete Files[Count]; - return; - } - Count++; - } - Restart(); } /*}}}*/ @@ -87,6 +65,7 @@ pkgSrcRecords::~pkgSrcRecords() // Blow away all the parser objects for (unsigned int Count = 0; Files[Count] != 0; Count++) delete Files[Count]; + delete [] Files; } /*}}}*/ // SrcRecords::Restart - Restart the search /*{{{*/ @@ -133,15 +112,29 @@ pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool SrcOnly) if (SrcOnly == true) continue; - + // Check for a binary hit const char **I = (*Current)->Binaries(); - if (I) { - for (; I != 0 && *I != 0; I++) - if (strcmp(Package,*I) == 0) - return *Current; - } + for (; I != 0 && *I != 0; I++) + if (strcmp(Package,*I) == 0) + return *Current; } } /*}}}*/ +// Parser::BuildDepType - Convert a build dep to a string /*{{{*/ +// --------------------------------------------------------------------- +/* */ +const char *pkgSrcRecords::Parser::BuildDepType(unsigned char Type) +{ + const char *fields[] = {"Build-Depends", + "Build-Depends-Indep", + "Build-Conflicts", + "Build-Conflicts-Indep"}; + if (Type < 4) + return fields[Type]; + else + return ""; +} + /*}}}*/ + diff --git a/apt/apt-pkg/srcrecords.h b/apt/apt-pkg/srcrecords.h index dba1b10..006c9d3 100644 --- a/apt/apt-pkg/srcrecords.h +++ b/apt/apt-pkg/srcrecords.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: srcrecords.h,v 1.2 2000/10/29 20:25:10 kojima Exp $ +// $Id: srcrecords.h,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Source Package Records - Allows access to source package records @@ -17,9 +17,14 @@ #pragma interface "apt-pkg/srcrecords.h" #endif -#include -#include +#include +#include +using std::string; +using std::vector; + +class pkgSourceList; +class pkgIndexFile; class pkgSrcRecords { public: @@ -30,18 +35,30 @@ class pkgSrcRecords string MD5Hash; unsigned long Size; string Path; + string Type; }; // Abstract parser for each source record class Parser { protected: - FileFd *File; - pkgSourceList::const_iterator SrcItem; + + const pkgIndexFile *iIndex; public: - inline pkgSourceList::const_iterator Source() const {return SrcItem;}; + enum BuildDep {BuildDepend=0x0,BuildDependIndep=0x1, + BuildConflict=0x2,BuildConflictIndep=0x3}; + + struct BuildDepRec + { + string Package; + string Version; + unsigned int Op; + unsigned char Type; + }; + + inline const pkgIndexFile &Index() const {return *iIndex;}; virtual bool Restart() = 0; virtual bool Step() = 0; @@ -49,16 +66,19 @@ class pkgSrcRecords virtual unsigned long Offset() = 0; virtual string AsStr() = 0; - virtual string Package() = 0; - virtual string Version() = 0; - virtual string Maintainer() = 0; - virtual string Section() = 0; - virtual const char **Binaries() = 0; + virtual string Package() const = 0; + virtual string Version() const = 0; + virtual string Maintainer() const = 0; + virtual string Section() const = 0; + virtual const char **Binaries() = 0; // Ownership does not transfer + + virtual bool BuildDepends(vector &BuildDeps, bool ArchOnly) = 0; + static const char *BuildDepType(unsigned char Type); + virtual bool Files(vector &F) = 0; - Parser(FileFd *File,pkgSourceList::const_iterator SrcItem) : File(File), - SrcItem(SrcItem) {}; - virtual ~Parser() { if (File) delete File;}; + Parser(const pkgIndexFile *Index) : iIndex(Index) {}; + virtual ~Parser() {}; }; private: @@ -79,5 +99,4 @@ class pkgSrcRecords ~pkgSrcRecords(); }; - #endif diff --git a/apt/apt-pkg/systemfactory.cc b/apt/apt-pkg/systemfactory.cc deleted file mode 100644 index 1a2adb8..0000000 --- a/apt/apt-pkg/systemfactory.cc +++ /dev/null @@ -1,439 +0,0 @@ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - - -SystemFactory *_system = NULL; - - - -SystemFactory::SystemFactory() -{ - assert(_system == NULL); - _system = this; -} - - -pkgPackageManager *SystemFactory::CreatePackageManager(pkgDepCache &Cache) -{ - return NULL; -} - - -// SrcCacheCheck - Check if the source package cache is uptodate /*{{{*/ -// --------------------------------------------------------------------- -/* The source cache is checked against the source list and the files - on disk, any difference results in a false. */ -bool SystemFactory::sourceCacheCheck(pkgSourceList &List) -{ - if (_error->PendingError() == true) { - return false; - } - - string CacheFile = _config->FindFile("Dir::Cache::srcpkgcache"); - string ListDir = _config->FindDir("Dir::State::lists"); - - // Count the number of missing files - int Missing = 0; - for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) - { - // Only cache our source types. - if (!checkSourceType(I->Type())) - { - Missing++; - continue; - } - - string File = ListDir + URItoFileName(I->PackagesURI()); - struct stat Buf; - if (stat(File.c_str(),&Buf) != 0) - { - // Old format file name.. rename it - if (File[0] == '_' && stat(File.c_str()+1,&Buf) == 0) - { - if (rename(File.c_str()+1,File.c_str()) != 0) - return _error->Errno("rename",_("Failed to rename %s to %s"), - File.c_str()+1,File.c_str()); - continue; - } - - _error->WarningE("stat",_("Couldn't stat source package list '%s' (%s)"), - I->PackagesInfo().c_str(),File.c_str()); - Missing++; - } - } - - // Open the source package cache - if (FileExists(CacheFile) == false) - return false; - - FileFd CacheF(CacheFile,FileFd::ReadOnly); - if (_error->PendingError() == true) - { - _error->Discard(); - return false; - } - - MMap Map(CacheF,MMap::Public | MMap::ReadOnly); - if (_error->PendingError() == true || Map.Size() == 0) - { - _error->Discard(); - return false; - } - - pkgCache Cache(Map); - if (_error->PendingError() == true) - { - _error->Discard(); - return false; - } - - // They are certianly out of sync - if (Cache.Head().PackageFileCount != List.size() - Missing) - return false; - - for (pkgCache::PkgFileIterator F(Cache); F.end() == false; F++) - { - // Search for a match in the source list - bool Bad = true; - for (pkgSourceList::const_iterator I = List.begin(); - I != List.end(); I++) - { - // Only cache deb source types. - if (!checkSourceType(I->Type())) - continue; - - string File = ListDir + URItoFileName(I->PackagesURI()); - if (F.FileName() == File) - { - Bad = false; - break; - } - } - - // Check if the file matches what was cached - Bad |= !F.IsOk(); - if (Bad == true) - return false; - } - - return true; -} - -/*}}}*/ -// GenerateSrcCache - Write the source package lists to the map /*{{{*/ -// --------------------------------------------------------------------- -/* This puts the source package cache into the given generator. */ -bool SystemFactory::generateSrcCache(pkgSourceList &List,OpProgress &Progress, - pkgCacheGenerator &Gen, - unsigned long &CurrentSize,unsigned long &TotalSize) -{ - string ListDir = _config->FindDir("Dir::State::lists"); - - // Prepare the progress indicator - TotalSize = 0; - struct stat Buf; - for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) - { - string File = ListDir + URItoFileName(I->PackagesURI()); - if (stat(File.c_str(),&Buf) != 0) - continue; - TotalSize += Buf.st_size; - } - - if (addStatusSize(TotalSize) == false) - return false; - - // Generate the pkg source cache - CurrentSize = 0; - for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) - { - pkgCacheGenerator::ListParser *Parser; - - // Only cache relevant source types. - if (!checkSourceType(I->Type())) - continue; - - string File = ListDir + URItoFileName(I->PackagesURI()); - - if (FileExists(File) == false) - continue; - - FileFd Pkg(File,FileFd::ReadOnly); - - Parser = CreateListParser(Pkg); - - Progress.OverallProgress(CurrentSize,TotalSize,Pkg.Size(),_("Reading Package Lists")); - - if (_error->PendingError() == true) { - delete Parser; - return _error->Error(_("Problem opening %s"),File.c_str()); - } - - CurrentSize += Pkg.Size(); - - Progress.SubProgress(0,I->PackagesInfo()); - if (Gen.SelectFile(File) == false) { - delete Parser; - return _error->Error(_("Problem with SelectFile %s"),File.c_str()); - } - - if (Gen.MergeList(*Parser) == false) { - delete Parser; - return _error->Error(_("Problem with MergeList %s"),File.c_str()); - } - - // Check the release file - string RFile = ListDir + URItoFileName(I->ReleaseURI()); - if (FileExists(RFile) == true) - { - FileFd Rel(RFile,FileFd::ReadOnly); - if (_error->PendingError() == true) { - return false; - } - Parser->LoadReleaseInfo(Gen.GetCurFile(),Rel); - } - } - - return true; -} - - - -// MakeStatusCache - Generates a cache that includes the status files /*{{{*/ -// --------------------------------------------------------------------- -/* This copies the package source cache and then merges the status and - xstatus files into it. */ -bool SystemFactory::makeStatusCache(pkgSourceList &List,OpProgress &Progress) -{ - unsigned long MapSize = _config->FindI("APT::Cache-Limit",4*1024*1024); - - string CacheFile = _config->FindFile("Dir::Cache::pkgcache"); - bool SrcOk = sourceCacheCheck(List); - - bool PkgOk = SrcOk && packageCacheCheck(CacheFile); - - // Rebuild the source and package caches - if (SrcOk == false) - { - if (!preProcess(List, Progress)) - return false; - - Progress.OverallProgress(0,1,1,_("Reading Package Lists")); - - string SCacheFile = _config->FindFile("Dir::Cache::srcpkgcache"); - FileFd SCacheF(SCacheFile,FileFd::WriteEmpty); - - /* Open the pkgcache, we want a new inode here so we do no corrupt - existing mmaps */ - unlink(CacheFile.c_str()); - FileFd CacheF(CacheFile,FileFd::WriteEmpty); - DynamicMMap Map(CacheF,MMap::Public,MapSize); - if (_error->PendingError() == true) - return false; - - pkgCacheGenerator Gen(Map,Progress); - unsigned long CurrentSize = 0; - unsigned long TotalSize = 0; - - if (generateSrcCache(List,Progress,Gen,CurrentSize,TotalSize) == false) - return false; - - // Write the src cache - Gen.GetCache().HeaderP->Dirty = false; - if (SCacheF.Write(Map.Data(),Map.Size()) == false) - return _error->Error(_("IO Error saving source cache")); - Gen.GetCache().HeaderP->Dirty = true; - - // Merge in the source caches - return mergeInstalledPackages(Progress,Gen,CurrentSize,TotalSize); - } - - if (PkgOk == true) - { - Progress.OverallProgress(0,1,1,_("Reading Package Lists")); - Progress.OverallProgress(1,1,1,_("Reading Package Lists")); - return true; - } - else - { - if (!preProcess(List, Progress)) - return false; - Progress.OverallProgress(0,1,1,_("Reading Package Lists")); - } - - // We use the source cache to generate the package cache - string SCacheFile = _config->FindFile("Dir::Cache::srcpkgcache"); - FileFd SCacheF(SCacheFile,FileFd::ReadOnly); - - /* Open the pkgcache, we want a new inode here so we do no corrupt - existing mmaps */ - unlink(CacheFile.c_str()); - FileFd CacheF(CacheFile,FileFd::WriteEmpty); - DynamicMMap Map(CacheF,MMap::Public,MapSize); - if (_error->PendingError() == true) - return false; - - // Preload the map with the source cache - if (SCacheF.Read((unsigned char *)Map.Data() + Map.RawAllocate(SCacheF.Size()), - SCacheF.Size()) == false) - return false; - - pkgCacheGenerator Gen(Map,Progress); - - // Compute the progress - unsigned long TotalSize = 0; - if (addStatusSize(TotalSize) == false) - return false; - - unsigned long CurrentSize = 0; - return mergeInstalledPackages(Progress,Gen,CurrentSize,TotalSize); -} -/*}}}*/ -// MakeStatusCacheMem - Returns a map for the status cache /*{{{*/ -// --------------------------------------------------------------------- -/* This creates a map object for the status cache. If the process has write - access to the caches then it is the same as MakeStatusCache, otherwise it - creates a memory block and puts the cache in there. */ -MMap *SystemFactory::makeStatusCacheMem(pkgSourceList &List,OpProgress &Progress) -{ - unsigned long MapSize = _config->FindI("APT::Cache-Limit",4*1024*1024); - - if (!preProcess(List, Progress)) { - return 0; - } - - /* If the cache file is writeable this is just a wrapper for - MakeStatusCache */ - string CacheFile = _config->FindFile("Dir::Cache::pkgcache"); - bool Writeable = (access(CacheFile.c_str(),W_OK) == 0) || - (errno == ENOENT); - - if (Writeable == true) - { - if (makeStatusCache(List,Progress) == false) - return 0; - - // Open the cache file - FileFd File(_config->FindFile("Dir::Cache::pkgcache"),FileFd::ReadOnly); - if (_error->PendingError() == true) - return 0; - - MMap *Map = new MMap(File,MMap::Public | MMap::ReadOnly); - if (_error->PendingError() == true) - { - delete Map; - return 0; - } - return Map; - } - - // Mostly from MakeStatusCache.. - Progress.OverallProgress(0,1,1,_("Reading Package Lists")); - - bool SrcOk = sourceCacheCheck(List); - bool PkgOk = SrcOk && packageCacheCheck(CacheFile); - - // Rebuild the source and package caches - if (SrcOk == false) - { - DynamicMMap *Map = new DynamicMMap(MMap::Public,MapSize); - if (_error->PendingError() == true) - { - delete Map; - return 0; - } - - pkgCacheGenerator Gen(*Map,Progress); - unsigned long CurrentSize = 0; - unsigned long TotalSize = 0; - if (generateSrcCache(List,Progress,Gen,CurrentSize,TotalSize) == false) - { - delete Map; - return 0; - } - - // Merge in the source caches - if (mergeInstalledPackages(Progress,Gen,CurrentSize,TotalSize) == false) - { - delete Map; - return 0; - } - - return Map; - } - - if (PkgOk == true) - { - Progress.OverallProgress(1,1,1,_("Reading Package Lists")); - - // Open the cache file - FileFd File(_config->FindFile("Dir::Cache::pkgcache"),FileFd::ReadOnly); - if (_error->PendingError() == true) - return 0; - - MMap *Map = new MMap(File,MMap::Public | MMap::ReadOnly); - if (_error->PendingError() == true) - { - delete Map; - return 0; - } - return Map; - } - - // We use the source cache to generate the package cache - string SCacheFile = _config->FindFile("Dir::Cache::srcpkgcache"); - FileFd SCacheF(SCacheFile,FileFd::ReadOnly); - DynamicMMap *Map = new DynamicMMap(MMap::Public,MapSize); - if (_error->PendingError() == true) - { - delete Map; - return 0; - } - - // Preload the map with the source cache - if (SCacheF.Read((unsigned char *)Map->Data() + Map->RawAllocate(SCacheF.Size()), - SCacheF.Size()) == false) - { - delete Map; - return 0; - } - - pkgCacheGenerator Gen(*Map,Progress); - - // Compute the progress - unsigned long TotalSize = 0; - if (addStatusSize(TotalSize) == false) - { - delete Map; - return 0; - } - - unsigned long CurrentSize = 0; - if (mergeInstalledPackages(Progress,Gen,CurrentSize,TotalSize) == false) - { - delete Map; - return 0; - } - - return Map; -} -/*}}}*/ - diff --git a/apt/apt-pkg/systemfactory.h b/apt/apt-pkg/systemfactory.h deleted file mode 100644 index a7d661b..0000000 --- a/apt/apt-pkg/systemfactory.h +++ /dev/null @@ -1,65 +0,0 @@ - - -#ifndef _SYSTEMFACTORY_H_ -#define _SYSTEMFACTORY_H_ - -#include -#include -#include - -class FileFd; -class pkgPackageManager; -class pkgDepCache; -class pkgCache; -class OpProgress; -class pkgSourceList; -class MMap; - -class SystemFactory { -// for cache generation - protected: - inline virtual bool addStatusSize(unsigned long &TotalSize) {return false;}; - - virtual bool sourceCacheCheck(pkgSourceList &List); - inline virtual bool packageCacheCheck(string CacheFile) = 0; - - bool generateSrcCache(pkgSourceList &List,OpProgress &Progress, - pkgCacheGenerator &Gen, - unsigned long &CurrentSize,unsigned long &TotalSize); - - inline virtual bool mergeInstalledPackages(OpProgress &Progress, - pkgCacheGenerator &Gen, - unsigned long &CurrentSize, - unsigned long TotalSize) { - return false; - }; - - inline virtual bool preProcess(pkgSourceList &List, OpProgress &Progress) {return true;} - - public: - inline virtual bool checkSourceType(int type, bool binary=true) {return false;} - - bool makeStatusCache(pkgSourceList &List,OpProgress &Progress); - MMap *makeStatusCacheMem(pkgSourceList &List,OpProgress &Progress); - - virtual int versionCompare(const char *A, const char *B); - virtual int versionCompare(const char *A, const char *AEnd, const char *B, - const char *BEnd); - virtual int versionCompare(string A,string B); - virtual bool checkDep(const char *DepVer,const char *PkgVer,int Op); - virtual string baseVersion(const char *Ver); - - // for other stuffs - public: - SystemFactory::SystemFactory(); - - virtual pkgCacheGenerator::ListParser *CreateListParser(FileFd &File) = 0; - virtual pkgRecords::Parser *CreateRecordParser(string File, pkgCache &Cache) = 0; - virtual pkgSrcRecords::Parser *CreateSrcRecordParser(string File, pkgSourceList::const_iterator SrcItem) = 0; - virtual pkgPackageManager *CreatePackageManager(pkgDepCache &Cache); - -}; - -extern SystemFactory *_system; - -#endif diff --git a/apt/apt-pkg/tagfile.cc b/apt/apt-pkg/tagfile.cc index f753459..b95b348 100644 --- a/apt/apt-pkg/tagfile.cc +++ b/apt/apt-pkg/tagfile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.cc,v 1.2 2001/01/11 02:03:27 kojima Exp $ +// $Id: tagfile.cc,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -19,25 +19,37 @@ #include #include -#include - +#include + #include #include +#include /*}}}*/ +using std::string; + // TagFile::pkgTagFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgTagFile::pkgTagFile(FileFd &Fd,unsigned long Size) : Fd(Fd), Size(Size) +pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : Fd(*pFd), Size(Size) { + if (Fd.IsOpen() == false) + { + Buffer = 0; + Start = End = Buffer = 0; + Done = true; + iOffset = 0; + return; + } + Buffer = new char[Size]; Start = End = Buffer; - Left = Fd.Size(); + Done = false; iOffset = 0; Fill(); } /*}}}*/ -// pkgTagFile::~pkgTagFile - Destructor /*{{{*/ +// TagFile::~pkgTagFile - Destructor /*{{{*/ // --------------------------------------------------------------------- /* */ pkgTagFile::~pkgTagFile() @@ -56,11 +68,13 @@ bool pkgTagFile::Step(pkgTagSection &Tag) return false; if (Tag.Scan(Start,End - Start) == false) - return _error->Error(_("Unable to parse package file %s (1)"),Fd.Name().c_str()); - } + return _error->Error(_("Unable to parse package file %s (1)"), + Fd.Name().c_str()); + } Start += Tag.size(); iOffset += Tag.size(); - + + Tag.Trim(); return true; } /*}}}*/ @@ -71,14 +85,25 @@ bool pkgTagFile::Step(pkgTagSection &Tag) bool pkgTagFile::Fill() { unsigned long EndSize = End - Start; + unsigned long Actual = 0; memmove(Buffer,Start,EndSize); Start = Buffer; End = Buffer + EndSize; - if (Left == 0) + if (Done == false) { - if (EndSize <= 3) + // See if only a bit of the file is left + if (Fd.Read(End,Size - (End - Buffer),&Actual) == false) + return false; + if (Actual != Size - (End - Buffer)) + Done = true; + End += Actual; + } + + if (Done == true) + { + if (EndSize <= 3 && Actual == 0) return false; if (Size - (End - Buffer) < 4) return true; @@ -94,23 +119,6 @@ bool pkgTagFile::Fill() return true; } - // See if only a bit of the file is left - if (Left < Size - (End - Buffer)) - { - if (Fd.Read(End,Left) == false) - return false; - - End += Left; - Left = 0; - } - else - { - if (Fd.Read(End,Size - (End - Buffer)) == false) - return false; - - Left -= Size - (End - Buffer); - End = Buffer + Size; - } return true; } /*}}}*/ @@ -120,8 +128,18 @@ bool pkgTagFile::Fill() that is there */ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) { + // We are within a buffer space of the next hit.. + if (Offset >= iOffset && iOffset + (End - Start) > Offset) + { + unsigned long Dist = Offset - iOffset; + Start += Dist; + iOffset += Dist; + return Step(Tag); + } + + // Reposition and reload.. iOffset = Offset; - Left = Fd.Size() - Offset; + Done = false; if (Fd.Seek(Offset) == false) return false; End = Start = Buffer; @@ -137,10 +155,7 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) return false; if (Tag.Scan(Start,End - Start) == false) - { - cout << string(Start,End) << endl; return _error->Error(_("Unable to parse package file %s (2)"),Fd.Name().c_str()); - } return true; } @@ -150,6 +165,14 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) /* This looks for the first double new line in the data stream. It also indexes the tags in the section. This very simple hash function for the first 3 letters gives very good performance on the debian package files */ +inline static unsigned long AlphaHash(const char *Text, const char *End = 0) +{ + unsigned long Res = 0; + for (; Text != End && *Text != ':' && *Text != 0; Text++) + Res = (unsigned long)(*Text) ^ (Res << 2); + return Res & 0xFF; +} + bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) { const char *End = Start + MaxLength; @@ -160,16 +183,13 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) return false; TagCount = 0; - while (TagCount < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End) + while (TagCount+1 < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End) { // Start a new index and add it to the hash if (isspace(Stop[0]) == 0) { Indexes[TagCount++] = Stop - Section; - unsigned char A = tolower(Stop[0]) - 'a'; - unsigned char B = tolower(Stop[1]) - 'a'; - unsigned char C = tolower(Stop[3]) - 'a'; - AlphaIndexes[((A + C/3)%26) + 26*((B + C/2)%26)] = TagCount; + AlphaIndexes[AlphaHash(Stop,End)] = TagCount; } Stop = (const char *)memchr(Stop,'\n',End - Stop); @@ -177,13 +197,13 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) if (Stop == 0) return false; - for (; Stop[1] == '\r' && Stop+1 < End; Stop++); + for (; Stop+1 < End && Stop[1] == '\r'; Stop++); // Double newline marks the end of the record if (Stop+1 < End && Stop[1] == '\n') { Indexes[TagCount] = Stop - Section; - for (; (Stop[0] == '\n' || Stop[0] == '\r') && Stop < End; Stop++); + for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++); return true; } @@ -193,17 +213,21 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) return false; } /*}}}*/ +// TagSection::Trim - Trim off any trailing garbage /*{{{*/ +// --------------------------------------------------------------------- +/* There should be exactly 1 newline at the end of the buffer, no more. */ +void pkgTagSection::Trim() +{ + for (; Stop > Section + 2 && (Stop[-2] == '\n' || Stop[-2] == '\r'); Stop--); +} + /*}}}*/ // TagSection::Find - Locate a tag /*{{{*/ // --------------------------------------------------------------------- /* This searches the section for a tag that matches the given string. */ -bool pkgTagSection::Find(const char *Tag,const char *&Start, - const char *&End) +bool pkgTagSection::Find(const char *Tag,unsigned &Pos) const { unsigned int Length = strlen(Tag); - unsigned char A = tolower(Tag[0]) - 'a'; - unsigned char B = tolower(Tag[1]) - 'a'; - unsigned char C = tolower(Tag[3]) - 'a'; - unsigned int I = AlphaIndexes[((A + C/3)%26) + 26*((B + C/2)%26)]; + unsigned int I = AlphaIndexes[AlphaHash(Tag)]; if (I == 0) return false; I--; @@ -216,6 +240,39 @@ bool pkgTagSection::Find(const char *Tag,const char *&Start, if (strncasecmp(Tag,St,Length) != 0) continue; + // Make sure the colon is in the right place + const char *C = St + Length; + for (; isspace(*C) != 0; C++); + if (*C != ':') + continue; + Pos = I; + return true; + } + + Pos = 0; + return false; +} + /*}}}*/ +// TagSection::Find - Locate a tag /*{{{*/ +// --------------------------------------------------------------------- +/* This searches the section for a tag that matches the given string. */ +bool pkgTagSection::Find(const char *Tag,const char *&Start, + const char *&End) const +{ + unsigned int Length = strlen(Tag); + unsigned int I = AlphaIndexes[AlphaHash(Tag)]; + if (I == 0) + return false; + I--; + + for (unsigned int Counter = 0; Counter != TagCount; Counter++, + I = (I+1)%TagCount) + { + const char *St; + St = Section + Indexes[I]; + if (strncasecmp(Tag,St,Length) != 0) + continue; + // Make sure the colon is in the right place const char *C = St + Length; for (; isspace(*C) != 0; C++); @@ -241,7 +298,7 @@ bool pkgTagSection::Find(const char *Tag,const char *&Start, // TagSection::FindS - Find a string /*{{{*/ // --------------------------------------------------------------------- /* */ -string pkgTagSection::FindS(const char *Tag) +string pkgTagSection::FindS(const char *Tag) const { const char *Start; const char *End; @@ -253,7 +310,7 @@ string pkgTagSection::FindS(const char *Tag) // TagSection::FindI - Find an integer /*{{{*/ // --------------------------------------------------------------------- /* */ -signed int pkgTagSection::FindI(const char *Tag,signed long Default) +signed int pkgTagSection::FindI(const char *Tag,signed long Default) const { const char *Start; const char *Stop; @@ -278,7 +335,7 @@ signed int pkgTagSection::FindI(const char *Tag,signed long Default) // --------------------------------------------------------------------- /* The bits marked in Flag are masked on/off in Flags */ bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags, - unsigned long Flag) + unsigned long Flag) const { const char *Start; const char *Stop; @@ -296,9 +353,192 @@ bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags, return true; default: - _error->Warning("Unknown flag value"); + _error->Warning("Unknown flag value: %s",string(Start,Stop).c_str()); return true; } return true; } /*}}}*/ + +// TFRewrite - Rewrite a control record /*{{{*/ +// --------------------------------------------------------------------- +/* This writes the control record to stdout rewriting it as necessary. The + override map item specificies the rewriting rules to follow. This also + takes the time to sort the feild list. */ + +/* The order of this list is taken from dpkg source lib/parse.c the fieldinfos + array. */ +static const char *iTFRewritePackageOrder[] = { + "Package", + "Essential", + "Status", + "Priority", + "Section", + "Installed-Size", + "Maintainer", + "Architecture", + "Source", + "Version", + "Revision", // Obsolete + "Config-Version", // Obsolete + "Replaces", + "Provides", + "Depends", + "Pre-Depends", + "Recommends", + "Suggests", + "Conflicts", + "Conffiles", + "Filename", + "Size", + "MD5Sum", + "SHA1Sum", + "MSDOS-Filename", // Obsolete + "Description", + 0}; +static const char *iTFRewriteSourceOrder[] = {"Package", + "Source", + "Binary", + "Version", + "Priority", + "Section", + "Maintainer", + "Build-Depends", + "Build-Depends-Indep", + "Build-Conflicts", + "Build-Conflicts-Indep", + "Architecture", + "Standards-Version", + "Format", + "Directory", + "Files", + 0}; + +/* Two levels of initialization are used because gcc will set the symbol + size of an array to the length of the array, causing dynamic relinking + errors. Doing this makes the symbol size constant */ +const char **TFRewritePackageOrder = iTFRewritePackageOrder; +const char **TFRewriteSourceOrder = iTFRewriteSourceOrder; + +bool TFRewrite(FILE *Output,pkgTagSection const &Tags,const char *Order[], + TFRewriteData *Rewrite) +{ + unsigned char Visited[256]; // Bit 1 is Order, Bit 2 is Rewrite + for (unsigned I = 0; I != 256; I++) + Visited[I] = 0; + + // Set new tag up as necessary. + for (unsigned int J = 0; Rewrite != 0 && Rewrite[J].Tag != 0; J++) + { + if (Rewrite[J].NewTag == 0) + Rewrite[J].NewTag = Rewrite[J].Tag; + } + + // Write all all of the tags, in order. + for (unsigned int I = 0; Order[I] != 0; I++) + { + bool Rewritten = false; + + // See if this is a field that needs to be rewritten + for (unsigned int J = 0; Rewrite != 0 && Rewrite[J].Tag != 0; J++) + { + if (strcasecmp(Rewrite[J].Tag,Order[I]) == 0) + { + Visited[J] |= 2; + if (Rewrite[J].Rewrite != 0 && Rewrite[J].Rewrite[0] != 0) + { + if (isspace(Rewrite[J].Rewrite[0])) + fprintf(Output,"%s:%s\n",Rewrite[J].NewTag,Rewrite[J].Rewrite); + else + fprintf(Output,"%s: %s\n",Rewrite[J].NewTag,Rewrite[J].Rewrite); + } + + Rewritten = true; + break; + } + } + + // See if it is in the fragment + unsigned Pos; + if (Tags.Find(Order[I],Pos) == false) + continue; + Visited[Pos] |= 1; + + if (Rewritten == true) + continue; + + /* Write out this element, taking a moment to rewrite the tag + in case of changes of case. */ + const char *Start; + const char *Stop; + Tags.Get(Start,Stop,Pos); + + if (fputs(Order[I],Output) < 0) + return _error->Errno("fputs","IO Error to output"); + Start += strlen(Order[I]); + if (fwrite(Start,Stop - Start,1,Output) != 1) + return _error->Errno("fwrite","IO Error to output"); + if (Stop[-1] != '\n') + fprintf(Output,"\n"); + } + + // Now write all the old tags that were missed. + for (unsigned int I = 0; I != Tags.Count(); I++) + { + if ((Visited[I] & 1) == 1) + continue; + + const char *Start; + const char *Stop; + Tags.Get(Start,Stop,I); + const char *End = Start; + for (; End < Stop && *End != ':'; End++); + + // See if this is a field that needs to be rewritten + bool Rewritten = false; + for (unsigned int J = 0; Rewrite != 0 && Rewrite[J].Tag != 0; J++) + { + if (stringcasecmp(Start,End,Rewrite[J].Tag) == 0) + { + Visited[J] |= 2; + if (Rewrite[J].Rewrite != 0 && Rewrite[J].Rewrite[0] != 0) + { + if (isspace(Rewrite[J].Rewrite[0])) + fprintf(Output,"%s:%s\n",Rewrite[J].NewTag,Rewrite[J].Rewrite); + else + fprintf(Output,"%s: %s\n",Rewrite[J].NewTag,Rewrite[J].Rewrite); + } + + Rewritten = true; + break; + } + } + + if (Rewritten == true) + continue; + + // Write out this element + if (fwrite(Start,Stop - Start,1,Output) != 1) + return _error->Errno("fwrite","IO Error to output"); + if (Stop[-1] != '\n') + fprintf(Output,"\n"); + } + + // Now write all the rewrites that were missed + for (unsigned int J = 0; Rewrite != 0 && Rewrite[J].Tag != 0; J++) + { + if ((Visited[J] & 2) == 2) + continue; + + if (Rewrite[J].Rewrite != 0 && Rewrite[J].Rewrite[0] != 0) + { + if (isspace(Rewrite[J].Rewrite[0])) + fprintf(Output,"%s:%s\n",Rewrite[J].NewTag,Rewrite[J].Rewrite); + else + fprintf(Output,"%s: %s\n",Rewrite[J].NewTag,Rewrite[J].Rewrite); + } + } + + return true; +} + /*}}}*/ diff --git a/apt/apt-pkg/tagfile.h b/apt/apt-pkg/tagfile.h index 58cb642..6a6bffb 100644 --- a/apt/apt-pkg/tagfile.h +++ b/apt/apt-pkg/tagfile.h @@ -1,12 +1,12 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: tagfile.h,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information This parser handles Debian package files (and others). Their form is - RFC-822 type header fields in groups seperated by a blank line. + RFC-822 type header fields in groups separated by a blank line. The parser reads the file and provides methods to step linearly over it or to jump to a pre-recorded start point and read that record. @@ -17,7 +17,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_TAGFILE_H #define PKGLIB_TAGFILE_H @@ -26,7 +25,8 @@ #endif #include - +#include + class pkgTagSection { const char *Section; @@ -34,7 +34,7 @@ class pkgTagSection // We have a limit of 256 tags per section. unsigned short Indexes[256]; - unsigned short AlphaIndexes[26 + 26*26]; + unsigned short AlphaIndexes[0x100]; unsigned int TagCount; @@ -43,19 +43,21 @@ class pkgTagSection inline bool operator ==(const pkgTagSection &rhs) {return Section == rhs.Section;}; inline bool operator !=(const pkgTagSection &rhs) {return Section != rhs.Section;}; - bool Find(const char *Tag,const char *&Start, const char *&End); - string FindS(const char *Tag); - signed int FindI(const char *Tag,signed long Default = 0); - bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags, - unsigned long Flag); + bool Find(const char *Tag,const char *&Start, const char *&End) const; + bool Find(const char *Tag,unsigned &Pos) const; + string FindS(const char *Tag) const; + signed int FindI(const char *Tag,signed long Default = 0) const ; + bool FindFlag(const char *Tag,unsigned long &Flags, + unsigned long Flag) const; bool Scan(const char *Start,unsigned long MaxLength); - inline unsigned long size() {return Stop - Section;}; - - inline unsigned int Count() {return TagCount;}; - inline void Get(const char *&Start,const char *&Stop,unsigned int I) + inline unsigned long size() const {return Stop - Section;}; + void Trim(); + + inline unsigned int Count() const {return TagCount;}; + inline void Get(const char *&Start,const char *&Stop,unsigned int I) const {Start = Section + Indexes[I]; Stop = Section + Indexes[I+1];} - inline void GetSection(const char *&Start,const char *&Stop) + inline void GetSection(const char *&Start,const char *&Stop) const { Start = Section; Stop = this->Stop; @@ -70,7 +72,7 @@ class pkgTagFile char *Buffer; char *Start; char *End; - unsigned long Left; + bool Done; unsigned long iOffset; unsigned long Size; @@ -82,8 +84,24 @@ class pkgTagFile inline unsigned long Offset() {return iOffset;}; bool Jump(pkgTagSection &Tag,unsigned long Offset); - pkgTagFile(FileFd &F,unsigned long Size = 32*1024); + pkgTagFile(FileFd *F,unsigned long Size = 32*1024); ~pkgTagFile(); }; +/* This is the list of things to rewrite. The rewriter + goes through and changes or adds each of these headers + to suit. A zero forces the header to be erased, an empty string + causes the old value to be used. (rewrite rule ignored) */ +struct TFRewriteData +{ + const char *Tag; + const char *Rewrite; + const char *NewTag; +}; +extern const char **TFRewritePackageOrder; +extern const char **TFRewriteSourceOrder; + +bool TFRewrite(FILE *Output,pkgTagSection const &Tags,const char *Order[], + TFRewriteData *Rewrite); + #endif diff --git a/apt/apt-pkg/version.cc b/apt/apt-pkg/version.cc index b7af1e7..126e63a 100644 --- a/apt/apt-pkg/version.cc +++ b/apt/apt-pkg/version.cc @@ -1,276 +1,45 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: version.cc,v 1.4 2000/09/04 15:55:08 kojima Exp $ +// $Id: version.cc,v 1.1 2002/07/23 17:54:50 niemeyer Exp $ /* ###################################################################### - Version - Version string - - Version comparing is done using the == and < operators. STL's - function.h provides the remaining set of comparitors. A directly - callable non-string class version is provided for functions manipulating - the cache file (esp the sort function). - - A version is defined to be equal if a case sensitive compare returns - that the two strings are the same. For compatibility with the QSort - function this version returns -1,0,1. + Version - Versioning system.. ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "apt-pkg/systemfactory.h" +#pragma implementation "apt-pkg/version.h" #endif -#include +#include #include #include /*}}}*/ + +static pkgVersioningSystem *VSList[10]; +pkgVersioningSystem **pkgVersioningSystem::GlobalList = VSList; +unsigned long pkgVersioningSystem::GlobalListLen = 0; -// StrToLong - Convert the string between two iterators to a long /*{{{*/ +// pkgVS::pkgVersioningSystem - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Link to the global list of versioning systems supported */ +pkgVersioningSystem::pkgVersioningSystem() +{ + VSList[GlobalListLen] = this; + GlobalListLen++; +} + /*}}}*/ +// pkgVS::GetVS - Find a VS by name /*{{{*/ // --------------------------------------------------------------------- /* */ -static unsigned long StrToLong(const char *begin,const char *end) +pkgVersioningSystem *pkgVersioningSystem::GetVS(const char *Label) { - char S[40]; - char *I = S; - for (; begin != end && I < S + 40;) - *I++ = *begin++; - *I = 0; - return strtoul(S,0,10); -} - /*}}}*/ -// VersionCompare (op) - Greater than comparison for versions /*{{{*/ -// --------------------------------------------------------------------- -/* */ -int SystemFactory::versionCompare(const char *A, const char *B) -{ - return versionCompare(A,A + strlen(A),B,B + strlen(B)); -} - -int SystemFactory::versionCompare(string A,string B) -{ - return versionCompare(A.begin(),A.end(),B.begin(),B.end()); -} - - /*}}}*/ -// iVersionCompare - Compare versions /*{{{*/ -// --------------------------------------------------------------------- -/* This compares a fragment of the version. */ -static int iVersionCompare(const char *A, const char *AEnd, const char *B, - const char *BEnd) -{ - if (A >= AEnd && B >= BEnd) - return 0; - if (A >= AEnd) - return -1; - if (B >= BEnd) - return 1; - - /* Iterate over the whole string - What this does is to spilt the whole string into groups of - numeric and non numeric portions. For instance: - a67bhgs89 - Has 4 portions 'a', '67', 'bhgs', '89'. A more normal: - 2.7.2-linux-1 - Has '2', '.', '7', '.' ,'-linux-','1' */ - const char *lhs = A; - const char *rhs = B; - while (lhs != AEnd && rhs != BEnd) - { - // Starting points - const char *Slhs = lhs; - const char *Srhs = rhs; - - // Compute ending points were we have passed over the portion - bool Digit = (isdigit(*lhs) > 0?true:false); - for (;lhs != AEnd && (isdigit(*lhs) > 0?true:false) == Digit; lhs++); - for (;rhs != BEnd && (isdigit(*rhs) > 0?true:false) == Digit; rhs++); - - if (Digit == true) - { - // If the lhs has a digit and the rhs does not then < - if (rhs - Srhs == 0) - return -1; - - // Generate integers from the strings. - unsigned long Ilhs = StrToLong(Slhs,lhs); - unsigned long Irhs = StrToLong(Srhs,rhs); - if (Ilhs != Irhs) - { - if (Ilhs > Irhs) - return 1; - return -1; - } - } - else - { - // They are equal length so do a straight text compare - for (;Slhs != lhs && Srhs != rhs; Slhs++, Srhs++) - { - if (*Slhs != *Srhs) - { - /* We need to compare non alpha chars as higher than alpha - chars (a < !) */ - int lc = *Slhs; - int rc = *Srhs; - if (isalpha(lc) == 0) lc += 256; - if (isalpha(rc) == 0) rc += 256; - if (lc > rc) - return 1; - return -1; - } - } - - // If the lhs is shorter than the right it is 'less' - if (lhs - Slhs < rhs - Srhs) - return -1; - - // If the lhs is longer than the right it is 'more' - if (lhs - Slhs > rhs - Srhs) - return 1; - } - } - - // The strings must be equal - if (lhs == AEnd && rhs == BEnd) - return 0; - - // lhs is shorter - if (lhs == AEnd) - return -1; - - // rhs is shorter - if (rhs == BEnd) - return 1; - - // Shouldnt happen - return 1; -} - - /*}}}*/ -// VersionCompare - Comparison for versions /*{{{*/ -// --------------------------------------------------------------------- -/* This fragments the version into E:V-R triples and compares each - portion seperately. */ -int SystemFactory::versionCompare(const char *A, const char *AEnd, const char *B, - const char *BEnd) -{ - // Strip off the epoch and compare it - const char *lhs = A; - const char *rhs = B; - for (;lhs != AEnd && *lhs != ':'; lhs++); - for (;rhs != BEnd && *rhs != ':'; rhs++); - if (lhs == AEnd) - lhs = A; - if (rhs == BEnd) - rhs = B; - - // Compare the epoch - int Res = iVersionCompare(A,lhs,B,rhs); - if (Res != 0) { - return Res; - } - - // Skip the : - if (lhs != A) - lhs++; - if (rhs != B) - rhs++; - - // Find the last - - const char *dlhs = AEnd-1; - const char *drhs = BEnd-1; - for (;dlhs > lhs && *dlhs != '-'; dlhs--); - for (;drhs > rhs && *drhs != '-'; drhs--); - - if (dlhs == lhs) - dlhs = AEnd; - if (drhs == rhs) - drhs = BEnd; - - // Compare the main version - Res = iVersionCompare(lhs,dlhs,rhs,drhs); - if (Res != 0) - return Res; - - // Skip the - - if (dlhs != lhs) - dlhs++; - if (drhs != rhs) - drhs++; - Res = iVersionCompare(dlhs,AEnd,drhs,BEnd); - - return Res; -} - /*}}}*/ -// CheckDep - Check a single dependency /*{{{*/ -// --------------------------------------------------------------------- -/* This simply preforms the version comparison and switch based on - operator. */ -bool SystemFactory::checkDep(const char *DepVer,const char *PkgVer,int Op) -{ - if (DepVer == 0) - return true; - if (PkgVer == 0) - return false; - - // Perform the actuall comparision. - int Res = versionCompare(PkgVer,DepVer); - switch (Op & 0x0F) - { - case pkgCache::Dep::LessEq: - if (Res <= 0) - return true; - break; - - case pkgCache::Dep::GreaterEq: - if (Res >= 0) - return true; - break; - - case pkgCache::Dep::Less: - if (Res < 0) - return true; - break; - - case pkgCache::Dep::Greater: - if (Res > 0) - return true; - break; - - case pkgCache::Dep::Equals: - if (Res == 0) - return true; - break; - - case pkgCache::Dep::NotEquals: - if (Res != 0) - return true; - break; - } - - return false; -} - /*}}}*/ -// BaseVersion - Return the upstream version string /*{{{*/ -// --------------------------------------------------------------------- -/* This strips all the debian specific information from the version number */ -string SystemFactory::baseVersion(const char *Ver) -{ - // Strip off the bit before the first colon - const char *I = Ver; - for (; *I != 0 && *I != ':'; I++); - if (*I == ':') - Ver = I + 1; - - // Chop off the trailing - - I = Ver; - unsigned Last = strlen(Ver); - for (; *I != 0; I++) - if (*I == '-') - Last = I - Ver; - - return string(Ver,Last); + for (unsigned I = 0; I != GlobalListLen; I++) + if (strcmp(VSList[I]->Label,Label) == 0) + return VSList[I]; + return 0; } /*}}}*/ +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/version.h b/apt/apt-pkg/version.h new file mode 100644 index 0000000..263d3c1 --- /dev/null +++ b/apt/apt-pkg/version.h @@ -0,0 +1,93 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: version.h,v 1.2 2002/10/03 16:46:15 niemeyer Exp $ +/* ###################################################################### + + Version - Versioning system.. + + The versioning system represents how versions are compared, represented + and how dependencies are evaluated. As a general rule versioning + systems are not compatible unless specifically allowed by the + TestCompatibility query. + + The versions are stored in a global list of versions, but that is just + so that they can be queried when someone does 'apt-get -v'. + pkgSystem provides the proper means to access the VS for the active + system. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_VERSION_H +#define PKGLIB_VERSION_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/version.h" +#endif + +#include +#include + +// CNC:2002-07-10 +#include + +using std::string; + +class pkgVersioningSystem +{ + public: + // Global list of VS's + static pkgVersioningSystem **GlobalList; + static unsigned long GlobalListLen; + static pkgVersioningSystem *GetVS(const char *Label); + + const char *Label; + + // Compare versions.. + virtual int DoCmpVersion(const char *A,const char *Aend, + const char *B,const char *Bend) = 0; + + // CNC:2002-07-08 + virtual int DoCmpVersionArch(const char *A,const char *Aend, + const char *AA,const char *AAend, + const char *B,const char *Bend, + const char *BA,const char *BAend) + {return DoCmpVersion(A,Aend,B,Bend);}; + virtual int CmpVersionArch(string A,string AA, + const char *B,const char *BA) + { + if (AA.length() == 0 || BA == NULL || *BA == 0) + return DoCmpVersion(A.c_str(),A.c_str()+A.length(), + B,B+strlen(B)); + else + return DoCmpVersionArch(A.c_str(),A.c_str()+A.length(), + AA.c_str(),AA.c_str()+AA.length(), + B,B+strlen(B),BA,BA+strlen(BA)); + }; + virtual bool CheckDep(const char *PkgVer,pkgCache::DepIterator Dep) + {return CheckDep(PkgVer,Dep->CompareOp,Dep.TargetVer());}; + + + virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) = 0; + virtual int DoCmpReleaseVer(const char *A,const char *Aend, + const char *B,const char *Bend) = 0; + virtual string UpstreamVersion(const char *A) = 0; + + // See if the given VS is compatible with this one.. + virtual bool TestCompatibility(pkgVersioningSystem const &Against) + {return this == &Against;}; + + // Shortcuts + APT_MKSTRCMP(CmpVersion,DoCmpVersion); + APT_MKSTRCMP(CmpReleaseVer,DoCmpReleaseVer); + + pkgVersioningSystem(); + virtual ~pkgVersioningSystem() {}; +}; + +#ifdef APT_COMPATIBILITY +#include +#endif + +#endif + +// vim:sts=3:sw=3 diff --git a/apt/apt-pkg/versionmatch.cc b/apt/apt-pkg/versionmatch.cc new file mode 100644 index 0000000..3aec465 --- /dev/null +++ b/apt/apt-pkg/versionmatch.cc @@ -0,0 +1,220 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: versionmatch.cc,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + Version Matching + + This module takes a matching string and a type and locates the version + record that satisfies the constraint described by the matching string. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-pkg/versionmatch.h" +#endif +#include + +#include +#include + +#include +#include + /*}}}*/ + +// VersionMatch::pkgVersionMatch - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Break up the data string according to the selected type */ +pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) +{ + MatchAll = false; + VerPrefixMatch = false; + RelVerPrefixMatch = false; + + if (Type == None || Data.length() < 1) + return; + + // Cut up the version representation + if (Type == Version) + { + if (Data.end()[-1] == '*') + { + VerPrefixMatch = true; + VerStr = string(Data,0,Data.length()-1); + } + else + VerStr = Data; + return; + } + + if (Type == Release) + { + // All empty = match all + if (Data == "*") + { + MatchAll = true; + return; + } + + // Are we a simple specification? + string::const_iterator I = Data.begin(); + for (; I != Data.end() && *I != '='; I++); + if (I == Data.end()) + { + // Temporary + if (isdigit(Data[0])) + RelVerStr = Data; + else + RelArchive = Data; + + if (RelVerStr.length() > 0 && RelVerStr.end()[-1] == '*') + { + RelVerPrefixMatch = true; + RelVerStr = string(RelVerStr.begin(),RelVerStr.end()-1); + } + return; + } + + char Spec[300]; + char *Fragments[20]; + snprintf(Spec,sizeof(Spec),"%s",Data.c_str()); + if (TokSplitString(',',Spec,Fragments, + sizeof(Fragments)/sizeof(Fragments[0])) == false) + { + Type = None; + return; + } + + for (unsigned J = 0; Fragments[J] != 0; J++) + { + if (strlen(Fragments[J]) < 3) + continue; + + if (stringcasecmp(Fragments[J],Fragments[J]+2,"v=") == 0) + RelVerStr = Fragments[J]+2; + else if (stringcasecmp(Fragments[J],Fragments[J]+2,"o=") == 0) + RelOrigin = Fragments[J]+2; + else if (stringcasecmp(Fragments[J],Fragments[J]+2,"a=") == 0) + RelArchive = Fragments[J]+2; + else if (stringcasecmp(Fragments[J],Fragments[J]+2,"l=") == 0) + RelLabel = Fragments[J]+2; + else if (stringcasecmp(Fragments[J],Fragments[J]+2,"c=") == 0) + RelComponent = Fragments[J]+2; + } + + if (RelVerStr.end()[-1] == '*') + { + RelVerPrefixMatch = true; + RelVerStr = string(RelVerStr.begin(),RelVerStr.end()-1); + } + return; + } + + if (Type == Origin) + { + OrSite = Data; + return; + } +} + /*}}}*/ +// VersionMatch::MatchVer - Match a version string with prefixing /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgVersionMatch::MatchVer(const char *A,string B,bool Prefix) +{ + const char *Ab = A; + const char *Ae = Ab + strlen(A); + + // Strings are not a compatible size. + if ((unsigned)(Ae - Ab) != B.length() && Prefix == false || + (unsigned)(Ae - Ab) < B.length()) + return false; + + // Match (leading?) + if (stringcasecmp(B,Ab,Ab + B.length()) == 0) + return true; + + return false; +} + /*}}}*/ +// VersionMatch::Find - Locate the best match for the select type /*{{{*/ +// --------------------------------------------------------------------- +/* */ +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; + continue; + } + + for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++) + if (FileMatch(VF.File()) == true) + return Ver; + } + + // This will be Ended by now. + return Ver; +} + /*}}}*/ +// VersionMatch::FileMatch - Match against an index file /*{{{*/ +// --------------------------------------------------------------------- +/* This matcher checks against the release file and the origin location + to see if the constraints are met. */ +bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File) +{ + if (Type == Release) + { + if (MatchAll == true) + return true; + +/* cout << RelVerStr << ',' << RelOrigin << ',' << RelArchive << ',' << RelLabel << endl; + cout << File.Version() << ',' << File.Origin() << ',' << File.Archive() << ',' << File.Label() << endl;*/ + + if (RelVerStr.empty() == true && RelOrigin.empty() == true && + RelArchive.empty() == true && RelLabel.empty() == true && + RelComponent.empty() == true) + return false; + + if (RelVerStr.empty() == false) + if (File->Version == 0 || + MatchVer(File.Version(),RelVerStr,RelVerPrefixMatch) == false) + return false; + if (RelOrigin.empty() == false) + if (File->Origin == 0 || + stringcasecmp(RelOrigin,File.Origin()) != 0) + return false; + if (RelArchive.empty() == false) + { + if (File->Archive == 0 || + stringcasecmp(RelArchive,File.Archive()) != 0) + return false; + } + if (RelLabel.empty() == false) + if (File->Label == 0 || + stringcasecmp(RelLabel,File.Label()) != 0) + return false; + if (RelComponent.empty() == false) + if (File->Component == 0 || + stringcasecmp(RelComponent,File.Component()) != 0) + return false; + return true; + } + + if (Type == Origin) + { + if (OrSite.empty() == false) + if (File->Site == 0 || + OrSite != File.Site()) + return false; + return true; + } + + return false; +} + /*}}}*/ diff --git a/apt/apt-pkg/versionmatch.h b/apt/apt-pkg/versionmatch.h new file mode 100644 index 0000000..f4bd02d --- /dev/null +++ b/apt/apt-pkg/versionmatch.h @@ -0,0 +1,72 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: versionmatch.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + Version Matching + + This module takes a matching string and a type and locates the version + record that satisfies the constraint described by the matching string. + + Version: 1.2* + Release: o=Debian,v=2.1*,c=main + Release: v=2.1* + Release: * + Origin: ftp.debian.org + + Release may be a complex type that can specify matches for any of: + Version (v= with prefix) + Origin (o=) + Archive (a=) + Label (l=) + Component (c=) + If there are no equals signs in the string then it is scanned in short + form - if it starts with a number it is Version otherwise it is an + Archive. + + Release may be a '*' to match all releases. + + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_VERSIONMATCH_H +#define PKGLIB_VERSIONMATCH_H + +#ifdef __GNUG__ +#pragma interface "apt-pkg/versionmatch.h" +#endif + +#include +#include + +using std::string; + +class pkgVersionMatch +{ + // Version Matching + string VerStr; + bool VerPrefixMatch; + + // Release Matching + string RelVerStr; + bool RelVerPrefixMatch; + string RelOrigin; + string RelArchive; + string RelLabel; + string RelComponent; + bool MatchAll; + + // Origin Matching + string OrSite; + + public: + + enum MatchType {None = 0,Version,Release,Origin} Type; + + bool MatchVer(const char *A,string B,bool Prefix); + bool FileMatch(pkgCache::PkgFileIterator File); + pkgCache::VerIterator Find(pkgCache::PkgIterator Pkg); + + pkgVersionMatch(string Data,MatchType Type); +}; + +#endif diff --git a/apt/apt.dia b/apt/apt.dia deleted file mode 100644 index 631d864edd68a716778c294fc0f9e51172d886f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6746 zcmYM2WmFW-_wZ??G3Zvhy9ERRrE38}x|i;51qrETNnw#@kwxiPx^sc0Te@3V(m(#b z=Q+=O-pq@c8#DLJoqHMLo}m42U>=$ndoCzdg&-=mI4U>nk0_9%XTgAce(JQ$J_+Qe-uhKxgQ;v0I(WDm!J z5OW(nyH^Z@p(S?Z^^m33wuohKpB##-_a-KYEh|6&(?2)kL&nRAvd1mNTw6cQ1FpNS z`2JiW5c;8uEurV(bDgKRHKV`G(kq3)eT2dZ~dF7q1(vXQwEyXUB^a(YAI5|jnpaM(wBJK9NbaPd9Yckm0T zV{$>T&CS3KUw3FST2>=Li1lmKJ+oP`AeUtI)!%FgpZ?3U+kG?5C^lJ*s_VN8Vq(

TQ@uI2 zl4-qbnAOm$ih3c|enO64DQnVtw{H7!1Ce|Gu)x>GeTD&Uf93bXGfo070r@=|7*wEy z$ZClev)LvwTw$@Sr9axbY3koT_pRp}mSU1^?$spS;O4jnm(KX3qWR}O`F&M()wo-J z4gn~1F6ER{@SK(Jzpv}p4S_jkolBKlNv>%A=~d#VO}g%itR6$Ip0+_QL}LnBKK z97&C6BdUh)E&=5nXlyT;%51b}gZOD*|6MORWoA2Ie#Gfhjv%#EN5h)NPWVKa$3zj1 zX3f$@EIiFcxMr9VGqlTf>B2{3teQ;fb`>e$9GC!UQ{y|6#gqF74SH!T?pS*Rz6&E! z!>m3Vt`_5Q`iAq*0O1QYT*;4zBrQnT?_KxI_73 zhiT23hK465%K`hPw#)ZP%O^GWv32~fMuMJbd57UBMon&K%h(gSe+_?uNh}QYoDpgs;S=Uz~X?Cf#=iNk=uwHoesfw zxD?mq&tv5xy@;Oh>3AXaV}q_-haQ9ss8?t|s7*a9z2~~`)NZhzF)oTb>s=h{#Z-Rs zH-Fa)6F(((+wpF6kdg=vl8ql2h7RM`Ej(&sFM8{ve&zF3({bhi{J!IsGgU>fql-Lq zl3Q5j)1DG*his`SZl$WUPmDi z_?>-e`^W80;!ozIgBLI*u8_+TZ`Fc8GX@10oJOh*TVc#G6x_ujbBi52A3rTJ(u_p0ssrS2bL5YPI(! zn18CYqzvO~KR2B&?R~cw7P>{86dcTV$?q&E)-_~4k9hWosKOX((q)~pUY?lQ@B^i{h0uHlDQ3P;v$iG*g`af#IgotlpzY*AE@ejd8&*lhHM zS)+yv2MW1mz5%X%d51{g_HPWhxe2ZV#iOM+6B)H!e<2@EV^pl3yvKW={n8=mWotXH zy$Z<~N!lQrD;d^B7f8;v$KPl$#|odwar z=N_B&{JHTIW@0h=*7Z|tEsD9o3uBn(Us|%^=IiT&Q{0q2@|h3lZRqA(B*yZt7okUP zD{yRa88fFtwfD_YKI%O%{~U_+>&o@(2vH*EtfuU(?V!_j^*34y&BeR0IcmJ`uN4A| zEfIIG{#F4eyq%hrCSd-9CXs`?E5^hy`FUm4q4rWhN&ZM29oOxhs&$be8LDG_S{zQCZXOLH5VAW zmg&)StUO*{!j8zb*w|Lr9}a}9A*Fw6;&OUPFY%Nr`2xn(94RKv?Ozatm*4LiNRGTAD7bhg z(p0gsqdz-4XO2rv%(}j?-XFHq&^}KZOEuMDNW|@GjJy&zz|@S$0dMw#TjM&YD-0!l z#7-eSil$B@cWeaF+_Y70K5OU?lO`u>m(*@9zu4bM zu@>jPiC>!R0aDEzqn;Q#k4$XI0T(W4Jn2D3sWxxE@KPuE*A}~C`_K}s%3;GJz6*@M zANobkP4_y9d^=TDK~6=E8oQ7uYFe^5IEiIXyeI|nfODf%u^Y&utbm{uEm5SMG99=$ z>@{-tIuO69JUBZPG<_?s^2j`)@;a9dmR}oASBxRj5^%G-B2H$ZxI%!P8*KiaFq2cx z@cV?+<)OIb8QdjITP2@~kcF_Kdo2C@`XK0|KZ<64k~Ve~$L|H#1RFDO^oI|onFboo z?{KGfDhv5AT|T5HEzEN3R9L6dJJP1}Y)@h34{eq5e#*D&Y4L>$qtHB|l{oib!r_{_ z(poYtv&$$~yKr}OjLe@|w|ll#lxCW}+s1p1GeFfEPFX~(<)w{X;~#}F$G5jCctl6i^j^Jsfr@x3q1Re|+{eX4u?%-!aftBNd@#cBV6ChN@*MHr2|i zfbx3YnpCGlA3V2DlAg_^JF0C2iLI{}iKWSkDvpMa=QnI`1@VS_u5~k33bTF)4fnV! zhEQCa6fW)ix|Cd(P!U43hqsqF3FZZQ6GupF~1-n^H?`P8c}&H@2K{ z!@D_MIMX=D3)7~Cn0FL|ZXQ#&5(P;9Ro_>Qp`DroJn*;pA5zPNys<8|-&{b(6sgB* zBNi*Ri5oLOVqqMTH~H(V^0*1cEV6)oZlS@2J?|_kB80IoU876kZhzb>fbRvAcN(&9 zh|H|(v&T`bMKTl&w2QMwgc)C*(2fW!D_XuI6I)34-zr-3aP3rH^4>sbhoyWIkJY3f zkI9blUXmo%nqR)`(W8zGvlhTKu@AqajuoENC#s#xPMW!FSnLuTOvs{!qNZ`F?-*a1FrOW1;*P7GkzH4rQzYej zCQt~U)4e#TTPx|MeA;olIPNCGapNue86vFs3E#KOO>A)5Re<|qI;B>vs1GTn%Mj>k zAsS)qEl2w76c*W8%o)XLJTPrSF{PO9(J@fROaPIF!JO{ZK`lPulu3sIZE#(PmoDCL z_m&Pxno4(JE_>MPQI`R!b>-4zZXZ77?3K)oSC|W@)rjdCwerakf2?x{wfna1IqbQs zocXI$a+GfN)l-IHG327!`Q=Uwo@%d8RIcHGC3k*__p>ow%Ss`uW(5Rg$mRDEi;qLC z`P-Z-@+a>fnIn`@bVQ}nXU7h~R-X?9vMFPbvge(~#E2{pjIIjBLP{u!GN@(BM3~>O zzp?jx0zPD#6twX3B?Y=aK;U-az+&-ZQh6(s1d!ljWys{s{}T!bMCq++8P8A!VfZ^P zy<=ykqxX8>5#b!r#(F~4g$O~_%wJ7o@Yq87C?wPenC_VGoW4MsUWa(tf{%!0!{IYw zkgVNyo6M;L_z|hB70N$ioOodM91xPD$#=GUZGfTm$e1k}&nY=0*9tESjLbXtr}lGKKY?cpji@ zNy@%NF{9#tXpQkIl9#GMusJiUIzKSFqDg;cuqat9%C4ZgS}x($D&5-tElHTd%kX1M z(&1-vYRS!~HhrG6RA6$Mz>Hae9#eN6v_9GiP#GKu==tyt;t^N^WkzOr1d0P{2Q*j?_a{a2k?9(Yk;{RGH2j@0n!iOMoIYRuA9` z0E^=TZ00Eh)4sa;`$F*vT<`AD@;Wt+=%7&b5GX)v$-5Bx4)AZolrDfJQ2`M1g5&mO z@ZbY6;Iqi-*W(#Efb*GdQN$kX)&E42l|h%GoZhrhXs|o%$?E1#R~hH;OqY*z<8px4 zYbEm7Qzpufn*V3$Jpgbct_N1pj(&-p`F@}Uh-&QhW>?pnVwD9zp<9ywT=}PauM#TQ z_Z{jL8_ST}x@H#*)fpCrp&as|qSs|Q0FnRiPAC9;7z2fJs*0Rq##LB#yc0Q5v(J=N z4Yq&14lf*ytSR`8H_QdYi4Y>QK5HGTXqYnq;Y&BjAP@om4}JSVr|v#)K9>ngauJ=n z7Q{$VB15fn?%F;JJlMpjb3htgp*v#Xm)5|ZMoMU~}PIdf%LL6>`%sK-mh|eJ>m*@c)R-k zk;doJp`+*$RRgFtaEI+mFCo!r)I{}BXEN?=s+pz=9_zDqOs?PRGv1zmpq&=C+=hPl)K#4ld|T-?|*qK0Bv6tvKmEAUJhCBRH)(1 zRv0Y~G6%S@7chc4Z%n@wE-*RLlVatz9#v89Co!LqKHHs8u?ELk6qMscQ`Z#=*z$WN zaFl~o^QYs_$%1)=`|}0WRH6;!C_ig3?7H+#JQ&t{w^qV>6(1gEPJ>QaxweFr(-w(5 z#4OcmXiOHPA`M>G2k>7+4CJL?LfgAU<;3_h$AEf1AVEJ_yG)1p5|JO-DpAnsMl?l7c{(W|a2?+`trF{!7b8qF1Ys?6SQ zax3ZNME%z0oRom&UyWa@+cnLNmxuSd=KX^Ampe>!z(*MR^5vh>Nvd}(L87L{Eq7<0 zq9%8QX0|dxV6(65XQuR-sx+*iFRyOh(uHR^)LlIObxuYWQYq5wuOGT_M-`pq$E<@S zS_T`swCi01{i|Ge5?(%SkcJaw*-qZeM^X> zZs9rYK|8;y&y9&8BiM~n8%Iga$ibx;jm@igRW8z{_6cpKYbFu9Sk;<}u#l6EMCo%E ze}(W6O`vN@76j@Y*2bi#FQk-2tys_17x1us2Okv3{j3b;WT$YTsn=KN| zH&Xfo=80d~4m(pnHtd>m=$p`n9DEFI3Nrr2cTY#1qz)r)lq3olmLV_zZl#KbNt)kL zg6ZFh5Ofm5;uCE=Z7Wg{nO6ol za?-C<*mT~5rR|x2rTM6@aL9K01bmbfFrP!A($Y3k} zM&Tq2Q_v(_MHBQ%E%ydG{Q?1F3QvcE5vsb%mWf=OLsFt*-t5eO^%|AIG@mWcM3TE1 zSXqzPJR@tZQjC*E!dRwd8Y7f$Y~Qco=gD>!7PPZ`bT?$)Kt`v`|MHsryfg#hHEX%{ zy517`?=GKjA2mD{y_=a7_Pb9;;4^foFp1A&F+?yhJrUTdW9`0u#y+9Qo0A7h3H^v$ zCqFjjLOA3-tIAK}Y|!;`trSi&Oo$*1>6(Q3$KCvlR{QqeB5 z6UckEyJ$|Hx13^fWO@&@=x|Y`qr0j96r@;2b76-Yo97E8Og|w5xa-!cVUBugFR7~W z|2{e0hsEhAzhDK9r7HAA#ax6hph?c?W@7DqPwfD!0lS=%pqhdocpT;hBR_kK7$i$y z>eG*e=L?@+HzWwT{yN0#)u~lA6~@1aG(?h&rnU5rRCR{0pNw6Y2>d(ogx<#zy6^5^ zS4%mPmdHc6E@G$rP7-3efjqBVND`L8obfBxL!13Y9%l(czy;9lmKcNk8d6+7k%tK> zkwoFssFhwQsk0~>zmyW!$bXRcTgxlI#REonN&Z>)j;4;7vnAhDOb+(1m!SGtK}nz9 zQR6;(xJRuPvi=ob)KQ~59UNrKCrUL#T|SOEdn@Q=E;7J)G}QD*?bBHTy>wQu?~n0* zcuG+pfklqPPkv%j65+wLLO`s__XVMTPX#0Oncp}JkPt_rby@<$lZ*z;80>4TlHSy_ zGC3JlS>=o>Yo&;tri&5(@(<9D?7lz~G@23>dLS(BoQmUulrQ^_0txQmmn$9*aUKHs zWqAOS|8K}_(^>uK?TnYd4%TT&L-Sr~FhG40T5 z^MQ%Ue1m4Ym@zefg;I~g*?jF<0vLEfMp@8vz}61?a9X>~IR7yXPXSM%xn~SjV^fgH zE`Zx|d_ftzF_I;1St_aqrsU)iqBFODR7j(6ezootKuf6-#U5^dEGH~u^&t-Ydz$FW z%WGUlDAqcw7jAw9YHlCtS*+k1=yfN~g?R`O`mfH_$88I*cL*b=ovsTnKa`Zy8-a5V zaAA!-wao#)(b*lF(hNB=9?;m7Y?T`76yWtfw9y8}Xaw&=ZfDnLHz!6+2-ezxRXx6j;h&8-|io|gw(RY*B#rplC9e6y)K z3&QCGoyH@Q^o>S~eC0?c<9hg6+3=5oM{60<#EB!>iDUb32G5!EGkS=#*A1vq|L#C46Zu7_Omhp%^FE6;#e^>^{W^ar=B4bY3mPKU zg*C=)ODdBk;;VaF;0Hm3R5nZJP-xD`v)?hcF*PD8Yt=>qnr0G9EY{$Az)4c*obm+! z<`7LpOFlB21xyHlb;b0HG!;*pl)SM{fHmW1vgBQsN1Tip)y--wC88Epg~{a|xVxX2 z=5)w}IK-uT7(`JIQ~y?^h%oKZ+?2fL7rqt`$-CS0Uzg8#@hk{KVyd?1@OqBmy= +# ifdef APT_DOMAIN +# define _(x) dgettext(APT_DOMAIN,x) +# else +# define _(x) gettext(x) +# endif +#else +// apt will not use any gettext +# define setlocale(a, b) +# define _(x) x +#endif diff --git a/apt/buildlib/archtable b/apt/buildlib/archtable index 252f39d..22cc899 100644 --- a/apt/buildlib/archtable +++ b/apt/buildlib/archtable @@ -23,3 +23,4 @@ sh sh hppa.* hppa ia64 ia64 s390 s390 +s390x s390x diff --git a/apt/buildlib/config.guess b/apt/buildlib/config.guess index bf5a9b3..f1657bb 100755 --- a/apt/buildlib/config.guess +++ b/apt/buildlib/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2001-02-23' +timestamp='2002-09-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,8 +24,9 @@ timestamp='2001-02-23' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner . -# Please send patches to . +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -52,7 +53,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -87,33 +88,43 @@ if test $# != 0; then exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +dummy=$tmpdir/dummy ; +files="$dummy.c $dummy.o $dummy.rel $dummy" ; +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 - if test $? = 0 ; then - CC_FOR_BUILD="$c"; break - fi - done - rm -f $dummy.c $dummy.o $dummy.rel + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found + CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac +esac ; +unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi @@ -127,29 +138,31 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or + # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then @@ -171,6 +184,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -179,6 +231,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build cat <$dummy.s .data \$Lformat: @@ -206,7 +259,7 @@ main: EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - case `./$dummy` in + case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; @@ -225,9 +278,15 @@ EOF 2-307) UNAME_MACHINE="alphaev67" ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi - rm -f $dummy.s $dummy + rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) @@ -242,29 +301,11 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -286,6 +327,10 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -314,7 +359,7 @@ EOF echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -328,9 +373,6 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -357,18 +399,6 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -385,6 +415,7 @@ EOF echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ @@ -407,11 +438,20 @@ EOF } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -459,7 +499,7 @@ EOF ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) @@ -472,6 +512,7 @@ EOF exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include @@ -483,8 +524,8 @@ EOF exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -493,7 +534,7 @@ EOF fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else @@ -533,10 +574,8 @@ EOF 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 @@ -545,12 +584,13 @@ EOF case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include @@ -583,10 +623,10 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy && rmdir $tmpdir + fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; @@ -595,6 +635,7 @@ EOF echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int @@ -620,8 +661,8 @@ EOF exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -630,7 +671,7 @@ EOF 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; - *9??*:MPE/iX:*:*) + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) @@ -639,7 +680,7 @@ EOF hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; - i?86:OSF1:*:*) + i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else @@ -649,9 +690,6 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -670,16 +708,14 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' @@ -693,19 +729,13 @@ EOF CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) @@ -715,10 +745,19 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -729,6 +768,9 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i386-pc-interix3 + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -754,103 +796,49 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - cat >$dummy.c < /* for printf() prototype */ -int main (int argc, char *argv[]) { -#else -int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) - # Determine Lib Version - cat >$dummy.c < -#if defined(__GLIBC__) -extern char __libc_version[]; -extern char __libc_release[]; -#endif -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined(__GLIBC__) - printf("%s %s\n", __libc_version, __libc_release); -#else - printf("unknown\n"); -#endif - return 0; -} -EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then LIBC="libc1" ; fi - fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) - cat <$dummy.s - .data - \$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - .text - .globl main - .align 4 - .ent main - main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) UNAME_MACHINE="alpha" ;; - 1-0) UNAME_MACHINE="alphaev5" ;; - 1-1) UNAME_MACHINE="alphaev56" ;; - 1-101) UNAME_MACHINE="alphapca56" ;; - 2-303) UNAME_MACHINE="alphaev6" ;; - 2-307) UNAME_MACHINE="alphaev67" ;; - esac - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) @@ -870,87 +858,73 @@ EOF sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; - sparc:Linux:*:*) + sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; - *:Linux:*:*) + i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_emulations=`cd /; ld --help 2>&1 \ - | sed -ne '/supported emulations:/!d + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g - s/.*supported emulations: *// + s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_emulations" in - i?86linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 - ;; - elf_i?86) + case "$ld_supported_targets" in + elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - i?86coff) + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 - ;; - esac - - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - test -z "$ld_supported_emulations" \ - && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; esac # Determine whether the default compiler is a.out or elf - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) + i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, @@ -958,7 +932,7 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} @@ -966,34 +940,33 @@ EOF echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i?86:*:5:7*) - # Fixed at (any) Pentium or better - UNAME_MACHINE=i586 - if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; - i?86:*:3.2:*) + i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i?86:*DOS:*:*) + i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) @@ -1019,9 +992,12 @@ EOF # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1032,13 +1008,13 @@ EOF 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) @@ -1047,7 +1023,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) @@ -1067,8 +1043,8 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) @@ -1080,6 +1056,10 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; @@ -1108,6 +1088,9 @@ EOF SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1118,15 +1101,17 @@ EOF echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1149,7 +1134,7 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i?86:OS/2:*:*) + i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx @@ -1172,11 +1157,18 @@ EOF *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +eval $set_cc_for_build cat >$dummy.c < @@ -1291,8 +1283,8 @@ main () } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. diff --git a/apt/buildlib/config.h.in b/apt/buildlib/config.h.in index ca560b7..2975658 100644 --- a/apt/buildlib/config.h.in +++ b/apt/buildlib/config.h.in @@ -16,6 +16,9 @@ /* The number of bytes in a unsigned short. */ #undef SIZEOF_SHORT +/* Define if we have the timegm() function */ +#undef HAVE_TIMEGM + /* These two are used by the statvfs shim for glibc2.0 and bsd */ /* Define if we have sys/vfs.h */ #undef HAVE_VFS_H @@ -26,15 +29,6 @@ /* Define if we have enabled pthread support */ #undef HAVE_PTHREAD -/* I hate this */ -#undef HAVE_DB1_DB_H - -/* The system has rpm installed */ -#undef HAVE_RPM - -/* This system uses RPM 4 */ -#undef HAVE_RPM4 - /* If there is no socklen_t, define this for the netdb shim */ #undef NEED_SOCKLEN_T_DEFINE @@ -49,3 +43,12 @@ /* The package name string */ #undef PACKAGE + +/* CNC:2002-07-03 */ +#undef HAVE_RPM +#undef HAVE_RPM4 +#undef HAVE_RPM41 +#undef HAVE_SETLOCALE +#undef HAVE_LOCALE_H +#undef HAVE_LIBINTL_H +#undef LOCALEDIR diff --git a/apt/buildlib/config.sub b/apt/buildlib/config.sub index ddbbfe5..1dea9b7 100755 --- a/apt/buildlib/config.sub +++ b/apt/buildlib/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2001-02-16' +timestamp='2002-09-05' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -29,7 +29,8 @@ timestamp='2001-02-16' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Please send patches to . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -117,7 +118,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -157,6 +158,14 @@ case $os in os=-vxworks basic_machine=$1 ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; @@ -215,24 +224,46 @@ esac case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ - | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ - | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | hppa64 \ - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ - | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ - | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp10 | pdp11 \ - | mips16 | mips64 | mipsel | mips64el \ - | mips64orion | mips64orionel | mipstx39 | mipstx39el \ - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el | mcore \ - | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v | d30v | fr30 | avr | openrisc) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -240,13 +271,13 @@ case $basic_machine in basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. - i[234567]86 | x86_64) + i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -255,30 +286,56 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - # FIXME: clean up the formatting here. - vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ - | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | hppa2.0n-* | hppa64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ - | alphaev6[78]-* \ - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ - | clipper-* | orion-* \ - | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* | mcore-* \ - | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ - | [cjt]90-* \ - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ - | bs2000-* | tic54x-* | c54x-* | x86_64-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39 | mipstx39el \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -341,6 +398,10 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -361,16 +422,8 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) @@ -385,6 +438,14 @@ case $basic_machine in decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -505,19 +566,19 @@ case $basic_machine in basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) + i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[34567]86v4*) + i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[34567]86v) + i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[34567]86sol2) + i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; @@ -565,14 +626,6 @@ case $basic_machine in basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -587,6 +640,10 @@ case $basic_machine in basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos @@ -666,6 +723,10 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -688,19 +749,19 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) @@ -715,15 +776,25 @@ case $basic_machine in power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; @@ -741,10 +812,22 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent ;; @@ -752,7 +835,7 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -818,10 +901,22 @@ case $basic_machine in basic_machine=i386-sequent os=-dynix ;; - t3e) - basic_machine=t3e-cray + t3d) + basic_machine=alpha-cray os=-unicos ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -832,6 +927,10 @@ case $basic_machine in tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -856,8 +955,8 @@ case $basic_machine in os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -878,13 +977,17 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - xmp) - basic_machine=xmp-cray - os=-unicos + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim @@ -905,13 +1008,6 @@ case $basic_machine in op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; @@ -931,13 +1027,16 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4) + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; - sparc | sparcv9) + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -952,9 +1051,8 @@ case $basic_machine in pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff + *-unknown) + # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 @@ -1012,16 +1110,19 @@ case $os in | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in - x86-* | i[34567]86-*) + x86-* | i*86-*) ;; *) os=-nto$os @@ -1068,14 +1169,20 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1114,8 +1221,8 @@ case $os in -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint ;; -none) ;; @@ -1148,10 +1255,11 @@ case $basic_machine in arm*-semi) os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1178,6 +1286,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -1241,19 +1352,19 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1325,7 +1436,7 @@ case $basic_machine in -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) @@ -1340,6 +1451,9 @@ case $basic_machine in -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/apt/buildlib/configure.mak b/apt/buildlib/configure.mak index c6eca19..9575687 100644 --- a/apt/buildlib/configure.mak +++ b/apt/buildlib/configure.mak @@ -10,10 +10,10 @@ # CONVERTED - List of files output by configure $(BUILD) is prepended # The caller must provide depends for these files # It would be a fairly good idea to run this after a cvs checkout. -BUILDDIR=. +BUILDDIR=build .PHONY: startup -startup: configure $(BUILDDIR)/config.status $(addprefix $(BUILDDIR)/,$(CONVERTED)) +startup: configure $(BUILDDIR)/config.status $(addprefix $(BUILDDIR)/,$(CONVERTED)) configure: aclocal.m4 configure.in autoconf diff --git a/apt/buildlib/defaults.mak b/apt/buildlib/defaults.mak index 3ecf4ba..4d05e5e 100644 --- a/apt/buildlib/defaults.mak +++ b/apt/buildlib/defaults.mak @@ -70,6 +70,9 @@ LIB := $(BIN) OBJ := $(BUILD)/obj/$(SUBDIR) DEP := $(OBJ) DOC := $(BUILD)/docs +PO := $(BUILD)/po +LOCALE := $(BUILD)/locale +PO_DOMAINS := $(BUILD)/po/domains # Module types LIBRARY_H = $(BASE)/buildlib/library.mak @@ -81,6 +84,7 @@ COPY_H = $(BASE)/buildlib/copy.mak YODL_MANPAGE_H = $(BASE)/buildlib/yodl_manpage.mak SGML_MANPAGE_H = $(BASE)/buildlib/sgml_manpage.mak FAIL_H = $(BASE)/buildlib/fail.mak +PODOMAIN_H = $(BASE)/buildlib/podomain.mak include $(BUILD)/environment.mak @@ -109,7 +113,7 @@ CPPFLAGS+= -I$(INCLUDE) LDFLAGS+= -L$(LIB) # Directors to create -MKDIRS := $(BIN) +MKDIRS := $(BIN) # Phony rules. Other things hook these by appending to the dependency # list diff --git a/apt/buildlib/environment.mak.in b/apt/buildlib/environment.mak.in index af595a9..f7deaec 100644 --- a/apt/buildlib/environment.mak.in +++ b/apt/buildlib/environment.mak.in @@ -1,6 +1,8 @@ # This file contains everything that autoconf guessed for your system. # if you want you can edit it, just don't re-run configure. +PACKAGE = @PACKAGE@ + # C++ compiler options CC = @CC@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT @@ -18,7 +20,9 @@ SOCKETLIBS:= @SOCKETLIBS@ AR:=@AR@ RANLIB:=@RANLIB@ -RPMLIBS:=@RPMLIBS@ +# CNC:2002-07-03 +# RPM stuff +RPMLIBS:= @RPMLIBS@ # Dep generation - this only works for gnu stuff GCC3DEP = @GCC3DEP@ @@ -33,6 +37,13 @@ NSGMLS = @NSGMLS@ SGMLSPL = @SGMLSPL@ DOCBOOK2MAN := $(wildcard /usr/lib/perl5/sgmlspl-specs/docbook2man-spec.pl) +# Gettext settings +GMSGFMT = @GMSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGCOMM:=$(dir $(XGETTEXT))/msgcomm +MSGMERGE:=$(dir $(XGETTEXT))/msgmerge +BASH = @BASH@ + # Various library checks PTHREADLIB = @PTHREADLIB@ PYTHONLIB = @PYTHONLIB@ @@ -45,11 +56,13 @@ DB2LIB = @DB2LIB@ # Shim Headerfile control HAVE_C9X = @HAVE_C9X@ HAVE_STATVFS = @HAVE_STATVFS@ +HAVE_TIMEGM = @HAVE_TIMEGM@ NEED_SOCKLEN_T_DEFINE = @NEED_SOCKLEN_T_DEFINE@ # Shared library things HOST_OS = @host_os@ -ifneq ($(words $(filter linux-gnu gnu%,$(HOST_OS))),0) +# CNC:2002-07-25 +ifneq ($(words $(filter linux% gnu%,$(HOST_OS))),0) SONAME_MAGIC=-Wl,-soname -Wl, LFLAGS_SO= else diff --git a/apt/buildlib/library.mak b/apt/buildlib/library.mak index fb944cf..de8833c 100644 --- a/apt/buildlib/library.mak +++ b/apt/buildlib/library.mak @@ -8,6 +8,7 @@ # $(LIBRARY) - The name of the library without lib or .so # $(MAJOR) - The major version number of this library # $(MINOR) - The minor version number of this library +# $(APT_DOMAIN) - The text domain for this library # All output is writtin to .opic files in the build directory to # signify the PIC output. @@ -23,6 +24,9 @@ $(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LOCAL)-SLIBS := $(SLIBS) $(LOCAL)-LIBRARY := $(LIBRARY) +TYPE = src +include $(PODOMAIN_H) + # Install the command hooks headers: $($(LOCAL)-HEADERS) library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) @@ -45,7 +49,7 @@ $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MA ln -sf $( /dev/null @@ -66,4 +70,4 @@ $(OBJ)/%.opic: %.cc The_DFiles = $(wildcard $($(LOCAL)-DEP)) ifneq ($(words $(The_DFiles)),0) include $(The_DFiles) -endif +endif diff --git a/apt/mkinstalldirs b/apt/buildlib/mkinstalldirs similarity index 89% rename from apt/mkinstalldirs rename to apt/buildlib/mkinstalldirs index 8d29ca1..3b4441a 100755 --- a/apt/mkinstalldirs +++ b/apt/buildlib/mkinstalldirs @@ -1,10 +1,11 @@ #! /bin/sh +# CNC:2002-07-08 # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.1 2000/09/13 21:58:08 kojima Exp $ +# $Id: mkinstalldirs,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ errstatus=0 diff --git a/apt/buildlib/podomain.mak b/apt/buildlib/podomain.mak new file mode 100644 index 0000000..602e9e0 --- /dev/null +++ b/apt/buildlib/podomain.mak @@ -0,0 +1,22 @@ +# -*- make -*- + +# This creates the file listing used by xgettext and friends based on the +# declared domain of the make file. It also arranges to set the DOMAIN +# CPPFLAG for the compilation. + +MY_DOMAIN := $(PACKAGE) +ifdef APT_DOMAIN +$($(LOCAL)-OBJS): CPPFLAGS := $(CPPFLAGS) -DAPT_DOMAIN='"$(APT_DOMAIN)"' +MY_DOMAIN := $(APT_DOMAIN) +endif + +MKDIRS += $(PO_DOMAINS)/$(MY_DOMAIN) +$(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: SRC := $(addprefix $(SUBDIR)/,$(SOURCE)) +$(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: makefile + (echo $(SRC) | xargs -n1 echo) > $@ +all: $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list + +veryclean: veryclean/$(LOCAL) +veryclean/po/$(LOCAL): LIST := $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list +veryclean/po/$(LOCAL): + rm -f $(LIST) diff --git a/apt/buildlib/program.mak b/apt/buildlib/program.mak index a89dc5e..e0e7631 100644 --- a/apt/buildlib/program.mak +++ b/apt/buildlib/program.mak @@ -24,6 +24,9 @@ program: $(BIN)/$(PROGRAM) clean: clean/$(LOCAL) veryclean: veryclean/$(LOCAL) +TYPE = src +include $(PODOMAIN_H) + # Make Directories MKDIRS += $(OBJ) $(DEP) $(BIN) diff --git a/apt/buildlib/python.mak b/apt/buildlib/python.mak new file mode 100644 index 0000000..02345c2 --- /dev/null +++ b/apt/buildlib/python.mak @@ -0,0 +1,68 @@ +# -*- make -*- + +# This creates a python shared module. + +# Input +# $(SOURCE) - The source code to use +# $(MODULE) - The name of the module without module or .so + +# All output is writtin to .opic files in the build directory to +# signify the PIC output. + +# See defaults.mak for information about LOCAL + +# Some local definitions +LOCAL := $(MODULE)module.so +$(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE))))) +$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE))))) +$(LOCAL)-SLIBS := $(SLIBS) +$(LOCAL)-MODULE := $(MODULE) + +# Install the command hooks +library: $(LIB)/$(MODULE)module.so +clean: clean/$(LOCAL) +veryclean: veryclean/$(LOCAL) + +# Make Directories +MKDIRS += $(OBJ) $(DEP) $(LIB) + +# The clean rules +.PHONY: clean/$(LOCAL) veryclean/$(LOCAL) +clean/$(LOCAL): + -rm -f $($(@F)-OBJS) $($(@F)-DEP) +veryclean/$(LOCAL): clean/$(LOCAL) + -rm -f $($(@F)-HEADERS) $(LIB)/$($(@F)-MODULE)module.so* + +# The binary build rule. +ifdef PYTHONLIB +ifndef ONLYSTATICLIBS +$(LIB)/$(MODULE)module.so: $($(LOCAL)-OBJS) + -rm -f $(LIB)/$($(@F)-MODULE)module.so* 2> /dev/null + echo Building shared Python module $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\ + -o $@ -shared \ + $(filter %.opic,$^) \ + $($(@F)-SLIBS) $(PYTHONLIB) +else +.PHONY: $(LIB)/$(MODULE)module.so +$(LIB)/$(MODULE)module.so: + echo Don't know how to make a python module here, not building $@ +endif # ifndef ONLYSTATICLIBS +else +.PHONY: $(LIB)/$(MODULE)module.so +$(LIB)/$(MODULE)module.so: + echo No python support, not building $@ +endif # ifdef PYTHONLIB + +# Compilation rules +vpath %.cc $(SUBDIRS) +$(OBJ)/%.opic: %.cc + echo Compiling $< to $@ + $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $< + $(DoDep) + +# Include the dependencies that are available +The_DFiles = $(wildcard $($(LOCAL)-DEP)) +ifneq ($(words $(The_DFiles)),0) +include $(The_DFiles) +endif diff --git a/apt/buildlib/sgml_manpage.mak b/apt/buildlib/sgml_manpage.mak new file mode 100644 index 0000000..607ead3 --- /dev/null +++ b/apt/buildlib/sgml_manpage.mak @@ -0,0 +1,49 @@ +# -*- make -*- + +# This handles man pages in DocBook SGMLL format. We convert to the respective +# output in the source directory then copy over to the final dest. This +# means yodl is only needed if compiling from CVS + +# Input +# $(SOURCE) - The documents to use, in the form foo.sect, ie apt-cache.8 +# the sgml files are called apt-cache.8.sgml + +# See defaults.mak for information about LOCAL + +# Some local definitions +ifdef NSGMLS +ifdef SGMLSPL +ifdef DOCBOOK2MAN + +LOCAL := sgml-manpage-$(firstword $(SOURCE)) +$(LOCAL)-LIST := $(SOURCE) + +# Install generation hooks +doc: $($(LOCAL)-LIST) +veryclean: veryclean/$(LOCAL) + +$($(LOCAL)-LIST) :: % : %.sgml $(INCLUDES) + echo Creating man page $@ + $(NSGMLS) $< | $(SGMLSPL) $(DOCBOOK2MAN) + +# Clean rule +.PHONY: veryclean/$(LOCAL) +veryclean/$(LOCAL): + -rm -rf $($(@F)-LIST) + +HAVE_SGML=yes +endif +endif +endif + +INCLUDES := + +ifndef HAVE_SGML +# Strip from the source list any man pages we dont have compiled already +SOURCE := $(wildcard $(SOURCE)) +endif + +# Chain to the manpage rule +ifneq ($(words $(SOURCE)),0) +include $(MANPAGE_H) +endif diff --git a/apt/cmdline/CVS/Entries b/apt/cmdline/CVS/Entries deleted file mode 100644 index e84551a..0000000 --- a/apt/cmdline/CVS/Entries +++ /dev/null @@ -1,12 +0,0 @@ -/apt-cache.cc/1.20/Wed Aug 1 21:57:04 2001// -/apt-config.cc/1.3/Wed Aug 1 21:57:05 2001// -/acqprogress.cc/1.2/Fri Aug 10 14:00:40 2001// -/acqprogress.h/1.1.1.1/Fri Aug 10 14:00:40 2001// -/indexcopy.cc/1.1.1.1/Fri Aug 10 14:00:44 2001// -/indexcopy.h/1.1.1.1/Fri Aug 10 14:00:44 2001// -/makefile/1.23/Fri Aug 10 14:00:44 2001// -/rpmindexcopy.cc/1.2/Fri Aug 10 14:00:44 2001// -/rpmindexcopy.h/1.1/Fri Aug 10 14:00:44 2001// -/apt-cdrom.cc/1.10/Fri Nov 16 01:13:06 2001// -/apt-get.cc/1.45/Fri Nov 16 01:13:06 2001// -D diff --git a/apt/cmdline/CVS/Repository b/apt/cmdline/CVS/Repository deleted file mode 100644 index 7290bfb..0000000 --- a/apt/cmdline/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/cmdline diff --git a/apt/cmdline/CVS/Root b/apt/cmdline/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/cmdline/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/cmdline/acqprogress.cc b/apt/cmdline/acqprogress.cc index a2aa952..ee3ebfc 100644 --- a/apt/cmdline/acqprogress.cc +++ b/apt/cmdline/acqprogress.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acqprogress.cc,v 1.2 2000/09/28 21:51:57 kojima Exp $ +// $Id: acqprogress.cc,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### Acquire Progress - Command line progress meter @@ -14,10 +14,15 @@ #include #include +#include + #include #include +#include /*}}}*/ +using namespace std; + // AcqTextStatus::AcqTextStatus - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -47,7 +52,7 @@ void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm) if (Quiet <= 0) cout << '\r' << BlankLine << '\r'; - cout << "Hit " << Itm.Description; + cout << _("Hit ") << Itm.Description; if (Itm.Owner->FileSize != 0) cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]"; cout << endl; @@ -71,7 +76,7 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm) if (Quiet <= 0) cout << '\r' << BlankLine << '\r'; - cout << "Get:" << Itm.Owner->ID << ' ' << Itm.Description; + cout << _("Get:") << Itm.Owner->ID << ' ' << Itm.Description; if (Itm.Owner->FileSize != 0) cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]"; cout << endl; @@ -102,11 +107,11 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm) if (Itm.Owner->Status == pkgAcquire::Item::StatDone) { - cout << "Ign " << Itm.Description << endl; + cout << _("Ign ") << Itm.Description << endl; } else { - cout << "Err " << Itm.Description << endl; + cout << _("Err ") << Itm.Description << endl; cout << " " << Itm.Owner->ErrorText << endl; } @@ -125,11 +130,12 @@ void AcqTextStatus::Stop() if (Quiet <= 0) cout << '\r' << BlankLine << '\r' << flush; - + if (FetchedBytes != 0 && _error->PendingError() == false) - cout << "Fetched " << SizeToStr(FetchedBytes) << "B in " << - TimeToStr(ElapsedTime) << " (" << SizeToStr(CurrentCPS) << - "B/s)" << endl; + ioprintf(cout,_("Fetched %sB in %s (%sB/s)\n"), + SizeToStr(FetchedBytes).c_str(), + TimeToStr(ElapsedTime).c_str(), + SizeToStr(CurrentCPS).c_str()); } /*}}}*/ // AcqTextStatus::Pulse - Regular event pulse /*{{{*/ @@ -196,7 +202,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) else { if (Mode == Medium || I->TotalSize == 0) - snprintf(S,End-S," %luB",I->CurrentSize); + snprintf(S,End-S," %sB",SizeToStr(I->CurrentSize).c_str()); } S += strlen(S); @@ -207,7 +213,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) snprintf(S,End-S," %lu%%", long(double(I->CurrentSize*100.0)/double(I->TotalSize))); else - snprintf(S,End-S,"/%luB %lu%%", I->TotalSize, + snprintf(S,End-S,"/%sB %lu%%",SizeToStr(I->TotalSize).c_str(), long(double(I->CurrentSize*100.0)/double(I->TotalSize))); } S += strlen(S); @@ -216,7 +222,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) // Show something.. if (Shown == false) - snprintf(S,End-S," [Working]"); + snprintf(S,End-S,_(" [Working]")); /* Put in the ETA and cps meter, block off signals to prevent strangeness during resizing */ @@ -240,7 +246,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) } Buffer[ScreenWidth] = 0; BlankLine[ScreenWidth] = 0; - sigprocmask(SIG_UNBLOCK,&OldSigs,0); + sigprocmask(SIG_SETMASK,&OldSigs,0); // Draw the current status if (strlen(Buffer) == strlen(BlankLine)) @@ -261,9 +267,10 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) bool AcqTextStatus::MediaChange(string Media,string Drive) { if (Quiet <= 0) - cout << '\r' << BlankLine << '\r'; - cout << "Media Change: Please insert the disc labeled '" << Media << "' in "\ - "the drive '" << Drive << "' and press enter" << endl; + cout << '\r' << BlankLine << '\r'; + ioprintf(cout,_("Media Change: Please insert the disc labeled '%s' in " + "the drive '%s' and press enter\n"), + Media.c_str(),Drive.c_str()); char C = 0; while (C != '\n' && C != '\r') diff --git a/apt/cmdline/acqprogress.h b/apt/cmdline/acqprogress.h index 10189e9..96f23a9 100644 --- a/apt/cmdline/acqprogress.h +++ b/apt/cmdline/acqprogress.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acqprogress.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: acqprogress.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ /* ###################################################################### Acquire Progress - Command line progress meter diff --git a/apt/cmdline/apt-cache.cc b/apt/cmdline/apt-cache.cc index 95002b5..774b2e5 100644 --- a/apt/cmdline/apt-cache.cc +++ b/apt/cmdline/apt-cache.cc @@ -1,21 +1,16 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-cache.cc,v 1.20 2001/08/01 21:57:04 kojima Exp $ - +// $Id: apt-cache.cc,v 1.5 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### apt-cache - Manages the cache files apt-cache provides some functions fo manipulating the cache files. - It uses the command line interface common to all the APT tools. The - only really usefull function right now is dumpavail which is used - by the dselect method. Everything else is meant as a debug aide. + It uses the command line interface common to all the APT tools. Returns 100 on failure, 0 on success. - ##################################################################### - */ - + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #include @@ -27,29 +22,54 @@ #include #include #include - -#include //akk - -//akk#include -#include -#include +#include +#include +#include +#include +#include #include +#include -#include - -#include +#include +#include #include #include #include #include - -#include //akk - /*}}}*/ -pkgCache *GCache = 0; +using namespace std; +pkgCache *GCache = 0; +pkgSourceList *SrcList = 0; + +// LocalitySort - Sort a version list by package file locality /*{{{*/ +// --------------------------------------------------------------------- +/* */ +int LocalityCompare(const void *a, const void *b) +{ + pkgCache::VerFile *A = *(pkgCache::VerFile **)a; + pkgCache::VerFile *B = *(pkgCache::VerFile **)b; + + if (A == 0 && B == 0) + return 0; + if (A == 0) + return 1; + if (B == 0) + return -1; + + if (A->File == B->File) + return A->Offset - B->Offset; + return A->File - B->File; +} + +void LocalitySort(pkgCache::VerFile **begin, + unsigned long Count,size_t Size) +{ + qsort(begin,Count,Size,LocalityCompare); +} + /*}}}*/ // UnMet - Show unmet dependencies /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -70,9 +90,6 @@ bool UnMet(CommandLine &CmdL) pkgCache::DepIterator End; D.GlobOr(Start,End); -/* cout << "s: Check " << Start.TargetPkg().Name() << ',' << - End.TargetPkg().Name() << endl;*/ - // Skip conflicts and replaces if (End->Type != pkgCache::Dep::PreDepends && End->Type != pkgCache::Dep::Depends && @@ -113,8 +130,8 @@ bool UnMet(CommandLine &CmdL) // Oops, it failed.. if (Header == false) - cout << _("Package ") << P.Name() << _(" version ") << - V.VerStr() << _(" has an unmet dep:") << endl; + ioprintf(cout,_("Package %s version %s has an unmet dep:\n"), + P.Name(),V.VerStr()); Header = true; // Print out the dep type @@ -157,32 +174,38 @@ bool DumpPackage(CommandLine &CmdL) continue; } - cout << _("Package: ") << Pkg.Name() << endl; - cout << _("Versions: "); + cout << "Package: " << Pkg.Name() << endl; + cout << "Versions: " << endl; for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; Cur++) { cout << Cur.VerStr(); for (pkgCache::VerFileIterator Vf = Cur.FileList(); Vf.end() == false; Vf++) cout << "(" << Vf.File().FileName() << ")"; - cout << ','; + cout << endl; } cout << endl; - cout << _("Reverse Depends: ") << endl; + cout << "Reverse Depends: " << endl; for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() != true; D++) - cout << " " << D.ParentPkg().Name() << ',' << D.TargetPkg().Name() << endl; - - cout << _("Dependencies: ") << endl; + { + cout << " " << D.ParentPkg().Name() << ',' << D.TargetPkg().Name(); + if (D->Version != 0) + cout << ' ' << DeNull(D.TargetVer()) << endl; + else + cout << endl; + } + + cout << "Dependencies: " << endl; for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; Cur++) { cout << Cur.VerStr() << " - "; for (pkgCache::DepIterator Dep = Cur.DependsList(); Dep.end() != true; Dep++) - cout << Dep.TargetPkg().Name() << " (" << (int)Dep->CompareOp << " " << Dep.TargetVer() << ") "; + cout << Dep.TargetPkg().Name() << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") "; cout << endl; } - cout << _("Provides: ") << endl; + cout << "Provides: " << endl; for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; Cur++) { cout << Cur.VerStr() << " - "; @@ -190,9 +213,9 @@ bool DumpPackage(CommandLine &CmdL) cout << Prv.ParentPkg().Name() << " "; cout << endl; } - cout << _("Reverse Provides: ") << endl; + cout << "Reverse Provides: " << endl; for (pkgCache::PrvIterator Prv = Pkg.ProvidesList(); Prv.end() != true; Prv++) - cout << Prv.OwnerPkg().Name() << " " << Prv.OwnerVer().VerStr() << endl; + cout << Prv.OwnerPkg().Name() << " " << Prv.OwnerVer().VerStr() << endl; } return true; @@ -206,13 +229,13 @@ bool Stats(CommandLine &Cmd) pkgCache &Cache = *GCache; cout << _("Total Package Names : ") << Cache.Head().PackageCount << " (" << SizeToStr(Cache.Head().PackageCount*Cache.Head().PackageSz) << ')' << endl; - pkgCache::PkgIterator I = Cache.PkgBegin(); - + int Normal = 0; int Virtual = 0; int NVirt = 0; int DVirt = 0; int Missing = 0; + pkgCache::PkgIterator I = Cache.PkgBegin(); for (;I.end() != true; I++) { if (I->VersionList != 0 && I->ProvidesList == 0) @@ -267,10 +290,24 @@ bool Stats(CommandLine &Cmd) I!= Cache.StringItemP; I = Cache.StringItemP + I->NextItem) { Count++; - Size += strlen(Cache.StrP + I->String); + Size += strlen(Cache.StrP + I->String) + 1; } cout << _("Total Globbed Strings: ") << Count << " (" << SizeToStr(Size) << ')' << endl; - + + unsigned long DepVerSize = 0; + for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++) + { + for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; V++) + { + for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; D++) + { + if (D->Version != 0) + DepVerSize += strlen(D.TargetVer()) + 1; + } + } + } + cout << _("Total Dependency Version space: ") << SizeToStr(DepVerSize) << endl; + unsigned long Slack = 0; for (int I = 0; I != 7; I++) Slack += Cache.Head().Pools[I].ItemSize*Cache.Head().Pools[I].Count; @@ -284,62 +321,45 @@ bool Stats(CommandLine &Cmd) Cache.Head().ProvidesCount*Cache.Head().ProvidesSz; cout << _("Total Space Accounted for: ") << SizeToStr(Total) << endl; - return true; -} - /*}}}*/ -// Check - Check some things about the cache /*{{{*/ -// --------------------------------------------------------------------- -/* Debug aide mostly */ -bool Check(CommandLine &Cmd) -{ - pkgCache &Cache = *GCache; - pkgCache::PkgIterator Pkg = Cache.PkgBegin(); - for (;Pkg.end() != true; Pkg++) - { - if (Pkg.Section() == 0 && Pkg->VersionList != 0) - cout << _("Bad section ") << Pkg.Name() << endl; - - for (pkgCache::VerIterator Cur = Pkg.VersionList(); - Cur.end() != true; Cur++) - { - if (Cur->Priority < 1 || Cur->Priority > 5) - cout << _("Bad prio ") << Pkg.Name() << ',' << Cur.VerStr() << " == " << (int)Cur->Priority << endl; - } - } return true; } /*}}}*/ // Dump - show everything /*{{{*/ // --------------------------------------------------------------------- -/* */ +/* This is worthless except fer debugging things */ bool Dump(CommandLine &Cmd) { pkgCache &Cache = *GCache; + cout << "Using Versioning System: " << Cache.VS->Label << endl; + for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++) { - cout << _("Package: ") << P.Name() << endl; + cout << "Package: " << P.Name() << endl; for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; V++) { - cout << _(" Version: ") << V.VerStr() << endl; - cout << _(" File: ") << V.FileList().File().FileName() << endl; + cout << " Version: " << V.VerStr() << endl; + cout << " File: " << V.FileList().File().FileName() << endl; for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; D++) - cout << _(" Depends: ") << D.TargetPkg().Name() << ' ' << D.TargetVer() << endl; + cout << " Depends: " << D.TargetPkg().Name() << ' ' << + DeNull(D.TargetVer()) << endl; } } - for (pkgCache::PkgFileIterator F(Cache); F.end() == false; F++) + for (pkgCache::PkgFileIterator F = Cache.FileBegin(); F.end() == false; F++) { - cout << _("File: ") << F.FileName() << endl; - cout << _(" Size: ") << F->Size << endl; - cout << _(" ID: ") << F->ID << endl; - cout << _(" Flags: ") << F->Flags << endl; - cout << _(" Time: ") << TimeRFC1123(F->mtime) << endl; - cout << _(" Archive: ") << F.Archive() << endl; - cout << _(" Component: ") << F.Component() << endl; - cout << _(" Version: ") << F.Version() << endl; - cout << _(" Origin: ") << F.Origin() << endl; - cout << _(" Label: ") << F.Label() << endl; - cout << _(" Architecture: ") << F.Architecture() << endl; + cout << "File: " << F.FileName() << endl; + cout << " Type: " << F.IndexType() << endl; + cout << " Size: " << F->Size << endl; + cout << " ID: " << F->ID << endl; + cout << " Flags: " << F->Flags << endl; + cout << " Time: " << TimeRFC1123(F->mtime) << endl; + cout << " Archive: " << DeNull(F.Archive()) << endl; + cout << " Component: " << DeNull(F.Component()) << endl; + cout << " Version: " << DeNull(F.Version()) << endl; + cout << " Origin: " << DeNull(F.Origin()) << endl; + cout << " Site: " << DeNull(F.Site()) << endl; + cout << " Label: " << DeNull(F.Label()) << endl; + cout << " Architecture: " << DeNull(F.Architecture()) << endl; } return true; @@ -347,52 +367,161 @@ bool Dump(CommandLine &Cmd) /*}}}*/ // DumpAvail - Print out the available list /*{{{*/ // --------------------------------------------------------------------- -/* This is needed to make dpkg --merge happy */ +/* This is needed to make dpkg --merge happy.. I spent a bit of time to + make this run really fast, perhaps I went a little overboard.. */ bool DumpAvail(CommandLine &Cmd) { pkgCache &Cache = *GCache; - unsigned char *Buffer = new unsigned char[Cache.HeaderP->MaxVerFileSize]; - for (pkgCache::PkgFileIterator I = Cache.FileBegin(); I.end() == false; I++) - { - if ((I->Flags & pkgCache::Flag::NotSource) != 0) + pkgPolicy Plcy(&Cache); + if (ReadPinFile(Plcy) == false) + return false; + + unsigned long Count = Cache.HeaderP->PackageCount+1; + pkgCache::VerFile **VFList = new pkgCache::VerFile *[Count]; + memset(VFList,0,sizeof(*VFList)*Count); + + // Map versions that we want to write out onto the VerList array. + for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++) + { + if (P->VersionList == 0) continue; - if (I.IsOk() == false) + /* Find the proper version to use. If the policy says there are no + possible selections we return the installed version, if available.. + This prevents dselect from making it obsolete. */ + pkgCache::VerIterator V = Plcy.GetCandidateVer(P); + if (V.end() == true) { - delete [] Buffer; - return _error->Error(_("Package file %s is out of sync."),I.FileName()); + if (P->CurrentVer == 0) + continue; + V = P.CurrentVer(); } - FileFd PkgF(I.FileName(),FileFd::ReadOnly); - if (_error->PendingError() == true) + pkgCache::VerFileIterator VF = V.FileList(); + for (; VF.end() == false ; VF++) + if ((VF.File()->Flags & pkgCache::Flag::NotSource) == 0) + break; + + /* Okay, here we have a bit of a problem.. The policy has selected the + currently installed package - however it only exists in the + status file.. We need to write out something or dselect will mark + the package as obsolete! Thus we emit the status file entry, but + below we remove the status line to make it valid for the + available file. However! We only do this if their do exist *any* + non-source versions of the package - that way the dselect obsolete + handling works OK. */ + if (VF.end() == true) { - delete [] Buffer; - return false; - } - - /* Write all of the records from this package file, we search the entire - structure to find them */ - for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++) - { - // Find the proper version to use. We should probably use the DepCache. - pkgCache::VerIterator V = Cache.GetCandidateVer(P,false); - - if (V.end() == true || V.FileList().File() != I) - continue; - - // Read the record and then write it out again. - if (PkgF.Seek(V.FileList()->Offset) == false || - PkgF.Read(Buffer,V.FileList()->Size) == false || - write(STDOUT_FILENO,Buffer,V.FileList()->Size) != V.FileList()->Size) + for (pkgCache::VerIterator Cur = P.VersionList(); Cur.end() != true; Cur++) { - delete [] Buffer; - return false; - } + for (VF = Cur.FileList(); VF.end() == false; VF++) + { + if ((VF.File()->Flags & pkgCache::Flag::NotSource) == 0) + { + VF = V.FileList(); + break; + } + } + + if (VF.end() == false) + break; + } + } + +// CNC:2002-07-24 +#if HAVE_RPM + if (VF.end() == false) + { + pkgRecords Recs(Cache); + pkgRecords::Parser &P = Recs.Lookup(VF); + const char *Start; + const char *End; + P.GetRec(Start,End); + fwrite(Start,End-Start,1,stdout); + putc('\n',stdout); } } + return !_error->PendingError(); +#else + VFList[P->ID] = VF; + } +#endif - return true; + LocalitySort(VFList,Count,sizeof(*VFList)); + + // Iterate over all the package files and write them out. + char *Buffer = new char[Cache.HeaderP->MaxVerFileSize+10]; + for (pkgCache::VerFile **J = VFList; *J != 0;) + { + pkgCache::PkgFileIterator File(Cache,(*J)->File + Cache.PkgFileP); + if (File.IsOk() == false) + { + _error->Error(_("Package file %s is out of sync."),File.FileName()); + break; + } + + FileFd PkgF(File.FileName(),FileFd::ReadOnly); + if (_error->PendingError() == true) + break; + + /* Write all of the records from this package file, since we + already did locality sorting we can now just seek through the + file in read order. We apply 1 more optimization here, since often + there will be < 1 byte gaps between records (for the \n) we read that + into the next buffer and offset a bit.. */ + unsigned long Pos = 0; + for (; *J != 0; J++) + { + if ((*J)->File + Cache.PkgFileP != File) + break; + + const pkgCache::VerFile &VF = **J; + + // Read the record and then write it out again. + unsigned long Jitter = VF.Offset - Pos; + if (Jitter > 8) + { + if (PkgF.Seek(VF.Offset) == false) + break; + Jitter = 0; + } + + if (PkgF.Read(Buffer,VF.Size + Jitter) == false) + break; + Buffer[VF.Size + Jitter] = '\n'; + + // See above.. + if ((File->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource) + { + pkgTagSection Tags; + TFRewriteData RW[] = {{"Status",0},{"Config-Version",0},{}}; + const char *Zero = 0; + if (Tags.Scan(Buffer+Jitter,VF.Size+1) == false || + TFRewrite(stdout,Tags,&Zero,RW) == false) + { + _error->Error("Internal Error, Unable to parse a package record"); + break; + } + fputc('\n',stdout); + } + else + { + if (fwrite(Buffer+Jitter,VF.Size+1,1,stdout) != 1) + break; + } + + Pos = VF.Offset + VF.Size; + } + + fflush(stdout); + if (_error->PendingError() == true) + break; + } + + delete [] Buffer; + delete [] VFList; + return !_error->PendingError(); } /*}}}*/ // Depends - Print out a dependency tree /*{{{*/ @@ -401,6 +530,8 @@ bool DumpAvail(CommandLine &Cmd) bool Depends(CommandLine &CmdL) { pkgCache &Cache = *GCache; + SPtrArray Colours = new unsigned[Cache.Head().PackageCount]; + memset(Colours,0,sizeof(*Colours)*Cache.Head().PackageCount); for (const char **I = CmdL.FileList + 1; *I != 0; I++) { @@ -410,43 +541,65 @@ bool Depends(CommandLine &CmdL) _error->Warning(_("Unable to locate package %s"),*I); continue; } - - pkgCache::VerIterator Ver = Pkg.VersionList(); - if (Ver.end() == true) + Colours[Pkg->ID] = 1; + } + + bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false); + bool DidSomething; + do + { + DidSomething = false; + for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); Pkg.end() == false; Pkg++) { - cout << '<' << Pkg.Name() << '>' << endl; - continue; - } - - cout << Pkg.Name() << endl; - - for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) - { - if ((D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or) - cout << " |"; - else - cout << " "; + if (Colours[Pkg->ID] != 1) + continue; + Colours[Pkg->ID] = 2; + DidSomething = true; - // Show the package - pkgCache::PkgIterator Trg = D.TargetPkg(); - if (Trg->VersionList == 0) - cout << D.DepType() << ": <" << Trg.Name() << ">" << endl; - else - cout << D.DepType() << ": " << Trg.Name() << endl; - - // Display all solutions - pkgCache::Version **List = D.AllTargets(); - for (pkgCache::Version **I = List; *I != 0; I++) + pkgCache::VerIterator Ver = Pkg.VersionList(); + if (Ver.end() == true) { - pkgCache::VerIterator V(Cache,*I); - if (V != Cache.VerP + V.ParentPkg()->VersionList || - V->ParentPkg == D->Package) - continue; - cout << " " << V.ParentPkg().Name() << endl; + cout << '<' << Pkg.Name() << '>' << endl; + continue; } - delete [] List; - } + + cout << Pkg.Name() << endl; + + for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) + { + if ((D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or) + cout << " |"; + else + cout << " "; + + // Show the package + pkgCache::PkgIterator Trg = D.TargetPkg(); + if (Trg->VersionList == 0) + cout << D.DepType() << ": <" << Trg.Name() << ">" << endl; + else + cout << D.DepType() << ": " << Trg.Name() << endl; + + if (Recurse == true) + Colours[D.TargetPkg()->ID]++; + + // Display all solutions + SPtrArray List = D.AllTargets(); + pkgPrioSortList(Cache,List); + for (pkgCache::Version **I = List; *I != 0; I++) + { + pkgCache::VerIterator V(Cache,*I); + if (V != Cache.VerP + V.ParentPkg()->VersionList || + V->ParentPkg == D->Package) + continue; + cout << " " << V.ParentPkg().Name() << endl; + + if (Recurse == true) + Colours[D.ParentPkg()->ID]++; + } + } + } } + while (DidSomething == true); return true; } @@ -582,7 +735,7 @@ bool Dotty(CommandLine &CmdL) for (pkgCache::VerIterator I = DPkg.VersionList(); I.end() == false && Hit == false; I++) { - if (_system->checkDep(D.TargetVer(),I.VerStr(),D->CompareOp) == true) + if (Cache.VS->CheckDep(I.VerStr(),D->CompareOp,D.TargetVer()) == true) Hit = true; } @@ -590,7 +743,7 @@ bool Dotty(CommandLine &CmdL) for (pkgCache::PrvIterator I = DPkg.ProvidesList(); I.end() == false && Hit == false; I++) { - if (_system->checkDep(D.TargetVer(),I.ProvideVersion(),D->CompareOp) == false) + if (Cache.VS->CheckDep(I.ProvideVersion(),D->CompareOp,D.TargetVer()) == false) Hit = true; } @@ -604,7 +757,9 @@ bool Dotty(CommandLine &CmdL) { /* If a conflicts does not meet anything in the database then show the relation but do not recurse */ - if (Hit == false && D->Type == pkgCache::Dep::Conflicts) + if (Hit == false && + (D->Type == pkgCache::Dep::Conflicts || + D->Type == pkgCache::Dep::Obsoletes)) { if (Show[D.TargetPkg()->ID] == None && Show[D.TargetPkg()->ID] != ToShow) @@ -623,6 +778,7 @@ bool Dotty(CommandLine &CmdL) switch(D->Type) { case pkgCache::Dep::Conflicts: + case pkgCache::Dep::Obsoletes: printf("[color=springgreen];\n"); break; @@ -664,9 +820,11 @@ bool Dotty(CommandLine &CmdL) /* */ bool DoAdd(CommandLine &CmdL) { + return _error->Error("Unimplemented"); +#if 0 // Make sure there is at least one argument if (CmdL.FileSize() <= 1) - return _error->Error(_("You must give at least one file name")); + return _error->Error("You must give at least one file name"); // Open the cache FileFd CacheF(_config->FindFile("Dir::Cache::pkgcache"),FileFd::WriteAny); @@ -685,21 +843,20 @@ bool DoAdd(CommandLine &CmdL) unsigned long Length = CmdL.FileSize() - 1; for (const char **I = CmdL.FileList + 1; *I != 0; I++) { - Progress.OverallProgress(I - CmdL.FileList,Length,1,_("Generating cache")); + Progress.OverallProgress(I - CmdL.FileList,Length,1,"Generating cache"); Progress.SubProgress(Length); // Do the merge FileFd TagF(*I,FileFd::ReadOnly); - pkgCacheGenerator::ListParser *Parser = _system->CreateListParser(TagF); - + debListParser Parser(TagF); if (_error->PendingError() == true) - return _error->Error(_("Problem opening %s"),*I); + return _error->Error("Problem opening %s",*I); - if (Gen.SelectFile(*I) == false) - return _error->Error(_("Problem with SelectFile")); - - if (Gen.MergeList(*Parser, 0) == false) - return _error->Error(_("Problem with MergeList")); + if (Gen.SelectFile(*I,"") == false) + return _error->Error("Problem with SelectFile"); + + if (Gen.MergeList(Parser) == false) + return _error->Error("Problem with MergeList"); } Progress.Done(); @@ -707,254 +864,14 @@ bool DoAdd(CommandLine &CmdL) Stats(CmdL); return true; +#endif } /*}}}*/ // DisplayRecord - Displays the complete record for the package /*{{{*/ // --------------------------------------------------------------------- /* This displays the package record from the proper package index file. It is not used by DumpAvail for performance reasons. */ -#if 1 -#define CRPMTAG_FILENAME 1000000 -#define CRPMTAG_FILESIZE 1000001 -#define CRPMTAG_ESSENTIAL 1000002 -#define CRPMTAG_MD5 1000005 - - - - -void pstrarray(FILE *f, char **str, int count) -{ - if (!count) - return; - - fprintf(f, "%s", *str++); - count--; - while (count--) { - fprintf(f, ", %s", *str++); - } - fprintf(f, "\n"); -} - -void pstr(FILE *f, char **data, int count, int type) -{ - if (type == RPM_STRING_TYPE) { - fprintf(f, "%s\n", (char*)data); - } else if (type == RPM_STRING_ARRAY_TYPE) { - pstrarray(f, data, count); - } else { - puts("Oh shit!"); - abort(); - } -} - - -void pitem(FILE *f, char *file, char *version, int flags) -{ - fputs(file, f); - if (*version) { - int c = 0; - fputs(" (", f); - /* - * For some reason, debian ppl decided that: - * > and < are the same as >=, <= - * >> and << is the same as >, < - */ - if (flags & RPMSENSE_LESS) { - fputc('<', f); - c = '<'; - } - if (flags & RPMSENSE_GREATER) { - fputc('>', f); - c = '>'; - } - if (flags & RPMSENSE_EQUAL) { - fputc('=', f); - } else { - if (c) - fputc(c, f); - } - fprintf(f, " %s)", version); - } -} - - -void ptuplearray(FILE *f, char **str1, char **str2, int *flags, int count) -{ - int first = 1; - if (!count) - return; - - while (count--) { - if (!first) - fputs(", ", f); - first = 0; - pitem(f, *str1, *str2, *flags); - str1++; str2++; flags++; - } - fputc('\n', f); -} - -void pdepend(FILE *f, char **data1, char **data2, int *flags, int count, - int type) -{ - if (type == RPM_STRING_TYPE) { - pitem(f, (char*)data1, (char*)data2, *flags); - fprintf(f, "\n"); - } else if (type == RPM_STRING_ARRAY_TYPE) { - ptuplearray(f, data1, data2, flags, count); - } else { - puts(_("Oh shit!")); - abort(); - } -} - - -void dumpDescription(FILE *f, char *descr) -{ - int nl; - - nl = 1; - while (*descr) { - if (nl) { - fputc(' ', f); - nl = 0; - } - if (*descr=='\n') { - nl = 1; - } - fputc(*descr++, f); - } - fputc('\n', f); -} - - -void showHeader(FILE *f, Header hdr) -{ - int type, type2, type3, count; - char *str; - char **strv; - char **strv2; - int num; - int_32 *numv; - - headerGetEntry(hdr, RPMTAG_NAME, &type, (void **)&str, &count); - fprintf(f, _("Package: %s\n"), str); - - headerGetEntry(hdr, RPMTAG_GROUP, &type, (void **)&str, &count); - fprintf(f, _("Section: %s\n"), str); - - headerGetEntry(hdr, RPMTAG_SIZE, &type, (void **)&numv, &count); - fprintf(f, _("Installed Size: %i\n"), numv[0] / 1000); - - // Another kludge, --claudio - str = NULL; - headerGetEntry(hdr, RPMTAG_PACKAGER, &type, (void **)&str, &count); - if (!str) - headerGetEntry(hdr, RPMTAG_VENDOR, &type, (void **)&str, &count); - fprintf(f, _("Maintainer: %s\n"), str); - - headerGetEntry(hdr, RPMTAG_VERSION, &type, (void **)&str, &count); - if (headerGetEntry(hdr, RPMTAG_EPOCH, &type, (void **)&numv, &count)==1) - fprintf(f, _("Version: %i:%s"), numv[0], str); - else - fprintf(f, _("Version: %s"), str); - - headerGetEntry(hdr, RPMTAG_RELEASE, &type, (void **)&str, &count); - fprintf(f, "-%s\n", str); - -// headerGetEntry(hdr, RPMTAG_DISTRIBUTION, &type, (void **)&str, &count); -// fprintf(f, "Distribution: %s\n", str); - - headerGetEntry(hdr, RPMTAG_REQUIRENAME, &type, (void **)&strv, &count); - headerGetEntry(hdr, RPMTAG_REQUIREVERSION, &type2, (void **)&strv2, &count); - headerGetEntry(hdr, RPMTAG_REQUIREFLAGS, &type3, (void **)&numv, &count); - if (count > 0) { - char **dn, **dv; - int *df; - int i, j; - - dn = (char**)malloc(sizeof(char*)*count); - dv = (char**)malloc(sizeof(char*)*count); - df = (int*)malloc(sizeof(int)*count); - - if (!dn || !dv || !df) { - puts("could not malloc"); - exit(1); - } - - for (j = i = 0; i < count; i++) { - if ((numv[i] & RPMSENSE_PREREQ) && *strv[i]!='/') {//XXX - dn[j] = strv[i]; - dv[j] = strv2[i]; - df[j] = numv[i]; - j++; - } - } - if (j > 0) { - fprintf(f, _("Pre-Depends: ")); - pdepend(f, dn, dv, df, j, type); - } - - for (j = i = 0; i < count; i++) { - if (!(numv[i] & RPMSENSE_PREREQ) && *strv[i]!='/') {//XXX - dn[j] = strv[i]; - dv[j] = strv2[i]; - df[j] = numv[i]; - j++; - } - } - if (j > 0) { - fprintf(f, _("Depends: ")); - pdepend(f, dn, dv, df, j, type); - } - - free(dn); - free(dv); - free(df); - } - - headerGetEntry(hdr, RPMTAG_CONFLICTNAME, &type, (void **)&strv, &count); - headerGetEntry(hdr, RPMTAG_CONFLICTVERSION, &type2, (void **)&strv2, &count); - headerGetEntry(hdr, RPMTAG_CONFLICTFLAGS, &type3, (void **)&numv, &count); - if (count > 0) { - fprintf(f, _("Conflicts: ")); - pdepend(f, strv, strv2, numv, count, type); - } - - headerGetEntry(hdr, RPMTAG_PROVIDENAME, &type, (void **)&strv, &count); - if (count > 0) { - fprintf(f, _("Provides: ")); - pstr(f, strv, count, type); - } - - headerGetEntry(hdr, RPMTAG_OBSOLETENAME, &type, (void **)&strv, &count); - if (count > 0) { - fprintf(f, _("Obsoletes: ")); - pstr(f, strv, count, type); - } - - headerGetEntry(hdr, RPMTAG_ARCH, &type, (void **)&str, &count); - fprintf(f, _("Architecture: %s\n"), str); - - headerGetEntry(hdr, CRPMTAG_FILESIZE, &type, (void **)&num, &count); - fprintf(f, _("Size: %d\n"), num); - - if (headerGetEntry(hdr, CRPMTAG_MD5, &type, (void **)&str, &count)==1) - printf(_("MD5sum: %s\n"), str); - - headerGetEntry(hdr, CRPMTAG_FILENAME, &type, (void **)&str, &count); - fprintf(f, _("Filename: %s\n"), str); - - headerGetEntry(hdr, RPMTAG_SUMMARY, &type, (void **)&str, &count); - fprintf(f, _("Description: %s\n"), str); - - headerGetEntry(hdr, RPMTAG_DESCRIPTION, &type, (void **)&str, &count); - dumpDescription(f, str); - - fputc('\n', f); -} - -bool DisplayRecord(pkgCache &Cache, pkgCache::VerIterator V) +bool DisplayRecord(pkgCache::VerIterator V) { // Find an appropriate file pkgCache::VerFileIterator Vf = V.FileList(); @@ -964,41 +881,16 @@ bool DisplayRecord(pkgCache &Cache, pkgCache::VerIterator V) if (Vf.end() == true) Vf = V.FileList(); - // Check and load the package list file - pkgCache::PkgFileIterator I = Vf.File(); - if (I.IsOk() == false) - return _error->Error(_("Package file %s is out of sync."),I.FileName()); - - pkgRecords::Parser *Parser = _system->CreateRecordParser(I.FileName(), Cache); - if (_error->PendingError() == true) - return false; - - // Read the record and then write it out again. - if (Parser->Jump(V.FileList()) == false) - return false; - - Header h = ((rpmRecordParser*)Parser)->GetRecord(); - - if (!h) { - return false; - } - - showHeader(stdout, h); - - - return true; -} +// CNC:2002-07-24 +#if HAVE_RPM + pkgRecords Recs(*GCache); + pkgRecords::Parser &P = Recs.Lookup(Vf); + const char *Start; + const char *End; + P.GetRec(Start,End); + fwrite(Start,End-Start,1,stdout); + putc('\n',stdout); #else -bool DisplayRecord(pkgCachepkgCache::VerIterator V) -{ - // Find an appropriate file - pkgCache::VerFileIterator Vf = V.FileList(); - for (; Vf.end() == false; Vf++) - if ((Vf.File()->Flags & pkgCache::Flag::NotSource) == 0) - break; - if (Vf.end() == true) - Vf = V.FileList(); - // Check and load the package list file pkgCache::PkgFileIterator I = Vf.File(); if (I.IsOk() == false) @@ -1009,69 +901,150 @@ bool DisplayRecord(pkgCachepkgCache::VerIterator V) return false; // Read the record and then write it out again. - unsigned char *Buffer = new unsigned char[GCache->HeaderP->MaxVerFileSize]; + unsigned char *Buffer = new unsigned char[GCache->HeaderP->MaxVerFileSize+1]; + Buffer[V.FileList()->Size] = '\n'; if (PkgF.Seek(V.FileList()->Offset) == false || PkgF.Read(Buffer,V.FileList()->Size) == false || - write(STDOUT_FILENO,Buffer,V.FileList()->Size) != V.FileList()->Size) + write(STDOUT_FILENO,Buffer,V.FileList()->Size+1) != V.FileList()->Size+1) { delete [] Buffer; return false; } delete [] Buffer; +#endif return true; } -#endif /*}}}*/ // Search - Perform a search /*{{{*/ // --------------------------------------------------------------------- /* This searches the package names and pacakge descriptions for a pattern */ +struct ExVerFile +{ + pkgCache::VerFile *Vf; + bool NameMatch; +}; + bool Search(CommandLine &CmdL) { pkgCache &Cache = *GCache; bool ShowFull = _config->FindB("APT::Cache::ShowFull",false); bool NamesOnly = _config->FindB("APT::Cache::NamesOnly",false); + unsigned NumPatterns = CmdL.FileSize() -1; + + pkgDepCache::Policy Plcy; // Make sure there is at least one argument - if (CmdL.FileSize() != 2) + if (NumPatterns < 1) return _error->Error(_("You must give exactly one pattern")); - + // Compile the regex pattern - regex_t Pattern; - if (regcomp(&Pattern,CmdL.FileList[1],REG_EXTENDED | REG_ICASE | - REG_NOSUB) != 0) - return _error->Error(_("Regex compilation error")); - + regex_t *Patterns = new regex_t[NumPatterns]; + memset(Patterns,0,sizeof(*Patterns)*NumPatterns); + for (unsigned I = 0; I != NumPatterns; I++) + { + if (regcomp(&Patterns[I],CmdL.FileList[I+1],REG_EXTENDED | REG_ICASE | + REG_NOSUB) != 0) + { + for (; I != 0; I--) + regfree(&Patterns[I]); + return _error->Error("Regex compilation error"); + } + } + // Create the text record parser pkgRecords Recs(Cache); if (_error->PendingError() == true) - return false; - - // Search package names - pkgCache::PkgIterator I = Cache.PkgBegin(); - for (;I.end() != true; I++) { - // We search against the install version as that makes the most sense.. - pkgCache::VerIterator V = Cache.GetCandidateVer(I); - if (V.end() == true) + for (unsigned I = 0; I != NumPatterns; I++) + regfree(&Patterns[I]); + return false; + } + + ExVerFile *VFList = new ExVerFile[Cache.HeaderP->PackageCount+1]; + memset(VFList,0,sizeof(*VFList)*Cache.HeaderP->PackageCount+1); + + // Map versions that we want to write out onto the VerList array. + for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++) + { + VFList[P->ID].NameMatch = NumPatterns != 0; + for (unsigned I = 0; I != NumPatterns; I++) + { + if (regexec(&Patterns[I],P.Name(),0,0,0) == 0) + VFList[P->ID].NameMatch &= true; + else + VFList[P->ID].NameMatch = false; + } + + // Doing names only, drop any that dont match.. + if (NamesOnly == true && VFList[P->ID].NameMatch == false) + continue; + + // Find the proper version to use. + pkgCache::VerIterator V = Plcy.GetCandidateVer(P); + if (V.end() == false) + VFList[P->ID].Vf = V.FileList(); + } + + // Include all the packages that provide matching names too + for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++) + { + if (VFList[P->ID].NameMatch == false) continue; - pkgRecords::Parser &P = Recs.Lookup(V.FileList()); - - if (regexec(&Pattern,I.Name(),0,0,0) == 0 || - (NamesOnly == false && - regexec(&Pattern,P.LongDesc().c_str(),0,0,0) == 0)) + for (pkgCache::PrvIterator Prv = P.ProvidesList() ; Prv.end() == false; Prv++) { - if (ShowFull == true) - DisplayRecord(Cache, V); - else - cout << I.Name() << " - " << P.ShortDesc() << endl; + pkgCache::VerIterator V = Plcy.GetCandidateVer(Prv.OwnerPkg()); + if (V.end() == false) + { + VFList[Prv.OwnerPkg()->ID].Vf = V.FileList(); + VFList[Prv.OwnerPkg()->ID].NameMatch = true; + } } } - regfree(&Pattern); + LocalitySort(&VFList->Vf,Cache.HeaderP->PackageCount,sizeof(*VFList)); + // Iterate over all the version records and check them + for (ExVerFile *J = VFList; J->Vf != 0; J++) + { + pkgRecords::Parser &P = Recs.Lookup(pkgCache::VerFileIterator(Cache,J->Vf)); + + bool Match = true; + if (J->NameMatch == false) + { + string LongDesc = P.LongDesc(); + Match = NumPatterns != 0; + for (unsigned I = 0; I != NumPatterns; I++) + { + if (regexec(&Patterns[I],LongDesc.c_str(),0,0,0) == 0) + Match &= true; + else + Match = false; + } + } + + if (Match == true) + { + if (ShowFull == true) + { + const char *Start; + const char *End; + P.GetRec(Start,End); + fwrite(Start,End-Start,1,stdout); + putc('\n',stdout); + } + else + printf("%s - %s\n",P.Name().c_str(),P.ShortDesc().c_str()); + } + } + + delete [] VFList; + for (unsigned I = 0; I != NumPatterns; I++) + regfree(&Patterns[I]); + if (ferror(stdout)) + return _error->Error("Write to stdout failed"); return true; } /*}}}*/ @@ -1081,6 +1054,8 @@ bool Search(CommandLine &CmdL) bool ShowPackage(CommandLine &CmdL) { pkgCache &Cache = *GCache; + pkgDepCache::Policy Plcy; + for (const char **I = CmdL.FileList + 1; *I != 0; I++) { pkgCache::PkgIterator Pkg = Cache.FindPkg(*I); @@ -1089,23 +1064,23 @@ bool ShowPackage(CommandLine &CmdL) _error->Warning(_("Unable to locate package %s"),*I); continue; } - - // Find the proper version to use. We should probably use the DepCache. + + // Find the proper version to use. if (_config->FindB("APT::Cache::AllVersions","true") == true) { pkgCache::VerIterator V; for (V = Pkg.VersionList(); V.end() == false; V++) { - if (DisplayRecord(Cache, V) == false) + if (DisplayRecord(V) == false) return false; } } else { - pkgCache::VerIterator V = Cache.GetCandidateVer(Pkg); + pkgCache::VerIterator V = Plcy.GetCandidateVer(Pkg); if (V.end() == true || V.FileList().end() == true) continue; - if (DisplayRecord(Cache, V) == false) + if (DisplayRecord(V) == false) return false; } } @@ -1165,8 +1140,127 @@ bool ShowSrcPackage(CommandLine &CmdL) pkgSrcRecords::Parser *Parse; while ((Parse = SrcRecs.Find(*I,false)) != 0) - cout << Parse->AsStr(); + cout << Parse->AsStr() << endl;; } + return true; +} + /*}}}*/ +// Policy - Show the results of the preferences file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool Policy(CommandLine &CmdL) +{ + if (SrcList == 0) + return _error->Error("Generate must be enabled for this function"); + + pkgCache &Cache = *GCache; + pkgPolicy Plcy(&Cache); + if (ReadPinFile(Plcy) == false) + return false; + + // Print out all of the package files + if (CmdL.FileList[1] == 0) + { + cout << _("Package Files:") << endl; + for (pkgCache::PkgFileIterator F = Cache.FileBegin(); F.end() == false; F++) + { + // Locate the associated index files so we can derive a description + pkgIndexFile *Indx; + if (SrcList->FindIndex(F,Indx) == false && + _system->FindIndex(F,Indx) == false) + return _error->Error(_("Cache is out of sync, can't x-ref a package file")); + printf(_("%4i %s\n"), + Plcy.GetPriority(F),Indx->Describe(true).c_str()); + + // Print the reference information for the package + string Str = F.RelStr(); + if (Str.empty() == false) + printf(" release %s\n",F.RelStr().c_str()); + if (F.Site() != 0 && F.Site()[0] != 0) + printf(" origin %s\n",F.Site()); + } + + // Show any packages have explicit pins + cout << _("Pinned Packages:") << endl; + pkgCache::PkgIterator I = Cache.PkgBegin(); + for (;I.end() != true; I++) + { + if (Plcy.GetPriority(I) == 0) + continue; + + // Print the package name and the version we are forcing to + cout << " " << I.Name() << " -> "; + + pkgCache::VerIterator V = Plcy.GetMatch(I); + if (V.end() == true) + cout << _("(not found)") << endl; + else + cout << V.VerStr() << endl; + } + + return true; + } + + // Print out detailed information for each package + for (const char **I = CmdL.FileList + 1; *I != 0; I++) + { + pkgCache::PkgIterator Pkg = Cache.FindPkg(*I); + if (Pkg.end() == true) + { + _error->Warning(_("Unable to locate package %s"),*I); + continue; + } + + cout << Pkg.Name() << ":" << endl; + + // Installed version + cout << _(" Installed: "); + if (Pkg->CurrentVer == 0) + cout << _("(none)") << endl; + else + cout << Pkg.CurrentVer().VerStr() << endl; + + // Candidate Version + cout << _(" Candidate: "); + pkgCache::VerIterator V = Plcy.GetCandidateVer(Pkg); + if (V.end() == true) + cout << _("(none)") << endl; + else + cout << V.VerStr() << endl; + + // Pinned version + if (Plcy.GetPriority(Pkg) != 0) + { + cout << _(" Package Pin: "); + V = Plcy.GetMatch(Pkg); + if (V.end() == true) + cout << _("(not found)") << endl; + else + cout << V.VerStr() << endl; + } + + // Show the priority tables + cout << _(" Version Table:") << endl; + for (V = Pkg.VersionList(); V.end() == false; V++) + { + if (Pkg.CurrentVer() == V) + cout << " *** " << V.VerStr(); + else + cout << " " << V.VerStr(); + cout << " " << Plcy.GetPriority(Pkg) << endl; + for (pkgCache::VerFileIterator VF = V.FileList(); VF.end() == false; VF++) + { + // Locate the associated index files so we can derive a description + pkgIndexFile *Indx; + if (SrcList->FindIndex(VF.File(),Indx) == false && + _system->FindIndex(VF.File(),Indx) == false) + return _error->Error(_("Cache is out of sync, can't x-ref a package file")); + printf(_(" %4i %s\n"),Plcy.GetPriority(VF.File()), + Indx->Describe(true).c_str()); + } + } + } + return true; } /*}}}*/ @@ -1178,8 +1272,9 @@ bool GenCaches(CommandLine &Cmd) OpTextProgress Progress(*_config); pkgSourceList List; - List.ReadMainList(); - return _system->makeStatusCache(List,Progress); + if (List.ReadMainList() == false) + return false; + return pkgMakeStatusCache(List,Progress); } /*}}}*/ // ShowHelp - Show a help screen /*{{{*/ @@ -1187,44 +1282,44 @@ bool GenCaches(CommandLine &Cmd) /* */ bool ShowHelp(CommandLine &Cmd) { - cout << PACKAGE << ' ' << VERSION << " for " << COMMON_CPU << - " compiled on " << __DATE__ << " " << __TIME__ << endl; - if (_config->FindB("version") == true) - return 100; + ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_OS,COMMON_CPU,__DATE__,__TIME__); - cout << _("Usage: apt-cache [options] command") << endl; - cout << _(" apt-cache [options] add file1 [file1 ...]") << endl; - cout << _(" apt-cache [options] showpkg pkg1 [pkg2 ...]") << endl; - cout << endl; - cout << _("apt-cache is a low-level tool used to manipulate APT's binary") << endl; - cout << _("cache files stored in ") << _config->FindFile("Dir::Cache") << endl; - cout << _("It is not meant for ordinary use only as a debug aide.") << endl; - cout << endl; - cout << _("Commands:") << endl; - cout << _(" add - Add an package file to the source cache") << endl; - cout << _(" gencaches - Build both the package and source cache") << endl; - cout << _(" showpkg - Show some general information for a single package") << endl; - cout << _(" stats - Show some basic statistics") << endl; - cout << _(" dump - Show the entire file in a terse form") << endl; - cout << _(" dumpavail - Print an available file to stdout") << endl; - cout << _(" unmet - Show unmet dependencies") << endl; - cout << _(" check - Check the cache a bit") << endl; - cout << _(" search - Search the package list for a regex pattern") << endl; - cout << _(" show - Show a readable record for the package") << endl; - cout << _(" depends - Show raw dependency information for a package") << endl; - cout << _(" pkgnames - List the names of all packages") << endl; - cout << _(" dotty - Generate package graphs for GraphVis") << endl; - cout << endl; - cout << _("Options:") << endl; - cout << _(" -h This help text.") << endl; - cout << _(" -p=? The package cache. [") << _config->FindFile("Dir::Cache::pkgcache") << ']' << endl; - cout << _(" -s=? The source cache. [") << _config->FindFile("Dir::Cache::srcpkgcache") << ']' << endl; - cout << _(" -q Disable progress indicator.") << endl; - cout << _(" -i Show only important deps for the unmet command.") << endl; - cout << _(" -c=? Read this configuration file") << endl; - cout << _(" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp") << endl; - cout << _("See the apt-cache(8) and apt.conf(5) manual pages for more information.") << endl; - return 100; + cout << + _("Usage: apt-cache [options] command\n" + " apt-cache [options] add file1 [file1 ...]\n" + " apt-cache [options] showpkg pkg1 [pkg2 ...]\n" + " apt-cache [options] showsrc pkg1 [pkg2 ...]\n" + "\n" + "apt-cache is a low-level tool used to manipulate APT's binary\n" + "cache files, and query information from them\n" + "\n" + "Commands:\n" + " add - Add an package file to the source cache\n" + " gencaches - Build both the package and source cache\n" + " showpkg - Show some general information for a single package\n" + " showsrc - Show source records\n" + " stats - Show some basic statistics\n" + " dump - Show the entire file in a terse form\n" + " dumpavail - Print an available file to stdout\n" + " unmet - Show unmet dependencies\n" + " search - Search the package list for a regex pattern\n" + " show - Show a readable record for the package\n" + " depends - Show raw dependency information for a package\n" + " pkgnames - List the names of all packages\n" + " dotty - Generate package graphs for GraphVis\n" + " policy - Show policy settings\n" + "\n" + "Options:\n" + " -h This help text.\n" + " -p=? The package cache.\n" + " -s=? The source cache.\n" + " -q Disable progress indicator.\n" + " -i Show only important deps for the unmet command.\n" + " -c=? Read this configuration file\n" + " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" + "See the apt-cache(8) and apt.conf(5) manual pages for more information.\n"); + return true; } /*}}}*/ // CacheInitialize - Initialize things for apt-cache /*{{{*/ @@ -1247,10 +1342,11 @@ int main(int argc,const char *argv[]) {'q',"quiet","quiet",CommandLine::IntLevel}, {'i',"important","APT::Cache::Important",0}, {'f',"full","APT::Cache::ShowFull",0}, - {'g',"no-generate","APT::Cache::NoGenerate",0}, + {'g',"generate","APT::Cache::Generate",0}, {'a',"all-versions","APT::Cache::AllVersions",0}, {0,"names-only","APT::Cache::NamesOnly",0}, - {0,"all-names","APT::Cache::AllNames",0}, + {'n',"all-names","APT::Cache::AllNames",0}, + {0,"recurse","APT::Cache::RecurseDepends",0}, {'c',"config-file",0,CommandLine::ConfigFile}, {'o',"option",0,CommandLine::ArbItem}, {0,0,0,0}}; @@ -1264,39 +1360,25 @@ int main(int argc,const char *argv[]) {"dump",&Dump}, {"dumpavail",&DumpAvail}, {"unmet",&UnMet}, - {"check",&Check}, {"search",&Search}, {"depends",&Depends}, {"dotty",&Dotty}, {"show",&ShowPackage}, {"pkgnames",&ShowPkgNames}, + {"policy",&Policy}, {0,0}}; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); + + CacheInitialize(); + + // Set up gettext support + setlocale(LC_ALL,""); textdomain(PACKAGE); - if (1) { - RPMFactory *factory = new RPMFactory; - - pkgRpmLock *rpm = new pkgRpmLock(false); - void *shutup_gcc = NULL; - shutup_gcc = rpm; - shutup_gcc = factory; - } -#if 0//akk - else { - DebianFactory *factory = new DebianFactory; - void *shutup_gcc = NULL; - shutup_gcc = factory; - } -#endif - CacheInitialize(); - // Parse the command line and initialize the package library CommandLine CmdL(Args,_config); - if (pkgInitialize(*_config) == false || - CmdL.Parse(argc,argv) == false) + if (pkgInitConfig(*_config) == false || + CmdL.Parse(argc,argv) == false || + pkgInitSystem(*_config,_system) == false) { _error->DumpErrors(); return 100; @@ -1305,16 +1387,19 @@ int main(int argc,const char *argv[]) // See if the help should be shown if (_config->FindB("help") == true || CmdL.FileSize() == 0) - return ShowHelp(CmdL); - + { + ShowHelp(CmdL); + return 0; + } + // Deal with stdout not being a tty if (ttyname(STDOUT_FILENO) == 0 && _config->FindI("quiet",0) < 1) _config->Set("quiet","1"); if (CmdL.DispatchArg(CmdsA,false) == false && _error->PendingError() == false) { - MMap *Map; - if (_config->FindB("APT::Cache::NoGenerate",false) == true) + MMap *Map = 0; + if (_config->FindB("APT::Cache::Generate",true) == false) { Map = new MMap(*new FileFd(_config->FindFile("Dir::Cache::pkgcache"), FileFd::ReadOnly),MMap::Public|MMap::ReadOnly); @@ -1322,17 +1407,17 @@ int main(int argc,const char *argv[]) else { // Open the cache file - pkgSourceList List; - List.ReadMainList(); + SrcList = new pkgSourceList; + SrcList->ReadMainList(); // Generate it and map it OpProgress Prog; - Map = _system->makeStatusCacheMem(List,Prog); + pkgMakeStatusCache(*SrcList,Prog,&Map,true); } if (_error->PendingError() == false) { - pkgCache Cache(*Map); + pkgCache Cache(Map); GCache = &Cache; if (_error->PendingError() == false) CmdL.DispatchArg(CmdsB); @@ -1350,3 +1435,5 @@ int main(int argc,const char *argv[]) return 0; } + +// vim:sts=3:sw=3 diff --git a/apt/cmdline/apt-cdrom.cc b/apt/cmdline/apt-cdrom.cc index 7fab58e..cac1b63 100644 --- a/apt/cmdline/apt-cdrom.cc +++ b/apt/cmdline/apt-cdrom.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-cdrom.cc,v 1.10 2001/11/13 17:32:08 kojima Exp $ +// $Id: apt-cdrom.cc,v 1.5 2003/01/29 15:11:14 niemeyer Exp $ /* ###################################################################### APT CDROM - Tool for handling APT's CDROM database. @@ -19,11 +19,11 @@ #include #include #include +#include + +#include "rpmindexcopy.h" // CNC:2002-07-11 -#include - -#include "rpmindexcopy.h" - +#include #include #include #include @@ -35,10 +35,7 @@ #include /*}}}*/ -#define PACKAGES "pkglist" -#define SOURCES "srclist" - - +using namespace std; // FindPackages - Find the package files on the CDROM /*{{{*/ // --------------------------------------------------------------------- @@ -46,22 +43,6 @@ search that short circuits when it his a package file in the dir. This speeds it up greatly as the majority of the size is in the binary-* sub dirs. */ -#if 1 -static int strrcmp_(const char *a, const char *b) -{ - int la = strlen(a); - int lb = strlen(b); - - if (la == 0 || lb == 0) - return 0; - - if (la > lb) - return strcmp(&a[la-lb], b); - else - return strcmp(&b[lb-la], a); -} - - bool FindPackages(string CD,vector &List,vector &SList, string &InfoDir,unsigned int Depth = 0) { @@ -73,7 +54,7 @@ bool FindPackages(string CD,vector &List,vector &SList, CD += '/'; if (chdir(CD.c_str()) != 0) - return _error->Errno("chdir",_("Unable to change to %s"),CD.c_str()); + return _error->Errno("chdir","Unable to change to %s",CD.c_str()); // Look for a .disk subdirectory struct stat Buf; @@ -82,139 +63,13 @@ bool FindPackages(string CD,vector &List,vector &SList, if (InfoDir.empty() == true) InfoDir = CD + ".disk/"; } - - DIR *D = opendir("."); - if (D == 0) - return _error->Errno("opendir",_("Unable to read %s"),CD.c_str()); - - bool found = false; - // Run over the directory - for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D)) - { - // We go through a list of several cases of what this directory entry can be: - // (0) an entry that we skip, (1) a pkglist file, (2) a srclist file, - // (3) another entry that is not a subdirectory. The final case (4) - // is a subdirecory. - // - // When we finish dealing with one of the cases, we 'continue;'. - // Note that if "Thorough" option is set to "false" - // and a list was found in this directory, then case (4) is not a - // special case for us: we skip it just like in case (3) for any other entries - // because we do not have to recurse deeper into subdirectories. - - // case 0 - // Skip some files.. - if (strcmp(Dir->d_name,".") == 0 || - strcmp(Dir->d_name,"..") == 0 || - //strcmp(Dir->d_name,"source") == 0 || - strcmp(Dir->d_name,".disk") == 0 || - strncmp(Dir->d_name,"RPMS", 4) == 0 || - strstr(Dir->d_name,"image") != NULL) - continue; - - // case 1 - if (strncmp(Dir->d_name, "pkglist", sizeof("pkglist")-1) == 0 && - strrcmp_(Dir->d_name, _config->Find("Acquire::ComprExtension").c_str())==0) - { - List.push_back(CD + string(Dir->d_name)); - found = true; - continue; - } - // case 2 - if (strncmp(Dir->d_name, "srclist", sizeof("srclist")-1) == 0 && - strrcmp_(Dir->d_name, _config->Find("Acquire::ComprExtension").c_str())==0) - { - SList.push_back(CD + string(Dir->d_name)); - found = true; - continue; - } - //choosing between cases 3 and 4 - - // Continue down if thorough is given - if ((_config->FindB("APT::CDROM::Thorough",false) == false) && (found == true)) - continue; - - - // See if the name is a sub directory - struct stat Buf; - if (stat(Dir->d_name,&Buf) != 0) - continue; - - // case 3 - if (S_ISDIR(Buf.st_mode) == 0) - continue; - - // case 4 - unsigned int I; - for (I = 0; I != Depth; I++) - if (Inodes[I] == Buf.st_ino) - break; - if (I != Depth) - continue; - - // Store the inodes weve seen - Inodes[Depth] = Buf.st_ino; - - // Descend - if (FindPackages(CD + Dir->d_name,List,SList,InfoDir,Depth+1) == false) - break; - - if (chdir(CD.c_str()) != 0) - return _error->Errno("chdir",_("Unable to change to %s"),CD.c_str()); - }; - - closedir(D); - - return !_error->PendingError(); -} - -// DropBinaryArch - Dump dirs that contain a file like / /*{{{*/ -// --------------------------------------------------------------------- -/* Here we drop everything that is not this machines arch */ -bool DropBinaryArch(vector &List) -{ - const string arch = _config->Find("Apt::Architecture"); - struct stat buf; - - for (unsigned int I = 0; I < List.size(); I++) - { - const char *Str = List[I].c_str(); - - string prefix = string(List[I], 0, strstr(Str, "base")-Str); - - if (stat(string(prefix+arch).c_str(), &buf) == 0) - continue; - - // Erase it - List.erase(List.begin() + I); - I--; - } - - return true; -} -#else //4 debian -bool FindPackages(string CD,vector &List,vector &SList, - string &InfoDir,unsigned int Depth = 0) -{ - static ino_t Inodes[9]; - if (Depth >= 7) + // Don't look into directories that have been marked to ingore. + if (stat(".aptignr",&Buf) == 0) return true; - - if (CD[CD.length()-1] != '/') - CD += '/'; - - if (chdir(CD.c_str()) != 0) - return _error->Errno("chdir",_("Unable to change to %s"),CD.c_str()); - - // Look for a .disk subdirectory - struct stat Buf; - if (stat(".disk",&Buf) == 0) - { - if (InfoDir.empty() == true) - InfoDir = CD + ".disk/"; - } - + +// CNC:2002-07-11 +#if 0 /* Aha! We found some package files. We assume that everything under this dir is controlled by those package files so we don't look down anymore */ @@ -226,7 +81,7 @@ bool FindPackages(string CD,vector &List,vector &SList, if (_config->FindB("APT::CDROM::Thorough",false) == false) return true; } - if (stat("Sources",&Buf) == 0 || stat("Sources.gz",&Buf) == 0) + if (stat("Sources.gz",&Buf) == 0 || stat("Sources",&Buf) == 0) { SList.push_back(CD); @@ -234,10 +89,15 @@ bool FindPackages(string CD,vector &List,vector &SList, if (_config->FindB("APT::CDROM::Thorough",false) == false) return true; } +#else + bool Found = false; + if (stat("release",&Buf) == 0) + Found = true; +#endif DIR *D = opendir("."); if (D == 0) - return _error->Errno("opendir",_("Unable to read %s"),CD.c_str()); + return _error->Errno("opendir","Unable to read %s",CD.c_str()); // Run over the directory for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D)) @@ -247,9 +107,31 @@ bool FindPackages(string CD,vector &List,vector &SList, strcmp(Dir->d_name,"..") == 0 || //strcmp(Dir->d_name,"source") == 0 || strcmp(Dir->d_name,".disk") == 0 || - strcmp(Dir->d_name,"experimental") == 0 || - strcmp(Dir->d_name,"binary-all") == 0) - continue; + // CNC:2002-07-11 + //strcmp(Dir->d_name,"experimental") == 0 || + //strcmp(Dir->d_name,"binary-all") == 0) + strncmp(Dir->d_name,"RPMS",4) == 0 || + strncmp(Dir->d_name,"doc",3) == 0) + continue; + + // CNC:2002-07-11 + if (strncmp(Dir->d_name, "pkglist.", 8) == 0 && + strcmp(Dir->d_name+strlen(Dir->d_name)-4, ".bz2") == 0) + { + List.push_back(CD + string(Dir->d_name)); + Found = true; + continue; + } + if (strncmp(Dir->d_name, "srclist.", 8) == 0 && + strcmp(Dir->d_name+strlen(Dir->d_name)-4, ".bz2") == 0) + { + SList.push_back(CD + string(Dir->d_name)); + Found = true; + continue; + } + if (_config->FindB("APT::CDROM::Thorough",false) == false && + Found == true) + continue; // See if the name is a sub directory struct stat Buf; @@ -274,21 +156,24 @@ bool FindPackages(string CD,vector &List,vector &SList, break; if (chdir(CD.c_str()) != 0) - return _error->Errno("chdir",_("Unable to change to %s"),CD.c_str()); + return _error->Errno("chdir","Unable to change to %s",CD.c_str()); }; closedir(D); return !_error->PendingError(); } - + /*}}}*/ +// CNC:2002-07-11 +#if 0 // DropBinaryArch - Dump dirs with a string like /binary-/ /*{{{*/ // --------------------------------------------------------------------- /* Here we drop everything that is not this machines arch */ bool DropBinaryArch(vector &List) { char S[300]; - sprintf(S,"/binary-%s/",_config->Find("Apt::Architecture").c_str()); + snprintf(S,sizeof(S),"/binary-%s/", + _config->Find("Apt::Architecture").c_str()); for (unsigned int I = 0; I < List.size(); I++) { @@ -404,13 +289,14 @@ bool DropRepeats(vector &List,const char *Name) return true; } -#endif /*}}}*/ /*}}}*/ +#endif + /*}}}*/ // ReduceSourceList - Takes the path list and reduces it /*{{{*/ // --------------------------------------------------------------------- /* This takes the list of source list expressed entires and collects similar ones to form a single entry for each dist */ -bool ReduceSourcelist(string CD,vector &List) +void ReduceSourcelist(string CD,vector &List) { sort(List.begin(),List.end()); @@ -424,8 +310,9 @@ bool ReduceSourcelist(string CD,vector &List) string::size_type SSpace = (*I).find(' ',Space + 1); if (SSpace == string::npos) continue; - + string Word1 = string(*I,Space,SSpace-Space); + string Prefix = string(*I,0,Space); for (vector::iterator J = List.begin(); J != I; J++) { // Find a space.. @@ -436,6 +323,8 @@ bool ReduceSourcelist(string CD,vector &List) if (SSpace2 == string::npos) continue; + if (string(*J,0,Space2) != Prefix) + continue; if (string(*J,Space2,SSpace2-Space2) != Word1) continue; @@ -452,7 +341,6 @@ bool ReduceSourcelist(string CD,vector &List) else List.erase(List.begin()+I); } - return true; } /*}}}*/ // WriteDatabase - Write the CDROM Database file /*{{{*/ @@ -467,7 +355,7 @@ bool WriteDatabase(Configuration &Cnf) ofstream Out(NewFile.c_str()); if (!Out) return _error->Errno("ofstream::ofstream", - _("Failed to open %s.new"),DFile.c_str()); + "Failed to open %s.new",DFile.c_str()); /* Write out all of the configuration directives by walking the configuration tree */ @@ -494,7 +382,7 @@ bool WriteDatabase(Configuration &Cnf) rename(DFile.c_str(),string(DFile + '~').c_str()); if (rename(NewFile.c_str(),DFile.c_str()) != 0) - return _error->Errno("rename",_("Failed to rename %s.new to %s"), + return _error->Errno("rename","Failed to rename %s.new to %s", DFile.c_str(),DFile.c_str()); return true; @@ -514,7 +402,8 @@ bool WriteSourceList(string Name,vector &List,bool Source) string File = _config->FindFile("Dir::Etc::sourcelist"); // Open the stream for reading - ifstream F(File.c_str(),ios::in | ios::nocreate); + ifstream F((FileExists(File)?File.c_str():"/dev/null"), + ios::in ); if (!F != 0) return _error->Errno("ifstream::ifstream","Opening %s",File.c_str()); @@ -523,27 +412,18 @@ bool WriteSourceList(string Name,vector &List,bool Source) ofstream Out(NewFile.c_str()); if (!Out) return _error->Errno("ofstream::ofstream", - _("Failed to open %s.new"),File.c_str()); + "Failed to open %s.new",File.c_str()); // Create a short uri without the path string ShortURI = "cdrom:[" + Name + "]/"; string ShortURI2 = "cdrom:" + Name + "/"; // For Compatibility + // CNC:2002-07-11 const char *Type; - if (0) - {//akk - if (Source == true) - Type = "deb-src"; - else - Type = "deb"; - } + if (Source == true) + Type = "rpm-src"; else - { - if (Source == true) - Type = "rpm-src"; - else - Type = "rpm"; - } + Type = "rpm"; char Buffer[300]; int CurLine = 0; @@ -568,7 +448,7 @@ bool WriteSourceList(string Name,vector &List,bool Source) { string::size_type Space = (*I).find(' '); if (Space == string::npos) - return _error->Error(_("Internal error")); + return _error->Error("Internal error"); Out << Type << " cdrom:[" << Name << "]/" << string(*I,0,Space) << " " << string(*I,Space+1) << endl; } @@ -602,10 +482,11 @@ bool WriteSourceList(string Name,vector &List,bool Source) { string::size_type Space = (*I).find(' '); if (Space == string::npos) - return _error->Error(_("Internal error")); - - Out << Type << " cdrom:[" << Name << "]/" << string(*I,0,Space) << - " " << string(*I,Space+1) << endl; + return _error->Error("Internal error"); + + // CNC:2002-07-11 + Out << "rpm cdrom:[" << Name << "]/" << string(*I,0,Space) << + " " << string(*I,Space+1) << endl; } } @@ -613,7 +494,7 @@ bool WriteSourceList(string Name,vector &List,bool Source) rename(File.c_str(),string(File + '~').c_str()); if (rename(NewFile.c_str(),File.c_str()) != 0) - return _error->Errno("rename",_("Failed to rename %s.new to %s"), + return _error->Errno("rename","Failed to rename %s.new to %s", File.c_str(),File.c_str()); return true; @@ -658,7 +539,7 @@ bool DoAdd(CommandLine &) if (CDROM[0] == '.') CDROM= SafeGetCWD() + '/' + CDROM; - cout << _("Using CD-ROM mount point ") << CDROM << endl; + cout << "Using CD-ROM mount point " << CDROM << endl; // Read the database Configuration Database; @@ -666,41 +547,62 @@ bool DoAdd(CommandLine &) if (FileExists(DFile) == true) { if (ReadConfigFile(Database,DFile) == false) - return _error->Error(_("Unable to read the cdrom database %s"), + return _error->Error("Unable to read the cdrom database %s", DFile.c_str()); } + + // CNC:2002-10-29 + bool PreFetch = false; + string PreFetchDir = _config->FindDir("Dir::State::prefetch"); + string ID = _config->Find("APT::CDROM::ID"); + if (ID.empty() == false && FileExists(PreFetchDir+"/"+ID)) + PreFetch = true; // Unmount the CD and get the user to put in the one they want - if (_config->FindB("APT::CDROM::NoMount",false) == false) + // CNC:2002-10-29 + bool Mounted = false; + if (PreFetch == false && _config->FindB("APT::CDROM::NoMount",false) == false) { - cout << _("Unmounting CD-ROM") << endl; + Mounted = true; + cout << "Unmounting CD-ROM" << endl; UnmountCdrom(CDROM); // Mount the new CDROM - Prompt(_("Please insert a Disc in the drive and press enter")); - cout << _("Mounting CD-ROM") << endl; + Prompt("Please insert a Disc in the drive and press enter"); + cout << "Mounting CD-ROM" << endl; if (MountCdrom(CDROM) == false) - return _error->Error(_("Failed to mount the cdrom.")); + return _error->Error("Failed to mount the cdrom."); } // Hash the CD to get an ID - cout << _("Identifying.. ") << flush; - string ID; - if (IdentCdrom(CDROM,ID) == false) + cout << "Identifying.. " << flush; + // CNC:2002-10-29 + // string ID; + if (ID.empty() == true && IdentCdrom(CDROM,ID) == false) { cout << endl; return false; } - + + // CNC:2002-10-29 + if (PreFetch == false && FileExists(PreFetchDir+"/"+ID)) + PreFetch = true; + string ScanDir = CDROM; + if (PreFetch == true) + ScanDir = PreFetchDir+"/"+ID; + if (ScanDir[ScanDir.length()-1] != '/') + ScanDir += '/'; + cout << '[' << ID << ']' << endl; - cout << _("Scanning Disc for index files.. ") << flush; + cout << "Scanning Disc for index files.. " << flush; // Get the CD structure vector List; vector sList; string StartDir = SafeGetCWD(); string InfoDir; - if (FindPackages(CDROM,List,sList,InfoDir) == false) + // CNC:2002-10-29 + if (FindPackages(ScanDir,List,sList,InfoDir) == false) { cout << endl; return false; @@ -710,31 +612,31 @@ bool DoAdd(CommandLine &) if (_config->FindB("Debug::aptcdrom",false) == true) { - cout << _("I found (binary):") << endl; + cout << "I found (binary):" << endl; for (vector::iterator I = List.begin(); I != List.end(); I++) cout << *I << endl; - cout << _("I found (source):") << endl; + cout << "I found (source):" << endl; for (vector::iterator I = sList.begin(); I != sList.end(); I++) cout << *I << endl; } - // Fix up the list -// DropBinaryArch(List); - +// CNC:2002-07-11 #if 0 - //akk + // Fix up the list + DropBinaryArch(List); DropRepeats(List,"Packages"); DropRepeats(sList,"Sources"); #endif - cout << _("Found ") << List.size() << _(" package indexes and ") << sList.size() << - _(" source indexes.") << endl; + cout << "Found " << List.size() << " package indexes and " << sList.size() << + " source indexes." << endl; - if (List.size() == 0 && sList.size() == 0) + // CNC:2002-07-11 + if (List.size() == 0 && sList.size() == 0) { - if (0) - return _error->Error(_("Unable to locate any package files, perhaps this is not a Debian Disc")); - else - return _error->Error(_("Unable to locate any package files, perhaps this is not a Conectiva Disc")); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); + return _error->Error("Unable to locate any package files, perhaps this is not an APT enabled disc"); + } // Check if the CD is in the database string Name; @@ -751,7 +653,13 @@ bool DoAdd(CommandLine &) if (Name.empty() == false) { - cout << _("Found label '") << Name << "'" << endl; + // Escape special characters + string::iterator J = Name.begin(); + for (; J != Name.end(); J++) + if (*J == '"' || *J == ']' || *J == '[') + *J = '_'; + + cout << "Found label '" << Name << "'" << endl; Database.Set("CD::" + ID + "::Label",Name); } } @@ -759,8 +667,8 @@ bool DoAdd(CommandLine &) if (_config->FindB("APT::CDROM::Rename",false) == true || Name.empty() == true) { - cout << _("Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1'"); - + // CNC:2002-07-11 + cout << "Please provide a name for this Disc, such as 'Conectiva Disk 1'"; while (1) { Name = PromptLine(""); @@ -769,7 +677,7 @@ bool DoAdd(CommandLine &) Name.find('[') == string::npos && Name.find(']') == string::npos) break; - cout << _("That is not a valid name, try again ") << endl; + cout << "That is not a valid name, try again " << endl; } } } @@ -783,18 +691,20 @@ bool DoAdd(CommandLine &) *J = '_'; Database.Set("CD::" + ID,Name); - cout << _("This Disc is called:") << endl << " '" << Name << "'" << endl; + cout << "This Disc is called:" << endl << " '" << Name << "'" << endl; // Copy the package files to the state directory + // CNC:2002-07-11 RPMPackageCopy Copy; RPMSourceCopy SrcCopy; - - if (Copy.CopyPackages(CDROM,Name,List) == false || - SrcCopy.CopyPackages(CDROM,Name,sList) == false) + // CNC:2002-10-29 + if (Copy.CopyPackages(ScanDir,Name,List) == false || + SrcCopy.CopyPackages(ScanDir,Name,sList) == false) return false; - ReduceSourcelist(CDROM,List); - ReduceSourcelist(CDROM,sList); + // CNC:2002-10-29 + ReduceSourcelist(ScanDir,List); + ReduceSourcelist(ScanDir,sList); // Write the database and sourcelist if (_config->FindB("APT::cdrom::NoAct",false) == false) @@ -802,90 +712,118 @@ bool DoAdd(CommandLine &) if (WriteDatabase(Database) == false) return false; - cout << _("Writing new source list") << endl; + cout << "Writing new source list" << endl; if (WriteSourceList(Name,List,false) == false || WriteSourceList(Name,sList,true) == false) return false; } // Print the sourcelist entries - cout << _("Source List entries for this Disc are:") << endl; + cout << "Source List entries for this Disc are:" << endl; for (vector::iterator I = List.begin(); I != List.end(); I++) { string::size_type Space = (*I).find(' '); if (Space == string::npos) - return _error->Error(_("Internal error")); + return _error->Error("Internal error"); - if (0) - {//akk - cout << "deb cdrom:[" << Name << "]/" << string(*I,0,Space) << - " " << string(*I,Space+1) << endl; - } - else - { - cout << "rpm cdrom:[" << Name << "]/" << string(*I,0,Space) << - " " << string(*I,Space+1) << endl; - } + // CNC:2002-07-11 + cout << "rpm cdrom:[" << Name << "]/" << string(*I,0,Space) << + " " << string(*I,Space+1) << endl; } for (vector::iterator I = sList.begin(); I != sList.end(); I++) { string::size_type Space = (*I).find(' '); if (Space == string::npos) - return _error->Error(_("Internal error")); + return _error->Error("Internal error"); - if (0) - {//akk - cout << "deb-src cdrom:[" << Name << "]/" << string(*I,0,Space) << - " " << string(*I,Space+1) << endl; - } - else - { - cout << "rpm-src cdrom:[" << Name << "]/" << string(*I,0,Space) << - " " << string(*I,Space+1) << endl; - } + // CNC:2002-07-11 + cout << "rpm-src cdrom:[" << Name << "]/" << string(*I,0,Space) << + " " << string(*I,Space+1) << endl; } - cout << _("Repeat this process for the rest of the CDs in your set.") << endl; + cout << "Repeat this process for the rest of the CDs in your set." << endl; // Unmount and finish - if (_config->FindB("APT::CDROM::NoMount",false) == false) + // CNC:2002-10-29 + if (Mounted == true) UnmountCdrom(CDROM); return true; } /*}}}*/ +// DoIdent - Ident a CDROM /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool DoIdent(CommandLine &) +{ + // Startup + string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); + if (CDROM[0] == '.') + CDROM= SafeGetCWD() + '/' + CDROM; + + cout << "Using CD-ROM mount point " << CDROM << endl; + cout << "Mounting CD-ROM" << endl; + if (MountCdrom(CDROM) == false) + return _error->Error("Failed to mount the cdrom."); + + // Hash the CD to get an ID + cout << "Identifying.. " << flush; + string ID; + if (IdentCdrom(CDROM,ID) == false) + { + cout << endl; + return false; + } + + cout << '[' << ID << ']' << endl; + + // Read the database + Configuration Database; + string DFile = _config->FindFile("Dir::State::cdroms"); + if (FileExists(DFile) == true) + { + if (ReadConfigFile(Database,DFile) == false) + return _error->Error("Unable to read the cdrom database %s", + DFile.c_str()); + } + cout << "Stored Label: '" << Database.Find("CD::" + ID) << "'" << endl; + return true; +} + /*}}}*/ // ShowHelp - Show the help screen /*{{{*/ // --------------------------------------------------------------------- /* */ int ShowHelp() { - cout << PACKAGE << ' ' << VERSION << " for " << COMMON_CPU << - " compiled on " << __DATE__ << " " << __TIME__ << endl; + ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_OS,COMMON_CPU,__DATE__,__TIME__); if (_config->FindB("version") == true) - return 100; + return 0; - cout << _("Usage: apt-cdrom [options] command") << endl; - cout << endl; - cout << _("apt-cdrom is a tool to add CDROM's to APT's source list. The ") << endl; - cout << _("CDROM mount point and device information is taken from apt.conf") << endl; - cout << _("and /etc/fstab.") << endl; - cout << endl; - cout << _("Commands:") << endl; - cout << _(" add - Add a CDROM") << endl; - cout << endl; - cout << _("Options:") << endl; - cout << _(" -h This help text") << endl; - cout << _(" -d CD-ROM mount point") << endl; - cout << _(" -r Rename a recognized CD-ROM") << endl; - cout << _(" -m No mounting") << endl; - cout << _(" -f Fast mode, don't check package files") << endl; - cout << _(" -a Thorough scan mode") << endl; - cout << _(" -c=? Read this configuration file") << endl; - cout << _(" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp") << endl; - cout << _("See fstab(5)") << endl; - return 100; + cout << + "Usage: apt-cdrom [options] command\n" + "\n" + "apt-cdrom is a tool to add CDROM's to APT's source list. The\n" + "CDROM mount point and device information is taken from apt.conf\n" + "and /etc/fstab.\n" + "\n" + "Commands:\n" + " add - Add a CDROM\n" + " ident - Report the identity of a CDROM\n" + "\n" + "Options:\n" + " -h This help text\n" + " -d CD-ROM mount point\n" + " -r Rename a recognized CD-ROM\n" + " -m No mounting\n" + " -f Fast mode, don't check package files\n" + " -a Thorough scan mode\n" + " -c=? Read this configuration file\n" + " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" + "See fstab(5)\n"; + return 0; } /*}}}*/ @@ -907,16 +845,18 @@ int main(int argc,const char *argv[]) {0,0,0,0}}; CommandLine::Dispatch Cmds[] = { {"add",&DoAdd}, + {"ident",&DoIdent}, {0,0}}; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); + + // Set up gettext support + setlocale(LC_ALL,""); textdomain(PACKAGE); - + // Parse the command line and initialize the package library CommandLine CmdL(Args,_config); - if (pkgInitialize(*_config) == false || - CmdL.Parse(argc,argv) == false) + if (pkgInitConfig(*_config) == false || + CmdL.Parse(argc,argv) == false || + pkgInitSystem(*_config,_system) == false) { _error->DumpErrors(); return 100; @@ -944,3 +884,5 @@ int main(int argc,const char *argv[]) return 0; } + +// vim:sw=3:sts=3 diff --git a/apt/cmdline/apt-config.cc b/apt/cmdline/apt-config.cc index 23f7476..14cdf93 100644 --- a/apt/cmdline/apt-config.cc +++ b/apt/cmdline/apt-config.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-config.cc,v 1.3 2001/08/01 21:57:05 kojima Exp $ +// $Id: apt-config.cc,v 1.5 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### APT Config - Program to manipulate APT configuration files @@ -19,12 +19,16 @@ #include #include #include -#include "config.h" +#include -#include +#include +#include +#include #include +#include /*}}}*/ +using namespace std; // DoShell - Handle the shell command /*{{{*/ // --------------------------------------------------------------------- @@ -36,18 +40,14 @@ bool DoShell(CommandLine &CmdL) if (I[1] == 0 || strlen(I[1]) == 0) return _error->Error(_("Arguments not in pairs")); - // Check if the caller has requested a directory path - if (I[1][strlen(I[1])-1] == '/') - { - char S[300]; - strcpy(S,I[1]); - S[strlen(S)-1] = 0; - if (_config->Exists(S) == true) - cout << *I << "=\"" << _config->FindDir(S) << '"' << endl; - } + string key = I[1]; + if (key.end()[-1] == '/') // old directory format + key.append("d"); + + if (_config->ExistsAny(key.c_str())) + cout << *I << "='" << + SubstVar(_config->FindAny(key.c_str()),"'","'\\''") << '\'' << endl; - if (_config->Exists(I[1]) == true) - cout << *I << "=\"" << _config->Find(I[1]) << '"' << endl; } return true; @@ -58,7 +58,7 @@ bool DoShell(CommandLine &CmdL) /* */ bool DoDump(CommandLine &CmdL) { - _config->Dump(); + _config->Dump(cout); return true; } /*}}}*/ @@ -67,24 +67,25 @@ bool DoDump(CommandLine &CmdL) /* */ int ShowHelp() { - cout << PACKAGE << ' ' << VERSION << " for " << COMMON_CPU << - " compiled on " << __DATE__ << " " << __TIME__ << endl; + ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_OS,COMMON_CPU,__DATE__,__TIME__); if (_config->FindB("version") == true) - return 100; + return 0; - cout << _("Usage: apt-config [options] command") << endl; - cout << endl; - cout << _("apt-config is a simple tool to read the APT config file") << endl; - cout << endl; - cout << _("Commands:") << endl; - cout << _(" shell - Shell mode") << endl; - cout << _(" dump - Show the configuration") << endl; - cout << endl; - cout << _("Options:") << endl; - cout << _(" -h This help text.") << endl; - cout << _(" -c=? Read this configuration file") << endl; - cout << _(" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp") << endl; - return 100; + cout << + _("Usage: apt-config [options] command\n" + "\n" + "apt-config is a simple tool to read the APT config file\n" + "\n" + "Commands:\n" + " shell - Shell mode\n" + " dump - Show the configuration\n" + "\n" + "Options:\n" + " -h This help text.\n" + " -c=? Read this configuration file\n" + " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n"); + return 0; } /*}}}*/ @@ -99,15 +100,16 @@ int main(int argc,const char *argv[]) CommandLine::Dispatch Cmds[] = {{"shell",&DoShell}, {"dump",&DoDump}, {0,0}}; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); + + // Set up gettext support + setlocale(LC_ALL,""); textdomain(PACKAGE); - + // Parse the command line and initialize the package library CommandLine CmdL(Args,_config); - if (pkgInitialize(*_config) == false || - CmdL.Parse(argc,argv) == false) + if (pkgInitConfig(*_config) == false || + CmdL.Parse(argc,argv) == false || + pkgInitSystem(*_config,_system) == false) { _error->DumpErrors(); return 100; diff --git a/apt/cmdline/apt-extracttemplates.cc b/apt/cmdline/apt-extracttemplates.cc new file mode 100644 index 0000000..3d4fe2c --- /dev/null +++ b/apt/cmdline/apt-extracttemplates.cc @@ -0,0 +1,385 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: apt-extracttemplates.cc,v 1.5 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + APT Extract Templates - Program to extract debconf config and template + files + + This is a simple program to extract config and template information + from Debian packages. It can be used to speed up the preconfiguration + process for debconf-enabled packages + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include "apt-extracttemplates.h" + /*}}}*/ + +using namespace std; + +#define TMPDIR "/tmp" + +pkgCache *DebFile::Cache = 0; + +// DebFile::DebFile - Construct the DebFile object /*{{{*/ +// --------------------------------------------------------------------- +/* */ +DebFile::DebFile(const char *debfile) + : File(debfile, FileFd::ReadOnly), Control(0), DepOp(0), + PreDepOp(0), Config(0), Template(0), Which(None) +{ +} + /*}}}*/ +// DebFile::~DebFile - Destruct the DebFile object /*{{{*/ +// --------------------------------------------------------------------- +/* */ +DebFile::~DebFile() +{ + delete [] Control; + delete [] Config; + delete [] Template; +} + /*}}}*/ +// DebFile::GetInstalledVer - Find out the installed version of a pkg /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string DebFile::GetInstalledVer(const string &package) +{ + pkgCache::PkgIterator Pkg = Cache->FindPkg(package); + if (Pkg.end() == false) + { + pkgCache::VerIterator V = Pkg.CurrentVer(); + if (V.end() == false) + { + return V.VerStr(); + } + } + + return string(); +} + /*}}}*/ +// DebFile::Go - Start extracting a debian package /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool DebFile::Go() +{ + ARArchive AR(File); + if (_error->PendingError() == true) + return false; + + const ARArchive::Member *Member = AR.FindMember("control.tar.gz"); + if (Member == 0) + return _error->Error(_("%s not a valid DEB package."),File.Name().c_str()); + + if (File.Seek(Member->Start) == false) + return false; + ExtractTar Tar(File, Member->Size); + return Tar.Go(*this); +} + /*}}}*/ +// DebFile::DoItem examine element in package and mark /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool DebFile::DoItem(Item &I, int &Fd) +{ + if (strcmp(I.Name, "control") == 0) + { + delete [] Control; + Control = new char[I.Size+1]; + Control[I.Size] = 0; + Which = IsControl; + ControlLen = I.Size; + // make it call the Process method below. this is so evil + Fd = -2; + } + else if (strcmp(I.Name, "config") == 0) + { + delete [] Config; + Config = new char[I.Size+1]; + Config[I.Size] = 0; + Which = IsConfig; + Fd = -2; + } + else if (strcmp(I.Name, "templates") == 0) + { + delete [] Template; + Template = new char[I.Size+1]; + Template[I.Size] = 0; + Which = IsTemplate; + Fd = -2; + } + else + { + // Ignore it + Fd = -1; + } + return true; +} + /*}}}*/ +// DebFile::Process examine element in package and copy /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool DebFile::Process(Item &I, const unsigned char *data, + unsigned long size, unsigned long pos) +{ + switch (Which) + { + case IsControl: + memcpy(Control + pos, data, size); + break; + case IsConfig: + memcpy(Config + pos, data, size); + break; + case IsTemplate: + memcpy(Template + pos, data, size); + break; + default: /* throw it away */ ; + } + return true; +} + /*}}}*/ +// DebFile::ParseInfo - Parse control file for dependency info /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool DebFile::ParseInfo() +{ + if (Control == NULL) return false; + + pkgTagSection Section; + Section.Scan(Control, ControlLen); + + Package = Section.FindS("Package"); + Version = GetInstalledVer(Package); + + const char *Start, *Stop; + if (Section.Find("Depends", Start, Stop) == true) + { + while (1) + { + string P, V; + unsigned int Op; + Start = debListParser::ParseDepends(Start, Stop, P, V, Op); + if (Start == 0) return false; + if (P == "debconf") + { + DepVer = V; + DepOp = Op; + break; + } + if (Start == Stop) break; + } + } + + if (Section.Find("Pre-Depends", Start, Stop) == true) + { + while (1) + { + string P, V; + unsigned int Op; + Start = debListParser::ParseDepends(Start, Stop, P, V, Op); + if (Start == 0) return false; + if (P == "debconf") + { + PreDepVer = V; + PreDepOp = Op; + break; + } + if (Start == Stop) break; + } + } + + return true; +} + /*}}}*/ +// ShowHelp - show a short help text /*{{{*/ +// --------------------------------------------------------------------- +/* */ +int ShowHelp(void) +{ + ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + + if (_config->FindB("version") == true) + return 0; + + cout << + _("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 arbitary configuration option, eg -o dir::cache=/tmp\n"); + return 0; +} + /*}}}*/ +// WriteFile - write the contents of the passed string to a file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string WriteFile(const char *package, const char *prefix, const char *data) +{ + char fn[512]; + static int i; + snprintf(fn, sizeof(fn), "%s/%s.%s.%u%d", _config->Find("APT::ExtractTemplates::TempDir", TMPDIR).c_str(), package, prefix, getpid(), i++); + FileFd f; + if (data == NULL) + data = ""; + + if (!f.Open(fn, FileFd::WriteTemp, 0600)) + { + _error->Errno("ofstream::ofstream",_("Unable to write to %s"),fn); + return string(); + } + + f.Write(data, strlen(data)); + f.Close(); + return fn; +} + /*}}}*/ +// WriteConfig - write out the config data from a debian package file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void WriteConfig(const DebFile &file) +{ + string templatefile = WriteFile(file.Package.c_str(), "template", file.Template); + string configscript = WriteFile(file.Package.c_str(), "config", file.Config); + + if (templatefile.empty() == true || configscript.empty() == true) + return; + cout << file.Package << " " << file.Version << " " + << templatefile << " " << configscript << endl; +} + /*}}}*/ +// InitCache - initialize the package cache /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool Go(CommandLine &CmdL) +{ + // Initialize the apt cache + MMap *Map = 0; + pkgSourceList List; + List.ReadMainList(); + OpProgress Prog; + pkgMakeStatusCache(List,Prog,&Map,true); + if (Map == 0) + return false; + DebFile::Cache = new pkgCache(Map); + if (_error->PendingError() == true) + return false; + + // Find out what version of debconf is currently installed + string debconfver = DebFile::GetInstalledVer("debconf"); + if (debconfver.empty() == true) + return _error->Error( _("Cannot get debconf version. Is debconf installed?")); + + // Process each package passsed in + for (unsigned int I = 0; I != CmdL.FileSize(); I++) + { + // Will pick up the errors later.. + DebFile file(CmdL.FileList[I]); + if (file.Go() == false) + { + _error->Error("Prior errors apply to %s",CmdL.FileList[I]); + continue; + } + + // Does the package have templates? + if (file.Template != 0 && file.ParseInfo() == true) + { + // Check to make sure debconf dependencies are + // satisfied + // cout << "Check " << file.DepVer << ',' << debconfver << endl; + if (file.DepVer != "" && + DebFile::Cache->VS->CheckDep(debconfver.c_str(), + file.DepOp,file.DepVer.c_str() + ) == false) + continue; + if (file.PreDepVer != "" && + DebFile::Cache->VS->CheckDep(debconfver.c_str(), + file.PreDepOp,file.PreDepVer.c_str() + ) == false) + continue; + + WriteConfig(file); + } + } + + + delete Map; + delete DebFile::Cache; + + return !_error->PendingError(); +} + /*}}}*/ + +int main(int argc, const char **argv) +{ + CommandLine::Args Args[] = { + {'h',"help","help",0}, + {'v',"version","version",0}, + {'t',"tempdir","APT::ExtractTemplates::TempDir",CommandLine::HasArg}, + {'c',"config-file",0,CommandLine::ConfigFile}, + {'o',"option",0,CommandLine::ArbItem}, + {0,0,0,0}}; + + // Set up gettext support + setlocale(LC_ALL,""); + textdomain(PACKAGE); + + // Parse the command line and initialize the package library + CommandLine CmdL(Args,_config); + if (pkgInitConfig(*_config) == false || + CmdL.Parse(argc,argv) == false || + pkgInitSystem(*_config,_system) == false) + { + _error->DumpErrors(); + return 100; + } + + // See if the help should be shown + if (_config->FindB("help") == true || + CmdL.FileSize() == 0) + return ShowHelp(); + + Go(CmdL); + + // Print any errors or warnings found during operation + if (_error->empty() == false) + { + // This goes to stderr.. + bool Errors = _error->PendingError(); + _error->DumpErrors(); + return Errors == true?100:0; + } + + return 0; +} diff --git a/apt/cmdline/apt-extracttemplates.h b/apt/cmdline/apt-extracttemplates.h new file mode 100644 index 0000000..0167593 --- /dev/null +++ b/apt/cmdline/apt-extracttemplates.h @@ -0,0 +1,48 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: apt-extracttemplates.h,v 1.1 2002/07/23 17:54:51 niemeyer Exp $ +/* ###################################################################### + + apt-extracttemplate - tool to extract template and config data + + ##################################################################### */ + /*}}}*/ +#ifndef _APTEXTRACTTEMPLATE_H_ +#define _APTEXTRACTTEMPLATE_H_ + +#include +#include +#include + +class DebFile : public pkgDirStream +{ + FileFd File; + unsigned long Size; + char *Control; + unsigned long ControlLen; + +public: + DebFile(const char *FileName); + ~DebFile(); + bool DoItem(Item &I, int &fd); + bool Process(pkgDirStream::Item &I, const unsigned char *data, + unsigned long size, unsigned long pos); + + bool Go(); + bool ParseInfo(); + + static string GetInstalledVer(const string &package); + + string Package; + string Version; + string DepVer, PreDepVer; + unsigned int DepOp, PreDepOp; + + char *Config; + char *Template; + + static pkgCache *Cache; + enum { None, IsControl, IsConfig, IsTemplate } Which; +}; + +#endif diff --git a/apt/cmdline/apt-get.cc b/apt/cmdline/apt-get.cc index 670bccd..272112b 100644 --- a/apt/cmdline/apt-get.cc +++ b/apt/cmdline/apt-get.cc @@ -1,9 +1,9 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.45 2001/11/13 18:00:07 kojima Exp $ +// $Id: apt-get.cc,v 1.14 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### - apt-get - Cover for dpkg and rpm + apt-get - Cover for dpkg This is an allout cover for dpkg implementing a safer front end. It is based largely on libapt-pkg. @@ -22,10 +22,7 @@ clean - Erase the .debs downloaded to /var/cache/apt/archives and the partial dir too - ##################################################################### - */ - -//#define DEBUG + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #include @@ -38,23 +35,18 @@ #include #include #include +#include #include - -#include -#include - - -#ifdef DEBUG -#include -#endif - +#include +#include + #include - -#include +#include #include "acqprogress.h" -#include +#include +#include #include #include #include @@ -67,10 +59,11 @@ #include /*}}}*/ +using namespace std; -ostream c0out; -ostream c1out; -ostream c2out; +ostream c0out(0); +ostream c1out(0); +ostream c2out(0); ofstream devnull("/dev/null"); unsigned int ScreenWidth = 80; @@ -87,25 +80,30 @@ class CacheFile : public pkgCacheFile void Sort(); bool CheckDeps(bool AllowBroken = false); + bool BuildCaches(bool WithLock = true) + { + OpTextProgress Prog(*_config); + if (pkgCacheFile::BuildCaches(Prog,WithLock) == false) + return false; + return true; + } bool Open(bool WithLock = true) { OpTextProgress Prog(*_config); - if (pkgCacheFile::Open(Prog,WithLock) == false) return false; Sort(); + return true; }; - -#if 1 - Header header; -#endif - bool LoadRecord(pkgCache::VerIterator V); - const char *GetPriority(); - const char *GetSummary(); - const char *GetDate(); - - CacheFile() : List(0), header(0) {}; + bool OpenForInstall() + { + if (_config->FindB("APT::Get::Print-URIs") == true) + return Open(false); + else + return Open(true); + } + CacheFile() : List(0) {}; }; /*}}}*/ @@ -114,19 +112,24 @@ class CacheFile : public pkgCacheFile /* Returns true on a Yes.*/ bool YnPrompt() { + // This needs to be a capital + const char *Yes = _("Y"); + if (_config->FindB("APT::Get::Assume-Yes",false) == true) { - c1out << 'Y' << endl; + c1out << Yes << endl; return true; } char C = 0; char Jnk = 0; - read(STDIN_FILENO,&C,1); - while (C != '\n' && Jnk != '\n') read(STDIN_FILENO,&Jnk,1); + if (read(STDIN_FILENO,&C,1) != 1) + return false; + while (C != '\n' && Jnk != '\n') + if (read(STDIN_FILENO,&Jnk,1) != 1) + return false; - /* Yes/No */ - if (!(C == *_("Y") || C == *_("y") || C == '\n' || C == '\r')) + if (!(toupper(C) == *Yes || C == '\n' || C == '\r')) return false; return true; } @@ -145,7 +148,7 @@ bool AnalPrompt(const char *Text) /*}}}*/ // ShowList - Show a list /*{{{*/ // --------------------------------------------------------------------- -/* This prints out a string of space seperated words with a title and +/* 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) { @@ -173,76 +176,74 @@ bool ShowList(ostream &out,string Title,string List) return false; } /*}}}*/ - - -void ShowText(ostream &out, const char *text) -{ - const char *begin = text; - const char *end = text; - - while (*begin) - { - const char *p; - - p = begin; - while (1) - { - p++; - if (*p == '\n') - { - end = p+1; - break; - } - else if (*p == '\0') - { - end = p; - break; - } - } - out << " " << string(begin, end); - begin = end; - } - out << endl; -} - // ShowBroken - Debugging aide /*{{{*/ // --------------------------------------------------------------------- /* This prints out the names of all the packages that are broken along with the name of each each broken dependency and a quite version - description. */ + description. + + The output looks like: + The following packages have unmet dependencies: + exim: Depends: libc6 (>= 2.1.94) but 2.1.3-10 is to be installed + Depends: libldap2 (>= 2.0.2-2) but it is not going to be installed + Depends: libsasl7 but it is not going to be installed + */ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) { - out << _("Sorry, but the following packages have unmet dependencies:") << endl; + out << _("The following packages have unmet dependencies:") << endl; for (unsigned J = 0; J < Cache->Head().PackageCount; J++) { pkgCache::PkgIterator I(Cache,Cache.List[J]); - - if (Cache[I].InstBroken() == false) - continue; - + + if (Now == true) + { + if (Cache[I].NowBroken() == false) + continue; + } + else + { + if (Cache[I].InstBroken() == false) + continue; + } + // Print out each package and the failed dependencies out <<" " << I.Name() << ":"; unsigned Indent = strlen(I.Name()) + 3; bool First = true; - if (Cache[I].InstVerIter(Cache).end() == true) + pkgCache::VerIterator Ver; + + if (Now == true) + Ver = I.CurrentVer(); + else + Ver = Cache[I].InstVerIter(Cache); + + if (Ver.end() == true) { - cout << endl; + out << endl; continue; } - for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false;) + for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false;) { // Compute a single dependency element (glob or) pkgCache::DepIterator Start; pkgCache::DepIterator End; D.GlobOr(Start,End); - if (Cache->IsImportantDep(End) == false || - (Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) - { + if (Cache->IsImportantDep(End) == false) continue; + + if (Now == true) + { + if ((Cache[End] & pkgDepCache::DepGNow) == pkgDepCache::DepGNow) + continue; } - + else + { + if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) + continue; + } + bool FirstOr = true; while (1) { @@ -264,34 +265,41 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) // Show a quick summary of the version requirements if (Start.TargetVer() != 0) - out << " (" << Start.CompType() << " " << Start.TargetVer() << - ")"; + out << " (" << Start.CompType() << " " << Start.TargetVer() << ")"; /* Show a summary of the target package if possible. In the case of virtual packages we show nothing */ pkgCache::PkgIterator Targ = Start.TargetPkg(); if (Targ->ProvidesList == 0) { - out << _(" but "); + out << ' '; pkgCache::VerIterator Ver = Cache[Targ].InstVerIter(Cache); + if (Now == true) + Ver = Targ.CurrentVer(); + if (Ver.end() == false) - out << Ver.VerStr() << (Now?_(" is installed"):_(" is to be installed")); + { + if (Now == true) + ioprintf(out,_("but %s is installed"),Ver.VerStr()); + else + ioprintf(out,_("but %s is to be installed"),Ver.VerStr()); + } else { if (Cache[Targ].CandidateVerIter(Cache).end() == true) { if (Targ->ProvidesList == 0) - out << _("it is not installable"); + out << _("but it is not installable"); else - out << _("it is a virtual package"); + out << _("but it is a virtual package"); } else - out << (Now?_("it is not installed"):_("it is not going to be installed")); - } + out << (Now?_("but it is not installed"):_("but it is not going to be installed")); + } } if (Start != End) - cout << _(" or"); + out << _(" or"); out << endl; if (Start == End) @@ -327,26 +335,46 @@ 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 ListReplaced, ListRemoved; + string List, RepList; // CNC:2002-07-25 for (unsigned J = 0; J < Cache->Head().PackageCount; J++) { pkgCache::PkgIterator I(Cache,Cache.List[J]); if (Cache[I].Delete() == true) { - const char *suffix; - if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge) - suffix = "* "; + // CNC:2002-07-25 + bool Obsoleted = false; + string by; + for (pkgCache::DepIterator D = I.RevDependsList(); D.end() == false; D++) + { + if (D->Type == pkgCache::Dep::Obsoletes && + Cache[D.ParentPkg()].Install() && + (pkgCache::Version*)D.ParentVer() == Cache[D.ParentPkg()].InstallVer && + Cache->VS().CheckDep(I.CurrentVer().VerStr(), D) == true) + { + if (Obsoleted) + by += ", " + string(D.ParentPkg().Name()); + else + { + Obsoleted = true; + by = D.ParentPkg().Name(); + } + } + } + if (Obsoleted) + RepList += string(I.Name()) + " (by " + by + ") "; else - suffix = " "; - if (Cache[I].Replaced()) - ListReplaced += string(I.Name()) + suffix; - else - ListRemoved += string(I.Name()) + suffix; + { + if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge) + List += string(I.Name()) + "* "; + else + List += string(I.Name()) + " "; + } } } - - ShowList( out, _("The following packages will be REPLACED:"), ListReplaced ); - ShowList( out, _("The following packages will be REMOVED:"), ListRemoved ); + + // CNC:2002-07-25 + ShowList(out,_("The following packages will be REPLACED:"),RepList); + ShowList(out,_("The following packages will be REMOVED:"),List); } /*}}}*/ // ShowKept - Show kept packages /*{{{*/ @@ -375,7 +403,6 @@ void ShowKept(ostream &out,CacheFile &Cache) void ShowUpgraded(ostream &out,CacheFile &Cache) { string List; - for (unsigned J = 0; J < Cache->Head().PackageCount; J++) { pkgCache::PkgIterator I(Cache,Cache.List[J]); @@ -389,54 +416,23 @@ void ShowUpgraded(ostream &out,CacheFile &Cache) ShowList(out,_("The following packages will be upgraded"),List); } /*}}}*/ -// ShowUpgradeSummary - Show upgraded packages with detailed summary /*{{{*/ +// ShowDowngraded - Show downgraded packages /*{{{*/ // --------------------------------------------------------------------- /* */ -void ShowUpgradeSummary(ostream &out,CacheFile &Cache) +bool ShowDowngraded(ostream &out,CacheFile &Cache) { string List; - bool first = true; - - for (unsigned J = 0; J < Cache->Head().PackageCount; J++) { pkgCache::PkgIterator I(Cache,Cache.List[J]); - const char *prio = NULL; - const char *summ = NULL; - const char *date = NULL; // Not interesting - if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true) + if (Cache[I].Downgrade() == false || Cache[I].NewInstall() == true) continue; - if (Cache.LoadRecord(Cache[I].InstVerIter(Cache))) - { - prio = Cache.GetPriority(); - summ = Cache.GetSummary(); - date = Cache.GetDate(); - } - - if (first) - { - out << _("The following packages can be upgraded:") << endl; - first = false; - } - - if (!prio) - prio = "?"; - if (!date) - date = "?"; - - out << endl << I.Name(); - if (I.CurrentVer() != 0) - out << _(" from ") << I.CurrentVer().VerStr(); - out << _(" to ") << Cache[I].InstVerIter(Cache).VerStr() << endl; - - out << _(" Importance: ") << prio << " "; - out << _(" Date: ") << date << endl; - if (summ) - ShowText(out, summ); + List += string(I.Name()) + " "; } + return ShowList(out,_("The following packages will be DOWNGRADED"),List); } /*}}}*/ // ShowHold - Show held but changed packages /*{{{*/ @@ -464,14 +460,15 @@ bool ShowHold(ostream &out,CacheFile &Cache) bool ShowEssential(ostream &out,CacheFile &Cache) { string List; - bool *Added = new bool[Cache->HeaderP->PackageCount]; - for (unsigned int I = 0; I != Cache->HeaderP->PackageCount; I++) + 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++) { pkgCache::PkgIterator I(Cache,Cache.List[J]); - if ((I->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential) + if ((I->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential && + (I->Flags & pkgCache::Flag::Important) != pkgCache::Flag::Important) continue; // The essential package is being removed @@ -488,48 +485,30 @@ bool ShowEssential(ostream &out,CacheFile &Cache) continue; // Print out any essential package depenendents that are to be removed - // and won't be replaced by something new - for (pkgDepCache::DepIterator D = I.CurrentVer().DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = I.CurrentVer().DependsList(); D.end() == false; D++) { // Skip everything but depends if (D->Type != pkgCache::Dep::PreDepends && D->Type != pkgCache::Dep::Depends) continue; - - pkgCache::Version **Targets = D.AllTargets(); - bool Broke = true; - - while (Targets != 0 && *Targets != 0) + pkgCache::PkgIterator P = D.SmartTargetPkg(); + if (Cache[P].Delete() == true) { - pkgCache::PkgIterator P = pkgCache::VerIterator(*Cache,*Targets).ParentPkg(); - - if (Cache[P].Install() == true || - (P->CurrentVer != 0 && Cache[P].Delete() == false)) - { - Broke = false; - break; - } - Targets++; - } - if (Broke == true) - { - pkgCache::PkgIterator P = D.SmartTargetPkg(); if (Added[P->ID] == true) continue; Added[P->ID] = true; char S[300]; - sprintf(S,_("%s (due to %s) "),P.Name(),I.Name()); + snprintf(S,sizeof(S),_("%s (due to %s) "),P.Name(),I.Name()); List += S; - } + } } } delete [] Added; - if (List.empty() == false) - out << _("WARNING: The following essential packages will be removed") << endl; - return ShowList(out,_("This should NOT be done unless you know exactly what you are doing!"),List); + 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); } /*}}}*/ // Stats - Show some statistics /*{{{*/ @@ -538,105 +517,71 @@ bool ShowEssential(ostream &out,CacheFile &Cache) void Stats(ostream &out,pkgDepCache &Dep) { unsigned long Upgrade = 0; + unsigned long Downgrade = 0; unsigned long Install = 0; unsigned long ReInstall = 0; + // CNC:2002-07-29 + unsigned long Replace = 0; + unsigned long Remove = 0; for (pkgCache::PkgIterator I = Dep.PkgBegin(); I.end() == false; I++) { if (Dep[I].NewInstall() == true) Install++; else + { if (Dep[I].Upgrade() == true) Upgrade++; - if (Dep[I].Delete() == false && (Dep[I].iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall) + else + if (Dep[I].Downgrade() == true) + Downgrade++; + } + // CNC:2002-07-29 + if (Dep[I].Delete() == true) + { + bool Obsoleted = false; + string by; + for (pkgCache::DepIterator D = I.RevDependsList(); + D.end() == false; D++) + { + if (D->Type == pkgCache::Dep::Obsoletes && + Dep[D.ParentPkg()].Install() && + (pkgCache::Version*)D.ParentVer() == Dep[D.ParentPkg()].InstallVer && + Dep.VS().CheckDep(I.CurrentVer().VerStr(), D) == true) + { + Obsoleted = true; + break; + } + } + if (Obsoleted) + Replace++; + else + Remove++; + } + else if ((Dep[I].iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall) ReInstall++; } - out << Upgrade << _(" packages upgraded, ") << - Install << _(" newly installed, "); + ioprintf(out,_("%lu packages upgraded, %lu newly installed, "), + Upgrade,Install); + if (ReInstall != 0) - out << ReInstall << _(" reinstalled, "); - out << Dep.DelCount() << _(" to remove(replace) and ") << - Dep.KeepCount() << _(" not upgraded.") << endl; + ioprintf(out,_("%lu reinstalled, "),ReInstall); + if (Downgrade != 0) + ioprintf(out,_("%lu downgraded, "),Downgrade); + // CNC:2002-07-29 + if (Replace != 0) + ioprintf(out,_("%lu replaced, "),Replace); + // CNC:2002-07-29 + ioprintf(out,_("%lu removed and %lu not upgraded.\n"), + Remove,Dep.KeepCount()); + if (Dep.BadCount() != 0) - out << Dep.BadCount() << _(" packages not fully installed or removed.") << endl; + ioprintf(out,_("%lu packages not fully installed or removed.\n"), + Dep.BadCount()); } /*}}}*/ -bool CacheFile::LoadRecord(pkgCache::VerIterator V) -{ - pkgCache::VerFileIterator Vf = V.FileList(); - for (; Vf.end() == false; Vf++) - if ((Vf.File()->Flags & pkgCache::Flag::NotSource) == 0) - break; - if (Vf.end() == true) - Vf = V.FileList(); - - // Check and load the package list file - pkgCache::PkgFileIterator I = Vf.File(); - if (I.IsOk() == false) - return _error->Error(_("Package file %s is out of sync."),I.FileName()); - - FileFd PkgF(I.FileName(),FileFd::ReadOnly); - if (_error->PendingError() == true) - return false; - - // Read the record and then write it out again. - if (PkgF.Seek(V.FileList()->Offset) == false) - return false; - - if (header) - headerFree(header); - - FD_t fdt = fdDup(PkgF.Fd()); - header = headerRead(fdt, HEADER_MAGIC_YES); - fdClose(fdt); - - return true; -} - - -const char *CacheFile::GetDate() -{ - const char *s = NULL; - - if (header) - { - int type, count; - - headerGetEntry(header, CRPMTAG_UPDATE_DATE, &type, (void **)&s, &count); - } - return s; -} - - -const char *CacheFile::GetPriority() -{ - const char *s = NULL; - - if (header) - { - int type, count; - - headerGetEntry(header, CRPMTAG_UPDATE_IMPORTANCE, &type, (void **)&s, &count); - } - return s; -} - - -const char *CacheFile::GetSummary() -{ - const char *s = NULL; - - if (header) - { - int type, count; - - headerGetEntry(header, CRPMTAG_UPDATE_SUMMARY, &type, (void **)&s, &count); - } - return s; -} - // CacheFile::NameComp - QSort compare by name /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -668,7 +613,7 @@ void CacheFile::Sort() qsort(List,Cache->Head().PackageCount,sizeof(*List),NameComp); } /*}}}*/ -// CacheFile::Open - Open the cache file /*{{{*/ +// CacheFile::CheckDeps - Open the cache file /*{{{*/ // --------------------------------------------------------------------- /* This routine generates the caches and then opens the dependency cache and verifies that the system is OK. */ @@ -678,29 +623,29 @@ bool CacheFile::CheckDeps(bool AllowBroken) return false; // Check that the system is OK - if (Cache->DelCount() != 0 || Cache->InstCount() != 0) + if (DCache->DelCount() != 0 || DCache->InstCount() != 0) return _error->Error("Internal Error, non-zero counts"); // Apply corrections for half-installed packages - if (pkgApplyStatus(*Cache) == false) + if (pkgApplyStatus(*DCache) == false) return false; // Nothing is broken - if (Cache->BrokenCount() == 0 || AllowBroken == true) + if (DCache->BrokenCount() == 0 || AllowBroken == true) return true; // Attempt to fix broken things if (_config->FindB("APT::Get::Fix-Broken",false) == true) { c1out << _("Correcting dependencies...") << flush; - if (pkgFixBroken(*Cache) == false || Cache->BrokenCount() != 0) + if (pkgFixBroken(*DCache) == false || DCache->BrokenCount() != 0) { c1out << _(" failed.") << endl; ShowBroken(c1out,*this,true); return _error->Error(_("Unable to correct dependencies")); } - if (pkgMinimizeUpgrade(*Cache) == false) + if (pkgMinimizeUpgrade(*DCache) == false) return _error->Error(_("Unable to minimize the upgrade set")); c1out << _(" Done") << endl; @@ -716,6 +661,9 @@ bool CacheFile::CheckDeps(bool AllowBroken) return true; } /*}}}*/ +// CNC:2002-07-06 +bool DoClean(CommandLine &CmdL); +bool DoAutoClean(CommandLine &CmdL); // InstallPackages - Actually download and install the packages /*{{{*/ // --------------------------------------------------------------------- @@ -724,15 +672,13 @@ bool CacheFile::CheckDeps(bool AllowBroken) bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, bool Saftey = true) { - pkgPackageManager *PM; - if (_config->FindB("APT::Get::Purge",false) == true) { pkgCache::PkgIterator I = Cache->PkgBegin(); for (; I.end() == false; I++) { - if (I.Purge() == false && Cache[I].Delete()) - Cache->MarkDelete( I, Cache[I].Replaced(), true ); + if (I.Purge() == false && Cache[I].Mode == pkgDepCache::ModeDelete) + Cache->MarkDelete(I,true); } } @@ -740,30 +686,24 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, bool Essential = false; // Show all the various warning indicators + // CNC:2002-07-06 + if (_config->FindB("APT::Get::Show-Upgraded",false) == true) + ShowUpgraded(c1out,Cache); ShowDel(c1out,Cache); ShowNew(c1out,Cache); if (ShwKept == true) ShowKept(c1out,Cache); Fail |= !ShowHold(c1out,Cache); - - if (_config->FindB("APT::Get::Show-Upgrade-Summary",false) == true) { - ShowUpgradeSummary(c1out,Cache); - } else if (_config->FindB("APT::Get::Show-Upgraded",false) == true) { - ShowUpgraded(c1out,Cache); - } + Fail |= !ShowDowngraded(c1out,Cache); Essential = !ShowEssential(c1out,Cache); Fail |= Essential; Stats(c1out,Cache); - if (_config->FindB("APT::Get::Show-Upgrade-Summary",false) == true) { - return true; - } - // Sanity check if (Cache->BrokenCount() != 0) { ShowBroken(c1out,Cache,false); - return _error->Error(_("Internal Error, InstallPackages was called with broken packages!")); + return _error->Error("Internal Error, InstallPackages was called with broken packages!"); } if (Cache->DelCount() == 0 && Cache->InstCount() == 0 && @@ -771,8 +711,8 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, return true; // No remove flag - if (Cache->DelCount() != 0 && _config->FindB("APT::Get::No-Remove",false) == true) - return _error->Error(_("Packages need to be removed but No Remove was specified.")); + if (Cache->DelCount() != 0 && _config->FindB("APT::Get::Remove",true) == false) + return _error->Error(_("Packages need to be removed but Remove is disabled.")); // Run the simulator .. if (_config->FindB("APT::Get::Simulate") == true) @@ -782,7 +722,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (Res == pkgPackageManager::Failed) return false; if (Res != pkgPackageManager::Completed) - return _error->Error(_("Internal Error, Ordering didn't finish")); + return _error->Error("Internal Error, Ordering didn't finish"); return true; } @@ -793,7 +733,8 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, // Lock the archive directory FileFd Lock; - if (_config->FindB("Debug::NoLocking",false) == false) + if (_config->FindB("Debug::NoLocking",false) == false && + _config->FindB("APT::Get::Print-URIs") == false) { Lock.Fd(GetLock(_config->FindDir("Dir::Cache::Archives") + "lock")); if (_error->PendingError() == true) @@ -810,54 +751,52 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, return _error->Error(_("The list of sources could not be read.")); // Create the package manager and prepare to download - - PM = _system->CreatePackageManager(Cache); - + SPtr PM= _system->CreatePM(Cache); if (PM->GetArchives(&Fetcher,&List,&Recs) == false || _error->PendingError() == true) return false; // Display statistics - unsigned long FetchBytes = Fetcher.FetchNeeded(); - unsigned long FetchPBytes = Fetcher.PartialPresent(); - unsigned long DebBytes = Fetcher.TotalNeeded(); + double FetchBytes = Fetcher.FetchNeeded(); + double FetchPBytes = Fetcher.PartialPresent(); + double DebBytes = Fetcher.TotalNeeded(); if (DebBytes != Cache->DebSize()) { c0out << DebBytes << ',' << Cache->DebSize() << endl; - c0out << _("How odd.. The sizes didn't match, email apt@packages.debian.org") << endl; + c0out << "How odd.. The sizes didn't match, email apt@packages.debian.org" << endl; } // Number of bytes - c1out << _("Need to get "); if (DebBytes != FetchBytes) - c1out << SizeToStr(FetchBytes) << "B/" << SizeToStr(DebBytes) << 'B'; + ioprintf(c1out,_("Need to get %sB/%sB of archives.\n"), + SizeToStr(FetchBytes).c_str(),SizeToStr(DebBytes).c_str()); else - c1out << SizeToStr(DebBytes) << 'B'; - - c1out << _(" of archives. After unpacking "); - + ioprintf(c1out,_("Need to get %sB of archives.\n"), + SizeToStr(DebBytes).c_str()); + // Size delta - if (Cache->UsrSize() > 0) - c1out << SizeToStr(Cache->UsrSize()) << _("B will be used."); - else if (Cache->UsrSize() < 0) - c1out << SizeToStr(-1*Cache->UsrSize()) << _("B will be freed."); - else /* if (Cache->UsrSize() == 0) */ - c1out << _("used disk space will remain the same."); - c1out << endl; + if (Cache->UsrSize() >= 0) + ioprintf(c1out,_("After unpacking %sB of additional disk space will be used.\n"), + SizeToStr(Cache->UsrSize()).c_str()); + else + ioprintf(c1out,_("After unpacking %sB disk space will be freed.\n"), + SizeToStr(-1*Cache->UsrSize()).c_str()); if (_error->PendingError() == true) return false; /* Check for enough free space, but only if we are actually going to download */ - if (_config->FindB("APT::Get::Print-URIs") == false) + if (_config->FindB("APT::Get::Print-URIs") == false && + _config->FindB("APT::Get::Download",true) == true) { struct statvfs Buf; string OutputDir = _config->FindDir("Dir::Cache::Archives"); if (statvfs(OutputDir.c_str(),&Buf) != 0) - return _error->Errno("statvfs",_("Couldn't determine free space in %s"), + return _error->Errno("statvfs","Couldn't determine free space in %s", OutputDir.c_str()); - if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) + // CNC:2002-07-11 + if (unsigned(Buf.f_bavail) < (FetchBytes - FetchPBytes)/Buf.f_bsize) return _error->Error(_("Sorry, you don't have enough free space in %s to hold all packages."), OutputDir.c_str()); } @@ -875,12 +814,15 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (_config->FindB("APT::Get::Trivial-Only",false) == true) return _error->Error(_("Trivial Only specified but this is not a trivial operation.")); - c2out << _("You are about to do something potentially harmful") << endl; - c2out << _("To continue type in the phrase 'Yes, I understand this may be bad'") << endl; - c2out << _(" ?] ") << flush; - if (AnalPrompt(_("Yes, I understand this may be bad")) == false) + const char *Prompt = _("Yes, do as I say!"); + ioprintf(c2out, + _("You are about to do something potentially harmful\n" + "To continue type in the phrase '%s'\n" + " ?] "),Prompt); + c2out << flush; + if (AnalPrompt(Prompt) == false) { - c2out << _("Aborted.") << endl; + c2out << _("Abort.") << endl; exit(1); } } @@ -899,7 +841,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (YnPrompt() == false) { - c2out << _("Aborted.") << endl; + c2out << _("Abort.") << endl; exit(1); } } @@ -911,18 +853,23 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, { pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); I++) - cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl; return true; } + + /* Unlock the dpkg lock if we are not going to be doing an install + after. */ + if (_config->FindB("APT::Get::Download-Only",false) == true) + _system->UnLock(); // Run it while (1) { bool Transient = false; - if (_config->FindB("APT::Get::No-Download",false) == true) + if (_config->FindB("APT::Get::Download",true) == false) { - for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd();) + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd();) { if ((*I)->Local == true) { @@ -943,9 +890,10 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (Fetcher.Run() == pkgAcquire::Failed) return false; + // Print out errors bool Failed = false; - for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) { if ((*I)->Status == pkgAcquire::Item::StatDone && (*I)->Complete == true) @@ -958,8 +906,8 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, continue; } - cerr << _("Failed to fetch ") << (*I)->DescURI() << endl; - cerr << " " << (*I)->ErrorText << endl; + fprintf(stderr,_("Failed to fetch %s %s\n"),(*I)->DescURI().c_str(), + (*I)->ErrorText.c_str()); Failed = true; } @@ -967,7 +915,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, 'failures' then the user must specify -m. Furthermore, there is no such thing as a transient error in no-download mode! */ if (Transient == true && - _config->FindB("APT::Get::No-Download",false) == true) + _config->FindB("APT::Get::Download",true) == false) { Transient = false; Failed = true; @@ -977,12 +925,13 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, { if (Failed == true && _config->FindB("APT::Get::Fix-Missing",false) == false) return _error->Error(_("Some files failed to download")); + c1out << _("Download complete and in download only mode") << endl; return true; } if (Failed == true && _config->FindB("APT::Get::Fix-Missing",false) == false) { - return _error->Error(_("Unable to fetch some archives, maybe try with --fix-missing?")); + return _error->Error(_("Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?")); } if (Transient == true && Failed == true) @@ -995,23 +944,36 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, return _error->Error(_("Aborting Install.")); } - // need this so that we first fetch everything and then install (for CDs) - if (Transient == false || _config->FindB("Acquire::cdrom::copy", false) == false) { - Cache.ReleaseLock(); + // CNC:2002-10-18 + if (Transient == false || _config->FindB("Acquire::CDROM::Copy-All", false) == false) { + if (Transient == true) { + // We must do that in a system independent way. */ + _config->Set("RPM::Install-Options::", "--nodeps"); + } + _system->UnLock(); pkgPackageManager::OrderResult Res = PM->DoInstall(); if (Res == pkgPackageManager::Failed || _error->PendingError() == true) - return false; + return false; + + // CNC:2002-07-06 if (Res == pkgPackageManager::Completed) - return true; + { + CommandLine *CmdL = NULL; // Watch out! If used will blow up! + bool ret = true; + if (_config->FindB("APT::Post-Install::Clean",false) == true) + ret = DoClean(*CmdL); + else if (_config->FindB("APT::Post-Install::AutoClean",false) == true) + ret = DoAutoClean(*CmdL); + return ret; + } + _system->Lock(); } + // Reload the fetcher object and loop again for media swapping Fetcher.Shutdown(); if (PM->GetArchives(&Fetcher,&List,&Recs) == false) return false; - } - - if (_config->FindB("APT::Get::No-Download",false) == true) - cout << _("Run apt-get clean to remove downloaded packages.") << endl; + } } /*}}}*/ // TryToInstall - Try to install a single package /*{{{*/ @@ -1028,16 +990,18 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, Pkg.ProvidesList()->NextProvides == 0) { pkgCache::PkgIterator Tmp = Pkg.ProvidesList().OwnerPkg(); - c1out << _("Note, selecting ") << Tmp.Name() << _(" instead of ") << Pkg.Name() << endl; + ioprintf(c1out,_("Note, selecting %s instead of %s\n"), + Tmp.Name(),Pkg.Name()); Pkg = Tmp; } // Handle the no-upgrade case - if (_config->FindB("APT::Get::no-upgrade",false) == true && + if (_config->FindB("APT::Get::upgrade",true) == false && Pkg->CurrentVer != 0) { if (AllowFail == true) - c1out << _("Skipping ") << Pkg.Name() << _(", it is already installed and no-upgrade is set.") << endl; + ioprintf(c1out,_("Skipping %s, it is already installed and upgrade is not set.\n"), + Pkg.Name()); return true; } @@ -1045,9 +1009,17 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, pkgDepCache::StateCache &State = Cache[Pkg]; if (Remove == true && Pkg->CurrentVer == 0) { + Fix.Clear(Pkg); + Fix.Protect(Pkg); + Fix.Remove(Pkg); + + /* We want to continue searching for regex hits, so we return false here + otherwise this is not really an error. */ if (AllowFail == false) return false; - return _error->Error(_("Package %s is not installed"),Pkg.Name()); + + ioprintf(c1out,_("Package %s is not installed, so not removed\n"),Pkg.Name()); + return true; } if (State.CandidateVer == 0 && Remove == false) @@ -1057,7 +1029,8 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (Pkg->ProvidesList != 0) { - c1out << _("Package ") << Pkg.Name() << _(" is a virtual package provided by:") << endl; + ioprintf(c1out,_("Package %s is a virtual package provided by:\n"), + Pkg.Name()); pkgCache::PrvIterator I = Pkg.ProvidesList(); for (; I.end() == false; I++) @@ -1068,7 +1041,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, { if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false) c1out << " " << Pkg.Name() << " " << I.OwnerVer().VerStr() << - _(" [Installed]")<< endl; + _(" [Installed]") << endl; else c1out << " " << Pkg.Name() << " " << I.OwnerVer().VerStr() << endl; } @@ -1077,18 +1050,25 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, } else { - c1out << _("Package ") << Pkg.Name() << _(" has no available version, but exists in the database.") << endl; - c1out << _("This typically means that the package was mentioned in a dependency and ") << endl; - c1out << _("never uploaded, has been obsoleted or is not available with the contents ") << endl; - c1out << _("of sources.list") << endl; + ioprintf(c1out, + _("Package %s has no available version, but exists in the database.\n" + "This typically means that the package was mentioned in a dependency and\n" + "never uploaded, has been obsoleted or is not available with the contents\n" + "of sources.list\n"),Pkg.Name()); string List; + SPtrArray Seen = new bool[Cache.Head().PackageCount]; + memset(Seen,0,Cache.Head().PackageCount*sizeof(*Seen)); pkgCache::DepIterator Dep = Pkg.RevDependsList(); for (; Dep.end() == false; Dep++) { - if (Dep->Type != pkgCache::Dep::Replaces - && Dep->Type != pkgCache::Dep::Obsoletes) + // CNC:2002-07-30 + if (Dep->Type != pkgCache::Dep::Replaces && + Dep->Type != pkgCache::Dep::Obsoletes) continue; + if (Seen[Dep.ParentPkg()->ID] == true) + continue; + Seen[Dep.ParentPkg()->ID] = true; List += string(Dep.ParentPkg().Name()) + " "; } ShowList(c1out,_("However the following packages replace it:"),List); @@ -1103,7 +1083,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (Remove == true) { Fix.Remove(Pkg); - Cache.MarkDelete(Pkg,false,_config->FindB("APT::Get::Purge",false)); + Cache.MarkDelete(Pkg,_config->FindB("APT::Get::Purge",false)); return true; } @@ -1114,14 +1094,16 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (_config->FindB("APT::Get::ReInstall",false) == true) { if (Pkg->CurrentVer == 0 || Pkg.CurrentVer().Downloadable() == false) - c1out << _("Sorry, re-installation of ") << Pkg.Name() << _(" is not possible, it cannot be downloaded") << endl; + ioprintf(c1out,_("Reinstallation of %s is not possible, it cannot be downloaded.\n"), + Pkg.Name()); else Cache.SetReInstall(Pkg,true); } else { if (AllowFail == true) - c1out << _("Sorry, ") << Pkg.Name() << _(" is already the newest version") << endl; + ioprintf(c1out,_("%s is already the newest version.\n"), + Pkg.Name()); } } else @@ -1133,12 +1115,140 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, return true; } /*}}}*/ +// TryToChangeVer - Try to change a candidate version /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool TryToChangeVer(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, + const char *VerTag,bool IsRel) +{ + pkgVersionMatch Match(VerTag,(IsRel == true?pkgVersionMatch::Release : + pkgVersionMatch::Version)); + + pkgCache::VerIterator Ver = Match.Find(Pkg); + + if (Ver.end() == true) + { + if (IsRel == true) + return _error->Error(_("Release '%s' for '%s' was not found"), + VerTag,Pkg.Name()); + return _error->Error(_("Version '%s' for '%s' was not found"), + VerTag,Pkg.Name()); + } + + if (strcmp(VerTag,Ver.VerStr()) != 0) + { + ioprintf(c1out,_("Selected version %s (%s) for %s\n"), + Ver.VerStr(),Ver.RelStr().c_str(),Pkg.Name()); + } + + Cache.SetCandidateVersion(Ver); + return true; +} + /*}}}*/ +// FindSrc - Find a source record /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, + pkgSrcRecords &SrcRecs,string &Src, + pkgDepCache &Cache) +{ + // We want to pull the version off the package specification.. + string VerTag; + string TmpSrc = Name; + string::size_type Slash = TmpSrc.rfind('='); + if (Slash != string::npos) + { + VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end()); + TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash); + } + + /* Lookup the version of the package we would install if we were to + install a version and determine the source package name, then look + in the archive for a source package of the same name. In theory + we could stash the version string as well and match that too but + today there aren't multi source versions in the archive. */ + if (_config->FindB("APT::Get::Only-Source") == false && + VerTag.empty() == true) + { + pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc); + if (Pkg.end() == false) + { + pkgCache::VerIterator Ver = Cache.GetCandidateVer(Pkg); + if (Ver.end() == false) + { + pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList()); + Src = Parse.SourcePkg(); + } + } + } + + // No source package name.. + if (Src.empty() == true) + Src = TmpSrc; + + // The best hit + pkgSrcRecords::Parser *Last = 0; + unsigned long Offset = 0; + string Version; + bool IsMatch = false; + + // If we are matching by version then we need exact matches to be happy + if (VerTag.empty() == false) + IsMatch = true; + + /* Iterate over all of the hits, which includes the resulting + binary packages in the search */ + pkgSrcRecords::Parser *Parse; + SrcRecs.Restart(); + while ((Parse = SrcRecs.Find(Src.c_str(),false)) != 0) + { + string Ver = Parse->Version(); + + // Skip name mismatches + if (IsMatch == true && Parse->Package() != Src) + continue; + + if (VerTag.empty() == false) + { + /* Don't want to fall through because we are doing exact version + matching. */ + if (Cache.VS().CmpVersion(VerTag,Ver) != 0) + continue; + + Last = Parse; + Offset = Parse->Offset(); + break; + } + + // Newer version or an exact match + if (Last == 0 || Cache.VS().CmpVersion(Version,Ver) < 0 || + (Parse->Package() == Src && IsMatch == false)) + { + IsMatch = Parse->Package() == Src; + Last = Parse; + Offset = Parse->Offset(); + Version = Ver; + } + } + + if (Last == 0) + return 0; + + if (Last->Jump(Offset) == false) + return 0; + + return Last; +} + /*}}}*/ // DoUpdate - Update the package lists /*{{{*/ // --------------------------------------------------------------------- /* */ -bool DoUpdate(CommandLine &) +bool DoUpdate(CommandLine &CmdL) { + if (CmdL.FileSize() != 1) + return _error->Error(_("The update command takes no arguments")); + // Get the source list pkgSourceList List; if (List.ReadMainList() == false) @@ -1156,75 +1266,53 @@ bool DoUpdate(CommandLine &) // Create the download object AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0)); pkgAcquire Fetcher(&Stat); - - - bool hasIndex = false; - - // Download the signed index hashfiles - pkgSourceList::rep_iterator R; - for (R = List.rep_begin(); R != List.rep_end(); R++) - { - if ((*R)->Vendor == NULL) { - continue; - } - new pkgAcqHashes(&Fetcher,*R); - if (_error->PendingError() == true) - return false; - hasIndex = true; - } - - // Run it - if (hasIndex && Fetcher.Run() == pkgAcquire::Failed) - return _error->Error(_("Could not retrieve digitally signed hash file")); - + // CNC:2002-07-03 bool Failed = false; - for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) + // Populate it with release file URIs + if (List.GetReleases(&Fetcher) == false) + return false; + if (_config->FindB("APT::Get::Print-URIs") == false) { - if ((*I)->Status == pkgAcquire::Item::StatDone) { - continue; + Fetcher.Run(); + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) + { + if ((*I)->Status == pkgAcquire::Item::StatDone) + continue; + (*I)->Finished(); + Failed = true; } - - (*I)->Finished(); - - cerr << _("Failed to fetch hash file: ") - << (*I)->DescURI() << endl; - cerr << " " << (*I)->ErrorText << endl; - Failed = true; - } - - if (Failed) - { - return _error->Error(_("Some of the signed hash files could not be retrieved. Aborting operation.")); + if (Failed == true) + _error->Warning(_("Release files for some repositories could not be retrieved or authenticated. Such repositories are being ignored.")); } - pkgSourceList::const_iterator I; // Populate it with the source selection - for (I = List.begin(); I != List.end(); I++) - { - new pkgAcqIndex(&Fetcher,I); - if (_error->PendingError() == true) + if (List.GetIndexes(&Fetcher) == false) return false; + + // Just print out the uris an exit if the --print-uris flag was used + if (_config->FindB("APT::Get::Print-URIs") == true) + { + pkgAcquire::UriIterator I = Fetcher.UriBegin(); + for (; I != Fetcher.UriEnd(); I++) + cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl; + return true; } - + // Run it if (Fetcher.Run() == pkgAcquire::Failed) return false; - bool AuthFailed = false; - Failed = false; - for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) { if ((*I)->Status == pkgAcquire::Item::StatDone) continue; - - if ((*I)->Status == pkgAcquire::Item::StatAuthError) - AuthFailed = true; (*I)->Finished(); - cerr << _("Failed to fetch ") << (*I)->DescURI() << endl; - cerr << " " << (*I)->ErrorText << endl; + fprintf(stderr,_("Failed to fetch %s %s\n"),(*I)->DescURI().c_str(), + (*I)->ErrorText.c_str()); Failed = true; } @@ -1236,24 +1324,14 @@ bool DoUpdate(CommandLine &) return false; } - if (AuthFailed == true) - return _error->Error(_("Some of the index files had mismatching MD5 sums!")); - // Prepare the cache. CacheFile Cache; - if (Cache.Open() == false) + if (Cache.BuildCaches() == false) return false; if (Failed == true) return _error->Error(_("Some index files failed to download, they have been ignored, or old ones used instead.")); - - for (R = List.rep_begin(); R != List.rep_end(); R++) - { - if ((*R)->Vendor == NULL) { - string msg = (*R)->URI + _(" will not be authenticated."); - _error->Warning(msg.c_str()); - } - } + return true; } /*}}}*/ @@ -1264,7 +1342,7 @@ bool DoUpdate(CommandLine &) bool DoUpgrade(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps() == false) + if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; // Do the upgrade @@ -1283,7 +1361,8 @@ bool DoUpgrade(CommandLine &CmdL) bool DoInstall(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps(CmdL.FileSize() != 1) == false) + if (Cache.OpenForInstall() == false || + Cache.CheckDeps(CmdL.FileSize() != 1) == false) return false; // Enter the special broken fixing mode if the user specified arguments @@ -1298,7 +1377,7 @@ bool DoInstall(CommandLine &CmdL) bool DefRemove = false; if (strcasecmp(CmdL.FileList[0],"remove") == 0) DefRemove = true; - + for (const char **I = CmdL.FileList + 1; *I != 0; I++) { // Duplicate the string @@ -1308,8 +1387,10 @@ bool DoInstall(CommandLine &CmdL) continue; strcpy(S,*I); - // See if we are removing the package + // See if we are removing and special indicators.. bool Remove = DefRemove; + char *VerTag = 0; + bool VerIsRel = false; while (Cache->FindPkg(S).end() == true) { // Handle an optional end tag indicating what to do @@ -1326,6 +1407,23 @@ bool DoInstall(CommandLine &CmdL) S[--Length] = 0; continue; } + + char *Slash = strchr(S,'='); + if (Slash != 0) + { + VerIsRel = false; + *Slash = 0; + VerTag = Slash + 1; + } + + Slash = strchr(S,'/'); + if (Slash != 0) + { + VerIsRel = true; + *Slash = 0; + VerTag = Slash + 1; + } + break; } @@ -1337,7 +1435,8 @@ bool DoInstall(CommandLine &CmdL) // Check if the name is a regex const char *I; for (I = S; *I != 0; I++) - if (*I == '.' || *I == '?' || *I == '*') + if (*I == '?' || *I == '*' || *I == '|' || + *I == '[' || *I == '^' || *I == '$') break; if (*I == 0) return _error->Error(_("Couldn't find package %s"),S); @@ -1347,19 +1446,15 @@ bool DoInstall(CommandLine &CmdL) // Compile the regex pattern regex_t Pattern; - int ercode; - ercode = regcomp(&Pattern,S,REG_EXTENDED | REG_ICASE | REG_NOSUB); - if (ercode != 0) { - char buffer[256]; - int l; - - strcpy(buffer, _("Regex compilation error:")); - l = strlen(buffer); - - regerror(ercode, &Pattern, buffer+l, sizeof(buffer)-l); - - return _error->Error(buffer); + int Res; + if ((Res = regcomp(&Pattern,S,REG_EXTENDED | REG_ICASE | + REG_NOSUB)) != 0) + { + char Error[300]; + regerror(Res,&Pattern,Error,sizeof(Error)); + return _error->Error(_("Regex compilation error - %s"),Error); } + // Run over the matches bool Hit = false; for (Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) @@ -1367,6 +1462,13 @@ bool DoInstall(CommandLine &CmdL) if (regexec(&Pattern,Pkg.Name(),0,0,0) != 0) continue; + ioprintf(c1out,_("Note, selecting %s for regex '%s'\n"), + Pkg.Name(),S); + + if (VerTag != 0) + if (TryToChangeVer(Pkg,Cache,VerTag,VerIsRel) == false) + return false; + Hit |= TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix, ExpectedInst,false); } @@ -1377,11 +1479,18 @@ bool DoInstall(CommandLine &CmdL) } else { + if (VerTag != 0) + if (TryToChangeVer(Pkg,Cache,VerTag,VerIsRel) == false) + return false; if (TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix,ExpectedInst) == false) return false; - } + } } + // CNC:2002-08-01 + if (_config->FindB("APT::Remove-Depends",false) == true) + Fix.RemoveDepends(); + /* If we are in the Broken fixing mode we do not attempt to fix the problems. This is if the user invoked install without -f and gave packages */ @@ -1401,22 +1510,24 @@ bool DoInstall(CommandLine &CmdL) // Now we check the state of the packages, if (Cache->BrokenCount() != 0) { - c1out << _("Some packages could not be installed. This may mean that you have") << endl; - c1out << _("requested an impossible situation or if you are using the unstable") << endl; - c1out << _("distribution that some required packages have not yet been created") << endl; - c1out << _("or been moved out of Incoming.") << endl; + c1out << + _("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" + "distribution that some required packages have not yet been created\n" + "or been moved out of Incoming.") << endl; if (Packages == 1) { c1out << endl; - c1out << _("Since you only requested a single operation it is extremely likely that") << endl; - c1out << _("the package is simply not installable and a bug report against") << endl; - c1out << _("that package should be filed.") << endl; + c1out << + _("Since you only requested a single operation it is extremely likely that\n" + "the package is simply not installable and a bug report against\n" + "that package should be filed.") << endl; } c1out << _("The following information may help to resolve the situation:") << endl; c1out << endl; ShowBroken(c1out,Cache,false); - return _error->Error(_("Sorry, broken packages")); + return _error->Error(_("Broken packages")); } /* Print out a list of packages that are going to be installed extra @@ -1455,7 +1566,7 @@ bool DoInstall(CommandLine &CmdL) bool DoDistUpgrade(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps() == false) + if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; c0out << _("Calculating Upgrade... ") << flush; @@ -1477,7 +1588,7 @@ bool DoDistUpgrade(CommandLine &CmdL) bool DoDSelectUpgrade(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps() == false) + if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; // Install everything with the install flag set @@ -1506,7 +1617,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) // Remove packages if (I->SelectedState == pkgCache::State::DeInstall || I->SelectedState == pkgCache::State::Purge) - Cache->MarkDelete(I,false,I->SelectedState == pkgCache::State::Purge); + Cache->MarkDelete(I,I->SelectedState == pkgCache::State::Purge); } /* Resolve any problems that dselect created, allupgrade cannot handle @@ -1531,7 +1642,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) if (Fix.Resolve() == false) { ShowBroken(c1out,Cache,false); - return _error->Error(_("Internal Error, problem resolver broke stuff")); + return _error->Error("Internal Error, problem resolver broke stuff"); } } @@ -1539,7 +1650,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) if (pkgAllUpgrade(Cache) == false) { ShowBroken(c1out,Cache,false); - return _error->Error(_("Internal Error, problem resolver broke stuff")); + return _error->Error("Internal Error, problem resolver broke stuff"); } return InstallPackages(Cache,false); @@ -1635,8 +1746,6 @@ struct DscFile bool DoSource(CommandLine &CmdL) { CacheFile Cache; - - if (Cache.Open(false) == false) return false; @@ -1665,131 +1774,73 @@ bool DoSource(CommandLine &CmdL) for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++) { string Src; - - /* Lookup the version of the package we would install if we were to - install a version and determine the source package name, then look - in the archive for a source package of the same name. In theory - we could stash the version string as well and match that too but - today there aren't multi source versions in the archive. */ - pkgCache::PkgIterator Pkg = Cache->FindPkg(*I); - if (Pkg.end() == false) - { - pkgCache::VerIterator Ver = Cache->GetCandidateVer(Pkg); - if (Ver.end() == false) - { - pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList()); - Src = Parse.SourcePkg(); - } - } - - // No source package name.. - if (Src.empty() == true) - Src = *I; - - // The best hit - pkgSrcRecords::Parser *Last = 0; - unsigned long Offset = 0; - string Version; - bool IsMatch = false; - - // Iterate over all of the hits - pkgSrcRecords::Parser *Parse; - SrcRecs.Restart(); - while ((Parse = SrcRecs.Find(Src.c_str(),false)) != 0) - { - string Ver = Parse->Version(); - - // Skip name mismatches - if (IsMatch == true && Parse->Package() != Src) - continue; - - // Newer version or an exact match - if (Last == 0 || _system->versionCompare(Version,Ver) < 0 || - (Parse->Package() == Src && IsMatch == false)) - { - IsMatch = Parse->Package() == Src; - Last = Parse; - Offset = Parse->Offset(); - Version = Ver; - } - } + pkgSrcRecords::Parser *Last = FindSrc(*I,Recs,SrcRecs,Src,*Cache); if (Last == 0) return _error->Error(_("Unable to find a source package for %s"),Src.c_str()); - // Back track vector Lst; - if (Last->Jump(Offset) == false || Last->Files(Lst) == false) + if (Last->Files(Lst) == false) return false; // Load them into the fetcher for (vector::const_iterator I = Lst.begin(); I != Lst.end(); I++) { - string Comp; -#if 1 - Comp = "srpm"; - Dsc[J].Package = flNotDir(I->Path); -#else // Try to guess what sort of file it is we are getting. - if (I->Path.find(".dsc") != string::npos) + // CNC:2002-07-06 + if (I->Type == "dsc" || I->Type == "srpm") { - Comp = "dsc"; Dsc[J].Package = Last->Package(); Dsc[J].Version = Last->Version(); Dsc[J].Dsc = flNotDir(I->Path); } - if (I->Path.find(".tar.gz") != string::npos) - Comp = "tar"; - if (I->Path.find(".diff.gz") != string::npos) - Comp = "diff"; - // Diff only mode only fetches .diff files if (_config->FindB("APT::Get::Diff-Only",false) == true && - Comp != "diff") + I->Type != "diff") continue; // Tar only mode only fetches .tar files if (_config->FindB("APT::Get::Tar-Only",false) == true && - Comp != "tar") + I->Type != "tar") continue; -#endif - new pkgAcqFile(&Fetcher,Last->Source()->ArchiveURI(I->Path), + + new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path), I->MD5Hash,I->Size, - Last->Source()->SourceInfo(Src,Last->Version(),Comp), - Src); + Last->Index().SourceInfo(*Last,*I),Src); } } // Display statistics - unsigned long FetchBytes = Fetcher.FetchNeeded(); - unsigned long FetchPBytes = Fetcher.PartialPresent(); - unsigned long DebBytes = Fetcher.TotalNeeded(); + double FetchBytes = Fetcher.FetchNeeded(); + double FetchPBytes = Fetcher.PartialPresent(); + double DebBytes = Fetcher.TotalNeeded(); // Check for enough free space struct statvfs Buf; string OutputDir = "."; if (statvfs(OutputDir.c_str(),&Buf) != 0) - return _error->Errno("statvfs",_("Couldn't determine free space in %s"), + return _error->Errno("statvfs","Couldn't determine free space in %s", OutputDir.c_str()); - if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) + // CNC:2002-07-12 + if (unsigned(Buf.f_bavail) < (FetchBytes - FetchPBytes)/Buf.f_bsize) return _error->Error(_("Sorry, you don't have enough free space in %s"), OutputDir.c_str()); // Number of bytes - c1out << _("Need to get "); if (DebBytes != FetchBytes) - c1out << SizeToStr(FetchBytes) << "B/" << SizeToStr(DebBytes) << 'B'; + ioprintf(c1out,_("Need to get %sB/%sB of source archives.\n"), + SizeToStr(FetchBytes).c_str(),SizeToStr(DebBytes).c_str()); else - c1out << SizeToStr(DebBytes) << 'B'; - c1out << _(" of source archives.") << endl; - + ioprintf(c1out,_("Need to get %sB of source archives.\n"), + SizeToStr(DebBytes).c_str()); + if (_config->FindB("APT::Get::Simulate",false) == true) { for (unsigned I = 0; I != J; I++) - cout << _("Fetch Source ") << Dsc[I].Package << endl; + ioprintf(cout,_("Fetch Source %s\n"),Dsc[I].Package.c_str()); return true; } @@ -1798,7 +1849,7 @@ bool DoSource(CommandLine &CmdL) { pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); I++) - cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl; return true; } @@ -1809,22 +1860,25 @@ bool DoSource(CommandLine &CmdL) // Print error messages bool Failed = false; - for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) { if ((*I)->Status == pkgAcquire::Item::StatDone && (*I)->Complete == true) continue; - cerr << _("Failed to fetch ") << (*I)->DescURI() << endl; - cerr << " " << (*I)->ErrorText << endl; + fprintf(stderr,_("Failed to fetch %s %s\n"),(*I)->DescURI().c_str(), + (*I)->ErrorText.c_str()); Failed = true; } if (Failed == true) return _error->Error(_("Failed to fetch some archives.")); if (_config->FindB("APT::Get::Download-only",false) == true) + { + c1out << _("Download complete and in download only mode") << endl; return true; - + } + // Unpack the sources pid_t Process = ExecFork(); @@ -1832,33 +1886,48 @@ bool DoSource(CommandLine &CmdL) { for (unsigned I = 0; I != J; I++) { -#if 1 - char S[400]; - - if (_config->FindB("APT::Get::Compile",false) == true) - { - snprintf(S,sizeof(S),"rpm --rebuild %s", Dsc[I].Package.c_str()); - if (system(S) != 0) - { - cerr << _("Build command '") << S << _("' failed.") << endl; - _exit(1); - } - } -#else - string Dir = Dsc[I].Package + '-' + _system->baseVersion(Dsc[I].Version.c_str()); - + string Dir = Dsc[I].Package + '-' + Cache->VS().UpstreamVersion(Dsc[I].Version.c_str()); + // Diff only mode only fetches .diff files if (_config->FindB("APT::Get::Diff-Only",false) == true || _config->FindB("APT::Get::Tar-Only",false) == true || Dsc[I].Dsc.empty() == true) continue; +// CNC:2002-07-06 +#if 1 + if (_config->FindB("APT::Get::Compile",false) == true) + { + char S[500]; + snprintf(S,sizeof(S),"%s %s", + _config->Find("RPM::Source::Build-Command","rpm --rebuild").c_str(), + Dsc[I].Dsc.c_str()); + if (system(S) != 0) + { + fprintf(stderr,_("Build command '%s' failed.\n"),S); + _exit(1); + } + } + else + { + char S[500]; + snprintf(S,sizeof(S),"%s %s", + _config->Find("RPM::Source::Install-Command","rpm -ivh").c_str(), + Dsc[I].Dsc.c_str()); + if (system(S) != 0) + { + fprintf(stderr,_("Unpack command '%s' failed.\n"),S); + _exit(1); + } + } +#else // See if the package is already unpacked struct stat Stat; if (stat(Dir.c_str(),&Stat) == 0 && S_ISDIR(Stat.st_mode) != 0) { - c0out << _("Skipping unpack of already unpacked source in ") << Dir << endl; + ioprintf(c0out ,_("Skipping unpack of already unpacked source in %s\n"), + Dir.c_str()); } else { @@ -1869,7 +1938,7 @@ bool DoSource(CommandLine &CmdL) Dsc[I].Dsc.c_str()); if (system(S) != 0) { - cerr << _("Unpack command '") << S << _("' failed.") << endl; + fprintf(stderr,_("Unpack command '%s' failed.\n"),S); _exit(1); } } @@ -1877,8 +1946,8 @@ bool DoSource(CommandLine &CmdL) // Try to compile it with dpkg-buildpackage if (_config->FindB("APT::Get::Compile",false) == true) { - char S[500]; // Call dpkg-buildpackage + char S[500]; snprintf(S,sizeof(S),"cd %s && %s %s", Dir.c_str(), _config->Find("Dir::Bin::dpkg-buildpackage","dpkg-buildpackage").c_str(), @@ -1886,10 +1955,10 @@ bool DoSource(CommandLine &CmdL) if (system(S) != 0) { - cerr << _("Build command '") << S << _("' failed.") << endl; + fprintf(stderr,_("Build command '%s' failed.\n"),S); _exit(1); - } - } + } + } #endif } @@ -1902,7 +1971,7 @@ bool DoSource(CommandLine &CmdL) { if (errno == EINTR) continue; - return _error->Errno("waitpid",_("Couldn't wait for subprocess")); + return _error->Errno("waitpid","Couldn't wait for subprocess"); } if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) @@ -1911,54 +1980,254 @@ bool DoSource(CommandLine &CmdL) return true; } /*}}}*/ +// DoBuildDep - Install/removes packages to satisfy build dependencies /*{{{*/ +// --------------------------------------------------------------------- +/* This function will look at the build depends list of the given source + package and install the necessary packages to make it true, or fail. */ +bool DoBuildDep(CommandLine &CmdL) +{ + CacheFile Cache; + if (Cache.Open(true) == false) + return false; + if (CmdL.FileSize() <= 1) + return _error->Error(_("Must specify at least one package to check builddeps for")); + + // Read the source list + pkgSourceList List; + if (List.ReadMainList() == false) + return _error->Error(_("The list of sources could not be read.")); + + // Create the text record parsers + pkgRecords Recs(Cache); + pkgSrcRecords SrcRecs(List); + if (_error->PendingError() == true) + return false; + + // Create the download object + AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0)); + pkgAcquire Fetcher(&Stat); + + unsigned J = 0; + for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++) + { + string Src; + pkgSrcRecords::Parser *Last = FindSrc(*I,Recs,SrcRecs,Src,*Cache); + if (Last == 0) + return _error->Error(_("Unable to find a source package for %s"),Src.c_str()); + + // Process the build-dependencies + vector BuildDeps; + if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only",false)) == false) + return _error->Error(_("Unable to get build-dependency information for %s"),Src.c_str()); + + // Also ensure that build-essential packages are present + Configuration::Item const *Opts = _config->Tree("APT::Build-Essential"); + if (Opts) + Opts = Opts->Child; + for (; Opts; Opts = Opts->Next) + { + if (Opts->Value.empty() == true) + continue; + + pkgSrcRecords::Parser::BuildDepRec rec; + rec.Package = Opts->Value; + rec.Type = pkgSrcRecords::Parser::BuildDependIndep; + rec.Op = 0; + BuildDeps.insert(BuildDeps.begin(), rec); + } + + if (BuildDeps.size() == 0) + { + ioprintf(c1out,_("%s has no build depends.\n"),Src.c_str()); + continue; + } + + // Install the requested packages + unsigned int ExpectedInst = 0; + vector ::iterator D; + pkgProblemResolver Fix(Cache); + for (D = BuildDeps.begin(); D != BuildDeps.end(); D++) + { + pkgCache::PkgIterator Pkg = Cache->FindPkg((*D).Package); + if (Pkg.end() == true) + { + /* for a build-conflict; ignore unknown packages */ + if ((*D).Type == pkgSrcRecords::Parser::BuildConflict || + (*D).Type == pkgSrcRecords::Parser::BuildConflictIndep) + continue; + + return _error->Error(_("%s dependency on %s cannot be satisfied because the package %s cannot be found"), + Last->BuildDepType((*D).Type),Src.c_str(),(*D).Package.c_str()); + } + pkgCache::VerIterator IV = (*Cache)[Pkg].InstVerIter(*Cache); + + if ((*D).Type == pkgSrcRecords::Parser::BuildConflict || + (*D).Type == pkgSrcRecords::Parser::BuildConflictIndep) + { + /* + * conflict; need to remove if we have an installed version + * that satisfies the version criterial + */ + if (IV.end() == false && + Cache->VS().CheckDep(IV.VerStr(),(*D).Op,(*D).Version.c_str()) == true) + TryToInstall(Pkg,Cache,Fix,true,false,ExpectedInst); + } + else + { + /* + * If this is a virtual package, we need to check the list of + * packages that provide it and see if any of those are + * installed + */ + pkgCache::PrvIterator Prv = Pkg.ProvidesList(); + for (; Prv.end() != true; Prv++) + if ((*Cache)[Prv.OwnerPkg()].InstVerIter(*Cache).end() == false) + break; + + if (Prv.end() == true) + { + /* + * depends; need to install or upgrade if we don't have the + * package installed or if the version does not satisfy the + * build dep. This is complicated by the fact that if we + * depend on a version lower than what we already have + * installed it is not clear what should be done; in practice + * this case should be rare though and right now nothing + * is done about it :-( + */ + if (IV.end() == true || + Cache->VS().CheckDep(IV.VerStr(),(*D).Op,(*D).Version.c_str()) == false) + TryToInstall(Pkg,Cache,Fix,false,false,ExpectedInst); + } + } + } + + Fix.InstallProtect(); + if (Fix.Resolve(true) == false) + _error->Discard(); + + // Now we check the state of the packages, + if (Cache->BrokenCount() != 0) + return _error->Error(_("Some broken packages were found while trying to process build-dependencies.\n" + "You might want to run `apt-get -f install' to correct these.")); + } + + if (InstallPackages(Cache, false, true) == false) + return _error->Error(_("Failed to process build dependencies")); + return true; +} + /*}}}*/ + +// DoMoo - Never Ask, Never Tell /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool DoMoo(CommandLine &CmdL) +{ + cout << + " (__) \n" + " (oo) \n" + " /------\\/ \n" + " / | || \n" + " * /\\---/\\ \n" + " ~~ ~~ \n" + "....\"Have you mooed today?\"...\n"; + + return true; +} + /*}}}*/ // ShowHelp - Show a help screen /*{{{*/ // --------------------------------------------------------------------- /* */ bool ShowHelp(CommandLine &CmdL) { - cout << PACKAGE << ' ' << VERSION << " for " << COMMON_CPU << - " compiled on " << __DATE__ << " " << __TIME__ << endl; + ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + if (_config->FindB("version") == true) - return 100; - - cout << _("Usage: apt-get [options] command") << endl; - cout << _(" apt-get [options] install pkg1 [pkg2 ...]") << endl; - cout << endl; - cout << _("apt-get is a simple command line interface for downloading and") << endl; - cout << _("installing packages. The most frequently used commands are update") << endl; - cout << _("and install.") << endl; - cout << endl; - cout << _("Commands:") << endl; - cout << _(" update - Retrieve new lists of packages") << endl; - cout << _(" upgrade - Perform an upgrade") << endl; - cout << _(" install - Install new packages") << endl; - cout << _(" remove - Remove packages") << endl; - cout << _(" source - Download source archives") << endl; - cout << _(" dist-upgrade - Distribution upgrade, see apt-get(8)") << endl; -// cout << " dselect-upgrade - Follow dselect selections" << endl; - cout << _(" clean - Erase downloaded archive files") << endl; - cout << _(" autoclean - Erase old downloaded archive files") << endl; - cout << _(" check - Verify that there are no broken dependencies") << endl; - cout << endl; - cout << _("Options:") << endl; - cout << _(" -h This help text.") << endl; - cout << _(" -q Loggable output - no progress indicator") << endl; - cout << _(" -qq No output except for errors") << endl; - cout << _(" -S Show summary for upgrade operation and quit") << endl; - cout << _(" -d Download only - do NOT install or unpack archives") << endl; - cout << _(" -s No-act. Perform ordering simulation") << endl; - cout << _(" -y Assume Yes to all queries and do not prompt") << endl; - cout << _(" -f Attempt to continue if the integrity check fails") << endl; - cout << _(" -m Attempt to continue if archives are unlocatable") << endl; - cout << _(" -u Show a list of upgraded packages as well") << endl; - cout << _(" -b Build the source package after fetching it") << endl; - cout << _(" -K Verify signatures in individual packages and quit") << endl; - cout << _(" -c=? Read this configuration file") << endl; - cout << _(" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp") << endl; - cout << _("See the apt-get(8), sources.list(5) and apt.conf(5) manual") << endl; - cout << _("pages for more information and options.") << endl; - return 100; + { + cout << _("Supported Modules:") << endl; + + for (unsigned I = 0; I != pkgVersioningSystem::GlobalListLen; I++) + { + pkgVersioningSystem *VS = pkgVersioningSystem::GlobalList[I]; + if (_system != 0 && _system->VS == VS) + cout << '*'; + else + cout << ' '; + cout << "Ver: " << VS->Label << endl; + + /* Print out all the packaging systems that will work with + this VS */ + for (unsigned J = 0; J != pkgSystem::GlobalListLen; J++) + { + pkgSystem *Sys = pkgSystem::GlobalList[J]; + if (_system == Sys) + cout << '*'; + else + cout << ' '; + if (Sys->VS->TestCompatibility(*VS) == true) + cout << "Pkg: " << Sys->Label << " (Priority " << Sys->Score(*_config) << ")" << endl; + } + } + + for (unsigned I = 0; I != pkgSourceList::Type::GlobalListLen; I++) + { + pkgSourceList::Type *Type = pkgSourceList::Type::GlobalList[I]; + cout << " S.L: '" << Type->Name << "' " << Type->Label << endl; + } + + for (unsigned I = 0; I != pkgIndexFile::Type::GlobalListLen; I++) + { + pkgIndexFile::Type *Type = pkgIndexFile::Type::GlobalList[I]; + cout << " Idx: " << Type->Label << endl; + } + + return true; + } + + cout << + _("Usage: apt-get [options] command\n" + " apt-get [options] install|remove pkg1 [pkg2 ...]\n" + " apt-get [options] source pkg1 [pkg2 ...]\n" + "\n" + "apt-get is a simple command line interface for downloading and\n" + "installing packages. The most frequently used commands are update\n" + "and install.\n" + "\n" + "Commands:\n" + " update - Retrieve new lists of packages\n" + " upgrade - Perform an upgrade\n" + " install - Install new packages (pkg is libc6 not libc6.deb)\n" + " remove - Remove packages\n" + " source - Download source archives\n" + " build-dep - Configure build-dependencies for source packages\n" + " dist-upgrade - Distribution upgrade, see apt-get(8)\n" +// CNC:2002-08-01 +// " dselect-upgrade - Follow dselect selections\n" + " clean - Erase downloaded archive files\n" + " autoclean - Erase old downloaded archive files\n" + " check - Verify that there are no broken dependencies\n" + "\n" + "Options:\n" + " -h This help text.\n" + " -q Loggable output - no progress indicator\n" + " -qq No output except for errors\n" + " -d Download only - do NOT install or unpack archives\n" + " -s No-act. Perform ordering simulation\n" + " -y Assume Yes to all queries and do not prompt\n" + " -f Attempt to continue if the integrity check fails\n" + " -m Attempt to continue if archives are unlocatable\n" + " -u Show a list of upgraded packages as well\n" + " -b Build the source package after fetching it\n" +// CNC:2002-08-02 + " -D When removing packages, remove dependencies as possible\n" + " -c=? Read this configuration file\n" + " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" + "See the apt-get(8), sources.list(5) and apt.conf(5) manual\n" + "pages for more information and options.\n" + " This APT has Super Cow Powers.\n"); + return true; } /*}}}*/ // GetInitialize - Initialize things for apt-get /*{{{*/ @@ -2004,17 +2273,20 @@ int main(int argc,const char *argv[]) {'s',"simulate","APT::Get::Simulate",0}, {'s',"just-print","APT::Get::Simulate",0}, {'s',"recon","APT::Get::Simulate",0}, + {'s',"dry-run","APT::Get::Simulate",0}, {'s',"no-act","APT::Get::Simulate",0}, - {'S',"summary","APT::Get::Show-Upgrade-Summary",0}, {'y',"yes","APT::Get::Assume-Yes",0}, {'y',"assume-yes","APT::Get::Assume-Yes",0}, {'f',"fix-broken","APT::Get::Fix-Broken",0}, {'u',"show-upgraded","APT::Get::Show-Upgraded",0}, {'m',"ignore-missing","APT::Get::Fix-Missing",0}, - {0,"no-download","APT::Get::No-Download",0}, + {'D',"remove-deps","APT::Remove-Depends",0}, // CNC:2002-08-01 + {'t',"target-release","APT::Default-Release",CommandLine::HasArg}, + {'t',"default-release","APT::Default-Release",CommandLine::HasArg}, + {0,"download","APT::Get::Download",0}, {0,"fix-missing","APT::Get::Fix-Missing",0}, - {0,"ignore-hold","APT::Ingore-Hold",0}, - {0,"no-upgrade","APT::Get::no-upgrade",0}, + {0,"ignore-hold","APT::Ignore-Hold",0}, + {0,"upgrade","APT::Get::upgrade",0}, {0,"force-yes","APT::Get::force-yes",0}, {0,"print-uris","APT::Get::Print-URIs",0}, {0,"diff-only","APT::Get::Diff-Only",0}, @@ -2023,55 +2295,52 @@ int main(int argc,const char *argv[]) {0,"list-cleanup","APT::Get::List-Cleanup",0}, {0,"reinstall","APT::Get::ReInstall",0}, {0,"trivial-only","APT::Get::Trivial-Only",0}, - {0,"no-remove","APT::Get::No-Remove",0}, + {0,"remove","APT::Get::Remove",0}, + {0,"only-source","APT::Get::Only-Source",0}, + {0,"arch-only","APT::Get::Arch-Only",0}, {'c',"config-file",0,CommandLine::ConfigFile}, {'o',"option",0,CommandLine::ArbItem}, - {'K',"check-signatures","RPM::Check-Signatures",0}, {0,0,0,0}}; CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate}, {"upgrade",&DoUpgrade}, {"install",&DoInstall}, {"remove",&DoInstall}, {"dist-upgrade",&DoDistUpgrade}, -// {"dselect-upgrade",&DoDSelectUpgrade}, + {"dselect-upgrade",&DoDSelectUpgrade}, + {"build-dep",&DoBuildDep}, {"clean",&DoClean}, {"autoclean",&DoAutoClean}, {"check",&DoCheck}, - {"source",&DoSource}, - {"help",&ShowHelp}, + {"source",&DoSource}, + {"moo",&DoMoo}, + {"help",&ShowHelp}, {0,0}}; - - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); + + // Set up gettext support + setlocale(LC_ALL,""); textdomain(PACKAGE); // Parse the command line and initialize the package library CommandLine CmdL(Args,_config); - if (pkgInitialize(*_config) == false || - CmdL.Parse(argc,argv) == false) + if (pkgInitConfig(*_config) == false || + CmdL.Parse(argc,argv) == false || + pkgInitSystem(*_config,_system) == false) { + if (_config->FindB("version") == true) + ShowHelp(CmdL); + _error->DumpErrors(); return 100; } - - if (1) { - RPMFactory *factory = new RPMFactory; // uses a config option, so must come after - void *shutup_gcc = NULL; - shutup_gcc = factory; - } -#if 0 //akk - else { - DebianFactory *factory = new DebianFactory; - void *shutup_gcc = NULL; - shutup_gcc = factory; - } -#endif + // See if the help should be shown if (_config->FindB("help") == true || _config->FindB("version") == true || CmdL.FileSize() == 0) - return ShowHelp(CmdL); + { + ShowHelp(CmdL); + return 0; + } // Deal with stdout not being a tty if (ttyname(STDOUT_FILENO) == 0 && _config->FindI("quiet",0) < 1) @@ -2093,15 +2362,6 @@ int main(int argc,const char *argv[]) // Match the operation CmdL.DispatchArg(Cmds); - -#ifdef DEBUG - { - struct mallinfo ma = mallinfo(); - printf("Total allocated memory: %i kB. Total memory in use: %i kB.\n", - (ma.arena+ma.hblkhd)/1024, (ma.uordblks+ma.hblkhd)/1024); - - } -#endif // Print any errors or warnings found during parsing if (_error->empty() == false) @@ -2113,3 +2373,5 @@ int main(int argc,const char *argv[]) return 0; } + +// vim:sts=3:sw=3 diff --git a/apt/cmdline/apt-sortpkgs.cc b/apt/cmdline/apt-sortpkgs.cc new file mode 100644 index 0000000..a52e8d2 --- /dev/null +++ b/apt/cmdline/apt-sortpkgs.cc @@ -0,0 +1,208 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: apt-sortpkgs.cc,v 1.4 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + APT Sort Packages - Program to sort Package and Source files + + This program is quite simple, it just sorts the package files by + package and sorts the fields inside by the internal APT sort order. + Input is taken from a named file and sent to stdout. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + /*}}}*/ + +using namespace std; + +struct PkgName +{ + string Name; + string Ver; + string Arch; + unsigned long Offset; + unsigned long Length; + + inline int Compare3(const PkgName &x) const + { + int A = stringcasecmp(Name,x.Name); + if (A == 0) + { + A = stringcasecmp(Ver,x.Ver); + if (A == 0) + A = stringcasecmp(Arch,x.Arch); + } + return A; + } + + bool operator <(const PkgName &x) const {return Compare3(x) < 0;}; + bool operator >(const PkgName &x) const {return Compare3(x) > 0;}; + bool operator ==(const PkgName &x) const {return Compare3(x) == 0;}; +}; + +// DoIt - Sort a single file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool DoIt(string InFile) +{ + FileFd Fd(InFile,FileFd::ReadOnly); + pkgTagFile Tags(&Fd); + if (_error->PendingError() == true) + return false; + + // Parse. + vector List; + pkgTagSection Section; + unsigned long Largest = 0; + unsigned long Offset = Tags.Offset(); + bool Source = _config->FindB("APT::SortPkgs::Source",false); + while (Tags.Step(Section) == true) + { + PkgName Tmp; + + /* Fetch the name, auto-detecting if this is a source file or a + package file */ + Tmp.Name = Section.FindS("Package"); + Tmp.Ver = Section.FindS("Version"); + Tmp.Arch = Section.FindS("Architecture"); + + if (Tmp.Name.empty() == true) + return _error->Error(_("Unknown package record!")); + + Tmp.Offset = Offset; + Tmp.Length = Section.size(); + if (Largest < Tmp.Length) + Largest = Tmp.Length; + + List.push_back(Tmp); + + Offset = Tags.Offset(); + } + if (_error->PendingError() == true) + return false; + + // Sort it + sort(List.begin(),List.end()); + + const char **Order = TFRewritePackageOrder; + if (Source == true) + Order = TFRewriteSourceOrder; + + // Emit + unsigned char *Buffer = new unsigned char[Largest+1]; + for (vector::iterator I = List.begin(); I != List.end(); I++) + { + // Read in the Record. + if (Fd.Seek(I->Offset) == false || Fd.Read(Buffer,I->Length) == false) + { + delete [] Buffer; + return false; + } + + Buffer[I->Length] = '\n'; + if (Section.Scan((char *)Buffer,I->Length+1) == false) + { + delete [] Buffer; + return _error->Error("Internal error, failed to scan buffer"); + } + + // Sort the section + if (TFRewrite(stdout,Section,Order,0) == false) + { + delete [] Buffer; + return _error->Error("Internal error, failed to sort fields"); + } + + fputc('\n',stdout); + } + + delete [] Buffer; + return true; +} + /*}}}*/ +// ShowHelp - Show the help text /*{{{*/ +// --------------------------------------------------------------------- +/* */ +int ShowHelp() +{ + ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + if (_config->FindB("version") == true) + return 0; + + cout << + _("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 arbitary configuration option, eg -o dir::cache=/tmp\n"); + + return 0; +} + /*}}}*/ + +int main(unsigned int argc,const char *argv[]) +{ + CommandLine::Args Args[] = { + {'h',"help","help",0}, + {'v',"version","version",0}, + {'s',"source","APT::SortPkgs::Source",0}, + {'c',"config-file",0,CommandLine::ConfigFile}, + {'o',"option",0,CommandLine::ArbItem}, + {0,0,0,0}}; + + // Set up gettext support + setlocale(LC_ALL,""); + textdomain(PACKAGE); + + // Parse the command line and initialize the package library + CommandLine CmdL(Args,_config); + if (pkgInitConfig(*_config) == false || + CmdL.Parse(argc,argv) == false || + pkgInitSystem(*_config,_system) == false) + { + _error->DumpErrors(); + return 100; + } + + // See if the help should be shown + if (_config->FindB("help") == true || + CmdL.FileSize() == 0) + return ShowHelp(); + + // Match the operation + for (unsigned int I = 0; I != CmdL.FileSize(); I++) + if (DoIt(CmdL.FileList[I]) == false) + break; + + // Print any errors or warnings found during parsing + if (_error->empty() == false) + { + bool Errors = _error->PendingError(); + _error->DumpErrors(); + return Errors == true?100:0; + } + + return 0; +} diff --git a/apt/cmdline/indexcopy.cc b/apt/cmdline/indexcopy.cc index 4429363..06be8d9 100644 --- a/apt/cmdline/indexcopy.cc +++ b/apt/cmdline/indexcopy.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: indexcopy.cc,v 1.1.1.1 2000/08/10 12:42:38 kojima Exp $ +// $Id: indexcopy.cc,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* ###################################################################### Index Copying - Aid for copying and verifying the index files @@ -19,12 +19,14 @@ #include #include -#include +#include #include #include #include /*}}}*/ +using namespace std; + // IndexCopy::CopyPackages - Copy the package files from the CD /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -94,7 +96,8 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List) SetCloseExec(STDOUT_FILENO,false); const char *Args[3]; - Args[0] = _config->Find("Dir::bin::gzip","gzip").c_str(); + string Tmp = _config->Find("Dir::bin::gzip","gzip"); + Args[0] = Tmp.c_str(); Args[1] = "-d"; Args[2] = 0; execvp(Args[0],(char **)Args); @@ -107,21 +110,24 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List) Pkg.Seek(0); } - pkgTagFile Parser(Pkg); + pkgTagFile Parser(&Pkg); if (_error->PendingError() == true) return false; // Open the output file char S[400]; - sprintf(S,"cdrom:[%s]/%s%s",Name.c_str(),(*I).c_str() + CDROM.length(), - GetFileName()); + snprintf(S,sizeof(S),"cdrom:[%s]/%s%s",Name.c_str(), + (*I).c_str() + CDROM.length(),GetFileName()); string TargetF = _config->FindDir("Dir::State::lists") + "partial/"; TargetF += URItoFileName(S); if (_config->FindB("APT::CDROM::NoAct",false) == true) TargetF = "/dev/null"; - FileFd Target(TargetF,FileFd::WriteEmpty); + FileFd Target(TargetF,FileFd::WriteEmpty); + FILE *TargetFl = fdopen(dup(Target.Fd()),"w"); if (_error->PendingError() == true) return false; + if (TargetFl == 0) + return _error->Errno("fdopen","Failed to reopen fd"); // Setup the progress meter Progress.OverallProgress(CurrentSize,TotalSize,FileSize, @@ -140,7 +146,10 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List) string File; unsigned long Size; if (GetFile(File,Size) == false) + { + fclose(TargetFl); return false; + } if (Chop != 0) File = OrigPath + ChopDirs(File,Chop); @@ -202,21 +211,13 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List) Packages++; Hits++; - // Copy it to the target package file - if (Chop != 0 || Mangled == true) + if (RewriteEntry(TargetFl,File) == false) { - if (RewriteEntry(Target,File) == false) - continue; + fclose(TargetFl); + return false; } - else - { - const char *Start; - const char *Stop; - Section.GetSection(Start,Stop); - if (Target.Write(Start,Stop-Start) == false) - return false; - } } + fclose(TargetFl); if (Debug == true) cout << " Processed by using Prefix '" << Prefix << "' and chop " << Chop << endl; @@ -231,7 +232,8 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List) return _error->Errno("rename","Failed to rename"); // Copy the release file - sprintf(S,"cdrom:[%s]/%sRelease",Name.c_str(),(*I).c_str() + CDROM.length()); + snprintf(S,sizeof(S),"cdrom:[%s]/%sRelease",Name.c_str(), + (*I).c_str() + CDROM.length()); string TargetF = _config->FindDir("Dir::State::lists") + "partial/"; TargetF += URItoFileName(S); if (FileExists(*I + "Release") == true) @@ -278,8 +280,8 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List) cout << '.' << endl; if (Packages == 0) - return _error->Warning("No valid records were found."); - + _error->Warning("No valid records were found."); + if (NotFound + WrongSize > 10) cout << "Alot of entries were discarded, something may be wrong." << endl; @@ -383,7 +385,7 @@ bool IndexCopy::ReconstructChop(unsigned long &Chop,string Dir,string File) void IndexCopy::ConvertToSourceList(string CD,string &Path) { char S[300]; - sprintf(S,"binary-%s",_config->Find("Apt::Architecture").c_str()); + snprintf(S,sizeof(S),"binary-%s",_config->Find("Apt::Architecture").c_str()); // Strip the cdrom base path Path = string(Path,CD.length()); @@ -395,7 +397,7 @@ void IndexCopy::ConvertToSourceList(string CD,string &Path) return; // Not a dists type. - if (stringcmp(Path.begin(),Path.begin()+strlen("dists/"),"dists/") != 0) + if (stringcmp(Path.c_str(),Path.c_str()+strlen("dists/"),"dists/") != 0) return; // Isolate the dist @@ -448,44 +450,6 @@ bool IndexCopy::GrabFirst(string Path,string &To,unsigned int Depth) return true; } /*}}}*/ -// IndexCopy::CopyWithReplace - Copy a section and replace text /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool IndexCopy::CopyWithReplace(FileFd &Target,const char *Tag,string New) -{ - // Mangle the output filename - const char *Start; - const char *Stop; - const char *Filename; - Section->Find(Tag,Filename,Stop); - - /* We need to rewrite the filename field so we emit - all fields except the filename file and rewrite that one */ - for (unsigned int I = 0; I != Section->Count(); I++) - { - Section->Get(Start,Stop,I); - if (Start <= Filename && Stop > Filename) - { - char S[500]; - sprintf(S,"%s: %s\n",Tag,New.c_str()); - if (I + 1 == Section->Count()) - strcat(S,"\n"); - if (Target.Write(S,strlen(S)) == false) - return false; - } - else - { - if (Target.Write(Start,Stop-Start) == false) - return false; - if (Stop[-1] != '\n') - if (Target.Write("\n",1) == false) - return false; - } - } - if (Target.Write("\n",1) == false) - return false; -} - /*}}}*/ // PackageCopy::GetFile - Get the file information from the section /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -501,9 +465,15 @@ bool PackageCopy::GetFile(string &File,unsigned long &Size) // PackageCopy::RewriteEntry - Rewrite the entry with a new filename /*{{{*/ // --------------------------------------------------------------------- /* */ -bool PackageCopy::RewriteEntry(FileFd &Target,string File) +bool PackageCopy::RewriteEntry(FILE *Target,string File) { - return CopyWithReplace(Target,"Filename",File); + TFRewriteData Changes[] = {{"Filename",File.c_str()}, + {}}; + + if (TFRewrite(Target,*Section,TFRewritePackageOrder,Changes) == false) + return false; + fputc('\n',Target); + return true; } /*}}}*/ // SourceCopy::GetFile - Get the file information from the section /*{{{*/ @@ -520,7 +490,7 @@ bool SourceCopy::GetFile(string &File,unsigned long &Size) if (Base.empty() == false && Base[Base.length()-1] != '/') Base += '/'; - // Iterate over the entire list grabbing each triplet + // Read the first file triplet const char *C = Files.c_str(); string sSize; string MD5Hash; @@ -540,9 +510,15 @@ bool SourceCopy::GetFile(string &File,unsigned long &Size) // SourceCopy::RewriteEntry - Rewrite the entry with a new filename /*{{{*/ // --------------------------------------------------------------------- /* */ -bool SourceCopy::RewriteEntry(FileFd &Target,string File) +bool SourceCopy::RewriteEntry(FILE *Target,string File) { - return CopyWithReplace(Target,"Directory", - string(File,0,File.rfind('/'))); + string Dir(File,0,File.rfind('/')); + TFRewriteData Changes[] = {{"Directory",Dir.c_str()}, + {}}; + + if (TFRewrite(Target,*Section,TFRewriteSourceOrder,Changes) == false) + return false; + fputc('\n',Target); + return true; } /*}}}*/ diff --git a/apt/cmdline/indexcopy.h b/apt/cmdline/indexcopy.h index 43f8f47..54e84d9 100644 --- a/apt/cmdline/indexcopy.h +++ b/apt/cmdline/indexcopy.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: indexcopy.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: indexcopy.h,v 1.1 2002/07/23 17:54:52 niemeyer Exp $ /* ###################################################################### Index Copying - Aid for copying and verifying the index files @@ -12,6 +12,10 @@ #include #include +#include + +using std::string; +using std::vector; class pkgTagSection; class FileFd; @@ -28,11 +32,11 @@ class IndexCopy bool ReconstructChop(unsigned long &Chop,string Dir,string File); void ConvertToSourceList(string CD,string &Path); bool GrabFirst(string Path,string &To,unsigned int Depth); - bool CopyWithReplace(FileFd &Target,const char *Tag,string New); virtual bool GetFile(string &Filename,unsigned long &Size) = 0; - virtual bool RewriteEntry(FileFd &Target,string File) = 0; + virtual bool RewriteEntry(FILE *Target,string File) = 0; virtual const char *GetFileName() = 0; virtual const char *Type() = 0; + public: bool CopyPackages(string CDROM,string Name,vector &List); @@ -43,7 +47,7 @@ class PackageCopy : public IndexCopy protected: virtual bool GetFile(string &Filename,unsigned long &Size); - virtual bool RewriteEntry(FileFd &Target,string File); + virtual bool RewriteEntry(FILE *Target,string File); virtual const char *GetFileName() {return "Packages";}; virtual const char *Type() {return "Package";}; @@ -55,7 +59,7 @@ class SourceCopy : public IndexCopy protected: virtual bool GetFile(string &Filename,unsigned long &Size); - virtual bool RewriteEntry(FileFd &Target,string File); + virtual bool RewriteEntry(FILE *Target,string File); virtual const char *GetFileName() {return "Sources";}; virtual const char *Type() {return "Source";}; diff --git a/apt/cmdline/makefile b/apt/cmdline/makefile index f1221ba..a165566 100644 --- a/apt/cmdline/makefile +++ b/apt/cmdline/makefile @@ -7,28 +7,43 @@ include ../buildlib/defaults.mak # The apt-cache program PROGRAM=apt-cache -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile SOURCE = apt-cache.cc include $(PROGRAM_H) # The apt-get program PROGRAM=apt-get -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile SOURCE = apt-get.cc acqprogress.cc include $(PROGRAM_H) # The apt-config program PROGRAM=apt-config -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile SOURCE = apt-config.cc include $(PROGRAM_H) # The apt-cdrom program PROGRAM=apt-cdrom -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile -SOURCE = apt-cdrom.cc rpmindexcopy.cc +# CNC:2002-07-11 +SOURCE = apt-cdrom.cc rpmindexcopy.cc +include $(PROGRAM_H) + +# The apt-sortpkgs program +PROGRAM=apt-sortpkgs +SLIBS = -lapt-pkg +LIB_MAKES = apt-pkg/makefile +SOURCE = apt-sortpkgs.cc +include $(PROGRAM_H) + +# The apt-extracttemplates program +PROGRAM=apt-extracttemplates +SLIBS = -lapt-pkg -lapt-inst +LIB_MAKES = apt-pkg/makefile +SOURCE = apt-extracttemplates.cc include $(PROGRAM_H) diff --git a/apt/cmdline/rpmindexcopy.cc b/apt/cmdline/rpmindexcopy.cc index 01ebffd..b64c970 100644 --- a/apt/cmdline/rpmindexcopy.cc +++ b/apt/cmdline/rpmindexcopy.cc @@ -6,8 +6,8 @@ #include #include - -#include +#include +#include #include #include #include @@ -15,7 +15,7 @@ #include "rpmindexcopy.h" - +using namespace std; string RPMIndexCopy::RipComponent(string Path) { @@ -78,6 +78,9 @@ bool RPMIndexCopy::CopyPackages(string CDROM,string Name,vector &List) unsigned long CurrentSize = 0; + // Keep track of global release processing + map GlobalReleases; + for (vector::iterator I = List.begin(); I != List.end(); I++) { string OrigPath = string(*I,CDROM.length()); @@ -87,14 +90,8 @@ bool RPMIndexCopy::CopyPackages(string CDROM,string Name,vector &List) FileFd Pkg; string File = *I; - - if (strrcmp_(File.c_str(), - _config->Find("Acquire::ComprExtension").c_str()) == 0) - { - File = string(File, 0, - File.length() - _config->Find("Acquire::ComprExtension").length()); - } - + if (strcmp(File.c_str()+File.length()-4, ".bz2") == 0) + File = string(File, 0, File.length()-4); if (FileExists(File) == true) { @@ -115,10 +112,10 @@ bool RPMIndexCopy::CopyPackages(string CDROM,string Name,vector &List) Pkg.Fd(dup(fileno(tmp))); fclose(tmp); - // Fork gzip + // Fork bzip2 int Process = fork(); if (Process < 0) - return _error->Errno("fork","Couldn't fork gzip"); + return _error->Errno("fork","Couldn't fork bzip2"); // The child if (Process == 0) @@ -129,7 +126,7 @@ bool RPMIndexCopy::CopyPackages(string CDROM,string Name,vector &List) SetCloseExec(STDOUT_FILENO,false); const char *Args[3]; - Args[0] = _config->Find("Dir::bin::gzip","gzip").c_str(); + Args[0] = _config->Find("Dir::Bin::bzip2","bzip2").c_str(); Args[1] = "-d"; Args[2] = 0; execvp(Args[0],(char **)Args); @@ -137,8 +134,8 @@ bool RPMIndexCopy::CopyPackages(string CDROM,string Name,vector &List) } // Wait for gzip to finish - if (ExecWait(Process,_config->Find("Dir::bin::gzip","gzip").c_str(),false) == false) - return _error->Error("gzip failed, perhaps the disk is full."); + if (ExecWait(Process,_config->Find("Dir::Bin::bzip2","bzip2").c_str(),false) == false) + return _error->Error("bzip2 failed, perhaps the disk is full."); Pkg.Seek(0); } @@ -176,35 +173,47 @@ bool RPMIndexCopy::CopyPackages(string CDROM,string Name,vector &List) if (rename(TargetF.c_str(),FinalF.c_str()) != 0) return _error->Errno("rename","Failed to rename"); - string release = "release." + RipComponent(*I); - - // Copy the release file - sprintf(S,"cdrom:[%s]/%s%s",Name.c_str(), - RipDirectory(*I).c_str() + CDROM.length(), - release.c_str()); - string TargetF = _config->FindDir("Dir::State::lists") + "partial/"; - TargetF += URItoFileName(S); - if (FileExists(RipDirectory(*I) + release.c_str()) == true) + // Two release steps, one for global, one for component + string release = "release"; + for (int Step = 0; Step != 2; Step++) { - FileFd Target(TargetF,FileFd::WriteEmpty); - FileFd Rel(RipDirectory(*I) + release.c_str(),FileFd::ReadOnly); - if (_error->PendingError() == true) - return false; + if (Step == 0) + { + if (GlobalReleases.find(*I) != GlobalReleases.end()) + continue; + GlobalReleases[*I] = true; + } + else + release += "." + RipComponent(*I); - if (CopyFile(Rel,Target) == false) - return false; - } - else - { - // Empty release file - FileFd Target(TargetF,FileFd::WriteEmpty); - } + // Copy the component release file + sprintf(S,"cdrom:[%s]/%s/%s",Name.c_str(), + RipDirectory(*I).c_str() + CDROM.length(), + release.c_str()); + string TargetF = _config->FindDir("Dir::State::lists") + "partial/"; + TargetF += URItoFileName(S); + if (FileExists(RipDirectory(*I) + release) == true) + { + FileFd Target(TargetF,FileFd::WriteEmpty); + FileFd Rel(RipDirectory(*I) + release,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + + if (CopyFile(Rel,Target) == false) + return false; + } + else + { + // Empty release file + FileFd Target(TargetF,FileFd::WriteEmpty); + } - // Rename the release file - FinalF = _config->FindDir("Dir::State::lists"); - FinalF += URItoFileName(S); - if (rename(TargetF.c_str(),FinalF.c_str()) != 0) - return _error->Errno("rename","Failed to rename"); + // Rename the release file + FinalF = _config->FindDir("Dir::State::lists"); + FinalF += URItoFileName(S); + if (rename(TargetF.c_str(),FinalF.c_str()) != 0) + return _error->Errno("rename","Failed to rename"); + } } string Prefix = ""; @@ -231,3 +240,4 @@ void RPMIndexCopy::ConvertToSourceList(string CD, string &Path) Path = RipDistro(Path) + " " + RipComponent(Path); } +// vim:sts=3:sw=3 diff --git a/apt/cmdline/rpmindexcopy.h b/apt/cmdline/rpmindexcopy.h index e0f0aad..bfd777c 100644 --- a/apt/cmdline/rpmindexcopy.h +++ b/apt/cmdline/rpmindexcopy.h @@ -17,7 +17,7 @@ class FileFd; class RPMIndexCopy { - protected: + protected: string RipComponent(string Path); string RipDirectory(string Path); @@ -25,26 +25,14 @@ class RPMIndexCopy void ConvertToSourceList(string CD, string &Path); - public: + public: + bool CopyPackages(string CDROM,string Name,vector &List); }; -class RPMPackageCopy : public RPMIndexCopy -{ - protected: - +class RPMPackageCopy : public RPMIndexCopy {}; - public: -}; - - -class RPMSourceCopy : public RPMIndexCopy -{ - protected: - - - public: -}; +class RPMSourceCopy : public RPMIndexCopy {}; #endif diff --git a/apt/configure b/apt/configure new file mode 100755 index 0000000..369ac89 --- /dev/null +++ b/apt/configure @@ -0,0 +1,10338 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.56. +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="configure.in" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP RANLIB ac_ct_RANLIB AR ac_ct_AR SOCKETLIBS PTHREADLIB EGREP DB2LIB RPMLIBS HAVE_STATVFS HAVE_TIMEGM HAVE_C9X NEED_SOCKLEN_T_DEFINE DEBIANDOC_HTML DEBIANDOC_TEXT NSGMLS SGMLSPL GETCONF NUM_CPUS PROC_MULTIPLY NUM_PROCS GLIBC_VER LIBSTDCPP_VER GCC3DEP MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE USE_NLS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB BASH LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors + --disable-rpath do not hardcode runtime library paths + --disable-nls do not use Native Language Support + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-cpus The number of cpus to be used for building(see --with-procs, default 1) + --with-getconf Enable automagical buildtime configuration + --with-proc-multiply Multiply this * number of cpus for parallel making(default 2). + --with-procs The number of processes to run in parallel during make(num_cpus * multiplier). + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-libintl-prefix=DIR search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.56. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + +ac_aux_dir= +for ac_dir in buildlib $srcdir/buildlib; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in buildlib $srcdir/buildlib" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in buildlib $srcdir/buildlib" >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + ac_config_headers="$ac_config_headers include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in" + + + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +am__api_version="1.7" +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + # test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE="apt" + VERSION="0.5.5" + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +rm -f .deps 2>/dev/null +mkdir .deps 2>/dev/null +if test -d .deps; then + DEPDIR=.deps +else + # MS-DOS does not allow filenames that begin with a dot. + DEPDIR=_deps +fi +rmdir .deps 2>/dev/null + + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +doit: + @echo done +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + echo '#include "conftest.h"' > conftest.c + echo 'int i;' > conftest.h + echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=conftest.c object=conftest.o \ + depfile=conftest.Po tmpdepfile=conftest.TPo \ + $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && + grep conftest.h conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + + + echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 +echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 +if test "${ac_cv_lib_cposix_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_cposix_strerror=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_cposix_strerror=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 +echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 +if test $ac_cv_lib_cposix_strerror = yes; then + LIBS="$LIBS -lcposix" +fi + + + + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cxx_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + echo '#include "conftest.h"' > conftest.c + echo 'int i;' > conftest.h + echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=conftest.c object=conftest.o \ + depfile=conftest.Po tmpdepfile=conftest.TPo \ + $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && + grep conftest.h conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR=""ar"" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AR=$ac_ct_AR +else + AR="$ac_cv_prog_AR" +fi + + +SAVE_LIBS="$LIBS" +LIBS="" +echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_search_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_gethostbyname=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_gethostbyname="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_gethostbyname" = no; then + for ac_lib in nsl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_gethostbyname="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 +if test "$ac_cv_search_gethostbyname" != no; then + test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" + +fi + +echo "$as_me:$LINENO: checking for library containing connect" >&5 +echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6 +if test "${ac_cv_search_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_connect=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_connect="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_connect" = no; then + for ac_lib in socket; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_connect="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 +echo "${ECHO_T}$ac_cv_search_connect" >&6 +if test "$ac_cv_search_connect" != no; then + test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS" + +fi + +SOCKETLIBS="$LIBS" + +LIBS="$SAVE_LIBS" + + + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "${ac_cv_header_db2_db_h+set}" = set; then + echo "$as_me:$LINENO: checking for db2/db.h" >&5 +echo $ECHO_N "checking for db2/db.h... $ECHO_C" >&6 +if test "${ac_cv_header_db2_db_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_db2_db_h" >&5 +echo "${ECHO_T}$ac_cv_header_db2_db_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking db2/db.h usability" >&5 +echo $ECHO_N "checking db2/db.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking db2/db.h presence" >&5 +echo $ECHO_N "checking db2/db.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: db2/db.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: db2/db.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: db2/db.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: db2/db.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: db2/db.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: db2/db.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: db2/db.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: db2/db.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: db2/db.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: db2/db.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for db2/db.h" >&5 +echo $ECHO_N "checking for db2/db.h... $ECHO_C" >&6 +if test "${ac_cv_header_db2_db_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_db2_db_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_db2_db_h" >&5 +echo "${ECHO_T}$ac_cv_header_db2_db_h" >&6 + +fi +if test $ac_cv_header_db2_db_h = yes; then + echo "$as_me:$LINENO: checking for db_open in -ldb2" >&5 +echo $ECHO_N "checking for db_open in -ldb2... $ECHO_C" >&6 +if test "${ac_cv_lib_db2_db_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldb2 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char db_open (); +int +main () +{ +db_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_db2_db_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_db2_db_open=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_db2_db_open" >&5 +echo "${ECHO_T}$ac_cv_lib_db2_db_open" >&6 +if test $ac_cv_lib_db2_db_open = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_DB2 1 +_ACEOF + DB2LIB="-ldb2" +fi + +fi + + + + +rpm_version="none" +SAVE_LIBS="$LIBS" +SAVE_CPPFLAGS="$CPPFLAGS" + +CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" + +for ac_header in db1/db.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +if test "${ac_cv_header_rpm_rpmlib_h+set}" = set; then + echo "$as_me:$LINENO: checking for rpm/rpmlib.h" >&5 +echo $ECHO_N "checking for rpm/rpmlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_rpm_rpmlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_rpm_rpmlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_rpm_rpmlib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking rpm/rpmlib.h usability" >&5 +echo $ECHO_N "checking rpm/rpmlib.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking rpm/rpmlib.h presence" >&5 +echo $ECHO_N "checking rpm/rpmlib.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: rpm/rpmlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: rpm/rpmlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: rpm/rpmlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: rpm/rpmlib.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: rpm/rpmlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: rpm/rpmlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: rpm/rpmlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: rpm/rpmlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: rpm/rpmlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: rpm/rpmlib.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for rpm/rpmlib.h" >&5 +echo $ECHO_N "checking for rpm/rpmlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_rpm_rpmlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_rpm_rpmlib_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_rpm_rpmlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_rpm_rpmlib_h" >&6 + +fi +if test $ac_cv_header_rpm_rpmlib_h = yes; then + rpm_header_ok=1 +else + rpm_header_ok=0 +fi + + + +if test $rpm_header_ok = 1; then + + LIBS="$SAVE_LIBS -lrpm -lrpmio -lz -lbz2 -lpopt" + echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpmdb" >&5 +echo $ECHO_N "checking for rpmdbOpen in -lrpmdb... $ECHO_C" >&6 +if test "${ac_cv_lib_rpmdb_rpmdbOpen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrpmdb $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char rpmdbOpen (); +int +main () +{ +rpmdbOpen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_rpmdb_rpmdbOpen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_rpmdb_rpmdbOpen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_rpmdb_rpmdbOpen" >&5 +echo "${ECHO_T}$ac_cv_lib_rpmdb_rpmdbOpen" >&6 +if test $ac_cv_lib_rpmdb_rpmdbOpen = yes; then + RPMDBLIBS="-lrpmdb" +else + RPMDBLIBS="-ldb-3.1" +fi + + + LIBS="$SAVE_LIBS $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt" + echo "$as_me:$LINENO: checking for rpmdbGetIteratorOffset in -lrpm" >&5 +echo $ECHO_N "checking for rpmdbGetIteratorOffset in -lrpm... $ECHO_C" >&6 +if test "${ac_cv_lib_rpm_rpmdbGetIteratorOffset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrpm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char rpmdbGetIteratorOffset (); +int +main () +{ +rpmdbGetIteratorOffset (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_rpm_rpmdbGetIteratorOffset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_rpm_rpmdbGetIteratorOffset=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbGetIteratorOffset" >&5 +echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbGetIteratorOffset" >&6 +if test $ac_cv_lib_rpm_rpmdbGetIteratorOffset = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_RPM 1 +_ACEOF + cat >>confdefs.h <<_ACEOF +#define HAVE_RPM4 1 +_ACEOF + + RPMLIBS="-lrpm $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt" + SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" + echo "$as_me:$LINENO: checking for rpmtsUpdateDSI in -lrpm" >&5 +echo $ECHO_N "checking for rpmtsUpdateDSI in -lrpm... $ECHO_C" >&6 +if test "${ac_cv_lib_rpm_rpmtsUpdateDSI+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrpm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char rpmtsUpdateDSI (); +int +main () +{ +rpmtsUpdateDSI (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_rpm_rpmtsUpdateDSI=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_rpm_rpmtsUpdateDSI=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmtsUpdateDSI" >&5 +echo "${ECHO_T}$ac_cv_lib_rpm_rpmtsUpdateDSI" >&6 +if test $ac_cv_lib_rpm_rpmtsUpdateDSI = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_RPM41 1 +_ACEOF + + rpm_version="4.1" +else + rpm_version="4.0.X" +fi + + +fi + + + if test $rpm_version = "none"; then + LIBS="$SAVE_LIBS -ldb1 -lz -lbz2 -lpopt" + echo "$as_me:$LINENO: checking for rpmdbFirstRecNum in -lrpm" >&5 +echo $ECHO_N "checking for rpmdbFirstRecNum in -lrpm... $ECHO_C" >&6 +if test "${ac_cv_lib_rpm_rpmdbFirstRecNum+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrpm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char rpmdbFirstRecNum (); +int +main () +{ +rpmdbFirstRecNum (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_rpm_rpmdbFirstRecNum=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_rpm_rpmdbFirstRecNum=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbFirstRecNum" >&5 +echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbFirstRecNum" >&6 +if test $ac_cv_lib_rpm_rpmdbFirstRecNum = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_RPM 1 +_ACEOF + + RPMLIBS="-lrpm -ldb1 -lz -lbz2 -lpopt" + SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" + rpm_version="3" +fi + + fi +fi +echo "$as_me:$LINENO: checking for RPM version" >&5 +echo $ECHO_N "checking for RPM version... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $rpm_version" >&5 +echo "${ECHO_T}$rpm_version" >&6 + + +CPPFLAGS="$SAVE_CPPFLAGS" +LIBS="$SAVE_LIBS" + + +echo "$as_me:$LINENO: checking system architecture" >&5 +echo $ECHO_N "checking system architecture... $ECHO_C" >&6 +archset="`awk \" ! /^#|^\\\$/ { if(match(\\\"$target_cpu\\\",\\\"^\\\"\\\$1\\\"\\\$\\\")) {print \\\$2; exit}}\" $srcdir/buildlib/archtable`" +if test "x$archset" = "x"; then + { { echo "$as_me:$LINENO: error: failed: use --host=" >&5 +echo "$as_me: error: failed: use --host=" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: $archset" >&5 +echo "${ECHO_T}$archset" >&6 +cat >>confdefs.h <<_ACEOF +#define COMMON_CPU "$archset" +_ACEOF + + +echo "$as_me:$LINENO: checking system OS" >&5 +echo $ECHO_N "checking system OS... $ECHO_C" >&6 +osset="`awk \" ! /^#|^\\\$/ {if (match(\\\"$target_vendor-$target_os\\\",\\\$1)) {print \\\$2; exit}}\" $srcdir/buildlib/ostable`" +echo "$as_me:$LINENO: result: $osset" >&5 +echo "${ECHO_T}$osset" >&6 +cat >>confdefs.h <<_ACEOF +#define COMMON_OS "$osset" +_ACEOF + + +echo "$as_me:$LINENO: checking for C99 integer types" >&5 +echo $ECHO_N "checking for C99 integer types... $ECHO_C" >&6 +if test "${c9x_ints+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +uint8_t Foo1;uint16_t Foo2;uint32_t Foo3; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + c9x_ints=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +c9x_ints=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $c9x_ints" >&5 +echo "${ECHO_T}$c9x_ints" >&6 + +echo "$as_me:$LINENO: checking for statvfs" >&5 +echo $ECHO_N "checking for statvfs... $ECHO_C" >&6 +if test "${ac_cv_func_statvfs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char statvfs (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char statvfs (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_statvfs) || defined (__stub___statvfs) +choke me +#else +char (*f) () = statvfs; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_statvfs=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_statvfs=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_statvfs" >&5 +echo "${ECHO_T}$ac_cv_func_statvfs" >&6 +if test $ac_cv_func_statvfs = yes; then + HAVE_STATVFS=yes +fi + + + +if test x"$HAVE_STATVFS" != x"yes"; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "statfs" >/dev/null 2>&1; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_VFS_H 1 +_ACEOF + +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "statfs" >/dev/null 2>&1; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_MOUNT_H 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: failed: Need statvfs" >&5 +echo "$as_me: error: failed: Need statvfs" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f conftest* + + +fi +rm -f conftest* + +fi + +echo "$as_me:$LINENO: checking for timegm" >&5 +echo $ECHO_N "checking for timegm... $ECHO_C" >&6 +if test "${ac_cv_func_timegm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char timegm (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char timegm (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_timegm) || defined (__stub___timegm) +choke me +#else +char (*f) () = timegm; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_timegm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_timegm=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_timegm" >&5 +echo "${ECHO_T}$ac_cv_func_timegm" >&6 +if test $ac_cv_func_timegm = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_TIMEGM 1 +_ACEOF + +fi + + + + +archline="`awk \" ! /^#|^\\\$/ {if (match(\\\"$archset\\\",\\\$1)) {print; exit}}\" $srcdir/buildlib/sizetable | cut -f 2- -d ' '`" +if test "x$archline" != "x"; then + + set $archline + if test "$1" = "little"; then + ac_cv_c_bigendian=no + else + ac_cv_c_bigendian=yes + fi + size_char=$2 + size_int=$3 + size_short=$4 + size_long=$5 +fi + +if test "$cross_compiling" = "yes" -a "x$archline" = "x"; then + { { echo "$as_me:$LINENO: error: When cross compiling" >&5 +echo "$as_me: error: When cross compiling" >&2;} + { (exit architecture must be present in sizetable); exit architecture must be present in sizetable; }; } +fi +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_bigendian=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +HAVE_C9X=yes +if test x"$c9x_ints" = x"no"; then + echo "$as_me:$LINENO: checking for char" >&5 +echo $ECHO_N "checking for char... $ECHO_C" >&6 +if test "${ac_cv_type_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((char *) 0) + return 0; +if (sizeof (char)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_char=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_char=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 +echo "${ECHO_T}$ac_cv_type_char" >&6 + +echo "$as_me:$LINENO: checking size of char" >&5 +echo $ECHO_N "checking size of char... $ECHO_C" >&6 +if test "${ac_cv_sizeof_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_char" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_char=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (char)); } +unsigned long ulongval () { return (long) (sizeof (char)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (char))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (char)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (char)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_char=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_char=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 +echo "${ECHO_T}$ac_cv_sizeof_char" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR $ac_cv_sizeof_char +_ACEOF + + + echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + +echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (int)); } +unsigned long ulongval () { return (long) (sizeof (int)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (int))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_int=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + + echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6 +if test "${ac_cv_type_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((short *) 0) + return 0; +if (sizeof (short)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_short=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_short=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 + +echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_short" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_short=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (short)); } +unsigned long ulongval () { return (long) (sizeof (short)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (short))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_short=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + + + echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long)); } +unsigned long ulongval () { return (long) (sizeof (long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_long=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + + + HAVE_C9X= + +fi + +echo "$as_me:$LINENO: checking for missing socklen_t" >&5 +echo $ECHO_N "checking for missing socklen_t... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "socklen_t" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + + cat >>confdefs.h <<\_ACEOF +#define NEED_SOCKLEN_T_DEFINE 1 +_ACEOF + + NEED_SOCKLEN_T_DEFINE=yes + echo "$as_me:$LINENO: result: missing." >&5 +echo "${ECHO_T}missing." >&6 +fi +rm -f conftest* + + + +echo "$as_me:$LINENO: checking for h_errno" >&5 +echo $ECHO_N "checking for h_errno... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "h_errno" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: normal" >&5 +echo "${ECHO_T}normal" >&6 +else + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "h_errno" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: needs _XOPEN_SOURCE_EXTENDED" >&5 +echo "${ECHO_T}needs _XOPEN_SOURCE_EXTENDED" >&6 +else + { { echo "$as_me:$LINENO: error: \"not found.\"" >&5 +echo "$as_me: error: \"not found.\"" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f conftest* + + +fi +rm -f conftest* + + +# Extract the first word of "debiandoc2html", so it can be a program name with args. +set dummy debiandoc2html; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_DEBIANDOC_HTML+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DEBIANDOC_HTML in + [\\/]* | ?:[\\/]*) + ac_cv_path_DEBIANDOC_HTML="$DEBIANDOC_HTML" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DEBIANDOC_HTML="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +DEBIANDOC_HTML=$ac_cv_path_DEBIANDOC_HTML + +if test -n "$DEBIANDOC_HTML"; then + echo "$as_me:$LINENO: result: $DEBIANDOC_HTML" >&5 +echo "${ECHO_T}$DEBIANDOC_HTML" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "debiandoc2text", so it can be a program name with args. +set dummy debiandoc2text; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_DEBIANDOC_TEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DEBIANDOC_TEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DEBIANDOC_TEXT="$DEBIANDOC_TEXT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DEBIANDOC_TEXT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +DEBIANDOC_TEXT=$ac_cv_path_DEBIANDOC_TEXT + +if test -n "$DEBIANDOC_TEXT"; then + echo "$as_me:$LINENO: result: $DEBIANDOC_TEXT" >&5 +echo "${ECHO_T}$DEBIANDOC_TEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +# Extract the first word of "nsgmls", so it can be a program name with args. +set dummy nsgmls; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_NSGMLS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $NSGMLS in + [\\/]* | ?:[\\/]*) + ac_cv_path_NSGMLS="$NSGMLS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NSGMLS="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +NSGMLS=$ac_cv_path_NSGMLS + +if test -n "$NSGMLS"; then + echo "$as_me:$LINENO: result: $NSGMLS" >&5 +echo "${ECHO_T}$NSGMLS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "sgmlspl", so it can be a program name with args. +set dummy sgmlspl; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SGMLSPL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SGMLSPL in + [\\/]* | ?:[\\/]*) + ac_cv_path_SGMLSPL="$SGMLSPL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SGMLSPL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +SGMLSPL=$ac_cv_path_SGMLSPL + +if test -n "$SGMLSPL"; then + echo "$as_me:$LINENO: result: $SGMLSPL" >&5 +echo "${ECHO_T}$SGMLSPL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + +# Check whether --with-getconf or --without-getconf was given. +if test "${with_getconf+set}" = set; then + withval="$with_getconf" + if test "$withval" = "yes"; then + # Extract the first word of "getconf", so it can be a program name with args. +set dummy getconf; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_GETCONF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GETCONF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +GETCONF=$ac_cv_path_GETCONF + +if test -n "$GETCONF"; then + echo "$as_me:$LINENO: result: $GETCONF" >&5 +echo "${ECHO_T}$GETCONF" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + elif test ! "$withval" = "no";then + echo "$as_me:$LINENO: checking getconf" >&5 +echo $ECHO_N "checking getconf... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6 + GETCONF=$withval + fi +else + # Extract the first word of "getconf", so it can be a program name with args. +set dummy getconf; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_GETCONF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GETCONF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +GETCONF=$ac_cv_path_GETCONF + +if test -n "$GETCONF"; then + echo "$as_me:$LINENO: result: $GETCONF" >&5 +echo "${ECHO_T}$GETCONF" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +fi; + + +echo "$as_me:$LINENO: checking number of cpus" >&5 +echo $ECHO_N "checking number of cpus... $ECHO_C" >&6 + +# Check whether --with-cpus or --without-cpus was given. +if test "${with_cpus+set}" = set; then + withval="$with_cpus" + + if test "$withval" = "yes"; then + + if test ! -z "$GETCONF";then + old_args="$@" + set -- SC_NPROCESSORS_ONLN _NPROCESSORS_ONLN + while eval test -z \"\$NUM_CPUS\" -a ! -z \"$1\";do + eval NUM_CPUS=`$GETCONF "$1" 2>/dev/null` + shift + done + fi + if eval test -z \"\$NUM_CPUS\" -o \"\$NUM_CPUS\" = "-1";then + eval NUM_CPUS="1" + fi + + elif test ! "$withval" = "no";then + NUM_CPUS=$withval + elif test "$withval" = "no";then + NUM_CPUS=1 + fi +else + + if test ! -z "$GETCONF";then + old_args="$@" + set -- SC_NPROCESSORS_ONLN _NPROCESSORS_ONLN + while eval test -z \"\$NUM_CPUS\" -a ! -z \"$1\";do + eval NUM_CPUS=`$GETCONF "$1" 2>/dev/null` + shift + done + fi + if eval test -z \"\$NUM_CPUS\" -o \"\$NUM_CPUS\" = "-1";then + eval NUM_CPUS="1" + fi + + +fi; + ah_NUM_CPUS_msg="$NUM_CPUS" + if test "$NUM_CPUS" = "0"; then + # broken getconf, time to bitch. + ah_NUM_CPUS_msg="found 0 cpus. Has someone done a lobotomy?" + NUM_CPUS=1 + fi + if test $NUM_CPUS = 1 ;then + default_PROC_MULTIPLY=1 + else + default_PROC_MULTIPLY=2 + fi + echo "$as_me:$LINENO: result: $ah_NUM_CPUS_msg" >&5 +echo "${ECHO_T}$ah_NUM_CPUS_msg" >&6 + + + + echo "$as_me:$LINENO: checking processor multiplier" >&5 +echo $ECHO_N "checking processor multiplier... $ECHO_C" >&6 + +# Check whether --with-proc-multiply or --without-proc-multiply was given. +if test "${with_proc_multiply+set}" = set; then + withval="$with_proc_multiply" + if test "$withval" = "yes"; then + PROC_MULTIPLY=$default_PROC_MULTIPLY + elif test ! "$withval" = "no";then + PROC_MULTIPLY=$withval + fi +else + PROC_MULTIPLY=$default_PROC_MULTIPLY + +fi; + echo "$as_me:$LINENO: result: $PROC_MULTIPLY" >&5 +echo "${ECHO_T}$PROC_MULTIPLY" >&6 + + + + + echo "$as_me:$LINENO: checking number of processes to run during make" >&5 +echo $ECHO_N "checking number of processes to run during make... $ECHO_C" >&6 + +# Check whether --with-procs or --without-procs was given. +if test "${with_procs+set}" = set; then + withval="$with_procs" + if test "$withval" = "yes"; then + NUM_PROCS=`expr $NUM_CPUS \* $PROC_MULTIPLY` + elif test ! "$withval" = "no";then + NUM_PROCS=$withval + fi +else + NUM_PROCS=`expr $NUM_CPUS \* $PROC_MULTIPLY` + +fi; + echo "$as_me:$LINENO: result: $NUM_PROCS" >&5 +echo "${ECHO_T}$NUM_PROCS" >&6 + + +echo "$as_me:$LINENO: checking glibc version" >&5 +echo $ECHO_N "checking glibc version... $ECHO_C" >&6 + dummy=if$$ + cat <<_GLIBC_>$dummy.c +#include +#include +#include +int main(int argc, char **argv) { printf("libc6.%d",__GLIBC_MINOR__); exit(0); } +_GLIBC_ + ${CC-cc} $dummy.c -o $dummy > /dev/null 2>&1 + if test "$?" = 0; then + GLIBC_VER=`./$dummy` + echo "$as_me:$LINENO: result: $GLIBC_VER" >&5 +echo "${ECHO_T}$GLIBC_VER" >&6 + GLIBC_VER="-$GLIBC_VER" + else + { echo "$as_me:$LINENO: WARNING: cannot determine GNU C library minor version number" >&5 +echo "$as_me: WARNING: cannot determine GNU C library minor version number" >&2;} + fi + rm -f $dummy $dummy.c + + +echo "$as_me:$LINENO: checking libstdc++ version" >&5 +echo $ECHO_N "checking libstdc++ version... $ECHO_C" >&6 + dummy=if$$ + cat <<_LIBSTDCPP_>$dummy.cc +#include +#include +#include +int main(int argc, char **argv) { exit(0); } +_LIBSTDCPP_ + ${CXX-c++} $dummy.cc -o $dummy > /dev/null 2>&1 + + if test "$?" = 0; then + soname=`objdump -p ./$dummy |grep NEEDED|grep libstd` + LIBSTDCPP_VER=`echo $soname | sed -e 's/.*NEEDED.*libstdc++\(-libc.*\(-.*\)\)\?.so.\(.*\)/\3\2/'` + fi + rm -f $dummy $dummy.cc + + if test -z "$LIBSTDCPP_VER"; then + { echo "$as_me:$LINENO: WARNING: cannot determine standard C++ library version number" >&5 +echo "$as_me: WARNING: cannot determine standard C++ library version number" >&2;} + else + echo "$as_me:$LINENO: result: $LIBSTDCPP_VER" >&5 +echo "${ECHO_T}$LIBSTDCPP_VER" >&6 + LIBSTDCPP_VER="-$LIBSTDCPP_VER" + fi + + + + echo "$as_me:$LINENO: checking if $CXX -MD works" >&5 +echo $ECHO_N "checking if $CXX -MD works... $ECHO_C" >&6 + touch gcc3dep.cc + ${CXX-c++} -MD -o gcc3dep_test.o -c gcc3dep.cc + rm -f gcc3dep.cc gcc3dep_test.o + if test -e gcc3dep.d; then + rm -f gcc3dep.d + GCC_MD=input + GCC3DEP= + elif test -e gcc3dep_test.d; then + rm -f gcc3dep_test.d + GCC_MD=output + GCC3DEP=yes + else + { { echo "$as_me:$LINENO: error: no" >&5 +echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } + fi + echo "$as_me:$LINENO: result: yes, for $GCC_MD" >&5 +echo "${ECHO_T}yes, for $GCC_MD" >&6 + + + +ALL_LINGUAS="de_DE es_ES it_IT pt_BR ru" + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + + + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_GMSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT + +if test -n "$GMSGFMT"; then + echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +echo "${ECHO_T}$GMSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + rm -f messages.po + + # Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGMERGE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGMERGE" in + /*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test "$GMSGFMT" != ":"; then + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 +echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 + GMSGFMT=":" + fi + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 +echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 + XGETTEXT=":" + fi + rm -f messages.po + fi + + ac_config_commands="$ac_config_commands default-1" + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi +fi +echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6 + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + # Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + : +else + enable_rpath=yes +fi; + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval="$with_libiconv_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + + + + + echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval +else + USE_NLS=yes +fi; + echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6 + + + + LIBINTL= + LTLIBINTL= + POSUB= + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + + + + + echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 +echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 +if test "${gt_cv_func_gnugettext1_libc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_func_gnugettext1_libc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_func_gnugettext1_libc=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5 +echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6 + + if test "$gt_cv_func_gnugettext1_libc" != "yes"; then + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6 +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6 + if test "$am_cv_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6 + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix or --without-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then + withval="$with_libintl_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBINTL= + LTLIBINTL= + INCINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 +echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 +if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_func_gnugettext1_libintl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_func_gnugettext1_libintl=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext1_libintl=yes + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5 +echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6 + fi + + if test "$gt_cv_func_gnugettext1_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then + echo "$as_me:$LINENO: checking how to link with libintl" >&5 +echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBINTL" >&5 +echo "${ECHO_T}$LIBINTL" >&6 + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + + fi + + POSUB=po + fi + + + + INTLLIBS="$LIBINTL" + + + + + + +if test x"$USE_NLS" = "xyes"; then + cat >>confdefs.h <<\_ACEOF +#define USE_NLS 1 +_ACEOF + +fi + +# Extract the first word of "bash", so it can be a program name with args. +set dummy bash; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_BASH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $BASH in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASH="$BASH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +BASH=$ac_cv_path_BASH + +if test -n "$BASH"; then + echo "$as_me:$LINENO: result: $BASH" >&5 +echo "${ECHO_T}$BASH" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + ac_config_files="$ac_config_files environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in" + ac_config_commands="$ac_config_commands default" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.56. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.56, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # from automake. + eval 'ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "environment.mak" ) CONFIG_FILES="$CONFIG_FILES environment.mak:buildlib/environment.mak.in" ;; + "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile:buildlib/makefile.in" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h:buildlib/config.h.in" ;; + "include/apti18n.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/apti18n.h:buildlib/apti18n.h.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@AMTAR@,$AMTAR,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@CXXDEPMODE@,$CXXDEPMODE,;t t +s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +s,@CPP@,$CPP,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@ac_ct_AR@,$ac_ct_AR,;t t +s,@SOCKETLIBS@,$SOCKETLIBS,;t t +s,@PTHREADLIB@,$PTHREADLIB,;t t +s,@EGREP@,$EGREP,;t t +s,@DB2LIB@,$DB2LIB,;t t +s,@RPMLIBS@,$RPMLIBS,;t t +s,@HAVE_STATVFS@,$HAVE_STATVFS,;t t +s,@HAVE_TIMEGM@,$HAVE_TIMEGM,;t t +s,@HAVE_C9X@,$HAVE_C9X,;t t +s,@NEED_SOCKLEN_T_DEFINE@,$NEED_SOCKLEN_T_DEFINE,;t t +s,@DEBIANDOC_HTML@,$DEBIANDOC_HTML,;t t +s,@DEBIANDOC_TEXT@,$DEBIANDOC_TEXT,;t t +s,@NSGMLS@,$NSGMLS,;t t +s,@SGMLSPL@,$SGMLSPL,;t t +s,@GETCONF@,$GETCONF,;t t +s,@NUM_CPUS@,$NUM_CPUS,;t t +s,@PROC_MULTIPLY@,$PROC_MULTIPLY,;t t +s,@NUM_PROCS@,$NUM_PROCS,;t t +s,@GLIBC_VER@,$GLIBC_VER,;t t +s,@LIBSTDCPP_VER@,$LIBSTDCPP_VER,;t t +s,@GCC3DEP@,$GCC3DEP,;t t +s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t +s,@MSGFMT@,$MSGFMT,;t t +s,@GMSGFMT@,$GMSGFMT,;t t +s,@XGETTEXT@,$XGETTEXT,;t t +s,@MSGMERGE@,$MSGMERGE,;t t +s,@USE_NLS@,$USE_NLS,;t t +s,@LIBICONV@,$LIBICONV,;t t +s,@LTLIBICONV@,$LTLIBICONV,;t t +s,@INTLLIBS@,$INTLLIBS,;t t +s,@LIBINTL@,$LIBINTL,;t t +s,@LTLIBINTL@,$LTLIBINTL,;t t +s,@POSUB@,$POSUB,;t t +s,@BASH@,$BASH,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +_am_stamp_count=`expr ${_am_stamp_count-0} + 1` +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + default-1 ) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + default ) make -s dirs ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/apt/configure.in b/apt/configure.in index 840606b..47fea06 100644 --- a/apt/configure.in +++ b/apt/configure.in @@ -1,3 +1,4 @@ +ad dnl Process this file with autoconf to produce a configure script. dnl The ONLY thing this is used for is to configure for different dnl linux architectures and configurations, it is not used to make the @@ -13,18 +14,21 @@ dnl configure.in correctly and can be run at any time AC_INIT(configure.in) AC_CONFIG_AUX_DIR(buildlib) -AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in) +AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) +dnl CNC:2002-07-08 dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.3.19cnc55") -PACKAGE="apt" -AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) +dnl AC_DEFINE_UNQUOTED(VERSION,"0.5.5") +dnl PACKAGE="apt" +dnl AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") +dnl AC_SUBST(PACKAGE) dnl Check the archs, we want the target type. AC_CANONICAL_SYSTEM +dnl CNC:2002-07-08 +AM_INIT_AUTOMAKE("apt", "0.5.5") + dnl Check our C compiler AC_CHECK_TOOL_PREFIX AC_PROG_CC @@ -34,20 +38,8 @@ dnl Check for other programs AC_PROG_CXX AC_PROG_CPP AC_PROG_RANLIB -AC_PROG_INSTALL AC_CHECK_TOOL(AR,ar,"ar") - -ALL_LINGUAS="pt_BR es_ES it_IT ru" - -dnl Check for i18n stuff through gettext -AM_GNU_GETTEXT -AC_CHECK_HEADERS(libintl.h) - -LOCALEDIR="/usr/share/locale" -AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR") -AC_SUBST(LOCALEDIR) - dnl Checks for sockets SAVE_LIBS="$LIBS" LIBS="" @@ -56,7 +48,7 @@ AC_SEARCH_LIBS(connect,socket) SOCKETLIBS="$LIBS" AC_SUBST(SOCKETLIBS) LIBS="$SAVE_LIBS" - + dnl Checks for pthread -- disabled due to glibc bugs jgg dnl AC_CHECK_LIB(pthread, pthread_create,[AC_DEFINE(HAVE_PTHREAD) PTHREADLIB="-lpthread"]) AC_SUBST(PTHREADLIB) @@ -70,8 +62,8 @@ AC_CHECK_HEADER(db2/db.h, [AC_DEFINE(HAVE_DB2) DB2LIB="-ldb2"])]) AC_SUBST(DB2LIB) - -dnl Check for rpm version --akk +dnl CNC:2002-07-03 +dnl Check for rpm version rpm_version="none" SAVE_LIBS="$LIBS" SAVE_CPPFLAGS="$CPPFLAGS" @@ -92,7 +84,11 @@ if test $rpm_header_ok = 1; then [AC_DEFINE_UNQUOTED(HAVE_RPM, 1) AC_DEFINE_UNQUOTED(HAVE_RPM4, 1) RPMLIBS="-lrpm $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt" SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" - rpm_version="4"]) + AC_CHECK_LIB(rpm, rpmtsUpdateDSI, + [AC_DEFINE_UNQUOTED(HAVE_RPM41, 1) + rpm_version="4.1"], + [rpm_version="4.0.X"]) + ]) if test $rpm_version = "none"; then LIBS="$SAVE_LIBS -ldb1 -lz -lbz2 -lpopt" @@ -145,6 +141,10 @@ if test x"$HAVE_STATVFS" != x"yes"; then ]) fi +dnl We should use the real timegm function if we have it. +AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM)) +AC_SUBST(HAVE_TIMEGM) + dnl Check the sizes etc. of the architecture dnl This is stupid, it should just use the AC macros like it does below dnl Cross compilers can either get a real C library or preload the cache @@ -218,4 +218,17 @@ rc_GLIBC_VER rc_LIBSTDCPP_VER ah_GCC3DEP -AC_OUTPUT(po/Makefile.in intl/Makefile environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make -s dirs) +dnl It used to be that the user could select translations and that could get +dnl passed to the makefiles, but now that can only work if you use special +dnl gettext approved makefiles, so this feature is unsupported by this. +dnl CNC:2002-10-22 +ALL_LINGUAS="de_DE es_ES it_IT pt_BR ru" +AM_GNU_GETTEXT(external) +if test x"$USE_NLS" = "xyes"; then + AC_DEFINE(USE_NLS) +fi +AC_SUBST(USE_NLS) +AC_PATH_PROG(BASH, bash) + +dnl CNC:2002-07-08 +AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make -s dirs) diff --git a/apt/debian/CVS/Entries b/apt/debian/CVS/Entries deleted file mode 100644 index dfe51fe..0000000 --- a/apt/debian/CVS/Entries +++ /dev/null @@ -1,15 +0,0 @@ -/changelog/1.1.1.1/Fri Aug 10 14:00:44 2001// -/control/1.1.1.1/Fri Aug 10 14:00:44 2001// -/copyright/1.1.1.1/Fri Aug 10 14:00:44 2001// -/dhelp/1.1.1.1/Fri Aug 10 14:00:44 2001// -/dirs/1.1.1.1/Fri Aug 10 14:00:44 2001// -/examples/1.1.1.1/Fri Aug 10 14:00:44 2001// -/libapt-pkg-dev.dirs/1.1.1.1/Fri Aug 10 14:00:44 2001// -/libapt-pkg-doc.dhelp/1.1.1.1/Fri Aug 10 14:00:44 2001// -/libapt-pkg-doc.postinst/1.1.1.1/Fri Aug 10 14:00:44 2001// -/libapt-pkg-doc.prerm/1.1.1.1/Fri Aug 10 14:00:44 2001// -/postinst/1.1.1.1/Fri Aug 10 14:00:45 2001// -/postrm/1.1.1.1/Fri Aug 10 14:00:45 2001// -/rules/1.1.1.1/Fri Aug 10 14:00:45 2001// -/shlibs.local/1.1.1.1/Fri Aug 10 14:00:45 2001// -D diff --git a/apt/debian/CVS/Repository b/apt/debian/CVS/Repository deleted file mode 100644 index 525781f..0000000 --- a/apt/debian/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/debian diff --git a/apt/debian/CVS/Root b/apt/debian/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/debian/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/debian/apt-utils.dirs b/apt/debian/apt-utils.dirs new file mode 100644 index 0000000..14f5b95 --- /dev/null +++ b/apt/debian/apt-utils.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/bin diff --git a/apt/debian/changelog b/apt/debian/changelog index aa047bc..94174bb 100644 --- a/apt/debian/changelog +++ b/apt/debian/changelog @@ -1,3 +1,274 @@ +apt (0.5.5) unstable; urgency=low + + * New deb version compare function, that has no integer limits, and + supports pre-versions using ~. Code ported from dpkg. + * Fix handling of [!arch] for build-dependencies. Closes: #88798, #149595 + * Fix handling of build-deps on unknown packages. Closes: #88664, #153307 + * "apt-get --arch-only build-dep" to install only architecture- + dependent build dependencies. Bump minor shared lib number to reflect + small change in BuildDepend API. + * APT::Build-Essential configuration option (defaults to "build-essential") + so that "apt-get build-dep" will ensure build essential packages are + installed prior to installing other build-dependencies. Closes: #148879 + * LD_LIBRARY_PATH thing. Closes: #109430, #147529 + * /usr/doc reference in postinst. Closes: #126189 + * Doc updates. Closes: #120689 + * Possible apt-cache segfault. Closes: #120311, #118431, #117915, #135295, + #131062, #136749 + * Print special message for EAI_AGAIN. Closes: #131397 + * libapt-pkg-dev needs to bring in the apt-inst library if linking + is to work. Closes: #133943 + * Typos, Doc Stuff. Closes: #132772, #129970, #123642, #114892, #113786, + #109591, #105920, #103678, #139752, #138186, #138054, #138050, + #139994, #142955, #151654, #151834, #147611, #154268 + * Fix possibility for tag file parsing to fail in some unlikely situations. + Closes: #139328 + * Use std C++ names for some header files. Closes: #128741, + * Do not check for free space if --no-download. Closes: #117856 + * Actually implement or group handling for 'upgrade'. Closes: #133950 + * "Internal Error, Couldn't configure pre-depend" is not actually an + internal error, it is a packaging error and now it says so, and + pinpoints the problem dependency. Closes: #155621 + * Allows failure to write to a pipe for post-invoke stuff. Closes: #89830 + * Use usr/share/doc for dhelp. Closes: #115701 + * --print-uris works with 'update'. Closes: #57070 + * Options Dpkg::MaxArgs,Dpkg::MaxArgBytes to allow a much longer dpkg + command line. + * Fixed 2 little OR group bugs, thanks to Yann Dirson. Closes: #143995, + #142298 + * Allow an uninstalled package to be marked for removal on an install + line (meaning not to automatically install it), also fix some dodgy + handling of protected packages. Closes: #92287, #116011 + * Fix errant prefix matching in version selection. Closes: #105968 + * Ensure that all files needed to run APT as a user are readable and + ignore roots umask for these files. Closes: #108801 + * Support larger config spaces. Closes: #111914 + * 'apt-get update' no longer does 'Building Dependency Tree'. + * When matching regexs allways print a message. Change regex activation + charset. Closes: #147817 + * Don't die if lines in sources.list are too long. Closes: #146846 + * Show file name on apt-extracttemplate error messges. Closes: #151835 + * i18n gettext stuff, based on work from Michael Piefel: Closes: #95933 + * Some highly unlikely memory faults. Closes: #155842 + * C++ stuff for G++3.2. Closes: #162617, #165515, + * apt-config dumps sends to stdout not stderr now. Closes: #146294 + * Fix segfault in FindAny when /i is used, and there is no default. + Closes: #165891 + * Add s390x to archtable. Closese: #160992. + * Update config.sub/config.guess in cvs, and add support to debian/rules + to update them from /usr/share/misc if they exist. Closes: #155014 + * Remove 'Sorry' from messages. Closes: #148824. + * Change wording of 'additional disk space usage' message. Closes: + #135021. + * apt-extracttemplates now prepends the package name when extracting + files. Closes: #132776 + * Add -n synonym for --names-only for apt-cache. Closes: #130689 + * Display both current version and new version in apt-get -s. Closes: + #92358 + * Add an options and timeout config item to ssh/rsh. Closes: #90654 + * libapt-pkg-dev now depends on apt-utils. Closes: #133942. + * Change verbose logging output of apt-ftparchive to go to stderr, + instead of stdout. Also, errors that occur no longer go to stdout, + but stderr. Closes: #161592 + * Test for timegm in configure. Closes: #165516. + * s/st_mtime/mtime/ on our local stat structure in apt-ftparchive, to + support compliation on platforms where st_mtime is a macro. Closes: + #165518 + * Check the currently mounted cdrom, to see if it's the one we are + interested in. Closes: #154602 + + -- Jason Gunthorpe Sun, 15 Sep 2002 17:16:59 -0600 + +apt (0.5.4) unstable; urgency=low + + * M68k config.guess patch. Closes: #88913 + * Bi-yearly test on OpenBSD and Solaris + * Doc updates. Closes: #89121, #89854, #99671, #98353, #95823, #93057, + #97520, #102867, #101071, #102421, #101565, #98272, #106914, + #105606, #105377 + * Various cosmetic code updates. Closes: #89066, #89066, #89152 + * Add "pre-auto" as an option for DSelect::Clean (run autoclean after + update). + * More patches from Alfredo for Vendors and more SHA-1 stuff + * Fix for AJ's 'desire to remove perl-5.005' and possibly other + similar situations. Closes: #56708, #59432 + * no_proxy and ftp. Closes: #89671 + * Philippe Batailler's man page patches. + * Fix for display bug. Closes: #92033, #93652, #98468 + * Use more than 16bits for the dep ID. Some people ran out.. + Closes: #103020, #97809, #102951, #99974, #107362, #107395, #107362, + #106911, #107395, #108968 + * Reordered some things to make dante and FTP happier. Closes: #92757 + * James R. Van Zandt's guide.sgml updates. Closes: #90027 + * apt-ftparchive copes with no uncompressed package files + contents. + * French man pages from philippe batailler - well sort of. They + don't build yet.. + * run-parts. Closes: #94286 + * 'apt-cache policy' preferences debug tool. + * Whatever. Closes: #89762 + * libstdc++ and HURD. Closes: #92025 + * More apt-utils verbage. Closes: #86954 + * Fliped comparision operator. Closes: #94618 + * Used the right copyright file. Closes: #65691 + * Randolph's G++3 patches. + * Fixed no_proxy tokanizing. Closes: #100046 + * Strip Config-Version when copying status to available. Closes: #97520 + * Segfault with missing source files. Closes: #100325 + * EINTR check. Closes: #102293 + * Various changes to the locking metholodgy for --print-uris. + Closes: #100590 + * Lame LD_LIBRARY_PATH thing. Closes: #98928 + * apt-cache search searchs provide names too now. Closes: #98695 + * Checksum and long lines problem. Closes: #106591 + * .aptignr and empty files are just a warning. Closes: #97364 + + -- Jason Gunthorpe Sat, 18 Aug 2001 17:21:59 -0500 + +apt (0.5.3) unstable; urgency=low + + * JoeyH's dpkg::preconfig not working. Closes: #88675 + * Fixed apt override disparity + * Alfredo's SHA-1 and related patches + + -- Jason Gunthorpe Sun, 4 Mar 2001 15:39:43 -0700 + +apt (0.5.2) unstable; urgency=low + + * Fixed mention of /usr/doc in the long description + * JoeyH's downgrade bug -- don't use 0.5.1 + * Doc bug. Closes: #88538 + * Fault in building release strings. Closes: #88533 + + -- Jason Gunthorpe Sun, 4 Mar 2001 15:39:43 -0700 + +apt (0.5.1) unstable; urgency=low + + * Fixed #82894 again, or should be and. + * Process the option string right. Closes: #86921 + * Don't eat the last command for pipes. Closes: #86923 + * Ignore .* for configuration directory processing. Closes: #86923 + * Alfredo's no_proxy patch + * Documentation fixes. Closes: #87091 + * JoeyH's double slash bug. Closes: #87266 + * Unintitialized buffer and apt-ftparchive contents generation. + Closes: #87612 + * Build-deps on virtual packages. Closes: #87639 + * Fixes glibc/libstdc++ symbol dependencies by including glibc and + libstdc++ version info in the library soname and in the package + provides. Closes: #87426 + * Updated soname version to 0.3.2 + * apt-extracttemplates moved from debconf into apt-utils + * s390 archtable entry. Closes: #88232 + * Dan's segfault + * Some instances where the status file can source a package in a + non-sensical way. Closes: #87390 + * Work better if there are duplicate sources.list entries. + * Fixed the resetting of Dir with "dir {};". Closes: #87323 + + -- Randolph Chung Sat, 3 Mar 2001 15:37:38 -0700 + +apt (0.5.0) unstable; urgency=low + + * Fixed an obscure bug with missing final double new lines in + package files + * Changed the apt-cdrom index copy routine to use the new section + rewriter + * Added a package file sorter, apt-sortpkgs + * Parse obsolete Optional dependencies. + * Added Ben's rsh method. Closes: #57794 + * Added IPv6 FTP support and better DNS rotation support. + * Include the server IP in error messages when using a DNS rotation. + Closes: #64895 + * Made most of the byte counters into doubles to prevent 32bit overflow. + Closes: #65349 + * HTTP Authorization. Closes: #61158 + * Ability to parse and return source index build depends from Randolph. + * new 'apt-get build-dep' command from Randolph. Closes: #63982 + * Added apt-ftparchive the all dancing all singing FTP archive + maintinance program + * Allow version specifications with =1.2.4-3 and /2.2 or /stable postfixes + in apt-get. + * Removed useless internal cruft including the xstatus file. + * Fixed config parser bugs. Closes: #67848, #71108 + * Brain Damanged apt-get config options changed, does not change the command + line interface, except to allow --enable-* to undo a configuration + option: + No-Remove -> Remove + No-Download -> Download + No-Upgrade -> Upgrade + * Made this fix configable (DSelect::CheckDir) and default to disabled: + * No remove prompt if the archives dir has not changed. Closes: #55709 + Because it is stupid in the case where no files were downloaded due to + a resumed-aborted install, or a full cache! Closes: #65952 + * Obscure divide by zero problem. Closes: #64394 + * Update sizetable for mips. Closes: #62288 + * Fixed a bug with passive FTP connections + * Has sizetable entry for sparc64. Closes: #64869 + * Escape special characters in the ::Label section of the cdroms.lst + * Created apt-utils and python-apt packages + * Due to the new policy engine, the available file may contain entries + from the status file. These are generated if the package is not obsolete + but the policy engine prohibits using the version from the package files. + They can be identified by the lack of a Filename field. + * The new policy engine. Closes: #66509, #66944, #45122, #45094, #40006, + #36223, #33468, #22551 + * Fixed deb-src line for non-us. Closes: #71501, #71601 + * Fixes for G++ 2.96, s/friend/friend class/ + * Fixed mis doc of APT::Get::Fix-Missing. Closes: #69269 + * Confirmed fix for missing new line problem. Closes: #69386 + * Fixed up dhelp files. Closes: #71312 + * Added some notes about dselect and offline usage. Closes: #66473, #38316 + * Lock files on read only file systems are ignored w/ warning. + Closes: #61701 + * apt-get update foo now gives an error! Closes: #42891 + * Added test for shlibs on hurd. Closes: #71499 + * Clarified apt-cache document. Closes: #71934 + * DocBook SGML man pages and some improvements in the text.. + * sigwinch thing. Closes: #72382 + * Caching can be turned off by setting the cache file names blank. + * Ignores arches it does not know about when autocleaning. Closes: #72862 + * New function in apt-config to return dirs, files, bools and integers. + * Fixed an odd litle bug in MarkInstall and fixed it up to handle + complex cases involving OR groups and provides. + 68754 describes confusing messages which are the result of this.. + Closes: #63149, #69394, #68754, #77683, #66806, #81486, #78712 + * Speeling mistake and return code for the 'wicked' resolver error + Closes: #72621, #75226, #77464 + * Solved unable to upgrade libc6 from potato to woody due to 3 package + libc6 dependency loop problem. + * Leading sources.list spaces. Closes: #76010 + * Removed a possible infinite loop while processing installations. + * Man page updates. Closes: #75411, #75560, #64292, #78469 + * ReduceSourceList bug. Closes: #76027 + * --only-source option. Closes: #76320 + * Typos. Closes: #77812, #77999 + * Different status messages. Closes: #76652, #78353 + * /etc/apt/apt.conf.d/ directory for Joey and Matt and pipe protocol 2 + * OS detection an support for the new pseduo standard of os-arch for the + Architecture string. Also uses regexing.. Closes: #39227, #72349 + * Various i18n stuff. Note that this still needs some i18n wizard + to do the last gettextization right. Closes: #62386 + * Fixed a problem with some odd http servers/proxies that did not return + the content size in the header. Closes: #79878, #44379 + * Little acquire bugs. Closes: #77029, #55820 + * _POSIX_THREADS may not be defined to anything, just defined.. + Closes: #78996 + * Spelling of Ignore-Hold correctly. Closes: #78042 + * Unlock the dpkg db if in download only mode. Closes: #84851 + * Brendan O'Dea's dselect admindir stuff. Closes: #62811 + * Patch from BenC. Closes: #80810 + * Single output of some names in lists. Closes: #80498, #43286 + * Nice message for people who can't read syserror output. Closes: #84734 + * OR search function. Closes: #82894 + * User's guide updates. Closes: #82469 + * The AJ/JoeyH var/state to var/lib transition patch. Closes: #59094 + * Various CD bugs, again thanks to Greenbush + Closes: #80946, #76547, #71810, #70049, #69482 + * Using potato debhelper. Closes: #57977 + * I cannot self-terminate. Closes: #74928 + + -- Jason Gunthorpe Wed, 21 Feb 2001 00:39:15 -0500 + apt (0.3.19) frozen unstable; urgency=low * Updates to apt-cdrom to support integrated non-us nicely, thanks to @@ -499,7 +770,3 @@ apt (0.0.1) unstable; urgency=low -- Scott K. Ellis Tue, 31 Mar 1998 12:49:28 -0500 -Local variables: -mode: debian-changelog -add-log-mailing-address: "che@debian.org" -End: diff --git a/apt/debian/control b/apt/debian/control index e462692..7059ea5 100644 --- a/apt/debian/control +++ b/apt/debian/control @@ -1,18 +1,19 @@ Source: apt Section: admin -Priority: standard +Priority: important Maintainer: APT Development Team -Standards-Version: 2.4.1 -Build-Depends: debhelper, debiandoc-sgml +Uploaders: Jason Gunthorpe +Standards-Version: 3.1.1 +Build-Depends: debhelper, debiandoc-sgml, libdb2-dev Package: apt Architecture: any Depends: ${shlibs:Depends} Priority: standard -Conflicts: deity -Replaces: deity, libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7) -Provides: libapt-pkg${libapt-pkg:major} +Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7) +Provides: ${libapt-pkg:provides} Suggests: dpkg-dev +Section: base Description: Advanced front-end for dpkg This is Debian's next generation front-end for the dpkg package manager. It provides the apt-get utility and APT dselect method that provides a @@ -20,20 +21,36 @@ Description: Advanced front-end for dpkg . APT features complete installation ordering, multiple source capability and several other unique features, see the Users Guide in - /usr/doc/apt/guide.text.gz + /usr/share/doc/apt/guide.text.gz Package: libapt-pkg-dev Architecture: any Priority: optional -Depends: libapt-pkg${libapt-pkg:major} -Description: Development files for APT's libapt-pkg - This package contains the header files and static libraries for +Depends: apt-utils, ${libapt-pkg:provides}, ${libapt-inst:provides} +Section: devel +Description: Development files for APT's libapt-pkg and libapt-inst + This package contains the header files and libraries for developing with APT's libapt-pkg Debian package manipulation - library. + library and the libapt-inst deb/tar/ar library. Package: libapt-pkg-doc Architecture: all Priority: optional +Section: doc Description: Documentation for APT development This package contains documentation for development of the APT Debian package manipulation program and its libraries. + +Package: apt-utils +Architecture: any +Depends: ${shlibs:Depends} +Priority: optional +Provides: ${libapt-inst:provides} +Section: admin +Description: APT utility programs + This package contains some infrequently used APT utility programs such + as apt-ftparchive, apt-sortpkgs and apt-extracttemplates. + . + apt-extracttemplates is used by debconf to prompt for configuration + questions before installation. apt-ftparchive is used to create Package + and other index files. apt-sortpkgs is a Package/Source file normalizer. diff --git a/apt/debian/copyright b/apt/debian/copyright deleted file mode 100644 index 16f8cac..0000000 --- a/apt/debian/copyright +++ /dev/null @@ -1,4 +0,0 @@ -APT is free software; you can redistribute them and/or modify them under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. diff --git a/apt/debian/dhelp b/apt/debian/dhelp index e24a7c0..091c499 100644 --- a/apt/debian/dhelp +++ b/apt/debian/dhelp @@ -3,10 +3,10 @@ Debian Utilities APT User's Guide guide.html/index.html - + The APT User's Guide provides an overview of how to use the the APT package manager, and provides a detailed look at the apt-get tool. - + @@ -14,8 +14,8 @@ manager, and provides a detailed look at the apt-get tool. Debian Utilities APT Offline Usage Guide offline.html/index.html - + The APT Offline Usage Guide provides detailed instructions and examples of how to use APT on an unconnected computer. - + diff --git a/apt/debian/dirs b/apt/debian/dirs index 1551a20..fd2a369 100644 --- a/apt/debian/dirs +++ b/apt/debian/dirs @@ -3,4 +3,4 @@ usr/lib/apt/methods usr/lib/dpkg/methods/apt etc/apt var/cache/apt/archives/partial -var/state/apt/lists/partial +var/lib/apt/lists/partial diff --git a/apt/debian/libapt-pkg-doc.dhelp b/apt/debian/libapt-pkg-doc.dhelp index 7458cd0..1ac9d25 100644 --- a/apt/debian/libapt-pkg-doc.dhelp +++ b/apt/debian/libapt-pkg-doc.dhelp @@ -2,8 +2,8 @@ devel Development Tools APT Cache Specification -../apt/cache.html/index.html - +cache.html/index.html + The APT Cache Specification describes the complete implementation and format of the APT Cache file. The APT Cache file is a way for APT to parse and store a large number of package files for display in the UI. It's primary @@ -11,51 +11,51 @@ design goal is to make display of a single package in the tree very fast by pre-linking important things like dependencies and provides. The specification doubles as documentation for one of the in-memory structures used by the package library and the APT GUI. - + devel Development Tools APT Design Document -../apt/design.html/index.html - +design.html/index.html + The APT Design Document is an overview of the specifications and design goals -of the APT project. It also attempts to give a broad description of the +of the APT project. It also attempts to give a broad descriptiontion of the implementation as well. - + devel Development Tools DPkg Technical Manual -../apt/design.html/index.html - +dpkg-tech.html/index.html + The DPkg Technical Manual gives an overview of dpkg's external functions and describes how it views the world. - + devel Development Tools APT Files -../apt/files.html/index.html - +files.html/index.html + The APT Files document describes the complete implementation and format of the installed APT directory structure. It also serves as guide to how APT views the Debian archive. - + devel Development Tools APT Method Interface -../apt/method.html/index.html - +method.html/index.html + The APT Method Interface document describes the interface that APT uses to the archive access methods. - + diff --git a/apt/debian/libapt-pkg-doc.postinst b/apt/debian/libapt-pkg-doc.postinst index aa8aac4..7a8249d 100755 --- a/apt/debian/libapt-pkg-doc.postinst +++ b/apt/debian/libapt-pkg-doc.postinst @@ -3,7 +3,7 @@ case "$1" in configure) if [ -f /usr/sbin/dhelp_parse ]; then - /usr/sbin/dhelp_parse -a /usr/doc/libapt-pkg-doc + /usr/sbin/dhelp_parse -a /usr/share/doc/libapt-pkg-doc fi ;; esac diff --git a/apt/debian/libapt-pkg-doc.prerm b/apt/debian/libapt-pkg-doc.prerm index 6d28b6b..7759c3c 100755 --- a/apt/debian/libapt-pkg-doc.prerm +++ b/apt/debian/libapt-pkg-doc.prerm @@ -3,7 +3,7 @@ case "$1" in remove|upgrade|remove-in-favour|deconfigure-in-favour) if [ -f /usr/sbin/dhelp_parse ]; then - /usr/sbin/dhelp_parse -d /usr/doc/libapt-pkg-doc + /usr/sbin/dhelp_parse -d /usr/share/doc/libapt-pkg-doc fi ;; failed-upgrade) diff --git a/apt/debian/postinst b/apt/debian/postinst index 9f0a3d5..9175576 100755 --- a/apt/debian/postinst +++ b/apt/debian/postinst @@ -14,7 +14,7 @@ create_apt_conf () { echo "/etc/apt/sources.list does not exist; creating a default setup." - cp /usr/doc/apt/examples/sources.list /etc/apt/sources.list + cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list } check_apt_conf () @@ -40,6 +40,6 @@ case "$1" in check_apt_conf fi if [ -f /usr/sbin/dhelp_parse ]; then - /usr/sbin/dhelp_parse -a /usr/doc/apt + /usr/sbin/dhelp_parse -a /usr/share/doc/apt fi esac diff --git a/apt/debian/postrm b/apt/debian/postrm index 6252800..bc6fa28 100755 --- a/apt/debian/postrm +++ b/apt/debian/postrm @@ -8,13 +8,15 @@ # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. +#DEBHELPER# + case "$1" in purge) echo -n "Removing APT cache and state files... " echo -n "/var/cache/apt" rm -rf /var/cache/apt - echo -n ", /var/state/apt" - rm -rf /var/state/apt + echo -n ", /var/lib/apt" + rm -rf /var/lib/apt echo ". Done." esac diff --git a/apt/debian/preinst b/apt/debian/preinst new file mode 100755 index 0000000..276eae5 --- /dev/null +++ b/apt/debian/preinst @@ -0,0 +1,30 @@ +#! /bin/sh + +# dpkg does this for us while we are upgrading.. +#if [ "$1" = "upgrade" -a -L /var/state/apt -a -e /var/lib/apt -a ! -L /var/state/apt ] && dpkg --compare-versions "$2" ">=" "0.4.10"; then +# rm /var/state/apt +#fi + +if [ "$1" = "upgrade" -o "$1" = "install" -a "$2" != "" ]; then + if [ ! -e /var/lib/apt -a -e /var/state/apt ]; then + # upgrading from /var/state/apt using apt. + # it's probably running now so we want to ensure /var/state/apt + # is still valid afterwards. and since we're upgrading + + if [ -x /usr/bin/perl -a -d /var/state/apt -a ! -L /var/state/apt ] && + perl -e 'exit 1 if ((stat("/var/lib"))[0] != (stat("/var/state/apt"))[0])' + then + # same fs, we can mv it + mv /var/state/apt /var/lib/apt + ln -s ../lib/apt /var/state/apt + # note that this symlink (/var/state/apt) will be removed when + # dpkg finishes unpacking the apt we're about to install; this is okay + else + # scary, let's just symlink it and hope + ln -s /var/state/apt /var/lib/apt + fi + fi + touch /var/lib/apt/lists/partial/.delete-me-later || true +fi + +#DEBHELPER# diff --git a/apt/debian/prerm b/apt/debian/prerm new file mode 100755 index 0000000..ac70a02 --- /dev/null +++ b/apt/debian/prerm @@ -0,0 +1,13 @@ +#! /bin/sh + +#DEBHELPER# + +if [ "$1" = "upgrade" -o "$1" = "failed-upgrade" ] && + dpkg --compare-versions "$2" "<<" 0.4.10 +then + if [ ! -d /var/state/apt/ ]; then + ln -s /var/lib/apt /var/state/apt + touch /var/lib/apt/lists/partial/.delete-me-later + fi +fi + diff --git a/apt/debian/python-apt.dirs b/apt/debian/python-apt.dirs new file mode 100644 index 0000000..621814d --- /dev/null +++ b/apt/debian/python-apt.dirs @@ -0,0 +1 @@ +usr/lib/python1.5/site-packages diff --git a/apt/debian/rules b/apt/debian/rules index f3567e9..8c6d64c 100755 --- a/apt/debian/rules +++ b/apt/debian/rules @@ -2,8 +2,10 @@ # Made with the aid of dh_make, by Craig Small # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. # Some lines taken from debmake, by Christoph Lameter. -# $Id: rules,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +# $Id: rules,v 1.4 2003/01/29 18:43:48 niemeyer Exp $ +# LD_LIBRARY_PATH=pwd/debian/apt/usr/lib dh_shlibdeps -papt +# dpkg: /home/jgg/work/apt2/debian/apt/usr/lib/libapt-pkg.so.2.9 not found. # For the deb builder, you can run 'debian/rules cvs-build', which does all # steps nescessary to produce a proper source tarball with the CVS/ removed. @@ -12,6 +14,24 @@ # create ../upload-, with all the files needed to be uploaded placed # in it. +export DH_COMPAT=2 + +export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +# FOR AUTOCONF 2.52 AND NEWER ONLY +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build $(DEB_HOST_GNU_TYPE) +else + confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +endif + +# See below +-include build/environment.mak + +# Default rule +build: + DEB_BUILD_PROG:=debuild -us -uc APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p') APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in) @@ -31,6 +51,7 @@ ifeq ($(words $(BLD)),0) override BLD := ./build endif +# Rebuild configure.in to have the correct version from the change log ifneq ($(APT_DEBVER),$(APT_CONFVER)) .PHONY: configure.in configure.in: @@ -39,39 +60,72 @@ else configure.in: endif +# APT Programs in apt-utils +APT_UTILS=ftparchive sortpkgs extracttemplates + # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # Find the libapt-pkg major version for use in other control files -export LIBAPT_MAJOR:=$(shell egrep '^MAJOR=' apt-pkg/makefile |cut -d '=' -f 2) -#debian/shlibs.local: -# rm -f $@ -# echo "libapt-pkg $(LIBAPT_MAJOR) libapt-pkg$(LIBAPT_MAJOR)" >> $@ -# echo "libapt-pkg $(LIBAPT_MAJOR) apt $(APT_DEBVER)" >> $@ +export LIBAPTPKG_MAJOR:=$(shell egrep '^MAJOR=' apt-pkg/makefile |cut -d '=' -f 2) +export LIBAPTINST_MAJOR:=$(shell egrep '^MAJOR=' apt-inst/makefile |cut -d '=' -f 2) -build: build-stamp -build-stamp: configure +# Determine which package we should provide in the control files +LIBAPTPKG_PROVIDE=libapt-pkg$(GLIBC_VER)$(LIBSTDCPP_VER)-$(LIBAPTPKG_MAJOR) +LIBAPTINST_PROVIDE=libapt-inst$(GLIBC_VER)$(LIBSTDCPP_VER)-$(LIBAPTINST_MAJOR) + +debian/shlibs.local: apt-pkg/makefile + # We have 3 shlibs.local files.. One for 'apt', one for 'apt-utils' and + # one for the rest of the packages. This ensures that each package gets + # the right overrides.. + rm -rf $@ $@.apt $@.apt-utils + echo "libapt-pkg$(GLIBC_VER)$(LIBSTDCPP_VER) $(LIBAPTPKG_MAJOR)" > $@.apt + + echo "libapt-pkg$(GLIBC_VER)$(LIBSTDCPP_VER) $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@.apt-utils + echo "libapt-inst$(GLIBC_VER)$(LIBSTDCPP_VER) $(LIBAPTINST_MAJOR)" >> $@.apt-utils + + echo "libapt-pkg$(GLIBC_VER)$(LIBSTDCPP_VER) $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@ + echo "libapt-inst$(GLIBC_VER)$(LIBSTDCPP_VER) $(LIBAPTINST_MAJOR) $(LIBAPTINST_PROVIDE)" >> $@ + +build: build/build-stamp + +# Note that this is unconditionally done first as part of loading environment.mak +# The true is needed to force make to reload environment.mak after running +# configure-stamp. Otherwise we can get stale or invalid, or missing config data. +build/environment.mak: build/configure-stamp + @true + +configure: configure.in +build/configure-stamp: configure dh_testdir -mkdir build - (cd build; ../configure) -# cd build && CXXFLAGS="-g -Wall -D_POSIX_C_SOURCE=199309" ../configure --disable-nls --disable-static --prefix=/usr -# cd build && make all-hdr -# cd build && make -s + cp COPYING debian/copyright +ifneq ($(wildcard /usr/share/misc/config.sub),) + cp -a /usr/share/misc/config.sub buildlib/config.sub + echo Updating buildlib/config.sub +endif +ifneq ($(wildcard /usr/share/misc/config.guess),) + cp -a /usr/share/misc/config.guess buildlib/config.guess + echo Updating buildlib/config.guess +endif + cd build && ../configure $(confflags) + touch $@ +build/build-stamp: build/configure-stamp # Add here commands to compile the package. - make - touch build-stamp + $(MAKE) -s + touch $@ clean: dh_testdir # dh_testroot - rm -f build-stamp + -$(MAKE) clean + -$(MAKE) distclean + rm -rf build # Add here commands to clean up after the build process. - -$(MAKE) clean - -$(MAKE) distclean - dh_clean + dh_clean debian/copyright debian/shlibs.local debian/shlibs.local.apt debian/shlibs.local.apt-utils binary-indep: libapt-pkg-doc # Build architecture-independent files here. @@ -84,11 +138,12 @@ libapt-pkg-doc: build debian/shlibs.local # libapt-pkg-doc install # dh_installdocs -p$@ $(BLD)/docs/cache* $(BLD)/docs/design* $(BLD)/docs/dpkg-tech* \ - $(BLD)/docs/files* $(BLD)/docs/method* - + $(BLD)/docs/files* $(BLD)/docs/method* \ + doc/libapt-pkg2_to_3.txt doc/style.txt + -cp -a debian/libapt-pkg-doc.dhelp debian/libapt-pkg-doc/usr/doc/libapt-pkg-doc/.dhelp -cp -a debian/libapt-pkg-doc.dhelp debian/libapt-pkg-doc/usr/share/doc/libapt-pkg-doc/.dhelp - + dh_installexamples -p$@ # dh_installmenu -p$@ # dh_installinit -p$@ @@ -102,14 +157,14 @@ libapt-pkg-doc: build debian/shlibs.local dh_fixperms -p$@ # dh_suidregister -p$@ dh_installdeb -p$@ - dh_gencontrol -p$@ -u -Vlibapt-pkg:major=${LIBAPT_MAJOR} + dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) dh_md5sums -p$@ dh_builddeb -p$@ # Build architecture-dependent files here. -binary-arch: apt libapt-pkg-dev +binary-arch: apt libapt-pkg-dev apt-utils apt: build debian/shlibs.local dh_testdir -p$@ dh_testroot -p$@ @@ -118,37 +173,41 @@ apt: build debian/shlibs.local # # apt install # - cp $(BLD)/bin/apt-* debian/tmp/usr/bin/ - + cp $(BLD)/bin/apt-* debian/apt/usr/bin/ + + # Remove the bits that are in apt-utils + rm $(addprefix debian/apt/usr/bin/apt-,$(APT_UTILS)) + # install the shared libs - find $(BLD)/bin/ -type f -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \; - find $(BLD)/bin/ -type l -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \; + find $(BLD)/bin/ -type f -name "libapt-pkg*.so.*" -exec cp -a "{}" debian/apt/usr/lib/ \; + find $(BLD)/bin/ -type l -name "libapt-pkg*.so.*" -exec cp -a "{}" debian/apt/usr/lib/ \; - cp $(BLD)/bin/methods/* debian/tmp/usr/lib/apt/methods/ + cp $(BLD)/bin/methods/* debian/apt/usr/lib/apt/methods/ - cp $(BLD)/scripts/dselect/* debian/tmp/usr/lib/dpkg/methods/apt/ + cp $(BLD)/scripts/dselect/* debian/apt/usr/lib/dpkg/methods/apt/ + cp -r $(BLD)/locale debian/apt/usr/ # Copy the guides - dh_installdocs -p$@ $(BLD)/docs/guide.text $(BLD)/docs/guide.html \ + dh_installdocs -p$@ $(BLD)/docs/guide*.text $(BLD)/docs/guide*.html \ $(BLD)/docs/offline.text $(BLD)/docs/offline.html - + # One or the other.. - -cp -a debian/dhelp debian/tmp/usr/doc/apt/.dhelp - -cp -a debian/dhelp debian/tmp/usr/share/doc/apt/.dhelp - + -cp -a debian/dhelp debian/apt/usr/doc/apt/.dhelp + -cp -a debian/dhelp debian/apt/usr/share/doc/apt/.dhelp + # head -n 500 ChangeLog > debian/ChangeLog - dh_installexamples -papt $(BLD)/docs/examples/* - dh_installmanpages -p$@ + dh_installexamples -p$@ $(BLD)/docs/examples/* + dh_installmanpages -p$@ apt-ftparchive.1 apt-sortpkgs.1 apt-extracttemplates.1 dh_installchangelogs -p$@ dh_strip -p$@ dh_compress -p$@ dh_fixperms -p$@ dh_installdeb -p$@ - LD_LIBRARY_PATH=`pwd`/debian/tmp/usr/lib dh_shlibdeps -papt - dh_gencontrol -p$@ -u -Vlibapt-pkg:major=${LIBAPT_MAJOR} - dh_makeshlibs -m${LIBAPT_MAJOR} -Vlibapt-pkg${LIBAPT_MAJOR} -papt + dh_shlibdeps -papt -l`pwd`/debian/apt/usr/lib -- -Ldebian/shlibs.local.apt + dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) + dh_makeshlibs -m$(LIBAPTPKG_MAJOR) -V '$(LIBAPTPKG_PROVIDE)' -papt dh_md5sums -p$@ dh_builddeb -p$@ @@ -160,14 +219,15 @@ libapt-pkg-dev: build debian/shlibs.local # # libapt-pkg-dev install # - cp -a $(BLD)/bin/libapt-pkg.so debian/libapt-pkg-dev/usr/lib/ - #ln -s libapt-pkg.so.${LIBAPT_MAJOR} debian/libapt-pkg-dev/usr/lib/libapt-pkg.so + cp -a $(BLD)/bin/libapt-pkg*.so debian/libapt-pkg-dev/usr/lib/ + cp -a $(BLD)/bin/libapt-inst*.so debian/libapt-pkg-dev/usr/lib/ +# ln -s libapt-pkg.so.$(LIBAPTPKG_MAJOR) debian/libapt-pkg-dev/usr/lib/libapt-pkg.so cp $(BLD)/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/ dh_installdocs -p$@ -# dh_installmenu -papt -# dh_installinit -papt -# dh_installcron -papt +# dh_installmenu -p$@ +# dh_installinit -p$@ +# dh_installcron -p$@ # dh_installmanpages -p$@ dh_installchangelogs -p$@ @@ -176,11 +236,39 @@ libapt-pkg-dev: build debian/shlibs.local dh_fixperms -p$@ # dh_suidregister -p$@ dh_installdeb -p$@ - dh_gencontrol -p$@ -u -Vlibapt-pkg:major=${LIBAPT_MAJOR} + dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) dh_md5sums -p$@ dh_builddeb -p$@ -source diff: +apt-utils: build debian/shlibs.local + dh_testdir -p$@ + dh_testroot -p$@ + dh_clean -p$@ -k + dh_installdirs -p$@ + + # install the shared libs + find $(BLD)/bin/ -type f -name "libapt-inst*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \; + find $(BLD)/bin/ -type l -name "libapt-inst*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \; + + cp $(addprefix $(BLD)/bin/apt-,$(APT_UTILS)) debian/$@/usr/bin/ + dh_installdocs -p$@ + + # Install the man pages.. + mkdir -p debian/$@/usr/share/man/man1 + -cp doc/apt-sortpkgs.1 doc/apt-ftparchive.1 doc/apt-extracttemplates.1 debian/$@/usr/share/man/man1/ + + dh_installchangelogs -p$@ + dh_strip -p$@ + dh_compress -p$@ + dh_fixperms -p$@ + dh_installdeb -p$@ + LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:`pwd`/debian/apt/usr/lib:`pwd`/debian/$@/usr/lib dh_shlibdeps -p$@ -- -Ldebian/shlibs.local.apt-utils + dh_gencontrol -p$@ -u -Vlibapt-inst:provides=$(LIBAPTINST_PROVIDE) + dh_makeshlibs -m$(LIBAPTINST_MAJOR) -V '$(LIBAPTINST_PROVIDE)' -p$@ + dh_md5sums -p$@ + dh_builddeb -p$@ + +source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false # Update from CVS @@ -192,10 +280,10 @@ l33ch: really-clean super-l33ch: l33ch Makefile.in configure: - make configure + $(MAKE) configure l33ch-stamp: super-l33ch - touch l33ch-stamp + touch $@ really-clean: clean -find -name Makefile.in -print0 | xargs -0r rm -f @@ -216,15 +304,11 @@ binary: binary-indep binary-arch cvs-build: rm -rf debian/cvs-build cvs update - buildlib/mkChangeLog - make startup - make doc - tar c --exclude CVS --exclude debian/cvs-build . |\ + $(MAKE) startup + $(MAKE) doc + tar c --exclude CVS --exclude cvs-build . |\ (mkdir -p debian/cvs-build/apt-$(APT_DEBVER);cd debian/cvs-build/apt-$(APT_DEBVER);tar x) -# The next line isn't needed, as debuild will make the .tar.gz for us. -# (cd debian/cvs-build;tar zcf apt_$(APT_DEBVER).tar.gz apt-$(APT_DEBVER)) (cd debian/cvs-build/apt-$(APT_DEBVER);$(DEB_BUILD_PROG)) - rm ChangeLog cvs-mkul: -mkdir -p ../upload-$(APT_DEBVER) diff --git a/apt/debian/shlibs.local b/apt/debian/shlibs.local deleted file mode 100644 index ab3c9c3..0000000 --- a/apt/debian/shlibs.local +++ /dev/null @@ -1,2 +0,0 @@ -libpkg 0 -libdeity 0 diff --git a/apt/deity/CVS/Entries b/apt/deity/CVS/Entries deleted file mode 100644 index 1784810..0000000 --- a/apt/deity/CVS/Entries +++ /dev/null @@ -1 +0,0 @@ -D diff --git a/apt/deity/CVS/Repository b/apt/deity/CVS/Repository deleted file mode 100644 index 21b3851..0000000 --- a/apt/deity/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/deity diff --git a/apt/deity/CVS/Root b/apt/deity/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/deity/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/doc/.cvsignore b/apt/doc/.cvsignore new file mode 100644 index 0000000..94d80ad --- /dev/null +++ b/apt/doc/.cvsignore @@ -0,0 +1,14 @@ +apt-cache.8 +apt-get.8 +apt-cdrom.8 +apt.conf.5 +sources.list.5 +apt-config.8 +apt-sortpkgs.1 +apt-ftparchive.1 +manpage.links +manpage.refs +manpage.log +apt_preferences.5 +apt-extracttemplates.1 +vendors.list.5 diff --git a/apt/doc/Bugs b/apt/doc/Bugs index 332abc5..deb7334 100644 --- a/apt/doc/Bugs +++ b/apt/doc/Bugs @@ -26,7 +26,7 @@ Summary: APT does not provide a way to download packages onto a removable media for another computer Status: 0.3.0 has substantially better support for this to the point - that it is doable by using a seperate configuration file and + that it is doable by using a separate configuration file and the -c option #27601: srange errors from dselect Summary: Couldn't locate an archive source diff --git a/apt/doc/CVS/Entries b/apt/doc/CVS/Entries deleted file mode 100644 index 7a9b909..0000000 --- a/apt/doc/CVS/Entries +++ /dev/null @@ -1,25 +0,0 @@ -D/examples//// -D/pt_BR//// -/Bugs/1.1.1.1/Fri Aug 10 14:01:10 2001// -/apt-cache.8/1.5/Fri Aug 10 14:01:10 2001// -/apt-cache.8.yo/1.1.1.1/Fri Aug 10 14:01:10 2001// -/apt-cdrom.8/1.2/Fri Aug 10 14:01:10 2001// -/apt-cdrom.8.yo/1.1.1.1/Fri Aug 10 14:01:10 2001// -/apt-config.8/1.2/Fri Aug 10 14:01:10 2001// -/apt-config.8.yo/1.1.1.1/Fri Aug 10 14:01:10 2001// -/apt-get.8/1.3/Fri Aug 10 14:01:10 2001// -/apt-get.8.yo/1.1.1.1/Fri Aug 10 14:01:10 2001// -/apt.8/1.2/Fri Aug 10 14:01:12 2001// -/apt.conf.5/1.3/Fri Aug 10 14:01:12 2001// -/apt.conf.5.yo/1.1.1.1/Fri Aug 10 14:01:12 2001// -/cache.sgml/1.1.1.1/Fri Aug 10 14:01:31 2001// -/design.sgml/1.1.1.1/Fri Aug 10 14:01:32 2001// -/dpkg-tech.sgml/1.1.1.1/Fri Aug 10 14:01:36 2001// -/files.sgml/1.1.1.1/Fri Aug 10 14:01:36 2001// -/guide.sgml/1.1.1.1/Fri Aug 10 14:01:38 2001// -/makefile/1.4/Fri Aug 10 14:01:39 2001// -/method.sgml/1.1.1.1/Fri Aug 10 14:01:39 2001// -/offline.sgml/1.1.1.1/Fri Aug 10 14:01:40 2001// -/sources.list.5/1.4/Fri Aug 10 14:01:40 2001// -/sources.list.5.yo/1.1.1.1/Fri Aug 10 14:01:41 2001// -/vendors.list.5/1.3/Fri Aug 10 14:01:41 2001// diff --git a/apt/doc/CVS/Repository b/apt/doc/CVS/Repository deleted file mode 100644 index f820167..0000000 --- a/apt/doc/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/doc diff --git a/apt/doc/CVS/Root b/apt/doc/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/doc/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/doc/apt-cache.8 b/apt/doc/apt-cache.8 deleted file mode 100644 index f14e8c0..0000000 --- a/apt/doc/apt-cache.8 +++ /dev/null @@ -1,311 +0,0 @@ -.TH "apt-cache" "8" "25 Oct 2000" "apt" "" -.SH "NAME" -apt-cache \- APT package handling utility -- cache manipulator -.PP -.SH "SYNOPSIS" -apt-cache command [argument \&.\&.\&.] -.PP -.SH "DESCRIPTION" -\fBapt-cache\fP performs a variety of operations on APT\'s package cache\&. -\fBapt-cache\fP is seldom called directly; instead its operations are -performed automatically by the other \fBapt\fP utilities\&. -.PP -\fIcommand\fP is one of: -.IP o -add file1 [file2] [\&.\&.\&.] -.IP o -gencaches -.IP o -showpkg package1 [package2] [\&.\&.\&.] -.IP o -stats -.IP o -dump -.IP o -dumpavail -.IP o -unmet -.IP o -check -.IP o -search -.IP o -show -.IP o -showpkg -.IP o -depends -.IP o -pkgnames -.IP o -dotty -.PP -Unless the -h, or --help option is given one of the above commands -must be present\&. -.PP -.IP "\fBadd\fP" -\fBadd\fP adds the names package index files to the package cache\&. -.IP -.IP "\fBgencaches\fP" -\fBgencaches\fP performs the same opration as \fBapt-get check\fP\&. It builds -the source and package caches from thes sources in \fB/etc/apt/sources\&.list\fP -and from \fB/var/lib/dpkg/status\fP (or the RPM database)\&. -.IP -.IP "\fBshowpkg\fP" -\fBshowpkg\fP displays information about the packages listed on the -command line\&. Remaining arguments are package names\&. The available versions -and reverse dependencies of each package listed are listed, as well as -forward dependencies for each version\&. Forward (normal) dependencies -are those packages upon which the package in question depends; reverse -dependencies are those packages that depend upon the package in -question\&. Thus, forward dependencies must be satisfied for a package, -but reverse dependencies need not be\&. -For instance, \fBapt-cache showpkg libreadline2\fP would produce output similar -to the following: -.IP - -.nf - - -Package: libreadline2 - -Versions: - -2\&.1-12(/var/state/apt/lists/debian\&.midco\&.net_debian_dists_slink_main_binary-i386_Packages), - -Reverse Depends: - - libreadlineg2,libreadline2 - - libreadline2-altdev,libreadline2 -Dependencies: - -2\&.1-12 - libc5 (2 5\&.4\&.0-0) ncurses3\&.0 (0 (null)) ldso (2 1\&.9\&.0-1) - -Provides: - -2\&.1-12 - - -Reverse Provides: - -.fi - - -.IP -Thus it may be seen that libreadline2, version 2\&.1-8, depends on libc5, -ncurses3\&.0, and ldso, which must be installed for libreadline2 to work\&. In -turn, libreadlineg2 and libreadline2-altdev depend on libreadline2\&. If -libreadline2 is installed, libc5, ncurses3\&.0, and ldso must also be -installed; libreadlineg2 and libreadline2-altdev do not have to be -installed\&. For the specific meaning of the remainder of the output it -is best to consult the apt source code\&. -.IP -.IP "\fBstats\fP" -\fBstats\fP displays some statistics about \fBcache\fP\&. -No further arguments are expected\&. Statistics reported are: -.IP o -\fBTotal package names\fP is the number of package names found in the cache\&. -.IP -.IP o -\fBNormal packages\fP is the number of regular, ordinary package names; these -are packages that bear a one-to-one correspondence between their names and -the names used by other packages for them in dependencies\&. The majority of -packages fall into this category\&. -.IP -.IP o -\fBPure virtual packages\fP is the number of packages that exist only as -a virtual package name; that is, packages only "provide" the virtual -package name, and no package actually uses the name\&. For instance, -"mail-transport-agent" in the Debian GNU/Linux system is a pure virtual -package; several packages provide "mail-transport-agent", but there is no -package named "mail-transport-agent"\&. -.IP -.IP o -\fBSingle virtual packages\fP is the number of packages with only one -package providing a particular virtual package\&. For example, in the -Debian GNU/Linux system, "X11-text-viewer" is a virtual package, but only -one package, xless, provides "X11-text-viewer"\&. -.IP -.IP o -\fBMixed virtual packages\fP is the number of packages that either provide -a particular virtual package or have the virtual package name as the -package name\&. For instance, in the Debian GNU/Linux system, e2fsprogs is -both an actual package, and provided by the e2compr package\&. -.IP -.IP o -\fBMissing\fP is the number of package names that were referenced in a -dependency but were not provided by any package\&. Missing packages may be -in evidence if a full distribution is not accesssed, or if a package -(real or virtual) has been dropped from the distribution\&. -.IP -.IP o -\fBTotal distinct\fP 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 (both "stable" and "unstable", -for instance), is being accessed, this value can be considerably larger -than the number of total package names\&. -.IP -.IP o -\fBTotal dependencies\fP is the number of dependency relationships claimed -by all of the packages in the cache\&. -.IP -.IP "\fBdump\fP" -\fBdump\fP shows a short listing of every package in the cache\&. It is primarily -for debugging\&. -.IP -.IP "\fBdumpavail\fP" -\fBdumpavail\fP prints out an available list to stdout\&. This is suitable for use -with \fBdpkg\fP and is used by the \fBdselect\fP method\&. -.IP -.IP "\fBunmet\fP" -\fBunmet\fP displays a summary of all unmet dependencies in the package cache\&. -.IP -.IP "\fBcheck\fP" -\fBcheck\fP is a random function for testing certain aspects of the cache\&. -Do not use it\&. -.IP -.IP "\fBshowpkg\fP" -\fBshowpkg\fP displays a listing of the given package cache structure and some -related information about it\&. The list is meant primarily for debugging\&. -.IP -.IP "\fBshow\fP" -\fBshow\fP performs a function similar to dpkg --print-avail or rpm -qi, -it displays the package records for the named packages\&. -.IP -.IP "\fBsearch\fP" -\fBsearch\fP performs a full text search on all available package files for -the pattern given\&. It searchs the package names and the descriptions for -an occurance of the string and prints out the package name and the short -description\&. If --full is given then output identical to \fBshow\fP is produced -for each matched package and if --names-only is given then the long -description is not searched, only the package name is\&. -.IP -.IP "\fBdepends\fP" -\fBdepends\fP shows a listing of each dependency a package has and all -the possible other packages that can fullfill that dependency\&. -.IP -.IP "\fBpkgnames\fP" -This command prints the name of each package in the system\&. The optional -argument is a prefix match to filter the name list\&. The output is suitable -for use in a shell tab complete function and the output is generated extremly -quickly\&. This command is best used with the \fB--no-generate\fP option\&. -.IP -.IP "\fBdotty\fP" -\fBdotty\fP Takes a list of packages on the command line and gernerates output -suitable for use by dotty from the GraphVis -(http://www\&.research\&.att\&.com/sw/tools/graphviz/) package\&. The result will be -a set of nodes and edges representing the relationships between the -packages\&. By default the given packages will trace out all dependent packages -which can produce a very large graph\&. This can be turned off by setting the -APT::Cache::GivenOnly option\&. -.IP -The resulting nodes will have several shapse, normal packages are boxes, -pure provides are triangles, mixed provides are diamonds, -hexagons are missing packages\&. Orange boxes mean recursion was stopped -[leaf packages], blue lines are prre-depends, green lines are conflicts\&. -.IP -Caution, dotty cannot graph larger sets of packages\&. -.IP -.PP -.SH "OPTIONS" -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set\&. For boolean -options you can override the config file by using something like \fB-f-\fP, -\fB--no-f\fP, \fB-f=no\fP or several other variations\&. -.PP -.IP "\fB-h, --help\fP" -Show a short usage summary\&. -.IP -.IP "\fB-v, --version\fP" -Show the program verison\&. -.IP -.IP "\fB-p --pkg-cache\fP" -Select the file to store the package cache\&. The package cache is the primary -cache used by all operations\&. -Configuration Item: \fBDir::Cache::pkgcache\fP\&. -.IP -.IP "\fB-s --src-cache\fP" -Select the file to store the source cache\&. The source is used only by -\fBgencaches\fP and it stores a parsed version of the package information from -remote sources\&. When building the package cache the source cache is used -to advoid reparsing all of the package files\&. -Configuration Item: \fBDir::Cache::srcpkgcache\fP\&. -.IP -.IP "\fB-q, --quiet\fP" -Quiet; produces output suitable for logging, omitting progress indicators\&. -More qs will produce more quite up to a maximum of 2\&. You can also use -\fB-q=#\fP to set the quiet level, overriding the configuration file\&. -Configuration Item: \fBquiet\fP\&. -.IP -.IP "\fB-i --important\fP" -Print only important deps; for use with unmet causes only \fIDepends\fP and -\fIPre-Depends\fP relations to be printed\&. -Configuration Item: \fBAPT::Cache::Important\fP\&. -.IP -.IP "\fB-f --full\fP" -Print full package records when searching\&. Configuration Item: \fBAPT::Cache::ShowFull\fP\&. -.IP -.IP "\fB-a --all-versions\fP" -Print full records for all available versions, this is only applicable to the -show command\&. Configuration Item: \fBAPT::Cache::AllVersions\fP -.IP -.IP "\fB-g --no-generate\fP" -Do not perform automatic package cache regeneration, use the cache as it is\&. -Configuration Item: \fBAPT::Cache::NoGenerate\fP\&. -.IP -.IP "\fB--names-only\fP" -Only search on the package names, not the long description\&. -Configuration Item: \fBAPT::Cache::NamesOnly\fP\&. -.IP -.IP "\fB--all-names\fP" -Make \fBpkgnames\fP print all names, including virtual packages and missing -dependencies\&. Configuration Item: \fBAPT::Cache::AllNames\fP\&. -.IP -.IP "\fB-c, --config-file\fP" -Configuration File; Specify a configuration file to use\&. \fBapt-get\fP will -read the default configuration file and then this configuration file\&. See -\fBapt\&.conf(5)\fP for syntax information\&. -.IP -.IP "\fB-o, --option\fP" -Set a Configuration Option; This will set an arbitary configuration option\&. -The syntax is - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "FILES" -.IP o -/etc/apt/sources\&.list -locations to fetch packages from -.IP -.IP o -/var/state/apt/lists/ -storage area for state information for each package resource specified in -.IP -.IP o -/var/state/apt/lists/partial/ -storage area for state information in transit -.PP -.SH "SEE ALSO" -apt-get(8), -sources\&.list(5), -apt\&.conf(5) -.PP -.SH "DIAGNOSTICS" -apt-cache returns zero on normal operation, decimal 100 on error\&. -.PP -.SH "BUGS" -See http://bugs\&.debian\&.org/apt\&. If you wish to report a -bug in \fBapt-cache\fP, please see \fB/usr/doc/debian/bug-reporting\&.txt\fP -or the \fBbug(1)\fP command\&. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt-get was written by the APT team -and ported to RPM based systems by -Alfredo K. Kojima, Conectiva S.A. \&. - diff --git a/apt/doc/apt-cache.8.sgml b/apt/doc/apt-cache.8.sgml new file mode 100644 index 0000000..ef92357 --- /dev/null +++ b/apt/doc/apt-cache.8.sgml @@ -0,0 +1,383 @@ + + +%aptent; + +]> + + + &apt-docinfo; + + + apt-cache + 8 + + + + + apt-cache + APT package handling utility -- cache manipulator + + + + + + apt-cache + + + + + add file + gencaches + showpkg pkg + showsrc pkg + stats + dump + dumpavail + unmet + search regex + show pkg + showpkg pkg + depends pkg + pkgnames prefix + dotty pkg + policy pkgs + + + + + Description</> + <para> + <command/apt-cache/ performs a variety of operations on APT's package + cache. <command/apt-cache/ does not manipulate the state of the system + but does provide operations to search and generate interesting output + from the package metadata. + + <para> + Unless the <option/-h/, or <option/--help/ option is given one of the + commands below must be present. + + <VariableList> + <VarListEntry><Term>add</Term> + <ListItem><Para> + <literal/add/ adds the named package index files to the package cache. + This is for debugging only. + </VarListEntry> + + <VarListEntry><Term>gencaches</Term> + <ListItem><Para> + <literal/gencaches/ performs the same opration as + <command/apt-get check/. It builds the source and package caches from + the sources in &sources-list; and from <filename>/var/lib/dpkg/status</>. + </VarListEntry> + + <VarListEntry><Term>showpkg</Term> + <ListItem><Para> + <literal/showpkg/ displays information about the packages listed on the + command line. Remaining arguments are package names. The available + versions and reverse dependencies of each package listed are listed, as + well as forward dependencies for each version. Forward (normal) + dependencies are those packages upon which the package in question + depends; reverse dependencies are those packages that depend upon the + package in question. Thus, forward dependencies must be satisfied for a + package, but reverse dependencies need not be. + For instance, <command>apt-cache showpkg libreadline2</> would produce + output similar to the following: + +<informalexample><programlisting> +Package: libreadline2 +Versions: 2.1-12(/var/state/apt/lists/foo_Packages), +Reverse Depends: + libreadlineg2,libreadline2 + libreadline2-altdev,libreadline2 +Dependencies: +2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null)) +Provides: +2.1-12 - +Reverse Provides: +</programlisting></informalexample> + + <para> + Thus it may be seen that libreadline2, version 2.1-12, depends on libc5 and + ncurses3.0 which must be installed for libreadline2 to work. + In turn, libreadlineg2 and libreadline2-altdev depend on libreadline2. If + libreadline2 is installed, libc5, ncurses3.0, and ldso must also be + installed; libreadlineg2 and libreadline2-altdev do not have to be + installed. For the specific meaning of the remainder of the output it + is best to consult the apt source code. + </VarListEntry> + + <VarListEntry><Term>stats</Term> + <ListItem><Para> + <literal/stats/ displays some statistics about the cache. + No further arguments are expected. Statistics reported are: + <itemizedlist> + <listitem><para> + <literal/Total package names/ is the number of package names found + in the cache. + </listitem> + + <listitem><para> + <literal/Normal packages/ is the number of regular, ordinary package + names; these are packages that bear a one-to-one correspondence between + their names and the names used by other packages for them in + dependencies. The majority of packages fall into this category. + </listitem> + + <listitem><para> + <literal/Pure virtual packages/ is the number of packages that exist + only as a virtual package name; that is, packages only "provide" the + virtual package name, and no package actually uses the name. For + instance, "mail-transport-agent" in the Debian GNU/Linux system is a + pure virtual package; several packages provide "mail-transport-agent", + but there is no package named "mail-transport-agent". + </listitem> + + <listitem><para> + <literal/Single virtual packages/ is the number of packages with only + one package providing a particular virtual package. For example, in the + Debian GNU/Linux system, "X11-text-viewer" is a virtual package, but + only one package, xless, provides "X11-text-viewer". + </listitem> + + <listitem><para> + <literal/Mixed virtual packages/ is the number of packages that either + provide a particular virtual package or have the virtual package name + as the package name. For instance, in the Debian GNU/Linux system, + debconf is both an actual package, and provided by the debconf-tiny + package. + </listitem> + + <listitem><para> + <literal/Missing/ is the number of package names that were referenced in + a dependency but were not provided by any package. Missing packages may + be in evidence if a full distribution is not accesssed, or if a package + (real or virtual) has been dropped from the distribution. Usually they + are referenced from Conflicts statements. + </listitem> + + <listitem><para> + <literal/Total distinct/ 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 (both + "stable" and "unstable", for instance), is being accessed, this value + can be considerably larger than the number of total package names. + </listitem> + + <listitem><para> + <literal/Total dependencies/ is the number of dependency relationships + claimed by all of the packages in the cache. + </listitem> + </itemizedlist> + </VarListEntry> + + <VarListEntry><Term>showsrc</Term> + <ListItem><Para> + <literal/showsrc/ displays all the source package records that match + the given package names. All versions are shown, as well as all + records that declare the name to be a Binary. + named packages. + </VarListEntry> + + <VarListEntry><Term>dump</Term> + <ListItem><Para> + <literal/dump/ shows a short listing of every package in the cache. It is + primarily for debugging. + </VarListEntry> + + <VarListEntry><Term>dumpavail</Term> + <ListItem><Para> + <literal/dumpavail/ prints out an available list to stdout. This is + suitable for use with &dpkg; and is used by the &dselect; method. + </VarListEntry> + + <VarListEntry><Term>unmet</Term> + <ListItem><Para> + <literal/unmet/ displays a summary of all unmet dependencies in the + package cache. + </VarListEntry> + + <VarListEntry><Term>show</Term> + <ListItem><Para> + <literal/show/ performs a function similar to + <command>dpkg --print-avail</>, it displays the package records for the + named packages. + </VarListEntry> + + <VarListEntry><Term>search</Term> + <ListItem><Para> + <literal/search/ performs a full text search on all available package + files for the regex pattern given. It searchs the package names and the + descriptions for an occurance of the string and prints out the package + name and the short description. If <option/--full/ is given then output + identical to <literal/show/ is produced for each matched package and + if <option/--names-only/ is given then the long description is not + searched, only the package name is. + <para> + Seperate arguments can be used to specified multiple search patterns that + are and'd together. + </VarListEntry> + + <VarListEntry><Term>depends</Term> + <ListItem><Para> + <literal/depends/ shows a listing of each dependency a package has + and all the possible other packages that can fullfill that dependency. + </VarListEntry> + + <VarListEntry><Term>pkgnames</Term> + <ListItem><Para> + This command prints the name of each package in the system. The optional + argument is a prefix match to filter the name list. The output is suitable + for use in a shell tab complete function and the output is generated + extremly quickly. This command is best used with the + <option/--generate/ option. + </VarListEntry> + + <VarListEntry><Term>dotty</Term> + <ListItem><Para> + <literal/dotty/ takes a list of packages on the command line and + gernerates output suitable for use by dotty from the + <ulink url="http://www.research.att.com/sw/tools/graphviz/">GraphViz</> + package. The result will be a set of nodes and edges representing the + relationships between the packages. By default the given packages will + trace out all dependent packages which can produce a very large graph. + This can be turned off by setting the + <literal>APT::Cache::GivenOnly</> option. + + <para> + The resulting nodes will have several shapse, normal packages are boxes, + pure provides are triangles, mixed provides are diamonds, + hexagons are missing packages. Orange boxes mean recursion was stopped + [leaf packages], blue lines are prre-depends, green lines are conflicts. + + <para> + Caution, dotty cannot graph larger sets of packages. + + <VarListEntry><Term>policy</Term> + <ListItem><Para> + <literal/policy/ is ment to help debug issues relating to the + preferences file. With no arguments it will print out the + priorities of each source. Otherwise it prints out detailed information + about the priority selection of the named package. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-p/</><term><option/--pkg-cache/</> + <ListItem><Para> + Select the file to store the package cache. The package cache is the + primary cache used by all operations. + Configuration Item: <literal/Dir::Cache::pkgcache/. + </VarListEntry> + + <VarListEntry><term><option/-s/</><term><option/--src-cache/</> + <ListItem><Para> + Select the file to store the source cache. The source is used only by + <literal/gencaches/ and it stores a parsed version of the package + information from remote sources. When building the package cache the + source cache is used to advoid reparsing all of the package files. + Configuration Item: <literal/Dir::Cache::srcpkgcache/. + </VarListEntry> + + <VarListEntry><term><option/-q/</><term><option/--quiet/</> + <ListItem><Para> + Quiet; produces output suitable for logging, omitting progress indicators. + More qs will produce more quite up to a maximum of 2. You can also use + <option/-q=#/ to set the quiet level, overriding the configuration file. + Configuration Item: <literal/quiet/. + </VarListEntry> + + <VarListEntry><term><option/-i/</><term><option/--important/</> + <ListItem><Para> + Print only important deps; for use with unmet causes only Depends and + Pre-Depends relations to be printed. + Configuration Item: <literal/APT::Cache::Important/. + </VarListEntry> + + <VarListEntry><term><option/-f/</><term><option/--full/</> + <ListItem><Para> + Print full package records when searching. + Configuration Item: <literal/APT::Cache::ShowFull/. + </VarListEntry> + + <VarListEntry><term><option/-a/</><term><option/--all-versions/</> + <ListItem><Para> + Print full records for all available versions, this is only applicable to + the show command. + Configuration Item: <literal/APT::Cache::AllVersions/. + </VarListEntry> + + <VarListEntry><term><option/-g/</><term><option/--generate/</> + <ListItem><Para> + Perform automatic package cache regeneration, rather than use the cache + as it is. This is the default, to turn it off use <option/--no-generate/. + Configuration Item: <literal/APT::Cache::Generate/. + </VarListEntry> + + <VarListEntry><term><option/--names-only/</><term><options/-n/</> + <ListItem><Para> + Only search on the package names, not the long description. + Configuration Item: <literal/APT::Cache::NamesOnly/. + </VarListEntry> + + <VarListEntry><term><option/--all-names/</> + <ListItem><Para> + Make <literal/pkgnames/ print all names, including virtual packages + and missing dependencies. + Configuration Item: <literal/APT::Cache::AllNames/. + </VarListEntry> + + <VarListEntry><term><option/--recurse/</> + <ListItem><Para> + Make <literal/depends/ recursive so that all packages mentioned are + printed once. + Configuration Item: <literal/APT::Cache::RecurseDepends/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>Files</> + <variablelist> + <VarListEntry><term><filename>/etc/apt/sources.list</></term> + <ListItem><Para> + locations to fetch packages from. + Configuration Item: <literal/Dir::Etc::SourceList/. + </VarListEntry> + + <VarListEntry><term><filename>&statedir;/lists/</></term> + <ListItem><Para> + storage area for state information for each package resource specified in + &sources-list; + Configuration Item: <literal/Dir::State::Lists/. + </VarListEntry> + + <VarListEntry><term><filename>&statedir;/lists/partial/</></term> + <ListItem><Para> + storage area for state information in transit. + Configuration Item: <literal/Dir::State::Lists/ (implicit partial). + </VarListEntry> + </variablelist> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-conf;, &sources-list;, &apt-get; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command/apt-cache/ returns zero on normal operation, decimal 100 on error. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/apt-cache.8.yo b/apt/doc/apt-cache.8.yo deleted file mode 100644 index 5ce5c48..0000000 --- a/apt/doc/apt-cache.8.yo +++ /dev/null @@ -1,280 +0,0 @@ -mailto(apt@packages.debian.org) -manpage(apt-cache)(8)(4 Dec 1998)(apt)() -manpagename(apt-cache)(APT package handling utility -- cache manipulator) - -manpagesynopsis() -apt-cache command [argument ...] - -manpagedescription() -bf(apt-cache) performs a variety of operations on APT's package cache. -bf(apt-cache) is seldom called directly; instead its operations are -performed automatically by the other bf(apt) utilities. - -em(command) is one of: -itemize( - it() add file1 [file2] [...] - it() gencaches - it() showpkg package1 [package2] [...] - it() stats - it() dump - it() dumpavail - it() unmet - it() check - it() search - it() show - it() showpkg - it() depends - it() pkgnames - it() dotty -) - -Unless the -h, or --help option is given one of the above commands -must be present. - -startdit() -dit(bf(add)) -bf(add) adds the names package index files to the package cache. - -dit(bf(gencaches)) -bf(gencaches) performs the same opration as bf(apt-get check). It builds -the source and package caches from thes sources in bf(/etc/apt/sources.list) -and from bf(/var/lib/dpkg/status). - -dit(bf(showpkg)) -bf(showpkg) displays information about the packages listed on the -command line. Remaining arguments are package names. The available versions -and reverse dependencies of each package listed are listed, as well as -forward dependencies for each version. Forward (normal) dependencies -are those packages upon which the package in question depends; reverse -dependencies are those packages that depend upon the package in -question. Thus, forward dependencies must be satisfied for a package, -but reverse dependencies need not be. -For instance, bf(apt-cache showpkg libreadline2) would produce output similar -to the following: - -verb( -Package: libreadline2 - -Versions: - -2.1-12(/var/state/apt/lists/debian.midco.net_debian_dists_slink_main_binary-i386_Packages), - -Reverse Depends: - - libreadlineg2,libreadline2 - - libreadline2-altdev,libreadline2 -Dependencies: - -2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null)) ldso (2 1.9.0-1) - -Provides: - -2.1-12 - - -Reverse Provides: -) - -Thus it may be seen that libreadline2, version 2.1-8, depends on libc5, -ncurses3.0, and ldso, which must be installed for libreadline2 to work. In -turn, libreadlineg2 and libreadline2-altdev depend on libreadline2. If -libreadline2 is installed, libc5, ncurses3.0, and ldso must also be -installed; libreadlineg2 and libreadline2-altdev do not have to be -installed. For the specific meaning of the remainder of the output it -is best to consult the apt source code. - -dit(bf(stats)) -bf(stats) displays some statistics about bf(cache). -No further arguments are expected. Statistics reported are: -itemize( - it() bf(Total package names) is the number of package names found in the cache. - - it() bf(Normal packages) is the number of regular, ordinary package names; these - are packages that bear a one-to-one correspondence between their names and - the names used by other packages for them in dependencies. The majority of - packages fall into this category. - - it() bf(Pure virtual packages) is the number of packages that exist only as - a virtual package name; that is, packages only "provide" the virtual - package name, and no package actually uses the name. For instance, - "mail-transport-agent" in the Debian GNU/Linux system is a pure virtual - package; several packages provide "mail-transport-agent", but there is no - package named "mail-transport-agent". - - it() bf(Single virtual packages) is the number of packages with only one - package providing a particular virtual package. For example, in the - Debian GNU/Linux system, "X11-text-viewer" is a virtual package, but only - one package, xless, provides "X11-text-viewer". - - it() bf(Mixed virtual packages) is the number of packages that either provide - a particular virtual package or have the virtual package name as the - package name. For instance, in the Debian GNU/Linux system, e2fsprogs is - both an actual package, and provided by the e2compr package. - - it() bf(Missing) is the number of package names that were referenced in a - dependency but were not provided by any package. Missing packages may be - in evidence if a full distribution is not accesssed, or if a package - (real or virtual) has been dropped from the distribution. - - it() bf(Total distinct) 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 (both "stable" and "unstable", - for instance), is being accessed, this value can be considerably larger - than the number of total package names. - - it() bf(Total dependencies) is the number of dependency relationships claimed - by all of the packages in the cache. -) - -dit(bf(dump)) -bf(dump) shows a short listing of every package in the cache. It is primarily -for debugging. - -dit(bf(dumpavail)) -bf(dumpavail) prints out an available list to stdout. This is suitable for use -with bf(dpkg) and is used by the bf(dselect) method. - -dit(bf(unmet)) -bf(unmet) displays a summary of all unmet dependencies in the package cache. - -dit(bf(check)) -bf(check) is a random function for testing certain aspects of the cache. -Do not use it. - -dit(bf(showpkg)) -bf(showpkg) displays a listing of the given package cache structure and some -related information about it. The list is meant primarily for debugging. - -dit(bf(show)) -bf(show) performs a function similar to dpkg --print-avail, it displays -the package records for the named packages. - -dit(bf(search)) -bf(search) performs a full text search on all available package files for -the pattern given. It searchs the package names and the descriptions for -an occurance of the string and prints out the package name and the short -description. If --full is given then output identical to bf(show) is produced -for each matched package and if --names-only is given then the long -description is not searched, only the package name is. - -dit(bf(depends)) -bf(depends) shows a listing of each dependency a package has and all -the possible other packages that can fullfill that dependency. - -dit(bf(pkgnames)) -This command prints the name of each package in the system. The optional -argument is a prefix match to filter the name list. The output is suitable -for use in a shell tab complete function and the output is generated extremly -quickly. This command is best used with the bf(--no-generate) option. - -dit(bf(dotty)) -bf(dotty) Takes a list of packages on the command line and gernerates output -suitable for use by dotty from the GraphVis -(http://www.research.att.com/sw/tools/graphviz/) package. The result will be -a set of nodes and edges representing the relationships between the -packages. By default the given packages will trace out all dependent packages -which can produce a very large graph. This can be turned off by setting the -APT::Cache::GivenOnly option. - -The resulting nodes will have several shapse, normal packages are boxes, -pure provides are triangles, mixed provides are diamonds, -hexagons are missing packages. Orange boxes mean recursion was stopped -[leaf packages], blue lines are prre-depends, green lines are conflicts. - -Caution, dotty cannot graph larger sets of packages. - -enddit() - -manpageoptions() -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set. For boolean -options you can override the config file by using something like bf(-f-), -bf(--no-f), bf(-f=no) or several other variations. - -startdit() -dit(bf(-h, --help)) -Show a short usage summary. - -dit(bf(-v, --version)) -Show the program verison. - -dit(bf(-p --pkg-cache)) -Select the file to store the package cache. The package cache is the primary -cache used by all operations. -Configuration Item: bf(Dir::Cache::pkgcache). - -dit(bf(-s --src-cache)) -Select the file to store the source cache. The source is used only by -bf(gencaches) and it stores a parsed version of the package information from -remote sources. When building the package cache the source cache is used -to advoid reparsing all of the package files. -Configuration Item: bf(Dir::Cache::srcpkgcache). - -dit(bf(-q, --quiet)) -Quiet; produces output suitable for logging, omitting progress indicators. -More qs will produce more quite up to a maximum of 2. You can also use -bf(-q=#) to set the quiet level, overriding the configuration file. -Configuration Item: bf(quiet). - -dit(bf(-i --important)) -Print only important deps; for use with unmet causes only em(Depends) and -em(Pre-Depends) relations to be printed. -Configuration Item: bf(APT::Cache::Important). - -dit(bf(-f --full)) -Print full package records when searching. Configuration Item: bf(APT::Cache::ShowFull). - -dit(bf(-a --all-versions)) -Print full records for all available versions, this is only applicable to the -show command. Configuration Item: bf(APT::Cache::AllVersions) - -dit(bf(-g --no-generate)) -Do not perform automatic package cache regeneration, use the cache as it is. -Configuration Item: bf(APT::Cache::NoGenerate). - -dit(bf(--names-only)) -Only search on the package names, not the long description. -Configuration Item: bf(APT::Cache::NamesOnly). - -dit(bf(--all-names)) -Make bf(pkgnames) print all names, including virtual packages and missing -dependencies. Configuration Item: bf(APT::Cache::AllNames). - -dit(bf(-c, --config-file)) -Configuration File; Specify a configuration file to use. bf(apt-get) will -read the default configuration file and then this configuration file. See -bf(apt.conf(5)) for syntax information. - -dit(bf(-o, --option)) -Set a Configuration Option; This will set an arbitary configuration option. -The syntax is -verb(-o Foo::Bar=bar) -enddit() - -manpagefiles() -itemize( - it() /etc/apt/sources.list - locations to fetch packages from - - it() /var/state/apt/lists/ - storage area for state information for each package resource specified in - - it() /var/state/apt/lists/partial/ - storage area for state information in transit -) - -manpageseealso() -apt-get(8), -sources.list(5), -apt.conf(5) - -manpagediagnostics() -apt-cache returns zero on normal operation, decimal 100 on error. - -manpagebugs() -See http://bugs.debian.org/apt. If you wish to report a -bug in bf(apt-cache), please see bf(/usr/doc/debian/bug-reporting.txt) -or the bf(bug(1)) command. - -manpageauthor() -apt-get was written by the APT team <apt@packages.debian.org>. diff --git a/apt/doc/apt-cdrom.8 b/apt/doc/apt-cdrom.8 deleted file mode 100644 index c4abeba..0000000 --- a/apt/doc/apt-cdrom.8 +++ /dev/null @@ -1,127 +0,0 @@ -.TH "apt-cdrom" "8" "25 Oct 2000" "apt" "" -.SH "NAME" -apt-cdrom \- APT CDROM managment utility -.PP -.SH "SYNOPSIS" -apt-cdrom command -.PP -.SH "DESCRIPTION" -\fBapt-cdrom\fP is used to add a new CDROM to APTs list of available sources\&. -\fBapt-cdrom\fP takes care of determining the structure of the disc as well -as correcting for several possible mis-burns and verifying the index files\&. -It is necessary to use \fBapt-cdrom\fP to add CDs to the APT system, it cannot -be done by hand\&. Furthermore each disk in a multi-cd set must be inserted -and scanned seperately to account for possible mis-burns\&. -.PP -\fIcommand\fP is one of: -.IP o -add -.PP -Unless the -h, or --help option is given one of the above commands -must be present\&. -.PP -.IP "\fBadd\fP" -\fBadd\fP is used to add a new disc to the source list\&. It will unmount the -CDROM device, prompt for a disk to be inserted and then procceed to scan it -and copy the index files\&. If the disc does not have a proper \fB\&.disk/\fP -directory you will be prompted for a descriptive title\&. -.IP -APT uses a CDROM ID to track which disc is currently in the drive and -maintains a database of these IDs in \fB/var/state/apt/cdroms\&.list\fP -.IP -.PP -.SH "OPTIONS" -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set\&. For boolean -options you can override the config file by using something like \fB-f-\fP, -\fB--no-f\fP, \fB-f=no\fP or several other variations\&. -.PP -.IP "\fB-h, --help\fP" -Show a short usage summary\&. -.IP -.IP "\fB-v, --version\fP" -Show the program verison\&. -.IP -.IP "\fB-d --cdrom\fP" -Mount point; specify the location to mount the cdrom\&. This mount point must -be listed in \fB/etc/fstab\fP and propely configured\&. -Configuration Item: \fBAcquire::cdrom::mount\fP\&. -.IP -.IP "\fB-r --rename\fP" -Rename a disc; change the label of a disk or override the disks given label\&. -This option will cause \fBapt-cdrom\fP to prompt for a new label -Configuration Item: \fBAPT::CDROM::Rename\fP\&. -.IP -.IP "\fB-m, --no-mount\fP" -No mounting; prevent \fBapt-cdrom\fP from mounting and unmounting the mount -point\&. -Configuration Item: \fBAPT::CDROM::NoMount\fP\&. -.IP -.IP "\fB-f, --fast\fP" -Fast Copy; Assume the package files are valid and do not check every package\&. -This option should be used only if \fBapt-cdrom\fP has been run on this disc -before and did not detect any errors\&. -Configuration Item: \fBAPT::CDROM::Fast\fP\&. -.IP -.IP "\fB-a, --thorough\fP" -Thorough Package Scan; This option may be needed with some old Debian 1\&.1/1\&.2 -burns that have Package files in strange places\&. It takes much longer to -scan the CD but will pick them all up\&. -.IP -.IP "\fB-n --just-print, --recon, --no-act\fP" -No Changes; Do not change the sources\&.list and do not write package files\&. -Everything is still checked however\&. -Configuration Item: \fBAPT::CDROM::NoAct\fP\&. -.IP -.IP "\fB-c, --config-file\fP" -Configuration File; Specify a configuration file to use\&. \fBapt-get\fP will -read the default configuration file and then this configuration file\&. See -\fBapt\&.conf(5)\fP for syntax information\&. -.IP -.IP "\fB-o, --option\fP" -Set a Configuration Option; This will set an arbitary configuration option\&. -The syntax is - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "FILES" -.IP o -/etc/apt/sources\&.list -locations to fetch packages from -.IP -.IP o -/var/state/apt/lists/ -storage area for state information for each package resource specified in -.IP -.IP o -/var/state/apt/lists/partial/ -storage area for state information in transit -.IP -.IP o -/var/state/apt/cdroms\&.list -list of cdrom IDs and names\&. -.PP -.SH "SEE ALSO" -apt-get(8), -sources\&.list(5), -apt\&.conf(5) -.PP -.SH "DIAGNOSTICS" -apt-cdrom returns zero on normal operation, decimal 100 on error\&. -.PP -.SH "BUGS" -See http://bugs\&.debian\&.org/apt\&. If you wish to report a -bug in \fBapt-cache\fP, please see \fB/usr/doc/debian/bug-reporting\&.txt\fP -or the \fBbug(1)\fP command\&. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt-get was written by the APT team <apt@packages\&.debian\&.org> -and ported to RPM based systems by Conectiva S.A. -<kojima@conectiva\&.com\&.br>\&. - diff --git a/apt/doc/apt-cdrom.8.sgml b/apt/doc/apt-cdrom.8.sgml new file mode 100644 index 0000000..ce8e4aa --- /dev/null +++ b/apt/doc/apt-cdrom.8.sgml @@ -0,0 +1,147 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-cdrom</> + <manvolnum>8</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-cdrom</> + <refpurpose>APT CDROM managment utility</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-cdrom</> + <arg><option>-hvrmfan</></arg> + <arg><option>-d=<replaceable/cdrom mount point/</></arg> + <arg><option>-o=<replaceable/config string/</></arg> + <arg><option>-c=<replaceable/file/</></arg> + <group choice=req> + <arg>add</> + <arg>ident</> + </group> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> + <command/apt-cdrom/ is used to add a new CDROM to APTs list of available + sources. <command/apt-cdrom/ takes care of determining the structure of + the disc as well as correcting for several possible mis-burns and + verifying the index files. + <para> + It is necessary to use <command/apt-cdrom/ to add CDs to the APT system, + it cannot be done by hand. Furthermore each disk in a multi-cd set must be + inserted and scanned separately to account for possible mis-burns. + + <para> + Unless the <option/-h/, or <option/--help/ option is given one of the + commands below must be present. + + <VariableList> + <VarListEntry><Term>add</Term> + <ListItem><Para> + <literal/add/ is used to add a new disc to the source list. It will unmount the + CDROM device, prompt for a disk to be inserted and then procceed to + scan it and copy the index files. If the disc does not have a proper + <filename>.disk/</> directory you will be prompted for a descriptive + title. + + <para> + APT uses a CDROM ID to track which disc is currently in the drive and + maintains a database of these IDs in + <filename>&statedir;/cdroms.list</> + </VarListEntry> + + <VarListEntry><Term>ident</Term> + <ListItem><Para> + A debugging tool to report the identity of the current disc as well + as the stored file name + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-d/</><term><option/--cdrom/</> + <ListItem><Para> + Mount point; specify the location to mount the cdrom. This mount + point must be listed in <filename>/etc/fstab</> and propely configured. + Configuration Item: <literal/Acquire::cdrom::mount/. + </VarListEntry> + + <VarListEntry><term><option/-r/</><term><option/--rename/</> + <ListItem><Para> + Rename a disc; change the label of a disk or override the disks + given label. This option will cause <command/apt-cdrom/ to prompt for + a new label. + Configuration Item: <literal/APT::CDROM::Rename/. + </VarListEntry> + + <VarListEntry><term><option/-m/</><term><option/--no-mount/</> + <ListItem><Para> + No mounting; prevent <command/apt-cdrom/ from mounting and unmounting + the mount point. + Configuration Item: <literal/APT::CDROM::NoMount/. + </VarListEntry> + + <VarListEntry><term><option/-f/</><term><option/--fast/</> + <ListItem><Para> + Fast Copy; Assume the package files are valid and do not check + every package. This option should be used only if + <command/apt-cdrom/ has been run on this disc before and did not detect + any errors. + Configuration Item: <literal/APT::CDROM::Fast/. + </VarListEntry> + + <VarListEntry><term><option/-a/</><term><option/--thorough/</> + <ListItem><Para> + Thorough Package Scan; This option may be needed with some old + Debian 1.1/1.2 discs that have Package files in strange places. It + takes much longer to scan the CD but will pick them all up. + </VarListEntry> + + <VarListEntry><term><option/-n/</> + <term><option/--just-print/</> + <term><option/--recon/</> + <term><option/--no-act/</> + <ListItem><Para> + No Changes; Do not change the &sources-list; file and do not + write index files. Everything is still checked however. + Configuration Item: <literal/APT::CDROM::NoAct/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-conf;, &apt-get;, &sources-list; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command/apt-cdrom/ returns zero on normal operation, decimal 100 on error. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> + diff --git a/apt/doc/apt-cdrom.8.yo b/apt/doc/apt-cdrom.8.yo deleted file mode 100644 index 9d5b598..0000000 --- a/apt/doc/apt-cdrom.8.yo +++ /dev/null @@ -1,120 +0,0 @@ -mailto(apt@packages.debian.org) -manpage(apt-cdrom)(8)(4 Dec 1998)(apt)() -manpagename(apt-cdrom)(APT CDROM managment utility) - -manpagesynopsis() -apt-cdrom command - -manpagedescription() -bf(apt-cdrom) is used to add a new CDROM to APTs list of available sources. -bf(apt-cdrom) takes care of determining the structure of the disc as well -as correcting for several possible mis-burns and verifying the index files. -It is necessary to use bf(apt-cdrom) to add CDs to the APT system, it cannot -be done by hand. Furthermore each disk in a multi-cd set must be inserted -and scanned seperately to account for possible mis-burns. - -em(command) is one of: -itemize( - it() add -) - -Unless the -h, or --help option is given one of the above commands -must be present. - -startdit() -dit(bf(add)) -bf(add) is used to add a new disc to the source list. It will unmount the -CDROM device, prompt for a disk to be inserted and then procceed to scan it -and copy the index files. If the disc does not have a proper bf(.disk/) -directory you will be prompted for a descriptive title. - -APT uses a CDROM ID to track which disc is currently in the drive and -maintains a database of these IDs in bf(/var/state/apt/cdroms.list) - -enddit() - -manpageoptions() -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set. For boolean -options you can override the config file by using something like bf(-f-), -bf(--no-f), bf(-f=no) or several other variations. - -startdit() -dit(bf(-h, --help)) -Show a short usage summary. - -dit(bf(-v, --version)) -Show the program verison. - -dit(bf(-d --cdrom)) -Mount point; specify the location to mount the cdrom. This mount point must -be listed in bf(/etc/fstab) and propely configured. -Configuration Item: bf(Acquire::cdrom::mount). - -dit(bf(-r --rename)) -Rename a disc; change the label of a disk or override the disks given label. -This option will cause bf(apt-cdrom) to prompt for a new label -Configuration Item: bf(APT::CDROM::Rename). - -dit(bf(-m, --no-mount)) -No mounting; prevent bf(apt-cdrom) from mounting and unmounting the mount -point. -Configuration Item: bf(APT::CDROM::NoMount). - -dit(bf(-f, --fast)) -Fast Copy; Assume the package files are valid and do not check every package. -This option should be used only if bf(apt-cdrom) has been run on this disc -before and did not detect any errors. -Configuration Item: bf(APT::CDROM::Fast). - -dit(bf(-a, --thorough)) -Thorough Package Scan; This option may be needed with some old Debian 1.1/1.2 -burns that have Package files in strange places. It takes much longer to -scan the CD but will pick them all up. - -dit(bf(-n --just-print, --recon, --no-act)) -No Changes; Do not change the sources.list and do not write package files. -Everything is still checked however. -Configuration Item: bf(APT::CDROM::NoAct). - -dit(bf(-c, --config-file)) -Configuration File; Specify a configuration file to use. bf(apt-get) will -read the default configuration file and then this configuration file. See -bf(apt.conf(5)) for syntax information. - -dit(bf(-o, --option)) -Set a Configuration Option; This will set an arbitary configuration option. -The syntax is -verb(-o Foo::Bar=bar) -enddit() - -manpagefiles() -itemize( - it() /etc/apt/sources.list - locations to fetch packages from - - it() /var/state/apt/lists/ - storage area for state information for each package resource specified in - - it() /var/state/apt/lists/partial/ - storage area for state information in transit - - it() /var/state/apt/cdroms.list - list of cdrom IDs and names. -) - -manpageseealso() -apt-get(8), -sources.list(5), -apt.conf(5) - -manpagediagnostics() -apt-cdrom returns zero on normal operation, decimal 100 on error. - -manpagebugs() -See http://bugs.debian.org/apt. If you wish to report a -bug in bf(apt-cache), please see bf(/usr/doc/debian/bug-reporting.txt) -or the bf(bug(1)) command. - -manpageauthor() -apt-get was written by the APT team <apt@packages.debian.org>. diff --git a/apt/doc/apt-config.8 b/apt/doc/apt-config.8 deleted file mode 100644 index 33542f5..0000000 --- a/apt/doc/apt-config.8 +++ /dev/null @@ -1,97 +0,0 @@ -.TH "apt-config" "8" "25 Oct 2000" "apt" "" -.SH "NAME" -apt-config \- APT Configuration Query program -.PP -.SH "SYNOPSIS" -apt-config command -.PP -.SH "DESCRIPTION" -\fBapt-config\fP is an internal program used by various portions of the APT -suite to provide consistent configurability\&. It accesses the main configuarion -file /etc/apt/apt\&.conf in a manner that is easy to use by scripted -applications\&. -.PP -\fIcommand\fP is one of: -.IP o -shell -.IP o -dump -.PP -Unless the -h, or --help option is given one of the above commands -must be present\&. -.PP -.IP "\fBshell\fP" -\fBshell\fP is used to access the configuration information from a shell script\&. -It is given pairs of arguments, the first being a shell variable and the -second the configuration value to query\&. As output it lists a series of shell -assignments commands for each present value\&. In a shell script it should be -used like: -.IP - -.nf - - -OPTS="-f" - -RES=`apt-config shell OPTS MyApp::Options` - -eval $RES - -.fi - - -.IP -This will set the shell environment variable $OPTS to the value of -MyApp::Options with a default of -f\&. -.IP -If the configuration item to retrieve is prefixed with a / then it will -be retrieved using filename mode which prepends base paths\&. -.IP -.IP "\fBdump\fP" -Just show the contents of the configuration space\&. -.IP -.PP -.SH "OPTIONS" -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set\&. For boolean -options you can override the config file by using something like \fB-f-\fP, -\fB--no-f\fP, \fB-f=no\fP or several other variations\&. -.PP -.IP "\fB-h, --help\fP" -Show a short usage summary\&. -.IP -.IP "\fB-v, --version\fP" -Show the program verison\&. -.IP -.IP "\fB-c, --config-file\fP" -Configuration File; Specify a configuration file to use\&. \fBapt-get\fP will -read the default configuration file and then this configuration file\&. See -\fBapt\&.conf(5)\fP for syntax information\&. -.IP -.IP "\fB-o, --option\fP" -Set a Configuration Option; This will set an arbitary configuration option\&. -The syntax is - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "SEE ALSO" -apt\&.conf(5) -.PP -.SH "DIAGNOSTICS" -apt-config returns zero on normal operation, decimal 100 on error\&. -.PP -.SH "BUGS" -See http://bugs\&.debian\&.org/apt\&. If you wish to report a -bug in \fBapt-config\fP, please see \fB/usr/doc/debian/bug-reporting\&.txt\fP -or the \fBbug(1)\fP command\&. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt-get was written by the APT team <apt@packages\&.debian\&.org> -and ported to RPM based systems by Conectiva S.A. -<kojima@conectiva\&.com\&.br>\&. diff --git a/apt/doc/apt-config.8.sgml b/apt/doc/apt-config.8.sgml new file mode 100644 index 0000000..9ed16b1 --- /dev/null +++ b/apt/doc/apt-config.8.sgml @@ -0,0 +1,105 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-config</> + <manvolnum>8</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-config</> + <refpurpose>APT Configuration Query program</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-config</> + <arg><option>-hv</></arg> + <arg><option>-o=<replaceable/config string/</></arg> + <arg><option>-c=<replaceable/file/</></arg> + <group choice=req> + <arg>shell</> + <arg>dump</> + </group> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> + <command/apt-config/ is an internal program used by various portions of + the APT suite to provide consistent configurability. It accesses the main + configuration file <filename>/etc/apt/apt.conf</> in a manner that is + easy to use by scripted applications. + <para> + Unless the <option/-h/, or <option/--help/ option is given one of the + commands below must be present. + </para> + + <VariableList> + <VarListEntry><Term>shell</Term> + <ListItem><Para> + shell is used to access the configuration information from a shell + script. It is given pairs of arguments, the first being a shell + variable and the second the configuration value to query. As output + it lists a series of shell assignments commands for each present value. + In a shell script it should be used like: + </para> + +<informalexample><programlisting> +OPTS="-f" +RES=`apt-config shell OPTS MyApp::Options` +eval $RES +</programlisting></informalexample> + + <para> + This will set the shell environment variable $OPTS to the value of + MyApp::Options with a default of <option/-f/. + + <para> + The configuration item may be postfixed with a /[fdbi]. f returns file + names, d returns directories, b returns true or false and i returns an + integer. Each of the returns is normalized and verified internally. + </VarListEntry> + + <VarListEntry><Term>dump</Term> + <ListItem><Para> + Just show the contents of the configuration space. + </VarListEntry> + + </VariableList> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command/apt-config/ returns zero on normal operation, decimal 100 on error. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/apt-config.8.yo b/apt/doc/apt-config.8.yo deleted file mode 100644 index 809c790..0000000 --- a/apt/doc/apt-config.8.yo +++ /dev/null @@ -1,86 +0,0 @@ -mailto(apt@packages.debian.org) -manpage(apt-config)(8)(14 Feb 1999)(apt)() -manpagename(apt-config)(APT Configuration Query program) - -manpagesynopsis() -apt-config command - -manpagedescription() -bf(apt-config) is an internal program used by various portions of the APT -suite to provide consistent configurability. It accesses the main configuarion -file /etc/apt/apt.conf in a manner that is easy to use by scripted -applications. - -em(command) is one of: -itemize( - it() shell - it() dump -) - -Unless the -h, or --help option is given one of the above commands -must be present. - -startdit() -dit(bf(shell)) -bf(shell) is used to access the configuration information from a shell script. -It is given pairs of arguments, the first being a shell variable and the -second the configuration value to query. As output it lists a series of shell -assignments commands for each present value. In a shell script it should be -used like: - -verb( -OPTS="-f" - -RES=`apt-config shell OPTS MyApp::Options` - -eval $RES -) - -This will set the shell environment variable $OPTS to the value of -MyApp::Options with a default of -f. - -If the configuration item to retrieve is prefixed with a / then it will -be retrieved using filename mode which prepends base paths. - -dit(bf(dump)) -Just show the contents of the configuration space. - -enddit() - -manpageoptions() -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set. For boolean -options you can override the config file by using something like bf(-f-), -bf(--no-f), bf(-f=no) or several other variations. - -startdit() -dit(bf(-h, --help)) -Show a short usage summary. - -dit(bf(-v, --version)) -Show the program verison. - -dit(bf(-c, --config-file)) -Configuration File; Specify a configuration file to use. bf(apt-get) will -read the default configuration file and then this configuration file. See -bf(apt.conf(5)) for syntax information. - -dit(bf(-o, --option)) -Set a Configuration Option; This will set an arbitary configuration option. -The syntax is -verb(-o Foo::Bar=bar) -enddit() - -manpageseealso() -apt.conf(5) - -manpagediagnostics() -apt-config returns zero on normal operation, decimal 100 on error. - -manpagebugs() -See http://bugs.debian.org/apt. If you wish to report a -bug in bf(apt-config), please see bf(/usr/doc/debian/bug-reporting.txt) -or the bf(bug(1)) command. - -manpageauthor() -apt-get was written by the APT team <apt@packages.debian.org>. diff --git a/apt/doc/apt-extracttemplates.1.sgml b/apt/doc/apt-extracttemplates.1.sgml new file mode 100644 index 0000000..df2bd0b --- /dev/null +++ b/apt/doc/apt-extracttemplates.1.sgml @@ -0,0 +1,80 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-extracttemplates</> + <manvolnum>1</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-extracttemplates</> + <refpurpose>Utility to extract DebConf config and templates from Debian packages</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-extracttemplate</> + <arg><option>-hv</></arg> + <arg><option>-t=<replaceable/temporary directory/</></arg> + <arg choice="plain" rep="repeat"><replaceable>file</replaceable></arg> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> + <command/apt-extracttemplates/ will take one or more Debian package files + as input and write out (to a temporary directory) all associated config + scripts and template files. For each passed in package that contains + config scripts and templates, one line of output will be generated + in the format: + <para> + package version template-file config-script + <para> + template-file and config-script are written to the temporary directory + specified by the -t or --tempdir (<literal/APT::ExtractTemplates::TempDir/>) + directory, with filenames of the form <filename>package.template.XXXX</> and + <filename>package.config.XXXX</> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-t/</><term><option/--tempdir/</> + <ListItem><Para> + Temporary directory in which to write extracted debconf template files + and config scripts + Configuration Item: <literal/APT::ExtractTemplates::TempDir/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + + + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command/apt-extracttemplates/ returns zero on normal operation, decimal 100 on error. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/apt-ftparchive.1.sgml b/apt/doc/apt-ftparchive.1.sgml new file mode 100644 index 0000000..7279a1b --- /dev/null +++ b/apt/doc/apt-ftparchive.1.sgml @@ -0,0 +1,534 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-ftparchive</> + <manvolnum>1</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-ftparchive</> + <refpurpose>Utility to generate index files</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-ftparchive</> + <arg><option>-hvdsq</></arg> + <arg><option>--md5</></arg> + <arg><option>--delink</></arg> + <arg><option>--readonly</></arg> + <arg><option>--contents</></arg> + <arg><option>-o=<replaceable/config string/</></arg> + <arg><option>-c=<replaceable/file/</></arg> + <group choice=req> + <arg>packages<arg choice="plain" rep="repeat"><replaceable>path</replaceable></arg><arg><replaceable>override</replaceable><arg><replaceable>pathprefix</replaceable></arg></arg></arg> + <arg>sources<arg choice="plain" rep="repeat"><replaceable>path</replaceable></arg><arg><replaceable>override</replaceable><arg><replaceable>pathprefix</replaceable></arg></arg></arg> + <arg>contents <arg choice="plain"><replaceable>path</replaceable></arg></arg> + <arg>generate <arg choice="plain"><replaceable>config-file</replaceable></arg> <arg choice="plain" rep="repeat"><replaceable>section</replaceable></arg></arg> + <arg>clean <arg choice="plain"><replaceable>config-file</replaceable></arg></arg> + </group> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> + <command/apt-ftparchive/ is the command line tool that generates the index + files that APT uses to access a distribution source. The index files should + be generated on the origin site based on the content of that site. + + <para> + <command/apt-ftparchive/ is a superset of the &dpkg-scanpackages; program, + incorporating it's entire functionality via the <literal/directory/ command. + It also contains a contents file generator, <literal/contents/, and an + elaborate means to 'script' the generation process for a complete + archive. + + <para> + Internally <command/apt-ftparchive/ can make use of binary databases to + cache the contents of a .deb file and it does not rely on any external + programs aside from &gzip;. When doing a full generate it automatically + performs file-change checks and builds the desired compressed output files. + + <para> + Unless the <option/-h/, or <option/--help/ option is given one of the + commands below must be present. + + <VariableList> + <VarListEntry><term>packages</term> + <ListItem><Para> + The packages command generates a package file from a directory tree. It + takes the given directory and recursively searches it for .deb files, + emitting a package record to stdout for each. This command is + approximately equivalent to &dpkg-scanpackages;. + <para> + The option <option/--db/ can be used to specify a binary caching DB. + </VarListEntry> + + <VarListEntry><term>sources</term> + <ListItem><Para> + The <literal/sources/ command generates a source index file from a directory tree. + It takes the given directory and recursively searches it for .dsc files, + emitting a source record to stdout for each. This command is approximately + equivalent to &dpkg-scansources;. + <para> + If an override file is specified then a source override file will be + looked for with an extension of .src. The --source-override option can be + used to change the source override file that will be used. + </VarListEntry> + + <VarListEntry><term>contents</term> + <ListItem><Para> + The <literal/contents/ command generates a contents file from a directory tree. It + takes the given directory and recursively searches it for .deb files, + and reads the file list from each file. It then sorts and writes to stdout + the list of files matched to packages. Directories are not written to + the output. If multiple packages own the same file then each package is + separated by a comma in the output. + <para> + The option <option/--db/ can be used to specify a binary caching DB. + </VarListEntry> + + <VarListEntry><term>generate</term> + <ListItem><Para> + The <literal/generate/ command is designed to be runnable from a cron script and + builds indexes according to the given config file. The config language + provides a flexible means of specifying which index files are built from + which directories, as well as providing a simple means of maintaining the + required settings. + </VarListEntry> + + <VarListEntry><term>clean</term> + <ListItem><Para> + The <literal/clean/ command tidies the databases used by the given + configuration file by removing any records that are no longer necessary. + </VarListEntry> + </VariableList> + + </RefSect1> + + <RefSect1><Title>The Generate Configuration</> + <para> + The <literal/generate/ command uses a configuration file to describe the + archives that are going to be generated. It follows the typical ISC + configuration format as seen in ISC tools like bind 8 and dhcpd. + &apt-conf; contains a description of the syntax. Note that the generate + configuration is parsed in sectional manner, but &apt-conf; is parsed in a + tree manner. This only effects how the scope tag is handled. + + <para> + The generate configuration has 4 separate sections, each decribed below. + + <refsect2><title>Dir Section</> + <Para> + The <literal/Dir/ section defines the standard directories needed to + locate the files required during the generation process. These + directories are prepended to certain relative paths defined in later + sections to produce a complete an absolute path. + <VariableList> + <VarListEntry><term>ArchiveDir</term> + <ListItem><Para> + Specifies the root of the FTP archive, in a standard + Debian configuration this is the directory that contains the + <filename/ls-LR/, and dist nodes. + </VarListEntry> + + <VarListEntry><term>OverrideDir</term> + <ListItem><Para> + Specifies the location of the override files. + </VarListEntry> + + <VarListEntry><term>CacheDir</term> + <ListItem><Para> + Specifies the location of the cache files + </VarListEntry> + + <VarListEntry><term>FileListDir</term> + <ListItem><Para> + Specifies the location of the file list files, + if the <literal/FileList/ setting is used below. + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>Default Section</> + <para> + The <literal/Default/ section specifies default values, and settings + that control the operation of the generator. Other sections may override + these defaults with a per-section setting. + <VariableList> + <VarListEntry><term>Packages::Compress</term> + <ListItem><Para> + Sets the default compression schemes to use + for the Package index files. It is a string that contains a space + separated list of at least one of: '.' (no compression), 'gzip' and + 'bzip2'. The default for all compression schemes is '. gzip'. + </VarListEntry> + + <VarListEntry><term>Packages::Extensions</term> + <ListItem><Para> + Sets the default list of file extensions that are package files. + This defaults to '.deb'. + </VarListEntry> + + <VarListEntry><term>Sources::Compress</term> + <ListItem><Para> + This is similar to <literal/Packages::Compress/ + except that it controls the compression for the Sources files. + </VarListEntry> + + <VarListEntry><term>Sources::Extensions</term> + <ListItem><Para> + Sets the default list of file extensions that are source files. + This defaults to '.dsc'. + </VarListEntry> + + <VarListEntry><term>Contents::Compress</term> + <ListItem><Para> + This is similar to <literal/Packages::Compress/ + except that it controls the compression for the Contents files. + </VarListEntry> + + <VarListEntry><term>DeLinkLimit</term> + <ListItem><Para> + Specifies the number of kilobytes to delink (and + replace with hard links) per run. This is used in conjunction with the + per-section <literal/External-Links/ setting. + </VarListEntry> + + <VarListEntry><term>FileMode</term> + <ListItem><Para> + Specifies the mode of all created index files. It + defaults to 0644. All index files are set to this mode with no regard + to the umask. + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>TreeDefault Section</> + <para> + Sets defaults specific to <literal/Tree/ sections. All of these + variables are substitution variables and have the strings $(DIST), + $(SECTION) and $(ARCH) replaced with their respective values. + + <VariableList> + <VarListEntry><term>MaxContentsChange</term> + <ListItem><Para> + Sets the number of kilobytes of contents + files that are generated each day. The contents files are round-robined + so that over several days they will all be rebuilt. + </VarListEntry> + + <VarListEntry><term>ContentsAge</term> + <ListItem><Para> + Controls the number of days a contents file is allowed + to be checked without changing. If this limit is passed the mtime of the + contents file is updated. This case can occur if the package file is + changed in such a way that does not result in a new contents file + [overried edit for instance]. A hold off is allowed in hopes that new + .debs will be installed, requiring a new file anyhow. The default is 10, + the units are in days. + </VarListEntry> + + <VarListEntry><term>Directory</term> + <ListItem><Para> + Sets the top of the .deb directory tree. Defaults to + <filename>$(DIST)/$(SECTION)/binary-$(ARCH)/</> + </VarListEntry> + + <VarListEntry><term>Packages</term> + <ListItem><Para> + Sets the output Packages file. Defaults to + <filename>$(DIST)/$(SECTION)/binary-$(ARCH)/Packages</> + </VarListEntry> + + <VarListEntry><term>Sources</term> + <ListItem><Para> + Sets the output Packages file. Defaults to + <filename>$(DIST)/$(SECTION)/source/Sources</> + </VarListEntry> + + <VarListEntry><term>InternalPrefix</term> + <ListItem><Para> + Sets the path prefix that causes a symlink to be + considered an internal link instead of an external link. Defaults to + <filename>$(DIST)/$(SECTION)/</> + </VarListEntry> + + <VarListEntry><term>Contents</term> + <ListItem><Para> + Sets the output Contents file. Defaults to + <filename>$(DIST)/Contents-$(ARCH)</>. If this setting causes multiple + Packages files to map onto a single Contents file (such as the default) + then <command/apt-ftparchive/ will integrate those package files + together automatically. + </VarListEntry> + + <VarListEntry><term>Contents::Header</term> + <ListItem><Para> + Sets header file to prepend to the contents output. + </VarListEntry> + + <VarListEntry><term>BinCacheDB</term> + <ListItem><Para> + Sets the binary cache database to use for this + section. Multiple sections can share the same database. + </VarListEntry> + + <VarListEntry><term>FileList</term> + <ListItem><Para> + Specifies that instead of walking the directory tree, + <command/apt-ftparchive/ should read the list of files from the given + file. Relative files names are prefixed with the archive directory. + </VarListEntry> + + <VarListEntry><term>SourceFileList</term> + <ListItem><Para> + Specifies that instead of walking the directory tree, + <command/apt-ftparchive/ should read the list of files from the given + file. Relative files names are prefixed with the archive directory. + This is used when processing source indexs. + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>Tree Section</> + <para> + The <literal/Tree/ section defines a standard Debian file tree which + consists of a base directory, then multiple sections in that base + directory and finally multiple Architectures in each section. The exact + pathing used is defined by the <literal/Directory/ substitution variable. + <para> + The <literal/Tree/ section takes a scope tag which sets the + <literal/$(DIST)/ variable and defines the root of the tree + (the path is prefixed by <literal/ArchiveDir/). + Typically this is a setting such as <filename>dists/woody</>. + <para> + All of the settings defined in the <literal/TreeDefault/ section can be + use in a <literal/Tree/ section as well as three new variables. + <para> + When processing a <literal/Tree/ section <command/apt-ftparchive/ + performs an operation similar to: +<informalexample><programlisting> +for i in Sections do + for j in Architectures do + Generate for DIST=scope SECTION=i ARCH=j +</programlisting></informalexample> + + <VariableList> + <VarListEntry><term>Sections</term> + <ListItem><Para> + This is a space separated list of sections which appear + under the distribution, typically this is something like + <literal/main contrib non-free/. + </VarListEntry> + + <VarListEntry><term>Architectures</term> + <ListItem><Para> + This is a space separated list of all the + architectures that appear under seach section. The special architecture + 'source' is used to indicate that this tree has a source archive. + </VarListEntry> + + <VarListEntry><term>BinOverride</term> + <ListItem><Para> + Sets the binary override file. The override file + contains section, priority and maintainer address information. + </VarListEntry> + + <VarListEntry><term>SrcOverride</term> + <ListItem><Para> + Sets the source override file. The override file + contains section information. + </VarListEntry> + + <VarListEntry><term>ExtraOverride</term> + <ListItem><Para> + Sets the binary extra override file. + </VarListEntry> + + <VarListEntry><term>SrcExtraOverride</term> + <ListItem><Para> + Sets the source extra override file. + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>BinDirectory Section</> + <para> + The <literal/bindirectory/ section defines a binary directory tree + with no special structure. The scope tag specifies the location of + the binary directory and the settings are similar to the <literal/Tree/ + section with no substitution variables or + <literal>Section</><literal>Architecture</> settings. + <VariableList> + <VarListEntry><term>Packages</term> + <ListItem><Para> + Sets the Packages file output. + </VarListEntry> + + <VarListEntry><term>SrcPackages</term> + <ListItem><Para> + Sets the Sources file output. At least one of + <literal/Packages/ or <literal/SrcPackages/ is required. + </VarListEntry> + + <VarListEntry><term>Contents</term> + <ListItem><Para> + Sets the Contents file output. (Optional) + </VarListEntry> + + <VarListEntry><term>BinOverride</term> + <ListItem><Para> + Sets the binary override file. + </VarListEntry> + + <VarListEntry><term>SrcOverride</term> + <ListItem><Para> + Sets the source override file. + </VarListEntry> + + <VarListEntry><term>ExtraOverride</term> + <ListItem><Para> + Sets the binary extra override file. + </VarListEntry> + + <VarListEntry><term>SrcExtraOverride</term> + <ListItem><Para> + Sets the source extra override file. + </VarListEntry> + + <VarListEntry><term>BinCacheDB</term> + <ListItem><Para> + Sets the cache DB. + </VarListEntry> + + <VarListEntry><term>PathPrefix</term> + <ListItem><Para> + Appends a path to all the output paths. + </VarListEntry> + + <VarListEntry><term>FileList, SourceFileList</term> + <ListItem><Para> + Specifies the file list file. + </VarListEntry> + </VariableList> + </refsect2> + </RefSect1> + + <RefSect1><Title>The Binary Override File</> + <para> + The binary override file is fully compatible with &dpkg-scanpackages;. It + contains 4 fields separated by spaces. The first field is the package name, + the second is the priority to force that package to, the third is the + the section to force that package to and the final field is the maintainer + permutation field. + <para> + The general form of the maintainer field is: + <literallayout>old [// oldn]* => new</literallayout> + or simply, + <literallayout>new</literallayout> + The first form allows a double-slash separated list of old email addresses + to be specified. If any of those are found then new is substituted for the + maintainer field. The second form unconditionally substitutes the + maintainer field. + </RefSect1> + + <RefSect1><title>The Source Override File</> + <para> + The source override file is fully compatible with &dpkg-scansources;. It + contains 2 fields separated by spaces. The first fields is the source + package name, the second is the section to assign it. + </RefSect1> + + <RefSect1><title>The Extra Override File</> + <para> + The extra override file allows any arbitary tag to be added or replaced + in the output. It has 3 columns, the first is the package, the second is + the tag and the remainder of the line is the new value. + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/--md5/</> + <ListItem><Para> + Generate MD5 sums. This defaults to on, when turned off the generated + index files will not have MD5Sum fields where possible. + Configuration Item: <literal/APT::FTPArchive::MD5/. + </VarListEntry> + + <VarListEntry><term><option/-d/</><term><option/--db/</> + <ListItem><Para> + Use a binary caching DB. This has no effect on the generate command. + Configuration Item: <literal/APT::FTPArchive::DB/. + </VarListEntry> + + <VarListEntry><term><option/-q/</><term><option/--quiet/</> + <ListItem><Para> + Quiet; produces output suitable for logging, omitting progress indicators. + More q's will produce more quiet up to a maximum of 2. You can also use + <option/-q=#/ to set the quiet level, overriding the configuration file. + Configuration Item: <literal/quiet/. + </VarListEntry> + + <VarListEntry><term><option/--delink/</> + <ListItem><Para> + Perform Delinking. If the <literal/External-Links/ setting is used then + this option actually enables delinking of the files. It defaults to on and + can be turned off with <option/--no-delink/. + Configuration Item: <literal/APT::FTPArchive::DeLinkAct/. + </VarListEntry> + + <VarListEntry><term><option/--contents/</> + <ListItem><Para> + Perform contents generation. When this option is set and package indexes + are being generated with a cache DB then the file listing will also be + extracted and stored in the DB for later use. When using the generate + command this option also allows the creation of any Contents files. The + default is on. + Configuration Item: <literal/APT::FTPArchive::Contents/. + </VarListEntry> + + <VarListEntry><term><option/-s/</><term><option/--source-override/</> + <ListItem><Para> + Select the source override file to use with the <literal/sources/ command. + Configuration Item: <literal/APT::FTPArchive::SourceOverride/. + </VarListEntry> + + <VarListEntry><term><option/--readonly/</> + <ListItem><Para> + Make the caching databases read only. + Configuration Item: <literal/APT::FTPArchive::ReadOnlyDB/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command/apt-ftparchive/ returns zero on normal operation, decimal 100 on error. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/apt-get.8 b/apt/doc/apt-get.8 deleted file mode 100644 index 69e0b18..0000000 --- a/apt/doc/apt-get.8 +++ /dev/null @@ -1,330 +0,0 @@ -.TH "apt-get" "8" "25 Oct 2000" "apt" "" -.SH "NAME" -apt-get \- APT package handling utility -- command-line interface -.PP -.SH "SYNOPSIS" -apt-get [options] [command] [package \&.\&.\&.] -.PP -.SH "DESCRIPTION" -.PP -apt-get is the command-line tool for handling packages, and may be considered -the user\'s "back-end" to apt(8)\&. -.PP -\fIcommand\fP is one of: -.IP o -update -.IP o -upgrade -.IP o -dselect-upgrade [1] -.IP o -dist-upgrade -.IP o -install package1 [package2] [\&.\&.\&.] -.IP o -remove package1 [package2] [\&.\&.\&.] -.IP o -source package1 [package2] [\&.\&.\&.] -.IP o -check -.IP o -clean -.IP o -autoclean -.PP -Unless the -h, or --help option is given one of the above commands -must be present\&. -.PP -Note: -[1] Debian systems only -.PP -.IP "\fBupdate\fP" -\fBupdate\fP is used to resynchronize the package overview files from their -sources\&. The overviews of available packages are fetched from the -location(s) specified in \fB/etc/apt/sources\&.list\fP\&. -For example, when using a Debian archive, this command retrieves and -scans the \fBPackages\&.gz\fP files, so that information about new and updated -packages is available\&. An \fBupdate\fP should always be performed before an -\fBupgrade\fP \fBdist-upgrade\fP\&. Please be aware that the overall progress -meter will be incorrect as the size of the package files cannot be known in -advance\&. -.IP -.IP "\fBupgrade\fP" -\fBupgrade\fP is used to install the newest versions of all packages currently -installed on the system from the sources enumerated in -\fB/etc/apt/sources\&.list\fP\&. Packages currently installed with new versions -available are retrieved and upgraded; under no circumstances are currently -installed packages removed, or packages not already installed retrieved and -installed\&. New versions of currently installed packages that cannot be -upgraded without changing the install status of another package will be left -at their current version\&. An \fBupdate\fP must be performed first so that -\fBapt-get\fP knows that new versions of packages are available\&. -.IP -.IP "\fBdselect-upgrade\fP" -\fBdselect-upgrade\fP -is used in conjunction with the traditional Debian GNU/Linux packaging -front-end, \fBdselect (8)\fP\&. \fBdselect-upgrade\fP -follows the changes made by \fBdselect\fP to the \fIStatus\fP -field of available packages, and performs the actions necessary to realize -that state (for instance, the removal of old and the installation of new -packages)\&. -This command is only available on Debian systems. -.IP -.IP "\fBdist-upgrade\fP" -\fBdist-upgrade\fP,in addition to performing the function of \fBupgrade\fP, -also intelligently handles changing dependencies with new versions of -packages; \fBapt-get\fP has a "smart" conflict resolution system, and it will -attempt to upgrade the most important packages at the expense of less -important ones if necessary\&. The \fB/etc/apt/sources\&.list\fP file contains a -list of locations from which to retrieve desired package files\&. -.IP -.IP "\fBinstall\fP" -\fBinstall\fP is followed by one or more \fIpackages\fP desired for installation\&. -Each \fIpackage\fP is a package name, not a fully qualified filename -(for instance, in a Debian GNU/Linux system, \fIldso\fP would be the argument -provided, not \fIldso_1\&.9\&.6-2\&.deb\fP)\&. All packages required by the package(s) -specified for installation will also be retrieved and installed\&. The -\fB/etc/apt/sources\&.list\fP file is used to locate the desired packages\&. If a -hyphen is appended to the package name (with no intervening space), the -identified package will be removed if it is installed\&. This latter feature -may be used to override decisions made by apt-get\'s conflict resolution system\&. -.IP -If no package matches the given expression and the expression contains one -of \'\&.\', \'?\' or \'*\' then it is assumed to be a POSIX regex and it is applied -to all package names in the database\&. Any matches are then installed (or -removed)\&. Note that matching is done by substring so \'lo*\' matches \'how-lo\' -and \'lowest\'\&. If this is undesired prefix with a \'^\' character\&. -.IP -.IP "\fBremove\fP" -\fBremove\fP is identical to \fBinstall\fP except that packages are removed -instead of installed\&. If a plus sign is appended to the package name (with no -intervening space), the identified package will be installed\&. -.IP -.IP "\fBsource\fP" -\fBsource\fP causes apt-get to fetch source packages\&. APT will examine the -available packages to decide which source package to fetch\&. It will then -find and download into the current directory the newest available version of -that source package\&. Source packages are tracked separately from binary -packages via \fBdeb-src\fP or \fBrpm-src\fP type lines in the \fB/etc/apt/sources\&.list\fP file\&. -This probably will mean that you will not get the same source as the package -you have installed or as you could install\&. If the --compile options is -specified then the package will be compiled to a binary \&.deb using -dpkg-buildpackage, or under RPM based systems, it will compile -to a binary \&.rpm using rpm -ba. If --download-only is specified then -the source package will not be unpacked\& -.IP -Note that source packages are not tracked like binary packages, they exist -only in the current directory and are similar to downloading source -tar balls\&. -.IP -.IP "\fBcheck\fP" -\fBcheck\fP is a diagnostic tool; it updates the package cache and checks for -broken packages\&. -.IP -.IP "\fBclean\fP" -\fBclean\fP clears out the local repository of retrieved package files\&. It -removes everything but the lock file from \fB/var/cache/apt/archives/\fP -and \fB/var/cache/apt/archives/partial/\fP\&. -When APT is used as a \fBdselect(8)\fP method, \fBclean\fP is run automatically\&. -Those who do not use dselect will likely want to run \f(CWapt-get clean\fP -from time to time to free up disk space\&. -.IP -.IP "\fBautoclean\fP" -Like \fBclean\fP, \fBautoclean\fP 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 useless\&. This allows a -cache to be maintained over a long period without it growing out of -control\&. -.IP -.PP -.SH "OPTIONS" -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set\&. For boolean -options you can override the config file by using something like \fB-f-\fP, -\fB--no-f\fP, \fB-f=no\fP or several other variations\&. -.PP -.IP "\fB-d, --download-only\fP" -Download only; package files are only retrieved, not unpacked or installed\&. -Configuration Item: \fBAPT::Get::Download-Only\fP\&. -.IP -.IP "\fB-f, --fix-broken\fP" -Fix; attempt to correct a system with broken dependencies in -place\&. This option, when used with install/remove, can omit any packages -to permit APT to deduce a likely solition\&. Any Package that are specified -must completly correct the problem\&. The option is sometimes necessary when -running APT for the first time; APT itself does not allow broken package -dependencies to exist on a system\&. It is possible that a system\'s -dependency structure can be so corrupt as to require manual intervention -(which usually means using dselect or dpkg --remove to eliminate some of -the offending packages)\&. Use of this option together with -m may produce an -error in some situations\&. Configuration Item: \fBAPT::Get::Fix-Broken\fP\&. -.IP -.IP "\fB-h, --help\fP" -Help; display a helpful usage message and exits\&. -.IP -.IP "\fB-v, --version\fP" -Show the program version\&. -.IP -.IP "\fB-m, --ignore-missing, --fix-missing\fP" -Ignore missing packages; If packages cannot be retrieved or fail the -integrity check after retrieval (corrupted package files), hold back -those packages and handle the result\&. Use of this option together with --f may produce an error in some situations\&. If a package is selected for -installation (particularly if it is mentioned on the command line) and it -could not be downloaded then it will be silently held back\&. -Configuration Item: \fBAPT::Get::ignore-missing\fP\&. -.IP -.IP "\fB-S, --summary\fP" -When used with the upgrade or dist-upgrade commands, -displays information of what would be upgraded, with importance -and a summary of changes (when such data is available) and stops. -Configuration Item: \fBAPT::Get::Show-Upgrade-Summary\fP&. -.IP -.IP "\fB--no-download\fP" -Disables downloading of packages\&. This is best used with --ignore-missing to -force APT to use only the \&.debs it has already downloaded\&. -Configuration Item: \fBAPT::Get::No-Download\fP\&. -.IP -.IP "\fB-q, --quiet\fP" -Quiet; produces output suitable for logging, omitting progress indicators\&. -More q\'s will produce more quiet up to a maximum of 2\&. You can also use -\fB-q=#\fP to set the quiet level, overriding the configuration file\&. Note that -quiet level 2 implies -y, you should never use -qq without a no-action -modifier such as -d, --print-uris or -s as APT may decided to do something -you did not expect\&. -Configuration Item: \fBquiet\fP -.IP -.IP "\fB-s, --simulate, --just-print, --dry-run, --recon, --no-act\fP" -No action; perform a simulation of events that would occur but do not -actually change the system\&. Configuration Item: \fBAPT::Get::Simulate\fP\&. -.IP -Simulate prints out -a series of lines each one representing a dpkg operation, Configure (Conf), -Remove (Remv), Unpack (Inst)\&. Square brackets indicate broken packages with -and empty set of square brackets meaning breaks that are of no consequence -(rare)\&. -.IP -.IP "\fB-y, --yes, --assume-yes\fP" -Automatic yes to prompts; assume "yes" as answer to all prompts and run -non-interactively\&. If an undesirable situation, such as changing a held -package or removing an essential package occurs then \fBapt-get\fP will -abort\&. Configuration Item: \fBAPT::Get::Assume-Yes\fP\&. -.IP -.IP "\fB-u, --show-upgraded\fP" -Show upgraded packages; Print out a list of all packages that are to be -upgraded\&. Configuration Item: \fBAPT::Get::Show-Upgraded\fP\&. -.IP -.IP "\fB-b, --compile, --build\fP" -Compile source packages after downloading them\&. -Configuration Item: \fBAPT::Get::Compile\fP\&. -.IP -.IP "\fB--ignore-hold\fP" -Ignore package Holds; This causes \fBapt-get\fP to ignore a hold placed on -a package\&. This may be useful in conjunction with \fBdist-upgrade\fP to -override a large number of undesired holds\&. Configuration Item: \fBAPT::Ignore-Hold\fP\&. -.IP -.IP "\fB--no-upgrade\fP" -Do not upgrade packages; When used in conjunction with \fBinstall\fP -\fBno-upgrade\fP will prevent packages listed from being upgraded if they -are already installed\&. Configuration Item: \fBAPT::Get::no-upgrade\fP\&. -.IP -.IP "\fB--force-yes\fP" -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 \fBforce-yes\fP can potentially destroy -your system! Configuration Item: \fBAPT::Get::force-yes\fP\&. -.IP -.IP "\fB--print-uris\fP" -Instead of fetching the files to install their URIs are printed\&. Each -URI will have the path, the destination file name, the size and the expected -md5 hash\&. Note that the file name to write to will not always match -the file name on the remote site! This also works with the \fBsource\fP -command\&. Configuration Item: \fBAPT::Get::Print-URIs\fP\&. -.IP -.IP "\fB--purge\fP" -Use purge instead of remove for anything that would be removed\&. -This option has no effect on RPM based systems. -Configuration Item: \fBAPT::Get::Purge\fP\&. -.IP -.IP "\fB--reinstall\fP" -Re-Install packages that are already installed and at the newest version\&. -.IP -.IP "\fB--list-cleanup\fP" -This option defaults to on, use \fB--no-list-cleanup\fP to turn it off\&. -When on apt-get will automatically manage the contents of -/var/state/apt/lists to ensure that obsolete files are erased\&. The only -reason to turn it off is if you frequently change your source list\&. -Configuration Item: \fBAPT::Get::List-Cleanup\fP -.IP -.IP "\fB--trivial-only\fP" -Only perform operations are \'trivial\'\&. Logically this can be considered -related to --assume-yes, where --assume-yes will answer yes to any prompt, ---trivial-only will answer no\&. Configuration Item: \fBAPT::Get::Trivial-Only\fP -.IP -.IP "\fB--no-remove\fP" -If any packages are to be removed apt-get immediately aborts without -prompting\&. Configuration Item: \fBAPT::Get::No-Remove\fP -.IP -.IP "\fB--diff-only\fP, \fB--tar-only\fP" -Download only the diff or tar file of a source archive\&. -Configuration Item: \fBAPT::Get::Diff-Only\fP -.IP -.IP "\fB-c, --config-file\fP" -Configuration File; Specify a configuration file to use\&. \fBapt-get\fP will -read the default configuration file and then this configuration file\&. See -\fBapt\&.conf(5)\fP for syntax information\&. -.IP -.IP "\fB-o, --option\fP" -Set a Configuration Option; This will set an arbitrary configuration option\&. -The syntax is - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "FILES" -.IP o -/etc/apt/sources\&.list -locations to fetch packages from -.IP -.IP o -/var/cache/apt/archives/ -storage area for retrieved package files -.IP -.IP o -/var/cache/apt/archives/partial/ -storage area for package files in transit -.IP -.IP o -/var/state/apt/lists/ -storage area for state information for each package resource specified in -the source list -.IP -.IP o -/var/state/apt/lists/partial/ -storage area for state information in transit -.PP -.SH "SEE ALSO" -apt-cache(8), -dpkg(8), -dselect(8), -sources\&.list(5), -apt\&.conf(5), -The APT Users Guide in /usr/doc/apt/ -.PP -.SH "DIAGNOSTICS" -apt-get returns zero on normal operation, decimal 100 on error\&. -.PP -.SH "BUGS" -See http://bugs\&.debian\&.org/apt\&. If you wish to report a -bug in \fBapt-get\fP, please see \fB/usr/doc/debian/bug-reporting\&.txt\fP -or the \fBbug(1)\fP command\&. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt-get was written by the APT team <apt@packages\&.debian\&.org> -and ported to RPM based systems by Conectiva S.A. -<kojima@conectiva\&.com\&.br>\&. diff --git a/apt/doc/apt-get.8.sgml b/apt/doc/apt-get.8.sgml new file mode 100644 index 0000000..f6ae782 --- /dev/null +++ b/apt/doc/apt-get.8.sgml @@ -0,0 +1,480 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-get</> + <manvolnum>8</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-get</> + <refpurpose>APT package handling utility -- command-line interface</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-get</> + <arg><option>-hvs</></arg> + <arg><option>-o=<replaceable/config string/</></arg> + <arg><option>-c=<replaceable/file/</></arg> + <group choice=req> + <arg>update</> + <arg>upgrade</> + <arg>dselect-upgrade</> + <arg>install <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> + <arg>remove <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> + <arg>source <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> + <arg>build-dep <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> + <arg>check</> + <arg>clean</> + <arg>autoclean</> + </group> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> + <command/apt-get/ is the command-line tool for handling packages, and may be + considered the user's "back-end" to other tools using the APT library. + <para> + Unless the <option/-h/, or <option/--help/ option is given one of the + commands below must be present. + + <VariableList> + <VarListEntry><Term>update</Term> + <ListItem><Para> + <literal/update/ is used to resynchronize the package index files from + their sources. The indexes of available packages are fetched from the + location(s) specified in <filename>/etc/apt/sources.list</>. + For example, when using a Debian archive, this command retrieves and + scans the <filename>Packages.gz</> files, so that information about new + and updated packages is available. An <literal/update/ should always be + performed before an <literal/upgrade/ or <literal/dist-upgrade/. Please + be aware that the overall progress meter will be incorrect as the size + of the package files cannot be known in advance. + </VarListEntry> + + <VarListEntry><Term>upgrade</Term> + <ListItem><Para> + <literal/upgrade/ is used to install the newest versions of all packages + currently installed on the system from the sources enumerated in + <filename>/etc/apt/sources.list</>. Packages currently installed with + new versions available are retrieved and upgraded; under no circumstances + are currently installed packages removed, or packages not already installed + retrieved and installed. New versions of currently installed packages that + cannot be upgraded without changing the install status of another package + will be left at their current version. An <literal/update/ must be + performed first so that <command/apt-get/ knows that new versions of packages are + available. + </VarListEntry> + + <VarListEntry><Term>dselect-upgrade</Term> + <ListItem><Para> + is used in conjunction with the traditional Debian GNU/Linux packaging + front-end, &dselect;. <literal/dselect-upgrade/ + follows the changes made by &dselect; to the <literal/Status/ + field of available packages, and performs the actions necessary to realize + that state (for instance, the removal of old and the installation of new + packages). + </VarListEntry> + + <VarListEntry><Term>dist-upgrade</Term> + <ListItem><Para> + <literal/dist-upgrade/, in addition to performing the function of + <literal/upgrade/, also intelligently handles changing dependencies + with new versions of packages; <command/apt-get/ has a "smart" conflict + resolution system, and it will attempt to upgrade the most important + packages at the expense of less important ones if necessary. + The <filename>/etc/apt/sources.list</> file contains a list of locations + from which to retrieve desired package files. + </VarListEntry> + + <VarListEntry><Term>install</Term> + <ListItem><Para> + <literal/install/ is followed by one or more packages desired for + installation. Each package is a package name, not a fully qualified + filename (for instance, in a Debian GNU/Linux system, libc6 would be the + argument provided, not em(libc6_1.9.6-2.deb)). All packages required + by the package(s) specified for installation will also be retrieved and + installed. The <filename>/etc/apt/sources.list</> file is used to locate + the desired packages. If a hyphen is appended to the package name (with + no intervening space), the identified package will be removed if it is + installed. Similarly a plus sign can be used to designate a package to + install. These latter features may be used to override decisions made by + apt-get's conflict resolution system. + <para> + A specific version of a package can be selected for installation by + following the package name with an equals and the version of the package + to select. This will cause that version to be located and selected for + install. Alternatively a specific distribution can be selected by + following the package name with a slash and the version of the + distribution or the Archive name (stable, frozen, unstable). + <para> + Both of the version selection mechanisms can downgrade packages and must + be used with care. + <para> + If no package matches the given expression and the expression contains one + of '.', '?' or '*' then it is assumed to be a POSIX regex and it is applied + to all package names in the database. Any matches are then installed (or + removed). Note that matching is done by substring so 'lo.*' matches 'how-lo' + and 'lowest'. If this is undesired prefix with a '^' character. + </VarListEntry> + + <VarListEntry><Term>remove</Term> + <ListItem><Para> + <literal/remove/ is identical to <literal/install/ except that packages are + removed instead of installed. If a plus sign is appended to the package + name (with no intervening space), the identified package will be + installed. + </VarListEntry> + + <VarListEntry><Term>source</Term> + <ListItem><Para> + <literal/source/ causes <command/apt-get/ to fetch source packages. APT + will examine the available packages to decide which source package to + fetch. It will then find and download into the current directory the + newest available version of that source package. Source packages are + tracked separately from binary packages via <literal/deb-src/ type lines + in the &sources-list; file. This probably will mean that you will not + get the same source as the package you have installed or as you could + install. If the --compile options is specified then the package will be + compiled to a binary .deb using dpkg-buildpackage, if --download-only is + specified then the source package will not be unpacked. + <para> + A specific source version can be retrieved by postfixing the source name + with an equals and then the version to fetch, similar to the mechanism + used for the package files. This enables exact matching of the source + package name and version, implicitly enabling the + <literal/APT::Get::Only-Source/ option. + + <para> + Note that source packages are not tracked like binary packages, they + exist only in the current directory and are similar to downloading source + tar balls. + </VarListEntry> + + <VarListEntry><Term>build-dep</Term> + <ListItem><Para> + <literal/build-dep/ causes apt-get to install/remove packages in an + attempt to satisfy the build dependencies for a source packages. + </VarListEntry> + + <VarListEntry><Term>check</Term> + <ListItem><Para> + <literal/check/ is a diagnostic tool; it updates the package cache and checks + for broken dependencies. + </VarListEntry> + + <VarListEntry><Term>clean</Term> + <ListItem><Para> + <literal/clean/ clears out the local repository of retrieved package + files. It removes everything but the lock file from + <filename>&cachedir;/archives/</> and + <filename>&cachedir;/archive/partial/</>. When APT is used as a + &dselect; method, <literal/clean/ is run automatically. + Those who do not use dselect will likely want to run <literal/apt-get clean/ + from time to time to free up disk space. + </VarListEntry> + + <VarListEntry><Term>autoclean</Term> + <ListItem><Para> + Like <literal/clean/, <literal/autoclean/ 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 + useless. This allows a cache to be maintained over a long period without + it growing out of control. The configuration option + <literal/APT::Clean-Installed/ will prevent installed packages from being + erased if it is set off. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-d/</><term><option/--download-only/</> + <ListItem><Para> + Download only; package files are only retrieved, not unpacked or installed. + Configuration Item: <literal/APT::Get::Download-Only/. + </VarListEntry> + + <VarListEntry><term><option/-f/</><term><option/--fix-broken/</> + <ListItem><Para> + Fix; attempt to correct a system with broken dependencies in + place. This option, when used with install/remove, can omit any packages + to permit APT to deduce a likely soltion. Any Package that are specified + must completly correct the problem. The option is sometimes necessary when + running APT for the first time; APT itself does not allow broken package + dependencies to exist on a system. It is possible that a system's + dependency structure can be so corrupt as to require manual intervention + (which usually means using &dselect; or <command/dpkg --remove/ to eliminate some of + the offending packages). Use of this option together with <option/-m/ may produce an + error in some situations. + Configuration Item: <literal/APT::Get::Fix-Broken/. + </VarListEntry> + + <VarListEntry><term><option/-m/</><term><option/--ignore-missing/</> + <term><option/--fix-missing/</> + <ListItem><Para> + Ignore missing packages; If packages cannot be retrieved or fail the + integrity check after retrieval (corrupted package files), hold back + those packages and handle the result. Use of this option together with + <option/-f/ may produce an error in some situations. If a package is + selected for installation (particularly if it is mentioned on the + command line) and it could not be downloaded then it will be silently + held back. + Configuration Item: <literal/APT::Get::Fix-Missing/. + </VarListEntry> + + <VarListEntry><term><option/--no-download/</> + <ListItem><Para> + Disables downloading of packages. This is best used with + <option/--ignore-missing/ to force APT to use only the .debs it has + already downloaded. + Configuration Item: <literal/APT::Get::Download/. + </VarListEntry> + + <VarListEntry><term><option/-q/</><term><option/--quiet/</> + <ListItem><Para> + Quiet; produces output suitable for logging, omitting progress indicators. + More q's will produce more quiet up to a maximum of 2. You can also use + <option/-q=#/ to set the quiet level, overriding the configuration file. + Note that quiet level 2 implies <option/-y/, you should never use -qq + without a no-action modifier such as -d, --print-uris or -s as APT may + decided to do something you did not expect. + Configuration Item: <literal/quiet/. + </VarListEntry> + + <VarListEntry><term><option/-s/</> + <term><option/--simulate/</> + <term><option/--just-print/</> + <term><option/--dry-run/</> + <term><option/--recon/</> + <term><option/--no-act/</> + <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/. + <para> + Simulate prints out + a series of lines each one representing a dpkg operation, Configure (Conf), + Remove (Remv), Unpack (Inst). Square brackets indicate broken packages with + and empty set of square brackets meaning breaks that are of no consequence + (rare). + </VarListEntry> + + <VarListEntry><term><option/-y/</><term><option/--yes/</> + <term><option/--assume-yes/</> + <ListItem><Para> + Automatic yes to prompts; assume "yes" as answer to all prompts and run + non-interactively. If an undesirable situation, such as changing a held + package or removing an essential package occurs then <literal/apt-get/ + will abort. + Configuration Item: <literal/APT::Get::Assume-Yes/. + </VarListEntry> + + <VarListEntry><term><option/-u/</><term><option/--show-upgraded/</> + <ListItem><Para> + Show upgraded packages; Print out a list of all packages that are to be + upgraded. + Configuration Item: <literal/APT::Get::Show-Upgraded/. + </VarListEntry> + + <VarListEntry><term><option/-b/</><term><option/--compile/</> + <term><option/--build/</> + <ListItem><Para> + Compile source packages after downloading them. + Configuration Item: <literal/APT::Get::Compile/. + </VarListEntry> + + <VarListEntry><term><option/--ignore-hold/</> + <ListItem><Para> + Ignore package Holds; This causes <command/apt-get/ to ignore a hold + placed on a package. This may be useful in conjunction with + <literal/dist-upgrade/ to override a large number of undesired holds. + Configuration Item: <literal/APT::Ignore-Hold/. + </VarListEntry> + + <VarListEntry><term><option/--no-upgrade/</> + <ListItem><Para> + Do not upgrade packages; When used in conjunction with <literal/install/ + <literal/no-upgrade/ will prevent packages listed from being upgraded + if they are already installed. + Configuration Item: <literal/APT::Get::Upgrade/. + </VarListEntry> + + <VarListEntry><term><option/--force-yes/</> + <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/ can potentially destroy your system! + Configuration Item: <literal/APT::Get::force-yes/. + </VarListEntry> + + <VarListEntry><term><option/--print-uris/</> + <ListItem><Para> + Instead of fetching the files to install their URIs are printed. Each + URI will have the path, the destination file name, the size and the expected + md5 hash. Note that the file name to write to will not always match + the file name on the remote site! This also works with the + <literal/source/ and <literal/update/ commands. When used with the + <literal/update/ command the MD5 and size are not included, and it is + up to the user to decompress any compressed files. + Configuration Item: <literal/APT::Get::Print-URIs/. + </VarListEntry> + + <VarListEntry><term><option/--purge/</> + <ListItem><Para> + Use purge instead of remove for anything that would be removed. + Configuration Item: <literal/APT::Get::Purge/. + </VarListEntry> + + <VarListEntry><term><option/--reinstall/</> + <ListItem><Para> + Re-Install packages that are already installed and at the newest version. + Configuration Item: <literal/APT::Get::ReInstall/. + </VarListEntry> + + <VarListEntry><term><option/--list-cleanup/</> + <ListItem><Para> + This option defaults to on, use <literal/--no-list-cleanup/ to turn it + off. When on <command/apt-get/ will automatically manage the contents of + <filename>&statedir;/lists</> to ensure that obsolete files are erased. + The only reason to turn it off is if you frequently change your source + list. + Configuration Item: <literal/APT::Get::List-Cleanup/. + </VarListEntry> + + <VarListEntry><term><option/-t/</> + <term><option/--target-release/</> + <term><option/--default-release/</> + <ListItem><Para> + This option controls the default input to the policy engine, it creates + a default pin at priority 990 using the specified release string. The + preferences file may further override this setting. In short, this option + lets you have simple control over which distribution packages will be + retrieved from. Some common examples might be + <option>-t '2.1*'</> or <option>-t unstable</>. + Configuration Item: <literal/APT::Default-Release/ + </VarListEntry> + + <VarListEntry><term><option/--trivial-only/</> + <ListItem><Para> + Only perform operations that are 'trivial'. Logically this can be considered + related to <option/--assume-yes/, where <option/--assume-yes/ will answer + yes to any prompt, <option/--trivial-only/ will answer no. + Configuration Item: <literal/APT::Get::Trivial-Only/. + </VarListEntry> + + <VarListEntry><term><option/--no-remove/</> + <ListItem><Para> + If any packages are to be removed apt-get immediately aborts without + prompting. + Configuration Item: <literal/APT::Get::Remove/ + </VarListEntry> + + <VarListEntry><term><option/--only-source/</> + <ListItem><Para> + Only has meaning for the <literal/source/ command. indicates that the + given source names are not to be mapped through the binary table. + Configuration Item: <literal/APT::Get::Only-Source/ + </VarListEntry> + + <VarListEntry><term><option/--diff-only/</><term><option/--tar-only/</> + <ListItem><Para> + Download only the diff or tar file of a source archive. + Configuration Item: <literal/APT::Get::Diff-Only/ and + <literal/APT::Get::Tar-Only/ + </VarListEntry> + + <VarListEntry><term><option/--arch-only/</> + <ListItem><Para> + Only process architecture-dependent build-dependencies. + Configuration Item: <literal/APT::Get::Arch-Only/ + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>Files</> + <variablelist> + <VarListEntry><term><filename>/etc/apt/sources.list</></term> + <ListItem><Para> + locations to fetch packages from. + Configuration Item: <literal/Dir::Etc::SourceList/. + </VarListEntry> + + <VarListEntry><term><filename>/etc/apt/apt.conf</></term> + <ListItem><Para> + APT configuration file. + Configuration Item: <literal/Dir::Etc::Main/. + </VarListEntry> + + <VarListEntry><term><filename>/etc/apt/apt.conf.d/</></term> + <ListItem><Para> + APT configuration file fragments + Configuration Item: <literal/Dir::Etc::Parts/. + </VarListEntry> + + <VarListEntry><term><filename>/etc/apt/preferences</></term> + <ListItem><Para> + version preferences file + Configuration Item: <literal/Dir::Etc::Preferences/. + </VarListEntry> + + <VarListEntry><term><filename>&cachedir;/archives/</></term> + <ListItem><Para> + storage area for retrieved package files. + Configuration Item: <literal/Dir::Cache::Archives/. + </VarListEntry> + + <VarListEntry><term><filename>&cachedir;/archives/partial/</></term> + <ListItem><Para> + storage area for package files in transit. + Configuration Item: <literal/Dir::Cache::Archives/ (implicit partial). + </VarListEntry> + + <VarListEntry><term><filename>&statedir;/lists/</></term> + <ListItem><Para> + storage area for state information for each package resource specified in + &sources-list; + Configuration Item: <literal/Dir::State::Lists/. + </VarListEntry> + + <VarListEntry><term><filename>&statedir;/lists/partial/</></term> + <ListItem><Para> + storage area for state information in transit. + Configuration Item: <literal/Dir::State::Lists/ (implicit partial). + </VarListEntry> + </variablelist> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-cache;, &apt-cdrom;, &dpkg;, &dselect;, &sources-list;, &apt-conf;, + The APT User's guide in &docdir;, &apt-preferences;. + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command/apt-get/ returns zero on normal operation, decimal 100 on error. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/apt-get.8.yo b/apt/doc/apt-get.8.yo deleted file mode 100644 index 4983b25..0000000 --- a/apt/doc/apt-get.8.yo +++ /dev/null @@ -1,302 +0,0 @@ -mailto(apt@packages.debian.org) -manpage(apt-get)(8)(4 Dec 1998)(apt)() -manpagename(apt-get)(APT package handling utility -- command-line interface) - -manpagesynopsis() - apt-get [options] [command] [package ...] - -manpagedescription() - -apt-get is the command-line tool for handling packages, and may be considered -the user's "back-end" to apt(8). - -em(command) is one of: -itemize( - it() update - it() upgrade - it() dselect-upgrade - it() dist-upgrade - it() install package1 [package2] [...] - it() remove package1 [package2] [...] - it() source package1 [package2] [...] - it() check - it() clean - it() autoclean -) - -Unless the -h, or --help option is given one of the above commands -must be present. - -startdit() -dit(bf(update)) -bf(update) is used to resynchronize the package overview files from their -sources. The overviews of available packages are fetched from the -location(s) specified in bf(/etc/apt/sources.list). -For example, when using a Debian archive, this command retrieves and -scans the bf(Packages.gz) files, so that information about new and updated -packages is available. An bf(update) should always be performed before an -bf(upgrade) bf(dist-upgrade). Please be aware that the overall progress -meter will be incorrect as the size of the package files cannot be known in -advance. - -dit(bf(upgrade)) -bf(upgrade) is used to install the newest versions of all packages currently -installed on the system from the sources enumerated in -bf(/etc/apt/sources.list). Packages currently installed with new versions -available are retrieved and upgraded; under no circumstances are currently -installed packages removed, or packages not already installed retrieved and -installed. New versions of currently installed packages that cannot be -upgraded without changing the install status of another package will be left -at their current version. An bf(update) must be performed first so that -bf(apt-get) knows that new versions of packages are available. - -dit(bf(dselect-upgrade)) -bf(dselect-upgrade) -is used in conjunction with the traditional Debian GNU/Linux packaging -front-end, bf(dselect (8)). bf(dselect-upgrade) -follows the changes made by bf(dselect) to the em(Status) -field of available packages, and performs the actions necessary to realize -that state (for instance, the removal of old and the installation of new -packages). - -dit(bf(dist-upgrade)) -bf(dist-upgrade),in addition to performing the function of bf(upgrade), -also intelligently handles changing dependencies with new versions of -packages; bf(apt-get) has a "smart" conflict resolution system, and it will -attempt to upgrade the most important packages at the expense of less -important ones if necessary. The bf(/etc/apt/sources.list) file contains a -list of locations from which to retrieve desired package files. - -dit(bf(install)) -bf(install) is followed by one or more em(packages) desired for installation. -Each em(package) is a package name, not a fully qualified filename -(for instance, in a Debian GNU/Linux system, em(ldso) would be the argument -provided, not em(ldso_1.9.6-2.deb)). All packages required by the package(s) -specified for installation will also be retrieved and installed. The -bf(/etc/apt/sources.list) file is used to locate the desired packages. If a -hyphen is appended to the package name (with no intervening space), the -identified package will be removed if it is installed. This latter feature -may be used to override decisions made by apt-get's conflict resolution system. - -If no package matches the given expression and the expression contains one -of '.', '?' or '*' then it is assumed to be a POSIX regex and it is applied -to all package names in the database. Any matches are then installed (or -removed). Note that matching is done by substring so 'lo*' matches 'how-lo' -and 'lowest'. If this is undesired prefix with a '^' character. - -dit(bf(remove)) -bf(remove) is identical to bf(install) except that packages are removed -instead of installed. If a plus sign is appended to the package name (with no -intervening space), the identified package will be installed. - -dit(bf(source)) -bf(source) causes apt-get to fetch source packages. APT will examine the -available packages to decide which source package to fetch. It will then -find and download into the current directory the newest available version of -that source package. Source packages are tracked separately from binary -packages via bf(deb-src) type lines in the bf(/etc/apt/sources.list) file. -This probably will mean that you will not get the same source as the package -you have installed or as you could install. If the --compile options is -specified then the package will be compiled to a binary .deb using -dpkg-buildpackage, if --download-only is specified then the source package -will not be unpacked. - -Note that source packages are not tracked like binary packages, they exist -only in the current directory and are similar to downloading source -tar balls. - -dit(bf(check)) -bf(check) is a diagnostic tool; it updates the package cache and checks for -broken packages. - -dit(bf(clean)) -bf(clean) clears out the local repository of retrieved package files. It -removes everything but the lock file from bf(/var/cache/apt/archives/) -and bf(/var/cache/apt/archives/partial/). -When APT is used as a bf(dselect(8)) method, bf(clean) is run automatically. -Those who do not use dselect will likely want to run code(apt-get clean) -from time to time to free up disk space. - -dit(bf(autoclean)) -Like bf(clean), bf(autoclean) 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 useless. This allows a -cache to be maintained over a long period without it growing out of -control. - -enddit() - -manpageoptions() -All command line options may be set using the configuration file, the -descriptions indicate the configuration option to set. For boolean -options you can override the config file by using something like bf(-f-), -bf(--no-f), bf(-f=no) or several other variations. - -startdit() -dit(bf(-d, --download-only)) -Download only; package files are only retrieved, not unpacked or installed. -Configuration Item: bf(APT::Get::Download-Only). - -dit(bf(-f, --fix-broken)) -Fix; attempt to correct a system with broken dependencies in -place. This option, when used with install/remove, can omit any packages -to permit APT to deduce a likely soltion. Any Package that are specified -must completly correct the problem. The option is sometimes necessary when -running APT for the first time; APT itself does not allow broken package -dependencies to exist on a system. It is possible that a system's -dependency structure can be so corrupt as to require manual intervention -(which usually means using dselect or dpkg --remove to eliminate some of -the offending packages). Use of this option together with -m may produce an -error in some situations. Configuration Item: bf(APT::Get::Fix-Broken). - -dit(bf(-h, --help)) -Help; display a helpful usage message and exits. - -dit(bf(-v, --version)) -Show the program version. - -dit(bf(-m, --ignore-missing, --fix-missing)) -Ignore missing packages; If packages cannot be retrieved or fail the -integrity check after retrieval (corrupted package files), hold back -those packages and handle the result. Use of this option together with --f may produce an error in some situations. If a package is selected for -installation (particularly if it is mentioned on the command line) and it -could not be downloaded then it will be silently held back. -Configuration Item: bf(APT::Get::ignore-missing). - -dit(bf(--no-download)) -Disables downloading of packages. This is best used with --ignore-missing to -force APT to use only the .debs it has already downloaded. -Configuration Item: bf(APT::Get::No-Download). - -dit(bf(-q, --quiet)) -Quiet; produces output suitable for logging, omitting progress indicators. -More q's will produce more quiet up to a maximum of 2. You can also use -bf(-q=#) to set the quiet level, overriding the configuration file. Note that -quiet level 2 implies -y, you should never use -qq without a no-action -modifier such as -d, --print-uris or -s as APT may decided to do something -you did not expect. -Configuration Item: bf(quiet) - -dit(bf(-s, --simulate, --just-print, --dry-run, --recon, --no-act)) -No action; perform a simulation of events that would occur but do not -actually change the system. Configuration Item: bf(APT::Get::Simulate). - -Simulate prints out -a series of lines each one representing a dpkg operation, Configure (Conf), -Remove (Remv), Unpack (Inst). Square brackets indicate broken packages with -and empty set of square brackets meaning breaks that are of no consequence -(rare). - -dit(bf(-y, --yes, --assume-yes)) -Automatic yes to prompts; assume "yes" as answer to all prompts and run -non-interactively. If an undesirable situation, such as changing a held -package or removing an essential package occurs then bf(apt-get) will -abort. Configuration Item: bf(APT::Get::Assume-Yes). - -dit(bf(-u, --show-upgraded)) -Show upgraded packages; Print out a list of all packages that are to be -upgraded. Configuration Item: bf(APT::Get::Show-Upgraded). - -dit(bf(-b, --compile, --build)) -Compile source packages after downloading them. -Configuration Item: bf(APT::Get::Compile). - -dit(bf(--ignore-hold)) -Ignore package Holds; This causes bf(apt-get) to ignore a hold placed on -a package. This may be useful in conjunction with bf(dist-upgrade) to -override a large number of undesired holds. Configuration Item: bf(APT::Ignore-Hold). - -dit(bf(--no-upgrade)) -Do not upgrade packages; When used in conjunction with bf(install) -bf(no-upgrade) will prevent packages listed from being upgraded if they -are already installed. Configuration Item: bf(APT::Get::no-upgrade). - -dit(bf(--force-yes)) -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 bf(force-yes) can potentially destroy -your system! Configuration Item: bf(APT::Get::force-yes). - -dit(bf(--print-uris)) -Instead of fetching the files to install their URIs are printed. Each -URI will have the path, the destination file name, the size and the expected -md5 hash. Note that the file name to write to will not always match -the file name on the remote site! This also works with the bf(source) -command. Configuration Item: bf(APT::Get::Print-URIs). - -dit(bf(--purge)) -Use purge instead of remove for anything that would be removed. -Configuration Item: bf(APT::Get::Purge). - -dit(bf(--reinstall)) -Re-Install packages that are already installed and at the newest version. - -dit(bf(--list-cleanup)) -This option defaults to on, use bf(--no-list-cleanup) to turn it off. -When on apt-get will automatically manage the contents of -/var/state/apt/lists to ensure that obsolete files are erased. The only -reason to turn it off is if you frequently change your source list. -Configuration Item: bf(APT::Get::List-Cleanup) - -dit(bf(--trivial-only)) -Only perform operations are 'trivial'. Logically this can be considered -related to --assume-yes, where --assume-yes will answer yes to any prompt, ---trivial-only will answer no. Configuration Item: bf(APT::Get::Trivial-Only) - -dit(bf(--no-remove)) -If any packages are to be removed apt-get immediately aborts without -prompting. Configuration Item: bf(APT::Get::No-Remove) - -dit(bf(--diff-only), bf(--tar-only)) -Download only the diff or tar file of a source archive. -Configuration Item: bf(APT::Get::Diff-Only) - -dit(bf(-c, --config-file)) -Configuration File; Specify a configuration file to use. bf(apt-get) will -read the default configuration file and then this configuration file. See -bf(apt.conf(5)) for syntax information. - -dit(bf(-o, --option)) -Set a Configuration Option; This will set an arbitrary configuration option. -The syntax is -verb(-o Foo::Bar=bar) -enddit() - -manpagefiles() -itemize( - it() /etc/apt/sources.list - locations to fetch packages from - - it() /var/cache/apt/archives/ - storage area for retrieved package files - - it() /var/cache/apt/archives/partial/ - storage area for package files in transit - - it() /var/state/apt/lists/ - storage area for state information for each package resource specified in - the source list - - it() /var/state/apt/lists/partial/ - storage area for state information in transit -) - -manpageseealso() -apt-cache(8), -dpkg(8), -dselect(8), -sources.list(5), -apt.conf(5), -The APT Users Guide in /usr/doc/apt/ - -manpagediagnostics() -apt-get returns zero on normal operation, decimal 100 on error. - -manpagebugs() -See http://bugs.debian.org/apt. If you wish to report a -bug in bf(apt-get), please see bf(/usr/doc/debian/bug-reporting.txt) -or the bf(bug(1)) command. - -manpageauthor() -apt-get was written by the APT team <apt@packages.debian.org>. diff --git a/apt/doc/apt-sortpkgs.1.sgml b/apt/doc/apt-sortpkgs.1.sgml new file mode 100644 index 0000000..e0af29d --- /dev/null +++ b/apt/doc/apt-sortpkgs.1.sgml @@ -0,0 +1,73 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-sortpkgs</> + <manvolnum>1</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-sortpkgs</> + <refpurpose>Utility to sort package index files</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-sortpkgs</> + <arg><option>-hvs</></arg> + <arg><option>-o=<replaceable/config string/</></arg> + <arg><option>-c=<replaceable/file/</></arg> + <arg choice="plain" rep="repeat"><replaceable>file</replaceable></arg> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> + <command/apt-sortpkgs/ will take an index file (Source index or Package + index) and sort the records so that they are ordered by the package name. + It will also sort the internal fields of each record according to the + internal sorting rules. + + <para> + All output is sent to stdout, the input must be a seekable file. + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-s/</><term><option/--source/</> + <ListItem><Para> + Use Source index field ordering. + Configuration Item: <literal/APT::SortPkgs::Source/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command/apt-sortpkgs/ returns zero on normal operation, decimal 100 on error. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/apt.conf.5 b/apt/doc/apt.conf.5 deleted file mode 100644 index 3e27266..0000000 --- a/apt/doc/apt.conf.5 +++ /dev/null @@ -1,290 +0,0 @@ -.TH "apt\&.conf" "5" "25 Oct 2000" "apt" "" -.SH "NAME" -apt\&.conf \- configuration file for APT -.PP -.SH "DESCRIPTION" -\fBapt\&.conf\fP is the main configuration file for the APT suite of -tools, all tools make use of the configuration file and a common command line -parser to provide a uniform environment\&. When an APT tool starts up it will -read \fB/etc/apt/apt\&.conf\fP, then read the configuration specified by the -\fB$APT_CONFIG\fP environment variable and then finally apply the command line -options to override the configuration directives, possibly loading more -config files\&. -.PP -The configuration file is organized in a tree with options organized into -functional groups\&. Option specification is given with a double colon -notation, for instance \fIAPT::Get::Assume-Yes\fP is an option within the -APT tool group, for the Get tool\&. Options do not inherit from their parent -groups\&. -.PP -Syntacticly the configuration language is modeled after what the ISC tools -such as bind and dhcp use\&. Each line is of the form -.RS -APT::Get::Assume-Yes "true"; -.RE -The trailing semicolon is required and -the quotes are optional\&. A new \fIscope\fP can be opened with curly braces, -like: - -.nf - -APT { - Get { - Assume-Yes "true"; - Fix-Broken "true"; - }; -}; - -.fi - - -with newlines placed to make -it more readable\&. Lists can be created by opening a scope an including a -single word enclosed in quotes followed by a semicolon\&. -In general the sample configuration file in -\fI/usr/doc/apt/examples/apt\&.conf\fP and -\fI/usr/doc/apt/examples/configure-index\fP -(or \fI/usr/share/doc/apt*/examples/configure-index\fP in Conectiva) -is a good guide for how it should look\&. -.PP -All of the APT tools take a -o option which allows an arbitary configuration -directive to be specified on the command line\&. The syntax is a full option -name (APT::Get::Assume-Yes for instance) followed by an equals sign then the -new value of the option\&. Lists can be appended too by adding a trailing :: -to the list name\&. -.PP -.SH "The APT Group" -This group of options controls general APT behavoir as well as holding the -options for all of the tools\&. -.PP -.IP "\fBArchitecture\fP" -System Architecture; sets the architecture to use when fetching files and -parsing package lists\&. The internal default is the architecture apt was -compiled for\&. -.IP -.IP "\fBIgnore-Hold\fP" -Ignore Held packages; This global options causes the problem resolver to -ignore held packages in its decision making\&. -.IP -.IP "\fBClean-Installed\fP" -Defaults to on\&. When turned on the autoclean feature will remove any package -which can no longer be downloaded from the cache\&. If turned off then -packages that are locally installed are also excluded from cleaning - but -note that APT provides no direct means to reinstall them\&. -.IP -.IP "\fBImmediate-Configure\fP" -Disable Immedate Configuration; This dangerous option disables some -of APT\'s ordering code to cause it to make fewer dpkg calls\&. Doing -so may be necessary on some extremely slow single user systems but -is very dangerous and may cause package install scripts to fail or worse\&. -Use at your own risk\&. This option does not have any effect on RPM based -systems\&. -.IP -.IP "\fBForce-LoopBreak\fP" -Never Enable this option unless you -really- know what you are doing\&. It -permits APT to temporarily remove an essential package to break a -Conflicts/Conflicts or Conflicts/Pre-Depend loop between two essential -packages\&. SUCH A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG\&. This option will -work if the essential packages are not tar, gzip, libc, dpkg, bash or -anything that those packages depend on\&. -.IP -.IP "\fBCache-Limit\fP" -APT uses a fixed size memory mapped cache file to store the \'available\' -information\&. This sets the size of that cache\&. -.IP -.IP "\fBGet\fP" -The Get subsection controls the \fBapt-get(8)\fP tool, please see its -documentation for more information about the options here\&. -.IP -.IP "\fBCache\fP" -The Cache subsection controls the \fBapt-cache(8)\fP tool, please see its -documentation for more information about the options here\&. -.IP -.IP "\fBCDROM\fP" -The CDROM subsection controls the \fBapt-cdrom(8)\fP tool, please see its -documentation for more information about the options here\&. -.IP -.PP -.SH "The Acquire Group" -The \fBAcquire\fP group of options controls the download of packages and the -URI handlers\&. -.PP -.IP "\fBQueue-Mode\fP" -Queuing mode; \fBQueue-Mode\fP can be one of \fBhost\fP or \fBaccess\fP which -determins how APT parallelizes outgoing connections\&. \fBhost\fP means that -one connection per target host will be opened, \fBaccess\fP means that one -connection per URI type will be opened\&. -.IP -.IP "\fBRetries\fP" -Number of retries to perform\&. If this is non-zero apt will retry failed -files the given number of times\&. -.IP -.IP "\fBSource-Symlinks\fP" -Use symlinks for source archives\&. If set to true then source archives will -be symlinked when possible instead of copying\&. True is the default -.IP -.IP "\fBhttp\fP" -HTTP URIs; http::Proxy is the default http proxy to use\&. It is in the standard -form of \fIhttp://[[user][:pass]@]host[:port]/\fP\&. Per host proxies can also -be specified by using the form http::Proxy::<host> with the special keyword -\fIDIRECT\fP meaning to use no proxies\&. The \fI$http_proxy\fP environment variable -will override all settings\&. -.IP -Three settings are provided for cache control with HTTP/1\&.1 complient proxy -caches\&. \fBNo-Cache\fP tells the proxy to not used its cached response under -any circumstances, \fBMax-Age\fP is sent only for index files and tells the -cache to refresh its object if it is older than the given number of seconds\&. -Debian updates its index files daily so the default is 1 day\&. \fBNo-Store\fP -specifies that the cache should never store this request, it is only -set for archive files\&. This may be usefull to prevent polluting a proxy cache -with very large \&.deb files\&. Note: Squid 2\&.0\&.2 does not support any of -these options\&. -.IP -The option \fBtimeout\fP sets the timeout timer used by the method, this -applies to all things including connection timeout and data timeout\&. -.IP -One setting is provided to control the pipeline depth in cases where the -remote server is not RFC conforming or buggy (such as Squid 2\&.0\&.2) -Acquire::http::Pipeline-Depth can be a value from 0 to 5 indicating how many -outstanding requests APT should send\&. -.IP -.IP "\fBftp\fP" -FTP URis; ftp::Proxy is the default proxy server to use\&. It is in the -standard form of \fIftp://[[user][:pass]@]host[:port]/\fP and is overriden -by the ftp_proxy environment variable\&. To use a ftp proxy you will have to -set the ftp::ProxyLogin script in the configuration file\&. This entry -specifies the commands to send to tell the proxy server what to connect -to\&. Please see \fI/usr/doc/apt/examples/configure-index\fP for an example of how -to do this\&. The subsitution variables available are $(PROXY_USER), -$(PROXY_PASS), $(SITE_USER), $(SITE_PASS), $(SITE), and $(SITE_PORT)\&. -Each is taken from it\'s respective URI component\&. -.IP -The option \fBtimeout\fP sets the timeout timer used by the method, this -applies to all things including connection timeout and data timeout\&. -.IP -Several settings are provided to control passive mode\&. Generally it is safe -to leave passive mode on, it works in nearly every environment\&. However some -situations require that passive mode be disabled and port mode ftp used -instead\&. This can be done globally, for connections that go through a proxy -or for a specific host (See the sample config file for examples) -.IP -It is possible to proxy FTP over HTTP by setting the \fIftp_proxy\fP -environment variable to a http url - see the discussion of the http method -above for syntax\&. You cannot set this in the configuration file and it is -not recommended to use FTP over HTTP due to its low efficiency\&. -.IP -.IP "\fBcdrom\fP" -CDROM URIs; the only setting for CDROM URIs is the mount point, cdrom::Mount -which must be the mount point for the CDROM drive as specified in /etc/fstab\&. -It is possible to provide alternate mount and unmount commands if your -mount point cannot be listed in the fstab (such as an SMB mount)\&. The syntax -is to put "/cdrom/"::Mount "foo"; within the cdrom block\&. It is important to -have the trailing slash\&. Unmount commands can be specified using UMount\&. -.IP -.PP -.SH "Directories" -The \fBDir::State\fP section has directories that pertain to local state -information\&. \fBlists\fP is the directory to place downloaded package lists -in and \fBstatus\fP is the name of the dpkg status file\&. \fBDir::State\fP -contains the default directory to prefix on all sub items if they do not -start with \fI/\fP or \fI\&./\fP\&. \fBxstatus\fP and \fBuserstatus\fP are for future -use\&. -.PP -\fBDir::Cache\fP contains locations pertaining to local cache information, such -as the two package caches \fBsrcpkgcache\fP and \fBpkgcache\fP as well as the -location to place downloaded archives, \fBDir::Cache::archives\fP\&. Like -\fBDir::State\fP the default directory is contained in \fBDir::Cache\fP -.PP -\fBDir::Etc\fP contains the location of configuration files, \fBsourcelist\fP -gives the location of the sourcelist and \fBmain\fP is the default configuration -file (setting has no effect) -.PP -Binary programs are pointed to by \fBDir::Bin\fP\&. \fBmethods\fP specifies the -location of the method handlers and \fBgzip\fP, \fBdpkg\fP, \fBrpm\fP, -\fBapt-get\fP, \fBdpkg-source\fP, \fBdpkg-buildpackage\fP and -\fBapt-cache\fP specify the location of the respective programs\&. -.PP -.SH "APT in DSelect" -When APT is used as a \fBdselect(8)\fP method several configuration directives -control the default behavoir\&. These are in the \fBDSelect\fP section\&. -.PP -.IP "\fBClean\fP" -Cache Clean mode; this value may be one of always, auto, prompt and never\&. -always will remove all archives after they have been downloaded while auto -will only remove things that are no longer downloadable (replaced with a new -version for instance) -.IP -.IP "\fBOptions\fP" -The contents of this variable is passed to \fBapt-get(8)\fP as command line -options when it is run for the install phase\&. -.IP -.IP "\fBUpdateOptions\fP" -The contents of this variable is passed to \fBapt-get(8)\fP as command line -options when it is run for the update phase\&. -.IP -.IP "\fBPromptAfterUpdate\fP" -If true the [U]pdate operation in dselect will always prompt to continue\&. -The default is to prompt only on error\&. -.PP -.SH "How APT calls DPkg" -Several configuration directives control how APT invokes dpkg\&. These are in -the \fBDPkg\fP section\&. -.PP -.IP "\fBOptions\fP" -This is a list of options to pass to dpkg\&. The options must be specified -using the list notation and each list item is passed as a single arugment -to dpkg\&. -.IP -.IP "\fBPre-Invoke\fP, \fBPost-Invoke\fP" -This is a list of shell commands to run before/after invoking dpkg\&. Like -\fBOptions\fP this must be specified in list notation\&. The commands -are invoked in order using /bin/sh, should any fail APT will abort\&. -.IP -.IP "\fBPre-Install-Pkgs\fP" -This is a list of shell commands to run before invoking dpkg\&. Like -\fBOptions\fP this must be specified in list notation\&. The commands -are invoked in order using /bin/sh, should any fail APT will abort\&. -Apt will pass to the commands on standard input the filenames of all -\&.deb files it is going to install, one per line\&. -.IP -.IP "\fBRun-Directory\fP" -APT chdirs to this directory before invoking dpkg, the default is /\&. -.IP -.IP "\fBBuild-Options\fP" -These options are passed to dpkg-buildpackage when compiling packages, -the default is to disable signing and produce all binaries\&. -.IP -.PP -.SH "Debug Options" -Most of the options in the \fBdebug\fP section are not interesting to the -normal user, however \fBDebug::pkgProblemResolver\fP shows interesting -output about the decisions dist-upgrade makes\&. \fBDebug::NoLocking\fP -disables file locking so apt can do some operations as non-root and -\fBDebug::pkgDPkgPM\fP (or \fBDebug::pkgRPMPM\fP) will print out the -command line for each dpkg invokation\&. \fBDebug::IdentCdrom\fP will -disable the inclusion of statfs data in CDROM IDs\&. -.PP -.SH "EXAMPLES" -\fB/usr/doc/apt/examples/configure-index\&.gz\fP or -\fB/usr/share/doc/apt*/configure-index\fP -contains a sample configuration -file showing the default values for all possible options\&. -.PP -.SH "FILES" -/etc/apt/apt\&.conf -.PP -.SH "SEE ALSO" -apt-cache (8), -apt-get (8) -.PP -.SH "BUGS" -See http://bugs\&.debian\&.org/apt\&. If you wish to report a -bug in \fBapt-get\fP, please see \fB/usr/doc/debian/bug-reporting\&.txt\fP -or the \fBbug(1)\fP command\&. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt-get was written by the APT team <apt@packages\&.debian\&.org> -and ported to RPM based systems by -Alfredo K. Kojima, Conectiva S.A. <kojima@conectiva\&.com\&.br>\&. - diff --git a/apt/doc/apt.conf.5.sgml b/apt/doc/apt.conf.5.sgml new file mode 100644 index 0000000..562dd72 --- /dev/null +++ b/apt/doc/apt.conf.5.sgml @@ -0,0 +1,414 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt.conf</> + <manvolnum>5</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt.conf</> + <refpurpose>Configuration file for APT</> + </refnamediv> + + <RefSect1><Title>Description</> + <para> + <filename/apt.conf/ is the main configuration file for the APT suite of + tools, all tools make use of the configuration file and a common command line + parser to provide a uniform environment. When an APT tool starts up it will + read the configuration specified by the <envar/APT_CONFIG/ environment + variable (if any) and then read the files in <literal/Dir::Etc::Parts/ + then read the main configuration file specified by + <literal/Dir::Etc::main/ then finally apply the + command line options to override the configuration directives, possibly + loading even more config files. + <para> + The configuration file is organized in a tree with options organized into + functional groups. Option specification is given with a double colon + notation, for instance <literal/APT::Get::Assume-Yes/ is an option within + the APT tool group, for the Get tool. Options do not inherit from their + parent groups. + <para> + Syntacticly the configuration language is modeled after what the ISC tools + such as bind and dhcp use. Each line is of the form + <literallayout>APT::Get::Assume-Yes "true";</literallayout> The trailing + semicolon is required and the quotes are optional. A new scope can be + opened with curly braces, like: +<informalexample><programlisting> +APT { + Get { + Assume-Yes "true"; + Fix-Broken "true"; + }; +}; +</programlisting></informalexample> + with newlines placed to make it more readable. Lists can be created by + opening a scope and including a single word enclosed in quotes followed by a + semicolon. Multiple entries can be included, each seperated by a semicolon. +<informalexample><programlisting> +DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; +</programlisting></informalexample> + <para> + In general the sample configuration file in + <filename>&docdir;/examples/apt.conf</> &configureindex; + is a good guide for how it should look. + <para> + Two specials are allowed, <literal/#include/ and <literal/#clear/. + <literal/#include/ will include the given file, unless the filename + ends in a slash, then the whole directory is included. + <literal/#clear/ is used to erase a list of names. + <para> + All of the APT tools take a -o option which allows an arbitary configuration + directive to be specified on the command line. The syntax is a full option + name (<literal/APT::Get::Assume-Yes/ for instance) followed by an equals + sign then the new value of the option. Lists can be appended too by adding + a trailing :: to the list name. + </RefSect1> + + <RefSect1><Title>The APT Group</> + <para> + This group of options controls general APT behavior as well as holding the + options for all of the tools. + + <VariableList> + <VarListEntry><Term>Architecture</Term> + <ListItem><Para> + System Architecture; sets the architecture to use when fetching files and + parsing package lists. The internal default is the architecture apt was + compiled for. + </VarListEntry> + + <VarListEntry><Term>Ignore-Hold</Term> + <ListItem><Para> + Ignore Held packages; This global option causes the problem resolver to + ignore held packages in its decision making. + </VarListEntry> + + <VarListEntry><Term>Clean-Installed</Term> + <ListItem><Para> + Defaults to on. When turned on the autoclean feature will remove any pacakges + which can no longer be downloaded from the cache. If turned off then + packages that are locally installed are also excluded from cleaning - but + note that APT provides no direct means to reinstall them. + </VarListEntry> + + <VarListEntry><Term>Immediate-Configure</Term> + <ListItem><Para> + Disable Immedate Configuration; This dangerous option disables some + of APT's ordering code to cause it to make fewer dpkg calls. Doing + so may be necessary on some extremely slow single user systems but + is very dangerous and may cause package install scripts to fail or worse. + Use at your own risk. + </VarListEntry> + + <VarListEntry><Term>Force-LoopBreak</Term> + <ListItem><Para> + Never Enable this option unless you -really- know what you are doing. It + permits APT to temporarily remove an essential package to break a + Conflicts/Conflicts or Conflicts/Pre-Depend loop between two essential + packages. SUCH A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG. This option + will work if the essential packages are not tar, gzip, libc, dpkg, bash or + anything that those packages depend on. + </VarListEntry> + + <VarListEntry><Term>Cache-Limit</Term> + <ListItem><Para> + APT uses a fixed size memory mapped cache file to store the 'available' + information. This sets the size of that cache. + </VarListEntry> + + <VarListEntry><Term>Build-Essential</Term> + <ListItem><Para> + Defines which package(s) are considered essential build dependencies. + </VarListEntry> + + <VarListEntry><Term>Get</Term> + <ListItem><Para> + The Get subsection controls the &apt-get; tool, please see its + documentation for more information about the options here. + </VarListEntry> + + <VarListEntry><Term>Cache</Term> + <ListItem><Para> + The Cache subsection controls the &apt-cache; tool, please see its + documentation for more information about the options here. + </VarListEntry> + + <VarListEntry><Term>CDROM</Term> + <ListItem><Para> + The CDROM subsection controls the &apt-cdrom; tool, please see its + documentation for more information about the options here. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>The Acquire Group</> + <para> + The <literal/Acquire/ group of options controls the download of packages + and the URI handlers. + + <VariableList> + <VarListEntry><Term>Queue-Mode</Term> + <ListItem><Para> + Queuing mode; <literal/Queue-Mode/ can be one of <literal/host/ or + <literal/access/ which determines how APT parallelizes outgoing + connections. <literal/host/ means that one connection per target host + will be opened, <literal/access/ means that one connection per URI type + will be opened. + </VarListEntry> + + <VarListEntry><Term>Retries</Term> + <ListItem><Para> + Number of retries to perform. If this is non-zero APT will retry failed + files the given number of times. + </VarListEntry> + + <VarListEntry><Term>Source-Symlinks</Term> + <ListItem><Para> + Use symlinks for source archives. If set to true then source archives will + be symlinked when possible instead of copying. True is the default + </VarListEntry> + + <VarListEntry><Term>http</Term> + <ListItem><Para> + HTTP URIs; http::Proxy is the default http proxy to use. It is in the + standard form of <literal>http://[[user][:pass]@]host[:port]/</>. Per + host proxies can also be specified by using the form + <literal/http::Proxy::<host>/ with the special keyword <literal/DIRECT/ + meaning to use no proxies. The <envar/http_proxy/ environment variable + will override all settings. + <para> + Three settings are provided for cache control with HTTP/1.1 complient + proxy caches. <literal/No-Cache/ tells the proxy to not use its cached + response under any circumstances, <literal/Max-Age/ is sent only for + index files and tells the cache to refresh its object if it is older than + the given number of seconds. Debian updates its index files daily so the + default is 1 day. <literal/No-Store/ specifies that the cache should never + store this request, it is only set for archive files. This may be useful + to prevent polluting a proxy cache with very large .deb files. Note: + Squid 2.0.2 does not support any of these options. + <para> + The option <literal/timeout/ sets the timeout timer used by the method, + this applies to all things including connection timeout and data timeout. + <para> + One setting is provided to control the pipeline depth in cases where the + remote server is not RFC conforming or buggy (such as Squid 2.0.2) + <literal/Acquire::http::Pipeline-Depth/ can be a value from 0 to 5 + indicating how many outstanding requests APT should send. A value of + zero MUST be specified if the remote host does not properly linger + on TCP connections - otherwise data corruption will occur. Hosts which + require this are in violation of RFC 2068. + </VarListEntry> + + <VarListEntry><Term>ftp</Term> + <ListItem><Para> + FTP URIs; ftp::Proxy is the default proxy server to use. It is in the + standard form of <literal>ftp://[[user][:pass]@]host[:port]/</> and is + overriden by the <envar/ftp_proxy/ environment variable. To use a ftp + proxy you will have to set the <literal/ftp::ProxyLogin/ script in the + configuration file. This entry specifies the commands to send to tell + the proxy server what to connect to. Please see + &configureindex; for an example of + how to do this. The subsitution variables available are + <literal/$(PROXY_USER)/, <literal/$(PROXY_PASS)/, <literal/$(SITE_USER)/, + <literal/$(SITE_PASS)/, <literal/$(SITE)/, and <literal/$(SITE_PORT)/. + Each is taken from it's respective URI component. + <para> + The option <literal/timeout/ sets the timeout timer used by the method, + this applies to all things including connection timeout and data timeout. + <para> + Several settings are provided to control passive mode. Generally it is + safe to leave passive mode on, it works in nearly every environment. + However some situations require that passive mode be disabled and port + mode ftp used instead. This can be done globally, for connections that + go through a proxy or for a specific host (See the sample config file + for examples) + <para> + It is possible to proxy FTP over HTTP by setting the <envar/ftp_proxy/ + environment variable to a http url - see the discussion of the http method + above for syntax. You cannot set this in the configuration file and it is + not recommended to use FTP over HTTP due to its low efficiency. + <para> + The setting <literal/ForceExtended/ controls the use of RFC2428 + <literal/EPSV/ and <literal/EPRT/ commands. The defaut is false, which means + these commands are only used if the control connection is IPv6. Setting this + to true forces their use even on IPv4 connections. Note that most FTP servers + do not support RFC2428. + </VarListEntry> + + <VarListEntry><Term>cdrom</Term> + <ListItem><Para> + CDROM URIs; the only setting for CDROM URIs is the mount point, + <literal/cdrom::Mount/ which must be the mount point for the CDROM drive + as specified in <filename>/etc/fstab</>. It is possible to provide + alternate mount and unmount commands if your mount point cannot be listed + in the fstab (such as an SMB mount and old mount packages). The syntax + is to put <literallayout>"/cdrom/"::Mount "foo";</literallayout> within + the cdrom block. It is important to have the trailing slash. Unmount + commands can be specified using UMount. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Directories</> + <para> + The <literal/Dir::State/ section has directories that pertain to local + state information. <literal/lists/ is the directory to place downloaded + package lists in and <literal/status/ is the name of the dpkg status file. + <literal/preferences/ is the name of the APT preferences file. + <literal/Dir::State/ contains the default directory to prefix on all sub + items if they do not start with <filename>/</> or <filename>./</>. + <para> + <literal/Dir::Cache/ contains locations pertaining to local cache + information, such as the two package caches <literal/srcpkgcache/ and + <literal/pkgcache/ as well as the location to place downloaded archives, + <literal/Dir::Cache::archives/. Generation of caches can be turned off + by setting their names to be blank. This will slow down startup but + save disk space. It is probably prefered to turn off the pkgcache rather + than the srcpkgcache. Like <literal/Dir::State/ the default + directory is contained in <literal/Dir::Cache/ + <para> + <literal/Dir::Etc/ contains the location of configuration files, + <literal/sourcelist/ gives the location of the sourcelist and + <literal/main/ is the default configuration file (setting has no effect, + unless it is done from the config file specified by + <envar/APT_CONFIG/). + <para> + The <literal/Dir::Parts/ setting reads in all the config fragments in + lexical order from the directory specified. After this is done then the + main config file is loaded. + <para> + Binary programs are pointed to by <literal/Dir::Bin/. <literal/methods/ + specifies the location of the method handlers and <literal/gzip/, + <literal/dpkg/, <literal/apt-get/, <literal/dpkg-source/, + <literal/dpkg-buildpackage/ and <literal/apt-cache/ specify the location + of the respective programs. + </RefSect1> + + <RefSect1><Title>APT in DSelect</> + <para> + When APT is used as a &dselect; method several configuration directives + control the default behaviour. These are in the <literal/DSelect/ section. + + <VariableList> + <VarListEntry><Term>Clean</Term> + <ListItem><Para> + Cache Clean mode; this value may be one of always, prompt, auto, + pre-auto and never. always and prompt will remove all packages from + the cache after upgrading, prompt (the default) does so conditionally. + auto removes only those packages which are no longer downloadable + (replaced with a new version for instance). pre-auto performs this + action before downloading new packages. + </VarListEntry> + + <VarListEntry><Term>Options</Term> + <ListItem><Para> + The contents of this variable is passed to &apt-get; as command line + options when it is run for the install phase. + </VarListEntry> + + <VarListEntry><Term>UpdateOptions</Term> + <ListItem><Para> + The contents of this variable is passed to &apt-get; as command line + options when it is run for the update phase. + </VarListEntry> + + <VarListEntry><Term>PromptAfterUpdate</Term> + <ListItem><Para> + If true the [U]pdate operation in &dselect; will always prompt to continue. + The default is to prompt only on error. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>How APT calls dpkg</> + <para> + Several configuration directives control how APT invokes &dpkg;. These are + in the <literal/DPkg/ section. + + <VariableList> + <VarListEntry><Term>Options</Term> + <ListItem><Para> + This is a list of options to pass to dpkg. The options must be specified + using the list notation and each list item is passed as a single argument + to &dpkg;. + </VarListEntry> + + <VarListEntry><Term>Pre-Invoke</Term><Term>Post-Invoke</Term> + <ListItem><Para> + This is a list of shell commands to run before/after invoking &dpkg;. + Like <literal/Options/ this must be specified in list notation. The + commands are invoked in order using <filename>/bin/sh</>, should any + fail APT will abort. + </VarListEntry> + + <VarListEntry><Term>Pre-Install-Pkgs</Term> + <ListItem><Para> + This is a list of shell commands to run before invoking dpkg. Like + <literal/Options/ this must be specified in list notation. The commands + are invoked in order using <filename>/bin/sh</>, should any fail APT + will abort. APT will pass to the commands on standard input the + filenames of all .deb files it is going to install, one per line. + <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 2 is enabled by setting + <literal/DPkg::Tools::Options::cmd::Version/ to 2. <literal/cmd/ is a + command given to <literal/Pre-Install-Pkgs/. + </VarListEntry> + + <VarListEntry><Term>Run-Directory</Term> + <ListItem><Para> + APT chdirs to this directory before invoking dpkg, the default is + <filename>/</>. + </VarListEntry> + + <VarListEntry><Term>Build-Options</Term> + <ListItem><Para> + These options are passed to &dpkg-buildpackage; when compiling packages, + the default is to disable signing and produce all binaries. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Debug Options</> + <para> + Most of the options in the <literal/debug/ section are not interesting to + the normal user, however <literal/Debug::pkgProblemResolver/ shows + interesting output about the decisions dist-upgrade makes. + <literal/Debug::NoLocking/ disables file locking so APT can do some + operations as non-root and <literal/Debug::pkgDPkgPM/ will print out the + command line for each dpkg invokation. <literal/Debug::IdentCdrom/ will + disable the inclusion of statfs data in CDROM IDs. + </RefSect1> + + <RefSect1><Title>Examples</> + <para> + &configureindex; contains a + sample configuration file showing the default values for all possible + options. + </RefSect1> + + <RefSect1><Title>Files</> + <para> + <filename>/etc/apt/apt.conf</> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &apt-cache;, &apt-config;<!-- ? reading apt.conf -->, &apt-preferences;. + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/apt.conf.5.yo b/apt/doc/apt.conf.5.yo deleted file mode 100644 index d075980..0000000 --- a/apt/doc/apt.conf.5.yo +++ /dev/null @@ -1,282 +0,0 @@ -mailto(apt@packages.debian.org) -manpage(apt.conf)(5)(5 Dec 1998)(apt)() -manpagename(apt.conf)(configuration file for APT) - -manpagedescription() -bf(apt.conf) is the main configuration file for the APT suite of -tools, all tools make use of the configuration file and a common command line -parser to provide a uniform environment. When an APT tool starts up it will -read bf(/etc/apt/apt.conf), then read the configuration specified by the -bf($APT_CONFIG) environment variable and then finally apply the command line -options to override the configuration directives, possibly loading more -config files. - -The configuration file is organized in a tree with options organized into -functional groups. Option specification is given with a double colon -notation, for instance em(APT::Get::Assume-Yes) is an option within the -APT tool group, for the Get tool. Options do not inherit from their parent -groups. - -Syntacticly the configuration language is modeled after what the ISC tools -such as bind and dhcp use. Each line is of the form -quote(APT::Get::Assume-Yes "true";) The trailing semicolon is required and -the quotes are optional. A new em(scope) can be opened with curly braces, -like: -verb(APT { - Get { - Assume-Yes "true"; - Fix-Broken "true"; - }; -}; -) -with newlines placed to make -it more readable. Lists can be created by opening a scope an including a -single word enclosed in quotes followed by a semicolon. -In general the sample configuration file in -em(/usr/doc/apt/examples/apt.conf) and -em(/usr/doc/apt/examples/configure-index) -is a good guide for how it should look. - -All of the APT tools take a -o option which allows an arbitary configuration -directive to be specified on the command line. The syntax is a full option -name (APT::Get::Assume-Yes for instance) followed by an equals sign then the -new value of the option. Lists can be appended too by adding a trailing :: -to the list name. - -manpagesection(The APT Group) -This group of options controls general APT behavoir as well as holding the -options for all of the tools. - -startdit() -dit(bf(Architecture)) -System Architecture; sets the architecture to use when fetching files and -parsing package lists. The internal default is the architecture apt was -compiled for. - -dit(bf(Ignore-Hold)) -Ignore Held packages; This global options causes the problem resolver to -ignore held packages in its decision making. - -dit(bf(Clean-Installed)) -Defaults to on. When turned on the autoclean feature will remove any pacakge -which can no longer be downloaded from the cache. If turned off then -packages that are locally installed are also excluded from cleaning - but -note that APT provides no direct means to reinstall them. - -dit(bf(Immediate-Configure)) -Disable Immedate Configuration; This dangerous option disables some -of APT's ordering code to cause it to make fewer dpkg calls. Doing -so may be necessary on some extremely slow single user systems but -is very dangerous and may cause package install scripts to fail or worse. -Use at your own risk. - -dit(bf(Force-LoopBreak)) -Never Enable this option unless you -really- know what you are doing. It -permits APT to temporarily remove an essential package to break a -Conflicts/Conflicts or Conflicts/Pre-Depend loop between two essential -packages. SUCH A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG. This option will -work if the essential packages are not tar, gzip, libc, dpkg, bash or -anything that those packages depend on. - -dit(bf(Cache-Limit)) -APT uses a fixed size memory mapped cache file to store the 'available' -information. This sets the size of that cache. - -dit(bf(Get)) -The Get subsection controls the bf(apt-get(8)) tool, please see its -documentation for more information about the options here. - -dit(bf(Cache)) -The Cache subsection controls the bf(apt-cache(8)) tool, please see its -documentation for more information about the options here. - -dit(bf(CDROM)) -The CDROM subsection controls the bf(apt-cdrom(8)) tool, please see its -documentation for more information about the options here. - -enddit() - -manpagesection(The Acquire Group) -The bf(Acquire) group of options controls the download of packages and the -URI handlers. - -startdit() -dit(bf(Queue-Mode)) -Queuing mode; bf(Queue-Mode) can be one of bf(host) or bf(access) which -determins how APT parallelizes outgoing connections. bf(host) means that -one connection per target host will be opened, bf(access) means that one -connection per URI type will be opened. - -dit(bf(Retries)) -Number of retries to perform. If this is non-zero apt will retry failed -files the given number of times. - -dit(bf(Source-Symlinks)) -Use symlinks for source archives. If set to true then source archives will -be symlinked when possible instead of copying. True is the default - -dit(bf(http)) -HTTP URIs; http::Proxy is the default http proxy to use. It is in the standard -form of em(http://[[user][:pass]@]host[:port]/). Per host proxies can also -be specified by using the form http::Proxy::<host> with the special keyword -em(DIRECT) meaning to use no proxies. The em($http_proxy) environment variable -will override all settings. - -Three settings are provided for cache control with HTTP/1.1 complient proxy -caches. bf(No-Cache) tells the proxy to not used its cached response under -any circumstances, bf(Max-Age) is sent only for index files and tells the -cache to refresh its object if it is older than the given number of seconds. -Debian updates its index files daily so the default is 1 day. bf(No-Store) -specifies that the cache should never store this request, it is only -set for archive files. This may be usefull to prevent polluting a proxy cache -with very large .deb files. Note: Squid 2.0.2 does not support any of -these options. - -The option bf(timeout) sets the timeout timer used by the method, this -applies to all things including connection timeout and data timeout. - -One setting is provided to control the pipeline depth in cases where the -remote server is not RFC conforming or buggy (such as Squid 2.0.2) -Acquire::http::Pipeline-Depth can be a value from 0 to 5 indicating how many -outstanding requests APT should send. - -dit(bf(ftp)) -FTP URis; ftp::Proxy is the default proxy server to use. It is in the -standard form of em(ftp://[[user][:pass]@]host[:port]/) and is overriden -by the ftp_proxy environment variable. To use a ftp proxy you will have to -set the ftp::ProxyLogin script in the configuration file. This entry -specifies the commands to send to tell the proxy server what to connect -to. Please see em(/usr/doc/apt/examples/configure-index) for an example of how -to do this. The subsitution variables available are $(PROXY_USER), -$(PROXY_PASS), $(SITE_USER), $(SITE_PASS), $(SITE), and $(SITE_PORT). -Each is taken from it's respective URI component. - -The option bf(timeout) sets the timeout timer used by the method, this -applies to all things including connection timeout and data timeout. - -Several settings are provided to control passive mode. Generally it is safe -to leave passive mode on, it works in nearly every environment. However some -situations require that passive mode be disabled and port mode ftp used -instead. This can be done globally, for connections that go through a proxy -or for a specific host (See the sample config file for examples) - - -It is possible to proxy FTP over HTTP by setting the em(ftp_proxy) -environment variable to a http url - see the discussion of the http method -above for syntax. You cannot set this in the configuration file and it is -not recommended to use FTP over HTTP due to its low efficiency. - -dit(bf(cdrom)) -CDROM URIs; the only setting for CDROM URIs is the mount point, cdrom::Mount -which must be the mount point for the CDROM drive as specified in /etc/fstab. -It is possible to provide alternate mount and unmount commands if your -mount point cannot be listed in the fstab (such as an SMB mount). The syntax -is to put "/cdrom/"::Mount "foo"; within the cdrom block. It is important to -have the trailing slash. Unmount commands can be specified using UMount. - -enddit() - -manpagesection(Directories) -The bf(Dir::State) section has directories that pertain to local state -information. bf(lists) is the directory to place downloaded package lists -in and bf(status) is the name of the dpkg status file. bf(Dir::State) -contains the default directory to prefix on all sub items if they do not -start with em(/) or em(./). bf(xstatus) and bf(userstatus) are for future -use. - -bf(Dir::Cache) contains locations pertaining to local cache information, such -as the two package caches bf(srcpkgcache) and bf(pkgcache) as well as the -location to place downloaded archives, bf(Dir::Cache::archives). Like -bf(Dir::State) the default directory is contained in bf(Dir::Cache) - -bf(Dir::Etc) contains the location of configuration files, bf(sourcelist) -gives the location of the sourcelist and bf(main) is the default configuration -file (setting has no effect) - -Binary programs are pointed to by bf(Dir::Bin). bf(methods) specifies the -location of the method handlers and bf(gzip), bf(dpkg), bf(apt-get), -bf(dpkg-source), bf(dpkg-buildpackage) and -bf(apt-cache) specify the location of the respective programs. - -manpagesection(APT in DSelect) -When APT is used as a bf(dselect(8)) method several configuration directives -control the default behavoir. These are in the bf(DSelect) section. - -startdit() -dit(bf(Clean)) -Cache Clean mode; this value may be one of always, auto, prompt and never. -always will remove all archives after they have been downloaded while auto -will only remove things that are no longer downloadable (replaced with a new -version for instance) - -dit(bf(Options)) -The contents of this variable is passed to bf(apt-get(8)) as command line -options when it is run for the install phase. - -dit(bf(UpdateOptions)) -The contents of this variable is passed to bf(apt-get(8)) as command line -options when it is run for the update phase. - -dit(bf(PromptAfterUpdate)) -If true the [U]pdate operation in dselect will always prompt to continue. -The default is to prompt only on error. -enddit() - -manpagesection(How APT calls DPkg) -Several configuration directives control how APT invokes dpkg. These are in -the bf(DPkg) section. - -startdit() -dit(bf(Options)) -This is a list of options to pass to dpkg. The options must be specified -using the list notation and each list item is passed as a single arugment -to dpkg. - -dit(bf(Pre-Invoke), bf(Post-Invoke)) -This is a list of shell commands to run before/after invoking dpkg. Like -bf(Options) this must be specified in list notation. The commands -are invoked in order using /bin/sh, should any fail APT will abort. - -dit(bf(Pre-Install-Pkgs)) -This is a list of shell commands to run before invoking dpkg. Like -bf(Options) this must be specified in list notation. The commands -are invoked in order using /bin/sh, should any fail APT will abort. -Apt will pass to the commands on standard input the filenames of all -.deb files it is going to install, one per line. - -dit(bf(Run-Directory)) -APT chdirs to this directory before invoking dpkg, the default is /. - -dit(bf(Build-Options)) -These options are passed to dpkg-buildpackage when compiling packages, -the default is to disable signing and produce all binaries. - -enddit() - -manpagesection(Debug Options) -Most of the options in the bf(debug) section are not interesting to the -normal user, however bf(Debug::pkgProblemResolver) shows interesting -output about the decisions dist-upgrade makes. bf(Debug::NoLocking) -disables file locking so apt can do some operations as non-root and -bf(Debug::pkgDPkgPM) will print out the command line for each dpkg -invokation. bf(Debug::IdentCdrom) will disable the inclusion of statfs -data in CDROM IDs. - -manpagesection(EXAMPLES) -bf(/usr/doc/apt/examples/configure-index.gz) contains a sample configuration -file showing the default values for all possible options. - -manpagesection(FILES) -/etc/apt/apt.conf - -manpageseealso() -apt-cache (8), -apt-get (8) - -manpagebugs() -See http://bugs.debian.org/apt. If you wish to report a -bug in bf(apt-get), please see bf(/usr/doc/debian/bug-reporting.txt) -or the bf(bug(1)) command. - -manpageauthor() -apt-get was written by the APT team <apt@packages.debian.org>. diff --git a/apt/doc/apt.ent b/apt/doc/apt.ent new file mode 100644 index 0000000..e980e0a --- /dev/null +++ b/apt/doc/apt.ent @@ -0,0 +1,145 @@ +<!-- -*- mode: sgml; mode: fold -*- --> + +<!-- Some common paths.. --> +<!ENTITY docdir "/usr/share/doc/apt/"> +<!ENTITY configureindex "<filename>&docdir;examples/configure-index.gz</>"> +<!ENTITY aptconfdir "<filename>/etc/apt.conf</>"> +<!ENTITY statedir "/var/lib/apt"> +<!ENTITY cachedir "/var/cache/apt"> + +<!-- Cross references to other man pages --> +<!ENTITY apt-conf "<CiteRefEntry> + <RefEntryTitle><filename/apt.conf/</RefEntryTitle> + <ManVolNum/5/ + </CiteRefEntry>"> + +<!ENTITY apt-get "<CiteRefEntry> + <RefEntryTitle><command/apt-get/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY apt-config "<CiteRefEntry> + <RefEntryTitle><command/apt-config/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY apt-cdrom "<CiteRefEntry> + <RefEntryTitle><command/apt-cdrom/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY apt-cache "<CiteRefEntry> + <RefEntryTitle><command/apt-cache/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY apt-preferences "<CiteRefEntry> + <RefEntryTitle><command/apt_preferences/</RefEntryTitle> + <ManVolNum/5/ + </CiteRefEntry>"> + +<!ENTITY sources-list "<CiteRefEntry> + <RefEntryTitle><filename/sources.list/</RefEntryTitle> + <ManVolNum/5/ + </CiteRefEntry>"> + +<!ENTITY reportbug "<CiteRefEntry> + <RefEntryTitle><command/reportbug/</RefEntryTitle> + <ManVolNum/1/ + </CiteRefEntry>"> + +<!ENTITY dpkg "<CiteRefEntry> + <RefEntryTitle><command/dpkg/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY dpkg-buildpackage "<CiteRefEntry> + <RefEntryTitle><command/dpkg-buildpackage/</RefEntryTitle> + <ManVolNum/1/ + </CiteRefEntry>"> + +<!ENTITY gzip "<CiteRefEntry> + <RefEntryTitle><command/gzip/</RefEntryTitle> + <ManVolNum/1/ + </CiteRefEntry>"> + +<!ENTITY dpkg-scanpackages "<CiteRefEntry> + <RefEntryTitle><command/dpkg-scanpackages/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY dpkg-scansources "<CiteRefEntry> + <RefEntryTitle><command/dpkg-scansources/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY dselect "<CiteRefEntry> + <RefEntryTitle><command/dselect/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!-- Boiler plate docinfo section --> +<!ENTITY apt-docinfo " + <docinfo> + <address><email>apt@packages.debian.org</></address> + <author><firstname>Jason</> <surname>Gunthorpe</></> + <copyright><year>1998-2001</> <holder>Jason Gunthorpe</></> + <date>12 March 2001</> + </docinfo> +"> + +<!-- Boiler plate Bug reporting section --> +<!ENTITY manbugs " + <RefSect1><Title>Bugs</> + <para> + See the <ulink url='http://bugs.debian.org/apt'>APT bug page</>. + If you wish to report a bug in APT, please see + <filename>/usr/share/doc/debian/bug-reporting.txt</> or the &reportbug; command. + </RefSect1> +"> + +<!-- Boiler plate Author section --> +<!ENTITY manauthor " + <RefSect1><Title>Author</> + <para> + APT was written by the APT team <email>apt@packages.debian.org</>. + </RefSect1> +"> + +<!-- Should be used within the option section of the text to + put in the blurb about -h, -v, -c and -o --> +<!ENTITY apt-commonoptions " + <VarListEntry><term><option/-h/</><term><option/--help/</> + <ListItem><Para> + Show a short usage summary. + </VarListEntry> + + <VarListEntry><term><option/-v/</><term><option/--version/</> + <ListItem><Para> + Show the program version. + </VarListEntry> + + <VarListEntry><term><option/-c/</><term><option/--config-file/</> + <ListItem><Para> + Configuration File; Specify a configuration file to use. + The program will read the default configuration file and then this + configuration file. See &apt-conf; for syntax information. + </VarListEntry> + + <VarListEntry><term><option/-o/</><term><option/--option/</> + <ListItem><Para> + Set a Configuration Option; This will set an arbitary configuration + option. The syntax is <option>-o Foo::Bar=bar</>. + </VarListEntry> +"> + +<!-- Should be used within the option section of the text to + put in the blurb about -h, -v, -c and -o --> +<!ENTITY apt-cmdblurb " + <para> + All command line options may be set using the configuration file, the + descriptions indicate the configuration option to set. For boolean + options you can override the config file by using something like + <option/-f-/,<option/--no-f/, <option/-f=no/ or several other variations. + </para> +"> diff --git a/apt/doc/apt_preferences.5.sgml b/apt/doc/apt_preferences.5.sgml new file mode 100644 index 0000000..2d9c9a0 --- /dev/null +++ b/apt/doc/apt_preferences.5.sgml @@ -0,0 +1,548 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt_preferences</> + <manvolnum>5</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt_preferences</> + <refpurpose>Preference control file for APT</> + </refnamediv> + +<RefSect1><Title>Description</> +<para> +The APT preferences file <filename>/etc/apt/preferences</> +can be used to control which version of a package will be selected +for installation. +</para> + +<para>Several versions of a package may be available for installation when +the &sources-list; file contains references to more than one distribution +(for example, <literal>stable</literal> and <literal>testing</literal>); +furthermore, several instances of the same version of a package may be +available when the file contains references to more than one download site +for a particular distribution. APT assigns a "priority" to each instance +that is available. (In what follows, an "instance" will be an instance of +a package that is available according to &sources-list;.) +Subject to dependency constraints, <command>apt-get</command> installs the +instance with the highest priority. If two instances have the same +priority then it installs the more recent one, that is, the one with the +higher version number. +</para> + +<para>The APT preferences file overrides the priorities that APT assigns +to package instances by default, thus giving the user control over which +one is selected for installation. +</para> + +<RefSect2><Title>APT's Default Priority Assignments</> + +<para>If there is no preferences file, or if there is no entry in the file +that applies to a particular instance, then the priority assigned to that +instance is the priority of the distribution to which that instance +belongs. It is possible to single out a distribution, called the +"target release", which receives a higher priority than other distributions. +The target release can be set on the <command>apt-get</command> command +line or in the APT configuration file <filename>/etc/apt/apt.conf</filename>. +For example, + +<programlisting> +# Command to install the <literal/testing/ version of <replaceable>some-package</replaceable> +<command>apt-get install -t testing <replaceable>some-package</replaceable></command> +</programlisting> + +<programlisting> +# Configuration setting to make <literal/stable/ the target release +APT::Default-Release "stable"; +</programlisting> +</para> + +<para>If a target release has been specified then APT uses the following +algorithm to set the priorities of the instances of a package. Assign: + +<variablelist> +<varlistentry> +<term>priority 100</term> +<listitem><simpara>to the instance that is already installed (if any). +</simpara></listitem> +</varlistentry> +<varlistentry> +<term>priority 500</term> +<listitem><simpara>to the instances that are not installed +and do not belong to the target release. +</simpara></listitem> +</varlistentry> +<varlistentry> +<term>priority 990</term> +<listitem><simpara>to the instances that are not installed +and belong to the target release. +</simpara></listitem> +</varlistentry> +</variablelist> +</para> + +<para>If no target release has been specified then APT simply assigns +priority 100 to all installed package instances and priority 500 to all +uninstalled package instances. +</para> + +<para>APT then applies the following rules, listed in order of precedence, +to determine which instance of a package to install. + +<itemizedlist> +<listitem><simpara>Never downgrade unless the priority of an available instance +exceeds 1000. ("Downgrading" is installing a less recent version of a package +in place of a more recent version. Note that none of APT's default priorities +exceeds 1000; such high priorities can only be set in the preferences file.) +</simpara></listitem> +<listitem><simpara>Install the highest priority instance. +</simpara></listitem> +<listitem><simpara>If two or more instances have the same priority, +install the most recent one. +</simpara></listitem> +<listitem><simpara>If two or more instances have the same version number, +install the one whose source is listed earliest in &sources-list;. +(The installed instance, if there is one, is always preferred in such a +comparison unless <command>apt-get --reinstall</command> is used.) +</simpara></listitem> +</itemizedlist> +</para> + +<para>In a typical situation, the installed instance of a package (priority 100) +is not as recent as one of the instances available from the sources listed in +the &sources-list; file (priority 500 or 990). Then the package will be +upgraded with the command: +<command>apt-get install</command> or <command>apt-get dist-upgrade</command>. +</para> + +<para>Rarely, the installed instance of a package is <emphasis/more/ recent +than any of the other available instances. The package will not be downgraded. +</para> + +<para>Sometimes the installed instance of a package is more recent than the +version belonging to the target release, but not as recent as a version +belonging to some other distribution. Such a package will indeed be upgraded, +because at least <emphasis/one/ of the available instances has a higher +priority than the installed instance. +</para> + +</RefSect2> + +<RefSect2><Title>The Effect of APT Preferences</> + +<para>The APT preferences file allows the system administrator to customize +priorities. The file consists of one or more multi-line records separated +by blank lines. Records can have one of two forms, a specific form and a +general form. +<itemizedlist> +<listitem> +<simpara>The "specific" form pins a priority (a "Pin-Priority") to a +specified package and specified version or version range. For +example, the following record pins a high priority to all versions of +the <filename/perl/ package whose version number begins with +"<literal/5.8/". +</simpara> + +<programlisting> +Package: perl +Pin: version 5.8* +Pin-Priority: 1001 +</programlisting> +</listitem> + +<listitem><simpara> +The "general" form pins a priority to all of the package versions in a +given distribution (that is, to all the versions of packages that are +listed in a certain <filename/Release/ file), or to all of the package +instances coming from a particular Internet site, as identified by its +fully qualified domain name. +</simpara> + +<simpara>This general-form entry in the APT preferences file applies only +to groups of packages. For example, the following record causes APT to +assign a high priority to all package instances available from the local +site. +</simpara> + +<programlisting> +Package: * +Pin: origin "" +Pin-Priority: 999 +</programlisting> + +<simpara>A note of caution: the keyword used here is "<literal/origin/". +This should not be confused with the "Origin:" of a distribution as +specified in a <filename/Release/ file. What follows the "Origin:" tag +in a <filename/Release/ file is usually not an Internet site address +but an author or vendor name, such as "Debian" or "Ximian". +</simpara> + +<simpara>The following record causes APT to assign a low priority to all +package versions belonging to any distribution whose "Archive" +(<literal/a/) name is "<literal/unstable/". +</simpara> + +<programlisting> +Package: * +Pin: release a=unstable +Pin-Priority: 50 +</programlisting> + +<simpara>The following record causes APT to assign a high priority to all +package versions belonging to any release whose "Archive" (<literal/a/) +name is "<literal/stable/" and whose release "Version" (<literal/v/) +number is "<literal/3.0/". +</simpara> + +<programlisting> +Package: * +Pin: release a=unstable, v=3.0 +Pin-Priority: 50 +</programlisting> +</listitem> +</itemizedlist> +</para> + +</RefSect2> + +<RefSect2><Title>How APT Interprets Priorities + +Priorities (P) assigned in the APT preferences file must be positive +or negative integers. They are interpreted as follows (roughly speaking): + + +P > 1000 +causes an instance to be installed +even if this constitutes a downgrade of the package + + +990 < P <=1000 +causes an instance to be installed +even if it does not come from the target release, +unless the installed instance is more recent + + +500 < P <=990 +causes an instance to be installed +unless there is an instance available belonging to the target release +or the installed version is more recent + + +100 < P <=500 +causes an instance to be installed +unless there is an instance available belonging to some other +distribution or the installed version is more recent + +0 <= P <=100 +causes an instance to be installed +only if there is no installed instance of the package + + +P < 0 +prevents the instance from being installed + + + + + +If one of the specific-form records described above matches an +available package instance, then that record determines the priority of +the instance. If two specific-form records match an available instance, +then the first record encountered determines the priority. If two +general-form records match an available instance, then the first record +encountered determines the priority. + + +For example, suppose the APT preferences file contains the three +records presented earlier: + + +Package: perl +Pin: version 5.8* +Pin-Priority: 1001 + +Package: * +Pin: origin "" +Pin-Priority: 999 + +Package: * +Pin: release unstable +Pin-Priority: 50 + + +Then: + + +The most recent available version of the +An instance of any package other than +An instance of a package whose origin is not the local +system but some other site listed in &sources-list;, and which belongs to +an " + + + + +Determination of Package Version and Distribution Properties + +The locations listed in a system's &sources-list; file should provide +Packages and Release files +to describe the package instances available at that location. + + +The Packages file is normally found in the directory +.../dists/dist-name/component/arch: +for example, .../dists/stable/main/binary-i386/Packages. +It consists of a series of multi-line records, one for each package available +in that directory. Only two lines in each record are relevant for setting +APT priorities: + + +the +gives the package name + + +the +gives the version number for the named package + + + + +The Release file is normally found in the directory +.../dists/dist-name: +for example, .../dists/stable/Release, +or .../dists/woody/Release. +It consists of a single multi-line record which applies to + +the +names the archive to which all the package instances +in the directory tree belong. For example, the line + + + +Pin: release a=stable + + + + + +the +names the release version. For example, the +package instances in the tree might belong to Debian GNU/Linux release +version 3.0. There is normally no version number for the "testing" and +"unstable" distributions because they have not yet been released. +Specifying this in the APT preferences file would require one of the +following lines. + + + +Pin: release v=3.0 +Pin: release a=stable v=3.0 +Pin: release 3.0 + + + + + + +the +names the licensing component associated with the +package instances in the directory tree of the + + +Pin: release c=main + + + + + +the +names the producer of the package instances in the +directory tree of the + + +Pin: release o=Debian + + + + + +the +seems redundant. Most commonly, this is + + + +Pin: release l=Debian + + + + + + +All of the Packages and Release +files retrieved from locations listed in the &sources-list; file are kept +in the directory /var/lib/apt/lists, or in the file named +by the variable debian.lcs.mit.edu_debian_dists_unstable_contrib_binary-i386_Release +contains the Release file retrieved from the site + + + + +Optional Lines in an APT Preferences Record + +Each record in the APT preferences file can optionally begin with +one or more lines beginning with the word + +The + + + +Examples</> +<RefSect2><Title>Tracking Stable + +The following APT preferences file will cause APT to assign a +priority higher than the default (500) to all package versions belonging +to a +Package: * +Pin: release a=stable +Pin-Priority: 900 + +Explanation: Uninstall or do not install any Debian-originated +Explanation: instances other than those in the stable distro +Package: * +Pin: release o=Debian +Pin-Priority: -10 + + + + +With a suitable &sources-list; file and the above preferences file, +any of the following commands will cause APT to upgrade to the +latest +apt-get install package-name +apt-get upgrade +apt-get dist-upgrade + + + +The following command will cause APT to upgrade the specified +package to the latest version from the +apt-get install package/testing + + + + Tracking Testing + +The following APT preferences file will cause APT to assign +a high priority to package versions from the +Package: * +Pin: release a=testing +Pin-Priority: 900 + +Package: * +Pin: release a=unstable +Pin-Priority: 800 + +Package: * +Pin: release o=Debian +Pin-Priority: -10 + + + + +With the above APT preferences file, any of the +following commands will cause APT to upgrade to the latest + +apt-get install package-name +apt-get upgrade +apt-get dist-upgrade + + + +The following command will cause APT to upgrade the specified +package to the latest version from the apt-get dist-upgrade and the others + +apt-get install package/unstable + + + + + + + See Also</> +<para> +&apt-get; &apt-cache; &apt-conf; &sources-list; + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/cache.sgml b/apt/doc/cache.sgml index 2962a83..22a370a 100644 --- a/apt/doc/cache.sgml +++ b/apt/doc/cache.sgml @@ -1,10 +1,10 @@ -<!doctype debiandoc system> <!-- -*- mode: sgml; mode: fold -*- --> +<!doctype debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN"> <book> <title>APT Cache File Format Jason Gunthorpe jgg@debian.org -$Id: cache.sgml,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +$Id: cache.sgml,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ This document describes the complete implementation and format of the APT @@ -53,10 +53,10 @@ contained in the status file which might be considered a separate package file.

-Please understand, this is designed as a -CACHE FILE- it is not ment to be -used on any system other than the one it was created for. It is not ment to -be authoritative either, ie if a system crash or software failure occures it -must be perfectly acceptable for the cache file to be in an inconsistant +Please understand, this is designed as a -CACHE FILE- it is not meant to be +used on any system other than the one it was created for. It is not meant to +be authoritative either, i.e. if a system crash or software failure occurs it +must be perfectly acceptable for the cache file to be in an inconsistent state. Furthermore at any time the cache file may be erased without losing any information. @@ -67,7 +67,7 @@ to extend it with associate cache files that contain other information.

To keep memory use down the cache file only contains often used fields and -fields that are inexepensive to store, the Package file has a full list of +fields that are inexpensive to store, the Package file has a full list of fields. Also the client may assume that all items are perfectly valid and need not perform checks against their correctness. Removal of information from the cache is possible, but blanks will be left in the file, and @@ -84,7 +84,7 @@ go through a fixup stage to get a real memory pointer. This is done by taking the index, multiplying it by the type size and then adding it to the start address of the memory block. This sounds complex, but in C it is a single array dereference. Because all items are aligned to -their size and indexs are stored as multiples of the size of the structure +their size and indexes are stored as multiples of the size of the structure the format is immediately portable to all possible architectures - BUT the generated files are -NOT-. @@ -140,11 +140,13 @@ This is the first item in the file. unsigned long VersionCount; unsigned long DependsCount; unsigned long PackageFileCount; - unsigned long MaxVerFileSize; // Offsets unsigned long FileList; // PackageFile unsigned long StringList; // StringItem + unsigned long VerSysName; // StringTable + unsigned long Architecture; // StringTable + unsigned long MaxVerFileSize; // Allocation pools struct @@ -155,7 +157,7 @@ This is the first item in the file. } Pools[7]; // Package name lookup - unsigned long HashTable[512]; // Package + unsigned long HashTable[2*1024]; // Package }; @@ -181,7 +183,7 @@ be erased and rebuilt if it is true. VerFileSz ProvidesSz *Sz contains the sizeof() that particular structure. It is used as an -extra consistancy check on the structure of the file. +extra consistency check on the structure of the file. If any of the size values do not exactly match what the client expects then the client should refuse the load the file. @@ -190,17 +192,23 @@ the client should refuse the load the file. VersionCount DependsCount PackageFileCount -These indicate the number of each structure contianed in the cache. -PackageCount is especially usefull for generating user state structures. +These indicate the number of each structure contained in the cache. +PackageCount is especially useful for generating user state structures. See Package::Id for more info. +VerSysName +String representing the version system used for this cache + +Architecture +Architecture the cache was built against. + MaxVerFileSize The maximum size of a raw entry from the original Package file -(ie VerFile::Size) is stored here. +(i.e. VerFile::Size) is stored here. FileList This contains the index of the first PackageFile structure. The PackageFile -structures are singely linked lists that represent all package files that +structures are singly linked lists that represent all package files that have been merged into the cache. StringList @@ -232,9 +240,9 @@ function:

By iterating over each entry in the hash table it is possible to iterate over -the entire list of packages. Hash Collisions are handled with a singely linked +the entire list of packages. Hash Collisions are handled with a singly linked list of packages based at the hash item. The linked list contains only -packages that macth the hashing function. +packages that match the hashing function. @@ -242,7 +250,7 @@ packages that macth the hashing function. Package

-This contians information for a single unique package. There can be any +This contains information for a single unique package. There can be any number of versions of a given package. Package exists in a singly linked list of package records starting at the hash index of the name in the Header->HashTable. @@ -252,9 +260,7 @@ the Header->HashTable. // Pointers unsigned long Name; // Stringtable unsigned long VersionList; // Version - unsigned long TargetVer; // Version unsigned long CurrentVer; // Version - unsigned long TargetDist; // StringTable (StringItem) unsigned long Section; // StringTable (StringItem) // Linked lists @@ -278,25 +284,18 @@ the Header->HashTable. Name of the package. VersionList -Base of a singely linked list of version structures. Each structure +Base of a singly linked list of version structures. Each structure represents a unique version of the package. The version structures contain links into PackageFile and the original text file as well as -detailed infromation about the size and dependencies of the specific +detailed information about the size and dependencies of the specific package. In this way multiple versions of a package can be cleanly handled -by the system. Furthermore, this linked list is guarenteed to be sorted +by the system. Furthermore, this linked list is guaranteed to be sorted from Highest version to lowest version with no duplicate entries. -TargetVer CurrentVer -This is an index (pointer) to the sub version that is being targeted for -upgrading. CurrentVer is an index to the installed version, either can be +CurrentVer is an index to the installed version, either can be 0. -TargetDist -This indicates the target distribution. Automatic upgrades should not go -outside of the specified dist. If it is 0 then the global target dist should -be used. The string should be contained in the StringItem list. - Section This indicates the deduced section. It should be "Unknown" or the section of the last parsed item. @@ -314,14 +313,14 @@ This is a linked list of all provides for this package name. SelectedState InstState CurrentState -These corrispond to the 3 items in the Status field found in the status +These correspond to the 3 items in the Status field found in the status file. See the section on defines for the possible values.

SelectedState is the state that the user wishes the package to be in.

InstState is the installation state of the package. This normally -should be Ok, but if the installation had an accident it may be otherwise. +should be OK, but if the installation had an accident it may be otherwise.

CurrentState indicates if the package is installed, partially installed or not installed. @@ -334,7 +333,7 @@ status file emitter uses this to track which packages have been emitted already. Flags -Flags are some usefull indicators of the package's state. +Flags are some useful indicators of the package's state. @@ -343,7 +342,7 @@ Flags are some usefull indicators of the package's state. PackageFile

-This contians information for a single package file. Package files are +This contains information for a single package file. Package files are referenced by Version structures. This is a singly linked list based from Header.FileList @@ -357,6 +356,8 @@ Header.FileList unsigned long Origin; // Stringtable unsigned long Label; // Stringtable unsigned long Architecture; // Stringtable + unsigned long Site; // Stringtable + unsigned long IndexType; // Stringtable unsigned long Size; // Linked list @@ -381,6 +382,12 @@ Refers the the physical disk file that this PacakgeFile represents. This is the release information. Please see the files document for a description of what the release information means. +Site +The site the index file was fetched from. + +IndexType +A string indicating what sort of index file this is. + Size Size is provided as a simple check to ensure that the package file has not been altered. @@ -401,8 +408,8 @@ Modification time for the file at time of cache generation. Version

-This contians the information for a single version of a package. This is a -singley linked list based from Package.Versionlist. +This contains the information for a single version of a package. This is a +single linked list based from Package.Versionlist.

The version list is always sorted from highest version to lowest version by @@ -463,12 +470,12 @@ Head of the linked list of Provides::NextPkgProv, forward provides. Size InstalledSize -The archive size for this version. For debian this is the size of the .deb +The archive size for this version. For Debian this is the size of the .deb file. Installed size is the uncompressed size for this version Hash This is a characteristic value representing this package. No two packages -in existance should have the same VerStr and Hash with different contents. +in existence should have the same VerStr and Hash with different contents. ID See Package::ID. @@ -622,7 +629,7 @@ this version. StringItem

StringItem is used for generating single instances of strings. Some things -like Section Name are are usefull to have as unique tags. It is part of +like Section Name are are useful to have as unique tags. It is part of a linked list based at Header::StringList. struct StringItem @@ -768,7 +775,7 @@ allows the specification of a specific version and a target distribution.

Different section names on different versions is supported, but I -do not expect to use it. To simplify the GUI it will mearly use the section +do not expect to use it. To simplify the GUI it will merely use the section in the Package structure. This should be okay as I hope sections do not change much. @@ -807,7 +814,7 @@ information. (/var/cache/apt, FHS2)

Caching of the info/*.list is an excellent place to start, by generating all the list files into a tree structure and reverse linking them to the package -structures in the main cache file major speed gains in dpkg might be achived. +structures in the main cache file major speed gains in dpkg might be achieved. diff --git a/apt/doc/design.sgml b/apt/doc/design.sgml index faa49d7..dfc5437 100644 --- a/apt/doc/design.sgml +++ b/apt/doc/design.sgml @@ -1,4 +1,4 @@ - + @@ -7,7 +7,7 @@ Manoj Srivastava srivasta@debian.org - $Id: design.sgml,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ + $Id: design.sgml,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ This document is an overview of the specifications and design goals of the APT project. It also attempts to give a broad @@ -118,7 +118,7 @@ allowing the removal of packages that left the system in an untenable state by breaking the dependencies on packages that were dependent on the package being - removed. A special emhasis is placed on handling + removed. A special emphasis is placed on handling pre-dependencies correctly; the target of a predependency has to be fully configured before attempting to install the pre-dependent package. Also, @@ -138,11 +138,11 @@ Handle source lists for updates from multiple sources. APT should also be able to handle diverse methods of acquiring new packages; local filesystem, - mountable CD-ROM drives, FTP accesible repositories are + mountable CD-ROM drives, FTP accessible repositories are some of the methods that come to mind. Also, the source lists can be separated into categories, such as main, contrib, non-us, non-local, non-free, my-very-own, - etc. APT should be set up to retrive the Packages + etc. APT should be set up to retrieve the Packages files from these multiple source lists, as well as retrieving the packages themselves.

@@ -272,7 +272,7 @@

Take the order of installations and removals and build up a stream of events to send to the packaging system - (dpkg). Execute the list of events if succesful. Do not + (dpkg). Execute the list of events if successful. Do not partially install packages and leave system in broken state. Go to The Selection step as needed.

@@ -298,7 +298,7 @@

Distinct versions of the same package are recorded separately, but if multiple Packages files contain the - same version of a package, then only the forst one is + same version of a package, then only the first one is recorded. For this reason, the least expensive update source should be listed first (local file system is better than a remote ftp site)

@@ -356,7 +356,7 @@

Create an ordering of the actions to be taken.

- Event genrator + Event generator

module to interact with dpkg

diff --git a/apt/doc/dpkg-tech.sgml b/apt/doc/dpkg-tech.sgml index 0e01385..ad56dad 100644 --- a/apt/doc/dpkg-tech.sgml +++ b/apt/doc/dpkg-tech.sgml @@ -1,9 +1,9 @@ - + dpkg technical manual Tom Lees tom@lpsg.demon.co.uk -$Id: dpkg-tech.sgml,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +$Id: dpkg-tech.sgml,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ This document describes the minimum necessary workings for the APT dselect diff --git a/apt/doc/examples/CVS/Entries b/apt/doc/examples/CVS/Entries deleted file mode 100644 index daf2a8a..0000000 --- a/apt/doc/examples/CVS/Entries +++ /dev/null @@ -1,5 +0,0 @@ -/apt.conf/1.1.1.1/Fri Aug 10 14:01:41 2001// -/configure-index/1.2/Fri Aug 10 14:01:42 2001// -/sources.list/1.1.1.1/Fri Aug 10 14:01:42 2001// -/vendors.list/1.2/Fri Aug 10 14:01:42 2001// -D diff --git a/apt/doc/examples/CVS/Repository b/apt/doc/examples/CVS/Repository deleted file mode 100644 index 504eb02..0000000 --- a/apt/doc/examples/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/doc/examples diff --git a/apt/doc/examples/CVS/Root b/apt/doc/examples/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/doc/examples/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/doc/examples/apt.conf b/apt/doc/examples/apt.conf index edda433..d32247b 100644 --- a/apt/doc/examples/apt.conf +++ b/apt/doc/examples/apt.conf @@ -1,4 +1,4 @@ -// $Id: apt.conf,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: apt.conf,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* This file is a sample configuration file with a few harmless sample options. */ diff --git a/apt/doc/examples/configure-index b/apt/doc/examples/configure-index index d6b0b41..89a3cd1 100644 --- a/apt/doc/examples/configure-index +++ b/apt/doc/examples/configure-index @@ -1,4 +1,4 @@ -// $Id: configure-index,v 1.2 2001/01/04 21:26:14 kojima Exp $ +// $Id: configure-index,v 1.2 2002/07/25 18:07:18 niemeyer Exp $ /* This file is an index of all APT configuration directives. It should NOT actually be used as a real config file, though it is a completely valid file. Most of the options have sane default values, unless @@ -21,10 +21,12 @@ APT { Architecture "i386"; + Build-Essential "build-essential"; // Options for apt-get Get { + Arch-Only "false"; Download-Only "false"; Simulate "false"; Assume-Yes "false"; @@ -32,15 +34,15 @@ APT Fix-Broken "false"; Fix-Missing "false"; Show-Upgraded "false"; - No-Upgrade "false"; + Upgrade "true"; Print-URIs "false"; Compile "false"; - No-Download "false"; + Download "true"; Purge "false"; List-Cleanup "true"; ReInstall "false"; Trivial-Only "false"; - No-Remove "false"; + Remove "true"; }; Cache @@ -48,6 +50,7 @@ APT Important "false"; AllVersions "false"; GivenOnly "false"; + RecruseDepends "false"; }; CDROM @@ -64,6 +67,7 @@ APT Immediate-Configure "true"; // DO NOT turn this off, see the man page Force-LoopBreak "false"; // DO NOT turn this on, see the man page Cache-Limit "4194304"; + Default-Release ""; }; // Options for the downloading routines @@ -92,8 +96,8 @@ Acquire Proxy "ftp://127.0.0.1/"; Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting - /* Required script to perform proxy login. This example demonstrates - possible options */ + /* Required script to perform proxy login. This example should work + for tisfwtk */ ProxyLogin { "USER $(PROXY_USER)"; @@ -101,15 +105,6 @@ Acquire "USER $(SITE_USER)@$(SITE):$(SITE_PORT)"; "PASS $(SITE_PASS)"; }; - - /* A script that works with tisfw below. Please note that you - must also set 'Proxy::Passive "false"' and a Proxy line like: - Proxy "ftp://anomymous:ftp.us.debian.org@tisproxy.yourcompany.com/"; */ - ProxyLogin - { - "USER $(SITE_USER)@$(SITE)"; - "PASS $(SITE_PASS)"; - }; Timeout "120"; @@ -134,10 +129,10 @@ Acquire }; // Directory layout -Dir +Dir "/" { // Location of the state dir - State "/var/state/apt/" + State "var/lib/apt/" { lists "lists/"; xstatus "xstatus"; @@ -147,16 +142,17 @@ Dir }; // Location of the cache dir - Cache "/var/cache/apt/" { + Cache "var/cache/apt/" { archives "archives/"; srcpkgcache "srcpkgcache.bin"; pkgcache "pkgcache.bin"; }; // Config files - Etc "/etc/apt/" { + Etc "etc/apt/" { sourcelist "sources.list"; main "apt.conf"; + preferences "preferences"; }; // Locations of binaries @@ -178,6 +174,7 @@ DSelect Options "-f"; UpdateOptions ""; PromptAfterUpdate "no"; + CheckDir "no"; } DPkg @@ -200,9 +197,13 @@ DPkg // Flush the contents of stdin before forking dpkg. FlushSTDIN "true"; + + // Control the size of the command line passed to dpkg. + MaxBytes 1024; + MaxArgs 350; } -/* Options you can set to see some debugging text They corrispond to names +/* Options you can set to see some debugging text They correspond to names of classes in the source code */ Debug { @@ -210,6 +211,7 @@ Debug pkgAcquire "false"; pkgAcquire::Worker "false"; pkgDPkgPM "false"; + pkgOrderList "false"; pkgInitialize "false"; // This one will dump the configuration space NoLocking "false"; diff --git a/apt/doc/examples/ftp-archive.conf b/apt/doc/examples/ftp-archive.conf new file mode 100644 index 0000000..a1866ba --- /dev/null +++ b/apt/doc/examples/ftp-archive.conf @@ -0,0 +1,81 @@ +/* This configuration file describes the standard Debian distribution + as it once looked */ + +Dir +{ + ArchiveDir "/org/ftp.debian.org/ftp/"; + OverrideDir "/org/ftp.debian.org/scripts/override/"; + CacheDir "/org/ftp.debian.org/scripts/cache/"; +}; + +Default +{ + Packages::Compress ". gzip"; + Sources::Compress "gzip"; + Contents::Compress "gzip"; + DeLinkLimit 10000; // 10 Meg delink per day + MaxContentsChage 10000; // 10 Meg of new contents files per day +}; + +TreeDefault +{ + Contents::Header "/org/ftp.debian.org/scripts/masterfiles/Contents.top"; + BinCacheDB "packages-$(ARCH).db"; + + // These are all defaults and are provided for completeness + Directory "$(DIST)/$(SECTION)/binary-$(ARCH)/"; + Packages "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages"; + + SrcDirectory "$(DIST)/$(SECTION)/source/"; + Sources "$(DIST)/$(SECTION)/source/Sources"; + + Contents "$(DIST)/Contents-$(ARCH)"; +}; + +tree "dists/woody" +{ + Sections "main contrib non-free"; + Architectures "alpha arm hurd-i386 i386 m68k powerpc sparc sparc64 source"; + BinOverride "override.woody.$(SECTION)"; + SrcOverride "override.woody.$(SECTION).src"; +}; + +tree "dists/potato" +{ + Sections "main contrib non-free"; + Architectures "alpha arm i386 m68k powerpc sparc source"; + BinOverride "override.potato.$(SECTION)"; + SrcOverride "override.woody.$(SECTION).src"; +}; + +tree "dists/slink" +{ + Sections "main contrib non-free"; + Architectures "alpha i386 m68k sparc source"; + BinOverride "override.slink.$(SECTION)"; + SrcOverride "override.woody.$(SECTION).src"; + External-Links false; // Slink should contain no links outside itself +}; + + +bindirectory "project/experimental" +{ + Sources "project/experimental/Sources"; + Packages "project/experimental/Packages"; + + BinOverride "override.experimental"; + BinCacheDB "packages-experimental.db"; + SrcOverride "override.experimental.src"; +}; + +bindirectory "dists/proposed-updates" +{ + Packages "project/proposed-updates/Packages"; + Contents "project/proposed-updates/Contents"; + + BinOverride "override.slink.all3"; + BinOverride "override.slink.all3.src"; + BinCacheDB "packages-proposed-updates.db"; +}; + + diff --git a/apt/doc/examples/sources.list b/apt/doc/examples/sources.list index ed5ad75..9f23432 100644 --- a/apt/doc/examples/sources.list +++ b/apt/doc/examples/sources.list @@ -7,4 +7,4 @@ deb http://security.debian.org stable/updates main contrib non-free # Uncomment if you want the apt-get source function to work #deb-src http://http.us.debian.org/debian stable main contrib non-free -#deb-src http://non-us.debian.org/debian-non-US stable non-US +#deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free diff --git a/apt/doc/examples/vendors.list b/apt/doc/examples/vendors.list deleted file mode 100644 index 05ca729..0000000 --- a/apt/doc/examples/vendors.list +++ /dev/null @@ -1,12 +0,0 @@ -# Trusted Package Provider List -# -# This file contains the list of package providers (vendors or individuals) -# from whom packages you trust. -# - -simple-key "akk" -{ - Fingerprint "B24534AA5D10F86B46EAB46B3EB3759E05BBD9E4"; - Name "Alfredo K. Kojima "; -} - diff --git a/apt/doc/files.sgml b/apt/doc/files.sgml index d1618bc..6d7832f 100644 --- a/apt/doc/files.sgml +++ b/apt/doc/files.sgml @@ -1,10 +1,10 @@ - + APT Files Jason Gunthorpe jgg@debian.org -$Id: files.sgml,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +$Id: files.sgml,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ This document describes the complete implementation and format of the @@ -41,7 +41,7 @@ multiple package files.

The var directory structure is as follows: - /var/state/apt/ + /var/lib/apt/ lists/ partial/ xstatus @@ -66,7 +66,7 @@ The var directory structure is as follows:

-As is specified in the FHS 2.0 /var/state/apt is used for application +As is specified in the FHS 2.1 /var/lib/apt is used for application data that is not expected to be user modified. /var/cache/apt is used for regeneratable data and is where the package cache and downloaded .debs go. @@ -101,7 +101,7 @@ which indicates a standard debian archive with a dists dir. contrib, non-free or non-us. The format for the deb line is as follows:

- deb uri distribution compontent + deb uri distribution component [component ...]

@@ -116,7 +116,7 @@ which indicates a standard debian archive with a dists dir. necessary to list a number of deb lines for the same URI. APT will sort the URI list after it has generated a complete set to allow connection reuse. It is important to order things in the sourcelist - from most prefered to least prefered (fastest to slowest). + from most preferred to least preferred (fastest to slowest). URI specification @@ -125,12 +125,12 @@ URIs in the source list support a large number of access schemes. cdrom - The cdrom scheme is special in that If Modifed Since queries are never + The cdrom scheme is special in that If Modified Since queries are never performed and that APT knows how to match a cdrom to the name it was given when first inserted. APT also knows all of the possible mount points the cdrom drives and that the user should be prompted to insert a CD if it cannot be found. The path is relative to an - arbitary mount point (of APT's choosing) and must not start with a + arbitrary mount point (of APT's choosing) and must not start with a slash. The first pathname component is the given name and is purely descriptive and of the users choice. However, if a file in the root of the cdrom is called '.disk/info' its contents will be used instead of @@ -140,7 +140,7 @@ URIs in the source list support a large number of access schemes. http - This scheme specifies a HTTP server for the debian archive. HTTP is prefered + This scheme specifies a HTTP server for the debian archive. HTTP is preferred over FTP because If Modified Since queries against the Package file are possible as well as deep pipelining and resume capabilities. @@ -155,8 +155,8 @@ URIs in the source list support a large number of access schemes. file - The file scheme allows an arbitary directory in the file system to be - considered as a debian archive. This is usefull for NFS mounts and + The file scheme allows an arbitrary directory in the file system to be + considered as a debian archive. This is useful for NFS mounts and local mirrors/archives. file:/var/debian @@ -173,20 +173,20 @@ URIs in the source list support a large number of access schemes. Hashing the URI

-All permanent information aquired from any of the sources is stored in the +All permanent information acquired from any of the sources is stored in the lists directory. Thus, there must be a way to relate the filename in the lists directory to a line in the sourcelist. To simplify things this is done by quoting the URI and treating _'s as quoteable characters and converting / to _. The URI spec says this is done by converting a sensitive character into %xx where xx is the hexadecimal representation -from the ascii character set. Examples: +from the ASCII character set. Examples: http://www.debian.org/archive/dists/stable/binary-i386/Packages -/var/state/apt/lists/www.debian.org_archive_dists_stable_binary-i386_Packages +/var/lib/apt/lists/www.debian.org_archive_dists_stable_binary-i386_Packages cdrom:Debian 1.3/debian/Packages -/var/state/apt/info/Debian%201.3_debian_Packages +/var/lib/apt/info/Debian%201.3_debian_Packages

@@ -209,9 +209,9 @@ here as well. The extra status file serves the same purpose as the normal dpkg status file (/var/lib/dpkg/status) except that it stores information unique to apt. This includes the autoflag, target distribution and version and any other -uniqe features that come up over time. It duplicates nothing from the normal +unique features that come up over time. It duplicates nothing from the normal dpkg status file. Please see other APT documentation for a discussion -of the exact internal behavior of these fields. The Package field is +of the exact internal behaviour of these fields. The Package field is placed directly before the new fields to indicate which package they apply to. The new fields are as follows: @@ -251,12 +251,12 @@ change to use a prebuilt version for greater speed.

The archives directory is where all downloaded .deb archives go. When the file transfer is initiated the deb is placed in partial. Once the file -is fully downloaded and its MD5 hash and size are verifitied it is moved +is fully downloaded and its MD5 hash and size are verified it is moved from partial into archives/. Any files found in archives/ can be assumed to be verified.

-No dirctory structure is transfered from the receiving site and all .deb +No directory structure is transfered from the receiving site and all .deb file names conform to debian conventions. No short (msdos) filename should be placed in archives. If the need arises .debs should be unpacked, scanned and renamed to their correct internal names. This is mostly to prevent @@ -290,7 +290,7 @@ format and style mirror the Package file. Site This is the proper host name of the site. It should not be a host within -debian.org and generally cnames should be advoided here. +debian.org and generally cnames should be avoided here. Aliases These list any commonly used aliases for the site. This field is used to make @@ -305,7 +305,7 @@ other mirrors are leaf. The Archive field gives the path(s) to the debian archive. [access] specifies the access method and may be one of ftp, http, rsync, nfs, or smb. For many of the types it is possible to prefix the path with :### -indicating that an alternate port should be used. Generaly paths +indicating that an alternate port should be used. Generally paths start with a / and end with a /, rsync is an exception in that the first directory component is not a path but a label. @@ -370,7 +370,7 @@ This is the common name we give our archives, such as stable or unstable. Component -Referes to the sub-component of the archive, main, contrib +Refers to the sub-component of the archive, main, contrib etc. Component may be omitted if there are no components for this archive. Version @@ -409,7 +409,7 @@ release, 1.3.1r6 Archive: stable -Compontent: main +Component: main Version: 1.3.1r6 Origin: Debian Label: Debian @@ -429,7 +429,7 @@ NotAutomatic: Yes And unstable, Archive: unstable -Compontent: main +Component: main Version: 2.1 Origin: Debian Label: Debian diff --git a/apt/doc/fr/apt-cache.8.fr.sgml b/apt/doc/fr/apt-cache.8.fr.sgml new file mode 100644 index 0000000..6670127 --- /dev/null +++ b/apt/doc/fr/apt-cache.8.fr.sgml @@ -0,0 +1,377 @@ + + + +%aptent; + +]> + + + &apt-docinfo; + + + apt-cache + 8 + + + + + apt-cache + Gestion des paquets et manipulation du cache par APT + + + + + + apt-cache + + + + + add fichier + gencaches + showpkg pkg + stats + dump + dumpavail + unmet + search regex + show pkg + showpkg pkg + depends pkg + pkgnames prefix + dotty pkg + + + + + Description</> + <para> +<command/apt-cache/ réalise différentes opérations sur le cache de paquet d' +APT. <command/apt-cache/ ne manipule pas l'état du système mais fournit des +moyens de recherche dans les métadonnées d'un paquet desquelles il extrait +d'intéressantes informations. + + <para> +À moins que l'option <option>-h</> ou <option>--help</> ne soit donnée, l'une +des commandes suivantes doit être présente. + + <VariableList> + <VarListEntry><Term>add</Term> + <ListItem><Para> +La commande <literal/add/ ajoute les fichiers donnés en argument au cache des +paquets. + </VarListEntry> + + <VarListEntry><Term>gencaches</Term> + <ListItem><Para> +La commande <literal/gencaches/ fait la même chose que +<command/apt-get check/. Elle construit les caches de source et de paquet à +partir des sources répertoriées dans &sources-list; et dans +<filename>/var/lib/dpkg/status</>. + </VarListEntry> + + <VarListEntry><Term>showpkg</Term> + <ListItem><Para> +La commande <literal/showpkg/ affiche des informations sur les paquets donnés +en argument. Les arguments restants sont les noms de paquets. Les versions +disponibles et les dépendances inverses de chaque paquet répertorié sont +listées, ainsi que les dépendances normales pour chaque version. Les dépendances +normales d'un paquet sont constituées par les paquets dont il dépend ; les +dépendances inverses sont les paquets qui dépendent du paquet en question. +Les dépendances normales doivent donc être satisfaites et les dépendances +inverses n'ont pas besoin de l'être. Ainsi, la commande +<command>apt-cache showpkg libreadline2</> donnerait ce résultat : + +<informalexample><programlisting> +Package: libreadline2 +Versions: 2.1-12(/var/state/apt/lists/foo_Packages), +Reverse Depends: + libreadlineg2,libreadline2 + libreadline2-altdev,libreadline2 +Dependencies: +2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null)) +Provides: +2.1-12 - +Reverse Provides: +</programlisting></informalexample> + + <para> +On peut voir que libreadline2, version 2.1-8, dépend de libc5, ncurses3.0, et +ldso ; ces paquets doivent être installés au préalable pour que libreadline2 +fonctionne. À leur tour, libreadlineg2 et libreadline2-altdev dépendent de +libreadline2. Si libreadline2 est installé, libc5, ncurses3.0 et ldso doivent +être installés ; libreadlineg2 et libreadline2-altdev n'ont pas à l'être. Pour connaître le sens de la fin de chaîne, il est préférable de consulter le code +source d'APT. + </VarListEntry> + + <VarListEntry><Term>stats</Term> + <ListItem><Para> +La commande <literal/stats/ affiche des statistiques à propos du cache. Aucun +autre argument n'est attendu. Voici les informations rapportées : + <itemizedlist> + <listitem><para> +<literal/Total package names/ est le nombre de paquets trouvés dans le cache. + </listitem> + + <listitem><para> +<literal/Normal packages/ est le nombre de paquets simples, ordinaires ; ces +paquets tolèrent une correspondance bijective entre leur nom et le nom utilisé +par d'autres paquets pour les qualifier comme dépendance. La majorité des +paquets appartient à cette catégorie. + </listitem> + + <listitem><para> +<literal/Pure virtual packages/ est le nombre des paquets qui n'existent que +sous la forme d'un nom représentant un paquet virtuel ; ces paquets +« fournissent » seulement un nom de paquet virtuel et aucun paquet +n'utilise véritablement ce nom. Par exemple, au sein du système Debian +GNU-Linux, le nom « mail-transport-agent » est un paquet virtuel pur ; +plusieurs paquets peuvent « remplir » ce nom « mail-transport-agent », mais il +n'existe aucun paquet nommé « mail-transport-agent ». + </listitem> + + <listitem><para> +<literal/Single virtual packages/ est le nombre de paquets virtuels qui ne +peuvent être remplis que par un seul paquet. Par exemple, au sein du système +Debian GNU-Linux, « X11-text-viewer » est un paquet virtuel ; seul le paquet +« xless » remplit « X11-text-viewer ». + </listitem> + + <listitem><para> +<literal/Mixed virtual packages/ est le nombre des paquets qui remplissent un +paquet virtuel particulier et/ou dont le nom est un nom de paquet virtuel. +Par exemple, au sein du système Debian GNU-Linux, « debconf » est +un paquet réel et il est aussi rempli par « debconf-tiny ». + </listitem> + + <listitem><para> +<literal/Missing/ est le nombre de paquets référencés dans une +dépendance mais qui ne sont fournis par aucun paquet. Les paquets manquants +peuvent être mis en évidence quand on n'accède pas à une distribution complète +ou si un paquet (réel ou virtuel) a été abandonné par une distribution. +Habituellement on les trouve dans les champs « Conflicts ». + </listitem> + + <listitem><para> +<literal/Total distinct/ versions est le nombre de versions de paquets trouvées +dans le cache ; cette valeur est par conséquent au moins égale au nombre total +de paquets. Quand on accède à plus d'une distribution (« stable » et +« unstable », par exemple), cette valeur peut être considérablement plus +grande que le nombre total de paquets. + </listitem> + + <listitem><para> +<literal/Total dependencies/ est le nombre de relations de dépendances +déclarées par tous les paquets présents dans le cache. + </listitem> + </itemizedlist> + </VarListEntry> + + <VarListEntry><Term>dump</Term> + <ListItem><Para> +La commande <literal/dump/ affiche un court résumé sur chaque paquet du cache. +Elle est d'abord destinée au débogage. + </VarListEntry> + + <VarListEntry><Term>dumpavail</Term> + <ListItem><Para> +La commande <literal/dumpavail/ affiche sur la sortie standard une liste des +paquets disponibles. Elle convient à une utilisation avec &dpkg; et la +méthode &dselect; s'en sert. + </VarListEntry> + + <VarListEntry><Term>unmet</Term> + <ListItem><Para> +La commande <literal/unmet/ affiche un résumé concernant toutes les +dépendances absentes dans le cache de paquets. + </VarListEntry> + + <VarListEntry><Term>show</Term> + <ListItem><Para> +La commande <literal/show/ est semblable à <literal/dpkg --print-avail/ ; +elle affiche des informations sur les paquets donnés en argument. + </VarListEntry> + + <VarListEntry><Term>search</Term> + <ListItem><Para> +La commande <literal/search/ recherche l'expression régulière donnée en +argument sur tous les paquets disponibles. Elle cherche une occurrence de la +chaîne dans les noms de paquets et dans les descriptions puis elle affiche +le nom du paquet et sa description courte. Quand on donne l'option +<option/--full/, la sortie est identique à <literal/show/ pour chaque +paquet ; l'option <option/--names-only/ ne recherche pas la chaîne +dans les descriptions longues mais seulement dans les noms de paquets. +<para> +On peut utiliser des arguments distincts pour indiquer des expressions +régulières différentes sur lesquelles sera réalisé un « et » logique. + </VarListEntry> + + <VarListEntry><Term>depends</Term> + <ListItem><Para> +La commande <literal/depends/ affiche la liste de toutes les dépendances +d'un paquet et la liste de tous les paquets possibles qui satisfont ces +dépendances. + </VarListEntry> + + <VarListEntry><Term>pkgnames</Term> + <ListItem><Para> +Cette commande affiche le nom de chaque paquet du système. Un préfixe pour +filtrer la liste des noms peut être donné en argument. La sortie est +appropriée à une utilisation au sein d'une fonction complète de shell ; elle +est produite très rapidement. On utilise au mieux cette commande avec +l'option <option/--generate/. + </VarListEntry> + + <VarListEntry><Term>dotty</Term> + <ListItem><Para> +La commande <literal/dotty/ prend une liste de paquets sur la ligne de commande +et affiche une sortie appropriée à une utilisation par dotty avec le paquet +<ulink url="http://www.research.att.com/sw/tools/graphviz/">GraphVis</>. +Il en résulte un ensemble de noeuds et d'arcs représentant les relations +entre les paquets. Par défaut les paquets donnés en argument suivent toutes +leurs dépendances, ce qui peut produire un graphe très volumineux. On peut +désactiver ce comportement en positionnant l'option +<literal>APT::Cache::GivenOnly</literal>. + </para> +<para> +Les noeuds résultants ont plusieurs formes ; les paquets normaux sont +des boîtes, les « provides » purs sont des triangles, +les « provides » mixtes sont des diamants et les paquets manquants +sont des hexagones. Les boîtes oranges expriment un arrêt de la récursivité +[paquet feuille], les lignes bleues représentent des prédépendances et les +lignes vertes représentent des conflits. + </para> + <para> +Attention, dotty ne peut pas représenter des ensembles de paquets +plus volumineux. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-p/</><term><option/--pkg-cache/</> + <ListItem><Para> +Indique le fichier servant de cache des paquets. Le cache des paquets est +le cache primaire utilisé par toutes les opérations. +Élément de configuration : <literal/Dir::Cache::pkgcache/. + </VarListEntry> + + <VarListEntry><term><option/-s/</><term><option/--src-cache/</> + <ListItem><Para> +Indique le fichier servant de cache des sources. Ce cache n'est utilisé que +par <literal/gencaches/ ; une version des informations sur les paquets, +faite à partir d'une analyse de sources distantes, est conservée. Quand le +cache des paquets est crée, le cache de sources est utilisé afin d'éviter +d'analyser à nouveau tous les paquets. +Élément de configuration : <literal/Dir::Cache::srcpkgcache/. + </VarListEntry> + + <VarListEntry><term><option/-q/</><term><option/--quiet/</> + <ListItem><Para> +Mode silencieux ; produit une sortie pertinente pour l'enregistrement dans un +fichier journal, sans afficher d'indicateur de progression. Un plus grand +nombre de q produira un plus grand silence, avec un maximum de 2. Vous pouvez +aussi utiliser <option/-q=#/ pour positionner le niveau de silence, annulant +le fichier de configuration. +Élément de configuration : <literal/quiet/. + </VarListEntry> + + <VarListEntry><term><option/-i/</><term><option/--important/</> + <ListItem><Para> +N'affiche que les dépendances importantes ; à utiliser avec la commande +unmet pour n'afficher que les relations Depends et Pre-Depends. +Élément de configuration : <literal/APT::Cache::Important/. + </VarListEntry> + + <VarListEntry><term><option/-f/</><term><option/--full/</> + <ListItem><Para> +Affiche la totalité des champs d'information sur le paquet lors d'une +recherche. +Élément de configuration : <literal/APT::Cache::ShowFull/. + </VarListEntry> + + <VarListEntry><term><option/-a/</><term><option/--all-versions/</> + <ListItem><Para> +Affiche la totalité des champs d'information pour toutes les versions +disponibles : cette option concerne seulement la commande show. +Élément de configuration : <literal/APT::Cache::AllVersions/. + </VarListEntry> + + <VarListEntry><term><option/-g/</><term><option/--generate/</> + <ListItem><Para> +Réalise une mise à jour automatique du cache des paquets plutôt que de se +servir du cache actuel. +Pour désactiver cette option (option par défaut), utiliser l'option +<option/--no-generate/. +Élément de configuration : <literal/APT::Cache::Generate/. + </VarListEntry> + + <VarListEntry><term><option/--names-only/</> + <ListItem><Para> +N'effectue une recherche que sur les noms de paquets et non sur les +descriptions longues. +Élément de configuration : <literal/APT::Cache::NamesOnly/. + </VarListEntry> + + <VarListEntry><term><option/--all-names/</> + <ListItem><Para> +Avec cette option <literal/pkgnames/ affiche tous les noms, les noms des +paquets virtuels et les dépendances manquantes. +Élément de configuration : <literal/APT::Cache::AllNames/. + </VarListEntry> + + <VarListEntry><term><option/--recurse/</> + <ListItem><Para> +Avec cette option <literal/depends/ est récursive de manière à n'afficher +qu'une seule fois les paquets mentionnés. +Élément de configuration : <literal/APT::Cache::RecurseDepends/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>Fichiers</> + <variablelist> + <VarListEntry><term><filename>/etc/apt/sources.list</></term> + <ListItem><Para> +Emplacements où aller chercher les paquets. +Élément de configuration : <literal/Dir::Etc::SourceList/. + </VarListEntry> + + <VarListEntry><term><filename>&statedir;/lists/</></term> + <ListItem><Para> +Zone de stockage pour les informations qui concernent chaque ressource de +paquet spécifiée dans &sources-list; +Élément de configuration : <literal/Dir::State::Lists/. + </VarListEntry> + + <VarListEntry><term><filename>&statedir;/lists/partial/</></term> + <ListItem><Para> +Zone de stockage pour les informations en transit. +Élément de configuration : <literal/Dir::State::Lists/ (partial est implicite). + </VarListEntry> + </variablelist> + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-conf;, &sources-list;, &apt-get; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> +<command/apt-cache/ retourne zéro après un déroulement normal, et le nombre +décimal 100 en cas d'erreur. + </RefSect1> + + &manbugs; + &manauthor; + &deux-traducteurs; +</refentry> \ No newline at end of file diff --git a/apt/doc/fr/apt-cdrom.8.fr.sgml b/apt/doc/fr/apt-cdrom.8.fr.sgml new file mode 100644 index 0000000..11ba0ec --- /dev/null +++ b/apt/doc/fr/apt-cdrom.8.fr.sgml @@ -0,0 +1,150 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.3 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-cdrom</> + <manvolnum>8</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-cdrom</> + <refpurpose>Gestion des cédéroms par APT</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-cdrom</> + <arg><option>-hvrmfan</></arg> + <arg><option>-d=<replaceable/point de montage du cédérom/</></arg> + <arg><option>-o=<replaceable/option de configuration/</></arg> + <arg><option>-c=<replaceable/fichier/</></arg> + <group choice=req> + <arg>add</> + <arg>ident</> + </group> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> +<command/apt-cdrom/ est utilisé pour ajouter un nouveau cédérom à la liste des +sources disponibles. <command/apt-cdrom/ prend soin de déterminer la structure +du disque, de corriger de possibles erreurs de gravure et de vérifier les +fichiers d'index. + <para> +Il est nécessaire d'utiliser <command/apt-cdrom/ pour ajouter des cédéroms au +système APT, cela ne peut être réalisé « à la main ». Par ailleurs, +chaque disque d'un ensemble de cédéroms doit être séparément inséré et +parcouru pour prendre en compte de possibles erreurs de gravure. + + <para> +À moins que l'option <option>-h</> ou <option>--help</> ne soit donnée, l'une +des commandes suivantes doit être présente. + + <VariableList> + <VarListEntry><Term>add</Term> + <ListItem><Para> +La commande <literal/add/ est utilisée pour ajouter un nouveau disque à la +liste des sources. Elle démonte le cédérom, réclame l'insertion d'un disque, +parcourt ensuite le disque et copie les fichiers d'index. Si le disque ne +possède pas de répertoire <filename>.disk/</> correct, un titre descriptif +est demandé. + <para> +APT utilise un identifiant de cédérom pour reconnaître le disque qui +se trouve actuellement dans le lecteur et maintient une base de données de +ces identifiants dans <filename>&statedir;/cdroms.list</>. + </VarListEntry> + + <VarListEntry><Term>ident</Term> + <ListItem><Para> +Un outil de débogage pour rapporter l'identifiant du disque actuel ainsi +que le nom du fichier stocké. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-d/</><term><option/--cdrom/</> + <ListItem><Para> +Point de montage ; spécifie l'emplacement de montage du cédérom. Ce +point de montage doit être spécifié dans <filename>/etc/fstab</> et +correctement configuré. +Élément de configuration : <literal/Acquire::cdrom::mount/. + </VarListEntry> + + <VarListEntry><term><option/-r/</><term><option/--rename/</> + <ListItem><Para> +Change le nom d'un disque ; change le nom d'un disque ou annule le nom +donné aux disques. Cette option oblige <command/apt-cdrom/ à demander un +nouveau nom à l'utilisateur. +Élément de configuration : <literal/APT::CDROM::Rename/. + </VarListEntry> + + <VarListEntry><term><option/-m/</><term><option/--no-mount/</> + <ListItem><Para> +Pas de montage ; empêche <command/apt-cdrom/ de monter ou démonter le +point de montage. Élément de configuration : <literal/APT::CDROM::NoMount/. + </VarListEntry> + + <VarListEntry><term><option/-f/</><term><option/--fast/</> + <ListItem><Para> +Copie rapide ; suppose que les paquets sont valides et ne vérifie pas +chaque paquet. Cette option ne devrait être utilisée que si <command/apt-cdrom/ +a préalablement utilisé ce disque et n'a trouvé aucune erreur. +Élément de configuration : <literal/APT::CDROM::Fast/. + </VarListEntry> + + <VarListEntry><term><option/-a/</><term><option/--thorough/</> + <ListItem><Para> +Parcours minutieux des paquets ; cette option peut être nécessaire avec +de vieux cédéroms de systèmes Debian 1.1 ou 1.2 dont les fichiers Packages +sont situés dans des endroits étranges. Il faudra plus de temps pour +parcourir le CD mais tous les paquets seront repérés. + </VarListEntry> + + <VarListEntry><term><option/-n/</> + <term><option/--just-print/</> + <term><option/--recon/</> + <term><option/--no-act/</> + <ListItem><Para> +Aucune modification ; ne pas modifier le fichier &sources-list; ni les +fichiers d'index. Cependant, tout est vérifié. +Élément de configuration : <literal/APT::CDROM::NoAct/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-conf;, &apt-get;, &sources-list; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> +<command/apt-cdrom/ retourne zéro après un déroulement normal, et le nombre +décimal 100 en cas d'erreur. + </RefSect1> + + &manbugs; + &manauthor; +&deux-traducteurs; + +</refentry> + diff --git a/apt/doc/fr/apt-config.8.fr.sgml b/apt/doc/fr/apt-config.8.fr.sgml new file mode 100644 index 0000000..788bed8 --- /dev/null +++ b/apt/doc/fr/apt-config.8.fr.sgml @@ -0,0 +1,113 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.3 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-config</> + <manvolnum>8</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-config</> + <refpurpose>Programme pour interroger la configuration de APT</> + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-config</> + <arg><option>-hv</></arg> + <arg><option>-o=<replaceable/option de configuration/</></arg> + <arg><option>-c=<replaceable/fichier/</></arg> + <group choice=req> + <arg>shell</> + <arg>dump</> + </group> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> +<command/apt-config/ est un programme interne utilisé par différentes +composantes d'APT ; il offre la possibilité d'une configuration +cohérente et permet aux applications conçues sous forme de scripts une +utilisation simple du fichier de configuration principal +<filename>/etc/apt/apt.conf</>. + <para> +À moins que l'option <option>-h</> ou <option>--help</> ne soit donnée, l'une +des commandes suivantes doit être présente. + </para> + + <VariableList> + <VarListEntry><Term>shell</Term> + <ListItem><Para> +Le terme shell est utilisé pour accéder aux informations de configuration +depuis un script shell. Deux arguments doivent lui être donnés ; le +premier est une variable de shell et le second une valeur de configuration à +demander. +La sortie standard consiste en une liste de commandes d'assignation de shell +pour chaque valeur présente. Dans un script shell, cette commande devrait +être utilisée comme suit : + + </para> + +<informalexample><programlisting> +OPTS="-f" +RES=`apt-config shell OPTS MyApp::Options` +eval $RES +</programlisting></informalexample> + + <para> +La variable d'environnement de shell $OPTS sera définie par la valeur de +MyApp::Options ou, par défaut, la valeur -f. + + <para> +L'élément de configuration peut être suivi par /[fdbi]. « f » +renvoie un nom de fichier, « d » un nom de répertoire, +« b » renvoie « true » ou « false » et +« i » renvoie un entier. Chacune de ses valeurs est normalisée et vérifiée. + </VarListEntry> + + <VarListEntry><Term>dump</Term> + <ListItem><Para> +Affiche seulement le contenu de l'espace de configuration. + </VarListEntry> + + </VariableList> + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> +<command/apt-config/ retourne zéro après un déroulement normal, et le nombre +100 en cas d'erreur. + </RefSect1> + + &manbugs; + &manauthor; + &deux-traducteurs; + +</refentry> diff --git a/apt/doc/fr/apt-extracttemplates.1.fr.sgml b/apt/doc/fr/apt-extracttemplates.1.fr.sgml new file mode 100644 index 0000000..25f3751 --- /dev/null +++ b/apt/doc/fr/apt-extracttemplates.1.fr.sgml @@ -0,0 +1,83 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.4 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-extracttemplates</> + <manvolnum>1</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-extracttemplates</> +<refpurpose>Un outil pour extraire d'un paquet Debian les textes de configuration pour DebConf. + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-extracttemplate</> + <arg><option>-hv</></arg> + <arg><option>-t=<replaceable/répertoire temporaire/</></arg> + <arg choice="plain" rep="repeat"><replaceable>fichier</replaceable></arg> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> +<command/apt-extracttemplates/ prend un ou plusieurs paquets Debian en +argument et renvoie (dans un répertoire temporaire) tous les scripts et +guides de configuration associés. Pour chaque paquet traité contenant des +scripts et guides de configuration, une ligne est affichée au format +suivant : + <para> + paquet version guide-de-configuration script-de-configuration + <para> +Les scripts et guides de configuration sont écrits dans le répertoire +temporaire indiqué par l'option <option>-t</option> ou +<option>--tempdir</option> (<literal/APT::ExtractTemplates::TempDir/>) ; les noms de fichier sont de la +forme <filename>template.XXXX</> ou <filename>config.XXXX</>. + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-t/</><term><option/--tempdir/</> + <ListItem><Para> +Répertoire temporaire dans lequel écrire les scripts et guides de +configuration pour Debconf. +Élément de configuration : <literal/APT::ExtractTemplates::TempDir/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + + + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> +<command/apt-extracttemplates/ retourne zéro si tout se passe bien, le nombre +100 en cas d'erreur. + </RefSect1> + + &manbugs; + &manauthor; +&traducteur; + +</refentry> diff --git a/apt/doc/fr/apt-ftparchive.1.fr.sgml b/apt/doc/fr/apt-ftparchive.1.fr.sgml new file mode 100644 index 0000000..98fc5ac --- /dev/null +++ b/apt/doc/fr/apt-ftparchive.1.fr.sgml @@ -0,0 +1,517 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.4 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-ftparchive</> + <manvolnum>1</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-ftparchive</> + <refpurpose>Un outil pour créer des index + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-ftparchive</> + <arg><option>-hvdsq</></arg> + <arg><option>--md5</></arg> + <arg><option>--delink</></arg> + <arg><option>--readonly</></arg> + <arg><option>--contents</></arg> + <arg><option>-o=<replaceable/option de configuration/</></arg> + <arg><option>-c=<replaceable/fichier/</></arg> + <group choice=req> + <arg>packages<arg choice="plain" rep="repeat"><replaceable>chemin</replaceable></arg><arg><replaceable>override</replaceable><arg><replaceable>préfixe-de-chemin</replaceable></arg></arg></arg> + <arg>sources<arg choice="plain" rep="repeat"><replaceable>chemin</replaceable></arg><arg><replaceable>override</replaceable><arg><replaceable>préfixe-de-chemin</replaceable></arg></arg></arg> + <arg>contents <arg choice="plain"><replaceable>chemin</replaceable></arg></arg> + <arg>generate <arg choice="plain"><replaceable>fichier-de-configuration</replaceable></arg> <arg choice="plain" rep="repeat"><replaceable>section</replaceable></arg></arg> + <arg>clean <arg choice="plain"><replaceable>fichier-de-configuration</replaceable></arg></arg> + </group> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> +<command/apt-ftparchive/ est l'outil en ligne de commande qui crée les index +dont APT se sert pour accéder aux sources des distributions. Un index doit +être créé pour un site et basé sur le contenu de ce site. + + <para> +<command/apt-ftparchive/ est un ensemble comprenant le programme +&dpkg-scanpackages; et toutes ses fonctionnalités via la commande +<literal/directory/ ; il comprend aussi un générateur de fichier « Contents », +la commande <literal/contents/, et une technique élaborée pour « scripter » +le processus de création d'une archive complète. + + <para> +<command/apt-ftparchive/ peut utiliser lui-même des bases de données binaires +pour « cacher » le contenu d'un fichier .deb ; il n'a pas besoin de programmes +extérieurs, sauf &gzip;. Lors d'une exécution, il vérifie les changements dans +les fichiers et crée les fichiers compressés voulus. + + <para> +À moins que l'option <option/-h/ ou <option/--help/ ne soit donnée, l'une des +commandes suivantes doit être présente : + + <VariableList> + <VarListEntry><term>packages</term> + <ListItem><Para> +La commande <literal/packages/ crée un fichier « Packages » à partir d'une +arborescence. Elle recherche récursivement à travers le répertoire donné +les fichiers .deb et, pour chaque fichier trouvé, envoie l'enregistrement +du paquet sur la sortie standard. Cette commande est approximativement +équivalente à &dpkg-scanpackages;. + <para> +On peut se servir de l'option <option/--db/ pour demander un cache binaire. + </VarListEntry> + + <VarListEntry><term>sources</term> + <ListItem><Para> +La commande <literal/sources/ crée un index des sources à partir d'une +arborescence. Elle recherche récursivement à travers le répertoire donné +les fichiers .dsc et, pour chaque fichier trouvé, envoie l'enregistrement +du paquet sur la sortie standard. Cette commande est approximativement +équivalente à &dpkg-scansources;. + <para> +Quand on précise un fichier « override », c'est un fichier source avec une +extension .src qui est recherché. On peut se servir de l'option +<option/--source-override/ pour changer de fichier source d'« override ». + </VarListEntry> + + <VarListEntry><term>contents</term> + <ListItem><Para> +La commande <literal/contents/ crée un fichier « Contents » à partir d'une +arborescence. Elle recherche récursivement à travers le répertoire donné +les fichiers .deb et, pour chaque fichier trouvé, lit la liste des +fichiers. Elle trie la liste des fichiers correspondant à des paquets et +l'envoie sur la sortie standard. Les répertoires ne font pas partie du +résultat. Quand un fichier appartient à plusieurs paquets, une virgule +sépare les paquets. + <para> +On peut se servir de l'option <option/--db/ pour demander un cache binaire. + </VarListEntry> + + <VarListEntry><term>generate</term> + <ListItem><Para> +La commande <literal/generate/ est conçue pour être exécutable par le +programme cron et elle crée un index en suivant le fichier de configuration +donné. Le langage de configuration fournit un moyen souple de préciser +index et répertoires aussi bien que les paramètres requis. + </VarListEntry> + + <VarListEntry><term>clean</term> + <ListItem><Para> +La commande <literal/clean/ range les bases de données utilisées par le +fichier de configuration en supprimant les enregistrements qui ne sont +plus nécessaires. + </VarListEntry> + </VariableList> + + </RefSect1> + + <RefSect1><Title>Configuration de la commande generate</> + <para> +La commande <literal/generate/ utilise un fichier de configuration pour +décrire l'archive qui va être créée. Le format de ce fichier est le format +ISC classique utilisé par des outils ISC comme bind 8 et dhcpd. &apt-conf; +décrit ce format. Il faut noter que l'analyse de ce fichier se fait +par section tandis que celle d'&apt-conf; se fait par arborescence. Cela +n'affecte que l'usage de l'étiquette de visée (scope tag). + + <para> +Ce fichier de configuration possède quatre sections, décrites ci-dessous. + + <refsect2><title>La section Dir</> + <Para> +La section <literal/Dir/ définit les répertoires standards où situer les +fichiers nécessaires au processus de création. Ces répertoires sont +précédés de chemins relatifs définis dans les sections suivantes de manière +à produire un chemin absolu et complet. + <VariableList> + <VarListEntry><term>ArchiveDir</term> + <ListItem><Para> +Indique la racine de l'archive FTP ; Pour une configuration Debian classique, +c'est le répertoire qui contient le fichier <filename/ls-LR/, et les noeuds +des distributions. + </VarListEntry> + + <VarListEntry><term>OverrideDir</term> + <ListItem><Para> +Indique l'emplacement des fichiers d'« override ». + </VarListEntry> + + <VarListEntry><term>CacheDir</term> + <ListItem><Para> +Indique l'emplacement des fichiers de cache. + </VarListEntry> + + <VarListEntry><term>FileListDir</term> + <ListItem><Para> +Indique l'emplacement des fichiers contenant la liste des fichiers (si on se +sert de la valeur <literal/FileList/ définie plus bas). + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>La section Default</> + <para> +La section <literal/Default/ précise les valeurs par défaut et les paramètres +qui contrôlent la marche du générateur. Ces valeurs peuvent être annulées dans +d'autres sections (paramètrage par section). + <VariableList> + <VarListEntry><term>Packages::Compress</term> + <ListItem><Para> +Indique comment sont compressés les fichiers d'index. C'est une chaîne qui +contient des valeurs séparées par des espaces ; elle contient au moins l'une +des valeurs suivantes : « . » (pas de compression), « gzip », « bzip2 ». +Par défaut, c'est la chaîne « . gzip ». + </VarListEntry> + + <VarListEntry><term>Packages::Extensions</term> + <ListItem><Para> +Indique la liste par défaut des extensions de fichier qui constituent des +fichiers-paquets. Par défaut, c'est « .deb ». + </VarListEntry> + + <VarListEntry><term>Sources::Compress</term> + <ListItem><Para> +Identique à <literal/Packages::Compress/ mais précise comment sont compressés +les fichiers sources. + </VarListEntry> + + <VarListEntry><term>Sources::Extensions</term> + <ListItem><Para> +Indique la liste par défaut des extensions de fichier qui constituent des +fichiers sources. Par défaut, c'est « .dsc ». + </VarListEntry> + + <VarListEntry><term>Contents::Compress</term> + <ListItem><Para> +Identique à <literal/Packages::Compress/ mais précise comment sont compressés +les fichiers « Contents ». + </VarListEntry> + + <VarListEntry><term>DeLinkLimit</term> + <ListItem><Para> +Indique le nombre de kilooctets à délier (et à remplacer par des liens en dur) +pour chaque exécution. On s'en sert, pour chaque section, avec le paramètre +<literal/External-Links/. + </VarListEntry> + + <VarListEntry><term>FileMode</term> + <ListItem><Para> +Indique le système de permissions des fichiers d'index créés. Par défaut, +c'est le mode 0644. Tous les fichiers d'index ont ce mode et le masque +utilisateur (umasq) est ignoré. + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>La section TreeDefault</> + <para> +On indique les valeurs par défaut particulières à la section « Tree ». Toutes +ces variables sont des variables de substitution ; les chaînes $(DIST), +$(SECTION) et $(ARCH) sont remplacées par leur valeur respective. + + <VariableList> + <VarListEntry><term>MaxContentsChange</term> + <ListItem><Para> +Indique le nombre de kilooctets de fichiers « Contents » qui sont +crées chaque jour. Les fichiers « Contents » sont tirés au sort +selon le système <emphasis>round-robin</emphasis> de manière que, sur +plusieurs jours, tous soient reconstruits. + </VarListEntry> + + <VarListEntry><term>ContentsAge</term> + <ListItem><Para> +Contrôle le nombre de jours pendant lequel un fichier « Contents » peut être +utilisé sans actualisation. Quand cette limite est franchie, le « mtime » +du fichier « Contents » est mis à jour. Cela peut arriver quand un fichier +est modifié sans que cela modifie le fichier « Contents » (modification +par « override » par exemple). Un délai est permis dans l'espoir que de +nouveaux « .deb » seront installés, exigeant un nouveau « Contents ». Par +défaut ce nombre vaut 10, l'unité étant le jour. + </VarListEntry> + + <VarListEntry><term>Directory</term> + <ListItem><Para> +Indique la racine de l'arborescence des « .deb ». Par défaut, c'est +<filename>$(DIST)/$(SECTION)/binary-$(ARCH)/</>. + </VarListEntry> + + <VarListEntry><term>Packages</term> + <ListItem><Para> +Indique le fichier « Packages » crée. Par défaut, c'est +<filename>$(DIST)/$(SECTION)/binary-$(ARCH)/Packages</>. + </VarListEntry> + + <VarListEntry><term>Sources</term> + <ListItem><Para> +Indique le fichier « Packages » crée. Par défaut, c'est +<filename>$(DIST)/$(SECTION)/source/Sources</>. + </VarListEntry> + + <VarListEntry><term>InternalPrefix</term> + <ListItem><Para> +Indique un préfixe de chemin ; ce préfixe fait qu'un lien symbolique sera +considéré comme un lien interne plutôt que comme un lien externe. Par défaut, +c'est <filename>$(DIST)/$(SECTION)/</>. + </VarListEntry> + + <VarListEntry><term>Contents</term> + <ListItem><Para> +Indique le fichier « Contents » crée. Par défaut, c'est +<filename>$(DIST)/Contents-$(ARCH)</>. Quand le paramètrage fait que +différents fichiers « Packages » se réfèrent à un seul fichier « Contents », +<command/apt-ftparchive/ les intègre automatiquement. + </VarListEntry> + + <VarListEntry><term>Contents::Header</term> + <ListItem><Para> +Indique l'en-tête à préfixer au fichier « Contents » crée. + </VarListEntry> + + <VarListEntry><term>BinCacheDB</term> + <ListItem><Para> +Indique la base de donnée binaire servant de cache pour cette section. +Différentes sections peuvent partager cette base de données. + </VarListEntry> + + <VarListEntry><term>FileList</term> + <ListItem><Para> +Indique qu'au lieu de lire l'arborescence, <command/apt-ftparchive/ doit lire +la liste de fichiers dans le fichier donné en argument. Les noms relatifs +sont préfixés par le répertoire de l'archive. + </VarListEntry> + + <VarListEntry><term>SourceFileList</term> + <ListItem><Para> +Indique qu'au lieu de lire l'arborescence, <command/apt-ftparchive/ doit lire +la liste de fichiers dans le fichier donné en argument. Les noms relatifs +sont préfixés par le répertoire de l'archive. On s'en sert pour créer des +index de sources. + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>La section Tree</> + <para> +La section <literal/Tree/ définit une arborescence debian classique avec +un répertoire de base, différentes sections dans ce répertoire et +différentes architectures dans chaque section. Le chemin exact est défini +par la variable de substitution <literal/Directory/. + <para> +La section <literal/Tree/ accepte une étiquette de visée (scope tag) qui +détermine la variable <literal/$(DIST)/ et la racine de l'arborescence +(le chemin est préfixé par <literal/ArchiveDir/). C'est par exemple : +<filename>dists/woody</>. + <para> +Tous les paramètres définis dans la section <literal/TreeDefault/ peuvent +s'utiliser dans la section <literal/Tree/ ainsi que les trois nouvelles +variables suivantes. + <para> +Quand il exécute la section <literal/Tree/, <command/apt-ftparchive/ +agit ainsi : +<informalexample><programlisting> +for i in Sections do + for j in Architectures do + Generate for DIST=scope SECTION=i ARCH=j +</programlisting></informalexample> + + <VariableList> + <VarListEntry><term>Sections</term> + <ListItem><Para> +C'est une liste de sections séparées par des espaces qui appartiennent à une +distribution ; classiquement, on trouve <literal/main contrib non-free/. + </VarListEntry> + + <VarListEntry><term>Architectures</term> + <ListItem><Para> +C'est une liste de toutes les architectures qui appartiennent à chaque +section. L'architecture spéciale « source » indique que l'arborescence +est une arborescence de sources. + </VarListEntry> + + <VarListEntry><term>BinOverride</term> + <ListItem><Para> +Indique le fichier binaire d'« override ». le fichier d'« override » contient +des informations sur la section, la priorité et le responsable de paquet. + </VarListEntry> + + <VarListEntry><term>SrcOverride</term> + <ListItem><Para> +Indique le fichier source d'« override ». Le fichier d'« override » contient +des informations sur la section. + </VarListEntry> + </VariableList> + </refsect2> + + <refsect2><title>La section BinDirectory</> + <para> +La section <literal/bindirectory/ définit une arborescence binaire sans +structure particulière. L'étiquette de visée (scope tag) indique l'emplacement +du répertoire binaire et le paramètrage est identique à celui pour la +section <literal/Tree/ sans substitution de variables ou au paramètrage de +<literal>Section</><literal>Architecture</>. + <VariableList> + <VarListEntry><term>Packages</term> + <ListItem><Para> +Indique le fichier « Packages » crée. + </VarListEntry> + + <VarListEntry><term>SrcPackages</term> + <ListItem><Para> +Indique le fichier « Sources » crée. L'un des deux fichiers, +<literal/Packages/ ou <literal/SrcPackages/ est nécessaire. + </VarListEntry> + + <VarListEntry><term>Contents</term> + <ListItem><Para> +Indique le fichier « Contents » crée. + </VarListEntry> + + <VarListEntry><term>Binoverride</term> + <ListItem><Para> +Indique le fichier binaire d'« override ». + </VarListEntry> + + <VarListEntry><term>SrcOverride</term> + <ListItem><Para> +Indique le fichier source d'« override ». + </VarListEntry> + + <VarListEntry><term>BinCacheDB</term> + <ListItem><Para> +Indique une base de données cache. + </VarListEntry> + + <VarListEntry><term>PathPrefix</term> + <ListItem><Para> +Ajoute un chemin à tous les chemins créés. + </VarListEntry> + + <VarListEntry><term>FileList, SourceFileList</term> + <ListItem><Para> +Indique le fichier contenant la liste des fichiers. + </VarListEntry> + </VariableList> + </refsect2> + </RefSect1> + + <RefSect1><Title>Le fichier binaire « Override »</> + <para> +Le fichier binaire « Override » est pleinement compatible avec +&dpkg-scanpackages;. Il contient quatre champs séparés par des espaces. Le +premier est le nom du paquet ; le deuxième est la priorité à donner à ce +paquet ; le troisième est sa section et le dernier champ est un champ pour +une permutation du responsable du paquet. + <para> +Le champ du responsable est de cette forme : + <literallayout>old [// oldn]* => new</literallayout> + ou simplement, + <literallayout>new</literallayout> +La première forme permet de spécifier de vieilles adresses dans une liste (le +séparateur est la double barre oblique). Si l'une de ces deux formes est +rencontrée, la valeur de new remplace la valeur du champ. La deuxième forme +remplace inconditionnellement le champ. + </RefSect1> + + <RefSect1><title>Le fichier Source « Override »</> + <para> +Le fichier Source « Override » est pleinement compatible avec +&dpkg-scansources;. Il contient deux champs. Le premier est le nom du paquet +source; le second, sa section. + </RefSect1> + + <RefSect1><Title>Les options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/--md5/</> + <ListItem><Para> +Créer la somme de contrôle MD5. Cette option est activée par défaut. Quand +elle est désactivée, les fichiers d'index n'ont pas les champs MD5Sum là où +c'est possible. +Élément de configuration : <literal/APT::FTPArchive::MD5/. + </VarListEntry> + + <VarListEntry><term><option/-d/</><term><option/--db/</> + <ListItem><Para> +Utiliser une base de données binaire pour cache. Cela n'a aucun effet sur la +commande generate. +Élément de configuration : <literal/APT::FTPArchive::DB/. + </VarListEntry> + + <VarListEntry><term><option/-q/</><term><option/--quiet/</> + <ListItem><Para> +Mode silencieux ; cette commande produit une sortie destinée à l'enregistrement +dans un fichier journal en omettant les indicateurs de progression. +Un plus grand nombre de « q » (2 au plus) produit un plus grand silence. +On peut aussi utiliser <option/-q=#/ pour positionner le niveau de silence, +et annuler le fichier de configuration. +Élément de configuration : <literal/quiet/. + </VarListEntry> + + <VarListEntry><term><option/--delink/</> + <ListItem><Para> +Faire une déliaison. Si <literal/External-Links/ est activé, cette option +permet réellement la déliaison des fichiers. Par défaut, elle est activée mais +elle peut être désactivée avec l'option <option/--no-delink/. +Élément de configuration : <literal/APT::FTPArchive::DeLinkAct/. + </VarListEntry> + + <VarListEntry><term><option/--contents/</> + <ListItem><Para> +Permettre la création d'un fichier « Contents ». Quand cette option est +activée et que les index sont créés sous forme de base de données binaire, +la liste des fichiers est aussi extraite et conservée dans la base de données +pour un usage futur. Avec la commande generate, cette option permet la +création de fichiers « Contents ». Par défaut, elle est activée. +Élément de configuration : <literal/APT::FTPArchive::Contents/. + </VarListEntry> + + <VarListEntry><term><option/-s/</><term><option/--source-override/</> + <ListItem><Para> +Indique le fichier source d'« override » à utiliser avec la commande +<literal/sources/. +Élément de configuration : <literal/APT::FTPArchive::SourceOverride/. + </VarListEntry> + + <VarListEntry><term><option/--readonly/</> + <ListItem><Para> +N'autoriser que la lecture pour les bases de données de cache. +Élément de configuration : <literal/APT::FTPArchive::ReadOnlyDB/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> +<command/apt-ftparchive/ retourne zéro si tout se passe bien, le nombre +décimal 100 en cas d'erreur. + </RefSect1> + + &manbugs; + &manauthor; + &traducteur; +</refentry> diff --git a/apt/doc/fr/apt-sortpkgs.1.fr.sgml b/apt/doc/fr/apt-sortpkgs.1.fr.sgml new file mode 100644 index 0000000..8e964f6 --- /dev/null +++ b/apt/doc/fr/apt-sortpkgs.1.fr.sgml @@ -0,0 +1,75 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.3 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt-sortpkgs</> + <manvolnum>1</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt-sortpkgs</> + <refpurpose>Un outil pour trier les index de paquets. + </refnamediv> + + <!-- Arguments --> + <refsynopsisdiv> + <cmdsynopsis> + <command>apt-sortpkgs</> + <arg><option>-hvs</></arg> + <arg><option>-o=<replaceable/option de configuration/</></arg> + <arg><option>-c=<replaceable/fichier/</></arg> + <arg choice="plain" rep="repeat"><replaceable/fichier/</arg> + </cmdsynopsis> + </refsynopsisdiv> + + <RefSect1><Title>Description</> + <para> +<command/apt-sortpkgs/ prend un index (un index de Source ou un index de +paquet) et trie leurs enregistrements selon le nom de paquet. Un tri des +champs de chaque enregistrement est réalisé selon des règles internes. + + <para> +Le résultat est envoyé sur la sortie standard ; l'entrée doit être un +fichier analysable. + </RefSect1> + + <RefSect1><Title>Options</> + &apt-cmdblurb; + + <VariableList> + <VarListEntry><term><option/-s/</><term><option/--source/</> + <ListItem><Para> +Se servir d'un index de sources pour le tri des champs. +Élément de configuration : <literal/APT::SortPkgs::Source/. + </VarListEntry> + + &apt-commonoptions; + + </VariableList> + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-conf; + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> +<command/apt-sortpkgs/ retourne zéro si tout se passe bien ou 100 en cas +d'erreur. + </RefSect1> + + &manbugs; + &manauthor; + &traducteur; +</refentry> diff --git a/apt/doc/fr/apt.conf.5.fr.sgml b/apt/doc/fr/apt.conf.5.fr.sgml new file mode 100644 index 0000000..3e10420 --- /dev/null +++ b/apt/doc/fr/apt.conf.5.fr.sgml @@ -0,0 +1,436 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.5 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt.conf</> + <manvolnum>5</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt.conf</> + <refpurpose>Fichier de configuration pour APT</> + </refnamediv> + + <RefSect1><Title>Description</> + <para> + <filename/apt.conf/ est le principal fichier de configuration de la +collection d'outils que constitue APT ; tous les outils font appel à ce +fichier de configuration et utilisent un analyseur syntaxique de ligne de +commande commun afin de fournir un environnement uniforme. Quand un outil +d'APT démarre, il lit (si elle existe) la variable d'environnement +<envar/APT_CONFIG/ ; puis il lit les fichiers situés dans +<literal/Dir::Etc::Parts/ ainsi que le principal fichier de configuration +indiqué par <literal/Dir::Etc::main/ ; enfin il applique les options de la ligne de commande qui annulent les directives de configuration, chargeant, +si nécessaire, d'autres fichiers de configuration. + <para> +Le fichier de configuration est construit comme un arbre d'options +organisées en groupes fonctionnels. On se sert du double deux points (« :: ») pour indiquer une option ; par exemple, <literal/APT::Get::Assume-Yes/ est +une option pour le groupe d'outils APT, destinée à l'outil Get. Les options +n'héritent pas des groupes de leurs parents. + <para> +Syntaxiquement, le langage de configuration est conçu sur le même modèle +que les langages utilisés par des outils ISC tels que bind et dhcp. Chaque +ligne est de la forme : + <literallayout>APT::Get::Assume-Yes "true";</literallayout> +Le point-virgule final est obligatoire et les guillemets sont optionnels. +On peut déclarer un nouveau champ d'action avec des accolades, comme +suit : +<informalexample><programlisting> +APT { + Get { + Assume-Yes "true"; + Fix-Broken "true"; + }; +}; +</programlisting></informalexample> +avec des retours à la ligne pour faciliter la lecture. On peut créer des +listes en ouvrant un champ d'action et en mettant un seul mot entre +apostrophes suivi d'un point-virgule. On peut mettre plusieurs entrées, +séparées par un point-virgule. +<informalexample><programlisting> +DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; +</programlisting></informalexample> + <para> +Les modèles <filename>&docdir;examples/apt.conf</> &configureindex; +montrent à quoi devrait ressembler le fichier de configuration. + <para> +Deux éléments spéciaux sont autorisés : <literal/#include/ et +<literal/#clear/. <literal/#include/ inclut le fichier donné en argument, à +moins que le nom se termine par une barre oblique. <literal/#clear/ sert à +effacer une liste de noms. + <para> +Tous les outils d'APT possèdent une option <option>-o</> qui permet de +spécifier une configuration arbitraire depuis la ligne de commande. La +syntaxe consiste en un nom complet d'option (par exemple +<literal/APT::Get::Assume-Yes/) suivi par un signe égal, puis par la nouvelle +valeur de l'option. On peut compléter une liste en ajoutant un « :: » au nom +de la liste. + </RefSect1> + + <RefSect1><Title>Le groupe APT</> + <para> +Ce groupe d'options contrôle aussi bien le comportement global d' APT que +la prise en compte des options pour chaque outil. + + <VariableList> + <VarListEntry><Term>Architecture</Term> + <ListItem><Para> +L'architecture du système ; cette option positionne l'architecture à utiliser +pour récupérer des fichiers et analyser des listes de paquets. L'architecture +interne par défaut est celle pour laquelle APT a été compilé. + </VarListEntry> + + <VarListEntry><Term>Ignore-Hold</Term> + <ListItem><Para> +Ignore les paquets « suspendus » ; cette option globale indique au système de +résolution de ne pas tenir compte des paquets « suspendus » dans sa prise de +décision. + </VarListEntry> + + <VarListEntry><Term>Clean-Installed</Term> + <ListItem><Para> +Avec cette option qui est activée par défaut, la fonctionnalité « autoclean » +supprime tout paquet qui ne peut plus être récupéré dans le cache. +Quand cette option est désactivée, les paquets qui sont installés localement +sont aussi exclus du nettoyage - mais notez que APT ne fournit aucun moyen +direct pour les réinstaller. + </VarListEntry> + + <VarListEntry><Term>Immediate-Configure</Term> + <ListItem><Para> +Désactive la configuration immédiate ; cette dangereuse option désactive +une partie du code de mise en ordre de APT pour que ce dernier effectue le +moins d'appels possible à Dpkg. C'est peut être nécessaire sur des systèmes +lents à un seul utilisateur mais c'est extrêmement dangereux et cela peut +faire échouer les scripts d'installation, voire pire. +Utilisez-la à vos risques et périls. + </VarListEntry> + + <VarListEntry><Term>Force-LoopBreak</Term> + <ListItem><Para> +Ne jamais activer cette option à moins que vous ne sachiez -réellement- ce que +vous faites. Elle autorise APT à supprimer temporairement un paquet +essentiel pour mettre fin à une boucle Conflicts / Conflicts ou +Conflicts / Pre-Depends entre deux paquets essentiels. UNE TELLE BOUCLE +NE DOIT JAMAIS SE PRODUIRE : C'EST UN BOGUE SÉRIEUX. Cette option fonctionne +si les paquets essentiels ne sont pas tar, gzip, libc, dpkg, bash ou tous +les paquets dont ces paquets dépendent. + </VarListEntry> + + <VarListEntry><Term>Cache-Limit</Term> + <ListItem><Para> +APT utilise un fichier cache d'une taille mémoire fixe pour ranger les +informations du fichier « available ». Cette option fixe la taille de ce cache. + </VarListEntry> + + <VarListEntry><Term>Get</Term> + <ListItem><Para> +La sous-section <literal/Get/ contrôle l'outil &apt-get;, veuillez consulter +sa documentation pour avoir plus d'informations sur les options en question. + </VarListEntry> + + <VarListEntry><Term>Cache</Term> + <ListItem><Para> +La sous-section <literal/Cache/ contrôle l'outil &apt-cache;, veuillez +consulter sa documentation pour avoir plus d'informations sur les options en +question. + </VarListEntry> + + <VarListEntry><Term>CDROM</Term> + <ListItem><Para> +La sous-section <literal/CDROM/ contrôle l'outil &apt-cdrom;, veuillez +consulter sa documentation pour avoir plus d'informations sur les options en +question. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Le groupe Acquire</> + <para> +Le groupe d'options <literal/Acquire/ contrôle le téléchargement des paquets et +les gestionnaires d'URI. + + <VariableList> + <VarListEntry><Term>Queue-Mode</Term> + <ListItem><Para> +Le mode file d'attente ; <literal/Queue-Mode/ peut prendre une valeur parmi +<literal/host/ ou <literal/access/ et cela détermine comment APT parallélise +les connexions sortantes. <literal/host/ signifie qu'une connexion par cible +sera initiée, tandis que <literal/access/ signifie qu'une connexion par type +d'URI sera initiée. + </VarListEntry> + + <VarListEntry><Term>Retries</Term> + <ListItem><Para> +Nombre d'essais à effectuer. Si ce nombre n'est pas nul, APT essaie de +récupérer, le nombre donné de fois, les fichiers dont le rapatriement a échoué. + </VarListEntry> + + <VarListEntry><Term>Source-Symlinks</Term> + <ListItem><Para> +Utilise des liens symboliques pour les archives de sources. Positionnée à +« true », cette option crée si possible des liens symboliques vers les +archives de sources au lieu de les copier. +Par défaut à « true ». + </VarListEntry> + + <VarListEntry><Term>http</Term> + <ListItem><Para> +HTTP URIs; http::Proxy est le mandataire (proxy) http à utiliser par défaut. +Il se présente sous la forme standard : +<literal>http://[[user][:pass]@]host[:port]/</>. En utilisant la syntaxe : +<literal/http::Proxy::<host>/, où le mot-clé spécial <literal/DIRECT/ +indique de n'utiliser aucun mandataire, on peut spécifier un mandataire +pour chaque machine distante. La variable d'environnement <envar/http_proxy/ +remplace tous ces paramètres. + <para> +Trois options de configuration sont fournies pour le contrôle des caches qui +sont compatibles avec HTTP/1.1. <literal/No-Cache/ signifie que le mandataire +ne doit pas du tout utiliser les réponses qu'il a stockées ; <literal/Max-Age/ +sert uniquement pour les fichiers d'index : cela demande au cache de les +mettre à jour quand leur ancienneté est supérieure au nombre de secondes +donné. Debian met à jour son fichier d'index de manière journalière, la +valeur par défaut est donc de 1 jour. <literal/No-Store/ sert uniquement +pour les fichiers d'archive : cela demande au cache de ne jamais garder +la requête. Cela peut éviter de polluer un cache mandataire avec des +fichiers .deb très grands. Note : Squid 2.0.2 ne prend en compte aucune de +ces options. + <para> +L'option <literal/timeout/ positionne le compteur de temps mort (timeout) +utilisé par la méthode : cela vaut pour tout (connexion, données). + <para> +Une option de configuration est fournie pour contrôler la profondeur du tube +pour le cas où un serveur distant n'est pas conforme à la RFC ou est bogué +(comme Squid 2.0.2). Acquire::http::Pipeline-Depth a une valeur +comprise entre 0 et 5 : elle indique le nombre de requêtes en attente qui +peuvent être émises. Quand la machine distante ne conserve pas correctement +les connexions TCP, on DOIT donner une valeur égale à 0 -- sinon des +données seront corrompues. Les machines qui ont besoin de cette option +ne respectent pas la RFC 2068. + </VarListEntry> + + <VarListEntry><Term>ftp</Term> + <ListItem><Para> +FTP URIs ; ftp::Proxy est le serveur mandataire par défaut à utiliser. Il se +présente sous la forme standard : +<literal>ftp://[[user][:pass]@]host[:port]/</> ; il est remplacé par la +variable d'environnement <envar/ftp_proxy/. Pour utiliser un mandataire ftp, +vous devez renseigner l'entrée <literal/ftp::ProxyLogin/ dans le fichier de +configuration. Cette entrée spécifie les commandes qui disent au serveur +mandataire comment se connecter. Voyez &configureindex; pour savoir +comment faire. Les variables de substitution disponibles sont : +<literal/$(PROXY_USER)/, <literal/$(PROXY_PASS)/, <literal/$(SITE_USER)/, +<literal/$(SITE_PASS)/, <literal/$(SITE)/, et <literal/$(SITE_PORT)/. +Chacune correspond à un élément de l'URI. + <para> +L'option <literal/timeout/ positionne le compteur de temps mort (timeout) +utilisé par la méthode : cela vaut pour tout (connexion, données). + <para> +Plusieurs options de configuration sont fournies pour contrôler le mode +passif. Généralement, c'est plus sûr d'activer le mode passif ; cela marche +dans presque tous les environnements. Cependant, certaines situations +nécessitent que le mode passif soit désactivé et que le mode « port » de ftp +soit utilisé à la place. On peut le faire globalement, pour des +connexions qui passent par un mandataire ou pour une machine +spécifique (examinez le modèle de fichier de configuration). + <para> +On peut utiliser un mandataire FTP pour atteindre une cible HTTP en +positionnant la variable d'environnement <envar/ftp_proxy/ à une url http -- +consultez la méthode http ci-dessus pour la syntaxe. On ne peut pas fixer +cette variable dans le fichier de configuration et il n'est pas recommandé +d'utiliser HTTP par FTP à cause de son peu d'efficacité. + <para> +L'option <literal/ForceExtended/ contrôle l'utilisation des commandes liées +à la RFC 2428, <literal/EPSV/ et <literal/EPRT/. Par défaut, elle vaut +« false » ; ce qui signifie que ces commandes ne sont utilisées que pour une +connexion de type IPv6. Quand elle vaut « true », on les utilise même si +la connexion est de type IPv4. La plupart des serveurs FTP ne suivent pas +la RFC 2428. + </VarListEntry> + + <VarListEntry><Term>cdrom</Term> + <ListItem><Para> +CDROM URIs ; la seule option de configuration pour les URIs de CDROM +est le point de montage : <literal/cdrom::Mount/ ; il doit représenter le +point de montage du lecteur de cédérom indiqué dans <filename>/etc/fstab</>. +On peut fournir d'autres commandes de montage et de démontage quand le +point de montage ne peut être listé dans le fichier <filename>/etc/fstab</> +(par exemple, un montage SMB ou ...). Syntaxiquement, il faut placer +<literallayout>"/cdrom/"::Mount "foo";</literallayout> dans le bloc cdrom. +La barre oblique finale est importante. Les commandes de démontage +peuvent être spécifiées en utilisant <literal/UMount/. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Les répertoires</> + <para> +Les répertoires de la section <literal/Dir::State/ concernent le système +local. <literal/lists/ est le répertoire où placer les listes de paquets +téléchargés et <literal/status/ est le nom du fichier d'état de Dpkg. +<literal/preferences/ concerne APT : c'est le nom du fichier de préférence. +<literal/Dir::State/ contient le répertoire par défaut préfixé à tous les +sous-éléments, quand ceux-ci ne commencent pas par <filename>/</> +ou <filename>./</>. + <para> +<literal/Dir::Cache/ contient les emplacements qui renseignent sur le +cache local : par exemple, les deux caches de paquets <literal/srcpkgcache/ +et <literal/pkgcache/ et aussi l'endroit où sont placées les archives +téléchargées, <literal/Dir::Cache::archives/. On peut empêcher la création +des caches en laissant leur nom en blanc. Cela ralentit le démarrage mais +cela sauve de l'espace disque. Il vaut mieux se passer du cache +<literal/pkgcache/ plutôt que celui de <literal/srcpkgcache/. Comme pour +<literal/Dir::State/, le répertoire par défaut est contenu dans +<literal/Dir::Cache/. + <para> +<literal/Dir::Etc/ contient l'emplacement des fichiers de configuration, +<literal/sourcelist/ indique l'emplacement de la liste de sources et +<literal/main/ est le fichier de configuration par défaut (le modifier +n'a aucun effet, à moins qu'on ne le modifie avec le fichier de +configuration indiqué par la variable <envar/APT_CONFIG/). + <para> +<literal/Dir::Parts/ lit, par ordre d'entrée, tous les fragments de +configuration dans le répertoire indiqué. Ensuite, le fichier principal +de configuration est chargé. + <para> +Les programmes binaires sont pointés par <literal/Dir::Bin/. +L'emplacement des gestionnaires de méthodes est indiqué par +<literal/methods/ ; <literal/gzip/, <literal/Dpkg/, <literal/apt-get/, +<literal/dpkg-source/, <literal/dpkg-buildpackage/ et <literal/apt-cache/ +indiquent l'emplacement des programmes correspondants. + </RefSect1> + + <RefSect1><Title>APT et DSelect</> + <para> +Quand APT est utilisé comme une méthode de &dselect;, plusieurs directives +contrôlent le comportement par défaut. On les trouve dans la section +<literal/DSelect/. + + <VariableList> + <VarListEntry><Term>Clean</Term> + <ListItem><Para> +Mode de nettoyage du cache ; cette variable peut prendre l'une des valeurs +suivantes : « always », « prompt », « auto », « pre-auto » et « never ». +« always » et « prompt » suppriment tous les paquets du cache après la mise à +niveau ; « prompt » (valeur par défaut) les supprime après une demande et +« auto » ne supprime que les archives qui ne peuvent plus être téléchargées +(remplacées, par exemple, par une nouvelle version). « pre-auto » les +supprime avant de récupérer de nouveaux paquets. + </VarListEntry> + + <VarListEntry><Term>Options</Term> + <ListItem><Para> +Le contenu de cette variable est passé à &apt-get; avec les options de la ligne +de commande quand ce programme est utilisé dans la phase d'installation. + </VarListEntry> + + <VarListEntry><Term>UpdateOptions</Term> + <ListItem><Para> +Le contenu de cette variable est passé à &apt-get; avec les options de la +ligne de commande quand ce programme est utilisé dans la phase de mise à jour. + </VarListEntry> + + <VarListEntry><Term>PromptAfterUpdate</Term> + <ListItem><Para> +Si cette option est « vraie », l'opération [U]pdate de &dselect; interroge +toujours l'utilisateur avant de continuer. Par défaut, ce n'est qu'en cas +d'erreur que l'on propose à l'utilisateur d'intervenir. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Comment APT appelle Dpkg</> + <para> +Plusieurs directives de configuration contrôlent la manière dont APT +invoque &dpkg; : elles figurent dans la section <literal/DPkg/. + + <VariableList> + <VarListEntry><Term>Options</Term> + <ListItem><Para> +Il s'agit d'une liste d'options à passer à Dpkg. Les options doivent être +déclarées en utilisant la notation de liste et chaque élément de liste est +passé comme un seul argument à Dpkg. + </VarListEntry> + + <VarListEntry><Term>Pre-Invoke</Term><Term>Post-Invoke</Term> + <ListItem><Para> +Il s'agit d'une liste de commandes shell à exécuter avant ou après l'appel de +&dpkg;. Tout comme pour <literal/Options/, on doit utiliser la notation de +liste. Les commandes sont appelées dans l'ordre en utilisant /bin/sh : APT +s'arrête dès que l'une d'elles échoue. + </VarListEntry> + + <VarListEntry><Term>Pre-Install-Pkgs</Term> + <ListItem><Para> +Il s'agit d'une liste de commandes shell à exécuter avant d'appeler Dpkg. +Tout comme pour <literal/Options/, on doit utiliser la notation de liste. +Les commandes sont appelées dans l'ordre en utilisant /bin/sh : APT s'arrête +dès que l'une d'elles échoue. Sur l'entrée standard, APT transmet aux +commandes les noms de tous les fichiers .deb qu'il va installer, à raison d'un +par ligne. + <para> +La deuxième version de ce protocole donne plus de renseignements : on obtient +la version du protocole, la configuration de APT et les paquets, fichiers +ou versions qui ont changés. On autorise cette version en positionnant +<literal/DPkg::Tools::Options::cmd::Version/ à 2. <literal/cmd/ est une +commande passée à <literal/Pre-Install-Pkgs/. + </VarListEntry> + + <VarListEntry><Term>Run-Directory</Term> + <ListItem><Para> +APT se place dans ce répertoire avant d'appeler Dpkg ; par défaut c'est le +répertoire <filename>/</>. + </VarListEntry> + + <VarListEntry><Term>Build-Options</Term> + <ListItem><Para> +Ces options sont passées à &dpkg-buildpackage; lors de la compilation des +paquets ; par défaut la signature est désactivée et tous les binaires sont +créés. + </VarListEntry> + </VariableList> + </RefSect1> + + <RefSect1><Title>Les options de débogage</> + <para> +La plupart des options de la section <literal/debug/ n'ont aucun intérêt +pour le simple utilisateur ; cependant, <literal/Debug::pkgProblemResolver/ +affiche d'intéressantes informations sur les décisions que prend la +commande dist-upgrade. <literal/Debug::NoLocking/ désactive le verrouillage +de fichier de manière à ce que APT puisse effectuer quelques opérations sans +être « root » et <literal/Debug::pkgDPkgPM/ affiche la ligne de commande à +chaque appel de Dpkg. <literal/Debug::IdentCdrom/ désactive l'inclusion de +données statfs dans les IDs de CDROM. + </RefSect1> + + <RefSect1><Title>Exemples</> + <para> + &configureindex; contient un modèle de fichier montrant les valeurs par +défaut de toutes les options possibles. + </RefSect1> + + <RefSect1><Title>Fichiers</> + <para> + <filename>/etc/apt/apt.conf</> + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-cache;, &apt-config;, &apt-preferences;. + </RefSect1> + + &manbugs; + &manauthor; + &deux-traducteurs; + +</refentry> diff --git a/apt/doc/fr/apt.ent.fr b/apt/doc/fr/apt.ent.fr new file mode 100644 index 0000000..f11b975 --- /dev/null +++ b/apt/doc/fr/apt.ent.fr @@ -0,0 +1,173 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.7 --> +<!-- Some common paths.. --> +<!ENTITY docdir "/usr/share/doc/apt/"> +<!ENTITY configureindex "<filename>&docdir;examples/configure-index.gz</>"> +<!ENTITY aptconfdir "<filename>/etc/apt.conf</>"> +<!ENTITY statedir "/var/lib/apt"> +<!ENTITY cachedir "/var/cache/apt"> + +<!-- Cross references to other man pages --> +<!ENTITY apt-conf "<CiteRefEntry> + <RefEntryTitle><filename/apt.conf/</RefEntryTitle> + <ManVolNum/5/ + </CiteRefEntry> +"> + +<!ENTITY apt-get "<CiteRefEntry> + <RefEntryTitle><command/apt-get/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry> +"> + +<!ENTITY apt-config "<CiteRefEntry> + <RefEntryTitle><command/apt-config/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!ENTITY apt-cdrom "<CiteRefEntry> + <RefEntryTitle><command/apt-cdrom/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry> +"> + +<!ENTITY apt-cache "<CiteRefEntry> + <RefEntryTitle><command/apt-cache/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry> +"> + +<!ENTITY apt-preferences "<CiteRefEntry> + <RefEntryTitle><command/apt_preferences/</RefEntryTitle> + <ManVolNum/5/ + </CiteRefEntry>"> + +<!ENTITY sources-list "<CiteRefEntry> + <RefEntryTitle><filename/sources.list/</RefEntryTitle> + <ManVolNum/5/ + </CiteRefEntry> +"> + +<!ENTITY bug "<CiteRefEntry> + <RefEntryTitle><command/bug/</RefEntryTitle> + <ManVolNum/1/ + </CiteRefEntry> +"> + +<!ENTITY dpkg "<CiteRefEntry> + <RefEntryTitle><command/dpkg/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry> +"> + +<!ENTITY dpkg-buildpackage "<CiteRefEntry> + <RefEntryTitle><command/dpkg-buildpackage/</RefEntryTitle> + <ManVolNum/1/ + </CiteRefEntry> +"> + +<!ENTITY gzip "<CiteRefEntry> + <RefEntryTitle><command/gzip/</RefEntryTitle> + <ManVolNum/1/ + </CiteRefEntry> +"> + +<!ENTITY dpkg-scanpackages "<CiteRefEntry> + <RefEntryTitle><command/dpkg-scanpackages/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry> +"> + +<!ENTITY dpkg-scansources "<CiteRefEntry> + <RefEntryTitle><command/dpkg-scansources/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry> +"> + +<!ENTITY dselect "<CiteRefEntry> + <RefEntryTitle><command/dselect/</RefEntryTitle> + <ManVolNum/8/ + </CiteRefEntry>"> + +<!-- Boiler plate docinfo section --> +<!ENTITY apt-docinfo " + <docinfo> + <address><email>apt@packages.debian.org</></address> + <author><firstname>Jason</> <surname>Gunthorpe</></> + <copyright><year>1998-2001</> <holder>Jason Gunthorpe</></> + <date>12 March 2001</> + </docinfo> +"> + +<!-- Boiler plate Bug reporting section --> +<!ENTITY manbugs " + <RefSect1><Title>Bogues</> + <para> +Voyez la <ulink url='http://bugs.debian.org/apt'> page concernant les bogues de APT</>. + Si vous voulez rapporter un bogue, consultez le texte + <filename>/usr/share/doc/debian/bug-reporting.txt</> ou utilisez la +commande &bug;. + </RefSect1> +"> + +<!-- Boiler plate Author section --> +<!ENTITY manauthor " + <RefSect1><Title>Auteur</> + <para> + APT a été écrit par l'équipe APT <email>apt@packages.debian.org</>. + </RefSect1> +"> + +<!-- Section traduction --> +<!ENTITY deux-traducteurs " +<RefSect1><Title>Traduction</> +<para> +Jérôme Marant. 2000 ; mise à jour : Philippe Batailler. 2001. +</RefSect1> +"> + +<!ENTITY traducteur " +<RefSect1><Title>Traduction</> +<para> +Philippe Batailler. 2001. +</RefSect1> +"> + +<!-- Should be used within the option section of the text to + put in the blurb about -h, -v, -c and -o --> +<!ENTITY apt-commonoptions " + <VarListEntry><term><option/-h/</><term><option/--help/</> + <ListItem><Para> +Affiche un mode d'emploi succinct. + </VarListEntry> + + <VarListEntry><term><option/-v/</><term><option/--version/</> + <ListItem><Para> +Affiche la version du programme. + </VarListEntry> + + <VarListEntry><term><option/-c/</><term><option/--config-file/</> + <ListItem><Para> +Fichier de configuration ; indique quel fichier de configuration utiliser. +Le programme lit le fichier de configuration par défaut, puis celui-ci. +Voyez &apt-conf; pour la syntaxe. + </VarListEntry> + + <VarListEntry><term><option/-o/</><term><option/--option/</> + <ListItem><Para> +Donne une option de configuration ; cela fixe une option de configuration +arbitraire. La syntaxe est : <option>-o Foo::Bar=bar</>. + </VarListEntry> +"> + +<!-- Should be used within the option section of the text to + put in the blurb about -h, -v, -c and -o --> +<!ENTITY apt-cmdblurb " + <para> +Toutes les options de ligne de commande peuvent être positionnées via le +fichier de configuration ; les descriptifs indiquent l'option de +configuration à positionner. En ce qui concerne les options booléennes, +on peut annuler le fichier de configuration en utilisant quelque chose comme +<option/-f-/,<option/--no-f/, <option/-f=no/ ou d'autres variantes. + </para> +"> diff --git a/apt/doc/fr/apt_preferences.5.fr.sgml b/apt/doc/fr/apt_preferences.5.fr.sgml new file mode 100644 index 0000000..f910ef4 --- /dev/null +++ b/apt/doc/fr/apt_preferences.5.fr.sgml @@ -0,0 +1,243 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.3 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>apt_preferences</> + <manvolnum>5</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>apt_preferences</> + <refpurpose>Un fichier de contrôle, utilisé par APT, indiquant des préférences</> + </refnamediv> + + <RefSect1><Title>Description</> + <para> +Le fichier des préférences contrôle différents aspects du système APT. Il est +conçu pour être modifiable par l'utilisateur et manipulable de façon +logicielle. Il comprend des enregistrements formés sur le modèle du fichier +<filename/status/ de Dpkg : des sections séparées par des espaces et des lignes +commençant par une étiquette suivie d'un « : ». Il se trouve dans +<filename>/etc/apt/preferences</>. + </RefSect1> + + <RefSect1><Title>Questions de version</> + <para> +L'un des buts de ce fichier est de permettre à l'utilisateur de choisir +quelle version d'un paquet il veut installer. On peut faire ce choix de +plusieurs façons mais il est basé sur trois critères : la version, +l'édition et l'origine. + <para> +Choisir la version peut se faire avec une recherche de correspondance sur une +chaîne exacte ou bien sur une chaîne préfixée. Le format est : <literal/2.1.2/ +pour la première et <literal/2.2*/ pour la seconde. L'utilisation d'un préfixe +permet d'ignorer le <literal/r/ du système d'ordonnancement des éditions +(<literal/2.1r*/), ou bien d'ignorer les révisions propres à Debian +(<literal/1.1-*/). Quand on compare des versions en se servant d'un préfixe, +la version possédant le numéro le plus élevé est toujours choisie. + <para> +Choisir une édition de la distribution est plus compliqué et possède trois +formes. Le but principal du choix d'une édition est d'identifier un ensemble de +paquets qui corresponde à un vendeur particulier ou à une édition de la +distribution (p.ex. Debian 2.1). Les deux premières formes sont des raccourcis +pour une utilisation rapide en ligne de commande. Si le premier caractère de +la chaîne est un chiffre, c'est une recherche fondée sur la version d'une +édition ; sinon, c'est une recherche sur le nom d'une édition. Quand la +chaîne comporte des signes égal, c'est une recherche fondée sur une +description complète de l'édition ; cette chaîne est une liste de clés +(une seule lettre) suivies d'un mot et séparées par une virgule. Exemples : +<informalexample><programlisting> +v=2.1*,o=Debian,c=main +l=Debian +a=stable +</programlisting></informalexample> + <para> +Ces recherches utilisent des données prises dans les fichiers +<filename/Release/ récupérés par APT pendant une mise à jour. Voici les +clés disponibles : + <VariableList> + <VarListEntry><term>a= Archive</term> + <ListItem><Para> +C'est le nom habituel donné à nos archives, comme <literal/stable/ ou +<literal/unstable/. Le nom spécial <literal/now/ désigne l'ensemble des +paquets installés. + </VarListEntry> + + <VarListEntry><term>c= Composant</term> + <ListItem><Para> +Indique un sous-composant de l'archive, tel que <literal/main/, +<literal/contrib/, etc. Quand il n'y a pas de composant dans telle archive, +on peut l'omettre. + </VarListEntry> + + <VarListEntry><term>v= Version</term> + <ListItem><Para> +C'est la chaîne représentant la version ; elle possède les mêmes +caractéristiques que celle du fichier <filename/Packages/. C'est le niveau +édition de l'archive. Les numéros d'une édition classique de la distribution +Debian ressemblent à <literal/2.1r2/ où le r désigne une édition (release) de +la distribution 2.1. Les nouvelles éditions sont limitées à des mises à +jour concernant la sécurité. + </VarListEntry> + + <VarListEntry><term>o= Origine</term> + <ListItem><Para> +Ce terme indique qui a fourni l'archive. Pour Debian, c'est <literal/Debian/. +Les autres fournisseurs peuvent utiliser leur propre nom. + </VarListEntry> + + <VarListEntry><term><term>l= Label</term> + <ListItem><Para> +Cela donne le nom général de la distribution. Pour Debian, c'est +<literal/Debian/. Pour des distributions dérivées, ce terme doit être leur +propre nom. + </VarListEntry> + </VariableList> + <para> +La dernière méthode est le choix de l'origine. C'est simplement le nom du site +d'où proviennent les paquets. Une chaîne vide indique un URI de fichier. + <para> +Le choix d'une version, et en particulier les deux dernières méthodes, +concerne plusieurs parties d'APT, pas seulement le fichier préférences. + </RefSect1> + +<RefSect1><Title>Règles pour le choix d'une version</> + <para> +APT conserve une liste de toutes les versions disponibles de tous les +paquets. Quand on indique plusieurs éditions ou vendeurs dans le fichier +&sources-list;, tous ces éléments sont disponibles. APT choisit par défaut +la version la plus récente parmi toutes ces sources automatiques. Quelques +sources sont étiquetées Non Automatique, p.ex. +<filename>project/experimental</> -- elles sont mises en bas de la pile de +sélection. + <para> +Pour décider quelle version utiliser, APT affecte une priorité à toutes les +versions disponibles d'un paquet. Puis il fait deux choses. Premièrement : +il choisit, parmi les versions plus récentes que la version installée, la +version qui possède la plus haute priorité ; ensuite il choisit, parmi +les versions plus anciennes que la version installée, celle qui possède la +plus haute priorité. Deuxièmement : si les versions plus anciennes ont +une priorité supérieure à 1000, il les compare avec la priorité que possède +l'ensemble de mise à niveau : la plus grande est choisie. Autrement, les +versions provoquant une régression sont ignorées et il choisit la plus grande +priorité de l'ensemble de mise à niveau. + <para> +On peut penser le système de priorité en termes de strates : + <VariableList> + <VarListEntry><term>1000 et au-dessus</term> + <ListItem><Para> +Priorités permettant la régression + </VarListEntry> + + <VarListEntry><term>1000</term> + <ListItem><Para> +La barrière pour empêcher la régression. + </VarListEntry> + + <VarListEntry><term>de 100 à 1000</term> + <ListItem><Para> +Priorités standards. 990 est la priorité définie par l'option +<option/--target-release / du programme &apt-get;. 989 est le début des +priorités automatiques et 500 la priorité par défaut des fichiers d'un paquet. + </VarListEntry> + + <VarListEntry><term>100</term> + <ListItem><Para> +Priorité de la version actuellement installée. + </VarListEntry> + + <VarListEntry><term>de 0 à 100</term> + <ListItem><Para> +Priorités non automatiques. On s'en sert uniquement si le paquet n'est pas +installé et s'il n'y a pas d'autre version disponible. + </VarListEntry> + + <VarListEntry><term>inférieur à 0</term> + <ListItem><Para> +Priorité pour une version qui ne sera jamais sélectionnée. + </VarListEntry> + </VariableList> + <para> +Une priorité supérieure à 1000 donnée à une étiquette (pin) autorise une +régression vers cette version. + <para> +On peut accrocher une étiquette à chaque paquet et chaque fichier +<filename/Packages/ possède une priorité pour tous les paquets. La plus +haute priorité affectée à un paquet est celle qui est utilisée. + <para> +Une étiquette de paquet est de cette forme : +<informalexample><programlisting> +Package: apt +Pin: version 0.4.0 +Pin-Priority: 1001 +</programlisting></informalexample> +La première ligne indique le paquet, la seconde donne le nom de l'étiquette +et la dernière la priorité pour cette étiquette. Le premier mot du nom de +l'étiquette peut être : version, release ou origin ; le reste du +champ est décrit plus haut dans la section « Règles pour le choix d'une +version ». + <para> +Une étiquette par défaut représente comment sont définies les priorités des +fichiers d'un paquet. On peut spécifier autant d'étiquette par défaut qu'on +veut ; la première correspondant au défaut sélectionne la priorité pour +les fichiers d'un paquet. Seuls « release » et « origin » +peuvent être utilisés dans le nom de l'étiquette puisqu'ils correspondent aux +fichiers <filename/Packages/. +<informalexample><programlisting> +Package: * +Pin: release v=2.1* +Pin-Priority: 998 +</programlisting></informalexample> + <para> +Quand le champ Pin-Priority manque, la priorité est par défaut de 989 +dans les deux cas. + + <RefSect2><title>Effets notables</> + <para> +À cause de la barrière empêchant les régressions (priorité 1000), il est +possible qu'une version possédant une priorité inférieure soit choisie si +une version possédant une priorité supérieure provoque une régression. Par +exemple, le paquet foo possède les versions <literal/1.2/, <literal/1.1/ +et <literal/1.0/ ; <literal/1.1/ est la version installée ; les +priorités de chaque version sont : 900, 100 et 950 respectivement : +la version <literal/1.2/ sera installée. + <para> +Dans la pratique, c'est ce qu'on veut ! Un utilisateur utilisera une +étiquette par défaut pour rendre la distribution « stable » la +distribution par défaut ; il utilisera ensuite l'option +<option/--target-dist/ avec &apt-get; pour choisir de nouvelles versions dans +« unstable ». Les paquets mis à niveau avec « unstable » +suivront les versions disponibles dans « unstable » puisque les +versions de « stable » sont maintenant passées +sous la barrière empêchant la régression. + <para> +Si on ne le veut pas, on doit utiliser une étiquette par défaut qui donne +à « unstable » une priorité inférieure à 100. + <para> +Ceux qui utilisent des suppléments venant de tiers comme Helix GNOME peuvent +se servir de ce procédé pour obtenir des paquets Helix ; ils peuvent +forcer l'utilisation des paquets Debian en définissant la priorité de cette +source suffisamment haut. On peut même réaliser une régression massive d'un +ensemble de paquets à un autre en utilisant une priorité supérieure à 1000. + </RefSect2> + </RefSect1> + + <RefSect1><Title>Voir aussi</> + <para> + &apt-cache; &apt-conf; + </RefSect1> + + &manbugs; + &manauthor; +&traducteur; +</refentry> diff --git a/apt/doc/fr/sources.list.5.fr.sgml b/apt/doc/fr/sources.list.5.fr.sgml new file mode 100644 index 0000000..791beee --- /dev/null +++ b/apt/doc/fr/sources.list.5.fr.sgml @@ -0,0 +1,207 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!-- translation of version 1.2 --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent.fr"> +%aptent; + +]> + +<refentry lang=fr> + &apt-docinfo; + + <refmeta> + <refentrytitle>sources.list</> + <manvolnum>5</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>sources.list</> + <refpurpose>Une liste, utilisée par APT, indiquant les ressources de paquets</> + </refnamediv> + + <RefSect1><Title>Description</> + <para> +La liste des ressources de paquets indique où trouver les archives +du système de distribution de paquets utilisé. Pour l'instant, cette page +de manuel ne documente que le système d'empaquetage utilisé par le système +Debian GNU-Linux. Ce fichier de contrôle est situé dans +<filename>/etc/apt/sources.list</>. + <para> +La liste des sources est conçue pour prendre en compte un nombre quelconque +de sources actives et différents média source. Le fichier présente +une source par ligne et la source préférée apparaît en premier. Le format de +chaque ligne est : <literal/type uri args/. Le premier élément, +<literal/type/, détermine le format des <literal/args/. <literal/uri/ est un +identificateur universel de ressources (URI), qui est un surensemble du plus +spécifique et bien connu repère universel de ressources, ou URL. La fin de la +ligne peut être un commentaire commençant par un caractère #. + </RefSect1> + + <RefSect1><Title>Les types deb et deb-src.</> + <para> +Le type <literal/deb/ décrit une archive Debian classique à deux niveaux, +<filename>distribution/composant</>. <literal/distribution/ peut prendre +l'une des valeurs suivantes : <literal/stable/, <literal/unstable/, ou +<literal/frozen/, et composant : <literal/main/, <literal/contrib/, +<literal/non-free/, ou <literal/non-us/. Le type <literal/deb-src/ décrit le +code source pour une distribution Debian dans le même format que le type +<literal/deb/. Une ligne <literal/deb-src/ est nécessaire pour récupérer les +index de sources. +<para> +Le format d'une entrée dans <filename/sources.list/ utilisant les types +<literal/deb/ et <literal/deb-src/ est de la forme : + <literallayout>deb uri distribution [composant1] [composant2] [...]</literallayout> + <para> +L'URI de type <literal/deb/ doit indiquer la base de la distribution Debian +dans laquelle APT trouvera les informations dont il a besoin. +<literal/distribution/ peut spécifier le chemin exact : dans ce cas, on +doit omettre les composants et <literal/distribution/ doit se terminer par une +barre oblique (/). C'est utile quand seule une sous-section particulière de +l'archive décrite par cet URI est intéressante. Quand <literal/distribution/ +n'indique pas un chemin exact, un <literal/component/ au moins doit être +présent. + <para> +<literal/distribution/ peut aussi contenir une variable <literal/$(ARCH)/, +qui sera remplacée par l'architecture Debian (i386, m68k, powerpc, ...) +sur laquelle s'exécute le système. On peut ainsi utiliser un fichier +<filename/sources.list/ qui ne dépend pas d'une architecture. En général, +ce n'est intéressant que si l'on indique un chemin exact ; sinon +<literal/APT/ crée automatiquement un URI en fonction de l'architecture +effective. + <para> +Puisqu'on ne peut indiquer qu'une seule distribution par ligne, il peut être +nécessaire de disposer le même URI sur plusieurs lignes quand on veut +accéder à un sous-ensemble des distributions ou composants disponibles à cette +adresse. APT trie les URIs après avoir crée pour lui-même la liste +complète ; il regroupe les références multiples au même hôte Internet +en vue d'une connexion unique et il évite ainsi, par exemple, d'établir une +connexion FTP, de la fermer, faire autre chose, puis d'établir encore cette +connexion. Cette fonctionnalité permet l'accès à des sites FTP surchargés qui +limitent le nombre de connexions simultanées pour les utilisateurs anonymes. +APT parallélise aussi les connexions à différents hôtes pour tirer plus +efficacement parti des sites à faible bande passante. + <para> +Il est important d'indiquer les sources par ordre de préférence, +la source principale apparaissant en premier. Un tri est fait, de la plus +rapide à la plus lente ; par exemple, CD-ROM suivi par les hôtes d'un +réseau local, puis les hôtes Internet distants. + <para> +Quelques exemples : + <literallayout> +deb http://http.us.debian.org/debian stable main contrib non-free +deb http://http.us.debian.org/debian dists/stable-updates/ + </literallayout> + </RefSect1> + + <RefSect1><title>La spécification des URIs + +Les URIs actuellement reconnus sont : cdrom, file, http et ftp. + + file + +Le procédé + + cdrom + +Le procédé + + http + +Le procédé + + ftp + +Le procédé + + copy + +Le procédé + + rshssh + +Le procédé + + + + Exemples + +Utiliser l'archive stockée localement (ou montée via NFS) dans +/home/jason/debian pour stable/main, stable/contrib et stable/non-free. + deb file:/home/jason/debian stable main contrib non-free + +Comme ci-dessus, excepté que cette ligne utilise la distribution +« unstable » (développement). + deb file:/home/jason/debian unstable main contrib non-free + +La précédente ligne, mais pour les sources. + deb-src file:/home/jason/debian unstable main contrib non-free + +Utiliser HTTP pour accéder à l'archive située à archive.debian.org, et +n'utiliser que la section hamm/main. + deb http://archive.debian.org/debian-archive hamm main + +Utiliser FTP pour accéder à l'archive située à ftp.debian.org, dans le +répertoire debian, et n'utiliser que la section stable/contrib. + deb ftp://ftp.debian.org/debian stable contrib + +Utiliser FTP pour accéder à l'archive située à ftp.debian.org, dans le +répertoire debian, et n'utiliser que la section unstable/contrib. Si cette +ligne et celle de l'exemple précédent dans deb ftp://ftp.debian.org/debian unstable contrib + +Utiliser HTTP pour accéder à l'archive située à nonus.debian.org, dans le +répertoire debian-non-US. + deb http://nonus.debian.org/debian-non-US stable/non-US main contrib non-free + +Utiliser HTTP pour accéder à l'archive située à nonus.debian.org, dans le +répertoire debian-non-US, et n'utiliser que les fichiers trouvés dans +unstable/binary-i386 pour les machines i386, dans +unstable/binary-m68k pour les machines m68k et ainsi de suite +pour les autres architectures supportées. [Notez que cet exemple montre +seulement la manière d'utiliser la variable à substituer, non-us n'étant plus +structuré comme suit.] + deb http://ftp.de.debian.org/debian-non-US unstable/binary-$(ARCH)/ + + + Voir aussi</> + <para> + &apt-cache; &apt-conf; + </RefSect1> + + &manbugs; + &manauthor; + &deux-traducteurs; +</refentry> diff --git a/apt/doc/guide.it.sgml b/apt/doc/guide.it.sgml new file mode 100644 index 0000000..8edcb9c --- /dev/null +++ b/apt/doc/guide.it.sgml @@ -0,0 +1,585 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN"> +<book> +<title>Guida dell'utente di APT + +Jason Gunthorpe jgg@debian.org +Traduzione di Eugenia Franzoni eugenia@linuxcare.com + +$Id: guide.it.sgml,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ + + +Guida per l'uso del gestore di pacchetti APT. + + + +Copyright © Jason Gunthorpe, 1998. + +

Ed. italiana Copyright © Eugenia Franzoni, 2000. + +

+"APT" e questo documento sono software libero, e li si può ridistribuire +e/o modificare secondo i termini della Licenza Pubblica Generica GNU +(GPL), pubblicata dalla Free Software Foundation, nella versione 2 o +(se preferite) qualsiasi versione successiva. + +

"APT" and this document are free software; you can redistribute them and/or +modify them under the terms of the GNU General Public License as published +by the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +

+Per ulteriori dettagli sui sistemi GNU/Linux si veda il testo +completo della licenza nel file +/usr/doc/copyright/GPL. + + + + + + +Descrizione generale + +

+Il pacchetto APT al momento contiene due sezioni, il metodo APT +dselect e l'interfaccia utente a linea di comando apt-get; +entrambi danno modo di installare e rimuovere pacchetti, e di scaricarne +altri da Internet. + +Anatomia del sistema di pacchettizzazione +

+Il sistema di pacchettizzazione di Debian contiene un gran numero di +informazioni associate a ciascun pacchetto, per assicurarsi che si +integri facilmente ed in maniera pulita nel sistema; la più +importante di esse è il sistema di dipendenze. + +

+Il sistema di dipendenze permette ai singoli programmi di fare uso +degli elementi condivisi del sistema, quali le librerie; per +ridurre il numero di elementi che l'utente medio debba installare, +le porzioni di programmi che non vengono usate spesso vengono poste +in pacchetti separati. Inoltre, è possibile avere più di una scelta per +cose quali i programmi di posta elettronica, i server X e così via. + +

+Il primo passo per capire il sistema di dipendenze è la +comprensione del concetto di dipendenza semplice: un pacchetto richiede +che un altro sia installato insieme ad esso per poter +funzionare. + + +

+Ad esempio, mail-crypt è un'estensione di emacs che aiuta a criptare le +mail con PGP. Se PGP non è installato, mail-crypt è inutile, quindi +mail-crypt ha una dipendenza semplice da PGP. Inoltre, dato che si tratta +di un'estensione di emacs, mail-crypt dipende anche da emacs, senza il +quale è totalmente inutile. + +

+L'altro tipo di dipendenza importante da capire è la dipendenza di +conflitto; con questa, un pacchetto che venga installato insieme ad un +altro pacchetto non funziona, e si hanno seri problemi al sistema. +Come esempio, si consideri un programma di trasporto della posta, +quale sendmail, exim o qmail: non è possibile averne due contemporaneamente, +perché entrambi hanno bisogno di restare in ascolto sulla stessa porta di rete +per ricevere la posta. Tentare di installarne due danneggerebbe seriamente il +sistema, quindi ciascun programma di trasporto della posta ha una +dipendenza di conflitto con tutti gli altri. + +

+Come ulteriore complicazione, c'è la possibilità che un pacchetto +voglia prendere il posto di un altro; ad esempio, exim e sendmail per molte +cose sono identici, dato che entrambi gestiscono la posta e comprendono +un'interfaccia comune, quindi il sistema di pacchettizzazione deve dichiarare +che sono entrambi agenti di trasporto della posta, e che gli altri +pacchetti a cui serve uno dei due devono dipendere da un pacchetto +fittizio agente-di-trasporto-della-posta. Quando si modificano +a mano i pacchetti, questo può portare a moltissima confusione. + +

+In ciascun momento una singola dipendenza può essere soddisfatta o meno +dai pacchetti già installati; APT cerca di risolvere i problemi +di dipendenze con un buon numero di algoritmi automatici, che aiutano +a selezionare i pacchetti da installare. + + + + + + +apt-get + +

+apt-get fornisce un modo semplice di installare i pacchetti dalla +linea di comando. Diversamente da dpkg, apt-get non +capisce i nomi dei file .deb, ma utilizza il vero nome dei pacchetti, +e può installare archivi .deb solo da una fonte. + +

+La prima Se state usando un proxy server http, dovete prima ancora +impostare la variabile d'ambiente http_proxy; vedere +sources.list(5). +cosa da fare prima di usare apt-get è impostare l'elenco dei +pacchetti dalle fonti in modo che il programma sappia quali pacchetti +sono disponibili. Lo si fa con apt-get update. Ad esempio, + +

+ +# apt-get update +Get http://ftp.de.debian.org/debian-non-US/ stable/binary-i386/ Packages +Get http://llug.sep.bnl.gov/debian/ frozen/contrib Packages +Reading Package Lists... Done +Building Dependency Tree... Done + + +

+Dopo aver aggiornato l'elenco si possono usare molti comandi: + +upgrade +Upgrade tenterà di fare un aggiornamento indolore del sistema completo, +senza installare nuovi pacchetti o rimuoverne di esistenti, e senza +aggiornare un pacchetto che possa rovinarne altri. Upgrade farà un elenco +di tutti i pacchetti che non avrà potuto aggiornare, cosa che in genere +significa che questi dipendono da nuovi pacchetti o vanno in conflitto +con altri. Per forzare la loro installazione si può usare +dselect o apt-get install. + +install +Install viene usato per installare i singoli pacchetti dando il loro nome. +Il pacchetto viene automaticamente scaricato ed installato, cosa molto utile +se già se ne conosce il nome e non si vuole entrare in grafica per +selezionarlo. Al comando si possono passare anche più pacchetti, che saranno +tutti scaricati. L'installazione automatica cerca di risolvere i problemi +di dipendenze con gli altri pacchetti elencati, stampa un riassunto e +chiede conferma se si devono modificare altri pacchetti che non siano quelli +sulla linea di comando. + +dist-upgrade +Dist-upgrade fa un aggiornamento completo, progettato in modo da rendere +semplici gli aggiornamenti tra versioni di Debian. Usa un algoritmo +sofisticato per determinare il miglior insieme di pacchetti da installare, +aggiornare e rimuovere per arrivare alla versione più aggiornata +del sistema possibile. In alcune situazioni può essere vantaggioso usare +dist-upgrade invece che sprecare tempo a risolvere manualmente le +dipendenze con dselect. Una volta completato dist-upgrade, si può +usare dselect per installare eventuali pacchetti che sono stati +tralasciati. + +

+È importante controllare attentamente cosa intende fare dist-upgrade, +dato che le sue decisioni a volte possono essere abbastanza sorprendenti. + + +

+apt-get ha diverse opzioni a linea di comando, che vengono +documentate dettagliatamente nella sua pagina man, +. L'opzione più utile è +-d, che non installa i file scaricati: se il sistema deve +scaricare un gran numero di pacchetti, non è bene farglieli installare +subito, in caso dovesse andare male qualcosa. Dopo aver usato -d, +gli archivi scaricati possono essere installati semplicemente dando di +nuovo lo stesso comando senza l'opzione -d. + + + + + +DSelect +

+Il metodo APT di dselect fornisce tutte le funzionalità di APT +all'interno dell'interfaccia grafica di selezione dei pacchetti +dselect. dselect viene usato per selezionare i pacchetti +da installare o rimuovere, ed APT li installa. + +

+Per abilitare il metodo APT dovete selezionare [A]ccess in dselect +e scegliere il metodo APT; vi verrà chiesto un insieme di fonti +(Sources), cioè di posti da cui scaricare gli archivi. +Tali fonti possono essere siti Internet remoti, mirror locali di Debian +o CDROM; ciascuna di esse può fornire una parte dell'archivio Debian, +ed APT le combinerà insieme in un set completo di pacchetti. Se avete un +CDROM è una buona idea indicare quello per primo, e poi i mirror, in modo +da avere accesso alle ultime versioni; APT userà in questo modo automaticamente +i pacchetti sul CDROM prima di scaricarli da Internet. + +

+ + Set up a list of distribution source locations + + Please give the base URL of the debian distribution. + The access schemes I know about are: http file + + For example: + file:/mnt/debian, + ftp://ftp.debian.org/debian, + http://ftp.de.debian.org/debian, + + + URL [http://llug.sep.bnl.gov/debian]: + + +

+La configurazione delle fonti inizia chiedendo la base dell'archivio Debian, +propone come default un mirror HTTP, e poi chiede la distribuzione +da scaricare. + +

+ + Please give the distribution tag to get or a path to the + package file ending in a /. The distribution + tags are typically something like: stable unstable frozen non-US + + Distribution [stable]: + + +

+La distribuzione (``distribution'') fa riferimento alla versione Debian +dell'archivio: stable è l'ultima rilasciata, ed unstable +è quella di sviluppo. non-US è disponibile solo su alcuni mirror, +e contiene dei pacchetti in cui viene usata della tecnologia di criptazione +o altre cose che non possano essere esportate dagli Stati Uniti; importare +questi pacchetti negli US è però legale. + +

+ + Please give the components to get + The components are typically something like: main contrib non-free + + Components [main contrib non-free]: + + +

+L'elenco dei componenti (``components'') si riferisce alla lista di +sotto-distribuzioni da scaricare. Ciascuna distribuzione viene divisa in +base al copyright del software: la main contiene pacchetti la cui licenza +soddisfa le DFSG, mentre contrib e non-free contengono software che ha +diverse restrizioni sull'uso e sulla distribuzione. + +

+Si possono inserire un qualsiasi numero di fonti, e lo script di +configurazione continuerà a chiedere fino a che abbiate specificato tutti gli +elementi che volete. + +

+Prima di cominciare ad usare dselect è necessario aggiornare +l'elenco dei pacchetti disponibili selezionando [U]pdate dal menù: +si tratta di un sovrainsieme di ciò che fa apt-get update, +che rende l'informazione scaricata disponibile a +dselect. [U]pdate deve essere fatto anche se prima è stato dato +apt-get update. + +

+Si può a questo punto continuare selezionando i pacchetti desiderati +usando [S]elect e poi installando con [I]nstall. Se si usa il metodo APT, +i comandi [C]onfig e [R]emove non hanno significato, dato che entrambe le +fasi sono contenute in [I]nstall. + +

+Per default APT rimuoverà automaticamente i pacchetti che sono stati installati +con successo. Per modificare questo comportamento, si inserisca +Dselect::clean "prompt"; in /etc/apt/apt.conf. + + + + + +L'interfaccia + +

+Entrambi i metodi, dselect APT ed apt-get, condividono la +stessa interfaccia; si tratta di un sistema semplice che indica in genere +cosa sta per fare, e poi lo fa. + +Il metodo dselect è in realtà un insieme di script di wrapper ad +apt-get. Il metodo fornisce delle funzionalità maggiori del +solo apt-get. + +Dopo la stampa di un riassunto delle operazioni che saranno fatte, +APT stampa dei messaggi informativi sullo stato del sistema, in modo che +possiate avere davanti agli occhi a quale punto dell'operazione si trova, +e quanto ancora si deve aspettare. + + +Avvio + +

+Prima di ciascuna operazione, eccetto l'aggiornamento della lista, APT +compie alcune operazioni per prepararsi, oltre a dei controlli dello +stato del sistema. In qualsiasi momento le stesse operazioni possono essere +fatte con apt-get check +

+ +# apt-get check +Reading Package Lists... Done +Building Dependancy Tree... Done + + +

+La prima cosa che fa è leggere tutti i file dei pacchetti in memoria, +usando uno schema di caching in modo da rendere la stessa operazione più +veloce la seconda volta che la si fa. Se alcuni dei file dei pacchetti +non vengono trovati, sono ignorati e viene stampato un avvertimento +all'uscita di apt-get. + +

+L'operazione finale consiste in un'analisi dettagliata delle +dipendenze del sistema: viene controllato che tutte le dipendenze dei +singoli pacchetti installati o non scompattati siano soddisfatte. +Se vengono individuati dei problemi, viene stampato un resoconto, +ed apt-get esce senza eseguire alcuna operazione. + +

+ +# apt-get check +Reading Package Lists... Done +Building Dependancy Tree... Done +You might want to run apt-get -f install' to correct these. +Sorry, but the following packages have unmet dependencies: + 9fonts: Depends: xlib6g but it is not installed + uucp: Depends: mailx but it is not installed + blast: Depends: xlib6g (>= 3.3-5) but it is not installed + adduser: Depends: perl-base but it is not installed + aumix: Depends: libgpmg1 but it is not installed + debiandoc-sgml: Depends: sgml-base but it is not installed + bash-builtins: Depends: bash (>= 2.01) but 2.0-3 is installed + cthugha: Depends: svgalibg1 but it is not installed + Depends: xlib6g (>= 3.3-5) but it is not installed + libreadlineg2: Conflicts:libreadline2 (<< 2.1-2.1) + + +

+In questo esempio il sistema ha molti problemi, tra cui uno piuttosto serio +con la libreadlineg2. Per ciascun pacchetto che ha dipendenze non soddisfatte, +viene stampata una linea che indica il pacchetto che crea il problema e +quali problemi ci sono. Viene inclusa inoltre una breve spiegazione +del perché il pacchetto ha un problema di dipendenze. + +

+Ci sono due modi in cui un sistema possa arrivare in uno stato problematico +di questo genere: il primo è causato dal fatto che dpkg possa +mancare alcune relazioni sottili tra pacchetti durante un aggiornamento +del sistemaAPT considera comunque tutte le dipendenze note, +e cerca di prevenire problemi ai pacchetti; il secondo è possibile +se l'installazione di un pacchetto fallisce, ed in questo caso è possibile +che un pacchetto venga scompattato senza che tutti quelli da cui dipende +siano stati installati. + +

+La seconda possibilità è meno seria della prima, dato che APT gestisce +l'ordine di installazione dei pacchetti; in entrambi i casi l'opzione +-f di apt-get gli farà trovare una soluzione e lo farà +continuare. Il metodo APT di dselect comprende sempre l'opzione +-f per permettere di configurare facilmente anche i pacchetti con +script errati. + +

+Se viene usata però l'opzione -f per correggere un sistema in uno +stato molto problematico, è possibile che anche con l'opzione il programma +fallisca, subito o durante la sequenza di installazione. In entrambi i casi +è necessario usare dpkg a mano (probabilmente usando delle opzioni +di forzatura) per correggere quanto basta per poter fare continuare APT. + + + +Il resoconto sullo stato + +

+Prima di procedere, apt-get presenterà un resoconto delle operazioni +che sta per fare. In genere tale resoconto varierà con il tipo di operazioni +da fare, ma ci sono alcuni elementi comuni: in tutti i casi gli elenchi +dipendono dallo stato finale delle cose, e tengono conto dell'opzione +-f e di altre attività rilevanti per il comando da eseguire. + +L'elenco dei pacchetti Extra +

+ +The following extra packages will be installed: + libdbd-mysql-perl xlib6 zlib1 xzx libreadline2 libdbd-msql-perl + mailpgp xdpkg fileutils pinepgp zlib1g xlib6g perl-base + bin86 libgdbm1 libgdbmg1 quake-lib gmp2 bcc xbuffy + squake pgp-i python-base debmake ldso perl libreadlineg2 + ssh + + +

+L'elenco dei pacchetti Extra mostra tutti i pacchetti che verranno installati +o aggiornati oltre a quelli indicati sulla linea di comando. Viene generato +solo per il comando install. I pacchetti elencati sono spesso il +risultato di un'operazione di auto installazione (Auto Install). + + +I pacchetti da rimuovere +

+ +The following packages will be REMOVED: + xlib6-dev xpat2 tk40-dev xkeycaps xbattle xonix + xdaliclock tk40 tk41 xforms0.86 ghostview xloadimage xcolorsel + xadmin xboard perl-debug tkined xtetris libreadline2-dev perl-suid + nas xpilot xfig + + +

+L'elenco dei pacchetti da rimuovere (Remove) indica tutti i pacchetti che +verranno rimossi dal sistema. Può essere mostrato per una qualsiasi delle +operazioni, e deve sempre essere esaminato attentamente per assicurarsi +che non venga eliminato qualcosa di importante. Con l'opzione -f +è particolarmente probabile che vengano eliminati dei pacchetti, ed in questo +caso va fatta estrema attenzione. La lista può contenere dei pacchetti +che verranno rimossi perché sono già rimossi parzialmente, forse a causa +di un'installazione non terminata correttamente. + + +L'elenco dei nuovi pacchetti installati +

+ +The following NEW packages will installed: + zlib1g xlib6g perl-base libgdbmg1 quake-lib gmp2 pgp-i python-base + + +

+L'elenco dei nuovi pacchetti installati (New) è semplicemente un appunto +su quello che accadrà. I pacchetti nell'elenco non sono al momento installati +nel sistema, ma lo saranno alla fine delle operazioni di APT. + + +L'elenco dei pacchetti trattenuti +

+ +The following packages have been kept back + compface man-db tetex-base msql libpaper svgalib1 + gs snmp arena lynx xpat2 groff xscreensaver + + +

+In ogni caso in cui il sistema viene aggiornato nel suo insieme, c'è la +possibilità che non possano venire installate nuove versioni di alcuni +pacchetti, dato che potrebbero richiedere l'installazione di pacchetti non +presenti nel sistema, o entrare in conflitto con altri già presenti. +In questo caso, il pacchetto viene elencato nella lista di quelli +trattenuti (Kept Back). Il miglior modo per convincere i pacchetti +elencati in questa lista è di installarli con apt-get install o +usare dselect per risolvere i problemi. + + +Messaggi di attenzione sui pacchetti trattenuti +

+ +The following held packages will be changed: + cvs + + +

+A volte si può richiedere ad APT di installare un pacchetto +che è stato trattenuto; in questi casi viene stampato un messaggio di +attenzione, che avverte che il pacchetto verrà modificato. Questo +dovrebbe accadere solo durante operazioni di dist-upgrade o di install. + + +Resoconto finale +

+Infine, APT stamperà un riassunto di tutte le modifiche che accadranno. + +

+ +206 packages upgraded, 8 newly installed, 23 to remove and 51 not upgraded. +12 packages not fully installed or removed. +Need to get 65.7M/66.7M of archives. After unpacking 26.5M will be used. + + +

+La prima linea del riassunto è semplicemente una versione ridotta di tutte +le liste, ed include il numero di aggiornamenti -- cioè dei pacchetti +già installati per cui sono disponibili nuove versioni. La seconda +linea indica il numero di pacchetti con problemi di configurazione, +probabilmente in conseguenza di un'installazione non andata a buon fine. +La linea finale indica i requisiti di spazio dell'installazione: i primi +due numeri indicano rispettivamente il numero di byte che devono +essere trasferiti da posizioni remote, ed il secondo la dimensione totale +di tutti gli archivi necessari per l'installazione. Il numero successivo +indica la differenza in dimensione tra i pacchetti già installati +e quelli che lo saranno, ed è approssimativamente equivalente allo spazio +richiesto in /usr dopo l'installazione. Se si stanno rimuovendo dei +pacchetti, il valore può indicare lo spazio che verrà liberato. + +

+Si possono generare altri resoconti usando l'opzione -u per mostrare +i pacchetti da aggiornare, ma sono simili all'esempio precedente. + + + +La visualizzazione dello stato +

+Durante il download degli archivi e dei file dei pacchetti, APT +stampa una serie di messaggi di stato. + +

+ +# apt-get update +Get:1 http://ftp.de.debian.org/debian-non-US/ stable/non-US/ Packages +Get:2 http://llug.sep.bnl.gov/debian/ frozen/contrib Packages +Hit http://llug.sep.bnl.gov/debian/ frozen/main Packages +Get:4 http://ftp.de.debian.org/debian-non-US/ unstable/binary-i386/ Packages +Get:5 http://llug.sep.bnl.gov/debian/ frozen/non-free Packages +11% [5 frozen/non-free `Waiting for file' 0/32.1k 0%] 2203b/s 1m52s + + +

+Le linee che cominciano con Get vengono stampate quando APT inizia +a scaricare un file, e l'ultima linea indica il progresso dell'operazione. +Il primo valore in percentuale indica la percentuale totale di tutti i file; +dato che la dimensione dei file Package non è nota, purtroppo a volte +apt-get update fa una stima poco accurata. + +

+La sezione successiva della linea di stato viene ripetuta una volta per +ciascuna fase del download, ed indica l'operazione in corso, insieme +ad alcune informazioni utili su cosa stia accadendo. A volte questa +sezione contiene solamente Forking, che significa che il sistema +operativo sta caricando il modulo. La prima parola dopo la parentesi quadra +aperta è il nome breve dell'oggetto che si sta scaricando, che per gli archivi +è il nome del pacchetto. + +

+All'interno delle virgolette c'è una stringa informativa, che indica il +progresso della fase di negoziazione del download. Tipicamente comincia con +Connecting, procede con Waiting for file e poi con +Downloading o Resuming. Il valore finale è il numero di byte +che sono stati scaricati dal sito remoto: una volta cominciato il +download viene rappresentato come 102/10.2k, che indica che +sono stati scaricati 102 byte di 10.2 kilobyte. La dimensione totale +viene sempre espressa in notazione a quattro cifre, per risparmiare +spazio. Dopo la dimensione viene indicato un indicatore +progressivo della percentuale del file. Il penultimo elemento è la velocità +istantanea media, che viene aggiornata ogni 5 secondi, e riflette la +velocità di trasferimento dei dati in quel periodo. Infine, viene +visualizzato il tempo stimato per il trasferimento, che viene aggiornato +periodicamente e riflette il tempo necessario per completare tutte le +operazioni alla velocità di trasferimento mostrata. + +

+La visualizzazione dello stato viene aggiornata ogni mezzo secondo per +fornire un feedback costante del processo di download, e le linee Get +scorrono indietro quando viene cominciato il download di un nuovo file. +Dato che la visualizzazione dello stato viene costantemente +aggiornata, non è adatta per essere registrata in un file; per non +visualizzarla si può usare l'opzione -q. + + + +Dpkg + +

+APT usa dpkg per installare gli archivi e passerà all'interfaccia +dpkg una volta finito il download. +dpkg porrà anche alcune domande durante la manipolazione dei +pacchetti, ed i pacchetti stessi +potranno farne altre. Prima di ciascuna domanda viene +proposta una descrizione di quello che sta per chiedere, e le domande +sono troppo diverse per poter essere discusse in maniera completa in questa +occasione. + + + + + + diff --git a/apt/doc/guide.sgml b/apt/doc/guide.sgml index da2c111..4967403 100644 --- a/apt/doc/guide.sgml +++ b/apt/doc/guide.sgml @@ -1,10 +1,10 @@ - + APT User's Guide Jason Gunthorpe jgg@debian.org -$Id: guide.sgml,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +$Id: guide.sgml,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ This document provides an overview of how to use the the APT package manager. @@ -39,14 +39,14 @@ the Internet.

The Debian packaging system has a large amount of information associated with each package to help assure that it integrates cleanly and easily into -the system. The most prominent of features is the dependency system. +the system. The most prominent of its features is the dependency system.

The dependency system allows individual programs to make use of shared elements in the system such as libraries. It simplifies placing infrequently used portions of a program in separate packages to reduce the number of things the average user is required to install. Also, it allows -a choices in for such things as mail transport agents, X servers and +for choices in mail transport agents, X servers and so on.

@@ -55,9 +55,9 @@ of a simple dependency. The meaning of a simple dependency is that a package requires another package to be installed at the same time to work properly.

-For instance, mail-crypt is an emacs extension that aids in encrypting email -with PGP. Without PGP installed mail-crypt is useless, so mail-crypt has a -simple dependency on PGP. Also, because it is an emacs extension it has a +For instance, mailcrypt is an emacs extension that aids in encrypting email +with GPG. Without GPGP installed mail-crypt is useless, so mailcrypt has a +simple dependency on GPG. Also, because it is an emacs extension it has a simple dependency on emacs, without emacs it is completely useless.

@@ -96,7 +96,7 @@ for installation.

apt-get provides a simple way to install packages from the command line. Unlike dpkg, apt-get does not understand .deb files, -it works with the packages proper name and can only install .deb archives from +it works with the package's proper name and can only install .deb archives from a Source.

@@ -116,7 +116,7 @@ Building Dependency Tree... Done

-Once updated there are several useful commands that can be used, +Once updated there are several commands that can be used: upgrade Upgrade will attempt to gently upgrade the whole system. Upgrade will @@ -125,20 +125,20 @@ ever upgrade a package that might cause some other package to break. This can be used daily to relatively safely upgrade the system. Upgrade will list all of the packages that it could not upgrade, this usually means that they depend on new packages or conflict with some other package. -Dselect or apt-get install can be used to force these +dselect or apt-get install can be used to force these packages to install. install -Install is used to install single packages by name. The package is +Install is used to install packages by name. The package is automatically fetched and installed. This can be useful if you already know the name of the package to install and do not want to go into a GUI to select it. Any number of packages may be passed to install, they will all be fetched. Install automatically attempts to resolve dependency problems with the listed packages and will print a summary and ask for confirmation -if anything other than it's arguments are changed +if anything other than its arguments are changed. dist-upgrade -Dist-upgrade is a complete upgrader designed to make simple upgrading between +Dist-upgrade is a complete upgrader designed to simplify upgrading between releases of Debian. It uses a sophisticated algorithm to determine the best set of packages to install, upgrade and remove to get as much of the system to the newest release. In some situations it may be desired to use dist-upgrade @@ -152,7 +152,7 @@ decisions may sometimes be quite surprising.

-apt-get has several command line options that are detailed in it's +apt-get has several command line options that are detailed in its man page, . The most useful option is -d which does not install the fetched files. If the system has to download a large number of package it would be undesired to start installing @@ -229,7 +229,7 @@ US is legal however.

The components list refers to the list of sub distributions to fetch. The -distribution is split up based on software copyright, main being DFSG free +distribution is split up based on software licenses, main being DFSG free packages while contrib and non-free contain things that have various restrictions placed on their use and distribution. @@ -251,8 +251,8 @@ the [C]onfig and [R]emove commands have no meaning, the [I]nstall command performs both of them together.

-By default APT will automatically remove the packages once they have been -sucessfully installed. To change this behavor place Dselect::clean +By default APT will automatically remove the package (.deb) files once they have been +successfully installed. To change this behavior place Dselect::clean "prompt"; in /etc/apt/apt.conf. @@ -278,14 +278,14 @@ how much is left to do. Startup

-Before all operations, except update, APT performs a number of actions to -prepare its internal state. It also does some checks of the systems state. -At any time these operations can be performed by running apt-get chec +Before all operations except update, APT performs a number of actions to +prepare its internal state. It also does some checks of the system's state. +At any time these operations can be performed by running apt-get check.

# apt-get check Reading Package Lists... Done -Building Dependancy Tree... Done +Building Dependency Tree... Done

@@ -295,16 +295,16 @@ is run. If some of the package files are not found then they will be ignored and a warning will be printed when apt-get exits.

-The final operation performs a detailed analysis of the systems dependencies. +The final operation performs a detailed analysis of the system's dependencies. It checks every dependency of every installed or unpacked package and considers -if it is ok. Should this find a problem then a report will be printed out and +if it is OK. Should this find a problem then a report will be printed out and apt-get will refuse to run.

# apt-get check Reading Package Lists... Done -Building Dependancy Tree... Done +Building Dependency Tree... Done You might want to run apt-get -f install' to correct these. Sorry, but the following packages have unmet dependencies: 9fonts: Depends: xlib6g but it is not installed @@ -328,7 +328,7 @@ problem is also included.

There are two ways a system can get into a broken state like this. The -first is caused by dpkg missing some subtle relationships between +first is caused by dpkg missing some subtle relationships between packages when performing upgrades. APT however considers all known dependencies and attempts to prevent broken packages. The second is if a package installation fails during an operation. In this situation a @@ -336,8 +336,8 @@ package may have been unpacked without its dependents being installed.

The second situation is much less serious than the first because APT places -certain assurances on the order that packages are installed. In both cases -supplying the -f option to atp-get will cause APT to deduce a +certain constraints on the order that packages are installed. In both cases +supplying the -f option to apt-get will cause APT to deduce a possible solution to the problem and then continue on. The APT dselect method always supplies the -f option to allow for easy continuation of failed maintainer scripts. @@ -395,7 +395,7 @@ should be given a careful inspection to ensure nothing important is to be taken off. The -f option is especially good at generating packages to remove so extreme care should be used in that case. The list may contain packages that are going to be removed because they are only -partially removed, possibly due to an aborted installation. +partially installed, possibly due to an aborted installation. The New Packages list @@ -476,7 +476,7 @@ to upgrade, they are similar to the previous examples. The Status Display

During the download of archives and package files APT prints out a series of -status messages, +status messages.

@@ -498,8 +498,8 @@ files. Unfortunately since the size of the Package files is unknown inaccuracies.

-The next section of the status line is repeated once for each dowload thread -and indicates the operation being performed and some usefull information +The next section of the status line is repeated once for each download thread +and indicates the operation being performed and some useful information about what is happening. Sometimes this section will simply read Forking which means the OS is loading the download module. The first word after the [ is the fetch number as shown on the history lines. The next word @@ -511,11 +511,11 @@ Inside of the single quote is an informative string indicating the progress of the negotiation phase of the download. Typically it progresses from Connecting to Waiting for file to Downloading or Resuming. The final value is the number of bytes downloaded from the -remote site. Once the download beings this is represented as 102/10.2k +remote site. Once the download begins this is represented as 102/10.2k indicating that 102 bytes have been fetched and 10.2 kilobytes is expected. The total size is always shown in 4 figure notation to preserve space. After the size display is a percent meter for the file itself. -The second last element is the instantenous average speed. This values is +The second last element is the instantaneous average speed. This values is updated every 5 seconds and reflects the rate of data transfer for that period. Finally is shown the estimated transfer time. This is updated regularly and reflects the time to complete everything at the shown @@ -535,7 +535,7 @@ status display.

APT uses dpkg for installing the archives and will switch over to the dpkg interface once downloading is completed. -dpkg will also as a number of questions as it processes the packages +dpkg will also ask a number of questions as it processes the packages and the packages themselves may also ask several questions. Before each question there is usually a description of what it is asking and the questions are too varied to discuss completely here. diff --git a/apt/doc/libapt-pkg2_to_3.txt b/apt/doc/libapt-pkg2_to_3.txt new file mode 100644 index 0000000..c1f71f9 --- /dev/null +++ b/apt/doc/libapt-pkg2_to_3.txt @@ -0,0 +1,89 @@ +libapt-pkg v2 to v3 incorperates several source-incompatible changes that +people need to be aware of.. Many of this changes are done so that most old +source will continue to function, but perhaps at reduced functionality. + +* pkgDepCache is no longer self initilizing, you have to call the Init + method seperately after constructing it. Users of pkgCacheFile do not + need to worry about this +* GetCandidateVer/etc is gone from the pkgCache. It exists only in the + DepCache and is just an inline around the new Policy class +* TargetVer/TargetDist have been eliminated. Nothing should have been using + these. +* There is a policy class. The v0 policy engine which has been used since + APT 0.0.0 is instantiated by the DepCache by default. However pkgCacheFile + constructs and initializes the new v4 engine. People accessing GetCandidate + version outside of a CacheFile/DepCache will need to instantiate and + initialize a policy engine on their own. +* All byte counters are now doubles to advoid 4G wraparound. The compiler + should generate warnings on any incorrect use of these. +* The PriorityType/CompType/DepType functions have been moved out of the + iterators and into generate static functions of pkgCache - inline stubs + are left in the iterators. +* The deb dependency element parser has been made into a static function + of the list parser and enhanced to optionally understand architecture + restrictions. +* TagSections no longer include the trailing \n. This means that the + Offset/Length of a package record in the version structure also does not + include the trailing \n. +* GenCaches::SelectFile accepts a site parameter now too. +* Global version compare functions are gone. If you + #define APT_COMPATABILITY 1 + They will come back as they were before. Code should be updated to + reference the compare functions to the VersioningSystem (VS) referenced + by the Cache or _system structures. +* Initialization is now two stage (define APT_COMPATABILITY..) The first + stage, pkgInitConfig is called before commandline parsing, and + pkgInitSystem is called after. This gives the user the oppertunity to + override default settings from the config files before startup has been + finalized. +* pkgSourceList has been gutted. All the junk that was in there before is + cleaned up and put in the pkgIndexFile class. There is very little API + corrispondence here.. +* pkgMakeStatusCacheMem is gone, pkgMakeStatusCache does the same thing if + you set the AllowMem flag. Also, you can get a copy of the map used to + store the cache to advoid having to remap it in the calling code. A bunch + of other cache related functions are gone, but nobody should have been using + them in the first place! +* Downloading the 'Package' and 'Source' index files is different, use + the GetIndexes call in SourceList. +* SourceRecords::Parser::Source is gone, replaced with Index which does + much the same thing. +* DynamicMap has changed slightly, nobody should care +* pkgMakeOnlyStatusCache exists, which creates a really small cache that + only contains the status file, and in memory. +* The pkgRecords stuff is changed to abstract through the index file list + (should be transparent largely) +* Locking is handled differently, there is no dpkg lock class, the _system + class provides Lock/UnLock methods +* pkgDepCache is not a subclass of pkgCache, it agregates it now. Some + compatibility functions are provided that make this transition fairly + easy. +* The following functions have had minor argument changes: + - pkgSimulate(pkgDepCache &Cache); + + pkgSimulate(pkgDepCache *Cache); + + - pkgProblemResolver(pkgDepCache &Cache); + + pkgProblemResolver(pkgDepCache *Cache); + + - pkgDepCache(MMap &Map,Policy *Plcy = 0); + + pkgDepCache(pkgCache *Cache,Policy *Plcy = 0); + + - pkgOrderList(pkgDepCache &Cache); + + pkgOrderList(pkgDepCache *Cache); + + - pkgPackageManager(pkgDepCache &Cache); + + pkgPackageManager(pkgDepCache *Cache); + + - pkgCache(MMap &Map,bool DoMap = true); + + pkgCache(MMap *Map,bool DoMap = true); + + - pkgCacheGenerator(DynamicMMap &Map,OpProgress &Progress); + + pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress); + + - pkgTagFile(FileFd &F,unsigned long Size = 32*1024); + + pkgTagFile(FileFd *F,unsigned long Size = 32*1024); + +* Configuration class is const-correct +* The legacy ability to create a PkgFileIterator that started at Begin + is gone, everyone should be using FileBegin(). +* A new dependency relation called obsoletes that is similar to conflicts. diff --git a/apt/doc/makefile b/apt/doc/makefile index e4a6994..2ea37ea 100644 --- a/apt/doc/makefile +++ b/apt/doc/makefile @@ -1,24 +1,23 @@ # -*- make -*- BASE=.. -SUBDIR=doc doc/pt_BR +SUBDIR=doc # Bring in the default rules include ../buildlib/defaults.mak -# SGML Documents -SOURCE = dpkg-tech.sgml design.sgml files.sgml guide.sgml cache.sgml \ - method.sgml offline.sgml +# Debian Doc SGML Documents +SOURCE = dpkg-tech.sgml design.sgml files.sgml guide.sgml guide.it.sgml \ + cache.sgml method.sgml offline.sgml include $(DEBIANDOC_H) # Man pages -SOURCE = apt-cache.8 apt-get.8 apt-cdrom.8 apt.conf.5 \ - sources.list.5 vendors.list.5 apt-config.8 \ - pt_BR/apt-cache.8 pt_BR/apt-get.8 pt_BR/apt-cdrom.8 \ - pt_BR/apt.conf.5 pt_BR/sources.list.5 pt_BR/vendors.list.5 \ - pt_BR/apt-config.8 -include $(YODL_MANPAGE_H) +SOURCE = apt-cache.8 apt-get.8 apt-cdrom.8 apt.conf.5 sources.list.5 \ + apt-config.8 apt-sortpkgs.1 apt-ftparchive.1 apt_preferences.5 \ + apt-extracttemplates.1 vendors.list.5 +INCLUDES = apt.ent +include $(SGML_MANPAGE_H) # Examples -SOURCE = examples/apt.conf examples/sources.list examples/vendors.list examples/configure-index +SOURCE = examples/apt.conf examples/sources.list examples/configure-index TO = $(DOC) include $(COPY_H) diff --git a/apt/doc/method.sgml b/apt/doc/method.sgml index 56b0c71..4d73775 100644 --- a/apt/doc/method.sgml +++ b/apt/doc/method.sgml @@ -1,10 +1,10 @@ - + APT Method Interface Jason Gunthorpe jgg@debian.org -$Id: method.sgml,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +$Id: method.sgml,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ This document describes the interface that APT uses to the archive @@ -110,7 +110,7 @@ string acquire The act of bring a URI into the local pathname space. This may simply -be verifiying the existence of the URI or actually downloading it from +be verifying the existence of the URI or actually downloading it from a remote site. @@ -125,11 +125,11 @@ a remote site.

All methods operate as a sub process of a main controlling parent. 3 FD's are opened for use by the method allowing two way communication and -emergency error reporting. The FD's corrispond to the well known unix FD's, +emergency error reporting. The FD's correspond to the well known unix FD's, stdin, stdout and stderr.

-Throught operation of the method communication is done via http +Through operation of the method communication is done via http style plain text. Specifically RFC-822 (like the Package file) fields are used to describe items and a numeric-like header is used to indicate what is happening. Each of these distinct communication messages should be @@ -147,7 +147,7 @@ URI's to determine how many files are available locally.

The first line of each message is called the message header. The first 3 digits (called the Status Code) have the usual meaning found in the -http protocol. 1xx is informational, 2xx is successfull and 4xx is failure. +http protocol. 1xx is informational, 2xx is successful and 4xx is failure. The 6xx series is used to specify things sent to the method. After the status code is an informational string provided for visual debugging. @@ -171,7 +171,7 @@ status code is an informational string provided for visual debugging. Only the 6xx series of status codes is sent TO the method. Furthermore the method may not emit status codes in the 6xx range. The Codes 402 and 403 require that the method continue reading all other 6xx codes -until the proper 602/603 code is recieved. This means the method must be +until the proper 602/603 code is received. This means the method must be capable of handling an unlimited number of 600 messages.

@@ -179,12 +179,12 @@ The flow of messages starts with the method sending out a 100 Capabilities and APT sending out a 601 Configuration. After that APT begins sending 600 URI Acquire and the method sends out 200 URI Start, 201 URI Done or -400 URI Failure. No syncronization is performed, it is expected +400 URI Failure. No synchronization is performed, it is expected that APT will send 600 URI Acquire messages at -any- time and that the method should queue the messages. This allows methods like http to pipeline requests to the remote server. It should be noted however -that APT will buffer messages so it is not neccessary for the method -to be constantly ready to recieve them. +that APT will buffer messages so it is not necessary for the method +to be constantly ready to receive them. @@ -217,7 +217,7 @@ the ones it wants. Single-InstanceRequires that only one instance of the method be run This is a yes/no value. PipelineThe method is capable of pipelining. -LocalThe method only returns Filename: feilds. +LocalThe method only returns Filename: fields. Send-ConfigSend configuration to the method. Needs-CleanupThe process is kept around while the files it returned are being used. This is primarily intended for CDROM and File URIs that need @@ -230,7 +230,7 @@ This is a list of which headers each status code can use 100 Capabilities Displays the capabilities of the method. Methods should set the -pipeline bit if their underlying protocol supports pipeling. The +pipeline bit if their underlying protocol supports pipelining. The only known method that does support pipelining is http. Fields: Version, Single-Instance, Pre-Scan, Pipeline, Send-Config, Needs-Cleanup @@ -242,7 +242,7 @@ Fields: Message 102 Status Message gives a progress indication for the method. It can be used to show -pre-transfer status for internet type methods. +pre-transfer status for Internet type methods. Fields: Message 200 URI Start @@ -256,19 +256,19 @@ to specify a 201 URI Done without a URI Start which would mean no data was transfered but the file is now available. A Filename field is specified when the URI is directly available in the local pathname space. APT will either directly use that file or copy it into -another location. It is possible to return Alt-* feilds to indicate that +another location. It is possible to return Alt-* fields to indicate that another possibility for the URI has been found in the local pathname space. This is done if a decompressed version of a .gz file is found. Fields: URI, Size, Last-Modified, Filename, MD5-Hash 400 URI Failure Indicates a fatal URI failure. The URI is not retrievable from this source. -As with 201 URI Done 200 URI Start is not required to preceed +As with 201 URI Done 200 URI Start is not required to precede this message Fields: URI, Message 401 General Failure -Indicates that some unspecific failure has occured and the method is unable +Indicates that some unspecific failure has occurred and the method is unable to continue. The method should terminate after sending this message. It is intended to check for invalid configuration options or other severe conditions. diff --git a/apt/doc/offline.sgml b/apt/doc/offline.sgml index 17be474..a6cdb2e 100644 --- a/apt/doc/offline.sgml +++ b/apt/doc/offline.sgml @@ -1,10 +1,10 @@ - + Using APT Offline Jason Gunthorpe jgg@debian.org -$Id: offline.sgml,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +$Id: offline.sgml,v 1.4 2003/01/29 18:43:48 niemeyer Exp $ This document describes how to use APT in a non-networked environment, @@ -43,7 +43,7 @@ SuperDisk disc. These discs are not large enough to store the entire Debian archive but can easily fit a subset large enough for most users. The idea is to use APT to generate a list of packages that are required and then fetch them onto the disc using another machine with good connectivity. It is -even Possible to use another Debian machine with APT or to use a completely +even possible to use another Debian machine with APT or to use a completely different OS and a download tool like wget.

@@ -114,7 +114,8 @@ disc: // Binary caches will be stored locally Cache::archives "/disc/archives/"; - + Cache "/tmp/"; + // Location of the source list. Etc "/disc/"; }; @@ -124,7 +125,7 @@ More details can be seen by examining the apt.conf man page and the sample configuration file in /usr/doc/apt/examples/apt.conf.

-On the Debian machine the first thing to do is mount the disc and copy +On the remote Debian machine the first thing to do is mount the disc and copy /var/lib/dpkg/status to it. You will also need to create the directories outlined in the Overview, archives/partial/ and lists/partial/ Then take the disc to the remote machine and configure the sources.list. @@ -139,8 +140,9 @@ On the remote machine execute the following: The dist-upgrade command can be replaced with any-other standard APT commands, -you can even use an APT front end such as gnome-apt [still in -development]. +particularly dselect-upgrad. You can even use an APT front end such as +dselect However this presents a problem in communicating your +selections back to the local computer.

Now the disc contains all of the index files and archives needed to upgrade @@ -150,7 +152,7 @@ the Debian machine. Take the disc back and run: # export APT_CONFIG="/disc/apt.conf" # apt-get check [ APT generates a local copy of the cache files ] - # apt-get --no-d -o dir::etc::status=/var/lib/dpkg/status dist-upgrade + # apt-get --no-d -o dir::state::status=/var/lib/dpkg/status dist-upgrade [ Or any other APT command ] @@ -158,6 +160,13 @@ the Debian machine. Take the disc back and run: It is necessary for proper function to re-specify the status file to be the local one. This is very important! +

+If you are using dselect you can do the very risky operation of copying +disc/status to /var/lib/dpkg/status so that any selections you made on the +remote machine are updated. I highly recommend that people only make selections +on the local machine - but this may not always be possible. DO NOT copy +the status file if dpkg or APT have been run in the mean time!! + @@ -193,6 +202,10 @@ merely use the standard APT commands to generate the file list. # awk '{print "wget -O " $2 " " $1}' < uris > /disc/wget-script +Any command other than dist-upgrade could be used here, including +dselect-upgrade. + +

The /disc/wget-script file will now contain a list of wget commands to execute in order to fetch the necessary archives. This script should be run with the current directory as the disc's mount point so as to save the output on the diff --git a/apt/doc/pt_BR/CVS/Entries b/apt/doc/pt_BR/CVS/Entries deleted file mode 100644 index c189382..0000000 --- a/apt/doc/pt_BR/CVS/Entries +++ /dev/null @@ -1,9 +0,0 @@ -/apt-cache.8/1.1/Fri Aug 10 14:01:42 2001// -/apt-cdrom.8/1.1/Fri Aug 10 14:01:42 2001// -/apt-config.8/1.1/Fri Aug 10 14:01:42 2001// -/apt-get.8/1.1/Fri Aug 10 14:01:44 2001// -/apt.8/1.1/Fri Aug 10 14:01:49 2001// -/apt.conf.5/1.1/Fri Aug 10 14:01:51 2001// -/sources.list.5/1.1/Fri Aug 10 14:01:51 2001// -/vendors.list.5/1.1/Fri Aug 10 14:01:51 2001// -D diff --git a/apt/doc/pt_BR/CVS/Repository b/apt/doc/pt_BR/CVS/Repository deleted file mode 100644 index 7ea68e2..0000000 --- a/apt/doc/pt_BR/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/doc/pt_BR diff --git a/apt/doc/pt_BR/CVS/Root b/apt/doc/pt_BR/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/doc/pt_BR/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/doc/pt_BR/apt-cache.8 b/apt/doc/pt_BR/apt-cache.8 deleted file mode 100644 index 31afd50..0000000 --- a/apt/doc/pt_BR/apt-cache.8 +++ /dev/null @@ -1,319 +0,0 @@ -.TH "apt-cache" "8" "25 Oct 2000" "apt" "" -.SH "NOME" -apt-cache \- APT utilitário de gerenciamento de pacotes -- manipulador de cache -.PP -.SH "SINOPSE" -apt-cache comando [argumento \&.\&.\&.] -.PP -.SH "DESCRIÇÃO" -\fBapt-cache\fP realiza uma variedade de operações no cache de pacotes do APT\&. -\fBapt-cache\fP é raramente chamado diretamente; ao invés disso, suas -operações são realizadas automaticamente pelos outros utilitários do \fBapt\fP\&. -.PP -\fIcomando\fP é um de: -.IP o -add file1 [file2] [\&.\&.\&.] -.IP o -gencaches -.IP o -showpkg package1 [package2] [\&.\&.\&.] -.IP o -stats -.IP o -dump -.IP o -dumpavail -.IP o -unmet -.IP o -check -.IP o -search -.IP o -show -.IP o -showpkg -.IP o -depends -.IP o -pkgnames -.IP o -dotty -.PP -A menos que -h, ou a opção --help seja dada um dos comandos acima -deve estar presente\&. -.PP -.IP "\fBadd\fP" -\fBadd\fP adiciona os nomes de arquivos de índice de pacotes ao cache de pacotes\&. -.IP -.IP "\fBgencaches\fP" -\fBgencaches\fP realiza a mesma operação que \fBapt-get check\fP\&. Constrói -o cache de pacotes a partir dos fontes em \fB/etc/apt/sources\&.list\f -e a partir de \fB/var/lib/dpkg/status\fP\&. -.IP -.IP "\fBshowpkg\fP" -\fBshowpkg\fP mostra informação sobre os pacotes listados na linha de -comando\&. Argumentos restantes são nomes de pacotes\&. As versões -disponíveis de retro-dependências de cada pacote listado são listadas, -assim como as dependências para cada versão\&. Dependências -normais são aqueles pacotes sobre os quais o pacote em questão depende; -retro-dependências são aqueles pacotes que dependem sobre o pacote em -questão\&. Assim, as demais dependências devem ser satisfeitas por um pacote, -porém as retro-dependências não precisam\&. -Por exemplo, \fBapt-cache showpkg libreadline2\fP iria produzir uma saída -semelhante ao que se segue: -.IP - -.nf - - -Pacote: libreadline2 - -Versões: - -2\&.1-12(/var/state/apt/lists/debian\&.midco\&.net_debian_dists_slink_main_binary-i386_Packages), - -Retro-Dependências: - - libreadlineg2,libreadline2 - - libreadline2-altdev,libreadline2 -Dependências: - -2\&.1-12 - libc5 (2 5\&.4\&.0-0) ncurses3\&.0 (0 (null)) ldso (2 1\&.9\&.0-1) - -Fornece: - -2\&.1-12 - - -Provimentos inversos: - -.fi - - -.IP -Assim pode ser visto que a versão 2\&.1-8 do libreadline2 depende da libc5, -ncurses3\&.0 e ldso, que devem estar instalados para ela funcione\&. -Desta forma, libreadlineg2 e libreadline2-altdev dependem de libreadline2\&. Se -libreadline2 for instalada, libc5, ncurses3\&.0, e ldso devem também ser -instaladas; mas libreadlineg2 e libreadline2-altdev não precisam ser -instaladas\&. Para saber o significado específico do restante de saída é melhor -consultar o código-fonte do apt\&. -.IP: -.IP "\fBstats\fP" -\fBstats\fP mostra algumas estatísticas sobre o \fBcache\fP\&. -Não são esperados mais argumentos\&. Estatísticas informadas são: -.IP o -\fBTotal de pacotes\fP é o número de nomes de pacotes encontrados no cache\&. -.IP -.IP o -\fBPacotes normais\fP é o número de nomes de pacotes normais; estes -são pacotes que suportam correspondência entre seus nomes e os nomes usados -por outros pacotes para eles em dependências\&. A maioria dos pacotes entram -nessa categoria\&. -.IP -.IP o -\BPacotes virtuais puros\fP é o número de pacotes que existe apenas como -um nome de pacote virtual; isto é, pacotes apenas provêem o nome do -pacote virtual, e nenhum pacote realmente usa o nome\&. Por exemplo, -"mail-transport-agent" no sistema Debian GNU/Linux é um pacote puramente -virtual; vários pacotes fornecem "mail-transport-agent", mas não existe -nenhum pacote chamado "mail-transport-agent"\&. -.IP -.IP o -\fBPacotes virtuais simples\fP é o número de pacotes virtuais providos -por um único pacote\&. Por exemplo, no sistema -Debian GNU/Linux, "X11-text-viewer" é um pacote virtual, mas somente um -pacote, xless, fornece "X11-text-viewer"\&. -.IP -.IP o -\fBPacotes virtuais mistos\fP é o número de pacotes que fornecem um pacote -virtual ou possuem o nome do pacote virtual como nome do pacote\&. Por -exemplo, no sistema Debian GNU/Linux, e2fsprogs são pacotes reais, -fornecidos pelo pacote e2compr\&. -.IP -.IP o -\fBFaltando\fP é o número de nomes de pacotes que foram referenciados em uma -dependência, mas não foram fornecidos por nenhum pacote\&. Pacotes ausentes -podem estar em evidência se uma completa distribuição não for acessada, ou se -um pacote (real ou virtual) foi removido da distribuição\&. -.IP -.IP o -\fBTotal de versões distintas\fP versões são o número de pacotes encontrados -no cache; este valor é então pelo menos igual ao número total de nomes de -pacotes\&. Se mais de uma distribuição (ambas "estáveis" e "instáveis", -por exemplo), estiver sendo acessada, este valor pode ser consideravelmente -maior do que o número total de nomes de pacotes\&. -.IP -.IP o -\fBTotal de dependência\fP é o número de relações de dependência reinvidicadas -por todos os pacotes no cache\&. -.IP -.IP "\fBdump\fP" -\fBdump\fP mostra uma lista curta de cada pacote no cache\&. É basicamente -para depuração\&. -.IP -.IP "\fBdumpavail\fP" -\fBdumpavail\fP imprime uma lista de disponíveis para stdout\&. Isto é adequado -para uso com \fBdpkg\fP e é usado pelo método \fBdselect\fP\&. -.IP -.IP "\fBunmet\fP" -\fBunmet\fP mostra um resumo de todas as dependências não satisfeitas no cache -de pacotes\&. -.IP -.IP "\fBcheck\fP" -\fBcheck\fP é uma função randômica para testar certos aspectos do cache\&. -Não a use\&. -.IP -.IP "\fBshowpkg\fP" -\fBshowpkg\fP lista a estrutura de cache de pacotes dado -e algumas informações referentes a ela\&. A lista é basicamente direcionada -para depuração\&. -.IP -.IP "\fBshow\fP" -\fBshow\fP realiza uma função semelhante ao dpkg --print-avail ou rpm -qi, -mostrando os registros do pacote para o pacote nomeado\&. -.IP -.IP "\fBsearch\fP" -\fBsearch\fP realiza uma busca completa do padrão dado em todos os arquivos de -pacotes disponíveis\&. Procura pelos nomes de pacotes -e as descrições para ocorrência da string e imprime o nome do pacote -em uma curta descrição\&. Se --full for dado então uma saída idêntica à -\fBshow\fP é produzida para cada pacote que bater. Se --names-only for -fornecido a busca irá desconsiderar a descrição comprida\&. -.IP -.IP "\fBdepends\fP" -\fBdepends\fP mostra uma lista de cada dependência que um pacote possui e -todos os outros pacotes possíveis que podem completar aquela dependência\&. -.IP -.IP "\fBpkgnames\fP" -Este comando mostra o nome de cada pacote no sistema\&. O argumento opcional -é um prefixo usado para filtrar a lista de nomes\&. A saída é adequada -para uso em uma função de completamento por tab do shell e geração da saída é -extremamente rápida\&. Este comando é melhor usado com a -opção\& \fB--no-generate\fP. -.IP -.IP "\fBdotty\fP" -\fBdotty\fP Toma uma lista de pacotes na linha de comando e gera uma saída -adequada para uso pelo dotty do pacote\& GraphVis -(http://www\&.research\&.att\&.com/sw/tools/graphviz/). O resultado será um -conjunto de conexões e bordas representando as relações entre pacotes\&. -Por padrão os pacotes fornecidos irão traçar todos os pacotes dependentes -que podem produzir um amplo gráfico\&. Isto pode ser desativado configurando a -opção\& APT::Cache::GivenOnly. -.IP -As conexões resultantes terão vários formatos. Pacotes normais são caixas, -provimentos puros são triângulos, provimentos misturados são losangos, -hexágonos são pacotes que faltam\&. Caixas laranjas significam que a recursiva -foi parada [leaf packages], linhas azuis são pré-dependentes, linhas verdes -são conflitos\&. -.IP -Cuidado, dotty não pode representar graficamente conjuntos maiores de pacotes\&. -.IP -.PP.\" XXX -.SH "OPÇÕES" -Todas as opções de linha de comando podem ser configuradas usando o arquivo de -configuração. As descrições indicam a opção de configuração a ser configurada\&.Para opções Booleanas você pode ignorar o arquivo de configuração usando-se algocomo \fB-f-\fP, -\fB--no-f\fP, \fB-f=no\fP ou muitas outras variações\&. -.PP -.IP "\fB-h, --help\fP" -Mostra um curto resumo de uso\&. -.IP -.IP "\fB-v, --version\fP" -Mostra a versão do programa\&. -.IP -.IP "\fB-p --pkg-cache\fP" -Selecionar o arquivo a ser armazenado no cache de pacote\&. O cache de pacote -é o cache primário usado por todas as operações\&. -Ítem de configuração: \fBDir::Cache::pkgcache\fP\&. -.IP -.IP "\fB-s --src-cache\fP" -Selecionar o arquivo a ser armazenado no cache de fonte\&. O fonte é usado -somente pelo \fBgencaches\fP e armazena uma versão de parse da informação -de pacote a partir de fontes remotos\&. Quando construindo o cache de -pacote o cache do fonte é usado para evitar reparse de todos os arquivos do -pacote\&. -Ítem de configuração: \fBDir::Cache::srcpkgcache\fP\&. -.IP -.IP "\fB-q, --quiet\fP" -Quiet; Produz uma saída adequada para registro, omitindo indicadores de -progresso\&. -Mais qs produzirão mais "quiet" a um máximo de 2\&. Você pode usar também -\fB-q=#\fP para configurar o nível de "quiet", ignorando o arquivo de -configuração\&. Ítem de configuração: \fBquiet\fP\&. -.IP -.IP "\fB-i --important\fP" -Mostrar somente dependências importantes; para uso com unmet causando somente \fIDepends\fP e -\fIPre-Depends\fP relações a serem impressas\&. -Item de configuração: \fBAPT::Cache::Important\fP\&. -.IP -.IP "\fB-f --full\fP" -Mostrar registros de pacotes completos quando em busca\&. Ítem de configuração: \fBAPT::Cache::ShowFull\fP\&. -.IP -.IP "\fB-a --all-versions\fP" -Mostrar registros completos para todas as versões disponíveis, isto aplica-se -somente ao comando mostrado\&. Ítem de configuração: \fBAPT::Cache::AllVersions\\fP -.IP -.IP "\fB-g --no-generate\fP" -Não realizar regeneração automática de cache de pacote, usar o cache como ele é -\&. -Ítem de configuração: \fBAPT::Cache::NoGenerate\fP\&. -.IP -.IP "\fB--names-only\fP" -Pesquisar somente nos nomes de pacotes, não a descrição longa\&. -Ítem de configuração: \fBAPT::Cache::NamesOnly\fP\&. -.IP -.IP "\fB--all-names\fP" -Fazer \fBpkgnames\fP imprimir todos os nomes, incluindo pacotes virtuais e -dependências que faltam\&. Ítem de configuração: \fBAPT::Cache::AllNames\fP\& -.IP -.IP "\fB-c, --config-file\fP" -Arquivo de configuração; Especificar um arquivo de configuração a ser usado\&. \fBapt-get\fP irá ler o arquivo de configuração padrão e então este arquivo de -configuração\&. Ver -\fBapt\&.conf(5)\fP para informação de sintaxe\&. -.IP -.IP "\fB-o, --option\fP" -Configurar a opção de configuração; isto irá configurar uma opção de -configuração arbritária\&. -A sintaxe é - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "ARQUIVOS" -.IP o -/etc/apt/sources\&.list -locais de onde obter os pacotes -.IP -.IP o -/var/state/apt/lists/ -área de armazenamento para exibir informação para cada recurso de pacote -especificado em -.IP -.IP o -/var/state/apt/lists/partial/ -área de armazenamento para exibir informação de estado em trânsito -.PP -.SH "CONSULTE TAMBÉM" -apt-get(8), -sources\&.list(5), -apt\&.conf(5) -.PP -.SH "DIAGNÓSTICOS" -apt-cache retorna zero em operação normal, decimal 100 em erro\&. -.PP -.SH "BUGS" -Ver http://bugs\&.debian\&.org/apt\&. Se você deseja informar sobre um -bug em \fBapt-cache\fP, favor ver \fB/usr/doc/debian/bug-reporting\&.txt\fP -ou o comando\& \fBbug(1)\fP. Se você está usando apt em um sistema baseado -em RPM, favor usar http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTOR" -apt-get foi escrito pela equipe APT -e portado para sistemas baseados em RPM pela Conectiva S.A. -\&. - diff --git a/apt/doc/pt_BR/apt-cdrom.8 b/apt/doc/pt_BR/apt-cdrom.8 deleted file mode 100644 index a6d3098..0000000 --- a/apt/doc/pt_BR/apt-cdrom.8 +++ /dev/null @@ -1,132 +0,0 @@ -.TH "apt-cdrom" "8" "25 Oct 2000" "apt" "" -.SH "NOME" -apt-cdrom \- APT CDROM aplicativo de gerenciamento -.PP -.SH "SINOPSE" -apt-cdrom comando -.PP -.SH "DESCRIÇÃO" -\fBapt-cdrom\fP é usado para adicionar um novo CDROM na lista APT dos -fontes disponíveis\&. -\fBapt-cdrom\fP cuida de determinar a estrutura do disco bem como corrigir -vários possíveis problemas e verifica os arquivos de índice\&. -É necessário usar \fBapt-cdrom\fP para adicionar CDs no sistema APT, isto -não pode ser feito manualmente\&. Além disso cada disco em um conjunto de -multi-cd deve ser inserido e examinado separadamente para contabilizar -possíveis problemas\&. -.PP -\fIcommand\fP é um dos: -.IP -add -.PP -A menos que a opção -h, ou --help seja dada em um dos comandos acima -deve estar presente\&. -.PP -.IP "\fBadd\fP" -\fBadd\fP é usado para adicionar um novo disco à lista fonte\&. Irá -desmontar o CDROM, verificar por um disco a ser inserido e então -proceder com a verificação e copiar os arquivos de índice\&. Se o -não tive um diretório \fB\&.disk/\fP adequado, você será indagado -por um título descritivo\&. -.IP -APT usa uma identificação de CDROM para rastrear qual disco está -atualmente no drive e mantém uma base de dados destes IDs em -\fB/var/state/apt/cdroms\&.list\fP -.IP -.PP -.SH "OPÇÕES" -Todas as opções de linhas de comando podem ser configuradas usando -o arquivo de configuração, as descrições indicam a opção de configuração -a ser usada\&. Para opções booleanas você pode ignorar o arquivo de -configuração usando algo como \fB-f-\fP, -\fB--no-f\fP, \fB-f=no\fP ou muitas outras variações\&. -.PP -.IP "\fB-h, --help\fP" -Mostra um curto resumo de uso\&. -.IP -.IP "\fB-v, --version\fP" -Mostra a versão do programa\&. -.IP -.IP "\fB-d --cdrom\fP" -Ponto de montagem; especificar o local a ser montado o cdrom\&. Este ponto -de montagem deve ser listado em \fB/etc/fstab\fP e configurado adequadamente\&. -Item de configuração: \fBAcquire::cdrom::mount\fP\&. -.IP -.IP "\fB-r --rename\fP" -Renomear um disco; muda o rótulo de um disco ou ignora o rótulo dados do disco\&. -Esta opção irá causar \fBapt-cdrom\fP de apontar para um novo rótulo -Item de configuração: \fBAPT::CDROM::Rename\fP\&. -.IP -.IP "\fB-m, --no-mount\fP" -Sem montagem; previne \fBapt-cdrom\fP de montar e desmontar o ponto de montagem\&. -Item de configuração: \fBAPT::CDROM::NoMount\fP\&. -.IP -.IP "\fB-f, --fast\fP" -Cópia rápida; assume que os arquivos do pacote são válidos e não verifica cada pacote\&. -Esta opção deve ser usada somente se \fBapt-cdrom\fP foi executado previamente no disco e não encontrou nenhum erro\&. -Item de configuração: \fBAPT::CDROM::Fast\fP\&. -.IP -.IP "\fB-a, --thorough\fP" -Através do exame de pacote; esta opção pode ser necessária com algum antigo Debian 1\&.1/1\&.2 -que possui arquivos de pacotes em lugares estranhos\&. Leva muito mais tempo -para examinar o CD, mas irá obter todas\&. -.IP -.IP "\fB-n --just-print, --recon, --no-act\fP" -Sem mudanças; Não alterar os fontes\&.list e não gravar arquivos de pacotes\&. -Tudo está verificado\&. -Item de configuração: \fBAPT::CDROM::NoAct\fP\&. -.IP -.IP "\fB-c, --config-file\fP" -Arquivo de configuração; especifica um arquivo de configuração a ser usado\&. \fBapt-get\fP irá fazer a leitura do arquivo de configuração padrão\&. Consulte -\fBapt\&.conf(5)\fP para informação de sintaxe\&. -.IP -.IP "\fB-o, --option\fP" -Ativar a opção de configuração; isto irá configurar uma opção de configuração -arbitrária\&. -A sintaxe é - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "FILES" -.IP o -/etc/apt/sources\&.list -locais da onde obter pacotes -.IP -.IP o -/var/state/apt/lists/ -área de armazenamento para informação de estado para cada tipo de recurso de -pacote especificado em -.IP -.IP o -/var/state/apt/lists/partial/ -área de armazenamento para informação de estado em trânsito -.IP -.IP o -/var/state/apt/cdroms\&.list -lista de IDs de CDROMs e nomes\&. -.PP -.SH "CONSULTE TAMBÉM" -apt-get(8), -sources\&.list(5), -apt\&.conf(5) -.PP -.SH "DIAGNÓSTICOS" -apt-cdrom retorna zero em operação norma, decimal 100 em erro\&. -.PP -.SH "BUGS" -Consultar http://bugs\&.debian\&.org/apt\&. Se você deseja informar -sobre um bug em \fBapt-cache\fP, favor consultar -\fB/usr/doc/debian/bug-reporting\&.txt\fP -ou o comando\& \fBbug(1)\fP. Se você estiver usando o apt em um sistema -baseado em RPM, favor usar http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTOR" -apt-get foi escrito pela equipe do APT -e portado para sistemas RPM pela Conectiva S.A. -\&. - diff --git a/apt/doc/pt_BR/apt-config.8 b/apt/doc/pt_BR/apt-config.8 deleted file mode 100644 index d32768f..0000000 --- a/apt/doc/pt_BR/apt-config.8 +++ /dev/null @@ -1,103 +0,0 @@ -.TH "apt-config" "8" "25 Out 2000" "apt" "" -.SH "NOME" -apt-config \- programa APT Configuration Query -.PP -.SH "SINOPSE" -apt-config comando -.PP -.SH "DESCRIÇÃO" -\fBapt-config\fP é um programa interno usado por várias partes da -suíte APT para fornecer configurabilidade consistente\&. Ele acessa o -arquivo principal de configuração /etc/apt/apt\&.conf de uma forma que -seja fácil de ser usado por aplicações em script\&. -.PP -\fIcomando\fP é um dos seguintes: -.IP o -shell -.IP o -dump -.PP -A menos que as opções -h ou --help sejam fornecidas, um dos comandos -acima precisa estar presente\&. -.PP -.IP "\fBshell\fP" -\fBshell\fP é usado para acessar as informações de configuração de um -script shell\&. -São fornecidos pares de argumentos, o primeiro sendo uma variável -shell e o segundo o valor de configuração a ser questionado\&. Como -saída ele lista uma série de comandos shell de atribuição para cada -valor presente\&. Em um script shell ele seria usado como: -.IP - -.nf - - -OPTS="-f" - -RES=`apt-config shell OPTS MeuApp::Opções` - -eval $RES - -.fi - - -.IP -Isto irá configurar a variável shell de ambiente $OPTS ao valor de -MeuApp::Opções com um padrão de -f\&. -.IP -Se o ítem de configuração a ser resgatado tiver uma / como prefixo, -ele será resgatado através do modo de nome de arquivo que insere -caminhos base no início\&. -.IP -.IP "\fBdump\fP" -Mostra somente o conteúdo do espaço de configuração\&. -.IP -.PP -.SH "OPÇÕES" -Todas as opções de linha de comando podem ser definidas através do -arquivo de configuração; as descrições indicam a opção de configuração -a ser usada\&. Para opções booleanas você pode ignorar o arquivo de -configuração usando algo como \fB-f-\fP, \fB--no-f\fP, \fB-f=no\fP ou -muitas outras variações\&. -.PP -.IP "\fB-h, --help\fP" -Mostra um pequeno resumo de utilização\&. -.IP -.IP "\fB-v, --version\fP" -Mostra a versão de programa\&. -.IP -.IP "\fB-c, --config-file\fP" -Arquivo de Configuração; Especifique um arquivo de configuração a ser -usado\&. \fBapt-get\fP irá ler o arquivo padrão de configuração e -então este arquivo de configuração\&. Consulte \fBapt\&.conf(5)\fP -para informações sobre a sintaxe\&. -.IP -.IP "\fB-o, --option\fP" -Define uma Opção de Configuração; Isto irá configurar uma opção -arbitrária de configuração\&. -A sintaxe é - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "VEJA TAMBÉM" -apt\&.conf(5) -.PP -.SH "DIAGNÓSTICOS" -apt-config retorna zero em operação normal, 100 decimal 100 quando há erro\&. -.PP -.SH "ERROS" -Veja http://bugs\&.debian\&.org/apt\&. Se você deseja reportar um -erro no \fBapt-config\fP, por favor consulte -\fB/usr/doc/debian/bug-reporting\&.txt\fP ou o comando \fBbug(1)\fP -\&. Se você está usando apt em um sistema baseado em RPM, por favor -use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTOR" -apt-get foi escrito pelo time APT e -portado a sistemas RPM pela Conectiva -S.A. \&. diff --git a/apt/doc/pt_BR/apt-get.8 b/apt/doc/pt_BR/apt-get.8 deleted file mode 100644 index 3f16cf6..0000000 --- a/apt/doc/pt_BR/apt-get.8 +++ /dev/null @@ -1,338 +0,0 @@ -.TH "apt-get" "8" "25 Oct 2000" "apt" "" -.SH "NAME" -apt-get \- APT utilitário de manipulação de pacotes -- interface de linha de comando -.PP -.SH "SYNOPSIS" -apt-get [opções] [comando] [pacote \&.\&.\&.] -.PP -.SH "DESCRIPTION" -.PP -apt-get é uma ferramenta em linha de comando para a manipulação de pacotes, e pode ser considerada o "back-end" do usuário\ para o apt(8)\&. -.PP -\fIcommand\fP é um dos: -.IP o -update -.IP o -upgrade -.IP o -dselect-upgrade [1] -.IP o -dist-upgrade -.IP o -install pacote1 [pacote2] [\&.\&.\&.] -.IP o -remove pacote1 [pacote2] [\&.\&.\&.] -.IP o -source pacote1 [pacote2] [\&.\&.\&.] -.IP o -check -.IP o -clean -.IP o -auto-clean -.PP -Ao menos que as opções -h, ou --help sejam dadas um dos comandos acima deve estar presente\&. -.PP -Nota: -[1] Apenas para sistemas Debian -.PP -.IP "\fBupdate\fP" -\fBupdate\fP é utilizado para resincronizar os arquivos de sumário dos pacotes de seus -fontes\&. Os sumários dos pacotes disponíveis são trazidos dos locais especificados em -\fB/etc/apt/sources\&.list\fP\&. -Por exemplo, quando utilizar arquivos Debian, este comando recupera e procura por -arquivos \fBPackages\&.gz\fP, de forma que as informações de pacotes novos e atualizados -esteja disponível\&. Um \fBupdate\fP deve sempre ser realizado antes de um -\fBupgrade\fP \fBdist-upgrade\fP\&. Esteja ciente de que o medidor de progresso total estará -incorreto assim como o tamanho dos arquivos não podem ser conhecidos antes\&. -.IP -.IP "\fBupgrade\fP" -\fBupgrade\fP é usado para instalar a versão mais nova de todos os pacotes instalados no -sistema dos fontes enumerados em \fB/etc/apt/sources\&.list\fP\&. Os pacotes atualmente -instalados com novas versões disponíveis e atualizados; em nenhuma circunstância os -pacotes atualmente instalados são removidos, ou pacotes ainda não instalados recuperados e -instalados\&. Novas versões de pacotes instalados que não podem ser atualizados sem alterar -o status da instalação ou outros pacotes serão deixados em sua versão atual\&. -Um \fBupdate\fP deve ser realizado antes de forma que o \fBapt-get\fP reconhece que novas -versões de pacotes estão disponíveis\&. -.IP -.IP "\fBdselect-upgrade\fP" -\fBdselect-upgrade\fP -é usado com o tradicional front-end de empacotamento do Debian GNU/Linux, \fBdselect (8)\fP\&. \fBdselect-upgrade\fP segue as alterações feitas por \fBdselect\fP para o campo de \fIStatus\fP dos pacotes disponíveis, e realiza as ações necessárias para alcançar este estado (por enquanto a remoção de pacotes antigos e a instalação de novos)\&. -Este comando esta apenas disponível em sistemas Debian. -.IP -.IP "\fBdist-upgrade\fP" -\fBdist-upgrade\fP, além de realizar a função do \fBupgrade\fP, -também manipula de forma inteligente alterando dependências com as novas versões dos -pacotes; o \fBapt-get\fP possui u sistema "inteligente" de resolução de conflitos, -e esta tentará atualizar os pacotes mais importantes e deixando os menos importantes se -necessário\&. O arquivo \fB/etc/apt/sources\&.list\fP contém uma lista dos -locais aonde é possível se recuperar os arquivos do pacote\&. -.IP -.IP "\fBinstall\fP" -\fBinstall\fP é seguido por um ou mais \fIpackages\fP que se deseja instalar\&. -Cada \fIpackage\fP é o nome de uma pacote, não o nome de um arquivo altamente especifico -(em um sistema Debian GNU/Linux, \fIldso\fP deve ser o argumento fornecido, não -\fIldso_1\&.9\&.6-2\&.deb\fP)\&. Todos os pacotes solicitados para a instalação serão -recuperados e instalados\&. O arquivo \fB/etc/apt/sources\&.list\fP é utilizado para -localizar os pacotes desejados\&. Se um hífen estiver anexado ao nome do pacote (sem nenhum -espaço), o pacote indicado será removido se estiver instalado\&. Esta função pode ser -usada mais tarde para corrigir decisões feitas no sistema de resolução de conflitos -apt-get\\&. -.IP -Caso não haja a expressão dada em nenhum pacote e a expressão possua um -dos seguintes símbolos \'\&.\', \'?\' ou \'*\' esta pode ser considerada como sendo uma -expressão regular POSIX e será aplicada a todos os nomes dos pacotes no banco de dados\&. -Quaisquer correspondências são então instaladas (ou removidas)\&. Note que a correspondência -feita pela substring de modo que \'lo*\' corresponde a \'how-lo\' -e \'lowest\'\&. Caso isto não seja desejado inclua um caractere \'^\'\& como prefixo. -.IP -.IP "\fBremove\fP" -\fBremove\fP é idêntico a \fBinstall\fP exceto que os pacotes são removidos ao invés de -instalados\&. Se um sinal de adição for incluído no nome do pacote (sem nenhum espaço), -o pacote identificados será instalado\&. -.IP -.IP "\fBsource\fP" -O \fBsource\fP faz com que o apt-get traga os pacotes fonte\&. O APT examinará os pacotes -disponíveis para decidir qual pacote fonte trazer\&. Este então encontrará e fará o -download no diretório atual da mais na versão disponível do pacote fonte\&. -Os pacotes fonte são colocados separadamente dos pacotes binários via \fBdeb-src\fP ou -\fBrpm-src\fP linhas de tipo no arquivo \fB/etc/apt/sources\&.list\fP\&. -Isto provavelmente significará o mesmo fonte do mesmo pacote que você instalou ou que -você poderia instalar\&. Caso a opção --compile seja dada então o pacote será compilado -com um binário\&.deb utilizando dpkg-buildpackage, ou sob sistemas baseados em RPM, -este irá compilar a um binário\&.rpm utilizando-se rpm -ba. Caso --download-only seja -utilizado o fonte não será desempacotado\&. -.IP -Note que os pacotes fontes não são pesquisados como pacotes binários, eles existem apenas no -diretório atual e são similares quando se faz o download de tarballs\&. -.IP -.IP "\fBcheck\fP" -\fBcheck\fP é uma ferramenta de diagnóstico; esta atualiza o cache do pacote e verifica -pacotes corrompidos\&. -.IP -.IP "\fBclean\fP" -O \fBclean\fP limpa todo o repositório local do pacote de arquivos recuperados\&. -Ele remove tudo menos o arquivo de lock em \fB/var/cache/apt/archives/\fP -e \fB/var/cache/apt/archives/partial/\fP\&. -Quando o APT é usado como um método \fBdselect(8)\fP, o \fBclean\fP é rodado automaticamente\&. -Aqueles que não usam dselect irão dessa forma rodar \f(CWapt-get clean\fP -de tempos em tempos para liberar espaço em disco\&. -.IP -.IP "\fBautoclean\fP" -Assim como \fBclean\fP, o \fBautoclean\fP limpa todo o repositório local do -pacote de arquivos recuperado\&. A diferença é que este apenas remove arquivos -do pacote os quais não pode-se mais fazer o download e que são largamente utilizados\&. -Este permite que se mantenha um cache por um longo período sem que o mesmo cresça até -que se perca o controle\&. -.IP -.PP -.SH "OPÇÕES" -Todas as opções de linha de comando podem ser configuradas utilizando-se um arquivo de -configuração, as descrições indicam a opção de configuração a ser utilizada\&. -Para opções booleanas você pode anular o arquivo de configuração utilizando algo como -\fB-f-\fP, \fB--no-f\fP, \fB-f=no\fP ou ainda outras variações\&. -.PP -.IP "\fB-d, --download-only\fP" -Apenas download; os arquivos do pacote são apenas recuperados, não desempacotados nem mesmo -instalados\&. -Item de Configuração: \fBAPT::Get::Download-Only\fP\&. -.IP -.IP "\fB-f, --fix-broken\fP" -Conserta; tenta corrigir um sistema com dependências rompidas em local\&. -Esta opção, quando utilizada com install/remove, pode omitir qualquer -pacote para permitir ao APT deduzir uma provável solução\&. Quaisquer -pacotes que forem especificados devem corrigir completamente o -problema\&. A opção é, algumas vezes, necessária ao executar o APT -pela primeira vez; o próprio APT não permite a existência de dependências de -pacotes corrompidos em um sistema\&. É possível que a estrutura de -dependência do sistema pode estar tão corrompida que seja necessária -intervenção manual (que geralmente significa usar dselect ou dpkg ---remove para eliminar alguns dos pacotes com problemas)\&. O uso desta -opção junto com -m pode ocasionar erro em algumas situações\&. O item -de configuração: \fBAPT::Get::Fix-Broken\fP\&. -.IP -.IP "\fB-h, --help\fP" -Ajuda; exibe uma mensagem útil e sai\&. -.IP -.IP "\fB-v, --version\fP" -Exibe a versão do programa\&. -.IP -.IP "\fB-m, --ignore-missing, --fix-missing\fP" -Ignora pacotes faltantes; se pacotes não puderem ser recuperados ou -causarem falha no teste de integridade após a restauração (arquivos -com pacotes corrompidos), retém estes pacotes e processa o -resultado\&. O uso desta opção junto com -f pode ocasionar um erro em -algumas situações\&. Se um pacote for selecionado para instalação -(particularmente se for mencionado na linha de comando) e não puder -ser baixado, então este pacote será retido\&. -Item de configuração: \fBAPT::Get::ignore-missing\fP\&. -.IP -.IP "\fB-S, --summary\fP" -Quando usado com os comandos upgrade ou dist-upgrade, exibe -informações do que seria atualizado, com importância e um resumo das -alterações (quando tais dados estiverem disponíveis) e pára. -Item de configuração: \fBAPT::Get::Show-Upgrade-Summary\fP&. -.IP -.IP "\fB--no-download\fP" -Desabilita o download de pacotes\&. Isto é melhor usado com ---ignore-missing para forçar o APT a usar apenas o \&.debs se tiver -realmente feito download\&. -Item de configuração: \fBAPT::Get::No-Download\fP\&. -.IP -.IP "\fB-q, --quiet\fP" -Quiet; produz saída adequada para logging, omite indicadores de progresso\&. -Mais q\'s produzirá mais quiet até um máximo de 2\&. Você também pode usar -\fB-q=#\fP para definir o nível de quiet, sobrescrevendo o arquivo de -configuração\&. Observe que o nível de quiet 2 implica -y, nunca se -deve usar -qq sem um modificador sem ação como -d, --print-uris ou -s -porque o APT pode decidir fazer algo não esperado\&. -Item de configuração: \fBquiet\fP -.IP -.IP "\fB-s, --simulate, --just-print, --dry-run, --recon, --no-act\fP" -Nenhuma ação; executa uma simulação de eventos que iriam ocorrer mas -não altera realmente o sistema\&. -Item de configuração: \fBAPT::Get::Simulate\fP\&. -.IP -Simula a impressão de uma séria de linha, onde cada uma representa uma - de linhas representando uma operação dpkg, Configure (Conf), Remove -(Remv), Unpack (Inst)\&. Os colchetes indicam pacotes corrompidos e -um conjunto vazio de colchetes significa que não há seqüência (raro)\&. -.IP -.IP "\fB-y, --yes, --assume-yes\fP" -Afirmativa automática para os prompts; assume "yes" como resposta para -todos os prompts e é executado não interativamente\&. Se ocorrer uma situação -indesejável, como alteração de um pacote retido ou remoção de um -pacote essencial, então \fBapt-get\fP irá cancelar\&. -Item de configuração: \fBAPT::Get::Assume-Yes\fP\&. -.IP -.IP "\fB-u, --show-upgraded\fP" -Exibe pacotes com upgrade; imprime uma lista de todos os pacotes devem -ser atualizados (upgrade)\&. -Item de configuração: \fBAPT::Get::Show-Upgraded\fP\&. -.IP -.IP "\fB-b, --compile, --build\fP" -Compila pacotes-fonte após baixá-los\&. -Item de configuração: \fBAPT::Get::Compile\fP\&. -.IP -.IP "\fB--ignore-hold\fP" -Ignora pacotes retidos; Isto faz com o \fBapt-get\fP ignore um pacote retido -colocado em um pacote\&. Isto pode ser útil em conjunto com -\fBdist-upgrade\fP para sobre sobregravar uma grande quantidade de -pacotes retidos indesejados\&. -Item de configuração: \fBAPT::Ignore-Hold\fP\&. -.IP -.IP "\fB--no-upgrade\fP" -Não atualiza pacotes; Quando usado em conjunto com \fBinstall\fP -\fBno-upgrade\fP irá evitar que os pacotes relacionados sejam -atualizados se estes já estiverem instalados\&. -Item de configuração: \fBAPT::Get::no-upgrade\fP\&. -.IP -.IP "\fB--force-yes\fP" -Força sim; esta é uma opção perigosa que que fará com que o APT -continue sem exibir se estiver fazendo algo potencialmente -danoso\&. Não deve ser usado exceto em situações especiais\&. O uso de -\fBforce-yes\fP pode destruir potencialmente seu sistema! -Item configuração: \fBAPT::Get::force-yes\fP\&. -.IP -.IP "\fB--print-uris\fP" -Em vez de obter os arquivos para serem instalados seus URIs são -exibidos\&. Cada URI terá o caminho, o nome de arquivo de destino, o -tamanho e o hash md5 esperado\&. Observe que o nome de arquivo a ser -escrito nem sempre será igual ao nome de arquivo no site remoto! Isto -também funciona com o comando \fBsource\fP\&. -Item de configuração: \fBAPT::Get::Print-URIs\fP\&. -.IP -.IP "\fB--purge\fP" -Use purge em vez de remove para remover qualquer coisa\&. -Esta opção não tem efeito nos sistemas baseados em RPM. -Item de configuração: \fBAPT::Get::Purge\fP\&. -.IP -.IP "\fB--reinstall\fP" -Reinstala pacotes que já foram instalados e na versão mais nova\&. -.IP -.IP "\fB--list-cleanup\fP" -Esta opção é habilitada por padrão, use \fB--no-list-cleanup\fP para -desabilitá-la\&. Quando habilitada o apt-get irá gerenciar -automaticamente os conteúdos de /var/state/apt/lists para -certificar-se de que os arquivos obsoletos serão apagados\&. A única -razão para desativá-la é se você altera sua lista-fonte com freqüência\&. -Item de configuração: \fBAPT::Get::List-Cleanup\fP -.IP -.IP "\fB--trivial-only\fP" -Executa apenas as operações consideradas \'triviais\'\&. É lógico que -isto pode ser relacionado a --assume-yes, onde --assume-yes irá -responder sim para qualquer prompt, --trivial-only irá responder -não\&. -Item de configuração: \fBAPT::Get::Trivial-Only\fP -.IP -.IP "\fB--no-remove\fP" -Se nenhum pacote tiver que ser removido o apt-get cancela -imediatamente sem aviso\&. -Item de configuração: \fBAPT::Get::No-Remove\fP -.IP -.IP "\fB--diff-only\fP, \fB--tar-only\fP" -Faz download apenas do arquivo diff ou tar de um arquivo-fonte\&. -Item de configuração: \fBAPT::Get::Diff-Only\fP -.IP -.IP "\fB-c, --config-file\fP" -Arquivo de configuração; Especifica um arquivo de configuração para -ser usado\&. \fBapt-get\fP irá ler o arquivo de configuração padrão e -depois este arquivo de configuração\&. Veja -\fBapt\&.conf(5)\fP para informações sobre sintaxe\&. -.IP -.IP "\fB-o, --option\fP" -Configura uma opção de configuração; Isto irá ajustar uma opção de -configuração arbitrária\&. -A sintaxe é - -.nf - --o Foo::Bar=bar -.fi - - -.PP -.SH "FILES" -.IP o -/etc/apt/sources\&.list -locais de onde se obtém pacotes -.IP -.IP o -/var/cache/apt/archives/ -área de armazenagem para arquivos de pacotes recuperados -.IP -.IP o -/var/cache/apt/archives/partial/ -área de armazenagem para arquivos de pacotes em trânsito -.IP -.IP o -/var/state/apt/lists/ -área de armazenagem para informação de estado para cada recurso de -pacote especificado na lista de fontes -.IP -.IP o -/var/state/apt/lists/partial/ -área de armazenagem para informação de estado em trânsito -.PP -.SH "SEE ALSO" -apt-cache(8), -dpkg(8), -dselect(8), -sources\&.list(5), -apt\&.conf(5), -O guia do usuário APT em /usr/doc/apt/ -.PP -.SH "DIAGNOSTICS" -apt-get retorna zero em operação normal, decimal 100 em erro\&. -.PP -.SH "BUGS" -Veja http://bugs\&.debian\&.org/apt\&. Caso queira reportar um bug em -\fBapt-get\fP, por favor leia \fB/usr/doc/debian/bug-reporting\&.txt\fP -ou use o comando \fBbug(1)\fP\&. Se você estiver usando um sistema -baseado em RPM, por favor use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt-get foi escrito pelo time APT -e portado para os sistemas baseados em RPM pela Conectiva S.A. -\&. diff --git a/apt/doc/pt_BR/apt.8 b/apt/doc/pt_BR/apt.8 deleted file mode 100644 index be1240d..0000000 --- a/apt/doc/pt_BR/apt.8 +++ /dev/null @@ -1,56 +0,0 @@ -.\" This manpage is copyright (C) 1998 Branden Robinson . -.\" -.\" Updated for Conectiva by Alfredo K. Kojima . -.\" -.\" This is free software; you may redistribute it and/or modify -.\" it under the terms of the GNU General Public License as -.\" published by the Free Software Foundation; either version 2, -.\" or (at your option) any later version. -.\" -.\" This is distributed in the hope that it will be useful, but -.\" WITHOUT ANY WARRANTY; without even the implied warranty of -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.\" GNU General Public License for more details. -.\" -.\" You should have received a copy of the GNU General Public -.\" License along with APT; if not, write to the Free Software -.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -.\" 02111-1307 USA -.TH apt 8 "25 Oct 2000" "Debian GNU/Linux" -.SH NOME -apt \- Advanced Package Tool -.SH SINOPSE -.B apt -.SH DESCRIÇÃO -APT é um sistema de gerenciamento para pacotes de software, ainda em fase -de desenvolvimento; as partes sofisticadas do projeto ainda não estão -disponíveis. Por enquanto, -favor consultar -.BR apt-get (8). -.SH OPÇÕES -Nenhum. -.SH ARQUIVOS -Nenhum. -.SH CONSULTE TAMBÉM -.BR apt-tache (8), -.BR apt-get (8), -.BR sources.list (5) -.SH DIAGNÓSTICOS -apt retorna a zero em operação normal, decimal 100 em erro. -.SH BUGS -Esta página de manual não nem iniciada. -.PP -Consulte . Se você deseja informar -sobre um bug no -.BR apt , -favor consultar -.I /usr/doc/debian/bug-reporting.txt -or the -.BR bug (1) -comando. Se você estiver usando o apt em um sistema baseado em RPM, -favor usar http://distro\&.conectiva\&.com\&.br/bugzilla/\&. - -.SH AUTOR -apt foi escrito pela equipe APT -e atualizado para sistemas baseados em RPM pela -Conectiva S.A. diff --git a/apt/doc/pt_BR/apt.conf.5 b/apt/doc/pt_BR/apt.conf.5 deleted file mode 100644 index 71ace5f..0000000 --- a/apt/doc/pt_BR/apt.conf.5 +++ /dev/null @@ -1,280 +0,0 @@ -.TH "apt\&.conf" "5" "01 Nov 2000" "apt" "" -.SH "NOME" -apt\&.conf \- arquivo de configuração do APT -.PP -.SH "DESCRIÇÃO" -\fBapt\&.conf\fP é o principal arquivo de configuração da suíte de -ferramentas APT, todas as ferramentas fazem uso do arquivo de -configuração e de um verificador comum de linha de comando para -fornecer um ambiente uniforme\&. Quando uma ferramenta APT é iniciada, -ela irá ler \fB/etc/apt/apt\&.conf\fP, e então ler a configuração -especificada pela variável de ambiente \fB$APT_CONFIG\fP e, -finalmente, irá aplicar as opções de linha de comando (as quais têm -prioridade sobre as diretivas de configuração), possivelmente -carregando mais arquivos de configuração\&. -.PP -O arquivo de configuração é estruturado em uma árvore com opções -organizadas em grupos funcionais\&. Especificação de opção é fornecida -com uma notação de dois pontos duplos, por exemplo -\fIAPT::Get::Assume-Yes\fP é uma opção na qual o grupo de ferramentas -APT, para a ferramenta Get\&. Opções são herdadas de seus grupos pai\&. -.PP -Sintaticamente, a linguagem de configuração é modelada conforme as -ferramentas ISC, como bind e dhcp usam\&. Cada linha é na forma -.RS -APT::Get::Assume-Yes "true"; -.RE -O ponto-e-vírgula final é necessário e as aspas são opcionais\&. Um -novo \fIescopo\fP pode ser aberto com chaves, como:: - -.nf - -APT { - Get { - Assume-Yes "true"; - Fix-Broken "true"; - }; -}; - -.fi - - -com retornos de carro colocados para torná-lo mais legível\&. Listas -podem ser criadas abrindo-se um escopo e incluindo uma palavra simples -encapsulada em aspas seguida por um ponto-e-vírgula\&. -Geralmente o arquivo exemplo de configuração em -\fI/usr/doc/apt/examples/apt\&.conf\fP e \fI/usr/doc/apt/examples/configure-index\fP -(ou \fI/usr/share/doc/apt*/examples/configure-index\fP no Conectiva) é -um bom guia sobre como o arquivo deve ficar. -.PP -Todas as ferramentas APT usam uma opção -o que permite que uma -diretiva arbitrária de configuração seja especificada na linha de -comando\&. A sintaxe é um nome completo de opção (APT::Get::Assume-Yes -por exemplo) seguido por um sinal de igual e o novo valor da -opção\&. Listas podem também ser anexadas através da adição de :: no -final do nome da lista.\&. -.PP -.SH "O Grupo APT" -Este grupo de opções controla o comportamento geral do APT e também -mantém as opções para todas as ferramentas\&. -.PP -.IP "\fBArchitecture\fP" -Arquitetura do Sistema; define a arquitetura a ser usada quando da -busca de arquivos e verificação das listas de pacotes\&. O padrão -interno é a arquitetura para a qual o apt foi compilado\&. -.IP -.IP "\fBIgnore-Hold\fP" -Ignora pacotes retidos; Esta opção global faz com que o resolvedor de -problemas ignore pacotes retidos quando da tomada de decisões\&. -.IP -.IP "\fBClean-Installed\fP" -O padrão é ligado (on)\&. Quando ligada, a característica de -auto-limpeza irá remover qualquer pacote o qual não possa ser mais -baixado do cache\&. Quando desligado, pacotes instalados localmente -também são excluídos da limpeza - mas observe que APT não fornece -meios diretos de reinstalá-los.\&. -.IP -.IP "\fBImmediate-Configure\fP" -Desabilita Configuração Imediata; Esta perigosa opção desabilita -alguns códigos de ordens do APT para fazê-lo executar algumas poucas -chamadas dpkg\&. Fazer isso pode ser necessário em alguns sistemas -monousuário extremamente lentos mas é muito perigoso e pode fazer com -que os scripts de instalação de pacotes não funcionem, ou pior que isso\&. -Use por sua conta e risco\&. Esta opção não tem nenhum efeito em -sistemas baseados em RPM\&. -.IP -.IP "\fBForce-LoopBreak\fP" -Nunca habilite esta opção a menos que você -realmente- saiba o que -está fazendo\&. Ela permite que o APT remova temporariamente um pacote -essencial para quebrar loops Conflitos/Conflitos ou -Conflitos/Pré-dependências entre dois pacotes essenciais\&. TAIS LOOPS -NÃO DEVERIAM EXISTIR E SÃO ERROS GRAVES\&. Esta opção irá funcionar se -os pacotes essenciais não forem tar, gzip, libc, dpkg, bash ou -qualquer coisa que estes pacotes dependam\&. -.IP -.IP "\fBCache-Limit\fP" -APT usa arquivo de cache de tamanho fixo mapeando a memória que -armazena as informações \'disponíveis\'\&. Isto define o tamanho -desse cache\&. -.IP -.IP "\fBGet\fP" -A subseção Get controla a ferramenta \fBapt-get(8)\fP, por favor -consulte sua documentação para mais informações sobre as opções aqui\&. -.IP -.IP "\fBCache\fP" -A subseção Cache controla a ferramenta \fBapt-cache(8)\fP, por favor -consulte sua documentação para mais informações sobre estas opções\&. -.IP -.IP "\fBCDROM\fP" -A subseção CDROM controla a ferramenta \fBapt-cdrom(8)\fP, por favor -consulte sua documentação para mais informações sobre estas opções\&. -.IP -.PP -.SH "O Grupo Acquire" -O grupo de opções \fBAcquire\fP controla o download de pacotes e de -tratadores URI\&. -.PP -.IP "\fBQueue-Mode\fP" -Modo de fila; \fBQueue-Mode\fP pode ser um dos \fBhost\fP ou -\fBaccess\fP o que determina como APT paraleliza conexões -externas\&. \fBhost\fP significa que uma conexão por máquina alvo pode -ser aberta, \fBaccess\fP significa que uma conexão por tipo URI pode -ser aberta\&. -.IP -.IP "\fBRetries\fP" -Número de tentativas a executar\&. Se for diferente de zero, apt irá -tentar buscar por arquivos que falharam pelo número fornecido de vezes\&. -.IP -.IP "\fBSource-Symlinks\fP" -Usar links simbólicos para arquivos fonte\&. Se configurado para -"true" então os arquivos fonte serão simbolicamente linkados quando -possível, em vez de serem copiados\&. "True" é o padrão -.IP -.IP "\fBhttp\fP" -HTTP URIs; http::Proxy é o proxy http padrão a ser usado\&. Ele está -na forma padrão de -\fIhttp://[[usuário][:pass]@]máquina[:porta]/\fP\&. Proxies para -máquinas também podem ser especificados através da forma -http::Proxy:: com a palavra-chave especial \fIDIRECT\fP -significando o não uso de proxies\&. A variável de ambiente -\fI$http_proxy\fP sobrepõe todas as configurações\&. -.IP -Três configurações são fornecidas para controle de cache com caches de -proxy que estejam de acordo com o padrão HTTP/1\&.1\&. \fBNo-Cache\fP -diz ao proxy para não usar sua resposta sob cache em algumas -circunstâncias, \fBMax-Age\fP é enviada apenas para arquivos de índice -e diz ao cache para atualizar seu objeto caso seja mais antigo que o -número fornecido de segundos\&. -Debian atualiza seus arquivos de índice diariamente, de forma que o -padrão é 1 dia\&. \fBNo-Store\fP especifica que o cache não deve nunca -armazenar este pedidom ele é apenas definido para arquivos -comuns\&. Isto pode ser útil para evitar a poluição de um cache de -proxy com arquivos \&.deb muito longos\&. Nota: Squid 2\&.0\&.2 não -suporta nenhuma destas opções\&. -.IP -A opção \fBtimeout\fP configura o temporizador de tempo limite usado -pelo método, isto se aplica a todas as coisas, incluindo o tempo -limite de conexão e o tempo limite de dados\&. -.IP -Uma configuração é fornecida para controlar a profundidade do pipeline -em casos onde o servidor remoto não está de acordo com RFC ou tem -erros (como o Squid 2\&.0\&.2) -Acquire::http::Pipeline-Depth pode ser um valor de 0 a 5, indicando o -número de pedidos que APT deve enviar\&. -.IP -.IP "\fBftp\fP" -URis FTP; ftp::Proxy é o servidor proxy padrão a ser usado\&. Ele está -na forma padrão de \fIftp://[[usuário][:pass]@]máquina[:porta]/\fP e é -sobreposto pela variável de ambiente ftp_proxy\&. Para usar um proxy -ftp você deverá configurar o script ftp::ProxyLogin no arquivo de -configuração\&. Esta entrada especifica os comandos a serem enviados -para dizer ao servidor proxy o que deve ser conectado aonde\&. Por -favor consulte \fI/usr/doc/apt/examples/configure-index\fP para um -exemplo de como fazer isso\&. As variáveis de substituição disponíveis -são $(PROXY_USER), $(PROXY_PASS), $(SITE_USER), $(SITE_PASS), $(SITE), -e $(SITE_PORT)\&. -Cada uma é obtida de seu respectivo componente URI\&. -.IP -A opção \fBtimeout\fP define o temporizador de tempo limite a ser -utilizado pelo método, isto se aplica a todas as coisas, incluindo -tempo limite de conexão e tempo limite de dados\&. -.IP -Muitas configurações são fornecidas para controlar o modo -passivo\&. Geralmente é seguro deixar o modo passivo ligado (on), ele -funciona em quase todos os ambientes\&. Entretanto, algumas situações -necessitam do modo passivo desligado, e o modo ftp de porta usado em -seu lugar\&. Isto pode ser executado globalmente, para conexões que -passam por um proxy ou por uma máquina específica (Consulte o arquivo -exemplo de configuração para exemplos) -.IP -É possível executar proxy FTP sobre HTTP configurando a variável de -ambiente \fIftp_proxy\fP para uma url http - consulte a discussão do -método http acima para informações na sintaxe\&. Você não pode -definir isto no arquivo de configuração e não é recomendável usar FTP -sobre HTTP devido a sua baixa eficiência\&. -.IP -.IP "\fBcdrom\fP" -URIs CDROM; a única configuração para URIs CDROM é o ponto de -montagem, cdrom::Mount, o qual precisa ser o ponto de montagem do -drive de CDROM conforme especificado em /etc/fstab\&. -É possível fornecer comandos alternativos de montagem e desmontagem -caso o seu ponto de montagem não possa ser listado no fstab (como uma -montagem SMB)\&. A sintaxe é colocar "/cdrom/"::Mount "foo"; dentro do -bloco cdrom\&. É importante manter a barra no final\&. Comandos de -desmontagem podem ser especificados através de UMount\&. -.IP -.PP -.SH "Diretórios" -A seção \fBDir::State\fP tem diretórios pertinentes a informações do -estado local\&. \fBlists\fP é o diretório onde devem ser colocadas -listas de pacotes e \fBstatus\fP é o nome do arquivo de status -dpkg\&. \fBDir::State\fP contém o diretório padrão que entrará como -prefixo em todos os sub-itens, caso eles não se iniciem com \fI/\fP ou -\fI\&./\fP\&. \fBxstatus\fP e \fBuserstatus\fP são para uso futuro\&. -.PP -\fBDir::Cache\fP contém posições pertinentes a informações sobre o cache local, como os caches de dois pacotes \fBsrcpkgcache\fP e \fBpkgcache\fP bem como a posição onde devem ser colocados arquivos baixados, \fBDir::Cache::archives\fP\&. Como \fBDir::State\fP o diretório padrão é contido em \fBDir::Cache\fP -.PP -\fBDir::Etc\fP contém a localização dos arquivos de configuração, \fBsourcelist\fP fornece a localização da lista de fontes e \fBmain\fP é o arquivo padrão de configuração (configuração sem efeito) -.PP -Programas binários são apontados por \fBDir::Bin\fP\&. \fBmethods\fP especifica a localização dos tratadores de métodos e \fBgzip\fP, \fBdpkg\fP, \fBrpm\fP, \fBapt-get\fP, \fBdpkg-source\fP, \fBdpkg-buildpackage\fP e \fBapt-cache\fP especificam a localização dos respectivos programas\&. -.PP -.SH "APT em DSelect" -Quando APT é usado como um método \fBdselect(8)\fP, muitas diretivas de configuração controlam o comportamento padrão\&. Elas estão na seção \fBDSelect\fP\&. -.PP -.IP "\fBClean\fP" -Modo de cache limpo; este valor pode ser um entre always, auto, prompt e never\&. -always irá remover todos os arquivos após eles serem baixados; auto apenas removerá coisas que não podem mais ser baixadas (substituídas por uma nova versão, por exemplo) -.IP -.IP "\fBOptions\fP" -O conteúdo desta variável é passado ao \fBapt-get(8)\fP como opções de linha de comando durante a execução na fase de instalação\&. -.IP -.IP "\fBUpdateOptions\fP" -O conteúdo desta variável é passado ao \fBapt-get(8)\fP como opções de linha de comando durante a execução na fase de atualização\&. -.IP -.IP "\fBPromptAfterUpdate\fP" -Se for "true", a operação de Atualização ([U]pdate) no dselect sempre irá pedir para continuar\&. -O padrão é pedir apenas quando houver erros\&. -.PP -.SH "How APT calls DPkg" -Muitas diretivas de configuração controlam como o APT chama dpkg\&. Elas estão na seção \fBDPkg\fP\&. -.PP -.IP "\fBOptions\fP" -Esta é uma lista de opções a serem passadas ao dpkg\&. As opções precisam ser especificadas através na notação de lista e cada item da lista deve ser passado como um argumento simples ao dpkg\&. -.IP -.IP "\fBPre-Invoke\fP, \fBPost-Invoke\fP" -Esta é uma lista de comandos shell a serem executados antes/depois de chamar dpkg\&. Como \fBOptions\fP isto deve ser especificado na notação lista\&. Os comandos são chamados em ordem usando /bin/sh; em caso de falhas a execução do APT é cancelada\&. -.IP -.IP "\fBPre-Install-Pkgs\fP" -Esta é uma lista de comandos shell a serem executados antes de se chamar dpkg\&. Como \fBOptions\fP isto deve ser especificado na notação lista\&. Os comandos são chamados em ordem usando /bin/sh; em caso de falhas a execução do APT é cancelada\&. -Apt irá passar aos comandos na entrada padrão os nomes de todos os arquivos \&.deb que ele for instalar, um por linha\&. -.IP -.IP "\fBRun-Directory\fP" -APT alterna para este diretório antes de chamar dpkg, o padrão é /\&. -.IP -.IP "\fBBuild-Options\fP" -Estas opções são passadas ao dpkg-buildpackage durante a compilação de pacotes, o padrão é desabilitar sinalização e produzir todos os binários\&. -.IP -.PP -.SH "Debug - Opções de depuração" -A maioria das opções na seção \fBdebug\fP não são interessantes ao usuário normal, entretanto, \fBDebug::pkgProblemResolver\fP mostra uma saída interessante sobre as decisões feitas por dist-upgrade\&. \fBDebug::NoLocking\fP desabilita a trava de arquivos de forma que o apt possa executar algumas operações sem ser root e \fBDebug::pkgDPkgPM\fP (ou \fBDebug::pkgRPMPM\fP) irá imprimir a linha de comando para cada chamada de dpkg\&. \fBDebug::IdentCdrom\fP irá desabilitar a inclusão de dados statfs nas IDs de CDROMs\&. -.PP -.SH "EXEMPLOS" -\fB/usr/doc/apt/examples/configure-index\&.gz\fP ou -\fB/usr/share/doc/apt*/configure-index\fP -contém um arquivo exemplo de configurações mostrando os valores padrão de todas as opções possíveis\&. -.PP -.SH "ARQUIVOS" -/etc/apt/apt\&.conf -.PP -.SH "VEJA TAMBÉM" -apt-cache (8), -apt-get (8) -.PP -.SH "ERROS" -Consulte http://bugs\&.debian\&.org/apt\&. Se você desejar reportar um erro no \fBapt-get\fP, por favor consulte \fB/usr/doc/debian/bug-reporting\&.txt\fP ou o comando \fBbug(1)\fP\&. Se você estiver usando apt em um sistema baseado em RPM, consulte http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTOR" -apt-get foi escrito pelo time APT e portado para sistemas baseados em RPM pela Conectiva S.A. -\&. - - diff --git a/apt/doc/pt_BR/sources.list.5 b/apt/doc/pt_BR/sources.list.5 deleted file mode 100644 index 03a61f6..0000000 --- a/apt/doc/pt_BR/sources.list.5 +++ /dev/null @@ -1,220 +0,0 @@ -.TH "sources\&.list" "5" "25 Oct 2000" "apt" "" -.SH "NOME" -sources\&.list \- package resource list for APT -.PP -.SH "DESCRIÇÃO" -A lista de recursos de pacotes é usada para localizar arquivos do -sistema de distribuição de pacotes em uso no sistema\&. -.PP -A lista de fontes é planejada para suportar qualquer quantidade de -fontes ativos e uma variedade de meios de fonte\&. O arquivo relaciona -um fonte por linha, com o fonte mais preferido relacionado -primeiro\&. O formato de cada linha é: \fItype uri args\fP o primeiro -item, \fItype\fP, determina o formato para \fIargs\fP\&. \fIuri\fP é -um Identificador de Recurso Universal (URI), que é um super conjunto -de Localizadores de Recurso Universal ou URL mais conhecidos e mais -específicos\&. -.PP -.SH "Os tipos deb e deb-src" -O tipo \fBdeb\fP descreve o ibes, um arquivo tipo Debian de dois níveis, -\fIdistribuição/componente\fP\&. Tipicamente, \fIdistribuição\fP é um -dentre \fIstable\fP, \fIunstable\fP ou \fIfrozen\fP, enquanto o -componente é um dos \fImain\fP, \fIcontrib\fP, \fInon-free\fP ou -\fInon-us\fP\&. O tipo \fBdeb-src\fP descreve um código-fonte da -distribuição debian da mesma forma do tipo \fBdeb\fP\&. Uma linha -\fBdeb-src\fP é necessária para obter índices de fonte\&. -O formato para uma entrada \fBsources\&.list\fP usando os tipos -\fIdeb\fP e \fIdeb-src\fP são: - -.nf - -deb uri distribution [componente1] [componente2] [\&.\&.\&.] -.fi - - -O URI para o tipo \fIdeb\fP deve especificar a base da distribuição Debian, -de onde \fBAPT\fP encontrará as informações que ele -precisa\&. \fIdistribution\fP pode especificar um caminho exato, neste -caso o \fIcomponent\fPs deve ser omitido e \fBdistribution\fP deve -terminar com uma barra (/)\&. Isto é útil para quando há interesse em -apenas uma sub-seção particular do arquivo denotado pelo URI\&. Se -\fBdistribution\fP não especificar um caminho exato, pelo menos um -\fBcomponent\fP deve estar presente\&. -.PP -\fBdistribution\fP também pode conter uma variável, \fB$(ARCH)\fP, -que expande para a arquitetura Debian (i386, m68k, powerpc, \&.\&.\&.) -usada no sistema\&. Isto permite o uso dos arquivos -\fBsources\&.list\fP independentes da arquitetura\&. Em geral, isto só -é interessante ao especificar um caminho exato, caso contrário -\fBAPT\fP irá gerar automaticamente um URI com a arquitetura atual\&. -.PP -Uma vez que apenas uma distribuição pode ser especificada por linha, -por ser necessário ter linhas múltiplas para o mesmo URI, se um -subconjunto de todas as distribuições ou componentes disponíveis nesta -localização for desejado\&. \fBAPT\fP classificará a lista de URI após -ter criado um conjunto completo internamente, e irá reduzir as múltiplas referências ao mesmo servidor de Internet, por exemplo, em uma conexão simples, dessa forma não estabelece de forma ineficiente uma conexão FTP, a fecha, faz mais alguma coisa e depois restabelece uma conexão para o mesmo servidor\&. Este serviço é útil para acesso a sites FTP ocupados com limites no número de usuários anônimos simultâneos\&. \fBAPT\fP também paralisa conexões para diferentes servidores para lidar com sites de baixa largura de banda com mais eficácia\&. -.PP -É importante listar os fontes em ordem de preferência, sendo o fonte mais preferido listado primeiro\&. Isto resultará tipicamente na classificação por velocidade do mais rápido para o mais lento (CD-ROM seguido por servidores em uma rede local, seguido por servidores de Internet distantes, por exemplo)\&. -.PP -Alguns exemplos: - -.nf - -deb http://http\&.us\&.debian\&.org/debian stable main contrib non-free -.fi - - - -.nf - -deb http://http\&.us\&.debian\&.org/debian dists/stable-updates -.fi - -.PP -.SH "The rpm and rpm-src types" -O tipo \fBrpm\fP descreve um repositório de distribuição baseado em RPM, dividido em dois níveis, \fIdistribuição\fP e \fIcomponente\fP. -\fIDistribuição\fP é composto tipicamente pela versão da distribuição e o nome do fornecedor, tal como \fI6.0/conectiva\fP. -\fIComponente\fP é o nome do componente, tal como o tipo \fBrpm-src\fP descreve o código-fonte da distribuição\ da mesma forma que o tipo \fBrpm\fP\&. Uma linha \fBrpm-src\fP é requerida para obter os índices-fonte\&. -O formato para uma entrada \fBsources\&.list\fP usando os tipos \fIrpm\fP -e \fIrpm-src\fP são: - -.nf - -rpm [\&[fornecedor\&]] uri distribution [componente1] [componente2] [\&.\&.\&.] -.fi - - -O URI para o tipo \fIrpm\fP deve especificar a base da distribuição a partir do qual \fBAPT\fP encontrará a informação necessária\&. -Pelo menos um \fBcomponent\fP deve estar presente\&. -.PP -Já que apenas uma distribuição pode ser especificada por linha, pode ser necessário ter linhas múltiplas para o mesmo URI, se for desejado um subconjunto de todas as distribuições ou componentes disponíveis no mesmo local\&. -\fBAPT\fP classificará a lista de URI após ela ter gerado um conjunto completo internamente e irá reduzir referências múltiplas para o mesmo servidor de Internet, por exemplo, em uma conexão simples, dessa forma não estabelece de forma ineficiente uma conexão FTP, a fecha, faz mais alguma coisa e depois restabelece uma conexão para o mesmo servidor\&. Este serviço é útil para acesso a sites FTP ocupados com limites no número de usuários anônimos simultâneos\&. \fBAPT\fP também paralisa conexões para diferentes servidores para lidar com sites de baixa largura de banda com mais eficácia\&. -.PP -É importante listar os fontes em ordem de preferência, sendo o fonte mais preferido listado primeiro\&. Isto resultará tipicamente na classificação por velocidade do mais rápido para o mais lento (CD-ROM seguido por servidores em uma rede local, seguido por servidores de Internet distantes, por exemplo)\&. -.PP -Alguns exemplos: - -.nf - -rpm ftp://ftp\&.conectiva\&.com/pub/conectiva/.0 6.0/conectiva main extra non-us non-free -.fi - - -.PP -.SH "Autenticação-mirror de repositório" -Ao usar um mirror para uma distribuição, existe o risco do mantenedor do site infiltrar pacotes maliciosos dentro dele, comprometendo a segurança de todos os sistemas que usam este site como um fonte de pacote. Para reduzir a possibilidade de situações como esta, o apt pode autenticar os repositórios de pacote. Observe que a autenticação NÃO garante que os conteúdos de um repositório sejam completamente seguros. Pode apenas verificar se: -.IP o -todos os pacotes no repositório têm um checksum válido, em relação ao conteúdo da lista de pacotes; - -.IP o -todos os pacotes que são conhecidos para a lista de pacotes podem ser baixados pelo apt-get; - -.IP o -todas as listas de pacotes têm um checksum correto, em relação ao conteúdo de um arquivo de índice; - -.IP o -o arquivo de índice é assinado digitalmente pelo fornecedor identificado em -\fBsources.list\fP e a assinatura digital gpg correspondente gpg em -\fBvendors.list\fP\&. - -.PP -Pode verificar se um site que espelha um repositório tem os mesmos conteúdos do site original. -.PP -Consulte \fBvendors.list\fP (5) para mais informações sobre como configurar a autenticação. - - -.PP -.SH "Especificação de URI" -Os tipos de URI atualmente reconhecidos são cd-rom, arquivo, http e ftp\&. -.PP -.IP "\fBarquivo\fP" -O esquema de arquivos permite um diretório arbitrário no sistema de arquivos a ser considerado como um arquivo\&. Isto é útil para montagem de NFS e mirros ou arquivos locais\&. -.IP -.IP "\fBc-drom\fP" -O esquema de cd-rom permite que o \fBAPT\fP use um drive de CD-ROM local com troca de meio\&. Use o programa \fBapt-cdrom(8)\fP para criar todo o cd-rom na lista de fontes\&. -.IP -.IP "\fBhttp\fP" -O esquema http especifica um servidor HTTP para o arquivo\&. Se uma variável de ambiente \fB$http_proxy\fP for configurada com o formato -\fBhttp://server:port/\fP, o servidor proxy especificado em -\fB$http_proxy\fP será usado\&. Os usuários dos proxies HTTP/1\&.1 autenticados podem usar uma string com o formato \fBhttp://user:pass@server:port/\fP -Observe que este não é um método seguro de autenticação\&. -.IP -.IP "\fBftp\fP" -O esquema ftp especifica um servidor FTP para o arquivo\&. O comportamento FTP do APT é altamente configurável. Para maiores informações consulte a página de manual \fBapt\&.conf(5)\fP\&. Por favor observe que um proxy ftp pode ser especificado usando a variável de ambiente ftp_proxy\&. É possível especificar um proxy http (servidores proxy http muitas vezes compreendem urls ftp) usando este método e SOMENTE este método\&. Os proxies ftp usando http especificado no arquivo de configuração serão ignorados\&. -.IP -.IP "\fBcópia\fP" -O esquema de cópia é idêntico ao esquema de arquivo exceto que os pacotes são copiados para o diretório de cache em vez de serem usados diretamente em sua localização\&. Isto é útil para pessoas que usam um disco de zip para copiar arquivos com o APT\&. -.IP -.PP -.SH "EXEMPLOS" -Usa o arquivo armazenado localmente (ou NFS montado) em /home/jason/debian -para stable/main, stable/contrib e stable/non-free\&. -.RS -"deb file:/home/jason/debian stable main contrib non-free" -.RE -.PP -Como o acima, exceto que este usa a distribuição instável (desenvolvimento)\&. -.RS -"deb file:/home/jason/debian unstable main contrib non-free" -.RE -.PP -Linha do fonte para o acima -.RS -"deb-src file:/home/jason/debian unstable main contrib non-free" -.RE -.PP -Usa HTTP para acessar o arquivo no arquivo \&.debian\&.org e usa apenas a área hamm/main\&. -.RS -"deb http://archive\&.debian\&.org/debian-archive hamm main" -.RE -.PP -Usa FTP para acessar o arquivo em ftp\&.debian\&.org, no diretório debian -e usa apenas a área stable/contrib\&. -.RS -"deb ftp://ftp\&.debian\&.org/debian stable contrib" -.RE -.PP -Uses FTP to access the archive at ftp\&.conectiva\&.com, under the -/pub/conectiva directory, for version 6.0 of the conectiva distribution -and the main component\&. -.RS -"rpm ftp://ftp\&.conectiva\&.cpm/pub/conectiva 6.0/conectiva main" -.RE -.PP -Usa FTP para acessar o arquivo em ftp\&.debian\&.org, no diretório debian -e usa apenas a área unstable/contrib\&. Se esta linha aparecer bem -como aquela no exemplo anterior em \fBsources\&.list\fP, -uma sessão FTP simples será usada para ambas as linhas de recurso\&. -.RS -"deb ftp://ftp\&.debian\&.org/debian unstable contrib" -.RE -.PP -Usa HTTP para acessar o arquivo em ###nonus\&.debian\&.org, no diretório que não é o da debian-US\&. -.RS -"deb http://nonus\&.debian\&.org/debian-non-US stable/non-US main contrib non-free" -.RE -.PP -O mesmo que o acima, mas com a autenticação contra o fornecedor chamado \fIbla\fP, que deveria estar relacionado em \fBvendors\&.list\fP\&. -.RS -"deb [bla] http://nonus\&.debian\&.org/debian-non-US stable/non-US main contrib non-free" -.RE -.PP -Usa HTTP para acessar o arquivo em ###nonus\&.debian\&.org, no diretório que não é o da debian-US, e usa apenas os arquivos encontrados em unstable/binary-i386 em computadores i386, unstable/binary-m68k em m68k e assim por diante para outras arquiteturas suportadas\&. [Observe que este exemplo apenas ilustra como usar a variável ##substitation non-us não está mais estruturada como este] -.RS -"deb http://ftp\&.de\&.debian\&.org/debian-non-US unstable/binary-$(ARCH)/" -.RE -.PP -.SH "CONSULTE TAMBÉM" -apt-cache (8), -apt\&.conf (5) -vendors\&.list (5) -.PP -.SH "BUGS" -Consulte http://bugs\&.debian\&.org/apt\&. Caso queira reportar um bug em \fBapt-get\fP, por favor veja \fB/usr/doc/debian/bug-reporting\&.txt\fP -ou o comando \fBbug(1)\fP\&. Se estiver usando o apt em um sistema baseado em RPM, por favor use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTOR" -O apt foi escrito pelo time do APT -e atualizado para os sistemas baseados em RPM por -Conectiva S.A. - diff --git a/apt/doc/pt_BR/vendors.list.5 b/apt/doc/pt_BR/vendors.list.5 deleted file mode 100644 index d08a3ef..0000000 --- a/apt/doc/pt_BR/vendors.list.5 +++ /dev/null @@ -1,78 +0,0 @@ -.TH "vendors\&.list" "5" "25 Out 2000" "apt" "" -.SH "NOME" -vendors\&.list \- package vendor list for APT -.PP -.SH "DESCRIÇÃO" -A lista do fornecedor do pacote contém uma lista de todos os fornecedores -dos quais você deseja autenticar pacotes que foram baixados. Para cada -fornecedor listado deve conter a impressão de chave GPG correspondente, -para que o apt possa realizar verificação de assinatura do arquivo hash -de índice (hashfile) -e verificação subseqüente da verificação de cada pacote baixado. -Para ter autenticação habilitada, você deverá adicionar a string de -identificação do fornecedor (veja abaixo) entre colchetes para a -linha \fBsources.list\fP para todos os sites que espelham o repositório -fornecido para aquele fornecedor. -O formato deste arquivo é semelhante ao usado em \fBapt.conf\fP\&. -Constitui-se de um número arbitrário de blocos de fornecedores, -onde cada bloco inicia com uma string informando -.RI key_type -e o -.RI vendor_id -\&. - -.RI key_type -é o tipo de chave do fornecedor a ser definido. Atualmente existe -somente um tipo disponível, o qual é \fBsimple-key\fP\&. - -.RI vendor_id -é a string de identificação do fornecedor. É uma string arbitrária que -deve ser fornecida para identificar um fornecedor que está listdo neste -arquivo. - -.PP -.SH "simple-key" -Esta chave é composta de dois campos, -\fIFingerprint\fP -e -\fIName\fP -\&. Ambos são obrigatórios\&. - - -\fIFingerprint\fP -é a impressão de chave-publica gpg(1) para o fornecedor, incluída em -TODAS EM MAIÚSCULAS\&. -A impressão pode ser obtida com a opção --fingerprint da gpg\&. - -\fIName\fP -é uma string contendo uma descrição do dono da chave ou fornecedor\&. -Você poderá colocar o nome e email do fornecedor. A string deve estar -destacada com "\&. - -.PP -Exemplo: -.nf -single_key "joe" -{ - Fingerprint "0987AB4378FSD872343298787ACC"; - Nome "Joe Shmoe "; -} -.fi -Para mais informações sobre autenticação de repositório, consultar fontes\&.list(5)\&. - -.PP -.SH "CONSULTE TAMBÉM" -gpg (1) -sources\&.list (5) -apt-get (8) -.PP -.SH "BUGS" -Consultar http://bugs\&.debian\&.org/apt\&. Se você deseja informar sobre um -bug em \fBapt-get\fP, favor consultar \fB/usr/doc/debian/bug-reporting\&.txt\fP -ou o comando\& \fBbug(1)\fP. Se você estiver usando o apt em um sistema baseado em RPM, favor usar http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTOR" -apt foi escrito pela equipe do APT -e atualizado para sistemas baseados em RPM pela -Conectiva S.A. - diff --git a/apt/doc/sources.list.5 b/apt/doc/sources.list.5 deleted file mode 100644 index 17d7719..0000000 --- a/apt/doc/sources.list.5 +++ /dev/null @@ -1,278 +0,0 @@ -.TH "sources\&.list" "5" "25 Oct 2000" "apt" "" -.SH "NAME" -sources\&.list \- package resource list for APT -.PP -.SH "DESCRIPTION" -The package resource list is used to locate archives of the package -distribution system in use on the system\&. -.PP -The source list 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 format of each line is: -\fItype uri args\fP The first item, \fItype\fP, determines the format for -\fIargs\fP\&. \fIuri\fP is a Universal Resource Identifier (URI), which is a -superset of the more specific and well-known Universal Resource Locator, or -URL\&. -.PP -.SH "The deb and deb-src types" -The \fBdeb\fP type describes a typical two-level Debian archive, -\fIdistribution/component\fP\&. Typically, \fIdistribution\fP is one of -\fIstable\fP, \fIunstable\fP, or \fIfrozen\fP, while component is one of -\fImain\fP, \fIcontrib\fP, \fInon-free\fP, or \fInon-us\fP\&. The \fBdeb-src\fP type -describes a debian distribution\'s source code in the same form as the \fBdeb\fP -type\&. A \fBdeb-src\fP line is required to fetch source indexes\&. -The format for a \fBsources\&.list\fP entry using the \fIdeb\fP and \fIdeb-src\fP -types are: - -.nf - -deb uri distribution [component1] [componenent2] [\&.\&.\&.] -.fi - - -The URI for the \fIdeb\fP type must specify the base of the Debian distribution, -from which \fBAPT\fP will find the information it needs\&. \fIdistribution\fP -can specify an exact path, in which case the \fIcomponent\fPs -must be omitted and \fBdistribution\fP must end with a slash (/)\&. This is -useful for when only a particular sub-section of the archive denoted by the -URI is of interest\&. If \fBdistribution\fP does not specify an exact path, at -least one \fBcomponent\fP must be present\&. -.PP -\fBdistribution\fP may also contain a variable, \fB$(ARCH)\fP, -which expands to the Debian architecture (i386, m68k, powerpc, \&.\&.\&.) -used on the system\&. This permits archiecture-independent -\fBsources\&.list\fP files to be used\&. In general this is only of interest -when specifying an exact path, \fBAPT\fP will automatically generate a URI -with the current architecture otherwise\&. -.PP -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\&. -\fBAPT\fP 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\&. \fBAPT\fP also parallizes connections to different hosts -to more effectively deal with sites with low bandwidth\&. -.PP -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)\&. -.PP -Some examples: - -.nf - -deb http://http\&.us\&.debian\&.org/debian stable main contrib non-free -.fi - - - -.nf - -deb http://http\&.us\&.debian\&.org/debian dists/stable-updates -.fi - -.PP -.SH "The rpm and rpm-src types" -The \fBrpm\fP type describes a RPM based distribution repository, -divided in two levels, \fIdistribution\fP and \fIcomponent\fP. -\fIdistribution\fP is typically composed by the version of the -distribution and the vendor name, such as \fI6.0/conectiva\fP. -\fIcomponent\fP is the name of the component, such as -The \fBrpm-src\fP type describes the distribution\'s source code in -the same form as the \fBrpm\fP -type\&. A \fBrpm-src\fP line is required to fetch source indexes\&. -The format for a \fBsources\&.list\fP entry using the \fIrpm\fP -and \fIrpm-src\fP types are: - -.nf - -rpm [\&[vendor\&]] uri distribution [component1] [componenent2] [\&.\&.\&.] -.fi - - -The URI for the \fIrpm\fP type must specify the base of the distribution, -from which \fBAPT\fP will find the information it needs\&. -At least one \fBcomponent\fP must be present\&. -.PP -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\&. -\fBAPT\fP 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\&. \fBAPT\fP also parallizes connections to different hosts -to more effectively deal with sites with low bandwidth\&. -.PP -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)\&. -.PP -Some examples: - -.nf - -rpm ftp://ftp\&.conectiva\&.com/pub/conectiva/.0 6.0/conectiva main extra non-us non-free -.fi - - -.PP -.SH "Repository Mirror Authentication" -When you use a mirror for a distribution, there is the risk -that a site keeper infiltrates malicious packages in it, -compromising the security of all systems that use such site -as a package source. To reduce possibility of situations like -that, apt can authenticate package repositories. Note that -authentication DOES NOT guarantee that the contents of a repository -is completely secure. It can only verify that: -.IP o -all packages in the repository have a valid checksum, in relation -to what is contained in the package list; - -.IP o -only packages that are known to the package list are downloadable -by apt-get; - -.IP o -all package lists have a correct checksum, in relation to what -is contained in a index file; - -.IP o -the index file is digitally signed by the vendor identified in -\fBsources.list\fP and the corresponding gpg fingerprint in -\fBvendors.list\fP\&. - -.PP -That can verify that a site that mirrors a repository -has the same contents as the original site. -.PP -See \fBvendors.list\fP (5) for more information about how to setup -authentication. - - -.PP -.SH "URI specification" -The currently recognized URI types are cdrom, file, http, and ftp\&. -.PP -.IP "\fBfile\fP" -The file scheme allows an arbitrary directory in the file system to be -considered an archive\&. This is useful for NFS mounts and local mirrors or -archives\&. -.IP -.IP "\fBcdrom\fP" -The cdrom scheme allows \fBAPT\fP to use a local CDROM drive with media -swapping\&. Use the \fBapt-cdrom(8)\fP program to create cdrom entires in the -source list\&. -.IP -.IP "\fBhttp\fP" -The http scheme specifies an HTTP server for the archive\&. If an environment -variable \fB$http_proxy\fP is set with the format -\fBhttp://server:port/\fP, the proxy server specified in -\fB$http_proxy\fP will be used\&. Users of authenticated HTTP/1\&.1 proxies may -use a string of the format \fBhttp://user:pass@server:port/\fP -Note that this is an insecure method of authentication\&. -.IP -.IP "\fBftp\fP" -The ftp scheme specifies an FTP server for the archive\&. APT\'s FTP behavior -is highly configurable; for more information see the -\fBapt\&.conf(5)\fP manual page\&. Please note that a ftp proxy can be specified -by using the ftp_proxy environment variable\&. It is possible to specify a http -proxy (http proxy servers often understand ftp urls) using this method and -ONLY this method\&. ftp proxies using http specified in the configuration -file will be ignored\&. -.IP -.IP "\fBcopy\fP" -The copy scheme is identical to the file scheme except that packages are -copied into the cache directory instead of used directly at their location\&. -This is usefull for people using a zip disk to copy files around with APT\&. -.IP -.PP -.SH "EXAMPLES" -Uses the archive stored locally (or NFS mounted) at /home/jason/debian -for stable/main, stable/contrib, and stable/non-free\&. -.RS -"deb file:/home/jason/debian stable main contrib non-free" -.RE -.PP -As above, except this uses the unstable (development) distribution\&. -.RS -"deb file:/home/jason/debian unstable main contrib non-free" -.RE -.PP -Source line for the above -.RS -"deb-src file:/home/jason/debian unstable main contrib non-free" -.RE -.PP -Uses HTTP to access the archive at archive\&.debian\&.org, and uses only the -hamm/main area\&. -.RS -"deb http://archive\&.debian\&.org/debian-archive hamm main" -.RE -.PP -Uses FTP to access the archive at ftp\&.debian\&.org, under the debian -directory, and uses only the stable/contrib area\&. -.RS -"deb ftp://ftp\&.debian\&.org/debian stable contrib" -.RE -.PP -Uses FTP to access the archive at ftp\&.conectiva\&.com, under the -/pub/conectiva directory, for version 6.0 of the conectiva distribution -and the main component\&. -.RS -"rpm ftp://ftp\&.conectiva\&.cpm/pub/conectiva 6.0/conectiva main" -.RE -.PP -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 \fBsources\&.list\fP, -a single FTP session will be used for both resource lines\&. -.RS -"deb ftp://ftp\&.debian\&.org/debian unstable contrib" -.RE -.PP -Uses HTTP to access the archive at nonus\&.debian\&.org, under the debian-non-US -directory\&. -.RS -"deb http://nonus\&.debian\&.org/debian-non-US stable/non-US main contrib non-free" -.RE -.PP -Same as above, but with authentication against the vendor named \fIbla\fP, -which should be listed in \fBvendors\&.list\fP\&. -.RS -"deb [bla] http://nonus\&.debian\&.org/debian-non-US stable/non-US main contrib non-free" -.RE -.PP -Uses HTTP to access the archive at nonus\&.debian\&.org, under the -debian-non-US directory, and uses only files found under -unstable/binary-i386 on i386 machines, unstable/binary-m68k on m68k, and so -forth for other supported architectures\&. [Note this example only illustrates -how to use the substitution variable non-us is no longer structured like this] -.RS -"deb http://ftp\&.de\&.debian\&.org/debian-non-US unstable/binary-$(ARCH)/" -.RE -.PP -.SH "SEE ALSO" -apt-cache (8), -apt\&.conf (5) -vendors\&.list (5) -.PP -.SH "BUGS" -See http://bugs\&.debian\&.org/apt\&. If you wish to report a -bug in \fBapt-get\fP, please see \fB/usr/doc/debian/bug-reporting\&.txt\fP -or the \fBbug(1)\fP command\&. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt was written by the APT team -and updated for RPM based systems by -Alfredo K. Kojima, Conectiva S.A. - diff --git a/apt/doc/sources.list.5.sgml b/apt/doc/sources.list.5.sgml new file mode 100644 index 0000000..e2919e6 --- /dev/null +++ b/apt/doc/sources.list.5.sgml @@ -0,0 +1,199 @@ + + +%aptent; + +]> + + + &apt-docinfo; + + + sources.list + 5 + + + + + sources.list + Package resource list for APT + + + Description</> + <para> + The package resource list is used to locate archives of the package + distribution system in use on the system. At this time, this manual page + documents only the packaging system used by the Debian GNU/Linux system. + This control file is located in <filename>/etc/apt/sources.list</> + <para> + The source list 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 format of each line is: + <literal/type uri args/. The first item, <literal/type/, determines the + format for <literal/args/. <literal/uri/ is a Universal Resource Identifier + (URI), which is a superset of the more specific and well-known Universal + Resource Locator, or URL. The rest of the line can be marked as a comment + by using a #. + </RefSect1> + + <RefSect1><Title>The deb and deb-src types</> + <para> + The <literal/deb/ type describes a typical two-level Debian archive, + <filename>distribution/component</>. Typically, <literal/distribution/ is + generally one of <literal/stable/, <literal/unstable/, or + <literal/testing/, while component is one of <literal/main/, + <literal/contrib/, <literal/non-free/, or <literal/non-us/. The + <literal/deb-src/ type describes a debian distribution's source code in + the same form as the <literal/deb/ type. A <literal/deb-src/ line is + required to fetch source indexes. + <para> + The format for a <filename/sources.list/ entry using the <literal/deb/ + and <literal/deb-src/ types are: + <literallayout>deb uri distribution [component1] [componenent2] [...]</literallayout> + <para> + The URI for the <literal/deb/ type must specify the base of the Debian + distribution, from which APT will find the information it needs. + <literal/distribution/ can specify an exact path, in which case the + components must be omitted and <literal/distribution/ must end with a + slash (/). This is useful for when only a particular sub-section of the + archive denoted by the URI is of interest. If <literal/distribution/ does + not specify an exact path, at least one <literal/component/ must be present. + <para> + <literal/distribution/ may also contain a variable, <literal/$(ARCH)/, + which expands to the Debian architecture (i386, m68k, powerpc, ...) + used on the system. This permits architecture-independent + <filename/sources.list/ files to be used. In general this is only of + interest when specifying an exact path, <literal/APT/ will automatically + generate a URI with the current architecture otherwise. + <para> + 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 parallizes connections to + different hosts to more effectively deal with sites with low bandwidth. + <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> + Some examples: + <literallayout> +deb http://http.us.debian.org/debian stable main contrib non-free +deb http://http.us.debian.org/debian dists/stable-updates/ + </literallayout> + </RefSect1> + + <RefSect1><title>URI specification + + The currently recognized URI types are cdrom, file, http, and ftp. + + file + + The file scheme allows an arbitrary directory in the file system to be + considered an archive. This is useful for NFS mounts and local mirrors or + archives. + + + cdrom + + The cdrom scheme allows APT to use a local CDROM drive with media + swapping. Use the &apt-cdrom; program to create cdrom entries in the + source list. + + + http + + The http scheme specifies an HTTP server for the archive. If an environment + variable + + ftp + + The ftp scheme specifies an FTP server for the archive. APT's FTP behavior + is highly configurable; for more information see the + &apt-conf; manual page. Please note that a ftp proxy can be specified + by using the + + copy + + The copy scheme is identical to the file scheme except that packages are + copied into the cache directory instead of used directly at their location. + This is useful for people using a zip disk to copy files around with APT. + + + rshssh + + The rsh/ssh method invokes rsh/ssh to connect to a remote host + as a given user and access the files. No password authentication is + possible, prior arrangements with RSA keys or rhosts must have been made. + Access to files on the remote uses standard + + + + Examples + + Uses the archive stored locally (or NFS mounted) at /home/jason/debian + for stable/main, stable/contrib, and stable/non-free. + deb file:/home/jason/debian stable main contrib non-free + + As above, except this uses the unstable (development) distribution. + deb file:/home/jason/debian unstable main contrib non-free + + Source line for the above + deb-src file:/home/jason/debian unstable main contrib non-free + + Uses HTTP to access the archive at archive.debian.org, and uses only the + hamm/main area. + deb http://archive.debian.org/debian-archive hamm main + + Uses FTP to access the archive at ftp.debian.org, under the debian + directory, and uses only the stable/contrib area. + deb ftp://ftp.debian.org/debian stable contrib + + 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 deb ftp://ftp.debian.org/debian unstable contrib + + Uses HTTP to access the archive at nonus.debian.org, under the debian-non-US + directory. + deb http://nonus.debian.org/debian-non-US stable/non-US main contrib non-free + + Uses HTTP to access the archive at nonus.debian.org, under the + debian-non-US directory, and uses only files found under + unstable/binary-i386 on i386 machines, + unstable/binary-m68k on m68k, and so + forth for other supported architectures. [Note this example only + illustrates how to use the substitution variable; non-us is no longer + structured like this] + deb http://ftp.de.debian.org/debian-non-US unstable/binary-$(ARCH)/ + + + See Also</> + <para> + &apt-cache; &apt-conf; + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> diff --git a/apt/doc/sources.list.5.yo b/apt/doc/sources.list.5.yo deleted file mode 100644 index 2a501f7..0000000 --- a/apt/doc/sources.list.5.yo +++ /dev/null @@ -1,148 +0,0 @@ -mailto(apt@packages.debian.org) -manpage(sources.list)(5)(5 Dec 1998)(apt)() -manpagename(sources.list)(package resource list for APT) - -manpagedescription() -The package resource list is used to locate archives of the package -distribution system in use on the system. At this time, this manual page -documents only the packaging system used by the Debian GNU/Linux system. - -The source list 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 format of each line is: -em(type uri args) The first item, em(type), determines the format for -em(args). em(uri) is a Universal Resource Identifier (URI), which is a -superset of the more specific and well-known Universal Resource Locator, or -URL. - -manpagesection(The deb and deb-src types) -The bf(deb) type describes a typical two-level Debian archive, -em(distribution/component). Typically, em(distribution) is one of -em(stable), em(unstable), or em(frozen), while component is one of -em(main), em(contrib), em(non-free), or em(non-us). The bf(deb-src) type -describes a debian distribution's source code in the same form as the bf(deb) -type. A bf(deb-src) line is required to fetch source indexes. -The format for a bf(sources.list) entry using the em(deb) and em(deb-src) -types are: -verb(deb uri distribution [component1] [componenent2] [...]) -The URI for the em(deb) type must specify the base of the Debian distribution, -from which bf(APT) will find the information it needs. em(distribution) -can specify an exact path, in which case the em(component)s -must be omitted and bf(distribution) must end with a slash (/). This is -useful for when only a particular sub-section of the archive denoted by the -URI is of interest. If bf(distribution) does not specify an exact path, at -least one bf(component) must be present. - -bf(distribution) may also contain a variable, bf($(ARCH)), -which expands to the Debian architecture (i386, m68k, powerpc, ...) -used on the system. This permits archiecture-independent -bf(sources.list) files to be used. In general this is only of interest -when specifying an exact path, bf(APT) will automatically generate a URI -with the current architecture otherwise. - -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. -bf(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. bf(APT) also parallizes connections to different hosts -to more effectively deal with sites with low bandwidth. - -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). - -Some examples: -verb(deb http://http.us.debian.org/debian stable main contrib non-free) -verb(deb http://http.us.debian.org/debian dists/stable-updates) - -manpagesection(URI specification) -The currently recognized URI types are cdrom, file, http, and ftp. - -startdit() -dit(bf(file)) -The file scheme allows an arbitrary directory in the file system to be -considered an archive. This is useful for NFS mounts and local mirrors or -archives. - -dit(bf(cdrom)) -The cdrom scheme allows bf(APT) to use a local CDROM drive with media -swapping. Use the bf(apt-cdrom(8)) program to create cdrom entires in the -source list. - -dit(bf(http)) -The http scheme specifies an HTTP server for the archive. If an environment -variable bf($http_proxy) is set with the format -bf(http://server:port/), the proxy server specified in -bf($http_proxy) will be used. Users of authenticated HTTP/1.1 proxies may -use a string of the format bf(http://user:pass@server:port/) -Note that this is an insecure method of authentication. - -dit(bf(ftp)) -The ftp scheme specifies an FTP server for the archive. APT's FTP behavior -is highly configurable; for more information see the -bf(apt.conf(5)) manual page. Please note that a ftp proxy can be specified -by using the ftp_proxy environment variable. It is possible to specify a http -proxy (http proxy servers often understand ftp urls) using this method and -ONLY this method. ftp proxies using http specified in the configuration -file will be ignored. - -dit(bf(copy)) -The copy scheme is identical to the file scheme except that packages are -copied into the cache directory instead of used directly at their location. -This is usefull for people using a zip disk to copy files around with APT. - -enddit() - -manpagesection(EXAMPLES) -Uses the archive stored locally (or NFS mounted) at /home/jason/debian -for stable/main, stable/contrib, and stable/non-free. -quote("deb file:/home/jason/debian stable main contrib non-free") - -As above, except this uses the unstable (development) distribution. -quote("deb file:/home/jason/debian unstable main contrib non-free") - -Source line for the above -quote("deb-src file:/home/jason/debian unstable main contrib non-free") - -Uses HTTP to access the archive at archive.debian.org, and uses only the -hamm/main area. -quote("deb http://archive.debian.org/debian-archive hamm main") - -Uses FTP to access the archive at ftp.debian.org, under the debian -directory, and uses only the stable/contrib area. -quote("deb ftp://ftp.debian.org/debian stable contrib") - -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 bf(sources.list), -a single FTP session will be used for both resource lines. -quote("deb ftp://ftp.debian.org/debian unstable contrib") - -Uses HTTP to access the archive at nonus.debian.org, under the debian-non-US -directory. -quote("deb http://nonus.debian.org/debian-non-US stable/non-US main contrib non-free") - -Uses HTTP to access the archive at nonus.debian.org, under the -debian-non-US directory, and uses only files found under -unstable/binary-i386 on i386 machines, unstable/binary-m68k on m68k, and so -forth for other supported architectures. [Note this example only illistrates -how to use the substitation variable non-us is no longer structured like this] -quote("deb http://ftp.de.debian.org/debian-non-US unstable/binary-$(ARCH)/") - -manpageseealso() -apt-cache (8), -apt.conf (5) - -manpagebugs() -See http://bugs.debian.org/apt. If you wish to report a -bug in bf(apt-get), please see bf(/usr/doc/debian/bug-reporting.txt) -or the bf(bug(1)) command. - -manpageauthor() -apt-get was written by the APT team <apt@packages.debian.org>. diff --git a/apt/doc/style.txt b/apt/doc/style.txt new file mode 100644 index 0000000..8d0778b --- /dev/null +++ b/apt/doc/style.txt @@ -0,0 +1,75 @@ +Acronyms +~~~~~~~~ +* dpkg is a 'word' the first d may be upper case - Dpkg +* APT is a proper Acronym, all upper case please. + +Pkg - A Package +Ver - A version + +Indenting, Comments, Etc +~~~~~~~~~~~~~~~~~~~~~~~~ +Would make Linus cry :P However it is what I prefer. 3 space indent, +8 space tab all braces on seperate lines, function return on the same line +as the function, cases aligned with their code. The 'indent' options for +this style are: + indent -bl -bli0 -di1 -i3 -nsc -ts8 -npcs -npsl + +Each file gets a block at the top that should describe what the file does, +basically a summary of purpose along with any special notes and +attributions. The }}} and {{{ are folding marks if you have a folding +editor such as jed, the function seperators are intended to give +a visual seperate between functions for easier browsing of the larger files, +or indexed folding if you have such an editor. + +Each file should have 1 or 0 primary include files, that include +file must always be the first include file included by the .cc. G++ +#pragma interface/implementation is used, as well as anti-include-twice +#ifdefs. + +Include files, since there are so many, get their own subdirectory off +the include search path, this is used consistently throughout all the code. +#include "" should never be used for a global exported header file, only +local ones. + +C++ Features +~~~~~~~~~~~~ +Due to the legacy compiler heritage, exceptions, RTTI and name spaces are +not used. Templates are used *sparingly* since G++ has traditionally had +very weak support for them, this includes STL templates. + +Namespaces will probably be put in the code sometime after G++ 3, which will +be a huge re-org again to make sanity, the majority of all nested things +will go away. + +The C++ standard library's non parameterized types (string is included in +this) are used freely when appropriate. + +The new C++ #include <iostream> (note the lack of a .h) is used for the +standard library, but not for my code. + +Arguments and Ownership +~~~~~~~~~~~~~~~~~~~~~~~ +[much of the code follows this now] +These guidlines should be followed except in two cases.. the first +is where it makes no sense, such as in a casting operator and the second is to +retain API compatibility (this should be rare, since a change in the input +almost always designates a change in ownership rules). + + * Pass by value or pass by reference should borrow the object from the + caller + * Pass by non-const reference may be used to indicate a OUT type variable + * Pass by pointer (except in the case where the pointer is really an array) + should be used when the object will be retained or ownership will be + transfered. Ownership transference should be rare and noted by a comment. + * Standard C things (FILE * etc) should be left as is. + + * Return by references should indicate a borrowed object + * Return by pointer (except arrays) should indicate ownership is + transfered. Return by pointer should not be used unless ownership is + transfered. + * Return by pointer to variable indicates ownership transfer unless the + pointer is an 'input' parameter (designated generally by an =0, + indicating a default of 'none') + +Non-ownership transfering arrays/lists should probably return an iterator +typedef or references.. diff --git a/apt/doc/vendors.list.5 b/apt/doc/vendors.list.5 deleted file mode 100644 index b796dfd..0000000 --- a/apt/doc/vendors.list.5 +++ /dev/null @@ -1,77 +0,0 @@ -.TH "vendors\&.list" "5" "25 Oct 2000" "apt" "" -.SH "NAME" -vendors\&.list \- package vendor list for APT -.PP -.SH "DESCRIPTION" -The package vendor list contains a list of all vendors from whom -you wish to authenticate downloaded packages. For each vendor listed, -it must contain the corresponding GPG key fingerprint, so that apt -can perform signature verification of the index hash file (hashfile) -and subsequent checking of the checksums of each downloaded package\&. -To have authentication enabled, you must add the vendor identification -string (see below) enclosed in braces to the \fBsources\&.list\fP line -for all sites that mirror the repository provided for that vendor\&. - -The format of this file is similar to the one used in \fBapt.conf\fP\&. -It consists of an arbitrary number of blocks of vendors, where each -block starts with a string telling the -.RI key_type -and the -.RI vendor_id -\&. - -.RI key_type -is the type of the key of the vendor being defined. Currently, -there is only one type available, which is \fBsimple-key\fP\&. - -.RI vendor_id -is the vendor identification string. It is an arbitrary string you -must supply to uniquely identifify a vendor that's listed in this file. - -.PP -.SH "simple-key" -This key type is composed of two fields, -\fIFingerprint\fP -and -\fIName\fP -\&. Both are mandatory\&. - - -\fIFingerprint\fP -is the gpg(1) public key fingerprint for the vendor, enclosed in " and -in ALL CAPS\&. -The fingerprint can be obtained with the --fingerprint option of gpg\&. - -\fIName\fP -is a string containing a description of the owner of the key or vendor\&. -You may put the vendor name and it's email. The string must be quoted -with "\&. - -.PP -Example: -.nf -simple-key "joe" -{ - Fingerprint "0987AB4378FSD872343298787ACC"; - Name "Joe Shmoe <joe@shmoe.com>"; -} -.fi -For more information about repository authentication see sources\&.list(5)\&. - -.PP -.SH "SEE ALSO" -gpg (1) -sources\&.list (5) -apt-get (8) -.PP -.SH "BUGS" -See http://bugs\&.debian\&.org/apt\&. If you wish to report a -bug in \fBapt-get\fP, please see \fB/usr/doc/debian/bug-reporting\&.txt\fP -or the \fBbug(1)\fP command\&. If you are using apt on a RPM based -system, please use http://distro\&.conectiva\&.com\&.br/bugzilla/\&. -.PP -.SH "AUTHOR" -apt was written by the APT team <apt@packages\&.debian\&.org> -and updated for RPM based systems by -Conectiva S.A. <kojima@conectiva\&.com\&.br> - diff --git a/apt/doc/vendors.list.5.sgml b/apt/doc/vendors.list.5.sgml new file mode 100644 index 0000000..5b3d6a8 --- /dev/null +++ b/apt/doc/vendors.list.5.sgml @@ -0,0 +1,104 @@ +<!-- -*- mode: sgml; mode: fold -*- --> +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ + +<!ENTITY % aptent SYSTEM "apt.ent"> +%aptent; + +]> + +<refentry> + &apt-docinfo; + + <refmeta> + <refentrytitle>vendors.list</> + <manvolnum>5</> + </refmeta> + + <!-- Man page title --> + <refnamediv> + <refname>vendors.list</> + <refpurpose>Security key configuration for APT</> + </refnamediv> + + <RefSect1><Title>Description</> + <para> + The package vendor list contains a list of all vendors + from whom you wish to authenticate downloaded packages. + For each vendor listed, it must contain the corresponding + PGP key fingerprint, so that APT can perform signature + verification of the release file and subsequent checking + of the checksums of each downloaded package. + To have authentication enabled, you must add the + vendor identification string (see below) enclosed in + square braces to the sources.list line for all sites that mirror + the repository provided by that vendor. + <para> + The format of this file is similar to the one used by + apt.conf. It consists of an arbitrary number of blocks of + vendors, where each block starts with a string telling the + <replaceable/key_type/ and the <replaceable/vendor_id/. + <para> + Some vendors may have multiple blocks that define different + security policies for their distributions. Debian for instance + uses a different signing methodology for stable and unstable releases. + <para> + <replaceable/key_type/ is the type of the check required. + Currently, there is only one type available which is + <literal/simple-key/. + <para> + <replaceable/vendor_id/ is the vendor identification string. It is an + arbitrary string you must supply to uniquely identifify a + vendor that's listed in this file. + + Example: +<informalexample><programlisting> +simple-key "joe" +{ + Fingerprint "0987AB4378FSD872343298787ACC"; + Name "Joe Shmoe <joe@shmoe.com>"; +} +</programlisting></informalexample> + + </RefSect1> + + <RefSect1><Title>The simple-key type</> + <para> + This type of verification is used when the vendor has a single + secured key that must be used to sign the Release file. The + following items should be present + + <VariableList> + <VarListEntry><Term>Fingerprint</Term> + <ListItem><Para> + The PGP fingerprint for the key. The fingerprint should be + expressed in the standard notion with or without spaces. + The <option/--fingerprint/ option for + <CiteRefEntry><RefEntryTitle><command/gpg/</RefEntryTitle><ManVolNum/1/</CiteRefEntry> + will show the fingerprint for the selected keys(s). + </VarListEntry> + + <VarListEntry><Term>Name</Term> + <ListItem><Para> + A string containing a description of the owner of + the key or vendor. You may put the vendor name and it's + email. The string must be quoted with ". + </VarListEntry> + + </VariableList> + </RefSect1> + + <RefSect1><Title>Files</> + <para> + <filename>/etc/apt/vendors.list</> + </RefSect1> + + <RefSect1><Title>See Also</> + <para> + &sources-list; + </RefSect1> + + &manbugs; + &manauthor; + +</refentry> + diff --git a/apt/docs.tar.gz b/apt/docs.tar.gz deleted file mode 100644 index 6ad9a58d332c9d7e66761ad25e2d7ac62b14ceb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 64203 zcmV)1K+V4&iwFq!l;b%717vSwb1rmYasceTdw(0pl_os@Zhwjz=ADRi0Prq3lB`)p zl5Or<mR6U^&g=EkO`u732%r&kgB1N{zWZC}R&}bn8&^uP65%%!i$HaCT~D1lm**K2 z{c`tTKJI64?`ZGA@v;5y-u}Vy9{hLj!TlrrFMs}J@4@~9`~L@r$M*aE{lkOfe=)}& zxn1~~l~p=5=3lOgzvQE|z1*VTKhw_u=D(lzFSFidH5z`DrLg4u-@m_q|9Jn%mfJr( zJlgv*|DWO$&wu}NAOCTe@7UYl+q-{s)H473c6A&?^M7>z!QsD{y}N8g+vlHr{vZFV zT>;hYBr`DUW->b)=6$o(-QE53;j`V{=kK1I@87-r!5sDWc6VR=xb-AS9z#j|Z<Y?= zzoV>5?c>#?oBef`Uw^aJFUD0iuDVd~mf^p?*{ZS+)h;~z$n-DMX_-~u<Ym$Q`s?FA zcK5O7DzApwlc%rWnP;#h&A0i`{!cL-rIqQLlW{dI2D5&Z7vsmfRMtMUEA2Qd2DjL* zsr}!d%wyZAX?Fh2Rz4nNA8=LwE<G!&Y1*&0o;>A$J>E^9n4epU_lwExG{3mC<)6tv z&5uQu_p=4hVV6sIjQ&+G-oHG+!dp+qc3k*(Zv5lR{U=G|Fg!l9zdyT7Csj5z`@xXF zNbEoHRUAA??90aKDEnrs-0#^Dw*O;Z&!&^2#OA{T2T*kKBzbq4m&PuI*~qrm46?F6 z&CjyZRQC1xXfn*;`xIVdigS~WO*-vg=2h0OX4A};pJcZ8_Q|t+oK9~Olqlxhw!3G{ zJNwUzA|1k$6}-p)YV2RtO<~T9;h<x`nU>Y?)>MTlCs{Ty!y+Bz<BKF656om*^s}<G ze^Nb}nWX)z^nxo&r_=P-K*2Jz!#|*ErkNd_%#5;80j(;=<!m&OUNqOylL4u9+_p8% zN48mZHQEu##@G3@7~_E5<kh7arQ=)MOe-d)w?V~aCpj;sCLdc_Gq%ksi&0jLGur@L z(`9O_HLrC$ps;ORJ~hvtci+5v*@+4yT)+&|Dl02<olQ&Cr$KI)c78Uaeva`wstCs? z4Lfb?O7N-dIvW-f><(9G=kDq7CcQ0fud)(;$azJK&v7-v3t+9M`PdFij;~5=C#zXW zmET<EeLFC?Z_Y9(Tjqmo3S(&JX_8KD2ZHAC=)WFjX_=XsT~t#TG`l!(<-j7%%KQRe zhvU|L_Vn5JFU+?mKfLIg92+<;DucbS^KaidE3-jj+X<6X-j-E1GKFm>3}8xQ15;ri zy|EScr<rZh00zZ&{-mM4B%M{4#WaUCah;hghq^i@w^f`&r|1p+X<A+yJ4<D8Ufra2 zi=3zV5VlIu@7w>B@WPQjdlK8iNj5#V8_BNNwBOGrReI*vfZi+ApB%bk{};y+#-=hb z;&$Y|olT)JcByByMC}%^>ou-sWcP`!C$mkoJ%yE9%qqLpaBJCz5;eO#9Z!d4fz{ZB zHN!1m(pIaADa_n3y@fjLU=?<Ejq+b<2x08a*)2W^((JqUC-7JTEr3zAtte-??{7MU z6A0x~X@~#&;>NDYDGXI<+c+G+1NO%<KcmsGa?^^PB<KB?mSxe;VMY1gmbA%uk@C#f zJNT|JS6Mb;L4oZa6gT5|=!&tOB(BT$_1wN5*O&b@8xC+x68<N?7AD?qjSnCmOIR)- z+3c8Q9jrOn^dtw)XLbyRc3y4mTovv@9{>I@hm{BeXnQ*wu?&HMv%+{(;v4;Xx=x4r z0B34!#c2X#4nNw?+Y>nJU)k~((3OhCO~05<?UQ3GXYE_x*ul6av8^}!`Lr0}MyG+X zlP+`8F;?i9vtc^6HQ(g6QFg+H*?GmH0Xy2k_RPjOZXl?}7gRV&p_eelBy9NPunj6k zBRF0L4FVYk6u!N+<<4fgT_bMFlFa@u?Eu&cA{<kztkBA^O33&kbNgJctaJbpYMkAO za7ttc`V}EN2Pz+D7bFiryqWAA#=q>@19qYg<iqGd<|El2%2uU-#bsU>`4|p%kOO5Y zXY?VT(J$;~xW##f@yzfqw;`bixU^6(l90Cg2sJsad_mjaKie-7l&7OC9hW54ZJ7cN zr^@Xd_<fX4Y>o6T96D+mu2x(11=Kz*W*3(UjOvHk1ccEAj?_hF$Hq>JT|vC9Ce%Hg zSQh3WdqF~^S0H^{vpdOXHmq_xukf|q;4DQ@Q!TB0!9`@h8N*a@nM!0-I<4UADKwO( zJ>eFd4U7JjyuU2$`C^wr0juf*EnYjY&-fg%!rWHuR0}w^&h7u(G3q6M%K9k?iE!iD z-G(O<HN@^G*HY{h74nnBUChda*CrO1f4hmr2_YRA2F>n;0SLJvjOUbuC#+bIoxFk* zt(=usbN<u&cUa9uHqNGWz~Kx-d%8cqde`kKEwHqUdxTvpZeVomf*$5q86CiM2Hn{6 z&&s}s@YK{Q;f6lfg_Sm6y-X+O8(cZty<TtUk^Cys?yJ{V7e9c6`^Id$?{@4{uH^St zp|`u>EBG&zlD~sOaD^~my=4JnOVJl$8Q7n{A6Adx|IM}({)6Er`~)?3e}7Ru`re+` z?_ex{+WYxu{N_iyPj~#oRsanj!G@k@ydCKtz<OB!3MQ_fmK7?fQ<>bnPsa?&va#I~ zc1G+^EW4(eogz}3KrYDSqay6|A}2iI%S%u!&Sw3qtm-%sluf7hl_b)Y{>sx$2XTor zO3kq=r5Mr%wwreXA~YYSQ@f-}JiFB~pN|v!i){sN9egGm+Tvq4XF>GgqDTFxuu=l< zVxsc9x1(T(^U7A3prjcW`W^7#(5@QPPGLvEZsFxQ8|QzWWq1ZcUoS2}wZWlCE{3R0 z=X4&HnU#yYP&1N;sNffH|H`cpLXGMscroe_uoO`q+D!*@fKp0t7yH~86%pPNvJvbp z%%1DEY1?nJOf>KQtOV5=w)FYbeqGvG%xJuKg7e_BzM!_>P3;j!lJ`mS|C|gS(plLn zFGj=8wb}1IF#CV};~#hTj&~0Z&B4LL<74}O<}Vi)=EaAJ`G2sA|B;q<iGDX5gQ9Ka z{bP_pPh7i3R+FxZhxVEOKFH4UblfYZ7h6xlzoEI0ckw|x>aI!l-(n@$Wi!U#+XD0V z{lxY^zeeuv9rNvfdq)orA4K-Q<3szOFZRDr@cC@)f1jzrPZ{)Dx)s^%+zp|*<x86E zNT;o8CM-B%S(jv0!?h|=);ix*G18^x#-6cogu-w3@SDH{IwOGnmmxJ_JR6<aqtf19 z0}B{FYLCas&{o3=&HEF)d)+IY(Tr?6WGtjJc9dRai9A=Fd!;;5jw(27@s@IKbuhRt zSVgTn%*S}Iu%iH~@)&PDpaG(uAXdwM&gP8Cw79nSw~|MpoMip{oHaN*(spk^!7`CS z=lihj8C+v{K=W~zFB?kHz{@V*VWj25{A>!gQohNEg`^j)g9S@cEeQYf@8O|GCOSwv zaP~gv+W+}l>^k<9^m@IN&|HPO3mdN<ncHG!Px3L?Q^mN58qWwG-z}!es2JquxAYZS z?PylA=}4|%=DQ!?o9|Gg8k*N6XMV7q7{f9uN%EAJI83OEeG4skE9SFr;jV_`{fKRD z&gyv}FW}lbpnh-L6>b|nO$s#k?x3m)=2G_@55c#fs~2d)uB>8FcHkcV9Q6oj@$L`# zc=mzKdiKXM^Ec#VcUDe!?Xc~-Iokd1^$*T;$F>}76ud1k1_U$QBs^qdXI9oe9_CM! zUbfGA*?!~_0dqlX@!vTg0E#B|1K3tIJRyqTfqCoJaBKAkT>Sx5f56q#m94$#0Tex; zmav7Twd^63J=A4EfVP)Eg7QaL{y%80+sht9*<&pGT*Sd`d-3~F{5~~>g++Ve2T=Hd zv}1mozlO43V_CYTp4j!)Ui^<x{Ew<Q-d*R+%pOk79(VLSA49{Nrv8wp{t%5)rT7oN zldBLdgYcOne&)!0J42Jj^Bl~GcHqT^g)jQeUw-}xFE@4n|G_8r{~v?mAN&6w?C*Wi z|3Ag&v(f)eH#m!yzYO@}(rSd)c`<7+b^L~8P|)(jRs+nE5d!)EpBo<_hc_SGjo|@o zQ6oE~xFJLt>P5C-)_z41kZ=D#_b>a|-8FBmzMqo+!n>Gsnc0}#y~DyP@~-$JU8c06 zv@$Q#zZ6qG@SA?l$IU;V6~z!vtm-!S+SFP~#(8g;zfOlUJFHEOrB_nl-~Re&P8rr{ zmMR3ZJij3KZ+;=K=qz|EYd8yE+0d?d@Z6yFts-AF4;s!ecl8+*Ykn;j<Bl#WMqMoz z6;tE8sOZb|gY?)gh<SZ}b$)I|+?=jLCE$g4WP*=<RI9nIkCWn8tAIvZG|2YmJ&n8p z!H&V{(%%I8w$>DQl^Tx!R%>ZGty+GokN1C>*U+Ay9{kK-M-3OB5jsqUMR7Hov=5T^ z>m2VN{QRh1jeGRJly_$^WV!cvP(5)n=kc!n%YHRrc?j_vF0ugR;AQrKgo4@o@W-#e zeevM_^Jg3aqXSo}0`8!6T}~^CnW3-|j(6gyE9m4UJ9E)9adr!C;wjv&;nt3Sl8ccG zVJ%6SUI&%fehmhyLt0QupX|3vJ_bF_$}H$*6m8_gBRZx(n@;UnHoP@^y@Ou-UX-z_ zYWy2dmFWz_XQF5e2*@ey{^ekjX@-N-(SZ=zhY5Jv?T{vy>9uoA8aDITk<Kd|EBqDW zAK+3Bfk5Lv#1lx60lv=#nIs$=0}oPIK?Thtw=gue)-{pzemI?6uYE<*(tqt_w*N{? z=%8TytQXO0T)%qzs}E8UzjATDy+iA5VmD*npAD_rtAhe42m%dN5Q#E|=$dJoxG<ys zEjbwFM(EE$=d?uo;mNrUx4`8|2c;Pl7=e;~NHI9Yp7nNP-0&8t&FEz|*5C8wSj7nZ z?yzTIvncf=nh|}D)W$mcR-Y1$(-r*UHicE^z&J<-A!qkA7<N*s0}tGfK0b~wjfrj` zjC_XX#uQek?IGHZVAZn^5;nB`dP=cg%Cu-l{B4#=Z4V!w&}KoC7N}IUfe8<=uv2zU zKIEg>$VDQgW}4m@JN{r;<+vX!f%1!d3|2fHzqFla30M5^AymDiLQ=pZTWg7&f3aK* z)-FY{1b%TfF~JIc=R>OS<kZ1x5O`t75TYi)C=ADgeKW_sOf!jZ#3+iuZp|^8*I9Cw z*%dj;rWZJsIuxkZGk-L<_AQktFMKCdMV@XK617eLAVr(vUg(z{@X7mkQ@_z1Pco7n z)L1>XQ_RsQ48e*^JCCbNBm~R~!`dc-gE(3u@SQeokJ2#){9I-Y0S2<U!$<^Jv!D_r zvV-)+f(|*3&b764jN2mNJ}b`tf|6pIjcf-XOqe$qJcY7b)Dn5tZ%SO>+dg#R+=`@P zx})FQOP-E>4fcmU6E+uL0~>cVscvZ+rs@#!$2K(?A_8bs=(Gl($ux-bv2$G3Vkd9| z@s#Q-lAX<SGPXeg6x!N&Zm%%rmBO@dCD0BVOCcQf!%K7|HPh}pa{ge{3C9}Y8N%ld zZBJOH62BS7RYQMX*k$URL8!E0SL|}F^iEQ*n3bZxoEH#s0e^uabUquSRWXh`YS8&) z_t>4d(|q}?KV!Zzdx0hjecFZtu;OT=6I;aA*gMOt0NmbrWKPV#(l_?}z`y_Shn+}M z#+v`|4Ltmn+1_@AA)&$i!R+ts1n=aCAbjfI%qd=%FaWCOrbIpPUqM9DpD;R*PYVdD zp|gm@x9F&TnDbiLBR!qrvnXO9bY_}4QKe=T8~DslPhR5MgSC8VH{Fn9irG`=1#S{o zV$Mj(s(iaZ*6|KdQd&jaj)%92dmdNf$nM-rR|Bp@UL}5=?+zmKbItfc?g%+O8m%9E zj+bF9EUbEQNwNUv_Bn|FyYh@;rMx6yCAy?T_9DNwXN!MO4pt0KDlz1nUJ{&M+Q|x0 zveQ9H!H*cot%p^gp|k@j=8V+VFaWO2kYn4FUa9+1Y{}u+)j9WFh^VXIb?L0c6}j-b zuP?jyQSt7yKK2e=(v>atNWXF6W6$Usqn}&;ZO`?E-1U!S>9)U_@65T_lkY?i)spo@ zQ}Tn>bmq*9)%1DAslko!$F;}aWY?@X>+UKqTI-W?Yf;k)FBFHGdM@tK38c^rhr1Y> zp6$M#LC8T?^&8)XGW%^dw8NPV-h$rzNb11|=+<Z8Evh^}^X)LbXkOj;5HA}29L}2k zv(b$4o}|UebM_a5D89OwV`w{hKF2JDjeE4%m;rlG9rHh`pi>b)v3j8Po_g|6DeD+b zdbRNqF1)I|2=7Kt@wQs1h|kEp5J=O8N}Xu}USFa*k?0G8L|3>=3wR+o-K#V=nN?ZR zlAZskj=(jCgJsT&8OMc69Cr{hB3E1v6H!e)8PkM9%#1{NC!xp}!Of>bf0(6^Tp~v( z$BK|e$JVHFdngqu(Zg+Dbumj}`DJ8Zg3Ou%^((x!eV<=k>O?VH!m3s3n*@*SabX5C zidn{^e`<SKTMka9`kS(sm+^HcFDY3G&Yx`#|KD+e`m;0NqDu;IKg&?{!*`I~Cz(wy zrfB)G!{FZ(RLvFUBpvK?Tx~~UMR=6=T6*)m;ieWU`_!T!wGLvEXB94%zM)3i!mR&; zq2r=R>;l4!kZ`Hk20}$-EFmpy&l@~0hQ%4IQ~yS;G~sME2~Q#o*Izi|Ogv==#${5! zre+*CGOy<YOrgZIO78WE&d2)wUuQ-2=>7O=T-=Q54@2=U2|pp7AEp@7J}uGkW><CG z9CZ$95e54d7CZGSFC$eEue!ljaC#-FH(qhZ{H#Ek^vWo10C#1>SD@Ld)=GcusYbqm z_;4!_`4_r0MFJ6SM}hp{-*NGR^ly>B`m}7?Urq0E_cMRCs0&!bLQsdK-`DOOtZnt+ zTV*AlPV;h7j3oue9CCJyTacU@nhjxZ&&F=4s-)3gBH{FI0gdgzVa$q)t#Y>(vMq8j zSI`fC>n9r>Ys6?pyMa)%G6=_$>`Jc6_1)*ZqHv+3f$D5HqA*|7-VV^n?Ci;}t~k5s zyk6C1I>3DDem}<yYEEacZNX$k+fqr2)nl(VX&z=W)8(4vV26yo*cvY!A)lcD;|qUL zTMj4B)zn%A1y>n4Ht;yvgTYdF2W`r9mSlgR<AZ5Q>Po^Vo3n7put~lVntRc7PszBH zY(Ay%PdteA>o9r}%pH{fMX{(Qk5G6|(}OfhCvd3hr0gn6UCu_}O5oHPN%??)fGc+C zIMIQ=1+)&*GlL`@f+6m<Zt(;yO^q%7O=h5ClsUUE&uuX+qa}8)lw9BCueKCDrwyZP zUT=dmZ4(%Ou@8yMk3;q4KbrJEFSHu2vn01+h4IC-Cl=!ND{0M58edC6!(HHm4eq7O z-bkN9irsa1Ls;s;XT``$NV~=#t@xnCF0A~<SE%}`>*TTz{*az!!^UgqGK0hUhmTfy z5S_^CSJQZPQuo^Vw_2Fp2A^-MUw!q9mi<76@u?Ns@ZZS1!LNM@!O;>&4#gJV(_~!+ zI)>d|tc`+5xV$ZGokP$NuNWYJ&N#cj*jR%%Ab-iK$s=CG>UfvMS#z2BFK9XWzj2lL zKlR-EZ+|Q*rz|%pG0>rDMxYNmJKu^K`clVTt59_mPzmKeI9w0sQf#P^GM?)SQ0NL1 zrva-`j5UFY<{5iIA$4$EQhqMKE`Zeldo^JkWMg|CQ~-K0|DXk}$Gh>KFFZU%FQl{M z9FGz?=hQ;?G3#}8s`d_C#OfWjmFt7s@djPdmzet6_ow=b)>jJHHg2WOJDx~?YB{2m z?I4ZSGB|Y-D%W=G$guUeC3I<W>9kV2+%r<bM$s4T%S9J$zSt*P{SkDBDPeOkG6vX- zYqxPxm$3=ka8&`HD>ymY%(k)Ba*hv#YHAK9S|qpEHd)pWjy4nVySNFpQ=wcj+KP<2 z^P{Zb7zqr>%h`hYA{ZI0moko`9q0AcMR3qBw8k!PQ(bWSw*P!07lsAp;J!UCVzBLe zMKkK_X%6T*w@cVEX}z|bCN2X`nGC^(v_ufX8_{D+@oL91^<JsYT6sYqZK*T3gTviI zR97}Vp%>PQgFyyKQC9fUF{KSk+vN_vNHphkVs}4gsiUPRktzdwk?7Nix}t!a-i7{d zx{6{VK3-Q+vj^^S^w^?>jA3iC5B=c`W6)@H(dzk{F59=V8J0C9Nd$wts?x<t&LQ?c z0$K+SS(8yKS=p!sB1APrt0TcFjc`wPk)YWZ@Sd8?QK3l_O;Kf)O}rR($4EWe%}aom zC3?mtbh5IEWN5C<NrkvBGJET|JT|=)HxLsc-R;o*8orsbttzlZRYl@g<~(mei!}<N zI>gWy+N0!&hY!)fcXa_@bYRGD(y2<ioTrnKEy@X>C?q8%HI}Rc&f?|w0^IW{d&X@T zXVvF6_w4VI0qb5xCAjo#466k)ZRCgeO-*qXjRrdqbZOs?wjH6o&ju2wrc>;LG6)*; zV}ZyO&f<`d6Lbv|njGyF+}6&3sdg`V>e0Mubvcx5mE>g92Yn@tRAhC_`es}2giCQh z+q_MS)kMnGQ-^4*Df(aH7_t_9QSCZ%ppz6z#G8(m87qV<Gn<4UIC!s6kc4d2BI^~) zGTz@5_z>BsS;qI2lt4`ogZ?OIHcU^RN~<`U4iMm2Qa>xk=T=Ru%8q$EyRhq{qIBjr zf}ADh(U<Is;;LP8AHkl8X$+#8?SX~JFnDHNWEG*NVPU1ipko=lGHkPxQ$~=<c)gRF zOmVZ3k}6tilVTKxoUd&QX%6*Yq+B&<fq}ETRheseFmROH2j9d3nC>GG!8WhmQAh%~ zkS8EP@d#C@jaXT$6CFoNJeC-8=GR);{C?ES-r1s$=KKzp1KW&Ola@jas^2`tt{#Oh zssW<cu@DKohtV+#D-RW@fq>k##Ry0538H0!J3Xbz^WKTHvs&q7P-J8RU~4c#4c&;J zFKnv|h!a%~AO*I^g*#kWChcg4AE8w?YA$sj)ep5hZ*dOy<eH&Y2c-r=D5sGYPj=&b z=eo!0E4~vnMQqApRBz40mxRHyVL%wGw=zvbP-sZ#hf!9|8dj+Ay{>O8Y_kJ`%Iew_ zDR6l62dCv(O2#6%^h-U6H6d=NhNX)D3=JA7>_MGB;UGV5>^it4q)fj;I{<;<{_S8C z0mOh$i4KI$)ZXHDa^tJyZk1Z)1uQKSiBom1?LseangG8;z(A6mQ9H}5qFapM?G1|y zv}hJn?~awEO*x>~Q&<)&7nIrWl+{?ZaK<(Y(6BmRKCNb{UwjCw2yld6-=(z&5yE2( z<7C|1adwk9|19+iyFVa9BVm|I0Ia*MP)KF;R`%w;!*LR8U>NnzI|ufcuCMNuLF*>W zV2L3w={OzUmU)9FVizx68Pk$dHJ%#P9kNjupkwhV<CZ-|3q{c~9Tt&89}+p{AQrAQ zj5zl8xM|kt{&qH7Jw_ZDDP}qhi`9pRpAa>lLDDPTR!ZO1Q3m*-c{yrTYU;+9c`8la z?z5C;QqzQ5%u~(gBK7pr8Wi5*xNA-sY7E|Mc#dv=^9)q2T0!#_xaGX2qrhEC>p>#m z=yx?bz(<#5pyT4&E~w3FO3)m?#=JLy#DY>ETCUjj>M?rGEkH0V(Qdj0$-r-t90)1J z;`g1lRMGL3L<Ruf<{-b_CJkfOWU@LsbWZFFUPRieAb@;|P`IG;C_9ASSCHy8%@Igx z*c=SxgmGImP}Uq4?YqD2)eCOHPUD+sU2gCqP%-ZDl-*n9;31S4F+|7b4u9>jtxGl6 zd?*CYo=U}1Fr2h<k0q=!{fEpe+W^U}wvCyRVEM!^%VIXQ_uCx?bQ17(kDJ{j^d?sq z2ubkpVa>EYPx=L(S~JgCyTHv04_;j~nDt|)IA&+hy{trL?*D3$OEhguUm;?%G1ws` z6smC-G}J#{#Slq7^_H}{0S(nxQt+@g%+Q1otGv=8rGcWr*>X8K(CX&3%faF;K;TEp zvK#LLW%HFB)hIWT4LTCdQ!-KmB)CDgSwZ#)NOwas4jZg7I)tE`r#}3q5*v9bAxu?@ z)tqR9wMmn@7tsYBK78nN0NY%14QcvwymM4~<v0~sLGX%4(PP1D+jHNsZ1Y7NSFuz0 z8ka83WxGtZ8dSd0N+H}U?GTKY3YgF&g_5#95gk4s57CK$6dgl=<W<-uF8Ubr`~@o5 zUf3X=obk%zL}bjf8xyQCQHqolFfQSVxOa%HB=IZJH;;0#I5nCvhe2)T{72ZcKIN7$ z%^AzwH`$I1E?BhNBd#~k4TJAr(CE$?Pyq%LP_Ww0gX?V?Bz!`&-L<{`r3i-zSz|sA zntS=ZQqKK7-429p{%9^NKD33QXzYKfRh-=jlj3b|4<FKPSVQEyJ@z|_Z-B$-`HR=5 z5|z8(`0MLwCIt=}3pk_dVdKx<%xaDr3po3%Ic}){S7d4K%Pw3rKnFZP2XhBVUE~*y z(yP~}uiluw5BqyfKmG9H?b{ds3x00;^}9DOp1ynW1`E^&kRP|d)kn`iY=5qgo&EX6 z|9b!Q2YC26NOXkl2yqotb7ao)sub}(2$mx{Se=2wB^P*01?Pq&v&kf^3WI6vI(8$Y zL*m(9gJ-Y`x-F*nDD#nWvnf_rTbt%j=^;<)VQosCK_iONUNom~-`SBpeLubeB9r>O z($DPcYS<d|`}c*Fb@f@LAD?IPcztfE1SM!4ExWFdco2@-2SLT8FE;?Mu39_)2HXE8 z`|En$haY_vhs$>Im^*pg-pMe^ez|`BSXAC|+1BItV|a%x(Awd2cn<O^znFows;%qq z$NpVya}QPdQuXakrRZhf;{Bs89)m?{Ygt-C-seHS-#*A3Pq%1vzy0Cqcc&1$Xtwt~ z9mL*FbHN|8o1ol&OSxBPWr5)-y6{0u;TL7e90t1dVN2-~VF-bt4W2mKS$6my@bEpT z4IkeeA3pTX-;kx||IMaFpry~o;0Q)-2h8wi2(%$jbKFU<ZS-HiIeBG!#PH1x%N7f~ z0pP*r^@_j01qv|;HmI*v{QVUwaCUs_s}z5K0Z=&Rc-hhWnn&;Jw#7#vDXT0%ySv}w zb$q#1sG@D-<=D`Ne|WUSe<noN)joCn*P~C2|GIZ@bX4PieX#e1|Mio6J}3Ow25{+B zU|<hFC&9KF%xeSic7*l{S9vgkT@(c*A4@6pOs7{hj>w!c=^<7PzoaJsMGC!TF1iXS zPn~UgK&6Fq5uaqnMR$VZ9V=uM>?PZ~*XfkR(5~%K$9((!TdNFF)}#Gak-oxnyI=KO z3_jr0^)ss+!et8$JD3KTPHin`x7tK#HOR!p&NIUu^%2P<eE0*w{*hZ>7$m@OA(53r z2^g?s;V%G06;f^fg<RuyXfOr^3J&Zk?I}@H3|$=b+7IN<aov77a6gkz{ro@t)aU>4 z(cy9Z{D1J}{Qnf6&*}VcBcxbG2{`ziglW+7qfN2k+Za9SngYfXIX~`8fV|X@Is&i; z=dVZn#he3x)bQAa?5_yO;K7F`oKzSKUyQ{Q>bxC<pnym{I@k%LDnsN=%^CjgGT@xV zAmox9K3u^d>km`%UyJXY5Gj19R%-6iS4rr-y+;t79==Xj27VnEyT}z2uuNAXaR~B4 zr{MrGE&~2wxMHc0F$B^xAiPhLuto;afFKaTNg(~Fdsz&@U0)CD6fYM7Rwl?kdJaTQ zjK<^4;xZpdYw2EB5N|dtpBwT$VLdL^2#~mmSZjwn5H+~GwMyd$9XlBkYz5(AL9Arj z2*1NI|1PINT+tNo1xc>%Cl|&7ac;B81T!`XlH<e-3PZ5O5X}a|LU0n$i9({{Xn6yF zIg*VJfzlZHQW=cc=QNFVu9#O5U6h>*-Yu?>#M?IDvY5CEN@)&}Q=8GOf7!UcFACJN zr$mXWU{NPUS?RR{VFGqtpMwaPAXyYD!--29XG9-6CZ$I3)Y-13Lr1|tfowb=mRm+5 zPcVv8$c5*|#g=n`LQkG2)C~$U#F$BOkP^LeSttr)hxS_UuVA>;04|9!o~|u1(X!Lx zJ-s(!U?cH$&!x5qXSGKuJ$VioyJzSrw*MC9bBBP!ljE>cH16WR|GU7ZK$cSWAqC+W zm;yOk;N|V>tBdEhB^;9C{x)CX|9*pX<?h>`TJTu}R3FRm4_N5rIq@E2lm#N8h90+E z#XhDOoet<`4)eoyxVp)Fe030qN*FCu8c5hz36X<CQd3yV4WoRcJ=d0?afP@JiUiG6 zzy0QF*dV2V;KnSx23G)63)TZ$?2D_6D36J$9>1VKDq9=H=3{lTrTem@&+`u%gP)c} zkBGO-Iaj-XL~Z2D)$eoqsQVwNTOZ{e^Y4ET4));R!Ts;>aDV^H{qIwJg80Yi)3}r8 zJ<x6XB+XCMc5=8$pM;OCAup07X>8B>A6uhH-o$^0?Yk2$-Xt3JH3@k|YiMNUjo1z5 zvGP(q^Qn2wlGMCZ*J6HNGmoEF8nhHiubD^EOEs;^)NATYy-9qu*47*^5MOTl+0J}o zUbhN1W9FrLh@RJMM9<4Lg&e*3%*q_SR8<pEubD^Gi%)IB)Qc6YM%Vihq=zU}vGmyQ ziJa4XzVe&=DvZ7K{egQ%G5ql_@`UEzJLt(1K~B*@?=bw@hs_`Kj`*h_o#>!<%wNX| z&<DNyQdf}GbI^O>E7J9U-E%z%B9ae!e++(6$UhiY!EYxPTl)Uc4M&TSi;5k&Vs(ev z$Cz<D6Ty@=m9S-GYQx{Ko%2qX=s-cn4+6trz!R!M<S01b#vsS~@$rIET@s~2Hy~Wm z&WquoLv<lX3t0OKc54Y`8S|$ri&gDvMJS&Bgv#tyV?cFH5oB1HY9P~ugR0vr>bU`` z4FnvI`G~^t!9h5_&Zh+tz2NN(um60o@u8wm#SR<01Ye^VWyM%h$`A?ebwesd&KvF7 z^X{8hFFP%zP_!vHFoAzjhAksI4St~7*b3H|ficLgvtcnADLWU&nFHv8oR~yzl-JQP zYUnx|0hQ2t#8XLiNfHodvX<E-MZS;#8kFaSf&1{Zfsq_^93q5c!o$JrK70D?`xoZh zlOJAmITaWTV9+5Rhr$6Uq1trILY{rgc3#G8eMT5q1oolKc+8^aybY>LYUWDQ8Jxg5 ztefkM53P>Lk&P~u*Yu}=paPCuKIwQX*h2`j<@<fI9#sxIW0FnJGbA}n`~7S}q5d*q zYJXJ)RYj&Xgfn-1YZXJi2H5YkqHhUxFRYAeV(4Hdu!GeODG9@(q&<2Y`rTRAVEnn* zWCJQBsz2#1R01*1c2AD-UnQ`w%tR5e>I&5bCejowY!1k-oaKH1Fkhdf9VQACH()1( zvGb5mv}o&AyPUVLi#JfcmzV=41HhFbT3)Tg?+SC3WfKuM(2oHGNk_AT-V6^Heh$Qf z6xE0^i%!83>?}&jKxmfi1IXMG7L}k9ceG*HV?<Jp9@Qnu5*!n$W`=W5Mrbl-bd{9S zrU_u%txCW2uG3*oG47a94YL710(=HSSeAl|LDCD+yX}+qOf7p<7qV>7$q+#3h@XbW zN|{*6q>eVSQp}*-wd}moDK}(WV{$6V*TE;y%6pcH)M7*)ti)j$fV`@S{Hl;-AL48r zs5WB4w?|%8=3g*L@(Lo8yU+7dD=-~!=DrL5;M0(P4z0$pS&;1~yCAuOw#)1s<^>{M z;mEg#J}4?6(3m&}MMYW8S3-CJzrdT6P%vlsm-qAJj&?8A9D3MJxxj13#GhSGB7&pR zIRUp)hQ*d(8T<Pv1xO%#A?p?}eAIH{DlM!sq5Kl(`G?sABpD&Bli3$sU%dHbv*Qq` z++Z=XSE+>GP%k>dr*TW%cp`wnJI6f}t`2lc067{J6gL-UQnA%f76A(a<VWi%y{m*9 zP02U-4~*eHHqRVl1>bl{vw>rg?buw&pR#@m(k0lZ25IL6_#bwjYch6`^VVbrS*|m5 zlV=@K;APsymx)aQ#!(`{hi;swOyX9MB$g$vmB!L^&7a=C!@9h;#lw7KP2C?~z3cY0 zj#}E~Kgt}8dx44W3Nh=<v9mr5Z9CV66;ofmOef|WTwvS1UN7WCb5irG*H@TPX-jUq z?{@5?VR5?mn6D6&&K8xw>m`ZS?Jdh6Ta><NC<vSS@neB8EzKVcw*?(7T~DI-)85ZN zcadjj2OhA}YWRpdOeO+W1A$2uU~?%w9`3d@#cax8&3v2zJ!Lr?lKNJNAViY57^#2= z6eIHseTjq?XS4oQR&_*3QC-<|YF|z#g4U@+%Ekt6$ATcjK<MT}bcVv397OU3y=r8H zBKko*(1$rCETWwBG>iZn05Kd|=qr~#oD6XMP35>B7y3o;^w2INRF(-w-=4#2(ULn3 z&s7)z5KtA5&&3dReI{QhGenmp|Ik!WA!H9#oQ#1A-A&L0R90Yta*`M!t5I^N9#d9E zQTK5UaoQ)B>BOoIwvpRHgJCZR{aGp3h1j39^HDCY2R&_9sQ+ruFSahUTv-J-1xHs- zDmhGgkx`gkoZ4O?pO|=@QkaF3JD|jj3&!BK{LG_TK}z@6wAig>6iIfy%o&huBCECj zt+@jvy}jfnKX-c{=>5VoU4M5}@U_rSFI$qBr5BcVWYr5xY7Xngjc`2H%e0{0*2Xbb z6wI@6HD_!!FkqdJzM-t9kzQ0*lS?lutL9><@*$V=q5&Zwh(+VjfRoM7w*hk0>+skI z&1m8Q_&{@GpGN0ReM92(*1oRGi(2c1)K`z!f2;Mts)_Row9L<cAwP2Y(}SNE&4%bN zcz{Fj)NHa~RK1FEynpcXBA6%ub)YYt<Ws++j7D>XT$w>OU)pN|p|tLO_~X~#zIbr| z`7<^HX|s)}A^5RJ7`YbY$RneP*agW>2_3!U+X$YCgmN$q#XTI{_yZ}#rLM0`uY>Bi zZ(3;cH%deY9VUh<-`U6n=P&*p71g-cJCMT)1-q&d|HgA}I?IHGNtqA84prE_&(;#a zfJE>>r%B)^roCtE5muGOABNn#I6n9*+~vV+pqo?PBJ)lz=(E@cA8y7LA<Aul>oKxX z(LIKtS+N>9Vc3W#$4Kxe$zS@)9SA%~O6t1;y1bY4s_kFB{WV1Fg#}QYZ|~5uLK3U~ z%xaOry_K%%U_sDph;u?9Zp+!y01y~iI|T4nLtQ$h1VPsIYP=0DTO5hz!Ua>bvJjWL zqa2~>RJFK?71+-ZM#SD2C4>-mOie=yxUTeot8erPQ=2FCt=b0)vO_zEvyh&XNjIEz zST9@Vp4aWe*i!VzVq~kp=|o695D2E1Epl}QaD*X>BkdkEeuA>sa~oeDePIXfq<qLn zvyr<br)HYoFb}q~UO7fkZIe?KZReRR-iHt2B|FNp0@niPm=vgg-H5!5F{l+J6luje zraBB1)y-%uCD=AK=2gBJIWTd(o`=K8`|t5mk-cmLf!>Odo#t2$5qG4wb~8kKff_je zQS5s{%8u6oZ?WNZfMs@qAWVsbhR_C*pnOlF^e<?rc<}X+lvn5yr>*J0fY{iXS8i`b zdIh`+zSF}zO2-5zm^IvhdDE*Z!b>x(Wi&U1jG8q2jPt`Wti`aSs&U&X+@8hRUr?4z zGe|TeY6bT^igr<L^k9^c$iq#s?JwQuDP;ET=(fNWSs$KKEtJ`ddV}wlsB%Yo?hl@D zfbj6w!OAd@bkZ{lmojDnI(09yMg&Wym<l(awojLZJsc^MZ!qBGds+`ynM8$J;jU_8 zJ2ZBMtQ77z6rD?z_I#pf14Ppbo7FT@DQ$U%tX3h<swNfuOxTWEC)A+OZcqA`>E^pg z<nuyU9zffYM2&|{F<5ooQnn}12{k;>s987FL(#*Hg<&MN;aINN^mbwk+xPVlt7?1a zkvTE{O5fNc4gdbbADSBDXTtp98>r?hv%T#eGhJKHAI$#FPD?x3fQHZin>ob`BAN+3 zS#0B@|D{LrPiTVYV-1W?bbit?BO0||9C_?j2qYGoS*aFy4opnb%)?Cjg@SE<X6HGl zl!i3W>xDm>vrt;NxgBD*L#>mxhHV=0?$eLA@aN*vA6Zdy8Le@s6*mDd#va;_4tnm= z(%|1%l97^+mw+OCDwNt(6Z&DCxC!A*Lp*SAWkw4gL1QxNC)L$Fh(^dF(6fMURzIBK zu@Bpts^ZnbG5X$k++rAGI=>|>W9&>?bjc4WFWtj!_`mh%6(_s`-fV&$u0QJt!~+h7 z<(~EY-;Y*))>D1gK@{h6lr>bgHsM**q$y<ng%jsFvNhsq)BV5pY`{a|o^7GAs6W0m z!&p-n8Nz87UCP-m;eusVzx|zfJ_L|w4s80*mkn{q;e!q)ELdcSxU=9%jlHEoGwq)X z`uLv2(aCegx_x!g{<=msw6I7E<)||5{Fsh(yMENb)q*`2TpS}6{!dIo)p}Ma{xp9@ z18pT#-dSh!WTT1zIyAHd;yN@WMK5yZ8X~zuB}iX~1i#PM;qG*h%)r579;%uGM^T-E zTOfyFJJ8NDRGgvqAOu;A0TF^dGDgvKLrAuGYU@2K171o#rc8gBrDIG4rIVW-+GO_X zsajMRP)BY-0i^lG4DrkvJs%=(JTs+MUl(#zqVg~<>hzP&KPV!c{`68gz8exk2OWaj z?B(BauK3wm$lxLnjj9$({FH#B$;A|nXg&ST;3ZtO<2J9)LPuhgdHnanPCak9;f5EU zrd(8eUvhX`)XG32@@)w0Mi&Ke1Y$%;xSp~BR!LMDc}VgXTrr2m87y$$3U%3nYfKxH zp08ptryk$=vwjs@QES67z|hTsB(QQescX^J`|;JdxEXJm;O>SU7d~31jZ4vajhtbq zdy0hfN1hgRA(n7nvc4rsYkhl&uB*2K(Tw{G9p#-iD!7i31h24>u8g)pX|O+MRSBWM z5vbWF>WUP>+LgrN--D|{Kn*9B40SX&ZNa7&1<3WfQYICVC7=#q`pO-x!RC(-NU^t1 zr+GOk#uDvf4ml9UtvsLi?qJYkn}Lr>W$R$DdK{avi?DQeEHc>!N_Eg7ZyX_8C~NMR zt9k>O4y8V^NUG`^(m1Hv4UCVpMJdEq3H+tu49xX1A?O2$rEojw)fERGo!2Y9Oa~bA z-S6iZ;GOH~=U7mTg|xj1FBf{+)Q-->aBH$bkSOht9X<`+4(?|NVF3Z>zL3|QJlA9N zoE9W`nOsJ+y9sG~vNQ3ECJ}Eq2nHcNi4RT9s{Bq7A@rG`&c28ugM(w9!?(a44>qpA zq|K?z96&}%Rb{l)<NK)|z)?Ek)NU6~E(?yAwDuK@!0E#QHxds5`DRz_gmc2k8*S;C zzym^bW6nAq>Ad(iS=s;)Osw?01R!xbLcS<D5E<|7hrPfJ+!CL-<o!Je8#jR+UZQJJ zrR1PGoaP#=g=Q2<8(2E1B1Q7eLf={K+iu*=zV60bH)!3<_|=1J_evM;r$lkO6yah0 zX+Q!m#&!!lTIcCi$QJ8Qze1Hf<R@DG=^xUwY}k0qUV79xtntyxPcIWw@k6}OT5F4m zN|uhO*yNgMKM?hNTA302_fh;Kw&Eou2TBH|50aLTyK2e`4zwDgf4F2Mh0EI#8QdJW zi1CCcY{ZH>>o1Hh9f6iQYZtO|gF7t!K`V>?jq5}`A0$9&INS#H2wFbPC|yNo3%DE> zol5AFu~bbY)fCST$WZ4KZm63gt(}q;UOeA2>#$=oOG&ap5HkC*A<l4II#3@au63&< z$AA(sAR2mzBy^1@bB#N%`S@@wPk4GDP`*3#0wSWarl+Y|SYwlyjG|RnTai9V6R-3Y zeTnh2eShvd>+(_0t(1kQ6X{efCsaUP*QB(mDDcp7q7ED$mL4}r->}|YhCn-tFIQdO zku|aL%1*V&*9}^bWROfVost7q@!I7+uuNlPwiT81PK#-}(e_$DBx@&%t+F{bY$?gS zuJyI4GLRQ-w(!{X*L(ylHrqA?)sfwLiC{YBp^rMdoXuO&ORJ-Qd6RFAlW=)!^ZMrE z`KNGGnSdOAQDM04FN`vsd)%U(SP<;n470SxTaFut389RhVApDoD0w4Va4EqEvB<qw znmW5!AML?2T~l%1^KTF<n2@IoG9nXV_7rX8+AepZi@E6HF%`0_T-&fjL&xl}x>?R! ztt3oAVdXJM-k#9aQR1gg!^2PZK`7B_@bUKcnv4OrvX2%Rw<JWx-H7St<?!7!1z2Ed ztDF1IvZXC;AcIr|T7?O&lbG9T*A7~-ks{dJ$U^h$k8>&FsGyP#E$fsi?Ag#4Ai4Pn zHI@-^6=by6k(O)%DsIM#5whbLBn2}r&=X>cN?D!_4vrQp*!PYFG>h$Ej;i;eB7y7( z*{iBUvCq=taT;47dP4gbWmR2s#Emnv`2`PV0fM}7`=h}R!A<Ykk}gis8C^=&6)D;Z zmImat$q(m|&DFnMg|{>s3_--DeLL7d-`Qt#i__H|{hL>bek>ptMh}_TDj-AgLoUhm zv^8);J7cQatr*>aEJ|t-I2=d8CR;^;6*=9q!r9<F5k3;?Y0ZO{Anb)YIGYV0zCaxP z*P>vmO(g`^Zuv-H0orP;gsseM66Vz5wL+mTumVWtE>)9kV_f%<S)7G<PYDC&se>ki zH7KcXMY794^Eeg~GS^x5I=Zutam;BB^ud#*xj;_#mpQ_4iP6Q>DKVpQVm)S@;YoFo z;TfQf#m^(CN$?V};ZF_|$(`n9PMWq3e|8^MZ(CKRhG?kGtR~H=AWJD;4GLr6=%26h zH9Q?e3fQOLG=X^{bkpK)MDZHnC!a8tcB;WyvBr67Ar7GUUNJV%bCcKg??_t%vcQIb zuE_N-gn9Eyw&{mj@vG+^h+cu|_cd~8zQU{Fh1H2#Rbbhr5Y{L*JbKYQ?paLYpj{U0 zY>k15^xOcTW{IU8Ez6wZcq0+*L9<mQE_#ubJ_P949v80TEZ}yu!bHFwTCb`5(tfDj zvw`0^ZGb#hvB+9}1&yTfkHDtFT@dKuZCjxev_*{BF#@ovDiXwD_;eUp#|p4a9-vj% z%uiuBTcDkVs^RPUzQg7#Wabw1-p~_?-q*8~%u#wlBNmV*Vvkk{!kBsG^<5YV{@h_4 z-PpBoN$4Pc<#qrW!u{JpLX<jwy5w`G10hE88n?R}-zB%Q)M`9n@DbWb@0~C7YG-0~ zRTb?aG}Qpf3FZo972SRWE?`((pn0^IdUvv5zXmo@(gc=LauS5ya`);ct;E^vD8|Gp zf%#M;tCt7@0ro+!5ep(Z)nKO$++mFSgE$ycCp8xPHy~prp|eOxa$uL_u+-@N<Z*VW z=WJgLa~*iI*v&;XY3Ww?1u<-QF1O`zI=n4&bzo>Y0Lztblxa!HI!|@?nBZ7}lLux& zsv`~x>af5Z`rw~22j+0qVX(L|2zu(=CZ_p8FlZcgDt5xmg=Gb2i|dS<?;uH=?mHgf znXR%JAfn{us7*O)Fy_E#p=wk&D=n|w)YPhZ#;|6Sl&WGioeVFD+-Ij*wG2Y@!*s)( zYYu~t(<PcO*DZ%UofPi2TaSQ&cm-dNtDDd&T)K&lAdFULvuYDG#xFeY!5~?pG>%X% z)oZ0>2wAmYqN4qE3$lY>AgM1>3gvO_jCDs6oo#h{0{ji4J>J`;+T6Oa_DoR`h0b*0 zM69h8g7~Kh`2%`Vs3bS+K*$iB<_Kjp3}T+@YokV>UUzpZQBj(0r;*f~u%ll^>vDrP zfeLbuC-NShN)LL@z};{r@lPJit5kE#$3);ys#H9O2F;4RZXk01!_hsExsd#J+n7F! zDD&`TiFBG)`9y>|s!P!A0<<vqVX5btQJU@d3&mgH1vU#E!3+Gz@buM1n=2u9#v=s4 z;_FS59sR$Qae9S2M{JP>6Q%@u>E+%~?RW_rCiN(`%1ITd!jg)I6=2pb#E0dYt)mH7 zQEQWI`{m40Wx~UC{&i2I8Z_I5l-V~|)VL}wmhC|jB~&sx2&67T&|4w?Q4NsHCTt4& zPC0*00(vBq+zvO#VOK<Ie!`>W?bwmB;gW(VQs&`9pZnS31Z+fgFpK?w^xS$8F|cOf zjgO*d>#guW2(h7FUCeP_owBDFW>jHKGFl}m=cVw+Uf?%uiH-u>n#)SXgiJ)O%g00X z6d*V$G8rnw93uhJh~$v6>=Umzpan2|TAW~xNsnW~O(ICu(ucfLEwUXLx7DvY-%!e6 z;|zGlGXjm6lUV&0blKH}v!>GPsRzJR1B(-__y{b<<IiY;7c!Ip^D7X)jXMf%sA-U^ z3vqha_WqV41UNt@_$+ts(f3Nb7AFB88q`$Kb@Ao<y&8G5x1l|Jh<Da_e%n5J(<rLu z=PzELN;vR-dy&`EOiCTJmvW}o!}c=X_$ox#O{JXuR`}SPtHLE(n)^In2lL0vU%r<e zw0R@<>h<ZXH)ij{{$A_vKfHMR_Qn5#GOb0vd-LMyyBBY;RLjV6MYcf8u=;9jnU+Dd zWnTQR_fLO-YK~Rl2ZV3{cPmn&vgjTJ>lS^m&J-c(5#A=@@2}|pnM}g^FgnMsdN*P^ za-YpIaK^G2@G-x|^xnW*C>RYznU-+I59>4TEE8ea_)1gWHs^2O*-<`yKfVH_)|Ppv zGVC2|+f!8N`(ij~+fP*Dc_tOL%smyORJJ1?l%qL=;sfXJXfR$~%^!$2*n>COUpE~J zDB&wR<h~xy>1&V`aCg)HV^MkE=iI)(A46Mgsrg+`hvy*g@{1Xmw&o7P`>}uZ+!X<p z`l2mDfr`?*zs37Wi?j{aw5?AB?)^EVPeFSdjrX@dJpJwzq9)DuKHymH?aV3nV|K&E z_U9FQbygM_^+IJ2=9PU>mJG8<g%9TyJ`tc(7*BrSXom;tL4Bb3g81;Ea}KY%JpbQp zS_G>6Yz&@cRFl9Oe};(bQoSHLw~Y1cHz%)bAA|#?WyNBtH^hwAx>T{yTYy_nr>)Br z3%x>R(2j4*0>wfv5J%~lNAl~|B}X7Rt1P=kOV94~w|GNeYW=AIU%wDP1}^4duZ>`0 zQ7_TBy)LOLRS`3*npK%qshT<Ts-~G<)pcNVepRZANmk=jlNCu;xm``XsH-rovicL! ztu|M?kZzT|0nMDNW;M=Lf5)3gylNH^uX2-CVP6eAdBVQR=C+W66~DU+4pv#30)=PR zBVy&wHnOqSe6g);tU)a;l&lSVVjWIaxA=sZ)vQO%>W!f>J1e;$muF|?OGOJst671f zmF-M(d0Mf^#zd`Djbdx9BgrpK*UBp~;%s#piY<h#{%~sHYsJr!q^&_3WPl_Z(6&AS z&ekWMuvOM%zByGZFDKz^HEZ*=CQ-jNX={B8t;yO-H4#(mhSaUR^#lIakD*A|i(;LE zYL5B<7GNu23P1^v@_3BMc!ab~c#fz1B|YKT7Bo{zNn6Z$VFvVw(5c|#<Qw-KePCa3 zrn4|%YJ2xOof4nuZaS$t=G*Vz9*Cz2R3F6+1yAmN)pOx55GLBs>>US84QT(wjN5c- zt2qlbAQY4w*MrY9Lj`rZ!nNa$V1hhVk;TF~2<ARHi5s>83mJgg(}Oz##93J-;L^vS zETqP^>YbxYGAYLX4nEH6!PhtQbJA~1(rd28tNHilEdBDiyASgJ60kEeI`4jjckJyQ z?L9a?ZsGsMPXJ~>nZL~cdwg{NU(E4GXiM$$PtN~an}5#)erNBP&;Pu4ba-$-n*ZZt z`=2lT&!6D)_+RY`z*{#=IWfHU%~p4J_s@sVc6Xn@dv3me_womG)Z5$LeevTK^4JqQ z`eO(+g8z;(tJhst)uan*;Pp3KoTkx*dbcEL<C`roI3Tt9BMi4Lv+A3?EV^HRef-Dn zKGt02)i8Sk8X=r*R)+<=TcIA7yz9riR1AsQxe3DDjtun8y!I(mH*Y-=66ZRvy(;cF zVz-{e9KQ>mqZAc*jQ+*Nxp9v#_ZN52mht5efZrZ2)Zc71_raDwfRd9ZNyrvTS`~yN zUFY_i5#g7m><mVjGe_?1Y%)OU#|@;5DADg!6<8mL{wGI+%Gnfv%cC$HRPZ9c>oS3` zsb18l1p}=*=YRe^JoE@ilg-O?T>Qnno#xl6-O1M}6}64;sFaj|MY#jx(!ioT!i$Y! zQ6|LwU90UeeKKU=tV*8T#G9Nf&zrn}BRTPrC~o?ptF99+@es@!Y>leim6u{g$O!W| z8$D6%b;%8&;*6`?$Gi52M~>JoyXL5Ww8y}uiOa!IjIt>hNviZLAA;GtfFw<16ig^a zT_O213#3AHnlp$F0-m{_xxfEur%h*+*=tS)N;g_RC$~$?4jK|+Y?BryX;?<)acOV) zPn!9oAMfIi9Uau2JO=)=C!}xNC%T|qKi<VJIq=NgI8p%xw<<in=h>^*|9SG`cU*BV zIXMUOQ-`8F<igUnggWMA-0yYF{RhW(Z<M8ZdTnpR&(hJ^G#}WDaq{x1**n-j{A0(w zfBO{1ad*-zY?>vR?8lis0v-?ZCr$?TFT1&-I!0-@^<+QbKZXk8rw+K}fnndqNM03} zJmivx5N+Ad1`r3M<xbNxNBqnYU`ot}Y~es0!gGjUXnN+DpE*Wri#Z<_Hv$ajjF=Kp z-lGb3aX8dS{-)2MMd!~Mt_9{ue3IZLk#$6OOWcQB;@7)-4|ews?1FlD{Pn~A1Aj}z zI%3&uXj`}@+pG1kDjt?xK;2Kbo-}+(%MYutW9^z}|1HP=E~_SgZ>{R{`PB4(*^qbm zj`{k(z3lDB_dom17ybW}d_F_{-*lssV)^Sp^BE->SaW6S-&=GCy^xa-g173|i>2iI zv&(b>ScBoQn}m0dVn{i0{fZ7r(5scx448b;QcFA{fM!r);Fm!0pCfBe73gSew@t+1 zoua0Qnkhexm{raP9_1=crgj@nZ<(sNI8X2_Ps!gWjtz{4E4}+m!7&1z3pQ8OyOfy4 zsfh{nid|5YEJy84OT?ePE{4~nQZvdW=1n?SVybLv)nv%eRPPey`O=e^LGwzo-a`i6 z4BQQ@+Tk682#$Rni2y=B-i3+4*$9Akv$V{~vy6<xwjo1cIJOJwoLpb$2+(;A47B)i zmvDyznv_*Onhj?j%?th9e4T@NzhO;vVwHT-vSBaTk!NkcBRt9Q?*w_ri!toCS&l5& zXBl+g2QNr=49%2N$!HK$a1!?~JLYm`#~>k&n$qC_q<$Shs0#tB+D5hykIX7@*1GIk zyi}Y+qtAx7^y-NK#-Oh}q3}yo`Z${g@+7euJA$vqS;I?c9pjb2?mhk^P5Q+p`NF9Y zw#n0Mh)x&Ro)RXZO2?U%N7x`qFaj?g5s^dED}d;C5(kOx!$){Gfg5Cm?iRdYz{BKk zRl|e3>W0H4K*xni_Uj(*gQWx#Y0%jcZ-gDZB|sBx<q0{`DA$#PCR0p*)np?GT1PO; zu5lG`^$gG9J}P#J1b17{aQHVQ`(!t!xhXVb5jbk<;3%>|0@vv*7kD8*&Th_d;f*mu zg!$qSJ3|fBOU)Z(uCm)3gyo=!kledbFVT5hK5}Vqsc$tWOeOwlJ9(3=n9zcmm35z_ z69toejIsGd+HEHa#HSou=#!l)5e~)dE3V8oa~xCB@^v<Zl}w|9(G0-CGbM1Msz{u% zCP+#SYbH4&UD(lM^u7!;>^mrU7zRXn;A$CocC02K?U)SGP0+bO<_gp?Rbm%@I+US; zbAoUUN%W+Um*8@G$|`YD&OuF9U%4y>F06yYgK(&EzT%Fg*zbfwtZBP(90NvQ*ypcs ztGm5Q5f<3ga05VdhS@pgUNEsG<fx4eBv;ekAe`v4TdG*93yBEEQJpt-jVDs1lGrp^ zmlQNkLSukoR7}!mvXLD^I$QA^2jQ0B{zrhOY1R$i3uxXMupT}l3m8Gr6E>pc<YO!e zQhg#=HnLRWTHp}dGg1oJj>yYeWCkz2uJ4Km7y=~2P6ATN)usvVQ7GYZ#ViO|uy(HT zg|KD(erKMAV26KCB2Q~G0aXKSXbR7XbJr;pZA?z`ZHS-Yn2-*r6>f>z)qji8P+<P5 z_*GCN-HA)vU$_p7kqAQ(_$T!}t}{HsVK=2a9f*g(Xqo^Ew1(AV58B}{Ded|%A>6E~ z^K6!KVL*1R4=`Q`Ltuo}LeeIC<bKv+c6|ON{s<Z5wC82R!I<_zo<NHcM1WWEBLmcW zoTy29Su%py7u*rgo_F88dT9nzTb<pH-@bbdfae*-3fX~#^rd3zx?1@BWqxtO5f3Aj zwIi!;%X%V%xb8XQ;g#7W#TX_EDuASk3w%c>0lfqcRR|0~F$bpB4k|mdlKzXmp?`v* z+0N2!7ZyObxET{B1rA^0S0$X4Rwcjy!3sL61J_E9Z;&uf7}9V)5^Q{snvC^iPTy1l zBO6(j<Qf87>Z?GIqIgVD73*_w&u|zw2xaCNP&y#?Llmck)p)NiDLA_w&g9j%2!^)B zm@mZ?lQf+|&HHv#RFRP1=D;{P)-nhtyT$V!(}#(4T_{2FD#0y+APo{!Cw#{{a^8@# zgrHk6q-QgGWMN}rDO5zsn7El?gEDJ6CFzZJsXD?K+w~cQX8=vGeYVgjiC4BU_BfRA z$-YOx)d83=mUzbJm7x7s1#G|R0A+GvcgTn(u^tJR+Jmv&=}-e&fEI1c_r(ny*d5wV z^p;B0?}VUc@Vb&~y^b}=X@;ylml&7|?dIVQlvFx0s|2u-D~^l>b%f;&iwvffyM<!` zH9DDWxba=*$T*47g9*&m)Uz-G^&_8p@zS6}Un17v;KJ)MUvrQx2gU}JbcluvwdOzB zEoV13lC@bCm6tjwT<CTfBET-9_~RfS?d`d(M}8Ji0aE1A17coG!SZpUj%)<51?c_u zMr${#y$6j4h`s`b=wUuOBN`lLIVg*SdsNCKOdy~YIHW5Dy-3R&_BXIh__awIG~%q- z!_q1NOsnd3$UNAEcKae(Np6K{US5*iF`!`BHxZV|S$=V0SFpSSPea;3wA1Wb9m7GE zpUY0+K`a>K6O&h6`#{4Xzf4})K|klZ;F+B!nII~KQW2bXzzNlAVlbWh2KZtJ1zh9p z%chcPLBarDB)4eJZxtsOpEZ1=q2@U<LZ}LL0~uuAr>=T;-6rMAZ4wuVK5_Oc8BFpu zxhWgvC1Jfz?Pi8!6p=RAzZ)FX9oCLZdt<Xwtn4_2HaH@1<-*KDn!v!GS%e+0_1jXP zC<T~J;Esu*&K2eDK*T+**)pV@L~WGci%u1v?!XY$tf<_wBCT#95yXJZ1qs#dKf4J$ z_o2C+BtPdZFIYLY!u}OpUEzJ8-e<uKqAWTq3U`+n<pa9CX))4K^GS7Frq@MZly9!g zU6OW-b`Q}%zFG2%$LTlvY4HCXe_H>~-u?S~2Q~lC{?Qlz&!_l&p8lVu{PL@~g^oTa znY*s5XQ_CG$OB{t<VhVZXtmF&`fOC!>FNLZ+j%vydM1W){B4uUcJ2TDO*L$V%1(nG zQC%kN=4xI28~hKMTktQc?{8=U+4Yu@sEL33ruFmti|P?nN&|(3cd<?X$9`*9EE<o7 zCH@dqI<J{Q_qgQl-{O9+P@^&b*ZpIar~X#^2Y;GpfZOFKOs3HIZ~i9buGPfa&;JQt zA$|LsfCkWw63YCoufO^mSNS(*F~KB%`<0!ZzrFSJZ@x-BUG~r4535IRA~6%o^%(y@ z8uZ$NcJojx*))@`mu^CAb<qm`zh=&-VM^lX=g#ThWbS1A?TTIP`M<?qn1y?C#Ts{U z|7e`?c>64@5#Vwu`w^_*fBQdn&hV#~ey6TjV{LX%;~lwDjpqOGfAvC;C;snBHAz)! zMffLItH}<0v^HoPtMB3p<Ealmb{^k5uQLS?{LM83^SJ6wod2oI!Bg78vWHK`*Tt26 z<%;#TeZsTLUM!~>he>1e(IPLs;~PC^zN1a|+FpdvSSBfs6h54paDhtvgvt*b1X-M9 zb7%WS=Iw`1hr@)AX_E<*2by3ohQb-Q;y2o>dzPW)F0b%a9k%3QK*1;-=abox5&(%` zgxrGc4!+DMr3(VVhVl(Qd`A*^>M;DE@}ngloq^%7Z?wA3smzu<&&h)fA-ddnjHCAS zvLfz-2!p&VXHc9|I<K=5yeBY$YDSps2Gsz9UIXg}D1E~F5yVgQ+N}(qqn7){a_~_< z4fp?}PkjGBK7LTk|JpzJa{vD%pU?CD-xkZi%9a1{a}tI@%a89a`m-%9BC-MuhOApW z9#l9z;gQ1^m&dyUh!Y*yf&ZZ>uE5jvr|dEvn?GlE(6Z@0pM%8!%l3(Zs`<~5p#mT> zm8$9uhsgDZMF~zEh=Mu;N7FNMCZW53jBz7~xh37r`nkjLt`H^!Do?=C4vv|Bk6%vL z@0W2;o@0<=zY1`{@le<NL;)X?#14Rmfr;D2DV#(ObVgzD6*du$b||n8aG)qvsF;E~ zVw@#;>E6nCB<!ez?0*VwAonU@>WoVWD_}DN`}ds}9s>x#8<j)d+urD4BuuFkzh(tf znu=!?>@nbf*-;s2e2?YIL%pi5ut;%?n<U0{LfT1!8#UyP*%7M1lO{eh(J;C380td~ zVduwZdJ6CfCz^$e!mbdZsJtTe?woMO3v$n;=!s;{HH7|(Lk;7iW#NEt2Le(g(uBM{ z{<o21ktYmXvAuB9x67S>uRZe$6+ZER|NFoD66{0@)~&WBAZp2U*TJc%b^I>ULxo(d zQUIS6dM4|e<D-WhrK>%J;s^r(CyHi?t7oq??o8?lvh^0D(QJ&aNre2h>j9MAPEzI& z;=tsJc3EJQ8T<=<n`a)D+iC0IaC6}X=+^bEJCkK@n>Vo=ko~U(gd~6ybd*l7oLW7V zP(AEQ$0H_9XXAtt^6*C0{nM*A-{mhjE03Z%)CQ>uGtFi{Z(>BgiClx=3vyw*NRm)! zbSOf?BWp=WRzkE1{9Xs}lGcfOCc45HtxO(FIM>p{MVkT{w;drQpaaF-R>qOqsenm? zex3V(!CeU!bp($-=2M8q;$6}JVWo+WUt+M&2w?U&-UUb3Z>3p%E4_AZ<w1rqYPHkg z8DqbVeHk8%)I;(>6i#}T)z7yV*BJbrjpH@oC15BlVd1$-b_er3$p47y%$K|0NB=b3 z|LU;_8@^+~{qJz^_%OQvJvcr({Br;M6ra!Y{ukzyf0l3{fe1XfyBl4Ya36bfDT7ZC zI7=7Z)|$yj`VexN#YNE29E6IZ5(nm5qDu)<l3XBs5cq~T9Y7At5v6dufz!{^#t_@e zt-JnBy}E>|BP)#%H8va5#V2(bk_03w;h>Cn9JY%uUn=Jg58ay}uAMbZM00~de4c03 z?XILNiUpkRPFi}>yE)B=IFAdCcBF34;6_r-#uT539p+ky$Qi@>D8hUOvG^CDf6yfu z^*G$F31;L4&?^B-tKe(eIx&^)TGR4S0QO~Z0|9|Jt<t_JkuTzP?;IC=Hs%CEs}lkY z<TgdX`81p{1m@35NgK2eBtytN8WNvOaMwVsdFL|#O;~cLeo<Dwd_KQVgZ_8;$>aYH z8{+@I;6Hql&*!QCwc-D)V*fw*Y%k15cc(43K`G6%|G&*DL*x-<U|%HEX-tb1o?$!1 z728PAZU=nIfMG>AW}F!uT6u|$D-kAM7f^rzbPl^-tbok0jOl~UVnoR2KIb4|16e1? zU>M2svx&|C6ofI(2@&(QdqdetCTUq>2DBJIpXa63jBlk|m=YkWqkTio4)mTfE7j=z zX_gNMngQI!XZRcy%DxVg6%kVnQ}*-#BzA$`3?*45@;Gek47U`)!{B{7Lr>C*Y&R0d zynp})%74Xh3zu0KTP7hS!i_IF5v;O`IkAxVnuC>&K^E-(ce%}Ie78+SNIRVi&k1*6 zj~tR+vX6YK!14xpfl6z~jL_0~1h(zObxePNxny92r^(uZupb;V6~ckobcp4wdM?xv zlqLpAFvB7pNRw?lV(N@i`m3soC;kU?tB{?%Hv4uR`UT*@42Ix}xHZn=E^T!AUhq3l zO(O9pvL}ZB{_jTH<=IQrkQEoCWdiWyS$f8_3S~aZ0kO~VL6;KP5=_6W3(Oh94B_|8 z$q>dA>Csm38N$8l&ECOdB?3**T1qkP2J>rbL;Oa?0)^IO?bPG%9rbl9L;<rPUX6iu zOqrUA&_|=j0Nt6LLl{Zz%{WhUKsV^y0}0c62Uh45FgE0etHl!~>?K1CcMq*z^ZMY` zGwjuC_JF!QC3rF=QXMSilXdi`k&kY|#{`bZHc;R^Y)fJt*rs`CQ9)i0QqrTeadzF( ztzKH(p-f%4$D%W+yd8~Tf%TK~)J`sdWmd9Rkrcp=x5vPNQys=4ZAL+$3os%qltI&W z;(>mp?EH=)PeYK@&#*ai9UF!Dhm`VM6_a9ETwvB75PiUlz!Xx}4l!5`%40&m!|JR| zKbxWx8H2+Zw>~eOhoX~ca0c7QU6&K-ff-Z?8fUXX9z2W>)JKd#iPUIc`{&H@+1t^u z4PYw@56$ibS@B$@jzzk%RgRMFL3W<nZT=7h3Guh2p8sQ~w%VV@OZ}a&9=Ktu&k4Kr z=#MimVyO*&HXwhoWOfPf9K#JsuJ3KI2*IiN;zQP-@um%D6ny;U4341l*|3*9Cu9*s zJH;bVvQfQQM|>u*2zeNgvuSaajmZmZ-}YSrEwb8N;x;>xA={yXvDfFzeBaPNqN@AF z+;S%$egB91*~fUt{QLjm{lf>b|L5@d;NZ*s|5JQgV$m1uu9l}3@|M&esc)}_P4gsp za-FUGQAk)sJ|_M<9=y8%VHd8RU?SE-VrL$%7>?aA9D5QA?l$6bUvB%^P7C@v7Q74i zb#Am^u$v7q*qPC+4#eJyqTLR}PIWb-u^W%Z?ia$EaO|gy87UOcw+?9ibZszpCKMz@ zcC!&8yXPj1VA=8eyTN5wLp=|i{g-B3_In{BJJ$6}h{%3#9v1sA48wj8_MApw=Z(1; z47+*xl<Env*gt}h+V6!9;pUxvH(p`CC^mNuD?tM9+QdK1k_4T^W&<ZN)f0J&O}nQU zi{FK-*wegk<}YThN!n?fIgPnVf#=w)<2j~^+T6!xk^A^#Y?*^zh>6_1W$eZZFz{B# zLsm+SMn;aYT$eybRy9=(7|CW8jAT{UBD7=;c^ji8t7=xmO*VDh<Zz(YMo{*(NXRb! zaR3v!A(XPJ`<<GA)iITWVQWQKHVe^}RXr=<ESnn6vZ|*IaT$L+tPSGofXnJ#gmb$A z^s=fe1YtI-gD}VKYJp=mbK#hSZPftGjK3W9OyK!w!eu^fMnXPyfXuq<<IHRT&8%vQ zL7L5~AkC_-IdIL;&be^S;r?g>ZpPn^VIbGXZ4TIcLj-5D8iKQ`sTIrFEW~nFwXB5d zYywp0U@tF&?~Fz7!%%Jv?;Pw$xW26k^sMS>gnTwDKt9KFGY9;cPL(;}&rLF-S_TH% zXc*|AMH>J@>&=!;ec{!iq4j=KAkk(WkmzvzHNi!jrQo6i8L%X9v^i}=jn=3Ut6)dt z0}o(lYziH%7mfmvHY<Tht4e+mB<Xu}_x%Ooqwg&T9IfhUhLAQ2LK=≫S#-1Zgd4 z>sZq2*jt1ptru52s<fGhDy^qtC46a9$Cp-htqU}57-%}s95#TQ)=dhoEh}PA>-L0m zYL-T!4lgVYj~c)DqgqmH!%^!K)4^@5hf5u((jh{1<2lOj-rwsf>98I^wR*LJsx~V_ zRjYa$L95LQpw)VpEP$^zi{Pt+Ww0cWwP^yf4vvI%Ag#r~R0K`h2;5o^RAttKxei29 z2zYH)0=$mSxpwGloFoN(O=}s99h)LwN8{lzu<?znU|<JFW-}VLSq2ST)w3)vwrRk{ zt`F@>2-!v>WNXE3GpuZ1Q9Eij&Fz7gQ>%k!>jrE1Y_lSKcEk0!4y0|C0n!d`2n!*# z&0I)rUDpcW+NKV!-JqVV4zq0tW?SE-HUr!aMjfHI%{tKA`mk-r;5JKQa5pT2Ry1xi z7mYi#88+Z@e+<j<VXrNodd^eWMio>Y*b>(astz_mJ-pg1A6^}qmgfdqo4JA3`f|Hs z$hC<=u2oeFW3Q<!hg_=%Hx0Q~RRx2xa`3f2&RW8-&5~i*+F&<7Alobo$ktV@5Snf3 zq1o}ZYP}$B?-Rt&CgIxgC<Wuff!kC@$7|P?&YJPsfx6%#x6MkC+jR>_J%-yX7sIWp zS}vNqJ}ok4zNU4;x($SN*X6%VMSEPg76zNfbq7mBMR=Q)BfM2jZK2+#CDdC^1P=Pt zGqhHOx3=mu#d^nhOzpAWbMAhPQQu}x)OTnNTp|A3)Z)K`RkKMXxEiP+CY*j)BNTkj zd9z|Dc%=0Cpm4KFP<U*HN9XIB;o;h-5C)2yRRhKKz&D4Cn}s3cRL9eJ%WM!S9(aLj zG2>>XnDJPRniD;4#aK)Dc+(|fl|b@FnG%PTe+<3&sMm%wxJWO4*9I4-FSyHr4bl@H zV^GzwDaK&9IV*=YXgt~=711Drp%S|R$Y5aI3*ZK0{c|qdV10G90uP$`z=QE(Uk-xM zG(ZqWs@e)*gh~Qz3P~8-n-H8Zx>qd=PN?c?K`As#q7>>`Uw~KWOJdNH#w%36VI0gd zc!la24Ew0#6|x312bnOKpUsd7qt&L4#+5M&!+qR_R%n(&D~y`81a6^e#VypvjMWef z%`Y0f@LpI~1Yk(N%*8EikeO@a7V0y|xdhjPFbq%XCNM*@9GD?hRKqY-_1n)^W;Nu( z_~|u~3&ZJ&FbdT>R>UZzCqrmLtx(T{Cj1z>!f|gYnxbXvGi!h5@P@2V$DJ@1tw&aL zmpnx)Qxwf%Cwj6nHPM~260J-~bXQzN+z>w>o6r#5Edx<ZKJ=I-X-(RpyI>sJfNW?3 zo}oLX7`jt-p*tlOx>HV}JE0T06DFa%BoX?A{6S6BL61pH-W_RBczjT8>oEo4qwi|Q z%+;xa*kU7mL1rz!AgZK=G{`JV8bq}$W)2F2I~$pUsH&yugG@Vp5ZAOahmhnx>A6~& zMCfCvcCIz^Qj4k7N_oNSWd#4dQ?Gv$AIkr?i=|s-{Y!!Xyz6)D?H%nsI6iK}|ASAI z|9`X(_|M08-H@iwKY9Lt)BN`@_wN(}asmFs;e-3}{2w3hf5CtFB%j|R{v)a-upGze z472AqIPbgWe?iEQDQ6>0Lo3elkh@o6R4ya}`Qz)K0291%kRl}T<p(Und%Qe&lGvs| zLfJQ4Wfud^3)>brRiDuxqz*#E;Ms#GnnAL(O9<Pi4SDhmC7DkvPPH#Yp&F%sfneG! zMP2cs)fXbVkYfYu30))FUD;6b^)&0!HL7%RVI1b`@)ulYiEAXs6VAr)MK-7rj;vjy zPiLvs`6dG+GgS-D2F$LzRaMZtIC{=mw6W$A%!uHv8s?*%(l-b|0?{49aJ|}#-_9;B zG7Q$A^ID2Lf}B+j{gAlHYZbWJ_J(IZL2TYDU=)9R^$r8OUH5XfUAmY~d5A2R4FkIC zRsdR%scmrp0;F8{hKTPAZ#h_yo#>Q{pSXy77076Q|JPYjJwjqvv)4QB?$Z|?{^6T% z%t7x#@4$cWTn`E4tEFgOE!C~c-iaDkuzwByKmKJUAf_RM%d0lps$KQc5VU4Rv)%Aj z(e~s8|Gzwp$N}tNoAb;!jSnpG!f*VOwUW%u6F&A1FOFltEP&~yr=yIjQbt|Y@A#H) zK0g0Ay-hgJQ{wwD+l9U=eSj2PO2=;AaY0db1FT1S51e@e?ncxSX#xaW-ehNXvrb_> zsn{%dT`&2MC?yO;Zs|l(Nqa%3%2BSWPG?{rSu!c?cDtn(rd8Y^m;1=#*DZgFyoXT1 zBG@g7{jF99S_hmp9&u~Z;Z1srQBcEPUCcleAs_@N!5;$<TICX)#HZ0Q{~=rMxeuM~ zn70(O(6MqoFQ%AX0lTWB<F(U#%mIA;VQO#20<9#VHf5MmjN_c3@ZsEH2xZJsoZ6|j zM^ZLLSPM{8An*$YXabr1Xuoh@ntOk^*D?3H_lO4gUJuY>zNN@9kT#ew1UXC70^%OU zF*d|N{jS6$m-ZAGW2{<I&dy433)&0%kdgv0Bbu^m$_e<UIluKRyWm`6kelfKJx7lo zWH&?iu)fsXdkAfMF`87j{NAA3d`^IF#(T>2!d=AZM2Wp!+v9CO>0LP|T}rkMH4Vn! zPjzlp5}X5kt;9j{2@l+bvvP)J4-7Dn#SXQq>8B3$V%achQ&#qS2cV}M;B2E3BE~E$ zpPJMa>TFz+hk}hG;Mt=FQUVW|eJGs?tS-g$Ho>$DdgE1=O-jgLaM7^JdQ+Nhz&*P0 z=tzKm)yK38j_d>1T4~o9gn6Lj+r7mF1*7j8HXg)JN>T_pa_v{U_Putz&UVQR<U|D} z4r3gZuag!F3#Kt<@nGUr7f=cZghutd0jBxi8-SQdDBoyUF**af!8s7iY?E8uA8^-s zs^Z8%n!yn5_w0?L_eWZz;NFCuy#k**;COKCpY6faYOav+I0&#FKxd@M09>_c&N&vf zu2JK4uYDyDT_vlZUu3q+!so)GMGW%^DBwe;#-xK0bR(Zqg5WLWX1i2eUEhw-#rQ>$ z;*!WneWK+6s3=vb7az&0k|KTvdD)+pu=XehyBH^e@aiGepqnY>RA_y_x)f|`NTSag zRSiE=UBiGv!@%_phi(eV=#oGnVq6ERplcsO)B@i;2@u*7V@NJQ@4H&V9PXeFVk`_w zv0WJ@pR?UAmFr?#4QM&gNUyJm`qk~C+nmZJP31sJOWFP~OQ%$pzN(*JJSmMMqr1<7 z+}~zw`SAtC0>Re16%Dpw0{(oNp~$3-qoP&<mA~UICIUEO{{e@tRe}S*A7(OLro;2D z*Qd7!naZh$<iqqD5$w)g(mA(pr#=Q@`zY-%L*y8KL5G7<6b=eTb=IpoIp<nvyo)Oq zv)kh$%vj`%&vFNAqf)k^U3sFR>dGA_=+SV~#0RX4%9yYc;WxX0E8$)z?ZM4g$+O@E z+D`4&5dIb~`Fy|+=IqEwClkBc<bb1IxH@?lFqGxylE9g63A#ZofXdnN8+RaGl}5dW zI}x07R+H_c)!&wPF>3T;at1$itw4N~@*zAs&7Nq_6PGl9POXCS?J&LIZ{S3pX8g84 z<4O3~3c4py?lGK3PeiAMU@N=q9%rK`voVI>Ki;+f?%+4vS^6e{Z(wDq0)s3lg5Tj< z!@sRy!M8%gYHv;Wt;Lmkc8c{)v%jkEqF2J7-LRY;VyOHr<M_9957w)jJyoIXW8F*G zu6~EsM<n<z+}!vB)<P9@*)ZeBrzoi*T@n{T_c3lv|G<}3)H}#ymzFHo$kY;Wfkb_D z_}o7heD0)r3Ht<NcS~Y)i*dm^f@I`m=N0C|x<GM^&dpNL6myg!AXYI)*k{_ru;G5B z0~%y9P|=G}0YhvJDQvdUATV|DsQEYv^r>Cgb-O=t7k=(Ru^>w|=n01mJ53~k>3}91 zQgN~Sr$4@Wcgh%uvpU#+ZFvOUaRwDV7K|1sCx)m&@yluAK`KFvb7B?B+RK}!7reC$ z3&Da!$0#e2B~IZmSQaz8t&mPA=$$aroBG`N?y;c3U_B#Dur2uT(QO$?uctINDfX6? zP_kxOwLYPdsJ%bjOsxY>GLsKvQ8GaC)4x$R@%MZK)vF`HWrk}V+6qT8C=c1NtP@+* zx3O!~E4lHV%hB%_i%%z*HB=f4fH_s_gtn#{cL(~k0VFF-@z3E#Ldn~(cM<kTE&+I5 z2dh|>b250BPCi>aVMwN;K(O9ihKRPkJ-`7S5<)pe8HSUM_3hU~v{;szQrbD%9BvX; z_92HiY-k8@z08J_UZ07*Ng$Kn2OC{W((HT)Ngnbgu5S4LCWXtc`&v+O6Nic$YYb3W zluCaOb1F-SxZ+NG%nrTIIB�Af{KB&mCnQ(nu<yK+&YI@XzxP5P{*%hFllSIq1th zw`Nbq9=8=Qy*VNkL|PVw5+{9nkE#$W!*my?3&%FHAk3Fc5*%v+xo7ku2kRBM5*X99 zUrcfV(1Gp#Na@mG7&*t-k+e+Y&c|v!<noFNR-YsZXs^u^COV)&k3a`#sHiyKEgVc9 zO=XujYw872`lt5FcIK=1C^qqnx1qsRg839U2Vi1?6Kp4(Cv7xh^<KY$XMHrTyrCx} z&;zhld$=UX&>a?&38E1_d;aFtOU}REA)^}ve`bUF$f0RqoKi4KS9JhQC=9(#@0N?5 zdV)vBUI8wqsol~iDvBF(Mf0Ig7!^&r{=5RZ#ATK=Ufd`gTp+|K2MSURAx<b8s6!54 zre0I;H6c`?VYEw)taleZ?O3piy2+vMu95`8v*Gpv0Mp)p=AeVi;Mhe`z3tYbQ{@ZH z*`E5g?R2!o(TBlv{4UhvPi?#WrUN!}L6hxOQwr6)FJND_`BpfMb}SefT0x_0>xN)x zBywY`G2H*IWMe?NB|K`*LTnCu`(Wa$Hx4#F?qsVs6lm(HFG`%7a$?V+6^xCCU~D|} z#zwIuwRuO&tWhy0NP7e_7d6vt^L=)Q&~xZV2;lNXB!eYo`x_mi+g7HqMUZ_0gS?OW zJjjXn@Tw$~EP<6-ODWk*T72+2lnkOkcERk;reh`2$F~aGN0rU>zM}MpA&Xo=ya2%c zaZzz52STM1k{}l&%?%Ch3`~rW4U8X-K(pkG8rJ~ZShc5N=lj1{>)r*19GWe@-O)i} zJDCMe#;{urCLZ$YbTKa;_A=xOaa%f|Dp`?mVa2&KO+Zc!*$WVIXgmX>zccuE5^5eT zTXqZ3z7F>9*h_zM9PqX-FN<lFD0GqrS!RFi!6`2KfNlIUZBZE(5OS!@^aH}-;H@O! zP;AQp4F#qX48@Swbj|z?!5e5i8f<V`HJjM?zojb+7+XkYvie|uFA={^xg)GjJ9CgZ zUJU0YFEP7@pDC4yWNJFSAj*y~<Pt2h%Fe$XTn6pt6z@&+G>YV4+2O|IyN9n2%I(B5 zH?EA(O>_mcq+oS6nCt|{Nd|3KMvV0{nHS#cT%7lM;XvVe8o^Zqsbn6mzzyPC^fPf| zOEMKq4bE8G39)RWsB~MK0Q4NL%5$5r%N<+AdvpW>{m6u#A#MemrMtL=XBA3YCF8?- z52Jc}`&e^tpX+_j#(TLQhPC??X?ejR59QO++yY?Zm@h#+qT2vfFz`&#&ZoGbk`c>q zh}$C}4lC%{_SZX1N7Y-@{sU_Nfq5~$&Zor~*C%*0Kz$Bu{Z>1k*ewD3FKB%z6raET zpWmJS`0DiC+jp<+qJSLu3=#5DM6n#thP;m%)<j-K00bqy3U2;0zy-EfBgoXg1l&nM zOj3?fNY<ywYJ@>c&D)dj;Kd!k?9ksstE)^va#-E!!iSwxKoi%D55Xm<ypohcxN`Hg zrRD|y{>2YJ*e;3(ao}J|Sb|}zxhuTC(ff?A3C77TduEi4qHUf@{VXw_;mtZ9(t<$u zV(?~^HH6KpQHR+4C+;$5s=w&>+br*|pT7GZv_5p)TxR_%4nW}h2|yMp0K|sF)xkGc zmx&B4T&YVLk|wYXIsH972=Xjt(<z)YU?H@Z(J|Z(sR6?w3*%A4`8*tu!KBImGp)L1 zRZO~rG#eH5P#A7g7cLbo60bY$_Xe>DYL!Q|eRoLv?$A6f0Y4*0-sMmxIQ5f-k}Pu% zJ482C`%kz~H=r$ch)XCxPtXA4&7w8qK~)s6lqyu{1%-f9dqua;7zrRb7i0j5N-0AK zL7Mt}ir~%7(~C=rBC?PQNI@2mVMoFV1@S~e2pv)tpeGX|hL}`nUSl>3BH=)&D7dR2 z-gszlpy(UEKZ94dE2vI#lSVK$gjxdZ6X@|JXmVpe0yT4JB6=)^)0{zYPT?Xbphb`m z&!F)YdU9ZEflC}CKHT1h-1J1nY{0U`6;J&p*qa+Gxi12Y?Vi4z2>f?&7&&A)7FXo; zo@S`(gS?r}5D@U(o-}9zPLS&otxU3T#Oa#iBJMi#()aG(G4$amBeN|OS7<WFnsypC zE>C{fLD+zn{RSIWGNejLEhEcsFqSv$*mR+QiL5E^r>rbhyWrWI?fu?<Zx2mK7`_nt zZj;)iK?V@O#?|E~Lt}QcNnu|q&0oFsV9#r6J=Tj-RtoA)Kp4h@O}gQ|jDIQ!Orvxw z#%*4wOw02GtpO)oTIntAgX@&u<>Y@E`xdBvIEXJ&^lPLH>BWO8L7WSf8&dnM;@9Q1 z)a94fMJ+hNt0{(ruv$uByml9#(fP~nGKXN~P0yiEb@watdYU6P6~sRbvoJXJA$wlG zGFI{5aj{4aP#^ELOu#m^ddoF9Wg{@Bo~q+)2hELqHjE3aL;B$57{}i~cyi8xdU_rN z3CC_xxY6ZJeBk!?sY9pvN_amQ_k3gpL3%;sWhJCtkyA(-^sjyKA+LDVsDaos-vr?L zpeNh4@alj1BKx+8?ObWkIt}OOO})P8fh~#}gM76cII>>>p30PhAI6B7si40DhXSlX zys)#7$7PKXIv9I{=9UKW^#g)P^P!+Iz4TU7VU8;JB5Am~F{O{TEHws7plx8N->o9% zYe5B}t;6GP*fRyAeZmY;JoZS3BgM;&|G7ul9sB6<m_9;?Ox()E!6ke)?-H?%hofyO zR46W7V^M$AGjo?e4du{*d^_NJK3@qJ%3<Zwj_@_yBJ$>BLR3K<hlO@q8kUks1+9{b zf5C-^R?%58IxEqyMd}u7wC&vzHKBA~Fm|$NSh(}RI3m;-O~La31A_Vwwg&kQsX5i9 zAoB=@Y_MiQoO|Tp+O+DBFJ%-*R3kQy0CNIhwRu7cE2wIW=Xi&6BqMD)7ONlJ1ULr* zwjp8P(~&i}V(n#v@0H#ByEm_1{7EKHSxU*7zz@648j#v36E9i}5#(>&&uXg-8QM6U zGRPW%9e@hCN=UK);D~<q>xEmyN||v68UvW035F6^gqV>X31c{Qs;%xtIoeE<i9IdY zt{6s-v01U>RC{PH`A&AillHUDvuaPVsu7F31j?1T#ot+J_CsbzznN3KDn|c(I4LiB z1Gsti`bBScwe_Uw+x1z+oAN*X5Z+CW;r#s1y`!TV|Mz|P&zJnqPw@F{@;^V*lunhh z+0v~j@6ugMnp+-t6E)4aTtG+>M^=H^$oLb1FGN0K3osbOz^~Y=2n*iX(+bSr8HRl2 zpaI<Q3Eh-TiU}s5J29Yp9OlD%DtIpGMFP%-Oh2Q{xr`Gqu3Q1=NH8=DW=V~a|M~au z&?6%vw*%t&0h>NxD9Hb!M--3mI!`$n+C8N=*(->oJn@hpqt$83V}^3nu9s&hmltqt zLRgLj+Q~ewau|YdBPMU1RuZ#rL*`Z{JjV7q)y%)`78-E6*@b|Og11H97d5L*dq^e| z4W(9HRVVj8pWLe?I@5K&wX)xZ$<DZmgM{a{$0Y3tpK#__<w0zJkU|K;2ZJzz_D9KT z;T~PeVI@ZAuujo}4oH_7WM{Y|dhiblwc;&VwvONdH|qdAT?agP&@8M(g4gJ7+5YSS zJR1%pwnlfQxeJHfg+m&`#SN|plyLlrV~c2c;1F7Q$gK=6An3keA6Uv5rgD#Ouk8?O zqZROdapO{8CMkd>MR}UeXApZ1e$(gQKZ7d$S$>-FUk*MY{>%RH{i9g_KR(_+{G$JV ziqB`G|FegA{>ilb6~Su{Lg6@9zWu$$=uh=P$PJKT79a8v9*o>J`dmSH*>F#ZlSs$9 zW@oI6fZtd=h<TZa8L+0aU_dm)UUW0GoVlj5@4|q42llM(Jwq=hLhx4l7ib$jl3k8( zT~;Bcume<J!TEiHi2zY;F2vRGKY7;AvtiM{Dr09-5J4o`Pn+h`l!87&qK;`k?&p(K z;uL_?w#(^ytcXiZ+b8xqH@@dDePn_h4iYZkW#t<+6L4zNZ47c9v$L)(*gM|o1RiOr znwYUEay*eQyD(nigr!rNE`Tqb<{8<vU8cF4H4N3k$UAPE4+rj;X^K}EjM4-*HjH*y zKL)m!l;91Gq84?M%4J(g)+a}nFqlw=%2I>Nh0p`LXZhIb*EOp;EB`&azIqqG*25wJ zBs}^p%(4us=Vl1jLMfhe@gP-G-{FJa9y@Uo;P_(DdFm97o7~ro2^$$^y6SL+5>weE zyg<bms&0f&Gfx&h4BR;d0%uZoz0V6k-vls%qQf_xQhDBw=p03Xhxr)TC`R%3A;if^ zJ$V}TG=1sFkzKs4T%0RRp*;saPvrJSvwGq$322h1afG7X{<)JrOzh%gPpV5tck8?Z zKpZIVa@&5<hNmk_`*kJW@~)7W8k|oSD3!oH1yG>i{sD1!uiJ$LrF%^w84B9r#H7Ie z0_3qoHjcr7NWDw5P<lhmFta_gYORv4Nee0$JMtSgQnyP3y4^k7!9ZR+yBsNuKY$q5 z@~>kkqd~>e#)%o?nqZd%8lWVy)3)_T7YiOn(5jd3K7aA2lczrlW{F{kh9^r=i!#ir zs(aYFT{(_zAN$<L>`V{^Y(Ia%O)ZrvmP`o|QX7reAxVU`mqB~ByIIq_UeN9;o7zsD z(m~1`QcI(O@VYK>1>`RK7AZtjMwmQ)FmSSybKb*g;z%3x9<KKRx8`>Dq^ScK>CiY@ zykWUh^hd(_NMm=w*;ow-Nh0dmMSd*+x;PI$Fc^DA+*Nr+#9;ZjYG_a4ax^%8w5g|* zB){D~uXmMTC+yGoSFdLq>3ScgLl6#9;=I}o;~+lu?_9rda#X-GqQCLBrTQq7fa52b zyr+=ZF7OwE+Z0v+W?d_x;wvruxtu0GF^JOYP|Ht;NJLkd?g^eNf0=P~r_&~z(}cQR zSzX)R56y$;1xc{z5kpz!K&E__J5Q!JxOxer>T7DtwQtP-Uep*0G%t<oLC4Mo!jX~p zRSk=69WO*Ug`h?Ey4Uw4T&Qc*46(SQaDG%vlT7t`)VTQUG2G>Iw_&HDsxA@p7@q@D z_hL5wHJ{uY1mR*z5%8O;;f+=owH0Hgh1M2XHBo66EL@>HpRHo>tJMjl)vMGA<rmdy z2V!;sLy&<Y;0{{c?Eqbf3fk-fnc8S*nmSuhSXr$axGF#}wGV1b#~ukW(7hU}g;U(F zv&$V@@pt53G5Fmm!%(Qk<w;Xz7vH6D^M>}ohKJD9-p_XVUv}efzyF`R@881yM-{u= zaTVH|met+QVJt|kU?0WnAC?YLwyF<ZdEnA>!pgk_f(N;EFob9zMg0J#K=iIS$gVLc z)ZH9btQ<2)^C(io1yKwN<QR>Vn{OdPgb`OL!Y#UjsY6pRZNQZ^##<G(Pf(2zN<+eZ zs8cGMBpv&1L3TMo>^O)dj&CeUj04s|lAj0L1=Eb+ArbCCv}PwhuZFjxS!*FrEdhPr z<rv+hbPMJVpaAvp|Dimka{zJf`GV$e_-F$kG{v0#XhmA5wnx-ZbyRSR@jDPl1e)i2 z2br<;F8L*ZieE80BWwV^Xhj)XaB8vkYAa8o2^pvc1n&-1(D026n}*SawKNNz3FcE7 z=t2u=9+bQtk4}d!T`{5*0*uh0H7MopE~A`awHi6%mey;KpqY>Dxs?wzuHkkGX+rbd zV}V=Dr{Id$Od|gqveU4UlIkdEL(R=Z>w(=s;{lNQQdS=koI|!wmr&{C2OOK5bPC^a zJg_!NjMeo)Z>@20lT5P#I96dlQ<PL~ty*0PtV0aG<ZjHaA6<F`q2kJfAGskD6TGi^ z7=l+Y<1n*ijNOPxY%_;Z(^z<<1l0LBu+o7{^~2dgfBRUBH+t+e=o7vhf&q#tBYeSV z!m?|~5Ors(YigL_;QOWU9cZ0}M_4U8FMQF{b3&EPUAl<NjY6<xb(;(Xg}d<wN@<d_ zgcGF;mmWgbVu$(OCUx%GUY^?KDk)dE%UxXP6lAh5*)cBs5CpNr>(?{|wH1R@tQh$+ z6sF$NKtt~kz3P`?ow<!*3Zu!8fDkYO6_zL%6SEIFoOzNyh4xnAG=x}wsM!FK17WgV z;9n1p=Y*!JMG;=@Mfy?VG_H7#W?<+AOnbmqCTazvEmJp12wV1!kB_lLbAx!NoimyP zA3eby^HL|$$YC=UwD)_-pLsjr*Q`+ve2_Fnts=L$UbIzhdkApLL{Nt%G#8Of@E#gQ zUAxwc5sxY&6$YbS{aDS(cKwHUfPC>YulQ;9{~mry|L@-Y2L6w|`(OOOpW^em`G42- z_8xpr!frKhZXEBlrtemAAITL#meos_D`PJq-J#W^hl#jo;N+ovV)SYu%o5*=IPGcd zQgT6IgEs(Xn{&ECwntJ@RNx%{N)VkTky&*ws>;Emo`sl=f=(2p*ofy?0REEz<_m&R zu~(e%N2jk<6h?d_S5_+T*MzZiE@?rxK=4Xw1z!9d=tU-QC@$j*UJcpnjN=B*Q>ji6 zcJO9IhY%FC&E7r~C<kKP0Ec!><x2DbAR(x2LcwSv%n;Coh>rj@r30i+k@-FG1cHpo z02qsvU8XJ#-=}&-N|pC0*l#bY%Ti)-QFF4I9#Z7dAcQuEj;wbY2&AYkNnaw)@=GSS zze#V=7ET4K%aBBG+vm~Hb%%43cr<xxbG)TwQ`me7nvQmyddH0f3zAp$P^;v;DfLR7 zRL3;di8uLEA!YIJFhwE2N_xMT21e1P%OHi@C-lg@rjEdMPi{J>nIa*e)W-{r2o10n zSh--$nyBzb$U!d!k(FQnKgjjS;|Puxp84A5GbfxuC$RUa`5(m$nuxX#9A~hjWOj}8 zbAmRsf@0?QBguz}9lMw+6Re(K%7xB{!=$CFc7^_h-YW1Ad1VJCC4!sWXJT^ugT3>o zTcqd~Cw=VFs&{!?NNxW0Uw0CHrFQ^q0XIE?XF#SenHlUjl-`q0v;dq#Nltk|aG)k< z*X)N#IcVD@k>6ap!6959xX~!+D{}p?``|{<@<E{7j{DtdhHJYv*eUJ^y0lD~7oZa) zOJ0GU%>IP?V2l)#@Jh1HV#Z<)*lbmbPC2+TQp65I1mPF6rfp1k33P8u>Z8udX#f{{ z`>!PO3FpP}0MO24YKIvu?}Uz7$dE_zFX`-bApZNm@1PriauBISc|}|obB{8K8(uzU zI6mi;T{>7TB|a-wV@|3-;XHPCOMB5wBhn_hoYTHS^cQccmBIA#1m0o5fWoW`y!aE< z6vosz_n9Xxt?e>=5j_yRE1`EGq%NLP94&-q?;zPY=y=<Y2|;`f(+dG9g55Nn4R{xz z`xP5NjIp;(G8+r!6$BokPSjPvD2^zKSZN4}j$uo|X@%&-m^m980MJ(}vkoSSd_+M_ zt|t)-0B@R?#WXV!|A5jh(2!4n4hz;JMV>E?I*-@ke}q4WY%-9sf`E$;NfZJ8ge)ll zQMdcq4H=knRUi&%=N#qqJZMkF$>$KEk`qA}NmJ*~V4RC2P%iLDo-!UtKC;_9$1o69 z<iI`7LmF_Tcu9nau|S?-M<}m?_9z}CNzhL;buse$qEQij;}q>x2HYN89fdgE6rft! zMcA)+_!9El^WdT#@!YE;fw|se1Y}?gPb-DKJx=63E(WY#EfWj4DkYDf9tA%ZfpW>q zv4tIPgmPU;BaS37&Tl_``|RX|!7QP!bU3+8&$24+3qz<w&>z&t_*05qj3Y#X=L-Tz zeF~e-8~WK|&qHsv`IPz~QBtx_`k2@c_GI5d<x@a{vYn+HhWLue)Z#R=?<HE%D#+Q5 zu!^C!04s}D_Y~Q$?Wr)lMc0l83fVs<d+Yul{S8(V^UXKzZ>IC^u~~LdGN8rbK@YyP zCHMB|->&3%N(Np0=U8AbT8)LD<Nf)IF>vuGvj2gJ=B{6{!2Wmt;JB9meYAhD_r?DA zDL$IqCH^$-pLq|o@V++}_M4|^M?BGwt+_`(3WvQ&w8Vc$-Pt%Bn?*C@n{JSjO%>I1 zU(Kp{+1#R*<ZR=Tvy)hC*T$U($(P%Hwo}i=#xk2HV^ckpk!?20$mW{Dv}}B4<+N<7 zswp?y%*)Njr#4B>#tK%;(EbR!Mh@tB*X;LXkFUU0%}>g+VSYCMc)<yKG3s<}!zI znK0{`OC70FTTpDPIjx$?AGi)JOtIqf`>Ot?Old9_cc`8e%_?8efcSNX?sbyl%wJ3O z%V#t5gYv$`iOU~jUD@8Ouy9td-PRv2ucmTtUN&Jqr&=`qxy<8NW)AbY(Vwr(Cd}vY zIqith<Comk3lxoa{E7{D(c`z&Y0^zQO?uppwP@1g7BsM?x4v)#*7W$bF^RgXqeh~x zp4^l@T~)<A>fY9)dDOQaGk^M4$834l^es)8u2;$&>hx#?w;n&<3aHZS1-=Oi1Z3s4 z!cU%T#cb&HGT+2y=GXZRmaqT*l@Npp$@x}Hz`eDI+B{fw8<L#+y0(z%d~02jb6?TA zbmyvynD^YQ#(S=6TEu{E+8EI5bu@9It7%=623@_Ukr3T1Lx`@o(bClDrjZ(5Z|=27 z(v6U$tC}`pOZT;G%A2mL3K`VRN(|~-rnjZ1EnrYLt1zes(r*Emx|zeJ-n@n+wiI+6 ztNJx+$#XO#tj;OK`l+o|DARd}?tnL)s;XQ!HXu*u8&klbuB1+-vLohEs8cm_dDJB` zb`Fm^UqF{9Q#Wm7>QvK;jOz8ClKI|`_R6&CCZbi3W^N^Jbz0STLaxrk!wl;#KzTie zbuakWCRbP6wuxpva3ap9S=Ti!BwROJ5!d=-Xz-Ijrfmf*>#hW@zO8^&eJeNwH{?>+ z5;|s*Y)}K&XH}2&Xy(XWnPk0QPdn%O{MN6;xgJ;L^3Jx3tF1*$>sv&!zSU68+WhMA zI5g3%`?XxBTaR0^I^BBQf-P737Ole-IM?g9tR@O}RSJ&DM(*`3CR5+ijO(W9)5^N8 ziZkgt6p6{mPnl@_v|~=WYw%B4K&N`OpE`DR_!*beDNw4z8*6nIS5V0DqK6ex)%0J_ zosN}J%cJV_vjL?zR3bYRD-6kvRgbc$FX84qHK&@;8T%LUDTj}T#K@<tBDb=l`zM3u z$J4nsEqYCs1T5)hHI{T$nX~ak^?Pg9Dm3X)CF`@M*DWX^iF%F4yop3zRT3?mrrxf@ zqFysKHIb?tBvlX2^On`IDyw>%JuM_zH=1NU9+URAtj)6CbbQ97>qbb|!&{EqpNl4F zi_hvUI?lI<W__!PVLhs89^tw+o<zbSu4V<sb@gZ{R2J9SM!6oHE*o*JtGb8-U@g{l zU&%u5^<P5T^?OznE4KAe3VXu!Q(W|?j%oeWv8)@%vaWQ^O$pXjBLYR!tVp#U*yEUV z-E2KpWb03QTMJ0mBTImyTbCpPsqe{rqV?vALdtbcabL)}9@MoQ`?{&Iuj{qvdDzu7 zE=|F{MJ2Z);&t_cE(Iq`0Fgj$zrmG>*L7Q&%y2ad_Rv`6>)slTtF4tN*!AM9ld<dD z=Q2F(TMZQKTcI793Ciaav2O(xDEjr9Ic#kr_V@}|qhwcopU=j=rHI(KA`W)-7FUT` zi;Z1hnnBHHHg>Zz8@s9qZEH1Nb_KYk#$ZEAcJ<bPoZVgb6z#f|>+Dg!7c^l-;&re` z9`@Qi@^ihl_`-LaFsx$@cSEyIb-m|!lUAyAmPU5F%pq8>i;VSH)~O<<S~r_fty5i^ zZ{4iLw=R>mG2yyjaT{~3hmzj2uA3EE*R{Z}^RJtLe_abMpk9BBs=->M>w&msYU39A zb$*KwuWMV~hMepAimBMw&C2ZSp?a#(K33#mk3{GkMs~A^kv*zv0XKV~l`cukzQrZC zJn^|cl^g~7TD0u717eBxP{C!Ivn(S!NcyAR!l<g{B6W~gy=S&Or+QSKr&C`g2uLCl z?|^ZgMv4g6d(_~A-bzgB>qJlKx!#a&T~D|sUN<Weud90IQ?Q%)6zs8>Yb9gXZum`j z*tH`yWMoIcHvOIr$k+pU7t^w9ShlT;en0fDY|6tPn5bBvwUT9ZMt0qY7H)PkhnwB# z&sWBAv&TQwx!L0q0XKX6qvmGE{b==0&#+$KZAw|$kZPSOV!m~9JFLaG?uAM~y6&LY z7Ll&g^UE-=o4L&ERL=_Z>!y`{o&DX5IoPeN*YxXK4b1D}fnPwsZsyakON&<EVAoL} zj)R@*SwzGxOKd|Xc7B=Au?runqGR83Ozc~&B<xg+W@0yriCt~P4M^BSF<!-l=F8Ht zt7_&Gv)5<RGn%U|ZOX~6+OwcD?d<GfpXTzkFYeVHaI;fIl~>p{pk>!1!|IS#24n8^ zHkC)G+-yR{?gw~DCU#yOo71toiq_&}=cn(6m|dE(3OhSL(?HQKwJqXlmvYOJwM+S! zv7Nr(<+;2Y!geuk7-4Pq@85*5-M80W?-~i))$2CnYS%_w&DxH&tiak{GvF#vpOyIA zwf(k@$z8!Vw+_S_B<_*vIEo)xjm|x~|2Gr6n?=O#+KNvU?+yK3o!z}Y=~D3>aJ%~> zU_*j;sfamb*JgS5Dy+v^U6bmas%qhTml~Gjd#AeQaK4)*Ip3+GMa1uB8RB<VWS3=s zH*M_iT+dtz_>Yn5b<kU!Qnyr1*#1@M%(mpcTQP|l%?_`3){55QFC)3M8Ht(r2|SaT zM_g-XGJ|p5@3kf$E;W*OKw#zt3jpS<%VNe$vw_OYG*X#urPHkz0yBTN4q42kZHrjU zplTKaP5fo-1X_l_%pVFNb(#7hVlC5;D8e#jzgV55Z0n%6CsDw6z)!|2-jS4<^-0S3 z2vAIA%6+~fQyE(_YIJ2ViL3IJQC+R1Wh#jm&y_9aE8A+ID)YOefv*g|kNL`ATdTZ| zdb03RLh=rX%J@_zH<wDISdy-cC#0FPtSz5bahCa=5YUx9wp06L1){Q=2D}z!nKq$2 zXA?GMb=tDnP8>x)#N1_%nIY)OeAY5w>6Y4lTaLA?_6A2-reClGRaxUutVLR;t=4Vy zWu}q7Ea;49F4H}k!&$Z^L>LNYfu&<(zgOTa(^I=Xds)yV<}nMptSHQUpC9A5PnMxA z^Yy#STsSC8(w6CpC>L;D0<*@E(^O_Es%8O|S#-yXNX>$A4EW5{NV1Gsz+t8~!eTZv ztTTFjNMTlg|03El-+*-q%z_CFsLV`6WfrbK&0?l^-E#b8>aAc}ZDukHUbsGqS!g`~ z#W<*VeI~O76|X^O7WQ~ECbMW_!@3vJnMJE~A(L59elrrYX!io087f5frn4qP*@hQd z?%ZAQnz6nsRx%9BT*PkXM|LA(Gc~LM#hF=^;!IUEm+Z_eB0JO4YdP98(?WX|Etw?< z(9Bj3Z33S5OpWuVjAwd;6!%$EzvgnE1tUF=1udSlhy|^wJ<IW-)gm2KRhuxQDcQ7u zBhBc~S9Pp|WjNBpN=zGNnx;YPm|p_ypnH)mo!1&tq&2p24T`k5dc~M#mSjwet5}9V z%{1|+#T9Kprxw-J#IDvff~&Ht#qVh$TN5wH9I~~zCQzWa^aO0__B1oD#XZ`9ajmv2 zA_6ugxHhF*Yg3%feB!m>>e<A;wuR}*?VM{tiuzK-YkGeN!B+8wq(QK^v9ATU`H*)_ zAD$rtn^~5D?J?1>Y0Y<Po-pZIllN$K0yZt@V=6XHCb*D_O;uEDAMedI`PlRd6J|Dh zA6$c)Ewml9khGb_ByHiEUz)DXad&(KZ^>aV#{X;6NjE14qIw)dkTZ&|%n-!J!a7Zm zDFvDm0SpDZu&p;65&?<1HO@F&felCu<(d-6tU(FHcGy;4Ak)kX<Qah+6_B?fhZ0~7 zJ|LN<W>O%I4_=ZL$U6e&Qv+eKJK+XmKN%AQnN0|SsH%u1$gIH<#BFM&3L@hg{l3*s z5Jc5%31OC#FT68WAP3s=WI0=k5(q0=i5Cc;xD#R^ai;MNcWrVYzv4VYP}tvPd4bsd z+aOR@B?qFKG((VClOZVdU}>5lvl2}Z)ziimBnxU|vLJB}31d(YkJG>yL~GzKD1%r+ zx2?mKc!Q`eArCSekO#p5chFk_g?ClO09$$oEJFS`*^Ekv7eK%#q#LyypAb*LJW?UE z45^Tk4a+bKnO0^Y?>}9QUdYtxg{Z0xIEIXH3@N>48KNO9y$aJ1EMBX3E=Gc0X|Zld zH53h>L>H{VH^fV|iF7DbTNaTHaYZie^KPhzu&T}Yhj`V7Bt&Kn5+ZI)or%aS%S6QI zSUVk&S(=W>i>kStL}mdek%S^R{+}%k_`7A6rXvz%Z!ss4S;$Gm8d*q86g4cOBcdg@ z1|N}epZ#O=#BmSdCnhAqk2c8kz)<0MiSW}#P9zVEr{=NH6Mc*;vKP@cjuTdJmSQMb zo1EnDP5pu&<o}_20&;(UjCbtq9f94dh5rXX5&zHO;e!YNVvavXW8%+0IsZ>Q|NYDT zJLP_d&wT!;y~E?<c>a$b9DU(``Xry<BL6!u0Ff!G3+{SmPbkK#FuwnW*ytL0^u~59 z8ra@l*8_(4{a_d(e)o{l)1Et9PvG!jLZfD)bYWFO1g#PQ<RUP5k84!;;$#z+dx^g+ z+fkjN=ftVk9QuNIuvD=#mvdwoyo5Z`iIj-m28sxb$90}@z(^dbU~9Lx(IJ8IJG}TL z$Zb%}#@Ff8G&MReHJWEYyvQJyXh+$#ld(%*|F{2U&?i``zwrZVsMWsJ*B`Xi3BCX` zLi}BSVDEn=qPGR_?b`v<@2!8V-hqXBXOfu#^_A0p^A9|9wRYE<ZW~~4n$54KgaqAO zsKyrUf#1VDFHlSE&1ZC=xG^{y(Rb(7B>DyfPF%=EV!E#`e$C@ju)&4zk|^iPAf`lY zW8Z%N)*STqq7~pWoWQjNy0Ne+U}zuS6UBD)VM4io&Mm-fWE46PPH<4|G$WKIOo>b= zW{@uYbRp2*DXf9ELUA)57AfGSfkV_@&Wm0fq37o(9z)3(6L`{Ace?ij(7pd?74Kbp zRoT1$@bK%0dxsHu=l?*ggzsi!h-J6uUo(fNedfPYU}mqFUTi%H|Ni^&cHY$|*8lvB z-Q7DD=zm9h_wPsg-!ba{U-Z9^|M^Ypf1jzsrxZHXl}KlEDqC}FTUEBux9y!>@Lwp9 zIv{@5!Ca83=xxxZ1~rHxNeMBU)IzHiUCeR<er{975}$n%^lHJNs_yxpe-95mGLc|L zcF?c8AkbNtBbsg78v4hkY@v5S6bfd>%{f9fJ!rBNJtz#vChVZA5rb-FBAV@{tss*; zv(n=6Fn^-X`F%d;_oE9QTvl3(|IXcRaHH`|*j6<>A&SI-Y`>P854h$7sQG|vel9Bn zK~5?C7DE8Hwd%XmUe^KCb%1qY`UmqhU|Y;KUkT<se+bVX;`4u^BuxhJFwaok+t%9s zoO+I+o+IiLYlo%nor6%6>%g2Uj-iTUtOD*(FB#BNRT3!rtkTb^@IF*{-&dGpPzWTY zwLkL!o_XM&d6N;yI1HyuKmYG<UEBSl&3^g(mOgd+@4+Xw{~jLh?;Y0czlZm~=>MPM z^PATHO?UNsfY&W1;M^}}4R(g#-gz*`_{$p1T&u5WFUx8!b*nH&aQa6}^{7~;Du}fP zvN~r)6t$I(kVMzu^3v>mCBGPRL^p$zgz3Z>S0^whC28|T;>wy4v1V|SFq*;{sfW}? z;v?V^fcFilQ5``>&XV)gD!&i|;k$*H`BUK_QkNw(QWIz}8H4ReU8mD0xJhQy91^JP z?7>%l@B{-2;_F;#D%26YjI7kAaZ$0S8Gxq@XegkqlC4%7J*kG{pTv4CbD*aWzThq- z_SScWkw?r4_{=ewU}z!4EeA<K@Y=`O=!u=w$Gi5w%pKx8k@~!tL1>U?#L@xIh`nO= zq8r0uv}SqL+I9PmR*`v!!$ynqP>pZUAe@Puk;VZb^>%{Jd*s2v2y||j9+R?z>vI=p zNB=;xMBl@8+ODK=MPI_&pt@m@^Z?s&Wt97}qUfpFnEr*>kkjH<i0{3mEEBGiG8-Al z2eM%>86`jKBoKLm*Hwg!9(QMDxGH6>zzFfQ#vY3&3H*qiuxpf>Z(90lR9`FC+2p6D zApjtNpVcn#mAjOe+SDLBt}ul|5sY1*D=R?s5&r6|Dj?E~#+=RIZ1F~1Oi3Gi|K<c& z0AMDQeZ$A7<pf0qqu4eC0h#%j3Hku<xRdAvL}z5dAt@c#eKCSKL*fT(dj*tDGQxwg zduEuHmwaO<02thQupok!#Yi&V8!^GO44L>!m=Rn&WCC(IM~qD`Q{@4lnS=rFcF^=- zLtH!lXurog5(-A*)FT=F0YdPyp-Di)Vd=pN9&^IuG@F%9ZY3%%w{SVh81EDSaS~k- z#6FIS62UUhF@g!Y1TfW!`(|52I2<Fu!cYQ#!~*ehK;q>9`zOpmskbzE8H1}S#0bT< z`BP{JIG@3(g-Ecay@Zd*%QzTvWse8d6ZBy{-nIX-e-229;dlIm^Eg3BEyKZ`oST<m zgtFbG74p|vHg%Ya5F(gxG&HX~d<tfhSYI)63qbZN1O=tn36=q7+)>gq1#Kdxxr4_; z78za}Xai&-SqIJSnTe5U$Y88I8zIqOH<&Wcw+caxLZ<Bw9!)Aa&ETE3na`ewkl<(b zxJD2?p?#|^Dc*L7fGN26;K(`4D@3pItufoSskQ_6AfKryATxajQ_*nOA}A%`PRlVx zJ5sy5;axaTfy{=E(2&7z347uuGf0K;Y#i*5mI(h6Lsc&es~Bq7BglP`bVxkyr$ymR zv@~Hp5$IkI;1iKJ@g5>9xjX{F31TuI0ozY#fb+2cf)g#Zv*y~PGQDsTfnJ9pscwd5 z<J>N~UgQI(q7T`oxZgY6Whu^HRJ+axYVE^SAXxgj>=P%}pe^6Od-s|eH`OPcQYc{L z-VwyU2!aI3OTM*Vo@E4wBfBQAZyS|D@mj?MU^J&&&X98pu>UD&TiL`+@`;s8V+z)W z6q|AeD<Ykw$orFXNP!+6=<vhc-J6@6p0}p#awl2_>3pd%f{rR7%bS@74Wig-a1cue z?9MbKNhJ(JW3O|=2%o%sD~@C!CTARx54Xe!WA{LI16X9W{+(m@?EmWS&0PX8%#rlN zk>@U^1j?-Uama4u%2QGbamuI=SHdfZ7mGq5Mawnx`NwbHl8h)B4AyS0WQ0b?Ql_Y( z$M)q9(L+DCo8{<C_428gk>@ki&9e`al<*e$)CNxqWX@7=gUPXVneDgf=qycWei0WS zY?dv<6LAGhbwiv8duQL34mG!ScM#b|8_vo@Ix7#&_f{%OB8EK{<CF3!<>ZV~5|5g} zP1p}etoXDmzStpHcQJJV7RgZV2`UkDRth$vs9Gte>0y3D0PsgAn%s44O)4M>LBE*z zB~mxwEd?c{l6s0-iJ+KbmfqQI0*)m$2z07JR5g5gdJm;3l*x!8MFonFktrNl*`Vky zH08918$gs0tBT#$-l!i+G2J!CGsTCjBb3>{efW@249JHMayDIB<#k|1#>lD?(~R-I zRayyVxRm`oSCt`S$qSD94nv;i3bS3j+wIa-XO{pZyZPbQ_jet_IMot`O;NB^Sm!C% zd5U$OQk|!&&QqzAs!Zk`MZ00y==I1wOwat=!Jd8Ul%Dc$(D6V%u}zT+l2QZelM+Ml zr=1lzhEh5`8XT($5#+)lR+JKL=RjO@%5cUk9YS`_&#jgU*fS`eXJen<YR`lOGeR*X z%o$9k8cu^~XK)pcC^(7j4wv@JA*Wct?&El`X#csquasItncK1jA=-}BC#M)DE`5zt z!1^eYbG!{i2@vigLa7BFsh=eR+$Eo~F~ND5=w?~Ed&WgNb(vz)iE?&k5Xb<M6%0XD zlnI>c@g*U$n~|q(o|mr4Rz_fUItNW6DW!uF(<mflASH)Po8li!LK3rGex(4k34ITW z%`jn%6g48R69A=z@HDv@aFd4Aw2n{|1lLShA>w|<gkF%>xaOf|tAaC&3r{H!$jm0p z9G8#yqBoei6(&r|PU5H@C#uK2fFYRPhye-gy7y4_sSr^r2!Fh$Ck{>OEQ93gLQH3+ zfV{Bw>vcZH&zTHU0EM6xkMuJ3MW`+z)*B<TXj2<!^>Ia%U4%=lDn!Nh4-zeWqRcYE zmGFOepV}#jv?BP5K%e;H|DPEGZv0rtQ37}+WdLFl@NVEdC!=DJ^<wShe|O*E%!5%l zdaeHfjh4zp$>d{tt+-?}WR^as3prpJ1++mh^Rz7db)wxk*4kK3_lw%gOITJcwHb-G zTnewI4olr_-)H{iRl;eeyg}3$&~sSxxj6%@U_ueWqqH|qkBY<zIqsKn+Q(u=?FuRc z?qA*r&iJCaAMKjIabQfGl}c+ep_ov~RHbyy5Lcp>k{;<|g1m%@j<`XnPJqmu+I9{) zn87^5+dOSRqLD-60|){?RdQQRLfhUn1H7OL$uzx{0RYxn=zs~&KHkGqA&O|GGeN-| zQS+F+AVL&VfEV_(^41+W@c1_3qHdMIp=upJof2eaLPO-w|B3WSx(<^ksd#ohLQ?JA z#Y52=3nDd|jw9!f3G&w&vB{1{6dCNxUlfv8=^}yv+N1<h!(0GwDgoKBPkJGmkLB>~ z0q;uRE9M4aN$eCS>b*quRhpO2kHNNhNp^?)SIR=PBW5>ig~8WobHOxiI!yR22|@Wv z{5t3s<69we7uaq0vq;mlgxkA>VAE?bxfzDe%2+#K4cP!P2GRub)ATb!L@klnjd|-F zzEwi_B@h8`Pd-wXP)9|@evJAN0_HLO>-MM|6!xfhR~aWY6F<W4e(Lg#aZ{jnRdSTK zHr^0!bjM+%fbnaJ)eH7$K6TIo?ij_EtLrn^VhPO#T&Qr(BfvGVenJ22nQvzjv|2j9 z8F7I~dkK1rpbB#YxS|2b2@w0Kj1VAM_IODt!eIERgReT}ZR8NXV4cmT&e<fiZ3I%2 zpn5C$*p$#)Niwjf#|W)m#C#{F&l3eQkl-E97JhiI^acq$<^AJ$0Tc*KDDiJ<vgs(~ zORTpx0d5K7^}_Nwlv=G6gd|+DJGq^NXv4-y1c~fV<ZkR1z8XQ1dL+>qG@Bh9xX}LK z1QZJE-U6va0bnZye>KS{c{UJH7`BMAqIMTRtxz6v^sR~Li3=J{L1uA)SyQ{na^gJQ zY@uKu>SStf)yTGkTloes=gDBX9o}Wh&aBR(Q3}T(;as5RBM^cx>%@h|m9psu*UP<9 zWlmYO`F7|U7#lHb9*4J9EX5YZTu>F!b9M<n77e)xk}Oc!1h$ik!rIBliSH%Rc~aOV zFc*@@^BW=^To*a4QUm~rHN2<896-K8&93B;f%^yGnxa#T?yywcJFuv+gnA_!y#yw} z6*^%Epp;nLs!Tv!(gC!ox&d2!+$eH5hoeTd!wJH1x@Y9&d_5~KyRT_UkOE?x20vKU z?Hs=#U8P<QZw506&9f&SG<d>}YMy+V5XV3O)J9Av%q5@-cu##;>6z|N<dOP0zF-I# zHFk>b_7(e8w#yyI7Z}@8r8;kpMm3P#UQFo(>wztsEP>9eNe4|x9Ww<CAS=tyOCskS zfdt23Wik$8ec&)I`Ow!wl87c<OG%DB{N3+<7qXAwPD#W}15T=`zJI{-02F#!vbR`O z8G3<su@i7)$rqgjTh7EWbQKqbH8En4zeuUe+F^uij+za}P?`+Wvus$KxIh2-&ux=t ze_C?FP$a?5h--iL{A6Th#pZ8#_PqP%)k~9)*iII_<z#Go4n&zPuaV#9y(<+F7eojE zIS4-L&APQd+6%|~w{5S+A6I!VTwm-HL1aSw#+O#SgNV<jEut2pd4`5#XQk$md&+&2 z6Xjb}{SSq>r(NapmFfdaVEbRtyC#<y{9<n}68Xd3LIu9|inn&1mc=w0EdEvmtFi_Z zz*kl3dQtT?@8A4Dg9s}Sh;0%+!9{_w=S4cse@z?5@tGC%7-QmEA$b)L2h$}L+A2!X z-J7B(z!-%k0Ei~5fKwDm)j<3cus7T{(ajP<?_Z>|i%bKGfe=!RiRvgO=3@4;vK`7+ zg6S6>hlS-)c%USE-dHw}Y6bxp^EDL;ZLfv3H|A}lPH1ljx1^i;Ad6{19%aeWVar8G zN5I<}3?;qf1cF(RwJS)z7WU9IaBQQ_;Lc%3M}`1yiryB7Qb-4VHjz4}0SCNa(R~^W zXKnx~WQFpHh&?qW(G8W%E=I01`c5xk^JQ7|>6(fn{Opz?TS0hWY--@8Iupi2g0u9& zYiRgVY8H>TOSn>*<mg@0np9vfLxM@|hEXGLm_m$@iSFUa;0>|VlzYN;<4;87b^<L1 zUrGeh;lq-M<&UC!y1{ZUmsi&ZbNkJ=&$?e99PGHTNe!%?UX%%k3DyjotYWlCMAGW0 z;WrdXVG4hbgN!63v8AX(vJ;ASh3b?T4@JYONfL=ybFY7cu>y|2ubiEA{Q(`TTJQ?k z30OV-$$@$JO#*;x#<<rweTO5!$o$A?O2kJa!D5bw-Q~zdZEv!5(!hBRZ028cb3)z) zROk_kGIjUUVA&Gnv~vfRY{MV{L%L@;5Vgj=LeR-tjDibJfTIBeGkB|oUG>2I9Q(%} zJF=odml7132%~q8e!K@ae6c71<nokE3QTgAPmwy2pN>yX*b8xE`{@(|L1?!lBv^@; z^|r0c3aYTI(X|QsmC(UR0F0`+P#XA3uhFfbqD>XAJ>Lqs3sh-BJVH&XJcE#{zBmJ& zY;nW|ce9NqVrH$@Fy`<GU!^s;ImU}%{4>Keo}5#VH4={D{@`3e!KSArlntc9T<&~{ z>YBOAZf^j85cd<**1TVTEUKqs2M%H<{xd6ge`H@stmEs>=fvM<k9xQ%ierK8i*g*@ zbJtQbd7oubWT_A{E3=nU7S3)HKyR>DIFR9W)&04*!>c~1Z^J{64iLQsdFh}71r!ne zHbOsjW19*kfT<%p5(+!}lAClTko`l^AbG)ynxVqb^x%fLs^p+%D;9<SI|~hpB3FBO zrifd#a869N$oe`GFok&Mu?u;YGe_=U7^L8%);zQ=%sY=~C)w{E_V%augHQ%Om>zOr z`tq5Jdwz%-P=GS|&`3S_Ey=)#0a+7Dn(!;VzaAP0U5MfdSg8BnfVQNjywlulT_kGe z-UbcC-AO;_-S`l;U<ix?Aga8>TAC<7FEzFYz5P2H*Oo-j&olYwOETz}&)@5#@;~9e z{ZZaAKmYT{{&8Hxf3*MklK=S$K5e*S{^O+6;-WEhbNs2vrBLKN2_IWS`h66fSUDRK z{~fmPPH<U-D1^aT%qHM040YWCmk0RV@v&7KtwhdoDYyM>XFebcmfx~(-`W(11#7ws zFcz+<G@B!`uxjFAS<F(fEcnzWxGY$~YTzs%Vdaau60iLIp6t;8my&;zUj?6qzCUo! zC}DEo3NH(}!jDO9^Uzhe=ph$f21tb;Ig&=r$4ueU$6R_954k*hUq7pmQ26Hu>gNFT z<YUY>k)!(QY${>P$h3yPHAuwO!9`<XxCz3j=O|&`%MDOQ87jOEHELq0QTNhiu}0N- z*9<j^pBQh{eTknKxzjWtkGgMT_)+&m0|u#Y)nXu0YDo=r)K%XIN$P%$a7n}dHFt3y zLMeXgFr`$jsbiH=b&CN@@e`t!hD}w_rQr__zcl>XgP2CeLr(byIMe98fN9E?=DR>M z<rOcGrj8D09Y|BEtA=Z8R>w7^nmoAa$B=^dWT68p_|D3`WlyNp-iJMU7kiM_g5RJi zy9*2sr-}s+tOLYBHHBy#W-T-hJ{z3Od>r6$JW(SVU~xdHl_5A>qc_Ci@XRBE+OQ57 z2jnW9QdQ)mTn~x^SFv5k?=C&mM$=+dBZ+Tb8*am`$KA*JmnXZAosVoT!Ul&FQ9XA7 zvw;<DjI}}C0<aCc_@0=sZ|1Rw)p%llQaxoL4O+YSq`XOu@-oO7P1}4u_zYg2h2xNG z!_Wx3*aV$HRUv+cSs6bgsGe%Vay9G>{OJzBGk7JqsNl5`G<a>sFdAkx7!6KrY{Akn zD`08xQQHovVHN;tppdXfU=1*%^;qLsxdQ+V8ih!Kf}ObuZicFgJb~*XXy}R>u{6x` zSQ@IX1*jTk0jh?oX?c7N(}1s`D%t>PgD`K@NNs?*p{nud8=^0+fWD#XX@%i1b6_~s z^D6^#m<W&~UPNm_bC}wv4W7d%bO$?XLpTmqmjdQ6s{?bWid6iHgXl0zLUaU6w+XDH zK49|!J6MV?HEK%%bf|hFs1A-DS{|xHRaFD+sP}Uoa0mA?yl6UQem$TLJ)@{Ct_#_r zDvH57OapjFL(gLX4?e0#XR7eVfE}tXg6=R1x})BxW#K#U6b2^E5Q?Ma43>NUod9#_ zE6b+n9AeIEs&09R4rx&nPKQ|ur-L<&MPMDY3+AGAIE`&N$PP0HvV*Ex1-ApN-VV59 zL$r?MZgD!2h3FhB19SM>=*Ey7a+8!B`}(*XeBFt`Im|lX9Dc_|2pwisgbsI~Yl7)8 ztHE^eShZtyn9~|i$7wT2hujV4Aaxi*>HxuKFCX)qIxASzHUa5yMhExox=0;VQxjZ= zSq-j(y}Rw09cCHK4mKYw2i&0tpaHmp&z;rKJ4_RLhuZ^dLU>Tavm4QA?gYn!>I&^X zgy9h>OdDW$gt|1Nc^E?TkT-gqis-#-gLr5q(!+U}b>KWyRRZi0wwr_hqNcBn=b`FR z$R1`jWDkA+7K{&&Jyzvf#!I}Sb^mUVJ-l4o9NohyLJs1CL-kjJ_y`4($N4a8;C!&E z2%_;c@)Vw~3iII))J?EHY9~Nx)&cy0Wp&hB6iKlBVtRL}{6A~MefS~5Wwa6IhrdTU z;19DN@Q1i~8qhz?O6VWFz864%V4*v}0P$W)58ALg5Qrbf5Dmnvga*Q^c0MGCSqKTj z2J+=`K}-WKh$zYHfrA(Y4wCRu<(zlxAcT;5&2?=A6B4@**24->cgQ+mh*=3RB-+j` zs3B$v)DUrfE)5+5^6j{{TI|!Z=Vz1b+XO~L>=BG5Vmy`z^x}T67KOE-E$cyt(DP0B zA!a4~5a)=T3nF3`frwx&fE^MWJJ-byQS~Sk5wkjqh^`3nM8wX8xFDfIxfzUzs!Ick zn56(kcs+nOJsQC#9FbEE4sr^5)hVEQoN6~kRAyE15LFXuNmVn92#;oj9ui+|)<O?a zmDFKGsI5!Gh-mBn0zeT`ESmvELY04MXb}@ai>O*Q1{sO^wKm*H<ZjczBZh%TsEEcJ ziKclSyb-D*h8bDA;t*zps;QxiM76JvE~4+<Qi;MD;S)Z97m41zCcKEMB?KCwA3VND zi#T2pUxaEA3=vi5#;_uMa1d@tG&bv_iKvPMSH#T472#D#a3bpIHaHP(_C^pQtk?!P zB4!O75z$9lz(mx}S70Kbsyyh`Bf{q^PImwv;+0H95P_qAO$ZUbqy#u3PO)48M}+E` z114gY0~66V*oBB9rX5j)uNJGrinxul5w3_BECu0X6L1l#tGR{{VZ^t6Gl&shUg<?? zJkAJy$2v%hKwKVPL_Ala)$&w~nWsvaQ1?`+l@LWvVON~m|8nHvsj6rrG!gAy4{$~3 zhbB|&+HfMOmO8MASqWH#s-m3lxN+;^iKu#N$RcJHWRYM@Ba9I~Jz*2X?OqdFq~2@= zGGZ2kjI^i^i{M7cB%t?`pn>@MHbogxRp~dF)$m5NT094N#55s~oMNS?-n8ej4Rqr+ zLmJVyD>iMei8&JbeggCn6QYkKykMM*AXrB0f{tjZRD&Ne%fgQY7b^iG@u$MZ;3HI( zn65TKAPKC(s-ksZNVu+MEE0zy5^sqZiUdE+m>KwK1|`8y6M_bQ8elYPdy=s<lybNT zour{7b#Rif&3kv(S_N2wpE_y@OSTZNq@mFbyLg%LcfcigH})SPb&1~P()H=@C3EiA zO1A%dgBN`HZ2Up|4+Ih*{`ZgZ4#4<$aD3c?|AC(x{>OuZe=)}&qcQR4pB(=qo_|45 zy32RW$A5vDkLUmB!Qs&t{FhJhdHk<-1z_$O%sL@v^vzaxclXbS&vtj8zk6=JfA{hS zbJW}0-F@-n7NTwu?$hH-dr^V^qD2IZ_1)~Rv;6v-Ee=2FLcLoOjPlJESl|#e>Jdh? zTIK(nyezt3e|`MN?mpIB<<&5I0!P^UGMie3`a6U;>54h;@h+7>^eKM3z){6mV80=p zuK=O!fDy{Zb~Hj9u*aACPm;Lv2<Y|fGMzwB$-YBhu>Ifnpu&vwht@mEpLUt0&Z`Ik zt{kCBaoqR-frAa`aw3Rd$}t1wsElnx_ac)rXnDb?eDG6}4N6?AR*C)-#9HxfJ8@Cs z9Ad^%2oUGt)peca!LDnx>v?^i<1msF3{%MFlRzN5JaEfD9j8`TbPgi%f4;>_XA>oa z+|02cMtcwo=_RHxP##-K*-*C5z!Vr74ijz3#8iT8IKhAv@hj#Ob8#_6`*`2pAHZ>m z&Z4x;hqn~>0)3`7@a=??`@nC(1}GQ%$!0N%w8+N&TW-Aq1FrohQBiOiw(~W!mp~V` zA->QVC8Cyg<J#V31Zq?!auK6?#MCy-&!#EZN7zG5q5NPkfoK-IRgKT5R$9;sMU()z z^NIO3mG{H_tjs1UX0f`3fawN<8FLQ#ltPyzU{{>INy4BD<}$o2pSsjIScDw+jPZk# z=fX*2XavI?58I)Ht4-0|J*3DWN@~1-G3c28EomR*aW4#dCOq~snDFiROfYl|63sDd zTO1no=^%4}?SDCua6a$~CO9%2@9m$GHDT8d2ah)tqIHpye~_%+JS5O)=JD|h^(<2` zESk6x0*RpjdQ8Z;G`!``YU4r&$Ew?(-VzW5+%89Hza(RGNj@cLPLA|0U_*nV&;fLD zC1|01{oQMbShN2G6TAIOwJNNC2J))}Yj2@{!7ZEAN5j6J>ZTPS*;sj7Tl2Y9VQI3f zLp$kVs!IYqX_Z40)ykk@_nsJ4Yp_ztgexId=&RJTe^Mnd`SApI$Ti|ej01Xt$?lM` z6g<Z`rAU`<Wi>ko&^YalV0QD5&Syhs1{az1G%z1XHU@^V*r|**jFS?j?E)0&*eCN5 zxb*)Df4anHXq1kFLUR)wVvXBSbyTJk<9#tkjx)S7=QClaUxK0pqWaK_iZY?HeWI19 z4lH;rj+EW$fGY~2M(K!y$({Hs5Yx7~dFV}Sn?;qaLE#z=<0dPI2Ag6~TpkHKX*qWB zQUb^z3G$YWw`zM&rWv?=z^eyV%5X`be}ZQaR}{_;N;aM_tPq1Pa*i_w%dLH2jHb>G zh1B8b53*r?%^kuz)T&O!d874)?=z4diS``@$1f-nY=q<B%Kk8&`ot9q<%4%8C<oji zc6kuN``c;g6E`=mja3-C^_!}rtYbZTn!GS=Tnaqx2}aS?tL!-s15UE71Vf4`si(k* z$@3WsB??uZ-qKRF?HkX~&J58l(i&Ma6dFZ|)F{K9F<&i0c1Bs{4_%%?hcF6h2)>Ei z#P76XDyRw+{v}!Ow1-Nk^Vnmi7+yyQQaOW^soTW6d^7-qvz^=5UKCTiKStaXtPvFh zjP1A2X*Wf{O4@5f3jX|V2aOkl7%Z4>^3H;HfKZLQ`}?~Ghh}g8;r{W%<3D}@3;yzP zpV<C$UKAB10+x4Z1zKSLIXF5#jO;)65BK)J*nd97=QFYYd@IZHGqnII3(x%CX{*lV z!IRp_@VoQr{uY}!z`j9}7cC$5oI5#3d|f!JDbv8}5HK->9U<r*P=t`C821T^oKlf& ze4S5=F-Fr}+bcXeHt_~a2(=pPZu@wr*2*Jk<$<*FVC%_2*vfa#q7+)4TsUyQB1HzT zJscx&GfgKD$skD`R^e%~O1aB$SQBe;E>&QRR<IPcW2;ku>pYRbHLF=P+Pl(WF-F?W zmL4BUj}Nz=9ELrHIlm<E8FxD>11eBfi*m;L(F&9#+nh~{t8AQzu9JKQs?8VG<+uKc z&woFwclVA3=l|icJ?z8t|M>9!;g|FOQ+z&$^Zy_3%x^m9>Fj83bW8;4(5v0KW{)t) zfd>?8I4v2-PNK-G$T>7h$M!$dUi9(>L!esWfBro@^r)F5fQ=8ohvdgc_WksaO?d+D zf+7I$9X4kN(8K`AQp5maCSR8qU^PmB*gK{sx@pbI{Lbv|emu;dG|(zJ2PFB;T1)=U zx!-Uz%yq%pW;WC#hL8i})UdQx=#UE?n&)p>ldKmy;zCE9GsL#W)*i4zR~|tRj<^SJ zA)RYBX)k*KWl_<k6c_>yc#~n;SnE@V@YG@a)bqTAM2+^xj^ME)eC#=()$j=N|9;U5 zzi5Tae(Lc*2cJCt=fQ(|{Lj&s_@7Vm`5g2=)AeV-@|xgh#swI(T+X$1Vuaj*S&tEF zG;4SjQbEaS*JmyMMk0R_hRA<E9_Clhq+`z`uDa7~M;R0ZJEmQM0ELiX_%ViKfNQq& zNlLB-Dw~A>6F}`9W0(xJ73*<$Hw1WzjI>19z?8I6XvR-&<U{NC@0_I#jBaFW`<a4F z$Pwjoz!SoSBrGzryft>60z1yLsvmTW0XJNHlW%ZIOxTJ>m9V4{AIe8gfp6~Go@-#O zQ-CedDhi}{T&AOmw1zRG9`E9pQC3LE^Z7dyK11JrXa8p4Ny3(`!^?Il-FeqEfKR%F zvRZA!;q0PUW|Q98c-Xrrt_41lvBh>dp)RW6jg<s2<f2vrc1PLk0qT-q$NXuQ53$U1 z?|^(~)qPh=)1D%-k>G0ibi5MGcj=I!YGo5BG)2ze>BRi#v&qFY9cV`9_w)^8_LHrT zfcPmMihr&UkE$4|NQ>Y}%ri<{Or4IFGf20B0d^RfVTVLHN;`n^M|IdGg=R^4XPUS; z0qEBV1sjD^l#n%D4;7kb>6La`OB&O_F38(NpkeKXgcPXsJc~Nm+%-b;sDXTyiK7#C zpd(yahwhZKk}SR|A_o2V9(qW}6eh*gMP!h?sdo|>5ODiG53SYq(O_H2MDV@}#sYSI zF{OaDGK^%CXtbDP+STS(%?VGmO7oJrXJ5Xn*WPFu1?Zg;GkKYW8EGhq1f)xx`t`Yl z<({)^fkFUK3}KLl&UaL+LI-*>{?ZLo7+e&L=4HNne}eP_IIIbxzda3TX<UCeG69k- zgN}2k3GE}wvgbba+;D|m)|T~#s07Jj^M?;5FD72tB8mr`i_;v_+{@W$B%o1gd4-p8 zSW~&9(l`fO0G%6zj72U7K<Y`S7qgLs&@jT>AYKY!0qNGI$aD3zgorVmAb&dzh-(Pb zhR%2@04+Mps+%kuC!D>8#uKteP$1T<B;BBxT!Ijxv^f`&A=&tV*+u*LEGw&ooi+{Y zyyGQ}j{#;55{R&zc^Czb`>6_AXc=%+s9eUAF>O`_Z0i_4u-_c+38G7nU@}cBg5e}0 z6OM7ls2CSRLrWtF(#i>4u*q{JaCrJP7_TG~LK&=$&&G1X@0>UU2fBt)WM?p6!|dFS z@vLHXrhzM@KP*a+w!@;hf*?**8V1p#xhOc&ZGe%mWdgX=grflOgAs<2DG9_3K#<DW z)GmFHI8BW6je5@|M*Gq68HA0KtxSa&kxh&eGhu^3R1?C0M9Sp$*E^BN4??0@RuwKC zmIQQnz%n^uU{ujSU3A~2lN+1_=OFe}@EHyg2d1Y<%xB_+Y{eP02*0P+At3_sD>?WV z1DqkHJ;8xS5pe;nyO|b98i85aQ7`-f0MWw=YEkrFyP}dHg7=JJqV2k#jmHvrEHl9h zj8r+|0AR(thJ+0+zBOu2YmC)D<_+v0%WPG*{~Uc{`_JLt@j>kW`;!0lsXm{H{U@^A zuVMu{{G4Ra(pH|xnNhd(VE&b(x0)Mn0~~Bkr#9yLQ1THnUa2T;(l(sMNHjHgokw=8 zvf;4ATf+@s+E8yE6ba{*jp?kTI|8Ei*{WNuF$dlnBQZrko2S6EmY^z*>h(-(<N~D4 zXkHVm$l++<tCbE9Pr><{xLmI5OrW1f0P+ednAl*%F=>@iD-f(c1iseubc*po7cPZl zkihq-&H@4oC~K%c%*|O7my@`g;_S3Pk%bBG#S@0FE;~X(KqiY0d3p(*tPDe{`>bsh z5bQL8+08L=f)V+VmqQ_L;iRCBZ8f9*RT(Pgr7QomN<dqs+#tN*`qqhh>v`ACycQCg zrQju^s5Kj*uo>$bebTu`A8!sMEzHg%t;v#*ghWk@(Z=CkWiK&E&H)2Y*QKP7_^lU? zGO8f!gc}zJ3Wqd&3{6Tz)i{i_jO;iO;xJhyn()pEC`usW1dQj_)o*Wq2un)|7mVeS z$gjBm89m;Oa`qvw%D_qri^Dfvtu3dnr?$v#nb($xzCHEelENz~BTf~SMs?2L1<3`1 zU+p^0Fu4>#mk_ZXycH}^Z^<0XP)gWezRuIQqyQ;YOg&J&^d6;#-LZ{Qkin$RF_xmh zDfu+36HEOk#A@QPBIXm@0Qbi3xeV7myznuMH}1inKpjq}w+`r9;o1Z!K6aoX>qF1h zLjf@P<GDSf%7@%e`;QO9{OtY(R++m*EjMlQ*lgCHsE0s*{jlhnv!UG$^*3$*{-S#H zjXCTcc8_-!)nT<>NcvQ@K#pP;nN$}&IveF5)Pwfz7n9M&{-Wnd0k?`&7c_oV0sOht zn{AoPE|Lk@pHv0#y>$Pex3^EdxBu!M5)fxpPrtgHU0kNR3D*}X^kZQs+-IZFhs<BQ z_Th4Waqtil$p{wyq59##RynL5!T$rYPS^hbP9Td<80$+C3Zr{CW}YdgCZy337B0-r zbNe2%u!A<SyCclZ#;hV+bA1;$lCn~yMFP?yfDQ8^*?X+`{gOZ*R4K-e1Yd`^_e2Gd zeV7c>vBS%{xx5W(zhnx%*jR}Qhdr+oCKMWY+0CvC%w9y~PZ>uzl|h2AC6;1~=|DH= z&4UThM4bs*gax0>`}(YOLf|{6G@?mvc2*G}7AXOj`J{A)Mkjdi(BZ=bMv|>k<vb<u za4QidP{OQ#=4SHoNxT9+-7#dffq*MBm`y1-K5>Vd01N`coY)gpC4uS9pGsm8A-fsP z3s4|rl;SQ1b$^s{8~rPCHhB(_3zt_fS|%%}kVrZ!>UF>dQ6~LtO6Y8WB>--_QgG*m zAUO69YV*GBDP}wN5l9_44Tra~l-am*F19ANrP)=&r=z{*#iyfhp4BV|l$o#aMayD1 z(|D!P=0Ii)yOm~u{>^h~>uNTZ%AIA1%Nd(4FpTXjCzj=N-1g<Iyw2^jb5daxiZUk| z@Wg4_*f}p!ZW%d<Q<W~v;rnj?$yW07EQHzP8hp9FK5;A}G&;#gR-p#G2_VBJB{Ep< zB|<Fp*{62S$<+>z9$$#>N&+%$X9Y*oIc)N6mk*924t!a7-6HetPNaM!etl=-!X8L& z5_plo66hm8&fLoo#njc~=~}KuTxqNKoo{>sPt3|7CerdHF`-MMM{^(2{BTh#kcf{8 z{RLn&v8%`H#kB3+MJHjMD{>!m&a)tB(1fJ8i%MR}6b`^|!vQ4~oW!#Ox&W%UE0Q!Y zzWqKzlFV75Od6MvdlNh<*Pv9wweT9ra%G2#Wte)DeaQN=sy<tX(QMJ>)&2)(j9C0c z0fsKgv>k@myLW+FO00eUjF4-Lh_8oA(-@o$x})3jufr~=c%-kGU+w?yn-9N!FoDV; z#ig`V1A6J?Vq!kvI)^)zl~wkPnAoS_d#vt4bRnloI>jv?e|;Yn#lhKVU;bgWt-sFF ztE_APHW#DGfjR5<&4;tu`MG28EwO~L@95@ca%;ufm{dipO`@l6IIy=y>{y_{xaZ5u z+6A^g=Ac;w+~bi?sW!e4%FG8bI$^-J;F0F-y#!1mNLb^!PP9wM8HXS)Ct;Q?CYVdb zl@WW&>3Np@j20W5Ud4H3WhZUL5;!=)nlUEky%X<1pSwCqny@^1tvr)&&<VNJ>a4BH zH!ohk`i~dS-KxZO(j8>i=EEed4or1*v`2qlWw-s*szD#l(h8KL55+kD;2s-TCA~i^ z`d9b_{EuD3c+1}F*#&k1R4N$U{{dVw$dX__^owCJEj>8#hjd^SDf@;3D5G($+Ql@p z2m2KOYMT#LR!#FV*cjM2ELzTTr^b)1s`+7(53P#-;XJ>nEwuXZt+d+6?MuvBNe~2b z;zDVlD&~^(>>kRl6mm2XvH{p#rWCF)24rbb0J1ScE(zDA_mVo`T`Ng5PzKJKsJ;D+ z&k(X2kA{n)Ky)18lG6(W!wYa=tYXdxDu5cDMa&_N=c7+vZP@{+ata7<Fp3FO;@q}s zG!>^fp<rNW95bk)PaDg1Jh;nXmO+3{iXisWDjNjq!@?bPNIU8f8~vkQoNiexE$)AO z@#kn$)g^t42yPd)HJMslzqQ69ffKn%K{FWTm{HPTKn_D{%7mqrnBiEx7-~CKh>-<a zf$Rgk0f9=y!Fmfv{D?-JtpEQLjJ|&Y%HgGlJ2d*>W#$TM0pen3LnuZQ<j1lyxjQ&B zR%m1&XvE?4gkhhgn2JlL1qY3LVTW)$n!s3$?X~%K{DFnw#nf&r^TBG>_Jt)ta|ILf zXH8wH<K19bNCj~xQq_iW!>B7aiKc;Y-39VH;-{*k1mSjJFf0rXW4teW5Qd>)68q$< zppxqDC@Q?N2tX)@T{!7fu+qY5<MjklGZJ_UoNzg4?GwF1UFWO9h5Y3lrxe=Jqtn$& z(6iehDm4Q8Q;|@WfW|YB_k!hkOv~}ud=J3&ZbPw^d8rk72~XCJRStx5BA|a=2219x z3ri7q3`Ab><-!L<1_mC~NsL`ygASs{APN-)U*r{8cS?33)gaGxD}$&R-&R3&XYr1* zmwirbZwNwfJm2oZQNB;3eBXRaw*c~Pg`@i<!5@dW<o=1ATY*bVJQ>XYs!ryj-=9rG z>-NFkeLp+03p?g(*eF`ab<Dw`I`iOgKHk^inFF>*?;rU3&~JgXeSy)R&nbT3N5=1h zm3{xX_u%F3{rmQRu_ulY6WxGpmw}-^xZgW|=~fdmbhUVUC=7|67CcCN5TJ*XfCdMe zpGK)ScvDL#d{U8ldzYKov`p76La*31$P;_Kqi7BYZNk`YXGJ2zq+?eKUpy&_sa3!+ z5b<I*RSLB_|7!|$qZ%MqKp+OicaoNeBQ}A9f`z9L>+qflED?Z*71$GPbMh%58d8(- zx(i1DBg+9nY{(<x0<(M-+*>yUNjL;&x0MT>6Y5I|@`6x%SZ9^z4=A0rmc};;hqfw! z96=f;o5;mn3BaVI6aOIXi|WA|208L>gOF#lC|kzr+Cva{3bue~=Xt0vxp_^&<YJ3p zG)6ki$Zu4eE|_IZC^aeW9(2F4g3Rg&lXbL&y3y5)4rt!9i8vsQeesO!rjCRi$IIcS zQd@#+0i*znwe+oz!zSyC^CbH_r90N3=I%^c{9uJ@T|7}i;;bCoO>Q^U)Egx!JVcxh zwZkv6O;P4%L)K<&oO({eU&rcc*@e>@x^#(zOC3jGM8v?{BnnDcGFju{{;KI3@@Fkm z<Ke+(xf<W+ODB6Ew^+RaM@#ob$Q~9XpFBKXwnb1erm2T@?C<}Z`RTY;=$AjIIo=7+ zkqU2^-7|Z;hX=j=E3@}+KbwPty~DHJ((I3p56ar%1ag*1BpqK9qy>Ek=1fQlN~fX! z+Fd2ivI_)zmOP^r^QwS{j6G@KV{JM+5OP=9dStZ*ULdRY_d%f0_I6yi{A5F|BsS%- z0rPtTZMMks_Yibb&BkQLE_3D;56*zs!3F_K`<O^@=Oi|{2p#U8ZUV&tqyAq?=uZmT zPfCFbZXQsMGibI`6KE5PU(kxD48;+k^qO;VF52P4y<T0yDbG5B9+_6dF{22NB==%i zr<+S|SeYOVGsjqAuN0FXi(5^wr5yeXp)9bDzAdI#sG{3{b5yis%w*=(TZ~yM(m_pf zjf%m{=^=CqBli*=AyD+Egl}iG{P@&JOE&26l7U<TU^2yZuFp)YjcY)!Xo5VAI?bdw z`wQ5`Y1Dj_GJAHNU=@dnqKZlyvsHK~sXmuJ!k%b|H1V9rm}P@p-V78RMvP6#8Xx+G z{kGyfhKr)gIg;j**vxAC?RLWHDtI%Y3OJz=vjd+M<1t}hk~9GKoc(Vsae^O(58ORu zFSzji8>;}0<V&sW@g~n>)splo6?pCv7g?iXj^$UfliljUA?D>tJI676r6up>ec+qf z>m6LVX!nSs%NF1!cq4{RWP*p2t9)2cA&euKc;c-<lS9urxe{@8+GTQNNMVNCiO?(( zHrVu<H7Ib|yY<fc9G?AjWe`a-g1i`y%|ZN<_Ue7!)4pI7$LtM~v8H6q3Y=%4{S%aV zImvu-7ETRxE|Ek<ik>>=YD-S9Q4XsqJCAJflrU+}UGu<O44z86?)e^Rav2kNRz&H* zKM0aW<(f(}rrE{Js#SzypM)MW#twH`N=oAtjB$FSyaSr7z2_u&Ww7a$5=(ZO4$oZ( zUEy(iF<cCdz2|oPz|du7P!cRlw?+LS2}!AZ2KT20sHgDYjaaHE*ODnO6FjDIZr=LS zD{L!5fm1t%w{Eb=&ujIRSxyvUfL}W-E-u)*km4&k4#$VB(toYHxFwOQ_T~j@EFp;? zib$-ux@g8)VmB_DFp(wHXX(hXN(&@&p=FP9xau{zpkg{b2VO>L^mMqr*B<4hzp^lC z80Pxd87x=4(3LDe`y@X>M#c9jZCuYrc6(lPz9CnA<vh2pUZA%?mopJO$oJkjDM_e` z16M+NQVE~3HB%4@-Re}M(Z*L8fL~-XKOzp+VDiYN*q(UvIR?G|V<pynCZBr#&*3M| z|JmO=I=ElY|2h7W|MMw6pGp3YgZEk`^XK4m5`sa?k2b)6aad^W98vQk>l_>m2X>IA z22Zh1PGVe}<MSM617Y)n;C+AM5EP=qK4LDRAENWPh$B;+s~b*DBpPr~!BmP4aZwq; z@t>XzJ^ms05qw5M3*ztx%ui2$?qjTr0|1WvWIkT;vM9>9)*c1x``iLMb}sORQH<-z zE_C%qV-7}kD!YwFv7wtwnTZXQE?SNV3vXOy2Tj>S!4e$h(`hjUKc;#1{LQPEptigK zeT6Wbu`17Qac=JzBgJM;mn5#rQJXv8QV6PG*U1^@|6{&BUfC5KK?Datc4e3aCPl&a z>CnfNVk>OZQd}L#5{?0)IbFuLVX`^6sgPe%?rxB#MYYqUGL04hGJ-2$2C-fruqiEl znrWO4yN(gtks3-sKZ#aW9X68ZCex-_`+1A@DU2sCaWpi6x6Fz2MbKma&G6%|i8UG7 z?cpuxjeq~<2WLB=c?t-}`BB*PJO-4ERGJfn?;uMOti6W>5{?Ly{9Yq(#$b6ei92sB ze4y~d-O;#WBWWl2Q5k3>>ugYNfh9L6+wgA~fS=~uZhwAQGp*Lqm9olC3|`_8IfXTI zxwxMx8%?wyl0kN!&W4q{u6_UR-D_TnJ#bxqKyBYvSi0(hX(zvCv{vHD4xdOb#2d=2 zKGmfxZhBlh6RZHFyA%Yo@Ahyp=<4_pTPfc=oZ-pi5kNYC@K!sUI$OI9+1it6VxH?3 z|3ptT%tX*J^#8dCR32#Yx`s^Q9h^g|mMoaz!@S8ED#ZJ4G1Ju+mrl_12hZ9Wz0QWk zgt^cKxz*rv)LD9pBOJYN))b6KB664QA6$1B2q!j4p*@3%&H9()!e0I{l$$(Xj?gZx z5+A~neVCA!)(M^W;~f45M-)j{3~=MCxt3#&PVhaMc(V)JNk*n$unPOglT9vOTz^Ww zsNd$VBJ}BqXGlCHNw|2P`O1E3EZ?w_R0B}FM(cqkZaF&()|@|WIqEN1kYE6t40Dv) zXSj}Vh8Z5%DS#d76j_g-fBW`3bYto)mz+4!un({VorlO<rrk8tnFUvWtFYST1MT6g zT~rVx<~E<=0fnj4fzT(@O@N}roDHHoAahuU9o;DT&_dyj<(P^=CN!(UB=+K*5B+&c zCvKieN-UqXke=8J!ttH+iZOVaRX|E5)7b}P9K%)WHy2JJz?eABr=Q;cOa<L8uzPl< zERqoPGRdZ0QN8APiWpw!DpQ^d^p7jIi))Hwo~U5}xh6@tfp_Tug#+Y|got5bD<HoM zt=W*`Nje6P=znsMQ$;!RhGiLsiKAZP)a{Zz;y=CpnY3D`DREnHT!YXIe&FP1M~jJ| zGv2eVG-q`1Jo_1gN>IT4^yX)>JUTc$3STLNkCGOetKG$lyCh=FM55z$lvITsmP?jJ zb|pcIFrKh&TAH$ZDrK$DQGFgQshq(Ii-L_{u@oE!MNWyc%syhpFYYy-EQWo1_z>w? z8O@yb2L1by_f(i&yL5K#^uqu5AoymEk?tSye)`3T_j!Gk{SVADALSkM?SIGj4~`y0 z_P@hJTkMPd?-P7#+26q@-p%t%ccV|zT)eiG!(I9$d~6MYkt9jnlnp<&Mv=OS|Blt) z&G|T}CQr(d#3H-aAAY$nxBYCVm4gF|ZrS&3ZA!g?HQfdO2G>-Y%}F?@D#gTMmSW<- zr#7MDzzSC5<M;^6Qcmf3S?>2_1MvjN*Yd-BN)8VGc9n?2O5Y#4@5R(i-ygZ}-(6~O zD*jPkEnFJ>wY)`zQZj7@7dWgJ5QYpcAumQUjE^zQw&^mC`g_+bO|H|QO{WyZ%lEqy z@fSE8tL(Vl{|jFr?(zQja9mL07asF_Az~&G+AAn71p4xJT&yZWa92pH-urEDrWyR^ zBY8q(WUQ#kteM~<n!kRQ8B{lTyy5802%4k`pDFm*#|^7XnMjec=;s(ufxd|l+Jgy* z5h%fD(!&5=Ofh-{wff<$lWl+zkmD^OW;utpBFrc#|M{4W<>#4Qky8pZa^gsVbnxS< zzqKDJH@?J3Cp(QZ2$+PBlyp=&+};@(ArX^}(=;W8JW4PVdUeS1gb)G_495sSxVV!g z0Z^c@7CW9(gbAp~=xwiNU_0Urs#ID+gv*l@qlm&RM@W#My23ayXV%DE3=^$hA1$u| zu&qoQmId2<^GXIK1$Rr{N8=R=R_q_wjc70pZ0jBKzo{OgyyR?AxH#*HAYXzVv<V*0 zj*h@ZJ=P|Q@<r`<loLPMeYkK=D1|~0@%*EXkrJ=NErlS8h({2xVchcNaVleu_L^@@ z;-}J)Oa%v90hI#tCJb-&x#s}?iG>{PkQ~&QjnY0u&DoQsq_`GnR6f8d5R;{>pA07e zci!voUW4_3K~d~qs)6B4W+3@WI8qBye%#Nr?dwBi8$vI@W#ZEJ1aQx_CTMy-w>~W0 zaWF3QaLxx$9t7NQi}muM8S%-)s_tMp2{t$761ss4mdHt^5$oLo=ulj@A4W<<q{Tqh z_>xEoP!M|t+lOv_t`8cHF%20L)21Uxlh%#{C+D8hB4F?(L0fBMvuAN5+ig66Qh-UA zk3bpw>xfZD9A=b<H7UqI1E(XD;)NS+<%Wz+G#QBl7jq*Wwv0WZp!-}ENT+@V7Hn?C zQ$l}dtE7W}26!Y4S#xMDgLFi(!NK5w2!RJ0WsW#A)kNzhflyR*$Uy!WuARnuWQox< zptY73V%|@~Ff+7zsT|mI_6UiH-~}?ZE0}^J!TLLn$qk;#1mn`fc|&Q*Q;9K&yhq1) zEIK=X4sb_ch~u;xoR>j1%&(<yP?6dQsR&GjK+#&v_Zf;JWycG(0MKYys~)+Y4YK|) zl~cWv#2#z~$`d!TT^?D8k?*)JhD%mjA6MxENt^2Q^#sGp`xw_~%f4}h6iNU_m1`yj zyAHrBKFt8bJxehI5mwp^#T-Zp**>?tx*dwodH%t>-eqxBcq<~<1UxHJ32#?xmcjG^ z6zwcVqXz&pUe0kEBb+V-U_c%#cCu^g1yss7>$s*e<yKiE5(^r9!gf<QreXs2JOu0{ z!<w*eR9D1T;3<rJ;3`8Le2m+Iz0t^psiyFHwSEKQC9ElAU-|_?WAAlT{cSu;#_=ri zWnmMtB^Rcm?hC0oCI9+qUD^6+znMYF)ESg~Pf+XP7cAgTl2@0f&7?`enK_?1iH78t z&|`FuvP?vEcAQDI+`BvDNZN!RX+8|;LQ*8^<>quqSdFl6828zj1xeNA`H)ol|MGlD zs-|{kq%dQsnHfn{v@}POY2rvy6|K*fq=X_Z*bRA;>b=A8vLzUleqk@#JyYm0`X$1w zxVJKElG=&Gp{jXPvLrofrP+WsNmUdRD3QjxEP;|<?enRW%mOMURnv;3N^V?L6`S!Z zsfudAU#l`L={buzm&_v0CDuYTQIM~01FEIkMpmRtW);#UJ>>K0m*RL!J+}>VWqBed zzG49pld5MeN+$JufQzycIg_p=q-pZT)n&Pvd{yqzb*Y)ulJ+D`{>x3Nnsl#;w8^YQ z+7v6I8?ZBBO`f93lQYd_W%{K%xMxBtra+7bK{!kDF_E2^s<{JFCcdbqe7LtUGht5_ z&@o9>;|P9g4NfMOQR*E5F%z`LPA}-#5@4M=b=tlkqkOFd{&357Q7nSNN+2=d{ZQl- zi?BUye4X14k0|GVnp5m2sPg0v<Jhtu$nNdq9rID{Q-?k0XsX?(#QWkm?aGM^(WY-p zVeloCPT}(wqMOAg$qUr6^|Kcu$I>0-Enq$VYPDY0Lc*s7=7?{Sy5M(|H_oh<zrX`C zFNwh{o5a9Ihov$ZOlu|s8>3cBXE4p_41BL&Bd5W{ISt;gqdb5{f7Z!sz>ltGgZu_3 z1y)URs5PQ3)d4?q^Bt(fl1UG=T$ay#Xld<o$q!ygD#OUC`3}5WWD~8P^x$>tdgjBN zRj^{>1Af-Xe!$P2r9gzU)RGCIoWX17K%7!-ry^FD&44(S4xC1*4>U<F`46Ym&C?|l zAEGvGko}<iq8p?@M5nWJ?l<Q_%vqCdX%KEg?<N-_T1Ly{L?lg3ST7r*WqGcV5kWP% zv<QXtxq4az)y26HW}Vy!tl&<PBgC}^%92?rLjoUcNs&-0=G?pplE)h*N3g!3G9+rI zZnHQoB5sLoroMPDkq{v-6(cddxj7XAi`+pj1W%q%hzPMNS4fEP>XFWhFso)oc(-V4 zYJ^d#5wwKvAUA?)!hv2VL4t2iVS<F&qFu4|=w3@g#K*WI9`&M_!+IGSwSX40c4>s+ z_l6NifN3HEOsZ=$5=?(gR&7j}`^;}?mf*LPTgXC^OEaJ3QXRL;GF_TBrc1I!z`WE4 z+TDFicgr+4Q)s@U-*IBr%}9?!slqDUO&>#f&u3%Y{i(o$k6mz;aKFG6*-bKZChHko zL;F1!oZ7T@?u31l2N=@p)~DcP>0RUDG%N9NvX;i?r(ZOW;XSPcHBubnX9=D|8oEVf zhq0e{T@p?{;vEsES)YiLC#ufIX;x<AR2T9#O3oT7Wg{i08l|;4IYrM`#GJ&tu?jOM zAJ=o~In5$^PNzgI&(WziZb;1O)^hI?uUubrW3Ep8Y);sTpEX%KX<FBy?!-?Uf9I2B z=_B#80fQ$!zb1_*?~6^jJZU865_&#aj?EK4cR}fipABbaNoLQ-k3FX+t4W)(d4^&F z&Gsu&de%i=o!8SW!Rr~eWG=a<nNRM?C&G#hpGGl!Vg>Iurud8x-hk%w7tQc_ubtad z?h)kFUW(vzznQi(u+z-t?lcRyJHwh56L`8|ZzS+^qqHf5CpU}SCY#WBy3OUOJWWXD z`Ahfwo`MMdg{eF5HIR1l{@9$k)9YV#mA`?rGioAnL<&)-+=`cH>%<3Qx=#I$<v2RA znoWs1*?;QUI?bAFok2yOveT?Y*-4cw;O#Vvcsrf^Bl1qV-@#98I#s$KsOkvO9*JGh z`&5V!U?12m#{z^zlw0t4Cp+jhWCpg`0kE1n9cZL9&gB3Vo-eBFE_gtxZ+Ail>g`P{ zGJ@(&AT*#@*V<g5I5qpd7Ov0vCLXP#zYCPyrRhIKC%Fp_Q2cC21WJ><HXA63oDC^K zsgm+i9an2Jf>ISh{KA^Fpb1Y^#0_d{+@QbsAkYRv(8z=1SV4JXwz7iaI%OeJr>$If zoh~E-#m|~-p!DpWP=Zobcg72fpO_rfueQx-LB(n4xk1%kVHIvr_DVDngqqa|LU|Xo zu!P2{#awF8X#G}-AJnYI4=NjK9!aQKh9p${`pYqeqB79N6pFj-u-D84I(L(`@3CdL zLGg131fhNnZ%Pds&GRPwpmIr!NkVb3+2awiNw$yl5~6GlCn$c_CI-dND(s;2;9c;7 zDtAUeskaU}DAg4(ghr_kOEQFdEv|tkRF=acnoxH;n$H#LVrqpew4QPy)?7!Y=C5v5 zJ2faS!sA{u_2-&9emOEw>iBiZ^=!@sD!y<>2x`_Q1Qkn2#0qNGU<JhizTXR3KN|;D zvidh>0OczI(}3P3_vb3KpLfRi8QZqj=KAy-mTqI~5q|P<+sOK9R$~1W<$NCXr&&n- zDf-q5{GX<Y|5NH&lLXXw5>TmWb0$zXVVl!|vUFfG<@%hUa(sNKH`n)c5iw|dEvvEF zEXxkcR;9%hp=L2fC@<_4ctV|P)boUfYnldf8M07!25iO_T3654p$r9~eHa+51gUEN zS-3e#sH{?E3XLN>T2hqnfEjc%QqZ;eK<|_abVC-<yC4AdXH^sR=c#Ss>C&8^vL81k z{*2Gh^~gVYXVn=%%?b>lR7o2RXgzeXo%>TRRS^NGi3mVl*EePWm9vN<ST>*m6$u$} zftnS$Kv_~KLeNuY1C_*{Wtc#zmL=#w<x<v02kMXN<vBr33n!>(-zyV?>bgS5VH-Or z7TTO1)Ol2b9k?n-XjqFNhManq&{L2Nr?EVuZxt`-sk;lF3M=U8+KixnVmG4&#cF<W zw4nFQT7;lj%jT@0ti*Y0P_sTYsPoCOL&x)jh6?`zf>4(Bb6G;oGAyBL!j_^6bvMp{ zE0h(>^$0@)*BZBHUDi-1!8fA~<yrFFq2bzHmOIqj^6CVlW+?(uXYg5uMbxyji1LQ& z{`KB+{Gp)J9`y)YHP%~Qpe4Z%twjv#Rvp)|EG4Ls2OJS7?}QcDK<oFX@UmX5ObKcl zC_$YUVRc?m6Yzp^qn0BF{TN~PZqfr(aQb>lT<^62z5m`Y>Hn}F#Q*0+a3lcz2=Cb2 zJKB42eB6TnkDnO-|JW8c#~-0Bwa-5}{(o)$`<MH7O#nNe|6%XJgS~@j{*U($_P_8y ze2UL+mH+i6#SFT9F4Kj7PwjORFS4r;!TwfBbPg7iyvCyt5WVgPBNDN_hCJ{4Jv+Yk ze<YkOrg{f0Ss{#g4U93k*_oF1(JCC;;mtPK-FCo_W(OeQ?_N8P!yC#$@0gdA9=^kN z4a9|z8tfkIUHsZHJ+Oc8I9qj^a3WntAf3;=6IkPImG(MT0&a#2F)6daBk|C7v>0-C z9}n{<$s4+qQkU5;;Iw*b7o%B%hYn)n;Qney4Ib9j*n2WrwAgndm6WxzujQ^lHfr#b z#zjufyDx!Q!zy=Ox(jTdynMSu=__(~$C0Ks)+-oye*m-8%jd@~_yku+SnS853#;2! z)x~;fNO>@7rC$QvLl>i0-GFUl4EeL?_sX4G`RBKG;aNGtv+R*{(DIPxLkPB++DjK) z!D>&xcN7Pye+n`}b^)pmjX{W5FP=DRS9z08>Mj4yUidN2l6+y|VC=dTaWc*!^d-P! zgGIl+*W2%X*r7<ARO{H{sHtk3Cc&kIo?eJ`rbSUX``CS}=Ys>CZ^Cd5^!p8veHAv| z6u{LX+$3ZXtL^Rs*xd)_9gwfYd;2Y4Rfw5|@Sw0k=m<hPGF@ni5Qg0yI+49ES<7X@ z_Cbg28^knc*9ZvBNyGL|&-^g#JVA$R{;PdA-%lP7+=d)fPiU<?-nIX<e-B`132FfX z_hm#uz<4qg67dp~=(&|_3lkFw2NT0?OyKE`Gv#H91bGBOcn|>g!LBuk%O)E(Z!fUs zu&fiD0Q*2<%ZHX|ScL?yVxAR)pfFVaRtY<p$-zMNTMN_X-WzgS_#``i0tK&?nbV2w zTvqjWYIQ3q+gNqs{o&M+5rq%WCS(a<qUeHboGylf!dd8QmvDw3)r9h!C3)Gm<?PO7 z;a+Rp`!^@5QSZlq8eZCkY9%VY_XOd^ttgzDZCiM!PU=W4x1wg4TO|$<amw3qm3~Mh zX8$HTgN1Nog@<H0LWDX<4t97mXppQSmN#(hQ4MM0c7b??T}YmLm<)du%QA)Vq~!O* z>Jk0?`-|$)L-<o3hc6H(ry`(!;-O<NDTOIIFlMMOu4{MqC-?>gBK-XmR&FID{PFXD z{~5wUK`{LE5Jb<<yR}y*=qweV<->sWl~9hZ)9EgQxrp<Ne{P33(gp0r{o%`^cvjr} zcZBtVCOtgZ4@!>DOIz|Rw+G^&;e{LtV5hThi}Bk=`Ji9)##t2<>JRKO{gA<O4tjgj zeQ>&7nf+a%iH#N>32e3Y-bwISitCs+hTXgqX6&%5FIp+Qf%q`QG%q;^%EXhV;4&ff zX{G?Xw6bCd_C-}E>fazk$QJ}lq2IU19ETK<TV5?tW_-asS}UZQ`{&T9RY#wCkuF)^ z4g`({fxYIKNsmcPBoL`4Oa)HSL4@EJX(@4u{d7W5KnP0D3`jB}*kweXtThy!(_sUh z2b)Z&gl#Gg{1j45$5$MNLN2|Vv6f>HIzAioKqcChq+)<L8jIK`WY>Q9@WH%$`W@J4 zZRg=HguKiz@~TWEg-sbqQ7po&!9$U|r=aAFDXDm&yeB0(Tz-&ufsPbPZo|dlFp3Bo z5Ad$gOXbB)&TyaP$~(&vD?#n#x&$zUxz2dv;0vf0JYj;I5ZG2L(RayRlc2lCwSE^4 z>lP~0&+mrSdbx_JN_l%YOXUNwRQ_>ye{XmHYqPia@bJOI!~35xS82`u;|KX}3=IFW z(Ef9Hba+3u|DgTvi~Z;0e?Axc&u41zQ3jpnUPU$=cd2V`cwn;8ES}^}I?Kd6EcZ!= zbc9YiK2PNSK-xzlI!x4p1!JL_;(z`<JoKoQh!hGFWwvb+{bN%`(z_rdg&>2?c}O({ zX|farDGbLZ45X`(kH!WBHPKCrSLSy%Buk1qR`>Z>-H%MNV0UOO{yS%c#H}H0nyqEY zq=9A8tYO>VP`8}$2j;C-kXzew!1W(MTMoD_ub8N}z3>4PrpCM^opp(a4&k9geCYcO z83Mk|vmsd5+MYOqCyww5yU{Y&Xa3*cy6*KwxBC1(4gSA_PwW3XI6kWJzaQ@(e&K)r zB%jYk|1;fK!Y{86`V&hc_UFpC--sAp&IuSDd~>~ka_G6UD|Qt;1!_xn@31L~qNxBX znB%6%5bQCC3ySmtBtta)ADVBU-=kn9Tg8~O`;oPi6f1`Y!#RHpTof8^h=_TVO)n4z zDFf4B;=E>T(7_i0d`VtTID8LYfV9>W7H;eNfW@rlR1NYm{)ds|68leEZ%@=|bca+b z9GlfTZg1E;p@_TAY318`Z->Z+kdG5s=Mc)L{St4!eb)W@;DEhmmCuz&Rc^=rFQ^8} zJySTH9=#WgoC0xe*);EWv6@R#D*}ouPM>Lt2}cHn;yfYm=m06u`c>334+ZMd(9zCj zcXt1ZgER#-X#(N%J@KGP7(Lkv$ux)zw9~AckFSd><j|zibht8{NsHaVXvp_(PVSXS zKx>5XqM$%~j75cgT;KrDb&!byS5w}a{NQ1#Ae%esF*I~?%3kKarCA7!jE4!C4b8SH z&j~@`AlmV!M+^yc?9hZ8$ua4$uoAoNs-j;26wv;M4+ImZjEo&~K;M?Lz5w{*939cu z>}=%>wEOl;Hn3_A6DFPDxhPdOn6nP6pk{CVOxmrU5=cwi|2oHBBIv{gaS)+)?)|h@ zMKI66hzwcVIi^pt-0Q1vYwq3sy?ygTabZi#)$Rw1du=FrAT!V<S=t3_DEG#R7P~=< zi+t?Ddh5RJ1KUz~5`kiEU1+LR`8sUhZFp`U%K~Vmf9yOT)3vkhu_J!nx9l~iCjlsq zfv|jBM#Hl%;zK>p<2uNR1`xNN$EKIr&#Q*&4gg!lD&G08BrM)YnxL!I6P5=B35^JS z9b|^?C1Fi=D8TK%`#LS_vwXC7XzK?jf2|k(eH;crInA{y?(;A{<q(!GwjHwR$=D9i z@AT84;n{tJJ9GgApp0b1b(w{s1)LCDuOS|}XZA(l-2`_(v;|Hu#4*J>VWe5SG}I-7 z@r+W;8=pU{J-_QV+^aFeSt)VgGX`N}qj<oT@a|P82fm$6!TQ1ep^S}3E+QZs<yBPC z*u82B&1E_H41a`vqOjUKOn4@J>aaU_8DehAh^?MJ8!Dx@5CT7^quCQ2Mtm1W3Y|2V zQ_|0~Yo8h6Q=Fs+oD!@&S>m?>a{1YKn2(TQ!bg_Fnv&zPrw$M}*X+;!BqgR5=hWpl zmds8<>G_Yd(Gx2K6D<TE@7gaNT~xh%ZDHaAN?NB?qS6DU0(vyq5B^P211Y-{p0IK+ zadHpKcldiR*QgpR@ZpC@a!K2MEE4eQPK&YH`!4CN!x0>koZ~H+OwewdsM?<d?RO(? zAL&|!q07wH!l$PDM%s-P0W(?1JdwOWIPy)@VbZri(}N_De3GGp;KGo2--+i8$<-*{ zz^hSqe`EuPlo$33u)u&b-Q%!(Jl15K^#$oqY<pgfI?HrQ2tf-F?>(${w1_UyjmS<F z+Nc^8BL~w#aTu70N3k-jDziSyx~zjCa#2um$WIgjf?^m`_gM2C_&bBhvcQ%4tvvvt z8>*5Yf*1`BYeDO2{O}KHS-Dudzy*zq#*XL+S;Vd8zQ2EP=ySf*edgrlTZYY!Yq!62 zzt5}K%gfjgj(<33G@I*mm=EGQ-sZpRuDw-A2$VQ9rnI;CISNVazAo}{)igA;7bIKi zCUyBoaYZkmA9ue`%S%-W5YYhsAI2A60+_MRU#nG6bMU{dB|+k?fs>6;^0rJio_TX? zqLl(CBl^h&!=OH_)%+Gw>K@#EV->~0BG^vX!kO%@*Q>b%K>raXV+9q(55DH0M)k0K zwfJEWuIj;8?)FOBVO;$AG{4rJ$G_FUd1=LrI(hAlbl`MP?8*%TH)tGXfkH&Z<Lh+# zB*%jAuW#^g%t@p#>_&(8E37vF$Zb%l9FZXC84SGQB)LSiaIzyvdyX1T_$$y%5U)5J z)Gjs@Xgr&QKVT|-K7>=010)l~ILry#y&lE)7IS~QC-s<{H=?2Xu+TWBM!gr1+Gb-< z(_?P4a(7%%=W1_#%?D8=W?Uqa)@Jz7YKp@F$uMlL1KT^zs@c>k5F&3Mn)56l4jM+m z9?xA`AbN*o#0sEhHJpXG8UO$)yU&14W;Ti1C1xnwIYcQ-r+8)d*_VtBP;sjndyV13 zO0NOtrM+9{5R!^`DHUMU(uN~KL|8}PvPFU?Pgpl+V*)1ehf94Z{)60ns`dPhY?SaQ z594gShc_=3vm!;`(kUxptSS}>Jfy&^9G$Z9)mm?V61#kn(bw-_RYIgK>p?6agf7-; zLTC2ANO;S@z6Bmw!l4%Pg(v}~JR(LsTwr9aldT78EAgJtGivFgNy}<sn0pLb#zVuy z+A+}<?3mZntoybPWQwv+I!3L~jtSOTJb`Rl2xQ!_xNv44X0;YP4uQ`>6gz;PcE%1= zXOYQOuRZKHtN~vxyl8RvUN)bG-khNtDCVsT%D45o$#S@{_7V%gh~^sMaKLKkbOc^y zlzYIut>`rH@sA7I8(2+LlTQLHjM$dKsGHmjm#Qzt6wg{QzDV$b1x+m(7^9w6FRipS zz=HYJu82Sn>?B%ws&_(PbsGDSia{Y{7$@-)bmSz04tI9AByG7@iP@EY5AR|u8;Il@ zF1J872I>0==y(3bo>zoZ&ygclA&otCQl9kqV4#y5fo<X`803H*9<V{O;@uLo=m>Z@ zio#Vu$>}KxRYF#rP&hwAS&!+)FM-Up@k{W|0|MVX9ai11_=E~<;xs#4lfsB}dxGaJ zAp{9+ik%mNDZT)pF90HTJLwqE?QrB0beZ%neszP6buY6V-DGr(DC6;>tX;Dk)@5qd zK|r^Fa)Cuy=8-fcdoX3!LTx&tupElT?<G&!fYH1(*+5{TMd@m0wVB{D0F^zd$O=OO zD;S3s3DRK9Y~O<fn=^L0q2wIFu0(i4h6bquZE41Q+eIQqC!w(qj0P?wnPG0kuA;jn z3p8<>1wdH9RgtAA-uNP|h++9X11iD{;01q>6U;!eK+d+?Xq)vrWj}Q{78n?J13`p7 zgx_!@@>KUaoJcjEXxAV!j^q!b^+rrrQ9Bc55e=+4-fpHq>72u%E=cjplz25BUrLRH zEH-4I0bnGx{oYbyUo?=B%{fp6l&Ye0w%i-&HZ=`Ye}ep=UkGb9L(mVL4tf<yT*f70 zkR1hbM9(^A`HV3`{F1Ogcj!(Rcc*6W^PQmxel}$}P#tQmn8pVKui{7+DCb}W0xN+H zhM{-fh9ZIaloSBKlvZ(-1Lz!3Z-;j4(&^*Q9!la$bnnmep|TE(wH}-3udO%Jyh2d; zA`-8Ot2%6OZJcT*)p(@*c5gKP*Ij4I#;z{U37g3r(HXdth{?h2rw%FkydaqO#ttG_ z0{P0^a$T0Ls~6U;D096Mfw;)MLm-DJOz&+-+0@%Eb<|eI&6)(u8&IBL7H3-cNSbG~ zMLQ^>I!-p#`xALaR_sG<!^cfm_@ZtdLc>YfV{Z&?Qp9;9=<xJBV`QOz*05jkb?s>u zHFGTm2~vPylbKd5*37fxY^Y@gR01hpnX`I2G-gqmE+VB-y05()_USHM_sF4g)-~J0 zTe*YJ!MAv|Wk0=;Acj`huqNEq^jcD~n$wyue$6NK7kX{0DaRSj^;9)d)RS4>*X`4P zVcZ}N#nEu`Aa+O#MU#?kK*z^t@Sut;#QV3^8|)?q=%Zh09b;k+$0d7i-mujQCsoF+ zq!1RXh{}M*B$L6wdV&Nbx0U%9ssx0P1@~)3iDW4z{~={5Tck3rwK@i>^Wkkz0X$)7 z_1Uc^G)QT5Kmbc>Eh86V9xz9~H~=bi`!cIIo-}+RC7n1S<p2~$d$bQj#jC<=hbN-O zUc1{L&jlvbfhouy0d@uDE{Gw18_HznWf$sMMU+Yx`!Fw3a7K%wXGdyR&<#MR??O_g z**#0A`fGX&7R|%>r^Y8}1_b{YC1La%^kx@P_}o*H-{{sbu6WUB;qFOj%qhcdpJ(<O z57HL4!!F=K^sR&#^FnYInn9LL5@mBCT(%2jvpYdF#;cN%=!pYtHW@OP8m81v@O<Cz z9rBLraa_&NE7Fv)CfK|#Oa)b6j%0BnTIIu^hgVayLOEu#Nq9emcal)^e8CJMX=_OI z7RVj>sdp2ifo}p<0A}T5g&k|m$HdTlLj1I(1KVY|ot>Wp(!q5$yxqa;|BPZn%xJ*w z61&#!fzKas_s9NK_@>ZN_t{4<ehCEs?SFLqH^eP|jCahB|2{lExF5%VA08hbe2M@5 z6rX@oBl<M$-+ATd;G4&vC9wjHM+{t1Mtl_XLy@M5{|+0tc`hC!SJJ`f6Y`Q+9@jd> zE%4>GpY62f-(k@$+k~x6)9$FbcaVGMAUiitz@w^E7M@uu3lE>#Bn=NMSS=UtBdkq1 zg5$Nh-;-?=poQ^o@~fod@z)3ZHD%t>w+F7GFynxKl$u;#9Dgs5)$-=}_e1_YOp)Us zkN8K*hWi-9W}6+1OH&D3M#d-njW_@1*lCXYLSVht1yG}kViYyA7K)lfz^y~6`IWUM zikezd^8nPS7%q_p>@@ln*T~ASY4q$dKHH3#MkVg|aQV#xOQV7hpx`2$G%ETv6kQD> zjUN0XJh%xu8c*Dwt)~$fO;GJO1w)hd92|XXA)--DAuO6vuxPM9f!q@XRc&wH0rna5 z954WySswsRNXB9mH2NA>fl_)l13yz0DHt@f1`L|2sT~l_ECNJRwakS^V{Jf*$mStg z0TE4)Z+nd^0->oo8X(ck@{nj$5d<>(8rMcb({okFL^I1`qN!>YqobKtbhM^wYB*`; zG5z-B;bVFJiN{9MRV+kF^JQI~ySqO<2Fdv3r-zTNaD38$juyNYfYDSv3L?#fp9L^! zs^B8Pw7BRp&}sg&6o{JtECr|LKXZW9L@Ih=kDqtz0;#Dw8X?upvXE-^RW~18jkb3q zxLPdwf=;{mO;u_`bTw5|h_hx^##xh=Qiwp%!p-2-R9#`(=o&z4s;(x;HM11tnyRD` zd`&LaiojJ?>L!?L`al!(HM1i6nyO<S4ja+te3Z+NRh+`RTw@ul=etW=^eZi@yT}^n zYdEKln+;OOooyn{A2%!Kk5g6ilE{rqBIi|g2U+Ay<}^fVs*O^~x&2W-xmhEhT-a+` zlgjy?xFD&Vm9gbB%d!0CspTHrl=92X8u{h073_wo*)du+my<FZ<&#UpF{#{al2k5N zGW;DE+nSl>eCuvVFE^{Em+J$yEysKgvSyHDPIWaTnv0D6$}E{<9z4;OULF)$GqYUP zv20R#@W@j6<m!o4QptnIHp(IoYT6)yyg{?Ol$e4!x#Yp?S56~WPp^_e9z3>c@_6v@ z`g!9)HLInJ)1&LBiSuC|ri!~n>*Z6$y%4RXi<?!_#i^b}Ipb!joN;FrT`qClv?PuP z8hXGtx?cMD>AuvdCERIC^7v_ORi1`f<5*Ke>iB823r^c}#!p$Mu_X>VaoT}zz1RY} zNpl*BrBloiH?<sbR*P0i6tA^59Q8HQ#MO-Pgl(8Aj<wuHzBr%nk~D5MNE&xbd_-E$ zVK4H|%-47BAWa-Ai>zXcv%^{JaEy?8c1}__I}L-7VE^Enx!|m}QVMu{>71Ve&buZ5 zRky!A^P36<IZF-QZcq58(k`{cKf55$o1d#07*<H{mMZMAG`9jD_#S3;%Scu8-;e6# z;$&`Ka;31cx<6ZTxT%zjME1|jN!{l43E{rJd@W;}exo3MUu>B~ZI=Hk#N0pMoSzMA z57V-Tv#cc>+gGt!Uba@>e1^7JJwv-@Dy-*fn<!UXmP(Kx8u$S=Nzqmng~{5yM)(AX z<iNrlZI(=M{cL`8L25R4+UL9KZL%;Un+k^svSBMWNyJuFg(=x)#guGS(cI*0D#xk9 z>Y@2L+3Jj6D-RnVk8hoNQ*W4lt*X+A*k+wXY;ApROvyG&r)1a1cV2R~X->{om4vHM zMip=7frMK(J6ly!%hNWi=4ngw#3rCB-z+^l+B1@<ZB|RvR<$&@Jg`Kl(i<ddYh!ts zvTasO*^YFgTDEMU2uXkZeWRs2E9PwLU02WEhTBzm$MI>~r*2?RNrq?_NG)^QtdzMO z?1VWf+-7kKci>Z*=M8b!k+x)RRnvND-NvPL>;7$=;O*;LKh;~iZyJ)m%?e51T4!IF z{>}E+@Y3A4ve(M`RyFDTZ#(L2f{0f4X&^981+&c8(vbXZ7AJp8FKed9_C36M&bMCZ zD*M~4ll>i!Ta*WGR>%X_NAco}@HRo-ZftE<Cs)q|*ITkR5ngM~ttsKErqj7L&(rp- z@IY!U$`4mphkAavp30_7aT(vpnjA>r4HLuz38izrVZv6*6>qI6%0i_JCzX!OX1Ze= zC5yMoIkR%sxV}x!$sae1^T#6-(-N8F{w1N=NX9O*tky?w-2`$i7lKrBvvewXc%5%e zDsQ>#*Y*1#y<7%h&i)NV&%BK6({}N78dw07lwBvWJkTf`Qp}}KkppFwenev8G-z}n zwSwb}{J6^{mur=DZkjombB}r)Pv2<1T{e9jAHWds`I+Oag=4|Blg6nMj011U7iXCa zC6-AQr{Wm?-IgWphh*c-a5ktH<_^-ssV<)*ZZ^mfr@HEi;xyr_B#I|azO^Kao8^<m zsjkHt<7QFDI1l?uY2&6bZQM6$+1zozA?KxzKWWJu$4^W0c>Ijc9LLY{>EnKhZ<07p zwFKGYX1(ljUfWG6<PuA>Tn@Q3sV$M*ET2g3$EZD-+$@t!P8BVgQEnPD%6Y%8o>u-b zf(PA>uce66PfMnFu9w{T_fDJrhxuUscX56W23R5hyZd+S?H%nsI6iLUe}zw+|NUV9 z!M~W}yKhSU^G}}tU7vr!nz*}nEaLyQvmW!m9o+wt|NluozeWDH_az)|aJ0Olg-LOh zifQz-<N{ujnjCrGYC{l^zJ<iAb2;CHbhVZ8>PJ+bts(_4bM`2*<hwvixXE%J5U1L8 z#OBYr3V0Vw=z5CAcFM2>!w{x&f!@r9c?b<J#^h*8K^w}Q{fpl*vf3Yb%+dV@F+>m& zXGh_x13KL$WfzR>#cD)R>|8NFCfZd7292~tz_~Fe*Rl@<6Ee-@^0wrA2PY>h7MHRZ z&b(usuK3_xwio+hI=!F(u4|5H!H5jkvj5lKKL>CHMkLC&kfn!tQ}CUOn1DYh)*QoU zvC3?Wg9b*)N}?v=Ze;&SBa=v?BlH9AZCP4^ulzi(DBl7U*`Tg-1U9hB_Keg0pl|lZ zm4YLS`@^PK(WI55o9~n=NXuFC*^+K=V_DTlrFxVUl0AdHpOvKkhm(UU_(egHnm8@j zd3Ec|wAr=2x4l;0A84S|5iSp^3L0NbT}hRdocOHdS8qAp!KJ2GMKPpEy&JfiM2PFQ zehB;o1-w7CcOO*0Ax9ve%!WR$2;Lo9%J_;1{&ct_qtOez9wS;k72Mf*xQ9h?MavsU z3%vmqroSkFfF5BVc(_3<>y4CT=XT&*%4R}S25W@V<IvxV!CN32O1ECE06OS^r|9qi z2J+hes}+ap^OL5{f;0x85(UUzKn}nUzPGz~u)BX~_8vSu*n4>N;2#lzs;>X}!N03_ zEYkmu;cgJ>e-94!zvzFT;`3SPf1jzsrxdz|E=4+<Q`wqZ9e}(xqfK!(w4CTU94+Hw z++_{S9unF3I-eF}gt|xq<cQSVE5})Sl}(}eJ#eZ`3y5ojV~Jz#2@m07nhuEWPB(hN z*s0e0pMMVzJ!%B2`Xe96zyIs3s2<tg&_6ast-1@qDu89(9IHyhR3%HnRKaj;f>N~_ zKvj%DtR}i?vCI4d#Uw!QHUL-dM^`wwg|rs`ox8W-R&u$PL}D2|B8UHh@w*IEeROn? zs#vzZ?||PY+}P3k+6oh&FcyASbC)s`TEp88xv7V$spxyKI%sPX5BaT!(8R+9P4tBi zpfEMj#h6R0_<w)vI^Gu@?xTO2?0*NJ)c$9GJi1@A{~bU0qW^u0&u5|kL8kH?(Z0NL z_?h7-2Q5F`#9}z_Y@BO9lykAwen?58Xz6j73Go{^;+;~l5K^fMk4!e1oTa5*d~BV< zc!?nbDN^VFYfcj4p3{q*Q3TFWiaU16m0~D@1R=3fp<-25akzwicwqJ6LB`1)-ttu> zVl<La1hVCUfwY+3Lh6XsX&}&)%`#}%0n<_lA#cnsv{OMuv8AUBQKKMuD^G{&OR&Z* zEL29>28^@TgNM~CCshwdUXbJGGEI<@)1u%sQBTxM`Jh>E_#)dTBK+Xk$CGGBT;{P} zVN{&LV0dD5m-)p)HlkhoW$t3E;Hq$AHF>!=x%fAR-r)t*5o>3n7oWGn`2`9@A_&Aa z%+GcQldFr}l1ciA{Q5N_Dq?DH2f`Sk0Tekz{(K5)5)&Z&is|LhHVL08JG2c5)C~-l z5<inrA{?bh@s$A@B$LjBCbQCo%2AADCW*o-ZWcylWbcC#(}TT-F^?9tPZ9k8+$!7s z$_2%7CbHB|I~d}roM=ed&W&*t&~Z%chV`O@1@)w0)&be0Z5>rcn-2;^_F?<}ulx>q zs!P*-GC%zKKK<*FE9U<3T~<AO_?)+X7r_vytljTf_|$*NKlne-^J&wdyysQz?7gry zvS8FHScbhXv9ycA^YQm!u~`vzp3a7q?)F=J$N%5nx%9Se1OfQ2U$JG2`eMpx6u78d z=g^=ndT8B4i=YS$LYCOXs4dERz%h#a_wKy*#T7-0vJ)3Om&6pgeC+P*&g?g{^t_~i z!Z*e<#$&z{{Yrm$XWBP8Q9n@nMMQEfc8VQ)CK+?g`LE%u@mRE-_bf&Q`VZya%S17Y z{&$jKn)7~KPaED**N?kX#;=YE?a^;n518|hxFv-0xaWZDU+dg=r3oNdVQRoZMC0jR zg<3%DZC%ERWD-2_x*~Vci+QZ^lHm?{e<-60WGt$nNmF#Ar!he_3>sAr<zmqa=r7cG zKn~ulDibq_iyYF&X<)-B#LXIJ5+*c8<^ad|hNkXhFrqs_iXixzMlJuhKV%;l`}|%y z1oQS2CqA_ttOMmfgybZ#%gPVsl)XJR4?&=@zJv$_2w~KEq<DSt+fTpzeC{<#t|B^S zF4Bi{ZKbQtVrKGTskf+%aBji#8-H4HS-TuuQaO9kqJ=>2Wv8GO))7ax(q-f;l2^X0 zZ35%o0vB8HV^T9;mK-k5o3%XT99FW{Cry?!UedyAR>uQzrNOEkuf);AF7^1K0Kb$~ zB&hLs^Xj(D^_x;<zg?}Np<T}hGkyI{wE&0R<xrNL?`<0};5H?m#vj~d*tm8l>ZATW zpxOGp2POnwE4!KiybQ{9GY_X_do>8BN|E-H!&I3TN|Yhpox$2j2HQfM^74FM<ujF6 zFv%Q`b-NJdd>-rHu_mP-<6?<!M5<n=R)YpZtFCs4Mt?8Olm6b!r!o~-mbp#i<&R1n z`l;)H-n5##;c~bNujl;w`%dQTFa9SR+_W^zlH)4LXD%`S-{@)izn7;kM|J-1H2MFY zLY|-h&#sqr@%z1aPQy!kzg}!1snMS&i%47jc`%Wq&&wNlPt>9U>S;+4bTE*EkIyHm z3~U6MarD46FDFZF0>TW$PRah9n~b#*MR8SORwJ8@$%&c>U_eQnMRcDKYS!r}6K03u ztN9bz&SB&V?}X9elIhUjoJC%-oDD+95awhKk^)>kup0-?%X3UUl5ds(F)m~t#dExY zq33ja)Fu)+f8eu2ijwQangg*gPqgE^wC~v9xRa$nyX+U%u~QM!AJn>>zMo&;ZNNE2 zK~mxFAWnK*p#b$KcvB8;%VlYjK9q4=!UGIVFcul{fq51)m6WlSe#eX{`Wf%(^HsOH zBg~G;S+xS+j`-9dOYwsZ`JvrXVm4WRcjwoacW2zJ6As(!?*CCo|Kj=VbikU+FZeI@ z)eHHb9Qfwrk^1_E3!);)xPU8js`Hv5S383~8k+Br{6n00PGTaoN1RX22Jt|jRV|Tp za9!bc+Ar3Xv}wMdb#X$!HrsGY-g)Z;=lE@S;G>nddFHCZA7OJLPGDAT){D)W{kZ5; zbh>O{&{I~FS>>db#eB}81vj11*Rn@e?^XUm4ZRO+jHCO>^?EoAOreYUv~;xqHFc{5 zjPD1Phe>M14vY|8hD1j<H`H-JF>+iksfgp+3z)XZR^QZjnw{63TfW`rzQ`L~!N6uB zeNvPsc^MpQ+VQ40>^}M&N6%z@wGnUr|418v?pXgnJspMo=jim?6#w%i;;kyyq}GR; zPv4dnHk9tWe|GJrpT+i{9f3?Nt1p##z#T)sOFM?99YeS77-|4SC&5RcGism-pSf$R z&@DuzlLREVk+FRFjQ9;k<_4CB{DfPIHtwl&n5aA|i`?=(L-VMp`U3kN@p)8K5Ts|K z!CD3BnP$>2N{`Ahp?YfnP(4mH62|MPed6_~tZhMi?ugPHv?tHhB63ePMDFq9v=84? zTf+CEO=w39pQ^|3aiwhy<g-I^pGZD0;|qNLJ;V8Uw2H*^sg^N)_DOaH_Nk`8J}QQy z`yOd8u?Ee*`|6#$j2(nCw3?$YYe*&ez@gd)IHZDV)S=pgI%IuM=%I2XBoEz2xvFhi z8N&;?<Qj<Bbb5#+(!nT~NDm}%B5$>|WggJjl1%;fW)aPdRrFG4AaPK8VR?k^RH7YV zwxEe>2bxF)6fuIJsDp{B5lp1AI?{<MpcCnNq|S>zTp||5a3T?j$lV>7L+phhdh}ri z;9+)#-ynh+W<VI~pMhH&5KJiVb3lY}7d=SeU`DDVJ2Qt2DVWi}{2m>szz_(`0v6Dg zxQqP*?9X|^k7u&0NPohQJ1=s3F=e6~Y0=F171GEL1o$;{;P!YQca=7bUr_`63On!> zKHgV!Li?x)!}mE=+n(>^X^{i@IU`97>B@YXEA!8f;(aJ>8NZ;Q7?o8ot~>2#N4UP6 zpVR`weyTm}R~XW-V9Jlmx`rLlJ=6~mAAt4a*_H+VR5#$Sb(5%Lefto72ZQ+<IX?O* zhamW<B*OSq8;tKUEQrxC=F-`I_AZN|fa{CC2m=;%0FJ>oqdUM1roZ>28GN(Z-Q}qz z(m(|?a}BBm*T7%232uPe)$@Prri;$<`%(;4iia|&eNYB#pbO8?aX>g2(h%ISnQM6E zLJe}ILpEdrHDtguWbhAA4Br#N@G8PD*rwW_T%fXKyzhlC80F?N3~C>SLFR-pkb#%b z?KfykGAOSGLXd$EH_!~+hz!yobI$%SgRio75)J+n?*bZR+V1xYDr9ef;nDKk))zwQ zc$Xx%-PbTb_2O`nBuSDaNs=T<k|arzBuSDaNs=T<k|arzBuSDaNs=T<lH^&)e-A^W IQvd)306pHTkN^Mx diff --git a/apt/dselect/CVS/Entries b/apt/dselect/CVS/Entries deleted file mode 100644 index 1dd0cf7..0000000 --- a/apt/dselect/CVS/Entries +++ /dev/null @@ -1,7 +0,0 @@ -/desc.apt/1.1.1.1/Fri Aug 10 14:01:51 2001// -/install/1.1.1.1/Fri Aug 10 14:01:51 2001// -/makefile/1.1.1.1/Fri Aug 10 14:01:51 2001// -/names/1.1.1.1/Fri Aug 10 14:01:51 2001// -/setup/1.1.1.1/Fri Aug 10 14:01:51 2001// -/update/1.1.1.1/Fri Aug 10 14:01:51 2001// -D diff --git a/apt/dselect/CVS/Repository b/apt/dselect/CVS/Repository deleted file mode 100644 index a1dbedc..0000000 --- a/apt/dselect/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/dselect diff --git a/apt/dselect/CVS/Root b/apt/dselect/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/dselect/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/dselect/install b/apt/dselect/install index 8ac3523..d9d6651 100755 --- a/apt/dselect/install +++ b/apt/dselect/install @@ -1,15 +1,22 @@ -#!/bin/sh +#!/bin/bash + +# Set the textdomain for the translations using $"..." +TEXTDOMAIN="apt" # Get the configuration from /etc/apt/apt.conf CLEAN="prompt" OPTS="-f" APTGET="/usr/bin/apt-get" DPKG="/usr/bin/dpkg" +DPKG_OPTS="--admindir=$1" +APT_OPT0="-oDir::State::status=$1/status" +APT_OPT1="-oDPkg::Options::=$DPKG_OPTS" set -e RES=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::Options \ - DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \ - ARCHIVES Dir::Cache::Archives/ \ - WAIT DSelect::WaitAfterDownload` + DPKG Dir::Bin::dpkg/f APTGET Dir::Bin::apt-get/f \ + ARCHIVES Dir::Cache::Archives/d \ + WAIT DSelect::WaitAfterDownload/b \ + CHECKDIR DSelect::CheckDir/b` eval $RES set +e @@ -22,7 +29,7 @@ yesno() { case $2 in Y|y) defp="[Y/n]" def=y;; N|n) defp="[y/N]" def=n;; - *) echo "Bad default setting!" 1>&2; exit 1;; + *) echo $"Bad default setting!" 1>&2; exit 1;; esac else defp="[y/N]" def=n @@ -39,14 +46,13 @@ yesno() { echo $ans | tr YN yn } -OLDLS=`ls -ld $ARCHIVES` -if [ x$WAIT = "xyes" ]; then - $APTGET $OPTS -d dselect-upgrade - echo "Press enter to continue." && read RES - $APTGET $OPTS dselect-upgrade +if [ x$WAIT = "xtrue" ]; then + $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" -d dselect-upgrade + echo $"Press enter to continue." && read RES + $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" dselect-upgrade RES=$? else - $APTGET $OPTS dselect-upgrade + $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" dselect-upgrade RES=$? fi @@ -64,34 +70,39 @@ if [ $RES -eq 0 ]; then fi NEWLS=`ls -ld $ARCHIVES` - if [ "x$OLDLS" = "x$NEWLS" ]; then - exit 0 + if [ x$CHECKDIR = "xtrue" ]; then + if [ "x$OLDLS" = "x$NEWLS" ]; then + exit 0 + fi fi # Check the cleaning mode case `echo $CLEAN | tr '[:upper:]' '[:lower:]'` in auto) - $APTGET autoclean && echo "Press enter to continue." && read RES && exit 0; + $APTGET "$APT_OPT0" "$APT_OPT1" autoclean && + echo $"Press enter to continue." && read RES && exit 0; ;; always) - $APTGET clean && echo "Press enter to continue." && read RES && exit 0; + $APTGET "$APT_OPT0" "$APT_OPT1" clean && + echo $"Press enter to continue." && read RES && exit 0; ;; prompt) exec 3>&1 - if [ `yesno "Do you want to erase the downloaded .deb files?" y` = y ]; then - $APTGET clean && echo "Press enter to continue." && read RES && exit 0; + if [ `yesno $"Do you want to erase any previously downloaded .deb files?" y` = y ]; then + $APTGET "$APT_OPT0" "$APT_OPT1" clean && + echo $"Press enter to continue." && read RES && exit 0; fi ;; *) ;; esac else - echo "Some errors occurred while unpacking. I'm going to configure the" - echo "packages that were installed. 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." - read RES && $DPKG --configure -a + echo $"Some errors occurred while unpacking. I'm going to configure the" + echo $"packages that were installed. 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." + read RES && $DPKG "$DPKG_OPTS" --configure -a exit 100 fi diff --git a/apt/dselect/makefile b/apt/dselect/makefile index f4a781e..cdc8028 100644 --- a/apt/dselect/makefile +++ b/apt/dselect/makefile @@ -9,4 +9,8 @@ include ../buildlib/defaults.mak SOURCE = desc.apt install names setup update TO = $(BUILD)/scripts/dselect include $(COPY_H) - + +LOCAL = dselect +SOURCE = install update +TYPE = sh +include $(PODOMAIN_H) diff --git a/apt/dselect/update b/apt/dselect/update index 9195912..b58fa13 100755 --- a/apt/dselect/update +++ b/apt/dselect/update @@ -1,35 +1,48 @@ -#!/bin/sh +#!/bin/bash set -e +# Set the textdomain for the translations using $"..." +TEXTDOMAIN="apt" + # Get the configuration from /etc/apt/apt.conf +CLEAN="prompt" OPTS="-f" APTGET="/usr/bin/apt-get" APTCACHE="/usr/bin/apt-cache" DPKG="/usr/bin/dpkg" +DPKG_OPTS="--admindir=$1" +APT_OPT0="-oDir::State::status=$1/status" +APT_OPT1="-oDPkg::Options::=$DPKG_OPTS" CACHEDIR="/var/cache/apt" -PROMPT="no" -RES=`apt-config shell OPTS DSelect::UpdateOptions \ - DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \ - APTCACHE Dir::Bin::apt-cache CACHEDIR Dir::Cache \ - PROMPT DSelect::PromptAfterUpdate` +PROMPT="false" +RES=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::UpdateOptions \ + DPKG Dir::Bin::dpkg/f APTGET Dir::Bin::apt-get/f \ + APTCACHE Dir::Bin::apt-cache/f CACHEDIR Dir::Cache/d \ + PROMPT DSelect::PromptAfterUpdate/b` eval $RES # It looks slightly ugly to have a double / in the dpkg output CACHEDIR=`echo $CACHEDIR | sed -e "s|/$||"` -set +e -FAILED=0 -$APTGET $OPTS update || FAILED=1 -set -e +STATUS=1 +if $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" update +then + echo $"Merging Available information" + rm -f $CACHEDIR/available + $APTCACHE dumpavail > $CACHEDIR/available + $DPKG "$DPKG_OPTS" --update-avail $CACHEDIR/available + rm -f $CACHEDIR/available -echo "Merging Available information" -rm -f $CACHEDIR/available -$APTCACHE dumpavail > $CACHEDIR/available -$DPKG --update-avail $CACHEDIR/available -rm -f $CACHEDIR/available + case "$CLEAN" in + Pre-Auto|PreAuto|pre-auto) + $APTGET "$APT_OPT0" "$APT_OPT1" autoclean;; + esac -if [ $PROMPT = "yes" ]; then - echo "Press enter to continue." && read RES; + STATUS=0 fi -exit $FAILED +if [ x$PROMPT = "xtrue" ]; then + echo $"Press enter to continue." && read RES; +fi + +exit $STATUS diff --git a/apt/ftparchive/apt-ftparchive.cc b/apt/ftparchive/apt-ftparchive.cc new file mode 100644 index 0000000..cfa710a --- /dev/null +++ b/apt/ftparchive/apt-ftparchive.cc @@ -0,0 +1,932 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: apt-ftparchive.cc,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + apt-scanpackages - Efficient work-alike for dpkg-scanpackages + + Let contents be disabled from the conf + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "apt-ftparchive.h" +#endif + +#include "apt-ftparchive.h" + +#include <apt-pkg/error.h> +#include <apt-pkg/configuration.h> +#include <apt-pkg/cmndline.h> +#include <apt-pkg/strutl.h> +#include <config.h> +#include <apti18n.h> +#include <algorithm> + +#include <sys/time.h> +#include <regex.h> + +#include "contents.h" +#include "multicompress.h" +#include "writer.h" + /*}}}*/ + +using namespace std; +ostream c0out(0); +ostream c1out(0); +ostream c2out(0); +ofstream devnull("/dev/null"); +unsigned Quiet = 0; + +// struct PackageMap - List of all package files in the config file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +struct PackageMap +{ + // General Stuff + string BaseDir; + string InternalPrefix; + string FLFile; + string PkgExt; + string SrcExt; + + // Stuff for the Package File + string PkgFile; + string BinCacheDB; + string BinOverride; + string ExtraOverride; + + // Stuff for the Source File + string SrcFile; + string SrcOverride; + string SrcExtraOverride; + + // Contents + string Contents; + string ContentsHead; + + // Random things + string Tag; + string PkgCompress; + string CntCompress; + string SrcCompress; + string PathPrefix; + unsigned int DeLinkLimit; + mode_t Permissions; + + bool ContentsDone; + bool PkgDone; + bool SrcDone; + time_t ContentsMTime; + + struct ContentsCompare : public binary_function<PackageMap,PackageMap,bool> + { + inline bool operator() (const PackageMap &x,const PackageMap &y) + {return x.ContentsMTime < y.ContentsMTime;}; + }; + + struct DBCompare : public binary_function<PackageMap,PackageMap,bool> + { + inline bool operator() (const PackageMap &x,const PackageMap &y) + {return x.BinCacheDB < y.BinCacheDB;}; + }; + + void GetGeneral(Configuration &Setup,Configuration &Block); + bool GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats); + bool GenSources(Configuration &Setup,struct CacheDB::Stats &Stats); + bool GenContents(Configuration &Setup, + vector<PackageMap>::iterator Begin, + vector<PackageMap>::iterator End, + unsigned long &Left); + + PackageMap() : DeLinkLimit(0), Permissions(1), ContentsDone(false), + PkgDone(false), SrcDone(false), ContentsMTime(0) {}; +}; + /*}}}*/ + +// PackageMap::GetGeneral - Common per-section definitions /*{{{*/ +// --------------------------------------------------------------------- +/* */ +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); + else + DeLinkLimit = 0; + + PkgCompress = Block.Find("Packages::Compress", + Setup.Find("Default::Packages::Compress",". gzip").c_str()); + CntCompress = Block.Find("Contents::Compress", + Setup.Find("Default::Contents::Compress",". gzip").c_str()); + SrcCompress = Block.Find("Sources::Compress", + Setup.Find("Default::Sources::Compress",". gzip").c_str()); + + SrcExt = Block.Find("Sources::Extensions", + Setup.Find("Default::Sources::Extensions",".dsc").c_str()); + PkgExt = Block.Find("Packages::Extensions", + Setup.Find("Default::Packages::Extensions",".deb").c_str()); + + Permissions = Setup.FindI("Default::FileMode",0644); + + if (FLFile.empty() == false) + FLFile = flCombine(Setup.Find("Dir::FileListDir"),FLFile); + + if (Contents == " ") + Contents= string(); +} + /*}}}*/ +// PackageMap::GenPackages - Actually generate a Package file /*{{{*/ +// --------------------------------------------------------------------- +/* This generates the Package File described by this object. */ +bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats) +{ + if (PkgFile.empty() == true) + return true; + + string ArchiveDir = Setup.FindDir("Dir::ArchiveDir"); + string OverrideDir = Setup.FindDir("Dir::OverrideDir"); + string CacheDir = Setup.FindDir("Dir::CacheDir"); + + struct timeval StartTime; + gettimeofday(&StartTime,0); + + PkgDone = true; + + // Create a package writer object. + PackagesWriter Packages(flCombine(CacheDir,BinCacheDB), + flCombine(OverrideDir,BinOverride), + flCombine(OverrideDir,ExtraOverride)); + if (PkgExt.empty() == false && Packages.SetExts(PkgExt) == false) + return _error->Error("Package extension list is too long"); + if (_error->PendingError() == true) + return _error->Error("Error Processing directory %s",BaseDir.c_str()); + + Packages.PathPrefix = PathPrefix; + Packages.DirStrip = ArchiveDir; + Packages.InternalPrefix = flCombine(ArchiveDir,InternalPrefix); + + Packages.Stats.DeLinkBytes = Stats.DeLinkBytes; + Packages.DeLinkLimit = DeLinkLimit; + + // Create a compressor object + MultiCompress Comp(flCombine(ArchiveDir,PkgFile), + PkgCompress,Permissions); + Packages.Output = Comp.Input; + if (_error->PendingError() == true) + return _error->Error("Error Processing directory %s",BaseDir.c_str()); + + c0out << ' ' << BaseDir << ":" << flush; + + // Do recursive directory searching + if (FLFile.empty() == true) + { + if (Packages.RecursiveScan(flCombine(ArchiveDir,BaseDir)) == false) + return false; + } + else + { + if (Packages.LoadFileList(ArchiveDir,FLFile) == false) + return false; + } + + Packages.Output = 0; // Just in case + + // Finish compressing + unsigned long Size; + if (Comp.Finalize(Size) == false) + { + c0out << endl; + return _error->Error("Error Processing directory %s",BaseDir.c_str()); + } + + if (Size != 0) + c0out << " New " + << SizeToStr(Size) << "B "; + else + c0out << ' '; + + struct timeval NewTime; + gettimeofday(&NewTime,0); + double Delta = NewTime.tv_sec - StartTime.tv_sec + + (NewTime.tv_usec - StartTime.tv_usec)/1000000.0; + + c0out << Packages.Stats.Packages << " files " << +/* SizeToStr(Packages.Stats.MD5Bytes) << "B/" << */ + SizeToStr(Packages.Stats.Bytes) << "B " << + TimeToStr((long)Delta) << endl; + + Stats.Add(Packages.Stats); + Stats.DeLinkBytes = Packages.Stats.DeLinkBytes; + + return !_error->PendingError(); +} + /*}}}*/ +// PackageMap::GenSources - Actually generate a Source file /*{{{*/ +// --------------------------------------------------------------------- +/* This generates the Sources File described by this object. */ +bool PackageMap::GenSources(Configuration &Setup,struct CacheDB::Stats &Stats) +{ + if (SrcFile.empty() == true) + return true; + + string ArchiveDir = Setup.FindDir("Dir::ArchiveDir"); + string OverrideDir = Setup.FindDir("Dir::OverrideDir"); + string CacheDir = Setup.FindDir("Dir::CacheDir"); + + struct timeval StartTime; + gettimeofday(&StartTime,0); + + SrcDone = true; + + // Create a package writer object. + SourcesWriter Sources(flCombine(OverrideDir,BinOverride), + flCombine(OverrideDir,SrcOverride), + flCombine(OverrideDir,SrcExtraOverride)); + if (SrcExt.empty() == false && Sources.SetExts(SrcExt) == false) + return _error->Error("Source extension list is too long"); + if (_error->PendingError() == true) + return _error->Error("Error Processing directory %s",BaseDir.c_str()); + + Sources.PathPrefix = PathPrefix; + Sources.DirStrip = ArchiveDir; + Sources.InternalPrefix = flCombine(ArchiveDir,InternalPrefix); + + Sources.DeLinkLimit = DeLinkLimit; + Sources.Stats.DeLinkBytes = Stats.DeLinkBytes; + + // Create a compressor object + MultiCompress Comp(flCombine(ArchiveDir,SrcFile), + SrcCompress,Permissions); + Sources.Output = Comp.Input; + if (_error->PendingError() == true) + return _error->Error("Error Processing directory %s",BaseDir.c_str()); + + c0out << ' ' << BaseDir << ":" << flush; + + // Do recursive directory searching + if (FLFile.empty() == true) + { + if (Sources.RecursiveScan(flCombine(ArchiveDir,BaseDir))== false) + return false; + } + else + { + if (Sources.LoadFileList(ArchiveDir,FLFile) == false) + return false; + } + Sources.Output = 0; // Just in case + + // Finish compressing + unsigned long Size; + if (Comp.Finalize(Size) == false) + { + c0out << endl; + return _error->Error("Error Processing directory %s",BaseDir.c_str()); + } + + if (Size != 0) + c0out << " New " + << SizeToStr(Size) << "B "; + else + c0out << ' '; + + struct timeval NewTime; + gettimeofday(&NewTime,0); + double Delta = NewTime.tv_sec - StartTime.tv_sec + + (NewTime.tv_usec - StartTime.tv_usec)/1000000.0; + + c0out << Sources.Stats.Packages << " pkgs in " << + TimeToStr((long)Delta) << endl; + + Stats.Add(Sources.Stats); + Stats.DeLinkBytes = Sources.Stats.DeLinkBytes; + + return !_error->PendingError(); +} + /*}}}*/ +// PackageMap::GenContents - Actually generate a Contents file /*{{{*/ +// --------------------------------------------------------------------- +/* This generates the contents file partially described by this object. + It searches the given iterator range for other package files that map + into this contents file and includes their data as well when building. */ +bool PackageMap::GenContents(Configuration &Setup, + vector<PackageMap>::iterator Begin, + vector<PackageMap>::iterator End, + unsigned long &Left) +{ + if (Contents.empty() == true) + return true; + + if (Left == 0) + return true; + + string ArchiveDir = Setup.FindDir("Dir::ArchiveDir"); + string CacheDir = Setup.FindDir("Dir::CacheDir"); + string OverrideDir = Setup.FindDir("Dir::OverrideDir"); + + struct timeval StartTime; + gettimeofday(&StartTime,0); + + // Create a package writer object. + ContentsWriter Contents(""); + if (PkgExt.empty() == false && Contents.SetExts(PkgExt) == false) + return _error->Error("Package extension list is too long"); + if (_error->PendingError() == true) + return false; + + MultiCompress Comp(flCombine(ArchiveDir,this->Contents), + CntCompress,Permissions); + Comp.UpdateMTime = Setup.FindI("Default::ContentsAge",10)*24*60*60; + Contents.Output = Comp.Input; + if (_error->PendingError() == true) + return false; + + // Write the header out. + if (ContentsHead.empty() == false) + { + FileFd Head(flCombine(OverrideDir,ContentsHead),FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + + unsigned long Size = Head.Size(); + unsigned char Buf[4096]; + while (Size != 0) + { + unsigned long ToRead = Size; + if (Size > sizeof(Buf)) + ToRead = sizeof(Buf); + + if (Head.Read(Buf,ToRead) == false) + return false; + + if (fwrite(Buf,1,ToRead,Comp.Input) != ToRead) + return _error->Errno("fwrite","Error writing header to contents file"); + + Size -= ToRead; + } + } + + /* Go over all the package file records and parse all the package + files associated with this contents file into one great big honking + memory structure, then dump the sorted version */ + c0out << ' ' << this->Contents << ":" << flush; + for (vector<PackageMap>::iterator I = Begin; I != End; I++) + { + if (I->Contents != this->Contents) + continue; + + Contents.Prefix = ArchiveDir; + Contents.ReadyDB(flCombine(CacheDir,I->BinCacheDB)); + Contents.ReadFromPkgs(flCombine(ArchiveDir,I->PkgFile), + I->PkgCompress); + + I->ContentsDone = true; + } + + Contents.Finish(); + + // Finish compressing + unsigned long Size; + if (Comp.Finalize(Size) == false || _error->PendingError() == true) + { + c0out << endl; + return _error->Error("Error Processing Contents %s", + this->Contents.c_str()); + } + + if (Size != 0) + { + c0out << " New " << SizeToStr(Size) << "B "; + if (Left > Size) + Left -= Size; + else + Left = 0; + } + else + c0out << ' '; + + struct timeval NewTime; + gettimeofday(&NewTime,0); + double Delta = NewTime.tv_sec - StartTime.tv_sec + + (NewTime.tv_usec - StartTime.tv_usec)/1000000.0; + + c0out << Contents.Stats.Packages << " files " << + SizeToStr(Contents.Stats.Bytes) << "B " << + TimeToStr((long)Delta) << endl; + + return true; +} + /*}}}*/ + +// LoadTree - Load a 'tree' section from the Generate Config /*{{{*/ +// --------------------------------------------------------------------- +/* This populates the PkgList with all the possible permutations of the + section/arch lists. */ +void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup) +{ + // Load the defaults + string DDir = Setup.Find("TreeDefault::Directory", + "$(DIST)/$(SECTION)/binary-$(ARCH)/"); + string DSDir = Setup.Find("TreeDefault::SrcDirectory", + "$(DIST)/$(SECTION)/source/"); + string DPkg = Setup.Find("TreeDefault::Packages", + "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages"); + string DIPrfx = Setup.Find("TreeDefault::InternalPrefix", + "$(DIST)/$(SECTION)/"); + string DContents = Setup.Find("TreeDefault::Contents", + "$(DIST)/Contents-$(ARCH)"); + string DContentsH = Setup.Find("TreeDefault::Contents::Header",""); + string DBCache = Setup.Find("TreeDefault::BinCacheDB", + "packages-$(ARCH).db"); + string DSources = Setup.Find("TreeDefault::Sources", + "$(DIST)/$(SECTION)/source/Sources"); + string DFLFile = Setup.Find("TreeDefault::FileList", ""); + string DSFLFile = Setup.Find("TreeDefault::SourceFileList", ""); + + // Process 'tree' type sections + const Configuration::Item *Top = Setup.Tree("tree"); + for (Top = (Top == 0?0:Top->Child); Top != 0;) + { + Configuration Block(Top); + string Dist = Top->Tag; + + // Parse the sections + string Tmp = Block.Find("Sections"); + const char *Sections = Tmp.c_str(); + string Section; + while (ParseQuoteWord(Sections,Section) == true) + { + string Tmp2 = Block.Find("Architectures"); + string Arch; + const char *Archs = Tmp2.c_str(); + while (ParseQuoteWord(Archs,Arch) == true) + { + struct SubstVar Vars[] = {{"$(DIST)",&Dist}, + {"$(SECTION)",&Section}, + {"$(ARCH)",&Arch}, + {}}; + PackageMap Itm; + + Itm.BinOverride = SubstVar(Block.Find("BinOverride"),Vars); + Itm.InternalPrefix = SubstVar(Block.Find("InternalPrefix",DIPrfx.c_str()),Vars); + + if (stringcasecmp(Arch,"source") == 0) + { + Itm.SrcOverride = SubstVar(Block.Find("SrcOverride"),Vars); + Itm.BaseDir = SubstVar(Block.Find("SrcDirectory",DSDir.c_str()),Vars); + Itm.SrcFile = SubstVar(Block.Find("Sources",DSources.c_str()),Vars); + Itm.Tag = SubstVar("$(DIST)/$(SECTION)/source",Vars); + Itm.FLFile = SubstVar(Block.Find("SourceFileList",DSFLFile.c_str()),Vars); + Itm.SrcExtraOverride = SubstVar(Block.Find("SrcExtraOverride"),Vars); + } + else + { + Itm.BinCacheDB = SubstVar(Block.Find("BinCacheDB",DBCache.c_str()),Vars); + Itm.BaseDir = SubstVar(Block.Find("Directory",DDir.c_str()),Vars); + Itm.PkgFile = SubstVar(Block.Find("Packages",DPkg.c_str()),Vars); + Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars); + 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); + PkgList.push_back(Itm); + } + } + + Top = Top->Next; + } +} + /*}}}*/ +// LoadBinDir - Load a 'bindirectory' section from the Generate Config /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup) +{ + // Process 'bindirectory' type sections + const Configuration::Item *Top = Setup.Tree("bindirectory"); + for (Top = (Top == 0?0:Top->Child); Top != 0;) + { + Configuration Block(Top); + + PackageMap Itm; + Itm.PkgFile = Block.Find("Packages"); + Itm.SrcFile = Block.Find("Sources"); + Itm.BinCacheDB = Block.Find("BinCacheDB"); + Itm.BinOverride = Block.Find("BinOverride"); + Itm.ExtraOverride = Block.Find("ExtraOverride"); + Itm.SrcExtraOverride = Block.Find("SrcExtraOverride"); + Itm.SrcOverride = Block.Find("SrcOverride"); + Itm.BaseDir = Top->Tag; + Itm.FLFile = Block.Find("FileList"); + Itm.InternalPrefix = Block.Find("InternalPrefix",Top->Tag.c_str()); + Itm.Contents = Block.Find("Contents"); + Itm.ContentsHead = Block.Find("Contents::Header"); + + Itm.GetGeneral(Setup,Block); + PkgList.push_back(Itm); + + Top = Top->Next; + } +} + /*}}}*/ + +// ShowHelp - Show the help text /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool ShowHelp(CommandLine &CmdL) +{ + ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + if (_config->FindB("version") == true) + return true; + + cout << + "Usage: apt-ftparchive [options] command\n" + "Commands: packges binarypath [overridefile [pathprefix]]\n" + " sources srcpath [overridefile [pathprefix]]\n" + " contents 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 contian 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 arbitary configuration option" << endl; + + return true; +} + /*}}}*/ +// SimpleGenPackages - Generate a Packages file for a directory tree /*{{{*/ +// --------------------------------------------------------------------- +/* This emulates dpkg-scanpackages's command line interface. 'mostly' */ +bool SimpleGenPackages(CommandLine &CmdL) +{ + if (CmdL.FileSize() < 2) + return ShowHelp(CmdL); + + string Override; + if (CmdL.FileSize() >= 3) + Override = CmdL.FileList[2]; + + // Create a package writer object. + PackagesWriter Packages(_config->Find("APT::FTPArchive::DB"), + Override, ""); + if (_error->PendingError() == true) + return false; + + if (CmdL.FileSize() >= 4) + Packages.PathPrefix = CmdL.FileList[3]; + + // Do recursive directory searching + if (Packages.RecursiveScan(CmdL.FileList[1]) == false) + return false; + + return true; +} + /*}}}*/ +// SimpleGenContents - Generate a Contents listing /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool SimpleGenContents(CommandLine &CmdL) +{ + if (CmdL.FileSize() < 2) + return ShowHelp(CmdL); + + // Create a package writer object. + ContentsWriter Contents(_config->Find("APT::FTPArchive::DB")); + if (_error->PendingError() == true) + return false; + + // Do recursive directory searching + if (Contents.RecursiveScan(CmdL.FileList[1]) == false) + return false; + + Contents.Finish(); + + return true; +} + /*}}}*/ +// SimpleGenSources - Generate a Sources file for a directory tree /*{{{*/ +// --------------------------------------------------------------------- +/* This emulates dpkg-scanpackages's command line interface. 'mostly' */ +bool SimpleGenSources(CommandLine &CmdL) +{ + if (CmdL.FileSize() < 2) + return ShowHelp(CmdL); + + string Override; + if (CmdL.FileSize() >= 3) + Override = CmdL.FileList[2]; + + string SOverride; + if (Override.empty() == false) + SOverride = Override + ".src"; + + SOverride = _config->Find("APT::FTPArchive::SourceOverride", + SOverride.c_str()); + + // Create a package writer object. + SourcesWriter Sources(Override,SOverride); + if (_error->PendingError() == true) + return false; + + if (CmdL.FileSize() >= 4) + Sources.PathPrefix = CmdL.FileList[3]; + + // Do recursive directory searching + if (Sources.RecursiveScan(CmdL.FileList[1]) == false) + return false; + + return true; +} + /*}}}*/ +// Generate - Full generate, using a config file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool Generate(CommandLine &CmdL) +{ + struct CacheDB::Stats SrcStats; + if (CmdL.FileSize() < 2) + return ShowHelp(CmdL); + + struct timeval StartTime; + gettimeofday(&StartTime,0); + struct CacheDB::Stats Stats; + + // Read the configuration file. + Configuration Setup; + if (ReadConfigFile(Setup,CmdL.FileList[1],true) == false) + return false; + + vector<PackageMap> PkgList; + LoadTree(PkgList,Setup); + LoadBinDir(PkgList,Setup); + + // Sort by cache DB to improve IO locality. + stable_sort(PkgList.begin(),PkgList.end(),PackageMap::DBCompare()); + + // Generate packages + if (CmdL.FileSize() <= 2) + { + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + if (I->GenPackages(Setup,Stats) == false) + _error->DumpErrors(); + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + if (I->GenSources(Setup,SrcStats) == false) + _error->DumpErrors(); + } + else + { + // Make a choice list out of the package list.. + RxChoiceList *List = new RxChoiceList[2*PkgList.size()+1]; + RxChoiceList *End = List; + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + { + End->UserData = &(*I); + End->Str = I->BaseDir.c_str(); + End++; + + End->UserData = &(*I); + End->Str = I->Tag.c_str(); + End++; + } + End->Str = 0; + + // Regex it + if (RegexChoice(List,CmdL.FileList + 2,CmdL.FileList + CmdL.FileSize()) == 0) + { + delete [] List; + return _error->Error("No selections matched"); + } + _error->DumpErrors(); + + // Do the generation for Packages + for (End = List; End->Str != 0; End++) + { + if (End->Hit == false) + continue; + + PackageMap *I = (PackageMap *)End->UserData; + if (I->PkgDone == true) + continue; + if (I->GenPackages(Setup,Stats) == false) + _error->DumpErrors(); + } + + // Do the generation for Sources + for (End = List; End->Str != 0; End++) + { + if (End->Hit == false) + continue; + + PackageMap *I = (PackageMap *)End->UserData; + if (I->SrcDone == true) + continue; + if (I->GenSources(Setup,SrcStats) == false) + _error->DumpErrors(); + } + + delete [] List; + } + + if (_config->FindB("APT::FTPArchive::Contents",true) == false) + return true; + + c1out << "Done Packages, Starting contents." << endl; + + // Sort the contents file list by date + string ArchiveDir = Setup.FindDir("Dir::ArchiveDir"); + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + { + struct stat A; + if (MultiCompress::GetStat(flCombine(ArchiveDir,I->Contents), + I->CntCompress,A) == false) + time(&I->ContentsMTime); + else + I->ContentsMTime = A.st_mtime; + } + stable_sort(PkgList.begin(),PkgList.end(),PackageMap::ContentsCompare()); + + /* Now for Contents.. The process here is to do a make-like dependency + check. Each contents file is verified to be newer than the package files + 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; + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + { + // This record is not relevent + if (I->ContentsDone == true || + I->Contents.empty() == true) + continue; + + // Do not do everything if the user specified sections. + if (CmdL.FileSize() > 2 && I->PkgDone == false) + continue; + + struct stat A,B; + if (MultiCompress::GetStat(flCombine(ArchiveDir,I->Contents),I->CntCompress,A) == true) + { + if (MultiCompress::GetStat(flCombine(ArchiveDir,I->PkgFile),I->PkgCompress,B) == false) + { + _error->Warning("Some files are missing in the package file group `%s'",I->PkgFile.c_str()); + continue; + } + + if (A.st_mtime > B.st_mtime) + continue; + } + + if (I->GenContents(Setup,PkgList.begin(),PkgList.end(), + MaxContentsChange) == false) + _error->DumpErrors(); + + // Hit the limit? + if (MaxContentsChange == 0) + { + c1out << "Hit contents update byte limit" << endl; + break; + } + } + + struct timeval NewTime; + gettimeofday(&NewTime,0); + double Delta = NewTime.tv_sec - StartTime.tv_sec + + (NewTime.tv_usec - StartTime.tv_usec)/1000000.0; + c1out << "Done. " << SizeToStr(Stats.Bytes) << "B in " << Stats.Packages + << " archives. Took " << TimeToStr((long)Delta) << endl; + + return true; +} + /*}}}*/ +// Clean - Clean out the databases /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool Clean(CommandLine &CmdL) +{ + if (CmdL.FileSize() != 2) + return ShowHelp(CmdL); + + // Read the configuration file. + Configuration Setup; + if (ReadConfigFile(Setup,CmdL.FileList[1],true) == false) + return false; + + vector<PackageMap> PkgList; + LoadTree(PkgList,Setup); + LoadBinDir(PkgList,Setup); + + // Sort by cache DB to improve IO locality. + stable_sort(PkgList.begin(),PkgList.end(),PackageMap::DBCompare()); + + string CacheDir = Setup.FindDir("Dir::CacheDir"); + + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ) + { + c0out << I->BinCacheDB << endl; + CacheDB DB(flCombine(CacheDir,I->BinCacheDB)); + if (DB.Clean() == false) + _error->DumpErrors(); + + string CacheDB = I->BinCacheDB; + for (; I != PkgList.end() && I->BinCacheDB == CacheDB; I++); + } + + return true; +} + /*}}}*/ + +int main(int argc, const char *argv[]) +{ + CommandLine::Args Args[] = { + {'h',"help","help",0}, + {0,"md5","APT::FTPArchive::MD5",0}, + {'v',"version","version",0}, + {'d',"db","APT::FTPArchive::DB",CommandLine::HasArg}, + {'s',"source-override","APT::FTPArchive::SourceOverride",CommandLine::HasArg}, + {'q',"quiet","quiet",CommandLine::IntLevel}, + {'q',"silent","quiet",CommandLine::IntLevel}, + {0,"delink","APT::FTPArchive::DeLinkAct",0}, + {0,"readonly","APT::FTPArchive::ReadOnlyDB",0}, + {0,"contents","APT::FTPArchive::Contents",0}, + {'c',"config-file",0,CommandLine::ConfigFile}, + {'o',"option",0,CommandLine::ArbItem}, + {0,0,0,0}}; + CommandLine::Dispatch Cmds[] = {{"packages",&SimpleGenPackages}, + {"contents",&SimpleGenContents}, + {"sources",&SimpleGenSources}, + {"generate",&Generate}, + {"clean",&Clean}, + {"help",&ShowHelp}, + {0,0}}; + + // Parse the command line and initialize the package library + CommandLine CmdL(Args,_config); + if (CmdL.Parse(argc,argv) == false) + { + _error->DumpErrors(); + return 100; + } + + // See if the help should be shown + if (_config->FindB("help") == true || + _config->FindB("version") == true || + CmdL.FileSize() == 0) + { + ShowHelp(CmdL); + return 0; + } + + // Setup the output streams + c0out.rdbuf(clog.rdbuf()); + c1out.rdbuf(clog.rdbuf()); + c2out.rdbuf(clog.rdbuf()); + Quiet = _config->FindI("quiet",0); + if (Quiet > 0) + c0out.rdbuf(devnull.rdbuf()); + if (Quiet > 1) + c1out.rdbuf(devnull.rdbuf()); + + // Match the operation + CmdL.DispatchArg(Cmds); + + if (_error->empty() == false) + { + bool Errors = _error->PendingError(); + _error->DumpErrors(); + return Errors == true?100:0; + } + return 0; +} diff --git a/apt/ftparchive/apt-ftparchive.h b/apt/ftparchive/apt-ftparchive.h new file mode 100644 index 0000000..0246c5c --- /dev/null +++ b/apt/ftparchive/apt-ftparchive.h @@ -0,0 +1,31 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: apt-ftparchive.h,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + Writer + + The file writer classes. These write various types of output, sources, + packages and contents. + + ##################################################################### */ + /*}}}*/ +#ifndef APT_FTPARCHIVE_H +#define APT_FTPARCHIVE_H + +#ifdef __GNUG__ +#pragma interface "apt-ftparchive.h" +#endif + +#include <fstream> + +using std::ostream; +using std::ofstream; + +extern ostream c0out; +extern ostream c1out; +extern ostream c2out; +extern ofstream devnull; +extern unsigned Quiet; + +#endif diff --git a/apt/ftparchive/cachedb.cc b/apt/ftparchive/cachedb.cc new file mode 100644 index 0000000..b5ab498 --- /dev/null +++ b/apt/ftparchive/cachedb.cc @@ -0,0 +1,284 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: cachedb.cc,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + CacheDB + + Simple uniform interface to a cache database. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "cachedb.h" +#endif + +#include "cachedb.h" + +#include <apt-pkg/error.h> +#include <apt-pkg/md5.h> +#include <apt-pkg/strutl.h> +#include <apt-pkg/configuration.h> + +#include <netinet/in.h> // htonl, etc + /*}}}*/ + +// CacheDB::ReadyDB - Ready the DB2 /*{{{*/ +// --------------------------------------------------------------------- +/* This opens the DB2 file for caching package information */ +bool CacheDB::ReadyDB(string DB) +{ + ReadOnly = _config->FindB("APT::FTPArchive::ReadOnlyDB",false); + + // Close the old DB + if (Dbp != 0) + Dbp->close(Dbp,0); + + /* Check if the DB was disabled while running and deal with a + corrupted DB */ + if (DBFailed() == true) + { + _error->Warning("DB was corrupted, file renamed to %s.old",DBFile.c_str()); + rename(DBFile.c_str(),(DBFile+".old").c_str()); + } + + DBLoaded = false; + Dbp = 0; + DBFile = string(); + + if (DB.empty()) + return true; + + if ((errno = db_open(DB.c_str(),DB_HASH, + (ReadOnly?DB_RDONLY:DB_CREATE), + 0644,0,0,&Dbp)) != 0) + { + Dbp = 0; + return _error->Errno("db_open","Unable to open DB2 file %s",DB.c_str()); + } + + DBFile = DB; + DBLoaded = true; + return true; +} + /*}}}*/ +// CacheDB::SetFile - Select a file to be working with /*{{{*/ +// --------------------------------------------------------------------- +/* All future actions will be performed against this file */ +bool CacheDB::SetFile(string FileName,struct stat St,FileFd *Fd) +{ + delete DebFile; + DebFile = 0; + this->FileName = FileName; + this->Fd = Fd; + this->FileStat = St; + FileStat = St; + memset(&CurStat,0,sizeof(CurStat)); + + Stats.Bytes += St.st_size; + Stats.Packages++; + + if (DBLoaded == false) + return true; + + InitQuery("st"); + + // Ensure alignment of the returned structure + Data.data = &CurStat; + Data.ulen = sizeof(CurStat); + Data.flags = DB_DBT_USERMEM; + // Lookup the stat info and confirm the file is unchanged + if (Get() == true) + { + if (CurStat.mtime != htonl(St.st_mtime)) + { + CurStat.mtime = htonl(St.st_mtime); + CurStat.Flags = 0; + _error->Warning("File date has changed %s",FileName.c_str()); + } + } + else + { + CurStat.mtime = htonl(St.st_mtime); + CurStat.Flags = 0; + } + CurStat.Flags = ntohl(CurStat.Flags); + OldStat = CurStat; + return true; +} + /*}}}*/ +// CacheDB::LoadControl - Load Control information /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool CacheDB::LoadControl() +{ + // Try to read the control information out of the DB. + if ((CurStat.Flags & FlControl) == FlControl) + { + // Lookup the control information + InitQuery("cl"); + if (Get() == true && Control.TakeControl(Data.data,Data.size) == true) + return true; + CurStat.Flags &= ~FlControl; + } + + // Create a deb instance to read the archive + if (DebFile == 0) + { + DebFile = new debDebFile(*Fd); + if (_error->PendingError() == true) + return false; + } + + Stats.Misses++; + if (Control.Read(*DebFile) == false) + return false; + + if (Control.Control == 0) + return _error->Error("Archive has no control record"); + + // Write back the control information + InitQuery("cl"); + if (Put(Control.Control,Control.Length) == true) + CurStat.Flags |= FlControl; + return true; +} + /*}}}*/ +// CacheDB::LoadContents - Load the File Listing /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool CacheDB::LoadContents(bool GenOnly) +{ + // Try to read the control information out of the DB. + if ((CurStat.Flags & FlContents) == FlContents) + { + if (GenOnly == true) + return true; + + // Lookup the contents information + InitQuery("cn"); + if (Get() == true) + { + if (Contents.TakeContents(Data.data,Data.size) == true) + return true; + } + + CurStat.Flags &= ~FlContents; + } + + // Create a deb instance to read the archive + if (DebFile == 0) + { + DebFile = new debDebFile(*Fd); + if (_error->PendingError() == true) + return false; + } + + if (Contents.Read(*DebFile) == false) + return false; + + // Write back the control information + InitQuery("cn"); + if (Put(Contents.Data,Contents.CurSize) == true) + CurStat.Flags |= FlContents; + return true; +} + /*}}}*/ +// CacheDB::GetMD5 - Get the MD5 hash /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool CacheDB::GetMD5(string &MD5Res,bool GenOnly) +{ + // Try to read the control information out of the DB. + if ((CurStat.Flags & FlMD5) == FlMD5) + { + if (GenOnly == true) + return true; + + InitQuery("m5"); + if (Get() == true) + { + MD5Res = string((char *)Data.data,Data.size); + return true; + } + CurStat.Flags &= ~FlMD5; + } + + Stats.MD5Bytes += FileStat.st_size; + + MD5Summation MD5; + if (Fd->Seek(0) == false || MD5.AddFD(Fd->Fd(),FileStat.st_size) == false) + return false; + + MD5Res = MD5.Result(); + InitQuery("m5"); + if (Put(MD5Res.c_str(),MD5Res.length()) == true) + CurStat.Flags |= FlMD5; + return true; +} + /*}}}*/ +// CacheDB::Finish - Write back the cache structure /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool CacheDB::Finish() +{ + // Optimize away some writes. + if (CurStat.Flags == OldStat.Flags && + CurStat.mtime == OldStat.mtime) + return true; + + // Write the stat information + CurStat.Flags = htonl(CurStat.Flags); + InitQuery("st"); + Put(&CurStat,sizeof(CurStat)); + CurStat.Flags = ntohl(CurStat.Flags); + return true; +} + /*}}}*/ +// CacheDB::Clean - Clean the Database /*{{{*/ +// --------------------------------------------------------------------- +/* Tidy the database by removing files that no longer exist at all. */ +bool CacheDB::Clean() +{ + if (DBLoaded == false) + return true; + + /* I'm not sure what VERSION_MINOR should be here.. 2.4.14 certainly + needs the lower one and 2.7.7 needs the upper.. */ +#if DB_VERSION_MAJOR >= 2 && DB_VERSION_MINOR >= 7 + DBC *Cursor; + if ((errno = Dbp->cursor(Dbp,0,&Cursor,0)) != 0) + return _error->Error("Unable to get a cursor"); +#else + DBC *Cursor; + if ((errno = Dbp->cursor(Dbp,0,&Cursor)) != 0) + return _error->Error("Unable to get a cursor"); +#endif + + DBT Key; + DBT Data; + memset(&Key,0,sizeof(Key)); + memset(&Data,0,sizeof(Data)); + while ((errno = Cursor->c_get(Cursor,&Key,&Data,DB_NEXT)) == 0) + { + const char *Colon = (char *)Key.data; + for (; Colon != (char *)Key.data+Key.size && *Colon != ':'; Colon++); + if ((char *)Key.data+Key.size - Colon > 2) + { + if (stringcmp((char *)Key.data,Colon,"st") == 0 || + stringcmp((char *)Key.data,Colon,"cn") == 0 || + stringcmp((char *)Key.data,Colon,"m5") == 0 || + stringcmp((char *)Key.data,Colon,"cl") == 0) + { + if (FileExists(string(Colon+1,(const char *)Key.data+Key.size)) == true) + continue; + } + } + + Cursor->c_del(Cursor,0); + } + + return true; +} + /*}}}*/ diff --git a/apt/ftparchive/cachedb.h b/apt/ftparchive/cachedb.h new file mode 100644 index 0000000..6518973 --- /dev/null +++ b/apt/ftparchive/cachedb.h @@ -0,0 +1,119 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: cachedb.h,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + CacheDB + + Simple uniform interface to a cache database. + + ##################################################################### */ + /*}}}*/ +#ifndef CACHEDB_H +#define CACHEDB_H + +#ifdef __GNUG__ +#pragma interface "cachedb.h" +#endif + +#include <db2/db.h> +#include <string> +#include <apt-pkg/debfile.h> +#include <inttypes.h> +#include <sys/stat.h> +#include <errno.h> + +#include "contents.h" + +class CacheDB +{ + protected: + + // Database state/access + DBT Key; + DBT Data; + char TmpKey[600]; + DB *Dbp; + bool DBLoaded; + bool ReadOnly; + string DBFile; + + // Generate a key for the DB of a given type + inline void InitQuery(const char *Type) + { + memset(&Key,0,sizeof(Key)); + memset(&Data,0,sizeof(Data)); + Key.data = TmpKey; + Key.size = snprintf(TmpKey,sizeof(TmpKey),"%s:%s",Type,FileName.c_str()); + } + + inline bool Get() + { + return Dbp->get(Dbp,0,&Key,&Data,0) == 0; + }; + inline bool Put(const void *In,unsigned long Length) + { + if (ReadOnly == true) + return true; + Data.size = Length; + Data.data = (void *)In; + if (DBLoaded == true && (errno = Dbp->put(Dbp,0,&Key,&Data,0)) != 0) + { + DBLoaded = false; + return false; + } + return true; + } + + // Stat info stored in the DB, Fixed types since it is written to disk. + enum FlagList {FlControl = (1<<0),FlMD5=(1<<1),FlContents=(1<<2)}; + struct StatStore + { + uint32_t mtime; + uint32_t Flags; + } CurStat; + struct StatStore OldStat; + + // 'set' state + string FileName; + struct stat FileStat; + FileFd *Fd; + debDebFile *DebFile; + + public: + + // Data collection helpers + debDebFile::MemControlExtract Control; + ContentsExtract Contents; + + // Runtime statistics + struct Stats + { + double Bytes; + double MD5Bytes; + unsigned long Packages; + unsigned long Misses; + unsigned long DeLinkBytes; + + inline void Add(const Stats &S) {Bytes += S.Bytes; MD5Bytes += S.MD5Bytes; + Packages += S.Packages; Misses += S.Misses; DeLinkBytes += S.DeLinkBytes;}; + Stats() : Bytes(0), MD5Bytes(0), Packages(0), Misses(0), DeLinkBytes(0) {}; + } Stats; + + bool ReadyDB(string DB); + inline bool DBFailed() {return Dbp != 0 && DBLoaded == false;}; + inline bool Loaded() {return DBLoaded == true;}; + + bool SetFile(string FileName,struct stat St,FileFd *Fd); + bool LoadControl(); + bool LoadContents(bool GenOnly); + bool GetMD5(string &MD5Res,bool GenOnly); + bool Finish(); + + bool Clean(); + + CacheDB(string DB) : Dbp(0), DebFile(0) {ReadyDB(DB);}; + ~CacheDB() {ReadyDB(string()); delete DebFile;}; +}; + +#endif diff --git a/apt/ftparchive/contents.cc b/apt/ftparchive/contents.cc new file mode 100644 index 0000000..d7abd66 --- /dev/null +++ b/apt/ftparchive/contents.cc @@ -0,0 +1,402 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: contents.cc,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + contents - Archive contents generator + + The GenContents class is a back end for an archive contents generator. + It takes a list of per-deb file name and merges it into a memory + database of all previous output. This database is stored as a set + of binary trees linked across directories to form a tree of all files+dirs + given to it. The tree will also be sorted as it is built up thus + removing the massive sort time overhead. + + By breaking all the pathnames into components and storing them + separately a space savings is realized by not duplicating the string + over and over again. Ultimately this saving is sacrificed to storage of + the tree structure itself but the tree structure yields a speed gain + in the sorting and processing. Ultimately it takes about 5 seconds to + do 141000 nodes and about 5 meg of ram. + + The tree looks something like: + + usr/ + / \ / libslang + bin/ lib/ --> libc6 + / \ \ libfoo + games/ sbin/ + + The ---> is the DirDown link + + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#include "contents.h" + +#include <apt-pkg/extracttar.h> +#include <apt-pkg/error.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <malloc.h> + /*}}}*/ + +// GenContents::~GenContents - Free allocated memory /*{{{*/ +// --------------------------------------------------------------------- +/* Since all our allocations are static big-block allocations all that is + needed is to free all of them. */ +GenContents::~GenContents() +{ + while (BlockList != 0) + { + BigBlock *Old = BlockList; + BlockList = Old->Next; + free(Old->Block); + delete Old; + } +} + /*}}}*/ +// GenContents::Mystrdup - Custom strdup /*{{{*/ +// --------------------------------------------------------------------- +/* This strdup also uses a large block allocator to eliminate glibc + overhead */ +char *GenContents::Mystrdup(const char *From) +{ + unsigned int Len = strlen(From) + 1; + if (StrLeft <= Len) + { + StrLeft = 4096*10; + StrPool = (char *)malloc(StrLeft); + + BigBlock *Block = new BigBlock; + Block->Block = StrPool; + Block->Next = BlockList; + BlockList = Block; + } + + memcpy(StrPool,From,Len); + StrLeft -= Len; + + char *Res = StrPool; + StrPool += Len; + return Res; +} + /*}}}*/ +// GenContents::Node::operator new - Big block allocator /*{{{*/ +// --------------------------------------------------------------------- +/* This eliminates glibc's malloc overhead by allocating large blocks and + having a continuous set of Nodes. This takes about 8 bytes off each nodes + space needs. Freeing is not supported. */ +void *GenContents::Node::operator new(size_t Amount,GenContents *Owner) +{ + if (Owner->NodeLeft == 0) + { + Owner->NodeLeft = 10000; + Owner->NodePool = (Node *)malloc(Amount*Owner->NodeLeft); + BigBlock *Block = new BigBlock; + Block->Block = Owner->NodePool; + Block->Next = Owner->BlockList; + Owner->BlockList = Block; + } + + Owner->NodeLeft--; + return Owner->NodePool++; +} + /*}}}*/ +// GenContents::Grab - Grab a new node representing Name under Top /*{{{*/ +// --------------------------------------------------------------------- +/* This grabs a new node representing the pathname component Name under + the node Top. The node is given the name Package. It is assumed that Name + is inside of top. If a duplicate already entered name is found then + a note is made on the Dup list and the previous in-tree node is returned. */ +GenContents::Node *GenContents::Grab(GenContents::Node *Top,const char *Name, + const char *Package) +{ + /* We drop down to the next dir level each call. This simplifies + the calling routine */ + if (Top->DirDown == 0) + { + Node *Item = new(this) Node; + Item->Path = Mystrdup(Name); + Item->Package = Package; + Top->DirDown = Item; + return Item; + } + Top = Top->DirDown; + + int Res; + while (1) + { + Res = strcmp(Name,Top->Path); + + // Collision! + if (Res == 0) + { + // See if this the the same package (multi-version dup) + if (Top->Package == Package || + strcasecmp(Top->Package,Package) == 0) + return Top; + + // Look for an already existing Dup + for (Node *I = Top->Dups; I != 0; I = I->Dups) + if (I->Package == Package || + strcasecmp(I->Package,Package) == 0) + return Top; + + // Add the dup in + Node *Item = new(this) Node; + Item->Path = Top->Path; + Item->Package = Package; + Item->Dups = Top->Dups; + Top->Dups = Item; + return Top; + } + + // Continue to traverse the tree + if (Res < 0) + { + if (Top->BTreeLeft == 0) + break; + Top = Top->BTreeLeft; + } + else + { + if (Top->BTreeRight == 0) + break; + Top = Top->BTreeRight; + } + } + + // The item was not found in the tree + Node *Item = new(this) Node; + Item->Path = Mystrdup(Name); + Item->Package = Package; + + // Link it into the tree + if (Res < 0) + { + Item->BTreeLeft = Top->BTreeLeft; + Top->BTreeLeft = Item; + } + else + { + Item->BTreeRight = Top->BTreeRight; + Top->BTreeRight = Item; + } + + return Item; +} + /*}}}*/ +// GenContents::Add - Add a path to the tree /*{{{*/ +// --------------------------------------------------------------------- +/* This takes a full pathname and adds it into the tree. We split the + pathname into directory fragments adding each one as we go. Technically + in output from tar this should result in hitting previous items. */ +void GenContents::Add(const char *Dir,const char *Package) +{ + Node *Root = &this->Root; + + // Drop leading slashes + while (*Dir == '/' && *Dir != 0) + Dir++; + + // Run over the string and grab out each bit up to and including a / + const char *Start = Dir; + const char *I = Dir; + while (*I != 0) + { + if (*I != '/' || I - Start <= 1) + { + I++; + continue; + } + I++; + + // Copy the path fragment over + char Tmp[1024]; + strncpy(Tmp,Start,I - Start); + Tmp[I - Start] = 0; + + // Grab a node for it + Root = Grab(Root,Tmp,Package); + + Start = I; + } + + // The final component if it does not have a trailing / + if (I - Start >= 1) + Root = Grab(Root,Start,Package); +} + /*}}}*/ +// GenContents::WriteSpace - Write a given number of white space chars /*{{{*/ +// --------------------------------------------------------------------- +/* We mod 8 it and write tabs where possible. */ +void GenContents::WriteSpace(FILE *Out,unsigned int Current,unsigned int Target) +{ + if (Target <= Current) + Target = Current + 1; + + /* Now we write tabs so long as the next tab stop would not pass + the target */ + for (; (Current/8 + 1)*8 < Target; Current = (Current/8 + 1)*8) + fputc('\t',Out); + + // Fill the last bit with spaces + for (; Current < Target; Current++) + fputc(' ',Out); +} + /*}}}*/ +// GenContents::Print - Display the tree /*{{{*/ +// --------------------------------------------------------------------- +/* This is the final result function. It takes the tree and recursively + calls itself and runs over each section of the tree printing out + the pathname and the hit packages. We use Buf to build the pathname + summed over all the directory parents of this node. */ +void GenContents::Print(FILE *Out) +{ + char Buffer[1024]; + Buffer[0] = 0; + DoPrint(Out,&Root,Buffer); +} +void GenContents::DoPrint(FILE *Out,GenContents::Node *Top, char *Buf) +{ + if (Top == 0) + return; + + // Go left + DoPrint(Out,Top->BTreeLeft,Buf); + + // Print the current dir location and then descend to lower dirs + char *OldEnd = Buf + strlen(Buf); + if (Top->Path != 0) + { + strcat(Buf,Top->Path); + + // Do not show the item if it is a directory with dups + if (Top->Path[strlen(Top->Path)-1] != '/' /*|| Top->Dups == 0*/) + { + fputs(Buf,Out); + WriteSpace(Out,strlen(Buf),60); + for (Node *I = Top; I != 0; I = I->Dups) + { + if (I != Top) + fputc(',',Out); + fputs(I->Package,Out); + } + fputc('\n',Out); + } + } + + // Go along the directory link + DoPrint(Out,Top->DirDown,Buf); + *OldEnd = 0; + + // Go right + DoPrint(Out,Top->BTreeRight,Buf); +} + /*}}}*/ + +// ContentsExtract::Read - Read the archive /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool ContentsExtract::Read(debDebFile &Deb) +{ + Reset(); + + // Get the archive member and positition the file + const ARArchive::Member *Member = Deb.GotoMember("data.tar.gz"); + if (Member == 0) + return false; + + // Extract it. + ExtractTar Tar(Deb.GetFile(),Member->Size); + if (Tar.Go(*this) == false) + return false; + return true; +} + /*}}}*/ +// ContentsExtract::DoItem - Extract an item /*{{{*/ +// --------------------------------------------------------------------- +/* This just tacks the name onto the end of our memory buffer */ +bool ContentsExtract::DoItem(Item &Itm,int &Fd) +{ + unsigned long Len = strlen(Itm.Name); + + // Strip leading ./'s + if (Itm.Name[0] == '.' && Itm.Name[1] == '/') + { + // == './' + if (Len == 2) + return true; + + Len -= 2; + Itm.Name += 2; + } + + // Allocate more storage for the string list + if (CurSize + Len + 2 >= MaxSize || Data == 0) + { + if (MaxSize == 0) + MaxSize = 512*1024/2; + char *NewData = (char *)realloc(Data,MaxSize*2); + if (NewData == 0) + return _error->Error("realloc - Failed to allocate memory"); + Data = NewData; + MaxSize *= 2; + } + + strcpy(Data+CurSize,Itm.Name); + CurSize += Len + 1; + return true; +} + /*}}}*/ +// ContentsExtract::TakeContents - Load the contents data /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool ContentsExtract::TakeContents(const void *NewData,unsigned long Length) +{ + if (Length == 0) + { + CurSize = 0; + return true; + } + + // Allocate more storage for the string list + if (Length + 2 >= MaxSize || Data == 0) + { + if (MaxSize == 0) + MaxSize = 512*1024/2; + while (MaxSize*2 <= Length) + MaxSize *= 2; + + char *NewData = (char *)realloc(Data,MaxSize*2); + if (NewData == 0) + return _error->Error("realloc - Failed to allocate memory"); + Data = NewData; + MaxSize *= 2; + } + memcpy(Data,NewData,Length); + CurSize = Length; + + return Data[CurSize-1] == 0; +} + /*}}}*/ +// ContentsExtract::Add - Read the contents data into the sorter /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void ContentsExtract::Add(GenContents &Contents,string Package) +{ + const char *Start = Data; + char *Pkg = Contents.Mystrdup(Package.c_str()); + for (const char *I = Data; I < Data + CurSize; I++) + { + if (*I == 0) + { + Contents.Add(Start,Pkg); + Start = ++I; + } + } +} + /*}}}*/ diff --git a/apt/ftparchive/contents.h b/apt/ftparchive/contents.h new file mode 100644 index 0000000..ba10c0e --- /dev/null +++ b/apt/ftparchive/contents.h @@ -0,0 +1,89 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: contents.h,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + contents - Contents of archive things. + + ##################################################################### */ + /*}}}*/ +#ifndef CONTENTS_H +#define CONTENTS_H + +#include <stdlib.h> +#include <stdio.h> +#include <apt-pkg/debfile.h> +#include <apt-pkg/dirstream.h> + +class GenContents +{ + struct Node + { + // Binary Tree links + Node *BTreeLeft; + Node *BTreeRight; + Node *DirDown; + Node *Dups; + const char *Path; + const char *Package; + + void *operator new(size_t Amount,GenContents *Owner); + void operator delete(void *) {}; + + Node() : BTreeLeft(0), BTreeRight(0), DirDown(0), Dups(0), + Path(0), Package(0) {}; + }; + friend struct Node; + + struct BigBlock + { + void *Block; + BigBlock *Next; + }; + + Node Root; + + // Big block allocation pools + BigBlock *BlockList; + char *StrPool; + unsigned long StrLeft; + Node *NodePool; + unsigned long NodeLeft; + + Node *Grab(Node *Top,const char *Name,const char *Package); + void WriteSpace(FILE *Out,unsigned int Current,unsigned int Target); + void DoPrint(FILE *Out,Node *Top, char *Buf); + + public: + + char *Mystrdup(const char *From); + void Add(const char *Dir,const char *Package); + void Print(FILE *Out); + + GenContents() : BlockList(0), StrPool(0), StrLeft(0), + NodePool(0), NodeLeft(0) {}; + ~GenContents(); +}; + +class ContentsExtract : public pkgDirStream +{ + public: + + // The Data Block + char *Data; + unsigned long MaxSize; + unsigned long CurSize; + void AddData(const char *Text); + + bool Read(debDebFile &Deb); + + virtual bool DoItem(Item &Itm,int &Fd); + void Reset() {CurSize = 0;}; + bool TakeContents(const void *Data,unsigned long Length); + void Add(GenContents &Contents,string Package); + + ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {}; + virtual ~ContentsExtract() {delete [] Data;}; +}; + +#endif diff --git a/apt/ftparchive/makefile b/apt/ftparchive/makefile new file mode 100644 index 0000000..ca6d8f9 --- /dev/null +++ b/apt/ftparchive/makefile @@ -0,0 +1,20 @@ +# -*- make -*- +BASE=.. +SUBDIR=ftparchive + +# Bring in the default rules +include ../buildlib/defaults.mak + +# The apt-ftparchive program +ifdef DB2LIB +PROGRAM=apt-ftparchive +SLIBS = -lapt-pkg -lapt-inst $(DB2LIB) +LIB_MAKES = apt-pkg/makefile apt-inst/makefile +SOURCE = apt-ftparchive.cc cachedb.cc writer.cc contents.cc override.cc \ + multicompress.cc +include $(PROGRAM_H) +else +PROGRAM=apt-ftparchive +MESSAGE="Must have db2 to build apt-ftparchive" +include $(FAIL_H) +endif # ifdef DB2LIB diff --git a/apt/ftparchive/multicompress.cc b/apt/ftparchive/multicompress.cc new file mode 100644 index 0000000..42b2796 --- /dev/null +++ b/apt/ftparchive/multicompress.cc @@ -0,0 +1,497 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: multicompress.cc,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + MultiCompressor + + This class is very complicated in order to optimize for the common + case of its use, writing a large set of compressed files that are + different from the old set. It spawns off compressors in parallel + to maximize compression throughput and has a separate task managing + the data going into the compressors. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "multicompress.h" +#endif + +#include "multicompress.h" + +#include <apt-pkg/strutl.h> +#include <apt-pkg/error.h> +#include <apt-pkg/md5.h> + +#include <sys/types.h> +#include <sys/stat.h> +#include <utime.h> +#include <unistd.h> +#include <iostream> + /*}}}*/ + +using namespace std; + +const MultiCompress::CompType MultiCompress::Compressors[] = + {{".","",0,0,0,1}, + {"gzip",".gz","gzip","-9n","-d",2}, + {"bzip2",".bz2","bzip2","-9","-d",3}, + {}}; + +// MultiCompress::MultiCompress - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Setup the file outputs, compression modes and fork the writer child */ +MultiCompress::MultiCompress(string Output,string Compress, + mode_t Permissions,bool Write) +{ + Outputs = 0; + Outputter = -1; + Input = 0; + UpdateMTime = 0; + this->Permissions = Permissions; + + /* Parse the compression string, a space separated lists of compresison + types */ + string::const_iterator I = Compress.begin(); + for (; I != Compress.end();) + { + for (; I != Compress.end() && isspace(*I); I++); + + // Grab a word + string::const_iterator Start = I; + for (; I != Compress.end() && !isspace(*I); I++); + + // Find the matching compressor + const CompType *Comp = Compressors; + for (; Comp->Name != 0; Comp++) + if (stringcmp(Start,I,Comp->Name) == 0) + break; + + // Hmm.. unknown. + if (Comp->Name == 0) + { + _error->Warning("Unknown Compresison Algorithm '%s'",string(Start,I).c_str()); + continue; + } + + // Create and link in a new output + Files *NewOut = new Files; + NewOut->Next = Outputs; + Outputs = NewOut; + NewOut->CompressProg = Comp; + NewOut->Output = Output+Comp->Extension; + + struct stat St; + if (stat(NewOut->Output.c_str(),&St) == 0) + NewOut->OldMTime = St.st_mtime; + else + NewOut->OldMTime = 0; + } + + if (Write == false) + return; + + /* Open all the temp files now so we can report any errors. File is + made unreable to prevent people from touching it during creating. */ + for (Files *I = Outputs; I != 0; I = I->Next) + I->TmpFile.Open(I->Output + ".new",FileFd::WriteEmpty,0600); + if (_error->PendingError() == true) + return; + + if (Outputs == 0) + { + _error->Error("Compressed output %s needs a compression set",Output.c_str()); + return; + } + + Start(); +} + /*}}}*/ +// MultiCompress::~MultiCompress - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* Just erase the file linked list. */ +MultiCompress::~MultiCompress() +{ + Die(); + + for (; Outputs != 0;) + { + Files *Tmp = Outputs->Next; + delete Outputs; + Outputs = Tmp; + } +} + /*}}}*/ +// MultiCompress::GetStat - Get stat information for compressed files /*{{{*/ +// --------------------------------------------------------------------- +/* This checks each compressed file to make sure it exists and returns + stat information for a random file from the collection. False means + one or more of the files is missing. */ +bool MultiCompress::GetStat(string Output,string Compress,struct stat &St) +{ + /* Parse the compression string, a space separated lists of compresison + types */ + string::const_iterator I = Compress.begin(); + bool DidStat = false; + for (; I != Compress.end();) + { + for (; I != Compress.end() && isspace(*I); I++); + + // Grab a word + string::const_iterator Start = I; + for (; I != Compress.end() && !isspace(*I); I++); + + // Find the matching compressor + const CompType *Comp = Compressors; + for (; Comp->Name != 0; Comp++) + if (stringcmp(Start,I,Comp->Name) == 0) + break; + + // Hmm.. unknown. + if (Comp->Name == 0) + continue; + + string Name = Output+Comp->Extension; + if (stat(Name.c_str(),&St) != 0) + return false; + DidStat = true; + } + return DidStat; +} + /*}}}*/ +// MultiCompress::Start - Start up the writer child /*{{{*/ +// --------------------------------------------------------------------- +/* Fork a child and setup the communication pipe. */ +bool MultiCompress::Start() +{ + // Create a data pipe + int Pipe[2] = {-1,-1}; + if (pipe(Pipe) != 0) + return _error->Errno("pipe","Failed to create IPC pipe to subprocess"); + for (int I = 0; I != 2; I++) + SetCloseExec(Pipe[I],true); + + // The child.. + Outputter = fork(); + if (Outputter == 0) + { + close(Pipe[1]); + Child(Pipe[0]); + if (_error->PendingError() == true) + { + _error->DumpErrors(); + _exit(100); + } + _exit(0); + }; + + /* Tidy up the temp files, we open them in the constructor so as to + get proper error reporting. Close them now. */ + for (Files *I = Outputs; I != 0; I = I->Next) + I->TmpFile.Close(); + + close(Pipe[0]); + Input = fdopen(Pipe[1],"w"); + if (Input == 0) + return _error->Errno("fdopen","Failed to create FILE*"); + + if (Outputter == -1) + return _error->Errno("fork","Failed to fork"); + return true; +} + /*}}}*/ +// MultiCompress::Die - Clean up the writer /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool MultiCompress::Die() +{ + if (Input == 0) + return true; + + fclose(Input); + Input = 0; + bool Res = ExecWait(Outputter,"Compress Child",false); + Outputter = -1; + return Res; +} + /*}}}*/ +// MultiCompress::Finalize - Finish up writing /*{{{*/ +// --------------------------------------------------------------------- +/* This is only necessary for statistics reporting. */ +bool MultiCompress::Finalize(unsigned long &OutSize) +{ + OutSize = 0; + if (Input == 0 || Die() == false) + return false; + + time_t Now; + time(&Now); + + // Check the mtimes to see if the files were replaced. + bool Changed = false; + for (Files *I = Outputs; I != 0; I = I->Next) + { + struct stat St; + if (stat(I->Output.c_str(),&St) != 0) + return _error->Error("Internal Error, Failed to create %s", + I->Output.c_str()); + + if (I->OldMTime != St.st_mtime) + Changed = true; + else + { + // Update the mtime if necessary + if (UpdateMTime > 0 && + (Now - St.st_mtime > (signed)UpdateMTime || St.st_mtime > Now)) + { + struct utimbuf Buf; + Buf.actime = Buf.modtime = Now; + utime(I->Output.c_str(),&Buf); + Changed = true; + } + } + + // Force the file permissions + if (St.st_mode != Permissions) + chmod(I->Output.c_str(),Permissions); + + OutSize += St.st_size; + } + + if (Changed == false) + OutSize = 0; + + return true; +} + /*}}}*/ +// MultiCompress::OpenCompress - Open the compressor /*{{{*/ +// --------------------------------------------------------------------- +/* This opens the compressor, either in compress mode or decompress + mode. FileFd is always the compressor input/output file, + OutFd is the created pipe, Input for Compress, Output for Decompress. */ +bool MultiCompress::OpenCompress(const CompType *Prog,int &Pid,int FileFd, + int &OutFd,bool Comp) +{ + Pid = -1; + + // No compression + if (Prog->Binary == 0) + { + OutFd = dup(FileFd); + return true; + } + + // Create a data pipe + int Pipe[2] = {-1,-1}; + if (pipe(Pipe) != 0) + return _error->Errno("pipe","Failed to create subprocess IPC"); + for (int J = 0; J != 2; J++) + SetCloseExec(Pipe[J],true); + + if (Comp == true) + OutFd = Pipe[1]; + else + OutFd = Pipe[0]; + + // The child.. + Pid = ExecFork(); + if (Pid == 0) + { + if (Comp == true) + { + dup2(FileFd,STDOUT_FILENO); + dup2(Pipe[0],STDIN_FILENO); + } + else + { + dup2(FileFd,STDIN_FILENO); + dup2(Pipe[1],STDOUT_FILENO); + } + + SetCloseExec(STDOUT_FILENO,false); + SetCloseExec(STDIN_FILENO,false); + + const char *Args[3]; + Args[0] = Prog->Binary; + if (Comp == true) + Args[1] = Prog->CompArgs; + else + Args[1] = Prog->UnCompArgs; + Args[2] = 0; + execvp(Args[0],(char **)Args); + cerr << "Failed to exec compressor " << Args[0] << endl; + _exit(100); + }; + if (Comp == true) + close(Pipe[0]); + else + close(Pipe[1]); + return true; +} + /*}}}*/ +// MultiCompress::OpenOld - Open an old file /*{{{*/ +// --------------------------------------------------------------------- +/* This opens one of the original output files, possibly decompressing it. */ +bool MultiCompress::OpenOld(int &Fd,int &Proc) +{ + Files *Best = Outputs; + for (Files *I = Outputs; I != 0; I = I->Next) + if (Best->CompressProg->Cost > I->CompressProg->Cost) + Best = I; + + // Open the file + FileFd F(Best->Output,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + + // Decompress the file so we can read it + if (OpenCompress(Best->CompressProg,Proc,F.Fd(),Fd,false) == false) + return false; + + return true; +} + /*}}}*/ +// MultiCompress::CloseOld - Close the old file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool MultiCompress::CloseOld(int Fd,int Proc) +{ + close(Fd); + if (Proc != -1) + if (ExecWait(Proc,"decompressor",false) == false) + return false; + return true; +} + /*}}}*/ +// MultiCompress::Child - The writer child /*{{{*/ +// --------------------------------------------------------------------- +/* The child process forks a bunch of compression children and takes + input on FD and passes it to all the compressor childer. On the way it + computes the MD5 of the raw data. After this the raw data in the + original files is compared to see if this data is new. If the data + is new then the temp files are renamed, otherwise they are erased. */ +bool MultiCompress::Child(int FD) +{ + // Start the compression children. + for (Files *I = Outputs; I != 0; I = I->Next) + { + if (OpenCompress(I->CompressProg,I->CompressProc,I->TmpFile.Fd(), + I->Fd,true) == false) + return false; + } + + /* Okay, now we just feed data from FD to all the other FDs. Also + stash a hash of the data to use later. */ + SetNonBlock(FD,false); + unsigned char Buffer[32*1024]; + unsigned long FileSize = 0; + MD5Summation MD5; + while (1) + { + WaitFd(FD,false); + int Res = read(FD,Buffer,sizeof(Buffer)); + if (Res == 0) + break; + if (Res < 0) + continue; + + MD5.Add(Buffer,Res); + FileSize += Res; + for (Files *I = Outputs; I != 0; I = I->Next) + { + if (write(I->Fd,Buffer,Res) != Res) + { + _error->Errno("write","IO to subprocess/file failed"); + break; + } + } + } + + // Close all the writers + for (Files *I = Outputs; I != 0; I = I->Next) + close(I->Fd); + + // Wait for the compressors to exit + for (Files *I = Outputs; I != 0; I = I->Next) + { + if (I->CompressProc != -1) + ExecWait(I->CompressProc,I->CompressProg->Binary,false); + } + + if (_error->PendingError() == true) + return false; + + /* Now we have to copy the files over, or erase them if they + have not changed. First find the cheapest decompressor */ + bool Missing = false; + for (Files *I = Outputs; I != 0; I = I->Next) + { + if (I->OldMTime == 0) + { + Missing = true; + break; + } + } + + // Check the MD5 of the lowest cost entity. + while (Missing == false) + { + int CompFd = -1; + int Proc = -1; + if (OpenOld(CompFd,Proc) == false) + { + _error->Discard(); + break; + } + + // Compute the hash + MD5Summation OldMD5; + unsigned long NewFileSize = 0; + while (1) + { + int Res = read(CompFd,Buffer,sizeof(Buffer)); + if (Res == 0) + break; + if (Res < 0) + return _error->Errno("read","Failed to read while computing MD5"); + NewFileSize += Res; + OldMD5.Add(Buffer,Res); + } + + // Tidy the compressor + if (CloseOld(CompFd,Proc) == false) + return false; + + // Check the hash + if (OldMD5.Result() == MD5.Result() && + FileSize == NewFileSize) + { + for (Files *I = Outputs; I != 0; I = I->Next) + { + I->TmpFile.Close(); + if (unlink(I->TmpFile.Name().c_str()) != 0) + _error->Errno("unlink","Problem unlinking %s", + I->TmpFile.Name().c_str()); + } + return !_error->PendingError(); + } + break; + } + + // Finalize + for (Files *I = Outputs; I != 0; I = I->Next) + { + // Set the correct file modes + fchmod(I->TmpFile.Fd(),Permissions); + + if (rename(I->TmpFile.Name().c_str(),I->Output.c_str()) != 0) + _error->Errno("rename","Failed to rename %s to %s", + I->TmpFile.Name().c_str(),I->Output.c_str()); + I->TmpFile.Close(); + } + + return !_error->PendingError(); +} + /*}}}*/ + diff --git a/apt/ftparchive/multicompress.h b/apt/ftparchive/multicompress.h new file mode 100644 index 0000000..71b2922 --- /dev/null +++ b/apt/ftparchive/multicompress.h @@ -0,0 +1,80 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: multicompress.h,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + MultiCompressor + + Multiple output class. Takes a single FILE* and writes it simultaneously + to many compressed files. Then checks if the resulting output is + different from any previous output and overwrites the old files. Care is + taken to ensure that the new files are not generally readable while they + are being written. + + ##################################################################### */ + /*}}}*/ +#ifndef MULTICOMPRESS_H +#define MULTICOMPRESS_H + +#ifdef __GNUG__ +#pragma interface "multicompress.h" +#endif + +#include <string> +#include <apt-pkg/fileutl.h> +#include <stdio.h> +#include <sys/types.h> + +class MultiCompress +{ + // Enumeration of all supported compressors + struct CompType + { + const char *Name; + const char *Extension; + const char *Binary; + const char *CompArgs; + const char *UnCompArgs; + unsigned char Cost; + }; + + // An output file + struct Files + { + string Output; + const CompType *CompressProg; + Files *Next; + FileFd TmpFile; + pid_t CompressProc; + time_t OldMTime; + int Fd; + }; + + Files *Outputs; + pid_t Outputter; + mode_t Permissions; + static const CompType Compressors[]; + + bool OpenCompress(const CompType *Prog,int &Pid,int FileFd, + int &OutFd,bool Comp); + bool Child(int Fd); + bool Start(); + bool Die(); + + public: + + // The FD to write to for compression. + FILE *Input; + unsigned long UpdateMTime; + + bool Finalize(unsigned long &OutSize); + bool OpenOld(int &Fd,int &Proc); + bool CloseOld(int Fd,int Proc); + static bool GetStat(string Output,string Compress,struct stat &St); + + MultiCompress(string Output,string Compress,mode_t Permissions, + bool Write = true); + ~MultiCompress(); +}; + +#endif diff --git a/apt/ftparchive/override.cc b/apt/ftparchive/override.cc new file mode 100644 index 0000000..2821f9e --- /dev/null +++ b/apt/ftparchive/override.cc @@ -0,0 +1,254 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: override.cc,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + Override + + Store the override file. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "override.h" +#endif + +#include "override.h" + +#include <apt-pkg/strutl.h> +#include <apt-pkg/error.h> + +#include <stdio.h> + +#include "override.h" + /*}}}*/ + +// Override::ReadOverride - Read the override file /*{{{*/ +// --------------------------------------------------------------------- +/* This parses the override file and reads it into the map */ +bool Override::ReadOverride(string File,bool Source) +{ + if (File.empty() == true) + return true; + + FILE *F = fopen(File.c_str(),"r"); + if (F == 0) + return _error->Errno("fopen","Unable to open %s",File.c_str()); + + char Line[500]; + unsigned long Counter = 0; + while (fgets(Line,sizeof(Line),F) != 0) + { + Counter++; + Item Itm; + + // Silence + for (char *I = Line; *I != 0; I++) + if (*I == '#') + *I = 0; + + // Strip space leading up to the package name, skip blank lines + char *Pkg = Line; + for (; isspace(*Pkg) && *Pkg != 0;Pkg++); + if (Pkg == 0) + continue; + + // Find the package and zero.. + char *Start = Pkg; + char *End = Pkg; + for (; isspace(*End) == 0 && *End != 0; End++); + if (*End == 0) + { + _error->Warning("Malformed override %s line %lu #1",File.c_str(), + Counter); + continue; + } + *End = 0; + + // Find the priority + if (Source == false) + { + for (End++; isspace(*End) != 0 && *End != 0; End++); + Start = End; + for (; isspace(*End) == 0 && *End != 0; End++); + if (*End == 0) + { + _error->Warning("Malformed override %s line %lu #2",File.c_str(), + Counter); + continue; + } + *End = 0; + Itm.Priority = Start; + } + + // Find the Section + for (End++; isspace(*End) != 0 && *End != 0; End++); + Start = End; + for (; isspace(*End) == 0 && *End != 0; End++); + if (*End == 0) + { + _error->Warning("Malformed override %s line %lu #3",File.c_str(), + Counter); + continue; + } + *End = 0; + Itm.FieldOverride["Section"] = Start; + + // Source override files only have the two columns + if (Source == true) + { + Mapping[Pkg] = Itm; + continue; + } + + // Find the => + for (End++; isspace(*End) != 0 && *End != 0; End++); + if (*End != 0) + { + Start = End; + for (; *End != 0 && (End[0] != '=' || End[1] != '>'); End++); + if (*End == 0 || strlen(End) < 4) + { + Itm.OldMaint = "*"; + Itm.NewMaint = _strstrip(Start); + } + else + { + *End = 0; + Itm.OldMaint = _strstrip(Start); + + End += 3; + Itm.NewMaint = _strstrip(End); + } + } + + Mapping[Pkg] = Itm; + } + + if (ferror(F)) + _error->Errno("fgets","Failed to read the override file %s",File.c_str()); + fclose(F); + return true; +} + /*}}}*/ +// Override::ReadExtraOverride - Read the extra override file /*{{{*/ +// --------------------------------------------------------------------- +/* This parses the extra override file and reads it into the map */ +bool Override::ReadExtraOverride(string File,bool Source) +{ + if (File.empty() == true) + return true; + + FILE *F = fopen(File.c_str(),"r"); + if (F == 0) + return _error->Errno("fopen","Unable to open %s",File.c_str()); + + char Line[500]; + unsigned long Counter = 0; + while (fgets(Line,sizeof(Line),F) != 0) + { + Counter++; + + // Silence + for (char *I = Line; *I != 0; I++) + if (*I == '#') + *I = 0; + + // Strip space leading up to the package name, skip blank lines + char *Pkg = Line; + for (; isspace(*Pkg) && *Pkg != 0;Pkg++); + if (Pkg == 0) + continue; + + // Find the package and zero.. + char *End = Pkg; + for (; isspace(*End) == 0 && *End != 0; End++); + if (*End == 0) + { + _error->Warning("Malformed override %s line %lu #1",File.c_str(), + Counter); + continue; + } + *End = 0; + + // Find the field + for (End++; isspace(*End) != 0 && *End != 0; End++); + char *Field = End; + for (; isspace(*End) == 0 && *End != 0; End++); + if (*End == 0) + { + _error->Warning("Malformed override %s line %lu #2",File.c_str(), + Counter); + continue; + } + *End = 0; + + // Find the field value + for (End++; isspace(*End) != 0 && *End != 0; End++); + char *Value = End; + for (; *End != 0; End++); + for (; isspace(*(End-1)) && End > Value; End--); + if (End == Value) + { + _error->Warning("Malformed override %s line %lu #3",File.c_str(), + Counter); + continue; + } + *End = 0; + + Mapping[Pkg].FieldOverride[Field] = Value; + } + + if (ferror(F)) + _error->Errno("fgets","Failed to read the override file %s",File.c_str()); + fclose(F); + return true; +} + /*}}}*/ +// Override::Item::SwapMaint - Swap the maintainer field if necessary /*{{{*/ +// --------------------------------------------------------------------- +/* Returns the new maintainer string after evaluating the rewriting rule. If + there is a rule but it does not match then the empty string is returned, + also if there was no rewrite rule the empty string is returned. Failed + indicates if there was some kind of problem while rewriting. */ +string Override::Item::SwapMaint(string Orig,bool &Failed) +{ + Failed = false; + + // Degenerate case.. + if (NewMaint.empty() == true) + return OldMaint; + + if (OldMaint == "*") + return NewMaint; + + /* James: ancient, eliminate it, however it is still being used in the main + override file. Thus it persists.*/ +#if 1 + // Break OldMaint up into little bits on double slash boundaries. + string::iterator End = OldMaint.begin(); + while (1) + { + string::iterator Start = End; + for (; End < OldMaint.end() && + (End + 3 >= OldMaint.end() || End[0] != ' ' || + End[1] != '/' || End[2] != '/'); End++); + if (stringcasecmp(Start,End,Orig.begin(),Orig.end()) == 0) + return NewMaint; + + if (End >= OldMaint.end()) + break; + + // Skip the divider and white space + for (; End < OldMaint.end() && (*End == '/' || *End == ' '); End++); + } +#else + if (stringcasecmp(OldMaint.begin(),OldMaint.end(),Orig.begin(),Orig.end()) == 0) + return NewMaint; +#endif + + Failed = true; + return string(); +} + /*}}}*/ diff --git a/apt/ftparchive/override.h b/apt/ftparchive/override.h new file mode 100644 index 0000000..d0463be --- /dev/null +++ b/apt/ftparchive/override.h @@ -0,0 +1,54 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: override.h,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + Override + + Store the override file. + + ##################################################################### */ + /*}}}*/ +#ifndef OVERRIDE_H +#define OVERRIDE_H + +#ifdef __GNUG__ +#pragma interface "override.h" +#endif + +#include <map> +#include <string> + +using std::string; +using std::map; + +class Override +{ + public: + + struct Item + { + string Priority; + string OldMaint; + string NewMaint; + + map<string,string> FieldOverride; + string SwapMaint(string Orig,bool &Failed); + }; + + map<string,Item> Mapping; + + inline Item *GetItem(string Package) + { + map<string,Item>::iterator I = Mapping.find(Package); + if (I == Mapping.end()) + return 0; + return &I->second; + }; + + bool ReadOverride(string File,bool Source = false); + bool ReadExtraOverride(string File,bool Source = false); +}; + +#endif + diff --git a/apt/ftparchive/writer.cc b/apt/ftparchive/writer.cc new file mode 100644 index 0000000..86e98bb --- /dev/null +++ b/apt/ftparchive/writer.cc @@ -0,0 +1,780 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: writer.cc,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ +/* ###################################################################### + + Writer + + The file writer classes. These write various types of output, sources, + packages and contents. + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#ifdef __GNUG__ +#pragma implementation "writer.h" +#endif + +#include "writer.h" + +#include <apt-pkg/strutl.h> +#include <apt-pkg/error.h> +#include <apt-pkg/configuration.h> +#include <apt-pkg/md5.h> +#include <apt-pkg/deblistparser.h> + +#include <sys/types.h> +#include <unistd.h> +#include <ftw.h> +#include <iostream> + +#include "cachedb.h" +#include "apt-ftparchive.h" +#include "multicompress.h" + /*}}}*/ + +using namespace std; +FTWScanner *FTWScanner::Owner; + +// SetTFRewriteData - Helper for setting rewrite lists /*{{{*/ +// --------------------------------------------------------------------- +/* */ +inline void SetTFRewriteData(struct TFRewriteData &tfrd, + const char *tag, + const char *rewrite, + const char *newtag = 0) +{ + tfrd.Tag = tag; + tfrd.Rewrite = rewrite; + tfrd.NewTag = newtag; +} + /*}}}*/ + +// FTWScanner::FTWScanner - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +FTWScanner::FTWScanner() +{ + ErrorPrinted = false; + NoLinkAct = !_config->FindB("APT::FTPArchive::DeLinkAct",true); + TmpExt = 0; + Ext[0] = 0; + RealPath = 0; + long PMax = pathconf(".",_PC_PATH_MAX); + if (PMax > 0) + RealPath = new char[PMax]; +} + /*}}}*/ +// FTWScanner::Scanner - FTW Scanner /*{{{*/ +// --------------------------------------------------------------------- +/* This is the FTW scanner, it processes each directory element in the + directory tree. */ +int FTWScanner::Scanner(const char *File,const struct stat *sb,int Flag) +{ + if (Flag == FTW_DNR) + { + Owner->NewLine(1); + c1out << "W: Unable to read directory " << File << endl; + } + if (Flag == FTW_NS) + { + Owner->NewLine(1); + c1out << "W: Unable to stat " << File << endl; + } + if (Flag != FTW_F) + return 0; + + // See if it is a .deb + if (strlen(File) < 4) + return 0; + + unsigned CurExt = 0; + for (; Owner->Ext[CurExt] != 0; CurExt++) + if (strcmp(File+strlen(File)-strlen(Owner->Ext[CurExt]), + Owner->Ext[CurExt]) == 0) + break; + if (Owner->Ext[CurExt] == 0) + return 0; + + /* Process it. If the file is a link then resolve it into an absolute + name.. This works best if the directory components the scanner are + given are not links themselves. */ + char Jnk[2]; + Owner->OriginalPath = File; + if (Owner->RealPath != 0 && readlink(File,Jnk,sizeof(Jnk)) != -1 && + realpath(File,Owner->RealPath) != 0) + Owner->DoPackage(Owner->RealPath); + else + Owner->DoPackage(File); + + if (_error->empty() == false) + { + // Print any errors or warnings found + string Err; + bool SeenPath = false; + while (_error->empty() == false) + { + Owner->NewLine(1); + + bool Type = _error->PopMessage(Err); + if (Type == true) + cerr << "E: " << Err << endl; + else + cerr << "W: " << Err << endl; + + if (Err.find(File) != string::npos) + SeenPath = true; + } + + if (SeenPath == false) + cerr << "E: Errors apply to file '" << File << "'" << endl; + return 0; + } + + return 0; +} + /*}}}*/ +// FTWScanner::RecursiveScan - Just scan a directory tree /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool FTWScanner::RecursiveScan(string Dir) +{ + /* If noprefix is set then jam the scan root in, so we don't generate + link followed paths out of control */ + if (InternalPrefix.empty() == true) + { + if (realpath(Dir.c_str(),RealPath) == 0) + return _error->Errno("realpath","Failed to resolve %s",Dir.c_str()); + InternalPrefix = RealPath; + } + + // Do recursive directory searching + Owner = this; + int Res = ftw(Dir.c_str(),Scanner,30); + + // Error treewalking? + if (Res != 0) + { + if (_error->PendingError() == false) + _error->Errno("ftw","Tree walking failed"); + return false; + } + + return true; +} + /*}}}*/ +// FTWScanner::LoadFileList - Load the file list from a file /*{{{*/ +// --------------------------------------------------------------------- +/* This is an alternative to using FTW to locate files, it reads the list + of files from another file. */ +bool FTWScanner::LoadFileList(string Dir,string File) +{ + /* If noprefix is set then jam the scan root in, so we don't generate + link followed paths out of control */ + if (InternalPrefix.empty() == true) + { + if (realpath(Dir.c_str(),RealPath) == 0) + return _error->Errno("realpath","Failed to resolve %s",Dir.c_str()); + InternalPrefix = RealPath; + } + + Owner = this; + FILE *List = fopen(File.c_str(),"r"); + if (List == 0) + return _error->Errno("fopen","Failed to open %s",File.c_str()); + + /* We are a tad tricky here.. We prefix the buffer with the directory + name, that way if we need a full path with just use line.. Sneaky and + fully evil. */ + char Line[1000]; + char *FileStart; + if (Dir.empty() == true || Dir.end()[-1] != '/') + FileStart = Line + snprintf(Line,sizeof(Line),"%s/",Dir.c_str()); + else + FileStart = Line + snprintf(Line,sizeof(Line),"%s",Dir.c_str()); + while (fgets(FileStart,sizeof(Line) - (FileStart - Line),List) != 0) + { + char *FileName = _strstrip(FileStart); + if (FileName[0] == 0) + continue; + + if (FileName[0] != '/') + { + if (FileName != FileStart) + memmove(FileStart,FileName,strlen(FileStart)); + FileName = Line; + } + + struct stat St; + int Flag = FTW_F; + if (stat(FileName,&St) != 0) + Flag = FTW_NS; + + if (Scanner(FileName,&St,Flag) != 0) + break; + } + + fclose(List); + return true; +} + /*}}}*/ +// FTWScanner::Delink - Delink symlinks /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool FTWScanner::Delink(string &FileName,const char *OriginalPath, + unsigned long &DeLinkBytes, + struct stat &St) +{ + // See if this isn't an internaly prefix'd file name. + if (InternalPrefix.empty() == false && + InternalPrefix.length() < FileName.length() && + stringcmp(FileName.begin(),FileName.begin() + InternalPrefix.length(), + InternalPrefix.begin(),InternalPrefix.end()) != 0) + { + if (DeLinkLimit != 0 && DeLinkBytes/1024 < DeLinkLimit) + { + // Tidy up the display + if (DeLinkBytes == 0) + cout << endl; + + NewLine(1); + c1out << " DeLink " << (OriginalPath + InternalPrefix.length()) + << " [" << SizeToStr(St.st_size) << "B]" << endl << flush; + + if (NoLinkAct == false) + { + char OldLink[400]; + if (readlink(OriginalPath,OldLink,sizeof(OldLink)) == -1) + _error->Errno("readlink","Failed to readlink %s",OriginalPath); + else + { + if (unlink(OriginalPath) != 0) + _error->Errno("unlink","Failed to unlink %s",OriginalPath); + else + { + if (link(FileName.c_str(),OriginalPath) != 0) + { + // Panic! Restore the symlink + symlink(OldLink,OriginalPath); + return _error->Errno("link","*** Failed to link %s to %s", + FileName.c_str(), + OriginalPath); + } + } + } + } + + DeLinkBytes += St.st_size; + if (DeLinkBytes/1024 >= DeLinkLimit) + c1out << " DeLink limit of " << SizeToStr(DeLinkBytes) << "B hit." << endl; + } + + FileName = OriginalPath; + } + + return true; +} + /*}}}*/ +// FTWScanner::SetExts - Set extensions to support /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool FTWScanner::SetExts(string Vals) +{ + delete [] TmpExt; + TmpExt = new char[Vals.length()+1]; + strcpy(TmpExt,Vals.c_str()); + return TokSplitString(' ',TmpExt,(char **)Ext,sizeof(Ext)/sizeof(Ext[0])); +} + /*}}}*/ + +// PackagesWriter::PackagesWriter - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +PackagesWriter::PackagesWriter(string DB,string Overrides,string ExtOverrides) : + Db(DB),Stats(Db.Stats) +{ + Output = stdout; + Ext[0] = ".deb"; + Ext[1] = 0; + DeLinkLimit = 0; + + // Process the command line options + DoMD5 = _config->FindB("APT::FTPArchive::MD5",true); + DoContents = _config->FindB("APT::FTPArchive::Contents",true); + NoOverride = _config->FindB("APT::FTPArchive::NoOverrideMsg",false); + + if (Db.Loaded() == false) + DoContents = false; + + // Read the override file + if (Overrides.empty() == false && Over.ReadOverride(Overrides) == false) + return; + else + NoOverride = true; + + if (ExtOverrides.empty() == false) + Over.ReadExtraOverride(ExtOverrides); + + _error->DumpErrors(); +} + /*}}}*/ +// PackagesWriter::DoPackage - Process a single package /*{{{*/ +// --------------------------------------------------------------------- +/* This method takes a package and gets its control information and + MD5 then writes out a control record with the proper fields rewritten + and the path/size/hash appended. */ +bool PackagesWriter::DoPackage(string FileName) +{ + // Open the archive + FileFd F(FileName,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + + // Stat the file for later + struct stat St; + if (fstat(F.Fd(),&St) != 0) + return _error->Errno("fstat","Failed to stat %s",FileName.c_str()); + + // Pull all the data we need form the DB + string MD5Res; + if (Db.SetFile(FileName,St,&F) == false || + Db.LoadControl() == false || + (DoContents == true && Db.LoadContents(true) == false) || + (DoMD5 == true && Db.GetMD5(MD5Res,false) == false)) + return false; + + if (Delink(FileName,OriginalPath,Stats.DeLinkBytes,St) == false) + return false; + + // Lookup the overide information + pkgTagSection &Tags = Db.Control.Section; + string Package = Tags.FindS("Package"); + Override::Item Tmp; + Override::Item *OverItem = Over.GetItem(Package); + + if (Package.empty() == true) + return _error->Error("Archive had no package field"); + + // If we need to do any rewriting of the header do it now.. + if (OverItem == 0) + { + if (NoOverride == false) + { + NewLine(1); + c1out << " " << Package << " has no override entry" << endl; + } + + OverItem = &Tmp; + Tmp.FieldOverride["Section"] = Tags.FindS("Section"); + Tmp.Priority = Tags.FindS("Priority"); + } + + char Size[40]; + sprintf(Size,"%lu",St.st_size); + + // Strip the DirStrip prefix from the FileName and add the PathPrefix + string NewFileName; + if (DirStrip.empty() == false && + FileName.length() > DirStrip.length() && + stringcmp(FileName.begin(),FileName.begin() + DirStrip.length(), + DirStrip.begin(),DirStrip.end()) == 0) + NewFileName = string(FileName.begin() + DirStrip.length(),FileName.end()); + else + NewFileName = FileName; + if (PathPrefix.empty() == false) + NewFileName = flCombine(PathPrefix,NewFileName); + + // This lists all the changes to the fields we are going to make. + // (7 hardcoded + maintainer + suggests + end marker) + TFRewriteData Changes[6+2+OverItem->FieldOverride.size()+1]; + + unsigned int End = 0; + SetTFRewriteData(Changes[End++], "Size", Size); + SetTFRewriteData(Changes[End++], "MD5sum", MD5Res.c_str()); + SetTFRewriteData(Changes[End++], "Filename", NewFileName.c_str()); + SetTFRewriteData(Changes[End++], "Priority", OverItem->Priority.c_str()); + SetTFRewriteData(Changes[End++], "Status", 0); + SetTFRewriteData(Changes[End++], "Optional", 0); + + // Rewrite the maintainer field if necessary + bool MaintFailed; + string NewMaint = OverItem->SwapMaint(Tags.FindS("Maintainer"),MaintFailed); + if (MaintFailed == true) + { + if (NoOverride == false) + { + NewLine(1); + c1out << " " << Package << " maintainer is " << + Tags.FindS("Maintainer") << " not " << + OverItem->OldMaint << endl; + } + } + + if (NewMaint.empty() == false) + SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str()); + + /* Get rid of the Optional tag. This is an ugly, ugly, ugly hack that + dpkg-scanpackages does.. Well sort of. dpkg-scanpackages just does renaming + but dpkg does this append bit. So we do the append bit, at least that way the + status file and package file will remain similar. There are other transforms + but optional is the only legacy one still in use for some lazy reason. */ + string OptionalStr = Tags.FindS("Optional"); + if (OptionalStr.empty() == false) + { + if (Tags.FindS("Suggests").empty() == false) + OptionalStr = Tags.FindS("Suggests") + ", " + OptionalStr; + SetTFRewriteData(Changes[End++], "Suggests", OptionalStr.c_str()); + } + + for (map<string,string>::iterator I = OverItem->FieldOverride.begin(); + I != OverItem->FieldOverride.end(); I++) + SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); + + SetTFRewriteData(Changes[End++], 0, 0); + + // Rewrite and store the fields. + if (TFRewrite(Output,Tags,TFRewritePackageOrder,Changes) == false) + return false; + fprintf(Output,"\n"); + + return Db.Finish(); +} + /*}}}*/ + +// SourcesWriter::SourcesWriter - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +SourcesWriter::SourcesWriter(string BOverrides,string SOverrides, + string ExtOverrides) +{ + Output = stdout; + Ext[0] = ".dsc"; + Ext[1] = 0; + DeLinkLimit = 0; + Buffer = 0; + BufSize = 0; + + // Process the command line options + NoOverride = _config->FindB("APT::FTPArchive::NoOverrideMsg",false); + + // Read the override file + if (BOverrides.empty() == false && BOver.ReadOverride(BOverrides) == false) + return; + else + NoOverride = true; + + if (ExtOverrides.empty() == false) + SOver.ReadExtraOverride(ExtOverrides); + + if (SOverrides.empty() == false && FileExists(SOverrides) == true) + SOver.ReadOverride(SOverrides,true); +} + /*}}}*/ +// SourcesWriter::DoPackage - Process a single package /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool SourcesWriter::DoPackage(string FileName) +{ + // Open the archive + FileFd F(FileName,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + + // Stat the file for later + struct stat St; + if (fstat(F.Fd(),&St) != 0) + return _error->Errno("fstat","Failed to stat %s",FileName.c_str()); + + if (St.st_size > 128*1024) + return _error->Error("DSC file '%s' is too large!",FileName.c_str()); + + if (BufSize < (unsigned)St.st_size+1) + { + BufSize = St.st_size+1; + Buffer = (char *)realloc(Buffer,St.st_size+1); + } + + if (F.Read(Buffer,St.st_size) == false) + return false; + + // Hash the file + char *Start = Buffer; + char *BlkEnd = Buffer + St.st_size; + MD5Summation MD5; + MD5.Add((unsigned char *)Start,BlkEnd - Start); + + // Add an extra \n to the end, just in case + *BlkEnd++ = '\n'; + + /* Remove the PGP trailer. Some .dsc's have this without a blank line + before */ + const char *Key = "-----BEGIN PGP SIGNATURE-----"; + for (char *MsgEnd = Start; MsgEnd < BlkEnd - strlen(Key) -1; MsgEnd++) + { + if (*MsgEnd == '\n' && strncmp(MsgEnd+1,Key,strlen(Key)) == 0) + { + MsgEnd[1] = '\n'; + break; + } + } + + /* Read records until we locate the Source record. This neatly skips the + GPG header (which is RFC822 formed) without any trouble. */ + pkgTagSection Tags; + do + { + unsigned Pos; + if (Tags.Scan(Start,BlkEnd - Start) == false) + return _error->Error("Could not find a record in the DSC '%s'",FileName.c_str()); + if (Tags.Find("Source",Pos) == true) + break; + Start += Tags.size(); + } + while (1); + Tags.Trim(); + + // Lookup the overide information, finding first the best priority. + string BestPrio; + char Buffer[1000]; + string Bins = Tags.FindS("Binary"); + Override::Item *OverItem = 0; + if (Bins.empty() == false && Bins.length() < sizeof(Buffer)) + { + strcpy(Buffer,Bins.c_str()); + + // Ignore too-long errors. + char *BinList[400]; + TokSplitString(',',Buffer,BinList,sizeof(BinList)/sizeof(BinList[0])); + + // Look at all the binaries + unsigned char BestPrioV = pkgCache::State::Extra; + for (unsigned I = 0; BinList[I] != 0; I++) + { + Override::Item *Itm = BOver.GetItem(BinList[I]); + if (Itm == 0) + continue; + if (OverItem == 0) + OverItem = Itm; + + unsigned char NewPrioV = debListParser::GetPrio(Itm->Priority); + if (NewPrioV < BestPrioV || BestPrio.empty() == true) + { + BestPrioV = NewPrioV; + BestPrio = Itm->Priority; + } + } + } + + // If we need to do any rewriting of the header do it now.. + Override::Item Tmp; + if (OverItem == 0) + { + if (NoOverride == false) + { + NewLine(1); + c1out << " " << Tags.FindS("Source") << " has no override entry" << endl; + } + + OverItem = &Tmp; + } + + Override::Item *SOverItem = SOver.GetItem(Tags.FindS("Source")); + if (SOverItem == 0) + { + SOverItem = BOver.GetItem(Tags.FindS("Source")); + if (SOverItem == 0) + SOverItem = OverItem; + } + + // Add the dsc to the files hash list + char Files[1000]; + snprintf(Files,sizeof(Files),"\n %s %lu %s\n %s", + string(MD5.Result()).c_str(),St.st_size, + flNotDir(FileName).c_str(), + Tags.FindS("Files").c_str()); + + // Strip the DirStrip prefix from the FileName and add the PathPrefix + string NewFileName; + if (DirStrip.empty() == false && + FileName.length() > DirStrip.length() && + stringcmp(DirStrip,OriginalPath,OriginalPath + DirStrip.length()) == 0) + NewFileName = string(OriginalPath + DirStrip.length()); + else + NewFileName = OriginalPath; + if (PathPrefix.empty() == false) + NewFileName = flCombine(PathPrefix,NewFileName); + + string Directory = flNotFile(OriginalPath); + string Package = Tags.FindS("Source"); + + // Perform the delinking operation over all of the files + string ParseJnk; + const char *C = Files; + for (;isspace(*C); C++); + while (*C != 0) + { + // Parse each of the elements + if (ParseQuoteWord(C,ParseJnk) == false || + ParseQuoteWord(C,ParseJnk) == false || + ParseQuoteWord(C,ParseJnk) == false) + return _error->Error("Error parsing file record"); + + char Jnk[2]; + string OriginalPath = Directory + ParseJnk; + if (RealPath != 0 && readlink(OriginalPath.c_str(),Jnk,sizeof(Jnk)) != -1 && + realpath(OriginalPath.c_str(),RealPath) != 0) + { + string RP = RealPath; + if (Delink(RP,OriginalPath.c_str(),Stats.DeLinkBytes,St) == false) + return false; + } + } + + Directory = flNotFile(NewFileName); + if (Directory.length() > 2) + Directory.erase(Directory.end()-1); + + // This lists all the changes to the fields we are going to make. + // (5 hardcoded + maintainer + end marker) + TFRewriteData Changes[5+1+SOverItem->FieldOverride.size()+1]; + + unsigned int End = 0; + SetTFRewriteData(Changes[End++],"Source",Package.c_str(),"Package"); + SetTFRewriteData(Changes[End++],"Files",Files); + if (Directory != "./") + SetTFRewriteData(Changes[End++],"Directory",Directory.c_str()); + SetTFRewriteData(Changes[End++],"Priority",BestPrio.c_str()); + SetTFRewriteData(Changes[End++],"Status",0); + + // Rewrite the maintainer field if necessary + bool MaintFailed; + string NewMaint = OverItem->SwapMaint(Tags.FindS("Maintainer"),MaintFailed); + if (MaintFailed == true) + { + if (NoOverride == false) + { + NewLine(1); + c1out << " " << Package << " maintainer is " << + Tags.FindS("Maintainer") << " not " << + OverItem->OldMaint << endl; + } + } + if (NewMaint.empty() == false) + SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str()); + + for (map<string,string>::iterator I = SOverItem->FieldOverride.begin(); + I != SOverItem->FieldOverride.end(); I++) + SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); + + SetTFRewriteData(Changes[End++], 0, 0); + + // Rewrite and store the fields. + if (TFRewrite(Output,Tags,TFRewriteSourceOrder,Changes) == false) + return false; + fprintf(Output,"\n"); + + Stats.Packages++; + + return true; +} + /*}}}*/ + +// ContentsWriter::ContentsWriter - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +ContentsWriter::ContentsWriter(string DB) : + Db(DB), Stats(Db.Stats) + +{ + Ext[0] = ".deb"; + Ext[1] = 0; + Output = stdout; +} + /*}}}*/ +// ContentsWriter::DoPackage - Process a single package /*{{{*/ +// --------------------------------------------------------------------- +/* If Package is the empty string the control record will be parsed to + determine what the package name is. */ +bool ContentsWriter::DoPackage(string FileName,string Package) +{ + // Open the archive + FileFd F(FileName,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + + // Stat the file for later + struct stat St; + if (fstat(F.Fd(),&St) != 0) + return _error->Errno("fstat","Failed too stat %s",FileName.c_str()); + + // Ready the DB + if (Db.SetFile(FileName,St,&F) == false || + Db.LoadContents(false) == false) + return false; + + // Parse the package name + if (Package.empty() == true) + { + if (Db.LoadControl() == false) + return false; + Package = Db.Control.Section.FindS("Package"); + } + + Db.Contents.Add(Gen,Package); + + return Db.Finish(); +} + /*}}}*/ +// ContentsWriter::ReadFromPkgs - Read from a packages file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool ContentsWriter::ReadFromPkgs(string PkgFile,string PkgCompress) +{ + MultiCompress Pkgs(PkgFile,PkgCompress,0,false); + if (_error->PendingError() == true) + return false; + + // Open the package file + int CompFd = -1; + int Proc = -1; + if (Pkgs.OpenOld(CompFd,Proc) == false) + return false; + + // No auto-close FD + FileFd Fd(CompFd,false); + pkgTagFile Tags(&Fd); + if (_error->PendingError() == true) + { + Pkgs.CloseOld(CompFd,Proc); + return false; + } + + // Parse. + pkgTagSection Section; + while (Tags.Step(Section) == true) + { + string File = flCombine(Prefix,Section.FindS("FileName")); + string Package = Section.FindS("Section"); + if (Package.empty() == false && Package.end()[-1] != '/') + { + Package += '/'; + Package += Section.FindS("Package"); + } + else + Package += Section.FindS("Package"); + + DoPackage(File,Package); + if (_error->empty() == false) + { + _error->Error("Errors apply to file '%s'",File.c_str()); + _error->DumpErrors(); + } + } + + // Tidy the compressor + if (Pkgs.CloseOld(CompFd,Proc) == false) + return false; + + return true; +} + /*}}}*/ diff --git a/apt/ftparchive/writer.h b/apt/ftparchive/writer.h new file mode 100644 index 0000000..29eb92a --- /dev/null +++ b/apt/ftparchive/writer.h @@ -0,0 +1,152 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: writer.h,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +/* ###################################################################### + + Writer + + The file writer classes. These write various types of output, sources, + packages and contents. + + ##################################################################### */ + /*}}}*/ +#ifndef WRITER_H +#define WRITER_H + +#ifdef __GNUG__ +#pragma interface "writer.h" +#endif + +#include <string> +#include <stdio.h> +#include <iostream> +#include <vector> + +#include "cachedb.h" +#include "override.h" +#include "apt-ftparchive.h" + +using std::string; +using std::cout; +using std::endl; + +class FTWScanner +{ + protected: + + char *TmpExt; + const char *Ext[10]; + const char *OriginalPath; + char *RealPath; + bool ErrorPrinted; + + // Stuff for the delinker + bool NoLinkAct; + + static FTWScanner *Owner; + static int Scanner(const char *File,const struct stat *sb,int Flag); + + bool Delink(string &FileName,const char *OriginalPath, + unsigned long &Bytes,struct stat &St); + + inline void NewLine(unsigned Priority) + { + if (ErrorPrinted == false && Quiet <= Priority) + { + cout << endl; + ErrorPrinted = true; + } + } + + public: + + unsigned long DeLinkLimit; + string InternalPrefix; + + virtual bool DoPackage(string FileName) = 0; + bool RecursiveScan(string Dir); + bool LoadFileList(string BaseDir,string File); + bool SetExts(string Vals); + + FTWScanner(); + virtual ~FTWScanner() {delete [] RealPath; delete [] TmpExt;}; +}; + +class PackagesWriter : public FTWScanner +{ + Override Over; + CacheDB Db; + + public: + + // Some flags + bool DoMD5; + bool NoOverride; + bool DoContents; + + // General options + string PathPrefix; + string DirStrip; + FILE *Output; + struct CacheDB::Stats &Stats; + + inline bool ReadOverride(string File) {return Over.ReadOverride(File);}; + inline bool ReadExtraOverride(string File) + {return Over.ReadExtraOverride(File);}; + virtual bool DoPackage(string FileName); + + PackagesWriter(string DB,string Overrides,string ExtOverrides=string()); + virtual ~PackagesWriter() {}; +}; + +class ContentsWriter : public FTWScanner +{ + CacheDB Db; + + GenContents Gen; + + public: + + // General options + FILE *Output; + struct CacheDB::Stats &Stats; + string Prefix; + + bool DoPackage(string FileName,string Package); + virtual bool DoPackage(string FileName) + {return DoPackage(FileName,string());}; + bool ReadFromPkgs(string PkgFile,string PkgCompress); + + void Finish() {Gen.Print(Output);}; + inline bool ReadyDB(string DB) {return Db.ReadyDB(DB);}; + + ContentsWriter(string DB); + virtual ~ContentsWriter() {}; +}; + +class SourcesWriter : public FTWScanner +{ + Override BOver; + Override SOver; + char *Buffer; + unsigned long BufSize; + + public: + + bool NoOverride; + + // General options + string PathPrefix; + string DirStrip; + FILE *Output; + struct CacheDB::Stats Stats; + + virtual bool DoPackage(string FileName); + + SourcesWriter(string BOverrides,string SOverrides, + string ExtOverrides=string()); + virtual ~SourcesWriter() {free(Buffer);}; +}; + + +#endif diff --git a/apt/gui/CVS/Entries b/apt/gui/CVS/Entries deleted file mode 100644 index e234c40..0000000 --- a/apt/gui/CVS/Entries +++ /dev/null @@ -1,33 +0,0 @@ -/apt.cc/1.1.1.1/Fri Aug 10 14:01:51 2001// -/aptwidgets.cc/1.1.1.1/Fri Aug 10 14:01:51 2001// -/aptwidgets.h/1.1.1.1/Fri Aug 10 14:01:51 2001// -/checkoff.xpm/1.1.1.1/Fri Aug 10 14:01:51 2001// -/checkon.xpm/1.1.1.1/Fri Aug 10 14:01:51 2001// -/conflicts.xpm/1.1.1.1/Fri Aug 10 14:01:51 2001// -/depends.xpm/1.1.1.1/Fri Aug 10 14:01:51 2001// -/downgrade.xpm/1.1.1.1/Fri Aug 10 14:01:51 2001// -/errorshow.cc/1.1.1.1/Fri Aug 10 14:01:58 2001// -/errorshow.h/1.1.1.1/Fri Aug 10 14:01:58 2001// -/extracache.cc/1.1.1.1/Fri Aug 10 14:03:14 2001// -/extracache.h/1.1.1.1/Fri Aug 10 14:03:14 2001// -/makefile/1.1.1.1/Fri Aug 10 14:03:14 2001// -/minus.xpm/1.1.1.1/Fri Aug 10 14:03:16 2001// -/package.xpm/1.1.1.1/Fri Aug 10 14:03:16 2001// -/pkgtree.cc/1.1.1.1/Fri Aug 10 14:03:17 2001// -/pkgtree.h/1.1.1.1/Fri Aug 10 14:03:17 2001// -/pkgtreeitem.cc/1.1.1.1/Fri Aug 10 14:03:17 2001// -/pkgtreeitem.h/1.1.1.1/Fri Aug 10 14:03:18 2001// -/plus.xpm/1.1.1.1/Fri Aug 10 14:03:18 2001// -/policy.cc/1.1.1.1/Fri Aug 10 14:03:18 2001// -/policy.h/1.1.1.1/Fri Aug 10 14:03:18 2001// -/progressmeter.cc/1.1.1.1/Fri Aug 10 14:03:18 2001// -/progressmeter.h/1.1.1.1/Fri Aug 10 14:03:18 2001// -/radiooff.xpm/1.1.1.1/Fri Aug 10 14:03:18 2001// -/radioon.xpm/1.1.1.1/Fri Aug 10 14:03:18 2001// -/recommends.xpm/1.1.1.1/Fri Aug 10 14:03:18 2001// -/section.xpm/1.1.1.1/Fri Aug 10 14:03:18 2001// -/statuswidgets.cc/1.1.1.1/Fri Aug 10 14:03:18 2001// -/statuswidgets.h/1.1.1.1/Fri Aug 10 14:03:18 2001// -/suggests.xpm/1.1.1.1/Fri Aug 10 14:03:18 2001// -/upgrade.xpm/1.1.1.1/Fri Aug 10 14:03:19 2001// -D diff --git a/apt/gui/CVS/Repository b/apt/gui/CVS/Repository deleted file mode 100644 index ae7583b..0000000 --- a/apt/gui/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/gui diff --git a/apt/gui/CVS/Root b/apt/gui/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/gui/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/gui/apt.cc b/apt/gui/apt.cc deleted file mode 100644 index 61373a4..0000000 --- a/apt/gui/apt.cc +++ /dev/null @@ -1,90 +0,0 @@ -#include <deity/selectloop.h> -#include <deity/widgetinit.h> -#include <deity/utils.h> - -#include <apt-pkg/init.h> -#include <apt-pkg/error.h> -#include <apt-pkg/sourcelist.h> -#include <apt-pkg/pkgcachegen.h> -#include "extracache.h" -#include "policy.h" - -#include <pthread.h> - -#include "aptwidgets.h" -#include "progressmeter.h" -#include "errorshow.h" - -#include <iostream.h> - -// OpenCache - Construct all caches from the source list /*{{{*/ -// --------------------------------------------------------------------- -/* This is ment to run asyncronously so that event processing can continue - normally. Input is a pointer to a progress meter. */ -void *OpenCache(void *Prog) -{ - ProgressMeter *Progress = (ProgressMeter *)Prog; - - // Read the source list - pkgSourceList List; - if (List.ReadMainList() == false) - ShowErrors("The list of sources could not be read.",true); - - // Build all of the caches - pkgMakeStatusCache(List,*Progress); - if (_error->PendingError() == true) - ShowErrors("The package lists or status file could not be parsed or opened.",true); - - // Means some warnings were generated by MakeStatusCache. - Progress->Done(); - ShowErrors("Some of the package information could not be loaded.\n" - "This means that you will have an incomplete list of selections.\n" - "Use the Update command to fix this."); - - - // Open our cache and extra data. - ExtraCacheF *Cache = new ExtraCacheF(*Policy::Cur,*Progress); - if (_error->PendingError() == true) - ShowErrors("The cache files could not be read."); - Progress->Done(); - - return Cache; -} - /*}}}*/ - -int main(int,char **) -{ - SelectLoop Loop; - Widget *Root = 0; - - // Initialize the widget library and bring up the best display - Root = InitWidgets(Loop); - - if (Root == 0) - { - cerr << "Can't find a compatible display system. Supported are: " - << InitWidgetsSupported() << endl; - return 100; - } - - // Initialize the package library - if (pkgInitialize(*_config) == false) - { - _error->DumpErrors(); - return 100; - } - - // Use 'apt 3> file' to see the debug information from clog. - ReAttachStreams(); -// Base = new MainWindow(Root); - - ProgressMeter *Progress = new ProgressMeter("Generating Cache",Root); - - // Create a detached thread to create the caches. - pthread_t T; - pthread_create(&T,0,&OpenCache,Progress); - pthread_detach(T); - - Loop.Loop(); - return 0; -} diff --git a/apt/gui/aptwidgets.cc b/apt/gui/aptwidgets.cc deleted file mode 100644 index b1a8e12..0000000 --- a/apt/gui/aptwidgets.cc +++ /dev/null @@ -1,408 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: aptwidgets.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - DeityWidgets - Constructors for the APT widget tree. - - These routines construct and layout all of the widgets used in - APT. - - ##################################################################### */ - /*}}}*/ -// Include files /*{{{*/ -#include <config.h> - -#include <iostream.h> -#include <sys/vfs.h> -#include <stdio.h> -#include <time.h> - -#include "aptwidgets.h" -#include "pkgtree.h" -#include "policy.h" -#include "extracache.h" -#include "statuswidgets.h" - -#include <apt-pkg/error.h> -#include <apt-pkg/configuration.h> - -#include <deity/menubar.h> -#include <deity/textwidg.h> -#include <deity/anchor.h> -#include <deity/button.h> -#include <deity/window.h> -#include <deity/tree.h> -#include <deity/columnbar.h> -#include <deity/tabdialog.h> -#include <deity/utils.h> - /*}}}*/ - -MainWindow *Base = 0; -#define _(x) x - -// ListToggle - Notifyer class to toggle a check item /*{{{*/ -// --------------------------------------------------------------------- -/* This is attached to all of the toggles in the list menu and inverts - the associated field in the policy class then rebuilds the list */ -class ListToggle : public Notifyer -{ - public: - typedef void (*TFunc)(Widget *From,bool &State); - - private: - bool &Target; - TFunc CallFunc; - public: - - // Toggle the attached boolean and rebuild the tree - virtual bool Trigger(Widget *From,Notifyer::Tag,void *) - { - Target = !Target; - if (Target == true) - From->Flag(Widget::Set,Widget::Set); - else - From->Flag(0,Widget::Set); - if (CallFunc != 0) - CallFunc(From,Target); - return true; - } - - // Create a CheckMenu item, attach this notification and set the state - ListToggle(const char *I,bool &Target,TFunc Call = 0) : Notifyer(Nt_Action), - Target(Target), CallFunc(Call) - { - Widget *W = new CheckMenuItem(I); - W->Add(this); - if (Target == true) - W->Flag(Widget::Set,Widget::Set); - else - W->Flag(0,Widget::Set); - } -}; - /*}}}*/ -// RegenList - Callback for list regeneration /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void RegenList(Widget *,bool &) -{ - Base->PkgView.PTree->MakeList(Base->CurCache); -} - /*}}}*/ -// SetColumns - Callback to change the column layout /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void SetColumns(Widget *,bool &) -{ - // This is the size transform table, order is CV, IV IW - long GPos[][7] = {{16,16,16,-100,-200,-200,-200}, // 000 - {16,16,16,190,-200,-200,-100}, // 001 - {16,16,16,190,-200,-100,-200}, // 010 - {16,16,16,190,-200,-40,-60}, // 011 - {16,16,16,190,-100,-200,-200}, // 100 - {16,16,16,190,-40,-200,-60}, // 101 - {16,16,16,190,-50,-50,-200}, // 110 - {16,16,16,190,85,85,-100}}; // 111 - - // Compute the table index for the current state - unsigned long Index = 0; - if (Policy::Cur->Columns.CurVersion == true) - Index |= (1 << 2); - if (Policy::Cur->Columns.InstVersion == true) - Index |= (1 << 1); - if (Policy::Cur->Columns.InstAsWell == true) - Index |= (1 << 0); - - if (GraphicGC::GC != 0) - Base->PkgView.Columns->Position(GPos[Index],7); - Base->PkgView.PTree->Damage(); -} - /*}}}*/ - -// MainWindow::MainWindow - The main APT window /*{{{*/ -// --------------------------------------------------------------------- -/* */ -MainWindow::MainWindow(Widget *Root) : PkgView(*this) -{ - CurCache = 0; - CtrlCache = 0; - ::Base = this; - - // Construct the top level window when in graphics mode - if (GraphicGC::GC != 0) - { - Main = new GUIWindow("APT",Root); - Base = Main; - } - else - Base = Root; - - PkgView.Create(); - PkgView.Layout(); -} - /*}}}*/ -// PackageView::Create - Create all of the widgets /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PackageView::Create() -{ - Widget *Base = Owner.Base; - - // Construct the Main Menu - Menu = new MenuBar(Base); - - // The file menu - Widget::LastWidget = new MenuItem(_("&File")); - new MenuPopup(); - new MenuItem(_("&Import List of Installed Packages")); - new MenuItem(_("&Export List of Installed Packages")); - new MenuItem(_("&Go Back to Main Screen")); - new Separator(); - new MenuItem(_("&Quit")); - - // The Edit menu - Widget::LastWidget = new MenuItem(_("&Edit"),Menu); - new MenuPopup(); - new MenuItem(_("&Find\t/")); - new MenuItem(_("Find &Again\tn")); - - // The List menu - Widget::LastWidget = new MenuItem(_("&List"),Menu); - new MenuPopup(); - new ListToggle(_("Packages in &Profile"),Policy::Cur->Displayable.InProfile,RegenList); - new ListToggle(_("&Installed Packages"),Policy::Cur->Displayable.Installed,RegenList); - new ListToggle(_("Packages to &Upgrade"),Policy::Cur->Displayable.ToUpgrade,RegenList); - new ListToggle(_("Packages to &Downgrade"),Policy::Cur->Displayable.ToDowngrade,RegenList); - new ListToggle(_("I&gnored Up/Downgrades"),Policy::Cur->Displayable.HeldUpDn,RegenList); - new ListToggle(_("B&roken Packages"),Policy::Cur->Displayable.Broken,RegenList); - new ListToggle(_("&New Packages"),Policy::Cur->Displayable.New); - new ListToggle(_("&Obsolete Packages"),Policy::Cur->Displayable.Obsolete,RegenList); - new ListToggle(_("No&t Installed Packages"),Policy::Cur->Displayable.NotInstalled,RegenList); - new Separator(); - new MenuItem(_("&Choose Profile")); - new MenuItem(_("&Modify Profile")); - - // The Package menu - Widget::LastWidget = new MenuItem(_("&Package"),Menu); - new MenuPopup(); - new MenuItem(_("Check for &Errors")); - new MenuItem(_("&Configure Packages")); - new MenuItem(_("&Install/Upgrade/Remove")); - new Separator(); - Widget *MarkInst = new MenuItem(_("Mark for I&nstallation\tI")); - Widget *MarkHold = new MenuItem(_("Mark for &Keep\tK")); - Widget *MarkRemove = new MenuItem(_("Mark for &Deletion\tD")); - - // The Options menu - Widget::LastWidget = new MenuItem(_("&Options"),Menu); - new MenuPopup(); - new MenuItem(_("&Preferences")); - new Separator(); - new CheckMenuItem(_("Show &Toolbar")); - new ListToggle(_("Show &Sections"),Policy::Cur->ShowSections,RegenList); - new Separator(); - new ListToggle(_("&Current Version"),Policy::Cur->Columns.CurVersion,SetColumns); - new ListToggle(_("&Install Version"),Policy::Cur->Columns.InstVersion,SetColumns); - new ListToggle(_("Install as &Well"),Policy::Cur->Columns.InstAsWell,SetColumns); - - // Help menu item - new HelpMenuItem(_("&Help"),Menu); - Menu->Extent(); - - // The Column bar - if (GraphicGC::GC != 0) - Columns = new ColumnBar(_("\eD\eK\eI\tPackage\tCur-Version\tInst-Version\tInstall as well"),Base); - else - Columns = new ColumnBar(_("DKI\tPackage\tCur-Version\tInst-Version\tInstall as well"),Base); - new Anchor(Columns,Anchor::RightToRight | Anchor::TopToTop | Anchor::BotToTop); - - // The status bar - Status = new TextWidget(Base); - Status->Flag(Widget::Region); - new Anchor(Status,Anchor::RightToRight | Anchor::TopToBot | Anchor::BotToBot); - Status->Add(new ClassNotifyer<PackageView>(this,Nt_Sync,&SyncStatus)); - Usr = new TextWidget(Status); - Usr->DrawFlags(GenGC::YCenter); - Debs = new TextWidget(Status); - Debs->DrawFlags(GenGC::YCenter); - new Anchor(Debs,Anchor::RightToRight | Anchor::TopToBot | Anchor::BotToBot); - - // The tree widget - PTree = new PkgTree(this,Columns,Base); - PTree->Flag(Widget::Region); - new Anchor(PTree,Anchor::RightToRight | Anchor::TopToTop | Anchor::BotToBot); - PTree->Add(new ClassNotifyer<PackageView>(this,Nt_SelectChange,&TreeChange)); - - // The tab dialog - StatusBox = new TabDialog(Base); - new TabPage(_("Info"),StatusBox); - InfoPage = new InfoWidget; - new TabPage(_("Stat"),StatusBox); - new TabPage(_("Words"),StatusBox); - StatusBox->Flag(Widget::Region); - StatusBox->Location(TabDialog::Bottom); - new Anchor(StatusBox,Anchor::RightToRight | Anchor::TopToTop | Anchor::BotToTop | Anchor::LeftToRight); - - // The description widget - Description = new MultiLineWidget(Base); - Description->Flag(Widget::Region); - new Anchor(Description,Anchor::LeftToRight | Anchor::TopToTop | Anchor::BotToBot); - - // Connect some methods to the d/k/i commands - MarkInst->Add(new ClassNotifyer<PkgTree>(PTree,Nt_Action,&PkgTree::InstallPkg)); - MarkHold->Add(new ClassNotifyer<PkgTree>(PTree,Nt_Action,&PkgTree::KeepPkg)); - MarkRemove->Add(new ClassNotifyer<PkgTree>(PTree,Nt_Action,&PkgTree::DeletePkg)); -} - /*}}}*/ -// PackageView::Layout - Position all of the widgets /*{{{*/ -// --------------------------------------------------------------------- -/* Once positions the anchors will ensure that they remain in the correct - location. */ -void PackageView::Layout() -{ - Widget *Base = Owner.Base; - - // Perform graphic mode widget layout (400x100) - if (GraphicGC::GC != 0) - { - Menu->Extent(); - - // Set the column positions and the location of the column headr - Columns->Extent(); - Columns->Resize(Rect(0,Menu->Loc().y2,250,Columns->Size().h)); - SetColumns(0,Policy::Cur->Columns.CurVersion); - - // Setup the status bar - Usr->BorderWidth(1); - Usr->Margins(Point(2,2)); - Usr->SwapBorderColors(); - Usr->Extent(); - - Debs->BorderWidth(1); - Debs->Margins(Point(2,2)); - Debs->SwapBorderColors(); - Debs->Extent(); - - Status->BorderWidth(1); - Status->Margins(Point(2,2)); - Status->Extent(); - - Status->Resize(Rect(0,100 - Status->Size().h,400,Status->Size().h)); - Usr->Resize(Rect(2,1,196,Status->Size().h-4)); - Debs->Resize(Rect(202,1,194,Status->Size().h-4)); - - Status->Sync(); - - // Position the main list - PTree->Resize(AbsRect(Columns->Loc().x1,Columns->Loc().y2, - Columns->Loc().x2,Status->Loc().y1)); - - // Set the initial size. - Owner.Base->Resize(Rect(Owner.Base->Size().x,Owner.Base->Size().y, - 600,370)); - - // Position the tabbed widget - StatusBox->Resize(AbsRect(PTree->Loc().x2,Menu->Loc().y2, - Base->Size().w,Menu->Loc().y2 + 200)); - - // Position the description - Description->Resize(AbsRect(StatusBox->Loc().x1,StatusBox->Loc().y2, - StatusBox->Loc().x2,Status->Loc().y1)); - Description->BorderWidth(1); - } - - // Perform text mode widget layout (80x25) - if (TextGC::GC != 0) - { - // Set the column positions and the location of the column header - long Poses[4] = {4,19,17,-100}; - Columns->Position(Poses,4); - Columns->Resize(Rect(0,1,55,1)); - Columns->Margins(Point(1,0)); - - // Position the status bar - Status->Resize(Rect(0,24,80,1)); - Usr->Resize(Rect(0,0,30,1)); - Debs->Resize(Rect(30,0,50,1)); - Status->Sync(); - - // Construct the main list - PTree->Resize(AbsRect(Columns->Loc().x1,Columns->Loc().y2, - Columns->Loc().x2,Status->Loc().y1)); - - // Position the tabbed widget - StatusBox->Resize(AbsRect(PTree->Loc().x2,Menu->Loc().y2, - Base->Size().w,Menu->Loc().y2 + 13)); - - // Position the description widget - Description->Resize(AbsRect(StatusBox->Loc().x1,StatusBox->Loc().y2, - StatusBox->Loc().x2,Status->Loc().y1)); - Description->BorderWidth(0); - } - - PTree->GiveFocus(); -} - /*}}}*/ -// PackageView::SyncStatus - Regenerate the status bar /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool PackageView::SyncStatus(Widget *,Notifyer::Tag,void *) -{ - struct statfs Buf; - if (statfs("/usr",&Buf) != 0) - { - cerr << "Statfs failed" << endl; - Buf.f_bfree = 0; - } - - ExtraCache &Cache = *Owner.CurCache; - char S[300]; - sprintf(S,"/usr: %liMB free, %liMB needed",(long)Buf.f_bfree/(1024*1024/Buf.f_bsize), - Cache.UsrSize()/1024/1024); - Usr->Text(S); - - sprintf(S,".debs: %liMB, %li broken, %li kept, %li inst, %li del", - Owner.CurCache->DebSize()/1024/1024,Cache.BrokenCount(), - Cache.KeepCount(),Cache.InstCount(),Cache.DelCount()); - Debs->Text(S); - return true; -} - /*}}}*/ -// PackageView::TreeChange - Called when the tree selection changes /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool PackageView::TreeChange(Widget *,Notifyer::Tag,void *) -{ -/* pkgCache::PkgIterator Pkg = PTree->CurrentPkg(); - if (Pkg.end() == true) - { - Description->Set(0); - InfoPage->Set(0); - return true; - } - - ExtraCache &Cache = *Owner.CurCache; - pkgSPkgCtrlInfo Inf = (*Owner.CtrlCache)[Cache[Pkg].CandidateVerIter(Cache)]; - - if (Inf.isNull() == false) - { - Description->Set(Inf->Find("Description")); - InfoPage->Set(Inf); - } - else - { - Description->Set(0); - InfoPage->Set(0); - } */ - - return true; -} - /*}}}*/ -// PackageView::Sync - Calls the various syncing functions /*{{{*/ -// --------------------------------------------------------------------- -/* This is called when the tree changes something */ -void PackageView::Sync() -{ - Status->Sync(); -}; - /*}}}*/ diff --git a/apt/gui/aptwidgets.h b/apt/gui/aptwidgets.h deleted file mode 100644 index cb2685d..0000000 --- a/apt/gui/aptwidgets.h +++ /dev/null @@ -1,87 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: aptwidgets.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - DeityWidgets - Manages groups of widgets - - ##################################################################### */ - /*}}}*/ -#ifndef APTWIDGETS_H -#define APTWIDGETS_H - -#include <deity/notify.h> - -/* We simply declare the items so we can advoid including all the headers - very few modules actually need more than a few of these at once */ -class Widget; -class BasicWidget; -class TextWidget; -class GUIWindow; -class PkgTree; -class ColumnBar; -class MainWindow; -class TabDialog; -class MenuBar; -class pkgCache; -class ExtraCache; -class pkgControlCache; -class MultiLineWidget; -class InfoWidget; - -class PackageView -{ - MainWindow &Owner; - - public: - - // The main elements of the display - MenuBar *Menu; - ColumnBar *Columns; - PkgTree *PTree; - TabDialog *StatusBox; - MultiLineWidget *Description; - TextWidget *Status; - TextWidget *Usr; - TextWidget *Debs; - InfoWidget *InfoPage; - - // The contents of the Info Page - - // The contents of the Stat Page - - // The contents of the Words Page - - void Layout(); - void Create(); - void Sync(); - - // Resyncronize the status display - bool SyncStatus(Widget *,Notifyer::Tag,void *); - bool TreeChange(Widget *,Notifyer::Tag,void *); - - PackageView(MainWindow &Owner) : Owner(Owner) {}; -}; - -class MainWindow -{ - public: - - // Main Window for Graphics Mode and root widget for text mode - GUIWindow *Main; - Widget *Base; - ExtraCache *CurCache; - pkgControlCache *CtrlCache; - - // PackageView Pane - PackageView PkgView; - - // Causes the panes to perform layout - void Layout(); - - MainWindow(Widget *Root); -}; - -extern MainWindow *Base; - -#endif diff --git a/apt/gui/checkoff.xpm b/apt/gui/checkoff.xpm deleted file mode 100644 index be0eeb4..0000000 --- a/apt/gui/checkoff.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * checkoff_xpm[] = { -"16 16 5 1", -" c #FFFFFFFFFFFF", -". c #767779", -"+ c #B0B1B2", -"@ c #030310", -"# c #F6F6F5", -" ", -" ", -" ", -" .........+ ", -" .@@@@@@@@# ", -" .@######@# ", -" .@######@# ", -" .@######@# ", -" .@######@# ", -" .@######@# ", -" .@######@# ", -" .@@@@@@@@# ", -" +######### ", -" ", -" ", -" "}; diff --git a/apt/gui/checkon.xpm b/apt/gui/checkon.xpm deleted file mode 100644 index 93be5d2..0000000 --- a/apt/gui/checkon.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * checkon_xpm[] = { -"16 16 5 1", -" c #FFFFFFFFFFFF", -". c #767779", -"+ c #B0B1B2", -"@ c #030310", -"# c #F6F6F5", -" ", -" ", -" ", -" .........+ ", -" .@@@@@@@@# ", -" .@######@@ ", -" .@#@@##@@@ ", -" .@#@@#@@@# ", -" .@#@@@@#@# ", -" .@#@@@##@# ", -" .@#@@###@# ", -" .@@@@@@@@# ", -" +######### ", -" ", -" ", -" "}; diff --git a/apt/gui/conflicts.xpm b/apt/gui/conflicts.xpm deleted file mode 100644 index 951633c..0000000 --- a/apt/gui/conflicts.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char * conflicts_xpm[] = { -"16 16 10 1", -" c #FFFFFFFFFFFF", -". c #F4DADA", -"+ c #D97979", -"@ c #C73A3A", -"# c #C12424", -"$ c #E9B4B4", -"% c #CB4848", -"& c #E6A9A9", -"* c #F8E8E8", -"= c #FFFFFF", -" ", -" ", -" .+@#@+. ", -" $#######$ ", -" .#%&*=*###. ", -" +#&===####+ ", -" @#*==###*#@ ", -" ##==###==## ", -" @#*###==*#@ ", -" +####===&#+ ", -" .###*=*&%#. ", -" $#######$ ", -" .+@#@+. ", -" ", -" ", -" "}; diff --git a/apt/gui/depends.xpm b/apt/gui/depends.xpm deleted file mode 100644 index f0a1bc9..0000000 --- a/apt/gui/depends.xpm +++ /dev/null @@ -1,37 +0,0 @@ -/* XPM */ -static char * depends_xpm[] = { -"16 16 18 1", -" c #FFFFFFFFFFFF", -". c #585858", -"+ c #B2B2B2", -"@ c #4A4A4A", -"# c #000000", -"$ c #E0E0E0", -"% c #DEDEDE", -"& c #F8F8F8", -"* c #FFFFFF", -"= c #B7B7B7", -"- c #F7F7F7", -"; c #AAAAAA", -"> c #C0C0C0", -", c #434343", -"' c #373737", -") c #3E3E3E", -"! c #EBEBEB", -"~ c #959595", -" ", -" .+ ", -" +@##. ", -" ##$+# ", -" #%&*+. ", -" .=*-;# ", -" #+>,# ", -" .##'##. ", -" #)++# ", -" #+!*+. ", -" .+***# ", -" #+*.# ", -" .##@~ ", -" +@ ", -" ", -" "}; diff --git a/apt/gui/downgrade.xpm b/apt/gui/downgrade.xpm deleted file mode 100644 index 53206f2..0000000 --- a/apt/gui/downgrade.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * downgrade_xpm[] = { -"16 16 3 1", -" c #FFFFFFFFFFFF s Background", -". c #000000", -"+ c #2F2F2F", -" ", -" ", -" ", -" ", -" ", -" ... ", -" ... ", -" ... ", -" ... ", -" .+..... ", -" ..... ", -" ... ", -" . ", -" ", -" ", -" "}; diff --git a/apt/gui/errorshow.cc b/apt/gui/errorshow.cc deleted file mode 100644 index f0f4569..0000000 --- a/apt/gui/errorshow.cc +++ /dev/null @@ -1,111 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: errorshow.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - Error Show - Show errors from the apt-pkg error class. - - ##################################################################### */ - /*}}}*/ -// Include /*{{{*/ -#include "errorshow.h" - -#include <deity/window.h> -#include <deity/textwidg.h> -#include <deity/widget-thread.h> -#include <deity/button.h> -#include <deity/utils.h> - -#include <apt-pkg/error.h> - /*}}}*/ - -// ShowErrors - Show any errors that may have come up /*{{{*/ -// --------------------------------------------------------------------- -/* If this returns true then a fatal error has occured and things should - be aborted. */ -bool ShowErrors(string Reason,bool Fatal) -{ - // Nothing to show. - if (_error->empty() == true) - return false; - - Widget::Lock Lock; - - // Create the dialog window - GUIWindow *Win; - if (Fatal == true) - Win = new GUIWindow("Fatal Error"); - else - Win = new GUIWindow("Error"); - - // Create the OK button - TextButton *OkButton; - if (Fatal == true) - OkButton = new TextButton("Exit",Win); - else - OkButton = new TextButton("Ok",Win); - - SNotify *Trigger; - OkButton->Add(Trigger = new SNotify(Nt_Action)); - OkButton->Extent(); - - // Add each string element to the dialog - long Spacer = OkButton->IdealSize().y; - long H = Spacer/2; - if (TextGC::GC != 0) - H = 1; - long Width = (long)(Widget::Root->Size().w*0.90) - 2*Spacer; - - // Generate widgets for each of the error codes - int Narrow = -1; - while (true) - { - WrapedText *String = new WrapedText(Reason,Win); - - // Narrow the positions of the raw error texts a bit - if (Narrow == 1) - String->Resize(Rect(Spacer + Spacer/2,H,Width - Spacer/2,1)); - else - String->Resize(Rect(Spacer,H,Width,1)); - - /* This extenting mode makes sure the widget takes the correct amount - of space in all cases. */ - String->ExtentMode(Widget::ExtentAlways,Widget::ExtentAlways); - - // We are now showing error texts not the title - if (Narrow == -1 && Reason.empty() == false) - { - /* We also change the colour and use a bigger font for the - main error message */ - String->Foreground(Wc_Blue); - String->Font(SimpleFont("helvetica",140)); - Width = String->IdealSize().x; - Narrow = 1; - } - else - Narrow = 0; - - H += String->IdealSize().y; - if (_error->empty() == true) - break; - _error->PopMessage(Reason); - } - - // Resize the window and position the OK button - Point WinSize = ChildrenExtent(Win); - OkButton->Resize(Rect((WinSize.x + Spacer - OkButton->Size().w)/2, - H + Spacer/2,OkButton->Size().w,OkButton->Size().h)); - Win->Resize(Rect(0,0,WinSize.x + Spacer,WinSize.y + 2*Spacer)); - CenterWidget(Win,Widget::Root->Size()); - Win->RealizeFamily(); - - Trigger->Wait(); - - delete Win; - - if (Fatal == true) - exit(100); - - return false; -} - /*}}}*/ diff --git a/apt/gui/errorshow.h b/apt/gui/errorshow.h deleted file mode 100644 index 2b64d81..0000000 --- a/apt/gui/errorshow.h +++ /dev/null @@ -1,20 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: errorshow.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - Error Show - Show errors from the apt-pkg error class. - - This should be called when an apt-pkg function fails. It will display - a dialog box with an errors/warnings that occured or do nothing. - - ##################################################################### */ - /*}}}*/ -#ifndef ERRORSHOW_H -#define ERRORSHOW_H - -#include <string> - -bool ShowErrors(string Reason = string(),bool Fatal = false); - -#endif diff --git a/apt/gui/extracache.cc b/apt/gui/extracache.cc deleted file mode 100644 index b212f4c..0000000 --- a/apt/gui/extracache.cc +++ /dev/null @@ -1,140 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: extracache.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - ExtraCache - Extension data for the cache - - This class stores the cache data and a set of extension structures for - monitoring the current state of all the packages. - - ##################################################################### */ - /*}}}*/ -// Include Files /*{{{*/ -#include "extracache.h" -#include "policy.h" - -#include <apt-pkg/error.h> -#include <apt-pkg/configuration.h> - /*}}}*/ - -ExtraCache *ExtraCache::SortCache = 0; - -// ExtraCache::ExtraCache - Constructors /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ExtraCache::ExtraCache(Policy &Pol,MMap &Map,OpProgress &Prog) : - pkgDepCache(Map,Prog), SortedPkgs(0), SecSortedPkgs(0), CurPolicy(Pol) -{ - if (_error->PendingError() == false) - Init(); -} - /*}}}*/ -// ExtraCache::~ExtraCache - Destructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ExtraCache::~ExtraCache() -{ - delete [] SortedPkgs; - delete [] SecSortedPkgs; -} - /*}}}*/ -// ExtraCache::NameComp - QSort compare by name /*{{{*/ -// --------------------------------------------------------------------- -/* */ -int ExtraCache::NameComp(const void *a,const void *b) -{ - const Package &A = **(Package **)a; - const Package &B = **(Package **)b; - - return strcmp(SortCache->StrP + A.Name,SortCache->StrP + B.Name); -} - /*}}}*/ -// ExtraCache::SecNameComp - Compare by name and then by section /*{{{*/ -// --------------------------------------------------------------------- -/* */ -int ExtraCache::SecNameComp(const void *a,const void *b) -{ - const Package &A = **(Package **)a; - const Package &B = **(Package **)b; - - // Sort by section first - if (A.Section == B.Section) - return strcmp(SortCache->StrP + A.Name,SortCache->StrP + B.Name); - return strcmp(SortCache->StrP + A.Section,SortCache->StrP + B.Section); -} - /*}}}*/ -// ExtraCache::Init - Generate the initial extra structures. /*{{{*/ -// --------------------------------------------------------------------- -/* This allocats the extension buffers and then sorts the packages two - ways. */ -bool ExtraCache::Init() -{ - // Grab some memory including space for the trailing null - delete [] SortedPkgs; - delete [] SecSortedPkgs; - SortedPkgs = new Package *[Head().PackageCount + 1]; - SecSortedPkgs = new Package *[Head().PackageCount + 1]; - - // Initialize both lists - int J = 0; - for (PkgIterator I = PkgBegin(); I.end() != true; I++, J++) - SortedPkgs[J] = SecSortedPkgs[J] = I; - SortedPkgs[J] = SecSortedPkgs[J] = 0; - - // Sort them - SortCache = this; - qsort(SortedPkgs,J,sizeof(*SortedPkgs),NameComp); - qsort(SecSortedPkgs,J,sizeof(*SecSortedPkgs),SecNameComp); - - return true; -} - /*}}}*/ -// ExtraCache::GetCandidateVer - Returns the Candidate install version /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ExtraCache::VerIterator ExtraCache::GetCandidateVer(PkgIterator Pkg) -{ - return CurPolicy.GetCandidateVer(Pkg); -}; - /*}}}*/ -// ExtraCache::IsImportantDep - True if the dep is important /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool ExtraCache::IsImportantDep(DepIterator Dep) -{ - return CurPolicy.IsImportantDep(Dep); -}; - /*}}}*/ - -// ExtraCacheF::ExtraCacheF - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* This creats objects to load the cache data into memory in an nice - single package. */ -ExtraCacheF::ExtraCacheF(Policy &Pol,OpProgress &Prog) : - File(0), Map(0), Cache(0) -{ - string FName = _config->FindFile("Dir::Cache::pkgcache"); - File = new FileFd(FName,FileFd::ReadOnly); - if (_error->PendingError() == true) - return; - - Map = new MMap(*File,MMap::Public | MMap::ReadOnly); - if (_error->PendingError() == true) - return; - - Cache = new ExtraCache(Pol,*Map,Prog); - if (_error->PendingError() == true) - return; -} - /*}}}*/ -// ExtraCacheF::~ExtraCacheF - Destructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ExtraCacheF::~ExtraCacheF() -{ - delete Cache; - delete Map; - delete File; -} - /*}}}*/ diff --git a/apt/gui/extracache.h b/apt/gui/extracache.h deleted file mode 100644 index 1edcfdf..0000000 --- a/apt/gui/extracache.h +++ /dev/null @@ -1,62 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: extracache.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - ExtraCache - Extension data for the cache - - Two name sorted lists of packages are maintained. One is sorted purely - by name and the other is sorted by section and then by name. This - class also provides Originally pkgDepCache used to be in here, but it - has migrated into pkglib. - - ##################################################################### */ - /*}}}*/ -#ifndef EXTRACACHE_H -#define EXTRACACHE_H - -#include <apt-pkg/depcache.h> - -class Policy; -class ExtraCache : public pkgDepCache -{ - // Helper functions - static ExtraCache *SortCache; - static int NameComp(const void *a,const void *b); - static int SecNameComp(const void *a,const void *b); - bool Init(); - - protected: - - // Policy implementation for DepCache - virtual VerIterator GetCandidateVer(PkgIterator Pkg); - virtual bool IsImportantDep(DepIterator Dep); - - public: - - // Name sorted lists of packages - Package **SortedPkgs; - Package **SecSortedPkgs; - - Policy &CurPolicy; - inline bool PromoteAutoKeep() {return true;}; - - ExtraCache(Policy &Pol,MMap &Map,OpProgress &Prog); - virtual ~ExtraCache(); -}; - -class ExtraCacheF -{ - FileFd *File; - MMap *Map; - ExtraCache *Cache; - public: - - ExtraCache &operator *() {return *Cache;}; - ExtraCache &operator ->() {return *Cache;}; - - ExtraCacheF(Policy &Pol,OpProgress &Prog); - ~ExtraCacheF(); -}; - -#endif diff --git a/apt/gui/makefile b/apt/gui/makefile deleted file mode 100644 index 6f657be..0000000 --- a/apt/gui/makefile +++ /dev/null @@ -1,17 +0,0 @@ -# -*- make -*- -BASE=.. -SUBDIR=gui - -# Bring in the default rules -include ../buildlib/defaults.mak - -# The program name -PROGRAM=apt -SLIBS = -lapt-pkg -ldeity -lpthread -LIB_MAKES = apt-pkg/makefile deity/makefile - -# Source files -SOURCE = apt.cc aptwidgets.cc extracache.cc pkgtree.cc pkgtreeitem.cc \ - policy.cc statuswidgets.cc progressmeter.cc errorshow.cc - -include $(PROGRAM_H) diff --git a/apt/gui/minus.xpm b/apt/gui/minus.xpm deleted file mode 100644 index 027cb18..0000000 --- a/apt/gui/minus.xpm +++ /dev/null @@ -1,91 +0,0 @@ -/* XPM */ -static char * minus_xpm[] = { -"16 16 72 1", -" c #FFFFFFFFFFFF s Background", -". c #D1D1D1", -"+ c #5D5D5D", -"@ c #181818", -"# c #000000", -"$ c #171717", -"% c #595959", -"& c #CDCDCD", -"* c #A3A3A3", -"= c #272727", -"- c #919191", -"; c #D4D4D4", -"> c #EBEBEB", -", c #CACACA", -"' c #818181", -") c #202020", -"! c #989898", -"~ c #F3F3F3", -"{ c #F4F4F4", -"] c #E9E9E9", -"^ c #DADADA", -"/ c #C5C5C5", -"( c #1C1C1C", -"_ c #C9C9C9", -": c #5E5E5E", -"< c #949494", -"[ c #F6F6F6", -"} c #FBFBFB", -"| c #EDEDED", -"1 c #696969", -"2 c #4C4C4C", -"3 c #191919", -"4 c #E3E3E3", -"5 c #343434", -"6 c #1D1D1D", -"7 c #444444", -"8 c #BFBFBF", -"9 c #959595", -"0 c #121212", -"a c #EEEEEE", -"b c #161616", -"c c #101010", -"d c #B8B8B8", -"e c #9F9F9F", -"f c #F1F1F1", -"g c #E2E2E2", -"h c #C3C3C3", -"i c #AAAAAA", -"j c #858585", -"k c #5B5B5B", -"l c #868686", -"m c #DDDDDD", -"n c #D3D3D3", -"o c #C6C6C6", -"p c #B3B3B3", -"q c #555555", -"r c #464646", -"s c #CECECE", -"t c #222222", -"u c #D2D2D2", -"v c #CFCFCF", -"w c #CBCBCB", -"x c #B4B4B4", -"y c #151515", -"z c #9B9B9B", -"A c #747474", -"B c #A6A6A6", -"C c #B1B1B1", -"D c #8C8C8C", -"E c #525252", -"F c #131313", -"G c #4A4A4A", -" ", -" ", -" .+@#$%& ", -" *=-;>,')! ", -" .=~{]]]^/(_ ", -" :<[}|||^/12 ", -" 34%%5657890 ", -" #a%5bc67de# ", -" @.|fg^^hij0 ", -" klg4mnopeqr ", -" stuvwhx*<yh ", -" z)ABC<kyD ", -" wEF#0Gh ", -" ", -" ", -" "}; diff --git a/apt/gui/package.xpm b/apt/gui/package.xpm deleted file mode 100644 index 67f9b82..0000000 --- a/apt/gui/package.xpm +++ /dev/null @@ -1,54 +0,0 @@ -/* XPM */ -static char * package_xpm[] = { -"16 16 35 1", -" c #FFFFFFFFFFFF", -". c #000000", -"+ c #D8CCA8", -"@ c #696351", -"# c #3E3229", -"$ c #261F19", -"% c #B3A98B", -"& c #555042", -"* c #474337", -"= c #716B58", -"- c #5D5243", -"; c #9C9479", -"> c #958D74", -", c #F1ECE0", -"' c #E3DBC2", -") c #6D6452", -"! c #443F33", -"~ c #ABA185", -"{ c #7A6B58", -"] c #CCA070", -"^ c #F5EEE6", -"/ c #54493E", -"( c #7D7661", -"_ c #5E5949", -": c #382D25", -"< c #685444", -"[ c #504031", -"} c #888077", -"| c #F5F1E9", -"1 c #5E4C3D", -"2 c #281F19", -"3 c #E5D0B9", -"4 c #4E3F33", -"5 c #261E18", -"6 c #5A493B", -" ", -" ", -" ", -" ... ", -" ..++@#$ ", -" ..%&*=-;>.. ", -" .,'+%)!*~%{. ", -" .]^,/(+(_:<. ", -" .]][}|'+12<. ", -" .]][]]31<2<. ", -" .]][]]]1<24. ", -" .]][]]]1<5. ", -" ..[]]]1<. ", -" ..]]6. ", -" ... ", -" "}; diff --git a/apt/gui/pkgtree.cc b/apt/gui/pkgtree.cc deleted file mode 100644 index a51adf5..0000000 --- a/apt/gui/pkgtree.cc +++ /dev/null @@ -1,344 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: pkgtree.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - PkgTree - Manages a tree of packages. - - The Package Tree class manages a list of packages. - - ##################################################################### */ - /*}}}*/ -// Include files /*{{{*/ -#include "pkgtreeitem.h" -#include "policy.h" -#include "aptwidgets.h" - -#include <deity/columnbar.h> - /*}}}*/ - -// PkgTree::PkgTree - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -PkgTree::PkgTree(PackageView *Owner,ColumnBar *Bar, Widget *Parent) : - Tree(Parent), Bar(Bar), Owner(Owner) -{ -} - /*}}}*/ -// PkgTree::MakeList - Generate the package list based on the policy /*{{{*/ -// --------------------------------------------------------------------- -/* This runs over either the section sorted list or the sorted list and - generates the tree. */ -void PkgTree::MakeList(ExtraCache *Cache) -{ - // Remove all items - EraseAll(); - this->Cache = Cache; - - // Generate a new list - Tree::Item *Root = 0; - if (Policy::Cur->ShowSections == true) - { - Tree::Item *Sec = 0; - Tree::Item *Last = 0; - unsigned long LastSect = 0; - for (pkgCache::Package **I = Cache->SecSortedPkgs; *I != 0; I++) - { - pkgCache::PkgIterator P = pkgCache::PkgIterator(*Cache,*I); - if (Policy::Cur->ShouldDisplay(*Cache,P) == false) - continue; - - // Create a new section - if (Sec == 0 || LastSect != (*I)->Section) - { - (new SecItem(P.Section()))->AfterStep(Root,Sec); - Sec->Flag(Tree::Item::Expanded); - Last = 0; - LastSect = P->Section; - } - - (new Item(*I,this,Sec))->AfterStep(Sec->Child,Last); - Last->Parent = Sec; - } - } - else - { - Tree::Item *Last = 0; - for (pkgCache::Package **I = Cache->SortedPkgs; *I != 0; I++) - { - pkgCache::PkgIterator P = pkgCache::PkgIterator(*Cache,*I); - if (Policy::Cur->ShouldDisplay(*Cache,P) == false) - continue; - - (new Item(*I,this))->AfterStep(Root,Last); - } - } - - this->Root(Root); -} - /*}}}*/ -// PkgTree::GetLocs - Returns the location of the 8 dividers /*{{{*/ -// --------------------------------------------------------------------- -/* Locs should be an array of 8 longs. The function will fill the array - with the 8 positions of the vertical lines. Fields is a boolean - array indicating if the field is activated */ -void PkgTree::GetLocs(CombinedGC &GC,Rect Pos,long *Locs,bool *Fields) -{ - if (RegenLocs == false) - { - memcpy(Locs,ColLocs,sizeof(ColLocs)); - memcpy(Fields,ColFields,sizeof(ColFields)); - return; - } - - for (int I = 0; I != 8; I++) - Fields[I] = true; - - // Put a fake end loc for simplicity - Locs[7] = Pos.w - Pos.x + 1; - - // Convert the smaller list from the text widget - if (GC.IsText() == true) - { - // Get column alignment from the columns widget - long Alignment[5] = {1,4,-1,20,40}; - Bar->PixelPositions(Alignment,5); - - // Deal with inactive fields - int J = 3; - for (int I = 1; I != 5; I++) - { - if (Alignment[I] == -1) - { - Fields[I+2] = false; - continue; - } - - Alignment[I] -= Pos.x; - for (;J <= I+2; J++) - Locs[J] = Alignment[I]; - } - for (;J <= 6; J++) - Locs[J] = Pos.w; - Locs[0] = 0; - Locs[1] = 1; - Locs[2] = 2; - } - - // Use the full list from the graphic column widget - if (GC.IsGraphic() == true) - { - // Get column alignment from the columns widget - long Alignment[7] = {4,8,12,16,-1,70,90}; - Bar->PixelPositions(Alignment,7); - - // Deal with inactive fields - int J = 0; - for (int I = 1; I != 7; I++) - { - if (Alignment[I] == -1) - { - Fields[I] = false; - continue; - } - - if (Alignment[I] - 1 >= Pos.w) - break; - Alignment[I] -= 1 + Pos.x; - for (;J <= I; J++) - Locs[J] = Alignment[I]; - } - for (;J <= 6; J++) - Locs[J] = Pos.w; - Locs[0] = -1; - } - - memcpy(ColLocs,Locs,sizeof(ColLocs)); - memcpy(ColFields,Fields,sizeof(ColFields)); - RegenLocs = false; -} - /*}}}*/ -// PkgTree::DeletePkg - Mark the current package for deletion /*{{{*/ -// --------------------------------------------------------------------- -/* This is hooked to the proper menu item */ -bool PkgTree::DeletePkg(Widget *,Notifyer::Tag,void *) -{ - Cache->MarkDelete(CurrentPkg()); - Damage(); - Owner->Sync(); - return true; -} - /*}}}*/ -// PkgTree::KeepPkg - Mark the current package for keep /*{{{*/ -// --------------------------------------------------------------------- -/* This is hooked to the proper menu item */ -bool PkgTree::KeepPkg(Widget *,Notifyer::Tag,void *) -{ - Cache->MarkKeep(CurrentPkg()); - Damage(); - Owner->Sync(); - return true; -} - /*}}}*/ -// PkgTree::InstallPkg - Mark the current package for installation /*{{{*/ -// --------------------------------------------------------------------- -/* This is hooked to the proper menu item */ -bool PkgTree::InstallPkg(Widget *,Notifyer::Tag,void *) -{ - Cache->MarkInstall(CurrentPkg()); - Cache->PromoteAutoKeep(); - - Damage(); - Owner->Sync(); - return true; -} - /*}}}*/ -// PkgTree::CurrentPkg - Return the currently selected package /*{{{*/ -// --------------------------------------------------------------------- -/* This will return the end iterator if no package is selected */ -pkgCache::PkgIterator PkgTree::CurrentPkg() -{ - Tree::Item *Cur = CurrentItem(); - if (Cur == 0) - return pkgCache::PkgIterator(*Cache,0); - - if (Cur->Type() == 100) - return ((Item *)Cur)->Package(*Cache); - if (Cur->Type() == 101) - return ((DepItem *)Cur)->Package(*Cache); - return pkgCache::PkgIterator(*Cache,0); -} - /*}}}*/ -// PkgTree::Key - Handle keyboard events /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool PkgTree::Key(const KeyEvent &Key,Widget *Source) -{ - /* We check for d/k/i keys and handle them as though the user clicked - on the proper button */ - switch (toupper(Key.Key)) - { - case 'D': - DeletePkg(this,Nt_Action,0); - return true; - - case 'K': - KeepPkg(this,Nt_Action,0); - return true; - - case 'I': - InstallPkg(this,Nt_Action,0); - return true; - } - return Tree::Key(Key,Source); -} - /*}}}*/ -// PkgTree::ItemMouse - Generic mouse handler for the items /*{{{*/ -// --------------------------------------------------------------------- -/* This is a generic mouse handler for all of the items. */ -void PkgTree::ItemMouse(Tree::Item *Itm,pkgCache::PkgIterator Pkg, - const MouseEvent &Event,int Spacer) -{ - // Mouse is just moving around with no pressed buttons. - if (Event.IsMotion() == true && Event.IsDrag() == false) - return; - - CurrentItem(Itm); - - // Get the division locations - CombinedGC GC; - long Locs[8]; - bool Fields[8]; - GetLocs(GC,Rect(BorderX,0,Pos.w - 2*BorderX,ItemHeight),Locs,Fields); - - // In the name column - if (Event.Pos.x >= Locs[3] && Event.Pos.x < Locs[4]) - { - // Item isnt expandable - if (Itm->IsExpandable() == false) - return; - - if (Event.IsClick() == false) - return; - - // Check if it is in the +/- inidicator - int Depth = 0; - for (Tree::Item *I = Itm; I != 0; I = I->Parent) - Depth++; - Depth--; - - // Determine the spacing - long Space; - if (GC.IsGraphic() == true) - Space = Spacer; - else - Space = 1; - - // Is it in the +/- region? - if ((Locs[3] + Space*Depth) <= Event.Pos.x && - (Locs[3] + Space*(Depth + 1)) > Event.Pos.x) - { - if (Itm->IsExpanded() == true) - Itm->ContractChildren(this); - else - Itm->ExpandChildren(this); - } - } - - // In the dki column - if (Event.Pos.x < Locs[3] && Pkg.end() == false) - { - if (Event.IsClick() == false) - return; - - // Figure out which one - ExtraCache::StateCache &State = (*Cache)[Pkg]; - int Item = 0; - for (;Event.Pos.x >= Locs[Item]; Item++); - Item--; - - // Toggle the install column (not installed) - if (Pkg->CurrentVer == 0 && Item == 2) - { - if (State.Mode == ExtraCache::ModeInstall) - Cache->MarkKeep(Pkg); - else - { - Cache->MarkInstall(Pkg); - Cache->PromoteAutoKeep(); - } - Damage(); - Owner->Sync(); - } - - // Toggle the delete column (installed, no upgrade) - if (State.Upgradable() == false && Item == 0) - { - if (State.Mode == ExtraCache::ModeDelete) - Cache->MarkKeep(Pkg); - else - Cache->MarkDelete(Pkg); - Damage(); - Owner->Sync(); - } - - // Any of the three states - if (Pkg->CurrentVer != 0 && State.Upgradable() == true) - { - if (Item == 0) - Cache->MarkDelete(Pkg); - if (Item == 1) - Cache->MarkKeep(Pkg); - if (Item == 2) - { - Cache->MarkInstall(Pkg); - Cache->PromoteAutoKeep(); - } - - Damage(); - Owner->Sync(); - } - } -} - /*}}}*/ - diff --git a/apt/gui/pkgtree.h b/apt/gui/pkgtree.h deleted file mode 100644 index dd19e3f..0000000 --- a/apt/gui/pkgtree.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: pkgtree.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - PkgTree - A tree class for displaying packages - - The package tree class handles the various item classes and provides - them with some utility functions. It also handles all of the user - interaction for the item classes. - - To speed up the rendering we cache the location data from the column - bar, it is regenerated each time the Tree's render function is called. - - ##################################################################### */ - /*}}}*/ -#ifndef PKGTREE_H -#define PKGTREE_H - -#include <deity/tree.h> -#include <apt-pkg/pkgcache.h> - -class ColumnBar; -class ExtraCache; -class PackageView; - -class PkgTree : public Tree -{ - protected: - - // Various internal items - class Item; - class DepItem; - class SecItem; - class Drawer; - friend Drawer; - friend Item; - friend DepItem; - friend SecItem; - - // Usefull lists - ExtraCache *Cache; - ColumnBar *Bar; - PackageView *Owner; - - // Draw Cache - long ColLocs[8]; - bool ColFields[8]; - bool RegenLocs; - - virtual void Render(CombinedGC &GC) {RegenLocs = true; Tree::Render(GC);} - virtual bool Key(const KeyEvent &Key,Widget *Source); - virtual void ItemMouse(Tree::Item *I,pkgCache::PkgIterator P, - const MouseEvent &Event,int Spacer); - - // Helper functions - void GetLocs(CombinedGC &GC,Rect Pos,long *Locs,bool *Fields); - - public: - - // Populates the tree - void MakeList(ExtraCache *Cache); - - // User actions - bool DeletePkg(Widget *,Notifyer::Tag,void *); - bool KeepPkg(Widget *,Notifyer::Tag,void *); - bool InstallPkg(Widget *,Notifyer::Tag,void *); - - // Accessors - pkgCache::PkgIterator CurrentPkg(); - - PkgTree(PackageView *Owner,ColumnBar *Bar, Widget *Parent = 0); -}; - -#endif diff --git a/apt/gui/pkgtreeitem.cc b/apt/gui/pkgtreeitem.cc deleted file mode 100644 index b6b07d7..0000000 --- a/apt/gui/pkgtreeitem.cc +++ /dev/null @@ -1,731 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: pkgtreeitem.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - PkgTree Items - Tree::Item classes for displaying items in the package - tree - - This class renders each package item directly from the actual storage - for the package item. This simplifies the managment of the tree as - stringified versions of package items don't have to be constantly - resynced with the tree. - - Two sorted lists of package pointers are kept, one is sorted by package - name the other is sorted by section then by package name. This allows - the display to be inorder. - - ##################################################################### */ - /*}}}*/ -// Include files /*{{{*/ -#include "pkgtreeitem.h" -#include "policy.h" - -#include <deity/xpm.h> - /*}}}*/ -// Images /*{{{*/ -#include "minus.xpm" -#include "plus.xpm" -#include "package.xpm" -#include "section.xpm" -#include "upgrade.xpm" -#include "downgrade.xpm" -#include "checkon.xpm" -#include "checkoff.xpm" -#include "radioon.xpm" -#include "radiooff.xpm" -#include "conflicts.xpm" -#include "depends.xpm" -#include "suggests.xpm" -#include "recommends.xpm" -static XPMImage MinusImg(minus_xpm); -static XPMImage PlusImg(plus_xpm); -static XPMImage PackageImg(package_xpm); -static XPMImage SectionImg(section_xpm); -static XPMImage UpgradeImg(upgrade_xpm); -static XPMImage DowngradeImg(downgrade_xpm); -static XPMImage CheckOnImg(checkon_xpm); -static XPMImage CheckOffImg(checkoff_xpm); -static XPMImage RadioOnImg(radioon_xpm); -static XPMImage RadioOffImg(radiooff_xpm); -static XPMImage ConflictsImg(conflicts_xpm); -static XPMImage DependsImg(depends_xpm); -static XPMImage SuggestsImg(suggests_xpm); -static XPMImage RecommendsImg(recommends_xpm); - /*}}}*/ - -// Drawer::Init - Constructor helper /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::Drawer::Init() -{ - // Determine the spacing unit - if (GC.IsGraphic() == true) - Space = PlusImg.Dim().x; - else - Space = 1; - - // Column layout - ((PkgTree *)Owner)->GetLocs(GC,Pos,Locs,Fields); - - // Color selection - Selected = Item->IsFlag(Tree::Item::Selected); - Item->SetColors(GC,Owner,GC.IsText() == true && Selected == true); -} - /*}}}*/ -// Drawer::RenderCheck - Render a single checkbox in the list /*{{{*/ -// --------------------------------------------------------------------- -/* This renders one checkbox out of the 3 possible columns in the list. */ -void PkgTree::Drawer::RenderCheck(bool D,bool K,bool I,bool State) -{ - int Loc = Delete; - - // Background fill the unused entries - if (D == true) - Loc = Delete; - else - GC->BFill(AbsRect(Locs[Delete],0,Locs[Delete + 1],Height)); - - if (I == true) - Loc = Install; - else - GC->BFill(AbsRect(Locs[Install],0,Locs[Install + 1],Height)); - - if (K == true) - Loc = Keep; - else - GC->BFill(AbsRect(Locs[Keep],0,Locs[Keep+1],Height)); - - // Render the check box - if (State == true) - GC.gGC->DrawBitmap(AbsRect(Locs[Loc],0,Locs[Loc+1],Height),CheckOnImg, - GenGC::YCenter | GenGC::XCenter); - else - GC.gGC->DrawBitmap(AbsRect(Locs[Loc],0,Locs[Loc+1],Height),CheckOffImg, - GenGC::YCenter | GenGC::XCenter); -} - /*}}}*/ -// Drawer::DrawState - Draw the 3 state indicators /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::Drawer::DrawState() -{ - Rect Pos = AbsRect(Locs[0],0,Locs[3],Height); - - // Purely virtual pacakge - if (Pkg->VersionList == 0) - { - BFill(AllStates); - return; - } - - // Render the 3 state indicators - if (GC.IsGraphic() == true) - { - // Render only the Install checkbox (not installed) - if (Pkg->CurrentVer == 0) - RenderCheck(false,false,true,State->Mode == 2); - - // Render only the remove checkbox (installed, no upgrade) - if (State->Upgradable() == false) - RenderCheck(true,false,false,State->Mode == 0); - - // Render all three as radio buttons, installed and upgradeable - if (Pkg->CurrentVer != 0 && State->Upgradable() == true) - { - for (int I = 0; I != 3; I++) - { - if (State->Mode == I) - GC.gGC->DrawBitmap(AbsRect(Locs[I],0,Locs[I+1],Pos.h), - RadioOnImg,GenGC::YCenter | GenGC::XCenter); - else - GC.gGC->DrawBitmap(AbsRect(Locs[I],0,Locs[I+1],Pos.h), - RadioOffImg,GenGC::YCenter | GenGC::XCenter); - } - } - } - else - { - char S[4] = {'-','-','-',0}; - S[State->Mode] = '*'; - - if (Pkg->CurrentVer == 0 || State->Upgradable() == false) - S[1] = ' '; - - // Render only the install checkbox (not installed) - if (Pkg->CurrentVer == 0) - S[0] = ' '; - - // Render only the remove checkbox (installed, no upgrade) - if (State->Upgradable() == false) - S[2] = ' '; - - GC->DrawString(Point(0,0),S); - } -} - /*}}}*/ -// Drawer::DrawName - Draw the Name feild /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::Drawer::DrawName(const char *Text,XPMImage &Image, - Color Clr) -{ - if (Fields[Name] == false) - return; - - if (Text == 0) - Text = Pkg.Name(); - - // Determine if there are any children that are expandable - bool Expandy = false; - if (Item->Parent != 0) - { - for (Tree::Item *I = Item->Parent->Child; I != 0; I = I->Next) - { - if (I->IsExpandable() == true) - { - Expandy = true; - break; - } - } - } - else - Expandy = true; - - // Draw the tree lines - AbsRect TextBox(Locs[Name],0,Locs[Name+1],Height); - long Width = Locs[Name+1] - Locs[Name]; - if (GC.IsGraphic() == true) - { - GC->SetColor(Wc_LightGray); - Item->DrawLines(GC,Space,Depth,AbsRect(Locs[Name],0,Width,Height)); - - // Draw the item graphic - TextBox.x1 = Locs[Name] + Space*Depth; - if (Expandy == true) - { - if (Item->IsExpandable() == true) - { - if (Item->IsFlag(Tree::Item::Expanded) == true) - GC.gGC->DrawBitmap(Rect(TextBox.x1,0,PlusImg.Dim().x,Height), - MinusImg,GenGC::YCenter | GenGC::XCenter); - else - GC.gGC->DrawBitmap(Rect(TextBox.x1,0,PlusImg.Dim().x,Height), - PlusImg,GenGC::YCenter); - } - else - { - GC.gGC->BFill(Rect(TextBox.x1,0,PlusImg.Dim().x,Height)); - GC.gGC->Line(Point(TextBox.x1,Height/2),Point(TextBox.x1+PlusImg.Dim().x,Height/2)); - } - - TextBox.x1 += PlusImg.Dim().x; - } - - GC.gGC->DrawBitmap(Rect(TextBox.x1,0,Image.Dim().x,Height), - Image,GenGC::YCenter | GenGC::XCenter); - TextBox.x1 += Image.Dim().x; - } - else - { - Item->DrawLines(GC,1,Depth,AbsRect(Locs[Name],0,Width,Height)); - - // Indent the text region and remove 1 space from the end - TextBox.x1 += Depth; - TextBox.x2--; - - if (Expandy == true) - { - if (Item->IsExpandable() == true) - { - if (Item->IsFlag(Tree::Item::Expanded) == true) - GC->DrawString(TextBox,"-"); - else - GC->DrawString(TextBox,"+"); - } - else - GC.tGC->DrawLineChar(Point(TextBox.x1,TextBox.y1), - TextGC::HLineChar); - TextBox.x1++; - } - - GC->BFill(Rect(TextBox.x2,0,1,Height)); - } - - if (GC.IsGraphic() == true) - Item->SetColors(GC,Owner,Selected,Clr); - - if (GC.IsText() == true && Clr != Wc_None) - GC->SetColor(Clr); - - GC->DrawString(TextBox,Point(Space/3,Height/2),Text,GenGC::YCenter); - - if (GC.IsGraphic() == true && Selected == true) - Item->SetColors(GC,Owner,false); - - if (GC.IsText() == true && Clr != Wc_None) - Item->SetColors(GC,Owner,Selected); -} - /*}}}*/ -// Drawer::DrawCurrentVersion - Draw the current version /*{{{*/ -// --------------------------------------------------------------------- -/* Draw the current version field */ -void PkgTree::Drawer::DrawCurrentVersion() -{ - if (Fields[CurrentVer] == false) - return; - - // Draw the current version field - AbsRect TextBox = AbsRect(Locs[CurrentVer],0,Locs[CurrentVer+1],Height); - if (Pkg->CurrentVer != 0) - { - // Check if the package has an error with its current version - if ((State->DepState & ExtraCache::DepNowMin) != ExtraCache::DepNowMin) - { - if (Selected == true && GC.IsText() == true) - GC->SetColor(Color(239,44,40,Color::Brown)); - else - GC->SetColor(Color(239,44,40,Color::BrightRed)); - } - - GC->DrawString(TextBox,Point(Space/3,Height/2),State->CurVersion, - GenGC::YCenter); - - // Set the colouring back - if ((State->DepState & ExtraCache::DepNowMin) != ExtraCache::DepNowMin) - Item->SetColors(GC,Owner,GC.IsText() == true && Selected == true); - } - else - GC->BFill(TextBox); -} - /*}}}*/ -// Drawer::DrawCandidateVersion - Draw the candidate version /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::Drawer::DrawCandidateVersion() -{ - if (Fields[CandidateVer] == false) - return; - - /* Draw the Install Version. The version is only drawn if something is going - to happen to the package */ - AbsRect TextBox = AbsRect(Locs[CandidateVer],0,Locs[CandidateVer+1],Height); - - // We have to draw a status icon.. - if (State->Status != 0) - { - // In graphic mode - if (GC.IsGraphic() == true) - { - // Draw the upgrade image, downgrade image or a blank - TextBox.x2 = TextBox.x1 + UpgradeImg.Dim().x; - if (State->Status == -1) - GC.gGC->DrawBitmap(TextBox,Point(0,Height/2), - DowngradeImg,GenGC::YCenter); - if (State->Status == 1) - GC.gGC->DrawBitmap(TextBox,Point(0,Height/2), - UpgradeImg,GenGC::YCenter); - - if (State->Status != -1 && State->Status != 1) - GC->BFill(TextBox); - } - else - { - // Perform the image lookup in a table for text mode.. - TextBox.x2 = TextBox.x1 + Space; - char *StatusChar[] = {"v","=","^"," "}; - GC->DrawString(TextBox,StatusChar[State->Status + 1], - GenGC::YCenter | GenGC::XCenter); - } - - // Redner the version text - TextBox.x1 = TextBox.x2; - TextBox.x2 = Locs[CandidateVer+1]; - - GC->DrawString(TextBox,Point(Space/3,Height/2),State->CandVersion, - GenGC::YCenter); - } - else - { - // Just fill. - TextBox.x2 = Locs[CandidateVer+1]; - GC->BFill(TextBox); - } -} - /*}}}*/ -// Drawer::DrawAsWell - Draw the Install as well field /*{{{*/ -// --------------------------------------------------------------------- -/* The install as well field has a number of special requirements to make - it work properly these are all handled by the extra cache dep generator. */ -void PkgTree::Drawer::DrawAsWell() -{ - if (Fields[InstAsWell] == false) - return; - - AbsRect Pos(Locs[InstAsWell],0,Locs[InstAsWell + 1],Height); - - if (State->CandidateVer == 0) - { - GC->BFill(Pos); - return; - } - - // Run over the deps of the candidate version - pkgCache::DepIterator Dep = State->CandidateVerIter(Cache).DependsList(); - long Space = GC->ExtentText(" ").w; - for (; Dep.end() != true;) - { - pkgCache::DepIterator Start = Dep; - bool Result = true; - for (bool LastOR = true; Dep.end() == false && LastOR == true; Dep++) - { - LastOR = (Dep->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; - - // Figure out some of the flags - unsigned char DepState = Cache[Dep]; - ExtraCache::StateCache &Parent = Cache[Dep.TargetPkg()]; - bool Auto = (Parent.Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto; - bool Current = (DepState & ExtraCache::DepNow) == - ExtraCache::DepNow; - bool Install = (DepState & ExtraCache::DepInstall) == - ExtraCache::DepInstall; - - /* The currently installed version and target install version are - both okay, there is no need to show the dep */ - if (Current == true && Install == true) - Result = false; - - /* The install version is okay and the target package is not in auto - mode */ - if (Install == true && Auto == false) - Result = false; - } - - // Dep is satisfied okay. - if (Result == false) - continue; - - /* Now, decide if we should show user deps (suggest/rec). This is done by - checking if the package was installed, if so then user deps are - ignored otherwise they are shown. */ - if (Policy::Cur->IsImportantDep(Start) == false) - continue; - if (Pkg->CurrentVer != 0 && Start.IsCritical() == false) - continue; - - // Ah, now we show the dep. - const char *Name = Start.TargetPkg().Name(); - Rect Size = GC->ExtentText(Name); - Size.w += Space; - GC->DrawString(Rect(Pos.x1,Pos.y1,Size.w,Pos.y2 - Pos.y1), - Point(Space,(Pos.y2 - Pos.y1)/2),Name,GenGC::YCenter); - Pos.x1 += Size.w; - - if (Pos.x1 >= Pos.x2) - return; - } - GC->BFill(Pos); -} - /*}}}*/ -// Drawer::BFill - Fills one of the sections /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::Drawer::BFill(unsigned int Region) -{ - if (Region == AllStates) - GC->BFill(AbsRect(Locs[0],0,Locs[3],Height)); - else - GC->BFill(AbsRect(Locs[Region],0,Locs[Region+1],Height)); -} - /*}}}*/ - -// Item::Item - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -PkgTree::Item::Item(pkgCache::Package *Pkg,PkgTree *Owner,Tree::Item *Parent) : - Tree::Item(Parent), Pkg(Pkg) -{ - pkgCache::PkgIterator Pkg(*Owner->Cache,this->Pkg); - ExtraCache::StateCache &State = (*Owner->Cache)[Pkg]; - - // Pick a version iterator - if (State.CandidateVer == 0) - return; - pkgCache::VerIterator Ver = State.CandidateVerIter(*Owner->Cache); - - if (Ver->DependsList != 0) - Flag(Expandable); -} - /*}}}*/ -// Item::Render - Draw the item /*{{{*/ -// --------------------------------------------------------------------- -/* This does the complex redering of each package item, including all the - columns and the images that are required. */ -void PkgTree::Item::Render(CombinedGC &GC,unsigned long Depth,Rect Pos, - Tree *Owner) -{ - GC->AddClipping(Pos); - - Drawer Draw(GC,Depth,Pos,Owner,Pkg,this); - - // Check if the packages install state is broken, draw in red. - pkgCache::PkgIterator P(Draw,Pkg); - if ((Draw.GetCache()[P].DepState & ExtraCache::DepInstMin) != - ExtraCache::DepInstMin) - { - if (Draw.IsSelected() == true && GC.IsText() == true) - Draw.DrawName(0,PackageImg,Color(239,44,40,Color::Brown)); - else - Draw.DrawName(0,PackageImg,Color(239,44,40,Color::BrightRed)); - } - else - Draw.DrawName(0,PackageImg); - - Draw.DrawState(); - Draw.DrawCurrentVersion(); - Draw.DrawCandidateVersion(); - Draw.DrawAsWell(); - - GC->PopClipping(); -} - /*}}}*/ -// Item::Height - Return the Height of the item /*{{{*/ -// --------------------------------------------------------------------- -/* */ -long PkgTree::Item::Height() -{ - if (TextGC::GC != 0) - return GenGC::GC->ExtentText("").h; - else - return GenGC::GC->ExtentText("").h + 2; -} - /*}}}*/ -// Item::Expand - Expand the tree node /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool PkgTree::Item::Expand(Tree *Owner) -{ - PkgTree *Tree = (PkgTree *)Owner; - pkgCache::PkgIterator Pkg(*Tree->Cache,this->Pkg); - ExtraCache::StateCache &State = (*Tree->Cache)[Pkg]; - - // Pick a version iterator - if (State.CandidateVer == 0) - return false; - pkgCache::VerIterator Ver = State.CandidateVerIter(*Tree->Cache); - - // Generate the new child list - Tree::Item *Root = 0; - Tree::Item *Last = 0; - for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) - { - (new DepItem(D,Tree))->AfterStep(Root,Last); - Last->Parent = this; - } - - Child = Root; - return true; -} - /*}}}*/ -// Item::Contract - Collapse the tree node /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::Item::Contract(Tree *) -{ - // Erase all the children - for (Tree::Item *I = Child; I != 0;) - { - Tree::Item *Next = I->Next; - I->Parent = 0; - I->Next = 0; - I->Last = 0; - delete I; - I = Next; - } - Child = 0; -} - /*}}}*/ -// Item::Mouse - Mouse handler /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::Item::Mouse(Tree *Owner,const MouseEvent &Event) -{ - PkgTree &P = *(PkgTree *)Owner; - P.ItemMouse(this,Package(*P.Cache),Event,PlusImg.Dim().x); -} - /*}}}*/ - -// DepItem::DepItem - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -PkgTree::DepItem::DepItem(pkgCache::Dependency *Dep,PkgTree *Owner, - Tree::Item *Parent) : Tree::Item(Parent), Dep(Dep) -{ - // Check if the provide list only has one item - pkgCache::DepIterator D(*Owner->Cache,Dep); - pkgCache::PkgIterator P(*Owner->Cache); - if (D.SmartTargetPkg(P) == true) - Flag(Expandable); -} - /*}}}*/ -// DepItem::Height - Return the Height of the item /*{{{*/ -// --------------------------------------------------------------------- -/* */ -long PkgTree::DepItem::Height() -{ - if (TextGC::GC != 0) - return GenGC::GC->ExtentText("").h; - else - return GenGC::GC->ExtentText("").h + 2; -} - /*}}}*/ -// DepItem::Expand - Expand the tree node /*{{{*/ -// --------------------------------------------------------------------- -/* This iterates over all the packages providing this name. If a package - exists already with this name then it is shown as the parent. */ -bool PkgTree::DepItem::Expand(Tree *Owner) -{ - PkgTree *Tree = (PkgTree *)Owner; - pkgCache::DepIterator D(*Tree->Cache,Dep); - pkgCache::PrvIterator Prv = D.TargetPkg().ProvidesList(); - - // Generate the new child list - Tree::Item *Root = 0; - Tree::Item *Last = 0; - for (; Prv.end() == false; Prv++) - { - // Check if this provides is duplicated in the list. - pkgCache::PrvIterator DupCheck = Prv; - for (DupCheck++;DupCheck.end() == false && DupCheck.OwnerPkg() != Prv.OwnerPkg(); - DupCheck++); - if (DupCheck.end() == false) - continue; - - // Create the new item and add it to the end of the child list. - (new PkgTree::Item(Prv.OwnerPkg(),Tree))->AfterStep(Root,Last); - Last->Parent = this; - Last->Flag(0,Expandable); - } - - Child = Root; - return true; -} - /*}}}*/ -// DepItem::Render - Draw the item /*{{{*/ -// --------------------------------------------------------------------- -/* This does the complex redering of each package item, including all the - columns and the images that are required. */ -void PkgTree::DepItem::Render(CombinedGC &GC,unsigned long Depth,Rect Pos, - Tree *Owner) -{ - GC->AddClipping(Pos); - - Drawer Draw(GC,Depth,Pos,Owner,this); - pkgCache::DepIterator Dep(Draw,this->Dep); - - // Smart locate the target package - pkgCache::PkgIterator TargetPkg(Draw); - Dep.SmartTargetPkg(TargetPkg); - Draw.SetPkg(TargetPkg); - - // Determine if the item should be drawn in red (firebrick2 to be exact) - Color Clr = Wc_None; - pkgCache::DepIterator D = Dep; - for (;(D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; D++); - if ((Draw.GetCache()[D] & ExtraCache::DepGInstall) == 0) - { - if (Draw.IsSelected() == true && GC.IsText() == true) - Clr = Color(239,44,40,Color::Brown); - else - Clr = Color(239,44,40,Color::BrightRed); - } - - // Draw the name with the proper image - switch (Dep->Type) - { - case pkgCache::Dep::PreDepends: - case pkgCache::Dep::Depends: - Draw.DrawName(0,DependsImg,Clr); - break; - - case pkgCache::Dep::Suggests: - Draw.DrawName(0,SuggestsImg,Clr); - break; - - case pkgCache::Dep::Recommends: - Draw.DrawName(0,RecommendsImg,Clr); - break; - - case pkgCache::Dep::Conflicts: - Draw.DrawName(0,ConflictsImg,Clr); - break; - - default: - Draw.DrawName(0,PackageImg,Clr); - break; - } - - Draw.DrawState(); - Draw.DrawCurrentVersion(); - Draw.DrawCandidateVersion(); - Draw.DrawAsWell(); - - GC->PopClipping(); -} - /*}}}*/ -// DepItem::Mouse - Mouse handler /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::DepItem::Mouse(Tree *Owner,const MouseEvent &Event) -{ - PkgTree &P = *(PkgTree *)Owner; - P.ItemMouse(this,Package(*P.Cache),Event,PlusImg.Dim().x); -} - /*}}}*/ - -// SecItem::SecItem - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -PkgTree::SecItem::SecItem(const char *Sec,Tree::Item *Parent) : - Tree::Item(Parent), Section(Sec) -{ -} - /*}}}*/ -// SecItem::Render - Draw the item /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::SecItem::Render(CombinedGC &GC,unsigned long Depth, - Rect Pos,Tree *Owner) -{ - GC->AddClipping(Pos); - - Drawer Draw(GC,Depth,Pos,Owner,this); - Draw.DrawName(Section,SectionImg); - Draw.BFill(Drawer::AllStates); - Draw.BFill(Drawer::CurrentVer); - Draw.BFill(Drawer::CandidateVer); - Draw.BFill(Drawer::InstAsWell); - - GC->PopClipping(); -} - /*}}}*/ -// SecItem::Height - Return the Height of the item /*{{{*/ -// --------------------------------------------------------------------- -/* */ -long PkgTree::SecItem::Height() -{ - if (TextGC::GC != 0) - return GenGC::GC->ExtentText("").h; - else - return GenGC::GC->ExtentText("").h + 2; -} - /*}}}*/ -// SecItem::Mouse - Mouse handler /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void PkgTree::SecItem::Mouse(Tree *Owner,const MouseEvent &Event) -{ - PkgTree &P = *(PkgTree *)Owner; - P.ItemMouse(this,pkgCache::PkgIterator(*P.Cache,0),Event,PlusImg.Dim().x); -} - /*}}}*/ diff --git a/apt/gui/pkgtreeitem.h b/apt/gui/pkgtreeitem.h deleted file mode 100644 index ccc76e0..0000000 --- a/apt/gui/pkgtreeitem.h +++ /dev/null @@ -1,147 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: pkgtreeitem.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - PkgTree Items - Tree::Item classes for displaying items in the package - tree - - Each of these classes handles a different sort of item. All of them - display directly from the ExtraCache structure and store minimal - internal data making them cheap to instantiate. - - The drawer class contains functions to help draw the items as well - as a collection of variables determined for each item to help the - render process. - - ##################################################################### */ - /*}}}*/ -#ifndef PKGTREEITEM_H -#define PKGTREEITEM_H - -#include "pkgtree.h" -#include "extracache.h" - -class PkgTree::Item : public Tree::Item -{ - protected: - - pkgCache::Package *Pkg; - - // Base class members - virtual void Render(CombinedGC &GC,unsigned long Depth, - Rect Pos,Tree *Owner); - virtual long Height(); - virtual bool Expand(Tree *Owner); - virtual void Contract(Tree *Owner); - virtual void Mouse(Tree *Owner,const MouseEvent &Event); - - public: - - pkgCache::PkgIterator Package(pkgCache &Cache) {return pkgCache::PkgIterator(Cache,Pkg);}; - - virtual unsigned int Type() {return 100;}; - Item(pkgCache::Package *Pkg,PkgTree *Owner,Tree::Item *Parent = 0); -}; - -class PkgTree::DepItem : public Tree::Item -{ - protected: - - pkgCache::Dependency *Dep; - - // Base class members - virtual void Render(CombinedGC &GC,unsigned long Depth, - Rect Pos,Tree *Owner); - virtual bool Expand(Tree *Owner); - virtual long Height(); - virtual void Mouse(Tree *Owner,const MouseEvent &Event); - - public: - - pkgCache::PkgIterator Package(pkgCache &Cache) {return pkgCache::DepIterator(Cache,Dep).TargetPkg();}; - virtual unsigned int Type() {return 101;}; - - DepItem(pkgCache::Dependency *Dep,PkgTree *Owner,Tree::Item *Parent = 0); -}; - -class PkgTree::SecItem : public Tree::Item -{ - protected: - - const char *Section; - - virtual void Render(CombinedGC &GC,unsigned long Depth,Rect Pos,Tree *Owner); - virtual long Height(); - virtual void Mouse(Tree *Owner,const MouseEvent &Event); - - public: - - SecItem(const char *Section,Tree::Item *Parent = 0); -}; - -class PkgTree::Drawer -{ - CombinedGC &GC; - ExtraCache &Cache; - pkgCache::PkgIterator Pkg; - ExtraCache::StateCache *State; - int Height; - unsigned long Depth; - Tree *Owner; - Tree::Item *Item; - Rect Pos; - bool Selected; - - long Locs[8]; - bool Fields[8]; - int Space; - - void RenderCheck(bool D,bool K,bool I,bool State); - void Init(); - - public: - - // Locations of each region in the locs array - enum Regions {AllStates = 10,Delete = 0,Keep = 1,Install = 2,Name = 3, - CurrentVer = 4,CandidateVer = 5,InstAsWell = 6}; - - // Some usefull accessors - operator pkgCache &() {return Cache;}; - ExtraCache &GetCache() {return Cache;}; - inline bool IsSelected() {return Selected;}; - - void SetPkg(pkgCache::PkgIterator const &P) - { - Pkg = P; - State = &Cache[P]; - }; - - // Drawing functions - void DrawAsWell(); - void DrawState(); - void DrawCurrentVersion(); - void DrawCandidateVersion(); - void DrawName(const char *Name,XPMImage &Image,Color TextClr = Wc_None); - void BFill(unsigned int Region); - - Drawer(CombinedGC &GC,unsigned long Depth,Rect Pos,Tree *Owner, - Tree::Item *Item) : - GC(GC), Cache(*((PkgTree *)Owner)->Cache), Pkg(Cache), - State(0), Height(Pos.h), Depth(Depth), - Owner(Owner), Item(Item), Pos(Pos) - { - Init(); - } - - Drawer(CombinedGC &GC,unsigned long Depth,Rect Pos,Tree *Owner, - pkgCache::Package *PkgP,Tree::Item *Item) : - GC(GC), Cache(*((PkgTree *)Owner)->Cache), Pkg(Cache,PkgP), - State(&Cache[Pkg]), Height(Pos.h), Depth(Depth), - Owner(Owner), Item(Item), Pos(Pos) - { - Init(); - } -}; - -#endif diff --git a/apt/gui/plus.xpm b/apt/gui/plus.xpm deleted file mode 100644 index 57901cb..0000000 --- a/apt/gui/plus.xpm +++ /dev/null @@ -1,90 +0,0 @@ -/* XPM */ -static char * plus_xpm[] = { -"16 16 71 1", -" c #FFFFFFFFFFFF s Background", -". c #D1D1D1", -"+ c #5D5D5D", -"@ c #181818", -"# c #000000", -"$ c #171717", -"% c #595959", -"& c #CDCDCD", -"* c #A3A3A3", -"= c #272727", -"- c #919191", -"; c #D4D4D4", -"> c #EBEBEB", -", c #CACACA", -"' c #818181", -") c #202020", -"! c #989898", -"~ c #F3F3F3", -"{ c #F4F4F4", -"] c #757575", -"^ c #E9E9E9", -"/ c #DADADA", -"( c #C5C5C5", -"_ c #1C1C1C", -": c #C9C9C9", -"< c #5E5E5E", -"[ c #949494", -"} c #F6F6F6", -"| c #FBFBFB", -"1 c #343434", -"2 c #EDEDED", -"3 c #696969", -"4 c #4C4C4C", -"5 c #191919", -"6 c #E3E3E3", -"7 c #1D1D1D", -"8 c #444444", -"9 c #BFBFBF", -"0 c #959595", -"a c #121212", -"b c #EEEEEE", -"c c #161616", -"d c #101010", -"e c #B8B8B8", -"f c #9F9F9F", -"g c #F1F1F1", -"h c #C3C3C3", -"i c #AAAAAA", -"j c #858585", -"k c #5B5B5B", -"l c #868686", -"m c #E2E2E2", -"n c #C6C6C6", -"o c #B3B3B3", -"p c #555555", -"q c #464646", -"r c #CECECE", -"s c #222222", -"t c #D2D2D2", -"u c #CFCFCF", -"v c #CBCBCB", -"w c #B4B4B4", -"x c #151515", -"y c #9B9B9B", -"z c #747474", -"A c #A6A6A6", -"B c #B1B1B1", -"C c #8C8C8C", -"D c #525252", -"E c #131313", -"F c #4A4A4A", -" ", -" ", -" .+@#$%& ", -" *=-;>,')! ", -" .=~{]%^/(_: ", -" <[}|%12/(34 ", -" 56%%171890a ", -" #b%1cd78ef# ", -" @.2g1=/hija ", -" klm688nofpq ", -" rstuvhw*[xh ", -" y)zAB[kxC ", -" vDE#aFh ", -" ", -" ", -" "}; diff --git a/apt/gui/policy.cc b/apt/gui/policy.cc deleted file mode 100644 index 6656345..0000000 --- a/apt/gui/policy.cc +++ /dev/null @@ -1,136 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: policy.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - Policy - Contains a number of configurable algorithms designed to - effect the way things work. - - The policy class allows user control of some important policy choices - and algorithms. Other classes use this class to determine how to - make choices. - - ##################################################################### */ - /*}}}*/ -// Include Files /*{{{*/ -#include "policy.h" -#include "extracache.h" - /*}}}*/ - -Policy *Policy::Cur = new Policy; - -// Policy::Policy - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -Policy::Policy() -{ - Displayable.InProfile = false; - Displayable.Installed = true; - Displayable.ToUpgrade = false; - Displayable.ToDowngrade = false; - Displayable.HeldUpDn = false; - Displayable.New = false; - Displayable.Obsolete = false; - Displayable.NotInstalled = false; - Displayable.Broken = false; - Displayable.All = false; - - Columns.CurVersion = false; - Columns.InstVersion = true; - Columns.InstAsWell = true; - - ImportantDeps.Suggests = true; - ImportantDeps.Recommends = false; - - ShowSections = true; -} - /*}}}*/ -// Policy::GetCandidateVersion - Determine the candidate install ver /*{{{*/ -// --------------------------------------------------------------------- -/* This decides what version to offer for installation based on - user preferences. It is used to generate the extra cache which will - cache the result of this function. */ -pkgCache::VerIterator Policy::GetCandidateVer(pkgCache::PkgIterator Pkg) -{ - // Try to use an explicit target - if (Pkg->TargetVer == 0) - return Pkg.VersionList(); - else - return Pkg.TargetVer(); -} - /*}}}*/ -// Policy::ShouldDisplay - Determine if a package meets the policy /*{{{*/ -// --------------------------------------------------------------------- -/* We just run through all the items on the displayable list.. The - extra cache is used to speed this up. */ -bool Policy::ShouldDisplay(ExtraCache &Cache,pkgCache::PkgIterator Pkg) -{ - /* Packages without versions are not shown ever, these are probably - virtual package place holders or some other evilness */ - if (Pkg->VersionList == 0) - return false; - - // All Packages - if (Displayable.All == true) - return true; - - // Packages with an installed version - if (Displayable.Installed == true && Pkg->CurrentVer != 0) - return true; - - // Packages not installed - if (Displayable.NotInstalled == true && Pkg->CurrentVer == 0) - return true; - - // Already Cached info about the package - ExtraCache::StateCache &State = Cache[Pkg]; - - // Held upgrade/downgrade - if (Displayable.HeldUpDn == true && Pkg->CurrentVer != 0 && - State.Held() == true) - return true; - - // Broken - if (Displayable.Broken == true && - (State.DepState & ExtraCache::DepInstMin) == 0) - return true; - - // Target version is newer - if (Displayable.ToUpgrade == true && State.Upgrade() == true) - return true; - - // Cant downgrade a not installed package - if (Pkg->CurrentVer == 0) - return false; - - // Target version is older or delete is selected - if (Displayable.ToDowngrade == true && (State.Downgrade() == true || - State.Delete() == true)) - return true; - - return false; -} - /*}}}*/ -// Policy::IsImportantDep - Returns true if the dependency is important /*{{{*/ -// --------------------------------------------------------------------- -/* This is used to control what dependencies are important. An important - dependency is one that should be automatically installed but is not - critical for the package. The other type of dependency is a critical - dependency that must be present for the package to be installable. */ -bool Policy::IsImportantDep(pkgCache::DepIterator Dep) -{ - // Basic important dependencies - if (Dep.IsCritical() == true) - return true; - - // User control for suggests being important - if (ImportantDeps.Suggests == true && Dep->Type == pkgCache::Dep::Suggests) - return true; - - // User control for Recommends being important - if (ImportantDeps.Recommends == true && Dep->Type == pkgCache::Dep::Recommends) - return true; - - return false; -} - /*}}}*/ diff --git a/apt/gui/policy.h b/apt/gui/policy.h deleted file mode 100644 index 2014943..0000000 --- a/apt/gui/policy.h +++ /dev/null @@ -1,83 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: policy.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - Policy - Contains a number of configurable algorithms designed to - effect the way things work. - - Upgrade Policy - This controls the selection of packages for - 'Inst-Version'. - List Policy - Controls wheather a package is currently displayed - in the tree. - Column Policy - Controls wheather a column is displayed in the tree - - Terms: - Candidate Version - Version which is offered for install to the user. - This shows up as the Install-Version on the tree. - Install Version - Version that is actually going to be installed - This is the canidate version, current version or - none (remove). - Current Version - Version that is installed in the system right now. - Displayable - Meets the users profile/filter requirements - - This may end up being derived from a pkgPolicy class so alogrithms - in pkglib can use a similar scheme.. - - ##################################################################### */ - /*}}}*/ -#ifndef POLICY_H -#define POLICY_H - -#include <apt-pkg/pkgcache.h> - -class ExtraCache; -class Policy -{ - public: - - // Which packages to display - struct - { - bool InProfile; - bool Installed; - bool ToUpgrade; - bool ToDowngrade; - bool HeldUpDn; - bool New; - bool Obsolete; - bool NotInstalled; - bool Broken; - bool All; - } Displayable; - - // Which columns to display - struct ColumnsT - { - bool CurVersion; - bool InstVersion; - bool InstAsWell; - } Columns; - - struct - { - bool Suggests; - bool Recommends; - } ImportantDeps; - - bool ShowSections; - - // Single global instance of the policy class - static Policy *Cur; - - // Find the Install Candidate Version of a package - pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator Pkg); - - // See if the Pkg meets the display policy - bool ShouldDisplay(ExtraCache &Cache,pkgCache::PkgIterator Pkg); - bool IsImportantDep(pkgCache::DepIterator Dep); - - Policy(); -}; - -#endif diff --git a/apt/gui/progressmeter.cc b/apt/gui/progressmeter.cc deleted file mode 100644 index 6da0164..0000000 --- a/apt/gui/progressmeter.cc +++ /dev/null @@ -1,133 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: progressmeter.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - Progress Meter - Graphical progress meter from the package library's - progress meter class - - This is split into two halfs, one is a meter dialog window the - other is an interfacing module for the libapt-pkg progress class. - It was designed to either run from a thread or directly within the - main task. - - ##################################################################### */ - /*}}}*/ -// Include /*{{{*/ -#include "progressmeter.h" -#include <deity/utils.h> -#include <deity/widget-thread.h> - /*}}}*/ - -// ProgressWindow::ProgressWindow - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ProgressWindow::ProgressWindow(string Title,Widget *Parent) : - GUIWindow(Title,Parent) -{ - Meter = new Progress(this); - Operation = new TextWidget(this); - SubOp = new TextWidget(this); - Divider = new Separator(this); - - Operation->Text("Initializing..."); - } - /*}}}*/ -// ProgressWindow::~ProgressWindow - Destructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ProgressWindow::~ProgressWindow() -{ - delete Meter; - delete Operation; - delete SubOp; - delete Divider; -} - /*}}}*/ -// ProgressWindow::Realize - Size the window /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void ProgressWindow::Realize() -{ - ExtentFamily(); - if (TextGC::GC != 0) - { - Operation->Resize(Rect(1,0,58,1)); - SubOp->Resize(Rect(1,1,58,1)); - Meter->Resize(Rect(0,3,58,1)); - Divider->Resize(Rect(0,2,58,1)); - Resize(Rect(0,0,60,6)); - - Meter->Foreground(Wc_Magenta); - Meter->BorderWidth(0); - Meter->Background(Wc_Black); - } - - if (GraphicGC::GC != 0) - { - Operation->Font(SimpleFont("helvetica",140,SimpleFont::Bold)); - - unsigned int UnitHeight = SubOp->Size().h; - Resize(Rect(0,0,300,100)); - Operation->Resize(Rect(0.2*UnitHeight,0.6*UnitHeight, - Size().w - UnitHeight,Operation->IdealSize().y)); - SubOp->Resize(Rect(UnitHeight,Operation->Loc().y2 + 0.3*UnitHeight, - Size().w - UnitHeight,SubOp->Size().h)); - Divider->Resize(Rect(0,SubOp->Loc().y2 + 0.5*UnitHeight, - Size().w,Divider->Size().h)); - Meter->Resize(Rect(0.7*UnitHeight,Divider->Loc().y2 + 0.5*UnitHeight, - Size().w - 2*0.7*UnitHeight,Meter->Size().h)); - - Meter->Foreground(Wc_Blue); - Meter->Background(Wc_White); - } - - CenterWidget(this,Rect(0,0,Parent->Pos.w,Parent->Pos.h)); - - GUIWindow::Realize(); -} - /*}}}*/ - -// ProgressMeter::ProgressMeter - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ProgressMeter::ProgressMeter(string Title,Widget *Parent) -{ - Win = new ProgressWindow(Title,Parent); -} - /*}}}*/ -// ProgressMeter::~ProgressMeter - Destructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -ProgressMeter::~ProgressMeter() -{ - delete Win; -} - /*}}}*/ -// ProgressMeter::Update - Update the display /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void ProgressMeter::Update() -{ - if (CheckChange(0.5) == false) - return; - - Widget::Lock Lock; - - Win->SetOp(Op); - Win->SetSubOp(SubOp); - Win->Percent(Percent); -} - /*}}}*/ -// ProgressMeter::Done - Finalize the display /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void ProgressMeter::Done() -{ - Widget::Lock Lock; - - Win->SetOp(Op); - Win->SetSubOp(SubOp); - Win->Percent(Percent); -} - /*}}}*/ diff --git a/apt/gui/progressmeter.h b/apt/gui/progressmeter.h deleted file mode 100644 index dc289d3..0000000 --- a/apt/gui/progressmeter.h +++ /dev/null @@ -1,53 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: progressmeter.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - Progress Meter - Graphical progress meter from the package library's - progress meter class - - ##################################################################### */ - /*}}}*/ -#ifndef PROGRESSMETER_H -#define PROGRESSMETER_H - -#include <apt-pkg/progress.h> -#include <deity/window.h> -#include <deity/progress.h> -#include <deity/textwidg.h> - -class ProgressWindow : public GUIWindow -{ - protected: - - Progress *Meter; - TextWidget *Operation; - TextWidget *SubOp; - Separator *Divider; - - virtual void Realize(); - - public: - - void SetOp(string Op) {Operation->Text(Op);}; - void SetSubOp(string Op) {SubOp->Text(Op);}; - void Percent(double Per) {Meter->Percent(Per);}; - - ProgressWindow(string Title,Widget *Parent); - virtual ~ProgressWindow(); -}; - -class ProgressMeter : public OpProgress -{ - virtual void Update(); - ProgressWindow *Win; - - public: - - virtual void Done(); - - ProgressMeter(string Title,Widget *Parent); - virtual ~ProgressMeter(); -}; - -#endif diff --git a/apt/gui/radiooff.xpm b/apt/gui/radiooff.xpm deleted file mode 100644 index ae692db..0000000 --- a/apt/gui/radiooff.xpm +++ /dev/null @@ -1,62 +0,0 @@ -/* XPM */ -static char * radiooff_xpm[] = { -"16 16 43 1", -" c #FFFFFFFFFFFF", -". c #D4D4D4", -"+ c #636363", -"@ c #1A1A1A", -"# c #000000", -"$ c #A8A8A8", -"% c #292929", -"& c #626262", -"* c #767676", -"= c #8A8A8A", -"- c #A5A5A5", -"; c #6F6F6F", -"> c #2A2A2A", -", c #4F4F4F", -"' c #A0A0A0", -") c #E6E6E6", -"! c #EFEFEF", -"~ c #F5F5F5", -"{ c #FFFFFF", -"] c #BCBCBC", -"^ c #404040", -"/ c #606060", -"( c #979797", -"_ c #EEEEEE", -": c #D8D8D8", -"< c #545454", -"[ c #C6C6C6", -"} c #FDFDFD", -"| c #6B6B6B", -"1 c #D1D1D1", -"2 c #585858", -"3 c #D6D6D6", -"4 c #616161", -"5 c #E9E9E9", -"6 c #353535", -"7 c #ACACAC", -"8 c #F3F3F3", -"9 c #464646", -"0 c #303030", -"a c #CDCDCD", -"b c #FEFEFE", -"c c #DEDEDE", -"d c #484848", -" ", -" ", -" .+@#@+. ", -" $%&*=-;%$ ", -" .>,')!~{]^. ", -" +/(_{{{{{:+ ", -" @<[{{{{{{}@ ", -" #|1{{{{{{{# ", -" @23{{{{{{}@ ", -" +4:{{{{{{5+ ", -" .678{{{{{9. ", -" $0ab{}cd$ ", -" .+@#@+. ", -" ", -" ", -" "}; diff --git a/apt/gui/radioon.xpm b/apt/gui/radioon.xpm deleted file mode 100644 index 7a28d2d..0000000 --- a/apt/gui/radioon.xpm +++ /dev/null @@ -1,64 +0,0 @@ -/* XPM */ -static char * radioon_xpm[] = { -"16 16 45 1", -" c #FFFFFFFFFFFF", -". c #D4D4D4", -"+ c #636363", -"@ c #1A1A1A", -"# c #000000", -"$ c #A8A8A8", -"% c #292929", -"& c #626262", -"* c #767676", -"= c #8A8A8A", -"- c #A5A5A5", -"; c #6F6F6F", -"> c #2A2A2A", -", c #4F4F4F", -"' c #A0A0A0", -") c #E6E6E6", -"! c #EFEFEF", -"~ c #F5F5F5", -"{ c #FFFFFF", -"] c #BCBCBC", -"^ c #404040", -"/ c #606060", -"( c #979797", -"_ c #EEEEEE", -": c #D8D8D8", -"< c #545454", -"[ c #C6C6C6", -"} c #3D3D3D", -"| c #FDFDFD", -"1 c #6B6B6B", -"2 c #D1D1D1", -"3 c #828282", -"4 c #585858", -"5 c #D6D6D6", -"6 c #616161", -"7 c #E9E9E9", -"8 c #353535", -"9 c #ACACAC", -"0 c #CACACA", -"a c #464646", -"b c #303030", -"c c #CDCDCD", -"d c #FEFEFE", -"e c #DEDEDE", -"f c #484848", -" ", -" ", -" .+@#@+. ", -" $%&*=-;%$ ", -" .>,')!~{]^. ", -" +/(_{{{{{:+ ", -" @<[.<#}.{|@ ", -" #12<{3#}{{# ", -" @45#3###{|@ ", -" +6:}###}{7+ ", -" .890}#}.{a. ", -" $bcd{|ef$ ", -" .+@#@+. ", -" ", -" ", -" "}; diff --git a/apt/gui/recommends.xpm b/apt/gui/recommends.xpm deleted file mode 100644 index c0c942c..0000000 --- a/apt/gui/recommends.xpm +++ /dev/null @@ -1,40 +0,0 @@ -/* XPM */ -static char * recommends_xpm[] = { -"16 16 21 1", -" c #FFFFFFFFFFFF", -". c #919191", -"+ c #000000", -"@ c #9F9F9F", -"# c #DDDDDD", -"$ c #1E1E1E", -"% c #D1D1D1", -"& c #454545", -"* c #C0C0C0", -"= c #5D5D5D", -"- c #CFCFCF", -"; c #E7E7E7", -"> c #8B8B8B", -", c #A2A2A2", -"' c #9A9A9A", -") c #797979", -"! c #535353", -"~ c #5A5A5A", -"{ c #444444", -"] c #E8E8E8", -"^ c #CDCDCD", -" ", -" ", -" .+@ ", -" +#$% ", -" +#$% ", -" +#& ", -" +##+++* ", -" +++##=-;.+ ", -" #####*+.+. ", -" #####=-;.+ ", -" ***##.+>+, ", -" +++.')!;~{ ", -" ].+++++^ ", -" ", -" ", -" "}; diff --git a/apt/gui/section.xpm b/apt/gui/section.xpm deleted file mode 100644 index 6429d9d..0000000 --- a/apt/gui/section.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * section_xpm[] = { -"16 16 5 1", -" c #FFFFFFFFFFFF s Background", -". c #B6DA82070000", -"X c #FFFFFFFF0000", -"o c #FFFFD34C1861", -"O c #6185618571C6", -" ", -" ", -" ", -" ..... ", -" .......XXXoO ", -" .oooooo.XXXoO ", -" .........XXXoO ", -" .XXXXXXXXXXXoO ", -" .XXXXXXXXXXXoO ", -" .XXXXXXXXXXXoO ", -" .XXXXXXXXXXXoO ", -" .XXXXXXXXXXXoO ", -" . oO ", -" .ooooooooooooO ", -" OOOOOOOOOOOOO ", -" "}; diff --git a/apt/gui/statuswidgets.cc b/apt/gui/statuswidgets.cc deleted file mode 100644 index 55375f8..0000000 --- a/apt/gui/statuswidgets.cc +++ /dev/null @@ -1,116 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: statuswidgets.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - StatusWidgets - The right hand status display widgets - - These show various bits of information derived from the package - control block. - - ##################################################################### */ - /*}}}*/ -#include "statuswidgets.h" -#include <system.h> - -// MultiLineWidget::Render - Draw the description text with wrapping /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void MultiLineWidget::Render(CombinedGC &GC) -{ - /* - BasicRender(GC,true); - - if (Elm == 0) - return; - - vector<string> Lines; - Elm->GetLines(Lines); - - AbsRect Loc(BorderX,BorderY,Pos.w - BorderX,Pos.h - BorderY); - GC->SetColor(Wc_Blue); - Loc.y1 = GC->DrawWrappedText(Loc,Elm->Value(),true); - GC->SetColor(iColor); - for (vector<string>::iterator I = Lines.begin(); I < Lines.end();) - { - string Tmp = *I; - for (I++; I != Lines.end(); I++) - { - const char *J = (*I).begin(); - for (;J != (*I).end() && *J == ' '; J++); - if (J == (*I).end()) - { - I++; - break; - } - - // * indicates a list - if (*J == '*') - break; - - Tmp += ' '; - Tmp += string(J,(*I).end() - J); - } - - Loc.y1 = GC->DrawWrappedText(Loc,Tmp,true); - }*/ -} - /*}}}*/ - -// InfoWidget::InfoWidget - Constructor /*{{{*/ -// --------------------------------------------------------------------- -/* */ -InfoWidget::InfoWidget(Widget *Parent) : BasicWidget(Parent) -{ - if (GraphicGC::GC != 0) - Margins(Point(1,1)); - BorderWidth(0); -}; - /*}}}*/ -// InfoWidget::Render - Draw all the single fields /*{{{*/ -// --------------------------------------------------------------------- -/* */ -void InfoWidget::Render(CombinedGC &GC) -{ -/* BasicRender(GC,true); - - if (Info.isNull() == true) - return; - - long Height = GC->ExtentText(" ").h; - Point Pos(BorderX + iMargins.x,BorderY + iMargins.y); - for (const pkgElement **I = List; I != List + _count(List); I++) - { - if (*I == 0) - continue; - - string Tag = (*I)->Tag() + ": "; - string Value = (*I)->Value(); - long Width = GC->ExtentText(Tag).w; - GC->SetColor(Wc_Blue); - GC->DrawString(Pos,Tag); - GC->SetColor(iColor); - - if (Width + GC->ExtentText(Value).w < this->Pos.w) - { - GC->DrawString(Point(Pos.x + Width,Pos.y),Value); - Pos.y += Height; - } - else - { - Pos.y += Height; - Pos.y = GC->DrawWrappedText(AbsRect(Pos.x+Height,Pos.y, - this->Pos.w,this->Pos.h), - Value,false); - } - }*/ -} - /*}}}*/ -// InfoWidget::IdealSize - Returns the proper size for the info widget /*{{{*/ -// --------------------------------------------------------------------- -/* */ -Point InfoWidget::IdealSize() -{ - return Point(Parent->Pos.w,Parent->Pos.h); -} - /*}}}*/ diff --git a/apt/gui/statuswidgets.h b/apt/gui/statuswidgets.h deleted file mode 100644 index 2b7dab7..0000000 --- a/apt/gui/statuswidgets.h +++ /dev/null @@ -1,37 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: statuswidgets.h,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ -/* ###################################################################### - - StatusWidgets - The right hand status display widgets - - These show various bits of information derived from the package - control block. - - ##################################################################### */ - /*}}}*/ -#ifndef STATUSWIDGETS_H -#define STATUSWIDGETS_H - -#include <deity/basic.h> - -class MultiLineWidget : public BasicWidget -{ - virtual void Render(CombinedGC &GC); - - public: - - MultiLineWidget(Widget *Parent = 0) : BasicWidget(Parent) {}; -}; - -class InfoWidget : public BasicWidget -{ - virtual void Render(CombinedGC &GC); - - public: - - virtual Point IdealSize(); - InfoWidget(Widget *Parent = 0); -}; - -#endif diff --git a/apt/gui/suggests.xpm b/apt/gui/suggests.xpm deleted file mode 100644 index ffecd3c..0000000 --- a/apt/gui/suggests.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * suggests_xpm[] = { -"16 16 4 1", -" c #FFFFFFFFFFFF", -". c #8E388A288E38", -"X c #FFFFD75C1861", -"o c #000000000000", -" ", -" . ", -" .X. ", -" .XXX. ", -" .XXX. ", -" .XXXXX. ", -" .XXoXX. ", -" .XXo.oXX. ", -" .XXXo.oXXX. ", -" .XXXo.oXXX. ", -" .XXXXXoXXXXX. ", -" .XXXXXXXXXXX. ", -".XXXXXXoXXXXXX. ", -".XXXXXXXXXXXXX. ", -"ooooooooooooooo ", -" "}; diff --git a/apt/gui/upgrade.xpm b/apt/gui/upgrade.xpm deleted file mode 100644 index a8d9f83..0000000 --- a/apt/gui/upgrade.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * upgrade_xpm[] = { -"16 16 3 1", -" c #FFFFFFFFFFFF s Background", -". c #000000", -"+ c #2F2F2F", -" ", -" ", -" ", -" ", -" . ", -" ... ", -" ..... ", -" .+..... ", -" ... ", -" ... ", -" ... ", -" ... ", -" ", -" ", -" ", -" "}; diff --git a/apt/intl/CVS/Entries b/apt/intl/CVS/Entries deleted file mode 100644 index b5e84f6..0000000 --- a/apt/intl/CVS/Entries +++ /dev/null @@ -1,24 +0,0 @@ -/ChangeLog/1.1/Fri Aug 10 14:03:21 2001// -/Makefile.in/1.1/Fri Aug 10 14:03:22 2001// -/VERSION/1.1/Fri Aug 10 14:03:22 2001// -/bindtextdom.c/1.1/Fri Aug 10 14:03:22 2001// -/cat-compat.c/1.1/Fri Aug 10 14:03:28 2001// -/dcgettext.c/1.1/Fri Aug 10 14:03:29 2001// -/dgettext.c/1.1/Fri Aug 10 14:03:29 2001// -/explodename.c/1.1/Fri Aug 10 14:03:29 2001// -/finddomain.c/1.1/Fri Aug 10 14:03:29 2001// -/gettext.c/1.1/Fri Aug 10 14:03:29 2001// -/gettext.h/1.1/Fri Aug 10 14:03:29 2001// -/gettextP.h/1.1/Fri Aug 10 14:03:29 2001// -/hash-string.h/1.1/Fri Aug 10 14:03:29 2001// -/intl-compat.c/1.1/Fri Aug 10 14:03:29 2001// -/l10nflist.c/1.1/Fri Aug 10 14:03:29 2001// -/libgettext.h/1.1/Fri Aug 10 14:03:29 2001// -/linux-msg.sed/1.1/Fri Aug 10 14:03:29 2001// -/loadinfo.h/1.1/Fri Aug 10 14:03:29 2001// -/loadmsgcat.c/1.1/Fri Aug 10 14:03:31 2001// -/localealias.c/1.1/Fri Aug 10 14:03:31 2001// -/po2tbl.sed.in/1.1/Fri Aug 10 14:03:31 2001// -/textdomain.c/1.1/Fri Aug 10 14:03:31 2001// -/xopen-msg.sed/1.1/Fri Aug 10 14:03:31 2001// -D diff --git a/apt/intl/CVS/Repository b/apt/intl/CVS/Repository deleted file mode 100644 index da3eb3e..0000000 --- a/apt/intl/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/intl diff --git a/apt/intl/CVS/Root b/apt/intl/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/intl/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/intl/ChangeLog b/apt/intl/ChangeLog deleted file mode 100644 index 75cd3f4..0000000 --- a/apt/intl/ChangeLog +++ /dev/null @@ -1,1106 +0,0 @@ -1999-08-12 Paul Eggert <eggert@twinsun.com> - - * localealias.c (memcpy): Return 2nd argument, so that it's - compatible with memcpy spec. - -1998-10-20 Paul Eggert <eggert@twinsun.com> - - * po2tbl.sed.in: Escape trigraphs. - -1999-08-11 Paul Eggert <eggert@twinsun.com> - - * Makefile.in (uninstall): Fix problem in most recent change, - on old BSD/OS hosts whose buggy shells report nonzero exit status - for `if false; then true; fi'. - -1998-10-05 Jim Meyering <meyering@ascend.com> - - * Makefile.in (uninstall): Uninstall only if the current package is - gettext. From Akim Demaille. - -1998-04-29 Ulrich Drepper <drepper@cygnus.com> - - * intl/localealias.c (read_alias_file): Use unsigned char for - local variables. Remove unused variable tp. - * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char * - for type of codeset. For loosing Solaris systems. - * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset. - * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable - len if not needed. - Patches by Jim Meyering. - -1998-04-28 Ulrich Drepper <drepper@cygnus.com> - - * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if - mmap is not supported. - - * hash-string.h: Don't include <values.h>. - -1998-04-27 Ulrich Drepper <drepper@cygnus.com> - - * textdomain.c: Use strdup is available. - - * localealias.c: Define HAVE_MEMPCPY so that we can use this - function. Define and use semapahores to protect modfication of - global objects when compiling for glibc. Add code to allow - freeing alias table. - - * l10nflist.c: Don't assume stpcpy not being a macro. - - * gettextP.h: Define internal_function macri if not already done. - Use glibc byte-swap macros instead of defining SWAP when compiled - for glibc. - (struct loaded_domain): Add elements to allow unloading. - - * Makefile.in (distclean): Don't remove libintl.h here. - - * bindtextdomain.c: Carry over changes from glibc. Use strdup if - available. - - * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal - functions. Add memory freeing code for glibc. - - * dgettext.c: Update copyright. - - * explodename.c: Include stdlib.h and string.h only if they exist. - Use strings.h eventually. - - * finddomain.c: Mark internal functions. Use strdup if available. - Add memory freeing code for glibc. - -1997-10-10 20:00 Ulrich Drepper <drepper@cygnus.com> - - * libgettext.h: Fix dummy textdomain and bindtextdomain macros. - They should return reasonable values. - Reported by Tom Tromey <tromey@cygnus.com>. - -1997-09-16 03:33 Ulrich Drepper <drepper@cygnus.com> - - * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined. - * intlh.inst.in: Likewise. - Reported by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>. - - * libintl.glibc: Update from current glibc version. - -1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com> - - * intlh.inst.in: Reformat copyright. - -1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com> - - * dcgettext.c (DCGETTEXT): Remove wrong comment. - -1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install-data): Don't change directory to install. - -1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com> - - * cat-compat.c: Fix copyright. - - * localealias.c: Don't define strchr unless !HAVE_STRCHR. - - * loadmsgcat.c: Update copyright. Fix typos. - - * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. - (_nl_make_l10nflist): Handle sponsor and revision correctly. - - * gettext.c: Update copyright. - * gettext.h: Likewise. - * hash-string.h: Likewise. - - * finddomain.c: Remoave dead code. Define strchr only if - !HAVE_STRCHR. - - * explodename.c: Include <sys/types.h>. - - * explodename.c: Reformat copyright text. - (_nl_explode_name): Fix typo. - - * dcgettext.c: Define and use __set_errno. - (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is - not defined. - - * bindtextdom.c: Pretty printing. - -1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com> - - * dcgettext.c (guess_category_value): Don't depend on - HAVE_LC_MESSAGES. We don't need the macro here. - Patch by Bruno Haible <haible@ilog.fr>. - - * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL - macro. Instead use HAVE_LOCALE_NULL and define it when using - glibc, as in dcgettext.c. - Patch by Bruno Haible <haible@ilog.fr>. - - * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois - Pinard. - -Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in: Implement handling of libtool. - - * gettextP.h: Change data structures for use of generic lowlevel - i18n file handling. - -Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com> - - * textdomain.c: Put parentheses around arguments of memcpy macro - definition. - * localealias.c: Likewise. - * l10nflist.c: Likewise. - * finddomain.c: Likewise. - * bindtextdom.c: Likewise. - Reported by Thomas Esken. - -Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com> - - * textdomain.c: Move definition of `memcpy` macro to right - position. - -Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com> - - * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using - bcopy if not already defined. Reported by Thomas Esken. - * bindtextdom.c: Likewise. - * l10nflist.c: Likewise. - * localealias.c: Likewise. - * textdomain.c: Likewise. - -Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (libdir): Change to use exec_prefix instead of - prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>. - -Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c (_nl_normalize_codeset): We convert to lower case, - so don't prepend uppercase `ISO' for only numeric arg. - -Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after - definition of _GNU_SOURCE. Patch by Roland McGrath. - - * Makefile.in (uninstall): Fix another bug with `for' loop and - empty arguments. Patch by Jim Meyering. Correct name os - uninstalled files: no intl- prefix anymore. - - * Makefile.in (install-data): Again work around shells which - cannot handle mpty for list. Reported by Jim Meyering. - -Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install): Split goal. Now depend on install-exec - and install-data. - (install-exec, install-data): New goals. Created from former - install goal. - Reported by Karl Berry. - -Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (MKINSTALLDIRS): New variable. Path to - mkinstalldirs script. - (install): use MKINSTALLDIRS variable or if the script is not present - try to find it in the $top_scrdir). - -Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c: Linux libc *partly* includes the argz_* functions. - Grr. Work around by renaming the static version and use macros - for renaming. - -Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c: Correct presence test macros of __argz_* functions. - - * l10nflist.c: Include <argz.h> based on test of it instead when - __argz_* functions are available. - Reported by Andreas Schwab. - -Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com> - - * explodename.c, l10nflist.c: Define NULL for dumb systems. - -Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com> - - * intlh.inst.in, libgettext.h (dcgettext): Rename local variable - result to __result to prevent name clash. - - * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to - get prototype for stpcpy and strcasecmp. - - * intlh.inst.in, libgettext.h: Move declaration of - `_nl_msg_cat_cntr' outside __extension__ block to prevent warning - from gcc's -Wnested-extern option. - -Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install): Remove comment. - -Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install): Work around for another Buglix stupidity. - Always use an `else' close for `if's. Reported by Nelson Beebe. - - * Makefile.in (intlh.inst): Correct typo in phony rule. - Reported by Nelson Beebe. - -Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com> - - * dcgettext.c (read_alias_file): Rename variable alloca_list to - block_list as the macro calls assume. - Patch by Eric Backus. - - * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using - malloc. - (read_alias_file): Rename varriabe alloca_list to block_list as the - macro calls assume. - Patch by Eric Backus. - - * l10nflist.c: Correct conditional for <argz.h> inclusion. - Reported by Roland McGrath. - - * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not - all-@USE_NLS@. - - * Makefile.in (install): intlh.inst comes from local dir, not - $(srcdir). - - * Makefile.in (intlh.inst): Special handling of this goal. If - used in gettext, this is really a rul to construct this file. If - used in any other package it is defined as a .PHONY rule with - empty body. - - * finddomain.c: Extract locale file information handling into - l10nfile.c. Rename local stpcpy__ function to stpcpy. - - * dcgettext.c (stpcpy): Add local definition. - - * l10nflist.c: Solve some portability problems. Patches partly by - Thomas Esken. Add local definition of stpcpy. - -Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com> - - * intlh.inst.in: Don't depend including <locale.h> on - HAVE_LOCALE_H. Instead configure must rewrite this fiile - depending on the result of the configure run. - - * Makefile.in (install): libintl.inst is now called intlh.inst. - Add rules for updating intlh.inst from intlh.inst.in. - - * libintl.inst: Renamed to intlh.inst.in. - - * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1 - because gcc has __buitlin_alloca. - Reported by Roland McGrath. - -Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (installcheck): New goal to fulfill needs of - automake's distcheck. - - * Makefile.in (install): Reorder commands so that VERSION is - found. - - * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in - @datadir@/gettext. - (COMSRCS): Add l10nfile.c. - (OBJECTS): Add l10nfile.o. - (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common). - (DISTFILE.gettext): Remove $(DISTFILES.common). - (all-gettext): Remove goal. - (install): If $(PACKAGE) = gettext install, otherwose do nothing. No - package but gettext itself should install libintl.h + headers. - (dist): Extend goal to work for gettext, too. - (dist-gettext): Remove goal. - - * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc. - -Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com> - - * loadmsgcat.c (_nl_load_domain): Parameter is now comes from - find_l10nfile. - -Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c (__argz_next): Add definition. - - * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca - code. Use new l10nfile handling. - - * localealias.c [!HAVE_ALLOCA]: Add code for handling missing - alloca code. - - * l10nflist.c: Initial revision. - -Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware> - - * Makefile.in (all-gettext): New goal. Same as all-yes. - -Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de> - - * Makefile.in (gettextsrcdir): Define using @datadir@. - -Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware> - - * finddomain.c: Include <ctype.h>. Reported by Roland McGrath. - -Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware> - - * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing - with external declaration. - -Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware> - - * Makefile.in (all-no): Rename from all_no. - -Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware> - - * gettextP.h [loaded_domain]: Array `successor' must now contain up - to 63 elements (because of codeset name normalization). - - * finddomain.c: Implement codeset name normalization. - -Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware> - - * Makefile.in (all): Define to `all-@USE_NLS@'. - (all-yes, all_no): New goals. `all-no' is noop, `all-yes' - is former all. - -Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com> - - * localealias.c (alias_compare): Increment string pointers in loop - of strcasecmp replacement. - -Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (install-src): Who commented this goal out ? :-) - -Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware> - - * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls - should not effect it because a missing catalog is no error. - Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>. - -Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (Makefile): Explicitly use $(SHELL) for running - shell scripts. - -Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * Makefile.in (install-src): Only install library and header when - we use the own implementation. Don't do it when using the - system's gettext or catgets functions. - - * dcgettext.c (find_msg): Must not swap domain->hash_size here. - -Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware> - - * localealias.c, libintl.inst, libgettext.h, hash-string.h, - gettextP.h, finddomain.c, dcgettext.c, cat-compat.c: - Use PARAMS instead of __P. Suggested by Roland McGrath. - -Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu> - - * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if - !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty. - -Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (install-src): - Install libintl.inst instead of libintl.h.install. - -Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu> - - * cat-compat.c (textdomain): - Reverse order in which files are tried you load. First - try local file, when this failed absolute path. - -Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu> - - * cat-compat.c (bindtextdomain): Add missing { }. - -Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware> - - * libintl.inst: Add missing __P definition. Reported by Nelson Beebe. - - * Makefile.in: - Add dummy `all' and `dvi' goals. Reported by Tom Tromey. - -Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca> - - * hash-string.h: Capitalize arguments of macros. - -Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): Prevent files names longer than 13 - characters. libintl.h.glibc->libintl.glibc, - libintl.h.install->libintl.inst. Reported by Joshua R. Poulson. - -Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com> - - * dcgettext.c: Fix bug in preprocessor conditionals. - -Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu> - - * libgettext.h: Solaris cc does not understand - #if !SYMBOL1 && !SYMBOL2. Sad but true. - -Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware> - - * hash-string.h (hash_string): - Fix for machine with >32 bit `unsigned long's. - - * dcgettext.c (DCGETTEXT): - Fix horrible bug in loop for alternative translation. - -Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware> - - * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed: - Some further simplifications in message number generation. - -Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware> - - * libintl.h.glibc: Use __const instead of const in prototypes. - - * Makefile.in (install-src): - Install libintl.h.install instead of libintl.h. This - is a stripped-down version. Suggested by Peter Miller. - - * libintl.h.install, libintl.h.glibc: Initial revision. - - * localealias.c (_nl_expand_alias, read_alias_file): - Protect prototypes in type casts by __P. - -Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware> - - * hash-string.h: Correct prototype for hash_string. - -Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware> - - * hash-string.h (hash_string): Add prototype. - - * gettextP.h: Fix copyright. - (SWAP): Add prototype. - -Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (read_alias_file): Forgot sizeof. - Avoid calling *printf function. This introduces a big overhead. - Patch by Roland McGrath. - -Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy. - - * finddomain.c (stpcpy): - Define substitution function local. The macro was to flaky. - - * cat-compat.c: Fix typo. - - * xopen-msg.sed, linux-msg.sed: - While bringing message number to right place only accept digits. - - * linux-msg.sed, xopen-msg.sed: Now that the counter does not have - leading 0s we don't need to remove them. Reported by Marcus - Daniels. - - * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in - dependency. Reported by Marcus Daniels. - - * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement. - Generally cleanup using #if instead of #ifndef. - - * Makefile.in: Correct typos in comment. By Franc,ois Pinard. - -Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (install-src): Don't install libintl.h and libintl.a - if we use an available gettext implementation. - -Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware> - - * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported - by Franc,ois Pinard. - - * libgettext.h: Use #if instead of #ifdef/#ifndef. - - * finddomain.c: - Comments describing what has to be done should start with FIXME. - -Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning. - DISTFILES.common names the files common to both dist goals. - DISTFILES.gettext are the files only distributed in GNU gettext. - -Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware> - - * dcgettext.c (DCGETTEXT): Correct searching in derived locales. - This was necessary since a change in _nl_find_msg several weeks - ago. I really don't know this is still not fixed. - -Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware> - - * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This - might mark a special condition. - - * finddomain.c (make_entry_rec): Don't make illegal entry as decided. - - * Makefile.in (dist): Suppress error message when ln failed. - Get files from $(srcdir) explicitly. - - * libgettext.h (gettext_const): Rename to gettext_noop. - -Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (make_entry_rec): - Protect against wrong locale names by testing mask. - - * libgettext.h (gettext_const): Add macro definition. - Capitalize macro arguments. - -Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (_nl_find_domain): - Test for pointer != NULL before accessing value. - Reported by Tom Tromey. - - * gettext.c (NULL): - Define as (void*)0 instad of 0. Reported by Franc,ois Pinard. - -Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware> - - * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. - -Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware> - - * libgettext.h: Disable dcgettext optimization for Solaris 2.3. - - * localealias.c (alias_compare): - Peter Miller reported that tolower in some systems is - even dumber than I thought. Protect call by `isupper'. - -Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (libdir, includedir): New variables. - (install-src): Install libintl.a and libintl.h in correct dirs. - -Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c. - - * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques. - - * localealias.c: - Fix typo and superflous test. Reported by Christian von Roques. - -Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (_nl_find_domain): - Correct some remainder from the pre-CEN syntax. Now - we don't have a constant number of successors anymore. - -Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): Add libintl.h.glibc. - - * Makefile.in (dist-libc): Add goal for packing sources for glibc. - (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc. - - * loadmsgcat.c: Forget to continue #if line. - - * localealias.c: - [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name - space clean. - - * dcgettext.c, finddomain.c: Better comment to last change. - - * loadmsgcat.c: - [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to - __fstat, __open, __close, __read, __mmap, and __munmap resp - to keep ANSI C name space clean. - - * finddomain.c: - [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean. - - * dcgettext.c: - [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to - keep ANSI C name space clean. - - * libgettext.h: - Include sys/types.h for those old SysV systems out there. - Reported by Francesco Potorti`. - - * loadmsgcat.c (use_mmap): Define if compiled for glibc. - - * bindtextdom.c: Include all those standard headers - unconditionally if _LIBC is defined. - - * finddomain.c: Fix 2 times defiend -> defined. - - * textdomain.c: Include libintl.h instead of libgettext.h when - compiling for glibc. Include all those standard headers - unconditionally if _LIBC is defined. - - * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc. - - * gettext.c: - Include libintl.h instead of libgettext.h when compiling for glibc. - Get NULL from stddef.h if we compile for glibc. - - * finddomain.c: Include libintl.h instead of libgettext.h when - compiling for glibc. Include all those standard headers - unconditionally if _LIBC is defined. - - * dcgettext.c: Include all those standard headers unconditionally - if _LIBC is defined. - - * dgettext.c: If compiled in glibc include libintl.h instead of - libgettext.h. - (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc. - - * dcgettext.c: If compiled in glibc include libintl.h instead of - libgettext.h. - (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc. - - * bindtextdom.c: - If compiled in glibc include libintl.h instead of libgettext.h. - -Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0. - Reported by Marcus Daniels. - - * cat-compat.c (bindtextdomain): - String used in putenv must not be recycled. - Reported by Marcus Daniels. - - * libgettext.h (__USE_GNU_GETTEXT): - Additional symbol to signal that we use GNU gettext - library. - - * cat-compat.c (bindtextdomain): - Fix bug with the strange stpcpy replacement. - Reported by Nelson Beebe. - -Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware> - - * cat-compat.c: Include <string.h> for stpcpy prototype. - - * localealias.c (read_alias_file): - While expand strdup code temporary variable `cp' hided - higher level variable with same name. Rename to `tp'. - - * textdomain.c (textdomain): - Avoid warning by using temporary variable in strdup code. - - * finddomain.c (_nl_find_domain): Remove unused variable `application'. - -Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (alias_compare): - Use strcasecmp() only if available. Else use - implementation in place. - - * intl-compat.c: - Wrapper functions now call *__ functions instead of __*. - - * libgettext.h: Declare prototypes for *__ functions instead for __*. - - * cat-compat.c, loadmsgcat.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - - * bindtextdom.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - Rename to bindtextdomain__ if not used in GNU C Library. - - * dgettext.c: - Rename function to dgettext__ if not used in GNU C Library. - - * gettext.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - Functions now called gettext__ if not used in GNU C Library. - - * dcgettext.c, localealias.c, textdomain.c, finddomain.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - -Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c: Correct some bugs in handling of CEN standard - locale definitions. - -Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c: Implement CEN syntax. - - * gettextP.h (loaded_domain): Extend number of successors to 31. - -Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (aliaspath): Remove path to X11 locale dir. - - * Makefile.in: Make install-src depend on install. This helps - gettext to install the sources and other packages can use the - install goal. - -Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (uninstall): Remove stuff installed by install-src. - -Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware> - - * VERSION.in: Initial revision. - - * Makefile.in (DISTFILES): - Add VERSION file. This is not necessary for gettext, but - for other packages using this library. - -Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware> - - * gettextP.h (_nl_find_domain): - New prototype after changing search strategy. - - * finddomain.c (_nl_find_domain): - We now try only to find a specified catalog. Fall back to other - catalogs listed in the locale list is now done in __dcgettext. - - * dcgettext.c (__dcgettext): - Now we provide message fall back even to different languages. - I.e. if a message is not available in one language all the other - in the locale list a tried. Formerly fall back was only possible - within one language. Implemented by moving one loop from - _nl_find_domain to here. - -Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (gettextsrcdir): - Directory where source of GNU gettext library are made - available. - (INSTALL, INSTALL_DATA): Programs used for installing sources. - (gettext-src): New. Rule to install GNU gettext sources for use in - gettextize shell script. - -Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware> - - * loadmsgcat.c (_nl_load_domain): - Use mmap for loading only when munmap function is - also available. - - * Makefile.in (install): Depend on `all' goal. - -Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (read_alias_file): - Do not overwrite '\n' when terminating alias value string. - - * localealias.c (read_alias_file): - Handle long lines. Ignore the rest not fitting in - the buffer after the initial `fgets' call. - -Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware> - - * gettextP.h (_nl_load_domain): - Add prototype, replacing prototype for _nl_load_msg_cat. - - * finddomain.c (_nl_find_domain): - Remove unneeded variable filename and filename_len. - (expand_alias): Remove prototype because functions does not - exist anymore. - - * localealias.c (read_alias_file): - Change type of fname_len parameter to int. - (xmalloc): Add prototype. - - * loadmsgcat.c: Better prototypes for xmalloc. - -Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (_nl_find_domain): - Allow alias name to be constructed from the four components. - - * Makefile.in (aliaspath): New variable. Set to preliminary value. - (SOURCES): Add localealias.c. - (OBJECTS): Add localealias.o. - - * gettextP.h: Add prototype for _nl_expand_alias. - - * finddomain.c: Aliasing handled in intl/localealias.c. - - * localealias.c: Aliasing for locale names. - - * bindtextdom.c: Better prototypes for xmalloc and xstrdup. - -Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): gettext.perl is now found in misc/. - - * cat-compat.c (bindtextdomain): - Correct implementation. dirname parameter was not used. - Reported by Marcus Daniels. - - * gettextP.h (loaded_domain): - New fields `successor' and `decided' for oo, lazy - message handling implementation. - - * dcgettext.c: - Adopt for oo, lazy message handliing. - Now we can inherit translations from less specific locales. - (find_msg): New function. - - * loadmsgcat.c, finddomain.c: - Complete rewrite. Implement oo, lazy message handling :-). - We now have an additional environment variable `LANGUAGE' with - a higher priority than LC_ALL for the LC_MESSAGE locale. - Here we can set a colon separated list of specifications each - of the form `language[_territory[.codeset]][@modifier]'. - -Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (unistd.h): - Include to get _PC_PATH_MAX defined on system having it. - -Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (stpcpy): Include prototype. - - * Makefile.in (dist): Remove `copying instead' message. - -Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (ID, TAGS): Do not use $^. - -Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (TAGS, ID): Use $^ as command argument. - (TAGS): Give etags -o option t write to current directory, - not $(srcdir). - (ID): Use $(srcdir) instead os $(top_srcdir)/src. - (distclean): Remove ID. - -Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (gnulocaledir): - New variable, always using share/ for data directory. - (DEFS): Add GNULOCALEDIR, used in finddomain.c. - - * finddomain.c (_nl_default_dirname): - Set to GNULOCALEDIR, because it always has to point - to the directory where GNU gettext Library writes it to. - - * intl-compat.c (textdomain, bindtextdomain): - Undefine macros before function definition. - -Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware> - - * libgettext.h (_LIBINTL_H): - Protect definition in case where this file is included as - libgettext.h on Solaris machines. Add comment about this. - -Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware> - - * intl-compat.c (textdomain): Correct typo. - -Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware> - - * dcgettext.c (dcgettext): Function now called __dcgettext. - - * dgettext.c (dgettext): Now called __dgettext and calls - __dcgettext. - - * gettext.c (gettext): - Function now called __gettext and calls __dgettext. - - * textdomain.c (textdomain): Function now called __textdomain. - - * bindtextdom.c (bindtextdomain): Function now called - __bindtextdomain. - - * intl-compat.c: Initial revision. - - * Makefile.in (SOURCES): Add intl-compat.c. - (OBJECTS): We always compile the GNU gettext library functions. - OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o, - and intl-compat.o. - (GETTOBJS): Contains now only intl-compat.o. - - * libgettext.h: - Re-include protection matches dualistic character of libgettext.h. - For all functions in GNU gettext library define __ counter part. - - * finddomain.c (strchr): Define as index if not found in C library. - (_nl_find_domain): For relative paths paste / in between. - -Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware> - - * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h. - - * xopen-msg.sed: Fix bug with `msgstr ""' lines. - A little bit better comments. - -Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in: - po-mode.el, makelinks, combine-sh are now found in ../misc. - - * po-mode.el, makelinks, combine-sh, elisp-comp: - Moved to ../misc/. - - * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__. - -Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (INSTALL, INSTALL_DATA): New variables. - (install-data, uninstall): Install/uninstall .elc file. - - * po-mode.el (Installation comment): - Add .pox as possible extension of .po files. - -Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware> - - * elisp-comp: Complete new version by Franc,ois: This does not - fail when not compiling in the source directory. - -Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (../po/cat-id-tbl.o): - Use $(MAKE) instead of make for recursive make. - - * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh. - (install-exec): Add missing dummy goal. - (install-data, uninstall): @ in multi-line shell command at - beginning, not in front of echo. Reported by Eric Backus. - -Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): - Rename libgettext.perl to gettext.perl to fit in 14 chars - file systems. - - * gettext.perl: - Rename to gettext.perl to fit in 14 chars file systems. - -Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware> - - * cat-compat.c: If !STDC_HEADERS try to include malloc.h. - -Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware> - - * po2tbl.sed.in: Pretty printing. - - * linux-msg.sed, xopen-msg.sed: - Correct bugs with handling substitute flags in branches. - - * hash-string.h (hash_string): - Old K&R compilers don't under stand `unsigned char'. - - * gettext.h (nls_uint32): - Some old K&R compilers (eg HP) don't understand `unsigned int'. - - * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes. - -Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (ELCFILES): New variable. - (DISTFILES): Add elisp-comp. - Add implicit rule for .el -> .elc compilation. - (install-data): install $ELCFILES - (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp. - - * elisp-comp: Initial revision - -Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in: - cat-id-tbl.c is now found in po/. This enables us to use an identical - intl/ directory in all packages. - - * dcgettext.c (dcgettext): hashing does not work for table size <= 2. - - * textdomain.c: fix typo (#if def -> #if defined) - -Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (stamp-cat-id): use top_srcdir to address source files - (DISTFILES,distclean): move tupdate.perl to src/ - - * po-to-tbl.sed.in: - add additional jump to clear change flag to recognize multiline strings - -Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware> - - * textdomain.c: Protect inclusion of stdlib.h and string.h. - - * loadmsgcat.c: Protect inclusion of stdlib.h. - - * libgettext.h: Protect inclusion of locale.h. - Allow use in C++ programs. - Define NULL is not happened already. - - * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of - po-to-tbl.sed. - (distclean): remove po-to-tbl.sed and tupdate.perl. - - * tupdate.perl.in: Substitute Perl path even in exec line. - Don't include entries without translation from old .po file. - -Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware> - - * tupdate.perl.in: use "Updated: " in msgid "". - - * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR). - Define getenv if !__STDC__. - - * bindtextdom.c: Protect stdlib.h and string.h inclusion. - Define free if !__STDC__. - - * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. - Define free if !__STDC__. - - * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. - -Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR. - Remove unneeded $(srcdir) from Makefile.in dependency. - - * makelinks: Add copyright and short description. - - * po-mode.el: Last version for 0.7. - - * tupdate.perl.in: Fix die message. - - * dcgettext.c: Protect include of string.h. - - * gettext.c: Protect include of stdlib.h and further tries to get NULL. - - * finddomain.c: Some corrections in includes. - - * Makefile.in (INCLUDES): Prune list correct path to Makefile.in. - - * po-to-tbl.sed: Adopt for new .po file format. - - * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format. - -Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware> - - * tupdate.perl.in: Complete rewrite for new .po file format. - -Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware> - - * First official release. This directory contains all the code - needed to internationalize own packages. It provides functions - which allow to use the X/Open catgets function with an interface - like the Uniforum gettext function. For system which does not - have neither of those a complete implementation is provided. diff --git a/apt/intl/Makefile.in b/apt/intl/Makefile.in deleted file mode 100644 index 9a877c8..0000000 --- a/apt/intl/Makefile.in +++ /dev/null @@ -1,218 +0,0 @@ -# Makefile for directory with message catalog handling in GNU NLS Utilities. -# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = .. -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -transform = @program_transform_name@ -libdir = $(exec_prefix)/lib -includedir = $(prefix)/include -datadir = $(prefix)/@DATADIRNAME@ -localedir = $(datadir)/locale -gnulocaledir = $(prefix)/share/locale -gettextsrcdir = @datadir@/gettext/intl -aliaspath = $(localedir):. -subdir = intl - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ - -l = @l@ - -AR = ar -CC = @CC@ -LIBTOOL = @LIBTOOL@ -RANLIB = @RANLIB@ - -DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ --DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -HEADERS = $(COMHDRS) libgettext.h loadinfo.h -COMHDRS = gettext.h gettextP.h hash-string.h -SOURCES = $(COMSRCS) intl-compat.c cat-compat.c -COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ -finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ -explodename.c -OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ -finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ -explodename.$lo -CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo -GETTOBJS = intl-compat.$lo -DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ -xopen-msg.sed $(HEADERS) $(SOURCES) -DISTFILES.normal = VERSION -DISTFILES.gettext = libintl.glibc intlh.inst.in - -.SUFFIXES: -.SUFFIXES: .c .o .lo -.c.o: - $(COMPILE) $< -.c.lo: - $(LIBTOOL) --mode=compile $(COMPILE) $< - -INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib - -all: all-@USE_INCLUDED_LIBINTL@ - -all-yes: libintl.$la intlh.inst -all-no: - -libintl.a: $(OBJECTS) - rm -f $@ - $(AR) cru $@ $(OBJECTS) - $(RANLIB) $@ - -libintl.la: $(OBJECTS) - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ - -version-info 1:0 -rpath $(libdir) - -../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot - cd ../po && $(MAKE) cat-id-tbl.$lo - -check: all - -# This installation goal is only used in GNU gettext. Packages which -# only use the library should use install instead. - -# We must not install the libintl.h/libintl.a files if we are on a -# system which has the gettext() function in its C library or in a -# separate library or use the catgets interface. A special case is -# where configure found a previously installed GNU gettext library. -# If you want to use the one which comes with this version of the -# package, you have to use `configure --with-included-gettext'. -install: install-exec install-data -install-exec: all - if test "$(PACKAGE)" = "gettext" \ - && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ - if test -r $(MKINSTALLDIRS); then \ - $(MKINSTALLDIRS) $(libdir) $(includedir); \ - else \ - $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ - fi; \ - $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ - $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ - else \ - : ; \ - fi -install-data: all - if test "$(PACKAGE)" = "gettext"; then \ - if test -r $(MKINSTALLDIRS); then \ - $(MKINSTALLDIRS) $(gettextsrcdir); \ - else \ - $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ - fi; \ - $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ - dists="$(DISTFILES.common)"; \ - for file in $$dists; do \ - $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - if test "$(PACKAGE)" = "gettext"; then \ - dists="$(DISTFILES.common)"; \ - for file in $$dists; do \ - rm -f $(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -info dvi: - -$(OBJECTS): ../config.h libgettext.h -bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h -dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h - -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) - -id: ID - -ID: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) - - -mostlyclean: - rm -f *.a *.o *.lo core core.* - -clean: mostlyclean - -distclean: clean - rm -f Makefile ID TAGS po2msg.sed po2tbl.sed - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - - -# GNU gettext needs not contain the file `VERSION' but contains some -# other files which should not be distributed in other packages. -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: Makefile $(DISTFILES) - if test "$(PACKAGE)" = gettext; then \ - additional="$(DISTFILES.gettext)"; \ - else \ - additional="$(DISTFILES.normal)"; \ - fi; \ - for file in $(DISTFILES.common) $$additional; do \ - ln $(srcdir)/$$file $(distdir) 2> /dev/null \ - || cp -p $(srcdir)/$$file $(distdir); \ - done - -dist-libc: - tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc - -Makefile: Makefile.in ../config.status - cd .. \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -# The dependency for intlh.inst is different in gettext and all other -# packages. Because we cannot you GNU make features we have to solve -# the problem while rewriting Makefile.in. -@GT_YES@intlh.inst: intlh.inst.in ../config.status -@GT_YES@ cd .. \ -@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ -@GT_YES@ $(SHELL) ./config.status -@GT_NO@.PHONY: intlh.inst -@GT_NO@intlh.inst: - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/apt/intl/VERSION b/apt/intl/VERSION deleted file mode 100644 index ee66b06..0000000 --- a/apt/intl/VERSION +++ /dev/null @@ -1 +0,0 @@ -GNU gettext library from gettext-0.10.35 diff --git a/apt/intl/bindtextdom.c b/apt/intl/bindtextdom.c deleted file mode 100644 index d9c3f34..0000000 --- a/apt/intl/bindtextdom.c +++ /dev/null @@ -1,203 +0,0 @@ -/* Implementation of the bindtextdomain(3) function - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif -#include "gettext.h" -#include "gettextP.h" - -/* @@ end of prolog @@ */ - -/* Contains the default location of the message catalogs. */ -extern const char _nl_default_dirname[]; - -/* List with bindings of specific domains. */ -extern struct binding *_nl_domain_bindings; - - -/* Names for the libintl functions are a problem. They must not clash - with existing names and they should follow ANSI C. But this source - code is also used in GNU C Library where the names have a __ - prefix. So we have to make a difference here. */ -#ifdef _LIBC -# define BINDTEXTDOMAIN __bindtextdomain -# ifndef strdup -# define strdup(str) __strdup (str) -# endif -#else -# define BINDTEXTDOMAIN bindtextdomain__ -#endif - -/* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -char * -BINDTEXTDOMAIN (domainname, dirname) - const char *domainname; - const char *dirname; -{ - struct binding *binding; - - /* Some sanity checks. */ - if (domainname == NULL || domainname[0] == '\0') - return NULL; - - for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) - { - int compare = strcmp (domainname, binding->domainname); - if (compare == 0) - /* We found it! */ - break; - if (compare < 0) - { - /* It is not in the list. */ - binding = NULL; - break; - } - } - - if (dirname == NULL) - /* The current binding has be to returned. */ - return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; - - if (binding != NULL) - { - /* The domain is already bound. If the new value and the old - one are equal we simply do nothing. Otherwise replace the - old binding. */ - if (strcmp (dirname, binding->dirname) != 0) - { - char *new_dirname; - - if (strcmp (dirname, _nl_default_dirname) == 0) - new_dirname = (char *) _nl_default_dirname; - else - { -#if defined _LIBC || defined HAVE_STRDUP - new_dirname = strdup (dirname); - if (new_dirname == NULL) - return NULL; -#else - size_t len = strlen (dirname) + 1; - new_dirname = (char *) malloc (len); - if (new_dirname == NULL) - return NULL; - - memcpy (new_dirname, dirname, len); -#endif - } - - if (binding->dirname != _nl_default_dirname) - free (binding->dirname); - - binding->dirname = new_dirname; - } - } - else - { - /* We have to create a new binding. */ -#if !defined _LIBC && !defined HAVE_STRDUP - size_t len; -#endif - struct binding *new_binding = - (struct binding *) malloc (sizeof (*new_binding)); - - if (new_binding == NULL) - return NULL; - -#if defined _LIBC || defined HAVE_STRDUP - new_binding->domainname = strdup (domainname); - if (new_binding->domainname == NULL) - return NULL; -#else - len = strlen (domainname) + 1; - new_binding->domainname = (char *) malloc (len); - if (new_binding->domainname == NULL) - return NULL; - memcpy (new_binding->domainname, domainname, len); -#endif - - if (strcmp (dirname, _nl_default_dirname) == 0) - new_binding->dirname = (char *) _nl_default_dirname; - else - { -#if defined _LIBC || defined HAVE_STRDUP - new_binding->dirname = strdup (dirname); - if (new_binding->dirname == NULL) - return NULL; -#else - len = strlen (dirname) + 1; - new_binding->dirname = (char *) malloc (len); - if (new_binding->dirname == NULL) - return NULL; - memcpy (new_binding->dirname, dirname, len); -#endif - } - - /* Now enqueue it. */ - if (_nl_domain_bindings == NULL - || strcmp (domainname, _nl_domain_bindings->domainname) < 0) - { - new_binding->next = _nl_domain_bindings; - _nl_domain_bindings = new_binding; - } - else - { - binding = _nl_domain_bindings; - while (binding->next != NULL - && strcmp (domainname, binding->next->domainname) > 0) - binding = binding->next; - - new_binding->next = binding->next; - binding->next = new_binding; - } - - binding = new_binding; - } - - return binding->dirname; -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__bindtextdomain, bindtextdomain); -#endif diff --git a/apt/intl/cat-compat.c b/apt/intl/cat-compat.c deleted file mode 100644 index 867d901..0000000 --- a/apt/intl/cat-compat.c +++ /dev/null @@ -1,262 +0,0 @@ -/* Compatibility code for gettext-using-catgets interface. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <stdio.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -# include <string.h> -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# endif -#endif - -#ifdef HAVE_NL_TYPES_H -# include <nl_types.h> -#endif - -#include "libgettext.h" - -/* @@ end of prolog @@ */ - -/* XPG3 defines the result of `setlocale (category, NULL)' as: - ``Directs `setlocale()' to query `category' and return the current - setting of `local'.'' - However it does not specify the exact format. And even worse: POSIX - defines this not at all. So we can use this feature only on selected - system (e.g. those using GNU C Library). */ -#ifdef _LIBC -# define HAVE_LOCALE_NULL -#endif - -/* The catalog descriptor. */ -static nl_catd catalog = (nl_catd) -1; - -/* Name of the default catalog. */ -static const char default_catalog_name[] = "messages"; - -/* Name of currently used catalog. */ -static const char *catalog_name = default_catalog_name; - -/* Get ID for given string. If not found return -1. */ -static int msg_to_cat_id PARAMS ((const char *msg)); - -/* Substitution for systems lacking this function in their C library. */ -#if !_LIBC && !HAVE_STPCPY -static char *stpcpy PARAMS ((char *dest, const char *src)); -#endif - - -/* Set currently used domain/catalog. */ -char * -textdomain (domainname) - const char *domainname; -{ - nl_catd new_catalog; - char *new_name; - size_t new_name_len; - char *lang; - -#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ - && defined HAVE_LOCALE_NULL - lang = setlocale (LC_MESSAGES, NULL); -#else - lang = getenv ("LC_ALL"); - if (lang == NULL || lang[0] == '\0') - { - lang = getenv ("LC_MESSAGES"); - if (lang == NULL || lang[0] == '\0') - lang = getenv ("LANG"); - } -#endif - if (lang == NULL || lang[0] == '\0') - lang = "C"; - - /* See whether name of currently used domain is asked. */ - if (domainname == NULL) - return (char *) catalog_name; - - if (domainname[0] == '\0') - domainname = default_catalog_name; - - /* Compute length of added path element. */ - new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang) - + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1 - + sizeof (".cat"); - - new_name = (char *) malloc (new_name_len); - if (new_name == NULL) - return NULL; - - strcpy (new_name, PACKAGE); - new_catalog = catopen (new_name, 0); - - if (new_catalog == (nl_catd) -1) - { - /* NLSPATH search didn't work, try absolute path */ - sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang, - PACKAGE); - new_catalog = catopen (new_name, 0); - - if (new_catalog == (nl_catd) -1) - { - free (new_name); - return (char *) catalog_name; - } - } - - /* Close old catalog. */ - if (catalog != (nl_catd) -1) - catclose (catalog); - if (catalog_name != default_catalog_name) - free ((char *) catalog_name); - - catalog = new_catalog; - catalog_name = new_name; - - return (char *) catalog_name; -} - -char * -bindtextdomain (domainname, dirname) - const char *domainname; - const char *dirname; -{ -#if HAVE_SETENV || HAVE_PUTENV - char *old_val, *new_val, *cp; - size_t new_val_len; - - /* This does not make much sense here but to be compatible do it. */ - if (domainname == NULL) - return NULL; - - /* Compute length of added path element. If we use setenv we don't need - the first byts for NLSPATH=, but why complicate the code for this - peanuts. */ - new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname) - + sizeof ("/%L/LC_MESSAGES/%N.cat"); - - old_val = getenv ("NLSPATH"); - if (old_val == NULL || old_val[0] == '\0') - { - old_val = NULL; - new_val_len += 1 + sizeof (LOCALEDIR) - 1 - + sizeof ("/%L/LC_MESSAGES/%N.cat"); - } - else - new_val_len += strlen (old_val); - - new_val = (char *) malloc (new_val_len); - if (new_val == NULL) - return NULL; - -# if HAVE_SETENV - cp = new_val; -# else - cp = stpcpy (new_val, "NLSPATH="); -# endif - - cp = stpcpy (cp, dirname); - cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:"); - - if (old_val == NULL) - { -# if __STDC__ - stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat"); -# else - - cp = stpcpy (cp, LOCALEDIR); - stpcpy (cp, "/%L/LC_MESSAGES/%N.cat"); -# endif - } - else - stpcpy (cp, old_val); - -# if HAVE_SETENV - setenv ("NLSPATH", new_val, 1); - free (new_val); -# else - putenv (new_val); - /* Do *not* free the environment entry we just entered. It is used - from now on. */ -# endif - -#endif - - return (char *) domainname; -} - -#undef gettext -char * -gettext (msg) - const char *msg; -{ - int msgid; - - if (msg == NULL || catalog == (nl_catd) -1) - return (char *) msg; - - /* Get the message from the catalog. We always use set number 1. - The message ID is computed by the function `msg_to_cat_id' - which works on the table generated by `po-to-tbl'. */ - msgid = msg_to_cat_id (msg); - if (msgid == -1) - return (char *) msg; - - return catgets (catalog, 1, msgid, (char *) msg); -} - -/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries - for the one equal to msg. If it is found return the ID. In case when - the string is not found return -1. */ -static int -msg_to_cat_id (msg) - const char *msg; -{ - int cnt; - - for (cnt = 0; cnt < _msg_tbl_length; ++cnt) - if (strcmp (msg, _msg_tbl[cnt]._msg) == 0) - return _msg_tbl[cnt]._msg_number; - - return -1; -} - - -/* @@ begin of epilog @@ */ - -/* We don't want libintl.a to depend on any other library. So we - avoid the non-standard function stpcpy. In GNU C Library this - function is available, though. Also allow the symbol HAVE_STPCPY - to be defined. */ -#if !_LIBC && !HAVE_STPCPY -static char * -stpcpy (dest, src) - char *dest; - const char *src; -{ - while ((*dest++ = *src++) != '\0') - /* Do nothing. */ ; - return dest - 1; -} -#endif diff --git a/apt/intl/dcgettext.c b/apt/intl/dcgettext.c deleted file mode 100644 index c4c7a2c..0000000 --- a/apt/intl/dcgettext.c +++ /dev/null @@ -1,624 +0,0 @@ -/* Implementation of the dcgettext(3) function. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <sys/types.h> - -#ifdef __GNUC__ -# define alloca __builtin_alloca -# define HAVE_ALLOCA 1 -#else -# if defined HAVE_ALLOCA_H || defined _LIBC -# include <alloca.h> -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca -char *alloca (); -# endif -# endif -# endif -#endif - -#include <errno.h> -#ifndef errno -extern int errno; -#endif -#ifndef __set_errno -# define __set_errno(val) errno = (val) -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include <string.h> -#else -# include <strings.h> -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include <unistd.h> -#endif - -#include "gettext.h" -#include "gettextP.h" -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif -#include "hash-string.h" - -/* @@ end of prolog @@ */ - -#ifdef _LIBC -/* Rename the non ANSI C functions. This is required by the standard - because some ANSI C functions will require linking with this object - file and the name space must not be polluted. */ -# define getcwd __getcwd -# ifndef stpcpy -# define stpcpy __stpcpy -# endif -#else -# if !defined HAVE_GETCWD -char *getwd (); -# define getcwd(buf, max) getwd (buf) -# else -char *getcwd (); -# endif -# ifndef HAVE_STPCPY -static char *stpcpy PARAMS ((char *dest, const char *src)); -# endif -#endif - -/* Amount to increase buffer size by in each try. */ -#define PATH_INCR 32 - -/* The following is from pathmax.h. */ -/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define - PATH_MAX but might cause redefinition warnings when sys/param.h is - later included (as on MORE/BSD 4.3). */ -#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) -# include <limits.h> -#endif - -#ifndef _POSIX_PATH_MAX -# define _POSIX_PATH_MAX 255 -#endif - -#if !defined(PATH_MAX) && defined(_PC_PATH_MAX) -# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) -#endif - -/* Don't include sys/param.h if it already has been. */ -#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) -# include <sys/param.h> -#endif - -#if !defined(PATH_MAX) && defined(MAXPATHLEN) -# define PATH_MAX MAXPATHLEN -#endif - -#ifndef PATH_MAX -# define PATH_MAX _POSIX_PATH_MAX -#endif - -/* XPG3 defines the result of `setlocale (category, NULL)' as: - ``Directs `setlocale()' to query `category' and return the current - setting of `local'.'' - However it does not specify the exact format. And even worse: POSIX - defines this not at all. So we can use this feature only on selected - system (e.g. those using GNU C Library). */ -#ifdef _LIBC -# define HAVE_LOCALE_NULL -#endif - -/* Name of the default domain used for gettext(3) prior any call to - textdomain(3). The default value for this is "messages". */ -const char _nl_default_default_domain[] = "messages"; - -/* Value used as the default domain for gettext(3). */ -const char *_nl_current_default_domain = _nl_default_default_domain; - -/* Contains the default location of the message catalogs. */ -const char _nl_default_dirname[] = GNULOCALEDIR; - -/* List with bindings of specific domains created by bindtextdomain() - calls. */ -struct binding *_nl_domain_bindings; - -/* Prototypes for local functions. */ -static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, - const char *msgid)) internal_function; -static const char *category_to_name PARAMS ((int category)) internal_function; -static const char *guess_category_value PARAMS ((int category, - const char *categoryname)) - internal_function; - - -/* For those loosing systems which don't have `alloca' we have to add - some additional code emulating it. */ -#ifdef HAVE_ALLOCA -/* Nothing has to be done. */ -# define ADD_BLOCK(list, address) /* nothing */ -# define FREE_BLOCKS(list) /* nothing */ -#else -struct block_list -{ - void *address; - struct block_list *next; -}; -# define ADD_BLOCK(list, addr) \ - do { \ - struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ - /* If we cannot get a free block we cannot add the new element to \ - the list. */ \ - if (newp != NULL) { \ - newp->address = (addr); \ - newp->next = (list); \ - (list) = newp; \ - } \ - } while (0) -# define FREE_BLOCKS(list) \ - do { \ - while (list != NULL) { \ - struct block_list *old = list; \ - list = list->next; \ - free (old); \ - } \ - } while (0) -# undef alloca -# define alloca(size) (malloc (size)) -#endif /* have alloca */ - - -/* Names for the libintl functions are a problem. They must not clash - with existing names and they should follow ANSI C. But this source - code is also used in GNU C Library where the names have a __ - prefix. So we have to make a difference here. */ -#ifdef _LIBC -# define DCGETTEXT __dcgettext -#else -# define DCGETTEXT dcgettext__ -#endif - -/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ -char * -DCGETTEXT (domainname, msgid, category) - const char *domainname; - const char *msgid; - int category; -{ -#ifndef HAVE_ALLOCA - struct block_list *block_list = NULL; -#endif - struct loaded_l10nfile *domain; - struct binding *binding; - const char *categoryname; - const char *categoryvalue; - char *dirname, *xdomainname; - char *single_locale; - char *retval; - int saved_errno = errno; - - /* If no real MSGID is given return NULL. */ - if (msgid == NULL) - return NULL; - - /* If DOMAINNAME is NULL, we are interested in the default domain. If - CATEGORY is not LC_MESSAGES this might not make much sense but the - defintion left this undefined. */ - if (domainname == NULL) - domainname = _nl_current_default_domain; - - /* First find matching binding. */ - for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) - { - int compare = strcmp (domainname, binding->domainname); - if (compare == 0) - /* We found it! */ - break; - if (compare < 0) - { - /* It is not in the list. */ - binding = NULL; - break; - } - } - - if (binding == NULL) - dirname = (char *) _nl_default_dirname; - else if (binding->dirname[0] == '/') - dirname = binding->dirname; - else - { - /* We have a relative path. Make it absolute now. */ - size_t dirname_len = strlen (binding->dirname) + 1; - size_t path_max; - char *ret; - - path_max = (unsigned) PATH_MAX; - path_max += 2; /* The getcwd docs say to do this. */ - - dirname = (char *) alloca (path_max + dirname_len); - ADD_BLOCK (block_list, dirname); - - __set_errno (0); - while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) - { - path_max += PATH_INCR; - dirname = (char *) alloca (path_max + dirname_len); - ADD_BLOCK (block_list, dirname); - __set_errno (0); - } - - if (ret == NULL) - { - /* We cannot get the current working directory. Don't signal an - error but simply return the default string. */ - FREE_BLOCKS (block_list); - __set_errno (saved_errno); - return (char *) msgid; - } - - stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); - } - - /* Now determine the symbolic name of CATEGORY and its value. */ - categoryname = category_to_name (category); - categoryvalue = guess_category_value (category, categoryname); - - xdomainname = (char *) alloca (strlen (categoryname) - + strlen (domainname) + 5); - ADD_BLOCK (block_list, xdomainname); - - stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), - domainname), - ".mo"); - - /* Creating working area. */ - single_locale = (char *) alloca (strlen (categoryvalue) + 1); - ADD_BLOCK (block_list, single_locale); - - - /* Search for the given string. This is a loop because we perhaps - got an ordered list of languages to consider for th translation. */ - while (1) - { - /* Make CATEGORYVALUE point to the next element of the list. */ - while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') - ++categoryvalue; - if (categoryvalue[0] == '\0') - { - /* The whole contents of CATEGORYVALUE has been searched but - no valid entry has been found. We solve this situation - by implicitly appending a "C" entry, i.e. no translation - will take place. */ - single_locale[0] = 'C'; - single_locale[1] = '\0'; - } - else - { - char *cp = single_locale; - while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') - *cp++ = *categoryvalue++; - *cp = '\0'; - } - - /* If the current locale value is C (or POSIX) we don't load a - domain. Return the MSGID. */ - if (strcmp (single_locale, "C") == 0 - || strcmp (single_locale, "POSIX") == 0) - { - FREE_BLOCKS (block_list); - __set_errno (saved_errno); - return (char *) msgid; - } - - - /* Find structure describing the message catalog matching the - DOMAINNAME and CATEGORY. */ - domain = _nl_find_domain (dirname, single_locale, xdomainname); - - if (domain != NULL) - { - retval = find_msg (domain, msgid); - - if (retval == NULL) - { - int cnt; - - for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) - { - retval = find_msg (domain->successor[cnt], msgid); - - if (retval != NULL) - break; - } - } - - if (retval != NULL) - { - FREE_BLOCKS (block_list); - __set_errno (saved_errno); - return retval; - } - } - } - /* NOTREACHED */ -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__dcgettext, dcgettext); -#endif - - -static char * -internal_function -find_msg (domain_file, msgid) - struct loaded_l10nfile *domain_file; - const char *msgid; -{ - size_t top, act, bottom; - struct loaded_domain *domain; - - if (domain_file->decided == 0) - _nl_load_domain (domain_file); - - if (domain_file->data == NULL) - return NULL; - - domain = (struct loaded_domain *) domain_file->data; - - /* Locate the MSGID and its translation. */ - if (domain->hash_size > 2 && domain->hash_tab != NULL) - { - /* Use the hashing table. */ - nls_uint32 len = strlen (msgid); - nls_uint32 hash_val = hash_string (msgid); - nls_uint32 idx = hash_val % domain->hash_size; - nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); - nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); - - if (nstr == 0) - /* Hash table entry is empty. */ - return NULL; - - if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len - && strcmp (msgid, - domain->data + W (domain->must_swap, - domain->orig_tab[nstr - 1].offset)) == 0) - return (char *) domain->data + W (domain->must_swap, - domain->trans_tab[nstr - 1].offset); - - while (1) - { - if (idx >= domain->hash_size - incr) - idx -= domain->hash_size - incr; - else - idx += incr; - - nstr = W (domain->must_swap, domain->hash_tab[idx]); - if (nstr == 0) - /* Hash table entry is empty. */ - return NULL; - - if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len - && strcmp (msgid, - domain->data + W (domain->must_swap, - domain->orig_tab[nstr - 1].offset)) - == 0) - return (char *) domain->data - + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); - } - /* NOTREACHED */ - } - - /* Now we try the default method: binary search in the sorted - array of messages. */ - bottom = 0; - top = domain->nstrings; - while (bottom < top) - { - int cmp_val; - - act = (bottom + top) / 2; - cmp_val = strcmp (msgid, domain->data - + W (domain->must_swap, - domain->orig_tab[act].offset)); - if (cmp_val < 0) - top = act; - else if (cmp_val > 0) - bottom = act + 1; - else - break; - } - - /* If an translation is found return this. */ - return bottom >= top ? NULL : (char *) domain->data - + W (domain->must_swap, - domain->trans_tab[act].offset); -} - - -/* Return string representation of locale CATEGORY. */ -static const char * -internal_function -category_to_name (category) - int category; -{ - const char *retval; - - switch (category) - { -#ifdef LC_COLLATE - case LC_COLLATE: - retval = "LC_COLLATE"; - break; -#endif -#ifdef LC_CTYPE - case LC_CTYPE: - retval = "LC_CTYPE"; - break; -#endif -#ifdef LC_MONETARY - case LC_MONETARY: - retval = "LC_MONETARY"; - break; -#endif -#ifdef LC_NUMERIC - case LC_NUMERIC: - retval = "LC_NUMERIC"; - break; -#endif -#ifdef LC_TIME - case LC_TIME: - retval = "LC_TIME"; - break; -#endif -#ifdef LC_MESSAGES - case LC_MESSAGES: - retval = "LC_MESSAGES"; - break; -#endif -#ifdef LC_RESPONSE - case LC_RESPONSE: - retval = "LC_RESPONSE"; - break; -#endif -#ifdef LC_ALL - case LC_ALL: - /* This might not make sense but is perhaps better than any other - value. */ - retval = "LC_ALL"; - break; -#endif - default: - /* If you have a better idea for a default value let me know. */ - retval = "LC_XXX"; - } - - return retval; -} - -/* Guess value of current locale from value of the environment variables. */ -static const char * -internal_function -guess_category_value (category, categoryname) - int category; - const char *categoryname; -{ - const char *retval; - - /* The highest priority value is the `LANGUAGE' environment - variable. This is a GNU extension. */ - retval = getenv ("LANGUAGE"); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* `LANGUAGE' is not set. So we have to proceed with the POSIX - methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some - systems this can be done by the `setlocale' function itself. */ -#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL - return setlocale (category, NULL); -#else - /* Setting of LC_ALL overwrites all other. */ - retval = getenv ("LC_ALL"); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* Next comes the name of the desired category. */ - retval = getenv (categoryname); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* Last possibility is the LANG environment variable. */ - retval = getenv ("LANG"); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* We use C as the default domain. POSIX says this is implementation - defined. */ - return "C"; -#endif -} - -/* @@ begin of epilog @@ */ - -/* We don't want libintl.a to depend on any other library. So we - avoid the non-standard function stpcpy. In GNU C Library this - function is available, though. Also allow the symbol HAVE_STPCPY - to be defined. */ -#if !_LIBC && !HAVE_STPCPY -static char * -stpcpy (dest, src) - char *dest; - const char *src; -{ - while ((*dest++ = *src++) != '\0') - /* Do nothing. */ ; - return dest - 1; -} -#endif - - -#ifdef _LIBC -/* If we want to free all resources we have to do some work at - program's end. */ -static void __attribute__ ((unused)) -free_mem (void) -{ - struct binding *runp; - - for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) - { - free (runp->domainname); - if (runp->dirname != _nl_default_dirname) - /* Yes, this is a pointer comparison. */ - free (runp->dirname); - } - - if (_nl_current_default_domain != _nl_default_default_domain) - /* Yes, again a pointer comparison. */ - free ((char *) _nl_current_default_domain); -} - -text_set_element (__libc_subfreeres, free_mem); -#endif diff --git a/apt/intl/dgettext.c b/apt/intl/dgettext.c deleted file mode 100644 index 0510c2b..0000000 --- a/apt/intl/dgettext.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Implementation of the dgettext(3) function - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined HAVE_LOCALE_H || defined _LIBC -# include <locale.h> -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif - -/* @@ end of prolog @@ */ - -/* Names for the libintl functions are a problem. They must not clash - with existing names and they should follow ANSI C. But this source - code is also used in GNU C Library where the names have a __ - prefix. So we have to make a difference here. */ -#ifdef _LIBC -# define DGETTEXT __dgettext -# define DCGETTEXT __dcgettext -#else -# define DGETTEXT dgettext__ -# define DCGETTEXT dcgettext__ -#endif - -/* Look up MSGID in the DOMAINNAME message catalog of the current - LC_MESSAGES locale. */ -char * -DGETTEXT (domainname, msgid) - const char *domainname; - const char *msgid; -{ - return DCGETTEXT (domainname, msgid, LC_MESSAGES); -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__dgettext, dgettext); -#endif diff --git a/apt/intl/explodename.c b/apt/intl/explodename.c deleted file mode 100644 index 8066dc2..0000000 --- a/apt/intl/explodename.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -#endif -#include <sys/types.h> - -#include "loadinfo.h" - -/* On some strange systems still no definition of NULL is found. Sigh! */ -#ifndef NULL -# if defined __STDC__ && __STDC__ -# define NULL ((void *) 0) -# else -# define NULL 0 -# endif -#endif - -/* @@ end of prolog @@ */ - -int -_nl_explode_name (name, language, modifier, territory, codeset, - normalized_codeset, special, sponsor, revision) - char *name; - const char **language; - const char **modifier; - const char **territory; - const char **codeset; - const char **normalized_codeset; - const char **special; - const char **sponsor; - const char **revision; -{ - enum { undecided, xpg, cen } syntax; - char *cp; - int mask; - - *modifier = NULL; - *territory = NULL; - *codeset = NULL; - *normalized_codeset = NULL; - *special = NULL; - *sponsor = NULL; - *revision = NULL; - - /* Now we determine the single parts of the locale name. First - look for the language. Termination symbols are `_' and `@' if - we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ - mask = 0; - syntax = undecided; - *language = cp = name; - while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' - && cp[0] != '+' && cp[0] != ',') - ++cp; - - if (*language == cp) - /* This does not make sense: language has to be specified. Use - this entry as it is without exploding. Perhaps it is an alias. */ - cp = strchr (*language, '\0'); - else if (cp[0] == '_') - { - /* Next is the territory. */ - cp[0] = '\0'; - *territory = ++cp; - - while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' - && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') - ++cp; - - mask |= TERRITORY; - - if (cp[0] == '.') - { - /* Next is the codeset. */ - syntax = xpg; - cp[0] = '\0'; - *codeset = ++cp; - - while (cp[0] != '\0' && cp[0] != '@') - ++cp; - - mask |= XPG_CODESET; - - if (*codeset != cp && (*codeset)[0] != '\0') - { - *normalized_codeset = _nl_normalize_codeset (*codeset, - cp - *codeset); - if (strcmp (*codeset, *normalized_codeset) == 0) - free ((char *) *normalized_codeset); - else - mask |= XPG_NORM_CODESET; - } - } - } - - if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) - { - /* Next is the modifier. */ - syntax = cp[0] == '@' ? xpg : cen; - cp[0] = '\0'; - *modifier = ++cp; - - while (syntax == cen && cp[0] != '\0' && cp[0] != '+' - && cp[0] != ',' && cp[0] != '_') - ++cp; - - mask |= XPG_MODIFIER | CEN_AUDIENCE; - } - - if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) - { - syntax = cen; - - if (cp[0] == '+') - { - /* Next is special application (CEN syntax). */ - cp[0] = '\0'; - *special = ++cp; - - while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') - ++cp; - - mask |= CEN_SPECIAL; - } - - if (cp[0] == ',') - { - /* Next is sponsor (CEN syntax). */ - cp[0] = '\0'; - *sponsor = ++cp; - - while (cp[0] != '\0' && cp[0] != '_') - ++cp; - - mask |= CEN_SPONSOR; - } - - if (cp[0] == '_') - { - /* Next is revision (CEN syntax). */ - cp[0] = '\0'; - *revision = ++cp; - - mask |= CEN_REVISION; - } - } - - /* For CEN syntax values it might be important to have the - separator character in the file name, not for XPG syntax. */ - if (syntax == xpg) - { - if (*territory != NULL && (*territory)[0] == '\0') - mask &= ~TERRITORY; - - if (*codeset != NULL && (*codeset)[0] == '\0') - mask &= ~XPG_CODESET; - - if (*modifier != NULL && (*modifier)[0] == '\0') - mask &= ~XPG_MODIFIER; - } - - return mask; -} diff --git a/apt/intl/finddomain.c b/apt/intl/finddomain.c deleted file mode 100644 index 81ea29b..0000000 --- a/apt/intl/finddomain.c +++ /dev/null @@ -1,216 +0,0 @@ -/* Handle list of needed message catalogs - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <ctype.h> -#include <errno.h> -#include <stdio.h> -#include <sys/types.h> - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include <unistd.h> -#endif - -#include "gettext.h" -#include "gettextP.h" -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif - -/* @@ end of prolog @@ */ -/* List of already loaded domains. */ -static struct loaded_l10nfile *_nl_loaded_domains; - - -/* Return a data structure describing the message catalog described by - the DOMAINNAME and CATEGORY parameters with respect to the currently - established bindings. */ -struct loaded_l10nfile * -internal_function -_nl_find_domain (dirname, locale, domainname) - const char *dirname; - char *locale; - const char *domainname; -{ - struct loaded_l10nfile *retval; - const char *language; - const char *modifier; - const char *territory; - const char *codeset; - const char *normalized_codeset; - const char *special; - const char *sponsor; - const char *revision; - const char *alias_value; - int mask; - - /* LOCALE can consist of up to four recognized parts for the XPG syntax: - - language[_territory[.codeset]][@modifier] - - and six parts for the CEN syntax: - - language[_territory][+audience][+special][,[sponsor][_revision]] - - Beside the first part all of them are allowed to be missing. If - the full specified locale is not found, the less specific one are - looked for. The various parts will be stripped off according to - the following order: - (1) revision - (2) sponsor - (3) special - (4) codeset - (5) normalized codeset - (6) territory - (7) audience/modifier - */ - - /* If we have already tested for this locale entry there has to - be one data set in the list of loaded domains. */ - retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, - strlen (dirname) + 1, 0, locale, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, domainname, 0); - if (retval != NULL) - { - /* We know something about this locale. */ - int cnt; - - if (retval->decided == 0) - _nl_load_domain (retval); - - if (retval->data != NULL) - return retval; - - for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) - { - if (retval->successor[cnt]->decided == 0) - _nl_load_domain (retval->successor[cnt]); - - if (retval->successor[cnt]->data != NULL) - break; - } - return cnt >= 0 ? retval : NULL; - /* NOTREACHED */ - } - - /* See whether the locale value is an alias. If yes its value - *overwrites* the alias name. No test for the original value is - done. */ - alias_value = _nl_expand_alias (locale); - if (alias_value != NULL) - { -#if defined _LIBC || defined HAVE_STRDUP - locale = strdup (alias_value); - if (locale == NULL) - return NULL; -#else - size_t len = strlen (alias_value) + 1; - locale = (char *) malloc (len); - if (locale == NULL) - return NULL; - - memcpy (locale, alias_value, len); -#endif - } - - /* Now we determine the single parts of the locale name. First - look for the language. Termination symbols are `_' and `@' if - we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ - mask = _nl_explode_name (locale, &language, &modifier, &territory, - &codeset, &normalized_codeset, &special, - &sponsor, &revision); - - /* Create all possible locale entries which might be interested in - generalization. */ - retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, - strlen (dirname) + 1, mask, language, territory, - codeset, normalized_codeset, modifier, special, - sponsor, revision, domainname, 1); - if (retval == NULL) - /* This means we are out of core. */ - return NULL; - - if (retval->decided == 0) - _nl_load_domain (retval); - if (retval->data == NULL) - { - int cnt; - for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) - { - if (retval->successor[cnt]->decided == 0) - _nl_load_domain (retval->successor[cnt]); - if (retval->successor[cnt]->data != NULL) - break; - } - } - - /* The room for an alias was dynamically allocated. Free it now. */ - if (alias_value != NULL) - free (locale); - - return retval; -} - - -#ifdef _LIBC -static void __attribute__ ((unused)) -free_mem (void) -{ - struct loaded_l10nfile *runp = _nl_loaded_domains; - - while (runp != NULL) - { - struct loaded_l10nfile *here = runp; - if (runp->data != NULL) - _nl_unload_domain ((struct loaded_domain *) runp->data); - runp = runp->next; - free (here); - } -} - -text_set_element (__libc_subfreeres, free_mem); -#endif diff --git a/apt/intl/gettext.c b/apt/intl/gettext.c deleted file mode 100644 index d929f98..0000000 --- a/apt/intl/gettext.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Implementation of gettext(3) function. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#ifdef _LIBC -# define __need_NULL -# include <stddef.h> -#else -# ifdef STDC_HEADERS -# include <stdlib.h> /* Just for NULL. */ -# else -# ifdef HAVE_STRING_H -# include <string.h> -# else -# define NULL ((void *) 0) -# endif -# endif -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif - -/* @@ end of prolog @@ */ - -/* Names for the libintl functions are a problem. They must not clash - with existing names and they should follow ANSI C. But this source - code is also used in GNU C Library where the names have a __ - prefix. So we have to make a difference here. */ -#ifdef _LIBC -# define GETTEXT __gettext -# define DGETTEXT __dgettext -#else -# define GETTEXT gettext__ -# define DGETTEXT dgettext__ -#endif - -/* Look up MSGID in the current default message catalog for the current - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ -char * -GETTEXT (msgid) - const char *msgid; -{ - return DGETTEXT (NULL, msgid); -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__gettext, gettext); -#endif diff --git a/apt/intl/gettext.h b/apt/intl/gettext.h deleted file mode 100644 index 3cd23d7..0000000 --- a/apt/intl/gettext.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Internal header for GNU gettext internationalization functions. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _GETTEXT_H -#define _GETTEXT_H 1 - -#include <stdio.h> - -#if HAVE_LIMITS_H || _LIBC -# include <limits.h> -#endif - -/* @@ end of prolog @@ */ - -/* The magic number of the GNU message catalog format. */ -#define _MAGIC 0x950412de -#define _MAGIC_SWAPPED 0xde120495 - -/* Revision number of the currently used .mo (binary) file format. */ -#define MO_REVISION_NUMBER 0 - -/* The following contortions are an attempt to use the C preprocessor - to determine an unsigned integral type that is 32 bits wide. An - alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but - doing that would require that the configure script compile and *run* - the resulting executable. Locally running cross-compiled executables - is usually not possible. */ - -#if __STDC__ -# define UINT_MAX_32_BITS 4294967295U -#else -# define UINT_MAX_32_BITS 0xFFFFFFFF -#endif - -/* If UINT_MAX isn't defined, assume it's a 32-bit type. - This should be valid for all systems GNU cares about because - that doesn't include 16-bit systems, and only modern systems - (that certainly have <limits.h>) have 64+-bit integral types. */ - -#ifndef UINT_MAX -# define UINT_MAX UINT_MAX_32_BITS -#endif - -#if UINT_MAX == UINT_MAX_32_BITS -typedef unsigned nls_uint32; -#else -# if USHRT_MAX == UINT_MAX_32_BITS -typedef unsigned short nls_uint32; -# else -# if ULONG_MAX == UINT_MAX_32_BITS -typedef unsigned long nls_uint32; -# else - /* The following line is intended to throw an error. Using #error is - not portable enough. */ - "Cannot determine unsigned 32-bit data type." -# endif -# endif -#endif - - -/* Header for binary .mo file format. */ -struct mo_file_header -{ - /* The magic number. */ - nls_uint32 magic; - /* The revision number of the file format. */ - nls_uint32 revision; - /* The number of strings pairs. */ - nls_uint32 nstrings; - /* Offset of table with start offsets of original strings. */ - nls_uint32 orig_tab_offset; - /* Offset of table with start offsets of translation strings. */ - nls_uint32 trans_tab_offset; - /* Size of hashing table. */ - nls_uint32 hash_tab_size; - /* Offset of first hashing entry. */ - nls_uint32 hash_tab_offset; -}; - -struct string_desc -{ - /* Length of addressed string. */ - nls_uint32 length; - /* Offset of string in file. */ - nls_uint32 offset; -}; - -/* @@ begin of epilog @@ */ - -#endif /* gettext.h */ diff --git a/apt/intl/gettextP.h b/apt/intl/gettextP.h deleted file mode 100644 index 00c5203..0000000 --- a/apt/intl/gettextP.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Header describing internals of gettext library - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef _GETTEXTP_H -#define _GETTEXTP_H - -#include "loadinfo.h" - -/* @@ end of prolog @@ */ - -#ifndef PARAMS -# if __STDC__ -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - -#ifndef internal_function -# define internal_function -#endif - -#ifndef W -# define W(flag, data) ((flag) ? SWAP (data) : (data)) -#endif - - -#ifdef _LIBC -# include <byteswap.h> -# define SWAP(i) bswap_32 (i) -#else -static nls_uint32 SWAP PARAMS ((nls_uint32 i)); - -static inline nls_uint32 -SWAP (i) - nls_uint32 i; -{ - return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); -} -#endif - - -struct loaded_domain -{ - const char *data; - int use_mmap; - size_t mmap_size; - int must_swap; - nls_uint32 nstrings; - struct string_desc *orig_tab; - struct string_desc *trans_tab; - nls_uint32 hash_size; - nls_uint32 *hash_tab; -}; - -struct binding -{ - struct binding *next; - char *domainname; - char *dirname; -}; - -struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, - char *__locale, - const char *__domainname)) - internal_function; -void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) - internal_function; -void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) - internal_function; - -/* @@ begin of epilog @@ */ - -#endif /* gettextP.h */ diff --git a/apt/intl/hash-string.h b/apt/intl/hash-string.h deleted file mode 100644 index cacb38e..0000000 --- a/apt/intl/hash-string.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Implements a string hashing function. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* @@ end of prolog @@ */ - -#ifndef PARAMS -# if __STDC__ -# define PARAMS(Args) Args -# else -# define PARAMS(Args) () -# endif -#endif - -/* We assume to have `unsigned long int' value with at least 32 bits. */ -#define HASHWORDBITS 32 - - -/* Defines the so called `hashpjw' function by P.J. Weinberger - [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, - 1986, 1987 Bell Telephone Laboratories, Inc.] */ -static unsigned long hash_string PARAMS ((const char *__str_param)); - -static inline unsigned long -hash_string (str_param) - const char *str_param; -{ - unsigned long int hval, g; - const char *str = str_param; - - /* Compute the hash value for the given string. */ - hval = 0; - while (*str != '\0') - { - hval <<= 4; - hval += (unsigned long) *str++; - g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); - if (g != 0) - { - hval ^= g >> (HASHWORDBITS - 8); - hval ^= g; - } - } - return hval; -} diff --git a/apt/intl/intl-compat.c b/apt/intl/intl-compat.c deleted file mode 100644 index 503efa0..0000000 --- a/apt/intl/intl-compat.c +++ /dev/null @@ -1,76 +0,0 @@ -/* intl-compat.c - Stub functions to call gettext functions from GNU gettext - Library. - Copyright (C) 1995 Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include "libgettext.h" - -/* @@ end of prolog @@ */ - - -#undef gettext -#undef dgettext -#undef dcgettext -#undef textdomain -#undef bindtextdomain - - -char * -bindtextdomain (domainname, dirname) - const char *domainname; - const char *dirname; -{ - return bindtextdomain__ (domainname, dirname); -} - - -char * -dcgettext (domainname, msgid, category) - const char *domainname; - const char *msgid; - int category; -{ - return dcgettext__ (domainname, msgid, category); -} - - -char * -dgettext (domainname, msgid) - const char *domainname; - const char *msgid; -{ - return dgettext__ (domainname, msgid); -} - - -char * -gettext (msgid) - const char *msgid; -{ - return gettext__ (msgid); -} - - -char * -textdomain (domainname) - const char *domainname; -{ - return textdomain__ (domainname); -} diff --git a/apt/intl/l10nflist.c b/apt/intl/l10nflist.c deleted file mode 100644 index 9c7dc18..0000000 --- a/apt/intl/l10nflist.c +++ /dev/null @@ -1,411 +0,0 @@ -/* Handle list of needed message catalogs - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#if defined _LIBC || defined HAVE_ARGZ_H -# include <argz.h> -#endif -#include <ctype.h> -#include <sys/types.h> - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#include "loadinfo.h" - -/* On some strange systems still no definition of NULL is found. Sigh! */ -#ifndef NULL -# if defined __STDC__ && __STDC__ -# define NULL ((void *) 0) -# else -# define NULL 0 -# endif -#endif - -/* @@ end of prolog @@ */ - -#ifdef _LIBC -/* Rename the non ANSI C functions. This is required by the standard - because some ANSI C functions will require linking with this object - file and the name space must not be polluted. */ -# ifndef stpcpy -# define stpcpy(dest, src) __stpcpy(dest, src) -# endif -#else -# ifndef HAVE_STPCPY -static char *stpcpy PARAMS ((char *dest, const char *src)); -# endif -#endif - -/* Define function which are usually not available. */ - -#if !defined _LIBC && !defined HAVE___ARGZ_COUNT -/* Returns the number of strings in ARGZ. */ -static size_t argz_count__ PARAMS ((const char *argz, size_t len)); - -static size_t -argz_count__ (argz, len) - const char *argz; - size_t len; -{ - size_t count = 0; - while (len > 0) - { - size_t part_len = strlen (argz); - argz += part_len + 1; - len -= part_len + 1; - count++; - } - return count; -} -# undef __argz_count -# define __argz_count(argz, len) argz_count__ (argz, len) -#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ - -#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY -/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's - except the last into the character SEP. */ -static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); - -static void -argz_stringify__ (argz, len, sep) - char *argz; - size_t len; - int sep; -{ - while (len > 0) - { - size_t part_len = strlen (argz); - argz += part_len; - len -= part_len + 1; - if (len > 0) - *argz++ = sep; - } -} -# undef __argz_stringify -# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) -#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ - -#if !defined _LIBC && !defined HAVE___ARGZ_NEXT -static char *argz_next__ PARAMS ((char *argz, size_t argz_len, - const char *entry)); - -static char * -argz_next__ (argz, argz_len, entry) - char *argz; - size_t argz_len; - const char *entry; -{ - if (entry) - { - if (entry < argz + argz_len) - entry = strchr (entry, '\0') + 1; - - return entry >= argz + argz_len ? NULL : (char *) entry; - } - else - if (argz_len > 0) - return argz; - else - return 0; -} -# undef __argz_next -# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) -#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ - - -/* Return number of bits set in X. */ -static int pop PARAMS ((int x)); - -static inline int -pop (x) - int x; -{ - /* We assume that no more than 16 bits are used. */ - x = ((x & ~0x5555) >> 1) + (x & 0x5555); - x = ((x & ~0x3333) >> 2) + (x & 0x3333); - x = ((x >> 4) + x) & 0x0f0f; - x = ((x >> 8) + x) & 0xff; - - return x; -} - - -struct loaded_l10nfile * -_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, - territory, codeset, normalized_codeset, modifier, special, - sponsor, revision, filename, do_allocate) - struct loaded_l10nfile **l10nfile_list; - const char *dirlist; - size_t dirlist_len; - int mask; - const char *language; - const char *territory; - const char *codeset; - const char *normalized_codeset; - const char *modifier; - const char *special; - const char *sponsor; - const char *revision; - const char *filename; - int do_allocate; -{ - char *abs_filename; - struct loaded_l10nfile *last = NULL; - struct loaded_l10nfile *retval; - char *cp; - size_t entries; - int cnt; - - /* Allocate room for the full file name. */ - abs_filename = (char *) malloc (dirlist_len - + strlen (language) - + ((mask & TERRITORY) != 0 - ? strlen (territory) + 1 : 0) - + ((mask & XPG_CODESET) != 0 - ? strlen (codeset) + 1 : 0) - + ((mask & XPG_NORM_CODESET) != 0 - ? strlen (normalized_codeset) + 1 : 0) - + (((mask & XPG_MODIFIER) != 0 - || (mask & CEN_AUDIENCE) != 0) - ? strlen (modifier) + 1 : 0) - + ((mask & CEN_SPECIAL) != 0 - ? strlen (special) + 1 : 0) - + (((mask & CEN_SPONSOR) != 0 - || (mask & CEN_REVISION) != 0) - ? (1 + ((mask & CEN_SPONSOR) != 0 - ? strlen (sponsor) + 1 : 0) - + ((mask & CEN_REVISION) != 0 - ? strlen (revision) + 1 : 0)) : 0) - + 1 + strlen (filename) + 1); - - if (abs_filename == NULL) - return NULL; - - retval = NULL; - last = NULL; - - /* Construct file name. */ - memcpy (abs_filename, dirlist, dirlist_len); - __argz_stringify (abs_filename, dirlist_len, ':'); - cp = abs_filename + (dirlist_len - 1); - *cp++ = '/'; - cp = stpcpy (cp, language); - - if ((mask & TERRITORY) != 0) - { - *cp++ = '_'; - cp = stpcpy (cp, territory); - } - if ((mask & XPG_CODESET) != 0) - { - *cp++ = '.'; - cp = stpcpy (cp, codeset); - } - if ((mask & XPG_NORM_CODESET) != 0) - { - *cp++ = '.'; - cp = stpcpy (cp, normalized_codeset); - } - if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) - { - /* This component can be part of both syntaces but has different - leading characters. For CEN we use `+', else `@'. */ - *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; - cp = stpcpy (cp, modifier); - } - if ((mask & CEN_SPECIAL) != 0) - { - *cp++ = '+'; - cp = stpcpy (cp, special); - } - if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) - { - *cp++ = ','; - if ((mask & CEN_SPONSOR) != 0) - cp = stpcpy (cp, sponsor); - if ((mask & CEN_REVISION) != 0) - { - *cp++ = '_'; - cp = stpcpy (cp, revision); - } - } - - *cp++ = '/'; - stpcpy (cp, filename); - - /* Look in list of already loaded domains whether it is already - available. */ - last = NULL; - for (retval = *l10nfile_list; retval != NULL; retval = retval->next) - if (retval->filename != NULL) - { - int compare = strcmp (retval->filename, abs_filename); - if (compare == 0) - /* We found it! */ - break; - if (compare < 0) - { - /* It's not in the list. */ - retval = NULL; - break; - } - - last = retval; - } - - if (retval != NULL || do_allocate == 0) - { - free (abs_filename); - return retval; - } - - retval = (struct loaded_l10nfile *) - malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) - * (1 << pop (mask)) - * sizeof (struct loaded_l10nfile *))); - if (retval == NULL) - return NULL; - - retval->filename = abs_filename; - retval->decided = (__argz_count (dirlist, dirlist_len) != 1 - || ((mask & XPG_CODESET) != 0 - && (mask & XPG_NORM_CODESET) != 0)); - retval->data = NULL; - - if (last == NULL) - { - retval->next = *l10nfile_list; - *l10nfile_list = retval; - } - else - { - retval->next = last->next; - last->next = retval; - } - - entries = 0; - /* If the DIRLIST is a real list the RETVAL entry corresponds not to - a real file. So we have to use the DIRLIST separation mechanism - of the inner loop. */ - cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; - for (; cnt >= 0; --cnt) - if ((cnt & ~mask) == 0 - && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) - && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) - { - /* Iterate over all elements of the DIRLIST. */ - char *dir = NULL; - - while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) - != NULL) - retval->successor[entries++] - = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, - language, territory, codeset, - normalized_codeset, modifier, special, - sponsor, revision, filename, 1); - } - retval->successor[entries] = NULL; - - return retval; -} - -/* Normalize codeset name. There is no standard for the codeset - names. Normalization allows the user to use any of the common - names. */ -const char * -_nl_normalize_codeset (codeset, name_len) - const unsigned char *codeset; - size_t name_len; -{ - int len = 0; - int only_digit = 1; - char *retval; - char *wp; - size_t cnt; - - for (cnt = 0; cnt < name_len; ++cnt) - if (isalnum (codeset[cnt])) - { - ++len; - - if (isalpha (codeset[cnt])) - only_digit = 0; - } - - retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); - - if (retval != NULL) - { - if (only_digit) - wp = stpcpy (retval, "iso"); - else - wp = retval; - - for (cnt = 0; cnt < name_len; ++cnt) - if (isalpha (codeset[cnt])) - *wp++ = tolower (codeset[cnt]); - else if (isdigit (codeset[cnt])) - *wp++ = codeset[cnt]; - - *wp = '\0'; - } - - return (const char *) retval; -} - - -/* @@ begin of epilog @@ */ - -/* We don't want libintl.a to depend on any other library. So we - avoid the non-standard function stpcpy. In GNU C Library this - function is available, though. Also allow the symbol HAVE_STPCPY - to be defined. */ -#if !_LIBC && !HAVE_STPCPY -static char * -stpcpy (dest, src) - char *dest; - const char *src; -{ - while ((*dest++ = *src++) != '\0') - /* Do nothing. */ ; - return dest - 1; -} -#endif diff --git a/apt/intl/libgettext.h b/apt/intl/libgettext.h deleted file mode 100644 index 3a92960..0000000 --- a/apt/intl/libgettext.h +++ /dev/null @@ -1,182 +0,0 @@ -/* Message catalogs for internationalization. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* Because on some systems (e.g. Solaris) we sometimes have to include - the systems libintl.h as well as this file we have more complex - include protection above. But the systems header might perhaps also - define _LIBINTL_H and therefore we have to protect the definition here. */ - -#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H -#ifndef _LIBINTL_H -# define _LIBINTL_H 1 -#endif -#define _LIBGETTEXT_H 1 - -/* We define an additional symbol to signal that we use the GNU - implementation of gettext. */ -#define __USE_GNU_GETTEXT 1 - -#include <sys/types.h> - -#if HAVE_LOCALE_H -# include <locale.h> -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -/* @@ end of prolog @@ */ - -#ifndef PARAMS -# if __STDC__ || defined __cplusplus -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - -#ifndef NULL -# if !defined __cplusplus || defined __GNUC__ -# define NULL ((void *) 0) -# else -# define NULL (0) -# endif -#endif - -#if !HAVE_LC_MESSAGES -/* This value determines the behaviour of the gettext() and dgettext() - function. But some system does not have this defined. Define it - to a default value. */ -# define LC_MESSAGES (-1) -#endif - - -/* Declarations for gettext-using-catgets interface. Derived from - Jim Meyering's libintl.h. */ -struct _msg_ent -{ - const char *_msg; - int _msg_number; -}; - - -#if HAVE_CATGETS -/* These two variables are defined in the automatically by po-to-tbl.sed - generated file `cat-id-tbl.c'. */ -extern const struct _msg_ent _msg_tbl[]; -extern int _msg_tbl_length; -#endif - - -/* For automatical extraction of messages sometimes no real - translation is needed. Instead the string itself is the result. */ -#define gettext_noop(Str) (Str) - -/* Look up MSGID in the current default message catalog for the current - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ -extern char *gettext PARAMS ((const char *__msgid)); -extern char *gettext__ PARAMS ((const char *__msgid)); - -/* Look up MSGID in the DOMAINNAME message catalog for the current - LC_MESSAGES locale. */ -extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); -extern char *dgettext__ PARAMS ((const char *__domainname, - const char *__msgid)); - -/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ -extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, - int __category)); -extern char *dcgettext__ PARAMS ((const char *__domainname, - const char *__msgid, int __category)); - - -/* Set the current default message catalog to DOMAINNAME. - If DOMAINNAME is null, return the current default. - If DOMAINNAME is "", reset to the default of "messages". */ -extern char *textdomain PARAMS ((const char *__domainname)); -extern char *textdomain__ PARAMS ((const char *__domainname)); - -/* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -extern char *bindtextdomain PARAMS ((const char *__domainname, - const char *__dirname)); -extern char *bindtextdomain__ PARAMS ((const char *__domainname, - const char *__dirname)); - -#if ENABLE_NLS - -/* Solaris 2.3 has the gettext function but dcgettext is missing. - So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 - has dcgettext. */ -# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) - -# define gettext(Msgid) \ - dgettext (NULL, Msgid) - -# define dgettext(Domainname, Msgid) \ - dcgettext (Domainname, Msgid, LC_MESSAGES) - -# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 -/* This global variable is defined in loadmsgcat.c. We need a sign, - whether a new catalog was loaded, which can be associated with all - translations. */ -extern int _nl_msg_cat_cntr; - -# define dcgettext(Domainname, Msgid, Category) \ - (__extension__ \ - ({ \ - char *__result; \ - if (__builtin_constant_p (Msgid)) \ - { \ - static char *__translation__; \ - static int __catalog_counter__; \ - if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ - { \ - __translation__ = \ - dcgettext__ (Domainname, Msgid, Category); \ - __catalog_counter__ = _nl_msg_cat_cntr; \ - } \ - __result = __translation__; \ - } \ - else \ - __result = dcgettext__ (Domainname, Msgid, Category); \ - __result; \ - })) -# endif -# endif - -#else - -# define gettext(Msgid) (Msgid) -# define dgettext(Domainname, Msgid) (Msgid) -# define dcgettext(Domainname, Msgid, Category) (Msgid) -# define textdomain(Domainname) ((char *) Domainname) -# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) - -#endif - -/* @@ begin of epilog @@ */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/apt/intl/linux-msg.sed b/apt/intl/linux-msg.sed deleted file mode 100644 index 5918e72..0000000 --- a/apt/intl/linux-msg.sed +++ /dev/null @@ -1,100 +0,0 @@ -# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file -# Copyright (C) 1995 Free Software Foundation, Inc. -# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# -# The first directive in the .msg should be the definition of the -# message set number. We use always set number 1. -# -1 { - i\ -$set 1 # Automatically created by po2msg.sed - h - s/.*/0/ - x -} -# -# Mitch's old catalog format does not allow comments. -# -# We copy the original message as a comment into the .msg file. -# -/^msgid/ { - s/msgid[ ]*"// -# -# This does not work now with the new format. -# /"$/! { -# s/\\$// -# s/$/ ... (more lines following)"/ -# } - x -# The following nice solution is by -# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> - td -# Increment a decimal number in pattern space. -# First hide trailing `9' digits. - :d - s/9\(_*\)$/_\1/ - td -# Assure at least one digit is available. - s/^\(_*\)$/0\1/ -# Increment the last digit. - s/8\(_*\)$/9\1/ - s/7\(_*\)$/8\1/ - s/6\(_*\)$/7\1/ - s/5\(_*\)$/6\1/ - s/4\(_*\)$/5\1/ - s/3\(_*\)$/4\1/ - s/2\(_*\)$/3\1/ - s/1\(_*\)$/2\1/ - s/0\(_*\)$/1\1/ -# Convert the hidden `9' digits to `0's. - s/_/0/g - x - G - s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p -} -# -# The .msg file contains, other then the .po file, only the translations -# but each given a unique ID. Starting from 1 and incrementing by 1 for -# each message we assign them to the messages. -# It is important that the .po file used to generate the cat-id-tbl.c file -# (with po-to-tbl) is the same as the one used here. (At least the order -# of declarations must not be changed.) -# -/^msgstr/ { - s/msgstr[ ]*"\(.*\)"/# \1/ -# Clear substitution flag. - tb -# Append the next line. - :b - N -# Look whether second part is continuation line. - s/\(.*\n\)"\(.*\)"/\1\2/ -# Yes, then branch. - ta - P - D -# Note that D includes a jump to the start!! -# We found a continuation line. But before printing insert '\'. - :a - s/\(.*\)\(\n.*\)/\1\\\2/ - P -# We cannot use D here. - s/.*\n\(.*\)/\1/ - tb -} -d diff --git a/apt/intl/loadinfo.h b/apt/intl/loadinfo.h deleted file mode 100644 index f4ebf6d..0000000 --- a/apt/intl/loadinfo.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef PARAMS -# if __STDC__ -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - -/* Encoding of locale name parts. */ -#define CEN_REVISION 1 -#define CEN_SPONSOR 2 -#define CEN_SPECIAL 4 -#define XPG_NORM_CODESET 8 -#define XPG_CODESET 16 -#define TERRITORY 32 -#define CEN_AUDIENCE 64 -#define XPG_MODIFIER 128 - -#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) -#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) - - -struct loaded_l10nfile -{ - const char *filename; - int decided; - - const void *data; - - struct loaded_l10nfile *next; - struct loaded_l10nfile *successor[1]; -}; - - -extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset, - size_t name_len)); - -extern struct loaded_l10nfile * -_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, - const char *dirlist, size_t dirlist_len, int mask, - const char *language, const char *territory, - const char *codeset, - const char *normalized_codeset, - const char *modifier, const char *special, - const char *sponsor, const char *revision, - const char *filename, int do_allocate)); - - -extern const char *_nl_expand_alias PARAMS ((const char *name)); - -extern int _nl_explode_name PARAMS ((char *name, const char **language, - const char **modifier, - const char **territory, - const char **codeset, - const char **normalized_codeset, - const char **special, - const char **sponsor, - const char **revision)); diff --git a/apt/intl/loadmsgcat.c b/apt/intl/loadmsgcat.c deleted file mode 100644 index 515892d..0000000 --- a/apt/intl/loadmsgcat.c +++ /dev/null @@ -1,222 +0,0 @@ -/* Load needed message catalogs. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <fcntl.h> -#include <sys/types.h> -#include <sys/stat.h> - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include <unistd.h> -#endif - -#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC -# include <sys/mman.h> -#endif - -#include "gettext.h" -#include "gettextP.h" - -/* @@ end of prolog @@ */ - -#ifdef _LIBC -/* Rename the non ISO C functions. This is required by the standard - because some ISO C functions will require linking with this object - file and the name space must not be polluted. */ -# define open __open -# define close __close -# define read __read -# define mmap __mmap -# define munmap __munmap -#endif - -/* We need a sign, whether a new catalog was loaded, which can be associated - with all translations. This is important if the translations are - cached by one of GCC's features. */ -int _nl_msg_cat_cntr = 0; - - -/* Load the message catalogs specified by FILENAME. If it is no valid - message catalog do nothing. */ -void -internal_function -_nl_load_domain (domain_file) - struct loaded_l10nfile *domain_file; -{ - int fd; - size_t size; - struct stat st; - struct mo_file_header *data = (struct mo_file_header *) -1; -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - int use_mmap = 0; -#endif - struct loaded_domain *domain; - - domain_file->decided = 1; - domain_file->data = NULL; - - /* If the record does not represent a valid locale the FILENAME - might be NULL. This can happen when according to the given - specification the locale file name is different for XPG and CEN - syntax. */ - if (domain_file->filename == NULL) - return; - - /* Try to open the addressed file. */ - fd = open (domain_file->filename, O_RDONLY); - if (fd == -1) - return; - - /* We must know about the size of the file. */ - if (fstat (fd, &st) != 0 - || (size = (size_t) st.st_size) != st.st_size - || size < sizeof (struct mo_file_header)) - { - /* Something went wrong. */ - close (fd); - return; - } - -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - /* Now we are ready to load the file. If mmap() is available we try - this first. If not available or it failed we try to load it. */ - data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, - MAP_PRIVATE, fd, 0); - - if (data != (struct mo_file_header *) -1) - { - /* mmap() call was successful. */ - close (fd); - use_mmap = 1; - } -#endif - - /* If the data is not yet available (i.e. mmap'ed) we try to load - it manually. */ - if (data == (struct mo_file_header *) -1) - { - size_t to_read; - char *read_ptr; - - data = (struct mo_file_header *) malloc (size); - if (data == NULL) - return; - - to_read = size; - read_ptr = (char *) data; - do - { - long int nb = (long int) read (fd, read_ptr, to_read); - if (nb == -1) - { - close (fd); - return; - } - - read_ptr += nb; - to_read -= nb; - } - while (to_read > 0); - - close (fd); - } - - /* Using the magic number we can test whether it really is a message - catalog file. */ - if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) - { - /* The magic number is wrong: not a message catalog file. */ -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - if (use_mmap) - munmap ((caddr_t) data, size); - else -#endif - free (data); - return; - } - - domain_file->data - = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); - if (domain_file->data == NULL) - return; - - domain = (struct loaded_domain *) domain_file->data; - domain->data = (char *) data; -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - domain->use_mmap = use_mmap; -#endif - domain->mmap_size = size; - domain->must_swap = data->magic != _MAGIC; - - /* Fill in the information about the available tables. */ - switch (W (domain->must_swap, data->revision)) - { - case 0: - domain->nstrings = W (domain->must_swap, data->nstrings); - domain->orig_tab = (struct string_desc *) - ((char *) data + W (domain->must_swap, data->orig_tab_offset)); - domain->trans_tab = (struct string_desc *) - ((char *) data + W (domain->must_swap, data->trans_tab_offset)); - domain->hash_size = W (domain->must_swap, data->hash_tab_size); - domain->hash_tab = (nls_uint32 *) - ((char *) data + W (domain->must_swap, data->hash_tab_offset)); - break; - default: - /* This is an illegal revision. */ -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - if (use_mmap) - munmap ((caddr_t) data, size); - else -#endif - free (data); - free (domain); - domain_file->data = NULL; - return; - } - - /* Show that one domain is changed. This might make some cached - translations invalid. */ - ++_nl_msg_cat_cntr; -} - - -#ifdef _LIBC -void -internal_function -_nl_unload_domain (domain) - struct loaded_domain *domain; -{ - if (domain->use_mmap) - munmap ((caddr_t) domain->data, domain->mmap_size); - else - free ((void *) domain->data); - - free (domain); -} -#endif diff --git a/apt/intl/localealias.c b/apt/intl/localealias.c deleted file mode 100644 index 7365454..0000000 --- a/apt/intl/localealias.c +++ /dev/null @@ -1,424 +0,0 @@ -/* Handle aliases for locale names. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <ctype.h> -#include <stdio.h> -#include <sys/types.h> - -#ifdef __GNUC__ -# define alloca __builtin_alloca -# define HAVE_ALLOCA 1 -#else -# if defined HAVE_ALLOCA_H || defined _LIBC -# include <alloca.h> -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca -char *alloca (); -# endif -# endif -# endif -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), Dst) -# endif -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#include "gettext.h" -#include "gettextP.h" - -/* @@ end of prolog @@ */ - -#ifdef _LIBC -/* Rename the non ANSI C functions. This is required by the standard - because some ANSI C functions will require linking with this object - file and the name space must not be polluted. */ -# define strcasecmp __strcasecmp - -# define mempcpy __mempcpy -# define HAVE_MEMPCPY 1 - -/* We need locking here since we can be called from different places. */ -# include <bits/libc-lock.h> - -__libc_lock_define_initialized (static, lock); -#endif - - -/* For those loosing systems which don't have `alloca' we have to add - some additional code emulating it. */ -#ifdef HAVE_ALLOCA -/* Nothing has to be done. */ -# define ADD_BLOCK(list, address) /* nothing */ -# define FREE_BLOCKS(list) /* nothing */ -#else -struct block_list -{ - void *address; - struct block_list *next; -}; -# define ADD_BLOCK(list, addr) \ - do { \ - struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ - /* If we cannot get a free block we cannot add the new element to \ - the list. */ \ - if (newp != NULL) { \ - newp->address = (addr); \ - newp->next = (list); \ - (list) = newp; \ - } \ - } while (0) -# define FREE_BLOCKS(list) \ - do { \ - while (list != NULL) { \ - struct block_list *old = list; \ - list = list->next; \ - free (old); \ - } \ - } while (0) -# undef alloca -# define alloca(size) (malloc (size)) -#endif /* have alloca */ - - -struct alias_map -{ - const char *alias; - const char *value; -}; - - -static char *string_space = NULL; -static size_t string_space_act = 0; -static size_t string_space_max = 0; -static struct alias_map *map; -static size_t nmap = 0; -static size_t maxmap = 0; - - -/* Prototypes for local functions. */ -static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) - internal_function; -static void extend_alias_table PARAMS ((void)); -static int alias_compare PARAMS ((const struct alias_map *map1, - const struct alias_map *map2)); - - -const char * -_nl_expand_alias (name) - const char *name; -{ - static const char *locale_alias_path = LOCALE_ALIAS_PATH; - struct alias_map *retval; - const char *result = NULL; - size_t added; - -#ifdef _LIBC - __libc_lock_lock (lock); -#endif - - do - { - struct alias_map item; - - item.alias = name; - - if (nmap > 0) - retval = (struct alias_map *) bsearch (&item, map, nmap, - sizeof (struct alias_map), - (int (*) PARAMS ((const void *, - const void *)) - ) alias_compare); - else - retval = NULL; - - /* We really found an alias. Return the value. */ - if (retval != NULL) - { - result = retval->value; - break; - } - - /* Perhaps we can find another alias file. */ - added = 0; - while (added == 0 && locale_alias_path[0] != '\0') - { - const char *start; - - while (locale_alias_path[0] == ':') - ++locale_alias_path; - start = locale_alias_path; - - while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':') - ++locale_alias_path; - - if (start < locale_alias_path) - added = read_alias_file (start, locale_alias_path - start); - } - } - while (added != 0); - -#ifdef _LIBC - __libc_lock_unlock (lock); -#endif - - return result; -} - - -static size_t -internal_function -read_alias_file (fname, fname_len) - const char *fname; - int fname_len; -{ -#ifndef HAVE_ALLOCA - struct block_list *block_list = NULL; -#endif - FILE *fp; - char *full_fname; - size_t added; - static const char aliasfile[] = "/locale.alias"; - - full_fname = (char *) alloca (fname_len + sizeof aliasfile); - ADD_BLOCK (block_list, full_fname); -#ifdef HAVE_MEMPCPY - mempcpy (mempcpy (full_fname, fname, fname_len), - aliasfile, sizeof aliasfile); -#else - memcpy (full_fname, fname, fname_len); - memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); -#endif - - fp = fopen (full_fname, "r"); - if (fp == NULL) - { - FREE_BLOCKS (block_list); - return 0; - } - - added = 0; - while (!feof (fp)) - { - /* It is a reasonable approach to use a fix buffer here because - a) we are only interested in the first two fields - b) these fields must be usable as file names and so must not - be that long - */ - char buf[BUFSIZ]; - char *alias; - char *value; - unsigned char *cp; - - if (fgets (buf, sizeof buf, fp) == NULL) - /* EOF reached. */ - break; - - /* Possibly not the whole line fits into the buffer. Ignore - the rest of the line. */ - if (strchr (buf, '\n') == NULL) - { - char altbuf[BUFSIZ]; - do - if (fgets (altbuf, sizeof altbuf, fp) == NULL) - /* Make sure the inner loop will be left. The outer loop - will exit at the `feof' test. */ - break; - while (strchr (altbuf, '\n') == NULL); - } - - cp = (unsigned char *) buf; - /* Ignore leading white space. */ - while (isspace (cp[0])) - ++cp; - - /* A leading '#' signals a comment line. */ - if (cp[0] != '\0' && cp[0] != '#') - { - alias = (char *) cp++; - while (cp[0] != '\0' && !isspace (cp[0])) - ++cp; - /* Terminate alias name. */ - if (cp[0] != '\0') - *cp++ = '\0'; - - /* Now look for the beginning of the value. */ - while (isspace (cp[0])) - ++cp; - - if (cp[0] != '\0') - { - size_t alias_len; - size_t value_len; - - value = (char *) cp++; - while (cp[0] != '\0' && !isspace (cp[0])) - ++cp; - /* Terminate value. */ - if (cp[0] == '\n') - { - /* This has to be done to make the following test - for the end of line possible. We are looking for - the terminating '\n' which do not overwrite here. */ - *cp++ = '\0'; - *cp = '\n'; - } - else if (cp[0] != '\0') - *cp++ = '\0'; - - if (nmap >= maxmap) - extend_alias_table (); - - alias_len = strlen (alias) + 1; - value_len = strlen (value) + 1; - - if (string_space_act + alias_len + value_len > string_space_max) - { - /* Increase size of memory pool. */ - size_t new_size = (string_space_max - + (alias_len + value_len > 1024 - ? alias_len + value_len : 1024)); - char *new_pool = (char *) realloc (string_space, new_size); - if (new_pool == NULL) - { - FREE_BLOCKS (block_list); - return added; - } - string_space = new_pool; - string_space_max = new_size; - } - - map[nmap].alias = memcpy (&string_space[string_space_act], - alias, alias_len); - string_space_act += alias_len; - - map[nmap].value = memcpy (&string_space[string_space_act], - value, value_len); - string_space_act += value_len; - - ++nmap; - ++added; - } - } - } - - /* Should we test for ferror()? I think we have to silently ignore - errors. --drepper */ - fclose (fp); - - if (added > 0) - qsort (map, nmap, sizeof (struct alias_map), - (int (*) PARAMS ((const void *, const void *))) alias_compare); - - FREE_BLOCKS (block_list); - return added; -} - - -static void -extend_alias_table () -{ - size_t new_size; - struct alias_map *new_map; - - new_size = maxmap == 0 ? 100 : 2 * maxmap; - new_map = (struct alias_map *) realloc (map, (new_size - * sizeof (struct alias_map))); - if (new_map == NULL) - /* Simply don't extend: we don't have any more core. */ - return; - - map = new_map; - maxmap = new_size; -} - - -#ifdef _LIBC -static void __attribute__ ((unused)) -free_mem (void) -{ - if (string_space != NULL) - free (string_space); - if (map != NULL) - free (map); -} -text_set_element (__libc_subfreeres, free_mem); -#endif - - -static int -alias_compare (map1, map2) - const struct alias_map *map1; - const struct alias_map *map2; -{ -#if defined _LIBC || defined HAVE_STRCASECMP - return strcasecmp (map1->alias, map2->alias); -#else - const unsigned char *p1 = (const unsigned char *) map1->alias; - const unsigned char *p2 = (const unsigned char *) map2->alias; - unsigned char c1, c2; - - if (p1 == p2) - return 0; - - do - { - /* I know this seems to be odd but the tolower() function in - some systems libc cannot handle nonalpha characters. */ - c1 = isupper (*p1) ? tolower (*p1) : *p1; - c2 = isupper (*p2) ? tolower (*p2) : *p2; - if (c1 == '\0') - break; - ++p1; - ++p2; - } - while (c1 == c2); - - return c1 - c2; -#endif -} diff --git a/apt/intl/po2tbl.sed.in b/apt/intl/po2tbl.sed.in deleted file mode 100644 index ee89f8b..0000000 --- a/apt/intl/po2tbl.sed.in +++ /dev/null @@ -1,106 +0,0 @@ -# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets -# Copyright (C) 1995 Free Software Foundation, Inc. -# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -1 { - i\ -/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ -\ -#if HAVE_CONFIG_H\ -# include <config.h>\ -#endif\ -\ -#include "libgettext.h"\ -\ -const struct _msg_ent _msg_tbl[] = { - h - s/.*/0/ - x -} -# -# Write msgid entries in C array form. -# -/^msgid/ { - s/msgid[ ]*\(".*"\)/ {\1/ - tb -# Append the next line - :b - N -# Look whether second part is continuation line. - s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ -# Yes, then branch. - ta -# Because we assume that the input file correctly formed the line -# just read cannot be again be a msgid line. So it's safe to ignore -# it. - s/\(.*\)\n.*/\1/ - bc -# We found a continuation line. But before printing insert '\'. - :a - s/\(.*\)\(\n.*\)/\1\\\2/ -# Escape trigraphs. - s/[?][?]\([-=(/)'<!>]\)/?\\?\1/g - P -# We cannot use D here. - s/.*\n\(.*\)/\1/ -# Some buggy seds do not clear the `successful substitution since last ``t''' -# flag on `N', so we do a `t' here to clear it. - tb -# Not reached - :c - x -# The following nice solution is by -# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> - td -# Increment a decimal number in pattern space. -# First hide trailing `9' digits. - :d - s/9\(_*\)$/_\1/ - td -# Assure at least one digit is available. - s/^\(_*\)$/0\1/ -# Increment the last digit. - s/8\(_*\)$/9\1/ - s/7\(_*\)$/8\1/ - s/6\(_*\)$/7\1/ - s/5\(_*\)$/6\1/ - s/4\(_*\)$/5\1/ - s/3\(_*\)$/4\1/ - s/2\(_*\)$/3\1/ - s/1\(_*\)$/2\1/ - s/0\(_*\)$/1\1/ -# Convert the hidden `9' digits to `0's. - s/_/0/g - x - G - s/\(.*\)\n\([0-9]*\)/\1, \2},/ - s/\(.*\)"$/\1/ -# Escape trigraphs. - s/[?][?]\([-=(/)'<!>]\)/?\\?\1/g - p -} -# -# Last line. -# -$ { - i\ -};\ - - g - s/0*\(.*\)/int _msg_tbl_length = \1;/p -} -d diff --git a/apt/intl/textdomain.c b/apt/intl/textdomain.c deleted file mode 100644 index 8855746..0000000 --- a/apt/intl/textdomain.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Implementation of the textdomain(3) function. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif - -/* @@ end of prolog @@ */ - -/* Name of the default text domain. */ -extern const char _nl_default_default_domain[]; - -/* Default text domain in which entries for gettext(3) are to be found. */ -extern const char *_nl_current_default_domain; - - -/* Names for the libintl functions are a problem. They must not clash - with existing names and they should follow ANSI C. But this source - code is also used in GNU C Library where the names have a __ - prefix. So we have to make a difference here. */ -#ifdef _LIBC -# define TEXTDOMAIN __textdomain -# ifndef strdup -# define strdup(str) __strdup (str) -# endif -#else -# define TEXTDOMAIN textdomain__ -#endif - -/* Set the current default message catalog to DOMAINNAME. - If DOMAINNAME is null, return the current default. - If DOMAINNAME is "", reset to the default of "messages". */ -char * -TEXTDOMAIN (domainname) - const char *domainname; -{ - char *old; - - /* A NULL pointer requests the current setting. */ - if (domainname == NULL) - return (char *) _nl_current_default_domain; - - old = (char *) _nl_current_default_domain; - - /* If domain name is the null string set to default domain "messages". */ - if (domainname[0] == '\0' - || strcmp (domainname, _nl_default_default_domain) == 0) - _nl_current_default_domain = _nl_default_default_domain; - else - { - /* If the following malloc fails `_nl_current_default_domain' - will be NULL. This value will be returned and so signals we - are out of core. */ -#if defined _LIBC || defined HAVE_STRDUP - _nl_current_default_domain = strdup (domainname); -#else - size_t len = strlen (domainname) + 1; - char *cp = (char *) malloc (len); - if (cp != NULL) - memcpy (cp, domainname, len); - _nl_current_default_domain = cp; -#endif - } - - if (old != _nl_default_default_domain) - free (old); - - return (char *) _nl_current_default_domain; -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__textdomain, textdomain); -#endif diff --git a/apt/intl/xopen-msg.sed b/apt/intl/xopen-msg.sed deleted file mode 100644 index b19c0bb..0000000 --- a/apt/intl/xopen-msg.sed +++ /dev/null @@ -1,104 +0,0 @@ -# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file -# Copyright (C) 1995 Free Software Foundation, Inc. -# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# -# The first directive in the .msg should be the definition of the -# message set number. We use always set number 1. -# -1 { - i\ -$set 1 # Automatically created by po2msg.sed - h - s/.*/0/ - x -} -# -# We copy all comments into the .msg file. Perhaps they can help. -# -/^#/ s/^#[ ]*/$ /p -# -# We copy the original message as a comment into the .msg file. -# -/^msgid/ { -# Does not work now -# /"$/! { -# s/\\$// -# s/$/ ... (more lines following)"/ -# } - s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/ - p -} -# -# The .msg file contains, other then the .po file, only the translations -# but each given a unique ID. Starting from 1 and incrementing by 1 for -# each message we assign them to the messages. -# It is important that the .po file used to generate the cat-id-tbl.c file -# (with po-to-tbl) is the same as the one used here. (At least the order -# of declarations must not be changed.) -# -/^msgstr/ { - s/msgstr[ ]*"\(.*\)"/\1/ - x -# The following nice solution is by -# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> - td -# Increment a decimal number in pattern space. -# First hide trailing `9' digits. - :d - s/9\(_*\)$/_\1/ - td -# Assure at least one digit is available. - s/^\(_*\)$/0\1/ -# Increment the last digit. - s/8\(_*\)$/9\1/ - s/7\(_*\)$/8\1/ - s/6\(_*\)$/7\1/ - s/5\(_*\)$/6\1/ - s/4\(_*\)$/5\1/ - s/3\(_*\)$/4\1/ - s/2\(_*\)$/3\1/ - s/1\(_*\)$/2\1/ - s/0\(_*\)$/1\1/ -# Convert the hidden `9' digits to `0's. - s/_/0/g - x -# Bring the line in the format `<number> <message>' - G - s/^[^\n]*$/& / - s/\(.*\)\n\([0-9]*\)/\2 \1/ -# Clear flag from last substitution. - tb -# Append the next line. - :b - N -# Look whether second part is a continuation line. - s/\(.*\n\)"\(.*\)"/\1\2/ -# Yes, then branch. - ta - P - D -# Note that `D' includes a jump to the start!! -# We found a continuation line. But before printing insert '\'. - :a - s/\(.*\)\(\n.*\)/\1\\\2/ - P -# We cannot use the sed command `D' here - s/.*\n\(.*\)/\1/ - tb -} -d diff --git a/apt/methods/CVS/Entries b/apt/methods/CVS/Entries deleted file mode 100644 index 0fd23d9..0000000 --- a/apt/methods/CVS/Entries +++ /dev/null @@ -1,17 +0,0 @@ -/file.cc/1.2/Wed Aug 1 21:35:12 2001// -/cdrom.cc/1.3/Fri Aug 10 14:03:40 2001// -/connect.h/1.1.1.1/Fri Aug 10 14:03:40 2001// -/copy.cc/1.1.1.1/Fri Aug 10 14:03:40 2001// -/ftp.cc/1.3/Fri Aug 10 14:03:44 2001// -/ftp.h/1.1.1.1/Fri Aug 10 14:03:46 2001// -/gzip.cc/1.2/Fri Aug 10 14:03:46 2001// -/http.cc/1.3/Fri Aug 10 14:03:48 2001// -/http.h/1.1.1.1/Fri Aug 10 14:03:50 2001// -/makefile/1.7/Fri Aug 10 14:03:50 2001// -/rfc2553emu.cc/1.1.1.1/Fri Aug 10 14:03:58 2001// -/rfc2553emu.h/1.1.1.1/Fri Aug 10 14:03:58 2001// -/connect.cc/1.2/Tue Nov 13 14:24:16 2001// -/gpg.cc/1.7/Fri Nov 16 01:13:06 2001// -/rsh.cc/1.1/Fri Nov 30 20:34:13 2001// -/rsh.h/1.1/Fri Nov 30 20:34:13 2001// -D diff --git a/apt/methods/CVS/Repository b/apt/methods/CVS/Repository deleted file mode 100644 index da58c51..0000000 --- a/apt/methods/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/methods diff --git a/apt/methods/CVS/Root b/apt/methods/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/methods/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/methods/cdrom.cc b/apt/methods/cdrom.cc index e56de31..a13e41b 100644 --- a/apt/methods/cdrom.cc +++ b/apt/methods/cdrom.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cdrom.cc,v 1.3 2001/06/25 16:16:18 kojima Exp $ +// $Id: cdrom.cc,v 1.3 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### CDROM URI method for APT @@ -14,10 +14,15 @@ #include <apt-pkg/configuration.h> #include <apt-pkg/fileutl.h> -#include <utime.h> #include <sys/stat.h> #include <unistd.h> + +#include <iostream> /*}}}*/ +// CNC:2002-10-18 +#include <utime.h> + +using namespace std; class CDROMMethod : public pkgAcqMethod { @@ -31,6 +36,7 @@ class CDROMMethod : public pkgAcqMethod string GetID(string Name); virtual void Exit(); + // CNC:2002-10-18 bool Copy(string Src, string Dest); public: @@ -78,7 +84,7 @@ string CDROMMethod::GetID(string Name) return string(); } /*}}}*/ - +// CNC:2002-10-18 bool CDROMMethod::Copy(string Src, string Dest) { // See if the file exists @@ -126,7 +132,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) FetchResult Res; bool Debug = _config->FindB("Debug::Acquire::cdrom",false); - + /* All IMS queries are returned as a hit, CDROMs are readonly so time stamps never change */ if (Itm->LastModified != 0) @@ -174,6 +180,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) while (CurrentID.empty() == true) { bool Hit = false; + Mounted = MountCdrom(CDROM); for (unsigned int Version = 2; Version != 0; Version--) { if (IdentCdrom(CDROM,NewID,Version) == false) @@ -203,13 +210,12 @@ bool CDROMMethod::Fetch(FetchItem *Itm) Fail("Wrong CD",true); return true; } - - MountCdrom(CDROM); - Mounted = true; } - + + // CNC:2002-10-18 // Found a CD - if (_config->FindB("Acquire::cdrom::copy", false) == true) { + if (_config->FindB("Acquire::CDROM::Copy-All", false) == true || + _config->FindB("Acquire::CDROM::Copy", false) == true) { Res.Filename = Queue->DestFile; URIStart(Res); Copy(CDROM+File, Queue->DestFile); @@ -219,7 +225,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm) struct stat Buf; if (stat(Res.Filename.c_str(),&Buf) != 0) - return _error->Error("File not found"); + return _error->Error("File not found"); + if (NewID.empty() == false) CurrentID = NewID; Res.LastModified = Buf.st_mtime; diff --git a/apt/methods/connect.cc b/apt/methods/connect.cc index ba6693d..7955564 100644 --- a/apt/methods/connect.cc +++ b/apt/methods/connect.cc @@ -1,10 +1,13 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: connect.cc,v 1.2 2001/11/12 16:04:38 kojima Exp $ +// $Id: connect.cc,v 1.3 2002/11/04 16:38:17 niemeyer Exp $ /* ###################################################################### Connect - Replacement connect call - + + This was originally authored by Jason Gunthorpe <jgg@debian.org> + and is placed in the Public Domain, do with it what you will. + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ @@ -30,6 +33,18 @@ static int LastPort = 0; static struct addrinfo *LastHostAddr = 0; static struct addrinfo *LastUsed = 0; +// RotateDNS - Select a new server from a DNS rotation /*{{{*/ +// --------------------------------------------------------------------- +/* This is called during certain errors in order to recover by selecting a + new server */ +void RotateDNS() +{ + if (LastUsed != 0 && LastUsed->ai_next != 0) + LastUsed = LastUsed->ai_next; + else + LastUsed = LastHostAddr; +} + /*}}}*/ // DoConnect - Attempt a connect operation /*{{{*/ // --------------------------------------------------------------------- /* This helper function attempts a connection to a single address. */ @@ -38,28 +53,44 @@ static bool DoConnect(struct addrinfo *Addr,string Host, { // Show a status indicator char Name[NI_MAXHOST]; - Name[0] = 0; - getnameinfo(Addr->ai_addr,Addr->ai_addrlen, - Name,sizeof(Name),0,0,NI_NUMERICHOST); - Owner->Status("Connecting to %s (%s)",Host.c_str(),Name); + char Service[NI_MAXSERV]; + Name[0] = 0; + Service[0] = 0; + getnameinfo(Addr->ai_addr,Addr->ai_addrlen, + Name,sizeof(Name),Service,sizeof(Service), + NI_NUMERICHOST|NI_NUMERICSERV); + Owner->Status("Connecting to %s (%s)",Host.c_str(),Name); + + /* If this is an IP rotation store the IP we are using.. If something goes + wrong this will get tacked onto the end of the error message */ + if (LastHostAddr->ai_next != 0) + { + char Name2[NI_MAXHOST + NI_MAXSERV + 10]; + snprintf(Name2,sizeof(Name2),"[IP: %s %s]",Name,Service); + Owner->SetFailExtraMsg(string(Name2)); + } + else + Owner->SetFailExtraMsg(""); + // Get a socket if ((Fd = socket(Addr->ai_family,Addr->ai_socktype, Addr->ai_protocol)) < 0) - return _error->Errno("socket","Could not create a socket"); + return _error->Errno("socket","Could not create a socket for %s (f=%u t=%u p=%u)", + Name,Addr->ai_family,Addr->ai_socktype,Addr->ai_protocol); SetNonBlock(Fd,true); if (connect(Fd,Addr->ai_addr,Addr->ai_addrlen) < 0 && errno != EINPROGRESS) return _error->Errno("connect","Cannot initiate the connection " - "to %s (%s).",Host.c_str(),Name); + "to %s:%s (%s).",Host.c_str(),Service,Name); /* This implements a timeout for connect by opening the connection nonblocking */ if (WaitFd(Fd,true,TimeOut) == false) - return _error->Error("Could not connect to %s (%s), " - "connection timed out",Host.c_str(),Name); - + return _error->Error("Could not connect to %s:%s (%s), " + "connection timed out",Host.c_str(),Service,Name); + // Check the socket for an error condition unsigned int Err; unsigned int Len = sizeof(Err); @@ -67,8 +98,12 @@ static bool DoConnect(struct addrinfo *Addr,string Host, return _error->Errno("getsockopt","Failed"); if (Err != 0) - return _error->Error("Could not connect to %s (%s).",Host.c_str(),Name); - + { + errno = Err; + return _error->Errno("connect","Could not connect to %s:%s (%s).",Host.c_str(), + Service,Name); + } + return true; } /*}}}*/ @@ -80,6 +115,13 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, { if (_error->PendingError() == true) return false; + + // Convert the port name/number + char ServStr[300]; + if (Port != 0) + snprintf(ServStr,sizeof(ServStr),"%u",Port); + else + snprintf(ServStr,sizeof(ServStr),"%s",Service); /* We used a cached address record.. Yes this is against the spec but the way we have setup our rotating dns suggests that this is more @@ -88,59 +130,52 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, { Owner->Status("Connecting to %s",Host.c_str()); - // Lookup the host - char S[300]; - if (Port != 0) - snprintf(S,sizeof(S),"%u",Port); - else - snprintf(S,sizeof(S),"%s",Service); - // Free the old address structure if (LastHostAddr != 0) { freeaddrinfo(LastHostAddr); LastHostAddr = 0; + LastUsed = 0; } // We only understand SOCK_STREAM sockets. struct addrinfo Hints; memset(&Hints,0,sizeof(Hints)); Hints.ai_socktype = SOCK_STREAM; - Hints.ai_protocol = IPPROTO_TCP; // Right? + Hints.ai_protocol = 0; // Resolve both the host and service simultaneously while (1) { int Res; - if ((Res = getaddrinfo(Host.c_str(),S,&Hints,&LastHostAddr)) != 0 || + if ((Res = getaddrinfo(Host.c_str(),ServStr,&Hints,&LastHostAddr)) != 0 || LastHostAddr == 0) { if (Res == EAI_NONAME || Res == EAI_SERVICE) { if (DefPort != 0) { - snprintf(S,sizeof(S),"%u",DefPort); + snprintf(ServStr,sizeof(ServStr),"%u",DefPort); DefPort = 0; continue; } return _error->Error("Could not resolve '%s'",Host.c_str()); } - return _error->Error("Something wicked happened resolving '%s/%s'", - Host.c_str(),S); + if (Res == EAI_AGAIN) + return _error->Error("Temporary failure resolving '%s'", + Host.c_str()); + return _error->Error("Something wicked happened resolving '%s:%s' (%i)", + Host.c_str(),ServStr,Res); } break; } - if (LastHostAddr->ai_family == AF_UNIX) - return _error->Error("getaddrinfo returned a unix domain socket\n"); - LastHost = Host; LastPort = Port; - LastUsed = 0; } - // Get the printable IP address + // When we have an IP rotation stay with the last IP. struct addrinfo *CurHost = LastHostAddr; if (LastUsed != 0) CurHost = LastUsed; @@ -155,14 +190,28 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, close(Fd); Fd = -1; - CurHost = CurHost->ai_next; - LastUsed = 0; + // Ignore UNIX domain sockets + do + { + CurHost = CurHost->ai_next; + } + while (CurHost != 0 && CurHost->ai_family == AF_UNIX); + + /* If we reached the end of the search list then wrap around to the + start */ + if (CurHost == 0 && LastUsed != 0) + CurHost = LastHostAddr; + + // Reached the end of the search cycle + if (CurHost == LastUsed) + break; + if (CurHost != 0) _error->Discard(); - } - + } + if (_error->PendingError() == true) - return false; - return _error->Error("Unable to connect to '%s'",Host.c_str()); + return false; + return _error->Error("Unable to connect to %s %s:",Host.c_str(),ServStr); } /*}}}*/ diff --git a/apt/methods/connect.h b/apt/methods/connect.h index 85d920d..01d3f6a 100644 --- a/apt/methods/connect.h +++ b/apt/methods/connect.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: connect.h,v 1.1.1.1 2000/08/10 12:42:38 kojima Exp $ +// $Id: connect.h,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ /* ###################################################################### Connect - Replacement connect call @@ -15,5 +15,6 @@ bool Connect(string To,int Port,const char *Service,int DefPort, int &Fd,unsigned long TimeOut,pkgAcqMethod *Owner); +void RotateDNS(); #endif diff --git a/apt/methods/copy.cc b/apt/methods/copy.cc index 536bd98..fa6679c 100644 --- a/apt/methods/copy.cc +++ b/apt/methods/copy.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: copy.cc,v 1.1.1.1 2000/08/10 12:42:38 kojima Exp $ +// $Id: copy.cc,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ /* ###################################################################### Copy URI - This method takes a uri like a file: uri and copies it diff --git a/apt/methods/file.cc b/apt/methods/file.cc index 420da60..243ef4a 100644 --- a/apt/methods/file.cc +++ b/apt/methods/file.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: file.cc,v 1.2 2001/08/01 21:35:12 kojima Exp $ +// $Id: file.cc,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ /* ###################################################################### File URI method for APT @@ -26,7 +26,7 @@ class FileMethod : public pkgAcqMethod public: - FileMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly | SendConfig) {}; + FileMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly) {}; }; // FileMethod::Fetch - Fetch a file /*{{{*/ @@ -53,12 +53,8 @@ bool FileMethod::Fetch(FetchItem *Itm) } // See if we can compute a file without a .gz exentsion - string ComprExtension = _config->Find("Acquire::ComprExtension"); - if(ComprExtension.empty() == true) { - ComprExtension = ".bz2"; - } - string::size_type Pos = File.rfind(ComprExtension); - if (Pos + ComprExtension.length() == File.length()) + string::size_type Pos = File.rfind(".gz"); + if (Pos + 3 == File.length()) { File = string(File,0,Pos); if (stat(File.c_str(),&Buf) == 0) diff --git a/apt/methods/ftp.cc b/apt/methods/ftp.cc index 965e3f3..ffc3bf0 100644 --- a/apt/methods/ftp.cc +++ b/apt/methods/ftp.cc @@ -1,9 +1,9 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: ftp.cc,v 1.3 2001/02/20 18:20:02 kojima Exp $ +// $Id: ftp.cc,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ /* ###################################################################### - HTTP Aquire Method - This is the FTP aquire method for APT. + FTP Aquire Method - This is the FTP aquire method for APT. This is a very simple implementation that does not try to optimize at all. Commands are sent syncronously with the FTP server (as the @@ -18,7 +18,7 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> -#include <apt-pkg/md5.h> +#include <apt-pkg/hashes.h> #include <sys/stat.h> #include <sys/time.h> @@ -28,6 +28,7 @@ #include <stdio.h> #include <errno.h> #include <stdarg.h> +#include <iostream> // Internet stuff #include <netinet/in.h> @@ -40,6 +41,22 @@ #include "ftp.h" /*}}}*/ +using namespace std; + +/* This table is for the EPRT and EPSV commands, it maps the OS address + family to the IETF address families */ +struct AFMap +{ + unsigned long Family; + unsigned long IETFFamily; +}; + +#ifndef AF_INET6 +struct AFMap AFMap[] = {{AF_INET,1},{}}; +#else +struct AFMap AFMap[] = {{AF_INET,1},{AF_INET6,2},{}}; +#endif + unsigned long TimeOut = 120; URI Proxy; string FtpMethod::FailFile; @@ -53,7 +70,7 @@ FTPConn::FTPConn(URI Srv) : Len(0), ServerFd(-1), DataFd(-1), DataListenFd(-1), ServerName(Srv) { Debug = _config->FindB("Debug::Acquire::Ftp",false); - memset(&PasvAddr,0,sizeof(PasvAddr)); + PasvAddr = 0; } /*}}}*/ // FTPConn::~FTPConn - Destructor /*{{{*/ @@ -75,7 +92,10 @@ void FTPConn::Close() DataFd = -1; close(DataListenFd); DataListenFd = -1; - memset(&PasvAddr,0,sizeof(PasvAddr)); + + if (PasvAddr != 0) + freeaddrinfo(PasvAddr); + PasvAddr = 0; } /*}}}*/ // FTPConn::Open - Open a new connection /*{{{*/ @@ -89,7 +109,7 @@ bool FTPConn::Open(pkgAcqMethod *Owner) return true; Close(); - + // Determine the proxy setting if (getenv("ftp_proxy") == 0) { @@ -108,32 +128,13 @@ bool FTPConn::Open(pkgAcqMethod *Owner) else Proxy = getenv("ftp_proxy"); - // Parse no_proxy, a , seperated list of domains + // Parse no_proxy, a , separated list of domains if (getenv("no_proxy") != 0) { - const char *Start = getenv("no_proxy"); - const char *ServerEnd = ServerName.Host.end(); - - for (const char *Cur = Start; true ; Cur++) - { - if (*Cur != ',' && *Cur != 0) - continue; - - // match end of the string - if ((ServerName.Host.size() >= (Cur - Start)) - && stringcasecmp(ServerEnd - (Cur - Start), - ServerEnd,Start,Cur) == 0) - { - Proxy = ""; - break; - } - - Start = Cur + 1; - if (*Cur == 0) - break; - } + if (CheckDomainList(ServerName.Host,getenv("no_proxy")) == true) + Proxy = ""; } - + // Determine what host and port to use based on the proxy settings int Port = 0; string Host; @@ -150,15 +151,27 @@ bool FTPConn::Open(pkgAcqMethod *Owner) Host = Proxy.Host; } - // Connect to the remote server + /* Connect to the remote server. Since FTP is connection oriented we + want to make sure we get a new server every time we reconnect */ + RotateDNS(); if (Connect(Host,Port,"ftp",21,ServerFd,TimeOut,Owner) == false) return false; - socklen_t Len = sizeof(Peer); - if (getpeername(ServerFd,(sockaddr *)&Peer,&Len) != 0) + + // Login must be before getpeername otherwise dante won't work. + Owner->Status("Logging in"); + bool Res = Login(); + + // Get the remote server's address + PeerAddrLen = sizeof(PeerAddr); + if (getpeername(ServerFd,(sockaddr *)&PeerAddr,&PeerAddrLen) != 0) return _error->Errno("getpeername","Unable to determine the peer name"); - Owner->Status("Logging in"); - return Login(); + // Get the local machine's address + ServerAddrLen = sizeof(ServerAddr); + if (getsockname(ServerFd,(sockaddr *)&ServerAddr,&ServerAddrLen) != 0) + return _error->Errno("getsockname","Unable to determine the local name"); + + return Res; } /*}}}*/ // FTPConn::Login - Login to the remote server /*{{{*/ @@ -172,11 +185,7 @@ bool FTPConn::Login() // Setup the variables needed for authentication string User = "anonymous"; - string Pass; - if (0) //akk - Pass = "apt_get_ftp_2.0@debian.linux.user"; - else - Pass = "apt_get_ftp_2.0@conectiva.linux.user"; + string Pass = "apt_get_ftp_2.1@debian.linux.user"; // Fill in the user/pass if (ServerName.User.empty() == false) @@ -209,7 +218,7 @@ bool FTPConn::Login() if (_config->Exists("Acquire::FTP::Passive::" + ServerName.Host) == true) TryPassive = _config->FindB("Acquire::FTP::Passive::" + ServerName.Host,true); else - TryPassive = _config->FindB("Acquire::FTP::Passive",true); + TryPassive = _config->FindB("Acquire::FTP::Passive",true); } else { @@ -266,6 +275,12 @@ bool FTPConn::Login() } } + // Force the use of extended commands + if (_config->Exists("Acquire::FTP::ForceExtended::" + ServerName.Host) == true) + ForceExtended = _config->FindB("Acquire::FTP::ForceExtended::" + ServerName.Host,true); + else + ForceExtended = _config->FindB("Acquire::FTP::ForceExtended",false); + // Binary mode if (WriteMsg(Tag,Msg,"TYPE I") == false) return false; @@ -313,6 +328,8 @@ bool FTPConn::ReadLine(string &Text) // Suck it back int Res = read(ServerFd,Buffer + Len,sizeof(Buffer) - Len); + if (Res == 0) + _error->Error("Server closed the connection"); if (Res <= 0) { _error->Errno("read","Read error"); @@ -439,10 +456,19 @@ bool FTPConn::WriteMsg(unsigned int &Ret,string &Text,const char *Fmt,...) // --------------------------------------------------------------------- /* Try to enter passive mode, the return code does not indicate if passive mode could or could not be established, only if there was a fatal error. - Borrowed mostly from lftp. We have to enter passive mode every time - we make a data connection :| */ + We have to enter passive mode every time we make a data connection :| */ bool FTPConn::GoPasv() { + /* The PASV command only works on IPv4 sockets, even though it could + in theory suppory IPv6 via an all zeros reply */ + if (((struct sockaddr *)&PeerAddr)->sa_family != AF_INET || + ForceExtended == true) + return ExtGoPasv(); + + if (PasvAddr != 0) + freeaddrinfo(PasvAddr); + PasvAddr = 0; + // Try to enable pasv mode unsigned int Tag; string Msg; @@ -452,41 +478,139 @@ bool FTPConn::GoPasv() // Unsupported function string::size_type Pos = Msg.find('('); if (Tag >= 400 || Pos == string::npos) - { - memset(&PasvAddr,0,sizeof(PasvAddr)); return true; - } // Scan it unsigned a0,a1,a2,a3,p0,p1; if (sscanf(Msg.c_str() + Pos,"(%u,%u,%u,%u,%u,%u)",&a0,&a1,&a2,&a3,&p0,&p1) != 6) + return true; + + /* Some evil servers return 0 to mean their addr. We can actually speak + to these servers natively using IPv6 */ + if (a0 == 0 && a1 == 0 && a2 == 0 && a3 == 0) { - memset(&PasvAddr,0,sizeof(PasvAddr)); + // Get the IP in text form + char Name[NI_MAXHOST]; + char Service[NI_MAXSERV]; + getnameinfo((struct sockaddr *)&PeerAddr,PeerAddrLen, + Name,sizeof(Name),Service,sizeof(Service), + NI_NUMERICHOST|NI_NUMERICSERV); + + struct addrinfo Hints; + memset(&Hints,0,sizeof(Hints)); + Hints.ai_socktype = SOCK_STREAM; + Hints.ai_family = ((struct sockaddr *)&PeerAddr)->sa_family; + Hints.ai_flags |= AI_NUMERICHOST; + + // Get a new passive address. + char Port[100]; + snprintf(Port,sizeof(Port),"%u",(p0 << 8) + p1); + if (getaddrinfo(Name,Port,&Hints,&PasvAddr) != 0) + return true; return true; } - // lftp used this horrid byte order manipulation.. Ik. - PasvAddr.sin_family = AF_INET; - unsigned char *a; - unsigned char *p; - a = (unsigned char *)&PasvAddr.sin_addr; - p = (unsigned char *)&PasvAddr.sin_port; + struct addrinfo Hints; + memset(&Hints,0,sizeof(Hints)); + Hints.ai_socktype = SOCK_STREAM; + Hints.ai_family = AF_INET; + Hints.ai_flags |= AI_NUMERICHOST; - // Some evil servers return 0 to mean their addr - if (a0 == 0 && a1 == 0 && a2 == 0 && a3 == 0) + // Get a new passive address. + char Port[100]; + snprintf(Port,sizeof(Port),"%u",(p0 << 8) + p1); + char Name[100]; + snprintf(Name,sizeof(Name),"%u.%u.%u.%u",a0,a1,a2,a3); + if (getaddrinfo(Name,Port,&Hints,&PasvAddr) != 0) + return true; + return true; +} + /*}}}*/ +// FTPConn::ExtGoPasv - Enter Extended Passive mode /*{{{*/ +// --------------------------------------------------------------------- +/* Try to enter extended passive mode. See GoPasv above and RFC 2428 */ +bool FTPConn::ExtGoPasv() +{ + if (PasvAddr != 0) + freeaddrinfo(PasvAddr); + PasvAddr = 0; + + // Try to enable pasv mode + unsigned int Tag; + string Msg; + if (WriteMsg(Tag,Msg,"EPSV") == false) + return false; + + // Unsupported function + string::size_type Pos = Msg.find('('); + if (Tag >= 400 || Pos == string::npos) + return true; + + // Scan it + string::const_iterator List[4]; + unsigned Count = 0; + Pos++; + for (string::const_iterator I = Msg.begin() + Pos; I < Msg.end(); I++) { - PasvAddr.sin_addr = Peer.sin_addr; + if (*I != Msg[Pos]) + continue; + if (Count >= 4) + return true; + List[Count++] = I; + } + if (Count != 4) + return true; + + // Break it up .. + unsigned long Proto = 0; + unsigned long Port = 0; + string IP; + IP = string(List[1]+1,List[2]); + Port = atoi(string(List[2]+1,List[3]).c_str()); + if (IP.empty() == false) + Proto = atoi(string(List[0]+1,List[1]).c_str()); + + if (Port == 0) + return false; + + // String version of the port + char PStr[100]; + snprintf(PStr,sizeof(PStr),"%lu",Port); + + // Get the IP in text form + struct addrinfo Hints; + memset(&Hints,0,sizeof(Hints)); + Hints.ai_socktype = SOCK_STREAM; + Hints.ai_flags |= AI_NUMERICHOST; + + /* The RFC defined case, connect to the old IP/protocol using the + new port. */ + if (IP.empty() == true) + { + // Get the IP in text form + char Name[NI_MAXHOST]; + char Service[NI_MAXSERV]; + getnameinfo((struct sockaddr *)&PeerAddr,PeerAddrLen, + Name,sizeof(Name),Service,sizeof(Service), + NI_NUMERICHOST|NI_NUMERICSERV); + IP = Name; + Hints.ai_family = ((struct sockaddr *)&PeerAddr)->sa_family; } else { - a[0] = a0; - a[1] = a1; - a[2] = a2; - a[3] = a3; + // Get the family.. + Hints.ai_family = 0; + for (unsigned J = 0; AFMap[J].Family != 0; J++) + if (AFMap[J].IETFFamily == Proto) + Hints.ai_family = AFMap[J].Family; + if (Hints.ai_family == 0) + return true; } - p[0] = p0; - p[1] = p1; + // Get a new passive address. + int Res; + if ((Res = getaddrinfo(IP.c_str(),PStr,&Hints,&PasvAddr)) != 0) + return true; return true; } @@ -547,34 +671,35 @@ bool FTPConn::CreateDataFd() return false; // Oops, didn't work out, don't bother trying again. - if (PasvAddr.sin_port == 0) + if (PasvAddr == 0) TryPassive = false; } // Passive mode? - if (PasvAddr.sin_port != 0) + if (PasvAddr != 0) { // Get a socket - if ((DataFd = socket(AF_INET,SOCK_STREAM,0)) < 0) + if ((DataFd = socket(PasvAddr->ai_family,PasvAddr->ai_socktype, + PasvAddr->ai_protocol)) < 0) return _error->Errno("socket","Could not create a socket"); // Connect to the server SetNonBlock(DataFd,true); - if (connect(DataFd,(sockaddr *)&PasvAddr,sizeof(PasvAddr)) < 0 && + if (connect(DataFd,PasvAddr->ai_addr,PasvAddr->ai_addrlen) < 0 && errno != EINPROGRESS) return _error->Errno("socket","Could not create a socket"); /* This implements a timeout for connect by opening the connection nonblocking */ - if (WaitFd(ServerFd,true,TimeOut) == false) + if (WaitFd(DataFd,true,TimeOut) == false) return _error->Error("Could not connect data socket, connection timed out"); unsigned int Err; unsigned int Len = sizeof(Err); - if (getsockopt(ServerFd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0) + if (getsockopt(DataFd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0) return _error->Errno("getsockopt","Failed"); if (Err != 0) - return _error->Error("Could not connect."); - + return _error->Error("Could not connect passive socket."); + return true; } @@ -582,43 +707,91 @@ bool FTPConn::CreateDataFd() close(DataListenFd); DataListenFd = -1; - // Get a socket - if ((DataListenFd = socket(AF_INET,SOCK_STREAM,0)) < 0) + // Get the information for a listening socket. + struct addrinfo *BindAddr = 0; + struct addrinfo Hints; + memset(&Hints,0,sizeof(Hints)); + Hints.ai_socktype = SOCK_STREAM; + Hints.ai_flags |= AI_PASSIVE; + Hints.ai_family = ((struct sockaddr *)&ServerAddr)->sa_family; + int Res; + if ((Res = getaddrinfo(0,"0",&Hints,&BindAddr)) != 0) + return _error->Error("getaddrinfo was unable to get a listening socket"); + + // Construct the socket + if ((DataListenFd = socket(BindAddr->ai_family,BindAddr->ai_socktype, + BindAddr->ai_protocol)) < 0) + { + freeaddrinfo(BindAddr); return _error->Errno("socket","Could not create a socket"); + } // Bind and listen - sockaddr_in Addr; - memset(&Addr,0,sizeof(Addr)); - if (bind(DataListenFd,(sockaddr *)&Addr,sizeof(Addr)) < 0) + if (bind(DataListenFd,BindAddr->ai_addr,BindAddr->ai_addrlen) < 0) + { + freeaddrinfo(BindAddr); return _error->Errno("bind","Could not bind a socket"); + } + freeaddrinfo(BindAddr); if (listen(DataListenFd,1) < 0) return _error->Errno("listen","Could not listen on the socket"); SetNonBlock(DataListenFd,true); // Determine the name to send to the remote - sockaddr_in Addr2; - socklen_t Jnk = sizeof(Addr); - if (getsockname(DataListenFd,(sockaddr *)&Addr,&Jnk) < 0) + struct sockaddr_storage Addr; + socklen_t AddrLen = sizeof(Addr); + if (getsockname(DataListenFd,(sockaddr *)&Addr,&AddrLen) < 0) return _error->Errno("getsockname","Could not determine the socket's name"); - Jnk = sizeof(Addr2); - if (getsockname(ServerFd,(sockaddr *)&Addr2,&Jnk) < 0) - return _error->Errno("getsockname","Could not determine the socket's name"); - - // This bit ripped from qftp - unsigned long badr = ntohl(*(unsigned long *)&Addr2.sin_addr); - unsigned long bp = ntohs(Addr.sin_port); - // Send the port command + // Reverse the address. We need the server address and the data port. + char Name[NI_MAXHOST]; + char Service[NI_MAXSERV]; + char Service2[NI_MAXSERV]; + getnameinfo((struct sockaddr *)&Addr,AddrLen, + Name,sizeof(Name),Service,sizeof(Service), + NI_NUMERICHOST|NI_NUMERICSERV); + getnameinfo((struct sockaddr *)&ServerAddr,ServerAddrLen, + Name,sizeof(Name),Service2,sizeof(Service2), + NI_NUMERICHOST|NI_NUMERICSERV); + + // Send off an IPv4 address in the old port format + if (((struct sockaddr *)&Addr)->sa_family == AF_INET && + ForceExtended == false) + { + // Convert the dots in the quad into commas + for (char *I = Name; *I != 0; I++) + if (*I == '.') + *I = ','; + unsigned long Port = atoi(Service); + + // Send the port command + unsigned int Tag; + string Msg; + if (WriteMsg(Tag,Msg,"PORT %s,%d,%d", + Name, + (int)(Port >> 8) & 0xff, (int)(Port & 0xff)) == false) + return false; + if (Tag >= 400) + return _error->Error("Unable to send PORT command"); + return true; + } + + // Construct an EPRT command + unsigned Proto = 0; + for (unsigned J = 0; AFMap[J].Family != 0; J++) + if (AFMap[J].Family == ((struct sockaddr *)&Addr)->sa_family) + Proto = AFMap[J].IETFFamily; + if (Proto == 0) + return _error->Error("Unkonwn address family %u (AF_*)", + ((struct sockaddr *)&Addr)->sa_family); + + // Send the EPRT command unsigned int Tag; string Msg; - if (WriteMsg(Tag,Msg,"PORT %d,%d,%d,%d,%d,%d", - (int) (badr >> 24) & 0xff, (int) (badr >> 16) & 0xff, - (int) (badr >> 8) & 0xff, (int) badr & 0xff, - (int) (bp >> 8) & 0xff, (int) bp & 0xff) == false) + if (WriteMsg(Tag,Msg,"EPRT |%u|%s|%s|",Proto,Name,Service) == false) return false; if (Tag >= 400) - return _error->Error("Unable to send port command"); - + return _error->Error("EPRT failed, server said: %s",Msg.c_str()); return true; } /*}}}*/ @@ -629,7 +802,7 @@ bool FTPConn::CreateDataFd() bool FTPConn::Finalize() { // Passive mode? Do nothing - if (PasvAddr.sin_port != 0) + if (PasvAddr != 0) return true; // Close any old socket.. @@ -658,7 +831,7 @@ bool FTPConn::Finalize() /* This opens a data connection, sends REST and RETR and then transfers the file over. */ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume, - MD5Summation &MD5,bool &Missing) + Hashes &Hash,bool &Missing) { Missing = false; if (CreateDataFd() == false) @@ -682,7 +855,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume, if (Resume != 0) { - if (MD5.AddFD(To.Fd(),Resume) == false) + if (Hash.AddFD(To.Fd(),Resume) == false) { _error->Errno("read","Problem hashing file"); return false; @@ -726,7 +899,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume, break; } - MD5.Add(Buffer,Res); + Hash.Add(Buffer,Res); if (To.Write(Buffer,Res) == false) { Close(); @@ -855,7 +1028,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) } // Open the file - MD5Summation MD5; + Hashes Hash; { FileFd Fd(Itm->DestFile,FileFd::WriteAny); if (_error->PendingError() == true) @@ -868,7 +1041,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) FailFd = Fd.Fd(); bool Missing; - if (Server->Get(File,Fd,Res.ResumePoint,MD5,Missing) == false) + if (Server->Get(File,Fd,Res.ResumePoint,Hash,Missing) == false) { Fd.Close(); @@ -889,7 +1062,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) } Res.LastModified = FailTime; - Res.MD5Sum = MD5.Result(); + Res.TakeHashes(Hash); // Timestamp struct utimbuf UBuf; @@ -906,21 +1079,23 @@ bool FtpMethod::Fetch(FetchItem *Itm) int main(int argc,const char *argv[]) { - /* See if we should become the http client - we do this for http + /* See if we should be come the http client - we do this for http proxy urls */ if (getenv("ftp_proxy") != 0) { URI Proxy = string(getenv("ftp_proxy")); + // Run the HTTP method if (Proxy.Access == "http") { // Copy over the environment setting char S[300]; snprintf(S,sizeof(S),"http_proxy=%s",getenv("ftp_proxy")); putenv(S); + putenv("no_proxy="); // Run the http method - string Path = flNotFile(argv[0]) + "/http"; + string Path = flNotFile(argv[0]) + "http"; execl(Path.c_str(),Path.c_str(),0); cerr << "Unable to invoke " << Path << endl; exit(100); diff --git a/apt/methods/ftp.h b/apt/methods/ftp.h index 38783a9..1d05364 100644 --- a/apt/methods/ftp.h +++ b/apt/methods/ftp.h @@ -1,5 +1,6 @@ // -*- mode: cpp; mode: fold -*- -// Description /*{{{*/// $Id: ftp.h,v 1.1.1.1 2000/08/10 12:42:38 kojima Exp $ +// Description /*{{{*/// $Id: ftp.h,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ +// $Id: ftp.h,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ /* ###################################################################### FTP Aquire Method - This is the FTP aquire method for APT. @@ -17,12 +18,20 @@ class FTPConn int DataFd; int DataListenFd; URI ServerName; + bool ForceExtended; bool TryPassive; bool Debug; - - struct sockaddr_in PasvAddr; - struct sockaddr_in Peer; + struct addrinfo *PasvAddr; + + // Generic Peer Address + struct sockaddr_storage PeerAddr; + socklen_t PeerAddrLen; + + // Generic Server Address (us) + struct sockaddr_storage ServerAddr; + socklen_t ServerAddrLen; + // Private helper functions bool ReadLine(string &Text); bool Login(); @@ -41,12 +50,13 @@ class FTPConn bool Open(pkgAcqMethod *Owner); void Close(); bool GoPasv(); + bool ExtGoPasv(); // Query bool Size(const char *Path,unsigned long &Size); bool ModTime(const char *Path, time_t &Time); bool Get(const char *Path,FileFd &To,unsigned long Resume, - MD5Summation &MD5,bool &Missing); + Hashes &MD5,bool &Missing); FTPConn(URI Srv); ~FTPConn(); diff --git a/apt/methods/gpg.cc b/apt/methods/gpg.cc index 532bfb5..ec3c92b 100644 --- a/apt/methods/gpg.cc +++ b/apt/methods/gpg.cc @@ -3,6 +3,7 @@ #include <apt-pkg/acquire-method.h> #include <apt-pkg/strutl.h> + #include <sys/stat.h> #include <unistd.h> #include <utime.h> @@ -14,15 +15,167 @@ class GPGMethod : public pkgAcqMethod { virtual bool Fetch(FetchItem *Itm); - public: + public: GPGMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig) {}; }; +#define STRCMP(buf, conststr) strncmp(buf, conststr, sizeof(conststr)-1) +/* + * extractSignedFile - Extract parts of a gpg signed file in the format + * described below. + * file: The file to extract + * targetPrefix: Prefix of the extracted files, containing the directory + * name and prefix of the filename. Directory must not be writable + * by anyone else and must be empty. + * targetFile: Path of the file where the signed data will be stored. + * oldStyle: Set to true if the filename is not in the format specified + * below and is probably an armoured signed file. + * sigCount: Number of signatures found in the file. + * + * Returns false if there was an error processing the file. + * + * Extracted signatures will be named + * targetPrefix+".sig"{1,2,...,sigCount} + * + * File format for the signed file is: + *<BOF> + * <ascii data that was signed by gpg> + * -----BEGIN PGP SIGNATURE-----\n + * <gpg signature data> + * -----END PGP SIGNATURE-----\n + * <Repeat the above n times, depending + * on how many people have signed the file.> + * <EOF> + * + * Ie: the original file cat'enated with the signatures generated + * through gpg -s --armor --detach <yourfile> + */ +bool extractSignedFile(string file, string targetPrefix, string targetFile, + bool &oldStyle, int &sigCount) +{ + FILE *fin; + FILE *fout; + char buffer[256]; + string tmps; -static char *getFileSigner(const char *file, const char *outfile, - string &signerKeyID, bool useDefaultPubring) + fin = fopen(file.c_str(), "r"); + if (fin == NULL) + return _error->Errno("open", "could not open gpg signed file %s", + file.c_str()); + + oldStyle = false; + + bool Failed = false; + + // store the signed file in a separate file + tmps = targetFile; + + fout = fopen(tmps.c_str(), "w+"); + if (fout == NULL) + { + fclose(fin); + return _error->Errno("fopen", "could not create file %s", + tmps.c_str()); + } + while (1) + { + if (fgets(buffer, sizeof(buffer)-1, fin) == NULL) + { + Failed = true; + _error->Error("no signatures in file %s", file.c_str()); + break; + } + + if (STRCMP(buffer, "-----BEGIN") == 0) + break; + + if (fputs(buffer, fout) < 0) + { + Failed = true; + _error->Errno("fputs", "error writing to %s", tmps.c_str()); + break; + } + } + fclose(fout); + + if (Failed) + { + fclose(fin); + return false; + } + + sigCount = 0; + // now store each of the signatures in a file, separately + while (1) + { + char buf[32]; + + if (STRCMP(buffer, "-----BEGIN PGP SIGNATURE-----") != 0) + { + Failed = true; + _error->Error("unexpected data in gpg signed file %s", + tmps.c_str()); + break; + } + + sigCount++; + snprintf(buf, sizeof(buf), "%i", sigCount); + + tmps = targetPrefix+"sig"+string(buf); + + fout = fopen(tmps.c_str(), "w+"); + if (fout == NULL) + { + fclose(fin); + return _error->Errno("fopen", "could not create signature file %s", + tmps.c_str()); + } + while (1) + { + if (fputs(buffer, fout) < 0) + { + Failed = true; + _error->Errno("fputs", "error writing to %s", tmps.c_str()); + break; + } + + if (STRCMP(buffer, "-----END PGP SIGNATURE-----") == 0) + break; + + if (fgets(buffer, sizeof(buffer)-1, fin) == NULL) + { + Failed = true; + _error->Errno("fgets", "error reading from %s", file.c_str()); + break; + } + } + fclose(fout); + + if (Failed) + { + fclose(fin); + return false; + } + + if (fgets(buffer, sizeof(buffer)-1, fin) == NULL) + break; + + if (buffer[0] == '\n') + break; + } + + fclose(fin); + + return true; +} +#undef STRCMP + + + +char *getFileSigner(const char *file, const char *sigfile, + const char *outfile, string &signerKeyID) { pid_t pid; int fd[2]; @@ -31,132 +184,230 @@ static char *getFileSigner(const char *file, const char *outfile, char keyid[64]; int status; bool goodsig = false; + bool badsig = false; + + if (pipe(fd) < 0) + return "could not create pipe"; - if (pipe(fd) < 0) { - return "could not create pipe"; - } - pid = fork(); - if (pid < 0) { + if (pid < 0) return "could not spawn new process"; - } else if (pid == 0) { - string path = _config->Find("Dir::Bin::gpg"); -// New option to provide more flexible way to specify -// public ring to check signatures - string pubringpath = _config->Find("Apt::GPG::PubringPath"); - + else if (pid == 0) + { + string path = _config->Find("Dir::Bin::gpg", "/usr/bin/gpg"); + string pubring = ""; + const char *argv[16]; + int argc = 0; + close(fd[0]); close(STDERR_FILENO); close(STDOUT_FILENO); dup2(fd[1], STDOUT_FILENO); dup2(fd[1], STDERR_FILENO); - - putenv("LANG="); - putenv("LC_ALL="); - putenv("LC_MESSAGES="); - if((pubringpath.length() > 0) && useDefaultPubring) { - execlp(path.c_str(), "gpg", "--batch", "--no-secmem-warning", "--homedir", - pubringpath.c_str(), "--status-fd", "2", "-o", outfile, file, NULL); - } else { - execlp(path.c_str(), "gpg", "--batch", "--no-secmem-warning", - "--status-fd", "2", "-o", outfile, file, NULL); + unsetenv("LANG"); + unsetenv("LC_ALL"); + unsetenv("LC_MESSAGES"); + + argv[argc++] = "gpg"; + argv[argc++] = "--batch"; + argv[argc++] = "--no-secmem-warning"; + pubring = _config->Find("APT::GPG::Pubring"); + if (pubring.empty() == false) + { + argv[argc++] = "--keyring"; argv[argc++] = pubring.c_str(); } - + argv[argc++] = "--status-fd"; argv[argc++] = "2"; + + if (outfile != NULL) + { + argv[argc++] = "-o"; argv[argc++] = outfile; + } + else + { + argv[argc++] = "--verify"; argv[argc++] = sigfile; + } + argv[argc++] = file; + argv[argc] = NULL; + + execvp(path.c_str(), (char**)argv); + exit(111); } close(fd[1]); keyid[0] = 0; goodsig = false; - + f = fdopen(fd[0], "r"); while (1) { char *ptr, *ptr1; if (!fgets(buffer, 1024, f)) - break; + break; + + if (goodsig && keyid[0]) + continue; - if (goodsig && keyid[0]) { - continue; - } - -// Use strstr because response likely to be further than buffer start #define SIGPACK "[GNUPG:] VALIDSIG" - if ((ptr1 = strstr(buffer, SIGPACK)) != NULL) { + if ((ptr1 = strstr(buffer, SIGPACK)) != NULL) + { char *sig; ptr = sig = ptr1 + sizeof(SIGPACK); - while (isxdigit(*ptr)) ptr++; + while (isxdigit(*ptr) && (ptr-sig) < sizeof(keyid)) ptr++; *ptr = 0; strcpy(keyid, sig); } #undef SIGPACK #define GOODSIG "[GNUPG:] GOODSIG" - if ((ptr1 = strstr(buffer, GOODSIG)) != NULL) { - goodsig = true; - } -#undef GOODSIG + if ((ptr1 = strstr(buffer, GOODSIG)) != NULL) + goodsig = true; +#undef GOODSIG + +#define BADSIG "[GNUPG:] BADSIG" + if ((ptr1 = strstr(buffer, BADSIG)) != NULL) + badsig = true; +#undef BADSIG } fclose(f); - - waitpid(pid, &status, 0); - if (WEXITSTATUS(status) == 0) { + waitpid(pid, &status, 0); + + if (WEXITSTATUS(status) == 0) + { signerKeyID = string(keyid); return NULL; - } else if (WEXITSTATUS(status) == 111) { + } + else if (WEXITSTATUS(status) == 111) + { return "could not execute gpg to verify signature"; - } else { - if (!goodsig || !keyid[0]) - return "file was not signed with a known key. Check if the proper gpg key was imported to your keyring."; + } + else + { + if (badsig) + return "file has bad signature, it might have been corrupted or tampered."; + if (!keyid[0] || !goodsig) + return "file was not signed with a known key. Check if the proper gpg key was imported to your keyring."; + return "file could not be authenticated"; } } +bool makeTmpDir(string dir, string &path) +{ + char buf[32]; + + snprintf(buf, sizeof(buf)-1, "%i", getpid()); + + path = dir+"/aptgpg."+string(buf); + + if (mkdir(path.c_str(), 0700) < 0) + return _error->Errno("mkdir", "could not create temporary directory"); + + return true; +} + + +void removeTmpDir(string path, int sigCount) +{ + while (sigCount > 0) + { + char buf[32]; + snprintf(buf, sizeof(buf)-1, "%i", sigCount--); + unlink(string(path+"/sig"+string(buf)).c_str()); + } + + rmdir(path.c_str()); +} + + + + bool GPGMethod::Fetch(FetchItem *Itm) { URI Get = Itm->Uri; string Path = Get.Host + Get.Path; // To account for relative paths - string keyID; - + string KeyList; + FetchResult Res; Res.Filename = Itm->DestFile; URIStart(Res); + + string TempDir; + if (makeTmpDir("/tmp", TempDir) == false) + return false; + + int SigCount = 0; + bool OldStyle = true; - // Run GPG on file, extract contents and get the key ID of the signer - // First use default public ring provided by packaging engine (IPL feature) - char *msg = getFileSigner(Path.c_str(), Itm->DestFile.c_str(), keyID, true); - if (msg) { - // Run GPG on file, extract contents and get the key ID of the signer - // Now use user's public ring - char *msg1 = getFileSigner(Path.c_str(), Itm->DestFile.c_str(), keyID, false); - if (msg1) { - return _error->Error(msg1); - } + if (extractSignedFile(Path, TempDir+"/", Itm->DestFile, OldStyle, + SigCount) == false) + return false; + + if (OldStyle == true) + { + // Run GPG on file, extract contents and get the key ID of the signer + char *msg = getFileSigner(Path.c_str(), NULL, + Itm->DestFile.c_str(), KeyList); + if (msg != NULL) + { + removeTmpDir(TempDir, SigCount); + return _error->Error(msg); + } } - + else + { + char *msg; + int i; + char buf[32]; + string KeyID; + // Check fingerprint for each signature + for (i = 1; i <= SigCount; i++) + { + snprintf(buf, sizeof(buf)-1, "%i", i); + + string SigFile = TempDir+"/sig"+string(buf); + + + // Run GPG on file and get the key ID of the signer + msg = getFileSigner(Itm->DestFile.c_str(), SigFile.c_str(), + NULL, KeyID); + if (msg != NULL) + { + removeTmpDir(TempDir, SigCount); + return _error->Error(msg); + } + if (KeyList.empty()) + KeyList = KeyID; + else + KeyList = KeyList+","+KeyID; + } + } + + removeTmpDir(TempDir, SigCount); + // Transfer the modification times struct stat Buf; if (stat(Path.c_str(),&Buf) != 0) - return _error->Errno("stat","Failed to stat ", Path.c_str()); - + return _error->Errno("stat","Failed to stat %s", Path.c_str()); + struct utimbuf TimeBuf; TimeBuf.actime = Buf.st_atime; TimeBuf.modtime = Buf.st_mtime; if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0) return _error->Errno("utime","Failed to set modification time"); - + if (stat(Itm->DestFile.c_str(),&Buf) != 0) - return _error->Errno("stat","Failed to stat"); + return _error->Errno("stat","Failed to stat %s", Itm->DestFile.c_str()); // Return a Done response Res.LastModified = Buf.st_mtime; Res.Size = Buf.st_size; - Res.SignatureKeyID = keyID; + Res.SignatureFP = KeyList; URIDone(Res); return true; diff --git a/apt/methods/gzip.cc b/apt/methods/gzip.cc index c480fac..7b1dfbe 100644 --- a/apt/methods/gzip.cc +++ b/apt/methods/gzip.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: gzip.cc,v 1.2 2001/03/22 12:01:47 kojima Exp $ +// $Id: gzip.cc,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ /* ###################################################################### GZip method - Take a file URI in and decompress it into the target @@ -13,7 +13,7 @@ #include <apt-pkg/error.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/strutl.h> -#include <apt-pkg/md5.h> +#include <apt-pkg/hashes.h> #include <sys/stat.h> #include <unistd.h> @@ -22,13 +22,15 @@ #include <errno.h> /*}}}*/ +const char *Prog; + class GzipMethod : public pkgAcqMethod { virtual bool Fetch(FetchItem *Itm); public: - GzipMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig) {}; + GzipMethod() : pkgAcqMethod("1.1",SingleInstance | SendConfig) {}; }; @@ -40,31 +42,24 @@ bool GzipMethod::Fetch(FetchItem *Itm) URI Get = Itm->Uri; string Path = Get.Host + Get.Path; // To account for relative paths + string GzPathOption = "Dir::bin::"+string(Prog); + FetchResult Res; Res.Filename = Itm->DestFile; URIStart(Res); // Open the source and destination files FileFd From(Path,FileFd::ReadOnly); - FileFd To(Itm->DestFile,FileFd::WriteEmpty); - To.EraseOnFailure(); - if (_error->PendingError() == true) - return false; - int GzOut[2]; - + int GzOut[2]; if (pipe(GzOut) < 0) - return _error->Errno("fork","Couldn't open pipe for gzip"); + return _error->Errno("pipe","Couldn't open pipe for %s",Prog); - // Fork gzip - int Process = fork(); - if (Process < 0) - return _error->Errno("fork","Couldn't fork gzip"); - - // The child + int Process = ExecFork(); if (Process == 0) { + close(GzOut[0]); dup2(From.Fd(),STDIN_FILENO); dup2(GzOut[1],STDOUT_FILENO); From.Close(); @@ -73,32 +68,37 @@ bool GzipMethod::Fetch(FetchItem *Itm) SetCloseExec(STDOUT_FILENO,false); const char *Args[3]; - Args[0] = _config->Find("Dir::bin::gzip","gzip").c_str(); + string Tmp = _config->Find(GzPathOption,Prog); + Args[0] = Tmp.c_str(); Args[1] = "-d"; Args[2] = 0; execvp(Args[0],(char **)Args); - exit(100); + _exit(100); } From.Close(); close(GzOut[1]); - MD5Summation MD5; - - bool Failed = false; + FileFd FromGz(GzOut[0]); // For autoclose + FileFd To(Itm->DestFile,FileFd::WriteEmpty); + To.EraseOnFailure(); + if (_error->PendingError() == true) + return false; // Read data from gzip, generate checksums and write + Hashes Hash; + bool Failed = false; while (1) { unsigned char Buffer[4*1024]; unsigned long Count; - Count = read(GzOut[0],Buffer,4*1024); + Count = read(GzOut[0],Buffer,sizeof(Buffer)); if (Count < 0 && errno == EINTR) continue; if (Count < 0) { - _error->Errno("read", "Read error from gzip process"); + _error->Errno("read", "Read error from %s process",Prog); Failed = true; break; } @@ -106,13 +106,16 @@ bool GzipMethod::Fetch(FetchItem *Itm) if (Count == 0) break; - MD5.Add(Buffer,Count); - - To.Write(Buffer,Count); + Hash.Add(Buffer,Count); + if (To.Write(Buffer,Count) == false) + { + Failed = true; + break; + } } // Wait for gzip to finish - if (ExecWait(Process,_config->Find("Dir::bin::gzip","gzip").c_str(),false) == false) + if (ExecWait(Process,_config->Find(GzPathOption,Prog).c_str(),false) == false) { To.OpFail(); return false; @@ -140,7 +143,7 @@ bool GzipMethod::Fetch(FetchItem *Itm) // Return a Done response Res.LastModified = Buf.st_mtime; Res.Size = Buf.st_size; - Res.MD5Sum = MD5.Result(); + Res.TakeHashes(Hash); URIDone(Res); @@ -148,8 +151,12 @@ bool GzipMethod::Fetch(FetchItem *Itm) } /*}}}*/ -int main() +int main(int argc, char *argv[]) { GzipMethod Mth; + + Prog = strrchr(argv[0],'/'); + Prog++; + return Mth.Run(); } diff --git a/apt/methods/http.cc b/apt/methods/http.cc index da95669..eb9fab3 100644 --- a/apt/methods/http.cc +++ b/apt/methods/http.cc @@ -1,20 +1,18 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: http.cc,v 1.3 2001/02/20 18:20:02 kojima Exp $ +// $Id: http.cc,v 1.3 2003/01/29 15:25:05 niemeyer Exp $ /* ###################################################################### HTTP Aquire Method - This is the HTTP aquire method for APT. It uses HTTP/1.1 and many of the fancy options there-in, such as - pipelining, range, if-range and so on. It accepts on the command line - a list of url destination pairs and writes to stdout the status of the - operation as defined in the APT method spec. - - It is based on a doubly buffered select loop. All the requests are + pipelining, range, if-range and so on. + + It is based on a doubly buffered select loop. A groupe of requests are fed into a single output buffer that is constantly fed out the socket. This provides ideal pipelining as in many cases all of the requests will fit into a single packet. The input socket is buffered - the same way and fed into the fd for the file. + the same way and fed into the fd for the file (may be a pipe in future). This double buffering provides fairly substantial transfer rates, compared to wget the http method is about 4% faster. Most importantly, @@ -30,7 +28,7 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> -#include <apt-pkg/md5.h> +#include <apt-pkg/hashes.h> #include <sys/stat.h> #include <sys/time.h> @@ -39,6 +37,8 @@ #include <signal.h> #include <stdio.h> #include <errno.h> +#include <string.h> +#include <iostream> // Internet stuff #include <netdb.h> @@ -48,6 +48,7 @@ #include "http.h" /*}}}*/ +using namespace std; string HttpMethod::FailFile; int HttpMethod::FailFd = -1; @@ -59,7 +60,7 @@ bool Debug = false; // CircleBuf::CircleBuf - Circular input buffer /*{{{*/ // --------------------------------------------------------------------- /* */ -CircleBuf::CircleBuf(unsigned long Size) : Size(Size), MD5(0) +CircleBuf::CircleBuf(unsigned long Size) : Size(Size), Hash(0) { Buf = new unsigned char[Size]; Reset(); @@ -75,10 +76,10 @@ void CircleBuf::Reset() StrPos = 0; MaxGet = (unsigned int)-1; OutQueue = string(); - if (MD5 != 0) + if (Hash != 0) { - delete MD5; - MD5 = new MD5Summation; + delete Hash; + Hash = new Hashes; } }; /*}}}*/ @@ -140,7 +141,7 @@ void CircleBuf::FillOut() unsigned long Sz = LeftRead(); if (OutQueue.length() - StrPos < Sz) Sz = OutQueue.length() - StrPos; - memcpy(Buf + (InP%Size),OutQueue.begin() + StrPos,Sz); + memcpy(Buf + (InP%Size),OutQueue.c_str() + StrPos,Sz); // Advance StrPos += Sz; @@ -184,8 +185,8 @@ bool CircleBuf::Write(int Fd) return false; } - if (MD5 != 0) - MD5->Add(Buf + (OutP%Size),Res); + if (Hash != 0) + Hash->Add(Buf + (OutP%Size),Res); OutP += Res; } @@ -258,9 +259,6 @@ ServerState::ServerState(URI Srv,HttpMethod *Owner) : Owner(Owner), // ServerState::Open - Open a connection to the server /*{{{*/ // --------------------------------------------------------------------- /* This opens a connection to the server. */ -string LastHost; -int LastPort = 0; -struct addrinfo *LastHostAddr = 0; bool ServerState::Open() { // Use the already open connection if possible. @@ -270,7 +268,8 @@ bool ServerState::Open() Close(); In.Reset(); Out.Reset(); - + Persistent = true; + // Determine the proxy setting if (getenv("http_proxy") == 0) { @@ -289,32 +288,13 @@ bool ServerState::Open() else Proxy = getenv("http_proxy"); - // Parse no_proxy, a , seperated list of domains + // Parse no_proxy, a , separated list of domains if (getenv("no_proxy") != 0) { - const char *Start = getenv("no_proxy"); - const char *ServerEnd = ServerName.Host.end(); - - for (const char *Cur = Start; true ; Cur++) - { - if (*Cur != ',' && *Cur != 0) - continue; - - // match end of the string - if ((ServerName.Host.size() >= (Cur - Start)) - && stringcasecmp(ServerEnd - (Cur - Start), - ServerEnd,Start,Cur) == 0) - { - Proxy = ""; - break; - } - - Start = Cur + 1; - if (*Cur == 0) - break; - } + if (CheckDomainList(ServerName.Host,getenv("no_proxy")) == true) + Proxy = ""; } - + // Determine what host and port to use based on the proxy settings int Port = 0; string Host; @@ -380,14 +360,23 @@ int ServerState::RunHeaders() { string::const_iterator J = I; for (; J != Data.end() && *J != '\n' && *J != '\r';J++); - if (HeaderLine(string(I,J-I)) == false) + if (HeaderLine(string(I,J)) == false) return 2; I = J; } + + // 100 Continue is a Nop... + if (Result == 100) + continue; + + // Tidy up the connection persistance state. + if (Encoding == Closes && HaveContent == true) + Persistent = false; + return 0; } while (Owner->Go(false,this) == true); - + return 1; } /*}}}*/ @@ -513,7 +502,7 @@ bool ServerState::HeaderLine(string Line) string Tag = string(Line,0,Pos); string Val = string(Line,Pos2); - if (stringcasecmp(Tag.begin(),Tag.begin()+4,"HTTP") == 0) + if (stringcasecmp(Tag.c_str(),Tag.c_str()+4,"HTTP") == 0) { // Evil servers return no version if (Line[4] == '/') @@ -529,7 +518,19 @@ bool ServerState::HeaderLine(string Line) if (sscanf(Line.c_str(),"HTTP %u %[^\n]",&Result,Code) != 2) return _error->Error("The http server sent an invalid reply header"); } - + + /* Check the HTTP response header to get the default persistance + state. */ + if (Major < 1) + Persistent = false; + else + { + if (Major == 1 && Minor <= 0) + Persistent = false; + else + Persistent = true; + } + return true; } @@ -569,11 +570,19 @@ bool ServerState::HeaderLine(string Line) { HaveContent = true; if (stringcasecmp(Val,"chunked") == 0) - Encoding = Chunked; - + Encoding = Chunked; return true; } + if (stringcasecmp(Tag,"Connection:") == 0) + { + if (stringcasecmp(Val,"close") == 0) + Persistent = false; + if (stringcasecmp(Val,"keep-alive") == 0) + Persistent = true; + return true; + } + if (stringcasecmp(Tag,"Last-Modified:") == 0) { if (StrToTime(Val,Date) == false) @@ -660,10 +669,15 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) Req += string("Proxy-Authorization: Basic ") + Base64Encode(Proxy.User + ":" + Proxy.Password) + "\r\n"; - if (0)//akk - Req += "User-Agent: Debian APT-HTTP/1.2\r\n\r\n"; - else - Req += "User-Agent: Conectiva APT-HTTP/1.2\r\n\r\n"; + if (Uri.User.empty() == false || Uri.Password.empty() == false) + Req += string("Authorization: Basic ") + + Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n"; + + // CNC:2003-01-29 + string UserAgent = _config->Find("Acquire::http::User-Agent"); + if (UserAgent.empty() == true) + UserAgent = "RPM APT-HTTP/1.3"; + Req += string("User-Agent: ") + UserAgent + "\r\n\r\n"; if (Debug == true) cerr << Req << endl; @@ -686,10 +700,12 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv) FD_ZERO(&rfds); FD_ZERO(&wfds); - // Add the server - if (Srv->Out.WriteSpace() == true && Srv->ServerFd != -1) + /* Add the server. We only send more requests if the connection will + be persisting */ + if (Srv->Out.WriteSpace() == true && Srv->ServerFd != -1 + && Srv->Persistent == true) FD_SET(Srv->ServerFd,&wfds); - if (Srv->In.ReadSpace() == true && Srv->ServerFd != -1) + if (Srv->In.ReadSpace() == true && Srv->ServerFd != -1) FD_SET(Srv->ServerFd,&rfds); // Add the file @@ -714,7 +730,11 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv) tv.tv_usec = 0; int Res = 0; if ((Res = select(MaxFd+1,&rfds,&wfds,0,&tv)) < 0) + { + if (errno == EINTR) + return true; return _error->Errno("select","Select failed"); + } if (Res == 0) { @@ -883,14 +903,14 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) // Set the start point lseek(File->Fd(),0,SEEK_END); - delete Srv->In.MD5; - Srv->In.MD5 = new MD5Summation; + delete Srv->In.Hash; + Srv->In.Hash = new Hashes; - // Fill the MD5 Hash if the file is non-empty (resume) + // Fill the Hash if the file is non-empty (resume) if (Srv->StartPos > 0) { lseek(File->Fd(),0,SEEK_SET); - if (Srv->In.MD5->AddFD(File->Fd(),Srv->StartPos) == false) + if (Srv->In.Hash->AddFD(File->Fd(),Srv->StartPos) == false) { _error->Errno("read","Problem hashing file"); return 5; @@ -1007,7 +1027,15 @@ int HttpMethod::Loop() delete Server; Server = new ServerState(Queue->Uri,this); } - + + /* If the server has explicitly said this is the last connection + then we pre-emptively shut down the pipeline and tear down + the connection. This will speed up HTTP/1.0 servers a tad + since we don't have to wait for the close sequence to + complete */ + if (Server->Persistent == false) + Server->Close(); + // Reset the pipeline if (Server->ServerFd == -1) QueueBack = Queue; @@ -1035,6 +1063,7 @@ int HttpMethod::Loop() { _error->Error("Bad header Data"); Fail(true); + RotateDNS(); continue; } @@ -1053,6 +1082,7 @@ int HttpMethod::Loop() FailCounter = 0; } + RotateDNS(); continue; } }; @@ -1070,6 +1100,11 @@ int HttpMethod::Loop() // Run the data bool Result = Server->RunData(); + /* If the server is sending back sizeless responses then fill in + the size now */ + if (Res.Size == 0) + Res.Size = File->Size(); + // Close the file, destroy the FD object and timestamp it FailFd = -1; delete File; @@ -1085,12 +1120,12 @@ int HttpMethod::Loop() // Send status to APT if (Result == true) { - Res.MD5Sum = Server->In.MD5->Result(); + Res.TakeHashes(*Server->In.Hash); URIDone(Res); } else Fail(true); - + break; } @@ -1111,7 +1146,11 @@ int HttpMethod::Loop() // Hard internal error, kill the connection and fail case 5: { + delete File; + File = 0; + Fail(); + RotateDNS(); Server->Close(); break; } @@ -1147,3 +1186,5 @@ int main() return Mth.Loop(); } + + diff --git a/apt/methods/http.h b/apt/methods/http.h index 0d106b5..cd028db 100644 --- a/apt/methods/http.h +++ b/apt/methods/http.h @@ -1,5 +1,6 @@ // -*- mode: cpp; mode: fold -*- -// Description /*{{{*/// $Id: http.h,v 1.1.1.1 2000/08/10 12:42:38 kojima Exp $ +// Description /*{{{*/// $Id: http.h,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ +// $Id: http.h,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ /* ###################################################################### HTTP Aquire Method - This is the HTTP aquire method for APT. @@ -12,6 +13,11 @@ #define MAXLEN 360 +#include <iostream> + +using std::cout; +using std::endl; + class HttpMethod; class CircleBuf @@ -45,7 +51,7 @@ class CircleBuf public: - MD5Summation *MD5; + Hashes *Hash; // Read data in bool Read(int Fd); @@ -69,7 +75,7 @@ class CircleBuf void Stats(); CircleBuf(unsigned long Size); - ~CircleBuf() {delete [] Buf;}; + ~CircleBuf() {delete [] Buf; delete Hash;}; }; struct ServerState @@ -87,6 +93,9 @@ struct ServerState bool HaveContent; enum {Chunked,Stream,Closes} Encoding; enum {Header, Data} State; + bool Persistent; + + // This is a Persistent attribute of the server itself. bool Pipeline; HttpMethod *Owner; @@ -130,7 +139,7 @@ class HttpMethod : public pkgAcqMethod static void SigTerm(int); public: - friend ServerState; + friend class ServerState; FileFd *File; ServerState *Server; diff --git a/apt/methods/makefile b/apt/methods/makefile index 70edd1b..4ed015f 100644 --- a/apt/methods/makefile +++ b/apt/methods/makefile @@ -6,60 +6,78 @@ SUBDIR=methods include ../buildlib/defaults.mak BIN := $(BIN)/methods +# FIXME.. +LIB_APT_PKG_MAJOR = 3.3 +APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR) + # The file method PROGRAM=file -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile SOURCE = file.cc include $(PROGRAM_H) # The copy method PROGRAM=copy -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile SOURCE = copy.cc include $(PROGRAM_H) # The gzip method PROGRAM=gzip -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile SOURCE = gzip.cc include $(PROGRAM_H) -# The gpg method -PROGRAM=gpg -SLIBS = -lapt-pkg $(RPMLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = gpg.cc -include $(PROGRAM_H) - - - # The cdrom method PROGRAM=cdrom -SLIBS = -lapt-pkg $(RPMLIBS) +SLIBS = -lapt-pkg LIB_MAKES = apt-pkg/makefile SOURCE = cdrom.cc include $(PROGRAM_H) # The http method PROGRAM=http -SLIBS = -lapt-pkg $(SOCKETLIBS) $(RPMLIBS) +SLIBS = -lapt-pkg $(SOCKETLIBS) LIB_MAKES = apt-pkg/makefile SOURCE = http.cc rfc2553emu.cc connect.cc include $(PROGRAM_H) # The ftp method PROGRAM=ftp -SLIBS = -lapt-pkg $(SOCKETLIBS) $(RPMLIBS) +SLIBS = -lapt-pkg $(SOCKETLIBS) LIB_MAKES = apt-pkg/makefile SOURCE = ftp.cc rfc2553emu.cc connect.cc include $(PROGRAM_H) # The rsh method -#PROGRAM=rsh -#SLIBS = -lapt-pkg $(SOCKETLIBS) $(RPMLIBS) -#LIB_MAKES = apt-pkg/makefile -#SOURCE = rsh.cc -#include $(PROGRAM_H) +PROGRAM=rsh +SLIBS = -lapt-pkg +LIB_MAKES = apt-pkg/makefile +SOURCE = rsh.cc +include $(PROGRAM_H) + +# CNC:2002-07-03 +# The gpg method +PROGRAM=gpg +SLIBS = -lapt-pkg +LIB_MAKES = apt-pkg/makefile +SOURCE = gpg.cc +include $(PROGRAM_H) + +# SSH and vzip2 method symlink +all: $(BIN)/ssh $(BIN)/bzip2 +veryclean: clean-$(BIN)/ssh clean-$(BIN)/bzip2 +$(BIN)/ssh: + echo "Installing ssh method link" + ln -fs rsh $(BIN)/ssh +clean-$(BIN)/ssh: + -rm $(BIN)/ssh + +$(BIN)/bzip2: + echo "Installing bzip2 method link" + ln -fs gzip $(BIN)/bzip2 +clean-$(BIN)/bzip2: + -rm $(BIN)/bzip2 diff --git a/apt/methods/rfc2553emu.cc b/apt/methods/rfc2553emu.cc index dcc71d7..379be22 100644 --- a/apt/methods/rfc2553emu.cc +++ b/apt/methods/rfc2553emu.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rfc2553emu.cc,v 1.1.1.1 2000/08/10 12:42:38 kojima Exp $ +// $Id: rfc2553emu.cc,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ /* ###################################################################### RFC 2553 Emulation - Provides emulation for RFC 2553 getaddrinfo, @@ -36,20 +36,6 @@ int getaddrinfo(const char *nodename, const char *servname, const char *End; char **CurAddr; - Addr = gethostbyname(nodename); - if (Addr == 0) - { - if (h_errno == TRY_AGAIN) - return EAI_AGAIN; - if (h_errno == NO_RECOVERY) - return EAI_FAIL; - return EAI_NONAME; - } - - // No A records - if (Addr->h_addr_list[0] == 0) - return EAI_NONAME; - // Try to convert the service as a number Port = htons(strtol(servname,(char **)&End,0)); Proto = SOCK_STREAM; @@ -86,10 +72,32 @@ int getaddrinfo(const char *nodename, const char *servname, hints->ai_socktype != 0) return EAI_SERVICE; } + + // Hostname lookup, only if this is not a listening socket + if (hints != 0 && (hints->ai_flags & AI_PASSIVE) != AI_PASSIVE) + { + Addr = gethostbyname(nodename); + if (Addr == 0) + { + if (h_errno == TRY_AGAIN) + return EAI_AGAIN; + if (h_errno == NO_RECOVERY) + return EAI_FAIL; + return EAI_NONAME; + } + + // No A records + if (Addr->h_addr_list[0] == 0) + return EAI_NONAME; + + CurAddr = Addr->h_addr_list; + } + else + CurAddr = (char **)&End; // Fake! // Start constructing the linked list *res = 0; - for (CurAddr = Addr->h_addr_list; *CurAddr != 0; CurAddr++) + for (; *CurAddr != 0; CurAddr++) { // New result structure *Result = (struct addrinfo *)calloc(sizeof(**Result),1); @@ -124,8 +132,15 @@ int getaddrinfo(const char *nodename, const char *servname, // Set the address ((struct sockaddr_in *)(*Result)->ai_addr)->sin_family = AF_INET; ((struct sockaddr_in *)(*Result)->ai_addr)->sin_port = Port; - ((struct sockaddr_in *)(*Result)->ai_addr)->sin_addr = *(in_addr *)(*CurAddr); - + + if (hints != 0 && (hints->ai_flags & AI_PASSIVE) != AI_PASSIVE) + ((struct sockaddr_in *)(*Result)->ai_addr)->sin_addr = *(in_addr *)(*CurAddr); + else + { + // Already zerod by calloc. + break; + } + Result = &(*Result)->ai_next; } @@ -202,9 +217,9 @@ int getnameinfo(const struct sockaddr *sa, socklen_t salen, { struct servent *Ent; if ((flags & NI_DATAGRAM) == NI_DATAGRAM) - Ent = getservbyport(sin->sin_port,"udp"); + Ent = getservbyport(ntohs(sin->sin_port),"udp"); else - Ent = getservbyport(sin->sin_port,"tcp"); + Ent = getservbyport(ntohs(sin->sin_port),"tcp"); if (Ent != 0) strncpy(serv,Ent->s_name,servlen); @@ -220,7 +235,7 @@ int getnameinfo(const struct sockaddr *sa, socklen_t salen, // Resolve as a plain numberic if ((flags & NI_NUMERICSERV) == NI_NUMERICSERV) { - snprintf(serv,servlen,"%u",sin->sin_port); + snprintf(serv,servlen,"%u",ntohs(sin->sin_port)); } } diff --git a/apt/methods/rfc2553emu.h b/apt/methods/rfc2553emu.h index 0ffc773..f3fefa4 100644 --- a/apt/methods/rfc2553emu.h +++ b/apt/methods/rfc2553emu.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rfc2553emu.h,v 1.1.1.1 2000/08/10 12:42:38 kojima Exp $ +// $Id: rfc2553emu.h,v 1.1 2002/07/23 17:54:53 niemeyer Exp $ /* ###################################################################### RFC 2553 Emulation - Provides emulation for RFC 2553 getaddrinfo, @@ -74,6 +74,11 @@ #define EAI_MEMORY -11 #endif + /* If we don't have getaddrinfo then we probably don't have + sockaddr_storage either (same RFC) so we definately will not be + doing any IPv6 stuff. Do not use the members of this structure to + retain portability, cast to a sockaddr. */ + #define sockaddr_storage sockaddr_in #endif // getnameinfo support (glibc2.0 has getaddrinfo only) @@ -97,6 +102,12 @@ #define NI_DATAGRAM (1<<4) #endif + #define sockaddr_storage sockaddr_in +#endif + +// Glibc 2.0.7 misses this one +#ifndef AI_NUMERICHOST +#define AI_NUMERICHOST 0 #endif #endif diff --git a/apt/methods/rsh.cc b/apt/methods/rsh.cc index bb435d7..1517a1c 100644 --- a/apt/methods/rsh.cc +++ b/apt/methods/rsh.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rsh.cc,v 1.1 2001/11/30 20:34:13 kojima Exp $ +// $Id: rsh.cc,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### RSH method - Transfer files via rsh compatible program @@ -10,7 +10,7 @@ ##################################################################### */ /*}}}*/ -// Iclude Files /*{{{*/ +// Include Files /*{{{*/ #include "rsh.h" #include <apt-pkg/error.h> @@ -26,6 +26,7 @@ const char *Prog; unsigned long TimeOut = 120; +Configuration::Item const *RshOptions = 0; time_t RSHMethod::FailTime = 0; string RSHMethod::FailFile; int RSHMethod::FailFd = -1; @@ -99,8 +100,8 @@ bool RSHConn::Connect(string Host, string User) // The child if (Process == 0) { - const char *Args[6]; - int i = 0; + const char *Args[400]; + unsigned int i = 0; dup2(Pipes[1],STDOUT_FILENO); dup2(Pipes[2],STDIN_FILENO); @@ -108,6 +109,19 @@ bool RSHConn::Connect(string Host, string User) // Probably should do // dup2(open("/dev/null",O_RDONLY),STDERR_FILENO); + // Insert user-supplied command line options + Configuration::Item const *Opts = RshOptions; + if (Opts != 0) + { + Opts = Opts->Child; + for (; Opts != 0; Opts = Opts->Next) + { + if (Opts->Value.empty() == true) + continue; + Args[i++] = Opts->Value.c_str(); + } + } + Args[i++] = Prog; if (User.empty() == false) { Args[i++] = "-l"; @@ -338,7 +352,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume, // RSHMethod::RSHMethod - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -RSHMethod::RSHMethod() : pkgAcqMethod("1.0") +RSHMethod::RSHMethod() : pkgAcqMethod("1.0",SendConfig) { signal(SIGTERM,SigTerm); signal(SIGINT,SigTerm); @@ -346,6 +360,23 @@ RSHMethod::RSHMethod() : pkgAcqMethod("1.0") FailFd = -1; }; /*}}}*/ +// RSHMethod::Configuration - Handle a configuration message /*{{{*/ +// --------------------------------------------------------------------- +bool RSHMethod::Configuration(string Message) +{ + char ProgStr[100]; + + if (pkgAcqMethod::Configuration(Message) == false) + return false; + + snprintf(ProgStr, sizeof ProgStr, "Acquire::%s::Timeout", Prog); + TimeOut = _config->FindI(ProgStr,TimeOut); + snprintf(ProgStr, sizeof ProgStr, "Acquire::%s::Options", Prog); + RshOptions = _config->Tree(ProgStr); + + return true; +} + /*}}}*/ // RSHMethod::SigTerm - Clean up and timestamp the files on exit /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt/methods/rsh.h b/apt/methods/rsh.h index 921762f..cf0ed28 100644 --- a/apt/methods/rsh.h +++ b/apt/methods/rsh.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- -// Description /*{{{*/// $Id: rsh.h,v 1.1 2001/11/30 20:34:13 kojima Exp $ -// $Id: rsh.h,v 1.1 2001/11/30 20:34:13 kojima Exp $ +// Description /*{{{*/// $Id: rsh.h,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ +// $Id: rsh.h,v 1.2 2003/01/29 18:43:48 niemeyer Exp $ /* ###################################################################### RSH method - Transfer files via rsh compatible program @@ -53,6 +53,7 @@ class RSHConn class RSHMethod : public pkgAcqMethod { virtual bool Fetch(FetchItem *Itm); + virtual bool Configuration(string Message); RSHConn *Server; diff --git a/apt/po/CVS/Entries b/apt/po/CVS/Entries deleted file mode 100644 index 892f008..0000000 --- a/apt/po/CVS/Entries +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile.in.in/1.1/Fri Aug 10 14:03:58 2001// -/apt.pot/1.10/Fri Aug 10 14:04:12 2001// -/cat-id-tbl.c/1.6/Fri Aug 10 14:04:12 2001// -/es_ES.po/1.7/Fri Aug 10 14:04:14 2001// -/it_IT.po/1.1/Fri Aug 10 14:04:16 2001// -/stamp-cat-id/1.1/Fri Aug 10 14:04:24 2001// -/pt_BR.po/1.18/Tue Nov 13 14:24:16 2001// -/POTFILES.in/1.4/Fri Nov 16 01:13:06 2001// -/ru.po/1.1/Tue Nov 13 17:32:08 2001// -D diff --git a/apt/po/CVS/Repository b/apt/po/CVS/Repository deleted file mode 100644 index b65def8..0000000 --- a/apt/po/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/po diff --git a/apt/po/CVS/Root b/apt/po/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/po/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/po/LINGUAS b/apt/po/LINGUAS new file mode 100644 index 0000000..c9217fe --- /dev/null +++ b/apt/po/LINGUAS @@ -0,0 +1 @@ +de_DE es_ES it_IT pt_BR ru diff --git a/apt/po/Makefile.in.in b/apt/po/Makefile.in.in deleted file mode 100644 index ea01d49..0000000 --- a/apt/po/Makefile.in.in +++ /dev/null @@ -1,247 +0,0 @@ -# Makefile for program source directory in GNU NLS utilities package. -# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -SHELL = /bin/sh -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datadir = $(prefix)/@DATADIRNAME@ -localedir = $(datadir)/locale -gnulocaledir = $(prefix)/share/locale -gettextsrcdir = $(prefix)/share/gettext/po -subdir = po - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ - -CC = @CC@ -GENCAT = @GENCAT@ -GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ -MSGMERGE = PATH=../src:$$PATH msgmerge - -DEFS = @DEFS@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ - -INCLUDES = -I.. -I$(top_srcdir)/intl - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -SOURCES = cat-id-tbl.c -POFILES = @POFILES@ -GMOFILES = @GMOFILES@ -DISTFILES = Makefile.in.in POTFILES.in $(PACKAGE).pot \ -stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) - -POTFILES = \ - -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -INSTOBJEXT = @INSTOBJEXT@ - -.SUFFIXES: -.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat - -.c.o: - $(COMPILE) $< - -.po.pox: - $(MAKE) $(PACKAGE).pot - $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox - -.po.mo: - $(MSGFMT) -o $@ $< - -.po.gmo: - file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) -o $$file $< - -.po.cat: - sed -f ../intl/po2msg.sed < $< > $*.msg \ - && rm -f $@ && $(GENCAT) $@ $*.msg - - -all: all-@USE_NLS@ - -all-yes: cat-id-tbl.c $(CATALOGS) -all-no: - -$(srcdir)/$(PACKAGE).pot: $(POTFILES) - $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ - --add-comments --keyword=_ --keyword=N_ \ - --files-from=$(srcdir)/POTFILES.in \ - && test ! -f $(PACKAGE).po \ - || ( rm -f $(srcdir)/$(PACKAGE).pot \ - && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) - -$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: -$(srcdir)/stamp-cat-id: $(PACKAGE).pot - rm -f cat-id-tbl.tmp - sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ - | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp - if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ - rm cat-id-tbl.tmp; \ - else \ - echo cat-id-tbl.c changed; \ - rm -f $(srcdir)/cat-id-tbl.c; \ - mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ - fi - cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id - - -install: install-exec install-data -install-exec: -install-data: install-data-@USE_NLS@ -install-data-no: all -install-data-yes: all - if test -x "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ - else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ - fi - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - case "$$cat" in \ - *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \ - *) destdir=$(DESTDIR)$(localedir);; \ - esac; \ - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ - dir=$$destdir/$$lang/LC_MESSAGES; \ - if test -r "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $$dir; \ - else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ - fi; \ - if test -r $$cat; then \ - $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ - echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ - echo "installing $(srcdir)/$$cat as" \ - "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ - fi; \ - if test -r $$cat.m; then \ - $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ - echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ - else \ - if test -r $(srcdir)/$$cat.m ; then \ - $(INSTALL_DATA) $(srcdir)/$$cat.m \ - $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ - echo "installing $(srcdir)/$$cat as" \ - "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ - else \ - true; \ - fi; \ - fi; \ - done - if test "$(PACKAGE)" = "gettext"; then \ - if test -x "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ - else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ - fi; \ - $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ - $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ - else \ - : ; \ - fi - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ - rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ - rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ - done - -check: all - -cat-id-tbl.o: ../intl/libgettext.h - -dvi info tags TAGS ID: - -mostlyclean: - rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp - rm -fr *.o - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f $(GMOFILES) - -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: update-po $(DISTFILES) - dists="$(DISTFILES)"; \ - for file in $$dists; do \ - ln $(srcdir)/$$file $(distdir) 2> /dev/null \ - || cp -p $(srcdir)/$$file $(distdir); \ - done - -update-po: Makefile - $(MAKE) $(PACKAGE).pot - PATH=`pwd`/../src:$$PATH; \ - cd $(srcdir); \ - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ - mv $$lang.po $$lang.old.po; \ - echo "$$lang:"; \ - if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ - rm -f $$lang.old.po; \ - else \ - echo "msgmerge for $$cat failed!"; \ - rm -f $$lang.po; \ - mv $$lang.old.po $$lang.po; \ - fi; \ - done - -POTFILES: POTFILES.in - ( if test 'x$(srcdir)' != 'x.'; then \ - posrcprefix='$(top_srcdir)/'; \ - else \ - posrcprefix="../"; \ - fi; \ - rm -f $@-t $@ \ - && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ - -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ - | sed -e '$$s/\\$$//') > $@-t \ - && chmod a-w $@-t \ - && mv $@-t $@ ) - -Makefile: Makefile.in.in ../config.status POTFILES - cd .. \ - && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ - $(SHELL) ./config.status - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/apt/po/POTFILES.in b/apt/po/POTFILES.in deleted file mode 100644 index 06c1ba7..0000000 --- a/apt/po/POTFILES.in +++ /dev/null @@ -1,32 +0,0 @@ -cmdline/apt-cache.cc -cmdline/apt-cdrom.cc -cmdline/apt-config.cc -cmdline/apt-get.cc -apt-pkg/acquire-item.cc -apt-pkg/acquire-worker.cc -apt-pkg/acquire.cc -apt-pkg/cachefile.cc -apt-pkg/clean.cc -apt-pkg/depcache.cc -apt-pkg/packagemanager.cc -apt-pkg/pkgcache.cc -apt-pkg/pkgcachegen.cc -apt-pkg/pkgrecords.cc -apt-pkg/contrib/cdromutl.cc -apt-pkg/contrib/cmndline.cc -apt-pkg/contrib/configuration.cc -apt-pkg/contrib/error.cc -apt-pkg/contrib/fileutl.cc -apt-pkg/contrib/mmap.cc -apt-pkg/contrib/progress.cc -apt-pkg/contrib/strutl.cc -apt-pkg/rpm/rpmfactory.cc -apt-pkg/rpm/rpminit.cc -apt-pkg/rpm/rpmlistparser.cc -apt-pkg/rpm/rpmpackagedata.cc -apt-pkg/rpm/rpmpm.cc -apt-pkg/rpm/rpmsrcrecords.cc -apt-pkg/sourcelist.cc -apt-pkg/srcrecords.cc -apt-pkg/systemfactory.cc -apt-pkg/tagfile.cc diff --git a/apt/po/apt.pot b/apt/po/apt.pot deleted file mode 100644 index e9c2172..0000000 --- a/apt/po/apt.pot +++ /dev/null @@ -1,1474 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-01-10 13:40-0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <LL@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#. Yes/No -#: cmdline/apt-get.cc:129 -msgid "Y" -msgstr "" - -#: cmdline/apt-get.cc:129 -msgid "y" -msgstr "" - -#: cmdline/apt-get.cc:215 -msgid "Sorry, but the following packages have unmet dependencies:" -msgstr "" - -#: cmdline/apt-get.cc:275 -msgid " but " -msgstr "" - -#: cmdline/apt-get.cc:278 -msgid " is installed" -msgstr "" - -#: cmdline/apt-get.cc:278 -msgid " is to be installed" -msgstr "" - -#: cmdline/apt-get.cc:284 -msgid "it is not installable" -msgstr "" - -#: cmdline/apt-get.cc:286 -msgid "it is a virtual package" -msgstr "" - -#: cmdline/apt-get.cc:289 -msgid "it is not installed" -msgstr "" - -#: cmdline/apt-get.cc:289 -msgid "it is not going to be installed" -msgstr "" - -#: cmdline/apt-get.cc:294 -msgid " or" -msgstr "" - -#: cmdline/apt-get.cc:320 -msgid "The following NEW packages will be installed:" -msgstr "" - -#: cmdline/apt-get.cc:343 -msgid "The following packages will be REMOVED:" -msgstr "" - -#: cmdline/apt-get.cc:363 -msgid "The following packages have been kept back" -msgstr "" - -#: cmdline/apt-get.cc:383 -msgid "The following packages will be upgraded" -msgstr "" - -#: cmdline/apt-get.cc:415 -msgid "The following packages can be upgraded:" -msgstr "" - -#: cmdline/apt-get.cc:426 -msgid " from " -msgstr "" - -#: cmdline/apt-get.cc:427 -msgid " to " -msgstr "" - -#: cmdline/apt-get.cc:429 -msgid " Importance: " -msgstr "" - -#: cmdline/apt-get.cc:430 -msgid " Date: " -msgstr "" - -#: cmdline/apt-get.cc:450 -msgid "The following held packages will be changed:" -msgstr "" - -#: cmdline/apt-get.cc:500 -#, c-format -msgid "%s (due to %s) " -msgstr "" - -#: cmdline/apt-get.cc:508 -msgid "WARNING: The following essential packages will be removed" -msgstr "" - -#: cmdline/apt-get.cc:509 -msgid "This should NOT be done unless you know exactly what you are doing!" -msgstr "" - -#: cmdline/apt-get.cc:531 -msgid " packages upgraded, " -msgstr "" - -#: cmdline/apt-get.cc:532 -msgid " newly installed, " -msgstr "" - -#: cmdline/apt-get.cc:534 -msgid " reinstalled, " -msgstr "" - -#: cmdline/apt-get.cc:535 -msgid " to remove and " -msgstr "" - -#: cmdline/apt-get.cc:536 -msgid " not upgraded." -msgstr "" - -#: cmdline/apt-get.cc:539 -msgid " packages not fully installed or removed." -msgstr "" - -#: apt-pkg/pkgrecords.cc:36 cmdline/apt-cache.cc:364 cmdline/apt-cache.cc:970 -#: cmdline/apt-cache.cc:1005 cmdline/apt-get.cc:555 -#, c-format -msgid "Package file %s is out of sync." -msgstr "" - -#: cmdline/apt-get.cc:672 -msgid "Correcting dependencies..." -msgstr "" - -#: cmdline/apt-get.cc:675 -msgid " failed." -msgstr "" - -#: cmdline/apt-get.cc:678 -msgid "Unable to correct dependencies" -msgstr "" - -#: cmdline/apt-get.cc:681 -msgid "Unable to minimize the upgrade set" -msgstr "" - -#: cmdline/apt-get.cc:683 -msgid " Done" -msgstr "" - -#: cmdline/apt-get.cc:687 -msgid "You might want to run `apt-get -f install' to correct these." -msgstr "" - -#: cmdline/apt-get.cc:690 -msgid "Unmet dependencies. Try using -f." -msgstr "" - -#: cmdline/apt-get.cc:743 -msgid "Internal Error, InstallPackages was called with broken packages!" -msgstr "" - -#: cmdline/apt-get.cc:752 -msgid "Packages need to be removed but No Remove was specified." -msgstr "" - -#: cmdline/apt-get.cc:762 -msgid "Internal Error, Ordering didn't finish" -msgstr "" - -#: cmdline/apt-get.cc:777 cmdline/apt-get.cc:1536 cmdline/apt-get.cc:1569 -msgid "Unable to lock the download directory" -msgstr "" - -#: apt-pkg/cachefile.cc:73 cmdline/apt-get.cc:787 cmdline/apt-get.cc:1619 -msgid "The list of sources could not be read." -msgstr "" - -#: cmdline/apt-get.cc:804 -msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" -msgstr "" - -#. Number of bytes -#: cmdline/apt-get.cc:808 cmdline/apt-get.cc:1752 -msgid "Need to get " -msgstr "" - -#: cmdline/apt-get.cc:814 -msgid " of archives. After unpacking " -msgstr "" - -#: cmdline/apt-get.cc:818 -msgid "B will be used." -msgstr "" - -#: cmdline/apt-get.cc:820 -msgid "B will be freed." -msgstr "" - -#: cmdline/apt-get.cc:832 cmdline/apt-get.cc:1745 -#, c-format -msgid "Couldn't determine free space in %s" -msgstr "" - -#: cmdline/apt-get.cc:835 -#, c-format -msgid "Sorry, you don't have enough free space in %s to hold all packages." -msgstr "" - -#: cmdline/apt-get.cc:844 -msgid "There are problems and -y was used without --force-yes" -msgstr "" - -#: cmdline/apt-get.cc:850 cmdline/apt-get.cc:867 -msgid "Trivial Only specified but this is not a trivial operation." -msgstr "" - -#: cmdline/apt-get.cc:852 -msgid "You are about to do something potentially harmful" -msgstr "" - -#: cmdline/apt-get.cc:853 -msgid "To continue type in the phrase 'Yes, I understand this may be bad'" -msgstr "" - -#: cmdline/apt-get.cc:854 -msgid " ?] " -msgstr "" - -#: cmdline/apt-get.cc:855 -msgid "Yes, I understand this may be bad" -msgstr "" - -#: cmdline/apt-get.cc:857 cmdline/apt-get.cc:876 -msgid "Aborted." -msgstr "" - -#: cmdline/apt-get.cc:872 -msgid "Do you want to continue? [Y/n] " -msgstr "" - -#: cmdline/apt-get.cc:936 cmdline/apt-get.cc:1196 cmdline/apt-get.cc:1788 -msgid "Failed to fetch " -msgstr "" - -#: cmdline/apt-get.cc:954 -msgid "Some files failed to download" -msgstr "" - -#: cmdline/apt-get.cc:960 -msgid "Unable to fetch some archives, maybe try with --fix-missing?" -msgstr "" - -#: cmdline/apt-get.cc:964 -msgid "--fix-missing and media swapping is not currently supported" -msgstr "" - -#: cmdline/apt-get.cc:969 -msgid "Unable to correct missing packages." -msgstr "" - -#: cmdline/apt-get.cc:970 -msgid "Aborting Install." -msgstr "" - -#: cmdline/apt-get.cc:1001 -msgid "Note, selecting " -msgstr "" - -#: cmdline/apt-get.cc:1001 -msgid " instead of " -msgstr "" - -#: cmdline/apt-get.cc:1010 -msgid "Skipping " -msgstr "" - -#: cmdline/apt-get.cc:1010 -msgid ", it is already installed and no-upgrade is set." -msgstr "" - -#: cmdline/apt-get.cc:1020 -#, c-format -msgid "Package %s is not installed" -msgstr "" - -#: cmdline/apt-cache.cc:116 cmdline/apt-get.cc:1030 cmdline/apt-get.cc:1050 -msgid "Package " -msgstr "" - -#: cmdline/apt-get.cc:1030 -msgid " is a virtual package provided by:" -msgstr "" - -#: cmdline/apt-get.cc:1041 -msgid " [Installed]" -msgstr "" - -#: cmdline/apt-get.cc:1046 -msgid "You should explicitly select one to install." -msgstr "" - -#: cmdline/apt-get.cc:1050 -msgid " has no available version, but exists in the database." -msgstr "" - -#: cmdline/apt-get.cc:1051 -msgid "" -"This typically means that the package was mentioned in a dependency and " -msgstr "" - -#: cmdline/apt-get.cc:1052 -msgid "" -"never uploaded, has been obsoleted or is not available with the contents " -msgstr "" - -#: cmdline/apt-get.cc:1053 -msgid "of sources.list" -msgstr "" - -#: cmdline/apt-get.cc:1064 -msgid "However the following packages replace it:" -msgstr "" - -#: cmdline/apt-get.cc:1067 -#, c-format -msgid "Package %s has no installation candidate" -msgstr "" - -#: cmdline/apt-get.cc:1087 -msgid "Sorry, re-installation of " -msgstr "" - -#: cmdline/apt-get.cc:1087 -msgid " is not possible, it cannot be downloaded" -msgstr "" - -#: cmdline/apt-get.cc:1094 -msgid "Sorry, " -msgstr "" - -#: cmdline/apt-get.cc:1094 -msgid " is already the newest version" -msgstr "" - -#: cmdline/apt-get.cc:1123 -msgid "Unable to lock the list directory" -msgstr "" - -#: cmdline/apt-get.cc:1148 -msgid "Could not retrieve digitally signed hash file" -msgstr "" - -#: cmdline/apt-get.cc:1160 -msgid "Failed to fetch hash file: " -msgstr "" - -#: cmdline/apt-get.cc:1168 -msgid "" -"Some of the signed hash files could not be retrieved. Aborting operation." -msgstr "" - -#: cmdline/apt-get.cc:1210 -msgid "Some of the index files had mismatching MD5 sums!" -msgstr "" - -#: cmdline/apt-get.cc:1218 -msgid "" -"Some index files failed to download, they have been ignored, or old ones " -"used instead." -msgstr "" - -#: cmdline/apt-get.cc:1223 -msgid " will not be authenticated." -msgstr "" - -#: cmdline/apt-get.cc:1244 -msgid "Internal Error, AllUpgrade broke stuff" -msgstr "" - -#: cmdline/apt-get.cc:1313 cmdline/apt-get.cc:1346 -#, c-format -msgid "Couldn't find package %s" -msgstr "" - -#: cmdline/apt-get.cc:1326 -msgid "Regex compilation error:" -msgstr "" - -#: cmdline/apt-get.cc:1360 -msgid "You might want to run `apt-get -f install' to correct these:" -msgstr "" - -#: cmdline/apt-get.cc:1363 -msgid "" -"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " -"solution)." -msgstr "" - -#: cmdline/apt-get.cc:1374 -msgid "Some packages could not be installed. This may mean that you have" -msgstr "" - -#: cmdline/apt-get.cc:1375 -msgid "requested an impossible situation or if you are using the unstable" -msgstr "" - -#: cmdline/apt-get.cc:1376 -msgid "distribution that some required packages have not yet been created" -msgstr "" - -#: cmdline/apt-get.cc:1377 -msgid "or been moved out of Incoming." -msgstr "" - -#: cmdline/apt-get.cc:1381 -msgid "Since you only requested a single operation it is extremely likely that" -msgstr "" - -#: cmdline/apt-get.cc:1382 -msgid "the package is simply not installable and a bug report against" -msgstr "" - -#: cmdline/apt-get.cc:1383 -msgid "that package should be filed." -msgstr "" - -#: cmdline/apt-get.cc:1386 -msgid "The following information may help to resolve the situation:" -msgstr "" - -#: cmdline/apt-get.cc:1389 -msgid "Sorry, broken packages" -msgstr "" - -#: cmdline/apt-get.cc:1412 -msgid "The following extra packages will be installed:" -msgstr "" - -#: cmdline/apt-get.cc:1431 -msgid "Calculating Upgrade... " -msgstr "" - -#: cmdline/apt-get.cc:1434 -msgid "Failed" -msgstr "" - -#: cmdline/apt-get.cc:1439 -msgid "Done" -msgstr "" - -#: cmdline/apt-get.cc:1504 cmdline/apt-get.cc:1512 -msgid "Internal Error, problem resolver broke stuff" -msgstr "" - -#: cmdline/apt-get.cc:1614 -msgid "Must specify at least one package to fetch source for" -msgstr "" - -#: cmdline/apt-get.cc:1688 -#, c-format -msgid "Unable to find a source package for %s" -msgstr "" - -#: cmdline/apt-get.cc:1748 -#, c-format -msgid "Sorry, you don't have enough free space in %s" -msgstr "" - -#: cmdline/apt-get.cc:1757 -msgid " of source archives." -msgstr "" - -#: cmdline/apt-get.cc:1762 -msgid "Fetch Source " -msgstr "" - -#: cmdline/apt-get.cc:1793 -msgid "Failed to fetch some archives." -msgstr "" - -#: cmdline/apt-get.cc:1813 cmdline/apt-get.cc:1859 -msgid "Build command '" -msgstr "" - -#: cmdline/apt-get.cc:1813 cmdline/apt-get.cc:1842 cmdline/apt-get.cc:1859 -msgid "' failed." -msgstr "" - -#: cmdline/apt-get.cc:1831 -msgid "Skipping unpack of already unpacked source in " -msgstr "" - -#: cmdline/apt-get.cc:1842 -msgid "Unpack command '" -msgstr "" - -#: cmdline/apt-get.cc:1875 -msgid "Couldn't wait for subprocess" -msgstr "" - -#: cmdline/apt-get.cc:1879 -msgid "Child process failed" -msgstr "" - -#: cmdline/apt-get.cc:1895 -msgid "Usage: apt-get [options] command" -msgstr "" - -#: cmdline/apt-get.cc:1896 -msgid " apt-get [options] install pkg1 [pkg2 ...]" -msgstr "" - -#: cmdline/apt-get.cc:1898 -msgid "apt-get is a simple command line interface for downloading and" -msgstr "" - -#: cmdline/apt-get.cc:1899 -msgid "installing packages. The most frequently used commands are update" -msgstr "" - -#: cmdline/apt-get.cc:1900 -msgid "and install." -msgstr "" - -#: cmdline/apt-cache.cc:1203 cmdline/apt-cdrom.cc:864 cmdline/apt-config.cc:79 -#: cmdline/apt-get.cc:1902 -msgid "Commands:" -msgstr "" - -#: cmdline/apt-get.cc:1903 -msgid " update - Retrieve new lists of packages" -msgstr "" - -#: cmdline/apt-get.cc:1904 -msgid " upgrade - Perform an upgrade" -msgstr "" - -#: cmdline/apt-get.cc:1905 -msgid " install - Install new packages" -msgstr "" - -#: cmdline/apt-get.cc:1906 -msgid " remove - Remove packages" -msgstr "" - -#: cmdline/apt-get.cc:1907 -msgid " source - Download source archives" -msgstr "" - -#: cmdline/apt-get.cc:1908 -msgid " dist-upgrade - Distribution upgrade, see apt-get(8)" -msgstr "" - -#. cout << " dselect-upgrade - Follow dselect selections" << endl; -#: cmdline/apt-get.cc:1910 -msgid " clean - Erase downloaded archive files" -msgstr "" - -#: cmdline/apt-get.cc:1911 -msgid " autoclean - Erase old downloaded archive files" -msgstr "" - -#: cmdline/apt-get.cc:1912 -msgid " check - Verify that there are no broken dependencies" -msgstr "" - -#: cmdline/apt-cache.cc:1218 cmdline/apt-cdrom.cc:867 cmdline/apt-config.cc:83 -#: cmdline/apt-get.cc:1914 -msgid "Options:" -msgstr "" - -#: cmdline/apt-get.cc:1915 -msgid " -h This help text." -msgstr "" - -#: cmdline/apt-get.cc:1916 -msgid " -q Loggable output - no progress indicator" -msgstr "" - -#: cmdline/apt-get.cc:1917 -msgid " -qq No output except for errors" -msgstr "" - -#: cmdline/apt-get.cc:1918 -msgid " -S Show summary for upgrade operation and quit" -msgstr "" - -#: cmdline/apt-get.cc:1919 -msgid " -d Download only - do NOT install or unpack archives" -msgstr "" - -#: cmdline/apt-get.cc:1920 -msgid " -s No-act. Perform ordering simulation" -msgstr "" - -#: cmdline/apt-get.cc:1921 -msgid " -y Assume Yes to all queries and do not prompt" -msgstr "" - -#: cmdline/apt-get.cc:1922 -msgid " -f Attempt to continue if the integrity check fails" -msgstr "" - -#: cmdline/apt-get.cc:1923 -msgid " -m Attempt to continue if archives are unlocatable" -msgstr "" - -#: cmdline/apt-get.cc:1924 -msgid " -u Show a list of upgraded packages as well" -msgstr "" - -#: cmdline/apt-get.cc:1925 -msgid " -b Build the source package after fetching it" -msgstr "" - -#: cmdline/apt-cache.cc:1224 cmdline/apt-cdrom.cc:874 cmdline/apt-config.cc:85 -#: cmdline/apt-get.cc:1926 -msgid " -c=? Read this configuration file" -msgstr "" - -#: cmdline/apt-cache.cc:1225 cmdline/apt-cdrom.cc:875 cmdline/apt-config.cc:86 -#: cmdline/apt-get.cc:1927 -msgid " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" -msgstr "" - -#: cmdline/apt-get.cc:1928 -msgid "See the apt-get(8), sources.list(5) and apt.conf(5) manual" -msgstr "" - -#: cmdline/apt-get.cc:1929 -msgid "pages for more information and options." -msgstr "" - -#: cmdline/apt-cdrom.cc:76 cmdline/apt-cdrom.cc:144 cmdline/apt-cdrom.cc:189 -#: cmdline/apt-cdrom.cc:258 -#, c-format -msgid "Unable to change to %s" -msgstr "" - -#: apt-pkg/clean.cc:38 cmdline/apt-cdrom.cc:88 cmdline/apt-cdrom.cc:221 -#, c-format -msgid "Unable to read %s" -msgstr "" - -#: cmdline/apt-cdrom.cc:451 cmdline/apt-cdrom.cc:507 -#, c-format -msgid "Failed to open %s.new" -msgstr "" - -#: cmdline/apt-cdrom.cc:478 cmdline/apt-cdrom.cc:605 -#, c-format -msgid "Failed to rename %s.new to %s" -msgstr "" - -#: cmdline/apt-cdrom.cc:552 cmdline/apt-cdrom.cc:586 cmdline/apt-cdrom.cc:806 -#: cmdline/apt-cdrom.cc:824 -msgid "Internal error" -msgstr "" - -#: cmdline/apt-cdrom.cc:650 -msgid "Using CD-ROM mount point " -msgstr "" - -#: cmdline/apt-cdrom.cc:658 -#, c-format -msgid "Unable to read the cdrom database %s" -msgstr "" - -#: cmdline/apt-cdrom.cc:665 -msgid "Unmounting CD-ROM" -msgstr "" - -#. Mount the new CDROM -#: cmdline/apt-cdrom.cc:669 -msgid "Please insert a Disc in the drive and press enter" -msgstr "" - -#: cmdline/apt-cdrom.cc:670 -msgid "Mounting CD-ROM" -msgstr "" - -#: cmdline/apt-cdrom.cc:672 -msgid "Failed to mount the cdrom." -msgstr "" - -#. Hash the CD to get an ID -#: cmdline/apt-cdrom.cc:676 -msgid "Identifying.. " -msgstr "" - -#: cmdline/apt-cdrom.cc:686 -msgid "Scanning Disc for index files.. " -msgstr "" - -#: cmdline/apt-cdrom.cc:702 -msgid "I found (binary):" -msgstr "" - -#: cmdline/apt-cdrom.cc:705 -msgid "I found (source):" -msgstr "" - -#: cmdline/apt-cdrom.cc:718 -msgid "Found " -msgstr "" - -#: cmdline/apt-cdrom.cc:718 -msgid " package indexes and " -msgstr "" - -#: cmdline/apt-cdrom.cc:719 -msgid " source indexes." -msgstr "" - -#: cmdline/apt-cdrom.cc:724 -msgid "Unable to locate any package files, perhaps this is not a Debian Disc" -msgstr "" - -#: cmdline/apt-cdrom.cc:726 -msgid "" -"Unable to locate any package files, perhaps this is not a Conectiva Disc" -msgstr "" - -#: cmdline/apt-cdrom.cc:743 -msgid "Found label '" -msgstr "" - -#: cmdline/apt-cdrom.cc:751 -msgid "Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1'" -msgstr "" - -#: cmdline/apt-cdrom.cc:761 -msgid "That is not a valid name, try again " -msgstr "" - -#: cmdline/apt-cdrom.cc:775 -msgid "This Disc is called:" -msgstr "" - -#: cmdline/apt-cdrom.cc:794 -msgid "Writing new source list" -msgstr "" - -#. Print the sourcelist entries -#: cmdline/apt-cdrom.cc:801 -msgid "Source List entries for this Disc are:" -msgstr "" - -#: cmdline/apt-cdrom.cc:838 -msgid "Repeat this process for the rest of the CDs in your set." -msgstr "" - -#: cmdline/apt-cdrom.cc:858 -msgid "Usage: apt-cdrom [options] command" -msgstr "" - -#: cmdline/apt-cdrom.cc:860 -msgid "apt-cdrom is a tool to add CDROM's to APT's source list. The " -msgstr "" - -#: cmdline/apt-cdrom.cc:861 -msgid "CDROM mount point and device information is taken from apt.conf" -msgstr "" - -#: cmdline/apt-cdrom.cc:862 -msgid "and /etc/fstab." -msgstr "" - -#: cmdline/apt-cdrom.cc:865 -msgid " add - Add a CDROM" -msgstr "" - -#: cmdline/apt-cdrom.cc:868 -msgid " -h This help text" -msgstr "" - -#: cmdline/apt-cdrom.cc:869 -msgid " -d CD-ROM mount point" -msgstr "" - -#: cmdline/apt-cdrom.cc:870 -msgid " -r Rename a recognized CD-ROM" -msgstr "" - -#: cmdline/apt-cdrom.cc:871 -msgid " -m No mounting" -msgstr "" - -#: cmdline/apt-cdrom.cc:872 -msgid " -f Fast mode, don't check package files" -msgstr "" - -#: cmdline/apt-cdrom.cc:873 -msgid " -a Thorough scan mode" -msgstr "" - -#: cmdline/apt-cdrom.cc:876 -msgid "See fstab(5)" -msgstr "" - -#: cmdline/apt-cache.cc:116 -msgid " version " -msgstr "" - -#: cmdline/apt-cache.cc:117 -msgid " has an unmet dep:" -msgstr "" - -#: cmdline/apt-cache.cc:156 cmdline/apt-cache.cc:410 cmdline/apt-cache.cc:534 -#: cmdline/apt-cache.cc:1089 -#, c-format -msgid "Unable to locate package %s" -msgstr "" - -#: cmdline/apt-cache.cc:160 cmdline/apt-cache.cc:320 -msgid "Package: " -msgstr "" - -#: cmdline/apt-cache.cc:161 -msgid "Versions: " -msgstr "" - -#: cmdline/apt-cache.cc:172 -msgid "Reverse Depends: " -msgstr "" - -#: cmdline/apt-cache.cc:176 -msgid "Dependencies: " -msgstr "" - -#: cmdline/apt-cache.cc:185 cmdline/apt-cache.cc:926 -msgid "Provides: " -msgstr "" - -#: cmdline/apt-cache.cc:193 -msgid "Reverse Provides: " -msgstr "" - -#: cmdline/apt-cache.cc:207 -msgid "Total Package Names : " -msgstr "" - -#: cmdline/apt-cache.cc:247 -msgid " Normal Packages: " -msgstr "" - -#: cmdline/apt-cache.cc:248 -msgid " Pure Virtual Packages: " -msgstr "" - -#: cmdline/apt-cache.cc:249 -msgid " Single Virtual Packages: " -msgstr "" - -#: cmdline/apt-cache.cc:250 -msgid " Mixed Virtual Packages: " -msgstr "" - -#: cmdline/apt-cache.cc:251 -msgid " Missing: " -msgstr "" - -#: cmdline/apt-cache.cc:253 -msgid "Total Distinct Versions: " -msgstr "" - -#: cmdline/apt-cache.cc:255 -msgid "Total Dependencies: " -msgstr "" - -#: cmdline/apt-cache.cc:258 -msgid "Total Ver/File relations: " -msgstr "" - -#: cmdline/apt-cache.cc:260 -msgid "Total Provides Mappings: " -msgstr "" - -#: cmdline/apt-cache.cc:272 -msgid "Total Globbed Strings: " -msgstr "" - -#: cmdline/apt-cache.cc:277 -msgid "Total Slack space: " -msgstr "" - -#: cmdline/apt-cache.cc:285 -msgid "Total Space Accounted for: " -msgstr "" - -#: cmdline/apt-cache.cc:300 -msgid "Bad section " -msgstr "" - -#: cmdline/apt-cache.cc:306 -msgid "Bad prio " -msgstr "" - -#: cmdline/apt-cache.cc:323 cmdline/apt-cache.cc:339 -msgid " Version: " -msgstr "" - -#: cmdline/apt-cache.cc:324 -msgid " File: " -msgstr "" - -#: cmdline/apt-cache.cc:326 -msgid " Depends: " -msgstr "" - -#: cmdline/apt-cache.cc:332 -msgid "File: " -msgstr "" - -#: cmdline/apt-cache.cc:333 -msgid " Size: " -msgstr "" - -#: cmdline/apt-cache.cc:334 -msgid " ID: " -msgstr "" - -#: cmdline/apt-cache.cc:335 -msgid " Flags: " -msgstr "" - -#: cmdline/apt-cache.cc:336 -msgid " Time: " -msgstr "" - -#: cmdline/apt-cache.cc:337 -msgid " Archive: " -msgstr "" - -#: cmdline/apt-cache.cc:338 -msgid " Component: " -msgstr "" - -#: cmdline/apt-cache.cc:340 -msgid " Origin: " -msgstr "" - -#: cmdline/apt-cache.cc:341 -msgid " Label: " -msgstr "" - -#: cmdline/apt-cache.cc:342 -msgid " Architecture: " -msgstr "" - -#: cmdline/apt-cache.cc:669 -msgid "You must give at least one file name" -msgstr "" - -#: cmdline/apt-cache.cc:688 -msgid "Generating cache" -msgstr "" - -#: apt-pkg/systemfactory.cc:188 cmdline/apt-cache.cc:696 -#, c-format -msgid "Problem opening %s" -msgstr "" - -#: cmdline/apt-cache.cc:699 -msgid "Problem with SelectFile" -msgstr "" - -#: cmdline/apt-cache.cc:702 -msgid "Problem with MergeList" -msgstr "" - -#: cmdline/apt-cache.cc:806 -msgid "Oh shit!" -msgstr "" - -#: cmdline/apt-cache.cc:841 -#, c-format -msgid "Package: %s\n" -msgstr "" - -#: cmdline/apt-cache.cc:844 -#, c-format -msgid "Section: %s\n" -msgstr "" - -#: cmdline/apt-cache.cc:847 -#, c-format -msgid "Installed Size: %i\n" -msgstr "" - -#: cmdline/apt-cache.cc:854 -#, c-format -msgid "Maintainer: %s\n" -msgstr "" - -#: cmdline/apt-cache.cc:858 -#, c-format -msgid "Version: %i:%s" -msgstr "" - -#: cmdline/apt-cache.cc:860 -#, c-format -msgid "Version: %s" -msgstr "" - -#: cmdline/apt-cache.cc:894 -msgid "Pre-Depends: " -msgstr "" - -#: cmdline/apt-cache.cc:907 -msgid "Depends: " -msgstr "" - -#: cmdline/apt-cache.cc:920 -msgid "Conflicts: " -msgstr "" - -#: cmdline/apt-cache.cc:932 -msgid "Obsoletes: " -msgstr "" - -#: cmdline/apt-cache.cc:937 -#, c-format -msgid "Architecture: %s\n" -msgstr "" - -#: cmdline/apt-cache.cc:940 -#, c-format -msgid "Size: %d\n" -msgstr "" - -#: cmdline/apt-cache.cc:943 -#, c-format -msgid "MD5sum: %s\n" -msgstr "" - -#: cmdline/apt-cache.cc:946 -#, c-format -msgid "Filename: %s\n" -msgstr "" - -#: cmdline/apt-cache.cc:949 -#, c-format -msgid "Description: %s\n" -msgstr "" - -#: cmdline/apt-cache.cc:1038 -msgid "You must give exactly one pattern" -msgstr "" - -#: cmdline/apt-cache.cc:1044 -msgid "Regex compilation error" -msgstr "" - -#: cmdline/apt-cache.cc:1195 -msgid "Usage: apt-cache [options] command" -msgstr "" - -#: cmdline/apt-cache.cc:1196 -msgid " apt-cache [options] add file1 [file1 ...]" -msgstr "" - -#: cmdline/apt-cache.cc:1197 -msgid " apt-cache [options] showpkg pkg1 [pkg2 ...]" -msgstr "" - -#: cmdline/apt-cache.cc:1199 -msgid "apt-cache is a low-level tool used to manipulate APT's binary" -msgstr "" - -#: cmdline/apt-cache.cc:1200 -msgid "cache files stored in " -msgstr "" - -#: cmdline/apt-cache.cc:1201 -msgid "It is not meant for ordinary use only as a debug aide." -msgstr "" - -#: cmdline/apt-cache.cc:1204 -msgid " add - Add an package file to the source cache" -msgstr "" - -#: cmdline/apt-cache.cc:1205 -msgid " gencaches - Build both the package and source cache" -msgstr "" - -#: cmdline/apt-cache.cc:1206 -msgid " showpkg - Show some general information for a single package" -msgstr "" - -#: cmdline/apt-cache.cc:1207 -msgid " stats - Show some basic statistics" -msgstr "" - -#: cmdline/apt-cache.cc:1208 -msgid " dump - Show the entire file in a terse form" -msgstr "" - -#: cmdline/apt-cache.cc:1209 -msgid " dumpavail - Print an available file to stdout" -msgstr "" - -#: cmdline/apt-cache.cc:1210 -msgid " unmet - Show unmet dependencies" -msgstr "" - -#: cmdline/apt-cache.cc:1211 -msgid " check - Check the cache a bit" -msgstr "" - -#: cmdline/apt-cache.cc:1212 -msgid " search - Search the package list for a regex pattern" -msgstr "" - -#: cmdline/apt-cache.cc:1213 -msgid " show - Show a readable record for the package" -msgstr "" - -#: cmdline/apt-cache.cc:1214 -msgid " depends - Show raw dependency information for a package" -msgstr "" - -#: cmdline/apt-cache.cc:1215 -msgid " pkgnames - List the names of all packages" -msgstr "" - -#: cmdline/apt-cache.cc:1216 -msgid " dotty - Generate package graphs for GraphVis" -msgstr "" - -#: cmdline/apt-cache.cc:1219 cmdline/apt-config.cc:84 -msgid " -h This help text." -msgstr "" - -#: cmdline/apt-cache.cc:1220 -msgid " -p=? The package cache. [" -msgstr "" - -#: cmdline/apt-cache.cc:1221 -msgid " -s=? The source cache. [" -msgstr "" - -#: cmdline/apt-cache.cc:1222 -msgid " -q Disable progress indicator." -msgstr "" - -#: cmdline/apt-cache.cc:1223 -msgid " -i Show only important deps for the unmet command." -msgstr "" - -#: cmdline/apt-cache.cc:1226 -msgid "See the apt-cache(8) and apt.conf(5) manual pages for more information." -msgstr "" - -#: cmdline/apt-config.cc:37 -msgid "Arguments not in pairs" -msgstr "" - -#: cmdline/apt-config.cc:75 -msgid "Usage: apt-config [options] command" -msgstr "" - -#: cmdline/apt-config.cc:77 -msgid "apt-config is a simple tool to read the APT config file" -msgstr "" - -#: cmdline/apt-config.cc:80 -msgid " shell - Shell mode" -msgstr "" - -#: cmdline/apt-config.cc:81 -msgid " dump - Show the configuration" -msgstr "" - -#: apt-pkg/acquire-item.cc:142 -#, c-format -msgid "Size of %s did not match what's in the hashfile and was redownloaded." -msgstr "" - -#: apt-pkg/acquire-item.cc:154 -#, c-format -msgid "MD5 of %s did not match what's int the hashfile and was redownloaded." -msgstr "" - -#: apt-pkg/acquire-item.cc:426 -msgid "Hashfile signer is not who it's supposed to be (expected " -msgstr "" - -#: apt-pkg/acquire-item.cc:428 -msgid ", got " -msgstr "" - -#: apt-pkg/acquire-worker.cc:108 -#, c-format -msgid "The method driver %s could not be found." -msgstr "" - -#: apt-pkg/acquire-worker.cc:117 -msgid "Failed to create IPC pipe to subprocess" -msgstr "" - -#: apt-pkg/acquire-worker.cc:160 -#, c-format -msgid "Method %s did not start correctly" -msgstr "" - -#: apt-pkg/acquire-worker.cc:197 -#, c-format -msgid "Invalid message from method %s: %s" -msgstr "" - -#: apt-pkg/acquire-worker.cc:210 -#, c-format -msgid "Unable to process Capabilities message from %s" -msgstr "" - -#: apt-pkg/acquire-worker.cc:229 -msgid "Method gave invalid 200 URI Start message" -msgstr "" - -#: apt-pkg/acquire-worker.cc:268 -#, c-format -msgid "Bizzar Error - File size is not what the server reported %s %u" -msgstr "" - -#: apt-pkg/acquire-worker.cc:297 -msgid "Method gave invalid 400 URI Failure message" -msgstr "" - -#: apt-pkg/acquire-worker.cc:319 -#, c-format -msgid "Method %s General failure: %s" -msgstr "" - -#: apt-pkg/acquire-worker.cc:503 -#, c-format -msgid "Method %s has died unexpectedly!" -msgstr "" - -#: apt-pkg/acquire.cc:58 -#, c-format -msgid "Lists directory %spartial is missing." -msgstr "" - -#: apt-pkg/acquire.cc:62 -#, c-format -msgid "Archive directory %spartial is missing." -msgstr "" - -#: apt-pkg/acquire.cc:557 -msgid "Tried to dequeue a fetching object" -msgstr "" - -#: apt-pkg/cachefile.cc:83 -msgid "The package lists or status file could not be parsed or opened." -msgstr "" - -#: apt-pkg/cachefile.cc:85 -msgid "You may want to run apt-get update to correct these missing files" -msgstr "" - -#: apt-pkg/clean.cc:44 -msgid "Unable to change to " -msgstr "" - -#: apt-pkg/clean.cc:58 -#, c-format -msgid "Unable to stat %s." -msgstr "" - -#: apt-pkg/depcache.cc:61 apt-pkg/depcache.cc:90 -msgid "Building Dependency Tree" -msgstr "" - -#: apt-pkg/depcache.cc:62 -msgid "Candidate Versions" -msgstr "" - -#: apt-pkg/depcache.cc:91 -msgid "Dependency Generation" -msgstr "" - -#: apt-pkg/packagemanager.cc:397 -#, c-format -msgid "" -"This installation run will require temporarily removing the essential " -"package %s due to a Conflicts/Pre-Depends loop. This is often bad, but if " -"you really want to do it, activate the APT::Force-LoopBreak option." -msgstr "" - -#: apt-pkg/pkgcache.cc:125 -msgid "The package cache file is corrupted" -msgstr "" - -#: apt-pkg/pkgcache.cc:130 -msgid "The package cache file is an incompatible version" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:90 -#, c-format -msgid "Error occured while processing %s (NewPackage)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:102 -#, c-format -msgid "Error occured while processing %s (UsePackage1)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:124 -#, c-format -msgid "Error occured while processing %s (UsePackage2)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:127 -#, c-format -msgid "Error occured while processing %s (NewFileVer1)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:138 -msgid "WARNING: '" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:138 -msgid "' has 2 packages with same version but different dependencies. " -msgstr "" - -#: apt-pkg/pkgcachegen.cc:139 -msgid "That usually means a packaging bug." -msgstr "" - -#: apt-pkg/pkgcachegen.cc:158 -#, c-format -msgid "Error occured while processing %s (NewVersion1)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:161 -#, c-format -msgid "Error occured while processing %s (UsePackage3)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:164 -#, c-format -msgid "Error occured while processing %s (NewVersion2)" -msgstr "" - -#: apt-pkg/sourcelist.cc:76 -#, c-format -msgid "Block %s is invalid" -msgstr "" - -#: apt-pkg/sourcelist.cc:121 -#, c-format -msgid "Malformed line %u in source list %s (type)" -msgstr "" - -#: apt-pkg/sourcelist.cc:123 apt-pkg/sourcelist.cc:135 -#, c-format -msgid "Malformed line %u in source list %s (URI)" -msgstr "" - -#: apt-pkg/sourcelist.cc:130 -#, c-format -msgid "Malformed line %u in source list %s (vendor ID)" -msgstr "" - -#: apt-pkg/sourcelist.cc:141 -#, c-format -msgid "Malformed line %u in source list %s (dist)" -msgstr "" - -#: apt-pkg/sourcelist.cc:145 -#, c-format -msgid "Malformed line %u in source list %s (bad vendor ID)" -msgstr "" - -#: apt-pkg/sourcelist.cc:148 -#, c-format -msgid "Malformed line %u in source list %s (bad type)" -msgstr "" - -#: apt-pkg/sourcelist.cc:151 -#, c-format -msgid "Malformed line %u in source list %s (bad URI)" -msgstr "" - -#: apt-pkg/sourcelist.cc:161 -#, c-format -msgid "Malformed line %u in source list %s (Absolute dist)" -msgstr "" - -#: apt-pkg/sourcelist.cc:174 -#, c-format -msgid "Malformed line %u in source list %s (dist parse)" -msgstr "" - -#: apt-pkg/sourcelist.cc:353 -msgid "could not open hash index" -msgstr "" - -#: apt-pkg/sourcelist.cc:363 -msgid "No MD5SUM data in hashfile" -msgstr "" - -#: apt-pkg/sourcelist.cc:377 -msgid "Error parsing MD5 hash record" -msgstr "" - -#: apt-pkg/sourcelist.cc:400 -#, c-format -msgid "" -"Repository entry in sources.list contains extra components that are not " -"listed in the signed hash file: %s" -msgstr "" - -#: apt-pkg/srcrecords.cc:47 -msgid "Sorry, you must put some 'source' uris in your sources.list" -msgstr "" - -#: apt-pkg/systemfactory.cc:72 -#, c-format -msgid "Failed to rename %s to %s" -msgstr "" - -#: apt-pkg/systemfactory.cc:77 -#, c-format -msgid "Couldn't stat source package list '%s' (%s)" -msgstr "" - -#. Mostly from MakeStatusCache.. -#: apt-pkg/systemfactory.cc:184 apt-pkg/systemfactory.cc:240 -#: apt-pkg/systemfactory.cc:272 apt-pkg/systemfactory.cc:273 -#: apt-pkg/systemfactory.cc:280 apt-pkg/systemfactory.cc:350 -#: apt-pkg/systemfactory.cc:386 -msgid "Reading Package Lists" -msgstr "" - -#: apt-pkg/systemfactory.cc:196 -#, c-format -msgid "Problem with SelectFile %s" -msgstr "" - -#: apt-pkg/systemfactory.cc:201 -#, c-format -msgid "Problem with MergeList %s" -msgstr "" - -#: apt-pkg/systemfactory.cc:263 -msgid "IO Error saving source cache" -msgstr "" - -#: apt-pkg/tagfile.cc:59 -#, c-format -msgid "Unable to parse package file %s (1)" -msgstr "" - -#: apt-pkg/tagfile.cc:142 -#, c-format -msgid "Unable to parse package file %s (2)" -msgstr "" diff --git a/apt/po/cat-id-tbl.c b/apt/po/cat-id-tbl.c deleted file mode 100644 index 224fe8c..0000000 --- a/apt/po/cat-id-tbl.c +++ /dev/null @@ -1,367 +0,0 @@ -/* Automatically generated by po2tbl.sed from apt.pot. */ - -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#include "libgettext.h" - -const struct _msg_ent _msg_tbl[] = { - {"", 1}, - {"Y", 2}, - {"y", 3}, - {"Sorry, but the following packages have unmet dependencies:", 4}, - {" but ", 5}, - {" is installed", 6}, - {" is to be installed", 7}, - {"it is not installable", 8}, - {"it is a virtual package", 9}, - {"it is not installed", 10}, - {"it is not going to be installed", 11}, - {" or", 12}, - {"The following NEW packages will be installed:", 13}, - {"The following packages will be REMOVED:", 14}, - {"The following packages have been kept back", 15}, - {"The following packages will be upgraded", 16}, - {"The following packages can be upgraded:", 17}, - {" from ", 18}, - {" to ", 19}, - {" Importance: ", 20}, - {" Date: ", 21}, - {"The following held packages will be changed:", 22}, - {"%s (due to %s) ", 23}, - {"WARNING: The following essential packages will be removed", 24}, - {"This should NOT be done unless you know exactly what you are doing!", 25}, - {" packages upgraded, ", 26}, - {" newly installed, ", 27}, - {" reinstalled, ", 28}, - {" to remove and ", 29}, - {" not upgraded.", 30}, - {" packages not fully installed or removed.", 31}, - {"Package file %s is out of sync.", 32}, - {"Correcting dependencies...", 33}, - {" failed.", 34}, - {"Unable to correct dependencies", 35}, - {"Unable to minimize the upgrade set", 36}, - {" Done", 37}, - {"You might want to run `apt-get -f install' to correct these.", 38}, - {"Unmet dependencies. Try using -f.", 39}, - {"Internal Error, InstallPackages was called with broken packages!", 40}, - {"Packages need to be removed but No Remove was specified.", 41}, - {"Internal Error, Ordering didn't finish", 42}, - {"Unable to lock the download directory", 43}, - {"The list of sources could not be read.", 44}, - {"How odd.. The sizes didn't match, email apt@packages.debian.org", 45}, - {"Need to get ", 46}, - {" of archives. After unpacking ", 47}, - {"B will be used.", 48}, - {"B will be freed.", 49}, - {"Couldn't determine free space in %s", 50}, - {"Sorry, you don't have enough free space in %s to hold all packages.", 51}, - {"There are problems and -y was used without --force-yes", 52}, - {"Trivial Only specified but this is not a trivial operation.", 53}, - {"You are about to do something potentially harmful", 54}, - {"To continue type in the phrase 'Yes, I understand this may be bad'", 55}, - {" ?] ", 56}, - {"Yes, I understand this may be bad", 57}, - {"Aborted.", 58}, - {"Do you want to continue? [Y/n] ", 59}, - {"Failed to fetch ", 60}, - {"Some files failed to download", 61}, - {"Unable to fetch some archives, maybe try with --fix-missing?", 62}, - {"--fix-missing and media swapping is not currently supported", 63}, - {"Unable to correct missing packages.", 64}, - {"Aborting Install.", 65}, - {"Note, selecting ", 66}, - {" instead of ", 67}, - {"Skipping ", 68}, - {", it is already installed and no-upgrade is set.", 69}, - {"Package %s is not installed", 70}, - {"Package ", 71}, - {" is a virtual package provided by:", 72}, - {" [Installed]", 73}, - {"You should explicitly select one to install.", 74}, - {" has no available version, but exists in the database.", 75}, - {"\ -This typically means that the package was mentioned in a dependency and ", 76}, - {"\ -never uploaded, has been obsoleted or is not available with the contents ", 77}, - {"of sources.list", 78}, - {"However the following packages replace it:", 79}, - {"Package %s has no installation candidate", 80}, - {"Sorry, re-installation of ", 81}, - {" is not possible, it cannot be downloaded", 82}, - {"Sorry, ", 83}, - {" is already the newest version", 84}, - {"Unable to lock the list directory", 85}, - {"Could not retrieve digitally signed hash file", 86}, - {"Failed to fetch hash file: ", 87}, - {"\ -Some of the signed hash files could not be retrieved. Aborting operation.", 88}, - {"Some of the index files had mismatching MD5 sums!", 89}, - {"\ -Some index files failed to download, they have been ignored, or old ones \ -used instead.", 90}, - {" will not be authenticated.", 91}, - {"Internal Error, AllUpgrade broke stuff", 92}, - {"Couldn't find package %s", 93}, - {"Regex compilation error:", 94}, - {"You might want to run `apt-get -f install' to correct these:", 95}, - {"\ -Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a \ -solution).", 96}, - {"Some packages could not be installed. This may mean that you have", 97}, - {"requested an impossible situation or if you are using the unstable", 98}, - {"distribution that some required packages have not yet been created", 99}, - {"or been moved out of Incoming.", 100}, - {"Since you only requested a single operation it is extremely likely that", 101}, - {"the package is simply not installable and a bug report against", 102}, - {"that package should be filed.", 103}, - {"The following information may help to resolve the situation:", 104}, - {"Sorry, broken packages", 105}, - {"The following extra packages will be installed:", 106}, - {"Calculating Upgrade... ", 107}, - {"Failed", 108}, - {"Done", 109}, - {"Internal Error, problem resolver broke stuff", 110}, - {"Must specify at least one package to fetch source for", 111}, - {"Unable to find a source package for %s", 112}, - {"Sorry, you don't have enough free space in %s", 113}, - {" of source archives.", 114}, - {"Fetch Source ", 115}, - {"Failed to fetch some archives.", 116}, - {"Build command '", 117}, - {"' failed.", 118}, - {"Skipping unpack of already unpacked source in ", 119}, - {"Unpack command '", 120}, - {"Couldn't wait for subprocess", 121}, - {"Child process failed", 122}, - {"Usage: apt-get [options] command", 123}, - {" apt-get [options] install pkg1 [pkg2 ...]", 124}, - {"apt-get is a simple command line interface for downloading and", 125}, - {"installing packages. The most frequently used commands are update", 126}, - {"and install.", 127}, - {"Commands:", 128}, - {" update - Retrieve new lists of packages", 129}, - {" upgrade - Perform an upgrade", 130}, - {" install - Install new packages", 131}, - {" remove - Remove packages", 132}, - {" source - Download source archives", 133}, - {" dist-upgrade - Distribution upgrade, see apt-get(8)", 134}, - {" clean - Erase downloaded archive files", 135}, - {" autoclean - Erase old downloaded archive files", 136}, - {" check - Verify that there are no broken dependencies", 137}, - {"Options:", 138}, - {" -h This help text.", 139}, - {" -q Loggable output - no progress indicator", 140}, - {" -qq No output except for errors", 141}, - {" -S Show summary for upgrade operation and quit", 142}, - {" -d Download only - do NOT install or unpack archives", 143}, - {" -s No-act. Perform ordering simulation", 144}, - {" -y Assume Yes to all queries and do not prompt", 145}, - {" -f Attempt to continue if the integrity check fails", 146}, - {" -m Attempt to continue if archives are unlocatable", 147}, - {" -u Show a list of upgraded packages as well", 148}, - {" -b Build the source package after fetching it", 149}, - {" -c=? Read this configuration file", 150}, - {" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp", 151}, - {"See the apt-get(8), sources.list(5) and apt.conf(5) manual", 152}, - {"pages for more information and options.", 153}, - {"Unable to change to %s", 154}, - {"Unable to read %s", 155}, - {"Failed to open %s.new", 156}, - {"Failed to rename %s.new to %s", 157}, - {"Internal error", 158}, - {"Using CD-ROM mount point ", 159}, - {"Unable to read the cdrom database %s", 160}, - {"Unmounting CD-ROM", 161}, - {"Please insert a Disc in the drive and press enter", 162}, - {"Mounting CD-ROM", 163}, - {"Failed to mount the cdrom.", 164}, - {"Identifying.. ", 165}, - {"Scanning Disc for index files.. ", 166}, - {"I found (binary):", 167}, - {"I found (source):", 168}, - {"Found ", 169}, - {" package indexes and ", 170}, - {" source indexes.", 171}, - {"Unable to locate any package files, perhaps this is not a Debian Disc", 172}, - {"\ -Unable to locate any package files, perhaps this is not a Conectiva Disc", 173}, - {"Found label '", 174}, - {"Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1'", 175}, - {"That is not a valid name, try again ", 176}, - {"This Disc is called:", 177}, - {"Writing new source list", 178}, - {"Source List entries for this Disc are:", 179}, - {"Repeat this process for the rest of the CDs in your set.", 180}, - {"Usage: apt-cdrom [options] command", 181}, - {"apt-cdrom is a tool to add CDROM's to APT's source list. The ", 182}, - {"CDROM mount point and device information is taken from apt.conf", 183}, - {"and /etc/fstab.", 184}, - {" add - Add a CDROM", 185}, - {" -h This help text", 186}, - {" -d CD-ROM mount point", 187}, - {" -r Rename a recognized CD-ROM", 188}, - {" -m No mounting", 189}, - {" -f Fast mode, don't check package files", 190}, - {" -a Thorough scan mode", 191}, - {"See fstab(5)", 192}, - {" version ", 193}, - {" has an unmet dep:", 194}, - {"Unable to locate package %s", 195}, - {"Package: ", 196}, - {"Versions: ", 197}, - {"Reverse Depends: ", 198}, - {"Dependencies: ", 199}, - {"Provides: ", 200}, - {"Reverse Provides: ", 201}, - {"Total Package Names : ", 202}, - {" Normal Packages: ", 203}, - {" Pure Virtual Packages: ", 204}, - {" Single Virtual Packages: ", 205}, - {" Mixed Virtual Packages: ", 206}, - {" Missing: ", 207}, - {"Total Distinct Versions: ", 208}, - {"Total Dependencies: ", 209}, - {"Total Ver/File relations: ", 210}, - {"Total Provides Mappings: ", 211}, - {"Total Globbed Strings: ", 212}, - {"Total Slack space: ", 213}, - {"Total Space Accounted for: ", 214}, - {"Bad section ", 215}, - {"Bad prio ", 216}, - {" Version: ", 217}, - {" File: ", 218}, - {" Depends: ", 219}, - {"File: ", 220}, - {" Size: ", 221}, - {" ID: ", 222}, - {" Flags: ", 223}, - {" Time: ", 224}, - {" Archive: ", 225}, - {" Component: ", 226}, - {" Origin: ", 227}, - {" Label: ", 228}, - {" Architecture: ", 229}, - {"You must give at least one file name", 230}, - {"Generating cache", 231}, - {"Problem opening %s", 232}, - {"Problem with SelectFile", 233}, - {"Problem with MergeList", 234}, - {"Oh shit!", 235}, - {"Package: %s\n", 236}, - {"Section: %s\n", 237}, - {"Installed Size: %i\n", 238}, - {"Maintainer: %s\n", 239}, - {"Version: %i:%s", 240}, - {"Version: %s", 241}, - {"Pre-Depends: ", 242}, - {"Depends: ", 243}, - {"Conflicts: ", 244}, - {"Obsoletes: ", 245}, - {"Architecture: %s\n", 246}, - {"Size: %d\n", 247}, - {"MD5sum: %s\n", 248}, - {"Filename: %s\n", 249}, - {"Description: %s\n", 250}, - {"You must give exactly one pattern", 251}, - {"Regex compilation error", 252}, - {"Usage: apt-cache [options] command", 253}, - {" apt-cache [options] add file1 [file1 ...]", 254}, - {" apt-cache [options] showpkg pkg1 [pkg2 ...]", 255}, - {"apt-cache is a low-level tool used to manipulate APT's binary", 256}, - {"cache files stored in ", 257}, - {"It is not meant for ordinary use only as a debug aide.", 258}, - {" add - Add an package file to the source cache", 259}, - {" gencaches - Build both the package and source cache", 260}, - {" showpkg - Show some general information for a single package", 261}, - {" stats - Show some basic statistics", 262}, - {" dump - Show the entire file in a terse form", 263}, - {" dumpavail - Print an available file to stdout", 264}, - {" unmet - Show unmet dependencies", 265}, - {" check - Check the cache a bit", 266}, - {" search - Search the package list for a regex pattern", 267}, - {" show - Show a readable record for the package", 268}, - {" depends - Show raw dependency information for a package", 269}, - {" pkgnames - List the names of all packages", 270}, - {" dotty - Generate package graphs for GraphVis", 271}, - {" -h This help text.", 272}, - {" -p=? The package cache. [", 273}, - {" -s=? The source cache. [", 274}, - {" -q Disable progress indicator.", 275}, - {" -i Show only important deps for the unmet command.", 276}, - {"See the apt-cache(8) and apt.conf(5) manual pages for more information.", 277}, - {"Arguments not in pairs", 278}, - {"Usage: apt-config [options] command", 279}, - {"apt-config is a simple tool to read the APT config file", 280}, - {" shell - Shell mode", 281}, - {" dump - Show the configuration", 282}, - {"Size of %s did not match what's in the hashfile and was redownloaded.", 283}, - {"MD5 of %s did not match what's int the hashfile and was redownloaded.", 284}, - {"Hashfile signer is not who it's supposed to be (expected ", 285}, - {", got ", 286}, - {"The method driver %s could not be found.", 287}, - {"Failed to create IPC pipe to subprocess", 288}, - {"Method %s did not start correctly", 289}, - {"Invalid message from method %s: %s", 290}, - {"Unable to process Capabilities message from %s", 291}, - {"Method gave invalid 200 URI Start message", 292}, - {"Bizzar Error - File size is not what the server reported %s %u", 293}, - {"Method gave invalid 400 URI Failure message", 294}, - {"Method %s General failure: %s", 295}, - {"Method %s has died unexpectedly!", 296}, - {"Lists directory %spartial is missing.", 297}, - {"Archive directory %spartial is missing.", 298}, - {"Tried to dequeue a fetching object", 299}, - {"The package lists or status file could not be parsed or opened.", 300}, - {"You may want to run apt-get update to correct these missing files", 301}, - {"Unable to change to ", 302}, - {"Unable to stat %s.", 303}, - {"Building Dependency Tree", 304}, - {"Candidate Versions", 305}, - {"Dependency Generation", 306}, - {"\ -This installation run will require temporarily removing the essential \ -package %s due to a Conflicts/Pre-Depends loop. This is often bad, but if \ -you really want to do it, activate the APT::Force-LoopBreak option.", 307}, - {"The package cache file is corrupted", 308}, - {"The package cache file is an incompatible version", 309}, - {"Error occured while processing %s (NewPackage)", 310}, - {"Error occured while processing %s (UsePackage1)", 311}, - {"Error occured while processing %s (UsePackage2)", 312}, - {"Error occured while processing %s (NewFileVer1)", 313}, - {"WARNING: '", 314}, - {"' has 2 packages with same version but different dependencies. ", 315}, - {"That usually means a packaging bug.", 316}, - {"Error occured while processing %s (NewVersion1)", 317}, - {"Error occured while processing %s (UsePackage3)", 318}, - {"Error occured while processing %s (NewVersion2)", 319}, - {"Block %s is invalid", 320}, - {"Malformed line %u in source list %s (type)", 321}, - {"Malformed line %u in source list %s (URI)", 322}, - {"Malformed line %u in source list %s (vendor ID)", 323}, - {"Malformed line %u in source list %s (dist)", 324}, - {"Malformed line %u in source list %s (bad vendor ID)", 325}, - {"Malformed line %u in source list %s (bad type)", 326}, - {"Malformed line %u in source list %s (bad URI)", 327}, - {"Malformed line %u in source list %s (Absolute dist)", 328}, - {"Malformed line %u in source list %s (dist parse)", 329}, - {"could not open hash index", 330}, - {"No MD5SUM data in hashfile", 331}, - {"Error parsing MD5 hash record", 332}, - {"\ -Repository entry in sources.list contains extra components that are not \ -listed in the signed hash file: %s", 333}, - {"Sorry, you must put some 'source' uris in your sources.list", 334}, - {"Failed to rename %s to %s", 335}, - {"Couldn't stat source package list '%s' (%s)", 336}, - {"Reading Package Lists", 337}, - {"Problem with SelectFile %s", 338}, - {"Problem with MergeList %s", 339}, - {"IO Error saving source cache", 340}, - {"Unable to parse package file %s (1)", 341}, - {"Unable to parse package file %s (2)", 342}, -}; - -int _msg_tbl_length = 342; diff --git a/apt/po/de_DE.po b/apt/po/de_DE.po new file mode 100644 index 0000000..45ce5dc --- /dev/null +++ b/apt/po/de_DE.po @@ -0,0 +1,1599 @@ +# German messages for apt +# Copyright (C) 2002 Free Software Foundation, Inc. +# Ralf Corsepius <corsepiu@faw.uni-ulm.de>, 2002. +# +msgid "" +msgstr "" +"Project-Id-Version: apt\n" +"POT-Creation-Date: 2002-07-30 06:30+0200\n" +"PO-Revision-Date: 2002-08-20 14:00+0200\n" +"Last-Translator: Ralf Corsepius <corsepiu@faw.uni-ulm.de>\n" +"Language-Team: German <de@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#: apt-pkg/contrib/cdromutl.cc:55 +#, c-format +msgid "Unable to stat the mount point %s" +msgstr "Ausserstande auf Mount-Point %s zuzugreifen" + +#: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:44 apt-pkg/contrib/cdromutl.cc:149 +#, c-format +msgid "Unable to change to %s" +msgstr "Ausserstande nach %s zu wechseln" + +#: apt-pkg/acquire.cc:412 apt-pkg/clean.cc:38 apt-pkg/contrib/cdromutl.cc:153 +#: apt-pkg/contrib/configuration.cc:698 +#, c-format +msgid "Unable to read %s" +msgstr "Ausserstande %s zu lesen" + +#: apt-pkg/contrib/cdromutl.cc:190 +msgid "Failed to stat the cdrom" +msgstr "Gescheitert auf das CDROM zuzugreifen." + +#: apt-pkg/contrib/cmndline.cc:76 +#, c-format +msgid "Command line option '%c' [from %s] is not known." +msgstr "Kommandozeilenoption '%c' [aus %s] ist nicht bekannt." + +#: apt-pkg/contrib/cmndline.cc:102 apt-pkg/contrib/cmndline.cc:110 +#: apt-pkg/contrib/cmndline.cc:118 +#, c-format +msgid "Command line option %s is not understood" +msgstr "Kommandozeilenoption %s wird nicht verstanden" + +#: apt-pkg/contrib/cmndline.cc:123 +#, c-format +msgid "Command line option %s is not boolean" +msgstr "Kommandozeilenoption %s ist nicht Bool'sch" + +#: apt-pkg/contrib/cmndline.cc:162 apt-pkg/contrib/cmndline.cc:183 +#, c-format +msgid "Option %s requires an argument." +msgstr "Option %s benötigt ein Argument." + +#: apt-pkg/contrib/cmndline.cc:197 apt-pkg/contrib/cmndline.cc:203 +#, c-format +msgid "Option %s: Configuration item sepecification must have an =<val>." +msgstr "Option %s: Konfigurationseintragsspecifization muss einen =<val>" +"haben." + +#: apt-pkg/contrib/cmndline.cc:233 +#, c-format +msgid "Option %s requires an integer argument, not '%s'" +msgstr "Option %s benötigt ein Integerargument, nicht '%s'" + +#: apt-pkg/contrib/cmndline.cc:264 +#, c-format +msgid "Option '%s' is too long" +msgstr "Option '%s' ist zu lang" + +#: apt-pkg/contrib/cmndline.cc:297 +#, c-format +msgid "Sense %s is not understood, try true or false." +msgstr "Sinn %s wird nicht verstanden, versuche true oder false." + +#: apt-pkg/contrib/cmndline.cc:347 +#, c-format +msgid "Invalid operation %s" +msgstr "Ungülltige Operation %s" + +#: apt-pkg/contrib/configuration.cc:446 +#, c-format +msgid "Opening configuration file %s" +msgstr "Öffne Konfigurationsdatei %s" + +#: apt-pkg/contrib/configuration.cc:556 +#, c-format +msgid "Syntax error %s:%u: Block starts with no name." +msgstr "Syntaxfehler %s:%u: Block beginnt ohne Namen." + +#: apt-pkg/contrib/configuration.cc:575 +#, c-format +msgid "Syntax error %s:%u: Malformed Tag" +msgstr "Syntaxfehler %s:%u: Misgebildetes Tag" + +#: apt-pkg/contrib/configuration.cc:592 +#, c-format +msgid "Syntax error %s:%u: Extra junk after value" +msgstr "Syntaxfehler %s:%u: Unnötiger Müll nach Wert" + +#: apt-pkg/contrib/configuration.cc:632 +#, c-format +msgid "Syntax error %s:%u: Directives can only be done at the top level" +msgstr "Syntaxfehler %s:%u: Directiven können nur auf oberster Ebene" +"verwendet werden" + +#: apt-pkg/contrib/configuration.cc:639 +#, c-format +msgid "Syntax error %s:%u: Too many nested includes" +msgstr "Syntaxfehler %s:%u: Zu viele geschachtelte includes" + +#: apt-pkg/contrib/configuration.cc:643 apt-pkg/contrib/configuration.cc:648 +#, c-format +msgid "Syntax error %s:%u: Included from here" +msgstr "Syntaxfehler %s:%u: Includiert von hier" + +#: apt-pkg/contrib/configuration.cc:652 +#, c-format +msgid "Syntax error %s:%u: Unsupported directive '%s'" +msgstr "Syntaxfehler %s:%u: Nicht-unterstützte Direktive '%s'" + +#: apt-pkg/contrib/configuration.cc:686 +#, c-format +msgid "Syntax error %s:%u: Extra junk at end of file" +msgstr "Syntaxfehler %s:%u: Unnötiger Müll am Ende der Datei" + +#: apt-pkg/contrib/fileutl.cc:80 +#, c-format +msgid "Not using locking for read only lock file %s" +msgstr "Locking nicht benutzt für Read-Only Lock-Datei %s" + +#: apt-pkg/contrib/fileutl.cc:85 +#, c-format +msgid "Could not open lock file %s" +msgstr "Konnte Lock-Datei %s nicht öffnen" + +#: apt-pkg/contrib/fileutl.cc:103 +#, c-format +msgid "Not using locking for nfs mounted lock file %s" +msgstr "Locking nicht benutzt für nfs-gemountete Lock-Datei %s" + +#: apt-pkg/contrib/fileutl.cc:107 +#, c-format +msgid "Could not get lock %s" +msgstr "Konnte Lock %s nicht bekommen" + +#: apt-pkg/contrib/fileutl.cc:358 +#, c-format +msgid "Waited, for %s but it wasn't there" +msgstr "Auf %s gewartet, aber es war nicht da" + +#: apt-pkg/contrib/fileutl.cc:368 +#, c-format +msgid "Sub-process %s received a segmentation fault." +msgstr "Unterprozess %s empfing Segmentationfault" + +#: apt-pkg/contrib/fileutl.cc:371 apt-pkg/rpm/rpmpm.cc:408 +#, c-format +msgid "Sub-process %s returned an error code (%u)" +msgstr "Unterprozesss %s gab Fehlercode zurück (%u)" + +#: apt-pkg/contrib/fileutl.cc:373 apt-pkg/rpm/rpmpm.cc:411 +#, c-format +msgid "Sub-process %s exited unexpectedly" +msgstr "Unter-Prozess %s stieg unerwartet aus" + +#: apt-pkg/contrib/fileutl.cc:417 +#, c-format +msgid "Could not open file %s" +msgstr "Konnte Datei %s nicht öffnen" + +#: apt-pkg/contrib/fileutl.cc:452 +msgid "Read error" +msgstr "Lesefehler" + +#: apt-pkg/contrib/fileutl.cc:473 +#, c-format +msgid "read, still have %lu to read but none left" +msgstr "read, noch %lu to schreiben, aber nichts übrig" + +#: apt-pkg/contrib/fileutl.cc:491 +msgid "Write error" +msgstr "Schreibfehler" + +#: apt-pkg/contrib/fileutl.cc:503 +#, c-format +msgid "write, still have %lu to write but couldn't" +msgstr "write, noch %lu zu schreiben, konnte aber nicht" + +#: apt-pkg/contrib/fileutl.cc:578 +msgid "Problem closing the file" +msgstr "Problem die Datei zu schliessen" + +#: apt-pkg/contrib/fileutl.cc:584 +msgid "Problem unlinking the file" +msgstr "Problem die Datei zu löschen" + +#: apt-pkg/contrib/fileutl.cc:595 +msgid "Problem syncing the file" +msgstr "Problem bei der Synchronisation mit Datei" + +#: apt-pkg/contrib/mmap.cc:82 +msgid "Can't mmap an empty file" +msgstr "Kann leere Datei nicht mmap'en" + +#: apt-pkg/contrib/mmap.cc:87 +#, c-format +msgid "Couldn't make mmap of %lu bytes" +msgstr "Konnte mmap von %lu Bytes nicht erzeugen" + +#: apt-pkg/contrib/progress.cc:154 +#, c-format +msgid "\r%s... Error!" +msgstr "\r%s... Fehler!" + +#: apt-pkg/contrib/progress.cc:156 +#, c-format +msgid "\r%s... Done" +msgstr "\r%s... Fertig" + +#: apt-pkg/contrib/strutl.cc:935 +#, c-format +msgid "Selection %s not found" +msgstr "Auswahl %s nicht gefunden" + +#: apt-pkg/acquire-item.cc:166 +#, c-format +msgid "rename failed, %s (%s -> %s)." +msgstr "Umbenennen gescheitert, %s (%s -> %s)." + +#: apt-pkg/acquire-item.cc:210 apt-pkg/acquire-item.cc:403 +#, c-format +msgid "%s is not listed in the checksum list for its repository" +msgstr "%s ist nicht in der Checksummenliste für dieses Vezeichnis aufgeführt" + +#: apt-pkg/acquire-item.cc:230 apt-pkg/acquire-item.cc:423 +#, c-format +msgid "Release information not available for %s" +msgstr "Release-Information für %s nicht verfügbar" + +#: apt-pkg/acquire-item.cc:280 apt-pkg/acquire-item.cc:556 +#: apt-pkg/acquire-item.cc:787 +msgid "Size mismatch" +msgstr "Grösse passt nicht" + +#: apt-pkg/acquire-item.cc:291 apt-pkg/acquire-item.cc:566 +#: apt-pkg/acquire-item.cc:797 +msgid "MD5Sum mismatch" +msgstr "MD5Sum passt nicht" + +#: apt-pkg/acquire-item.cc:472 +msgid "No valid signatures found in Release file" +msgstr "Keine gültigen Signaturen in Release-Datei gefunden" + +#: apt-pkg/acquire-item.cc:480 +msgid "Signature fingerprint of Release file does not match (expected " +msgstr "Signaturfingerabdruck der Release-Datei passt nicht (erwartet " + +#: apt-pkg/acquire-item.cc:481 +msgid ", got " +msgstr ", erhalten " + +#: apt-pkg/acquire-item.cc:506 +msgid "Could not read checksum list from Release file" +msgstr "Konnte Check-Summe nicht aus Release-Datei lesen" + +#: apt-pkg/acquire-item.cc:639 +#, 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 "" +"Ich war nicht in der Lage eine Datei für Paket %s zu lokalisieren. Dies " +"könnte bedeuten, dass Sie dieses Paket manuell reparieren müssen. (Infolge" +"fehlendes Arch)" + +#: apt-pkg/acquire-item.cc:674 +#, c-format +msgid "" +"I wasn't able to locate file for the %s package. This might mean you need to " +"manually fix this package." +msgstr "" +"Ich war nicht in der Lage eine Datei für Paket %s zu lokalisieren. Dies " +"könnte bedeuten, dass Sie dieses Paket manuell reparieren müssen." + +#: apt-pkg/acquire-item.cc:705 +#, c-format +msgid "" +"The package index files are corrupted. No Filename: field for package %s." +msgstr "" +"Die Paketindexdateien sind korrupt. Kein Filename: Feld für Paket %s." + +#: apt-pkg/acquire-worker.cc:112 +#, c-format +msgid "The method driver %s could not be found." +msgstr "Der Methoden-Treiber %s konnte nicht gefunden werden." + +#: apt-pkg/acquire-worker.cc:161 +#, c-format +msgid "Method %s did not start correctly" +msgstr "Methode %s startete nicht korrekt." + +#: apt-pkg/acquire.cc:61 +#, c-format +msgid "Lists directory %spartial is missing." +msgstr "Listen-Verzeichnis %spartial fehlt." + +#: apt-pkg/acquire.cc:65 +#, c-format +msgid "Archive directory %spartial is missing." +msgstr "Archiv-Verzeichnis %spartial fehlt" + +#: apt-pkg/algorithms.cc:236 +#, c-format +msgid "" +"The package %s needs to be reinstalled, but I can't find an archive for it." +msgstr "" +"Das Paket %s muss reinstalliert werden, ich kann aber kein Archiv dafür finden." + +#: apt-pkg/algorithms.cc:1110 +msgid "" +"Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " +"held packages." +msgstr "" +"Fehler, pkgProblemResolver::Resolve erzeugte Fehler, dies könnte von " +"zurückgehaltenen Paketen verursacht worden sein." + +#: apt-pkg/algorithms.cc:1112 +msgid "Unable to correct problems, you have held broken packages." +msgstr "Ausserstande Probleme zu korrigieren, sie haben zerbrochene Pakete " +"zurückgehalten." + +#: apt-pkg/cachefile.cc:71 cmdline/apt-get.cc:751 cmdline/apt-get.cc:1746 +#: cmdline/apt-get.cc:1987 +msgid "The list of sources could not be read." +msgstr "Die Liste der Quellen konnte nicht gelesen werden." + +#: apt-pkg/cachefile.cc:77 +msgid "The package lists or status file could not be parsed or opened." +msgstr "" +"Die Paketlisten oder die Statusdatei konnten nicht geparsed oder geöffnet " +"werden" + +#: apt-pkg/cachefile.cc:81 +msgid "You may want to run apt-get update to correct these problems" +msgstr "Sie möchten `apt-get update' ausführen um diese Problem zu beheben" + +#: apt-pkg/clean.cc:61 +#, c-format +msgid "Unable to stat %s." +msgstr "Ausserstande %s zu stat'en." + +#: apt-pkg/depcache.cc:63 apt-pkg/depcache.cc:92 +msgid "Building Dependency Tree" +msgstr "Erzeuge Abhängigkeitsbaum" + +#: apt-pkg/depcache.cc:64 +msgid "Candidate Versions" +msgstr "Versionen der Kandidaten" + +#: apt-pkg/depcache.cc:93 +msgid "Dependency Generation" +msgstr "Abhängigkeitsgenerierung" + +#: apt-pkg/init.cc:111 +#, c-format +msgid "Packaging system '%s' is not supported" +msgstr "Paketierungssystem '%s' wird nicht unterstützt" + +#: apt-pkg/init.cc:127 +msgid "Unable to determine a suitable system type" +msgstr "Ausserstande, ein geeigneten System zu bestimmen" + +#: apt-pkg/packagemanager.cc:402 +#, c-format +msgid "" +"This installation run will require temporarily removing the essential " +"package %s due to a Conflicts/Pre-Depends loop. This is often bad, but if " +"you really want to do it, activate the APT::Force-LoopBreak option." +msgstr "" +"Dieser Installationslauf wird es erfordern, temporär das grundlegende " +"Paket %s in Folge einer Conflicts/Pre-Depends-Schleife zu entfernen." +"Dies ist oftmals schlecht, wenn Sie es aber wirklich durchführen wollen, " +"aktivieren Sie die APT::Force-LoopBreak Option." + +#: apt-pkg/pkgcache.cc:126 +msgid "Empty package cache" +msgstr "Leerer Paket-Cache" + +#: apt-pkg/pkgcache.cc:132 +msgid "The package cache file is corrupted" +msgstr "Die Paket-Cache-Datei is korrupt." + +#: apt-pkg/pkgcache.cc:137 +msgid "The package cache file is an incompatible version" +msgstr "Die Paket-Cache-Datei ist eine inkompatible Version" + +#: apt-pkg/pkgcache.cc:142 +#, c-format +msgid "This APT does not support the Versioning System '%s'" +msgstr "Diese APT unterstützt Versionierungssystem '%s' nicht" + +#: apt-pkg/pkgcache.cc:147 +msgid "The package cache was build for a different architecture" +msgstr "Der Paket-Cache wurde für eine andere Architektur erstellt" + +#: apt-pkg/pkgcache.cc:218 +msgid "Depends" +msgstr "Hängt ab von" + +#: apt-pkg/pkgcache.cc:218 +msgid "PreDepends" +msgstr "" + +#: apt-pkg/pkgcache.cc:218 +msgid "Suggests" +msgstr "Schlägt vor" + +#: apt-pkg/pkgcache.cc:219 +msgid "Recommends" +msgstr "Empfielt" + +#: apt-pkg/pkgcache.cc:219 +msgid "Conflicts" +msgstr "Im Konflikt" + +#: apt-pkg/pkgcache.cc:219 +msgid "Replaces" +msgstr "Ersetzt" + +#: apt-pkg/pkgcache.cc:220 +msgid "Obsoletes" +msgstr "" + +#: apt-pkg/pkgcache.cc:231 +msgid "important" +msgstr "wichtig" + +#: apt-pkg/pkgcache.cc:231 +msgid "required" +msgstr "benötigt" + +#: apt-pkg/pkgcache.cc:231 +msgid "standard" +msgstr "standard" + +#: apt-pkg/pkgcache.cc:232 +msgid "optional" +msgstr "optional" + +#: apt-pkg/pkgcache.cc:232 +msgid "extra" +msgstr "extra" + +#: apt-pkg/pkgcachegen.cc:74 +msgid "Cache has an incompatible versioning system" +msgstr "Cache hat ein inkompatibles Versionierungssystem" + +#: apt-pkg/pkgcachegen.cc:117 +#, c-format +msgid "Error occured while processing %s (NewPackage)" +msgstr "Fehler während der Verarbeitung von %s (NewPackage) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:129 +#, c-format +msgid "Error occured while processing %s (UsePackage1)" +msgstr "Fehler während der Verarbeitung von %s (UsePackage1) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:154 +#, c-format +msgid "Error occured while processing %s (UsePackage2)" +msgstr "Fehler während der Verarbeitung von %s (UsePackage2) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:158 +#, c-format +msgid "Error occured while processing %s (NewFileVer1)" +msgstr "Fehler während der Verarbeitung von %s (NewFileVer1) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:190 +#, c-format +msgid "Error occured while processing %s (NewVersion1)" +msgstr "Fehler während der Verarbeitung von %s (NewVersion1) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:194 +#, c-format +msgid "Error occured while processing %s (UsePackage3)" +msgstr "Fehler während der Verarbeitung von %s (UsePackage3) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:198 +#, c-format +msgid "Error occured while processing %s (NewVersion2)" +msgstr "Fehler während der Verarbeitung von %s (NewVersion2) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:213 +msgid "Wow, you exceeded the number of package names this APT is capable of." +msgstr "Wow, Sie haben die Anzahl der Pakete überschritten, die dieses " +"APT in der Lage ist zu verarbeiten" + +#: apt-pkg/pkgcachegen.cc:216 +msgid "Wow, you exceeded the number of versions this APT is capable of." +msgstr "Wow, Sie haben die Anzahl der Versionen überschritten, die dieses " +"APT in der Lage ist zu verarbeiten" + +#: apt-pkg/pkgcachegen.cc:219 +msgid "Wow, you exceeded the number of dependencies this APT is capable of." +msgstr "Wow, Sie haben die Anzahl der Abhängigkeiten überschritten, die dieses " +"APT in der Lage ist zu verarbeiten" + +#: apt-pkg/pkgcachegen.cc:247 +#, c-format +msgid "Error occured while processing %s (FindPkg)" +msgstr "Fehler während der Verarbeitung von %s (FindPkg) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:261 +#, c-format +msgid "Error occured while processing %s (CollectFileProvides)" +msgstr "Fehler während der Verarbeitung von %s (CollectFileProvides) aufgetreten" + +#: apt-pkg/pkgcachegen.cc:267 +#, c-format +msgid "Package %s %s was not found while processing file dependencies" +msgstr "Paket %s %s nicht gefunden während der Verarbeitung der " +"Dateiabhängigkeiten" + +#. Build the status cache +#: apt-pkg/pkgcachegen.cc:651 apt-pkg/pkgcachegen.cc:711 +#: apt-pkg/pkgcachegen.cc:716 apt-pkg/pkgcachegen.cc:847 +#: apt-pkg/rpm/rpmsystem.cc:345 +msgid "Reading Package Lists" +msgstr "Lese Paketlisten" + +#: apt-pkg/pkgcachegen.cc:666 +msgid "Collecting File Provides" +msgstr "Sammle 'Datei Provides'" + +#: apt-pkg/pkgcachegen.cc:709 cmdline/apt-extracttemplates.cc:257 +#, c-format +msgid "Unable to write to %s" +msgstr "Ausserstande, nach %s zu schreiben" + +#: apt-pkg/pkgcachegen.cc:724 +msgid "Error pre-processing package lists" +msgstr "Fehler bei der Vorverarbeitung der Paketlisten" + +#: apt-pkg/pkgcachegen.cc:792 apt-pkg/pkgcachegen.cc:799 +msgid "IO Error saving source cache" +msgstr "IO-Fehler beim Sichern des Source-Caches" + +#: apt-pkg/pkgrecords.cc:37 +#, c-format +msgid "Index file type '%s' is not supported" +msgstr "Index-Dateityp '%s' wird nicht unterstützt" + +#: apt-pkg/policy.cc:269 +msgid "Invalid record in the preferences file, no Package header" +msgstr "Ungültiger Eintrag in preferences Datei, kein Paketkopf" + +#: apt-pkg/policy.cc:291 +#, c-format +msgid "Did not understand pin type %s" +msgstr "Verstehe pin Typ %s nicht" + +#: apt-pkg/sourcelist.cc:88 +#, c-format +msgid "Malformed line %lu in source list %s (URI)" +msgstr "Misbildete Zeile %lu in Quellliste %s (URI)" + +#: apt-pkg/sourcelist.cc:90 +#, c-format +msgid "Malformed line %lu in source list %s (dist)" +msgstr "Misbildete Zeile %lu in Quellliste %s (dist)" + +#: apt-pkg/sourcelist.cc:93 +#, c-format +msgid "Malformed line %lu in source list %s (URI parse)" +msgstr "Misbildete Zeile %lu in Quellliste %s (URI parse)" + +#: apt-pkg/sourcelist.cc:99 +#, c-format +msgid "Malformed line %lu in source list %s (Absolute dist)" +msgstr "Misbildete Zeile %lu in Quellliste %s (Absolute dist)" + +#: apt-pkg/sourcelist.cc:106 +#, c-format +msgid "Malformed line %lu in source list %s (dist parse)" +msgstr "Misbildete Zeile %lu in Quellliste %s (dist parse)" + +#: apt-pkg/sourcelist.cc:183 apt-pkg/sourcelist.cc:207 +#, c-format +msgid "Vendor block %s is invalid" +msgstr "Vendor-Block %s ist ungültig" + +#: apt-pkg/sourcelist.cc:235 +#, c-format +msgid "Opening %s" +msgstr "Öffne %s" + +#: apt-pkg/sourcelist.cc:249 +#, c-format +msgid "Line %u too long in source list %s." +msgstr "Zeile %u zu lang in Quellliste %s." + +#: apt-pkg/sourcelist.cc:266 +#, c-format +msgid "Malformed line %u in source list %s (type)" +msgstr "Misbildete Zeile %u in Quellliste %s (type)" + +#: apt-pkg/sourcelist.cc:270 +#, c-format +msgid "Type '%s' is not known in on line %u in source list %s" +msgstr "Unbekannter Typ '%s' in Zeile %u in Quellliste %s" + +#: apt-pkg/sourcelist.cc:279 apt-pkg/sourcelist.cc:282 +#, c-format +msgid "Malformed line %u in source list %s (vendor id)" +msgstr "Misbildete Zeile %u in Quellliste %s (vendor id)" + +#: apt-pkg/sourcelist.cc:296 +#, c-format +msgid "Unknown vendor ID '%s' in line %u of source list %s" +msgstr "Unbekannte Vendor-ID '%s' in Zeile %u der Quellliste %s" + +#: apt-pkg/srcrecords.cc:49 +msgid "Sorry, you must put some 'source' URIs in your sources.list" +msgstr "Entschuldigung, Sie müssen einige 'Quell' URIs in Ihr sources.list eintragen" + +#: apt-pkg/tagfile.cc:71 +#, c-format +msgid "Unable to parse package file %s (1)" +msgstr "Ausserstande Paketdatei %s (1) zu parsen" + +#: apt-pkg/tagfile.cc:158 +#, c-format +msgid "Unable to parse package file %s (2)" +msgstr "Ausserstande Paketdatei %s (2) zu parsen" + +#: apt-pkg/rpm/rpmhandler.cc:41 +#, c-format +msgid "could not open RPM package list file %s: %s" +msgstr "konnte RPM-Paketlistendatei %s: %s nicht öffnen" + +#: apt-pkg/rpm/rpmhandler.cc:103 apt-pkg/rpm/rpmhandler.cc:113 +msgid "could not open RPM database" +msgstr "könnte RPM-Datenbank nicht öffnen" + +#: apt-pkg/rpm/rpmhandler.cc:120 +msgid "could not create RPM database iterator" +msgstr "konnte RPM-Datenbank-Iterator nicht erzeugen" + +#: apt-pkg/rpm/rpmlistparser.cc:71 +#, c-format +msgid "Bad regular expression '%s' in option RPM::AllowedDupPkgs." +msgstr "Fehlerhafter regulärer Ausdruck '%s' in Option RPM::AllowedDupPkgs." + +#: apt-pkg/rpm/rpmlistparser.cc:155 +#, c-format +msgid "" +"There are two or more versions of the package '%s' installed in your system, " +"which is a situation APT can't handle cleanly at the moment.\n" +"Please do one of the following:\n" +"1) Keep at most one version of the package in the system; or\n" +"2) If you do want to keep multiple versions of that package, lookup RPM::" +"Allow-Duplicated in the documentation.\n" +msgstr "" + +#: apt-pkg/rpm/rpmlistparser.cc:384 +msgid "Encountered status field in a non-version description" +msgstr "Auf Status-Feld in einer Nicht-Versionsbeschreibung aufgelaufen" + +#: apt-pkg/rpm/rpmpackagedata.cc:23 +msgid "could not open package priority file" +msgstr "könnte Paket-Prioritäten-Datei nicht öffnen" + +#: apt-pkg/rpm/rpmpackagedata.cc:32 +msgid "no data in /etc/apt/rpmpriorities" +msgstr "Keine Daten in /etc/apt/rpmpriorities" + +#: apt-pkg/rpm/rpmpackagedata.cc:83 +#, c-format +msgid "Bad regular expression '%s' in option RPM::HoldPackages." +msgstr "Fehlerhafter regulärer Ausdruck '%s' in Option RPM::HoldPackages." + +#: apt-pkg/rpm/rpmpackagedata.cc:105 +#, c-format +msgid "Bad entry '%s' in option RPM::FakeProvides." +msgstr "Fehlerhafter Eintrag '%s' in Option RPM::FakeProvides." + +#: apt-pkg/rpm/rpmpm.cc:59 +#, c-format +msgid "Internal Error, No file name for %s" +msgstr "Interner Fehler, kein Dateiname für %s" + +#: apt-pkg/rpm/rpmpm.cc:146 +#, c-format +msgid "Problem executing scripts %s '%s'" +msgstr "Problem beim Ausführen der Scripte %s '%s'" + +#: apt-pkg/rpm/rpmpm.cc:149 +msgid "Sub-process returned an error code" +msgstr "Unterprozess gab Fehlercode zurück" + +#: apt-pkg/rpm/rpmpm.cc:221 apt-pkg/rpm/rpmpm.cc:228 +#, c-format +msgid "Failure running script %s" +msgstr "Fehler beim Ausführen von Script %s" + +#: apt-pkg/rpm/rpmpm.cc:342 +msgid "Executing RPM (" +msgstr "Führe RPM aus (" + +#: apt-pkg/rpm/rpmpm.cc:405 +#, c-format +msgid "Sub-process %s recieved a segmentation fault." +msgstr "Unterprozess %s empfing Segmentation-Fault." + +#: apt-pkg/rpm/rpmsrcrecords.cc:97 apt-pkg/rpm/rpmsrcrecords.cc:99 +#: apt-pkg/rpm/rpmsrcrecords.cc:101 +msgid "error parsing file record" +msgstr "Fehler beim Parsen des Dateieintrags" + +#: apt-pkg/rpm/rpmindexfile.cc:404 +#, c-format +msgid "Problem with SelectFile %s" +msgstr "Problem mit SelectFile %s" + +#: apt-pkg/rpm/rpmindexfile.cc:422 apt-pkg/rpm/rpmindexfile.cc:459 +#, c-format +msgid "Problem opening %s" +msgstr "Problem beim Öffnen von %s" + +#: apt-pkg/rpm/rpmindexfile.cc:428 apt-pkg/rpm/rpmindexfile.cc:538 +#, c-format +msgid "Problem with MergeList %s" +msgstr "Problem mit MergeList %s" + +#: apt-pkg/rpm/rpmindexfile.cc:463 apt-pkg/rpm/rpmindexfile.cc:555 +#, c-format +msgid "Problem with MergeFileProvides %s" +msgstr "Problem mit MergeFileProvides %s" + +#: apt-pkg/rpm/rpmindexfile.cc:523 apt-pkg/rpm/rpmindexfile.cc:552 +msgid "Problem opening RPM database" +msgstr "Problem beim Öffnen der RPM Datenback" + +#: apt-pkg/rpm/rpmindexfile.cc:527 +msgid "Problem with SelectFile RPM Database" +msgstr "Problem mit SelectFile RPM Datenbank" + +#: apt-pkg/repository.cc:40 +#, c-format +msgid "could not open Release file '%s'" +msgstr "könnte Release-Datei '%s' nicht öffnen" + +#: apt-pkg/repository.cc:55 +#, c-format +msgid "No MD5Sum data in Release file '%s'" +msgstr "Keine MD5Sum Daten in Release-Datei '%s'" + +#: apt-pkg/repository.cc:72 +#, c-format +msgid "Error parsing MD5Sum hash record on Release file '%s'" +msgstr "Fehler beim Parsen der MD5Sum Hasheinträge für Releasedatei '%s'" + +#: cmdline/acqprogress.cc:55 +msgid "Hit " +msgstr "Treffer " + +#: cmdline/acqprogress.cc:79 +msgid "Get:" +msgstr "Hole:" + +#: cmdline/acqprogress.cc:110 +msgid "Ign " +msgstr "Ignoriere " + +#: cmdline/acqprogress.cc:114 +msgid "Err " +msgstr "Fehler " + +#: cmdline/acqprogress.cc:135 +#, c-format +msgid "Fetched %sB in %s (%sB/s)\n" +msgstr "%sB in %s (%sB/s) geholt\n" + +#: cmdline/acqprogress.cc:225 +msgid " [Working]" +msgstr " [Arbeite]" + +#: cmdline/acqprogress.cc:271 +#, c-format +msgid "" +"Media Change: Please insert the disc labeled '%s' in the drive '%s' and " +"press enter\n" +msgstr "" +"Medienwechsel: Bitte die Diskette beschriftet mit '%s' in Laufwerk '%s' " +"einlegen und mit Eingabe betätigen\n" + +#: cmdline/apt-cache.cc:131 +#, c-format +msgid "Package %s version %s has an unmet dep:\n" +msgstr "Paket %s Version %s besitzt eine unerfüllte Abhängigkeit:\n" + +#: cmdline/apt-cache.cc:171 cmdline/apt-cache.cc:539 cmdline/apt-cache.cc:685 +#: cmdline/apt-cache.cc:1062 cmdline/apt-cache.cc:1208 +#, c-format +msgid "Unable to locate package %s" +msgstr "Ausserstande Paket %s zu lokalisieren" + +#: cmdline/apt-cache.cc:228 +msgid "Total Package Names : " +msgstr "Gesamt Paketnamen :" + +#: cmdline/apt-cache.cc:268 +msgid " Normal Packages: " +msgstr " Normale Pakete: " + +#: cmdline/apt-cache.cc:269 +msgid " Pure Virtual Packages: " +msgstr " Rein virtuelle Pakete: " + +#: cmdline/apt-cache.cc:270 +msgid " Single Virtual Packages: " +msgstr " Einzelne virtuelle Pakete: " + +#: cmdline/apt-cache.cc:271 +msgid " Mixed Virtual Packages: " +msgstr " Gemischte virtuelle Pakete: " + +#: cmdline/apt-cache.cc:272 +msgid " Missing: " +msgstr " Fehlend: " + +#: cmdline/apt-cache.cc:274 +msgid "Total Distinct Versions: " +msgstr "Gesamt Eigenständige Versionen: " + +#: cmdline/apt-cache.cc:276 +msgid "Total Dependencies: " +msgstr "Gesamt-Abhängigkeiten: " + +#: cmdline/apt-cache.cc:279 +msgid "Total Ver/File relations: " +msgstr "Gesamt Ver/File Beziehungen: " + +#: cmdline/apt-cache.cc:281 +msgid "Total Provides Mappings: " +msgstr "Gesamt 'Provides Mappings': " + +#: cmdline/apt-cache.cc:293 +msgid "Total Globbed Strings: " +msgstr "Gesamt 'Globbed Strings': " + +#: cmdline/apt-cache.cc:307 +msgid "Total Dependency Version space: " +msgstr "Gesamt 'Dependency-Version'-Platz:" + +#: cmdline/apt-cache.cc:312 +msgid "Total Slack space: " +msgstr "Gesamt 'Slack'-Platz" + +#: cmdline/apt-cache.cc:320 +msgid "Total Space Accounted for: " +msgstr "Gesamt-Platz angerechnet für: " + +#: cmdline/apt-cache.cc:458 cmdline/apt-cache.cc:895 +#, c-format +msgid "Package file %s is out of sync." +msgstr "Paketdatei %s passt nicht zusammen." + +#: cmdline/apt-cache.cc:938 +msgid "You must give exactly one pattern" +msgstr "Sie müssen genau ein Muster angeben" + +#: cmdline/apt-cache.cc:1162 +msgid "Package Files:" +msgstr "Paket Dateien:" + +#: cmdline/apt-cache.cc:1169 cmdline/apt-cache.cc:1255 +msgid "Cache is out of sync, can't x-ref a package file" +msgstr "Der Cache ist nicht synchronsiert, kann X-Referenz für Paket nicht ermitteln" + +#: cmdline/apt-cache.cc:1170 +#, c-format +msgid "%4i %s\n" +msgstr "%4i %s\n" + +#. Show any packages have explicit pins +#: cmdline/apt-cache.cc:1182 +msgid "Pinned Packages:" +msgstr "Ange-pinnte Pakete: " + +#: cmdline/apt-cache.cc:1194 cmdline/apt-cache.cc:1235 +msgid "(not found)" +msgstr "(nicht gefunden)" + +#. Installed version +#: cmdline/apt-cache.cc:1215 +msgid " Installed: " +msgstr " Installiert: " + +#: cmdline/apt-cache.cc:1217 cmdline/apt-cache.cc:1225 +msgid "(none)" +msgstr "(nichts)" + +#. Candidate Version +#: cmdline/apt-cache.cc:1222 +msgid " Candidate: " +msgstr " Kandidat: " + +#: cmdline/apt-cache.cc:1232 +msgid " Package Pin: " +msgstr " Paket Pin: " + +#. Show the priority tables +#: cmdline/apt-cache.cc:1241 +msgid " Version Table:" +msgstr " Versionstabelle: " + +#: cmdline/apt-cache.cc:1256 +#, c-format +msgid " %4i %s\n" +msgstr " %4i %s\n" + +#: cmdline/apt-cache.cc:1283 cmdline/apt-cdrom.cc:772 cmdline/apt-config.cc:69 +#: cmdline/apt-extracttemplates.cc:223 cmdline/apt-get.cc:2132 +#: cmdline/apt-sortpkgs.cc:142 ftparchive/apt-ftparchive.cc:544 +#, c-format +msgid "%s %s for %s %s compiled on %s %s\n" +msgstr "%s %s für %s %s compiliert auf %s %s\n" + +#: cmdline/apt-cache.cc:1287 +msgid "" +"Usage: apt-cache [options] command\n" +" apt-cache [options] add file1 [file1 ...]\n" +" apt-cache [options] showpkg pkg1 [pkg2 ...]\n" +" apt-cache [options] showsrc pkg1 [pkg2 ...]\n" +"\n" +"apt-cache is a low-level tool used to manipulate APT's binary\n" +"cache files, and query information from them\n" +"\n" +"Commands:\n" +" add - Add an package file to the source cache\n" +" gencaches - Build both the package and source cache\n" +" showpkg - Show some general information for a single package\n" +" showsrc - Show source records\n" +" stats - Show some basic statistics\n" +" dump - Show the entire file in a terse form\n" +" dumpavail - Print an available file to stdout\n" +" unmet - Show unmet dependencies\n" +" search - Search the package list for a regex pattern\n" +" show - Show a readable record for the package\n" +" depends - Show raw dependency information for a package\n" +" pkgnames - List the names of all packages\n" +" dotty - Generate package graphs for GraphVis\n" +" policy - Show policy settings\n" +"\n" +"Options:\n" +" -h This help text.\n" +" -p=? The package cache.\n" +" -s=? The source cache.\n" +" -q Disable progress indicator.\n" +" -i Show only important deps for the unmet command.\n" +" -c=? Read this configuration file\n" +" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" +"See the apt-cache(8) and apt.conf(5) manual pages for more information.\n" +msgstr "" + +#: cmdline/apt-config.cc:40 +msgid "Arguments not in pairs" +msgstr "Argumente nicht paarweise" + +#: cmdline/apt-config.cc:75 +msgid "" +"Usage: apt-config [options] command\n" +"\n" +"apt-config is a simple tool to read the APT config file\n" +"\n" +"Commands:\n" +" shell - Shell mode\n" +" dump - Show the configuration\n" +"\n" +"Options:\n" +" -h This help text.\n" +" -c=? Read this configuration file\n" +" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" +msgstr "" +"Usage: apt-config [optionen] befehl\n" +"\n" +"apt-config ist ein einfaches Werkzeug die APT config Datei zu lesen\n" +"\n" +"Befehl:\n" +" shell - Shell-Modus\n" +" dump - Anzeigen der Konfiguration\n" +"\n" +"Optionen:\n" +" -h Dieser Hilfstext.\n" +" -c=? Lese diese Konfigurationsdatei\n" +" -o=? Setze eine beliebige Konfigurationsoption, z.B. -o dir::cache=/tmp\n" + +#: cmdline/apt-extracttemplates.cc:96 +#, c-format +msgid "%s not a valid DEB package." +msgstr "%s kein gültiges DEB-Paket" + +#: cmdline/apt-extracttemplates.cc:230 +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 arbitary configuration option, eg -o dir::cache=/tmp\n" +msgstr "" + +#: cmdline/apt-extracttemplates.cc:298 +msgid "Cannot get debconf version. Is debconf installed?" +msgstr "Kann debconf Version nicht ermitteln. Ist debconf installiert?" + +# Translator's notes: +# unable .. ausserstande +# upgrade .. upgrade +# downgrade .. downgrade +#. This needs to be a capital +#: cmdline/apt-get.cc:116 +msgid "Y" +msgstr "J" + +#: cmdline/apt-get.cc:193 +msgid "Sorry, but the following packages have unmet dependencies:" +msgstr "Entschuldigung, aber die folgenden Pakete besitzen unerfüllte Abhängigkeiten:" + +#: cmdline/apt-get.cc:283 +#, c-format +msgid "but %s is installed" +msgstr "aber %s ist installiert" + +#: cmdline/apt-get.cc:285 +#, c-format +msgid "but %s is to be installed" +msgstr "aber %s wird installiert werden" + +#: cmdline/apt-get.cc:292 +msgid "but it is not installable" +msgstr "aber es ist nicht installierbar" + +#: cmdline/apt-get.cc:294 +msgid "but it is a virtual package" +msgstr "aber es ist ein virtuelles Paket" + +#: cmdline/apt-get.cc:297 +msgid "but it is not installed" +msgstr "aber es ist nicht installiert" + +#: cmdline/apt-get.cc:297 +msgid "but it is not going to be installed" +msgstr "aber es wird nicht installiert werden" + +#: cmdline/apt-get.cc:302 +msgid " or" +msgstr " oder" + +#: cmdline/apt-get.cc:328 +msgid "The following NEW packages will be installed:" +msgstr "Die folgenden NEUEN Pakete werden installiert werden:" + +#. CNC:2002-07-25 +#: cmdline/apt-get.cc:376 +msgid "The following packages will be REPLACED:" +msgstr "Die folgenden Pakete werden ERSETZT:" + +#: cmdline/apt-get.cc:377 +msgid "The following packages will be REMOVED:" +msgstr "Die folgenden Pakete werden ENTFERNT:" + +#: cmdline/apt-get.cc:397 +msgid "The following packages have been kept back" +msgstr "Die folgenden Pakete sind zurückgehalten worden" + +#: cmdline/apt-get.cc:416 +msgid "The following packages will be upgraded" +msgstr "Die folgenden Pakete werden upgegradet werden:" + +#: cmdline/apt-get.cc:435 +msgid "The following packages will be DOWNGRADED" +msgstr "Die folgenden Pakete werden DOWNGRADED:" + +#: cmdline/apt-get.cc:452 +msgid "The following held packages will be changed:" +msgstr "Die folgenden zurückgehaltenen Pakete werden geändert:" + +#: cmdline/apt-get.cc:503 +#, c-format +msgid "%s (due to %s) " +msgstr "%s (in Folge von %s) " + +#: cmdline/apt-get.cc:510 +msgid "" +"WARNING: The following essential packages will be removed\n" +"This should NOT be done unless you know exactly what you are doing!" +msgstr "" +"WARNUNG: Die folgenden grundlegenden Pakete werden entfernt werden\n" +"Dies sollte NICHT gemacht werden, ausser Sie wissen genau was sie tun!" + +#: cmdline/apt-get.cc:564 +#, c-format +msgid "%lu packages upgraded, %lu newly installed, " +msgstr "%lu Pakete upgegradet, %lu neu installiert, " + +#: cmdline/apt-get.cc:568 +#, c-format +msgid "%lu reinstalled, " +msgstr "%lu re-installiert" + +#: cmdline/apt-get.cc:570 +#, c-format +msgid "%lu downgraded, " +msgstr "%lu downgegradet, " + +#: cmdline/apt-get.cc:573 +#, c-format +msgid "%lu replaced, " +msgstr "%lu ersetzt, " + +#. CNC:2002-07-29 +#: cmdline/apt-get.cc:576 +#, c-format +msgid "%lu removed and %lu not upgraded.\n" +msgstr "%lu entfernt und %lu nicht upgegradet.\n" + +#: cmdline/apt-get.cc:580 +#, c-format +msgid "%lu packages not fully installed or removed.\n" +msgstr "%lu Pakete nicht vollständig installiert oder entfernt.\n" + +#: cmdline/apt-get.cc:640 +msgid "Correcting dependencies..." +msgstr "Korrigiere Abhängigkeiten ..." + +#: cmdline/apt-get.cc:643 +msgid " failed." +msgstr " gescheitert." + +#: cmdline/apt-get.cc:646 +msgid "Unable to correct dependencies" +msgstr "Ausserstande, Abhängigkeiten zu korrigieren" + +#: cmdline/apt-get.cc:649 +msgid "Unable to minimize the upgrade set" +msgstr "Ausserstande, das Upgrade-Set zu minimieren" + +#: cmdline/apt-get.cc:651 +msgid " Done" +msgstr " Fertig" + +#: cmdline/apt-get.cc:655 +msgid "You might want to run `apt-get -f install' to correct these." +msgstr "Sie werde `apt-get -f install' ausführen wollen um diese zu beheben." + +#: cmdline/apt-get.cc:658 +msgid "Unmet dependencies. Try using -f." +msgstr "Unerfüllte Abhängigkeiten. Versuche -f zu benutzen." + +#: cmdline/apt-get.cc:715 +msgid "Packages need to be removed but Remove is disabled." +msgstr "Pakete müssen entfernt werden, aber Remove ist ausgeschaltet." + +#: cmdline/apt-get.cc:741 cmdline/apt-get.cc:1665 cmdline/apt-get.cc:1698 +msgid "Unable to lock the download directory" +msgstr "Ausserstande das Download-Verzeichnis zu locken." + +#: cmdline/apt-get.cc:771 +#, c-format +msgid "Need to get %sB/%sB of archives. " +msgstr "Muss %sB/%sB an Archiven holen." + +#: cmdline/apt-get.cc:774 +#, c-format +msgid "Need to get %sB of archives. " +msgstr "Muss %sB an Archiven holen. " + +#: cmdline/apt-get.cc:779 +#, c-format +msgid "After unpacking %sB will be used.\n" +msgstr "Nach dem Auspacken werden %sB benutzt werden.\n" + +#: cmdline/apt-get.cc:782 +#, c-format +msgid "After unpacking %sB will be freed.\n" +msgstr "Nach dem Auspacken werden %sB freigegeben werden.\n" + +#: cmdline/apt-get.cc:800 +#, c-format +msgid "Sorry, you don't have enough free space in %s to hold all packages." +msgstr "" +"Entschuldigung, Sie haben nicht genug freien Platz in %s um alle Pakete zu " +"halten." + +#: cmdline/apt-get.cc:809 +msgid "There are problems and -y was used without --force-yes" +msgstr "Es gibt Probleme und -q wurde ohne --force-yes verwendet" + +#: cmdline/apt-get.cc:815 cmdline/apt-get.cc:835 +msgid "Trivial Only specified but this is not a trivial operation." +msgstr "Trivial Only vorgegeben, dies ist aber keine triviale Operation." + +#: cmdline/apt-get.cc:817 +msgid "Yes, do as I say!" +msgstr "Ja, tu was ich sage!" + +#: cmdline/apt-get.cc:819 +#, c-format +msgid "" +"You are about to do something potentially harmful\n" +"To continue type in the phrase '%s'\n" +" ?] " +msgstr "" +"Sie sind daran etwas möglicherweise schädliches zu tun\n" +"Um fortzusetzen geben Sie folgenden Satz ein '%s'\n" +" ?] " + +#: cmdline/apt-get.cc:825 cmdline/apt-get.cc:844 +msgid "Abort." +msgstr "Abgebrochen." + +#: cmdline/apt-get.cc:840 +msgid "Do you want to continue? [Y/n] " +msgstr "Wollen Sie fortsetzen? [J/n] " + +#: cmdline/apt-get.cc:909 cmdline/apt-get.cc:1306 cmdline/apt-get.cc:1857 +#, c-format +msgid "Failed to fetch %s %s\n" +msgstr "Gescheitert zu holen %s %s\n" + +#: cmdline/apt-get.cc:927 +msgid "Some files failed to download" +msgstr "Einige Dateien konnten nicht heruntergeladen werden" + +#: cmdline/apt-get.cc:928 cmdline/apt-get.cc:1866 +msgid "Download complete and in download only mode" +msgstr "Download vollständig und in 'download-only' Modus" + +#: cmdline/apt-get.cc:934 +msgid "" +"Unable to fetch some archives, maybe run apt-get update or try with --fix-" +"missing?" +msgstr "" +"Ausserstande einige Archive zu holen, vielleicht apt-get update laufenlassen " +"oder mit --fix-missing versuchen?" + +#: cmdline/apt-get.cc:938 +msgid "--fix-missing and media swapping is not currently supported" +msgstr "--fix-missing und Medienwechsel werden momentan nicht unterstützt" + +#: cmdline/apt-get.cc:943 +msgid "Unable to correct missing packages." +msgstr "Ausserstande fehlende Pakete zu korrigieren." + +#: cmdline/apt-get.cc:944 +msgid "Aborting Install." +msgstr "Installation wird abgebrochen." + +#: cmdline/apt-get.cc:987 +#, c-format +msgid "Note, selecting %s instead of %s\n" +msgstr "Beachte, wähle %s statt %s\n" + +#: cmdline/apt-get.cc:997 +#, c-format +msgid "Skipping %s, it is already installed and upgrade is not set.\n" +msgstr "" +"Überspringe %s, ist bereits installiert und upgrade ist nicht gesetzt.\n" + +#: cmdline/apt-get.cc:1015 +#, c-format +msgid "Package %s is not installed, so not removed\n" +msgstr "Paket %s ist nicht installiert, deshalb nicht entfernt\n" + +#: cmdline/apt-get.cc:1026 +#, c-format +msgid "Package %s is a virtual package provided by:\n" +msgstr " Paket %s ist ein virtuelles Paket bereitgestellt von:\n" + +#: cmdline/apt-get.cc:1038 +msgid " [Installed]" +msgstr " [Installiert]" + +#: cmdline/apt-get.cc:1043 +msgid "You should explicitly select one to install." +msgstr "Sie sollten explizit eines zur Installation auswählen." + +#: cmdline/apt-get.cc:1048 +#, c-format +msgid "" +"Package %s has no available version, but exists in the database.\n" +"This typically means that the package was mentioned in a dependency and\n" +"never uploaded, has been obsoleted or is not available with the contents\n" +"of sources.list\n" +msgstr "" + +#: cmdline/apt-get.cc:1066 +msgid "However the following packages replace it:" +msgstr "Jedoch ersetzen es die folgenden Pakete:" + +#: cmdline/apt-get.cc:1069 +#, c-format +msgid "Package %s has no installation candidate" +msgstr "Paket %s hat keinen Installationskanditaten" + +#: cmdline/apt-get.cc:1089 +#, c-format +msgid "" +"Sorry, re-installation of %s is not possible, it cannot be downloaded.\n" +msgstr "" +"Entschuldigung, Re-Installation von %s ist nicht möglich, kann " +"nicht heruntergeladen werden.\n" + +#: cmdline/apt-get.cc:1097 +#, c-format +msgid "Sorry, %s is already the newest version.\n" +msgstr "Entschuldigung, %s ist bereits die neueste Version.\n" + +#: cmdline/apt-get.cc:1124 +#, c-format +msgid "Release '%s' for '%s' was not found" +msgstr "Release '%s' für '%s' wurde nicht gefunden" + +#: cmdline/apt-get.cc:1126 +#, c-format +msgid "Version '%s' for '%s' was not found" +msgstr "Version '%s' für '%s' wurde nicht gefunden" + +#: cmdline/apt-get.cc:1132 +#, c-format +msgid "Selected version %s (%s) for %s\n" +msgstr "Wählte Version %s (%s) für %s\n" + +#: cmdline/apt-get.cc:1242 +msgid "The update command takes no arguments" +msgstr "Der update Befehl braucht keine Argumente" + +#: cmdline/apt-get.cc:1255 +msgid "Unable to lock the list directory" +msgstr "Ausserstande das Listen-Verzeichnis zu locken" + +#: cmdline/apt-get.cc:1278 +msgid "" +"Release files for some repositories could not be retrieved or authenticated. " +"Such repositories are being ignored." +msgstr "" +"Release-Dateien einiger Repositories konnten nicht geholt oder" +"authentifiziert werden." +"Derartige Repositories werden ignoriert." + +#: cmdline/apt-get.cc:1325 +msgid "" +"Some index files failed to download, they have been ignored, or old ones " +"used instead." +msgstr "" +"Einige Index-Dateien konnten nicht heruntergeladen werden, sie wurden " +"ignoriert oder alte weiterhin benutzt." + +#: cmdline/apt-get.cc:1344 +msgid "Internal Error, AllUpgrade broke stuff" +msgstr "Interner Fehler, AllUpgrade hat etwas zerstört" + +#: cmdline/apt-get.cc:1434 cmdline/apt-get.cc:1470 +#, c-format +msgid "Couldn't find package %s" +msgstr "Konnte Paket %s nicht finden" + +#: cmdline/apt-get.cc:1447 +#, c-format +msgid "Regex compilation error - %s" +msgstr "Regex Compilierungsfehler - %s" + +#: cmdline/apt-get.cc:1457 +#, c-format +msgid "Note, selecting %s for regex '%s'\n" +msgstr "Beachte, wähle %s für Regex '%s'\n" + +#: cmdline/apt-get.cc:1487 +msgid "You might want to run `apt-get -f install' to correct these:" +msgstr "Sie möchten `apt-get -f install' ausführen um diese zu beheben:" + +#: cmdline/apt-get.cc:1490 +msgid "" +"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " +"solution)." +msgstr "" +"Unerfüllte Abhängigkeiten. Versuchen Sie 'apt-get -f install' ohne Pakete" +"(oder geben Sie eine Lösung an)" + +#: cmdline/apt-get.cc:1502 +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" +"distribution that some required packages have not yet been created\n" +"or been moved out of Incoming." +msgstr "" +"Einige Pakete konnten nicht installiert werden. Dies könnte bedeuten,\n" +"dass Sie eine unmögliche Situation angefordert haben oder, falls Sie die\n" +"instabile Distribution verwenden, dass einige benötigte Pakete noch nicht\n" +"erzeugt oder aus 'Incoming' verschoben worden sind." + +#: cmdline/apt-get.cc:1510 +msgid "" +"Since you only requested a single operation it is extremely likely that\n" +"the package is simply not installable and a bug report against\n" +"that package should be filed." +msgstr "" +"Da Sie nur eine einzelne Operation angefordert haben, ist es extrem\n" +"wahrscheinlich, dass das Paket schlichtweg nicht installierbar ist und\n" +"ein Bugreport über dieses Paket eingereicht werden sollte." + +#: cmdline/apt-get.cc:1515 +msgid "The following information may help to resolve the situation:" +msgstr "Die folgende Information könnte helfen die Sitation zu beheben:" + +#: cmdline/apt-get.cc:1518 +msgid "Sorry, broken packages" +msgstr "Entschuldigung, fehlerhafte Pakete" + +#: cmdline/apt-get.cc:1541 +msgid "The following extra packages will be installed:" +msgstr "Die folgenden zusätzlichen Pakete werden installiert werden:" + +#: cmdline/apt-get.cc:1560 +msgid "Calculating Upgrade... " +msgstr "Berechne Upgrade... " + +#: cmdline/apt-get.cc:1563 +msgid "Failed" +msgstr "Gescheitert" + +#: cmdline/apt-get.cc:1568 +msgid "Done" +msgstr "Fertig" + +#: cmdline/apt-get.cc:1741 +msgid "Must specify at least one package to fetch source for" +msgstr "" +"Es muss mindestens ein Paket angegeben werden, für das die Quellen geholt " +"werden sollen" + +#: cmdline/apt-get.cc:1768 cmdline/apt-get.cc:2005 +#, c-format +msgid "Unable to find a source package for %s" +msgstr "Ausserstande, ein Quellpaket für %s zu finden" + +#: cmdline/apt-get.cc:1817 +#, c-format +msgid "Sorry, you don't have enough free space in %s" +msgstr "Entschuldigung, sie haben nicht genug freien Platz in %s" + +#: cmdline/apt-get.cc:1822 +#, c-format +msgid "Need to get %sB/%sB of source archives.\n" +msgstr "Muss %sB/%sB an Quell-Archiven holen.\n" + +#: cmdline/apt-get.cc:1825 +#, c-format +msgid "Need to get %sB of source archives.\n" +msgstr "Muss %sB an Quell-Archiven holen.\n" + +#: cmdline/apt-get.cc:1831 +#, c-format +msgid "Fetch Source %s\n" +msgstr "Hole Quelle %s\n" + +#: cmdline/apt-get.cc:1862 +msgid "Failed to fetch some archives." +msgstr "Gescheitert einige Archive zu holen." + +#: cmdline/apt-get.cc:1895 cmdline/apt-get.cc:1946 +#, c-format +msgid "Build command '%s' failed.\n" +msgstr "Build-Befehl '%s' gescheitert.\n" + +#: cmdline/apt-get.cc:1907 cmdline/apt-get.cc:1929 +#, c-format +msgid "Unpack command '%s' failed.\n" +msgstr "Auspack-Befehl '%s' gescheitert.\n" + +#: cmdline/apt-get.cc:1917 +#, c-format +msgid "Skipping unpack of already unpacked source in %s\n" +msgstr "Überspringe Auspacken von bereits ausgepackten Quellen in %s\n" + +#: cmdline/apt-get.cc:1966 +msgid "Child process failed" +msgstr "Kind-Prozess gescheitert" + +#: cmdline/apt-get.cc:1982 +msgid "Must specify at least one package to check builddeps for" +msgstr "" +"Es muss mindestens ein Paket angegeben werden, um die Build-Abhängigkeiten " +"zu ermitteln" + +#: cmdline/apt-get.cc:2010 +#, c-format +msgid "Unable to get build-dependency information for %s" +msgstr "Ausserstande, Build-Abhängigkeitsinformationen für %s zu bekommen" + +#: cmdline/apt-get.cc:2030 +#, c-format +msgid "%s has no build depends.\n" +msgstr "%s hat keine Build-Abhängigkeiten.\n" + +#: cmdline/apt-get.cc:2048 +#, c-format +msgid "" +"%s dependency on %s cannot be satisfied because the package %s cannot be " +"found" +msgstr "" +"%s Abhängigkeit auf %s kann nicht erfüllt werden, da das Paket %s " +"nichtgefunden werden kann" + +#: cmdline/apt-get.cc:2100 +msgid "" +"Some broken packages were found while trying to process build-dependencies.\n" +"You might want to run `apt-get -f install' to correct these." +msgstr "" +"Während des Versuchs die Build-Abhängigkeiten zu verarbeiten wurden " +"zerbrochene Pakete gefunden.\n" +"Sie möchten wahrscheinlich `apt-get -f install' ausführen um diese zu " +"beheben." + +#: cmdline/apt-get.cc:2105 +msgid "Failed to process build dependencies" +msgstr "Ausserstande, Build-Abhängigkeiten zu verarbeiten" + +#: cmdline/apt-get.cc:2137 +msgid "Supported Modules:" +msgstr "Unterstützte Module:" + +#: cmdline/apt-get.cc:2178 +msgid "" +"Usage: apt-get [options] command\n" +" apt-get [options] install|remove pkg1 [pkg2 ...]\n" +" apt-get [options] source pkg1 [pkg2 ...]\n" +"\n" +"apt-get is a simple command line interface for downloading and\n" +"installing packages. The most frequently used commands are update\n" +"and install.\n" +"\n" +"Commands:\n" +" update - Retrieve new lists of packages\n" +" upgrade - Perform an upgrade\n" +" install - Install new packages (pkg is libc6 not libc6.deb)\n" +" remove - Remove packages\n" +" source - Download source archives\n" +" build-dep - Configure build-dependencies for source packages\n" +" dist-upgrade - Distribution upgrade, see apt-get(8)\n" +" dselect-upgrade - Follow dselect selections\n" +" clean - Erase downloaded archive files\n" +" autoclean - Erase old downloaded archive files\n" +" check - Verify that there are no broken dependencies\n" +"\n" +"Options:\n" +" -h This help text.\n" +" -q Loggable output - no progress indicator\n" +" -qq No output except for errors\n" +" -d Download only - do NOT install or unpack archives\n" +" -s No-act. Perform ordering simulation\n" +" -y Assume Yes to all queries and do not prompt\n" +" -f Attempt to continue if the integrity check fails\n" +" -m Attempt to continue if archives are unlocatable\n" +" -u Show a list of upgraded packages as well\n" +" -b Build the source package after fetching it\n" +" -c=? Read this configuration file\n" +" -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n" +"See the apt-get(8), sources.list(5) and apt.conf(5) manual\n" +"pages for more information and options.\n" +" This APT has Super Cow Powers.\n" +msgstr "" + +#: cmdline/apt-sortpkgs.cc:84 +msgid "Unknown package record!" +msgstr "Unbekannter Paketeintrag!" + +#: cmdline/apt-sortpkgs.cc:148 +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 arbitary configuration option, eg -o dir::cache=/tmp\n" +msgstr "" diff --git a/apt/po/makefile b/apt/po/makefile new file mode 100644 index 0000000..abe8ffe --- /dev/null +++ b/apt/po/makefile @@ -0,0 +1,74 @@ +# -*- make -*- + +# This will compile the gettext message catalogues. + +# The other make files drop file lists in build/po/domains/DOMAIN/* which +# is then picked up by this make file to define all the domains and all the +# source files that compose each domain. It then produces the POT files +# and then filters the PO files through the per-domain POT file to create +# the input to msgformat, which is then dumped into a locale directory. + +BASE=.. +SUBDIR=po + +# Bring in the default rules +include ../buildlib/defaults.mak + +CATALOGS := $(addsuffix .gmo,$(shell cat LINGUAS)) +DOMAINS := $(notdir $(wildcard $(PO_DOMAINS)/*)) +POTFILES := $(addsuffix .pot,$(addprefix $(PO)/,$(DOMAINS))) + +# Construct a list of all mo files for all domains under $(PO_DOMAINS) +MOFILES := $(patsubst %.gmo,%.mo,$(CATALOGS)) +MOFILES := $(foreach D,$(DOMAINS),$(addprefix $(PO_DOMAINS)/$(D)/,$(MOFILES))) +LANG_POFILES := $(patsubst %.mo,%.po,$(MOFILES)) +LINGUAS := $(patsubst %.gmo,%,$(CATALOGS)) + +GETDOMAIN = $(word 1,$(subst /, ,$(1))) + +# Generate the list of files from the bits the other make files dropped +# and produce the .pot file. +$(POTFILES) : $(PO)/%.pot : + printf "%s " "Generating POT file $@" + echo $@ : $(wildcard $(PO)/domains/$*/*.*list) $(addprefix $(BASE)/,$(shell cat $(wildcard $(PO)/domains/$*/*.srclist))) > $@.d +# From sh source + cat $(PO)/domains/$*/*.shlist 2> /dev/null | (cd $(BASE) && xargs -n1 bash --dump-po-strings) > $(PO)/domains/$*/sh.pot +# From C/C++ source + cat $(PO)/domains/$*/*.srclist > $(PO)/POTFILES_$*.in + $(XGETTEXT) --default-domain=$* --directory=$(BASE) \ + --add-comments --foreign --keyword=_ --keyword=N_ \ + --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot + rm -f $(PO)/POTFILES_$*.in + $(MSGCOMM) --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@ + +$(PO)/$(PACKAGE)-all.pot: $(POTFILES) + $(MSGCOMM) --more-than=0 $(POTFILES) --output=$@ + +# Filter the complete translation with the domain specific file to produce +# only the subtext needed for this domain +# We cannot express the dependencies required for this directly with a pattern +# rule, so we use the .d hack. +$(LANG_POFILES) : $(PO_DOMAINS)/%.po : $(PO)/$(PACKAGE)-all.pot + printf "%s " "Generating $@" + echo $@ : $(notdir $@) $(PO)/$(call GETDOMAIN,$*).pot > $(PO)/$(call GETDOMAIN,$*)_$(notdir $@).d + $(MSGMERGE) $(notdir $@) $(PO)/$(call GETDOMAIN,$*).pot -o $@ + +$(MOFILES) : $(PO_DOMAINS)/%.mo : $(PO_DOMAINS)/%.po + printf "%s: " "Generating $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo" + $(GMSGFMT) --statistics -o $@ $< + mkdir -p $(LOCALE)/$(notdir $*)/LC_MESSAGES/ + cp $@ $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo + +binary: $(POTFILES) $(PO)/$(PACKAGE)-all.pot $(MOFILES) + +clean: clean/local +clean/local: + rm -f $(MOFILES) $(LANG_POFILES) $(PO)/*.d + +# Include the dependencies that are available +The_DFiles = $(wildcard $(PO)/*.d) +ifneq ($(words $(The_DFiles)),0) +include $(The_DFiles) +endif + +.NOTPARALLEL: diff --git a/apt/po/pt_BR.po b/apt/po/pt_BR.po index aee2d47..7bbe063 100644 --- a/apt/po/pt_BR.po +++ b/apt/po/pt_BR.po @@ -5,836 +5,18 @@ msgid "" msgstr "" "Project-Id-Version: apt\n" -"POT-Creation-Date: 2001-01-10 13:40-0200\n" -"PO-Revision-Date: 2001-01-16 17:50-0200\n" -"Last-Translator: Marcia Norie Nakaza <norie@conectiva.com.br>\n" +"POT-Creation-Date: 2001-12-12 09:19-0200\n" +"PO-Revision-Date: 2001-12-12 17:50-0200\n" +"Last-Translator: Flávio B. Leitner <flavio@conectiva.com.br>\n" "Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8 bit\n" -#. Yes/No -#: cmdline/apt-get.cc:129 -msgid "Y" -msgstr "S" - -#: cmdline/apt-get.cc:129 -msgid "y" -msgstr "s" - -#: cmdline/apt-get.cc:215 -msgid "Sorry, but the following packages have unmet dependencies:" -msgstr "Sinto muito, mas os pacotes a seguir têm dependências não resolvidas:" - -#: cmdline/apt-get.cc:275 -msgid " but " -msgstr " mas " - -#: cmdline/apt-get.cc:278 -msgid " is installed" -msgstr " está instalado" - -#: cmdline/apt-get.cc:278 -msgid " is to be installed" -msgstr " será instalado" - -#: cmdline/apt-get.cc:284 -msgid "it is not installable" -msgstr "não é instalável" - -#: cmdline/apt-get.cc:286 -msgid "it is a virtual package" -msgstr "é um pacote virtual" - -#: cmdline/apt-get.cc:289 -msgid "it is not installed" -msgstr "não está instalado" - -#: cmdline/apt-get.cc:289 -msgid "it is not going to be installed" -msgstr "não será instalado" - -#: cmdline/apt-get.cc:294 -msgid " or" -msgstr " ou" - -#: cmdline/apt-get.cc:320 -msgid "The following NEW packages will be installed:" -msgstr "Os NOVOS pacotes a seguir serão instalados:" - -#: cmdline/apt-get.cc:343 -msgid "The following packages will be REMOVED:" -msgstr "Os pacotes a seguir serão REMOVIDOS:" - -#: cmdline/apt-get.cc:363 -msgid "The following packages have been kept back" -msgstr "Os pacotes a seguir serão mantidos" - -#: cmdline/apt-get.cc:383 -msgid "The following packages will be upgraded" -msgstr "Os pacotes a seguir serão atualizados" - -#: cmdline/apt-get.cc:415 -msgid "The following packages can be upgraded:" -msgstr "Os pacotes a seguir podem ser atualizados:" - -#: cmdline/apt-get.cc:426 -msgid " from " -msgstr " de " - -#: cmdline/apt-get.cc:427 -msgid " to " -msgstr " para " - -#: cmdline/apt-get.cc:429 -msgid " Importance: " -msgstr " Importância: " - -#: cmdline/apt-get.cc:430 -msgid " Date: " -msgstr " Data: " - -#: cmdline/apt-get.cc:450 -msgid "The following held packages will be changed:" -msgstr "Os pacotes a seguir serão alterados:" - -#: cmdline/apt-get.cc:500 -#, c-format -msgid "%s (due to %s) " -msgstr "%s (devido a %s) " - -#: cmdline/apt-get.cc:508 -msgid "WARNING: The following essential packages will be removed" -msgstr "AVISO: Os seguintes pacotes essenciais serão removidos" - -#: cmdline/apt-get.cc:509 -msgid "This should NOT be done unless you know exactly what you are doing!" -msgstr "" -"Isto NÃO deve ser feito a menos que você saiba exatamente o que está fazendo!" - -#: cmdline/apt-get.cc:531 -msgid " packages upgraded, " -msgstr " pacotes atualizados, " - -#: cmdline/apt-get.cc:532 -msgid " newly installed, " -msgstr " instalados agora, " - -#: cmdline/apt-get.cc:534 -msgid " reinstalled, " -msgstr " reinstalados, " - -#: cmdline/apt-get.cc:535 -msgid " to remove and " -msgstr " a serem removidos e " - -#: cmdline/apt-get.cc:536 -msgid " not upgraded." -msgstr " não atualizados." - -#: cmdline/apt-get.cc:539 -msgid " packages not fully installed or removed." -msgstr " pacotes não instalados totalmente ou removidos." - -#: apt-pkg/pkgrecords.cc:36 cmdline/apt-cache.cc:364 cmdline/apt-cache.cc:970 -#: cmdline/apt-cache.cc:1005 cmdline/apt-get.cc:555 -#, c-format -msgid "Package file %s is out of sync." -msgstr "O arquivo do pacote %s está fora de sincronia." - -#: cmdline/apt-get.cc:672 -msgid "Correcting dependencies..." -msgstr "Corrigindo dependências..." - -#: cmdline/apt-get.cc:675 -msgid " failed." -msgstr " falhou." - -#: cmdline/apt-get.cc:678 -msgid "Unable to correct dependencies" -msgstr "Impossível corrigir dependências" - -#: cmdline/apt-get.cc:681 -msgid "Unable to minimize the upgrade set" -msgstr "Impossível minimizar o grupo de atualização" - -#: cmdline/apt-get.cc:683 -msgid " Done" -msgstr " Pronto" - -#: cmdline/apt-get.cc:687 -msgid "You might want to run `apt-get -f install' to correct these." -msgstr "Você pode executar `apt-get -f install' para corrigi-los." - -#: cmdline/apt-get.cc:690 -msgid "Unmet dependencies. Try using -f." -msgstr "Dependências não resolvidas. Tente usar -f." - -#: cmdline/apt-get.cc:743 -msgid "Internal Error, InstallPackages was called with broken packages!" -msgstr "Erro interno, InstallPackages foi chamado com pacotes corrompidos!" - -#: cmdline/apt-get.cc:752 -msgid "Packages need to be removed but No Remove was specified." -msgstr "Pacotes precisam ser removidos mas Não Remover foi especificado." - -#: cmdline/apt-get.cc:762 -msgid "Internal Error, Ordering didn't finish" -msgstr "Erro interno, a ordenação não terminou" - -#: cmdline/apt-get.cc:777 cmdline/apt-get.cc:1536 cmdline/apt-get.cc:1569 -msgid "Unable to lock the download directory" -msgstr "Impossível criar lock no diretório de download" - -#: apt-pkg/cachefile.cc:73 cmdline/apt-get.cc:787 cmdline/apt-get.cc:1619 -msgid "The list of sources could not be read." -msgstr "A lista de fontes não pôde ser lida." - -#: cmdline/apt-get.cc:804 -msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" -msgstr "" -"Os tamanhos não são iguais, envie um e-mail para apt@packages.debian.org" - -#. Number of bytes -#: cmdline/apt-get.cc:808 cmdline/apt-get.cc:1752 -msgid "Need to get " -msgstr "É necessária a obtenção de " - -#: cmdline/apt-get.cc:814 -msgid " of archives. After unpacking " -msgstr " para os arquivos. Após desempacotar, " - -#: cmdline/apt-get.cc:818 -msgid "B will be used." -msgstr "B serão usados." - -#: cmdline/apt-get.cc:820 -msgid "B will be freed." -msgstr "B serão liberados." - -#: cmdline/apt-get.cc:832 cmdline/apt-get.cc:1745 -#, c-format -msgid "Couldn't determine free space in %s" -msgstr "Não foi possível determinar espaço livre em %s" - -#: cmdline/apt-get.cc:835 -#, c-format -msgid "Sorry, you don't have enough free space in %s to hold all packages." -msgstr "" -"Sinto muito, você não tem espaço livre suficiente em %s para manter todos os " -"pacotes." - -#: cmdline/apt-get.cc:844 -msgid "There are problems and -y was used without --force-yes" -msgstr "Não há problemas e -y foi usado sem --force-yes" - -#: cmdline/apt-get.cc:850 cmdline/apt-get.cc:867 -msgid "Trivial Only specified but this is not a trivial operation." -msgstr "Apenas trivial foi especificado mas esta não é uma operação trivial." - -#: cmdline/apt-get.cc:852 -msgid "You are about to do something potentially harmful" -msgstr "Você está prestes a fazer algo realmente danoso" - -#: cmdline/apt-get.cc:853 -msgid "To continue type in the phrase 'Yes, I understand this may be bad'" -msgstr "Para continuar digite a frase 'Sim, eu sei que isso pode ser ruim'" - -#: cmdline/apt-get.cc:854 -msgid " ?] " -msgstr " ?] " - -#: cmdline/apt-get.cc:855 -msgid "Yes, I understand this may be bad" -msgstr "Sim, eu sei que isso pode ser ruim" - -#: cmdline/apt-get.cc:857 cmdline/apt-get.cc:876 -msgid "Aborted." -msgstr "Abortado." - -#: cmdline/apt-get.cc:872 -msgid "Do you want to continue? [Y/n] " -msgstr "Você quer continuar? [S/n] " - -#: cmdline/apt-get.cc:936 cmdline/apt-get.cc:1196 cmdline/apt-get.cc:1788 -msgid "Failed to fetch " -msgstr "Falhou ao obter " - -#: cmdline/apt-get.cc:954 -msgid "Some files failed to download" -msgstr "Houve falha ao baixar alguns arquivos" - -#: cmdline/apt-get.cc:960 -msgid "Unable to fetch some archives, maybe try with --fix-missing?" -msgstr "Impossível obter alguns arquivos, tentar talvez com --fix-missing?" - -#: cmdline/apt-get.cc:964 -msgid "--fix-missing and media swapping is not currently supported" -msgstr "--fix-missing e troca de meio não são atualmente suportados" - -#: cmdline/apt-get.cc:969 -msgid "Unable to correct missing packages." -msgstr "Impossível corrigir pacotes perdidos." - -#: cmdline/apt-get.cc:970 -msgid "Aborting Install." -msgstr "Cancelando a instalação." - -#: cmdline/apt-get.cc:1001 -msgid "Note, selecting " -msgstr "Nota, selecionando " - -#: cmdline/apt-get.cc:1001 -msgid " instead of " -msgstr " em vez de " - -#: cmdline/apt-get.cc:1010 -msgid "Skipping " -msgstr "Omitindo " - -#: cmdline/apt-get.cc:1010 -msgid ", it is already installed and no-upgrade is set." -msgstr ", já está instalado e a opção no-upgrade está habilitada." - -#: cmdline/apt-get.cc:1020 -#, c-format -msgid "Package %s is not installed" -msgstr "O pacote %s não está instalado" - -#: cmdline/apt-cache.cc:116 cmdline/apt-get.cc:1030 cmdline/apt-get.cc:1050 +#: cmdline/apt-cache.cc:116 cmdline/apt-get.cc:1060 cmdline/apt-get.cc:1080 msgid "Package " msgstr "Pacote " -#: cmdline/apt-get.cc:1030 -msgid " is a virtual package provided by:" -msgstr " é um pacote virtual fornecido por:" - -#: cmdline/apt-get.cc:1041 -msgid " [Installed]" -msgstr " [Instalado]" - -#: cmdline/apt-get.cc:1046 -msgid "You should explicitly select one to install." -msgstr "Você deve selecionar de forma explícita um para ser instalado." - -#: cmdline/apt-get.cc:1050 -msgid " has no available version, but exists in the database." -msgstr " não tem versão disponível, mas existe no banco de dados." - -#: cmdline/apt-get.cc:1051 -msgid "" -"This typically means that the package was mentioned in a dependency and " -msgstr "Isto significa que o pacote foi mencionado em uma dependência e " - -#: cmdline/apt-get.cc:1052 -msgid "" -"never uploaded, has been obsoleted or is not available with the contents " -msgstr "nunca foi carregado, se tornou obsoleto ou não está disponível com os conteúdos " - -#: cmdline/apt-get.cc:1053 -msgid "of sources.list" -msgstr "de sources.list" - -#: cmdline/apt-get.cc:1064 -msgid "However the following packages replace it:" -msgstr "No entanto, os pacotes a seguir o substituem:" - -#: cmdline/apt-get.cc:1067 -#, c-format -msgid "Package %s has no installation candidate" -msgstr "O pacote %s não tem candidato a instalação" - -#: cmdline/apt-get.cc:1087 -msgid "Sorry, re-installation of " -msgstr "Sinto, a reinstalação de " - -#: cmdline/apt-get.cc:1087 -msgid " is not possible, it cannot be downloaded" -msgstr " não é possível, este não pode ser carregado" - -#: cmdline/apt-get.cc:1094 -msgid "Sorry, " -msgstr "Sinto, " - -#: cmdline/apt-get.cc:1094 -msgid " is already the newest version" -msgstr " já é a versão mais nova" - -#: cmdline/apt-get.cc:1123 -msgid "Unable to lock the list directory" -msgstr "Impossível bloquear o diretório list" - -#: cmdline/apt-get.cc:1148 -msgid "Could not retrieve digitally signed hash file" -msgstr "Não foi possível recuperar arquivo hash assinado digitalmente" - -#: cmdline/apt-get.cc:1160 -msgid "Failed to fetch hash file: " -msgstr "Falhou ao obter arquivo hash: " - -#: cmdline/apt-get.cc:1168 -msgid "" -"Some of the signed hash files could not be retrieved. Aborting operation." -msgstr "" -"Alguns dos arquivos hash assinados não puderam ser recuperados. Cancelando a " -"operação." - -#: cmdline/apt-get.cc:1210 -msgid "Some of the index files had mismatching MD5 sums!" -msgstr "Alguns do arquivos de índice tinham somas MD5 incompatíveis!" - -#: cmdline/apt-get.cc:1218 -msgid "" -"Some index files failed to download, they have been ignored, or old ones " -"used instead." -msgstr "" -"Houve falha de download de alguns arquivos de índice, eles são ignorados ou " -"os antigos serão usados." - -#: cmdline/apt-get.cc:1223 -msgid " will not be authenticated." -msgstr " não será autenticado." - -#: cmdline/apt-get.cc:1244 -msgid "Internal Error, AllUpgrade broke stuff" -msgstr "Erro interno no AllUpgrade" - -#: cmdline/apt-get.cc:1313 cmdline/apt-get.cc:1346 -#, c-format -msgid "Couldn't find package %s" -msgstr "Não foi possível encontrar o pacote %s" - -#: cmdline/apt-get.cc:1326 -msgid "Regex compilation error:" -msgstr "Erro de compilação de Regex:" - -#: cmdline/apt-get.cc:1360 -msgid "You might want to run `apt-get -f install' to correct these:" -msgstr "Você pode querer executar `apt-get -f install' para corrigir estas:" - -#: cmdline/apt-get.cc:1363 -msgid "" -"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " -"solution)." -msgstr "" -"dependências não resolvidas. Tente 'apt-get -f install' sem pacotes (ou " -"especifique uma solução)." - -#: cmdline/apt-get.cc:1374 -msgid "Some packages could not be installed. This may mean that you have" -msgstr "" -"Alguns pacotes podem não ter sido instalados. Isto pode significar que você" - -#: cmdline/apt-get.cc:1375 -msgid "requested an impossible situation or if you are using the unstable" -msgstr "solicitou uma situação impossível ou você está usando a distribuição" - -#: cmdline/apt-get.cc:1376 -msgid "distribution that some required packages have not yet been created" -msgstr "instável onde alguns pacotes necessários ainda não foram criados" - -#: cmdline/apt-get.cc:1377 -msgid "or been moved out of Incoming." -msgstr "ou foram movidos de Entrada." - -#: cmdline/apt-get.cc:1381 -msgid "Since you only requested a single operation it is extremely likely that" -msgstr "" -"Uma vez que você solicitou apenas uma operação simples é extremamente " -"provável que" - -#: cmdline/apt-get.cc:1382 -msgid "the package is simply not installable and a bug report against" -msgstr "o pacote simplesmente não esteja instalado e um relatório de bug" - -#: cmdline/apt-get.cc:1383 -msgid "that package should be filed." -msgstr "deste pacote deve ser preenchido." - -#: cmdline/apt-get.cc:1386 -msgid "The following information may help to resolve the situation:" -msgstr "A informação a seguir pode ajudar a solucionar a situação:" - -#: cmdline/apt-get.cc:1389 -msgid "Sorry, broken packages" -msgstr "Sinto, pacotes corrompidos" - -#: cmdline/apt-get.cc:1412 -msgid "The following extra packages will be installed:" -msgstr "Os seguintes pacotes extras serão instalados:" - -#: cmdline/apt-get.cc:1431 -msgid "Calculating Upgrade... " -msgstr "Calculando atualização... " - -#: cmdline/apt-get.cc:1434 -msgid "Failed" -msgstr "Falhou" - -#: cmdline/apt-get.cc:1439 -msgid "Done" -msgstr "Pronto" - -#: cmdline/apt-get.cc:1504 cmdline/apt-get.cc:1512 -msgid "Internal Error, problem resolver broke stuff" -msgstr "Erro interno no solucionador de problemas" - -#: cmdline/apt-get.cc:1614 -msgid "Must specify at least one package to fetch source for" -msgstr "Deve-se especificar pelo menos um pacote para buscar fonte para" - -#: cmdline/apt-get.cc:1688 -#, c-format -msgid "Unable to find a source package for %s" -msgstr "Impossível encontrar um pacote-fonte para %s" - -#: cmdline/apt-get.cc:1748 -#, c-format -msgid "Sorry, you don't have enough free space in %s" -msgstr "Sinto, você não tem espaço livre suficiente em %s" - -#: cmdline/apt-get.cc:1757 -msgid " of source archives." -msgstr " de arquivos-fonte." - -#: cmdline/apt-get.cc:1762 -msgid "Fetch Source " -msgstr "Obter fonte" - -#: cmdline/apt-get.cc:1793 -msgid "Failed to fetch some archives." -msgstr "Falhou ao obter alguns arquivos." - -#: cmdline/apt-get.cc:1813 cmdline/apt-get.cc:1859 -msgid "Build command '" -msgstr "Construir comando '" - -#: cmdline/apt-get.cc:1813 cmdline/apt-get.cc:1842 cmdline/apt-get.cc:1859 -msgid "' failed." -msgstr "' falhou." - -#: cmdline/apt-get.cc:1831 -msgid "Skipping unpack of already unpacked source in " -msgstr "Omitindo o desempacotamento de fonte já desempacotado em " - -#: cmdline/apt-get.cc:1842 -msgid "Unpack command '" -msgstr "O comando de desempacotamento '" - -#: cmdline/apt-get.cc:1875 -msgid "Couldn't wait for subprocess" -msgstr "Não foi possível esperar por subprocesso" - -#: cmdline/apt-get.cc:1879 -msgid "Child process failed" -msgstr "Processo-filho falhou" - -#: cmdline/apt-get.cc:1895 -msgid "Usage: apt-get [options] command" -msgstr "Uso: apt-get [opções] comando" - -#: cmdline/apt-get.cc:1896 -msgid " apt-get [options] install pkg1 [pkg2 ...]" -msgstr " apt-get [opções] install pac1 [pac2 ...]" - -#: cmdline/apt-get.cc:1898 -msgid "apt-get is a simple command line interface for downloading and" -msgstr "apt-get é uma interface de linha de comando simples para download e" - -#: cmdline/apt-get.cc:1899 -msgid "installing packages. The most frequently used commands are update" -msgstr "" -"instalação de pacotes. Os comandos usados com mais freqüência são update" - -#: cmdline/apt-get.cc:1900 -msgid "and install." -msgstr "e install." - -#: cmdline/apt-cache.cc:1203 cmdline/apt-cdrom.cc:864 cmdline/apt-config.cc:79 -#: cmdline/apt-get.cc:1902 -msgid "Commands:" -msgstr "Comandos:" - -#: cmdline/apt-get.cc:1903 -msgid " update - Retrieve new lists of packages" -msgstr " update - Recupera listas novas de pacotes" - -#: cmdline/apt-get.cc:1904 -msgid " upgrade - Perform an upgrade" -msgstr " upgrade - Executa um upgrade" - -#: cmdline/apt-get.cc:1905 -msgid " install - Install new packages" -msgstr " install - Instala novos pacotes" - -#: cmdline/apt-get.cc:1906 -msgid " remove - Remove packages" -msgstr " remove - Remove pacotes" - -#: cmdline/apt-get.cc:1907 -msgid " source - Download source archives" -msgstr " source - Baixa arquivos-fonte" - -#: cmdline/apt-get.cc:1908 -msgid " dist-upgrade - Distribution upgrade, see apt-get(8)" -msgstr " dist-upgrade - Upgrade de distribuição, ver apt-get(8)" - -#. cout << " dselect-upgrade - Follow dselect selections" << endl; -#: cmdline/apt-get.cc:1910 -msgid " clean - Erase downloaded archive files" -msgstr " clean - Apaga arquivos baixados" - -#: cmdline/apt-get.cc:1911 -msgid " autoclean - Erase old downloaded archive files" -msgstr " autoclean - Apaga arquivos antigos baixados" - -#: cmdline/apt-get.cc:1912 -msgid " check - Verify that there are no broken dependencies" -msgstr " check - Verifica se não há dependências" - -#: cmdline/apt-cache.cc:1218 cmdline/apt-cdrom.cc:867 cmdline/apt-config.cc:83 -#: cmdline/apt-get.cc:1914 -msgid "Options:" -msgstr "Opções:" - -#: cmdline/apt-get.cc:1915 -msgid " -h This help text." -msgstr " -h Este texto de ajuda." - -#: cmdline/apt-get.cc:1916 -msgid " -q Loggable output - no progress indicator" -msgstr " -q Saída acessível - nenhum indicador de progresso" - -#: cmdline/apt-get.cc:1917 -msgid " -qq No output except for errors" -msgstr " -qq Sem mensagens, exceto para erros" - -#: cmdline/apt-get.cc:1918 -msgid " -S Show summary for upgrade operation and quit" -msgstr " -S Exibe resumo para operação de upgrade e sai" - -#: cmdline/apt-get.cc:1919 -msgid " -d Download only - do NOT install or unpack archives" -msgstr " -d Apenas download - NÃO instala ou desempacota arquivos" - -#: cmdline/apt-get.cc:1920 -msgid " -s No-act. Perform ordering simulation" -msgstr " -s Nenhuma ação. Executa simulação de ordenação" - -#: cmdline/apt-get.cc:1921 -msgid " -y Assume Yes to all queries and do not prompt" -msgstr " -y Assume Sim para todas as consultas e não exibe" - -#: cmdline/apt-get.cc:1922 -msgid " -f Attempt to continue if the integrity check fails" -msgstr " -f Tenta continuar se falhar a verificação de integridade" - -#: cmdline/apt-get.cc:1923 -msgid " -m Attempt to continue if archives are unlocatable" -msgstr " -m Tenta continuar se arquivos não puderem ser localizados" - -#: cmdline/apt-get.cc:1924 -msgid " -u Show a list of upgraded packages as well" -msgstr " -u Exibe uma lista de pacotes atualizados" - -#: cmdline/apt-get.cc:1925 -msgid " -b Build the source package after fetching it" -msgstr " -b Constrói o pacote-fonte após buscá-lo" - -#: cmdline/apt-cache.cc:1224 cmdline/apt-cdrom.cc:874 cmdline/apt-config.cc:85 -#: cmdline/apt-get.cc:1926 -msgid " -c=? Read this configuration file" -msgstr " -c=? Lê este arquivo de configuração" - -#: cmdline/apt-cache.cc:1225 cmdline/apt-cdrom.cc:875 cmdline/apt-config.cc:86 -#: cmdline/apt-get.cc:1927 -msgid " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" -msgstr "" -" -o=? Ajusta uma opção de configuração arbitrária, p.ex -o dir::cache=/tmp" - -#: cmdline/apt-get.cc:1928 -msgid "See the apt-get(8), sources.list(5) and apt.conf(5) manual" -msgstr "Consulte as manpages de apt-get(8), sources.list(5) e apt.conf(5)" - -#: cmdline/apt-get.cc:1929 -msgid "pages for more information and options." -msgstr "para maiores informações e opções." - -#: cmdline/apt-cdrom.cc:76 cmdline/apt-cdrom.cc:144 cmdline/apt-cdrom.cc:189 -#: cmdline/apt-cdrom.cc:258 -#, c-format -msgid "Unable to change to %s" -msgstr "Impossível alterar para %s" - -#: apt-pkg/clean.cc:38 cmdline/apt-cdrom.cc:88 cmdline/apt-cdrom.cc:221 -#, c-format -msgid "Unable to read %s" -msgstr "Impossível ler %s" - -#: cmdline/apt-cdrom.cc:451 cmdline/apt-cdrom.cc:507 -#, c-format -msgid "Failed to open %s.new" -msgstr "Falhou ao abrir %s.new" - -#: cmdline/apt-cdrom.cc:478 cmdline/apt-cdrom.cc:605 -#, c-format -msgid "Failed to rename %s.new to %s" -msgstr "Falhou ao renomear %s.new para %s" - -#: cmdline/apt-cdrom.cc:552 cmdline/apt-cdrom.cc:586 cmdline/apt-cdrom.cc:806 -#: cmdline/apt-cdrom.cc:824 -msgid "Internal error" -msgstr "Erro interno" - -#: cmdline/apt-cdrom.cc:650 -msgid "Using CD-ROM mount point " -msgstr "Usando ponto de montagem do CD-ROM " - -#: cmdline/apt-cdrom.cc:658 -#, c-format -msgid "Unable to read the cdrom database %s" -msgstr "Impossível ler o banco de dados %s do CD-ROM" - -#: cmdline/apt-cdrom.cc:665 -msgid "Unmounting CD-ROM" -msgstr "Desmontando o CD-ROM" - -#. Mount the new CDROM -#: cmdline/apt-cdrom.cc:669 -msgid "Please insert a Disc in the drive and press enter" -msgstr "Insira um disco no drive e pressione Enter" - -#: cmdline/apt-cdrom.cc:670 -msgid "Mounting CD-ROM" -msgstr "Montando o CD-ROM" - -#: cmdline/apt-cdrom.cc:672 -msgid "Failed to mount the cdrom." -msgstr "Falhou ao montar o CD-ROM." - -#. Hash the CD to get an ID -#: cmdline/apt-cdrom.cc:676 -msgid "Identifying.. " -msgstr "Identificando.. " - -#: cmdline/apt-cdrom.cc:686 -msgid "Scanning Disc for index files.. " -msgstr "Procurando por arquivos de índice no disco.. " - -#: cmdline/apt-cdrom.cc:702 -msgid "I found (binary):" -msgstr "Eu encontrei (binário):" - -#: cmdline/apt-cdrom.cc:705 -msgid "I found (source):" -msgstr "Eu encontrei (fonte):" - -#: cmdline/apt-cdrom.cc:718 -msgid "Found " -msgstr "Encontrei " - -#: cmdline/apt-cdrom.cc:718 -msgid " package indexes and " -msgstr " índices de pacotes e " - -#: cmdline/apt-cdrom.cc:719 -msgid " source indexes." -msgstr " índices de fonte." - -#: cmdline/apt-cdrom.cc:724 -msgid "Unable to locate any package files, perhaps this is not a Debian Disc" -msgstr "" -"Não é possível localizar nenhum arquivo de pacote, talvez este não seja um " -"disco do Debian" - -#: cmdline/apt-cdrom.cc:726 -msgid "" -"Unable to locate any package files, perhaps this is not a Conectiva Disc" -msgstr "" -"Não é possível localizar nenhum arquivo de pacote, talvez este não seja um " -"disco do Conectiva" - -#: cmdline/apt-cdrom.cc:743 -msgid "Found label '" -msgstr "Rótulo encontrado '" - -#: cmdline/apt-cdrom.cc:751 -msgid "Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1'" -msgstr "Forneça um nome para este disco, como 'MinhaDistro 6.0 Disco 1'" - -#: cmdline/apt-cdrom.cc:761 -msgid "That is not a valid name, try again " -msgstr "Este não é um nome válido, tente novamente " - -#: cmdline/apt-cdrom.cc:775 -msgid "This Disc is called:" -msgstr "Este disco é chamado:" - -#: cmdline/apt-cdrom.cc:794 -msgid "Writing new source list" -msgstr "Gravando nova lista-fonte" - -#. Print the sourcelist entries -#: cmdline/apt-cdrom.cc:801 -msgid "Source List entries for this Disc are:" -msgstr "As entradas de lista-fonte para este disco são:" - -#: cmdline/apt-cdrom.cc:838 -msgid "Repeat this process for the rest of the CDs in your set." -msgstr "Repetir este processo para o restante dos CDs em seu conjunto." - -#: cmdline/apt-cdrom.cc:858 -msgid "Usage: apt-cdrom [options] command" -msgstr "Uso: apt-cdrom [opções] comando" - -#: cmdline/apt-cdrom.cc:860 -msgid "apt-cdrom is a tool to add CDROM's to APT's source list. The " -msgstr "" -"apt-cdrom é uma ferramenta para adicionar a lista de fontes do CD-ROM para a " -"do APT." - -#: cmdline/apt-cdrom.cc:861 -msgid "CDROM mount point and device information is taken from apt.conf" -msgstr "" -"As informações do ponto de montagem e do dispositivo CD-ROM são retiradas do " -"apt.conf" - -#: cmdline/apt-cdrom.cc:862 -msgid "and /etc/fstab." -msgstr "e /etc/fstab." - -#: cmdline/apt-cdrom.cc:865 -msgid " add - Add a CDROM" -msgstr " add - Adicione um CD-ROM" - -#: cmdline/apt-cdrom.cc:868 -msgid " -h This help text" -msgstr " -h Este texto de ajuda" - -#: cmdline/apt-cdrom.cc:869 -msgid " -d CD-ROM mount point" -msgstr " -d Ponto de montagem do CD-ROM" - -#: cmdline/apt-cdrom.cc:870 -msgid " -r Rename a recognized CD-ROM" -msgstr " -r Renomear um CD-ROM reconhecido" - -#: cmdline/apt-cdrom.cc:871 -msgid " -m No mounting" -msgstr " -m Sem montagem" - -#: cmdline/apt-cdrom.cc:872 -msgid " -f Fast mode, don't check package files" -msgstr " -f Modo rápido, não verifica os arquivos de pacote" - -#: cmdline/apt-cdrom.cc:873 -msgid " -a Thorough scan mode" -msgstr " -a Pelo modo scan" - -#: cmdline/apt-cdrom.cc:876 -msgid "See fstab(5)" -msgstr "Veja fstab(5)" - #: cmdline/apt-cache.cc:116 msgid " version " msgstr " versão " @@ -985,6 +167,12 @@ msgstr " R msgid " Architecture: " msgstr " Arquitetura: " +#: apt-pkg/pkgrecords.cc:36 cmdline/apt-cache.cc:364 cmdline/apt-cache.cc:970 +#: cmdline/apt-cache.cc:1005 cmdline/apt-get.cc:578 +#, c-format +msgid "Package file %s is out of sync." +msgstr "O arquivo do pacote %s está fora de sincronia." + #: cmdline/apt-cache.cc:669 msgid "You must give at least one file name" msgstr "Pelo menos um nome de arquivo deve ser fornecido" @@ -993,7 +181,8 @@ msgstr "Pelo menos um nome de arquivo deve ser fornecido" msgid "Generating cache" msgstr "Gerando cache" -#: apt-pkg/systemfactory.cc:188 cmdline/apt-cache.cc:696 +#: apt-pkg/rpm/rpmfactory.cc:192 apt-pkg/rpm/rpmfactory.cc:289 +#: apt-pkg/systemfactory.cc:187 cmdline/apt-cache.cc:696 #, c-format msgid "Problem opening %s" msgstr "Problema ao abrir %s" @@ -1115,6 +304,11 @@ msgstr "arquivo de cache armazenados em " msgid "It is not meant for ordinary use only as a debug aide." msgstr "Não significa uso comum apenas como uma ajuda para depuração." +#: cmdline/apt-cache.cc:1203 cmdline/apt-cdrom.cc:875 cmdline/apt-config.cc:79 +#: cmdline/apt-get.cc:1943 +msgid "Commands:" +msgstr "Comandos:" + #: cmdline/apt-cache.cc:1204 msgid " add - Add an package file to the source cache" msgstr " add - Adiciona um arquivo de pacote ao cache-fonte" @@ -1167,6 +361,11 @@ msgstr " pkgnames - Relaciona os nomes de todos os pacotes" msgid " dotty - Generate package graphs for GraphVis" msgstr " dotty - Gera gráficos de pacote para GraphVis" +#: cmdline/apt-cache.cc:1218 cmdline/apt-cdrom.cc:878 cmdline/apt-config.cc:83 +#: cmdline/apt-get.cc:1955 +msgid "Options:" +msgstr "Opções:" + #: cmdline/apt-cache.cc:1219 cmdline/apt-config.cc:84 msgid " -h This help text." msgstr " -h Este texto de ajuda." @@ -1187,11 +386,197 @@ msgstr " -q Desabilita indicador de progresso." msgid " -i Show only important deps for the unmet command." msgstr " -i Exibe apenas as dependências importantes para o comando unmet." +#: cmdline/apt-cache.cc:1224 cmdline/apt-cdrom.cc:885 cmdline/apt-config.cc:85 +#: cmdline/apt-get.cc:1968 +msgid " -c=? Read this configuration file" +msgstr " -c=? Lê este arquivo de configuração" + +#: cmdline/apt-cache.cc:1225 cmdline/apt-cdrom.cc:886 cmdline/apt-config.cc:86 +#: cmdline/apt-get.cc:1969 +msgid " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" +msgstr "" +" -o=? Ajusta uma opção de configuração arbitrária, p.ex -o dir::cache=/tmp" + #: cmdline/apt-cache.cc:1226 msgid "See the apt-cache(8) and apt.conf(5) manual pages for more information." msgstr "" "Consulte as manpages do apt-cache(8) e apt.conf(5) para maiores informações." +#: cmdline/apt-cdrom.cc:76 cmdline/apt-cdrom.cc:164 cmdline/apt-cdrom.cc:208 +#: cmdline/apt-cdrom.cc:277 +#, c-format +msgid "Unable to change to %s" +msgstr "Impossível alterar para %s" + +#: apt-pkg/clean.cc:38 cmdline/apt-cdrom.cc:88 cmdline/apt-cdrom.cc:240 +#, c-format +msgid "Unable to read %s" +msgstr "Impossível ler %s" + +#: cmdline/apt-cdrom.cc:470 cmdline/apt-cdrom.cc:526 +#, c-format +msgid "Failed to open %s.new" +msgstr "Falhou ao abrir %s.new" + +#: cmdline/apt-cdrom.cc:497 cmdline/apt-cdrom.cc:616 +#, c-format +msgid "Failed to rename %s.new to %s" +msgstr "Falhou ao renomear %s.new para %s" + +#: cmdline/apt-cdrom.cc:571 cmdline/apt-cdrom.cc:605 cmdline/apt-cdrom.cc:817 +#: cmdline/apt-cdrom.cc:835 +msgid "Internal error" +msgstr "Erro interno" + +#: cmdline/apt-cdrom.cc:661 +msgid "Using CD-ROM mount point " +msgstr "Usando ponto de montagem do CD-ROM " + +#: cmdline/apt-cdrom.cc:669 +#, c-format +msgid "Unable to read the cdrom database %s" +msgstr "Impossível ler o banco de dados %s do CD-ROM" + +#: cmdline/apt-cdrom.cc:676 +msgid "Unmounting CD-ROM" +msgstr "Desmontando o CD-ROM" + +#. Mount the new CDROM +#: cmdline/apt-cdrom.cc:680 +msgid "Please insert a Disc in the drive and press enter" +msgstr "Insira um disco no drive e pressione Enter" + +#: cmdline/apt-cdrom.cc:681 +msgid "Mounting CD-ROM" +msgstr "Montando o CD-ROM" + +#: cmdline/apt-cdrom.cc:683 +msgid "Failed to mount the cdrom." +msgstr "Falhou ao montar o CD-ROM." + +#. Hash the CD to get an ID +#: cmdline/apt-cdrom.cc:687 +msgid "Identifying.. " +msgstr "Identificando.. " + +#: cmdline/apt-cdrom.cc:697 +msgid "Scanning Disc for index files.. " +msgstr "Procurando por arquivos de índice no disco.. " + +#: cmdline/apt-cdrom.cc:713 +msgid "I found (binary):" +msgstr "Eu encontrei (binário):" + +#: cmdline/apt-cdrom.cc:716 +msgid "I found (source):" +msgstr "Eu encontrei (fonte):" + +#: cmdline/apt-cdrom.cc:729 +msgid "Found " +msgstr "Encontrei " + +#: cmdline/apt-cdrom.cc:729 +msgid " package indexes and " +msgstr " índices de pacotes e " + +#: cmdline/apt-cdrom.cc:730 +msgid " source indexes." +msgstr " índices de fonte." + +#: cmdline/apt-cdrom.cc:735 +msgid "Unable to locate any package files, perhaps this is not a Debian Disc" +msgstr "" +"Não é possível localizar nenhum arquivo de pacote, talvez este não seja um " +"disco do Debian" + +#: cmdline/apt-cdrom.cc:737 +msgid "" +"Unable to locate any package files, perhaps this is not a Conectiva Disc" +msgstr "" +"Não é possível localizar nenhum arquivo de pacote, talvez este não seja um " +"disco do Conectiva" + +#: cmdline/apt-cdrom.cc:754 +msgid "Found label '" +msgstr "Rótulo encontrado '" + +#: cmdline/apt-cdrom.cc:762 +msgid "Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1'" +msgstr "Forneça um nome para este disco, como 'MinhaDistro 6.0 Disco 1'" + +#: cmdline/apt-cdrom.cc:772 +msgid "That is not a valid name, try again " +msgstr "Este não é um nome válido, tente novamente " + +#: cmdline/apt-cdrom.cc:786 +msgid "This Disc is called:" +msgstr "Este disco é chamado:" + +#: cmdline/apt-cdrom.cc:805 +msgid "Writing new source list" +msgstr "Gravando nova lista-fonte" + +#. Print the sourcelist entries +#: cmdline/apt-cdrom.cc:812 +msgid "Source List entries for this Disc are:" +msgstr "As entradas de lista-fonte para este disco são:" + +#: cmdline/apt-cdrom.cc:849 +msgid "Repeat this process for the rest of the CDs in your set." +msgstr "Repetir este processo para o restante dos CDs em seu conjunto." + +#: cmdline/apt-cdrom.cc:869 +msgid "Usage: apt-cdrom [options] command" +msgstr "Uso: apt-cdrom [opções] comando" + +#: cmdline/apt-cdrom.cc:871 +msgid "apt-cdrom is a tool to add CDROM's to APT's source list. The " +msgstr "" +"apt-cdrom é uma ferramenta para adicionar a lista de fontes do CD-ROM para a " +"do APT." + +#: cmdline/apt-cdrom.cc:872 +msgid "CDROM mount point and device information is taken from apt.conf" +msgstr "" +"As informações do ponto de montagem e do dispositivo CD-ROM são retiradas do " +"apt.conf" + +#: cmdline/apt-cdrom.cc:873 +msgid "and /etc/fstab." +msgstr "e /etc/fstab." + +#: cmdline/apt-cdrom.cc:876 +msgid " add - Add a CDROM" +msgstr " add - Adicione um CD-ROM" + +#: cmdline/apt-cdrom.cc:879 +msgid " -h This help text" +msgstr " -h Este texto de ajuda" + +#: cmdline/apt-cdrom.cc:880 +msgid " -d CD-ROM mount point" +msgstr " -d Ponto de montagem do CD-ROM" + +#: cmdline/apt-cdrom.cc:881 +msgid " -r Rename a recognized CD-ROM" +msgstr " -r Renomear um CD-ROM reconhecido" + +#: cmdline/apt-cdrom.cc:882 +msgid " -m No mounting" +msgstr " -m Sem montagem" + +#: cmdline/apt-cdrom.cc:883 +msgid " -f Fast mode, don't check package files" +msgstr " -f Modo rápido, não verifica os arquivos de pacote" + +#: cmdline/apt-cdrom.cc:884 +msgid " -a Thorough scan mode" +msgstr " -a Pelo modo scan" + +#: cmdline/apt-cdrom.cc:887 +msgid "See fstab(5)" +msgstr "Veja fstab(5)" + #: cmdline/apt-config.cc:37 msgid "Arguments not in pairs" msgstr "Os argumentos não estão em pares" @@ -1213,21 +598,657 @@ msgstr " shell - Modo shell" msgid " dump - Show the configuration" msgstr " dump - Exibe a configuração" +#. Yes/No +#: cmdline/apt-get.cc:129 +msgid "Y" +msgstr "S" + +#: cmdline/apt-get.cc:129 +msgid "y" +msgstr "s" + +#: cmdline/apt-get.cc:215 +msgid "Sorry, but the following packages have unmet dependencies:" +msgstr "Sinto muito, mas os pacotes a seguir têm dependências não resolvidas:" + +#: cmdline/apt-get.cc:275 +msgid " but " +msgstr " mas " + +#: cmdline/apt-get.cc:278 +msgid " is installed" +msgstr " está instalado" + +#: cmdline/apt-get.cc:278 +msgid " is to be installed" +msgstr " será instalado" + +#: cmdline/apt-get.cc:284 +msgid "it is not installable" +msgstr "não é instalável" + +#: cmdline/apt-get.cc:286 +msgid "it is a virtual package" +msgstr "é um pacote virtual" + +#: cmdline/apt-get.cc:289 +msgid "it is not installed" +msgstr "não está instalado" + +#: cmdline/apt-get.cc:289 +msgid "it is not going to be installed" +msgstr "não será instalado" + +#: cmdline/apt-get.cc:294 +msgid " or" +msgstr " ou" + +#: cmdline/apt-get.cc:320 +msgid "The following NEW packages will be installed:" +msgstr "Os NOVOS pacotes a seguir serão instalados:" + +#: cmdline/apt-get.cc:348 +msgid "The following packages will be REPLACED:" +msgstr "Os pacotes a seguir serão SUBSTITUÍDOS:" + +#: cmdline/apt-get.cc:349 +msgid "The following packages will be REMOVED:" +msgstr "Os pacotes a seguir serão REMOVIDOS:" + +#: cmdline/apt-get.cc:369 +msgid "The following packages have been kept back" +msgstr "Os pacotes a seguir serão mantidos" + +#: cmdline/apt-get.cc:389 +msgid "The following packages will be upgraded" +msgstr "Os pacotes a seguir serão atualizados" + +#: cmdline/apt-get.cc:421 +msgid "The following packages can be upgraded:" +msgstr "Os pacotes a seguir podem ser atualizados:" + +#: cmdline/apt-get.cc:432 +msgid " from " +msgstr " de " + +#: cmdline/apt-get.cc:433 +msgid " to " +msgstr " para " + +#: cmdline/apt-get.cc:435 +msgid " Importance: " +msgstr " Importância: " + +#: cmdline/apt-get.cc:436 +msgid " Date: " +msgstr " Data: " + +#: cmdline/apt-get.cc:456 +msgid "The following held packages will be changed:" +msgstr "Os pacotes a seguir serão alterados:" + +#: cmdline/apt-get.cc:523 +#, c-format +msgid "%s (due to %s) " +msgstr "%s (devido a %s) " + +#: cmdline/apt-get.cc:531 +msgid "WARNING: The following essential packages will be removed" +msgstr "AVISO: Os seguintes pacotes essenciais serão removidos" + +#: cmdline/apt-get.cc:532 +msgid "This should NOT be done unless you know exactly what you are doing!" +msgstr "" +"Isto NÃO deve ser feito a menos que você saiba exatamente o que está fazendo!" + +#: cmdline/apt-get.cc:554 +msgid " packages upgraded, " +msgstr " pacotes atualizados, " + +#: cmdline/apt-get.cc:555 +msgid " newly installed, " +msgstr " instalados agora, " + +#: cmdline/apt-get.cc:557 +msgid " reinstalled, " +msgstr " reinstalados, " + +#: cmdline/apt-get.cc:558 +msgid " to remove(replace) and " +msgstr " a serem removidos(substituídos) e " + +#: cmdline/apt-get.cc:559 +msgid " not upgraded." +msgstr " não atualizados." + +#: cmdline/apt-get.cc:562 +msgid " packages not fully installed or removed." +msgstr " pacotes não instalados totalmente ou removidos." + +#: cmdline/apt-get.cc:695 +msgid "Correcting dependencies..." +msgstr "Corrigindo dependências..." + +#: cmdline/apt-get.cc:698 +msgid " failed." +msgstr " falhou." + +#: cmdline/apt-get.cc:701 +msgid "Unable to correct dependencies" +msgstr "Impossível corrigir dependências" + +#: cmdline/apt-get.cc:704 +msgid "Unable to minimize the upgrade set" +msgstr "Impossível minimizar o grupo de atualização" + +#: cmdline/apt-get.cc:706 +msgid " Done" +msgstr " Pronto" + +#: cmdline/apt-get.cc:710 +msgid "You might want to run `apt-get -f install' to correct these." +msgstr "Você pode executar `apt-get -f install' para corrigi-los." + +#: cmdline/apt-get.cc:713 +msgid "Unmet dependencies. Try using -f." +msgstr "Dependências não resolvidas. Tente usar -f." + +#: cmdline/apt-get.cc:766 +msgid "Internal Error, InstallPackages was called with broken packages!" +msgstr "Erro interno, InstallPackages foi chamado com pacotes corrompidos!" + +#: cmdline/apt-get.cc:775 +msgid "Packages need to be removed but No Remove was specified." +msgstr "Pacotes precisam ser removidos mas Não Remover foi especificado." + +#: cmdline/apt-get.cc:785 +msgid "Internal Error, Ordering didn't finish" +msgstr "Erro interno, a ordenação não terminou" + +#: cmdline/apt-get.cc:800 cmdline/apt-get.cc:1577 cmdline/apt-get.cc:1610 +msgid "Unable to lock the download directory" +msgstr "Impossível criar lock no diretório de download" + +#: apt-pkg/cachefile.cc:84 cmdline/apt-get.cc:810 cmdline/apt-get.cc:1660 +msgid "The list of sources could not be read." +msgstr "A lista de fontes não pôde ser lida." + +#: cmdline/apt-get.cc:827 +msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" +msgstr "" +"Os tamanhos não são iguais, envie um e-mail para apt@packages.debian.org" + +#. Number of bytes +#: cmdline/apt-get.cc:831 cmdline/apt-get.cc:1793 +msgid "Need to get " +msgstr "É necessária a obtenção de " + +#: cmdline/apt-get.cc:837 +msgid " of archives. After unpacking " +msgstr " para os arquivos. Após desempacotar, " + +#: cmdline/apt-get.cc:841 +msgid "B will be used." +msgstr "B serão usados." + +#: cmdline/apt-get.cc:843 +msgid "B will be freed." +msgstr "B serão liberados." + +#. if (Cache->UsrSize() == 0) +#: cmdline/apt-get.cc:845 +msgid "used disk space will remain the same." +msgstr "espaço em disco usado vai permanecer o mesmo." + +#: cmdline/apt-get.cc:858 cmdline/apt-get.cc:1786 +#, c-format +msgid "Couldn't determine free space in %s" +msgstr "Não foi possível determinar espaço livre em %s" + +#: cmdline/apt-get.cc:861 +#, c-format +msgid "Sorry, you don't have enough free space in %s to hold all packages." +msgstr "" +"Sinto muito, você não tem espaço livre suficiente em %s para manter todos os " +"pacotes." + +#: cmdline/apt-get.cc:870 +msgid "There are problems and -y was used without --force-yes" +msgstr "Não há problemas e -y foi usado sem --force-yes" + +#: cmdline/apt-get.cc:876 cmdline/apt-get.cc:893 +msgid "Trivial Only specified but this is not a trivial operation." +msgstr "Apenas trivial foi especificado mas esta não é uma operação trivial." + +#: cmdline/apt-get.cc:878 +msgid "You are about to do something potentially harmful" +msgstr "Você está prestes a fazer algo realmente danoso" + +#: cmdline/apt-get.cc:879 +msgid "To continue type in the phrase 'Yes, I understand this may be bad'" +msgstr "Para continuar digite a frase 'Sim, eu sei que isso pode ser ruim'" + +#: cmdline/apt-get.cc:880 +msgid " ?] " +msgstr " ?] " + +#: cmdline/apt-get.cc:881 +msgid "Yes, I understand this may be bad" +msgstr "Sim, eu sei que isso pode ser ruim" + +#: cmdline/apt-get.cc:883 cmdline/apt-get.cc:902 +msgid "Aborted." +msgstr "Abortado." + +#: cmdline/apt-get.cc:898 +msgid "Do you want to continue? [Y/n] " +msgstr "Você quer continuar? [S/n] " + +#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1237 cmdline/apt-get.cc:1829 +msgid "Failed to fetch " +msgstr "Falhou ao obter " + +#: cmdline/apt-get.cc:979 +msgid "Some files failed to download" +msgstr "Houve falha ao baixar alguns arquivos" + +#: cmdline/apt-get.cc:985 +msgid "Unable to fetch some archives, maybe try with --fix-missing?" +msgstr "Impossível obter alguns arquivos, tentar talvez com --fix-missing?" + +#: cmdline/apt-get.cc:989 +msgid "--fix-missing and media swapping is not currently supported" +msgstr "--fix-missing e troca de meio não são atualmente suportados" + +#: cmdline/apt-get.cc:994 +msgid "Unable to correct missing packages." +msgstr "Impossível corrigir pacotes perdidos." + +#: cmdline/apt-get.cc:995 +msgid "Aborting Install." +msgstr "Cancelando a instalação." + +#: cmdline/apt-get.cc:1014 +msgid "Run apt-get clean to remove downloaded packages." +msgstr "Execute apt-get clean para remover os pacotes baixados." + +#: cmdline/apt-get.cc:1031 +msgid "Note, selecting " +msgstr "Nota, selecionando " + +#: cmdline/apt-get.cc:1031 +msgid " instead of " +msgstr " em vez de " + +#: cmdline/apt-get.cc:1040 +msgid "Skipping " +msgstr "Omitindo " + +#: cmdline/apt-get.cc:1040 +msgid ", it is already installed and no-upgrade is set." +msgstr ", já está instalado e a opção no-upgrade está habilitada." + +#: cmdline/apt-get.cc:1050 +#, c-format +msgid "Package %s is not installed" +msgstr "O pacote %s não está instalado" + +#: cmdline/apt-get.cc:1060 +msgid " is a virtual package provided by:" +msgstr " é um pacote virtual fornecido por:" + +#: cmdline/apt-get.cc:1071 +msgid " [Installed]" +msgstr " [Instalado]" + +#: cmdline/apt-get.cc:1076 +msgid "You should explicitly select one to install." +msgstr "Você deve selecionar de forma explícita um para ser instalado." + +#: cmdline/apt-get.cc:1080 +msgid " has no available version, but exists in the database." +msgstr " não tem versão disponível, mas existe no banco de dados." + +#: cmdline/apt-get.cc:1081 +msgid "" +"This typically means that the package was mentioned in a dependency and " +msgstr "Isto normalmente significa que o pacote foi mencionado em uma dependência e " + +#: cmdline/apt-get.cc:1082 +msgid "" +"never uploaded, has been obsoleted or is not available with the contents " +msgstr "" +"nunca foi feito upload, se tornou obsoleto ou não está disponível com os " +"conteúdos " + +#: cmdline/apt-get.cc:1083 +msgid "of sources.list" +msgstr "de sources.list" + +#: cmdline/apt-get.cc:1094 +msgid "However the following packages replace it:" +msgstr "No entanto, os pacotes a seguir o substituem:" + +#: cmdline/apt-get.cc:1097 +#, c-format +msgid "Package %s has no installation candidate" +msgstr "O pacote %s não tem candidato a instalação" + +#: cmdline/apt-get.cc:1117 +msgid "Sorry, re-installation of " +msgstr "Sinto, a reinstalação de " + +#: cmdline/apt-get.cc:1117 +msgid " is not possible, it cannot be downloaded" +msgstr " não é possível, este não pode ser baixado" + +#: cmdline/apt-get.cc:1124 +msgid "Sorry, " +msgstr "Sinto, " + +#: cmdline/apt-get.cc:1124 +msgid " is already the newest version" +msgstr " já está na versão mais nova" + +#: cmdline/apt-get.cc:1153 +msgid "Unable to lock the list directory" +msgstr "Impossível bloquear o diretório list" + +#: cmdline/apt-get.cc:1178 +msgid "Could not retrieve digitally signed hash file" +msgstr "Não foi possível recuperar arquivo hash assinado digitalmente" + +#: cmdline/apt-get.cc:1190 +msgid "Failed to fetch hash file: " +msgstr "Falhou ao obter arquivo hash: " + +#: cmdline/apt-get.cc:1198 +msgid "" +"Some of the signed hash files could not be retrieved. Aborting operation." +msgstr "" +"Alguns dos arquivos hash assinados não puderam ser recuperados. Cancelando a " +"operação." + +#: cmdline/apt-get.cc:1251 +msgid "Some of the index files had mismatching MD5 sums!" +msgstr "Alguns do arquivos de índice tinham somas MD5 incompatíveis!" + +#: cmdline/apt-get.cc:1259 +msgid "" +"Some index files failed to download, they have been ignored, or old ones " +"used instead." +msgstr "" +"Houve falha de download de alguns arquivos de índice, eles são ignorados ou " +"os antigos serão usados." + +#: cmdline/apt-get.cc:1264 +msgid " will not be authenticated." +msgstr " não será autenticado." + +#: cmdline/apt-get.cc:1285 +msgid "Internal Error, AllUpgrade broke stuff" +msgstr "Erro interno no AllUpgrade" + +#: cmdline/apt-get.cc:1354 cmdline/apt-get.cc:1387 +msgid "Couldn't find package %s" +msgstr "Não foi possível encontrar o pacote %s" + +#: cmdline/apt-get.cc:1367 +msgid "Regex compilation error:" +msgstr "Erro de compilação de Regex:" + +#: cmdline/apt-get.cc:1401 +msgid "You might want to run `apt-get -f install' to correct these:" +msgstr "Você pode querer executar `apt-get -f install' para corrigir estas:" + +#: cmdline/apt-get.cc:1404 +msgid "" +"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " +"solution)." +msgstr "" +"dependências não resolvidas. Tente 'apt-get -f install' sem pacotes (ou " +"especifique uma solução)." + +#: cmdline/apt-get.cc:1415 +msgid "Some packages could not be installed. This may mean that you have" +msgstr "" +"Alguns pacotes podem não ter sido instalados. Isto pode significar que você" + +#: cmdline/apt-get.cc:1416 +msgid "requested an impossible situation or if you are using the unstable" +msgstr "solicitou uma situação impossível ou você está usando a distribuição" + +#: cmdline/apt-get.cc:1417 +msgid "distribution that some required packages have not yet been created" +msgstr "instável onde alguns pacotes necessários ainda não foram criados" + +#: cmdline/apt-get.cc:1418 +msgid "or been moved out of Incoming." +msgstr "ou foram movidos de Entrada." + +#: cmdline/apt-get.cc:1422 +msgid "Since you only requested a single operation it is extremely likely that" +msgstr "" +"Uma vez que você solicitou apenas uma operação simples é extremamente " +"provável que" + +#: cmdline/apt-get.cc:1423 +msgid "the package is simply not installable and a bug report against" +msgstr "o pacote simplesmente não esteja instalado e um relatório de bug" + +#: cmdline/apt-get.cc:1424 +msgid "that package should be filed." +msgstr "deste pacote deve ser preenchido." + +#: cmdline/apt-get.cc:1427 +msgid "The following information may help to resolve the situation:" +msgstr "A informação a seguir pode ajudar a solucionar a situação:" + +#: cmdline/apt-get.cc:1430 +msgid "Sorry, broken packages" +msgstr "Sinto, pacotes corrompidos" + +#: cmdline/apt-get.cc:1453 +msgid "The following extra packages will be installed:" +msgstr "Os seguintes pacotes extras serão instalados:" + +#: cmdline/apt-get.cc:1472 +msgid "Calculating Upgrade... " +msgstr "Calculando atualização... " + +#: cmdline/apt-get.cc:1475 +msgid "Failed" +msgstr "Falhou" + +#: apt-pkg/contrib/progress.cc:136 cmdline/apt-get.cc:1480 +msgid "Done" +msgstr "Pronto" + +#: cmdline/apt-get.cc:1545 cmdline/apt-get.cc:1553 +msgid "Internal Error, problem resolver broke stuff" +msgstr "Erro interno no solucionador de problemas" + +#: cmdline/apt-get.cc:1655 +msgid "Must specify at least one package to fetch source for" +msgstr "Deve-se especificar pelo menos um pacote para buscar fonte para" + +#: cmdline/apt-get.cc:1729 +msgid "Unable to find a source package for %s" +msgstr "Impossível encontrar um pacote-fonte para %s" + +#: cmdline/apt-get.cc:1789 +msgid "Sorry, you don't have enough free space in %s" +msgstr "Sinto, você não tem espaço livre suficiente em %s" + +#: cmdline/apt-get.cc:1798 +msgid " of source archives." +msgstr " de arquivos-fonte." + +#: cmdline/apt-get.cc:1803 +msgid "Fetch Source " +msgstr "Obter fonte" + +#: cmdline/apt-get.cc:1834 +msgid "Failed to fetch some archives." +msgstr "Falhou ao obter alguns arquivos." + +#: cmdline/apt-get.cc:1854 cmdline/apt-get.cc:1900 +msgid "Build command '" +msgstr "Construir comando '" + +#: cmdline/apt-get.cc:1854 cmdline/apt-get.cc:1883 cmdline/apt-get.cc:1900 +msgid "' failed." +msgstr "' falhou." + +#: cmdline/apt-get.cc:1872 +msgid "Skipping unpack of already unpacked source in " +msgstr "Omitindo o desempacotamento de fonte já desempacotado em " + +#: cmdline/apt-get.cc:1883 +msgid "Unpack command '" +msgstr "O comando de desempacotamento '" + +#: apt-pkg/rpm/rpmpm.cc:401 cmdline/apt-get.cc:1916 +msgid "Couldn't wait for subprocess" +msgstr "Não foi possível esperar por subprocesso" + +#: cmdline/apt-get.cc:1920 +msgid "Child process failed" +msgstr "Processo-filho falhou" + +#: cmdline/apt-get.cc:1936 +msgid "Usage: apt-get [options] command" +msgstr "Uso: apt-get [opções] comando" + +#: cmdline/apt-get.cc:1937 +msgid " apt-get [options] install pkg1 [pkg2 ...]" +msgstr " apt-get [opções] install pac1 [pac2 ...]" + +#: cmdline/apt-get.cc:1939 +msgid "apt-get is a simple command line interface for downloading and" +msgstr "apt-get é uma interface de linha de comando simples para download e" + +#: cmdline/apt-get.cc:1940 +msgid "installing packages. The most frequently used commands are update" +msgstr "" +"instalação de pacotes. Os comandos usados com mais freqüência são update" + +#: cmdline/apt-get.cc:1941 +msgid "and install." +msgstr "e install." + +#: cmdline/apt-get.cc:1944 +msgid " update - Retrieve new lists of packages" +msgstr " update - Recupera listas novas de pacotes" + +#: cmdline/apt-get.cc:1945 +msgid " upgrade - Perform an upgrade" +msgstr " upgrade - Executa um upgrade" + +#: cmdline/apt-get.cc:1946 +msgid " install - Install new packages" +msgstr " install - Instala novos pacotes" + +#: cmdline/apt-get.cc:1947 +msgid " remove - Remove packages" +msgstr " remove - Remove pacotes" + +#: cmdline/apt-get.cc:1948 +msgid " source - Download source archives" +msgstr " source - Baixa arquivos-fonte" + +#: cmdline/apt-get.cc:1949 +msgid " dist-upgrade - Distribution upgrade, see apt-get(8)" +msgstr " dist-upgrade - Upgrade de distribuição, ver apt-get(8)" + +#. cout << " dselect-upgrade - Follow dselect selections" << endl; +#: cmdline/apt-get.cc:1951 +msgid " clean - Erase downloaded archive files" +msgstr " clean - Apaga arquivos baixados" + +#: cmdline/apt-get.cc:1952 +msgid " autoclean - Erase old downloaded archive files" +msgstr " autoclean - Apaga arquivos antigos baixados" + +#: cmdline/apt-get.cc:1953 +msgid " check - Verify that there are no broken dependencies" +msgstr " check - Verifica se não há dependências" + +#: cmdline/apt-get.cc:1956 +msgid " -h This help text." +msgstr " -h Este texto de ajuda." + +#: cmdline/apt-get.cc:1957 +msgid " -q Loggable output - no progress indicator" +msgstr " -q Saída acessível - nenhum indicador de progresso" + +#: cmdline/apt-get.cc:1958 +msgid " -qq No output except for errors" +msgstr " -qq Sem mensagens, exceto para erros" + +#: cmdline/apt-get.cc:1959 +msgid " -S Show summary for upgrade operation and quit" +msgstr " -S Exibe resumo para operação de upgrade e sai" + +#: cmdline/apt-get.cc:1960 +msgid " -d Download only - do NOT install or unpack archives" +msgstr " -d Apenas download - NÃO instala ou desempacota arquivos" + +#: cmdline/apt-get.cc:1961 +msgid " -s No-act. Perform ordering simulation" +msgstr " -s Nenhuma ação. Executa simulação de ordenação" + +#: cmdline/apt-get.cc:1962 +msgid " -y Assume Yes to all queries and do not prompt" +msgstr " -y Assume Sim para todas as consultas e não exibe" + +#: cmdline/apt-get.cc:1963 +msgid " -f Attempt to continue if the integrity check fails" +msgstr " -f Tenta continuar se falhar a verificação de integridade" + +#: cmdline/apt-get.cc:1964 +msgid " -m Attempt to continue if archives are unlocatable" +msgstr " -m Tenta continuar se arquivos não puderem ser localizados" + +#: cmdline/apt-get.cc:1965 +msgid " -u Show a list of upgraded packages as well" +msgstr " -u Exibe uma lista de pacotes atualizados" + +#: cmdline/apt-get.cc:1966 +msgid " -b Build the source package after fetching it" +msgstr " -b Constrói o pacote-fonte após buscá-lo" + +#: cmdline/apt-get.cc:1967 +msgid " -K Verify signatures in individual packages and quit" +msgstr " -K Verifica a assinatura de cada pacote e sai" + +#: cmdline/apt-get.cc:1970 +msgid "See the apt-get(8), sources.list(5) and apt.conf(5) manual" +msgstr "Consulte as manpages de apt-get(8), sources.list(5) e apt.conf(5)" + +#: cmdline/apt-get.cc:1971 +msgid "pages for more information and options." +msgstr "para maiores informações e opções." + #: apt-pkg/acquire-item.cc:142 #, c-format msgid "Size of %s did not match what's in the hashfile and was redownloaded." -msgstr "Tamanho de %s não corresponde ao que está no arquivo hash e ao que foi recarregado." +msgstr "" +"Tamanho de %s não corresponde ao que está no arquivo hash e ao que foi " +"recarregado." #: apt-pkg/acquire-item.cc:154 #, c-format msgid "MD5 of %s did not match what's int the hashfile and was redownloaded." -msgstr "MD5 de %s não corresponde ao que está no arquivo hash e ao que foi recarregado." +msgstr "" +"MD5 de %s não corresponde ao que está no arquivo hash e ao que foi " +"recarregado." -#: apt-pkg/acquire-item.cc:426 +#: apt-pkg/acquire-item.cc:428 msgid "Hashfile signer is not who it's supposed to be (expected " msgstr "O assinante de arquivo hash não é quem se supunha ser (esperava-se " -#: apt-pkg/acquire-item.cc:428 +#: apt-pkg/acquire-item.cc:430 msgid ", got " msgstr ", obteve " @@ -1236,7 +1257,7 @@ msgstr ", obteve " msgid "The method driver %s could not be found." msgstr "O mecanismo de busca %s não pôde ser encontrado." -#: apt-pkg/acquire-worker.cc:117 +#: apt-pkg/acquire-worker.cc:117 apt-pkg/rpm/rpmpm.cc:173 msgid "Failed to create IPC pipe to subprocess" msgstr "Falha ao criar pipe IPC para subprocesso" @@ -1262,7 +1283,8 @@ msgstr "O m #: apt-pkg/acquire-worker.cc:268 #, c-format msgid "Bizzar Error - File size is not what the server reported %s %u" -msgstr "Erro estranho - O tamanho do arquivo não é o que o servidor reportou %s %u" +msgstr "" +"Erro estranho - O tamanho do arquivo não é o que o servidor reportou %s %u" #: apt-pkg/acquire-worker.cc:297 msgid "Method gave invalid 400 URI Failure message" @@ -1288,17 +1310,16 @@ msgstr "Diret msgid "Archive directory %spartial is missing." msgstr "O diretório de arquivos %spartial está faltando." -#: apt-pkg/acquire.cc:557 -msgid "Tried to dequeue a fetching object" -msgstr "Tentou tirar da fila um objeto em obtenção" - -#: apt-pkg/cachefile.cc:83 +#: apt-pkg/cachefile.cc:94 msgid "The package lists or status file could not be parsed or opened." -msgstr "A lista de pacotes ou arquivo de estado não pôde ser analisada ou aberta." +msgstr "" +"A lista de pacotes ou arquivo de estado não pôde ser analisada ou aberta." -#: apt-pkg/cachefile.cc:85 +#: apt-pkg/cachefile.cc:96 msgid "You may want to run apt-get update to correct these missing files" -msgstr "Você pode querer executar `apt-get update' para corrigir estes arquivos faltantes." +msgstr "" +"Você pode querer executar `apt-get update' para corrigir estes arquivos " +"faltantes." #: apt-pkg/clean.cc:44 msgid "Unable to change to " @@ -1309,25 +1330,29 @@ msgstr "Imposs msgid "Unable to stat %s." msgstr "Impossível ler %s." -#: apt-pkg/depcache.cc:61 apt-pkg/depcache.cc:90 +#: apt-pkg/depcache.cc:62 apt-pkg/depcache.cc:91 msgid "Building Dependency Tree" msgstr "Construindo árvore de dependências" -#: apt-pkg/depcache.cc:62 +#: apt-pkg/depcache.cc:63 msgid "Candidate Versions" msgstr "Versões sugeridas" -#: apt-pkg/depcache.cc:91 +#: apt-pkg/depcache.cc:92 msgid "Dependency Generation" msgstr "Geração de dependência" -#: apt-pkg/packagemanager.cc:397 +#: apt-pkg/packagemanager.cc:401 #, c-format msgid "" "This installation run will require temporarily removing the essential " "package %s due to a Conflicts/Pre-Depends loop. This is often bad, but if " "you really want to do it, activate the APT::Force-LoopBreak option." -msgstr "Esta instalação irá requerer temporariamente a remoção do pacote essencial %s devido a um loop de Conflitos/Pré-Dependências. Fazer isto normalmente não é uma boa idéia, caso queira realmente ir em frente, ative a opção APT::Force-LoopBreak." +msgstr "" +"Esta instalação irá requerer temporariamente a remoção do pacote essencial %" +"s devido a um loop de Conflitos/Pré-Dependências. Fazer isto normalmente não " +"é uma boa idéia, caso queira realmente ir em frente, ative a opção APT::" +"Force-LoopBreak." #: apt-pkg/pkgcache.cc:125 msgid "The package cache file is corrupted" @@ -1347,12 +1372,12 @@ msgstr "Ocorreu um erro durante o processamento de %s (NewPackage)" msgid "Error occured while processing %s (UsePackage1)" msgstr "Ocorreu um erro durante o processamento de %s (UsePackage1)" -#: apt-pkg/pkgcachegen.cc:124 +#: apt-pkg/pkgcachegen.cc:125 #, c-format msgid "Error occured while processing %s (UsePackage2)" msgstr "Ocorreu um erro durante o processamento de %s (UsePackage2)" -#: apt-pkg/pkgcachegen.cc:127 +#: apt-pkg/pkgcachegen.cc:128 #, c-format msgid "Error occured while processing %s (NewFileVer1)" msgstr "Ocorreu um erro durante o processamento de %s (NewFileVer1)" @@ -1367,91 +1392,249 @@ msgstr "' tem 2 pacotes com a mesma vers #: apt-pkg/pkgcachegen.cc:139 msgid "That usually means a packaging bug." -msgstr "Que geralmente significa um bug do pacote." +msgstr "Isso geralmente significa um bug de empacotamento." -#: apt-pkg/pkgcachegen.cc:158 +#: apt-pkg/pkgcachegen.cc:173 #, c-format msgid "Error occured while processing %s (NewVersion1)" msgstr "Ocorreu um erro durante o processamento de %s (NewVersion1)" -#: apt-pkg/pkgcachegen.cc:161 +#: apt-pkg/pkgcachegen.cc:176 #, c-format msgid "Error occured while processing %s (UsePackage3)" msgstr "Ocorreu um erro durante o processamento de %s (UsePackage3)" -#: apt-pkg/pkgcachegen.cc:164 +#: apt-pkg/pkgcachegen.cc:179 #, c-format msgid "Error occured while processing %s (NewVersion2)" msgstr "Ocorreu um erro durante o processamento de %s (NewVersion2)" -#: apt-pkg/sourcelist.cc:76 +#: apt-pkg/contrib/progress.cc:134 +msgid "Error!" +msgstr "Erro!" + +#. Mostly from MakeStatusCache.. +#: apt-pkg/rpm/rpmfactory.cc:190 apt-pkg/systemfactory.cc:183 +#: apt-pkg/systemfactory.cc:239 apt-pkg/systemfactory.cc:271 +#: apt-pkg/systemfactory.cc:272 apt-pkg/systemfactory.cc:279 +#: apt-pkg/systemfactory.cc:349 apt-pkg/systemfactory.cc:385 +msgid "Reading Package Lists" +msgstr "Lendo listas de pacotes" + +#: apt-pkg/rpm/rpmfactory.cc:195 +msgid "Local Package State - " +msgstr "Estado do pacote localmente - " + +#: apt-pkg/rpm/rpmfactory.cc:197 apt-pkg/systemfactory.cc:195 #, c-format +msgid "Problem with SelectFile %s" +msgstr "Problema em SelecFile %s" + +#: apt-pkg/rpm/rpmfactory.cc:200 apt-pkg/systemfactory.cc:200 +#, c-format +msgid "Problem with MergeList %s" +msgstr "Problema em MergeList %s" + +#: apt-pkg/rpm/rpmfactory.cc:273 +msgid "Processing File Dependencies" +msgstr "Processando as dependências de arquivo..." + +#: apt-pkg/rpm/rpmfactory.cc:274 +msgid "Looking for file dependencies" +msgstr "Procurando por dependências de arquivo" + +#: apt-pkg/rpm/rpminit.cc:92 +msgid "could not open RPM database:%s" +msgstr "não foi possível abrir o banco de dados RPM: %s" + +#: apt-pkg/rpm/rpminit.cc:94 +msgid "You need to run it as the root user." +msgstr "Você só pode executar isso como usuário root." + +#: apt-pkg/rpm/rpminit.cc:102 +#, c-format +msgid "could not create RPM database iterator:%s" +msgstr "não foi possível criar o iterator do banco de dados RPMS: %s" + +#: apt-pkg/rpm/rpmlistparser.cc:94 +#, c-format +msgid "Bad regular expression '%s' in option RPM::AllowedDupPkgs." +msgstr "Expressão regular inválida '%s' na opção RPM::AllowedDupPkgs." + +#: apt-pkg/rpm/rpmlistparser.cc:104 +msgid "" +"Option RPM::AllowedDupPackages was replaced with RPM::AllowedDupPkgs, which " +"is a list of regular expressions (apt-config dump for an example). Please " +"update." +msgstr "" +"A Opção RPM::AllowedDupPackages foi substituída pela RPM::AllowedDupPkgs, que " +"é uma lista de expressões regulares (apt-config dump por exemplo). Por favor " +"atualize." + +#: apt-pkg/rpm/rpmlistparser.cc:121 +#, c-format +msgid "Bad regular expression '%s' in option RPM::HoldPackages." +msgstr "Expressão regular inválida '%s' na opção RPM::HoldPackages." + +#: apt-pkg/rpm/rpmlistparser.cc:153 +msgid "oh shit, not handled for " +msgstr "oh não, não tratado para " + +#: apt-pkg/rpm/rpmlistparser.cc:153 +msgid " Tag:" +msgstr " Tag: " + +#: apt-pkg/rpm/rpmlistparser.cc:173 +msgid "Corrupt pkglist: no RPMTAG_NAME in header entry" +msgstr "pkglist corrompido: não existe a entrada RPMTAG_NAME no cabeçalho" + +#: apt-pkg/rpm/rpmlistparser.cc:213 +msgid "" +"There are two or more versions of the package '%s' installed in your system, " +"which is a situation APT can't handle cleanly at the moment.\n" +"Please do one of the following:\n" +"1) Remove the older packages, leaving only one version installed; or\n" +"2) If you do want to have multiple versions of that package, add the package " +"names to the RPM::AllowedDupPkgs option.\n" +msgstr "" +"Existe instalado em seu sistema, duas ou mais versões do pacote '%s', " +"que é uma situação na qual o APT não consegue lidar no momento.\n" +"Por favor, escolha uma das alternativas abaixo:\n" +"1) Remover os pacotes antigos, deixando apenas o mais novo instalado. \n" +"2) Se você deseja ter múltiplas versões do mesmo pacote, acrescente os nomes " +"dos pacotes na opção RPM::AllowedDupPkgs.\n" + + +#: apt-pkg/rpm/rpmlistparser.cc:493 +msgid "Encountered status field in a non-version description" +msgstr "Encontrado o campo status dentro de uma descrição não versionada" + +#: apt-pkg/rpm/rpmpackagedata.cc:20 +msgid "could not open package priority file %s" +msgstr "não foi possível abrir o arquivo do pacote de prioridades %s" + +#: apt-pkg/rpm/rpmpackagedata.cc:28 +msgid "no data in %s" +msgstr "sem dados em %s" + +#: apt-pkg/rpm/rpmpm.cc:55 +msgid "Internal Error, No file name for %s" +msgstr "Erro interno. Sem nome para o arquivo %s" + +#: apt-pkg/rpm/rpmpm.cc:127 +msgid "Couldn't wait() for subprocess" +msgstr "Não foi possível esperar por subprocesso" + +#: apt-pkg/rpm/rpmpm.cc:142 +msgid "Problem executing scripts %s '%s'" +msgstr "Problemas na execução dos scripts %s '%s'" + +#: apt-pkg/rpm/rpmpm.cc:145 +msgid "Sub-process returned an error code" +msgstr "Subprocesso retornou um código de erro" + +#: apt-pkg/rpm/rpmpm.cc:217 apt-pkg/rpm/rpmpm.cc:224 +msgid "Failure running script %s" +msgstr "Falha ao executar o script %s" + +#: apt-pkg/rpm/rpmpm.cc:351 +msgid "Executing RPM (" +msgstr "Executando RPM(" + +#: apt-pkg/rpm/rpmpm.cc:391 +msgid "Could not exec() " +msgstr "exec() falhou" + +#: apt-pkg/rpm/rpmpm.cc:412 +msgid "Sub-process %s terminated by signal (%i)" +msgstr "Subprocesso %s terminado pelo sinal (%i)" + +#: apt-pkg/rpm/rpmpm.cc:415 +msgid "Sub-process %s returned an error code (%u)" +msgstr "Subprocesso %s retornou um código de erro (%u)" + +#: apt-pkg/rpm/rpmpm.cc:418 +msgid "Sub-process %s exited unexpectedly" +msgstr "O subprocesso %s terminou inesperadamente!" + +#: apt-pkg/rpm/rpmpm.cc:536 +msgid "Rebuilding RPM database (this may take a few minutes)..." +msgstr "Reconstruindo o banco de dados RPM (isto pode levar alguns minutos)..." + +#: apt-pkg/rpm/rpmpm.cc:540 +msgid "could not rebuild RPM database for upgrade of RPM" +msgstr "não foi possível reconstruir o banco de dados RPM para atualizar o RPM" + +#: apt-pkg/rpm/rpmsrcrecords.cc:74 apt-pkg/rpm/rpmsrcrecords.cc:80 +#: apt-pkg/rpm/rpmsrcrecords.cc:86 +msgid "error parsing file record" +msgstr "erro ao analisar o arquivo de gravação" + +#: apt-pkg/sourcelist.cc:77 msgid "Block %s is invalid" msgstr "O bloco %s é inválido" -#: apt-pkg/sourcelist.cc:121 -#, c-format +#: apt-pkg/sourcelist.cc:122 msgid "Malformed line %u in source list %s (type)" -msgstr "Linha mal formada %u na lista de fontes %s (type)" +msgstr "Linha inválida %u na lista de fontes %s (type)" -#: apt-pkg/sourcelist.cc:123 apt-pkg/sourcelist.cc:135 -#, c-format +#: apt-pkg/sourcelist.cc:124 apt-pkg/sourcelist.cc:136 msgid "Malformed line %u in source list %s (URI)" -msgstr "Linha mal formada %u na lista de fontes %s (URI)" +msgstr "Linha inválida %u na lista de fontes %s (URI)" -#: apt-pkg/sourcelist.cc:130 -#, c-format +#: apt-pkg/sourcelist.cc:131 msgid "Malformed line %u in source list %s (vendor ID)" -msgstr "Linha mal formada %u na lista de fontes %s (vendor ID)" +msgstr "Linha inválida %u na lista de fontes %s (vendor ID)" -#: apt-pkg/sourcelist.cc:141 -#, c-format +#: apt-pkg/sourcelist.cc:142 msgid "Malformed line %u in source list %s (dist)" -msgstr "Linha mal formada %u na lista de fontes %s (dist)" +msgstr "Linha inválida %u na lista de fontes %s (dist)" -#: apt-pkg/sourcelist.cc:145 +#: apt-pkg/sourcelist.cc:146 #, c-format msgid "Malformed line %u in source list %s (bad vendor ID)" -msgstr "Linha mal formada %u na lista de fontes %s (bad vendor ID)" +msgstr "Linha inválida %u na lista de fontes %s (bad vendor ID)" -#: apt-pkg/sourcelist.cc:148 +#: apt-pkg/sourcelist.cc:149 #, c-format msgid "Malformed line %u in source list %s (bad type)" -msgstr "Linha mal formada %u na lista de fontes %s (bad type)" +msgstr "Linha inválida %u na lista de fontes %s (bad type)" -#: apt-pkg/sourcelist.cc:151 +#: apt-pkg/sourcelist.cc:152 #, c-format msgid "Malformed line %u in source list %s (bad URI)" -msgstr "Linha mal formada %u na lista de fontes %s (bad URI)" +msgstr "Linha inválida %u na lista de fontes %s (bad URI)" -#: apt-pkg/sourcelist.cc:161 +#: apt-pkg/sourcelist.cc:162 #, c-format msgid "Malformed line %u in source list %s (Absolute dist)" -msgstr "Linha mal formada %u na lista de fontes %s (Absolute dist)" +msgstr "Linha inválida %u na lista de fontes %s (Absolute dist)" -#: apt-pkg/sourcelist.cc:174 +#: apt-pkg/sourcelist.cc:175 #, c-format msgid "Malformed line %u in source list %s (dist parse)" -msgstr "Linha mal formada %u na lista de fontes %s (dist parse)" +msgstr "Linha inválida %u na lista de fontes %s (dist parse)" -#: apt-pkg/sourcelist.cc:353 +#: apt-pkg/sourcelist.cc:409 msgid "could not open hash index" -msgstr "não foi possível abrir o índice de hash" +msgstr "não foi possível abrir o índice hash" -#: apt-pkg/sourcelist.cc:363 +#: apt-pkg/sourcelist.cc:419 msgid "No MD5SUM data in hashfile" msgstr "Nenhum dado MD5SUM no arquivo hash" -#: apt-pkg/sourcelist.cc:377 +#: apt-pkg/sourcelist.cc:433 msgid "Error parsing MD5 hash record" msgstr "Erro ao analisar gravação de hash MD5" -#: apt-pkg/sourcelist.cc:400 +#: apt-pkg/sourcelist.cc:457 #, c-format msgid "" "Repository entry in sources.list contains extra components that are not " "listed in the signed hash file: %s" -msgstr "A entrada de repositório em sources.list contém componentes extra que não estão listados no arquivo hash assinado: %s" +msgstr "" +"A entrada de repositório em sources.list contém componentes extra que não " +"estão listados no arquivo hash assinado: %s" #: apt-pkg/srcrecords.cc:47 msgid "Sorry, you must put some 'source' uris in your sources.list" @@ -1467,25 +1650,7 @@ msgstr "Falhou ao renomear %s para %s" msgid "Couldn't stat source package list '%s' (%s)" msgstr "Não foi possível ler lista de pacotes de fonte '%s' (%s)" -#. Mostly from MakeStatusCache.. -#: apt-pkg/systemfactory.cc:184 apt-pkg/systemfactory.cc:240 -#: apt-pkg/systemfactory.cc:272 apt-pkg/systemfactory.cc:273 -#: apt-pkg/systemfactory.cc:280 apt-pkg/systemfactory.cc:350 -#: apt-pkg/systemfactory.cc:386 -msgid "Reading Package Lists" -msgstr "Lendo listas de pacotes" - -#: apt-pkg/systemfactory.cc:196 -#, c-format -msgid "Problem with SelectFile %s" -msgstr "Problema em SelecFile %s" - -#: apt-pkg/systemfactory.cc:201 -#, c-format -msgid "Problem with MergeList %s" -msgstr "Problema em MergeList %s" - -#: apt-pkg/systemfactory.cc:263 +#: apt-pkg/systemfactory.cc:262 msgid "IO Error saving source cache" msgstr "Erro E/S salvando cache fonte" @@ -1498,3 +1663,6 @@ msgstr "Imposs #, c-format msgid "Unable to parse package file %s (2)" msgstr "Impossível analisar o arquivo de pacote %s (2)" + +#~ msgid "Tried to dequeue a fetching object" +#~ msgstr "Tentou tirar da fila um objeto em obtenção" diff --git a/apt/po/stamp-cat-id b/apt/po/stamp-cat-id deleted file mode 100644 index 9788f70..0000000 --- a/apt/po/stamp-cat-id +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/apt/python/Makefile b/apt/python/Makefile new file mode 100644 index 0000000..7431e94 --- /dev/null +++ b/apt/python/Makefile @@ -0,0 +1,27 @@ + +MODULES = apt.py + +CC = gcc +SWIG = swig +#SWIGFLAGS = -w312 -w315 -w508 -w509 +SWIGFLAGS = -w312 -w315 -w508 +#SWIG = /var/tmp/swig/BUILD/SWIG-1.3.16/swig + +PYTHONVER = $(shell python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v" 2>/dev/null || echo NONE) +PYTHONFLAGS=-I/usr/include/python$(PYTHONVER) + +all: $(MODULES) + +$(MODULES): %.py: _%.so + +_%.so: %_wrap.cxx + $(CC) -shared -I.. $(PYTHONFLAGS) -lapt-pkg -o $@ $< + +apt_wrap.cxx: apt.i + $(SWIG) $(SWIGFLAGS) -c++ -I.. -python $< + +clean: + rm -f *.cxx + +distclean: clean + rm -f $(MODULES) *.pyc _*.so diff --git a/apt/python/apt.i b/apt/python/apt.i new file mode 100644 index 0000000..60554b8 --- /dev/null +++ b/apt/python/apt.i @@ -0,0 +1,169 @@ +%module apt +%include std_string.i +%include std_vector.i + +%{ +#include <apt-pkg/init.h> +#include <apt-pkg/pkgcache.h> +#include <apt-pkg/depcache.h> +#include <apt-pkg/cachefile.h> +#include <apt-pkg/mmap.h> +#include <apt-pkg/cacheiterators.h> +#include <apt-pkg/algorithms.h> +#include <apt-pkg/pkgsystem.h> +#include <apt-pkg/contrib/configuration.h> +#include <apt-pkg/contrib/progress.h> +#include <apt-pkg/version.h> +#include <apt-pkg/pkgrecords.h> +#include <apt-pkg/acquire-item.h> +#include <apt-pkg/acquire.h> +#include <apt-pkg/packagemanager.h> +#include <apt-pkg/sourcelist.h> +#include <apt-pkg/contrib/error.h> + +#include <string> +#include <time.h> +%} + +%inline %{ +typedef pkgCache::VerIterator VerIterator; +typedef pkgCache::PkgIterator PkgIterator; +typedef pkgCache::DepIterator DepIterator; +typedef pkgCache::PrvIterator PrvIterator; +typedef pkgCache::PkgFileIterator PkgFileIterator; +typedef pkgCache::VerFileIterator VerFileIterator; +typedef pkgCache::Header Header; +typedef pkgCache::Package Package; +typedef pkgCache::PackageFile PackageFile; +typedef pkgCache::VerFile VerFile; +typedef pkgCache::Version Version; +typedef pkgCache::Dependency Dependency; +typedef pkgCache::Provides Provides; +typedef pkgCache::StringItem StringItem; +typedef pkgCache::Dep Dep; +typedef pkgCache::State State; +typedef pkgCache::Flag Flag; +typedef pkgDepCache::Policy Policy; +typedef pkgDepCache::StateCache StateCache; +typedef Configuration::Item Item; +typedef pkgRecords::Parser Parser; +%} + +/* Fix some operators. */ +%rename(next) operator++; +%rename(assign) operator=; +%rename(pkgCache) operator pkgCache *; +%rename(pkgDepCache) operator pkgDepCache *; +%rename(__getitem__) operator[]; +%ignore operator pkgCache &; +%ignore operator pkgDepCache &; + +/* Set some data as immutable. */ +%immutable pkgVersion; +%immutable pkgLibVersion; +%immutable pkgOS; +%immutable pkgCPU; +%immutable pkgSystem::Label; +%immutable pkgVersioningSystem::Label; +%immutable pkgDepCache::StateCache::CandVersion; +%immutable pkgDepCache::StateCache::CurVersion; + +/* One-shot initialization function. */ +%inline %{ +inline bool pkgInit() +{ + return pkgInitConfig(*_config) && pkgInitSystem(*_config,_system); +} +%} + +/* No suport for nested classes yet. */ +%rename(pkgCacheHeader) pkgCache::Header; +%rename(pkgCachePackage) pkgCache::Package; +%rename(pkgCachePackageFile) pkgCache::PackageFile; +%rename(pkgCacheVerFile) pkgCache::VerFile; +%rename(pkgCacheVersion) pkgCache::Version; +%rename(pkgCacheDependency) pkgCache::Dependency; +%rename(pkgCacheProvides) pkgCache::Provides; +%rename(pkgCacheStringItem) pkgCache::StringItem; +%rename(pkgCacheDep) pkgCache::Dep; +%rename(pkgCacheState) pkgCache::State; +%rename(pkgCacheFlag) pkgCache::Flag; +%rename(pkgCacheVerIterator) pkgCache::VerIterator; +%rename(pkgCachePkgIterator) pkgCache::PkgIterator; +%rename(pkgCacheDepIterator) pkgCache::DepIterator; +%rename(pkgCachePrvIterator) pkgCache::PrvIterator; +%rename(pkgCachePkgFileIterator) pkgCache::PkgFileIterator; +%rename(pkgCacheVerFileIterator) pkgCache::VerFileIterator; +%rename(pkgDepCacheStateCache) pkgDepCache::StateCache; +%rename(pkgRecordsParser) pkgRecords::Parser; +%rename(pkgAcquireItem) pkgAcquire::Item; + +/* That's the best way I found to access ItemsBegin/ItemsEnd. */ +%extend pkgAcquire { +PyObject * +ItemsList() +{ + static swig_type_info *ItemDescr = NULL; + PyObject *list, *o; + pkgAcquire::ItemIterator I; + if (!ItemDescr) { + ItemDescr = SWIG_TypeQuery("pkgAcquire::Item *"); + assert(ItemDescr); + } + list = PyList_New(0); + if (list == NULL) + return NULL; + for (I = self->ItemsBegin(); I != self->ItemsEnd(); I++) { + o = SWIG_NewPointerObj((void *)(*I), ItemDescr, 0); + if (!o || PyList_Append(list, o) == -1) { + Py_XDECREF(o); + Py_DECREF(list); + return NULL; + } + Py_DECREF(o); + } + return list; +} +} + +/* That should be enough for our usage, but _error is indeed an alias + * for a function which returns an statically alocated GlobalError object. */ +%immutable _error; +GlobalError *_error; + +/* Undefined reference!? */ +%ignore pkgCache::PkgIterator::TargetVer; + +/* There's a struct and a function with the same name. */ +%ignore SubstVar; + +/* Preprocess string macros (note that we're %import'ing). */ +%import <apt-pkg/contrib/strutl.h> + +%include <apt-pkg/init.h> +%include <apt-pkg/pkgcache.h> +%include <apt-pkg/depcache.h> +%include <apt-pkg/cacheiterators.h> +%include <apt-pkg/cachefile.h> +%include <apt-pkg/algorithms.h> +%include <apt-pkg/pkgsystem.h> +%include <apt-pkg/contrib/configuration.h> +%include <apt-pkg/contrib/progress.h> +%include <apt-pkg/version.h> +%include <apt-pkg/pkgrecords.h> +%include <apt-pkg/acquire-item.h> +%include <apt-pkg/acquire.h> +%include <apt-pkg/packagemanager.h> +%include <apt-pkg/sourcelist.h> +%include <apt-pkg/contrib/error.h> + +/* Create a dumb status class which can be instantiated. pkgAcquireStatus + * has fully abstract methods. */ +%inline %{ +class pkgAcquireStatusDumb : public pkgAcquireStatus +{ + virtual bool MediaChange(string Media,string Drive) {}; +}; +%} + +// vim:ft=swig diff --git a/apt/python/apt.py b/apt/python/apt.py new file mode 100644 index 0000000..50ea0c3 --- /dev/null +++ b/apt/python/apt.py @@ -0,0 +1,1715 @@ +# This file was created automatically by SWIG. +# Don't modify this file, modify the SWIG interface instead. +# This file is compatible with both classic and new-style classes. +import _apt +def _swig_setattr(self,class_type,name,value): + if (name == "this"): + if isinstance(value, class_type): + self.__dict__[name] = value.this + if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown + del value.thisown + return + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) + self.__dict__[name] = value + +def _swig_getattr(self,class_type,name): + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError,name + +import types +try: + _object = types.ObjectType + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 + + +pkgInit = _apt.pkgInit + +APT_PKG_MAJOR = _apt.APT_PKG_MAJOR +APT_PKG_MINOR = _apt.APT_PKG_MINOR +APT_PKG_RELEASE = _apt.APT_PKG_RELEASE +pkgInitConfig = _apt.pkgInitConfig + +pkgInitSystem = _apt.pkgInitSystem + +class pkgCache(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCache, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCache, name) + DepDepends = _apt.pkgCache_DepDepends + DepPreDepends = _apt.pkgCache_DepPreDepends + DepSuggests = _apt.pkgCache_DepSuggests + DepRecommends = _apt.pkgCache_DepRecommends + DepConflicts = _apt.pkgCache_DepConflicts + DepReplaces = _apt.pkgCache_DepReplaces + DepObsoletes = _apt.pkgCache_DepObsoletes + DepOr = _apt.pkgCache_DepOr + DepNoOp = _apt.pkgCache_DepNoOp + DepLessEq = _apt.pkgCache_DepLessEq + DepGreaterEq = _apt.pkgCache_DepGreaterEq + DepLess = _apt.pkgCache_DepLess + DepGreater = _apt.pkgCache_DepGreater + DepEquals = _apt.pkgCache_DepEquals + DepNotEquals = _apt.pkgCache_DepNotEquals + StateImportant = _apt.pkgCache_StateImportant + StateRequired = _apt.pkgCache_StateRequired + StateStandard = _apt.pkgCache_StateStandard + StateOptional = _apt.pkgCache_StateOptional + StateExtra = _apt.pkgCache_StateExtra + StateUnknown = _apt.pkgCache_StateUnknown + StateInstall = _apt.pkgCache_StateInstall + StateHold = _apt.pkgCache_StateHold + StateDeInstall = _apt.pkgCache_StateDeInstall + StatePurge = _apt.pkgCache_StatePurge + StateOk = _apt.pkgCache_StateOk + StateReInstReq = _apt.pkgCache_StateReInstReq + StateHoldInst = _apt.pkgCache_StateHoldInst + StateHoldReInstReq = _apt.pkgCache_StateHoldReInstReq + StateNotInstalled = _apt.pkgCache_StateNotInstalled + StateUnPacked = _apt.pkgCache_StateUnPacked + StateHalfConfigured = _apt.pkgCache_StateHalfConfigured + StateHalfInstalled = _apt.pkgCache_StateHalfInstalled + StateConfigFiles = _apt.pkgCache_StateConfigFiles + StateInstalled = _apt.pkgCache_StateInstalled + FlagAuto = _apt.pkgCache_FlagAuto + FlagEssential = _apt.pkgCache_FlagEssential + FlagImportant = _apt.pkgCache_FlagImportant + FlagNotSource = _apt.pkgCache_FlagNotSource + FlagNotAutomatic = _apt.pkgCache_FlagNotAutomatic + __swig_setmethods__["HeaderP"] = _apt.pkgCache_HeaderP_set + __swig_getmethods__["HeaderP"] = _apt.pkgCache_HeaderP_get + if _newclass:HeaderP = property(_apt.pkgCache_HeaderP_get,_apt.pkgCache_HeaderP_set) + __swig_setmethods__["PkgP"] = _apt.pkgCache_PkgP_set + __swig_getmethods__["PkgP"] = _apt.pkgCache_PkgP_get + if _newclass:PkgP = property(_apt.pkgCache_PkgP_get,_apt.pkgCache_PkgP_set) + __swig_setmethods__["VerFileP"] = _apt.pkgCache_VerFileP_set + __swig_getmethods__["VerFileP"] = _apt.pkgCache_VerFileP_get + if _newclass:VerFileP = property(_apt.pkgCache_VerFileP_get,_apt.pkgCache_VerFileP_set) + __swig_setmethods__["PkgFileP"] = _apt.pkgCache_PkgFileP_set + __swig_getmethods__["PkgFileP"] = _apt.pkgCache_PkgFileP_get + if _newclass:PkgFileP = property(_apt.pkgCache_PkgFileP_get,_apt.pkgCache_PkgFileP_set) + __swig_setmethods__["VerP"] = _apt.pkgCache_VerP_set + __swig_getmethods__["VerP"] = _apt.pkgCache_VerP_get + if _newclass:VerP = property(_apt.pkgCache_VerP_get,_apt.pkgCache_VerP_set) + __swig_setmethods__["ProvideP"] = _apt.pkgCache_ProvideP_set + __swig_getmethods__["ProvideP"] = _apt.pkgCache_ProvideP_get + if _newclass:ProvideP = property(_apt.pkgCache_ProvideP_get,_apt.pkgCache_ProvideP_set) + __swig_setmethods__["DepP"] = _apt.pkgCache_DepP_set + __swig_getmethods__["DepP"] = _apt.pkgCache_DepP_get + if _newclass:DepP = property(_apt.pkgCache_DepP_get,_apt.pkgCache_DepP_set) + __swig_setmethods__["StringItemP"] = _apt.pkgCache_StringItemP_set + __swig_getmethods__["StringItemP"] = _apt.pkgCache_StringItemP_get + if _newclass:StringItemP = property(_apt.pkgCache_StringItemP_get,_apt.pkgCache_StringItemP_set) + __swig_setmethods__["StrP"] = _apt.pkgCache_StrP_set + __swig_getmethods__["StrP"] = _apt.pkgCache_StrP_get + if _newclass:StrP = property(_apt.pkgCache_StrP_get,_apt.pkgCache_StrP_set) + def ReMap(*args): return apply(_apt.pkgCache_ReMap,args) + def Sync(*args): return apply(_apt.pkgCache_Sync,args) + def GetMap(*args): return apply(_apt.pkgCache_GetMap,args) + def DataEnd(*args): return apply(_apt.pkgCache_DataEnd,args) + def Hash(*args): return apply(_apt.pkgCache_Hash,args) + def Priority(*args): return apply(_apt.pkgCache_Priority,args) + def FindPkg(*args): return apply(_apt.pkgCache_FindPkg,args) + def Head(*args): return apply(_apt.pkgCache_Head,args) + def PkgBegin(*args): return apply(_apt.pkgCache_PkgBegin,args) + def PkgEnd(*args): return apply(_apt.pkgCache_PkgEnd,args) + def FileBegin(*args): return apply(_apt.pkgCache_FileBegin,args) + def FileEnd(*args): return apply(_apt.pkgCache_FileEnd,args) + __swig_setmethods__["VS"] = _apt.pkgCache_VS_set + __swig_getmethods__["VS"] = _apt.pkgCache_VS_get + if _newclass:VS = property(_apt.pkgCache_VS_get,_apt.pkgCache_VS_set) + __swig_getmethods__["CompTypeDeb"] = lambda x: _apt.pkgCache_CompTypeDeb + if _newclass:CompTypeDeb = staticmethod(_apt.pkgCache_CompTypeDeb) + __swig_getmethods__["CompType"] = lambda x: _apt.pkgCache_CompType + if _newclass:CompType = staticmethod(_apt.pkgCache_CompType) + __swig_getmethods__["DepType"] = lambda x: _apt.pkgCache_DepType + if _newclass:DepType = staticmethod(_apt.pkgCache_DepType) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCache,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCache): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCache instance at %s>" % (self.this,) + +class pkgCachePtr(pkgCache): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCache +_apt.pkgCache_swigregister(pkgCachePtr) +cvar = _apt.cvar +pkgCache_CompTypeDeb = _apt.pkgCache_CompTypeDeb + +pkgCache_CompType = _apt.pkgCache_CompType + +pkgCache_DepType = _apt.pkgCache_DepType + + +class pkgCacheHeader(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheHeader, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheHeader, name) + __swig_setmethods__["Signature"] = _apt.pkgCacheHeader_Signature_set + __swig_getmethods__["Signature"] = _apt.pkgCacheHeader_Signature_get + if _newclass:Signature = property(_apt.pkgCacheHeader_Signature_get,_apt.pkgCacheHeader_Signature_set) + __swig_setmethods__["MajorVersion"] = _apt.pkgCacheHeader_MajorVersion_set + __swig_getmethods__["MajorVersion"] = _apt.pkgCacheHeader_MajorVersion_get + if _newclass:MajorVersion = property(_apt.pkgCacheHeader_MajorVersion_get,_apt.pkgCacheHeader_MajorVersion_set) + __swig_setmethods__["MinorVersion"] = _apt.pkgCacheHeader_MinorVersion_set + __swig_getmethods__["MinorVersion"] = _apt.pkgCacheHeader_MinorVersion_get + if _newclass:MinorVersion = property(_apt.pkgCacheHeader_MinorVersion_get,_apt.pkgCacheHeader_MinorVersion_set) + __swig_setmethods__["Dirty"] = _apt.pkgCacheHeader_Dirty_set + __swig_getmethods__["Dirty"] = _apt.pkgCacheHeader_Dirty_get + if _newclass:Dirty = property(_apt.pkgCacheHeader_Dirty_get,_apt.pkgCacheHeader_Dirty_set) + __swig_setmethods__["HeaderSz"] = _apt.pkgCacheHeader_HeaderSz_set + __swig_getmethods__["HeaderSz"] = _apt.pkgCacheHeader_HeaderSz_get + if _newclass:HeaderSz = property(_apt.pkgCacheHeader_HeaderSz_get,_apt.pkgCacheHeader_HeaderSz_set) + __swig_setmethods__["PackageSz"] = _apt.pkgCacheHeader_PackageSz_set + __swig_getmethods__["PackageSz"] = _apt.pkgCacheHeader_PackageSz_get + if _newclass:PackageSz = property(_apt.pkgCacheHeader_PackageSz_get,_apt.pkgCacheHeader_PackageSz_set) + __swig_setmethods__["PackageFileSz"] = _apt.pkgCacheHeader_PackageFileSz_set + __swig_getmethods__["PackageFileSz"] = _apt.pkgCacheHeader_PackageFileSz_get + if _newclass:PackageFileSz = property(_apt.pkgCacheHeader_PackageFileSz_get,_apt.pkgCacheHeader_PackageFileSz_set) + __swig_setmethods__["VersionSz"] = _apt.pkgCacheHeader_VersionSz_set + __swig_getmethods__["VersionSz"] = _apt.pkgCacheHeader_VersionSz_get + if _newclass:VersionSz = property(_apt.pkgCacheHeader_VersionSz_get,_apt.pkgCacheHeader_VersionSz_set) + __swig_setmethods__["DependencySz"] = _apt.pkgCacheHeader_DependencySz_set + __swig_getmethods__["DependencySz"] = _apt.pkgCacheHeader_DependencySz_get + if _newclass:DependencySz = property(_apt.pkgCacheHeader_DependencySz_get,_apt.pkgCacheHeader_DependencySz_set) + __swig_setmethods__["ProvidesSz"] = _apt.pkgCacheHeader_ProvidesSz_set + __swig_getmethods__["ProvidesSz"] = _apt.pkgCacheHeader_ProvidesSz_get + if _newclass:ProvidesSz = property(_apt.pkgCacheHeader_ProvidesSz_get,_apt.pkgCacheHeader_ProvidesSz_set) + __swig_setmethods__["VerFileSz"] = _apt.pkgCacheHeader_VerFileSz_set + __swig_getmethods__["VerFileSz"] = _apt.pkgCacheHeader_VerFileSz_get + if _newclass:VerFileSz = property(_apt.pkgCacheHeader_VerFileSz_get,_apt.pkgCacheHeader_VerFileSz_set) + __swig_setmethods__["PackageCount"] = _apt.pkgCacheHeader_PackageCount_set + __swig_getmethods__["PackageCount"] = _apt.pkgCacheHeader_PackageCount_get + if _newclass:PackageCount = property(_apt.pkgCacheHeader_PackageCount_get,_apt.pkgCacheHeader_PackageCount_set) + __swig_setmethods__["VersionCount"] = _apt.pkgCacheHeader_VersionCount_set + __swig_getmethods__["VersionCount"] = _apt.pkgCacheHeader_VersionCount_get + if _newclass:VersionCount = property(_apt.pkgCacheHeader_VersionCount_get,_apt.pkgCacheHeader_VersionCount_set) + __swig_setmethods__["DependsCount"] = _apt.pkgCacheHeader_DependsCount_set + __swig_getmethods__["DependsCount"] = _apt.pkgCacheHeader_DependsCount_get + if _newclass:DependsCount = property(_apt.pkgCacheHeader_DependsCount_get,_apt.pkgCacheHeader_DependsCount_set) + __swig_setmethods__["PackageFileCount"] = _apt.pkgCacheHeader_PackageFileCount_set + __swig_getmethods__["PackageFileCount"] = _apt.pkgCacheHeader_PackageFileCount_get + if _newclass:PackageFileCount = property(_apt.pkgCacheHeader_PackageFileCount_get,_apt.pkgCacheHeader_PackageFileCount_set) + __swig_setmethods__["VerFileCount"] = _apt.pkgCacheHeader_VerFileCount_set + __swig_getmethods__["VerFileCount"] = _apt.pkgCacheHeader_VerFileCount_get + if _newclass:VerFileCount = property(_apt.pkgCacheHeader_VerFileCount_get,_apt.pkgCacheHeader_VerFileCount_set) + __swig_setmethods__["ProvidesCount"] = _apt.pkgCacheHeader_ProvidesCount_set + __swig_getmethods__["ProvidesCount"] = _apt.pkgCacheHeader_ProvidesCount_get + if _newclass:ProvidesCount = property(_apt.pkgCacheHeader_ProvidesCount_get,_apt.pkgCacheHeader_ProvidesCount_set) + __swig_setmethods__["FileList"] = _apt.pkgCacheHeader_FileList_set + __swig_getmethods__["FileList"] = _apt.pkgCacheHeader_FileList_get + if _newclass:FileList = property(_apt.pkgCacheHeader_FileList_get,_apt.pkgCacheHeader_FileList_set) + __swig_setmethods__["StringList"] = _apt.pkgCacheHeader_StringList_set + __swig_getmethods__["StringList"] = _apt.pkgCacheHeader_StringList_get + if _newclass:StringList = property(_apt.pkgCacheHeader_StringList_get,_apt.pkgCacheHeader_StringList_set) + __swig_setmethods__["VerSysName"] = _apt.pkgCacheHeader_VerSysName_set + __swig_getmethods__["VerSysName"] = _apt.pkgCacheHeader_VerSysName_get + if _newclass:VerSysName = property(_apt.pkgCacheHeader_VerSysName_get,_apt.pkgCacheHeader_VerSysName_set) + __swig_setmethods__["Architecture"] = _apt.pkgCacheHeader_Architecture_set + __swig_getmethods__["Architecture"] = _apt.pkgCacheHeader_Architecture_get + if _newclass:Architecture = property(_apt.pkgCacheHeader_Architecture_get,_apt.pkgCacheHeader_Architecture_set) + __swig_setmethods__["MaxVerFileSize"] = _apt.pkgCacheHeader_MaxVerFileSize_set + __swig_getmethods__["MaxVerFileSize"] = _apt.pkgCacheHeader_MaxVerFileSize_get + if _newclass:MaxVerFileSize = property(_apt.pkgCacheHeader_MaxVerFileSize_get,_apt.pkgCacheHeader_MaxVerFileSize_set) + __swig_setmethods__["Pools"] = _apt.pkgCacheHeader_Pools_set + __swig_getmethods__["Pools"] = _apt.pkgCacheHeader_Pools_get + if _newclass:Pools = property(_apt.pkgCacheHeader_Pools_get,_apt.pkgCacheHeader_Pools_set) + __swig_setmethods__["HashTable"] = _apt.pkgCacheHeader_HashTable_set + __swig_getmethods__["HashTable"] = _apt.pkgCacheHeader_HashTable_get + if _newclass:HashTable = property(_apt.pkgCacheHeader_HashTable_get,_apt.pkgCacheHeader_HashTable_set) + def CheckSizes(*args): return apply(_apt.pkgCacheHeader_CheckSizes,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheHeader,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCacheHeader): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheHeader instance at %s>" % (self.this,) + +class pkgCacheHeaderPtr(pkgCacheHeader): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheHeader +_apt.pkgCacheHeader_swigregister(pkgCacheHeaderPtr) + +class pkgCachePackage(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCachePackage, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCachePackage, name) + __swig_setmethods__["Name"] = _apt.pkgCachePackage_Name_set + __swig_getmethods__["Name"] = _apt.pkgCachePackage_Name_get + if _newclass:Name = property(_apt.pkgCachePackage_Name_get,_apt.pkgCachePackage_Name_set) + __swig_setmethods__["VersionList"] = _apt.pkgCachePackage_VersionList_set + __swig_getmethods__["VersionList"] = _apt.pkgCachePackage_VersionList_get + if _newclass:VersionList = property(_apt.pkgCachePackage_VersionList_get,_apt.pkgCachePackage_VersionList_set) + __swig_setmethods__["CurrentVer"] = _apt.pkgCachePackage_CurrentVer_set + __swig_getmethods__["CurrentVer"] = _apt.pkgCachePackage_CurrentVer_get + if _newclass:CurrentVer = property(_apt.pkgCachePackage_CurrentVer_get,_apt.pkgCachePackage_CurrentVer_set) + __swig_setmethods__["Section"] = _apt.pkgCachePackage_Section_set + __swig_getmethods__["Section"] = _apt.pkgCachePackage_Section_get + if _newclass:Section = property(_apt.pkgCachePackage_Section_get,_apt.pkgCachePackage_Section_set) + __swig_setmethods__["NextPackage"] = _apt.pkgCachePackage_NextPackage_set + __swig_getmethods__["NextPackage"] = _apt.pkgCachePackage_NextPackage_get + if _newclass:NextPackage = property(_apt.pkgCachePackage_NextPackage_get,_apt.pkgCachePackage_NextPackage_set) + __swig_setmethods__["RevDepends"] = _apt.pkgCachePackage_RevDepends_set + __swig_getmethods__["RevDepends"] = _apt.pkgCachePackage_RevDepends_get + if _newclass:RevDepends = property(_apt.pkgCachePackage_RevDepends_get,_apt.pkgCachePackage_RevDepends_set) + __swig_setmethods__["ProvidesList"] = _apt.pkgCachePackage_ProvidesList_set + __swig_getmethods__["ProvidesList"] = _apt.pkgCachePackage_ProvidesList_get + if _newclass:ProvidesList = property(_apt.pkgCachePackage_ProvidesList_get,_apt.pkgCachePackage_ProvidesList_set) + __swig_setmethods__["SelectedState"] = _apt.pkgCachePackage_SelectedState_set + __swig_getmethods__["SelectedState"] = _apt.pkgCachePackage_SelectedState_get + if _newclass:SelectedState = property(_apt.pkgCachePackage_SelectedState_get,_apt.pkgCachePackage_SelectedState_set) + __swig_setmethods__["InstState"] = _apt.pkgCachePackage_InstState_set + __swig_getmethods__["InstState"] = _apt.pkgCachePackage_InstState_get + if _newclass:InstState = property(_apt.pkgCachePackage_InstState_get,_apt.pkgCachePackage_InstState_set) + __swig_setmethods__["CurrentState"] = _apt.pkgCachePackage_CurrentState_set + __swig_getmethods__["CurrentState"] = _apt.pkgCachePackage_CurrentState_get + if _newclass:CurrentState = property(_apt.pkgCachePackage_CurrentState_get,_apt.pkgCachePackage_CurrentState_set) + __swig_setmethods__["ID"] = _apt.pkgCachePackage_ID_set + __swig_getmethods__["ID"] = _apt.pkgCachePackage_ID_get + if _newclass:ID = property(_apt.pkgCachePackage_ID_get,_apt.pkgCachePackage_ID_set) + __swig_setmethods__["Flags"] = _apt.pkgCachePackage_Flags_set + __swig_getmethods__["Flags"] = _apt.pkgCachePackage_Flags_get + if _newclass:Flags = property(_apt.pkgCachePackage_Flags_get,_apt.pkgCachePackage_Flags_set) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCachePackage,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCachePackage): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCachePackage instance at %s>" % (self.this,) + +class pkgCachePackagePtr(pkgCachePackage): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCachePackage +_apt.pkgCachePackage_swigregister(pkgCachePackagePtr) + +class pkgCachePackageFile(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCachePackageFile, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCachePackageFile, name) + __swig_setmethods__["FileName"] = _apt.pkgCachePackageFile_FileName_set + __swig_getmethods__["FileName"] = _apt.pkgCachePackageFile_FileName_get + if _newclass:FileName = property(_apt.pkgCachePackageFile_FileName_get,_apt.pkgCachePackageFile_FileName_set) + __swig_setmethods__["Archive"] = _apt.pkgCachePackageFile_Archive_set + __swig_getmethods__["Archive"] = _apt.pkgCachePackageFile_Archive_get + if _newclass:Archive = property(_apt.pkgCachePackageFile_Archive_get,_apt.pkgCachePackageFile_Archive_set) + __swig_setmethods__["Component"] = _apt.pkgCachePackageFile_Component_set + __swig_getmethods__["Component"] = _apt.pkgCachePackageFile_Component_get + if _newclass:Component = property(_apt.pkgCachePackageFile_Component_get,_apt.pkgCachePackageFile_Component_set) + __swig_setmethods__["Version"] = _apt.pkgCachePackageFile_Version_set + __swig_getmethods__["Version"] = _apt.pkgCachePackageFile_Version_get + if _newclass:Version = property(_apt.pkgCachePackageFile_Version_get,_apt.pkgCachePackageFile_Version_set) + __swig_setmethods__["Origin"] = _apt.pkgCachePackageFile_Origin_set + __swig_getmethods__["Origin"] = _apt.pkgCachePackageFile_Origin_get + if _newclass:Origin = property(_apt.pkgCachePackageFile_Origin_get,_apt.pkgCachePackageFile_Origin_set) + __swig_setmethods__["Label"] = _apt.pkgCachePackageFile_Label_set + __swig_getmethods__["Label"] = _apt.pkgCachePackageFile_Label_get + if _newclass:Label = property(_apt.pkgCachePackageFile_Label_get,_apt.pkgCachePackageFile_Label_set) + __swig_setmethods__["Architecture"] = _apt.pkgCachePackageFile_Architecture_set + __swig_getmethods__["Architecture"] = _apt.pkgCachePackageFile_Architecture_get + if _newclass:Architecture = property(_apt.pkgCachePackageFile_Architecture_get,_apt.pkgCachePackageFile_Architecture_set) + __swig_setmethods__["Site"] = _apt.pkgCachePackageFile_Site_set + __swig_getmethods__["Site"] = _apt.pkgCachePackageFile_Site_get + if _newclass:Site = property(_apt.pkgCachePackageFile_Site_get,_apt.pkgCachePackageFile_Site_set) + __swig_setmethods__["IndexType"] = _apt.pkgCachePackageFile_IndexType_set + __swig_getmethods__["IndexType"] = _apt.pkgCachePackageFile_IndexType_get + if _newclass:IndexType = property(_apt.pkgCachePackageFile_IndexType_get,_apt.pkgCachePackageFile_IndexType_set) + __swig_setmethods__["Size"] = _apt.pkgCachePackageFile_Size_set + __swig_getmethods__["Size"] = _apt.pkgCachePackageFile_Size_get + if _newclass:Size = property(_apt.pkgCachePackageFile_Size_get,_apt.pkgCachePackageFile_Size_set) + __swig_setmethods__["Flags"] = _apt.pkgCachePackageFile_Flags_set + __swig_getmethods__["Flags"] = _apt.pkgCachePackageFile_Flags_get + if _newclass:Flags = property(_apt.pkgCachePackageFile_Flags_get,_apt.pkgCachePackageFile_Flags_set) + __swig_setmethods__["NextFile"] = _apt.pkgCachePackageFile_NextFile_set + __swig_getmethods__["NextFile"] = _apt.pkgCachePackageFile_NextFile_get + if _newclass:NextFile = property(_apt.pkgCachePackageFile_NextFile_get,_apt.pkgCachePackageFile_NextFile_set) + __swig_setmethods__["ID"] = _apt.pkgCachePackageFile_ID_set + __swig_getmethods__["ID"] = _apt.pkgCachePackageFile_ID_get + if _newclass:ID = property(_apt.pkgCachePackageFile_ID_get,_apt.pkgCachePackageFile_ID_set) + __swig_setmethods__["mtime"] = _apt.pkgCachePackageFile_mtime_set + __swig_getmethods__["mtime"] = _apt.pkgCachePackageFile_mtime_get + if _newclass:mtime = property(_apt.pkgCachePackageFile_mtime_get,_apt.pkgCachePackageFile_mtime_set) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCachePackageFile,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCachePackageFile): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCachePackageFile instance at %s>" % (self.this,) + +class pkgCachePackageFilePtr(pkgCachePackageFile): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCachePackageFile +_apt.pkgCachePackageFile_swigregister(pkgCachePackageFilePtr) + +class pkgCacheVerFile(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheVerFile, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheVerFile, name) + __swig_setmethods__["File"] = _apt.pkgCacheVerFile_File_set + __swig_getmethods__["File"] = _apt.pkgCacheVerFile_File_get + if _newclass:File = property(_apt.pkgCacheVerFile_File_get,_apt.pkgCacheVerFile_File_set) + __swig_setmethods__["NextFile"] = _apt.pkgCacheVerFile_NextFile_set + __swig_getmethods__["NextFile"] = _apt.pkgCacheVerFile_NextFile_get + if _newclass:NextFile = property(_apt.pkgCacheVerFile_NextFile_get,_apt.pkgCacheVerFile_NextFile_set) + __swig_setmethods__["Offset"] = _apt.pkgCacheVerFile_Offset_set + __swig_getmethods__["Offset"] = _apt.pkgCacheVerFile_Offset_get + if _newclass:Offset = property(_apt.pkgCacheVerFile_Offset_get,_apt.pkgCacheVerFile_Offset_set) + __swig_setmethods__["Size"] = _apt.pkgCacheVerFile_Size_set + __swig_getmethods__["Size"] = _apt.pkgCacheVerFile_Size_get + if _newclass:Size = property(_apt.pkgCacheVerFile_Size_get,_apt.pkgCacheVerFile_Size_set) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheVerFile,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCacheVerFile): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheVerFile instance at %s>" % (self.this,) + +class pkgCacheVerFilePtr(pkgCacheVerFile): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheVerFile +_apt.pkgCacheVerFile_swigregister(pkgCacheVerFilePtr) + +class pkgCacheVersion(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheVersion, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheVersion, name) + __swig_setmethods__["VerStr"] = _apt.pkgCacheVersion_VerStr_set + __swig_getmethods__["VerStr"] = _apt.pkgCacheVersion_VerStr_get + if _newclass:VerStr = property(_apt.pkgCacheVersion_VerStr_get,_apt.pkgCacheVersion_VerStr_set) + __swig_setmethods__["Section"] = _apt.pkgCacheVersion_Section_set + __swig_getmethods__["Section"] = _apt.pkgCacheVersion_Section_get + if _newclass:Section = property(_apt.pkgCacheVersion_Section_get,_apt.pkgCacheVersion_Section_set) + __swig_setmethods__["Arch"] = _apt.pkgCacheVersion_Arch_set + __swig_getmethods__["Arch"] = _apt.pkgCacheVersion_Arch_get + if _newclass:Arch = property(_apt.pkgCacheVersion_Arch_get,_apt.pkgCacheVersion_Arch_set) + __swig_setmethods__["FileList"] = _apt.pkgCacheVersion_FileList_set + __swig_getmethods__["FileList"] = _apt.pkgCacheVersion_FileList_get + if _newclass:FileList = property(_apt.pkgCacheVersion_FileList_get,_apt.pkgCacheVersion_FileList_set) + __swig_setmethods__["NextVer"] = _apt.pkgCacheVersion_NextVer_set + __swig_getmethods__["NextVer"] = _apt.pkgCacheVersion_NextVer_get + if _newclass:NextVer = property(_apt.pkgCacheVersion_NextVer_get,_apt.pkgCacheVersion_NextVer_set) + __swig_setmethods__["DependsList"] = _apt.pkgCacheVersion_DependsList_set + __swig_getmethods__["DependsList"] = _apt.pkgCacheVersion_DependsList_get + if _newclass:DependsList = property(_apt.pkgCacheVersion_DependsList_get,_apt.pkgCacheVersion_DependsList_set) + __swig_setmethods__["ParentPkg"] = _apt.pkgCacheVersion_ParentPkg_set + __swig_getmethods__["ParentPkg"] = _apt.pkgCacheVersion_ParentPkg_get + if _newclass:ParentPkg = property(_apt.pkgCacheVersion_ParentPkg_get,_apt.pkgCacheVersion_ParentPkg_set) + __swig_setmethods__["ProvidesList"] = _apt.pkgCacheVersion_ProvidesList_set + __swig_getmethods__["ProvidesList"] = _apt.pkgCacheVersion_ProvidesList_get + if _newclass:ProvidesList = property(_apt.pkgCacheVersion_ProvidesList_get,_apt.pkgCacheVersion_ProvidesList_set) + __swig_setmethods__["Size"] = _apt.pkgCacheVersion_Size_set + __swig_getmethods__["Size"] = _apt.pkgCacheVersion_Size_get + if _newclass:Size = property(_apt.pkgCacheVersion_Size_get,_apt.pkgCacheVersion_Size_set) + __swig_setmethods__["InstalledSize"] = _apt.pkgCacheVersion_InstalledSize_set + __swig_getmethods__["InstalledSize"] = _apt.pkgCacheVersion_InstalledSize_get + if _newclass:InstalledSize = property(_apt.pkgCacheVersion_InstalledSize_get,_apt.pkgCacheVersion_InstalledSize_set) + __swig_setmethods__["Hash"] = _apt.pkgCacheVersion_Hash_set + __swig_getmethods__["Hash"] = _apt.pkgCacheVersion_Hash_get + if _newclass:Hash = property(_apt.pkgCacheVersion_Hash_get,_apt.pkgCacheVersion_Hash_set) + __swig_setmethods__["ID"] = _apt.pkgCacheVersion_ID_set + __swig_getmethods__["ID"] = _apt.pkgCacheVersion_ID_get + if _newclass:ID = property(_apt.pkgCacheVersion_ID_get,_apt.pkgCacheVersion_ID_set) + __swig_setmethods__["Priority"] = _apt.pkgCacheVersion_Priority_set + __swig_getmethods__["Priority"] = _apt.pkgCacheVersion_Priority_get + if _newclass:Priority = property(_apt.pkgCacheVersion_Priority_get,_apt.pkgCacheVersion_Priority_set) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheVersion,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCacheVersion): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheVersion instance at %s>" % (self.this,) + +class pkgCacheVersionPtr(pkgCacheVersion): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheVersion +_apt.pkgCacheVersion_swigregister(pkgCacheVersionPtr) + +class pkgCacheDependency(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheDependency, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheDependency, name) + __swig_setmethods__["Version"] = _apt.pkgCacheDependency_Version_set + __swig_getmethods__["Version"] = _apt.pkgCacheDependency_Version_get + if _newclass:Version = property(_apt.pkgCacheDependency_Version_get,_apt.pkgCacheDependency_Version_set) + __swig_setmethods__["Package"] = _apt.pkgCacheDependency_Package_set + __swig_getmethods__["Package"] = _apt.pkgCacheDependency_Package_get + if _newclass:Package = property(_apt.pkgCacheDependency_Package_get,_apt.pkgCacheDependency_Package_set) + __swig_setmethods__["NextDepends"] = _apt.pkgCacheDependency_NextDepends_set + __swig_getmethods__["NextDepends"] = _apt.pkgCacheDependency_NextDepends_get + if _newclass:NextDepends = property(_apt.pkgCacheDependency_NextDepends_get,_apt.pkgCacheDependency_NextDepends_set) + __swig_setmethods__["NextRevDepends"] = _apt.pkgCacheDependency_NextRevDepends_set + __swig_getmethods__["NextRevDepends"] = _apt.pkgCacheDependency_NextRevDepends_get + if _newclass:NextRevDepends = property(_apt.pkgCacheDependency_NextRevDepends_get,_apt.pkgCacheDependency_NextRevDepends_set) + __swig_setmethods__["ParentVer"] = _apt.pkgCacheDependency_ParentVer_set + __swig_getmethods__["ParentVer"] = _apt.pkgCacheDependency_ParentVer_get + if _newclass:ParentVer = property(_apt.pkgCacheDependency_ParentVer_get,_apt.pkgCacheDependency_ParentVer_set) + __swig_setmethods__["ID"] = _apt.pkgCacheDependency_ID_set + __swig_getmethods__["ID"] = _apt.pkgCacheDependency_ID_get + if _newclass:ID = property(_apt.pkgCacheDependency_ID_get,_apt.pkgCacheDependency_ID_set) + __swig_setmethods__["Type"] = _apt.pkgCacheDependency_Type_set + __swig_getmethods__["Type"] = _apt.pkgCacheDependency_Type_get + if _newclass:Type = property(_apt.pkgCacheDependency_Type_get,_apt.pkgCacheDependency_Type_set) + __swig_setmethods__["CompareOp"] = _apt.pkgCacheDependency_CompareOp_set + __swig_getmethods__["CompareOp"] = _apt.pkgCacheDependency_CompareOp_get + if _newclass:CompareOp = property(_apt.pkgCacheDependency_CompareOp_get,_apt.pkgCacheDependency_CompareOp_set) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheDependency,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCacheDependency): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheDependency instance at %s>" % (self.this,) + +class pkgCacheDependencyPtr(pkgCacheDependency): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheDependency +_apt.pkgCacheDependency_swigregister(pkgCacheDependencyPtr) + +class pkgCacheProvides(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheProvides, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheProvides, name) + __swig_setmethods__["ParentPkg"] = _apt.pkgCacheProvides_ParentPkg_set + __swig_getmethods__["ParentPkg"] = _apt.pkgCacheProvides_ParentPkg_get + if _newclass:ParentPkg = property(_apt.pkgCacheProvides_ParentPkg_get,_apt.pkgCacheProvides_ParentPkg_set) + __swig_setmethods__["Version"] = _apt.pkgCacheProvides_Version_set + __swig_getmethods__["Version"] = _apt.pkgCacheProvides_Version_get + if _newclass:Version = property(_apt.pkgCacheProvides_Version_get,_apt.pkgCacheProvides_Version_set) + __swig_setmethods__["ProvideVersion"] = _apt.pkgCacheProvides_ProvideVersion_set + __swig_getmethods__["ProvideVersion"] = _apt.pkgCacheProvides_ProvideVersion_get + if _newclass:ProvideVersion = property(_apt.pkgCacheProvides_ProvideVersion_get,_apt.pkgCacheProvides_ProvideVersion_set) + __swig_setmethods__["NextProvides"] = _apt.pkgCacheProvides_NextProvides_set + __swig_getmethods__["NextProvides"] = _apt.pkgCacheProvides_NextProvides_get + if _newclass:NextProvides = property(_apt.pkgCacheProvides_NextProvides_get,_apt.pkgCacheProvides_NextProvides_set) + __swig_setmethods__["NextPkgProv"] = _apt.pkgCacheProvides_NextPkgProv_set + __swig_getmethods__["NextPkgProv"] = _apt.pkgCacheProvides_NextPkgProv_get + if _newclass:NextPkgProv = property(_apt.pkgCacheProvides_NextPkgProv_get,_apt.pkgCacheProvides_NextPkgProv_set) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheProvides,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCacheProvides): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheProvides instance at %s>" % (self.this,) + +class pkgCacheProvidesPtr(pkgCacheProvides): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheProvides +_apt.pkgCacheProvides_swigregister(pkgCacheProvidesPtr) + +class pkgCacheStringItem(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheStringItem, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheStringItem, name) + __swig_setmethods__["String"] = _apt.pkgCacheStringItem_String_set + __swig_getmethods__["String"] = _apt.pkgCacheStringItem_String_get + if _newclass:String = property(_apt.pkgCacheStringItem_String_get,_apt.pkgCacheStringItem_String_set) + __swig_setmethods__["NextItem"] = _apt.pkgCacheStringItem_NextItem_set + __swig_getmethods__["NextItem"] = _apt.pkgCacheStringItem_NextItem_get + if _newclass:NextItem = property(_apt.pkgCacheStringItem_NextItem_get,_apt.pkgCacheStringItem_NextItem_set) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheStringItem,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCacheStringItem): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheStringItem instance at %s>" % (self.this,) + +class pkgCacheStringItemPtr(pkgCacheStringItem): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheStringItem +_apt.pkgCacheStringItem_swigregister(pkgCacheStringItemPtr) + +class pkgDepCache(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgDepCache, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgDepCache, name) + DepNow = _apt.pkgDepCache_DepNow + DepInstall = _apt.pkgDepCache_DepInstall + DepCVer = _apt.pkgDepCache_DepCVer + DepGNow = _apt.pkgDepCache_DepGNow + DepGInstall = _apt.pkgDepCache_DepGInstall + DepGCVer = _apt.pkgDepCache_DepGCVer + DepNowPolicy = _apt.pkgDepCache_DepNowPolicy + DepNowMin = _apt.pkgDepCache_DepNowMin + DepInstPolicy = _apt.pkgDepCache_DepInstPolicy + DepInstMin = _apt.pkgDepCache_DepInstMin + DepCandPolicy = _apt.pkgDepCache_DepCandPolicy + DepCandMin = _apt.pkgDepCache_DepCandMin + AutoKept = _apt.pkgDepCache_AutoKept + Purge = _apt.pkgDepCache_Purge + ReInstall = _apt.pkgDepCache_ReInstall + NowVersion = _apt.pkgDepCache_NowVersion + InstallVersion = _apt.pkgDepCache_InstallVersion + CandidateVersion = _apt.pkgDepCache_CandidateVersion + ModeDelete = _apt.pkgDepCache_ModeDelete + ModeKeep = _apt.pkgDepCache_ModeKeep + ModeInstall = _apt.pkgDepCache_ModeInstall + def BuildGroupOrs(*args): return apply(_apt.pkgDepCache_BuildGroupOrs,args) + def UpdateVerState(*args): return apply(_apt.pkgDepCache_UpdateVerState,args) + def Head(*args): return apply(_apt.pkgDepCache_Head,args) + def PkgBegin(*args): return apply(_apt.pkgDepCache_PkgBegin,args) + def FindPkg(*args): return apply(_apt.pkgDepCache_FindPkg,args) + def GetCache(*args): return apply(_apt.pkgDepCache_GetCache,args) + def VS(*args): return apply(_apt.pkgDepCache_VS,args) + def GetCandidateVer(*args): return apply(_apt.pkgDepCache_GetCandidateVer,args) + def IsImportantDep(*args): return apply(_apt.pkgDepCache_IsImportantDep,args) + def GetPolicy(*args): return apply(_apt.pkgDepCache_GetPolicy,args) + def __getitem__(*args): return apply(_apt.pkgDepCache___getitem__,args) + def MarkKeep(*args): return apply(_apt.pkgDepCache_MarkKeep,args) + def MarkDelete(*args): return apply(_apt.pkgDepCache_MarkDelete,args) + def MarkInstall(*args): return apply(_apt.pkgDepCache_MarkInstall,args) + def SetReInstall(*args): return apply(_apt.pkgDepCache_SetReInstall,args) + def SetCandidateVersion(*args): return apply(_apt.pkgDepCache_SetCandidateVersion,args) + def Update(*args): return apply(_apt.pkgDepCache_Update,args) + def UsrSize(*args): return apply(_apt.pkgDepCache_UsrSize,args) + def DebSize(*args): return apply(_apt.pkgDepCache_DebSize,args) + def DelCount(*args): return apply(_apt.pkgDepCache_DelCount,args) + def KeepCount(*args): return apply(_apt.pkgDepCache_KeepCount,args) + def InstCount(*args): return apply(_apt.pkgDepCache_InstCount,args) + def BrokenCount(*args): return apply(_apt.pkgDepCache_BrokenCount,args) + def BadCount(*args): return apply(_apt.pkgDepCache_BadCount,args) + def Init(*args): return apply(_apt.pkgDepCache_Init,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgDepCache,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgDepCache): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgDepCache instance at %s>" % (self.this,) + +class pkgDepCachePtr(pkgDepCache): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgDepCache +_apt.pkgDepCache_swigregister(pkgDepCachePtr) + +class pkgDepCacheStateCache(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgDepCacheStateCache, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgDepCacheStateCache, name) + __swig_getmethods__["CandVersion"] = _apt.pkgDepCacheStateCache_CandVersion_get + if _newclass:CandVersion = property(_apt.pkgDepCacheStateCache_CandVersion_get) + __swig_getmethods__["CurVersion"] = _apt.pkgDepCacheStateCache_CurVersion_get + if _newclass:CurVersion = property(_apt.pkgDepCacheStateCache_CurVersion_get) + __swig_setmethods__["CandidateVer"] = _apt.pkgDepCacheStateCache_CandidateVer_set + __swig_getmethods__["CandidateVer"] = _apt.pkgDepCacheStateCache_CandidateVer_get + if _newclass:CandidateVer = property(_apt.pkgDepCacheStateCache_CandidateVer_get,_apt.pkgDepCacheStateCache_CandidateVer_set) + __swig_setmethods__["InstallVer"] = _apt.pkgDepCacheStateCache_InstallVer_set + __swig_getmethods__["InstallVer"] = _apt.pkgDepCacheStateCache_InstallVer_get + if _newclass:InstallVer = property(_apt.pkgDepCacheStateCache_InstallVer_get,_apt.pkgDepCacheStateCache_InstallVer_set) + __swig_setmethods__["Flags"] = _apt.pkgDepCacheStateCache_Flags_set + __swig_getmethods__["Flags"] = _apt.pkgDepCacheStateCache_Flags_get + if _newclass:Flags = property(_apt.pkgDepCacheStateCache_Flags_get,_apt.pkgDepCacheStateCache_Flags_set) + __swig_setmethods__["iFlags"] = _apt.pkgDepCacheStateCache_iFlags_set + __swig_getmethods__["iFlags"] = _apt.pkgDepCacheStateCache_iFlags_get + if _newclass:iFlags = property(_apt.pkgDepCacheStateCache_iFlags_get,_apt.pkgDepCacheStateCache_iFlags_set) + __swig_setmethods__["Status"] = _apt.pkgDepCacheStateCache_Status_set + __swig_getmethods__["Status"] = _apt.pkgDepCacheStateCache_Status_get + if _newclass:Status = property(_apt.pkgDepCacheStateCache_Status_get,_apt.pkgDepCacheStateCache_Status_set) + __swig_setmethods__["Mode"] = _apt.pkgDepCacheStateCache_Mode_set + __swig_getmethods__["Mode"] = _apt.pkgDepCacheStateCache_Mode_get + if _newclass:Mode = property(_apt.pkgDepCacheStateCache_Mode_get,_apt.pkgDepCacheStateCache_Mode_set) + __swig_setmethods__["DepState"] = _apt.pkgDepCacheStateCache_DepState_set + __swig_getmethods__["DepState"] = _apt.pkgDepCacheStateCache_DepState_get + if _newclass:DepState = property(_apt.pkgDepCacheStateCache_DepState_get,_apt.pkgDepCacheStateCache_DepState_set) + def StripEpoch(*args): return apply(_apt.pkgDepCacheStateCache_StripEpoch,args) + def Update(*args): return apply(_apt.pkgDepCacheStateCache_Update,args) + def NewInstall(*args): return apply(_apt.pkgDepCacheStateCache_NewInstall,args) + def Delete(*args): return apply(_apt.pkgDepCacheStateCache_Delete,args) + def Keep(*args): return apply(_apt.pkgDepCacheStateCache_Keep,args) + def Upgrade(*args): return apply(_apt.pkgDepCacheStateCache_Upgrade,args) + def Upgradable(*args): return apply(_apt.pkgDepCacheStateCache_Upgradable,args) + def Downgrade(*args): return apply(_apt.pkgDepCacheStateCache_Downgrade,args) + def Held(*args): return apply(_apt.pkgDepCacheStateCache_Held,args) + def NowBroken(*args): return apply(_apt.pkgDepCacheStateCache_NowBroken,args) + def InstBroken(*args): return apply(_apt.pkgDepCacheStateCache_InstBroken,args) + def Install(*args): return apply(_apt.pkgDepCacheStateCache_Install,args) + def InstVerIter(*args): return apply(_apt.pkgDepCacheStateCache_InstVerIter,args) + def CandidateVerIter(*args): return apply(_apt.pkgDepCacheStateCache_CandidateVerIter,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgDepCacheStateCache,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgDepCacheStateCache): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgDepCacheStateCache instance at %s>" % (self.this,) + +class pkgDepCacheStateCachePtr(pkgDepCacheStateCache): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgDepCacheStateCache +_apt.pkgDepCacheStateCache_swigregister(pkgDepCacheStateCachePtr) + +class pkgCachePkgIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCachePkgIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCachePkgIterator, name) + NeedsNothing = _apt.pkgCachePkgIterator_NeedsNothing + NeedsUnpack = _apt.pkgCachePkgIterator_NeedsUnpack + NeedsConfigure = _apt.pkgCachePkgIterator_NeedsConfigure + def next(*args): return apply(_apt.pkgCachePkgIterator_next,args) + def end(*args): return apply(_apt.pkgCachePkgIterator_end,args) + def __eq__(*args): return apply(_apt.pkgCachePkgIterator___eq__,args) + def __ne__(*args): return apply(_apt.pkgCachePkgIterator___ne__,args) + def __deref__(*args): return apply(_apt.pkgCachePkgIterator___deref__,args) + def __mul__(*args): return apply(_apt.pkgCachePkgIterator___mul__,args) + def Cache(*args): return apply(_apt.pkgCachePkgIterator_Cache,args) + def Name(*args): return apply(_apt.pkgCachePkgIterator_Name,args) + def Section(*args): return apply(_apt.pkgCachePkgIterator_Section,args) + def Purge(*args): return apply(_apt.pkgCachePkgIterator_Purge,args) + def VersionList(*args): return apply(_apt.pkgCachePkgIterator_VersionList,args) + def CurrentVer(*args): return apply(_apt.pkgCachePkgIterator_CurrentVer,args) + def RevDependsList(*args): return apply(_apt.pkgCachePkgIterator_RevDependsList,args) + def ProvidesList(*args): return apply(_apt.pkgCachePkgIterator_ProvidesList,args) + def Index(*args): return apply(_apt.pkgCachePkgIterator_Index,args) + def State(*args): return apply(_apt.pkgCachePkgIterator_State,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCachePkgIterator,args) + self.thisown = 1 + __swig_setmethods__["NextPackage"] = _apt.pkgCachePkgIterator_NextPackage_set + __swig_getmethods__["NextPackage"] = _apt.pkgCachePkgIterator_NextPackage_get + if _newclass:NextPackage = property(_apt.pkgCachePkgIterator_NextPackage_get,_apt.pkgCachePkgIterator_NextPackage_set) + __swig_setmethods__["RevDepends"] = _apt.pkgCachePkgIterator_RevDepends_set + __swig_getmethods__["RevDepends"] = _apt.pkgCachePkgIterator_RevDepends_get + if _newclass:RevDepends = property(_apt.pkgCachePkgIterator_RevDepends_get,_apt.pkgCachePkgIterator_RevDepends_set) + __swig_setmethods__["SelectedState"] = _apt.pkgCachePkgIterator_SelectedState_set + __swig_getmethods__["SelectedState"] = _apt.pkgCachePkgIterator_SelectedState_get + if _newclass:SelectedState = property(_apt.pkgCachePkgIterator_SelectedState_get,_apt.pkgCachePkgIterator_SelectedState_set) + __swig_setmethods__["InstState"] = _apt.pkgCachePkgIterator_InstState_set + __swig_getmethods__["InstState"] = _apt.pkgCachePkgIterator_InstState_get + if _newclass:InstState = property(_apt.pkgCachePkgIterator_InstState_get,_apt.pkgCachePkgIterator_InstState_set) + __swig_setmethods__["CurrentState"] = _apt.pkgCachePkgIterator_CurrentState_set + __swig_getmethods__["CurrentState"] = _apt.pkgCachePkgIterator_CurrentState_get + if _newclass:CurrentState = property(_apt.pkgCachePkgIterator_CurrentState_get,_apt.pkgCachePkgIterator_CurrentState_set) + __swig_setmethods__["ID"] = _apt.pkgCachePkgIterator_ID_set + __swig_getmethods__["ID"] = _apt.pkgCachePkgIterator_ID_get + if _newclass:ID = property(_apt.pkgCachePkgIterator_ID_get,_apt.pkgCachePkgIterator_ID_set) + __swig_setmethods__["Flags"] = _apt.pkgCachePkgIterator_Flags_set + __swig_getmethods__["Flags"] = _apt.pkgCachePkgIterator_Flags_get + if _newclass:Flags = property(_apt.pkgCachePkgIterator_Flags_get,_apt.pkgCachePkgIterator_Flags_set) + def __del__(self, destroy= _apt.delete_pkgCachePkgIterator): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCachePkgIterator instance at %s>" % (self.this,) + +class pkgCachePkgIteratorPtr(pkgCachePkgIterator): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCachePkgIterator +_apt.pkgCachePkgIterator_swigregister(pkgCachePkgIteratorPtr) + +class pkgCacheVerIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheVerIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheVerIterator, name) + def next(*args): return apply(_apt.pkgCacheVerIterator_next,args) + def end(*args): return apply(_apt.pkgCacheVerIterator_end,args) + def assign(*args): return apply(_apt.pkgCacheVerIterator_assign,args) + def __eq__(*args): return apply(_apt.pkgCacheVerIterator___eq__,args) + def __ne__(*args): return apply(_apt.pkgCacheVerIterator___ne__,args) + def CompareVer(*args): return apply(_apt.pkgCacheVerIterator_CompareVer,args) + def __deref__(*args): return apply(_apt.pkgCacheVerIterator___deref__,args) + def __mul__(*args): return apply(_apt.pkgCacheVerIterator___mul__,args) + def Cache(*args): return apply(_apt.pkgCacheVerIterator_Cache,args) + def VerStr(*args): return apply(_apt.pkgCacheVerIterator_VerStr,args) + def Section(*args): return apply(_apt.pkgCacheVerIterator_Section,args) + def Arch(*args): return apply(_apt.pkgCacheVerIterator_Arch,args) + def ParentPkg(*args): return apply(_apt.pkgCacheVerIterator_ParentPkg,args) + def DependsList(*args): return apply(_apt.pkgCacheVerIterator_DependsList,args) + def ProvidesList(*args): return apply(_apt.pkgCacheVerIterator_ProvidesList,args) + def FileList(*args): return apply(_apt.pkgCacheVerIterator_FileList,args) + def Index(*args): return apply(_apt.pkgCacheVerIterator_Index,args) + def Downloadable(*args): return apply(_apt.pkgCacheVerIterator_Downloadable,args) + def PriorityType(*args): return apply(_apt.pkgCacheVerIterator_PriorityType,args) + def RelStr(*args): return apply(_apt.pkgCacheVerIterator_RelStr,args) + def Automatic(*args): return apply(_apt.pkgCacheVerIterator_Automatic,args) + def NewestFile(*args): return apply(_apt.pkgCacheVerIterator_NewestFile,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheVerIterator,args) + self.thisown = 1 + __swig_setmethods__["NextVer"] = _apt.pkgCacheVerIterator_NextVer_set + __swig_getmethods__["NextVer"] = _apt.pkgCacheVerIterator_NextVer_get + if _newclass:NextVer = property(_apt.pkgCacheVerIterator_NextVer_get,_apt.pkgCacheVerIterator_NextVer_set) + __swig_setmethods__["Size"] = _apt.pkgCacheVerIterator_Size_set + __swig_getmethods__["Size"] = _apt.pkgCacheVerIterator_Size_get + if _newclass:Size = property(_apt.pkgCacheVerIterator_Size_get,_apt.pkgCacheVerIterator_Size_set) + __swig_setmethods__["InstalledSize"] = _apt.pkgCacheVerIterator_InstalledSize_set + __swig_getmethods__["InstalledSize"] = _apt.pkgCacheVerIterator_InstalledSize_get + if _newclass:InstalledSize = property(_apt.pkgCacheVerIterator_InstalledSize_get,_apt.pkgCacheVerIterator_InstalledSize_set) + __swig_setmethods__["Hash"] = _apt.pkgCacheVerIterator_Hash_set + __swig_getmethods__["Hash"] = _apt.pkgCacheVerIterator_Hash_get + if _newclass:Hash = property(_apt.pkgCacheVerIterator_Hash_get,_apt.pkgCacheVerIterator_Hash_set) + __swig_setmethods__["ID"] = _apt.pkgCacheVerIterator_ID_set + __swig_getmethods__["ID"] = _apt.pkgCacheVerIterator_ID_get + if _newclass:ID = property(_apt.pkgCacheVerIterator_ID_get,_apt.pkgCacheVerIterator_ID_set) + __swig_setmethods__["Priority"] = _apt.pkgCacheVerIterator_Priority_set + __swig_getmethods__["Priority"] = _apt.pkgCacheVerIterator_Priority_get + if _newclass:Priority = property(_apt.pkgCacheVerIterator_Priority_get,_apt.pkgCacheVerIterator_Priority_set) + def __del__(self, destroy= _apt.delete_pkgCacheVerIterator): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheVerIterator instance at %s>" % (self.this,) + +class pkgCacheVerIteratorPtr(pkgCacheVerIterator): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheVerIterator +_apt.pkgCacheVerIterator_swigregister(pkgCacheVerIteratorPtr) + +class pkgCacheDepIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheDepIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheDepIterator, name) + def next(*args): return apply(_apt.pkgCacheDepIterator_next,args) + def end(*args): return apply(_apt.pkgCacheDepIterator_end,args) + def __eq__(*args): return apply(_apt.pkgCacheDepIterator___eq__,args) + def __ne__(*args): return apply(_apt.pkgCacheDepIterator___ne__,args) + def __deref__(*args): return apply(_apt.pkgCacheDepIterator___deref__,args) + def __mul__(*args): return apply(_apt.pkgCacheDepIterator___mul__,args) + def Cache(*args): return apply(_apt.pkgCacheDepIterator_Cache,args) + def TargetVer(*args): return apply(_apt.pkgCacheDepIterator_TargetVer,args) + def TargetPkg(*args): return apply(_apt.pkgCacheDepIterator_TargetPkg,args) + def ParentVer(*args): return apply(_apt.pkgCacheDepIterator_ParentVer,args) + def ParentPkg(*args): return apply(_apt.pkgCacheDepIterator_ParentPkg,args) + def Reverse(*args): return apply(_apt.pkgCacheDepIterator_Reverse,args) + def Index(*args): return apply(_apt.pkgCacheDepIterator_Index,args) + def IsCritical(*args): return apply(_apt.pkgCacheDepIterator_IsCritical,args) + def GlobOr(*args): return apply(_apt.pkgCacheDepIterator_GlobOr,args) + def AllTargets(*args): return apply(_apt.pkgCacheDepIterator_AllTargets,args) + def SmartTargetPkg(*args): return apply(_apt.pkgCacheDepIterator_SmartTargetPkg,args) + def CompType(*args): return apply(_apt.pkgCacheDepIterator_CompType,args) + def DepType(*args): return apply(_apt.pkgCacheDepIterator_DepType,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheDepIterator,args) + self.thisown = 1 + __swig_setmethods__["Version"] = _apt.pkgCacheDepIterator_Version_set + __swig_getmethods__["Version"] = _apt.pkgCacheDepIterator_Version_get + if _newclass:Version = property(_apt.pkgCacheDepIterator_Version_get,_apt.pkgCacheDepIterator_Version_set) + __swig_setmethods__["Package"] = _apt.pkgCacheDepIterator_Package_set + __swig_getmethods__["Package"] = _apt.pkgCacheDepIterator_Package_get + if _newclass:Package = property(_apt.pkgCacheDepIterator_Package_get,_apt.pkgCacheDepIterator_Package_set) + __swig_setmethods__["NextDepends"] = _apt.pkgCacheDepIterator_NextDepends_set + __swig_getmethods__["NextDepends"] = _apt.pkgCacheDepIterator_NextDepends_get + if _newclass:NextDepends = property(_apt.pkgCacheDepIterator_NextDepends_get,_apt.pkgCacheDepIterator_NextDepends_set) + __swig_setmethods__["NextRevDepends"] = _apt.pkgCacheDepIterator_NextRevDepends_set + __swig_getmethods__["NextRevDepends"] = _apt.pkgCacheDepIterator_NextRevDepends_get + if _newclass:NextRevDepends = property(_apt.pkgCacheDepIterator_NextRevDepends_get,_apt.pkgCacheDepIterator_NextRevDepends_set) + __swig_setmethods__["ID"] = _apt.pkgCacheDepIterator_ID_set + __swig_getmethods__["ID"] = _apt.pkgCacheDepIterator_ID_get + if _newclass:ID = property(_apt.pkgCacheDepIterator_ID_get,_apt.pkgCacheDepIterator_ID_set) + __swig_setmethods__["Type"] = _apt.pkgCacheDepIterator_Type_set + __swig_getmethods__["Type"] = _apt.pkgCacheDepIterator_Type_get + if _newclass:Type = property(_apt.pkgCacheDepIterator_Type_get,_apt.pkgCacheDepIterator_Type_set) + __swig_setmethods__["CompareOp"] = _apt.pkgCacheDepIterator_CompareOp_set + __swig_getmethods__["CompareOp"] = _apt.pkgCacheDepIterator_CompareOp_get + if _newclass:CompareOp = property(_apt.pkgCacheDepIterator_CompareOp_get,_apt.pkgCacheDepIterator_CompareOp_set) + def __del__(self, destroy= _apt.delete_pkgCacheDepIterator): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheDepIterator instance at %s>" % (self.this,) + +class pkgCacheDepIteratorPtr(pkgCacheDepIterator): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheDepIterator +_apt.pkgCacheDepIterator_swigregister(pkgCacheDepIteratorPtr) + +class pkgCachePrvIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCachePrvIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCachePrvIterator, name) + def next(*args): return apply(_apt.pkgCachePrvIterator_next,args) + def end(*args): return apply(_apt.pkgCachePrvIterator_end,args) + def __eq__(*args): return apply(_apt.pkgCachePrvIterator___eq__,args) + def __ne__(*args): return apply(_apt.pkgCachePrvIterator___ne__,args) + def __deref__(*args): return apply(_apt.pkgCachePrvIterator___deref__,args) + def __mul__(*args): return apply(_apt.pkgCachePrvIterator___mul__,args) + def Cache(*args): return apply(_apt.pkgCachePrvIterator_Cache,args) + def Name(*args): return apply(_apt.pkgCachePrvIterator_Name,args) + def ProvideVersion(*args): return apply(_apt.pkgCachePrvIterator_ProvideVersion,args) + def ParentPkg(*args): return apply(_apt.pkgCachePrvIterator_ParentPkg,args) + def OwnerVer(*args): return apply(_apt.pkgCachePrvIterator_OwnerVer,args) + def OwnerPkg(*args): return apply(_apt.pkgCachePrvIterator_OwnerPkg,args) + def Index(*args): return apply(_apt.pkgCachePrvIterator_Index,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCachePrvIterator,args) + self.thisown = 1 + __swig_setmethods__["Version"] = _apt.pkgCachePrvIterator_Version_set + __swig_getmethods__["Version"] = _apt.pkgCachePrvIterator_Version_get + if _newclass:Version = property(_apt.pkgCachePrvIterator_Version_get,_apt.pkgCachePrvIterator_Version_set) + __swig_setmethods__["NextProvides"] = _apt.pkgCachePrvIterator_NextProvides_set + __swig_getmethods__["NextProvides"] = _apt.pkgCachePrvIterator_NextProvides_get + if _newclass:NextProvides = property(_apt.pkgCachePrvIterator_NextProvides_get,_apt.pkgCachePrvIterator_NextProvides_set) + __swig_setmethods__["NextPkgProv"] = _apt.pkgCachePrvIterator_NextPkgProv_set + __swig_getmethods__["NextPkgProv"] = _apt.pkgCachePrvIterator_NextPkgProv_get + if _newclass:NextPkgProv = property(_apt.pkgCachePrvIterator_NextPkgProv_get,_apt.pkgCachePrvIterator_NextPkgProv_set) + def __del__(self, destroy= _apt.delete_pkgCachePrvIterator): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCachePrvIterator instance at %s>" % (self.this,) + +class pkgCachePrvIteratorPtr(pkgCachePrvIterator): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCachePrvIterator +_apt.pkgCachePrvIterator_swigregister(pkgCachePrvIteratorPtr) + +class pkgCachePkgFileIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCachePkgFileIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCachePkgFileIterator, name) + def next(*args): return apply(_apt.pkgCachePkgFileIterator_next,args) + def end(*args): return apply(_apt.pkgCachePkgFileIterator_end,args) + def __eq__(*args): return apply(_apt.pkgCachePkgFileIterator___eq__,args) + def __ne__(*args): return apply(_apt.pkgCachePkgFileIterator___ne__,args) + def __deref__(*args): return apply(_apt.pkgCachePkgFileIterator___deref__,args) + def __mul__(*args): return apply(_apt.pkgCachePkgFileIterator___mul__,args) + def Cache(*args): return apply(_apt.pkgCachePkgFileIterator_Cache,args) + def FileName(*args): return apply(_apt.pkgCachePkgFileIterator_FileName,args) + def Archive(*args): return apply(_apt.pkgCachePkgFileIterator_Archive,args) + def Component(*args): return apply(_apt.pkgCachePkgFileIterator_Component,args) + def Version(*args): return apply(_apt.pkgCachePkgFileIterator_Version,args) + def Origin(*args): return apply(_apt.pkgCachePkgFileIterator_Origin,args) + def Label(*args): return apply(_apt.pkgCachePkgFileIterator_Label,args) + def Site(*args): return apply(_apt.pkgCachePkgFileIterator_Site,args) + def Architecture(*args): return apply(_apt.pkgCachePkgFileIterator_Architecture,args) + def IndexType(*args): return apply(_apt.pkgCachePkgFileIterator_IndexType,args) + def Index(*args): return apply(_apt.pkgCachePkgFileIterator_Index,args) + def IsOk(*args): return apply(_apt.pkgCachePkgFileIterator_IsOk,args) + def RelStr(*args): return apply(_apt.pkgCachePkgFileIterator_RelStr,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCachePkgFileIterator,args) + self.thisown = 1 + __swig_setmethods__["Size"] = _apt.pkgCachePkgFileIterator_Size_set + __swig_getmethods__["Size"] = _apt.pkgCachePkgFileIterator_Size_get + if _newclass:Size = property(_apt.pkgCachePkgFileIterator_Size_get,_apt.pkgCachePkgFileIterator_Size_set) + __swig_setmethods__["Flags"] = _apt.pkgCachePkgFileIterator_Flags_set + __swig_getmethods__["Flags"] = _apt.pkgCachePkgFileIterator_Flags_get + if _newclass:Flags = property(_apt.pkgCachePkgFileIterator_Flags_get,_apt.pkgCachePkgFileIterator_Flags_set) + __swig_setmethods__["NextFile"] = _apt.pkgCachePkgFileIterator_NextFile_set + __swig_getmethods__["NextFile"] = _apt.pkgCachePkgFileIterator_NextFile_get + if _newclass:NextFile = property(_apt.pkgCachePkgFileIterator_NextFile_get,_apt.pkgCachePkgFileIterator_NextFile_set) + __swig_setmethods__["ID"] = _apt.pkgCachePkgFileIterator_ID_set + __swig_getmethods__["ID"] = _apt.pkgCachePkgFileIterator_ID_get + if _newclass:ID = property(_apt.pkgCachePkgFileIterator_ID_get,_apt.pkgCachePkgFileIterator_ID_set) + __swig_setmethods__["mtime"] = _apt.pkgCachePkgFileIterator_mtime_set + __swig_getmethods__["mtime"] = _apt.pkgCachePkgFileIterator_mtime_get + if _newclass:mtime = property(_apt.pkgCachePkgFileIterator_mtime_get,_apt.pkgCachePkgFileIterator_mtime_set) + def __del__(self, destroy= _apt.delete_pkgCachePkgFileIterator): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCachePkgFileIterator instance at %s>" % (self.this,) + +class pkgCachePkgFileIteratorPtr(pkgCachePkgFileIterator): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCachePkgFileIterator +_apt.pkgCachePkgFileIterator_swigregister(pkgCachePkgFileIteratorPtr) + +class pkgCacheVerFileIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheVerFileIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheVerFileIterator, name) + def next(*args): return apply(_apt.pkgCacheVerFileIterator_next,args) + def end(*args): return apply(_apt.pkgCacheVerFileIterator_end,args) + def __eq__(*args): return apply(_apt.pkgCacheVerFileIterator___eq__,args) + def __ne__(*args): return apply(_apt.pkgCacheVerFileIterator___ne__,args) + def __deref__(*args): return apply(_apt.pkgCacheVerFileIterator___deref__,args) + def __mul__(*args): return apply(_apt.pkgCacheVerFileIterator___mul__,args) + def Cache(*args): return apply(_apt.pkgCacheVerFileIterator_Cache,args) + def File(*args): return apply(_apt.pkgCacheVerFileIterator_File,args) + def Index(*args): return apply(_apt.pkgCacheVerFileIterator_Index,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheVerFileIterator,args) + self.thisown = 1 + __swig_setmethods__["NextFile"] = _apt.pkgCacheVerFileIterator_NextFile_set + __swig_getmethods__["NextFile"] = _apt.pkgCacheVerFileIterator_NextFile_get + if _newclass:NextFile = property(_apt.pkgCacheVerFileIterator_NextFile_get,_apt.pkgCacheVerFileIterator_NextFile_set) + __swig_setmethods__["Offset"] = _apt.pkgCacheVerFileIterator_Offset_set + __swig_getmethods__["Offset"] = _apt.pkgCacheVerFileIterator_Offset_get + if _newclass:Offset = property(_apt.pkgCacheVerFileIterator_Offset_get,_apt.pkgCacheVerFileIterator_Offset_set) + __swig_setmethods__["Size"] = _apt.pkgCacheVerFileIterator_Size_set + __swig_getmethods__["Size"] = _apt.pkgCacheVerFileIterator_Size_get + if _newclass:Size = property(_apt.pkgCacheVerFileIterator_Size_get,_apt.pkgCacheVerFileIterator_Size_set) + def __del__(self, destroy= _apt.delete_pkgCacheVerFileIterator): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgCacheVerFileIterator instance at %s>" % (self.this,) + +class pkgCacheVerFileIteratorPtr(pkgCacheVerFileIterator): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheVerFileIterator +_apt.pkgCacheVerFileIterator_swigregister(pkgCacheVerFileIteratorPtr) + +class pkgCacheFile(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgCacheFile, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgCacheFile, name) + __swig_setmethods__["Policy"] = _apt.pkgCacheFile_Policy_set + __swig_getmethods__["Policy"] = _apt.pkgCacheFile_Policy_get + if _newclass:Policy = property(_apt.pkgCacheFile_Policy_get,_apt.pkgCacheFile_Policy_set) + def pkgCache(*args): return apply(_apt.pkgCacheFile_pkgCache,args) + def pkgDepCache(*args): return apply(_apt.pkgCacheFile_pkgDepCache,args) + def __deref__(*args): return apply(_apt.pkgCacheFile___deref__,args) + def __mul__(*args): return apply(_apt.pkgCacheFile___mul__,args) + def __getitem__(*args): return apply(_apt.pkgCacheFile___getitem__,args) + def BuildCaches(*args): return apply(_apt.pkgCacheFile_BuildCaches,args) + def Open(*args): return apply(_apt.pkgCacheFile_Open,args) + def Close(*args): return apply(_apt.pkgCacheFile_Close,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgCacheFile,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgCacheFile): + try: + if self.thisown: destroy(self) + except: pass + def BuildGroupOrs(*args): return apply(_apt.pkgCacheFile_BuildGroupOrs,args) + def UpdateVerState(*args): return apply(_apt.pkgCacheFile_UpdateVerState,args) + def Head(*args): return apply(_apt.pkgCacheFile_Head,args) + def PkgBegin(*args): return apply(_apt.pkgCacheFile_PkgBegin,args) + def FindPkg(*args): return apply(_apt.pkgCacheFile_FindPkg,args) + def GetCache(*args): return apply(_apt.pkgCacheFile_GetCache,args) + def VS(*args): return apply(_apt.pkgCacheFile_VS,args) + def GetCandidateVer(*args): return apply(_apt.pkgCacheFile_GetCandidateVer,args) + def IsImportantDep(*args): return apply(_apt.pkgCacheFile_IsImportantDep,args) + def GetPolicy(*args): return apply(_apt.pkgCacheFile_GetPolicy,args) + def MarkKeep(*args): return apply(_apt.pkgCacheFile_MarkKeep,args) + def MarkDelete(*args): return apply(_apt.pkgCacheFile_MarkDelete,args) + def MarkInstall(*args): return apply(_apt.pkgCacheFile_MarkInstall,args) + def SetReInstall(*args): return apply(_apt.pkgCacheFile_SetReInstall,args) + def SetCandidateVersion(*args): return apply(_apt.pkgCacheFile_SetCandidateVersion,args) + def Update(*args): return apply(_apt.pkgCacheFile_Update,args) + def UsrSize(*args): return apply(_apt.pkgCacheFile_UsrSize,args) + def DebSize(*args): return apply(_apt.pkgCacheFile_DebSize,args) + def DelCount(*args): return apply(_apt.pkgCacheFile_DelCount,args) + def KeepCount(*args): return apply(_apt.pkgCacheFile_KeepCount,args) + def InstCount(*args): return apply(_apt.pkgCacheFile_InstCount,args) + def BrokenCount(*args): return apply(_apt.pkgCacheFile_BrokenCount,args) + def BadCount(*args): return apply(_apt.pkgCacheFile_BadCount,args) + def Init(*args): return apply(_apt.pkgCacheFile_Init,args) + def __repr__(self): + return "<C pkgCacheFile instance at %s>" % (self.this,) + +class pkgCacheFilePtr(pkgCacheFile): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgCacheFile +_apt.pkgCacheFile_swigregister(pkgCacheFilePtr) + +class pkgProblemResolver(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgProblemResolver, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgProblemResolver, name) + def Protect(*args): return apply(_apt.pkgProblemResolver_Protect,args) + def Remove(*args): return apply(_apt.pkgProblemResolver_Remove,args) + def Clear(*args): return apply(_apt.pkgProblemResolver_Clear,args) + def Resolve(*args): return apply(_apt.pkgProblemResolver_Resolve,args) + def ResolveByKeep(*args): return apply(_apt.pkgProblemResolver_ResolveByKeep,args) + def InstallProtect(*args): return apply(_apt.pkgProblemResolver_InstallProtect,args) + def RemoveDepends(*args): return apply(_apt.pkgProblemResolver_RemoveDepends,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgProblemResolver,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgProblemResolver): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgProblemResolver instance at %s>" % (self.this,) + +class pkgProblemResolverPtr(pkgProblemResolver): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgProblemResolver +_apt.pkgProblemResolver_swigregister(pkgProblemResolverPtr) + +pkgDistUpgrade = _apt.pkgDistUpgrade + +pkgApplyStatus = _apt.pkgApplyStatus + +pkgFixBroken = _apt.pkgFixBroken + +pkgAllUpgrade = _apt.pkgAllUpgrade + +pkgMinimizeUpgrade = _apt.pkgMinimizeUpgrade + +pkgPrioSortList = _apt.pkgPrioSortList + +class pkgSystem(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgSystem, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgSystem, name) + __swig_getmethods__["GetSystem"] = lambda x: _apt.pkgSystem_GetSystem + if _newclass:GetSystem = staticmethod(_apt.pkgSystem_GetSystem) + __swig_getmethods__["Label"] = _apt.pkgSystem_Label_get + if _newclass:Label = property(_apt.pkgSystem_Label_get) + __swig_setmethods__["VS"] = _apt.pkgSystem_VS_set + __swig_getmethods__["VS"] = _apt.pkgSystem_VS_get + if _newclass:VS = property(_apt.pkgSystem_VS_get,_apt.pkgSystem_VS_set) + def Lock(*args): return apply(_apt.pkgSystem_Lock,args) + def UnLock(*args): return apply(_apt.pkgSystem_UnLock,args) + def LockRead(*args): return apply(_apt.pkgSystem_LockRead,args) + def CreatePM(*args): return apply(_apt.pkgSystem_CreatePM,args) + def Initialize(*args): return apply(_apt.pkgSystem_Initialize,args) + def ArchiveSupported(*args): return apply(_apt.pkgSystem_ArchiveSupported,args) + def AddStatusFiles(*args): return apply(_apt.pkgSystem_AddStatusFiles,args) + def FindIndex(*args): return apply(_apt.pkgSystem_FindIndex,args) + def Score(*args): return apply(_apt.pkgSystem_Score,args) + def PreProcess(*args): return apply(_apt.pkgSystem_PreProcess,args) + def ProcessCache(*args): return apply(_apt.pkgSystem_ProcessCache,args) + def IgnoreDep(*args): return apply(_apt.pkgSystem_IgnoreDep,args) + def __del__(self, destroy= _apt.delete_pkgSystem): + try: + if self.thisown: destroy(self) + except: pass + def __init__(self): raise RuntimeError, "No constructor defined" + def __repr__(self): + return "<C pkgSystem instance at %s>" % (self.this,) + +class pkgSystemPtr(pkgSystem): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgSystem +_apt.pkgSystem_swigregister(pkgSystemPtr) +pkgSystem_GetSystem = _apt.pkgSystem_GetSystem + + +class Configuration(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Configuration, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Configuration, name) + def Find(*args): return apply(_apt.Configuration_Find,args) + def FindFile(*args): return apply(_apt.Configuration_FindFile,args) + def FindDir(*args): return apply(_apt.Configuration_FindDir,args) + def FindI(*args): return apply(_apt.Configuration_FindI,args) + def FindB(*args): return apply(_apt.Configuration_FindB,args) + def FindAny(*args): return apply(_apt.Configuration_FindAny,args) + def CndSet(*args): return apply(_apt.Configuration_CndSet,args) + def Set(*args): return apply(_apt.Configuration_Set,args) + def Exists(*args): return apply(_apt.Configuration_Exists,args) + def ExistsAny(*args): return apply(_apt.Configuration_ExistsAny,args) + def Clear(*args): return apply(_apt.Configuration_Clear,args) + def Tree(*args): return apply(_apt.Configuration_Tree,args) + def Dump(*args): return apply(_apt.Configuration_Dump,args) + def __init__(self,*args): + self.this = apply(_apt.new_Configuration,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_Configuration): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C Configuration instance at %s>" % (self.this,) + +class ConfigurationPtr(Configuration): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = Configuration +_apt.Configuration_swigregister(ConfigurationPtr) + +ReadConfigFile = _apt.ReadConfigFile + +ReadConfigDir = _apt.ReadConfigDir + +class OpProgress(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, OpProgress, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, OpProgress, name) + def Progress(*args): return apply(_apt.OpProgress_Progress,args) + def SubProgress(*args): return apply(_apt.OpProgress_SubProgress,args) + def OverallProgress(*args): return apply(_apt.OpProgress_OverallProgress,args) + def Done(*args): return apply(_apt.OpProgress_Done,args) + def __init__(self,*args): + self.this = apply(_apt.new_OpProgress,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_OpProgress): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C OpProgress instance at %s>" % (self.this,) + +class OpProgressPtr(OpProgress): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = OpProgress +_apt.OpProgress_swigregister(OpProgressPtr) + +class OpTextProgress(OpProgress): + __swig_setmethods__ = {} + for _s in [OpProgress]: __swig_setmethods__.update(_s.__swig_setmethods__) + __setattr__ = lambda self, name, value: _swig_setattr(self, OpTextProgress, name, value) + __swig_getmethods__ = {} + for _s in [OpProgress]: __swig_getmethods__.update(_s.__swig_getmethods__) + __getattr__ = lambda self, name: _swig_getattr(self, OpTextProgress, name) + def Done(*args): return apply(_apt.OpTextProgress_Done,args) + def __init__(self,*args): + self.this = apply(_apt.new_OpTextProgress,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_OpTextProgress): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C OpTextProgress instance at %s>" % (self.this,) + +class OpTextProgressPtr(OpTextProgress): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = OpTextProgress +_apt.OpTextProgress_swigregister(OpTextProgressPtr) + +class pkgVersioningSystem(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgVersioningSystem, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgVersioningSystem, name) + __swig_getmethods__["GetVS"] = lambda x: _apt.pkgVersioningSystem_GetVS + if _newclass:GetVS = staticmethod(_apt.pkgVersioningSystem_GetVS) + __swig_getmethods__["Label"] = _apt.pkgVersioningSystem_Label_get + if _newclass:Label = property(_apt.pkgVersioningSystem_Label_get) + def DoCmpVersion(*args): return apply(_apt.pkgVersioningSystem_DoCmpVersion,args) + def DoCmpVersionArch(*args): return apply(_apt.pkgVersioningSystem_DoCmpVersionArch,args) + def CmpVersionArch(*args): return apply(_apt.pkgVersioningSystem_CmpVersionArch,args) + def CheckDep(*args): return apply(_apt.pkgVersioningSystem_CheckDep,args) + def DoCmpReleaseVer(*args): return apply(_apt.pkgVersioningSystem_DoCmpReleaseVer,args) + def UpstreamVersion(*args): return apply(_apt.pkgVersioningSystem_UpstreamVersion,args) + def TestCompatibility(*args): return apply(_apt.pkgVersioningSystem_TestCompatibility,args) + def CmpVersion(*args): return apply(_apt.pkgVersioningSystem_CmpVersion,args) + def CmpReleaseVer(*args): return apply(_apt.pkgVersioningSystem_CmpReleaseVer,args) + def __del__(self, destroy= _apt.delete_pkgVersioningSystem): + try: + if self.thisown: destroy(self) + except: pass + def __init__(self): raise RuntimeError, "No constructor defined" + def __repr__(self): + return "<C pkgVersioningSystem instance at %s>" % (self.this,) + +class pkgVersioningSystemPtr(pkgVersioningSystem): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgVersioningSystem +_apt.pkgVersioningSystem_swigregister(pkgVersioningSystemPtr) +pkgVersioningSystem_GetVS = _apt.pkgVersioningSystem_GetVS + + +class pkgRecords(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgRecords, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgRecords, name) + def Lookup(*args): return apply(_apt.pkgRecords_Lookup,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgRecords,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgRecords): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgRecords instance at %s>" % (self.this,) + +class pkgRecordsPtr(pkgRecords): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgRecords +_apt.pkgRecords_swigregister(pkgRecordsPtr) + +class pkgRecordsParser(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgRecordsParser, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgRecordsParser, name) + def FileName(*args): return apply(_apt.pkgRecordsParser_FileName,args) + def MD5Hash(*args): return apply(_apt.pkgRecordsParser_MD5Hash,args) + def SHA1Hash(*args): return apply(_apt.pkgRecordsParser_SHA1Hash,args) + def SourcePkg(*args): return apply(_apt.pkgRecordsParser_SourcePkg,args) + def Maintainer(*args): return apply(_apt.pkgRecordsParser_Maintainer,args) + def ShortDesc(*args): return apply(_apt.pkgRecordsParser_ShortDesc,args) + def LongDesc(*args): return apply(_apt.pkgRecordsParser_LongDesc,args) + def Name(*args): return apply(_apt.pkgRecordsParser_Name,args) + def GetRec(*args): return apply(_apt.pkgRecordsParser_GetRec,args) + def __del__(self, destroy= _apt.delete_pkgRecordsParser): + try: + if self.thisown: destroy(self) + except: pass + def __init__(self): raise RuntimeError, "No constructor defined" + def __repr__(self): + return "<C pkgRecordsParser instance at %s>" % (self.this,) + +class pkgRecordsParserPtr(pkgRecordsParser): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgRecordsParser +_apt.pkgRecordsParser_swigregister(pkgRecordsParserPtr) + +class pkgAcquireItem(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcquireItem, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcquireItem, name) + StatIdle = _apt.pkgAcquireItem_StatIdle + StatFetching = _apt.pkgAcquireItem_StatFetching + StatDone = _apt.pkgAcquireItem_StatDone + StatError = _apt.pkgAcquireItem_StatError + __swig_setmethods__["Status"] = _apt.pkgAcquireItem_Status_set + __swig_getmethods__["Status"] = _apt.pkgAcquireItem_Status_get + if _newclass:Status = property(_apt.pkgAcquireItem_Status_get,_apt.pkgAcquireItem_Status_set) + __swig_setmethods__["ErrorText"] = _apt.pkgAcquireItem_ErrorText_set + __swig_getmethods__["ErrorText"] = _apt.pkgAcquireItem_ErrorText_get + if _newclass:ErrorText = property(_apt.pkgAcquireItem_ErrorText_get,_apt.pkgAcquireItem_ErrorText_set) + __swig_setmethods__["FileSize"] = _apt.pkgAcquireItem_FileSize_set + __swig_getmethods__["FileSize"] = _apt.pkgAcquireItem_FileSize_get + if _newclass:FileSize = property(_apt.pkgAcquireItem_FileSize_get,_apt.pkgAcquireItem_FileSize_set) + __swig_setmethods__["PartialSize"] = _apt.pkgAcquireItem_PartialSize_set + __swig_getmethods__["PartialSize"] = _apt.pkgAcquireItem_PartialSize_get + if _newclass:PartialSize = property(_apt.pkgAcquireItem_PartialSize_get,_apt.pkgAcquireItem_PartialSize_set) + __swig_setmethods__["Mode"] = _apt.pkgAcquireItem_Mode_set + __swig_getmethods__["Mode"] = _apt.pkgAcquireItem_Mode_get + if _newclass:Mode = property(_apt.pkgAcquireItem_Mode_get,_apt.pkgAcquireItem_Mode_set) + __swig_setmethods__["ID"] = _apt.pkgAcquireItem_ID_set + __swig_getmethods__["ID"] = _apt.pkgAcquireItem_ID_get + if _newclass:ID = property(_apt.pkgAcquireItem_ID_get,_apt.pkgAcquireItem_ID_set) + __swig_setmethods__["Complete"] = _apt.pkgAcquireItem_Complete_set + __swig_getmethods__["Complete"] = _apt.pkgAcquireItem_Complete_get + if _newclass:Complete = property(_apt.pkgAcquireItem_Complete_get,_apt.pkgAcquireItem_Complete_set) + __swig_setmethods__["Local"] = _apt.pkgAcquireItem_Local_set + __swig_getmethods__["Local"] = _apt.pkgAcquireItem_Local_get + if _newclass:Local = property(_apt.pkgAcquireItem_Local_get,_apt.pkgAcquireItem_Local_set) + __swig_setmethods__["QueueCounter"] = _apt.pkgAcquireItem_QueueCounter_set + __swig_getmethods__["QueueCounter"] = _apt.pkgAcquireItem_QueueCounter_get + if _newclass:QueueCounter = property(_apt.pkgAcquireItem_QueueCounter_get,_apt.pkgAcquireItem_QueueCounter_set) + __swig_setmethods__["DestFile"] = _apt.pkgAcquireItem_DestFile_set + __swig_getmethods__["DestFile"] = _apt.pkgAcquireItem_DestFile_get + if _newclass:DestFile = property(_apt.pkgAcquireItem_DestFile_get,_apt.pkgAcquireItem_DestFile_set) + def Failed(*args): return apply(_apt.pkgAcquireItem_Failed,args) + def Done(*args): return apply(_apt.pkgAcquireItem_Done,args) + def Start(*args): return apply(_apt.pkgAcquireItem_Start,args) + def Custom600Headers(*args): return apply(_apt.pkgAcquireItem_Custom600Headers,args) + def DescURI(*args): return apply(_apt.pkgAcquireItem_DescURI,args) + def Finished(*args): return apply(_apt.pkgAcquireItem_Finished,args) + def MD5Sum(*args): return apply(_apt.pkgAcquireItem_MD5Sum,args) + def GetOwner(*args): return apply(_apt.pkgAcquireItem_GetOwner,args) + def __del__(self, destroy= _apt.delete_pkgAcquireItem): + try: + if self.thisown: destroy(self) + except: pass + def __init__(self): raise RuntimeError, "No constructor defined" + def __repr__(self): + return "<C pkgAcquireItem instance at %s>" % (self.this,) + +class pkgAcquireItemPtr(pkgAcquireItem): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcquireItem +_apt.pkgAcquireItem_swigregister(pkgAcquireItemPtr) + +class pkgAcqIndex(pkgAcquireItem): + __swig_setmethods__ = {} + for _s in [pkgAcquireItem]: __swig_setmethods__.update(_s.__swig_setmethods__) + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcqIndex, name, value) + __swig_getmethods__ = {} + for _s in [pkgAcquireItem]: __swig_getmethods__.update(_s.__swig_getmethods__) + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcqIndex, name) + def Done(*args): return apply(_apt.pkgAcqIndex_Done,args) + def Custom600Headers(*args): return apply(_apt.pkgAcqIndex_Custom600Headers,args) + def DescURI(*args): return apply(_apt.pkgAcqIndex_DescURI,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgAcqIndex,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgAcqIndex): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgAcqIndex instance at %s>" % (self.this,) + +class pkgAcqIndexPtr(pkgAcqIndex): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcqIndex +_apt.pkgAcqIndex_swigregister(pkgAcqIndexPtr) + +class pkgAcqIndexRel(pkgAcquireItem): + __swig_setmethods__ = {} + for _s in [pkgAcquireItem]: __swig_setmethods__.update(_s.__swig_setmethods__) + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcqIndexRel, name, value) + __swig_getmethods__ = {} + for _s in [pkgAcquireItem]: __swig_getmethods__.update(_s.__swig_getmethods__) + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcqIndexRel, name) + def Failed(*args): return apply(_apt.pkgAcqIndexRel_Failed,args) + def Done(*args): return apply(_apt.pkgAcqIndexRel_Done,args) + def Custom600Headers(*args): return apply(_apt.pkgAcqIndexRel_Custom600Headers,args) + def DescURI(*args): return apply(_apt.pkgAcqIndexRel_DescURI,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgAcqIndexRel,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgAcqIndexRel): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgAcqIndexRel instance at %s>" % (self.this,) + +class pkgAcqIndexRelPtr(pkgAcqIndexRel): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcqIndexRel +_apt.pkgAcqIndexRel_swigregister(pkgAcqIndexRelPtr) + +class pkgAcqArchive(pkgAcquireItem): + __swig_setmethods__ = {} + for _s in [pkgAcquireItem]: __swig_setmethods__.update(_s.__swig_setmethods__) + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcqArchive, name, value) + __swig_getmethods__ = {} + for _s in [pkgAcquireItem]: __swig_getmethods__.update(_s.__swig_getmethods__) + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcqArchive, name) + def Failed(*args): return apply(_apt.pkgAcqArchive_Failed,args) + def Done(*args): return apply(_apt.pkgAcqArchive_Done,args) + def MD5Sum(*args): return apply(_apt.pkgAcqArchive_MD5Sum,args) + def DescURI(*args): return apply(_apt.pkgAcqArchive_DescURI,args) + def Finished(*args): return apply(_apt.pkgAcqArchive_Finished,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgAcqArchive,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgAcqArchive): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgAcqArchive instance at %s>" % (self.this,) + +class pkgAcqArchivePtr(pkgAcqArchive): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcqArchive +_apt.pkgAcqArchive_swigregister(pkgAcqArchivePtr) + +class pkgAcqFile(pkgAcquireItem): + __swig_setmethods__ = {} + for _s in [pkgAcquireItem]: __swig_setmethods__.update(_s.__swig_setmethods__) + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcqFile, name, value) + __swig_getmethods__ = {} + for _s in [pkgAcquireItem]: __swig_getmethods__.update(_s.__swig_getmethods__) + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcqFile, name) + def Failed(*args): return apply(_apt.pkgAcqFile_Failed,args) + def Done(*args): return apply(_apt.pkgAcqFile_Done,args) + def MD5Sum(*args): return apply(_apt.pkgAcqFile_MD5Sum,args) + def DescURI(*args): return apply(_apt.pkgAcqFile_DescURI,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgAcqFile,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgAcqFile): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgAcqFile instance at %s>" % (self.this,) + +class pkgAcqFilePtr(pkgAcqFile): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcqFile +_apt.pkgAcqFile_swigregister(pkgAcqFilePtr) + +class pkgAcquire(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcquire, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcquire, name) + def ItemsList(*args): return apply(_apt.pkgAcquire_ItemsList,args) + def GetConfig(*args): return apply(_apt.pkgAcquire_GetConfig,args) + Continue = _apt.pkgAcquire_Continue + Failed = _apt.pkgAcquire_Failed + Cancelled = _apt.pkgAcquire_Cancelled + def Run(*args): return apply(_apt.pkgAcquire_Run,args) + def Shutdown(*args): return apply(_apt.pkgAcquire_Shutdown,args) + def WorkersBegin(*args): return apply(_apt.pkgAcquire_WorkersBegin,args) + def WorkerStep(*args): return apply(_apt.pkgAcquire_WorkerStep,args) + def ItemsBegin(*args): return apply(_apt.pkgAcquire_ItemsBegin,args) + def ItemsEnd(*args): return apply(_apt.pkgAcquire_ItemsEnd,args) + def UriBegin(*args): return apply(_apt.pkgAcquire_UriBegin,args) + def UriEnd(*args): return apply(_apt.pkgAcquire_UriEnd,args) + def Clean(*args): return apply(_apt.pkgAcquire_Clean,args) + def TotalNeeded(*args): return apply(_apt.pkgAcquire_TotalNeeded,args) + def FetchNeeded(*args): return apply(_apt.pkgAcquire_FetchNeeded,args) + def PartialPresent(*args): return apply(_apt.pkgAcquire_PartialPresent,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgAcquire,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgAcquire): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgAcquire instance at %s>" % (self.this,) + +class pkgAcquirePtr(pkgAcquire): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcquire +_apt.pkgAcquire_swigregister(pkgAcquirePtr) + +class pkgAcquireStatus(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcquireStatus, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcquireStatus, name) + __swig_setmethods__["Update"] = _apt.pkgAcquireStatus_Update_set + __swig_getmethods__["Update"] = _apt.pkgAcquireStatus_Update_get + if _newclass:Update = property(_apt.pkgAcquireStatus_Update_get,_apt.pkgAcquireStatus_Update_set) + __swig_setmethods__["MorePulses"] = _apt.pkgAcquireStatus_MorePulses_set + __swig_getmethods__["MorePulses"] = _apt.pkgAcquireStatus_MorePulses_get + if _newclass:MorePulses = property(_apt.pkgAcquireStatus_MorePulses_get,_apt.pkgAcquireStatus_MorePulses_set) + def Fetched(*args): return apply(_apt.pkgAcquireStatus_Fetched,args) + def MediaChange(*args): return apply(_apt.pkgAcquireStatus_MediaChange,args) + def IMSHit(*args): return apply(_apt.pkgAcquireStatus_IMSHit,args) + def Fetch(*args): return apply(_apt.pkgAcquireStatus_Fetch,args) + def Done(*args): return apply(_apt.pkgAcquireStatus_Done,args) + def Fail(*args): return apply(_apt.pkgAcquireStatus_Fail,args) + def Pulse(*args): return apply(_apt.pkgAcquireStatus_Pulse,args) + def Start(*args): return apply(_apt.pkgAcquireStatus_Start,args) + def Stop(*args): return apply(_apt.pkgAcquireStatus_Stop,args) + def __del__(self, destroy= _apt.delete_pkgAcquireStatus): + try: + if self.thisown: destroy(self) + except: pass + def __init__(self): raise RuntimeError, "No constructor defined" + def __repr__(self): + return "<C pkgAcquireStatus instance at %s>" % (self.this,) + +class pkgAcquireStatusPtr(pkgAcquireStatus): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcquireStatus +_apt.pkgAcquireStatus_swigregister(pkgAcquireStatusPtr) + +class pkgPackageManager(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgPackageManager, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgPackageManager, name) + Completed = _apt.pkgPackageManager_Completed + Failed = _apt.pkgPackageManager_Failed + Incomplete = _apt.pkgPackageManager_Incomplete + def GetArchives(*args): return apply(_apt.pkgPackageManager_GetArchives,args) + def DoInstall(*args): return apply(_apt.pkgPackageManager_DoInstall,args) + def FixMissing(*args): return apply(_apt.pkgPackageManager_FixMissing,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgPackageManager,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgPackageManager): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgPackageManager instance at %s>" % (self.this,) + +class pkgPackageManagerPtr(pkgPackageManager): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgPackageManager +_apt.pkgPackageManager_swigregister(pkgPackageManagerPtr) + +class pkgSourceList(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgSourceList, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, pkgSourceList, name) + def ReadMainList(*args): return apply(_apt.pkgSourceList_ReadMainList,args) + def Read(*args): return apply(_apt.pkgSourceList_Read,args) + def ReadVendors(*args): return apply(_apt.pkgSourceList_ReadVendors,args) + def begin(*args): return apply(_apt.pkgSourceList_begin,args) + def end(*args): return apply(_apt.pkgSourceList_end,args) + def size(*args): return apply(_apt.pkgSourceList_size,args) + def empty(*args): return apply(_apt.pkgSourceList_empty,args) + def FindIndex(*args): return apply(_apt.pkgSourceList_FindIndex,args) + def GetIndexes(*args): return apply(_apt.pkgSourceList_GetIndexes,args) + def GetReleases(*args): return apply(_apt.pkgSourceList_GetReleases,args) + def __init__(self,*args): + self.this = apply(_apt.new_pkgSourceList,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgSourceList): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgSourceList instance at %s>" % (self.this,) + +class pkgSourceListPtr(pkgSourceList): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgSourceList +_apt.pkgSourceList_swigregister(pkgSourceListPtr) + +class GlobalError(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, GlobalError, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, GlobalError, name) + def Errno(*args): return apply(_apt.GlobalError_Errno,args) + def WarningE(*args): return apply(_apt.GlobalError_WarningE,args) + def Error(*args): return apply(_apt.GlobalError_Error,args) + def Warning(*args): return apply(_apt.GlobalError_Warning,args) + def PendingError(*args): return apply(_apt.GlobalError_PendingError,args) + def empty(*args): return apply(_apt.GlobalError_empty,args) + def PopMessage(*args): return apply(_apt.GlobalError_PopMessage,args) + def Discard(*args): return apply(_apt.GlobalError_Discard,args) + def DumpErrors(*args): return apply(_apt.GlobalError_DumpErrors,args) + def __init__(self,*args): + self.this = apply(_apt.new_GlobalError,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_GlobalError): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C GlobalError instance at %s>" % (self.this,) + +class GlobalErrorPtr(GlobalError): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = GlobalError +_apt.GlobalError_swigregister(GlobalErrorPtr) + +_GetErrorObj = _apt._GetErrorObj + +class pkgAcquireStatusDumb(pkgAcquireStatus): + __swig_setmethods__ = {} + for _s in [pkgAcquireStatus]: __swig_setmethods__.update(_s.__swig_setmethods__) + __setattr__ = lambda self, name, value: _swig_setattr(self, pkgAcquireStatusDumb, name, value) + __swig_getmethods__ = {} + for _s in [pkgAcquireStatus]: __swig_getmethods__.update(_s.__swig_getmethods__) + __getattr__ = lambda self, name: _swig_getattr(self, pkgAcquireStatusDumb, name) + def __init__(self,*args): + self.this = apply(_apt.new_pkgAcquireStatusDumb,args) + self.thisown = 1 + def __del__(self, destroy= _apt.delete_pkgAcquireStatusDumb): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C pkgAcquireStatusDumb instance at %s>" % (self.this,) + +class pkgAcquireStatusDumbPtr(pkgAcquireStatusDumb): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = pkgAcquireStatusDumb +_apt.pkgAcquireStatusDumb_swigregister(pkgAcquireStatusDumbPtr) + + diff --git a/apt/python/apt_wrap.cxx b/apt/python/apt_wrap.cxx new file mode 100644 index 0000000..cfa232c --- /dev/null +++ b/apt/python/apt_wrap.cxx @@ -0,0 +1,18896 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.16u-20021121-0100 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGPYTHON + +#ifdef __cplusplus +template<class T> class SwigValueWrapper { + T *tt; +public: + inline SwigValueWrapper() : tt(0) { } + inline ~SwigValueWrapper() { if (tt) delete tt; } + inline SwigValueWrapper& operator=(const T& t) { tt = new T(t); return *this; } + inline operator T&() const { return *tt; } + inline T *operator&() { return tt; } +}; +#endif + + +#include "Python.h" + +/*********************************************************************** + * common.swg + * + * This file contains generic SWIG runtime support for pointer + * type checking as well as a few commonly used macros to control + * external linkage. + * + * Author : David Beazley (beazley@cs.uchicago.edu) + * + * Copyright (c) 1999-2000, The University of Chicago + * + * This file may be freely redistributed without license or fee provided + * this copyright message remains intact. + ************************************************************************/ + +#include <string.h> + +#if defined(_WIN32) || defined(__WIN32__) +# if defined(_MSC_VER) +# if defined(STATIC_LINKED) +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) extern a +# else +# define SWIGEXPORT(a) __declspec(dllexport) a +# define SWIGIMPORT(a) extern a +# endif +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# define SWIGIMPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) a +#endif + +#ifdef SWIG_GLOBAL +#define SWIGRUNTIME(a) SWIGEXPORT(a) +#else +#define SWIGRUNTIME(a) static a +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +typedef struct swig_type_info { + const char *name; + swig_converter_func converter; + const char *str; + void *clientdata; + swig_dycast_func dcast; + struct swig_type_info *next; + struct swig_type_info *prev; +} swig_type_info; + +#ifdef SWIG_NOINCLUDE + +SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *); +SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *); +SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *); +SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **); +SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); +SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); + +#else + +static swig_type_info *swig_type_list = 0; + +/* Register a type mapping with the type-checking */ +SWIGRUNTIME(swig_type_info *) +SWIG_TypeRegister(swig_type_info *ti) +{ + swig_type_info *tc, *head, *ret, *next; + /* Check to see if this type has already been registered */ + tc = swig_type_list; + while (tc) { + if (strcmp(tc->name, ti->name) == 0) { + /* Already exists in the table. Just add additional types to the list */ + if (tc->clientdata) ti->clientdata = tc->clientdata; + head = tc; + next = tc->next; + goto l1; + } + tc = tc->prev; + } + head = ti; + next = 0; + + /* Place in list */ + ti->prev = swig_type_list; + swig_type_list = ti; + + /* Build linked lists */ + l1: + ret = head; + tc = ti + 1; + /* Patch up the rest of the links */ + while (tc->name) { + head->next = tc; + tc->prev = head; + head = tc; + tc++; + } + head->next = next; + return ret; +} + +/* Check the typename */ +SWIGRUNTIME(swig_type_info *) +SWIG_TypeCheck(char *c, swig_type_info *ty) +{ + swig_type_info *s; + if (!ty) return 0; /* Void pointer */ + s = ty->next; /* First element always just a name */ + do { + if (strcmp(s->name,c) == 0) { + if (s == ty->next) return s; + /* Move s to the top of the linked list */ + s->prev->next = s->next; + if (s->next) { + s->next->prev = s->prev; + } + /* Insert s as second element in the list */ + s->next = ty->next; + if (ty->next) ty->next->prev = s; + ty->next = s; + return s; + } + s = s->next; + } while (s && (s != ty->next)); + return 0; +} + +/* Cast a pointer up an inheritance hierarchy */ +SWIGRUNTIME(void *) +SWIG_TypeCast(swig_type_info *ty, void *ptr) +{ + if ((!ty) || (!ty->converter)) return ptr; + return (*ty->converter)(ptr); +} + +/* Dynamic pointer casting. Down an inheritance hierarchy */ +SWIGRUNTIME(swig_type_info *) +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) +{ + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* Search for a swig_type_info structure */ +SWIGRUNTIME(swig_type_info *) +SWIG_TypeQuery(const char *name) { + swig_type_info *ty = swig_type_list; + while (ty) { + if (ty->str && (strcmp(name,ty->str) == 0)) return ty; + if (ty->name && (strcmp(name,ty->name) == 0)) return ty; + ty = ty->prev; + } + return 0; +} + +/* Set the clientdata field for a type */ +SWIGRUNTIME(void) +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_type_info *tc, *equiv; + if (ti->clientdata) return; + ti->clientdata = clientdata; + equiv = ti->next; + while (equiv) { + if (!equiv->converter) { + tc = swig_type_list; + while (tc) { + if ((strcmp(tc->name, equiv->name) == 0)) + SWIG_TypeClientData(tc,clientdata); + tc = tc->prev; + } + } + equiv = equiv->next; + } +} +#endif + +#ifdef __cplusplus +} + +#endif + +/*********************************************************************** + * python.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * Author : David Beazley (beazley@cs.uchicago.edu) + ************************************************************************/ + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define SWIG_PY_INT 1 +#define SWIG_PY_FLOAT 2 +#define SWIG_PY_STRING 3 +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Flags for pointer conversion */ + +#define SWIG_POINTER_EXCEPTION 0x1 +#define SWIG_POINTER_DISOWN 0x2 + +/* Exception handling in wrappers */ +#define SWIG_fail goto fail + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + +#ifdef SWIG_NOINCLUDE + +SWIGEXPORT(PyObject *) SWIG_newvarlink(); +SWIGEXPORT(void) SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +SWIGEXPORT(int) SWIG_ConvertPtr(PyObject *, void **, swig_type_info *, int); +SWIGEXPORT(int) SWIG_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int); +SWIGEXPORT(char *) SWIG_PackData(char *c, void *, int); +SWIGEXPORT(char *) SWIG_UnpackData(char *c, void *, int); +SWIGEXPORT(PyObject *) SWIG_NewPointerObj(void *, swig_type_info *,int own); +SWIGEXPORT(PyObject *) SWIG_NewPackedObj(void *, int sz, swig_type_info *); +SWIGEXPORT(void) SWIG_InstallConstants(PyObject *d, swig_const_info constants[]); +#else + +/* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + +typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; +} swig_globalvar; + +typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; +} swig_varlinkobject; + +static PyObject * +swig_varlink_repr(swig_varlinkobject *v) { + v = v; + return PyString_FromString("<Global variables>"); +} + +static int +swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { + swig_globalvar *var; + flags = flags; + fprintf(fp,"Global variables { "); + for (var = v->vars; var; var=var->next) { + fprintf(fp,"%s", var->name); + if (var->next) fprintf(fp,", "); + } + fprintf(fp," }\n"); + return 0; +} + +static PyObject * +swig_varlink_getattr(swig_varlinkobject *v, char *n) { + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + return (*var->get_attr)(); + } + var = var->next; + } + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + return NULL; +} + +static int +swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + return (*var->set_attr)(p); + } + var = var->next; + } + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + return 1; +} + +statichere PyTypeObject varlinktype = { + PyObject_HEAD_INIT(0) + 0, + (char *)"swigvarlink", /* Type name */ + sizeof(swig_varlinkobject), /* Basic size */ + 0, /* Itemsize */ + 0, /* Deallocator */ + (printfunc) swig_varlink_print, /* Print */ + (getattrfunc) swig_varlink_getattr, /* get attr */ + (setattrfunc) swig_varlink_setattr, /* Set attr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_mapping*/ + 0, /* tp_hash */ +}; + +/* Create a variable linking object for use later */ +SWIGRUNTIME(PyObject *) +SWIG_newvarlink(void) { + swig_varlinkobject *result = 0; + result = PyMem_NEW(swig_varlinkobject,1); + varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ + result->ob_type = &varlinktype; + result->vars = 0; + result->ob_refcnt = 0; + Py_XINCREF((PyObject *) result); + return ((PyObject*) result); +} + +SWIGRUNTIME(void) +SWIG_addvarlink(PyObject *p, char *name, + PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v; + swig_globalvar *gv; + v= (swig_varlinkobject *) p; + gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + gv->name = (char *) malloc(strlen(name)+1); + strcpy(gv->name,name); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + v->vars = gv; +} + +/* Pack binary data into a string */ +SWIGRUNTIME(char *) +SWIG_PackData(char *c, void *ptr, int sz) { + static char hex[17] = "0123456789abcdef"; + int i; + unsigned char *u = (unsigned char *) ptr; + register unsigned char uu; + for (i = 0; i < sz; i++,u++) { + uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* Unpack binary data from a string */ +SWIGRUNTIME(char *) +SWIG_UnpackData(char *c, void *ptr, int sz) { + register unsigned char uu = 0; + register int d; + unsigned char *u = (unsigned char *) ptr; + int i; + for (i = 0; i < sz; i++, u++) { + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + *u = uu; + } + return c; +} + +/* Convert a pointer value */ +SWIGRUNTIME(int) +SWIG_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { + swig_type_info *tc; + char *c; + static PyObject *SWIG_this = 0; + int newref = 0; + PyObject *pyobj = 0; + + if (!obj) return 0; + if (obj == Py_None) { + *ptr = 0; + return 0; + } +#ifdef SWIG_COBJECT_TYPES + if (!(PyCObject_Check(obj))) { + if (!SWIG_this) + SWIG_this = PyString_FromString("this"); + pyobj = obj; + obj = PyObject_GetAttr(obj,SWIG_this); + newref = 1; + if (!obj) goto type_error; + if (!PyCObject_Check(obj)) { + Py_DECREF(obj); + goto type_error; + } + } + *ptr = PyCObject_AsVoidPtr(obj); + c = (char *) PyCObject_GetDesc(obj); + if (newref) Py_DECREF(obj); + goto cobject; +#else + if (!(PyString_Check(obj))) { + if (!SWIG_this) + SWIG_this = PyString_FromString("this"); + pyobj = obj; + obj = PyObject_GetAttr(obj,SWIG_this); + newref = 1; + if (!obj) goto type_error; + if (!PyString_Check(obj)) { + Py_DECREF(obj); + goto type_error; + } + } + c = PyString_AsString(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') { + *ptr = (void *) 0; + if (strcmp(c,"NULL") == 0) { + if (newref) { Py_DECREF(obj); } + return 0; + } else { + if (newref) { Py_DECREF(obj); } + goto type_error; + } + } + c++; + c = SWIG_UnpackData(c,ptr,sizeof(void *)); + if (newref) { Py_DECREF(obj); } +#endif + +#ifdef SWIG_COBJECT_TYPES +cobject: +#endif + + if (ty) { + tc = SWIG_TypeCheck(c,ty); + if (!tc) goto type_error; + *ptr = SWIG_TypeCast(tc,(void*) *ptr); + } + + if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) { + PyObject *zero = PyInt_FromLong(0); + PyObject_SetAttrString(pyobj,(char*)"thisown",zero); + Py_DECREF(zero); + } + return 0; + +type_error: + if (flags & SWIG_POINTER_EXCEPTION) { + if (ty) { + char *temp = (char *) malloc(64+strlen(ty->name)); + sprintf(temp,"Type error. Expected %s", ty->name); + PyErr_SetString(PyExc_TypeError, temp); + free((char *) temp); + } else { + PyErr_SetString(PyExc_TypeError,"Expected a pointer"); + } + } + return -1; +} + +/* Convert a packed value value */ +SWIGRUNTIME(int) +SWIG_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) { + swig_type_info *tc; + char *c; + + if ((!obj) || (!PyString_Check(obj))) goto type_error; + c = PyString_AsString(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') goto type_error; + c++; + c = SWIG_UnpackData(c,ptr,sz); + if (ty) { + tc = SWIG_TypeCheck(c,ty); + if (!tc) goto type_error; + } + return 0; + +type_error: + + if (flags) { + if (ty) { + char *temp = (char *) malloc(64+strlen(ty->name)); + sprintf(temp,"Type error. Expected %s", ty->name); + PyErr_SetString(PyExc_TypeError, temp); + free((char *) temp); + } else { + PyErr_SetString(PyExc_TypeError,"Expected a pointer"); + } + } + return -1; +} + +/* Create a new pointer object */ +SWIGRUNTIME(PyObject *) +SWIG_NewPointerObj(void *ptr, swig_type_info *type, int own) { + PyObject *robj; + if (!ptr) { + Py_INCREF(Py_None); + return Py_None; + } +#ifdef SWIG_COBJECT_TYPES + robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL); +#else + { + char result[1024]; + char *r = result; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + strcpy(r,type->name); + robj = PyString_FromString(result); + } +#endif + if (!robj || (robj == Py_None)) return robj; + if (type->clientdata) { + PyObject *inst; + PyObject *args = Py_BuildValue((char*)"(O)", robj); + Py_DECREF(robj); + inst = PyObject_CallObject((PyObject *) type->clientdata, args); + Py_DECREF(args); + if (inst) { + if (own) { + PyObject *n = PyInt_FromLong(1); + PyObject_SetAttrString(inst,(char*)"thisown",n); + Py_DECREF(n); + } + robj = inst; + } + } + return robj; +} + +SWIGRUNTIME(PyObject *) +SWIG_NewPackedObj(void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + strcpy(r,type->name); + return PyString_FromString(result); +} + +/* Install Constants */ +SWIGRUNTIME(void) +SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) { + int i; + PyObject *obj; + for (i = 0; constants[i].type; i++) { + switch(constants[i].type) { + case SWIG_PY_INT: + obj = PyInt_FromLong(constants[i].lvalue); + break; + case SWIG_PY_FLOAT: + obj = PyFloat_FromDouble(constants[i].dvalue); + break; + case SWIG_PY_STRING: + obj = PyString_FromString((char *) constants[i].pvalue); + break; + case SWIG_PY_POINTER: + obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d,constants[i].name,obj); + Py_DECREF(obj); + } + } +} + +#endif + +#ifdef __cplusplus +} +#endif + + + + + + + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_PackageFile swig_types[0] +#define SWIGTYPE_p_pkgCache__PackageFile swig_types[1] +#define SWIGTYPE_p_pkgSourceList__const_iterator swig_types[2] +#define SWIGTYPE_p_pkgAcquire__UriIterator swig_types[3] +#define SWIGTYPE_p_pkgAcquire__ItemIterator swig_types[4] +#define SWIGTYPE_p_pkgCache__VerFileIterator swig_types[5] +#define SWIGTYPE_p_PkgFileIterator swig_types[6] +#define SWIGTYPE_p_pkgCache__PrvIterator swig_types[7] +#define SWIGTYPE_p_pkgCache__DepIterator swig_types[8] +#define SWIGTYPE_p_VerFileIterator swig_types[9] +#define SWIGTYPE_p_pkgCache__VerIterator swig_types[10] +#define SWIGTYPE_p_PrvIterator swig_types[11] +#define SWIGTYPE_p_pkgCache__PkgIterator swig_types[12] +#define SWIGTYPE_p_pkgCache__PkgFileIterator swig_types[13] +#define SWIGTYPE_p_VerIterator swig_types[14] +#define SWIGTYPE_p_PkgIterator swig_types[15] +#define SWIGTYPE_p_DepIterator swig_types[16] +#define SWIGTYPE_p_pkgCache__Header swig_types[17] +#define SWIGTYPE_p_Header swig_types[18] +#define SWIGTYPE_p_pkgPolicy swig_types[19] +#define SWIGTYPE_p_Policy swig_types[20] +#define SWIGTYPE_p_Configuration swig_types[21] +#define SWIGTYPE_p_pkgAcqIndexRel swig_types[22] +#define SWIGTYPE_p_pkgAcquire swig_types[23] +#define SWIGTYPE_p_map_ptrloc swig_types[24] +#define SWIGTYPE_p_Dependency swig_types[25] +#define SWIGTYPE_p_pkgCache__Dependency swig_types[26] +#define SWIGTYPE_p_GlobalError swig_types[27] +#define SWIGTYPE_p_pkgAcqIndex swig_types[28] +#define SWIGTYPE_p_StateCache swig_types[29] +#define SWIGTYPE_p_pkgDepCache__StateCache swig_types[30] +#define SWIGTYPE_p_Item swig_types[31] +#define SWIGTYPE_p_void swig_types[32] +#define SWIGTYPE_p_pkgAcquire__Item swig_types[33] +#define SWIGTYPE_p_MMap swig_types[34] +#define SWIGTYPE_p_pkgRecords__Parser swig_types[35] +#define SWIGTYPE_p_p_pkgCache__Version swig_types[36] +#define SWIGTYPE_p_p_Version swig_types[37] +#define SWIGTYPE_p_pkgCache__Version swig_types[38] +#define SWIGTYPE_p_Version swig_types[39] +#define SWIGTYPE_p_vectorTpkgIndexFile_p_t swig_types[40] +#define SWIGTYPE_p_time_t swig_types[41] +#define SWIGTYPE_p_p_pkgIndexFile swig_types[42] +#define SWIGTYPE_p_pkgProblemResolver swig_types[43] +#define SWIGTYPE_p_pkgAcqArchive swig_types[44] +#define SWIGTYPE_p_p_char swig_types[45] +#define SWIGTYPE_p_pkgAcquireStatusDumb swig_types[46] +#define SWIGTYPE_p_pkgCacheFile swig_types[47] +#define SWIGTYPE_p_pkgAcquire__ItemDesc swig_types[48] +#define SWIGTYPE_p_pkgAcquireStatus swig_types[49] +#define SWIGTYPE_p_pkgDepCache swig_types[50] +#define SWIGTYPE_p_DynamicMMap__Pool swig_types[51] +#define SWIGTYPE_p_pkgPackageManager swig_types[52] +#define SWIGTYPE_p_OpTextProgress swig_types[53] +#define SWIGTYPE_p_OpProgress swig_types[54] +#define SWIGTYPE_p_Provides swig_types[55] +#define SWIGTYPE_p_pkgCache__Provides swig_types[56] +#define SWIGTYPE_p_pkgRepository swig_types[57] +#define SWIGTYPE_p_pkgAcqFile swig_types[58] +#define SWIGTYPE_p_pkgSourceList swig_types[59] +#define SWIGTYPE_p_string swig_types[60] +#define SWIGTYPE_p_p_pkgVersioningSystem swig_types[61] +#define SWIGTYPE_p_pkgSystem swig_types[62] +#define SWIGTYPE_p_p_pkgSystem swig_types[63] +#define SWIGTYPE_p_pkgVersioningSystem swig_types[64] +#define SWIGTYPE_p_VerFile swig_types[65] +#define SWIGTYPE_p_pkgCache__VerFile swig_types[66] +#define SWIGTYPE_p_pkgAcquire__MethodConfig swig_types[67] +#define SWIGTYPE_p_pkgCache__Package swig_types[68] +#define SWIGTYPE_p_Package swig_types[69] +#define SWIGTYPE_p_unsigned_char swig_types[70] +#define SWIGTYPE_p_pkgRecords swig_types[71] +#define SWIGTYPE_p_pkgAcquire__Worker swig_types[72] +#define SWIGTYPE_p_pkgCache swig_types[73] +#define SWIGTYPE_p_pkgCache__StringItem swig_types[74] +static swig_type_info *swig_types[76]; + +/* -------- TYPES TABLE (END) -------- */ + + +/*----------------------------------------------- + @(target):= _apt.so + ------------------------------------------------*/ +#define SWIG_init init_apt + +#define SWIG_name "_apt" + +#define SWIG_MemoryError 1 +#define SWIG_IOError 2 +#define SWIG_RuntimeError 3 +#define SWIG_IndexError 4 +#define SWIG_TypeError 5 +#define SWIG_DivisionByZero 6 +#define SWIG_OverflowError 7 +#define SWIG_SyntaxError 8 +#define SWIG_ValueError 9 +#define SWIG_SystemError 10 +#define SWIG_UnknownError 99 + + +static void _SWIG_exception(int code, const char *msg) { + switch(code) { + case SWIG_MemoryError: + PyErr_SetString(PyExc_MemoryError,msg); + break; + case SWIG_IOError: + PyErr_SetString(PyExc_IOError,msg); + break; + case SWIG_RuntimeError: + PyErr_SetString(PyExc_RuntimeError,msg); + break; + case SWIG_IndexError: + PyErr_SetString(PyExc_IndexError,msg); + break; + case SWIG_TypeError: + PyErr_SetString(PyExc_TypeError,msg); + break; + case SWIG_DivisionByZero: + PyErr_SetString(PyExc_ZeroDivisionError,msg); + break; + case SWIG_OverflowError: + PyErr_SetString(PyExc_OverflowError,msg); + break; + case SWIG_SyntaxError: + PyErr_SetString(PyExc_SyntaxError,msg); + break; + case SWIG_ValueError: + PyErr_SetString(PyExc_ValueError,msg); + break; + case SWIG_SystemError: + PyErr_SetString(PyExc_SystemError,msg); + break; + default: + PyErr_SetString(PyExc_RuntimeError,msg); + break; + } +} + +#define SWIG_exception(a,b) { _SWIG_exception(a,b); SWIG_fail; } + + +#include <string> + + +#include <string> + +PyObject* SwigInt_FromBool(bool b) { + return PyInt_FromLong(b ? 1L : 0L); +} +double SwigNumber_Check(PyObject* o) { + return PyFloat_Check(o) || PyInt_Check(o); +} +double SwigNumber_AsDouble(PyObject* o) { + return (PyFloat_Check(o) ? PyFloat_AsDouble(o) : double(PyInt_AsLong(o))); +} +PyObject* SwigString_FromString(const std::string& s) { + return PyString_FromString(s.c_str()); +} +std::string SwigString_AsString(PyObject* o) { + return std::string(PyString_AsString(o)); +} + + +#include <vector> +#include <algorithm> +#include <stdexcept> + + +#include <apt-pkg/init.h> +#include <apt-pkg/pkgcache.h> +#include <apt-pkg/depcache.h> +#include <apt-pkg/cachefile.h> +#include <apt-pkg/mmap.h> +#include <apt-pkg/cacheiterators.h> +#include <apt-pkg/algorithms.h> +#include <apt-pkg/pkgsystem.h> +#include <apt-pkg/contrib/configuration.h> +#include <apt-pkg/contrib/progress.h> +#include <apt-pkg/version.h> +#include <apt-pkg/pkgrecords.h> +#include <apt-pkg/acquire-item.h> +#include <apt-pkg/acquire.h> +#include <apt-pkg/packagemanager.h> +#include <apt-pkg/sourcelist.h> +#include <apt-pkg/contrib/error.h> + +#include <string> +#include <time.h> + + +typedef pkgCache::VerIterator VerIterator; +typedef pkgCache::PkgIterator PkgIterator; +typedef pkgCache::DepIterator DepIterator; +typedef pkgCache::PrvIterator PrvIterator; +typedef pkgCache::PkgFileIterator PkgFileIterator; +typedef pkgCache::VerFileIterator VerFileIterator; +typedef pkgCache::Header Header; +typedef pkgCache::Package Package; +typedef pkgCache::PackageFile PackageFile; +typedef pkgCache::VerFile VerFile; +typedef pkgCache::Version Version; +typedef pkgCache::Dependency Dependency; +typedef pkgCache::Provides Provides; +typedef pkgCache::StringItem StringItem; +typedef pkgCache::Dep Dep; +typedef pkgCache::State State; +typedef pkgCache::Flag Flag; +typedef pkgDepCache::Policy Policy; +typedef pkgDepCache::StateCache StateCache; +typedef Configuration::Item Item; +typedef pkgRecords::Parser Parser; + + +inline bool pkgInit() +{ + return pkgInitConfig(*_config) && pkgInitSystem(*_config,_system); +} + +extern char const *pkgVersion; +extern char const *pkgLibVersion; +extern char const *pkgOS; +extern char const *pkgCPU; +extern pkgSystem *_system; +extern Configuration *_config; +PyObject *pkgAcquire_ItemsList(pkgAcquire *self){ + static swig_type_info *ItemDescr = NULL; + PyObject *list, *o; + pkgAcquire::ItemIterator I; + if (!ItemDescr) { + ItemDescr = SWIG_TypeQuery("pkgAcquire::Item *"); + assert(ItemDescr); + } + list = PyList_New(0); + if (list == NULL) + return NULL; + for (I = self->ItemsBegin(); I != self->ItemsEnd(); I++) { + o = SWIG_NewPointerObj((void *)(*I), ItemDescr, 0); + if (!o || PyList_Append(list, o) == -1) { + Py_XDECREF(o); + Py_DECREF(list); + return NULL; + } + Py_DECREF(o); + } + return list; +} + +class pkgAcquireStatusDumb : public pkgAcquireStatus +{ + virtual bool MediaChange(string Media,string Drive) {}; +}; + +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap_pkgInit(PyObject *self, PyObject *args) { + PyObject *resultobj; + bool result; + + if(!PyArg_ParseTuple(args,(char *)":pkgInit")) goto fail; + result = (bool)pkgInit(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static int _wrap__error_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable _error is read-only."); + return 1; +} + + +static PyObject *_wrap__error_get() { + PyObject *pyobj; + + pyobj = SWIG_NewPointerObj((void *) _error, SWIGTYPE_p_GlobalError, 0); + return pyobj; +} + + +static int _wrap_pkgVersion_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable pkgVersion is read-only."); + return 1; +} + + +static PyObject *_wrap_pkgVersion_get() { + PyObject *pyobj; + + pyobj = pkgVersion ? PyString_FromString(pkgVersion) : Py_BuildValue((char*)""); + return pyobj; +} + + +static int _wrap_pkgLibVersion_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable pkgLibVersion is read-only."); + return 1; +} + + +static PyObject *_wrap_pkgLibVersion_get() { + PyObject *pyobj; + + pyobj = pkgLibVersion ? PyString_FromString(pkgLibVersion) : Py_BuildValue((char*)""); + return pyobj; +} + + +static int _wrap_pkgOS_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable pkgOS is read-only."); + return 1; +} + + +static PyObject *_wrap_pkgOS_get() { + PyObject *pyobj; + + pyobj = pkgOS ? PyString_FromString(pkgOS) : Py_BuildValue((char*)""); + return pyobj; +} + + +static int _wrap_pkgCPU_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable pkgCPU is read-only."); + return 1; +} + + +static PyObject *_wrap_pkgCPU_get() { + PyObject *pyobj; + + pyobj = pkgCPU ? PyString_FromString(pkgCPU) : Py_BuildValue((char*)""); + return pyobj; +} + + +static PyObject *_wrap_pkgInitConfig(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgInitConfig",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)pkgInitConfig(*arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgInitSystem(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = 0 ; + pkgSystem **arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgInitSystem",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)pkgInitSystem(*arg1,*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_HeaderP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Header *arg2 = (pkgCache::Header *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_HeaderP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->HeaderP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_HeaderP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Header *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_HeaderP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::Header *) ((arg1)->HeaderP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Header, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_PkgP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Package *arg2 = (pkgCache::Package *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_PkgP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->PkgP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_PkgP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Package *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_PkgP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::Package *) ((arg1)->PkgP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Package, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_VerFileP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::VerFile *arg2 = (pkgCache::VerFile *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_VerFileP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->VerFileP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_VerFileP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::VerFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_VerFileP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::VerFile *) ((arg1)->VerFileP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__VerFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_PkgFileP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::PackageFile *arg2 = (pkgCache::PackageFile *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_PkgFileP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->PkgFileP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_PkgFileP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::PackageFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_PkgFileP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::PackageFile *) ((arg1)->PkgFileP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PackageFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_VerP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Version *arg2 = (pkgCache::Version *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_VerP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->VerP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_VerP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Version *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_VerP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::Version *) ((arg1)->VerP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_ProvideP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Provides *arg2 = (pkgCache::Provides *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_ProvideP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->ProvideP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_ProvideP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Provides *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_ProvideP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::Provides *) ((arg1)->ProvideP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Provides, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_DepP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Dependency *arg2 = (pkgCache::Dependency *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_DepP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->DepP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_DepP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Dependency *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_DepP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::Dependency *) ((arg1)->DepP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Dependency, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_StringItemP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::StringItem *arg2 = (pkgCache::StringItem *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_StringItemP_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__StringItem,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->StringItemP = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_StringItemP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::StringItem *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_StringItemP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::StringItem *) ((arg1)->StringItemP); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__StringItem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_StrP_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + char *arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:pkgCache_StrP_set",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (arg1->StrP) delete [] arg1->StrP; + arg1->StrP = (char *) (new char[strlen(arg2)+1]); + strcpy((char *) arg1->StrP,arg2); + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_StrP_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_StrP_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *) ((arg1)->StrP); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_ReMap(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_ReMap",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->ReMap(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_Sync(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_Sync",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Sync(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_GetMap(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + MMap *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_GetMap",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + MMap &_result_ref = (arg1)->GetMap(); + result = (MMap *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_MMap, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_DataEnd(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + void *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_DataEnd",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (void *)(arg1)->DataEnd(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_Hash__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + string arg2 ; + unsigned long result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_Hash",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (unsigned long)((pkgCache const *)arg1)->Hash(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_Hash__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + char *arg2 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:pkgCache_Hash",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)((pkgCache const *)arg1)->Hash((char const *)arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_Hash(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCache_Hash__SWIG_0(self,args); + } + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCache_Hash__SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCache_Hash'"); + return NULL; +} + + +static PyObject *_wrap_pkgCache_Priority(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + unsigned char arg2 ; + char *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_Priority",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + result = (char *)(arg1)->Priority(arg2); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_FindPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + string arg2 ; + pkgCache::PkgIterator result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_FindPkg",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (arg1)->FindPkg(arg2); + + { + pkgCache::PkgIterator * resultptr; + resultptr = new pkgCache::PkgIterator((pkgCache::PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgCache__PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_Head(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::Header *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_Head",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgCache::Header &_result_ref = (arg1)->Head(); + result = (pkgCache::Header *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Header, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_PkgBegin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_PkgBegin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->PkgBegin(); + + { + pkgCache::PkgIterator * resultptr; + resultptr = new pkgCache::PkgIterator((pkgCache::PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgCache__PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_PkgEnd(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_PkgEnd",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->PkgEnd(); + + { + pkgCache::PkgIterator * resultptr; + resultptr = new pkgCache::PkgIterator((pkgCache::PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgCache__PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_FileBegin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::PkgFileIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_FileBegin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->FileBegin(); + + { + pkgCache::PkgFileIterator * resultptr; + resultptr = new pkgCache::PkgFileIterator((pkgCache::PkgFileIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgCache__PkgFileIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_FileEnd(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgCache::PkgFileIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_FileEnd",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->FileEnd(); + + { + pkgCache::PkgFileIterator * resultptr; + resultptr = new pkgCache::PkgFileIterator((pkgCache::PkgFileIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgCache__PkgFileIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_VS_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgVersioningSystem *arg2 = (pkgVersioningSystem *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCache_VS_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->VS = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_VS_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + pkgVersioningSystem *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_VS_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgVersioningSystem *) ((arg1)->VS); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgVersioningSystem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_CompTypeDeb(PyObject *self, PyObject *args) { + PyObject *resultobj; + unsigned char arg1 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_CompTypeDeb",&obj0)) goto fail; + arg1 = (unsigned char) PyInt_AsLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + result = (char *)pkgCache::CompTypeDeb(arg1); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_CompType(PyObject *self, PyObject *args) { + PyObject *resultobj; + unsigned char arg1 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_CompType",&obj0)) goto fail; + arg1 = (unsigned char) PyInt_AsLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + result = (char *)pkgCache::CompType(arg1); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCache_DepType(PyObject *self, PyObject *args) { + PyObject *resultobj; + unsigned char arg1 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCache_DepType",&obj0)) goto fail; + arg1 = (unsigned char) PyInt_AsLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + result = (char *)pkgCache::DepType(arg1); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + MMap *arg1 = (MMap *) 0 ; + bool arg2 = (bool) true ; + pkgCache *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:new_pkgCache",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_MMap,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj1) { + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + result = (pkgCache *)new pkgCache(arg1,arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCache_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheHeader_Signature_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_Signature_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Signature = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_Signature_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_Signature_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->Signature); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_MajorVersion_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + short arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oh:pkgCacheHeader_MajorVersion_set",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg1) (arg1)->MajorVersion = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_MajorVersion_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_MajorVersion_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (short) ((arg1)->MajorVersion); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_MinorVersion_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + short arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oh:pkgCacheHeader_MinorVersion_set",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg1) (arg1)->MinorVersion = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_MinorVersion_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_MinorVersion_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (short) ((arg1)->MinorVersion); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_Dirty_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_Dirty_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Dirty = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_Dirty_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_Dirty_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool) ((arg1)->Dirty); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_HeaderSz_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_HeaderSz_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->HeaderSz = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_HeaderSz_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_HeaderSz_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->HeaderSz); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageSz_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_PackageSz_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->PackageSz = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageSz_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_PackageSz_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->PackageSz); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageFileSz_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_PackageFileSz_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->PackageFileSz = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageFileSz_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_PackageFileSz_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->PackageFileSz); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VersionSz_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_VersionSz_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->VersionSz = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VersionSz_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_VersionSz_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->VersionSz); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_DependencySz_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_DependencySz_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->DependencySz = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_DependencySz_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_DependencySz_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->DependencySz); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_ProvidesSz_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_ProvidesSz_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->ProvidesSz = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_ProvidesSz_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_ProvidesSz_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->ProvidesSz); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VerFileSz_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_VerFileSz_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->VerFileSz = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VerFileSz_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_VerFileSz_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->VerFileSz); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageCount_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_PackageCount_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->PackageCount = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageCount_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_PackageCount_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->PackageCount); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VersionCount_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_VersionCount_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->VersionCount = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VersionCount_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_VersionCount_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->VersionCount); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_DependsCount_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_DependsCount_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->DependsCount = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_DependsCount_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_DependsCount_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->DependsCount); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageFileCount_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_PackageFileCount_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->PackageFileCount = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_PackageFileCount_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_PackageFileCount_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->PackageFileCount); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VerFileCount_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_VerFileCount_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->VerFileCount = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VerFileCount_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_VerFileCount_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->VerFileCount); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_ProvidesCount_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_ProvidesCount_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->ProvidesCount = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_ProvidesCount_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_ProvidesCount_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->ProvidesCount); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_FileList_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_FileList_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->FileList = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_FileList_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_FileList_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->FileList); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_StringList_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_StringList_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->StringList = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_StringList_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_StringList_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->StringList); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VerSysName_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_VerSysName_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->VerSysName = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_VerSysName_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_VerSysName_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->VerSysName); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_Architecture_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_Architecture_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Architecture = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_Architecture_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_Architecture_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Architecture); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_MaxVerFileSize_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_MaxVerFileSize_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->MaxVerFileSize = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_MaxVerFileSize_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_MaxVerFileSize_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->MaxVerFileSize); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_Pools_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + DynamicMMap::Pool *arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_Pools_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_DynamicMMap__Pool,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + int ii; + DynamicMMap::Pool *b = (DynamicMMap::Pool *) arg1->Pools; + for (ii = 0; ii < 7; ii++) b[ii] = *((DynamicMMap::Pool *) arg2 + ii); + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_Pools_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + DynamicMMap::Pool *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_Pools_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (DynamicMMap::Pool *)(DynamicMMap::Pool *) ((arg1)->Pools); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_DynamicMMap__Pool, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_HashTable_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc *arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_HashTable_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + int ii; + map_ptrloc *b = (map_ptrloc *) arg1->HashTable; + for (ii = 0; ii < 2*1048; ii++) b[ii] = *((map_ptrloc *) arg2 + ii); + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_HashTable_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + map_ptrloc *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheHeader_HashTable_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (map_ptrloc *)(map_ptrloc *) ((arg1)->HashTable); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_map_ptrloc, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheHeader_CheckSizes(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + Header *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheHeader_CheckSizes",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::Header const *)arg1)->CheckSizes(*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheHeader(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheHeader")) goto fail; + result = (pkgCache::Header *)new pkgCache::Header(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Header, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheHeader(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Header *arg1 = (pkgCache::Header *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheHeader",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Header,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheHeader_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__Header, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCachePackage_Name_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_Name_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Name = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_Name_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_Name_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Name); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_VersionList_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_VersionList_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->VersionList = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_VersionList_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_VersionList_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->VersionList); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_CurrentVer_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_CurrentVer_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->CurrentVer = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_CurrentVer_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_CurrentVer_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->CurrentVer); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_Section_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_Section_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Section = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_Section_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_Section_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Section); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_NextPackage_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_NextPackage_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextPackage = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_NextPackage_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_NextPackage_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextPackage); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_RevDepends_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_RevDepends_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->RevDepends = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_RevDepends_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_RevDepends_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->RevDepends); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_ProvidesList_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_ProvidesList_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->ProvidesList = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_ProvidesList_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_ProvidesList_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->ProvidesList); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_SelectedState_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_SelectedState_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->SelectedState = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_SelectedState_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_SelectedState_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->SelectedState); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_InstState_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_InstState_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->InstState = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_InstState_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_InstState_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->InstState); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_CurrentState_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_CurrentState_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->CurrentState = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_CurrentState_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_CurrentState_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->CurrentState); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->ID); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_Flags_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackage_Flags_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Flags = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackage_Flags_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackage_Flags_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->Flags); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePackage(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCachePackage")) goto fail; + result = (pkgCache::Package *)new pkgCache::Package(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Package, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCachePackage(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Package *arg1 = (pkgCache::Package *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCachePackage",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCachePackage_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__Package, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCachePackageFile_FileName_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_FileName_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->FileName = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_FileName_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_FileName_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->FileName); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Archive_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Archive_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Archive = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Archive_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Archive_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Archive); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Component_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Component_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Component = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Component_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Component_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Component); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Version_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Version_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Version = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Version_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Version_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Version); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Origin_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Origin_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Origin = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Origin_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Origin_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Origin); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Label_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Label_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Label = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Label_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Label_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Label); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Architecture_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Architecture_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Architecture = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Architecture_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Architecture_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Architecture); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Site_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Site_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Site = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Site_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Site_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Site); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_IndexType_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_IndexType_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->IndexType = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_IndexType_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_IndexType_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->IndexType); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Size_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Size_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Size = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Size_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Size_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->Size); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Flags_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_Flags_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Flags = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_Flags_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_Flags_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->Flags); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_NextFile_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_NextFile_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextFile = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_NextFile_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_NextFile_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextFile); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->ID); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_mtime_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + time_t arg2 ; + time_t *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePackageFile_mtime_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_time_t,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->mtime = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePackageFile_mtime_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + time_t result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePackageFile_mtime_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->mtime); + + { + time_t * resultptr; + resultptr = new time_t((time_t &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_time_t, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePackageFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCachePackageFile")) goto fail; + result = (pkgCache::PackageFile *)new pkgCache::PackageFile(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PackageFile, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCachePackageFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PackageFile *arg1 = (pkgCache::PackageFile *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCachePackageFile",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCachePackageFile_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__PackageFile, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheVerFile_File_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFile_File_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->File = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFile_File_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFile_File_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->File); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFile_NextFile_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFile_NextFile_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextFile = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFile_NextFile_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFile_NextFile_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextFile); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFile_Offset_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFile_Offset_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Offset = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFile_Offset_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFile_Offset_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Offset); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFile_Size_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFile_Size_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Size = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFile_Size_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFile_Size_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->Size); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVerFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheVerFile")) goto fail; + result = (pkgCache::VerFile *)new pkgCache::VerFile(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__VerFile, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheVerFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFile *arg1 = (pkgCache::VerFile *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheVerFile",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheVerFile_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__VerFile, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheVersion_VerStr_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_VerStr_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->VerStr = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_VerStr_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_VerStr_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->VerStr); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Section_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_Section_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Section = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Section_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_Section_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Section); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Arch_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_Arch_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Arch = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Arch_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_Arch_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Arch); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_FileList_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_FileList_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->FileList = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_FileList_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_FileList_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->FileList); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_NextVer_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_NextVer_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextVer = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_NextVer_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_NextVer_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextVer); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_DependsList_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_DependsList_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->DependsList = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_DependsList_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_DependsList_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->DependsList); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_ParentPkg_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_ParentPkg_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->ParentPkg = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_ParentPkg_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_ParentPkg_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->ParentPkg); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_ProvidesList_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_ProvidesList_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->ProvidesList = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_ProvidesList_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_ProvidesList_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->ProvidesList); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Size_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_Size_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Size = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Size_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_Size_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Size); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_InstalledSize_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_InstalledSize_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->InstalledSize = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_InstalledSize_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_InstalledSize_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->InstalledSize); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Hash_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_Hash_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Hash = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Hash_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_Hash_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->Hash); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->ID); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Priority_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVersion_Priority_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Priority = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVersion_Priority_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVersion_Priority_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->Priority); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVersion(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheVersion")) goto fail; + result = (pkgCache::Version *)new pkgCache::Version(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Version, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheVersion(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Version *arg1 = (pkgCache::Version *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheVersion",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheVersion_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__Version, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheDependency_Version_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_Version_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Version = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_Version_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_Version_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Version); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_Package_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_Package_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Package = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_Package_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_Package_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Package); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_NextDepends_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_NextDepends_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextDepends = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_NextDepends_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_NextDepends_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextDepends); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_NextRevDepends_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_NextRevDepends_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextRevDepends = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_NextRevDepends_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_NextRevDepends_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextRevDepends); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_ParentVer_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_ParentVer_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->ParentVer = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_ParentVer_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_ParentVer_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->ParentVer); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->ID); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_Type_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_Type_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Type = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_Type_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_Type_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->Type); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_CompareOp_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDependency_CompareOp_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->CompareOp = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDependency_CompareOp_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDependency_CompareOp_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->CompareOp); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheDependency(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheDependency")) goto fail; + result = (pkgCache::Dependency *)new pkgCache::Dependency(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Dependency, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheDependency(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Dependency *arg1 = (pkgCache::Dependency *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheDependency",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheDependency_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__Dependency, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheProvides_ParentPkg_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheProvides_ParentPkg_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->ParentPkg = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_ParentPkg_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheProvides_ParentPkg_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->ParentPkg); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_Version_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheProvides_Version_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->Version = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_Version_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheProvides_Version_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->Version); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_ProvideVersion_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheProvides_ProvideVersion_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->ProvideVersion = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_ProvideVersion_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheProvides_ProvideVersion_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->ProvideVersion); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_NextProvides_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheProvides_NextProvides_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextProvides = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_NextProvides_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheProvides_NextProvides_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextProvides); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_NextPkgProv_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheProvides_NextPkgProv_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextPkgProv = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheProvides_NextPkgProv_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheProvides_NextPkgProv_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextPkgProv); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheProvides(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheProvides")) goto fail; + result = (pkgCache::Provides *)new pkgCache::Provides(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__Provides, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheProvides(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::Provides *arg1 = (pkgCache::Provides *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheProvides",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheProvides_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__Provides, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheStringItem_String_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::StringItem *arg1 = (pkgCache::StringItem *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheStringItem_String_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__StringItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->String = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheStringItem_String_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::StringItem *arg1 = (pkgCache::StringItem *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheStringItem_String_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__StringItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->String); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheStringItem_NextItem_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::StringItem *arg1 = (pkgCache::StringItem *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheStringItem_NextItem_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__StringItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (arg1)->NextItem = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheStringItem_NextItem_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::StringItem *arg1 = (pkgCache::StringItem *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheStringItem_NextItem_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__StringItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((arg1)->NextItem); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheStringItem(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::StringItem *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheStringItem")) goto fail; + result = (pkgCache::StringItem *)new pkgCache::StringItem(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__StringItem, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheStringItem(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::StringItem *arg1 = (pkgCache::StringItem *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheStringItem",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__StringItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheStringItem_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__StringItem, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgDepCache_BuildGroupOrs(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + VerIterator *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache_BuildGroupOrs",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->BuildGroupOrs((VerIterator const &)*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_UpdateVerState(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator arg2 ; + PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache_UpdateVerState",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + (arg1)->UpdateVerState(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_Head(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + Header *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_Head",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Header &_result_ref = (arg1)->Head(); + result = (Header *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Header, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_PkgBegin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_PkgBegin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->PkgBegin(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_FindPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + string *arg2 = 0 ; + PkgIterator result; + std::string temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache_FindPkg",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) { + temp2 = std::string(PyString_AsString(obj1)); + arg2 = &temp2; + }else { + SWIG_exception(SWIG_TypeError, "string expected"); + } + } + result = (arg1)->FindPkg((string const &)*arg2); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_GetCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_GetCache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgCache &_result_ref = (arg1)->GetCache(); + result = (pkgCache *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_VS(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + pkgVersioningSystem *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_VS",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgVersioningSystem &_result_ref = (arg1)->VS(); + result = (pkgVersioningSystem *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgVersioningSystem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_GetCandidateVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator arg2 ; + VerIterator result; + PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache_GetCandidateVer",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + result = (arg1)->GetCandidateVer(arg2); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_IsImportantDep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + DepIterator arg2 ; + bool result; + DepIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache_IsImportantDep",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_DepIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + result = (bool)(arg1)->IsImportantDep(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_GetPolicy(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + Policy *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_GetPolicy",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Policy &_result_ref = (arg1)->GetPolicy(); + result = (Policy *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Policy, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache___getitem____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator *arg2 = 0 ; + StateCache *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache___getitem__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + StateCache &_result_ref = (arg1)->operator []((PkgIterator const &)*arg2); + result = (StateCache *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_StateCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache___getitem____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + DepIterator *arg2 = 0 ; + unsigned char *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache___getitem__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + unsigned char &_result_ref = (arg1)->operator []((DepIterator const &)*arg2); + result = (unsigned char *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_char, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache___getitem__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgDepCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_PkgIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgDepCache___getitem____SWIG_0(self,args); + } + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgDepCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgDepCache___getitem____SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgDepCache___getitem__'"); + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_MarkKeep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 = (bool) false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:pkgDepCache_MarkKeep",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + (arg1)->MarkKeep((PkgIterator const &)*arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_MarkDelete(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 = (bool) false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:pkgDepCache_MarkDelete",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + (arg1)->MarkDelete((PkgIterator const &)*arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_MarkInstall(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 = (bool) true ; + unsigned long arg4 = (unsigned long) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|OO:pkgDepCache_MarkInstall",&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (unsigned long) PyInt_AsLong(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + (arg1)->MarkInstall((PkgIterator const &)*arg2,arg3,arg4); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_SetReInstall(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgDepCache_SetReInstall",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + (arg1)->SetReInstall((PkgIterator const &)*arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_SetCandidateVersion(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + VerIterator arg2 ; + VerIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache_SetCandidateVersion",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + (arg1)->SetCandidateVersion(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_Update(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + OpProgress *arg2 = (OpProgress *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:pkgDepCache_Update",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj1) { + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + } + (arg1)->Update(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_UsrSize(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + double result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_UsrSize",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (double)(arg1)->UsrSize(); + + resultobj = PyFloat_FromDouble(result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_DebSize(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + double result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_DebSize",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (double)(arg1)->DebSize(); + + resultobj = PyFloat_FromDouble(result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_DelCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_DelCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(arg1)->DelCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_KeepCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_KeepCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(arg1)->KeepCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_InstCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_InstCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(arg1)->InstCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_BrokenCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_BrokenCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(arg1)->BrokenCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_BadCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCache_BadCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(arg1)->BadCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCache_Init(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + OpProgress *arg2 = (OpProgress *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCache_Init",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Init(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgDepCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = (pkgCache *) 0 ; + Policy *arg2 = (Policy *) 0 ; + pkgDepCache *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:new_pkgDepCache",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj1) { + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Policy,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + } + result = (pkgDepCache *)new pkgDepCache(arg1,arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgDepCache, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgDepCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgDepCache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgDepCache_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgDepCache, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgDepCacheStateCache_CandVersion_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_CandVersion_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *) ((arg1)->CandVersion); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_CurVersion_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_CurVersion_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *) ((arg1)->CurVersion); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_CandidateVer_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + Version *arg2 = (Version *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_CandidateVer_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Version,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->CandidateVer = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_CandidateVer_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + Version *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_CandidateVer_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Version *) ((arg1)->CandidateVer); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_InstallVer_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + Version *arg2 = (Version *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_InstallVer_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Version,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->InstallVer = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_InstallVer_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + Version *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_InstallVer_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Version *) ((arg1)->InstallVer); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Flags_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_Flags_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Flags = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Flags_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Flags_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->Flags); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_iFlags_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_iFlags_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->iFlags = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_iFlags_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_iFlags_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((arg1)->iFlags); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Status_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + signed char arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Ob:pkgDepCacheStateCache_Status_set",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg1) (arg1)->Status = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Status_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + signed char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Status_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (signed char) ((arg1)->Status); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Mode_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_Mode_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Mode = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Mode_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Mode_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->Mode); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_DepState_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_DepState_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->DepState = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_DepState_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_DepState_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((arg1)->DepState); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_StripEpoch(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + char *arg2 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:pkgDepCacheStateCache_StripEpoch",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)(arg1)->StripEpoch((char const *)arg2); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Update(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + PkgIterator arg2 ; + pkgCache *arg3 = 0 ; + PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgDepCacheStateCache_Update",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Update(arg2,*arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_NewInstall(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_NewInstall",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->NewInstall(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Delete(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Delete",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->Delete(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Keep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Keep",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->Keep(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Upgrade(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Upgrade",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->Upgrade(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Upgradable(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Upgradable",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->Upgradable(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Downgrade(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Downgrade",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->Downgrade(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Held(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Held",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->Held(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_NowBroken(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_NowBroken",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->NowBroken(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_InstBroken(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_InstBroken",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->InstBroken(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_Install(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDepCacheStateCache_Install",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgDepCache::StateCache const *)arg1)->Install(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_InstVerIter(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + pkgCache *arg2 = 0 ; + VerIterator result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_InstVerIter",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->InstVerIter(*arg2); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgDepCacheStateCache_CandidateVerIter(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + pkgCache *arg2 = 0 ; + VerIterator result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgDepCacheStateCache_CandidateVerIter",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->CandidateVerIter(*arg2); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgDepCacheStateCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgDepCacheStateCache")) goto fail; + result = (pkgDepCache::StateCache *)new pkgDepCache::StateCache(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgDepCache__StateCache, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgDepCacheStateCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache::StateCache *arg1 = (pkgDepCache::StateCache *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgDepCacheStateCache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache__StateCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgDepCacheStateCache_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgDepCache__StateCache, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCachePkgIterator_next__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oi:pkgCachePkgIterator_next",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_next__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_next",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_next(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePkgIterator_next__SWIG_1(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCachePkgIterator_next__SWIG_0(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCachePkgIterator_next'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_end(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_end",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PkgIterator const *)arg1)->end(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator___eq__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + PkgIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator___eq__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PkgIterator const *)arg1)->operator ==((PkgIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator___ne__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + PkgIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator___ne__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PkgIterator const *)arg1)->operator !=((PkgIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator___deref____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + Package *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Package *)(arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Package, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator___deref____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + Package *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Package *)((pkgCache::PkgIterator const *)arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Package, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator___deref__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePkgIterator___deref____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePkgIterator___deref____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCachePkgIterator___deref__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator___mul__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + Package *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Package const &_result_ref = ((pkgCache::PkgIterator const *)arg1)->operator *(); + result = (Package *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Package, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_Cache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_Cache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache *)(arg1)->Cache(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_Name(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_Name",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgIterator const *)arg1)->Name(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_Section(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_Section",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgIterator const *)arg1)->Section(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_Purge(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_Purge",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PkgIterator const *)arg1)->Purge(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_VersionList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + VerIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_VersionList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::PkgIterator const *)arg1)->VersionList(); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_CurrentVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + VerIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_CurrentVer",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::PkgIterator const *)arg1)->CurrentVer(); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_RevDependsList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + DepIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_RevDependsList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::PkgIterator const *)arg1)->RevDependsList(); + + { + DepIterator * resultptr; + resultptr = new DepIterator((DepIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_DepIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_ProvidesList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + SwigValueWrapper< PrvIterator > result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_ProvidesList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::PkgIterator const *)arg1)->ProvidesList(); + + { + PrvIterator * resultptr; + resultptr = new PrvIterator((PrvIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PrvIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_Index(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_Index",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)((pkgCache::PkgIterator const *)arg1)->Index(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_State(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_State",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)((pkgCache::PkgIterator const *)arg1)->State(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePkgIterator__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + Package *arg2 = (Package *) 0 ; + pkgCache::PkgIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:new_pkgCachePkgIterator",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::PkgIterator *)new pkgCache::PkgIterator(*arg1,arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PkgIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePkgIterator__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCachePkgIterator")) goto fail; + result = (pkgCache::PkgIterator *)new pkgCache::PkgIterator(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PkgIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePkgIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 0) { + return _wrap_new_pkgCachePkgIterator__SWIG_1(self,args); + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_Package, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCachePkgIterator__SWIG_0(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_pkgCachePkgIterator'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_NextPackage_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator_NextPackage_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextPackage = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_NextPackage_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_NextPackage_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextPackage); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_RevDepends_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator_RevDepends_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->RevDepends = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_RevDepends_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_RevDepends_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->RevDepends); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_SelectedState_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator_SelectedState_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->SelectedState = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_SelectedState_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_SelectedState_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((*arg1)->SelectedState); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_InstState_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator_InstState_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->InstState = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_InstState_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_InstState_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((*arg1)->InstState); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_CurrentState_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator_CurrentState_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->CurrentState = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_CurrentState_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_CurrentState_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((*arg1)->CurrentState); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((*arg1)->ID); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_Flags_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgIterator_Flags_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->Flags = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgIterator_Flags_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgIterator_Flags_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((*arg1)->Flags); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCachePkgIterator(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgIterator *arg1 = (pkgCache::PkgIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCachePkgIterator",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCachePkgIterator_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__PkgIterator, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheVerIterator_next__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oi:pkgCacheVerIterator_next",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_next__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_next",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_next(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerIterator_next__SWIG_1(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCacheVerIterator_next__SWIG_0(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheVerIterator_next'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_end(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_end",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerIterator const *)arg1)->end(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_assign(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + VerIterator *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_assign",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator =((VerIterator const &)*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___eq__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + VerIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator___eq__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerIterator const *)arg1)->operator ==((VerIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___ne__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + VerIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator___ne__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerIterator const *)arg1)->operator !=((VerIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_CompareVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + VerIterator *arg2 = 0 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_CompareVer",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)((pkgCache::VerIterator const *)arg1)->CompareVer((VerIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___deref____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + Version *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Version *)(arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___deref____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + Version *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Version *)((pkgCache::VerIterator const *)arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___deref__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerIterator___deref____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerIterator___deref____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheVerIterator___deref__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___mul____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + Version *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Version &_result_ref = (arg1)->operator *(); + result = (Version *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___mul____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + Version *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Version const &_result_ref = ((pkgCache::VerIterator const *)arg1)->operator *(); + result = (Version *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerIterator___mul____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerIterator___mul____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheVerIterator___mul__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Cache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Cache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache *)(arg1)->Cache(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_VerStr(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_VerStr",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::VerIterator const *)arg1)->VerStr(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Section(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Section",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::VerIterator const *)arg1)->Section(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Arch(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Arch",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::VerIterator const *)arg1)->Arch(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_ParentPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_ParentPkg",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::VerIterator const *)arg1)->ParentPkg(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_DependsList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + DepIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_DependsList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::VerIterator const *)arg1)->DependsList(); + + { + DepIterator * resultptr; + resultptr = new DepIterator((DepIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_DepIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_ProvidesList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + SwigValueWrapper< PrvIterator > result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_ProvidesList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::VerIterator const *)arg1)->ProvidesList(); + + { + PrvIterator * resultptr; + resultptr = new PrvIterator((PrvIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PrvIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_FileList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + VerFileIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_FileList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::VerIterator const *)arg1)->FileList(); + + { + VerFileIterator * resultptr; + resultptr = new VerFileIterator((VerFileIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerFileIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Index(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Index",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)((pkgCache::VerIterator const *)arg1)->Index(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Downloadable(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Downloadable",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerIterator const *)arg1)->Downloadable(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_PriorityType(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_PriorityType",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)(arg1)->PriorityType(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_RelStr(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_RelStr",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->RelStr(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Automatic(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Automatic",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerIterator const *)arg1)->Automatic(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_NewestFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + VerFileIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_NewestFile",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::VerIterator const *)arg1)->NewestFile(); + + { + VerFileIterator * resultptr; + resultptr = new VerFileIterator((VerFileIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerFileIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVerIterator__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheVerIterator")) goto fail; + result = (pkgCache::VerIterator *)new pkgCache::VerIterator(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__VerIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVerIterator__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + Version *arg2 = (Version *) 0 ; + pkgCache::VerIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:new_pkgCacheVerIterator",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj1) { + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + } + result = (pkgCache::VerIterator *)new pkgCache::VerIterator(*arg1,arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__VerIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVerIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 0) { + return _wrap_new_pkgCacheVerIterator__SWIG_0(self,args); + } + if ((argc >= 1) && (argc <= 2)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + if (argc <= 1) { + return _wrap_new_pkgCacheVerIterator__SWIG_1(self,args); + } + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_Version, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCacheVerIterator__SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_pkgCacheVerIterator'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_NextVer_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_NextVer_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextVer = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_NextVer_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_NextVer_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextVer); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Size_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_Size_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->Size = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Size_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Size_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->Size); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_InstalledSize_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_InstalledSize_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->InstalledSize = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_InstalledSize_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_InstalledSize_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->InstalledSize); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Hash_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_Hash_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->Hash = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Hash_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Hash_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((*arg1)->Hash); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((*arg1)->ID); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Priority_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerIterator_Priority_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->Priority = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerIterator_Priority_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerIterator_Priority_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((*arg1)->Priority); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheVerIterator(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerIterator *arg1 = (pkgCache::VerIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheVerIterator",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheVerIterator_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__VerIterator, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheDepIterator_next__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oi:pkgCacheDepIterator_next",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_next__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_next",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_next(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheDepIterator_next__SWIG_1(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCacheDepIterator_next__SWIG_0(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheDepIterator_next'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_end(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_end",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::DepIterator const *)arg1)->end(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___eq__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + DepIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator___eq__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::DepIterator const *)arg1)->operator ==((DepIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___ne__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + DepIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator___ne__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::DepIterator const *)arg1)->operator !=((DepIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___deref____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + Dependency *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Dependency *)(arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Dependency, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___deref____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + Dependency *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Dependency *)((pkgCache::DepIterator const *)arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Dependency, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___deref__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheDepIterator___deref____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheDepIterator___deref____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheDepIterator___deref__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___mul____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + Dependency *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Dependency &_result_ref = (arg1)->operator *(); + result = (Dependency *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Dependency, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___mul____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + Dependency *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Dependency const &_result_ref = ((pkgCache::DepIterator const *)arg1)->operator *(); + result = (Dependency *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Dependency, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheDepIterator___mul____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheDepIterator___mul____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheDepIterator___mul__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Cache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_Cache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache *)(arg1)->Cache(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_TargetVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_TargetVer",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::DepIterator const *)arg1)->TargetVer(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_TargetPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_TargetPkg",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->TargetPkg(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_SmartTargetPkg__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_SmartTargetPkg",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->SmartTargetPkg(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_ParentVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + VerIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_ParentVer",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->ParentVer(); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_ParentPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_ParentPkg",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->ParentPkg(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Reverse(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_Reverse",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Reverse(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Index(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_Index",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)((pkgCache::DepIterator const *)arg1)->Index(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_IsCritical(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_IsCritical",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->IsCritical(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_GlobOr(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + DepIterator *arg2 = 0 ; + DepIterator *arg3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgCacheDepIterator_GlobOr",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->GlobOr(*arg2,*arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_AllTargets(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + Version **result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_AllTargets",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Version **)(arg1)->AllTargets(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_Version, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_SmartTargetPkg__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + PkgIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_SmartTargetPkg",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->SmartTargetPkg(*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_SmartTargetPkg(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheDepIterator_SmartTargetPkg__SWIG_0(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_PkgIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheDepIterator_SmartTargetPkg__SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheDepIterator_SmartTargetPkg'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_CompType(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_CompType",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)(arg1)->CompType(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_DepType(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_DepType",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)(arg1)->DepType(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheDepIterator__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + Dependency *arg2 = (Dependency *) 0 ; + Version *arg3 = (Version *) 0 ; + pkgCache::DepIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:new_pkgCacheDepIterator",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + } + result = (pkgCache::DepIterator *)new pkgCache::DepIterator(*arg1,arg2,arg3); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__DepIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheDepIterator__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + Dependency *arg2 = (Dependency *) 0 ; + Package *arg3 = (Package *) 0 ; + pkgCache::DepIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:new_pkgCacheDepIterator",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Dependency,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::DepIterator *)new pkgCache::DepIterator(*arg1,arg2,arg3); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__DepIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheDepIterator__SWIG_2(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheDepIterator")) goto fail; + result = (pkgCache::DepIterator *)new pkgCache::DepIterator(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__DepIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheDepIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 0) { + return _wrap_new_pkgCacheDepIterator__SWIG_2(self,args); + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_Dependency, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + if (argc <= 2) { + return _wrap_new_pkgCacheDepIterator__SWIG_0(self,args); + } + { + void *ptr; + if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_Version, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCacheDepIterator__SWIG_0(self,args); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_Dependency, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_Package, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCacheDepIterator__SWIG_1(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_pkgCacheDepIterator'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Version_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_Version_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->Version = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Version_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_Version_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->Version); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Package_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_Package_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->Package = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Package_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_Package_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->Package); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_NextDepends_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_NextDepends_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextDepends = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_NextDepends_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_NextDepends_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextDepends); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_NextRevDepends_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_NextRevDepends_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextRevDepends = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_NextRevDepends_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_NextRevDepends_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextRevDepends); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->ID); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Type_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_Type_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->Type = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_Type_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_Type_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((*arg1)->Type); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_CompareOp_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + unsigned char arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheDepIterator_CompareOp_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned char) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->CompareOp = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheDepIterator_CompareOp_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + unsigned char result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheDepIterator_CompareOp_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned char) ((*arg1)->CompareOp); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheDepIterator(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::DepIterator *arg1 = (pkgCache::DepIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheDepIterator",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheDepIterator_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__DepIterator, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCachePrvIterator_next__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oi:pkgCachePrvIterator_next",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_next__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_next",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_next(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PrvIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePrvIterator_next__SWIG_1(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PrvIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCachePrvIterator_next__SWIG_0(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCachePrvIterator_next'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_end(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_end",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PrvIterator const *)arg1)->end(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___eq__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + PrvIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePrvIterator___eq__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PrvIterator const *)arg1)->operator ==((PrvIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___ne__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + PrvIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePrvIterator___ne__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PrvIterator const *)arg1)->operator !=((PrvIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___deref____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + Provides *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Provides *)(arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Provides, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___deref____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + Provides *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Provides *)((pkgCache::PrvIterator const *)arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Provides, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___deref__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PrvIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePrvIterator___deref____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PrvIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePrvIterator___deref____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCachePrvIterator___deref__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___mul____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + Provides *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Provides &_result_ref = (arg1)->operator *(); + result = (Provides *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Provides, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___mul____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + Provides *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Provides const &_result_ref = ((pkgCache::PrvIterator const *)arg1)->operator *(); + result = (Provides *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Provides, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PrvIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePrvIterator___mul____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PrvIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePrvIterator___mul____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCachePrvIterator___mul__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_Cache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_Cache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache *)(arg1)->Cache(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_Name(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_Name",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PrvIterator const *)arg1)->Name(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_ProvideVersion(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_ProvideVersion",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PrvIterator const *)arg1)->ProvideVersion(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_ParentPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_ParentPkg",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->ParentPkg(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_OwnerVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + VerIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_OwnerVer",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->OwnerVer(); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_OwnerPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_OwnerPkg",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->OwnerPkg(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_Index(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_Index",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)((pkgCache::PrvIterator const *)arg1)->Index(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePrvIterator__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + Provides *arg2 = (Provides *) 0 ; + Version *arg3 = (Version *) 0 ; + pkgCache::PrvIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:new_pkgCachePrvIterator",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::PrvIterator *)new pkgCache::PrvIterator(*arg1,arg2,arg3); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PrvIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePrvIterator__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + Provides *arg2 = (Provides *) 0 ; + Package *arg3 = (Package *) 0 ; + pkgCache::PrvIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:new_pkgCachePrvIterator",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Provides,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_Package,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::PrvIterator *)new pkgCache::PrvIterator(*arg1,arg2,arg3); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PrvIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePrvIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_Provides, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_Version, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCachePrvIterator__SWIG_0(self,args); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_Provides, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_Package, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCachePrvIterator__SWIG_1(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_pkgCachePrvIterator'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_Version_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePrvIterator_Version_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->Version = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_Version_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_Version_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->Version); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_NextProvides_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePrvIterator_NextProvides_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextProvides = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_NextProvides_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_NextProvides_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextProvides); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_NextPkgProv_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePrvIterator_NextPkgProv_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextPkgProv = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePrvIterator_NextPkgProv_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePrvIterator_NextPkgProv_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextPkgProv); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCachePrvIterator(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PrvIterator *arg1 = (pkgCache::PrvIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCachePrvIterator",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PrvIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCachePrvIterator_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__PrvIterator, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCachePkgFileIterator_next__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oi:pkgCachePkgFileIterator_next",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_next__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_next",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_next(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePkgFileIterator_next__SWIG_1(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCachePkgFileIterator_next__SWIG_0(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCachePkgFileIterator_next'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_end(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_end",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PkgFileIterator const *)arg1)->end(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator___eq__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + PkgFileIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgFileIterator___eq__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PkgFileIterator const *)arg1)->operator ==((PkgFileIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator___ne__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + PkgFileIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgFileIterator___ne__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::PkgFileIterator const *)arg1)->operator !=((PkgFileIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator___deref____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + PackageFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (PackageFile *)(arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_PackageFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator___deref____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + PackageFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (PackageFile *)((pkgCache::PkgFileIterator const *)arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_PackageFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator___deref__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePkgFileIterator___deref____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCachePkgFileIterator___deref____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCachePkgFileIterator___deref__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator___mul__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + PackageFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PackageFile const &_result_ref = ((pkgCache::PkgFileIterator const *)arg1)->operator *(); + result = (PackageFile *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_PackageFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Cache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Cache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache *)(arg1)->Cache(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_FileName(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_FileName",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->FileName(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Archive(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Archive",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->Archive(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Component(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Component",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->Component(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Version(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Version",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->Version(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Origin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Origin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->Origin(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Label(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Label",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->Label(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Site(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Site",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->Site(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Architecture(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Architecture",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->Architecture(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_IndexType(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_IndexType",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *)((pkgCache::PkgFileIterator const *)arg1)->IndexType(); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Index(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Index",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)((pkgCache::PkgFileIterator const *)arg1)->Index(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_IsOk(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_IsOk",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->IsOk(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_RelStr(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_RelStr",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->RelStr(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePkgFileIterator__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCachePkgFileIterator")) goto fail; + result = (pkgCache::PkgFileIterator *)new pkgCache::PkgFileIterator(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PkgFileIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePkgFileIterator__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + pkgCache::PkgFileIterator *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:new_pkgCachePkgFileIterator",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::PkgFileIterator *)new pkgCache::PkgFileIterator(*arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PkgFileIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePkgFileIterator__SWIG_2(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + PackageFile *arg2 = (PackageFile *) 0 ; + pkgCache::PkgFileIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:new_pkgCachePkgFileIterator",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PackageFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::PkgFileIterator *)new pkgCache::PkgFileIterator(*arg1,arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__PkgFileIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCachePkgFileIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 0) { + return _wrap_new_pkgCachePkgFileIterator__SWIG_0(self,args); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCachePkgFileIterator__SWIG_1(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_PackageFile, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCachePkgFileIterator__SWIG_2(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_pkgCachePkgFileIterator'"); + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Size_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgFileIterator_Size_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->Size = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Size_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Size_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((*arg1)->Size); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Flags_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgFileIterator_Flags_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->Flags = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_Flags_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_Flags_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((*arg1)->Flags); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_NextFile_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgFileIterator_NextFile_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextFile = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_NextFile_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_NextFile_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextFile); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgFileIterator_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((*arg1)->ID); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_mtime_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + time_t arg2 ; + time_t *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCachePkgFileIterator_mtime_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_time_t,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->mtime = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCachePkgFileIterator_mtime_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + time_t result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCachePkgFileIterator_mtime_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->mtime); + + { + time_t * resultptr; + resultptr = new time_t((time_t &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_time_t, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCachePkgFileIterator(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::PkgFileIterator *arg1 = (pkgCache::PkgFileIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCachePkgFileIterator",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCachePkgFileIterator_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__PkgFileIterator, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheVerFileIterator_next__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oi:pkgCacheVerFileIterator_next",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_next__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_next",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->operator ++(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_next(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerFileIterator_next__SWIG_1(self,args); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + return _wrap_pkgCacheVerFileIterator_next__SWIG_0(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheVerFileIterator_next'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_end(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_end",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerFileIterator const *)arg1)->end(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator___eq__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + VerFileIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFileIterator___eq__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerFileIterator const *)arg1)->operator ==((VerFileIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator___ne__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + VerFileIterator *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFileIterator___ne__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgCache::VerFileIterator const *)arg1)->operator !=((VerFileIterator const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator___deref____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + VerFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (VerFile *)(arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_VerFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator___deref____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + VerFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (VerFile *)((pkgCache::VerFileIterator const *)arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_VerFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator___deref__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerFileIterator___deref____SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache__VerFileIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheVerFileIterator___deref____SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheVerFileIterator___deref__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator___mul__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + VerFile *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + VerFile const &_result_ref = ((pkgCache::VerFileIterator const *)arg1)->operator *(); + result = (VerFile *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_VerFile, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_Cache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_Cache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache *)(arg1)->Cache(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_File(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + PkgFileIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_File",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgCache::VerFileIterator const *)arg1)->File(); + + { + PkgFileIterator * resultptr; + resultptr = new PkgFileIterator((PkgFileIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgFileIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_Index(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_Index",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)((pkgCache::VerFileIterator const *)arg1)->Index(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVerFileIterator__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheVerFileIterator")) goto fail; + result = (pkgCache::VerFileIterator *)new pkgCache::VerFileIterator(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__VerFileIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVerFileIterator__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + VerFile *arg2 = (VerFile *) 0 ; + pkgCache::VerFileIterator *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:new_pkgCacheVerFileIterator",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache::VerFileIterator *)new pkgCache::VerFileIterator(*arg1,arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache__VerFileIterator, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheVerFileIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 0) { + return _wrap_new_pkgCacheVerFileIterator__SWIG_0(self,args); + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCache, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_VerFile, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_pkgCacheVerFileIterator__SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_pkgCacheVerFileIterator'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_NextFile_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFileIterator_NextFile_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->NextFile = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_NextFile_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_NextFile_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->NextFile); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_Offset_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + map_ptrloc arg2 ; + map_ptrloc *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFileIterator_Offset_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_map_ptrloc,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if (arg1) (*arg1)->Offset = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_Offset_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + map_ptrloc result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_Offset_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((*arg1)->Offset); + + { + map_ptrloc * resultptr; + resultptr = new map_ptrloc((map_ptrloc &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_map_ptrloc, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_Size_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + unsigned short arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheVerFileIterator_Size_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned short) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (*arg1)->Size = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheVerFileIterator_Size_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + unsigned short result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheVerFileIterator_Size_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned short) ((*arg1)->Size); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheVerFileIterator(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache::VerFileIterator *arg1 = (pkgCache::VerFileIterator *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheVerFileIterator",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheVerFileIterator_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCache__VerFileIterator, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgCacheFile_Policy_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgPolicy *arg2 = (pkgPolicy *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_Policy_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgPolicy,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->Policy = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_Policy_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgPolicy *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_Policy_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgPolicy *) ((arg1)->Policy); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgPolicy, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_pkgCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_pkgCache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgCache *)(arg1)->operator pkgCache *(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_pkgDepCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgDepCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_pkgDepCache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgDepCache *)(arg1)->operator pkgDepCache *(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgDepCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile___deref__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgDepCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile___deref__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgDepCache *)(arg1)->operator ->(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgDepCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile___mul__(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgDepCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile___mul__",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgDepCache &_result_ref = (arg1)->operator *(); + result = (pkgDepCache *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgDepCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile___getitem____SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgCache::PkgIterator *arg2 = 0 ; + pkgDepCache::StateCache *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile___getitem__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgDepCache::StateCache &_result_ref = (arg1)->operator []((pkgCache::PkgIterator const &)*arg2); + result = (pkgDepCache::StateCache *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgDepCache__StateCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile___getitem____SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgCache::DepIterator *arg2 = 0 ; + unsigned char *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile___getitem__",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + unsigned char &_result_ref = (arg1)->operator []((pkgCache::DepIterator const &)*arg2); + result = (unsigned char *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_char, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile___getitem__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCacheFile, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_pkgCache__PkgIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheFile___getitem____SWIG_0(self,args); + } + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgCacheFile, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgCacheFile___getitem____SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgCacheFile___getitem__'"); + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_BuildCaches(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + OpProgress *arg2 = 0 ; + bool arg3 = (bool) true ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:pkgCacheFile_BuildCaches",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)(arg1)->BuildCaches(*arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_Open(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + OpProgress *arg2 = 0 ; + bool arg3 = (bool) true ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:pkgCacheFile_Open",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)(arg1)->Open(*arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_Close(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_Close",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Close(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgCacheFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgCacheFile")) goto fail; + result = (pkgCacheFile *)new pkgCacheFile(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCacheFile, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgCacheFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgCacheFile",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_BuildGroupOrs(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + VerIterator *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_BuildGroupOrs",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (*arg1)->BuildGroupOrs((VerIterator const &)*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_UpdateVerState(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PkgIterator arg2 ; + PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_UpdateVerState",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + (*arg1)->UpdateVerState(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_Head(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + Header *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_Head",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Header &_result_ref = (*arg1)->Head(); + result = (Header *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Header, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_PkgBegin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PkgIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_PkgBegin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (*arg1)->PkgBegin(); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_FindPkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + string *arg2 = 0 ; + PkgIterator result; + std::string temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_FindPkg",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) { + temp2 = std::string(PyString_AsString(obj1)); + arg2 = &temp2; + }else { + SWIG_exception(SWIG_TypeError, "string expected"); + } + } + result = (*arg1)->FindPkg((string const &)*arg2); + + { + PkgIterator * resultptr; + resultptr = new PkgIterator((PkgIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_PkgIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_GetCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgCache *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_GetCache",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgCache &_result_ref = (*arg1)->GetCache(); + result = (pkgCache *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgCache, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_VS(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + pkgVersioningSystem *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_VS",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgVersioningSystem &_result_ref = (*arg1)->VS(); + result = (pkgVersioningSystem *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgVersioningSystem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_GetCandidateVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PkgIterator arg2 ; + VerIterator result; + PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_GetCandidateVer",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + result = (*arg1)->GetCandidateVer(arg2); + + { + VerIterator * resultptr; + resultptr = new VerIterator((VerIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VerIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_IsImportantDep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + DepIterator arg2 ; + bool result; + DepIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_IsImportantDep",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_DepIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + result = (bool)(*arg1)->IsImportantDep(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_GetPolicy(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + Policy *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_GetPolicy",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + Policy &_result_ref = (*arg1)->GetPolicy(); + result = (Policy *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Policy, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_MarkKeep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 = (bool) false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:pkgCacheFile_MarkKeep",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + (*arg1)->MarkKeep((PkgIterator const &)*arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_MarkDelete(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 = (bool) false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:pkgCacheFile_MarkDelete",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + (*arg1)->MarkDelete((PkgIterator const &)*arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_MarkInstall(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 = (bool) true ; + unsigned long arg4 = (unsigned long) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|OO:pkgCacheFile_MarkInstall",&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (unsigned long) PyInt_AsLong(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + (*arg1)->MarkInstall((PkgIterator const &)*arg2,arg3,arg4); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_SetReInstall(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + PkgIterator *arg2 = 0 ; + bool arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgCacheFile_SetReInstall",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_PkgIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + (*arg1)->SetReInstall((PkgIterator const &)*arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_SetCandidateVersion(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + VerIterator arg2 ; + VerIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_SetCandidateVersion",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_VerIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + (*arg1)->SetCandidateVersion(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_Update(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + OpProgress *arg2 = (OpProgress *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:pkgCacheFile_Update",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj1) { + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + } + (*arg1)->Update(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_UsrSize(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + double result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_UsrSize",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (double)(*arg1)->UsrSize(); + + resultobj = PyFloat_FromDouble(result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_DebSize(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + double result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_DebSize",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (double)(*arg1)->DebSize(); + + resultobj = PyFloat_FromDouble(result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_DelCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_DelCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(*arg1)->DelCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_KeepCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_KeepCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(*arg1)->KeepCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_InstCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_InstCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(*arg1)->InstCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_BrokenCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_BrokenCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(*arg1)->BrokenCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_BadCount(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgCacheFile_BadCount",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long)(*arg1)->BadCount(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgCacheFile_Init(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCacheFile *arg1 = (pkgCacheFile *) 0 ; + OpProgress *arg2 = (OpProgress *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgCacheFile_Init",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCacheFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(*arg1)->Init(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgCacheFile_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgCacheFile, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgProblemResolver_Protect(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + pkgCache::PkgIterator arg2 ; + pkgCache::PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgProblemResolver_Protect",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + (arg1)->Protect(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgProblemResolver_Remove(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + pkgCache::PkgIterator arg2 ; + pkgCache::PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgProblemResolver_Remove",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + (arg1)->Remove(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgProblemResolver_Clear(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + pkgCache::PkgIterator arg2 ; + pkgCache::PkgIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgProblemResolver_Clear",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_pkgCache__PkgIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + (arg1)->Clear(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgProblemResolver_Resolve(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + bool arg2 = (bool) false ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:pkgProblemResolver_Resolve",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj1) { + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)(arg1)->Resolve(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgProblemResolver_ResolveByKeep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgProblemResolver_ResolveByKeep",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->ResolveByKeep(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgProblemResolver_InstallProtect(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgProblemResolver_InstallProtect",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->InstallProtect(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgProblemResolver_RemoveDepends(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgProblemResolver_RemoveDepends",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->RemoveDepends(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgProblemResolver(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + pkgProblemResolver *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:new_pkgProblemResolver",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgProblemResolver *)new pkgProblemResolver(arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgProblemResolver, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgProblemResolver(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgProblemResolver *arg1 = (pkgProblemResolver *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgProblemResolver",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgProblemResolver_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgProblemResolver, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgDistUpgrade(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgDistUpgrade",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)pkgDistUpgrade(*arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgApplyStatus(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgApplyStatus",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)pkgApplyStatus(*arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgFixBroken(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgFixBroken",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)pkgFixBroken(*arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAllUpgrade(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAllUpgrade",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)pkgAllUpgrade(*arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgMinimizeUpgrade(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgMinimizeUpgrade",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)pkgMinimizeUpgrade(*arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgPrioSortList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + pkgCache::Version **arg2 = (pkgCache::Version **) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgPrioSortList",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_p_pkgCache__Version,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + pkgPrioSortList(*arg1,arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static int _wrap_pkgSystem_GlobalList_set(PyObject *_val) { + { + void *temp; + if ((SWIG_ConvertPtr(_val,(void **) &temp, SWIGTYPE_p_p_pkgSystem, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) { + PyErr_SetString(PyExc_TypeError, "C variable 'pkgSystem::GlobalList (pkgSystem **)'"); + return 1; + } + pkgSystem::GlobalList = (pkgSystem **) temp; + } + return 0; +} + + +static PyObject *_wrap_pkgSystem_GlobalList_get() { + PyObject *pyobj; + + pyobj = SWIG_NewPointerObj((void *) pkgSystem::GlobalList, SWIGTYPE_p_p_pkgSystem, 0); + return pyobj; +} + + +static int _wrap_pkgSystem_GlobalListLen_set(PyObject *_val) { + { + long temp = PyInt_AsLong(_val); + if (PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, "C variable 'pkgSystem::GlobalListLen (unsigned long)'"); + return 1; + } + pkgSystem::GlobalListLen = (unsigned long) temp; + } + return 0; +} + + +static PyObject *_wrap_pkgSystem_GlobalListLen_get() { + PyObject *pyobj; + + pyobj = PyInt_FromLong((long)pkgSystem::GlobalListLen); + return pyobj; +} + + +static PyObject *_wrap_pkgSystem_GetSystem(PyObject *self, PyObject *args) { + PyObject *resultobj; + char *arg1 ; + pkgSystem *result; + + if(!PyArg_ParseTuple(args,(char *)"s:pkgSystem_GetSystem",&arg1)) goto fail; + result = (pkgSystem *)pkgSystem::GetSystem((char const *)arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgSystem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_Label_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSystem_Label_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *) ((arg1)->Label); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_VS_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + pkgVersioningSystem *arg2 = (pkgVersioningSystem *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSystem_VS_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; + if (arg1) (arg1)->VS = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_VS_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + pkgVersioningSystem *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSystem_VS_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgVersioningSystem *) ((arg1)->VS); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgVersioningSystem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_Lock(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSystem_Lock",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Lock(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_UnLock(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + bool arg2 = (bool) false ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:pkgSystem_UnLock",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj1) { + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)(arg1)->UnLock(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_LockRead(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSystem_LockRead",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->LockRead(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_CreatePM(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + pkgDepCache *arg2 = (pkgDepCache *) 0 ; + pkgPackageManager *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSystem_CreatePM",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgPackageManager *)((pkgSystem const *)arg1)->CreatePM(arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgPackageManager, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_Initialize(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + Configuration *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSystem_Initialize",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Initialize(*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_ArchiveSupported(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + char *arg2 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:pkgSystem_ArchiveSupported",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->ArchiveSupported((char const *)arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_AddStatusFiles(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + vector<pkgIndexFile * > *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSystem_AddStatusFiles",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_vectorTpkgIndexFile_p_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->AddStatusFiles(*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_FindIndex(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + pkgCache::PkgFileIterator arg2 ; + pkgIndexFile **arg3 = 0 ; + bool result; + pkgCache::PkgFileIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgSystem_FindIndex",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_p_pkgIndexFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgSystem const *)arg1)->FindIndex(arg2,*arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_Score(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + Configuration *arg2 = 0 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSystem_Score",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->Score((Configuration const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_PreProcess(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + pkgIndexFile **arg2 = (pkgIndexFile **) 0 ; + pkgIndexFile **arg3 = (pkgIndexFile **) 0 ; + OpProgress *arg4 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOO:pkgSystem_PreProcess",&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_p_pkgIndexFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_p_pkgIndexFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->PreProcess(arg2,arg3,*arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_ProcessCache(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + pkgDepCache *arg2 = 0 ; + pkgProblemResolver *arg3 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgSystem_ProcessCache",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgProblemResolver,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->ProcessCache(*arg2,*arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSystem_IgnoreDep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + pkgVersioningSystem *arg2 = 0 ; + pkgCache::DepIterator *arg3 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgSystem_IgnoreDep",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->IgnoreDep(*arg2,*arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgSystem(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSystem *arg1 = (pkgSystem *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgSystem",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgSystem_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgSystem, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static int _wrap__system_set(PyObject *_val) { + { + void *temp; + if ((SWIG_ConvertPtr(_val,(void **) &temp, SWIGTYPE_p_pkgSystem, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) { + PyErr_SetString(PyExc_TypeError, "C variable '_system (pkgSystem *)'"); + return 1; + } + _system = (pkgSystem *) temp; + } + return 0; +} + + +static PyObject *_wrap__system_get() { + PyObject *pyobj; + + pyobj = SWIG_NewPointerObj((void *) _system, SWIGTYPE_p_pkgSystem, 0); + return pyobj; +} + + +static PyObject *_wrap_Configuration_Find__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + char *arg3 = (char *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os|s:Configuration_Find",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((Configuration const *)arg1)->Find((char const *)arg2,(char const *)arg3); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Find__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + string arg2 ; + char *arg3 = (char *) 0 ; + string result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|s:Configuration_Find",&obj0,&obj1,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = ((Configuration const *)arg1)->Find(arg2,(char const *)arg3); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Find(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + if (argc <= 2) { + return _wrap_Configuration_Find__SWIG_0(self,args); + } + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_Find__SWIG_0(self,args); + } + } + } + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + if (argc <= 2) { + return _wrap_Configuration_Find__SWIG_1(self,args); + } + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_Find__SWIG_1(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Configuration_Find'"); + return NULL; +} + + +static PyObject *_wrap_Configuration_FindFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + char *arg3 = (char *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os|s:Configuration_FindFile",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((Configuration const *)arg1)->FindFile((char const *)arg2,(char const *)arg3); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_FindDir(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + char *arg3 = (char *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os|s:Configuration_FindDir",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((Configuration const *)arg1)->FindDir((char const *)arg2,(char const *)arg3); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_FindI__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + int arg3 = (int) 0 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os|i:Configuration_FindI",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)((Configuration const *)arg1)->FindI((char const *)arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_FindI__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + string arg2 ; + int arg3 = (int) 0 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|i:Configuration_FindI",&obj0,&obj1,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)((Configuration const *)arg1)->FindI(arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_FindI(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + if (argc <= 2) { + return _wrap_Configuration_FindI__SWIG_0(self,args); + } + { + _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_FindI__SWIG_0(self,args); + } + } + } + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + if (argc <= 2) { + return _wrap_Configuration_FindI__SWIG_1(self,args); + } + { + _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_FindI__SWIG_1(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Configuration_FindI'"); + return NULL; +} + + +static PyObject *_wrap_Configuration_FindB__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + bool arg3 = (bool) false ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os|O:Configuration_FindB",&obj0,&arg2,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)((Configuration const *)arg1)->FindB((char const *)arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_FindB__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + string arg2 ; + bool arg3 = (bool) false ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:Configuration_FindB",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)((Configuration const *)arg1)->FindB(arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_FindB(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + if (argc <= 2) { + return _wrap_Configuration_FindB__SWIG_0(self,args); + } + { + _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_FindB__SWIG_0(self,args); + } + } + } + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + if (argc <= 2) { + return _wrap_Configuration_FindB__SWIG_1(self,args); + } + { + _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_FindB__SWIG_1(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Configuration_FindB'"); + return NULL; +} + + +static PyObject *_wrap_Configuration_FindAny(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + char *arg3 = (char *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os|s:Configuration_FindAny",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((Configuration const *)arg1)->FindAny((char const *)arg2,(char const *)arg3); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Set__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + string arg2 ; + string arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:Configuration_Set",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + (arg1)->Set(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_CndSet(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + string arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OsO:Configuration_CndSet",&obj0,&arg2,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + (arg1)->CndSet((char const *)arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Set__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + string arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OsO:Configuration_Set",&obj0,&arg2,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + (arg1)->Set((char const *)arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Set__SWIG_2(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + int arg3 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Osi:Configuration_Set",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Set((char const *)arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Set(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_Set__SWIG_2(self,args); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_Set__SWIG_1(self,args); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_Set__SWIG_0(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Configuration_Set'"); + return NULL; +} + + +static PyObject *_wrap_Configuration_Exists__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + string arg2 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:Configuration_Exists",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (bool)((Configuration const *)arg1)->Exists(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Exists__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:Configuration_Exists",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((Configuration const *)arg1)->Exists((char const *)arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Exists(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_Exists__SWIG_0(self,args); + } + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + return _wrap_Configuration_Exists__SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Configuration_Exists'"); + return NULL; +} + + +static PyObject *_wrap_Configuration_ExistsAny(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:Configuration_ExistsAny",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((Configuration const *)arg1)->ExistsAny((char const *)arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Clear(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + string arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:Configuration_Clear",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + (arg1)->Clear(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Tree(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + char *arg2 ; + Item *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:Configuration_Tree",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Item *)((Configuration const *)arg1)->Tree((char const *)arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Item, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Configuration_Dump(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:Configuration_Dump",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Dump(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_Configuration__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + Item *arg1 = (Item *) 0 ; + Configuration *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:new_Configuration",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (Configuration *)new Configuration((Item const *)arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Configuration, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_Configuration__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *result; + + if(!PyArg_ParseTuple(args,(char *)":new_Configuration")) goto fail; + result = (Configuration *)new Configuration(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Configuration, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_Configuration(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 0) { + return _wrap_new_Configuration__SWIG_1(self,args); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Item, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_Configuration__SWIG_0(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_Configuration'"); + return NULL; +} + + +static PyObject *_wrap_delete_Configuration(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = (Configuration *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_Configuration",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * Configuration_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_Configuration, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static int _wrap__config_set(PyObject *_val) { + { + void *temp; + if ((SWIG_ConvertPtr(_val,(void **) &temp, SWIGTYPE_p_Configuration, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) { + PyErr_SetString(PyExc_TypeError, "C variable '_config (Configuration *)'"); + return 1; + } + _config = (Configuration *) temp; + } + return 0; +} + + +static PyObject *_wrap__config_get() { + PyObject *pyobj; + + pyobj = SWIG_NewPointerObj((void *) _config, SWIGTYPE_p_Configuration, 0); + return pyobj; +} + + +static PyObject *_wrap_ReadConfigFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = 0 ; + string arg2 ; + bool arg3 = (bool) false ; + unsigned int arg4 = (unsigned int) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|OO:ReadConfigFile",&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (unsigned int) PyInt_AsLong(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)ReadConfigFile(*arg1,arg2,arg3,arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_ReadConfigDir(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = 0 ; + string arg2 ; + bool arg3 = (bool) false ; + unsigned int arg4 = (unsigned int) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|OO:ReadConfigDir",&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if (obj2) { + arg3 = (bool) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (unsigned int) PyInt_AsLong(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + result = (bool)ReadConfigDir(*arg1,arg2,arg3,arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_OpProgress_Progress(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpProgress *arg1 = (OpProgress *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:OpProgress_Progress",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + (arg1)->Progress(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_OpProgress_SubProgress__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpProgress *arg1 = (OpProgress *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:OpProgress_SubProgress",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + (arg1)->SubProgress(arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_OpProgress_SubProgress__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpProgress *arg1 = (OpProgress *) 0 ; + unsigned long arg2 ; + string arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:OpProgress_SubProgress",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + (arg1)->SubProgress(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_OpProgress_SubProgress(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_OpProgress, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + return _wrap_OpProgress_SubProgress__SWIG_0(self,args); + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_OpProgress, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_OpProgress_SubProgress__SWIG_1(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'OpProgress_SubProgress'"); + return NULL; +} + + +static PyObject *_wrap_OpProgress_OverallProgress(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpProgress *arg1 = (OpProgress *) 0 ; + unsigned long arg2 ; + unsigned long arg3 ; + unsigned long arg4 ; + string arg5 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:OpProgress_OverallProgress",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + arg4 = (unsigned long) PyInt_AsLong(obj3); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj4)) + arg5 = std::string(PyString_AsString(obj4)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + (arg1)->OverallProgress(arg2,arg3,arg4,arg5); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_OpProgress_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpProgress *arg1 = (OpProgress *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:OpProgress_Done",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_OpProgress(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpProgress *result; + + if(!PyArg_ParseTuple(args,(char *)":new_OpProgress")) goto fail; + result = (OpProgress *)new OpProgress(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_OpProgress, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_OpProgress(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpProgress *arg1 = (OpProgress *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_OpProgress",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * OpProgress_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_OpProgress, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_OpTextProgress_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpTextProgress *arg1 = (OpTextProgress *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:OpTextProgress_Done",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpTextProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_OpTextProgress__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + bool arg1 = (bool) false ; + OpTextProgress *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"|O:new_OpTextProgress",&obj0)) goto fail; + if (obj0) { + arg1 = (bool) PyInt_AsLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + result = (OpTextProgress *)new OpTextProgress(arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_OpTextProgress, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_OpTextProgress__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + Configuration *arg1 = 0 ; + OpTextProgress *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:new_OpTextProgress",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Configuration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (OpTextProgress *)new OpTextProgress(*arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_OpTextProgress, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_OpTextProgress(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 0) && (argc <= 1)) { + int _v; + if (argc <= 0) { + return _wrap_new_OpTextProgress__SWIG_0(self,args); + } + { + _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0; + } + if (_v) { + return _wrap_new_OpTextProgress__SWIG_0(self,args); + } + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_Configuration, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_new_OpTextProgress__SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_OpTextProgress'"); + return NULL; +} + + +static PyObject *_wrap_delete_OpTextProgress(PyObject *self, PyObject *args) { + PyObject *resultobj; + OpTextProgress *arg1 = (OpTextProgress *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_OpTextProgress",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_OpTextProgress,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * OpTextProgress_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_OpTextProgress, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static int _wrap_pkgVersioningSystem_GlobalList_set(PyObject *_val) { + { + void *temp; + if ((SWIG_ConvertPtr(_val,(void **) &temp, SWIGTYPE_p_p_pkgVersioningSystem, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) { + PyErr_SetString(PyExc_TypeError, "C variable 'pkgVersioningSystem::GlobalList (pkgVersioningSystem **)'"); + return 1; + } + pkgVersioningSystem::GlobalList = (pkgVersioningSystem **) temp; + } + return 0; +} + + +static PyObject *_wrap_pkgVersioningSystem_GlobalList_get() { + PyObject *pyobj; + + pyobj = SWIG_NewPointerObj((void *) pkgVersioningSystem::GlobalList, SWIGTYPE_p_p_pkgVersioningSystem, 0); + return pyobj; +} + + +static int _wrap_pkgVersioningSystem_GlobalListLen_set(PyObject *_val) { + { + long temp = PyInt_AsLong(_val); + if (PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, "C variable 'pkgVersioningSystem::GlobalListLen (unsigned long)'"); + return 1; + } + pkgVersioningSystem::GlobalListLen = (unsigned long) temp; + } + return 0; +} + + +static PyObject *_wrap_pkgVersioningSystem_GlobalListLen_get() { + PyObject *pyobj; + + pyobj = PyInt_FromLong((long)pkgVersioningSystem::GlobalListLen); + return pyobj; +} + + +static PyObject *_wrap_pkgVersioningSystem_GetVS(PyObject *self, PyObject *args) { + PyObject *resultobj; + char *arg1 ; + pkgVersioningSystem *result; + + if(!PyArg_ParseTuple(args,(char *)"s:pkgVersioningSystem_GetVS",&arg1)) goto fail; + result = (pkgVersioningSystem *)pkgVersioningSystem::GetVS((char const *)arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgVersioningSystem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_Label_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgVersioningSystem_Label_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *) ((arg1)->Label); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_DoCmpVersion(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + char *arg3 ; + char *arg4 ; + char *arg5 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Ossss:pkgVersioningSystem_DoCmpVersion",&obj0,&arg2,&arg3,&arg4,&arg5)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->DoCmpVersion((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_DoCmpVersionArch(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + char *arg3 ; + char *arg4 ; + char *arg5 ; + char *arg6 ; + char *arg7 ; + char *arg8 ; + char *arg9 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Ossssssss:pkgVersioningSystem_DoCmpVersionArch",&obj0,&arg2,&arg3,&arg4,&arg5,&arg6,&arg7,&arg8,&arg9)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->DoCmpVersionArch((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpVersionArch(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + string arg2 ; + string arg3 ; + char *arg4 ; + char *arg5 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOss:pkgVersioningSystem_CmpVersionArch",&obj0,&obj1,&obj2,&arg4,&arg5)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)(arg1)->CmpVersionArch(arg2,arg3,(char const *)arg4,(char const *)arg5); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CheckDep__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + pkgCache::DepIterator arg3 ; + bool result; + pkgCache::DepIterator *argp3 ; + PyObject * obj0 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OsO:pkgVersioningSystem_CheckDep",&obj0,&arg2,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &argp3, SWIGTYPE_p_pkgCache__DepIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg3 = *argp3; + result = (bool)(arg1)->CheckDep((char const *)arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CheckDep__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + int arg3 ; + char *arg4 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Osis:pkgVersioningSystem_CheckDep",&obj0,&arg2,&arg3,&arg4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->CheckDep((char const *)arg2,arg3,(char const *)arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CheckDep(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + void *ptr; + if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_pkgCache__DepIterator, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + return _wrap_pkgVersioningSystem_CheckDep__SWIG_0(self,args); + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[3]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CheckDep__SWIG_1(self,args); + } + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgVersioningSystem_CheckDep'"); + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_DoCmpReleaseVer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + char *arg3 ; + char *arg4 ; + char *arg5 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Ossss:pkgVersioningSystem_DoCmpReleaseVer",&obj0,&arg2,&arg3,&arg4,&arg5)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->DoCmpReleaseVer((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_UpstreamVersion(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:pkgVersioningSystem_UpstreamVersion",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->UpstreamVersion((char const *)arg2); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_TestCompatibility(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + pkgVersioningSystem *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgVersioningSystem_TestCompatibility",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->TestCompatibility((pkgVersioningSystem const &)*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpVersion__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + char *arg3 ; + char *arg4 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Osss:pkgVersioningSystem_CmpVersion",&obj0,&arg2,&arg3,&arg4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->CmpVersion((char const *)arg2,(char const *)arg3,(char const *)arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpVersion__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + string arg2 ; + char *arg3 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOs:pkgVersioningSystem_CmpVersion",&obj0,&obj1,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)(arg1)->CmpVersion(arg2,(char const *)arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpVersion__SWIG_2(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + string arg2 ; + string arg3 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgVersioningSystem_CmpVersion",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)(arg1)->CmpVersion(arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpVersion__SWIG_3(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + string arg2 ; + char *arg3 ; + char *arg4 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOss:pkgVersioningSystem_CmpVersion",&obj0,&obj1,&arg3,&arg4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)(arg1)->CmpVersion(arg2,(char const *)arg3,(char const *)arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpVersion(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpVersion__SWIG_1(self,args); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpVersion__SWIG_2(self,args); + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[3]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpVersion__SWIG_0(self,args); + } + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[3]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpVersion__SWIG_3(self,args); + } + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgVersioningSystem_CmpVersion'"); + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + char *arg2 ; + char *arg3 ; + char *arg4 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Osss:pkgVersioningSystem_CmpReleaseVer",&obj0,&arg2,&arg3,&arg4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->CmpReleaseVer((char const *)arg2,(char const *)arg3,(char const *)arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + string arg2 ; + char *arg3 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOs:pkgVersioningSystem_CmpReleaseVer",&obj0,&obj1,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)(arg1)->CmpReleaseVer(arg2,(char const *)arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_2(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + string arg2 ; + string arg3 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgVersioningSystem_CmpReleaseVer",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)(arg1)->CmpReleaseVer(arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_3(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + string arg2 ; + char *arg3 ; + char *arg4 ; + int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOss:pkgVersioningSystem_CmpReleaseVer",&obj0,&obj1,&arg3,&arg4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (int)(arg1)->CmpReleaseVer(arg2,(char const *)arg3,(char const *)arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgVersioningSystem_CmpReleaseVer(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_1(self,args); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_2(self,args); + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[3]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_0(self,args); + } + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_pkgVersioningSystem, 0) == -1) { + _v = 0; + PyErr_Clear(); + }else { + _v = 1; + } + } + if (_v) { + { + _v = PyString_Check(argv[1]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[2]) ? 1 : 0; + } + if (_v) { + { + _v = PyString_Check(argv[3]) ? 1 : 0; + } + if (_v) { + return _wrap_pkgVersioningSystem_CmpReleaseVer__SWIG_3(self,args); + } + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'pkgVersioningSystem_CmpReleaseVer'"); + return NULL; +} + + +static PyObject *_wrap_delete_pkgVersioningSystem(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgVersioningSystem *arg1 = (pkgVersioningSystem *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgVersioningSystem",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgVersioningSystem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgVersioningSystem_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgVersioningSystem, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgRecords_Lookup(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords *arg1 = (pkgRecords *) 0 ; + pkgCache::VerFileIterator *arg2 = 0 ; + pkgRecords::Parser *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgRecords_Lookup",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgCache__VerFileIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + pkgRecords::Parser &_result_ref = (arg1)->Lookup((pkgCache::VerFileIterator const &)*arg2); + result = (pkgRecords::Parser *) &_result_ref; + } + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgRecords__Parser, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgRecords(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgCache *arg1 = 0 ; + pkgRecords *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:new_pkgRecords",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgRecords *)new pkgRecords(*arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgRecords, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgRecords(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords *arg1 = (pkgRecords *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgRecords",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgRecords_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgRecords, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgRecordsParser_FileName(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_FileName",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->FileName(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_MD5Hash(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_MD5Hash",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->MD5Hash(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_SHA1Hash(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_SHA1Hash",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->SHA1Hash(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_SourcePkg(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_SourcePkg",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->SourcePkg(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_Maintainer(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_Maintainer",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->Maintainer(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_ShortDesc(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_ShortDesc",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->ShortDesc(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_LongDesc(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_LongDesc",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->LongDesc(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_Name(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgRecordsParser_Name",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->Name(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgRecordsParser_GetRec(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + char **arg2 = 0 ; + char **arg3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgRecordsParser_GetRec",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_p_char,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_p_char,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->GetRec((char const *&)*arg2,(char const *&)*arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgRecordsParser(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgRecords::Parser *arg1 = (pkgRecords::Parser *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgRecordsParser",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgRecords__Parser,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgRecordsParser_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgRecords__Parser, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgAcquireItem_Status_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oi:pkgAcquireItem_Status_set",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg1) (arg1)->Status = (enum pkgAcquire::Item::StatusFlags)arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Status_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_Status_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int) ((arg1)->Status); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_ErrorText_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string *arg2 = (string *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_ErrorText_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_string,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg1) (arg1)->ErrorText = *arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_ErrorText_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_ErrorText_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (string *)& ((arg1)->ErrorText); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_string, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_FileSize_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_FileSize_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->FileSize = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_FileSize_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_FileSize_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->FileSize); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_PartialSize_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_PartialSize_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->PartialSize = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_PartialSize_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_PartialSize_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->PartialSize); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Mode_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + char *arg2 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:pkgAcquireItem_Mode_set",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg1->Mode = (char const *) (new char[strlen(arg2)+1]); + strcpy((char *) arg1->Mode,arg2); + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Mode_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + char *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_Mode_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (char *) ((arg1)->Mode); + + resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_ID_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned long arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_ID_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->ID = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_ID_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned long result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_ID_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned long) ((arg1)->ID); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Complete_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_Complete_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Complete = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Complete_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_Complete_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool) ((arg1)->Complete); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Local_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_Local_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Local = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Local_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_Local_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool) ((arg1)->Local); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_QueueCounter_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned int arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_QueueCounter_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned int) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->QueueCounter = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_QueueCounter_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + unsigned int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_QueueCounter_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned int) ((arg1)->QueueCounter); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_DestFile_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string *arg2 = (string *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireItem_DestFile_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_string,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg1) (arg1)->DestFile = *arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_DestFile_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_DestFile_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (string *)& ((arg1)->DestFile); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_string, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Failed(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string arg2 ; + pkgAcquire::MethodConfig *arg3 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgAcquireItem_Failed",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Failed(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string arg2 ; + unsigned long arg3 ; + string arg4 ; + pkgAcquire::MethodConfig *arg5 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:pkgAcquireItem_Done",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj3)) + arg4 = std::string(PyString_AsString(obj3)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(arg2,arg3,arg4,arg5); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Start(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string arg2 ; + unsigned long arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgAcquireItem_Start",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + (arg1)->Start(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Custom600Headers(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_Custom600Headers",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->Custom600Headers(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_DescURI(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_DescURI",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->DescURI(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_Finished(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_Finished",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Finished(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_MD5Sum(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_MD5Sum",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->MD5Sum(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireItem_GetOwner(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + pkgAcquire *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireItem_GetOwner",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgAcquire *)(arg1)->GetOwner(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcquire, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcquireItem(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire::Item *arg1 = (pkgAcquire::Item *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcquireItem",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire__Item,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcquireItem_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcquire__Item, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgAcqIndex_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndex *arg1 = (pkgAcqIndex *) 0 ; + string arg2 ; + unsigned long arg3 ; + string arg4 ; + pkgAcquire::MethodConfig *arg5 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:pkgAcqIndex_Done",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndex,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj3)) + arg4 = std::string(PyString_AsString(obj3)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(arg2,arg3,arg4,arg5); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqIndex_Custom600Headers(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndex *arg1 = (pkgAcqIndex *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqIndex_Custom600Headers",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndex,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->Custom600Headers(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqIndex_DescURI(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndex *arg1 = (pkgAcqIndex *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqIndex_DescURI",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndex,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->DescURI(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgAcqIndex(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + pkgRepository *arg2 = (pkgRepository *) 0 ; + string arg3 ; + string arg4 ; + string arg5 ; + pkgAcqIndex *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:new_pkgAcqIndex",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgRepository,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj3)) + arg4 = std::string(PyString_AsString(obj3)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj4)) + arg5 = std::string(PyString_AsString(obj4)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (pkgAcqIndex *)new pkgAcqIndex(arg1,arg2,arg3,arg4,arg5); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcqIndex, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcqIndex(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndex *arg1 = (pkgAcqIndex *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcqIndex",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndex,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcqIndex_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcqIndex, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgAcqIndexRel_Failed(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndexRel *arg1 = (pkgAcqIndexRel *) 0 ; + string arg2 ; + pkgAcquire::MethodConfig *arg3 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgAcqIndexRel_Failed",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndexRel,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Failed(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqIndexRel_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndexRel *arg1 = (pkgAcqIndexRel *) 0 ; + string arg2 ; + unsigned long arg3 ; + string arg4 ; + pkgAcquire::MethodConfig *arg5 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:pkgAcqIndexRel_Done",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndexRel,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj3)) + arg4 = std::string(PyString_AsString(obj3)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(arg2,arg3,arg4,arg5); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqIndexRel_Custom600Headers(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndexRel *arg1 = (pkgAcqIndexRel *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqIndexRel_Custom600Headers",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndexRel,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->Custom600Headers(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqIndexRel_DescURI(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndexRel *arg1 = (pkgAcqIndexRel *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqIndexRel_DescURI",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndexRel,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->DescURI(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgAcqIndexRel(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + pkgRepository *arg2 = (pkgRepository *) 0 ; + string arg3 ; + string arg4 ; + string arg5 ; + bool arg6 = (bool) false ; + pkgAcqIndexRel *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO|O:new_pkgAcqIndexRel",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgRepository,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj3)) + arg4 = std::string(PyString_AsString(obj3)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj4)) + arg5 = std::string(PyString_AsString(obj4)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if (obj5) { + arg6 = (bool) PyInt_AsLong(obj5); + if (PyErr_Occurred()) SWIG_fail; + } + result = (pkgAcqIndexRel *)new pkgAcqIndexRel(arg1,arg2,arg3,arg4,arg5,arg6); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcqIndexRel, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcqIndexRel(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqIndexRel *arg1 = (pkgAcqIndexRel *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcqIndexRel",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqIndexRel,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcqIndexRel_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcqIndexRel, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgAcqArchive_Failed(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqArchive *arg1 = (pkgAcqArchive *) 0 ; + string arg2 ; + pkgAcquire::MethodConfig *arg3 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgAcqArchive_Failed",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqArchive,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Failed(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqArchive_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqArchive *arg1 = (pkgAcqArchive *) 0 ; + string arg2 ; + unsigned long arg3 ; + string arg4 ; + pkgAcquire::MethodConfig *arg5 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:pkgAcqArchive_Done",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqArchive,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj3)) + arg4 = std::string(PyString_AsString(obj3)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(arg2,arg3,arg4,arg5); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqArchive_MD5Sum(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqArchive *arg1 = (pkgAcqArchive *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqArchive_MD5Sum",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqArchive,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->MD5Sum(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqArchive_DescURI(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqArchive *arg1 = (pkgAcqArchive *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqArchive_DescURI",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqArchive,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->DescURI(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqArchive_Finished(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqArchive *arg1 = (pkgAcqArchive *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqArchive_Finished",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqArchive,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Finished(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgAcqArchive(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + pkgSourceList *arg2 = (pkgSourceList *) 0 ; + pkgRecords *arg3 = (pkgRecords *) 0 ; + pkgCache::VerIterator *arg4 = 0 ; + string *arg5 = 0 ; + pkgAcqArchive *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:new_pkgAcqArchive",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgRecords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_pkgCache__VerIterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_string,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgAcqArchive *)new pkgAcqArchive(arg1,arg2,arg3,(pkgCache::VerIterator const &)*arg4,*arg5); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcqArchive, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcqArchive(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqArchive *arg1 = (pkgAcqArchive *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcqArchive",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqArchive,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcqArchive_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcqArchive, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgAcqFile_Failed(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqFile *arg1 = (pkgAcqFile *) 0 ; + string arg2 ; + pkgAcquire::MethodConfig *arg3 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgAcqFile_Failed",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Failed(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqFile_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqFile *arg1 = (pkgAcqFile *) 0 ; + string arg2 ; + unsigned long arg3 ; + string arg4 ; + pkgAcquire::MethodConfig *arg5 = (pkgAcquire::MethodConfig *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOO:pkgAcqFile_Done",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj3)) + arg4 = std::string(PyString_AsString(obj3)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_pkgAcquire__MethodConfig,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(arg2,arg3,arg4,arg5); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqFile_MD5Sum(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqFile *arg1 = (pkgAcqFile *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqFile_MD5Sum",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->MD5Sum(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcqFile_DescURI(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqFile *arg1 = (pkgAcqFile *) 0 ; + string result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcqFile_DescURI",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->DescURI(); + + { + resultobj = PyString_FromString((&result)->c_str()); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgAcqFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + string arg2 ; + string arg3 ; + unsigned long arg4 ; + string arg5 ; + string arg6 ; + pkgAcqFile *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOOOO:new_pkgAcqFile",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + arg4 = (unsigned long) PyInt_AsLong(obj3); + if (PyErr_Occurred()) SWIG_fail; + { + if (PyString_Check(obj4)) + arg5 = std::string(PyString_AsString(obj4)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj5)) + arg6 = std::string(PyString_AsString(obj5)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (pkgAcqFile *)new pkgAcqFile(arg1,arg2,arg3,arg4,arg5,arg6); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcqFile, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcqFile(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcqFile *arg1 = (pkgAcqFile *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcqFile",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcqFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcqFile_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcqFile, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgAcquire_ItemsList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + PyObject *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_ItemsList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (PyObject *)pkgAcquire_ItemsList(arg1); + + resultobj = result; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_GetConfig(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + string arg2 ; + pkgAcquire::MethodConfig *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquire_GetConfig",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (pkgAcquire::MethodConfig *)(arg1)->GetConfig(arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcquire__MethodConfig, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_Run(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_Run",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->Run(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_Shutdown(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_Shutdown",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Shutdown(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_WorkersBegin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + pkgAcquire::Worker *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_WorkersBegin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgAcquire::Worker *)(arg1)->WorkersBegin(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcquire__Worker, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_WorkerStep(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + pkgAcquire::Worker *arg2 = (pkgAcquire::Worker *) 0 ; + pkgAcquire::Worker *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquire_WorkerStep",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire__Worker,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgAcquire::Worker *)(arg1)->WorkerStep(arg2); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcquire__Worker, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_ItemsBegin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + pkgAcquire::ItemIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_ItemsBegin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->ItemsBegin(); + + { + pkgAcquire::ItemIterator * resultptr; + resultptr = new pkgAcquire::ItemIterator((pkgAcquire::ItemIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgAcquire__ItemIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_ItemsEnd(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + pkgAcquire::ItemIterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_ItemsEnd",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->ItemsEnd(); + + { + pkgAcquire::ItemIterator * resultptr; + resultptr = new pkgAcquire::ItemIterator((pkgAcquire::ItemIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgAcquire__ItemIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_UriBegin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + SwigValueWrapper< pkgAcquire::UriIterator > result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_UriBegin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->UriBegin(); + + { + pkgAcquire::UriIterator * resultptr; + resultptr = new pkgAcquire::UriIterator((pkgAcquire::UriIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgAcquire__UriIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_UriEnd(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + SwigValueWrapper< pkgAcquire::UriIterator > result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_UriEnd",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (arg1)->UriEnd(); + + { + pkgAcquire::UriIterator * resultptr; + resultptr = new pkgAcquire::UriIterator((pkgAcquire::UriIterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgAcquire__UriIterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_Clean(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + string arg2 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquire_Clean",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (bool)(arg1)->Clean(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_TotalNeeded(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + double result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_TotalNeeded",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (double)(arg1)->TotalNeeded(); + + resultobj = PyFloat_FromDouble(result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_FetchNeeded(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + double result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_FetchNeeded",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (double)(arg1)->FetchNeeded(); + + resultobj = PyFloat_FromDouble(result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquire_PartialPresent(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + double result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquire_PartialPresent",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (double)(arg1)->PartialPresent(); + + resultobj = PyFloat_FromDouble(result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgAcquire(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + pkgAcquire *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"|O:new_pkgAcquire",&obj0)) goto fail; + if (obj0) { + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + } + result = (pkgAcquire *)new pkgAcquire(arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcquire, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcquire(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquire *arg1 = (pkgAcquire *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcquire",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcquire_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcquire, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgAcquireStatus_Update_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireStatus_Update_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->Update = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Update_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireStatus_Update_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool) ((arg1)->Update); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_MorePulses_set(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireStatus_MorePulses_set",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (bool) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + if (arg1) (arg1)->MorePulses = arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_MorePulses_get(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireStatus_MorePulses_get",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool) ((arg1)->MorePulses); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Fetched(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + unsigned long arg2 ; + unsigned long arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgAcquireStatus_Fetched",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + arg2 = (unsigned long) PyInt_AsLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + arg3 = (unsigned long) PyInt_AsLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + (arg1)->Fetched(arg2,arg3); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_MediaChange(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + string arg2 ; + string arg3 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgAcquireStatus_MediaChange",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + { + if (PyString_Check(obj2)) + arg3 = std::string(PyString_AsString(obj2)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (bool)(arg1)->MediaChange(arg2,arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_IMSHit(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + pkgAcquire::ItemDesc *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireStatus_IMSHit",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire__ItemDesc,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->IMSHit(*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Fetch(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + pkgAcquire::ItemDesc *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireStatus_Fetch",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire__ItemDesc,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Fetch(*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Done(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + pkgAcquire::ItemDesc *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireStatus_Done",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire__ItemDesc,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Done(*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Fail(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + pkgAcquire::ItemDesc *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireStatus_Fail",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire__ItemDesc,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Fail(*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Pulse(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + pkgAcquire *arg2 = (pkgAcquire *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgAcquireStatus_Pulse",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Pulse(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Start(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireStatus_Start",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Start(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgAcquireStatus_Stop(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgAcquireStatus_Stop",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Stop(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcquireStatus(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatus *arg1 = (pkgAcquireStatus *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcquireStatus",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatus,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcquireStatus_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcquireStatus, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgPackageManager_GetArchives(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgPackageManager *arg1 = (pkgPackageManager *) 0 ; + pkgAcquire *arg2 = (pkgAcquire *) 0 ; + pkgSourceList *arg3 = (pkgSourceList *) 0 ; + pkgRecords *arg4 = (pkgRecords *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOOO:pkgPackageManager_GetArchives",&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgPackageManager,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_pkgRecords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->GetArchives(arg2,arg3,arg4); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgPackageManager_DoInstall(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgPackageManager *arg1 = (pkgPackageManager *) 0 ; + int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgPackageManager_DoInstall",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgPackageManager,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (int)(arg1)->DoInstall(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgPackageManager_FixMissing(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgPackageManager *arg1 = (pkgPackageManager *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgPackageManager_FixMissing",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgPackageManager,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->FixMissing(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgPackageManager(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgDepCache *arg1 = (pkgDepCache *) 0 ; + pkgPackageManager *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:new_pkgPackageManager",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgDepCache,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (pkgPackageManager *)new pkgPackageManager(arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgPackageManager, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgPackageManager(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgPackageManager *arg1 = (pkgPackageManager *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgPackageManager",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgPackageManager,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgPackageManager_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgPackageManager, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_pkgSourceList_ReadMainList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSourceList_ReadMainList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->ReadMainList(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_Read(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + string arg2 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSourceList_Read",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + if (PyString_Check(obj1)) + arg2 = std::string(PyString_AsString(obj1)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (bool)(arg1)->Read(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_ReadVendors(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSourceList_ReadVendors",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->ReadVendors(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_begin(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + pkgSourceList::const_iterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSourceList_begin",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgSourceList const *)arg1)->begin(); + + { + pkgSourceList::const_iterator * resultptr; + resultptr = new pkgSourceList::const_iterator((pkgSourceList::const_iterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgSourceList__const_iterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_end(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + pkgSourceList::const_iterator result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSourceList_end",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = ((pkgSourceList const *)arg1)->end(); + + { + pkgSourceList::const_iterator * resultptr; + resultptr = new pkgSourceList::const_iterator((pkgSourceList::const_iterator &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_pkgSourceList__const_iterator, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_size(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + unsigned int result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSourceList_size",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (unsigned int)((pkgSourceList const *)arg1)->size(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_empty(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:pkgSourceList_empty",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgSourceList const *)arg1)->empty(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_FindIndex(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + pkgCache::PkgFileIterator arg2 ; + pkgIndexFile **arg3 = 0 ; + bool result; + pkgCache::PkgFileIterator *argp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OOO:pkgSourceList_FindIndex",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_pkgCache__PkgFileIterator,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; + arg2 = *argp2; + if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_p_pkgIndexFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgSourceList const *)arg1)->FindIndex(arg2,*arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_GetIndexes(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + pkgAcquire *arg2 = (pkgAcquire *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSourceList_GetIndexes",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgSourceList const *)arg1)->GetIndexes(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_pkgSourceList_GetReleases(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + pkgAcquire *arg2 = (pkgAcquire *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:pkgSourceList_GetReleases",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_pkgAcquire,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)((pkgSourceList const *)arg1)->GetReleases(arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgSourceList__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgSourceList")) goto fail; + result = (pkgSourceList *)new pkgSourceList(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgSourceList, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgSourceList__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj; + string arg1 ; + pkgSourceList *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:new_pkgSourceList",&obj0)) goto fail; + { + if (PyString_Check(obj0)) + arg1 = std::string(PyString_AsString(obj0)); + else + SWIG_exception(SWIG_TypeError, "string expected"); + } + result = (pkgSourceList *)new pkgSourceList(arg1); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgSourceList, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgSourceList(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if (argc == 0) { + return _wrap_new_pkgSourceList__SWIG_0(self,args); + } + if (argc == 1) { + int _v; + { + _v = PyString_Check(argv[0]) ? 1 : 0; + } + if (_v) { + return _wrap_new_pkgSourceList__SWIG_1(self,args); + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_pkgSourceList'"); + return NULL; +} + + +static PyObject *_wrap_delete_pkgSourceList(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgSourceList *arg1 = (pkgSourceList *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgSourceList",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgSourceList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgSourceList_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgSourceList, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap_GlobalError_Errno(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + char *arg2 ; + char *arg3 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oss:GlobalError_Errno",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Errno((char const *)arg2,(char const *)arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_WarningE(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + char *arg2 ; + char *arg3 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Oss:GlobalError_WarningE",&obj0,&arg2,&arg3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->WarningE((char const *)arg2,(char const *)arg3); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_Error(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + char *arg2 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:GlobalError_Error",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Error((char const *)arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_Warning(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + char *arg2 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"Os:GlobalError_Warning",&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->Warning((char const *)arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_PendingError(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:GlobalError_PendingError",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->PendingError(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_empty(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:GlobalError_empty",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->empty(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_PopMessage(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + string *arg2 = 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:GlobalError_PopMessage",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_string,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (bool)(arg1)->PopMessage(*arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_Discard(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:GlobalError_Discard",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->Discard(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GlobalError_DumpErrors(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:GlobalError_DumpErrors",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + (arg1)->DumpErrors(); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_GlobalError(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *result; + + if(!PyArg_ParseTuple(args,(char *)":new_GlobalError")) goto fail; + result = (GlobalError *)new GlobalError(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_GlobalError, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_GlobalError(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *arg1 = (GlobalError *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_GlobalError",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GlobalError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * GlobalError_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_GlobalError, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyObject *_wrap__GetErrorObj(PyObject *self, PyObject *args) { + PyObject *resultobj; + GlobalError *result; + + if(!PyArg_ParseTuple(args,(char *)":_GetErrorObj")) goto fail; + result = (GlobalError *)_GetErrorObj(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_GlobalError, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_pkgAcquireStatusDumb(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatusDumb *result; + + if(!PyArg_ParseTuple(args,(char *)":new_pkgAcquireStatusDumb")) goto fail; + result = (pkgAcquireStatusDumb *)new pkgAcquireStatusDumb(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_pkgAcquireStatusDumb, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_pkgAcquireStatusDumb(PyObject *self, PyObject *args) { + PyObject *resultobj; + pkgAcquireStatusDumb *arg1 = (pkgAcquireStatusDumb *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:delete_pkgAcquireStatusDumb",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_pkgAcquireStatusDumb,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + delete arg1; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject * pkgAcquireStatusDumb_swigregister(PyObject *self, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_pkgAcquireStatusDumb, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} +static PyMethodDef SwigMethods[] = { + { (char *)"pkgInit", _wrap_pkgInit, METH_VARARGS }, + { (char *)"pkgInitConfig", _wrap_pkgInitConfig, METH_VARARGS }, + { (char *)"pkgInitSystem", _wrap_pkgInitSystem, METH_VARARGS }, + { (char *)"pkgCache_HeaderP_set", _wrap_pkgCache_HeaderP_set, METH_VARARGS }, + { (char *)"pkgCache_HeaderP_get", _wrap_pkgCache_HeaderP_get, METH_VARARGS }, + { (char *)"pkgCache_PkgP_set", _wrap_pkgCache_PkgP_set, METH_VARARGS }, + { (char *)"pkgCache_PkgP_get", _wrap_pkgCache_PkgP_get, METH_VARARGS }, + { (char *)"pkgCache_VerFileP_set", _wrap_pkgCache_VerFileP_set, METH_VARARGS }, + { (char *)"pkgCache_VerFileP_get", _wrap_pkgCache_VerFileP_get, METH_VARARGS }, + { (char *)"pkgCache_PkgFileP_set", _wrap_pkgCache_PkgFileP_set, METH_VARARGS }, + { (char *)"pkgCache_PkgFileP_get", _wrap_pkgCache_PkgFileP_get, METH_VARARGS }, + { (char *)"pkgCache_VerP_set", _wrap_pkgCache_VerP_set, METH_VARARGS }, + { (char *)"pkgCache_VerP_get", _wrap_pkgCache_VerP_get, METH_VARARGS }, + { (char *)"pkgCache_ProvideP_set", _wrap_pkgCache_ProvideP_set, METH_VARARGS }, + { (char *)"pkgCache_ProvideP_get", _wrap_pkgCache_ProvideP_get, METH_VARARGS }, + { (char *)"pkgCache_DepP_set", _wrap_pkgCache_DepP_set, METH_VARARGS }, + { (char *)"pkgCache_DepP_get", _wrap_pkgCache_DepP_get, METH_VARARGS }, + { (char *)"pkgCache_StringItemP_set", _wrap_pkgCache_StringItemP_set, METH_VARARGS }, + { (char *)"pkgCache_StringItemP_get", _wrap_pkgCache_StringItemP_get, METH_VARARGS }, + { (char *)"pkgCache_StrP_set", _wrap_pkgCache_StrP_set, METH_VARARGS }, + { (char *)"pkgCache_StrP_get", _wrap_pkgCache_StrP_get, METH_VARARGS }, + { (char *)"pkgCache_ReMap", _wrap_pkgCache_ReMap, METH_VARARGS }, + { (char *)"pkgCache_Sync", _wrap_pkgCache_Sync, METH_VARARGS }, + { (char *)"pkgCache_GetMap", _wrap_pkgCache_GetMap, METH_VARARGS }, + { (char *)"pkgCache_DataEnd", _wrap_pkgCache_DataEnd, METH_VARARGS }, + { (char *)"pkgCache_Hash", _wrap_pkgCache_Hash, METH_VARARGS }, + { (char *)"pkgCache_Priority", _wrap_pkgCache_Priority, METH_VARARGS }, + { (char *)"pkgCache_FindPkg", _wrap_pkgCache_FindPkg, METH_VARARGS }, + { (char *)"pkgCache_Head", _wrap_pkgCache_Head, METH_VARARGS }, + { (char *)"pkgCache_PkgBegin", _wrap_pkgCache_PkgBegin, METH_VARARGS }, + { (char *)"pkgCache_PkgEnd", _wrap_pkgCache_PkgEnd, METH_VARARGS }, + { (char *)"pkgCache_FileBegin", _wrap_pkgCache_FileBegin, METH_VARARGS }, + { (char *)"pkgCache_FileEnd", _wrap_pkgCache_FileEnd, METH_VARARGS }, + { (char *)"pkgCache_VS_set", _wrap_pkgCache_VS_set, METH_VARARGS }, + { (char *)"pkgCache_VS_get", _wrap_pkgCache_VS_get, METH_VARARGS }, + { (char *)"pkgCache_CompTypeDeb", _wrap_pkgCache_CompTypeDeb, METH_VARARGS }, + { (char *)"pkgCache_CompType", _wrap_pkgCache_CompType, METH_VARARGS }, + { (char *)"pkgCache_DepType", _wrap_pkgCache_DepType, METH_VARARGS }, + { (char *)"new_pkgCache", _wrap_new_pkgCache, METH_VARARGS }, + { (char *)"delete_pkgCache", _wrap_delete_pkgCache, METH_VARARGS }, + { (char *)"pkgCache_swigregister", pkgCache_swigregister, METH_VARARGS }, + { (char *)"pkgCacheHeader_Signature_set", _wrap_pkgCacheHeader_Signature_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_Signature_get", _wrap_pkgCacheHeader_Signature_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_MajorVersion_set", _wrap_pkgCacheHeader_MajorVersion_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_MajorVersion_get", _wrap_pkgCacheHeader_MajorVersion_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_MinorVersion_set", _wrap_pkgCacheHeader_MinorVersion_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_MinorVersion_get", _wrap_pkgCacheHeader_MinorVersion_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_Dirty_set", _wrap_pkgCacheHeader_Dirty_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_Dirty_get", _wrap_pkgCacheHeader_Dirty_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_HeaderSz_set", _wrap_pkgCacheHeader_HeaderSz_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_HeaderSz_get", _wrap_pkgCacheHeader_HeaderSz_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageSz_set", _wrap_pkgCacheHeader_PackageSz_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageSz_get", _wrap_pkgCacheHeader_PackageSz_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageFileSz_set", _wrap_pkgCacheHeader_PackageFileSz_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageFileSz_get", _wrap_pkgCacheHeader_PackageFileSz_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_VersionSz_set", _wrap_pkgCacheHeader_VersionSz_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_VersionSz_get", _wrap_pkgCacheHeader_VersionSz_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_DependencySz_set", _wrap_pkgCacheHeader_DependencySz_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_DependencySz_get", _wrap_pkgCacheHeader_DependencySz_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_ProvidesSz_set", _wrap_pkgCacheHeader_ProvidesSz_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_ProvidesSz_get", _wrap_pkgCacheHeader_ProvidesSz_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_VerFileSz_set", _wrap_pkgCacheHeader_VerFileSz_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_VerFileSz_get", _wrap_pkgCacheHeader_VerFileSz_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageCount_set", _wrap_pkgCacheHeader_PackageCount_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageCount_get", _wrap_pkgCacheHeader_PackageCount_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_VersionCount_set", _wrap_pkgCacheHeader_VersionCount_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_VersionCount_get", _wrap_pkgCacheHeader_VersionCount_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_DependsCount_set", _wrap_pkgCacheHeader_DependsCount_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_DependsCount_get", _wrap_pkgCacheHeader_DependsCount_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageFileCount_set", _wrap_pkgCacheHeader_PackageFileCount_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_PackageFileCount_get", _wrap_pkgCacheHeader_PackageFileCount_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_VerFileCount_set", _wrap_pkgCacheHeader_VerFileCount_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_VerFileCount_get", _wrap_pkgCacheHeader_VerFileCount_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_ProvidesCount_set", _wrap_pkgCacheHeader_ProvidesCount_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_ProvidesCount_get", _wrap_pkgCacheHeader_ProvidesCount_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_FileList_set", _wrap_pkgCacheHeader_FileList_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_FileList_get", _wrap_pkgCacheHeader_FileList_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_StringList_set", _wrap_pkgCacheHeader_StringList_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_StringList_get", _wrap_pkgCacheHeader_StringList_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_VerSysName_set", _wrap_pkgCacheHeader_VerSysName_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_VerSysName_get", _wrap_pkgCacheHeader_VerSysName_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_Architecture_set", _wrap_pkgCacheHeader_Architecture_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_Architecture_get", _wrap_pkgCacheHeader_Architecture_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_MaxVerFileSize_set", _wrap_pkgCacheHeader_MaxVerFileSize_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_MaxVerFileSize_get", _wrap_pkgCacheHeader_MaxVerFileSize_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_Pools_set", _wrap_pkgCacheHeader_Pools_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_Pools_get", _wrap_pkgCacheHeader_Pools_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_HashTable_set", _wrap_pkgCacheHeader_HashTable_set, METH_VARARGS }, + { (char *)"pkgCacheHeader_HashTable_get", _wrap_pkgCacheHeader_HashTable_get, METH_VARARGS }, + { (char *)"pkgCacheHeader_CheckSizes", _wrap_pkgCacheHeader_CheckSizes, METH_VARARGS }, + { (char *)"new_pkgCacheHeader", _wrap_new_pkgCacheHeader, METH_VARARGS }, + { (char *)"delete_pkgCacheHeader", _wrap_delete_pkgCacheHeader, METH_VARARGS }, + { (char *)"pkgCacheHeader_swigregister", pkgCacheHeader_swigregister, METH_VARARGS }, + { (char *)"pkgCachePackage_Name_set", _wrap_pkgCachePackage_Name_set, METH_VARARGS }, + { (char *)"pkgCachePackage_Name_get", _wrap_pkgCachePackage_Name_get, METH_VARARGS }, + { (char *)"pkgCachePackage_VersionList_set", _wrap_pkgCachePackage_VersionList_set, METH_VARARGS }, + { (char *)"pkgCachePackage_VersionList_get", _wrap_pkgCachePackage_VersionList_get, METH_VARARGS }, + { (char *)"pkgCachePackage_CurrentVer_set", _wrap_pkgCachePackage_CurrentVer_set, METH_VARARGS }, + { (char *)"pkgCachePackage_CurrentVer_get", _wrap_pkgCachePackage_CurrentVer_get, METH_VARARGS }, + { (char *)"pkgCachePackage_Section_set", _wrap_pkgCachePackage_Section_set, METH_VARARGS }, + { (char *)"pkgCachePackage_Section_get", _wrap_pkgCachePackage_Section_get, METH_VARARGS }, + { (char *)"pkgCachePackage_NextPackage_set", _wrap_pkgCachePackage_NextPackage_set, METH_VARARGS }, + { (char *)"pkgCachePackage_NextPackage_get", _wrap_pkgCachePackage_NextPackage_get, METH_VARARGS }, + { (char *)"pkgCachePackage_RevDepends_set", _wrap_pkgCachePackage_RevDepends_set, METH_VARARGS }, + { (char *)"pkgCachePackage_RevDepends_get", _wrap_pkgCachePackage_RevDepends_get, METH_VARARGS }, + { (char *)"pkgCachePackage_ProvidesList_set", _wrap_pkgCachePackage_ProvidesList_set, METH_VARARGS }, + { (char *)"pkgCachePackage_ProvidesList_get", _wrap_pkgCachePackage_ProvidesList_get, METH_VARARGS }, + { (char *)"pkgCachePackage_SelectedState_set", _wrap_pkgCachePackage_SelectedState_set, METH_VARARGS }, + { (char *)"pkgCachePackage_SelectedState_get", _wrap_pkgCachePackage_SelectedState_get, METH_VARARGS }, + { (char *)"pkgCachePackage_InstState_set", _wrap_pkgCachePackage_InstState_set, METH_VARARGS }, + { (char *)"pkgCachePackage_InstState_get", _wrap_pkgCachePackage_InstState_get, METH_VARARGS }, + { (char *)"pkgCachePackage_CurrentState_set", _wrap_pkgCachePackage_CurrentState_set, METH_VARARGS }, + { (char *)"pkgCachePackage_CurrentState_get", _wrap_pkgCachePackage_CurrentState_get, METH_VARARGS }, + { (char *)"pkgCachePackage_ID_set", _wrap_pkgCachePackage_ID_set, METH_VARARGS }, + { (char *)"pkgCachePackage_ID_get", _wrap_pkgCachePackage_ID_get, METH_VARARGS }, + { (char *)"pkgCachePackage_Flags_set", _wrap_pkgCachePackage_Flags_set, METH_VARARGS }, + { (char *)"pkgCachePackage_Flags_get", _wrap_pkgCachePackage_Flags_get, METH_VARARGS }, + { (char *)"new_pkgCachePackage", _wrap_new_pkgCachePackage, METH_VARARGS }, + { (char *)"delete_pkgCachePackage", _wrap_delete_pkgCachePackage, METH_VARARGS }, + { (char *)"pkgCachePackage_swigregister", pkgCachePackage_swigregister, METH_VARARGS }, + { (char *)"pkgCachePackageFile_FileName_set", _wrap_pkgCachePackageFile_FileName_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_FileName_get", _wrap_pkgCachePackageFile_FileName_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Archive_set", _wrap_pkgCachePackageFile_Archive_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Archive_get", _wrap_pkgCachePackageFile_Archive_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Component_set", _wrap_pkgCachePackageFile_Component_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Component_get", _wrap_pkgCachePackageFile_Component_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Version_set", _wrap_pkgCachePackageFile_Version_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Version_get", _wrap_pkgCachePackageFile_Version_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Origin_set", _wrap_pkgCachePackageFile_Origin_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Origin_get", _wrap_pkgCachePackageFile_Origin_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Label_set", _wrap_pkgCachePackageFile_Label_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Label_get", _wrap_pkgCachePackageFile_Label_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Architecture_set", _wrap_pkgCachePackageFile_Architecture_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Architecture_get", _wrap_pkgCachePackageFile_Architecture_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Site_set", _wrap_pkgCachePackageFile_Site_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Site_get", _wrap_pkgCachePackageFile_Site_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_IndexType_set", _wrap_pkgCachePackageFile_IndexType_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_IndexType_get", _wrap_pkgCachePackageFile_IndexType_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Size_set", _wrap_pkgCachePackageFile_Size_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Size_get", _wrap_pkgCachePackageFile_Size_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Flags_set", _wrap_pkgCachePackageFile_Flags_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_Flags_get", _wrap_pkgCachePackageFile_Flags_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_NextFile_set", _wrap_pkgCachePackageFile_NextFile_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_NextFile_get", _wrap_pkgCachePackageFile_NextFile_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_ID_set", _wrap_pkgCachePackageFile_ID_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_ID_get", _wrap_pkgCachePackageFile_ID_get, METH_VARARGS }, + { (char *)"pkgCachePackageFile_mtime_set", _wrap_pkgCachePackageFile_mtime_set, METH_VARARGS }, + { (char *)"pkgCachePackageFile_mtime_get", _wrap_pkgCachePackageFile_mtime_get, METH_VARARGS }, + { (char *)"new_pkgCachePackageFile", _wrap_new_pkgCachePackageFile, METH_VARARGS }, + { (char *)"delete_pkgCachePackageFile", _wrap_delete_pkgCachePackageFile, METH_VARARGS }, + { (char *)"pkgCachePackageFile_swigregister", pkgCachePackageFile_swigregister, METH_VARARGS }, + { (char *)"pkgCacheVerFile_File_set", _wrap_pkgCacheVerFile_File_set, METH_VARARGS }, + { (char *)"pkgCacheVerFile_File_get", _wrap_pkgCacheVerFile_File_get, METH_VARARGS }, + { (char *)"pkgCacheVerFile_NextFile_set", _wrap_pkgCacheVerFile_NextFile_set, METH_VARARGS }, + { (char *)"pkgCacheVerFile_NextFile_get", _wrap_pkgCacheVerFile_NextFile_get, METH_VARARGS }, + { (char *)"pkgCacheVerFile_Offset_set", _wrap_pkgCacheVerFile_Offset_set, METH_VARARGS }, + { (char *)"pkgCacheVerFile_Offset_get", _wrap_pkgCacheVerFile_Offset_get, METH_VARARGS }, + { (char *)"pkgCacheVerFile_Size_set", _wrap_pkgCacheVerFile_Size_set, METH_VARARGS }, + { (char *)"pkgCacheVerFile_Size_get", _wrap_pkgCacheVerFile_Size_get, METH_VARARGS }, + { (char *)"new_pkgCacheVerFile", _wrap_new_pkgCacheVerFile, METH_VARARGS }, + { (char *)"delete_pkgCacheVerFile", _wrap_delete_pkgCacheVerFile, METH_VARARGS }, + { (char *)"pkgCacheVerFile_swigregister", pkgCacheVerFile_swigregister, METH_VARARGS }, + { (char *)"pkgCacheVersion_VerStr_set", _wrap_pkgCacheVersion_VerStr_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_VerStr_get", _wrap_pkgCacheVersion_VerStr_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_Section_set", _wrap_pkgCacheVersion_Section_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_Section_get", _wrap_pkgCacheVersion_Section_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_Arch_set", _wrap_pkgCacheVersion_Arch_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_Arch_get", _wrap_pkgCacheVersion_Arch_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_FileList_set", _wrap_pkgCacheVersion_FileList_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_FileList_get", _wrap_pkgCacheVersion_FileList_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_NextVer_set", _wrap_pkgCacheVersion_NextVer_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_NextVer_get", _wrap_pkgCacheVersion_NextVer_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_DependsList_set", _wrap_pkgCacheVersion_DependsList_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_DependsList_get", _wrap_pkgCacheVersion_DependsList_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_ParentPkg_set", _wrap_pkgCacheVersion_ParentPkg_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_ParentPkg_get", _wrap_pkgCacheVersion_ParentPkg_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_ProvidesList_set", _wrap_pkgCacheVersion_ProvidesList_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_ProvidesList_get", _wrap_pkgCacheVersion_ProvidesList_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_Size_set", _wrap_pkgCacheVersion_Size_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_Size_get", _wrap_pkgCacheVersion_Size_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_InstalledSize_set", _wrap_pkgCacheVersion_InstalledSize_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_InstalledSize_get", _wrap_pkgCacheVersion_InstalledSize_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_Hash_set", _wrap_pkgCacheVersion_Hash_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_Hash_get", _wrap_pkgCacheVersion_Hash_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_ID_set", _wrap_pkgCacheVersion_ID_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_ID_get", _wrap_pkgCacheVersion_ID_get, METH_VARARGS }, + { (char *)"pkgCacheVersion_Priority_set", _wrap_pkgCacheVersion_Priority_set, METH_VARARGS }, + { (char *)"pkgCacheVersion_Priority_get", _wrap_pkgCacheVersion_Priority_get, METH_VARARGS }, + { (char *)"new_pkgCacheVersion", _wrap_new_pkgCacheVersion, METH_VARARGS }, + { (char *)"delete_pkgCacheVersion", _wrap_delete_pkgCacheVersion, METH_VARARGS }, + { (char *)"pkgCacheVersion_swigregister", pkgCacheVersion_swigregister, METH_VARARGS }, + { (char *)"pkgCacheDependency_Version_set", _wrap_pkgCacheDependency_Version_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_Version_get", _wrap_pkgCacheDependency_Version_get, METH_VARARGS }, + { (char *)"pkgCacheDependency_Package_set", _wrap_pkgCacheDependency_Package_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_Package_get", _wrap_pkgCacheDependency_Package_get, METH_VARARGS }, + { (char *)"pkgCacheDependency_NextDepends_set", _wrap_pkgCacheDependency_NextDepends_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_NextDepends_get", _wrap_pkgCacheDependency_NextDepends_get, METH_VARARGS }, + { (char *)"pkgCacheDependency_NextRevDepends_set", _wrap_pkgCacheDependency_NextRevDepends_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_NextRevDepends_get", _wrap_pkgCacheDependency_NextRevDepends_get, METH_VARARGS }, + { (char *)"pkgCacheDependency_ParentVer_set", _wrap_pkgCacheDependency_ParentVer_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_ParentVer_get", _wrap_pkgCacheDependency_ParentVer_get, METH_VARARGS }, + { (char *)"pkgCacheDependency_ID_set", _wrap_pkgCacheDependency_ID_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_ID_get", _wrap_pkgCacheDependency_ID_get, METH_VARARGS }, + { (char *)"pkgCacheDependency_Type_set", _wrap_pkgCacheDependency_Type_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_Type_get", _wrap_pkgCacheDependency_Type_get, METH_VARARGS }, + { (char *)"pkgCacheDependency_CompareOp_set", _wrap_pkgCacheDependency_CompareOp_set, METH_VARARGS }, + { (char *)"pkgCacheDependency_CompareOp_get", _wrap_pkgCacheDependency_CompareOp_get, METH_VARARGS }, + { (char *)"new_pkgCacheDependency", _wrap_new_pkgCacheDependency, METH_VARARGS }, + { (char *)"delete_pkgCacheDependency", _wrap_delete_pkgCacheDependency, METH_VARARGS }, + { (char *)"pkgCacheDependency_swigregister", pkgCacheDependency_swigregister, METH_VARARGS }, + { (char *)"pkgCacheProvides_ParentPkg_set", _wrap_pkgCacheProvides_ParentPkg_set, METH_VARARGS }, + { (char *)"pkgCacheProvides_ParentPkg_get", _wrap_pkgCacheProvides_ParentPkg_get, METH_VARARGS }, + { (char *)"pkgCacheProvides_Version_set", _wrap_pkgCacheProvides_Version_set, METH_VARARGS }, + { (char *)"pkgCacheProvides_Version_get", _wrap_pkgCacheProvides_Version_get, METH_VARARGS }, + { (char *)"pkgCacheProvides_ProvideVersion_set", _wrap_pkgCacheProvides_ProvideVersion_set, METH_VARARGS }, + { (char *)"pkgCacheProvides_ProvideVersion_get", _wrap_pkgCacheProvides_ProvideVersion_get, METH_VARARGS }, + { (char *)"pkgCacheProvides_NextProvides_set", _wrap_pkgCacheProvides_NextProvides_set, METH_VARARGS }, + { (char *)"pkgCacheProvides_NextProvides_get", _wrap_pkgCacheProvides_NextProvides_get, METH_VARARGS }, + { (char *)"pkgCacheProvides_NextPkgProv_set", _wrap_pkgCacheProvides_NextPkgProv_set, METH_VARARGS }, + { (char *)"pkgCacheProvides_NextPkgProv_get", _wrap_pkgCacheProvides_NextPkgProv_get, METH_VARARGS }, + { (char *)"new_pkgCacheProvides", _wrap_new_pkgCacheProvides, METH_VARARGS }, + { (char *)"delete_pkgCacheProvides", _wrap_delete_pkgCacheProvides, METH_VARARGS }, + { (char *)"pkgCacheProvides_swigregister", pkgCacheProvides_swigregister, METH_VARARGS }, + { (char *)"pkgCacheStringItem_String_set", _wrap_pkgCacheStringItem_String_set, METH_VARARGS }, + { (char *)"pkgCacheStringItem_String_get", _wrap_pkgCacheStringItem_String_get, METH_VARARGS }, + { (char *)"pkgCacheStringItem_NextItem_set", _wrap_pkgCacheStringItem_NextItem_set, METH_VARARGS }, + { (char *)"pkgCacheStringItem_NextItem_get", _wrap_pkgCacheStringItem_NextItem_get, METH_VARARGS }, + { (char *)"new_pkgCacheStringItem", _wrap_new_pkgCacheStringItem, METH_VARARGS }, + { (char *)"delete_pkgCacheStringItem", _wrap_delete_pkgCacheStringItem, METH_VARARGS }, + { (char *)"pkgCacheStringItem_swigregister", pkgCacheStringItem_swigregister, METH_VARARGS }, + { (char *)"pkgDepCache_BuildGroupOrs", _wrap_pkgDepCache_BuildGroupOrs, METH_VARARGS }, + { (char *)"pkgDepCache_UpdateVerState", _wrap_pkgDepCache_UpdateVerState, METH_VARARGS }, + { (char *)"pkgDepCache_Head", _wrap_pkgDepCache_Head, METH_VARARGS }, + { (char *)"pkgDepCache_PkgBegin", _wrap_pkgDepCache_PkgBegin, METH_VARARGS }, + { (char *)"pkgDepCache_FindPkg", _wrap_pkgDepCache_FindPkg, METH_VARARGS }, + { (char *)"pkgDepCache_GetCache", _wrap_pkgDepCache_GetCache, METH_VARARGS }, + { (char *)"pkgDepCache_VS", _wrap_pkgDepCache_VS, METH_VARARGS }, + { (char *)"pkgDepCache_GetCandidateVer", _wrap_pkgDepCache_GetCandidateVer, METH_VARARGS }, + { (char *)"pkgDepCache_IsImportantDep", _wrap_pkgDepCache_IsImportantDep, METH_VARARGS }, + { (char *)"pkgDepCache_GetPolicy", _wrap_pkgDepCache_GetPolicy, METH_VARARGS }, + { (char *)"pkgDepCache___getitem__", _wrap_pkgDepCache___getitem__, METH_VARARGS }, + { (char *)"pkgDepCache_MarkKeep", _wrap_pkgDepCache_MarkKeep, METH_VARARGS }, + { (char *)"pkgDepCache_MarkDelete", _wrap_pkgDepCache_MarkDelete, METH_VARARGS }, + { (char *)"pkgDepCache_MarkInstall", _wrap_pkgDepCache_MarkInstall, METH_VARARGS }, + { (char *)"pkgDepCache_SetReInstall", _wrap_pkgDepCache_SetReInstall, METH_VARARGS }, + { (char *)"pkgDepCache_SetCandidateVersion", _wrap_pkgDepCache_SetCandidateVersion, METH_VARARGS }, + { (char *)"pkgDepCache_Update", _wrap_pkgDepCache_Update, METH_VARARGS }, + { (char *)"pkgDepCache_UsrSize", _wrap_pkgDepCache_UsrSize, METH_VARARGS }, + { (char *)"pkgDepCache_DebSize", _wrap_pkgDepCache_DebSize, METH_VARARGS }, + { (char *)"pkgDepCache_DelCount", _wrap_pkgDepCache_DelCount, METH_VARARGS }, + { (char *)"pkgDepCache_KeepCount", _wrap_pkgDepCache_KeepCount, METH_VARARGS }, + { (char *)"pkgDepCache_InstCount", _wrap_pkgDepCache_InstCount, METH_VARARGS }, + { (char *)"pkgDepCache_BrokenCount", _wrap_pkgDepCache_BrokenCount, METH_VARARGS }, + { (char *)"pkgDepCache_BadCount", _wrap_pkgDepCache_BadCount, METH_VARARGS }, + { (char *)"pkgDepCache_Init", _wrap_pkgDepCache_Init, METH_VARARGS }, + { (char *)"new_pkgDepCache", _wrap_new_pkgDepCache, METH_VARARGS }, + { (char *)"delete_pkgDepCache", _wrap_delete_pkgDepCache, METH_VARARGS }, + { (char *)"pkgDepCache_swigregister", pkgDepCache_swigregister, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_CandVersion_get", _wrap_pkgDepCacheStateCache_CandVersion_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_CurVersion_get", _wrap_pkgDepCacheStateCache_CurVersion_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_CandidateVer_set", _wrap_pkgDepCacheStateCache_CandidateVer_set, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_CandidateVer_get", _wrap_pkgDepCacheStateCache_CandidateVer_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_InstallVer_set", _wrap_pkgDepCacheStateCache_InstallVer_set, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_InstallVer_get", _wrap_pkgDepCacheStateCache_InstallVer_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Flags_set", _wrap_pkgDepCacheStateCache_Flags_set, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Flags_get", _wrap_pkgDepCacheStateCache_Flags_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_iFlags_set", _wrap_pkgDepCacheStateCache_iFlags_set, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_iFlags_get", _wrap_pkgDepCacheStateCache_iFlags_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Status_set", _wrap_pkgDepCacheStateCache_Status_set, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Status_get", _wrap_pkgDepCacheStateCache_Status_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Mode_set", _wrap_pkgDepCacheStateCache_Mode_set, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Mode_get", _wrap_pkgDepCacheStateCache_Mode_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_DepState_set", _wrap_pkgDepCacheStateCache_DepState_set, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_DepState_get", _wrap_pkgDepCacheStateCache_DepState_get, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_StripEpoch", _wrap_pkgDepCacheStateCache_StripEpoch, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Update", _wrap_pkgDepCacheStateCache_Update, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_NewInstall", _wrap_pkgDepCacheStateCache_NewInstall, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Delete", _wrap_pkgDepCacheStateCache_Delete, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Keep", _wrap_pkgDepCacheStateCache_Keep, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Upgrade", _wrap_pkgDepCacheStateCache_Upgrade, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Upgradable", _wrap_pkgDepCacheStateCache_Upgradable, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Downgrade", _wrap_pkgDepCacheStateCache_Downgrade, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Held", _wrap_pkgDepCacheStateCache_Held, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_NowBroken", _wrap_pkgDepCacheStateCache_NowBroken, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_InstBroken", _wrap_pkgDepCacheStateCache_InstBroken, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_Install", _wrap_pkgDepCacheStateCache_Install, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_InstVerIter", _wrap_pkgDepCacheStateCache_InstVerIter, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_CandidateVerIter", _wrap_pkgDepCacheStateCache_CandidateVerIter, METH_VARARGS }, + { (char *)"new_pkgDepCacheStateCache", _wrap_new_pkgDepCacheStateCache, METH_VARARGS }, + { (char *)"delete_pkgDepCacheStateCache", _wrap_delete_pkgDepCacheStateCache, METH_VARARGS }, + { (char *)"pkgDepCacheStateCache_swigregister", pkgDepCacheStateCache_swigregister, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_next", _wrap_pkgCachePkgIterator_next, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_end", _wrap_pkgCachePkgIterator_end, METH_VARARGS }, + { (char *)"pkgCachePkgIterator___eq__", _wrap_pkgCachePkgIterator___eq__, METH_VARARGS }, + { (char *)"pkgCachePkgIterator___ne__", _wrap_pkgCachePkgIterator___ne__, METH_VARARGS }, + { (char *)"pkgCachePkgIterator___deref__", _wrap_pkgCachePkgIterator___deref__, METH_VARARGS }, + { (char *)"pkgCachePkgIterator___mul__", _wrap_pkgCachePkgIterator___mul__, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_Cache", _wrap_pkgCachePkgIterator_Cache, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_Name", _wrap_pkgCachePkgIterator_Name, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_Section", _wrap_pkgCachePkgIterator_Section, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_Purge", _wrap_pkgCachePkgIterator_Purge, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_VersionList", _wrap_pkgCachePkgIterator_VersionList, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_CurrentVer", _wrap_pkgCachePkgIterator_CurrentVer, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_RevDependsList", _wrap_pkgCachePkgIterator_RevDependsList, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_ProvidesList", _wrap_pkgCachePkgIterator_ProvidesList, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_Index", _wrap_pkgCachePkgIterator_Index, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_State", _wrap_pkgCachePkgIterator_State, METH_VARARGS }, + { (char *)"new_pkgCachePkgIterator", _wrap_new_pkgCachePkgIterator, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_NextPackage_set", _wrap_pkgCachePkgIterator_NextPackage_set, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_NextPackage_get", _wrap_pkgCachePkgIterator_NextPackage_get, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_RevDepends_set", _wrap_pkgCachePkgIterator_RevDepends_set, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_RevDepends_get", _wrap_pkgCachePkgIterator_RevDepends_get, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_SelectedState_set", _wrap_pkgCachePkgIterator_SelectedState_set, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_SelectedState_get", _wrap_pkgCachePkgIterator_SelectedState_get, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_InstState_set", _wrap_pkgCachePkgIterator_InstState_set, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_InstState_get", _wrap_pkgCachePkgIterator_InstState_get, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_CurrentState_set", _wrap_pkgCachePkgIterator_CurrentState_set, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_CurrentState_get", _wrap_pkgCachePkgIterator_CurrentState_get, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_ID_set", _wrap_pkgCachePkgIterator_ID_set, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_ID_get", _wrap_pkgCachePkgIterator_ID_get, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_Flags_set", _wrap_pkgCachePkgIterator_Flags_set, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_Flags_get", _wrap_pkgCachePkgIterator_Flags_get, METH_VARARGS }, + { (char *)"delete_pkgCachePkgIterator", _wrap_delete_pkgCachePkgIterator, METH_VARARGS }, + { (char *)"pkgCachePkgIterator_swigregister", pkgCachePkgIterator_swigregister, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_next", _wrap_pkgCacheVerIterator_next, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_end", _wrap_pkgCacheVerIterator_end, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_assign", _wrap_pkgCacheVerIterator_assign, METH_VARARGS }, + { (char *)"pkgCacheVerIterator___eq__", _wrap_pkgCacheVerIterator___eq__, METH_VARARGS }, + { (char *)"pkgCacheVerIterator___ne__", _wrap_pkgCacheVerIterator___ne__, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_CompareVer", _wrap_pkgCacheVerIterator_CompareVer, METH_VARARGS }, + { (char *)"pkgCacheVerIterator___deref__", _wrap_pkgCacheVerIterator___deref__, METH_VARARGS }, + { (char *)"pkgCacheVerIterator___mul__", _wrap_pkgCacheVerIterator___mul__, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Cache", _wrap_pkgCacheVerIterator_Cache, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_VerStr", _wrap_pkgCacheVerIterator_VerStr, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Section", _wrap_pkgCacheVerIterator_Section, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Arch", _wrap_pkgCacheVerIterator_Arch, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_ParentPkg", _wrap_pkgCacheVerIterator_ParentPkg, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_DependsList", _wrap_pkgCacheVerIterator_DependsList, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_ProvidesList", _wrap_pkgCacheVerIterator_ProvidesList, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_FileList", _wrap_pkgCacheVerIterator_FileList, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Index", _wrap_pkgCacheVerIterator_Index, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Downloadable", _wrap_pkgCacheVerIterator_Downloadable, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_PriorityType", _wrap_pkgCacheVerIterator_PriorityType, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_RelStr", _wrap_pkgCacheVerIterator_RelStr, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Automatic", _wrap_pkgCacheVerIterator_Automatic, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_NewestFile", _wrap_pkgCacheVerIterator_NewestFile, METH_VARARGS }, + { (char *)"new_pkgCacheVerIterator", _wrap_new_pkgCacheVerIterator, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_NextVer_set", _wrap_pkgCacheVerIterator_NextVer_set, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_NextVer_get", _wrap_pkgCacheVerIterator_NextVer_get, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Size_set", _wrap_pkgCacheVerIterator_Size_set, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Size_get", _wrap_pkgCacheVerIterator_Size_get, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_InstalledSize_set", _wrap_pkgCacheVerIterator_InstalledSize_set, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_InstalledSize_get", _wrap_pkgCacheVerIterator_InstalledSize_get, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Hash_set", _wrap_pkgCacheVerIterator_Hash_set, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Hash_get", _wrap_pkgCacheVerIterator_Hash_get, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_ID_set", _wrap_pkgCacheVerIterator_ID_set, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_ID_get", _wrap_pkgCacheVerIterator_ID_get, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Priority_set", _wrap_pkgCacheVerIterator_Priority_set, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_Priority_get", _wrap_pkgCacheVerIterator_Priority_get, METH_VARARGS }, + { (char *)"delete_pkgCacheVerIterator", _wrap_delete_pkgCacheVerIterator, METH_VARARGS }, + { (char *)"pkgCacheVerIterator_swigregister", pkgCacheVerIterator_swigregister, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_next", _wrap_pkgCacheDepIterator_next, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_end", _wrap_pkgCacheDepIterator_end, METH_VARARGS }, + { (char *)"pkgCacheDepIterator___eq__", _wrap_pkgCacheDepIterator___eq__, METH_VARARGS }, + { (char *)"pkgCacheDepIterator___ne__", _wrap_pkgCacheDepIterator___ne__, METH_VARARGS }, + { (char *)"pkgCacheDepIterator___deref__", _wrap_pkgCacheDepIterator___deref__, METH_VARARGS }, + { (char *)"pkgCacheDepIterator___mul__", _wrap_pkgCacheDepIterator___mul__, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Cache", _wrap_pkgCacheDepIterator_Cache, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_TargetVer", _wrap_pkgCacheDepIterator_TargetVer, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_TargetPkg", _wrap_pkgCacheDepIterator_TargetPkg, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_ParentVer", _wrap_pkgCacheDepIterator_ParentVer, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_ParentPkg", _wrap_pkgCacheDepIterator_ParentPkg, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Reverse", _wrap_pkgCacheDepIterator_Reverse, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Index", _wrap_pkgCacheDepIterator_Index, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_IsCritical", _wrap_pkgCacheDepIterator_IsCritical, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_GlobOr", _wrap_pkgCacheDepIterator_GlobOr, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_AllTargets", _wrap_pkgCacheDepIterator_AllTargets, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_SmartTargetPkg", _wrap_pkgCacheDepIterator_SmartTargetPkg, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_CompType", _wrap_pkgCacheDepIterator_CompType, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_DepType", _wrap_pkgCacheDepIterator_DepType, METH_VARARGS }, + { (char *)"new_pkgCacheDepIterator", _wrap_new_pkgCacheDepIterator, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Version_set", _wrap_pkgCacheDepIterator_Version_set, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Version_get", _wrap_pkgCacheDepIterator_Version_get, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Package_set", _wrap_pkgCacheDepIterator_Package_set, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Package_get", _wrap_pkgCacheDepIterator_Package_get, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_NextDepends_set", _wrap_pkgCacheDepIterator_NextDepends_set, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_NextDepends_get", _wrap_pkgCacheDepIterator_NextDepends_get, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_NextRevDepends_set", _wrap_pkgCacheDepIterator_NextRevDepends_set, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_NextRevDepends_get", _wrap_pkgCacheDepIterator_NextRevDepends_get, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_ID_set", _wrap_pkgCacheDepIterator_ID_set, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_ID_get", _wrap_pkgCacheDepIterator_ID_get, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Type_set", _wrap_pkgCacheDepIterator_Type_set, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_Type_get", _wrap_pkgCacheDepIterator_Type_get, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_CompareOp_set", _wrap_pkgCacheDepIterator_CompareOp_set, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_CompareOp_get", _wrap_pkgCacheDepIterator_CompareOp_get, METH_VARARGS }, + { (char *)"delete_pkgCacheDepIterator", _wrap_delete_pkgCacheDepIterator, METH_VARARGS }, + { (char *)"pkgCacheDepIterator_swigregister", pkgCacheDepIterator_swigregister, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_next", _wrap_pkgCachePrvIterator_next, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_end", _wrap_pkgCachePrvIterator_end, METH_VARARGS }, + { (char *)"pkgCachePrvIterator___eq__", _wrap_pkgCachePrvIterator___eq__, METH_VARARGS }, + { (char *)"pkgCachePrvIterator___ne__", _wrap_pkgCachePrvIterator___ne__, METH_VARARGS }, + { (char *)"pkgCachePrvIterator___deref__", _wrap_pkgCachePrvIterator___deref__, METH_VARARGS }, + { (char *)"pkgCachePrvIterator___mul__", _wrap_pkgCachePrvIterator___mul__, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_Cache", _wrap_pkgCachePrvIterator_Cache, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_Name", _wrap_pkgCachePrvIterator_Name, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_ProvideVersion", _wrap_pkgCachePrvIterator_ProvideVersion, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_ParentPkg", _wrap_pkgCachePrvIterator_ParentPkg, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_OwnerVer", _wrap_pkgCachePrvIterator_OwnerVer, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_OwnerPkg", _wrap_pkgCachePrvIterator_OwnerPkg, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_Index", _wrap_pkgCachePrvIterator_Index, METH_VARARGS }, + { (char *)"new_pkgCachePrvIterator", _wrap_new_pkgCachePrvIterator, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_Version_set", _wrap_pkgCachePrvIterator_Version_set, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_Version_get", _wrap_pkgCachePrvIterator_Version_get, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_NextProvides_set", _wrap_pkgCachePrvIterator_NextProvides_set, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_NextProvides_get", _wrap_pkgCachePrvIterator_NextProvides_get, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_NextPkgProv_set", _wrap_pkgCachePrvIterator_NextPkgProv_set, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_NextPkgProv_get", _wrap_pkgCachePrvIterator_NextPkgProv_get, METH_VARARGS }, + { (char *)"delete_pkgCachePrvIterator", _wrap_delete_pkgCachePrvIterator, METH_VARARGS }, + { (char *)"pkgCachePrvIterator_swigregister", pkgCachePrvIterator_swigregister, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_next", _wrap_pkgCachePkgFileIterator_next, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_end", _wrap_pkgCachePkgFileIterator_end, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator___eq__", _wrap_pkgCachePkgFileIterator___eq__, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator___ne__", _wrap_pkgCachePkgFileIterator___ne__, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator___deref__", _wrap_pkgCachePkgFileIterator___deref__, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator___mul__", _wrap_pkgCachePkgFileIterator___mul__, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Cache", _wrap_pkgCachePkgFileIterator_Cache, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_FileName", _wrap_pkgCachePkgFileIterator_FileName, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Archive", _wrap_pkgCachePkgFileIterator_Archive, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Component", _wrap_pkgCachePkgFileIterator_Component, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Version", _wrap_pkgCachePkgFileIterator_Version, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Origin", _wrap_pkgCachePkgFileIterator_Origin, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Label", _wrap_pkgCachePkgFileIterator_Label, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Site", _wrap_pkgCachePkgFileIterator_Site, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Architecture", _wrap_pkgCachePkgFileIterator_Architecture, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_IndexType", _wrap_pkgCachePkgFileIterator_IndexType, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Index", _wrap_pkgCachePkgFileIterator_Index, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_IsOk", _wrap_pkgCachePkgFileIterator_IsOk, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_RelStr", _wrap_pkgCachePkgFileIterator_RelStr, METH_VARARGS }, + { (char *)"new_pkgCachePkgFileIterator", _wrap_new_pkgCachePkgFileIterator, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Size_set", _wrap_pkgCachePkgFileIterator_Size_set, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Size_get", _wrap_pkgCachePkgFileIterator_Size_get, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Flags_set", _wrap_pkgCachePkgFileIterator_Flags_set, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_Flags_get", _wrap_pkgCachePkgFileIterator_Flags_get, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_NextFile_set", _wrap_pkgCachePkgFileIterator_NextFile_set, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_NextFile_get", _wrap_pkgCachePkgFileIterator_NextFile_get, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_ID_set", _wrap_pkgCachePkgFileIterator_ID_set, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_ID_get", _wrap_pkgCachePkgFileIterator_ID_get, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_mtime_set", _wrap_pkgCachePkgFileIterator_mtime_set, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_mtime_get", _wrap_pkgCachePkgFileIterator_mtime_get, METH_VARARGS }, + { (char *)"delete_pkgCachePkgFileIterator", _wrap_delete_pkgCachePkgFileIterator, METH_VARARGS }, + { (char *)"pkgCachePkgFileIterator_swigregister", pkgCachePkgFileIterator_swigregister, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_next", _wrap_pkgCacheVerFileIterator_next, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_end", _wrap_pkgCacheVerFileIterator_end, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator___eq__", _wrap_pkgCacheVerFileIterator___eq__, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator___ne__", _wrap_pkgCacheVerFileIterator___ne__, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator___deref__", _wrap_pkgCacheVerFileIterator___deref__, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator___mul__", _wrap_pkgCacheVerFileIterator___mul__, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_Cache", _wrap_pkgCacheVerFileIterator_Cache, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_File", _wrap_pkgCacheVerFileIterator_File, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_Index", _wrap_pkgCacheVerFileIterator_Index, METH_VARARGS }, + { (char *)"new_pkgCacheVerFileIterator", _wrap_new_pkgCacheVerFileIterator, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_NextFile_set", _wrap_pkgCacheVerFileIterator_NextFile_set, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_NextFile_get", _wrap_pkgCacheVerFileIterator_NextFile_get, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_Offset_set", _wrap_pkgCacheVerFileIterator_Offset_set, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_Offset_get", _wrap_pkgCacheVerFileIterator_Offset_get, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_Size_set", _wrap_pkgCacheVerFileIterator_Size_set, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_Size_get", _wrap_pkgCacheVerFileIterator_Size_get, METH_VARARGS }, + { (char *)"delete_pkgCacheVerFileIterator", _wrap_delete_pkgCacheVerFileIterator, METH_VARARGS }, + { (char *)"pkgCacheVerFileIterator_swigregister", pkgCacheVerFileIterator_swigregister, METH_VARARGS }, + { (char *)"pkgCacheFile_Policy_set", _wrap_pkgCacheFile_Policy_set, METH_VARARGS }, + { (char *)"pkgCacheFile_Policy_get", _wrap_pkgCacheFile_Policy_get, METH_VARARGS }, + { (char *)"pkgCacheFile_pkgCache", _wrap_pkgCacheFile_pkgCache, METH_VARARGS }, + { (char *)"pkgCacheFile_pkgDepCache", _wrap_pkgCacheFile_pkgDepCache, METH_VARARGS }, + { (char *)"pkgCacheFile___deref__", _wrap_pkgCacheFile___deref__, METH_VARARGS }, + { (char *)"pkgCacheFile___mul__", _wrap_pkgCacheFile___mul__, METH_VARARGS }, + { (char *)"pkgCacheFile___getitem__", _wrap_pkgCacheFile___getitem__, METH_VARARGS }, + { (char *)"pkgCacheFile_BuildCaches", _wrap_pkgCacheFile_BuildCaches, METH_VARARGS }, + { (char *)"pkgCacheFile_Open", _wrap_pkgCacheFile_Open, METH_VARARGS }, + { (char *)"pkgCacheFile_Close", _wrap_pkgCacheFile_Close, METH_VARARGS }, + { (char *)"new_pkgCacheFile", _wrap_new_pkgCacheFile, METH_VARARGS }, + { (char *)"delete_pkgCacheFile", _wrap_delete_pkgCacheFile, METH_VARARGS }, + { (char *)"pkgCacheFile_BuildGroupOrs", _wrap_pkgCacheFile_BuildGroupOrs, METH_VARARGS }, + { (char *)"pkgCacheFile_UpdateVerState", _wrap_pkgCacheFile_UpdateVerState, METH_VARARGS }, + { (char *)"pkgCacheFile_Head", _wrap_pkgCacheFile_Head, METH_VARARGS }, + { (char *)"pkgCacheFile_PkgBegin", _wrap_pkgCacheFile_PkgBegin, METH_VARARGS }, + { (char *)"pkgCacheFile_FindPkg", _wrap_pkgCacheFile_FindPkg, METH_VARARGS }, + { (char *)"pkgCacheFile_GetCache", _wrap_pkgCacheFile_GetCache, METH_VARARGS }, + { (char *)"pkgCacheFile_VS", _wrap_pkgCacheFile_VS, METH_VARARGS }, + { (char *)"pkgCacheFile_GetCandidateVer", _wrap_pkgCacheFile_GetCandidateVer, METH_VARARGS }, + { (char *)"pkgCacheFile_IsImportantDep", _wrap_pkgCacheFile_IsImportantDep, METH_VARARGS }, + { (char *)"pkgCacheFile_GetPolicy", _wrap_pkgCacheFile_GetPolicy, METH_VARARGS }, + { (char *)"pkgCacheFile_MarkKeep", _wrap_pkgCacheFile_MarkKeep, METH_VARARGS }, + { (char *)"pkgCacheFile_MarkDelete", _wrap_pkgCacheFile_MarkDelete, METH_VARARGS }, + { (char *)"pkgCacheFile_MarkInstall", _wrap_pkgCacheFile_MarkInstall, METH_VARARGS }, + { (char *)"pkgCacheFile_SetReInstall", _wrap_pkgCacheFile_SetReInstall, METH_VARARGS }, + { (char *)"pkgCacheFile_SetCandidateVersion", _wrap_pkgCacheFile_SetCandidateVersion, METH_VARARGS }, + { (char *)"pkgCacheFile_Update", _wrap_pkgCacheFile_Update, METH_VARARGS }, + { (char *)"pkgCacheFile_UsrSize", _wrap_pkgCacheFile_UsrSize, METH_VARARGS }, + { (char *)"pkgCacheFile_DebSize", _wrap_pkgCacheFile_DebSize, METH_VARARGS }, + { (char *)"pkgCacheFile_DelCount", _wrap_pkgCacheFile_DelCount, METH_VARARGS }, + { (char *)"pkgCacheFile_KeepCount", _wrap_pkgCacheFile_KeepCount, METH_VARARGS }, + { (char *)"pkgCacheFile_InstCount", _wrap_pkgCacheFile_InstCount, METH_VARARGS }, + { (char *)"pkgCacheFile_BrokenCount", _wrap_pkgCacheFile_BrokenCount, METH_VARARGS }, + { (char *)"pkgCacheFile_BadCount", _wrap_pkgCacheFile_BadCount, METH_VARARGS }, + { (char *)"pkgCacheFile_Init", _wrap_pkgCacheFile_Init, METH_VARARGS }, + { (char *)"pkgCacheFile_swigregister", pkgCacheFile_swigregister, METH_VARARGS }, + { (char *)"pkgProblemResolver_Protect", _wrap_pkgProblemResolver_Protect, METH_VARARGS }, + { (char *)"pkgProblemResolver_Remove", _wrap_pkgProblemResolver_Remove, METH_VARARGS }, + { (char *)"pkgProblemResolver_Clear", _wrap_pkgProblemResolver_Clear, METH_VARARGS }, + { (char *)"pkgProblemResolver_Resolve", _wrap_pkgProblemResolver_Resolve, METH_VARARGS }, + { (char *)"pkgProblemResolver_ResolveByKeep", _wrap_pkgProblemResolver_ResolveByKeep, METH_VARARGS }, + { (char *)"pkgProblemResolver_InstallProtect", _wrap_pkgProblemResolver_InstallProtect, METH_VARARGS }, + { (char *)"pkgProblemResolver_RemoveDepends", _wrap_pkgProblemResolver_RemoveDepends, METH_VARARGS }, + { (char *)"new_pkgProblemResolver", _wrap_new_pkgProblemResolver, METH_VARARGS }, + { (char *)"delete_pkgProblemResolver", _wrap_delete_pkgProblemResolver, METH_VARARGS }, + { (char *)"pkgProblemResolver_swigregister", pkgProblemResolver_swigregister, METH_VARARGS }, + { (char *)"pkgDistUpgrade", _wrap_pkgDistUpgrade, METH_VARARGS }, + { (char *)"pkgApplyStatus", _wrap_pkgApplyStatus, METH_VARARGS }, + { (char *)"pkgFixBroken", _wrap_pkgFixBroken, METH_VARARGS }, + { (char *)"pkgAllUpgrade", _wrap_pkgAllUpgrade, METH_VARARGS }, + { (char *)"pkgMinimizeUpgrade", _wrap_pkgMinimizeUpgrade, METH_VARARGS }, + { (char *)"pkgPrioSortList", _wrap_pkgPrioSortList, METH_VARARGS }, + { (char *)"pkgSystem_GetSystem", _wrap_pkgSystem_GetSystem, METH_VARARGS }, + { (char *)"pkgSystem_Label_get", _wrap_pkgSystem_Label_get, METH_VARARGS }, + { (char *)"pkgSystem_VS_set", _wrap_pkgSystem_VS_set, METH_VARARGS }, + { (char *)"pkgSystem_VS_get", _wrap_pkgSystem_VS_get, METH_VARARGS }, + { (char *)"pkgSystem_Lock", _wrap_pkgSystem_Lock, METH_VARARGS }, + { (char *)"pkgSystem_UnLock", _wrap_pkgSystem_UnLock, METH_VARARGS }, + { (char *)"pkgSystem_LockRead", _wrap_pkgSystem_LockRead, METH_VARARGS }, + { (char *)"pkgSystem_CreatePM", _wrap_pkgSystem_CreatePM, METH_VARARGS }, + { (char *)"pkgSystem_Initialize", _wrap_pkgSystem_Initialize, METH_VARARGS }, + { (char *)"pkgSystem_ArchiveSupported", _wrap_pkgSystem_ArchiveSupported, METH_VARARGS }, + { (char *)"pkgSystem_AddStatusFiles", _wrap_pkgSystem_AddStatusFiles, METH_VARARGS }, + { (char *)"pkgSystem_FindIndex", _wrap_pkgSystem_FindIndex, METH_VARARGS }, + { (char *)"pkgSystem_Score", _wrap_pkgSystem_Score, METH_VARARGS }, + { (char *)"pkgSystem_PreProcess", _wrap_pkgSystem_PreProcess, METH_VARARGS }, + { (char *)"pkgSystem_ProcessCache", _wrap_pkgSystem_ProcessCache, METH_VARARGS }, + { (char *)"pkgSystem_IgnoreDep", _wrap_pkgSystem_IgnoreDep, METH_VARARGS }, + { (char *)"delete_pkgSystem", _wrap_delete_pkgSystem, METH_VARARGS }, + { (char *)"pkgSystem_swigregister", pkgSystem_swigregister, METH_VARARGS }, + { (char *)"Configuration_Find", _wrap_Configuration_Find, METH_VARARGS }, + { (char *)"Configuration_FindFile", _wrap_Configuration_FindFile, METH_VARARGS }, + { (char *)"Configuration_FindDir", _wrap_Configuration_FindDir, METH_VARARGS }, + { (char *)"Configuration_FindI", _wrap_Configuration_FindI, METH_VARARGS }, + { (char *)"Configuration_FindB", _wrap_Configuration_FindB, METH_VARARGS }, + { (char *)"Configuration_FindAny", _wrap_Configuration_FindAny, METH_VARARGS }, + { (char *)"Configuration_CndSet", _wrap_Configuration_CndSet, METH_VARARGS }, + { (char *)"Configuration_Set", _wrap_Configuration_Set, METH_VARARGS }, + { (char *)"Configuration_Exists", _wrap_Configuration_Exists, METH_VARARGS }, + { (char *)"Configuration_ExistsAny", _wrap_Configuration_ExistsAny, METH_VARARGS }, + { (char *)"Configuration_Clear", _wrap_Configuration_Clear, METH_VARARGS }, + { (char *)"Configuration_Tree", _wrap_Configuration_Tree, METH_VARARGS }, + { (char *)"Configuration_Dump", _wrap_Configuration_Dump, METH_VARARGS }, + { (char *)"new_Configuration", _wrap_new_Configuration, METH_VARARGS }, + { (char *)"delete_Configuration", _wrap_delete_Configuration, METH_VARARGS }, + { (char *)"Configuration_swigregister", Configuration_swigregister, METH_VARARGS }, + { (char *)"ReadConfigFile", _wrap_ReadConfigFile, METH_VARARGS }, + { (char *)"ReadConfigDir", _wrap_ReadConfigDir, METH_VARARGS }, + { (char *)"OpProgress_Progress", _wrap_OpProgress_Progress, METH_VARARGS }, + { (char *)"OpProgress_SubProgress", _wrap_OpProgress_SubProgress, METH_VARARGS }, + { (char *)"OpProgress_OverallProgress", _wrap_OpProgress_OverallProgress, METH_VARARGS }, + { (char *)"OpProgress_Done", _wrap_OpProgress_Done, METH_VARARGS }, + { (char *)"new_OpProgress", _wrap_new_OpProgress, METH_VARARGS }, + { (char *)"delete_OpProgress", _wrap_delete_OpProgress, METH_VARARGS }, + { (char *)"OpProgress_swigregister", OpProgress_swigregister, METH_VARARGS }, + { (char *)"OpTextProgress_Done", _wrap_OpTextProgress_Done, METH_VARARGS }, + { (char *)"new_OpTextProgress", _wrap_new_OpTextProgress, METH_VARARGS }, + { (char *)"delete_OpTextProgress", _wrap_delete_OpTextProgress, METH_VARARGS }, + { (char *)"OpTextProgress_swigregister", OpTextProgress_swigregister, METH_VARARGS }, + { (char *)"pkgVersioningSystem_GetVS", _wrap_pkgVersioningSystem_GetVS, METH_VARARGS }, + { (char *)"pkgVersioningSystem_Label_get", _wrap_pkgVersioningSystem_Label_get, METH_VARARGS }, + { (char *)"pkgVersioningSystem_DoCmpVersion", _wrap_pkgVersioningSystem_DoCmpVersion, METH_VARARGS }, + { (char *)"pkgVersioningSystem_DoCmpVersionArch", _wrap_pkgVersioningSystem_DoCmpVersionArch, METH_VARARGS }, + { (char *)"pkgVersioningSystem_CmpVersionArch", _wrap_pkgVersioningSystem_CmpVersionArch, METH_VARARGS }, + { (char *)"pkgVersioningSystem_CheckDep", _wrap_pkgVersioningSystem_CheckDep, METH_VARARGS }, + { (char *)"pkgVersioningSystem_DoCmpReleaseVer", _wrap_pkgVersioningSystem_DoCmpReleaseVer, METH_VARARGS }, + { (char *)"pkgVersioningSystem_UpstreamVersion", _wrap_pkgVersioningSystem_UpstreamVersion, METH_VARARGS }, + { (char *)"pkgVersioningSystem_TestCompatibility", _wrap_pkgVersioningSystem_TestCompatibility, METH_VARARGS }, + { (char *)"pkgVersioningSystem_CmpVersion", _wrap_pkgVersioningSystem_CmpVersion, METH_VARARGS }, + { (char *)"pkgVersioningSystem_CmpReleaseVer", _wrap_pkgVersioningSystem_CmpReleaseVer, METH_VARARGS }, + { (char *)"delete_pkgVersioningSystem", _wrap_delete_pkgVersioningSystem, METH_VARARGS }, + { (char *)"pkgVersioningSystem_swigregister", pkgVersioningSystem_swigregister, METH_VARARGS }, + { (char *)"pkgRecords_Lookup", _wrap_pkgRecords_Lookup, METH_VARARGS }, + { (char *)"new_pkgRecords", _wrap_new_pkgRecords, METH_VARARGS }, + { (char *)"delete_pkgRecords", _wrap_delete_pkgRecords, METH_VARARGS }, + { (char *)"pkgRecords_swigregister", pkgRecords_swigregister, METH_VARARGS }, + { (char *)"pkgRecordsParser_FileName", _wrap_pkgRecordsParser_FileName, METH_VARARGS }, + { (char *)"pkgRecordsParser_MD5Hash", _wrap_pkgRecordsParser_MD5Hash, METH_VARARGS }, + { (char *)"pkgRecordsParser_SHA1Hash", _wrap_pkgRecordsParser_SHA1Hash, METH_VARARGS }, + { (char *)"pkgRecordsParser_SourcePkg", _wrap_pkgRecordsParser_SourcePkg, METH_VARARGS }, + { (char *)"pkgRecordsParser_Maintainer", _wrap_pkgRecordsParser_Maintainer, METH_VARARGS }, + { (char *)"pkgRecordsParser_ShortDesc", _wrap_pkgRecordsParser_ShortDesc, METH_VARARGS }, + { (char *)"pkgRecordsParser_LongDesc", _wrap_pkgRecordsParser_LongDesc, METH_VARARGS }, + { (char *)"pkgRecordsParser_Name", _wrap_pkgRecordsParser_Name, METH_VARARGS }, + { (char *)"pkgRecordsParser_GetRec", _wrap_pkgRecordsParser_GetRec, METH_VARARGS }, + { (char *)"delete_pkgRecordsParser", _wrap_delete_pkgRecordsParser, METH_VARARGS }, + { (char *)"pkgRecordsParser_swigregister", pkgRecordsParser_swigregister, METH_VARARGS }, + { (char *)"pkgAcquireItem_Status_set", _wrap_pkgAcquireItem_Status_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_Status_get", _wrap_pkgAcquireItem_Status_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_ErrorText_set", _wrap_pkgAcquireItem_ErrorText_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_ErrorText_get", _wrap_pkgAcquireItem_ErrorText_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_FileSize_set", _wrap_pkgAcquireItem_FileSize_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_FileSize_get", _wrap_pkgAcquireItem_FileSize_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_PartialSize_set", _wrap_pkgAcquireItem_PartialSize_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_PartialSize_get", _wrap_pkgAcquireItem_PartialSize_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_Mode_set", _wrap_pkgAcquireItem_Mode_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_Mode_get", _wrap_pkgAcquireItem_Mode_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_ID_set", _wrap_pkgAcquireItem_ID_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_ID_get", _wrap_pkgAcquireItem_ID_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_Complete_set", _wrap_pkgAcquireItem_Complete_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_Complete_get", _wrap_pkgAcquireItem_Complete_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_Local_set", _wrap_pkgAcquireItem_Local_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_Local_get", _wrap_pkgAcquireItem_Local_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_QueueCounter_set", _wrap_pkgAcquireItem_QueueCounter_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_QueueCounter_get", _wrap_pkgAcquireItem_QueueCounter_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_DestFile_set", _wrap_pkgAcquireItem_DestFile_set, METH_VARARGS }, + { (char *)"pkgAcquireItem_DestFile_get", _wrap_pkgAcquireItem_DestFile_get, METH_VARARGS }, + { (char *)"pkgAcquireItem_Failed", _wrap_pkgAcquireItem_Failed, METH_VARARGS }, + { (char *)"pkgAcquireItem_Done", _wrap_pkgAcquireItem_Done, METH_VARARGS }, + { (char *)"pkgAcquireItem_Start", _wrap_pkgAcquireItem_Start, METH_VARARGS }, + { (char *)"pkgAcquireItem_Custom600Headers", _wrap_pkgAcquireItem_Custom600Headers, METH_VARARGS }, + { (char *)"pkgAcquireItem_DescURI", _wrap_pkgAcquireItem_DescURI, METH_VARARGS }, + { (char *)"pkgAcquireItem_Finished", _wrap_pkgAcquireItem_Finished, METH_VARARGS }, + { (char *)"pkgAcquireItem_MD5Sum", _wrap_pkgAcquireItem_MD5Sum, METH_VARARGS }, + { (char *)"pkgAcquireItem_GetOwner", _wrap_pkgAcquireItem_GetOwner, METH_VARARGS }, + { (char *)"delete_pkgAcquireItem", _wrap_delete_pkgAcquireItem, METH_VARARGS }, + { (char *)"pkgAcquireItem_swigregister", pkgAcquireItem_swigregister, METH_VARARGS }, + { (char *)"pkgAcqIndex_Done", _wrap_pkgAcqIndex_Done, METH_VARARGS }, + { (char *)"pkgAcqIndex_Custom600Headers", _wrap_pkgAcqIndex_Custom600Headers, METH_VARARGS }, + { (char *)"pkgAcqIndex_DescURI", _wrap_pkgAcqIndex_DescURI, METH_VARARGS }, + { (char *)"new_pkgAcqIndex", _wrap_new_pkgAcqIndex, METH_VARARGS }, + { (char *)"delete_pkgAcqIndex", _wrap_delete_pkgAcqIndex, METH_VARARGS }, + { (char *)"pkgAcqIndex_swigregister", pkgAcqIndex_swigregister, METH_VARARGS }, + { (char *)"pkgAcqIndexRel_Failed", _wrap_pkgAcqIndexRel_Failed, METH_VARARGS }, + { (char *)"pkgAcqIndexRel_Done", _wrap_pkgAcqIndexRel_Done, METH_VARARGS }, + { (char *)"pkgAcqIndexRel_Custom600Headers", _wrap_pkgAcqIndexRel_Custom600Headers, METH_VARARGS }, + { (char *)"pkgAcqIndexRel_DescURI", _wrap_pkgAcqIndexRel_DescURI, METH_VARARGS }, + { (char *)"new_pkgAcqIndexRel", _wrap_new_pkgAcqIndexRel, METH_VARARGS }, + { (char *)"delete_pkgAcqIndexRel", _wrap_delete_pkgAcqIndexRel, METH_VARARGS }, + { (char *)"pkgAcqIndexRel_swigregister", pkgAcqIndexRel_swigregister, METH_VARARGS }, + { (char *)"pkgAcqArchive_Failed", _wrap_pkgAcqArchive_Failed, METH_VARARGS }, + { (char *)"pkgAcqArchive_Done", _wrap_pkgAcqArchive_Done, METH_VARARGS }, + { (char *)"pkgAcqArchive_MD5Sum", _wrap_pkgAcqArchive_MD5Sum, METH_VARARGS }, + { (char *)"pkgAcqArchive_DescURI", _wrap_pkgAcqArchive_DescURI, METH_VARARGS }, + { (char *)"pkgAcqArchive_Finished", _wrap_pkgAcqArchive_Finished, METH_VARARGS }, + { (char *)"new_pkgAcqArchive", _wrap_new_pkgAcqArchive, METH_VARARGS }, + { (char *)"delete_pkgAcqArchive", _wrap_delete_pkgAcqArchive, METH_VARARGS }, + { (char *)"pkgAcqArchive_swigregister", pkgAcqArchive_swigregister, METH_VARARGS }, + { (char *)"pkgAcqFile_Failed", _wrap_pkgAcqFile_Failed, METH_VARARGS }, + { (char *)"pkgAcqFile_Done", _wrap_pkgAcqFile_Done, METH_VARARGS }, + { (char *)"pkgAcqFile_MD5Sum", _wrap_pkgAcqFile_MD5Sum, METH_VARARGS }, + { (char *)"pkgAcqFile_DescURI", _wrap_pkgAcqFile_DescURI, METH_VARARGS }, + { (char *)"new_pkgAcqFile", _wrap_new_pkgAcqFile, METH_VARARGS }, + { (char *)"delete_pkgAcqFile", _wrap_delete_pkgAcqFile, METH_VARARGS }, + { (char *)"pkgAcqFile_swigregister", pkgAcqFile_swigregister, METH_VARARGS }, + { (char *)"pkgAcquire_ItemsList", _wrap_pkgAcquire_ItemsList, METH_VARARGS }, + { (char *)"pkgAcquire_GetConfig", _wrap_pkgAcquire_GetConfig, METH_VARARGS }, + { (char *)"pkgAcquire_Run", _wrap_pkgAcquire_Run, METH_VARARGS }, + { (char *)"pkgAcquire_Shutdown", _wrap_pkgAcquire_Shutdown, METH_VARARGS }, + { (char *)"pkgAcquire_WorkersBegin", _wrap_pkgAcquire_WorkersBegin, METH_VARARGS }, + { (char *)"pkgAcquire_WorkerStep", _wrap_pkgAcquire_WorkerStep, METH_VARARGS }, + { (char *)"pkgAcquire_ItemsBegin", _wrap_pkgAcquire_ItemsBegin, METH_VARARGS }, + { (char *)"pkgAcquire_ItemsEnd", _wrap_pkgAcquire_ItemsEnd, METH_VARARGS }, + { (char *)"pkgAcquire_UriBegin", _wrap_pkgAcquire_UriBegin, METH_VARARGS }, + { (char *)"pkgAcquire_UriEnd", _wrap_pkgAcquire_UriEnd, METH_VARARGS }, + { (char *)"pkgAcquire_Clean", _wrap_pkgAcquire_Clean, METH_VARARGS }, + { (char *)"pkgAcquire_TotalNeeded", _wrap_pkgAcquire_TotalNeeded, METH_VARARGS }, + { (char *)"pkgAcquire_FetchNeeded", _wrap_pkgAcquire_FetchNeeded, METH_VARARGS }, + { (char *)"pkgAcquire_PartialPresent", _wrap_pkgAcquire_PartialPresent, METH_VARARGS }, + { (char *)"new_pkgAcquire", _wrap_new_pkgAcquire, METH_VARARGS }, + { (char *)"delete_pkgAcquire", _wrap_delete_pkgAcquire, METH_VARARGS }, + { (char *)"pkgAcquire_swigregister", pkgAcquire_swigregister, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Update_set", _wrap_pkgAcquireStatus_Update_set, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Update_get", _wrap_pkgAcquireStatus_Update_get, METH_VARARGS }, + { (char *)"pkgAcquireStatus_MorePulses_set", _wrap_pkgAcquireStatus_MorePulses_set, METH_VARARGS }, + { (char *)"pkgAcquireStatus_MorePulses_get", _wrap_pkgAcquireStatus_MorePulses_get, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Fetched", _wrap_pkgAcquireStatus_Fetched, METH_VARARGS }, + { (char *)"pkgAcquireStatus_MediaChange", _wrap_pkgAcquireStatus_MediaChange, METH_VARARGS }, + { (char *)"pkgAcquireStatus_IMSHit", _wrap_pkgAcquireStatus_IMSHit, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Fetch", _wrap_pkgAcquireStatus_Fetch, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Done", _wrap_pkgAcquireStatus_Done, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Fail", _wrap_pkgAcquireStatus_Fail, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Pulse", _wrap_pkgAcquireStatus_Pulse, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Start", _wrap_pkgAcquireStatus_Start, METH_VARARGS }, + { (char *)"pkgAcquireStatus_Stop", _wrap_pkgAcquireStatus_Stop, METH_VARARGS }, + { (char *)"delete_pkgAcquireStatus", _wrap_delete_pkgAcquireStatus, METH_VARARGS }, + { (char *)"pkgAcquireStatus_swigregister", pkgAcquireStatus_swigregister, METH_VARARGS }, + { (char *)"pkgPackageManager_GetArchives", _wrap_pkgPackageManager_GetArchives, METH_VARARGS }, + { (char *)"pkgPackageManager_DoInstall", _wrap_pkgPackageManager_DoInstall, METH_VARARGS }, + { (char *)"pkgPackageManager_FixMissing", _wrap_pkgPackageManager_FixMissing, METH_VARARGS }, + { (char *)"new_pkgPackageManager", _wrap_new_pkgPackageManager, METH_VARARGS }, + { (char *)"delete_pkgPackageManager", _wrap_delete_pkgPackageManager, METH_VARARGS }, + { (char *)"pkgPackageManager_swigregister", pkgPackageManager_swigregister, METH_VARARGS }, + { (char *)"pkgSourceList_ReadMainList", _wrap_pkgSourceList_ReadMainList, METH_VARARGS }, + { (char *)"pkgSourceList_Read", _wrap_pkgSourceList_Read, METH_VARARGS }, + { (char *)"pkgSourceList_ReadVendors", _wrap_pkgSourceList_ReadVendors, METH_VARARGS }, + { (char *)"pkgSourceList_begin", _wrap_pkgSourceList_begin, METH_VARARGS }, + { (char *)"pkgSourceList_end", _wrap_pkgSourceList_end, METH_VARARGS }, + { (char *)"pkgSourceList_size", _wrap_pkgSourceList_size, METH_VARARGS }, + { (char *)"pkgSourceList_empty", _wrap_pkgSourceList_empty, METH_VARARGS }, + { (char *)"pkgSourceList_FindIndex", _wrap_pkgSourceList_FindIndex, METH_VARARGS }, + { (char *)"pkgSourceList_GetIndexes", _wrap_pkgSourceList_GetIndexes, METH_VARARGS }, + { (char *)"pkgSourceList_GetReleases", _wrap_pkgSourceList_GetReleases, METH_VARARGS }, + { (char *)"new_pkgSourceList", _wrap_new_pkgSourceList, METH_VARARGS }, + { (char *)"delete_pkgSourceList", _wrap_delete_pkgSourceList, METH_VARARGS }, + { (char *)"pkgSourceList_swigregister", pkgSourceList_swigregister, METH_VARARGS }, + { (char *)"GlobalError_Errno", _wrap_GlobalError_Errno, METH_VARARGS }, + { (char *)"GlobalError_WarningE", _wrap_GlobalError_WarningE, METH_VARARGS }, + { (char *)"GlobalError_Error", _wrap_GlobalError_Error, METH_VARARGS }, + { (char *)"GlobalError_Warning", _wrap_GlobalError_Warning, METH_VARARGS }, + { (char *)"GlobalError_PendingError", _wrap_GlobalError_PendingError, METH_VARARGS }, + { (char *)"GlobalError_empty", _wrap_GlobalError_empty, METH_VARARGS }, + { (char *)"GlobalError_PopMessage", _wrap_GlobalError_PopMessage, METH_VARARGS }, + { (char *)"GlobalError_Discard", _wrap_GlobalError_Discard, METH_VARARGS }, + { (char *)"GlobalError_DumpErrors", _wrap_GlobalError_DumpErrors, METH_VARARGS }, + { (char *)"new_GlobalError", _wrap_new_GlobalError, METH_VARARGS }, + { (char *)"delete_GlobalError", _wrap_delete_GlobalError, METH_VARARGS }, + { (char *)"GlobalError_swigregister", GlobalError_swigregister, METH_VARARGS }, + { (char *)"_GetErrorObj", _wrap__GetErrorObj, METH_VARARGS }, + { (char *)"new_pkgAcquireStatusDumb", _wrap_new_pkgAcquireStatusDumb, METH_VARARGS }, + { (char *)"delete_pkgAcquireStatusDumb", _wrap_delete_pkgAcquireStatusDumb, METH_VARARGS }, + { (char *)"pkgAcquireStatusDumb_swigregister", pkgAcquireStatusDumb_swigregister, METH_VARARGS }, + { NULL, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_pkgAcqArchiveTo_p_pkgAcquire__Item(void *x) { + return (void *)((pkgAcquire::Item *) ((pkgAcqArchive *) x)); +} +static void *_p_pkgAcqFileTo_p_pkgAcquire__Item(void *x) { + return (void *)((pkgAcquire::Item *) ((pkgAcqFile *) x)); +} +static void *_p_pkgAcqIndexTo_p_pkgAcquire__Item(void *x) { + return (void *)((pkgAcquire::Item *) ((pkgAcqIndex *) x)); +} +static void *_p_pkgAcqIndexRelTo_p_pkgAcquire__Item(void *x) { + return (void *)((pkgAcquire::Item *) ((pkgAcqIndexRel *) x)); +} +static void *_p_pkgAcquireStatusDumbTo_p_pkgAcquireStatus(void *x) { + return (void *)((pkgAcquireStatus *) ((pkgAcquireStatusDumb *) x)); +} +static void *_p_OpTextProgressTo_p_OpProgress(void *x) { + return (void *)((OpProgress *) ((OpTextProgress *) x)); +} +static swig_type_info _swigt__p_PackageFile[] = {{"_p_PackageFile", 0, "PackageFile *", 0},{"_p_PackageFile"},{"_p_pkgCache__PackageFile"},{0}}; +static swig_type_info _swigt__p_pkgCache__PackageFile[] = {{"_p_pkgCache__PackageFile", 0, "pkgCache::PackageFile *", 0},{"_p_pkgCache__PackageFile"},{"_p_PackageFile"},{0}}; +static swig_type_info _swigt__p_pkgSourceList__const_iterator[] = {{"_p_pkgSourceList__const_iterator", 0, "pkgSourceList::const_iterator *", 0},{"_p_pkgSourceList__const_iterator"},{0}}; +static swig_type_info _swigt__p_pkgAcquire__UriIterator[] = {{"_p_pkgAcquire__UriIterator", 0, "pkgAcquire::UriIterator *", 0},{"_p_pkgAcquire__UriIterator"},{0}}; +static swig_type_info _swigt__p_pkgAcquire__ItemIterator[] = {{"_p_pkgAcquire__ItemIterator", 0, "pkgAcquire::ItemIterator *", 0},{"_p_pkgAcquire__ItemIterator"},{0}}; +static swig_type_info _swigt__p_pkgCache__VerFileIterator[] = {{"_p_pkgCache__VerFileIterator", 0, "pkgCache::VerFileIterator *", 0},{"_p_pkgCache__VerFileIterator"},{"_p_VerFileIterator"},{0}}; +static swig_type_info _swigt__p_PkgFileIterator[] = {{"_p_PkgFileIterator", 0, "PkgFileIterator *", 0},{"_p_PkgFileIterator"},{"_p_pkgCache__PkgFileIterator"},{0}}; +static swig_type_info _swigt__p_pkgCache__PrvIterator[] = {{"_p_pkgCache__PrvIterator", 0, "pkgCache::PrvIterator *", 0},{"_p_pkgCache__PrvIterator"},{"_p_PrvIterator"},{0}}; +static swig_type_info _swigt__p_pkgCache__DepIterator[] = {{"_p_pkgCache__DepIterator", 0, "pkgCache::DepIterator *", 0},{"_p_pkgCache__DepIterator"},{"_p_DepIterator"},{0}}; +static swig_type_info _swigt__p_VerFileIterator[] = {{"_p_VerFileIterator", 0, "VerFileIterator const &", 0},{"_p_VerFileIterator"},{"_p_pkgCache__VerFileIterator"},{0}}; +static swig_type_info _swigt__p_pkgCache__VerIterator[] = {{"_p_pkgCache__VerIterator", 0, "pkgCache::VerIterator *", 0},{"_p_pkgCache__VerIterator"},{"_p_VerIterator"},{0}}; +static swig_type_info _swigt__p_PrvIterator[] = {{"_p_PrvIterator", 0, "PrvIterator const &", 0},{"_p_PrvIterator"},{"_p_pkgCache__PrvIterator"},{0}}; +static swig_type_info _swigt__p_pkgCache__PkgIterator[] = {{"_p_pkgCache__PkgIterator", 0, "pkgCache::PkgIterator *", 0},{"_p_pkgCache__PkgIterator"},{"_p_PkgIterator"},{0}}; +static swig_type_info _swigt__p_pkgCache__PkgFileIterator[] = {{"_p_pkgCache__PkgFileIterator", 0, "pkgCache::PkgFileIterator *", 0},{"_p_pkgCache__PkgFileIterator"},{"_p_PkgFileIterator"},{0}}; +static swig_type_info _swigt__p_VerIterator[] = {{"_p_VerIterator", 0, "VerIterator *", 0},{"_p_VerIterator"},{"_p_pkgCache__VerIterator"},{0}}; +static swig_type_info _swigt__p_PkgIterator[] = {{"_p_PkgIterator", 0, "PkgIterator const &", 0},{"_p_PkgIterator"},{"_p_pkgCache__PkgIterator"},{0}}; +static swig_type_info _swigt__p_DepIterator[] = {{"_p_DepIterator", 0, "DepIterator *", 0},{"_p_DepIterator"},{"_p_pkgCache__DepIterator"},{0}}; +static swig_type_info _swigt__p_pkgCache__Header[] = {{"_p_pkgCache__Header", 0, "pkgCache::Header *", 0},{"_p_pkgCache__Header"},{"_p_Header"},{0}}; +static swig_type_info _swigt__p_Header[] = {{"_p_Header", 0, "Header &", 0},{"_p_Header"},{"_p_pkgCache__Header"},{0}}; +static swig_type_info _swigt__p_pkgPolicy[] = {{"_p_pkgPolicy", 0, "pkgPolicy *", 0},{"_p_pkgPolicy"},{0}}; +static swig_type_info _swigt__p_Policy[] = {{"_p_Policy", 0, "Policy &", 0},{"_p_Policy"},{0}}; +static swig_type_info _swigt__p_Configuration[] = {{"_p_Configuration", 0, "Configuration *", 0},{"_p_Configuration"},{0}}; +static swig_type_info _swigt__p_pkgAcqIndexRel[] = {{"_p_pkgAcqIndexRel", 0, "pkgAcqIndexRel *", 0},{"_p_pkgAcqIndexRel"},{0}}; +static swig_type_info _swigt__p_pkgAcquire[] = {{"_p_pkgAcquire", 0, "pkgAcquire *", 0},{"_p_pkgAcquire"},{0}}; +static swig_type_info _swigt__p_map_ptrloc[] = {{"_p_map_ptrloc", 0, "map_ptrloc *", 0},{"_p_map_ptrloc"},{0}}; +static swig_type_info _swigt__p_Dependency[] = {{"_p_Dependency", 0, "Dependency *", 0},{"_p_Dependency"},{"_p_pkgCache__Dependency"},{0}}; +static swig_type_info _swigt__p_pkgCache__Dependency[] = {{"_p_pkgCache__Dependency", 0, "pkgCache::Dependency *", 0},{"_p_pkgCache__Dependency"},{"_p_Dependency"},{0}}; +static swig_type_info _swigt__p_GlobalError[] = {{"_p_GlobalError", 0, "GlobalError *", 0},{"_p_GlobalError"},{0}}; +static swig_type_info _swigt__p_pkgAcqIndex[] = {{"_p_pkgAcqIndex", 0, "pkgAcqIndex *", 0},{"_p_pkgAcqIndex"},{0}}; +static swig_type_info _swigt__p_StateCache[] = {{"_p_StateCache", 0, "StateCache &", 0},{"_p_StateCache"},{"_p_pkgDepCache__StateCache"},{0}}; +static swig_type_info _swigt__p_pkgDepCache__StateCache[] = {{"_p_pkgDepCache__StateCache", 0, "pkgDepCache::StateCache *", 0},{"_p_pkgDepCache__StateCache"},{"_p_StateCache"},{0}}; +static swig_type_info _swigt__p_Item[] = {{"_p_Item", 0, "Item const *", 0},{"_p_Item"},{0}}; +static swig_type_info _swigt__p_void[] = {{"_p_void", 0, "void *", 0},{"_p_void"},{0}}; +static swig_type_info _swigt__p_pkgAcquire__Item[] = {{"_p_pkgAcquire__Item", 0, "pkgAcquire::Item *", 0},{"_p_pkgAcqArchive", _p_pkgAcqArchiveTo_p_pkgAcquire__Item},{"_p_pkgAcqFile", _p_pkgAcqFileTo_p_pkgAcquire__Item},{"_p_pkgAcqIndex", _p_pkgAcqIndexTo_p_pkgAcquire__Item},{"_p_pkgAcqIndexRel", _p_pkgAcqIndexRelTo_p_pkgAcquire__Item},{"_p_pkgAcquire__Item"},{0}}; +static swig_type_info _swigt__p_MMap[] = {{"_p_MMap", 0, "MMap *", 0},{"_p_MMap"},{0}}; +static swig_type_info _swigt__p_pkgRecords__Parser[] = {{"_p_pkgRecords__Parser", 0, "pkgRecords::Parser *", 0},{"_p_pkgRecords__Parser"},{0}}; +static swig_type_info _swigt__p_p_pkgCache__Version[] = {{"_p_p_pkgCache__Version", 0, "pkgCache::Version **", 0},{"_p_p_pkgCache__Version"},{"_p_p_Version"},{0}}; +static swig_type_info _swigt__p_p_Version[] = {{"_p_p_Version", 0, "Version **", 0},{"_p_p_Version"},{"_p_p_pkgCache__Version"},{0}}; +static swig_type_info _swigt__p_pkgCache__Version[] = {{"_p_pkgCache__Version", 0, "pkgCache::Version *", 0},{"_p_pkgCache__Version"},{"_p_Version"},{0}}; +static swig_type_info _swigt__p_Version[] = {{"_p_Version", 0, "Version *", 0},{"_p_Version"},{"_p_pkgCache__Version"},{0}}; +static swig_type_info _swigt__p_vectorTpkgIndexFile_p_t[] = {{"_p_vectorTpkgIndexFile_p_t", 0, "vector<pkgIndexFile * > *", 0},{"_p_vectorTpkgIndexFile_p_t"},{0}}; +static swig_type_info _swigt__p_time_t[] = {{"_p_time_t", 0, "time_t *", 0},{"_p_time_t"},{0}}; +static swig_type_info _swigt__p_p_pkgIndexFile[] = {{"_p_p_pkgIndexFile", 0, "pkgIndexFile **", 0},{"_p_p_pkgIndexFile"},{0}}; +static swig_type_info _swigt__p_pkgProblemResolver[] = {{"_p_pkgProblemResolver", 0, "pkgProblemResolver *", 0},{"_p_pkgProblemResolver"},{0}}; +static swig_type_info _swigt__p_pkgAcqArchive[] = {{"_p_pkgAcqArchive", 0, "pkgAcqArchive *", 0},{"_p_pkgAcqArchive"},{0}}; +static swig_type_info _swigt__p_p_char[] = {{"_p_p_char", 0, "char **", 0},{"_p_p_char"},{0}}; +static swig_type_info _swigt__p_pkgAcquireStatusDumb[] = {{"_p_pkgAcquireStatusDumb", 0, "pkgAcquireStatusDumb *", 0},{"_p_pkgAcquireStatusDumb"},{0}}; +static swig_type_info _swigt__p_pkgCacheFile[] = {{"_p_pkgCacheFile", 0, "pkgCacheFile *", 0},{"_p_pkgCacheFile"},{0}}; +static swig_type_info _swigt__p_pkgAcquire__ItemDesc[] = {{"_p_pkgAcquire__ItemDesc", 0, "pkgAcquire::ItemDesc *", 0},{"_p_pkgAcquire__ItemDesc"},{0}}; +static swig_type_info _swigt__p_pkgAcquireStatus[] = {{"_p_pkgAcquireStatus", 0, "pkgAcquireStatus *", 0},{"_p_pkgAcquireStatus"},{"_p_pkgAcquireStatusDumb", _p_pkgAcquireStatusDumbTo_p_pkgAcquireStatus},{0}}; +static swig_type_info _swigt__p_pkgDepCache[] = {{"_p_pkgDepCache", 0, "pkgDepCache *", 0},{"_p_pkgDepCache"},{0}}; +static swig_type_info _swigt__p_DynamicMMap__Pool[] = {{"_p_DynamicMMap__Pool", 0, "DynamicMMap::Pool *", 0},{"_p_DynamicMMap__Pool"},{0}}; +static swig_type_info _swigt__p_pkgPackageManager[] = {{"_p_pkgPackageManager", 0, "pkgPackageManager *", 0},{"_p_pkgPackageManager"},{0}}; +static swig_type_info _swigt__p_OpTextProgress[] = {{"_p_OpTextProgress", 0, "OpTextProgress *", 0},{"_p_OpTextProgress"},{0}}; +static swig_type_info _swigt__p_OpProgress[] = {{"_p_OpProgress", 0, "OpProgress *", 0},{"_p_OpProgress"},{"_p_OpTextProgress", _p_OpTextProgressTo_p_OpProgress},{0}}; +static swig_type_info _swigt__p_Provides[] = {{"_p_Provides", 0, "Provides *", 0},{"_p_Provides"},{"_p_pkgCache__Provides"},{0}}; +static swig_type_info _swigt__p_pkgCache__Provides[] = {{"_p_pkgCache__Provides", 0, "pkgCache::Provides *", 0},{"_p_pkgCache__Provides"},{"_p_Provides"},{0}}; +static swig_type_info _swigt__p_pkgRepository[] = {{"_p_pkgRepository", 0, "pkgRepository *", 0},{"_p_pkgRepository"},{0}}; +static swig_type_info _swigt__p_pkgAcqFile[] = {{"_p_pkgAcqFile", 0, "pkgAcqFile *", 0},{"_p_pkgAcqFile"},{0}}; +static swig_type_info _swigt__p_pkgSourceList[] = {{"_p_pkgSourceList", 0, "pkgSourceList *", 0},{"_p_pkgSourceList"},{0}}; +static swig_type_info _swigt__p_string[] = {{"_p_string", 0, "string &", 0},{"_p_string"},{0}}; +static swig_type_info _swigt__p_p_pkgVersioningSystem[] = {{"_p_p_pkgVersioningSystem", 0, "pkgVersioningSystem **", 0},{"_p_p_pkgVersioningSystem"},{0}}; +static swig_type_info _swigt__p_pkgSystem[] = {{"_p_pkgSystem", 0, "pkgSystem *", 0},{"_p_pkgSystem"},{0}}; +static swig_type_info _swigt__p_p_pkgSystem[] = {{"_p_p_pkgSystem", 0, "pkgSystem **", 0},{"_p_p_pkgSystem"},{0}}; +static swig_type_info _swigt__p_pkgVersioningSystem[] = {{"_p_pkgVersioningSystem", 0, "pkgVersioningSystem *", 0},{"_p_pkgVersioningSystem"},{0}}; +static swig_type_info _swigt__p_VerFile[] = {{"_p_VerFile", 0, "VerFile *", 0},{"_p_VerFile"},{"_p_pkgCache__VerFile"},{0}}; +static swig_type_info _swigt__p_pkgCache__VerFile[] = {{"_p_pkgCache__VerFile", 0, "pkgCache::VerFile *", 0},{"_p_pkgCache__VerFile"},{"_p_VerFile"},{0}}; +static swig_type_info _swigt__p_pkgAcquire__MethodConfig[] = {{"_p_pkgAcquire__MethodConfig", 0, "pkgAcquire::MethodConfig *", 0},{"_p_pkgAcquire__MethodConfig"},{0}}; +static swig_type_info _swigt__p_pkgCache__Package[] = {{"_p_pkgCache__Package", 0, "pkgCache::Package *", 0},{"_p_pkgCache__Package"},{"_p_Package"},{0}}; +static swig_type_info _swigt__p_Package[] = {{"_p_Package", 0, "Package *", 0},{"_p_Package"},{"_p_pkgCache__Package"},{0}}; +static swig_type_info _swigt__p_unsigned_char[] = {{"_p_unsigned_char", 0, "unsigned char *", 0},{"_p_unsigned_char"},{0}}; +static swig_type_info _swigt__p_pkgRecords[] = {{"_p_pkgRecords", 0, "pkgRecords *", 0},{"_p_pkgRecords"},{0}}; +static swig_type_info _swigt__p_pkgAcquire__Worker[] = {{"_p_pkgAcquire__Worker", 0, "pkgAcquire::Worker *", 0},{"_p_pkgAcquire__Worker"},{0}}; +static swig_type_info _swigt__p_pkgCache[] = {{"_p_pkgCache", 0, "pkgCache *", 0},{"_p_pkgCache"},{0}}; +static swig_type_info _swigt__p_pkgCache__StringItem[] = {{"_p_pkgCache__StringItem", 0, "pkgCache::StringItem *", 0},{"_p_pkgCache__StringItem"},{0}}; + +static swig_type_info *swig_types_initial[] = { +_swigt__p_PackageFile, +_swigt__p_pkgCache__PackageFile, +_swigt__p_pkgSourceList__const_iterator, +_swigt__p_pkgAcquire__UriIterator, +_swigt__p_pkgAcquire__ItemIterator, +_swigt__p_pkgCache__VerFileIterator, +_swigt__p_PkgFileIterator, +_swigt__p_pkgCache__PrvIterator, +_swigt__p_pkgCache__DepIterator, +_swigt__p_VerFileIterator, +_swigt__p_pkgCache__VerIterator, +_swigt__p_PrvIterator, +_swigt__p_pkgCache__PkgIterator, +_swigt__p_pkgCache__PkgFileIterator, +_swigt__p_VerIterator, +_swigt__p_PkgIterator, +_swigt__p_DepIterator, +_swigt__p_pkgCache__Header, +_swigt__p_Header, +_swigt__p_pkgPolicy, +_swigt__p_Policy, +_swigt__p_Configuration, +_swigt__p_pkgAcqIndexRel, +_swigt__p_pkgAcquire, +_swigt__p_map_ptrloc, +_swigt__p_Dependency, +_swigt__p_pkgCache__Dependency, +_swigt__p_GlobalError, +_swigt__p_pkgAcqIndex, +_swigt__p_StateCache, +_swigt__p_pkgDepCache__StateCache, +_swigt__p_Item, +_swigt__p_void, +_swigt__p_pkgAcquire__Item, +_swigt__p_MMap, +_swigt__p_pkgRecords__Parser, +_swigt__p_p_pkgCache__Version, +_swigt__p_p_Version, +_swigt__p_pkgCache__Version, +_swigt__p_Version, +_swigt__p_vectorTpkgIndexFile_p_t, +_swigt__p_time_t, +_swigt__p_p_pkgIndexFile, +_swigt__p_pkgProblemResolver, +_swigt__p_pkgAcqArchive, +_swigt__p_p_char, +_swigt__p_pkgAcquireStatusDumb, +_swigt__p_pkgCacheFile, +_swigt__p_pkgAcquire__ItemDesc, +_swigt__p_pkgAcquireStatus, +_swigt__p_pkgDepCache, +_swigt__p_DynamicMMap__Pool, +_swigt__p_pkgPackageManager, +_swigt__p_OpTextProgress, +_swigt__p_OpProgress, +_swigt__p_Provides, +_swigt__p_pkgCache__Provides, +_swigt__p_pkgRepository, +_swigt__p_pkgAcqFile, +_swigt__p_pkgSourceList, +_swigt__p_string, +_swigt__p_p_pkgVersioningSystem, +_swigt__p_pkgSystem, +_swigt__p_p_pkgSystem, +_swigt__p_pkgVersioningSystem, +_swigt__p_VerFile, +_swigt__p_pkgCache__VerFile, +_swigt__p_pkgAcquire__MethodConfig, +_swigt__p_pkgCache__Package, +_swigt__p_Package, +_swigt__p_unsigned_char, +_swigt__p_pkgRecords, +_swigt__p_pkgAcquire__Worker, +_swigt__p_pkgCache, +_swigt__p_pkgCache__StringItem, +0 +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{ SWIG_PY_INT, (char *)"APT_PKG_MAJOR", (long) 3, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"APT_PKG_MINOR", (long) 3, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"APT_PKG_RELEASE", (long) 0, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepDepends", (long) pkgCache::DepDepends, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepPreDepends", (long) pkgCache::DepPreDepends, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepSuggests", (long) pkgCache::DepSuggests, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepRecommends", (long) pkgCache::DepRecommends, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepConflicts", (long) pkgCache::DepConflicts, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepReplaces", (long) pkgCache::DepReplaces, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepObsoletes", (long) pkgCache::DepObsoletes, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepOr", (long) pkgCache::DepOr, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepNoOp", (long) pkgCache::DepNoOp, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepLessEq", (long) pkgCache::DepLessEq, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepGreaterEq", (long) pkgCache::DepGreaterEq, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepLess", (long) pkgCache::DepLess, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepGreater", (long) pkgCache::DepGreater, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepEquals", (long) pkgCache::DepEquals, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_DepNotEquals", (long) pkgCache::DepNotEquals, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateImportant", (long) pkgCache::StateImportant, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateRequired", (long) pkgCache::StateRequired, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateStandard", (long) pkgCache::StateStandard, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateOptional", (long) pkgCache::StateOptional, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateExtra", (long) pkgCache::StateExtra, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateUnknown", (long) pkgCache::StateUnknown, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateInstall", (long) pkgCache::StateInstall, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateHold", (long) pkgCache::StateHold, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateDeInstall", (long) pkgCache::StateDeInstall, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StatePurge", (long) pkgCache::StatePurge, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateOk", (long) pkgCache::StateOk, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateReInstReq", (long) pkgCache::StateReInstReq, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateHoldInst", (long) pkgCache::StateHoldInst, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateHoldReInstReq", (long) pkgCache::StateHoldReInstReq, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateNotInstalled", (long) pkgCache::StateNotInstalled, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateUnPacked", (long) pkgCache::StateUnPacked, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateHalfConfigured", (long) pkgCache::StateHalfConfigured, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateHalfInstalled", (long) pkgCache::StateHalfInstalled, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateConfigFiles", (long) pkgCache::StateConfigFiles, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_StateInstalled", (long) pkgCache::StateInstalled, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_FlagAuto", (long) pkgCache::FlagAuto, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_FlagEssential", (long) pkgCache::FlagEssential, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_FlagImportant", (long) pkgCache::FlagImportant, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_FlagNotSource", (long) pkgCache::FlagNotSource, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCache_FlagNotAutomatic", (long) pkgCache::FlagNotAutomatic, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepNow", (long) pkgDepCache::DepNow, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepInstall", (long) pkgDepCache::DepInstall, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepCVer", (long) pkgDepCache::DepCVer, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepGNow", (long) pkgDepCache::DepGNow, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepGInstall", (long) pkgDepCache::DepGInstall, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepGCVer", (long) pkgDepCache::DepGCVer, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepNowPolicy", (long) pkgDepCache::DepNowPolicy, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepNowMin", (long) pkgDepCache::DepNowMin, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepInstPolicy", (long) pkgDepCache::DepInstPolicy, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepInstMin", (long) pkgDepCache::DepInstMin, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepCandPolicy", (long) pkgDepCache::DepCandPolicy, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_DepCandMin", (long) pkgDepCache::DepCandMin, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_AutoKept", (long) pkgDepCache::AutoKept, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_Purge", (long) pkgDepCache::Purge, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_ReInstall", (long) pkgDepCache::ReInstall, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_NowVersion", (long) pkgDepCache::NowVersion, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_InstallVersion", (long) pkgDepCache::InstallVersion, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_CandidateVersion", (long) pkgDepCache::CandidateVersion, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_ModeDelete", (long) pkgDepCache::ModeDelete, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_ModeKeep", (long) pkgDepCache::ModeKeep, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgDepCache_ModeInstall", (long) pkgDepCache::ModeInstall, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCachePkgIterator_NeedsNothing", (long) pkgCache::PkgIterator::NeedsNothing, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCachePkgIterator_NeedsUnpack", (long) pkgCache::PkgIterator::NeedsUnpack, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgCachePkgIterator_NeedsConfigure", (long) pkgCache::PkgIterator::NeedsConfigure, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgAcquireItem_StatIdle", (long) pkgAcquire::Item::StatIdle, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgAcquireItem_StatFetching", (long) pkgAcquire::Item::StatFetching, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgAcquireItem_StatDone", (long) pkgAcquire::Item::StatDone, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgAcquireItem_StatError", (long) pkgAcquire::Item::StatError, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgAcquire_Continue", (long) pkgAcquire::Continue, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgAcquire_Failed", (long) pkgAcquire::Failed, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgAcquire_Cancelled", (long) pkgAcquire::Cancelled, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgPackageManager_Completed", (long) pkgPackageManager::Completed, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgPackageManager_Failed", (long) pkgPackageManager::Failed, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"pkgPackageManager_Incomplete", (long) pkgPackageManager::Incomplete, 0, 0, 0}, +{0}}; + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) SWIG_init(void) { + static PyObject *SWIG_globals = 0; + static int typeinit = 0; + PyObject *m, *d; + int i; + if (!SWIG_globals) SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule((char *) SWIG_name, SwigMethods); + d = PyModule_GetDict(m); + + if (!typeinit) { + for (i = 0; swig_types_initial[i]; i++) { + swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); + } + typeinit = 1; + } + SWIG_InstallConstants(d,swig_const_table); + + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"_error",_wrap__error_get, _wrap__error_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgVersion",_wrap_pkgVersion_get, _wrap_pkgVersion_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgLibVersion",_wrap_pkgLibVersion_get, _wrap_pkgLibVersion_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgOS",_wrap_pkgOS_get, _wrap_pkgOS_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgCPU",_wrap_pkgCPU_get, _wrap_pkgCPU_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgSystem_GlobalList",_wrap_pkgSystem_GlobalList_get, _wrap_pkgSystem_GlobalList_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgSystem_GlobalListLen",_wrap_pkgSystem_GlobalListLen_get, _wrap_pkgSystem_GlobalListLen_set); + SWIG_addvarlink(SWIG_globals,(char*)"_system",_wrap__system_get, _wrap__system_set); + SWIG_addvarlink(SWIG_globals,(char*)"_config",_wrap__config_get, _wrap__config_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgVersioningSystem_GlobalList",_wrap_pkgVersioningSystem_GlobalList_get, _wrap_pkgVersioningSystem_GlobalList_set); + SWIG_addvarlink(SWIG_globals,(char*)"pkgVersioningSystem_GlobalListLen",_wrap_pkgVersioningSystem_GlobalListLen_get, _wrap_pkgVersioningSystem_GlobalListLen_set); +} + diff --git a/apt/python/swig-1.3.16-cxx.patch b/apt/python/swig-1.3.16-cxx.patch new file mode 100644 index 0000000..07f1ac9 --- /dev/null +++ b/apt/python/swig-1.3.16-cxx.patch @@ -0,0 +1,53 @@ + +This patch is needed if you want to recompile the SWIG wrappers. + + -- Gustavo Niemeyer + + +Index: Source/Modules1.1/lang.cxx +=================================================================== +--- Source/Modules1.1/lang.cxx ++++ Source/Modules1.1/lang.cxx 2002-11-21 00:45:46.000000000 -0200 +@@ -1457,13 +1457,19 @@ + } + } + } else { +- if (name && (Cmp(name,ClassName)) && !(Getattr(n,"template"))) { ++ String *namelast = Swig_scopename_last(name); ++ String *classlast = Swig_scopename_last(ClassName); ++ if (name && (Cmp(namelast,classlast)) && !(Getattr(n,"template"))) { + Printf(stdout,"name = '%s', ClassName='%s'\n", name, ClassName); + Swig_warning(WARN_LANG_RETURN_TYPE, input_file,line_number,"Function %s must have a return type.\n", + name); + Swig_restore(&n); ++ Delete(namelast); ++ Delete(classlast); + return SWIG_NOWRAP; + } ++ Delete(namelast); ++ Delete(classlast); + constructorHandler(n); + } + } +Index: Source/Swig/symbol.c +=================================================================== +--- Source/Swig/symbol.c ++++ Source/Swig/symbol.c 2002-11-21 00:46:03.000000000 -0200 +@@ -762,11 +762,16 @@ + } else { + String *prefix = Swig_scopename_prefix(name); + if (prefix) { +- s = symbol_lookup_qualified(name,hsym,0,0); ++ Node *pn = Swig_symbol_clookup(prefix,hsym); ++ if (pn && Strcmp(nodeType(pn),"namespace") == 0) { ++ s = symbol_lookup_qualified(name,hsym,0,0); ++ } + Delete(prefix); ++ /* + if (!s) { + return 0; + } ++ */ + } + } + } diff --git a/apt/release b/apt/release deleted file mode 100755 index 30227ed..0000000 --- a/apt/release +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -abort() { - echo "Abortado." - exit 1 -} - -trap abort 2 - -prerel=0 - -versao=55 -release=1cl - -filename=apt-0.3.19cnc$versao - -#echo "Atualizando potfiles..." -#( -#cd ~kojima/cvs/i18n/apt -#sudo -u kojima cvs update -#cp *.po ~kojima/rapt/po -#chown kojima.kojima ~kojima/rapt/po/* -#) - -today=`LC_ALL= LANG= date '+%a %b %d %Y'` - -if [ $release == 1cl -a $prerel == 0 ]; then - -if ! grep "released version 0.3.19cnc$versao" apt.spec >/dev/null; then -changelog='*'" $today Alfredo K. Kojima <kojima@conectiva.com.br>\n\ -+ apt-0.3.19cnc$versao-$release\n\ -- released version 0.3.19cnc$versao\n" -fi - -else -changelog="" -fi - -WWWDIR=/home/kojima/www/rapt/ -export CVS_RSH=ssh - -if test `hostname` != minduim; then - echo "This script is only meant for myself. Don't run it!" - exit 1 -fi - -if test $prerel == 1; then - echo "Gerando PRE versao $versao release $release" -else - echo "Gerando versao $versao release $release" -fi - -ver=`grep "#define VERSION" configure|sed -e s/"#define VERSION"//` - - -if test $ver != \"0.3.19cnc$versao\"; then - echo "Versao do configure está em $ver, atualize para $versao" - exit 1 -fi - - -echo "Criando tarball a partir do cvs" -( -cd tmp -rm -fr rapt -echo -n CVS -cvs -z3 -d kojima@cvs.conectiva.com.br:/home/cvs export -D now rapt -(cd rapt; make -f Makefile startup; make distclean) -rm -fr $filename -mv rapt $filename -tar czf $filename.tar.gz $filename -cp $filename.tar.gz /usr/src/rpm/SOURCES -) - -echo "Gerando apt.spec" - -if [ $release == 1cl -a $prerel -eq 0 ]; then - sed -e s/%changelog/"%changelog\n$changelog"/g apt.spec > tmp.spec - mv -f tmp.spec apt.spec -fi - -sed -e "s/^Version:.*/Version: 0.3.19cnc$versao/" \ - -e "s/^Release:.*/Release: $release/g" apt.spec > tmp.spec -mv -f tmp.spec apt.spec - -vim apt.spec -c /changelog - - -echo "Criando RPM" - -rpm -ba apt.spec - -if test $prerel == 1; then - echo "Prerelease pronto!" - cp /usr/src/rpm/RPMS/i386/$filename-$release* ~kojima/www - exit -fi - -./copy 0.3.19cnc$versao-$release - -echo "apt versao $versao, release $release feito!" - - -echo "Enviar announcement pra lista do apt?" -read res -if test x$res = xy; then - -mail apt-rpm@distro.conectiva.com.br -s "[ANNOUNCE] apt 0.3.19cnc$versao-$release" <<END - -I've just release apt 0.3.19cnc$versao-$release -You can download it at: - -ftp://ftp.conectiva.com/pub/conectiva/EXPERIMENTAL/apt - --- -Alfredo -END -echo "Enviado." -fi - - diff --git a/apt/rpmpriorities b/apt/rpmpriorities index c5ce4c7..700a429 100644 --- a/apt/rpmpriorities +++ b/apt/rpmpriorities @@ -1,138 +1,18 @@ -Important: - ash +Essential: + apt basesystem bash - bdflush - bzip2 - chkconfig conectiva-release - console-tools - cracklib - cracklib-dicts dev e2fsprogs - ed - etcskel filesystem fileutils - findutils - gawk - gettext - glib - glibc - grep - gzip - info + glibc-base initscripts kernel - lilo - losetup - MAKEDEV - mingetty - mkinitrd - mktemp modutils mount - ncurses pam passwd - popt - procps - psmisc - pwdb - reiserfs-utils - rootfiles rpm - sed setup - shadow-utils - sh-utils - slang - stat - SysVinit - tar - textutils - util-linux - zlib -Required: - apt - at - authconfig - cpio - cpp - crontabs - dhcp - doc-licenses - eject - file - finger - ftp - gdbm - groff - initscripts-translations - isapnptools - kbdconfig - kernel-pcmcia-cs - less - libgd - libpng - libstdc++ - libtermcap - linuxconf - linux_logo - logrotate - mailcap - man - memtest86 - mkbootdisk - mouseconfig - mtools - netkit-base - net-tools - newt - ntsysv - pciutils - portmap - pump - raidtools - readline - rmt - slocate - sysklogd - tcp_wrappers - telnet - termcap - timeconfig - tmpwatch - linuxconf-userinfo - utempter - vim-common - vim-minimal - vixie-cron - which - zip -Standard: - bind-utils - dhcpcd - diffutils - fwhois - gmp - gpm - kudzu - ncftp - nfs-utils - openssl - perl - pidentd - python - rsh - rsync - setuptool - tcsh - timeconfig - unzip - ypbind - yp-tools - zlib - - diff --git a/apt/test/CVS/Entries b/apt/test/CVS/Entries deleted file mode 100644 index 4b8b346..0000000 --- a/apt/test/CVS/Entries +++ /dev/null @@ -1,6 +0,0 @@ -/makefile/1.1.1.1/Fri Aug 10 14:04:27 2001// -/mthdcat.cc/1.1.1.1/Fri Aug 10 14:04:27 2001// -/scratch.cc/1.1.1.1/Fri Aug 10 14:04:27 2001// -/versions.lst/1.1.1.1/Fri Aug 10 14:04:27 2001// -/versiontest.cc/1.1.1.1/Fri Aug 10 14:04:28 2001// -D diff --git a/apt/test/CVS/Repository b/apt/test/CVS/Repository deleted file mode 100644 index c90cab5..0000000 --- a/apt/test/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/test diff --git a/apt/test/CVS/Root b/apt/test/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/test/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/test/conf.cc b/apt/test/conf.cc new file mode 100644 index 0000000..c441614 --- /dev/null +++ b/apt/test/conf.cc @@ -0,0 +1,35 @@ +#include <apt-pkg/configuration.h> +#include <apt-pkg/error.h> + +int main(int argc,const char *argv[]) +{ + Configuration Cnf; + + ReadConfigFile(Cnf,argv[1],true); + + // Process 'simple-key' type sections + const Configuration::Item *Top = Cnf.Tree("simple-key"); + for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) + { + Configuration Block(Top); + + string VendorID = Top->Tag; + string FingerPrint = Block.Find("Fingerprint"); + string Name = Block.Find("Name"); // Description? + + if (FingerPrint.empty() == true || Name.empty() == true) + _error->Error("Block %s is invalid",VendorID.c_str()); + + cout << VendorID << ' ' << FingerPrint << ' ' << Name << endl; + } + + // Print any errors or warnings found during parsing + if (_error->empty() == false) + { + bool Errors = _error->PendingError(); + _error->DumpErrors(); + return Errors == true?100:0; + } + + return 0; +} diff --git a/apt/test/extract-control.cc b/apt/test/extract-control.cc new file mode 100644 index 0000000..1250888 --- /dev/null +++ b/apt/test/extract-control.cc @@ -0,0 +1,40 @@ +#include <apt-pkg/debfile.h> +#include <apt-pkg/error.h> + +#include <iostream> +#include <unistd.h> + +bool ExtractMember(const char *File,const char *Member) +{ + FileFd Fd(File,FileFd::ReadOnly); + debDebFile Deb(Fd); + if(_error->PendingError() == true) + return false; + + debDebFile::MemControlExtract Extract(Member); + if (Extract.Read(Deb) == false) + return false; + + if (Extract.Control == 0) + return true; + + write(STDOUT_FILENO,Extract.Control,Extract.Length); + return true; +} + +int main(int argc, const char *argv[]) +{ + if (argc < 2) + { + cerr << "Need two arguments, a .deb and the control member" << endl; + return 100; + } + + if (ExtractMember(argv[1],argv[2]) == false) + { + _error->DumpErrors(); + return 100; + } + + return 0; +} diff --git a/apt/test/hash.cc b/apt/test/hash.cc new file mode 100644 index 0000000..5334c03 --- /dev/null +++ b/apt/test/hash.cc @@ -0,0 +1,63 @@ +#include <apt-pkg/md5.h> +#include <apt-pkg/sha1.h> +#include <apt-pkg/strutl.h> +#include <iostream> + +using namespace std; + +template <class T> void Test(const char *In,const char *Out) +{ + T Sum; + Sum.Add(In); + cout << Sum.Result().Value() << endl; + if (stringcasecmp(Sum.Result().Value(),Out) != 0) + abort(); +} + +template <class T> void TestMill(const char *Out) +{ + T Sum; + + const unsigned char As[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + unsigned Count = 1000000; + for (; Count != 0;) + { + if (Count >= 64) + { + Sum.Add(As,64); + Count -= 64; + } + else + { + Sum.Add(As,Count); + Count = 0; + } + } + + cout << Sum.Result().Value() << endl; + if (stringcasecmp(Sum.Result().Value(),Out) != 0) + abort(); +} + +int main() +{ + // From FIPS PUB 180-1 + Test<SHA1Summation>("abc","A9993E364706816ABA3E25717850C26C9CD0D89D"); + Test<SHA1Summation>("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", + "84983E441C3BD26EBAAE4AA1F95129E5E54670F1"); + TestMill<SHA1Summation>("34AA973CD4C4DAA4F61EEB2BDBAD27316534016F"); + + // MD5 tests from RFC 1321 + Test<MD5Summation>("","d41d8cd98f00b204e9800998ecf8427e"); + Test<MD5Summation>("a","0cc175b9c0f1b6a831c399e269772661"); + Test<MD5Summation>("abc","900150983cd24fb0d6963f7d28e17f72"); + Test<MD5Summation>("message digest","f96b697d7cb7938d525a2f31aaf161d0"); + Test<MD5Summation>("abcdefghijklmnopqrstuvwxyz","c3fcd3d76192e4007dfb496cca67e13b"); + Test<MD5Summation>("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "d174ab98d277d9f5a5611c2c9f419d9f"); + Test<MD5Summation>("12345678901234567890123456789012345678901234567890123456789012345678901234567890", + "57edf4a22be3c955ac49da2e2107b67a"); + return 0; +} + + diff --git a/apt/test/makefile b/apt/test/makefile index 31d67d4..9ad6233 100644 --- a/apt/test/makefile +++ b/apt/test/makefile @@ -24,12 +24,6 @@ LIB_MAKES = apt-pkg/makefile apt-inst/makefile SOURCE = scratch.cc include $(PROGRAM_H) -PROGRAM=testextract -SLIBS = -lapt-inst -lapt-pkg -LIB_MAKES = apt-pkg/makefile apt-inst/makefile -SOURCE = testextract.cc -include $(PROGRAM_H) - # Version compare tester PROGRAM=versiontest SLIBS = -lapt-pkg @@ -38,15 +32,38 @@ SOURCE = versiontest.cc include $(PROGRAM_H) # Version compare tester -PROGRAM=srcrfind -SLIBS = -lapt-pkg -LIB_MAKES = apt-pkg/makefile -SOURCE = srcrfind.cc +PROGRAM=testextract +SLIBS = -lapt-pkg -lapt-inst +LIB_MAKES = apt-pkg/makefile apt-inst/makefile +SOURCE = testextract.cc include $(PROGRAM_H) -# Control Extracter tester -PROGRAM=extractcontrol -SLIBS = -lapt-pkg -lapt-inst -ldb2 -LIB_MAKES = apt-pkg/makefile -SOURCE = extractcontrol.cc +# Program for testing the config file parser +PROGRAM=conftest +SLIBS = -lapt-pkg +SOURCE = conf.cc +include $(PROGRAM_H) + +# Program for testing the tar/deb extractor +PROGRAM=testdeb +SLIBS = -lapt-pkg -lapt-inst +SOURCE = testdeb.cc +include $(PROGRAM_H) + +# Program for testing tar extraction +PROGRAM=extract-control +SLIBS = -lapt-pkg -lapt-inst +SOURCE = extract-control.cc +include $(PROGRAM_H) + +# Program for testing hashes +PROGRAM=hash +SLIBS = -lapt-pkg +SOURCE = hash.cc +include $(PROGRAM_H) + +# Program for checking rpm versions +PROGRAM=rpmver +SLIBS = -lapt-pkg -lrpm +SOURCE = rpmver.cc include $(PROGRAM_H) diff --git a/apt/test/rpmver.cc b/apt/test/rpmver.cc new file mode 100644 index 0000000..c76c77b --- /dev/null +++ b/apt/test/rpmver.cc @@ -0,0 +1,115 @@ +#include <apt-pkg/debversion.h> +#include <rpm/rpmio.h> +#include <rpm/misc.h> +#include <stdlib.h> +#include <ctype.h> + +#define xisdigit(x) isdigit(x) +#define xisalpha(x) isalpha(x) +#define xisalnum(x) (isdigit(x) || isalpha(x)) + +int rpmvercmp(const char * a, const char * b) +{ + char oldch1, oldch2; + char * str1, * str2; + char * one, * two; + int rc; + int isnum; + + /* easy comparison to see if versions are identical */ + if (!strcmp(a, b)) return 0; + + str1 = (char *)alloca(strlen(a) + 1); + str2 = (char *)alloca(strlen(b) + 1); + + strcpy(str1, a); + strcpy(str2, b); + + one = str1; + two = str2; + + /* loop through each version segment of str1 and str2 and compare them */ + while (*one && *two) { + while (*one && !xisalnum(*one)) one++; + while (*two && !xisalnum(*two)) two++; + + str1 = one; + str2 = two; + + /* grab first completely alpha or completely numeric segment */ + /* leave one and two pointing to the start of the alpha or numeric */ + /* segment and walk str1 and str2 to end of segment */ + if (xisdigit(*str1)) { + while (*str1 && xisdigit(*str1)) str1++; + while (*str2 && xisdigit(*str2)) str2++; + isnum = 1; + } else { + while (*str1 && xisalpha(*str1)) str1++; + while (*str2 && xisalpha(*str2)) str2++; + isnum = 0; + } + + /* save character at the end of the alpha or numeric segment */ + /* so that they can be restored after the comparison */ + oldch1 = *str1; + *str1 = '\0'; + oldch2 = *str2; + *str2 = '\0'; + + /* take care of the case where the two version segments are */ + /* different types: one numeric, the other alpha (i.e. empty) */ + if (one == str1) return -1; /* arbitrary */ + if (two == str2) return 1; + + if (isnum) { + /* this used to be done by converting the digit segments */ + /* to ints using atoi() - it's changed because long */ + /* digit segments can overflow an int - this should fix that. */ + + /* throw away any leading zeros - it's a number, right? */ + while (*one == '0') one++; + while (*two == '0') two++; + + /* whichever number has more digits wins */ + if (strlen(one) > strlen(two)) return 1; + if (strlen(two) > strlen(one)) return -1; + } + + /* strcmp will return which one is greater - even if the two */ + /* segments are alpha or if they are numeric. don't return */ + /* if they are equal because there might be more segments to */ + /* compare */ + rc = strcmp(one, two); + if (rc) return rc; + + /* restore character that was replaced by null above */ + *str1 = oldch1; + one = str1; + *str2 = oldch2; + two = str2; + } + + /* this catches the case where all numeric and alpha segments have */ + /* compared identically but the segment sepparating characters were */ + /* different */ + if ((!*one) && (!*two)) return 0; + + /* whichever version still has characters left over wins */ + if (!*one) return -1; else return 1; +} + +int main(int argc,const char *argv[]) +{ + printf("%i\n",strcmp(argv[1],argv[2])); + + printf("'%s' <> '%s': ",argv[1],argv[2]); + printf("rpm: %i deb: %i\n",rpmvercmp(argv[1],argv[2]), + debVS.CmpFragment(argv[1],argv[1]+strlen(argv[1]), + argv[2],argv[2]+strlen(argv[2]))); + + printf("'%s' <> '%s': ",argv[2],argv[1]); + printf("rpm: %i deb: %i\n",rpmvercmp(argv[2],argv[1]), + debVS.CmpFragment(argv[2],argv[2]+strlen(argv[2]), + argv[1],argv[1]+strlen(argv[1]))); + return 0; +} diff --git a/apt/test/scratch.cc b/apt/test/scratch.cc index c8888a1..b526081 100644 --- a/apt/test/scratch.cc +++ b/apt/test/scratch.cc @@ -1,3 +1,4 @@ +#define APT_COMPATIBILITY 1 #include <apt-pkg/dpkgdb.h> #include <apt-pkg/debfile.h> #include <apt-pkg/error.h> diff --git a/apt/test/testdeb.cc b/apt/test/testdeb.cc new file mode 100644 index 0000000..5986621 --- /dev/null +++ b/apt/test/testdeb.cc @@ -0,0 +1,39 @@ +#include <apt-pkg/dirstream.h> +#include <apt-pkg/debfile.h> +#include <apt-pkg/error.h> +#include <apt-pkg/extracttar.h> + +class NullStream : public pkgDirStream +{ + public: + virtual bool DoItem(Item &Itm,int &Fd) {return true;}; +}; + +bool Test(const char *File) +{ + FileFd Fd(File,FileFd::ReadOnly); + debDebFile Deb(Fd); + + if (_error->PendingError() == true) + return false; + + // Get the archive member and positition the file + const ARArchive::Member *Member = Deb.GotoMember("data.tar.gz"); + if (Member == 0) + return false; + + // Extract it. + ExtractTar Tar(Deb.GetFile(),Member->Size); + NullStream Dir; + if (Tar.Go(Dir) == false) + return false; + + return true; +} + +int main(int argc, const char *argv[]) +{ + Test(argv[1]); + _error->DumpErrors(); + return 0; +} diff --git a/apt/test/testextract.cc b/apt/test/testextract.cc new file mode 100644 index 0000000..41a1970 --- /dev/null +++ b/apt/test/testextract.cc @@ -0,0 +1,96 @@ +#define APT_COMPATIBILITY 1 +#include <apt-pkg/dpkgdb.h> +#include <apt-pkg/debfile.h> +#include <apt-pkg/error.h> +#include <apt-pkg/configuration.h> +#include <apt-pkg/progress.h> +#include <apt-pkg/extract.h> +#include <apt-pkg/init.h> +#include <apt-pkg/strutl.h> + +#include <stdio.h> +#include <stdlib.h> + +bool Go(int argc,char *argv[]) +{ + // Init the database + debDpkgDB Db; + { + OpTextProgress Prog; + + if (Db.ReadyPkgCache(Prog) == false) + return false; + Prog.Done(); + + if (Db.ReadyFileList(Prog) == false) + return false; + } + + for (int I = 1; I < argc; I++) + { + const char *Fake = 0; + for (unsigned J = 0; argv[I][J] != 0; J++) + { + if (argv[I][J] != ',') + continue; + Fake = argv[I] + J + 1; + argv[I][J] = 0; + } + + FileFd F(argv[I],FileFd::ReadOnly); + debDebFile Deb(F); + + if (_error->PendingError() == true) + return false; + + if (Deb.ExtractControl(Db) == false) + return false; + cout << argv[I] << endl; + + pkgCache::VerIterator Ver = Deb.MergeControl(Db); + if (Ver.end() == true) + return false; + + cout << Ver.ParentPkg().Name() << ' ' << Ver.VerStr() << endl; + + pkgExtract Extract(Db.GetFLCache(),Ver); + + if (Fake != 0) + { + pkgExtract::Item Itm; + memset(&Itm,0,sizeof(Itm)); + FILE *F = fopen(Fake,"r"); + while (feof(F) == 0) + { + char Line[300]; + fgets(Line,sizeof(Line),F); + Itm.Name = _strstrip(Line); + Itm.Type = pkgDirStream::Item::File; + if (Line[strlen(Line)-1] == '/') + Itm.Type = pkgDirStream::Item::Directory; + + int Fd; + if (Extract.DoItem(Itm,Fd) == false) + return false; + } + } + else + if (Deb.ExtractArchive(Extract) == false) + return false; + } + return true; +} + +int main(int argc,char *argv[]) +{ + pkgInitialize(*_config); + _config->Set("Dir::State::status","/tmp/testing/status"); + + Go(argc,argv); + + if (_error->PendingError() == true) + { + _error->DumpErrors(); + return 0; + } +} diff --git a/apt/test/uri.cc b/apt/test/uri.cc new file mode 100644 index 0000000..ae9dc9d --- /dev/null +++ b/apt/test/uri.cc @@ -0,0 +1,34 @@ +#include <apt-pkg/strutl.h> +#include <stdio.h> + +void Test(const char *Foo) +{ + URI U(Foo); + + printf("%s a='%s' u='%s' p='%s' port='%u'\n h='%s' p='%s'\n", + Foo,U.Access.c_str(),U.User.c_str(),U.Password.c_str(), + U.Port,U.Host.c_str(),U.Path.c_str()); +} + +int main() +{ + // Basic stuff + Test("http://www.debian.org:90/temp/test"); + Test("http://jgg:foo@ualberta.ca/blah"); + Test("file:/usr/bin/foo"); + Test("cdrom:Moo Cow Rom:/debian"); + Test("gzip:./bar/cow"); + + // RFC 2732 stuff + Test("http://[1080::8:800:200C:417A]/foo"); + Test("http://[::FFFF:129.144.52.38]:80/index.html"); + Test("http://[::FFFF:129.144.52.38:]:80/index.html"); + Test("http://[::FFFF:129.144.52.38:]/index.html"); + + /* My Evil Corruption of RFC 2732 to handle CDROM names! Fun for + the whole family! */ + Test("cdrom:[The Debian 1.2 disk, 1/2 R1:6]/debian/"); + Test("cdrom:Foo Bar Cow/debian/"); + + Test("ftp:ftp.fr.debian.org/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb"); +} diff --git a/apt/test/versiontest.cc b/apt/test/versiontest.cc index 1e7d82b..8683918 100644 --- a/apt/test/versiontest.cc +++ b/apt/test/versiontest.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: versiontest.cc,v 1.1.1.1 2000/08/10 12:42:39 kojima Exp $ +// $Id: versiontest.cc,v 1.2 2002/07/25 18:07:19 niemeyer Exp $ /* ###################################################################### Version Test - Simple program to run through a file and comare versions. @@ -14,13 +14,14 @@ ##################################################################### */ /*}}}*/ +#define APT_COMPATIBILITY 1 #include <system.h> #include <apt-pkg/error.h> #include <apt-pkg/version.h> -#include <iostream.h> -#include <fstream.h> +#include <iostream> +#include <fstream> -static int verrevcmp(const char *val, const char *ref) + static int verrevcmp(const char *val, const char *ref) { int vc, rc; long vl, rl; diff --git a/apt/tools/CVS/Entries b/apt/tools/CVS/Entries deleted file mode 100644 index 8d0dee8..0000000 --- a/apt/tools/CVS/Entries +++ /dev/null @@ -1,13 +0,0 @@ -/cached_md5.h/1.1/Tue Aug 7 20:46:03 2001// -/dumprpmdb.c/1.1.1.1/Thu Aug 10 12:42:39 2000// -/hashtable.c/1.1.1.1/Thu Aug 10 12:42:39 2000// -/hashtable.h/1.1.1.1/Thu Aug 10 12:42:39 2000// -/hdlist2pkglist.cc/1.3/Thu Jul 12 21:47:33 2001// -/mkpackages.c/1.4/Thu Sep 28 21:51:57 2000// -/mkstatus.c/1.1.1.1/Thu Aug 10 12:42:39 2000// -/Makefile/1.13/Tue Nov 13 14:24:16 2001// -/cached_md5.cc/1.2/Fri Nov 16 01:13:08 2001// -/genbasedir/1.21/Wed Mar 6 17:17:13 2002// -/genpkglist.cc/1.17/Wed Mar 6 17:17:13 2002// -/gensrclist.cc/1.11/Wed Mar 6 17:17:13 2002// -D diff --git a/apt/tools/CVS/Repository b/apt/tools/CVS/Repository deleted file mode 100644 index b142e5b..0000000 --- a/apt/tools/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -rapt/tools diff --git a/apt/tools/CVS/Root b/apt/tools/CVS/Root deleted file mode 100644 index b27282c..0000000 --- a/apt/tools/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.conectiva.com.br:/home/cvs diff --git a/apt/tools/cached_md5.cc b/apt/tools/cached_md5.cc index 55a2ffc..4df228b 100644 --- a/apt/tools/cached_md5.cc +++ b/apt/tools/cached_md5.cc @@ -1,37 +1,5 @@ /* - * $Id: cached_md5.cc,v 1.2 2001/11/13 17:32:08 kojima Exp $ - * - * $Log: cached_md5.cc,v $ - * Revision 1.2 2001/11/13 17:32:08 kojima - * Patches from Dmitry Levin <ldv@alt-linux.org> - * apt-0.3.19cnc52-configure.patch -- patch for configure to add Russian - * translation and better support of - * RPM4's db3 usage. - * apt-0.3.19cnc52-i18n.patch -- i18n patch. All APT messages now can be - * localized. - * apt-0.3.19cnc52-replace-support.patch - * -- support for Replace option. It is - * better detection whether package is truly - * removed or is going to be replaced by - * package with different name. - * Patch from Ivan Zakharyashev: - * apt-cdrom.newfix_imz.patch -- Fixes apt-cdrom to better manage - * repository search when CD has both RPMS - * and SRPMS. - * Alexander Bokovoy <ab@avilink.net>: - * apt-gpg-pubring.patch -- uses --homedir instead of --keyring - * option to GPG. It is generally better - * because you also can specify GPG - * options in - * ${Apt::GPG::PubringPath}/options - * apt-ru.po -- updated Russian translation for APT - * (Dmitry Levin and me). - * - * Revision 1.1 2001/08/07 20:46:03 kojima - * Alexander Bokovoy <a.bokovoy@sam-solutions.net>'s patch for cleaning - * up genpkglist - * - * + * $Id: cached_md5.cc,v 1.4 2003/01/29 13:47:31 niemeyer Exp $ */ #include <alloca.h> #include <ctype.h> @@ -49,101 +17,84 @@ #include <apt-pkg/error.h> #include <apt-pkg/tagfile.h> -#include <apt-pkg/rpminit.h> +#include <apt-pkg/rpmhandler.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/md5.h> -// from rpmlib -extern "C" { - extern int mdfile( const char *fn, unsigned char *digest ); -}; +#include <config.h> -extern const char *__progname; - -CachedMD5::CachedMD5( string DirName ) +CachedMD5::CachedMD5(string DirName, string Domain) { - string fname = DirName; - for ( string::iterator i = fname.begin(); i != fname.end(); ++i ) - if ( '/' == *i ) - *i = '_'; + string fname = DirName; + for (string::iterator i = fname.begin(); i != fname.end(); ++i) + if ('/' == *i) + *i = '_'; + CacheFileName = _config->FindDir("Dir::Cache", "/var/cache/apt") + '/' + + Domain + '/' + fname + ".md5cache"; - filename = _config->FindDir( "Dir::Cache", "/var/cache/apt" ) + '/' + - __progname + '/' + - fname + ".md5cache"; + FILE *f = fopen(CacheFileName.c_str(), "r"); + if (!f) + return; - FILE *f = fopen( filename.c_str(), "r" ); - if (!f) { - return; - } + while (1) + { + char buf[BUFSIZ]; + if (!fgets(buf, sizeof(buf), f)) + break; + char *p1 = strchr(buf, ' '); + assert(p1); - while (1) { - string file; - FileData data; - char buf[BUFSIZ]; + string File; + File = string(buf, p1++); + char *p2 = strchr(p1, ' '); + assert(p2); + + FileData Data; + Data.MD5 = string(p1, p2++); + Data.TimeStamp = atol(p2); + MD5Table[File] = Data; + } - if ( !fgets(buf, sizeof(buf), f) ) - break; - - char *p = strchr( buf, ' ' ); - assert(p); - - file = string( buf, p++ ); - - char *pp = strchr( p, ' ' ); - assert(p); - data.md5 = string( p, pp++ ); - - data.timestamp = atol( pp ); - - md5table[file] = data; - } - - fclose(f); + fclose(f); } CachedMD5::~CachedMD5() { - FILE *f = fopen( filename.c_str(), "w+" ); - if (!f) - { - // probably running as != root and not a real problem - - //cerr << __progname << ": could not open file " << - //filename << " for writing:" << strerror(errno) << endl; - } else - { - for ( map<string,FileData>::const_iterator iter = md5table.begin(); - iter != md5table.end(); - iter++ ) - { - string file = (*iter).first; - const FileData &data = (*iter).second; - - fprintf( f, "%s %s %lu\n", - file.c_str(), - data.md5.c_str(), - data.timestamp ); - } - fclose(f); - } + FILE *f = fopen(CacheFileName.c_str(), "w+"); + if (f) + { + for (map<string,FileData>::const_iterator I = MD5Table.begin(); + I != MD5Table.end(); I++ ) + { + const string &File = (*I).first; + const FileData &Data = (*I).second; + fprintf(f, "%s %s %lu\n", + File.c_str(), Data.MD5.c_str(), Data.TimeStamp ); + } + fclose(f); + } } - -void CachedMD5::MD5ForFile( string FileName, time_t timestamp, - unsigned char *buf) +void CachedMD5::MD5ForFile(string FileName, time_t TimeStamp, char *buf) { - if ( md5table.find(FileName) != md5table.end() - && timestamp == md5table[FileName].timestamp ) - { - strcpy( (char*)buf, md5table[FileName].md5.c_str() ); - return; - } - - FileData data; - - mdfile( FileName.c_str(), buf ); - data.md5 = string( (char*)buf ); - data.timestamp = timestamp; - - md5table[FileName] = data; + if (MD5Table.find(FileName) != MD5Table.end() + && TimeStamp == MD5Table[FileName].TimeStamp ) + { + strcpy(buf, MD5Table[FileName].MD5.c_str()); + } + else + { + MD5Summation MD5; + FileFd File(FileName, FileFd::ReadOnly); + MD5.AddFD(File.Fd(), File.Size()); + File.Close(); + FileData Data; + Data.MD5 = MD5.Result().Value(); + Data.TimeStamp = TimeStamp; + MD5Table[FileName] = Data; + strcpy(buf, Data.MD5.c_str()); + } } + +// vim:sts=3:sw=3 diff --git a/apt/tools/cached_md5.h b/apt/tools/cached_md5.h index f1d06a1..a86ebb0 100644 --- a/apt/tools/cached_md5.h +++ b/apt/tools/cached_md5.h @@ -1,7 +1,30 @@ /* - * $Id: cached_md5.h,v 1.1 2001/08/07 20:46:03 kojima Exp $ + * $Id: cached_md5.h,v 1.4 2003/01/29 13:47:31 niemeyer Exp $ * * $Log: cached_md5.h,v $ + * Revision 1.4 2003/01/29 13:47:31 niemeyer + * Patch by Dmitry V. Levin <ldv@altlinux.org> + * + * * tools/cached_md5.h(CachedMD5::CachedMD5): + * Add additional argument (Domain). + * * tools/cached_md5.cc(CachedMD5::CachedMD5): + * Use passed argument (Domain) instead of __progname. + * * tools/genpkglist.cc(main): Pass additional argument to CachedMD5. + * * tools/gensrclist.cc(main): Likewise. + * + * CachedMD5 constructor uses __progname which is wrong in some cases (e.g. + * genbasedir renamed to smth else). I'm guilty of introducing this code in + * apt-rpm, so I suggest to fix it. + * + * Revision 1.3 2002/07/26 23:22:27 niemeyer + * Use APT's MD5 implementation. + * + * Revision 1.2 2002/07/26 17:39:28 niemeyer + * Changes for GCC 3.1 and RPM 4.1 support (merged patch from Enrico Scholz). + * + * Revision 1.1 2002/07/23 17:54:53 niemeyer + * Added to CVS. + * * Revision 1.1 2001/08/07 20:46:03 kojima * Alexander Bokovoy <a.bokovoy@sam-solutions.net>'s patch for cleaning * up genpkglist @@ -16,23 +39,26 @@ #include <string> #include <map> +using namespace std; + class CachedMD5 { - string filename; + string CacheFileName; + struct FileData + { + string MD5; + time_t TimeStamp; + }; + map<string, FileData> MD5Table; - struct FileData - { - string md5; - time_t timestamp; - }; + public: - map<string, FileData> md5table; + void MD5ForFile(string FileName, time_t TimeStamp, char *buf); -public: - void MD5ForFile( string FileName, time_t timestamp, unsigned char *buf ); - - CachedMD5( string DirName ); - ~CachedMD5(); + CachedMD5(string DirName, string Domain); + ~CachedMD5(); }; #endif /* __CACHED_MD5_H__ */ + +// vim:sts=3:sw=3 diff --git a/apt/tools/dumprpmdb.c b/apt/tools/dumprpmdb.c index 7dcc3d5..0971b15 100644 --- a/apt/tools/dumprpmdb.c +++ b/apt/tools/dumprpmdb.c @@ -1,10 +1,7 @@ - #include <stdio.h> #include <fcntl.h> #include <rpm/rpmlib.h> - - int main() { rpmdb db; diff --git a/apt/tools/genbasedir b/apt/tools/genbasedir index 90031d8..64f1f41 100755 --- a/apt/tools/genbasedir +++ b/apt/tools/genbasedir @@ -1,93 +1,59 @@ #!/bin/sh # -# $Id: genbasedir,v 1.21 2001/12/12 14:50:43 kojima Exp $ +# $Id: genbasedir,v 1.6 2002/09/04 22:48:37 niemeyer Exp $ # # This script generates the contents of the base/ directory, by creating # the pkglists and the hash file. Update the components directory to contain # the components of your repository. # -# $Log: genbasedir,v $ -# Revision 1.21 2001/12/12 14:50:43 kojima -# fixed genbasedir for --flat and relative --topdir specifications -# fixed --flat in gensrclist -# -# Revision 1.20 2001/11/30 20:40:27 kojima -# patched --progress stuff from stelian -# -# Revision 1.19 2001/11/09 21:13:25 kojima -# * Skips correctly over empty package directories -# -# * Adds the --bz2only argument which makes genbasedir -# to generate only the .bz2 compressed versions of pkglist -# and srclist (space gain...) -# -# * Doesn't change the timestamps on pkglists/srclists if -# the contents are not modified (making possible for example -# to make several consecutive runs of genbasedir without -# having the apt clients download the indexes again and again). -# -# * Some minor cleanups (remove the temporary files in /tmp -# at the end of the script etc). -# -# Revision 1.18 2001/03/11 14:36:28 claudio -# Added appropriate message at the end of script. -# -# Revision 1.17 2001/01/04 21:26:14 kojima -# fixed some mem leaks -# -# Revision 1.16 2000/12/10 13:42:58 claudio -# Added linefeeds to usage message, replaced spaces for tabs -# -# Revision 1.15 2000/11/08 21:30:00 kojima -# fixed bug in release retrieval code -# -# Revision 1.14 2000/11/08 20:40:23 kojima -# fixed compat prob with bash1 -# -# Revision 1.13 2000/11/06 12:53:49 kojima -# fixed compile errors for RedHat 6.x (with gcc -Wall -Werror) -# -# Revision 1.12 2000/10/31 20:30:42 kojima -# some updates -# -# Revision 1.11 2000/10/30 16:41:18 kojima -# fixed genbasedir -# -# Revision 1.9 2000/10/29 21:49:54 kojima -# fixed gensrclist/pkglist bug -# -# Revision 1.8 2000/10/25 17:17:35 kojima -# *** empty log message *** -# -# Revision 1.7 2000/10/25 15:48:35 kojima -# *** empty log message *** -# -# Revision 1.6 2000/10/23 14:31:57 kojima -# *** empty log message *** -# -# Revision 1.5 2000/10/19 19:32:34 claudio -# Language setting to generate a consistent pkglist. -# usage="\ -Usage: genbasedir [<options>] <distribution> <comp1> [<comp2> ... <compN>]\n\ +Usage: genbasedir [<options>] <topdir> [<comp1> [<comp2> ...]]\n\ + Options:\n\ - -s, --sign Generate and sign hashfile\n\ - --hashonly Do hashfile stuff only\n\ - --listonly Generate pkglists/srclists and quit\n\ - --bz2only Generate only compressed lists\n\ - --topdir=dir Top directory of repository\n\ - --progress Show progress bars for genpkglist/gensrclist\n\ - --updateinfo=file Update information file\n" + -s, --sign Generate and sign hashfile\n\ + --default-key=ID Use ID as gnupg secret key\n\ + --hashonly Do hash stuff only\n\ + --listonly Generate pkglists/srclists and quit\n\ + --partial Update just some of the already existent components\n\ + --oldhashfile Enable generation of old hashfile\n\ + --bz2only Generate only compressed lists\n\ + --progress Show progress bars for genpkglist/gensrclist\n\ + --updateinfo=FILE Update information file\n\ + --flat Use flat repository, where SRPMS and RPMS are in\n\ + the topdir (SRPMS are usually in 'topdir/..')\n\ +\n\ +Examples:\n\ +\n\ + genbasedir /home/ftp/pub/conectiva\n\ + genbasedir /home/ftp/pub/conectiva main extra devel\n\ +" + +getsize() +{ + tmp=`wc -c $1` + echo $tmp|cut -f1 -d\ +} + +phashstuff() +{ + size=`getsize $1` + md5=`md5sum $1|cut -f1 -d\ ` + echo " $md5 $size $2" +} basedir=. signature=0 listonly=0 hashonly=0 -updateinfo="" +partial=0 +oldhashfile=0 mapi=0 bz2only=0 +updateinfo= progress= +flat= +defaultkey= # bloat is necessary for non-Conectiva distros, at least RH, # because they use file dependencies with a non-predictable @@ -95,17 +61,12 @@ progress= # never appear in dependencies. bloat="" - -# flat is for repositories where RPMS and SRPMS are kept in the -# same directory level. -flat="" - while test $# -gt 0 ; do - case "${1}" in + case "$1" in -h | --help) - echo -e "${usage}" + echo -e "$usage" exit 0 - ;; + ;; --mapi) # hee hee hee.. mapi=1 @@ -116,96 +77,115 @@ while test $# -gt 0 ; do --hashonly) hashonly=1 ;; + --partial) + partial=1 + ;; + --oldhashfile) + oldhashfile=1 + ;; --bz2only) bz2only=1 - ;; + ;; --updateinfo=*) - updateinfo=${1} + updateinfo=$1 ;; --bloat) - bloat="--bloat" - ;; - --flat) - flat="--flat" + bloat="--bloat" ;; --topdir=*) - topdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" - if [ ! -d $topdir ]; then - echo "Invalid top directory for distribution ${topdir}" 1>&2 - exit 1 - fi - ;; + # Legacy + _topdir=$1 + ;; --progress) progress="--progress" - ;; + ;; + --flat) + flat="--flat" + ;; -s | --sign) - signature=1; + signature=1 + ;; + --default-key=*) + defaultkey="\"$1\"" ;; -*) - echo -e "${usage}" 1>&2 + echo -e "$usage" 1>&2 exit 1 - ;; + ;; *) break - ;; + ;; esac shift done -distro=${1} +if [ -z "$*" ]; then + echo -e "$usage" 1>&2 + exit 1 +fi + +topdir=`echo $topdir_/$1|tr -s /` shift components=$* -if [ -z "$components" ]; then - echo -e "${usage}" - exit 0 +basedir_=base +basedir=`echo $topdir/$basedir_|tr -s /` + +pkglist_=$basedir_/pkglist +srclist_=$basedir_/srclist +release_=$basedir_/release +pkglist=$basedir/pkglist +srclist=$basedir/srclist +release=$basedir/release + +if [ ! -d "$topdir" ]; then + echo "error: invalid topdir: $topdir" 1>&2 + exit 1 fi +if [ ! -d "$basedir" ]; then + echo -n "Creating base directory... " + mkdir $basedir + echo "done" +fi -getsize() { - tmp=`wc -c $1` - echo $tmp|cut -f1 -d\ -} - - -phashstuff() { - size=`getsize ${1}` - md5=`md5sum ${1}|cut -f1 -d\ ` - - echo " $md5 $size ${2}" -} - - - -cd ${topdir} - -# this will fix the path if it was relative -topdir=`pwd` - -basedir_=`echo ${distro}/base|tr -s /` -basedir=${topdir}/$basedir_ - - -# release file -# ------------ - -#for comp in ${components}; do -# true > ${basedir}/release.$comp -# -#done +if [ -z "$components" ]; then + comps=$basedir/.components.tmp + rm -f $comps; touch $comps + for dir in $topdir/RPMS.* $topdir/SRPMS.* $topdir/../SRPMS.*; do + if [ -d $dir ]; then + echo $dir | sed 's/.*\.//' >> $comps + fi + done + components=`cat $comps|sort|uniq` + components=`echo $components` # eat newlines + rm -f $comps +fi +if [ -z "$components" ]; then + echo "error: no components found" 2>&1 + exit 1 +else + echo "Components: $components" +fi if [ $hashonly -ne 1 ]; then + # package lists # ------------- -true > /tmp/srcidx.$$ +rm -f /tmp/srcidx.$$ +touch /tmp/srcidx.$$ -for comp in ${components}; do - echo -n "${comp}: " +echo -n "Processing pkglists..." - echo -n "pkglist " +for comp in $components; do + if [ ! -d $topdir/RPMS.$comp ]; then + continue + fi + + echo -n " $comp" # Save older pkglist if [ -f $basedir/pkglist.$comp ]; then @@ -213,14 +193,9 @@ for comp in ${components}; do fi if test x$updateinfo = x; then - (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ $topdir/${distro} $comp) + (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ $topdir $comp) else - (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ --info $updateinfo $topdir/${distro} $comp) - fi - if [ $? -ne 0 ]; then - echo - echo "Error executing genpkglist." - exit 1 + (cd $basedir; genpkglist $progress $bloat --index /tmp/srcidx.$comp.$$ --info $updateinfo $topdir $comp) fi if [ -f $basedir/pkglist.$comp ]; then @@ -246,47 +221,40 @@ for comp in ${components}; do fi fi - if [ $bz2only -eq 1 ]; then - rm -f $basedir/pkglist.$comp - fi - rm -f $basedir/pkglist.$comp.old rm -f $basedir/pkglist.$comp.bz2.old fi cat /tmp/srcidx.$comp.$$ >> /tmp/srcidx.$$ - echo "done" done +echo " done" -for comp in ${components}; do - echo -n "${comp}: " +echo -n "Processing srclists..." - echo -n "srclist " +for comp in $components; do + if [ -z "$flat" ]; then + srctopdir=`cd $topdir/..; pwd` + else + srctopdir=`cd $topdir; pwd` + fi + + if [ ! -d $srctopdir/SRPMS.$comp ]; then + continue + fi + + echo -n " $comp" # Save older srclist if [ -f $basedir/srclist.$comp ]; then mv -f $basedir/srclist.$comp $basedir/srclist.$comp.old fi - - sfix="/.." - if test x$flat != x; then - sfix="" - fi - if [ $mapi -ne 0 ]; then - (cd $basedir; gensrclist $progress $flat --mapi $topdir/${distro}${sfix} $comp /tmp/srcidx.$comp.$$) + (cd $basedir; gensrclist $progress $flat --mapi $srctopdir $comp /tmp/srcidx.$comp.$$) else - (cd $basedir; gensrclist $progress $flat $topdir/${distro}${sfix} $comp /tmp/srcidx.$$) + (cd $basedir; gensrclist $progress $flat $srctopdir $comp /tmp/srcidx.$$) fi - if [ $? -ne 0 ]; then - echo - echo "Error executing gensrclist." - exit 1 - fi - - if [ -f $basedir/srclist.$comp ]; then @@ -311,100 +279,219 @@ for comp in ${components}; do fi fi - if [ $bz2only -eq 1 ]; then - rm -f $basedir/srclist.$comp - fi - rm -f $basedir/srclist.$comp.old rm -f $basedir/srclist.$comp.bz2.old fi rm -f /tmp/srcidx.$comp.$$ - - echo "done" done +echo " done" fi rm -f /tmp/srcidx.$$ -if [ $listonly -eq 0 ]; then - # Save older hashfile - if [ -f $basedir/hashfile ]; then - mv -f $basedir/hashfile $basedir/hashfile.old - fi - hf=${basedir}/hashfile - true > $hf +if [ $listonly -ne 0 ]; then + if [ $bz2only -eq 1 -a -f $pkglist.$comp ]; then + rm -f $pkglist.$comp + fi + if [ $bz2only -eq 1 -a -f $srclist.$comp ]; then + rm -f $srclist.$comp + fi else - hf=/dev/null + # component release file + # ---------------------- + + echo -n "Creating component releases..." + for comp in $components; do + if [ ! -f $release.$comp ]; then + echo -n " $comp" + echo "Archive: Unknown" >> $release.$comp + echo "Component: $comp" >> $release.$comp + echo "Version: Unknown" >> $release.$comp + echo "Origin: Unknown" >> $release.$comp + echo "Label: Unknown" >> $release.$comp + echo "Architecture: unknown" >> $release.$comp + echo "NotAutomatic: false" >> $release.$comp + fi + done + echo " done" + + # release file + # ------------ + + if [ -f $release ]; then + mv -f $release $release.old + if [ $partial -eq 0 ]; then + echo -n "Updating global release file... " + sed -n -e "/^MD5Sum:/q" \ + -e "s/^Date:.*\$/Date: `date -R`/" \ + -e "s/^Components:.*\$/Components: $components/" \ + -e "p" $release.old > $release + echo "MD5Sum:" >> $release + else + echo -n "Partially updating global release file... " + sed -n -e "/^\$/q" \ + -e "s/^Date:.*\$/Date: `date -R`/" \ + -e "p" $release.old > $release.pre + for comp in $components; do + sed -e "\#^ .* $pkglist_.$comp\(.bz2\)\?\$#d" \ + -e "\#^ .* $srclist_.$comp\(.bz2\)\?\$#d" \ + -e "\#^ .* $release_.$comp\(.bz2\)\?\$#d" \ + -e "s/^\(Components:.*\) $comp\(.*\)\$/\1\2/" \ + $release.pre > $release.tmp + mv -f $release.tmp $release.pre + done + sed -e "s/^\(Components:.*\)\$/\1 $components/" \ + $release.pre > $release + rm -f $release.pre + fi + echo "done" + else + echo -n "Creating global release file... " + echo "Origin: Unknown" >> $release + echo "Label: Unknown" >> $release + echo "Suite: Unknown" >> $release + echo "Codename: Unknown" >> $release + echo "Date: `date -R`" >> $release + echo "Architectures: unknown" >> $release + echo "Components: $components" >> $release + echo "Description: Not available" >> $release + echo "MD5Sum:" >> $release + echo "done" + fi + + echo -n "Appending MD5Sum..." + + for comp in $components; do + echo -n " $comp" + if [ -f $pkglist.$comp ]; then + phashstuff $pkglist.$comp $pkglist_.$comp >> $release + if [ $bz2only -eq 1 ]; then + rm -f $pkglist.$comp + fi + fi + if [ -f $srclist.$comp ]; then + phashstuff $srclist.$comp $srclist_.$comp >> $release + if [ $bz2only -eq 1 ]; then + rm -f $srclist.$comp + fi + fi + if [ -f $pkglist.$comp.bz2 ]; then + phashstuff $pkglist.$comp.bz2 $pkglist_.$comp.bz2 >> $release + fi + if [ -f $srclist.$comp.bz2 ]; then + phashstuff $srclist.$comp.bz2 $srclist_.$comp.bz2 >> $release + fi + if [ -f $release.$comp ]; then + phashstuff $release.$comp $release_.$comp >> $release + fi + done + echo " done" + + echo >> $release + + if [ $signature -ne 0 ]; then + # Use eval because $defaultkey may contain spaces + eval gpg --sign -armour --detach-sign --yes --quiet $defaultkey $release + cat $release.asc >> $release + rm -f $release.asc + fi + + # Compare with older release + if [ -f $release.old ]; then + if cmp -s $release.old $release; then + mv -f $release.old $release + fi + rm -f $release.old + fi fi -echo "MD5SUM:" >> $hf -pkglist_=${basedir_}/pkglist -srclist_=${basedir_}/srclist -release_=${basedir_}/release -pkglist=${basedir}/pkglist -srclist=${basedir}/srclist -release=${basedir}/release +# old hashfile +# ------------ -for comp in ${components}; do - echo -n "${comp}: " +if [ $oldhashfile -ne 0 -a $listonly -eq 0 ]; then + # Save older hashfile + hf=$basedir/hashfile + if [ -f $hf ]; then + mv -f $hf $hf.old + if [ $partial -eq 0 ]; then + echo -n "Updating legacy hashfile... " + echo "MD5SUM:" > $hf + else + echo -n "Partially updating legacy hashfile file... " + sed -n -e "/^\$/q;p" $hf.old > $hf.pre + for comp in $components; do + sed -e "\#^ .* $pkglist_.$comp\(.bz2\)\?\$#d" \ + -e "\#^ .* $srclist_.$comp\(.bz2\)\?\$#d" \ + -e "\#^ .* $release_.$comp\(.bz2\)\?\$#d" \ + $hf.pre > $hf.tmp + mv -f $hf.tmp $hf.pre + done + mv -f $hf.pre $hf + fi + else + echo -n "Creating legacy hashfile... " + echo "MD5SUM:" > $hf + fi + echo "done" - echo -n "hashfile " - if [ -f ${pkglist}.$comp ]; then - phashstuff ${pkglist}.$comp ${pkglist_}.$comp >> $hf - fi - if [ -f ${srclist}.$comp ]; then - phashstuff ${srclist}.$comp ${srclist_}.$comp >> $hf - fi + echo -n "Appending MD5Sum..." - if [ -f ${pkglist}.$comp.bz2 ]; then - phashstuff ${pkglist}.$comp.bz2 ${pkglist_}.$comp.bz2 >> $hf - fi - if [ -f ${srclist}.$comp.bz2 ]; then - phashstuff ${srclist}.$comp.bz2 ${srclist_}.$comp.bz2 >> $hf - fi + for comp in $components; do + echo -n " $comp" - if [ -f ${release}.$comp ]; then - phashstuff ${release}.$comp ${release_}.$comp >> $hf - fi + if [ -f $pkglist.$comp ]; then + phashstuff $pkglist.$comp $pkglist_.$comp >> $hf + fi + if [ -f $srclist.$comp ]; then + phashstuff $srclist.$comp $srclist_.$comp >> $hf + fi + if [ -f $pkglist.$comp.bz2 ]; then + phashstuff $pkglist.$comp.bz2 $pkglist_.$comp.bz2 >> $hf + fi + if [ -f $srclist.$comp.bz2 ]; then + phashstuff $srclist.$comp.bz2 $srclist_.$comp.bz2 >> $hf + fi + if [ -f $release.$comp ]; then + phashstuff $release.$comp $release_.$comp >> $hf + fi + done + echo " done" - echo "done" -done + echo >> $hf -echo >> $hf + # Compare with older hashfile. + if [ -f $basedir/hashfile.old ]; then + if cmp -s $basedir/hashfile.old $basedir/hashfile; then + mv -f $basedir/hashfile.old $basedir/hashfile + fi + fi -if [ $listonly -eq 0 ]; then - # Compare with older hashfile. - if [ -f $basedir/hashfile.old ]; then - if cmp -s $basedir/hashfile.old $basedir/hashfile; then - mv -f $basedir/hashfile.old $basedir/hashfile - fi - fi + if [ $signature -ne 0 ]; then + + # Save older hashfile.gpg + if [ -f $basedir/hashfile.gpg ]; then + mv -f $basedir/hashfile.gpg $basedir/hashfile.gpg.old + fi + + # Use eval because $defaultkey may contain spaces + eval gpg --sign --armour --yes --quiet $defaultkey $basedir/hashfile + mv -f $basedir/hashfile.asc $basedir/hashfile.gpg + + # Compare with older hashfile.gpg + if [ -f $basedir/hashfile.gpg.old ]; then + if cmp -s $basedir/hashfile.gpg.old $basedir/hashfile.gpg; then + mv -f $basedir/hashfile.gpg.old $basedir/hashfile.gpg + fi + fi + fi + + rm -f $basedir/hashfile.old + rm -f $basedir/hashfile.gpg.old fi -if [ $signature -ne 0 -a $listonly -eq 0 ]; then - - # Save older hashfile.gpg - if [ -f $basedir/hashfile.gpg ]; then - mv -f $basedir/hashfile.gpg $basedir/hashfile.gpg.old - fi - - gpg -armour -qs --yes $basedir/hashfile - mv -f $basedir/hashfile.asc $basedir/hashfile.gpg - rm -f $basedir/hashfile - - # Compare with older hashfile.gpg - if [ -f $basedir/hashfile.gpg.old ]; then - if cmp -s $basedir/hashfile.gpg.old $basedir/hashfile.gpg; then - mv -f $basedir/hashfile.gpg.old $basedir/hashfile.gpg - fi - fi -fi - -rm -f $basedir/hashfile.old -rm -f $basedir/hashfile.gpg.old - -echo "All your base are belong to us !!" +echo "All your base are belong to us!!!" +# vim:ts=4:sw=4 diff --git a/apt/tools/genpkglist.cc b/apt/tools/genpkglist.cc index 301f5f6..46e0a10 100644 --- a/apt/tools/genpkglist.cc +++ b/apt/tools/genpkglist.cc @@ -1,64 +1,5 @@ /* - * $Id: genpkglist.cc,v 1.17 2001/11/30 20:40:27 kojima Exp $ - * - * $Log: genpkglist.cc,v $ - * Revision 1.17 2001/11/30 20:40:27 kojima - * patched --progress stuff from stelian - * - * Revision 1.16 2001/11/09 21:13:08 kojima - * * Corrects the use of 'scandir' and makes genpkglist behave - * correctly when it finds empty RPMS directories (instead of - * dumping core). - * - * * Better package progression indicator. - * - * Revision 1.15 2001/08/07 20:46:03 kojima - * Alexander Bokovoy <a.bokovoy@sam-solutions.net>'s patch for cleaning - * up genpkglist - * - * Revision 1.14 2001/07/12 21:47:33 kojima - * ignore duplicated version/diff deps packages - * new release (cnc51) - * - * Revision 1.13 2001/06/05 12:26:25 kojima - * added fileflags tag to pkglist - * - * Revision 1.12 2001/01/04 21:26:14 kojima - * fixed some mem leaks - * - * Revision 1.11 2000/11/30 18:31:55 kojima - * removed kluges in filelist stripper and added a --bloat flag - * - * Revision 1.10 2000/11/29 20:13:26 kojima - * added lib to filelist - * - * Revision 1.9 2000/11/29 19:48:16 kojima - * include /etc files in list of files in pkglist - * - * Revision 1.8 2000/11/06 12:53:49 kojima - * fixed compile errors for RedHat 6.x (with gcc -Wall -Werror) - * - * Revision 1.7 2000/11/01 21:32:28 kojima - * added manpage - * - * Revision 1.5 2000/10/31 20:30:42 kojima - * some updates - * - * Revision 1.4 2000/10/29 21:49:54 kojima - * fixed gensrclist/pkglist bug - * - * Revision 1.3 2000/10/29 20:25:10 kojima - * added support for source download - * - * Revision 1.2 2000/10/26 21:15:22 kojima - * *** empty log message *** - * - * Revision 1.1 2000/10/22 19:57:19 kojima - * added new c++ genpkglist - * - * Revision 1.13 2000/10/19 19:32:35 claudio - * Language setting to generate a consistent pkglist. - * + * $Id: genpkglist.cc,v 1.7 2003/01/30 17:18:21 niemeyer Exp $ */ #include <alloca.h> #include <ctype.h> @@ -74,15 +15,18 @@ #include <assert.h> #include <map> +#include <iostream> #include <apt-pkg/error.h> #include <apt-pkg/tagfile.h> -#include <apt-pkg/rpminit.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/rpmhandler.h> #include "cached_md5.h" - +#ifdef HAVE_RPM41 +#include <rpm/rpmts.h> +#endif #define CRPMTAG_TIMESTAMP 1012345 @@ -253,7 +197,7 @@ bool loadUpdateInfo(char *path, map<string,UpdateInfo> &map) return false; } - pkgTagFile Tags(F); + pkgTagFile Tags(&F); pkgTagSection Section; while (Tags.Step(Section)) @@ -599,11 +543,17 @@ int main(int argc, char ** argv) return 1; } - md5cache = new CachedMD5(string(op_dir) + string(op_suf)); + md5cache = new CachedMD5(string(op_dir) + string(op_suf), "genpkglist"); + +#ifdef HAVE_RPM41 + rpmts ts = rpmtsCreate(); + rpmReadConfigFiles(NULL, NULL); +#else + int isSource; +#endif for (entry_cur = 0; entry_cur < entry_no; entry_cur++) { struct stat sb; - int isSource; if (progressBar) { if (entry_cur) @@ -630,11 +580,15 @@ int main(int argc, char ** argv) exit(1); } +#ifdef HAVE_RPM41 + rc = rpmReadPackageFile(ts, fd, dirEntries[entry_cur]->d_name, &h); + if (rc == RPMRC_OK || rc == RPMRC_NOTTRUSTED || rc == RPMRC_NOKEY) { +#else rc = rpmReadPackageHeader(fd, &h, &isSource, NULL, NULL); - - if (!rc) { + if (rc == 0) { +#endif Header newHeader; - unsigned char md5[34]; + char md5[34]; newHeader = headerNew(); @@ -655,6 +609,10 @@ int main(int argc, char ** argv) } fdClose(outfd); + +#ifdef HAVE_RPM41 + ts = rpmtsFree(ts); +#endif delete md5cache; diff --git a/apt/tools/gensrclist.cc b/apt/tools/gensrclist.cc index a370eeb..b3bad84 100644 --- a/apt/tools/gensrclist.cc +++ b/apt/tools/gensrclist.cc @@ -1,42 +1,5 @@ /* - * $Id: gensrclist.cc,v 1.11 2001/12/12 14:50:43 kojima Exp $ - * - * $Log: gensrclist.cc,v $ - * Revision 1.11 2001/12/12 14:50:43 kojima - * fixed genbasedir for --flat and relative --topdir specifications - * fixed --flat in gensrclist - * - * Revision 1.10 2001/12/11 13:51:03 kojima - * added --flat option to srclist, patched gensrclist with stelian's patch - * - * Revision 1.9 2001/11/09 21:11:46 kojima - * * Use 'scandir' for directory traversal (instead of opendir/ - * readdir) like in genpkglist. - * * Better package progression indicator. - * - * Revision 1.8 2001/08/07 20:46:03 kojima - * Alexander Bokovoy <a.bokovoy@sam-solutions.net>'s patch for cleaning - * up genpkglist - * - * Revision 1.7 2001/07/12 21:47:33 kojima - * ignore duplicated version/diff deps packages - * new release (cnc51) - * - * Revision 1.6 2000/11/06 12:53:49 kojima - * fixed compile errors for RedHat 6.x (with gcc -Wall -Werror) - * - * Revision 1.5 2000/11/01 21:32:28 kojima - * added manpage - * - * Revision 1.3 2000/10/30 02:17:17 kojima - * fixed bugs in source d/l - * - * Revision 1.2 2000/10/29 20:25:10 kojima - * added support for source download - * - * Revision 1.1 2000/10/28 02:23:17 kojima - * started source support - * + * $Id: gensrclist.cc,v 1.8 2003/01/30 17:18:21 niemeyer Exp $ */ #include <alloca.h> #include <ctype.h> @@ -52,17 +15,20 @@ #include <assert.h> #include <map> -#include <slist> +#include <list> +#include <iostream> #include <apt-pkg/error.h> #include <apt-pkg/tagfile.h> -#include <apt-pkg/rpminit.h> +#include <apt-pkg/rpmhandler.h> #include "cached_md5.h" - - - +#ifdef HAVE_RPM41 +#include <rpm/rpmts.h> +#endif + +using namespace std; int tags[] = { RPMTAG_NAME, @@ -109,7 +75,7 @@ int selectDirent(const struct dirent *ent) } } -bool readRPMTable(char *file, map<string, slist<char*>* > &table) +bool readRPMTable(char *file, map<string, list<char*>* > &table) { FILE *indexf; char buf[512]; @@ -133,14 +99,12 @@ bool readRPMTable(char *file, map<string, slist<char*>* > &table) srpm = string(buf); if (table.find(srpm) != table.end()) { - slist<char*> *list = table[srpm]; - - list->push_front(strdup(f)); + list<char*> *l = table[srpm]; + l->push_front(strdup(f)); } else { - slist<char*> *list = new slist<char*>; - - list->push_front(strdup(f)); - table[srpm] = list; + list<char*> *l = new list<char*>; + l->push_front(strdup(f)); + table[srpm] = l; } } @@ -165,21 +129,14 @@ int main(int argc, char ** argv) char buf[300]; char cwd[200]; string srpmdir; - DIR * dir; FD_t outfd, fd; struct dirent **dirEntries; int rc, i; Header h; - Header sigs; - struct stat sb; int_32 size[1]; int entry_no, entry_cur; - int jj; - char *suffix; - char *directory; - char *index; CachedMD5 *md5cache; - map<string, slist<char*>* > rpmTable; // table that maps srpm -> generated rpm + map<string, list<char*>* > rpmTable; // table that maps srpm -> generated rpm bool mapi = false; bool progressBar = false; bool flatStructure = false; @@ -210,8 +167,8 @@ int main(int argc, char ** argv) if (!readRPMTable(arg_srpmindex, rpmTable)) exit(1); - md5cache = new CachedMD5(string(arg_dir)+string(arg_suffix)); - + md5cache = new CachedMD5(string(arg_dir)+string(arg_suffix), "gensrclist"); + getcwd(cwd, 200); if (*arg_dir != '/') { strcpy(buf, cwd); @@ -224,20 +181,35 @@ int main(int argc, char ** argv) strcat(buf, arg_suffix); srpmdir = "SRPMS." + string(arg_suffix); +#ifdef OLD_FLATSCHEME if (flatStructure) { - char *prefix; // add the last component of the directory to srpmdir // that will cancel the effect of the .. used in sourcelist.cc // when building the directory from where to fetch srpms in apt - + char *prefix; prefix = strrchr(arg_dir, '/'); - if (!prefix) - prefix = arg_dir; + if (prefix == NULL) + prefix = arg_dir; else - prefix++; - - srpmdir = string(prefix) + '/' + srpmdir; + prefix++; + if (*prefix != 0 && *(prefix+strlen(prefix)-1) == '/') + srpmdir = string(prefix) + srpmdir; + else + srpmdir = string(prefix) + "/" + srpmdir; } +#else + if (!flatStructure) { + srpmdir = "../"+srpmdir; +#ifndef REMOVE_THIS_SOMEDAY + /* This code is here just so that code in rpmsrcrecords.cc is able + * to detect if that's a "new" style SRPM directory scheme, or an + * old style. Someday, when most repositories were already rebuilt + * with that new gensrclist tool, this code may be safely removed. */ + } else { + srpmdir = "./"+srpmdir; +#endif + } +#endif entry_no = scandir(buf, &dirEntries, selectDirent, alphasort); if (entry_no < 0) { @@ -248,8 +220,6 @@ int main(int argc, char ** argv) chdir(buf); - - sprintf(buf, "%s/srclist.%s", cwd, arg_suffix); unlink(buf); @@ -260,6 +230,13 @@ int main(int argc, char ** argv) << strerror(errno); return 1; } + +#ifdef HAVE_RPM41 + rpmts ts = rpmtsCreate(); + rpmReadConfigFiles(NULL, NULL); +#else + Header sigs; +#endif for (entry_cur = 0; entry_cur < entry_no; entry_cur++) { struct stat sb; @@ -284,12 +261,16 @@ int main(int argc, char ** argv) perror("open"); exit(1); } - + size[0] = sb.st_size; +#ifdef HAVE_RPM41 + rc = rpmReadPackageFile(ts, fd, dirEntries[entry_cur]->d_name, &h); + if (rc == RPMRC_OK || rc == RPMRC_NOTTRUSTED || rc == RPMRC_NOKEY) { +#else rc = rpmReadPackageInfo(fd, &sigs, &h); - - if (!rc) { + if (rc == 0) { +#endif Header newHeader; int i; bool foundInIndex; @@ -324,7 +305,7 @@ int main(int argc, char ** argv) size, 1); { - unsigned char md5[34]; + char md5[34]; md5cache->MD5ForFile(dirEntries[entry_cur]->d_name, sb.st_mtime, md5); @@ -335,24 +316,24 @@ int main(int argc, char ** argv) foundInIndex = false; { int count = 0; - char **list = NULL; - slist<char*> *rpmlist = rpmTable[string(dirEntries[entry_cur]->d_name)]; + char **l = NULL; + list<char*> *rpmlist = rpmTable[string(dirEntries[entry_cur]->d_name)]; if (rpmlist) { - list = new char *[rpmlist->size()]; + l = new char *[rpmlist->size()]; foundInIndex = true; - for (slist<char*>::const_iterator i = rpmlist->begin(); + for (list<char*>::const_iterator i = rpmlist->begin(); i != rpmlist->end(); i++) { - list[count++] = *i; + l[count++] = *i; } } if (count) { headerAddEntry(newHeader, CRPMTAG_BINARY, - RPM_STRING_ARRAY_TYPE, list, count); + RPM_STRING_ARRAY_TYPE, l, count); } } if (foundInIndex || !mapi) @@ -360,14 +341,22 @@ int main(int argc, char ** argv) headerFree(newHeader); headerFree(h); +#ifndef HAVE_RPM41 rpmFreeSignature(sigs); +#endif } fdClose(fd); } fdClose(outfd); + +#ifdef HAVE_RPM41 + ts = rpmtsFree(ts); +#endif delete md5cache; return 0; } + +// vim:sts=3:sw=3 diff --git a/apt/tools/hashtable.c b/apt/tools/hashtable.c index bd87719..9d61bc2 100644 --- a/apt/tools/hashtable.c +++ b/apt/tools/hashtable.c @@ -1,5 +1,3 @@ - - #include <sys/types.h> #include <string.h> #include <stdlib.h> @@ -7,9 +5,6 @@ #include "hashtable.h" - - - #define INITIAL_CAPACITY 23 diff --git a/apt/tools/hdlist2pkglist.cc b/apt/tools/hdlist2pkglist.cc index 95948a8..fdc1ba0 100644 --- a/apt/tools/hdlist2pkglist.cc +++ b/apt/tools/hdlist2pkglist.cc @@ -1,35 +1,5 @@ /* - * $Id: hdlist2pkglist.cc,v 1.3 2001/07/12 21:47:33 kojima Exp $ - * - * $Log: hdlist2pkglist.cc,v $ - * Revision 1.3 2001/07/12 21:47:33 kojima - * ignore duplicated version/diff deps packages - * new release (cnc51) - * - * Revision 1.2 2000/11/06 12:53:49 kojima - * fixed compile errors for RedHat 6.x (with gcc -Wall -Werror) - * - * Revision 1.1 2000/11/01 18:27:21 kojima - * added md5 caching to pkglist generators - * - * Revision 1.5 2000/10/31 20:30:42 kojima - * some updates - * - * Revision 1.4 2000/10/29 21:49:54 kojima - * fixed gensrclist/pkglist bug - * - * Revision 1.3 2000/10/29 20:25:10 kojima - * added support for source download - * - * Revision 1.2 2000/10/26 21:15:22 kojima - * *** empty log message *** - * - * Revision 1.1 2000/10/22 19:57:19 kojima - * added new c++ hdlist2pkglist - * - * Revision 1.13 2000/10/19 19:32:35 claudio - * Language setting to generate a consistent pkglist. - * + * $Id: hdlist2pkglist.cc,v 1.4 2002/07/26 23:16:34 niemeyer Exp $ */ #include <alloca.h> #include <ctype.h> @@ -45,55 +15,53 @@ #include <assert.h> #include <map> +#include <iostream> #include <apt-pkg/error.h> #include <apt-pkg/tagfile.h> -#include <apt-pkg/rpminit.h> - -// from rpmlib -extern "C" { - extern int mdfile(const char *fn, unsigned char *digest); -}; +#include <apt-pkg/rpmhandler.h> +#include <apt-pkg/md5.h> +#include <config.h> +using namespace std; #define CRPMTAG_TIMESTAMP 1012345 int tags[] = { RPMTAG_NAME, - RPMTAG_EPOCH, - RPMTAG_VERSION, - RPMTAG_RELEASE, - RPMTAG_GROUP, - RPMTAG_ARCH, - RPMTAG_PACKAGER, - RPMTAG_SOURCERPM, - RPMTAG_SIZE, - RPMTAG_VENDOR, - - RPMTAG_DESCRIPTION, - RPMTAG_SUMMARY, - - RPMTAG_REQUIREFLAGS, - RPMTAG_REQUIRENAME, - RPMTAG_REQUIREVERSION, - - RPMTAG_CONFLICTFLAGS, - RPMTAG_CONFLICTNAME, - RPMTAG_CONFLICTVERSION, - - RPMTAG_PROVIDENAME, - RPMTAG_PROVIDEFLAGS, - RPMTAG_PROVIDEVERSION, - - RPMTAG_OBSOLETENAME, - RPMTAG_OBSOLETEFLAGS, - RPMTAG_OBSOLETEVERSION + RPMTAG_EPOCH, + RPMTAG_VERSION, + RPMTAG_RELEASE, + RPMTAG_GROUP, + RPMTAG_ARCH, + RPMTAG_PACKAGER, + RPMTAG_SOURCERPM, + RPMTAG_SIZE, + RPMTAG_VENDOR, + + RPMTAG_DESCRIPTION, + RPMTAG_SUMMARY, + + RPMTAG_REQUIREFLAGS, + RPMTAG_REQUIRENAME, + RPMTAG_REQUIREVERSION, + + RPMTAG_CONFLICTFLAGS, + RPMTAG_CONFLICTNAME, + RPMTAG_CONFLICTVERSION, + + RPMTAG_PROVIDENAME, + RPMTAG_PROVIDEFLAGS, + RPMTAG_PROVIDEVERSION, + + RPMTAG_OBSOLETENAME, + RPMTAG_OBSOLETEFLAGS, + RPMTAG_OBSOLETEVERSION }; + int numTags = sizeof(tags) / sizeof(int); - - typedef struct { string importance; string date; @@ -101,25 +69,20 @@ typedef struct { string url; } UpdateInfo; - static inline int usefullFile(char *a) { int l = strlen(a); - if (strstr(a, "bin")) - return 1; - + return 1; if (l < 3) - return 0; - + return 0; if (strcmp(a + l - 2, ".a") == 0 || strcmp(a + l - 3, ".so") == 0 || strstr(a, ".so.")) - return 1; + return 1; return 0; } - static void copyStrippedFileList(Header header, Header newHeader) { int i; @@ -133,8 +96,6 @@ static void copyStrippedFileList(Header header, Header newHeader) int_32 *dindexes; int res1, res2, res3; -#define FREE(a) if (a) free(a); - res1 = headerGetEntry(header, RPMTAG_DIRNAMES, &type1, (void**)&dirnames, &count1); res2 = headerGetEntry(header, RPMTAG_BASENAMES, &type2, @@ -142,9 +103,10 @@ static void copyStrippedFileList(Header header, Header newHeader) res3 = headerGetEntry(header, RPMTAG_DIRINDEXES, &type3, (void**)&dirindexes, &count3); - if (res1 != 1 || res2 != 1 || res3 != 1) { - FREE(dirnames); - FREE(basenames); + if (res1 != 1 || res2 != 1 || res3 != 1) + { + free(dirnames); + free(basenames); return; } @@ -152,7 +114,6 @@ static void copyStrippedFileList(Header header, Header newHeader) bnames = basenames; dindexes = (int_32*)malloc(sizeof(int_32)*count3); - i1 = 0; i2 = 0; for (i = 0; i < count2 ; i++) @@ -163,7 +124,8 @@ static void copyStrippedFileList(Header header, Header newHeader) if (!ok) ok = usefullFile(dirnames[dirindexes[i]]); - if (!ok) { + if (!ok) + { int k = i; while (dirindexes[i] == dirindexes[k] && i < count2) i++; @@ -196,22 +158,21 @@ static void copyStrippedFileList(Header header, Header newHeader) } } - if (i1 == 0) { - FREE(dirnames); - FREE(basenames); - FREE(dindexes); + if (i1 == 0) + { + free(dirnames); + free(basenames); + free(dindexes); return; } headerAddEntry(newHeader, RPMTAG_DIRNAMES, type1, dnames, i2); - headerAddEntry(newHeader, RPMTAG_BASENAMES, type2, bnames, i1); - headerAddEntry(newHeader, RPMTAG_DIRINDEXES, type3, dindexes, i1); - FREE(dirnames); - FREE(basenames); - FREE(dindexes); + free(dirnames); + free(basenames); + free(dindexes); } @@ -226,7 +187,7 @@ bool loadUpdateInfo(char *path, map<string,UpdateInfo> &map) return false; } - pkgTagFile Tags(F); + pkgTagFile Tags(&F); pkgTagSection Section; while (Tags.Step(Section)) @@ -262,9 +223,8 @@ bool copyFields(Header h, Header newHeader, int res; res = headerGetEntry(h, tags[i], &type, &data, &count); - if (res != 1) { + if (res != 1) continue; - } headerAddEntry(newHeader, tags[i], type, data, count); } @@ -291,14 +251,13 @@ bool copyFields(Header h, Header newHeader, headerAddEntry(newHeader, CRPMTAG_FILESIZE, RPM_INT32_TYPE, size, 1); - { - unsigned char md5[34]; - - mdfile(filename, md5); - - headerAddEntry(newHeader, CRPMTAG_MD5, RPM_STRING_TYPE, - md5, 1); - } + FileFd File(filename, FileFd::ReadOnly); + MD5Summation MD5; + MD5.AddFD(File.Fd(), File.Size()); + File.Close(); + char md5[34]; + strcpy(md5, MD5.Result().Value().c_str()); + headerAddEntry(newHeader, CRPMTAG_MD5, RPM_STRING_TYPE, md5, 1); // update description tags if (updateInfo.find(string(filename)) != updateInfo.end()) { @@ -423,8 +382,8 @@ int main(int argc, char ** argv) hdlist = fdOpen(op_hdlist, O_RDONLY, 0644); if (!hdlist) { - cerr << "hdlist2pkglist: error opening file" << op_hdlist << ":" - << strerror(errno); + cerr << "hdlist2pkglist: error opening file " << op_hdlist << ": " + << strerror(errno) << endl; return 1; } @@ -432,8 +391,8 @@ int main(int argc, char ** argv) outfd = fdOpen(op_pkglist, O_WRONLY | O_TRUNC | O_CREAT, 0644); if (!outfd) { - cerr << "hdlist2pkglist: error creating file" << op_pkglist << ":" - << strerror(errno); + cerr << "hdlist2pkglist: error creating file " << op_pkglist << ": " + << strerror(errno) << endl;; return 1; } @@ -452,7 +411,7 @@ int main(int argc, char ** argv) break; if (headerGetEntry(h, CRPMTAG_FILENAME, &type, (void**)&package, &count)!=1) { - cerr << "hdlist2pkglist: could not get CRPMTAG_FILENAME from header in hdlist"<< endl; + cerr << "hdlist2pkglist: could not get CRPMTAG_FILENAME from header in hdlist" << endl; exit(1); } @@ -477,3 +436,5 @@ int main(int argc, char ** argv) return 0; } + +// vim:sts=3:sw=3 diff --git a/apt/tools/Makefile b/apt/tools/makefile similarity index 100% rename from apt/tools/Makefile rename to apt/tools/makefile diff --git a/apt/tools/mkpackages.c b/apt/tools/mkpackages.c index 380d634..284145d 100644 --- a/apt/tools/mkpackages.c +++ b/apt/tools/mkpackages.c @@ -1,4 +1,3 @@ - #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/apt.spec b/apt0.5.spec similarity index 50% rename from apt.spec rename to apt0.5.spec index befbd4c..d72e40e 100644 --- a/apt.spec +++ b/apt0.5.spec @@ -1,216 +1,558 @@ -# hey Emacs, its -*- rpm-spec -*- -# $Id: apt,v 1.5 2002/03/13 19:01:26 ab Exp $ +# hey Emacs, its -*- mode: rpm-spec; coding: cyrillic-cp1251; -*- Name: apt -Version: 0.3.19cnc55 +Version: 0.5.5cnc1 Release: alt3 Summary: Debian's Advanced Packaging Tool with RPM support Summary(ru_RU.CP1251): Debian APT - Óñîâåðøåíñòâîâàííîå ñðåäñòâî óïðàâëåíèÿ ïàêåòàìè ñ ïîääåðæêîé RPM License: GPL Group: System/Configuration/Packaging -Packager: APT Development Team <apt@alt-linux.org> +Packager: APT Development Team <apt@packages.altlinux.org> -Source0: %name-%version.tar.bz2 -Source1: %name.conf -Source2: rpmpriorities +Source0: http://moin.conectiva.com.br/files/AptRpm/attachments/%name-%version.tar.bz2 +Source1: apt.conf +Source2: genbasedir +Source3: README.rsync +Source4: apt.8 +Source5: apt.ru.po -Patch1: %name-0.3.19cnc32-alt-distro.patch -Patch2: %name-0.3.19cnc55-alt-AllowedDupPkgs-HoldPkgs.patch -Patch3: %name-0.3.19cnc52-alt-INLINEDEPFLAG.patch -Patch4: %name-0.3.19cnc53-alt-configure-build.patch -Patch5: %name-0.3.19cnc53-alt-strsignal.patch -Patch6: %name-0.3.19cnc55-alt-genbasedir.patch -Patch7: %name-0.3.19cnc55-alt-apt-pkg-rpmpm-execute_rpm.patch -Patch8: %name-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch -Patch9: %name-0.3.19cnc55-alt-enable-rsh-method.patch +Patch1: apt-0.5.5cnc1-alt-distro.patch +#Patch2: apt-0.5.4cnc1-alt-INLINEDEPFLAG.patch +Patch3: apt-0.5.4cnc1-alt-configure-build.patch +Patch4: apt-0.5.4cnc9-alt-getsrc.patch +Patch5: apt-0.5.4cnc3-alt-md5hash-debug.patch +Patch6: apt-0.5.4cnc9-alt-rsync.patch +Patch7: apt-0.5.4cnc8-alt-rpm_cmd.patch +Patch8: apt-0.5.4cnc8-alt-rpm-fancypercent.patch +#Patch9: apt-0.5.4cnc9-alt-algo.patch +#Patch10: apt-0.5.4cnc9-alt-replace.patch +#Patch11: apt-0.5.4cnc9-alt-fixes.patch +#Patch12: apt-0.5.4cnc9-alt-CachedMD5.patch +Patch13: apt-0.5.5cnc1-alt-pkgpriorities.patch +Patch14: apt-0.5.4cnc9-alt-bz2.patch +#Patch15: apt-0.5.4cnc9-alt-rename-segfault.patch +Patch16: apt-0.5.4cnc9-alt-rpmlistparser-kernel.patch +Patch17: apt-0.5.4cnc9-alt-packagemanager-CheckRConflicts.patch +Patch18: apt-0.5.4cnc9-alt-install_virtual.patch +Patch19: apt-0.5.4cnc9-alt-specialchars.patch +#Patch20: apt-0.5.4cnc9-alt-rpmrecords_epoch.patch +#Patch21: apt-0.5.4cnc9-alt-lockfix.patch +Patch22: apt-0.5.4cnc9-alt-install_virtual_version.patch +Patch23: apt-0.5.5cnc1-alt-methods_gpg_homedir.patch +Patch24: apt-0.5.4cnc9-alt-pkgorderlist_score.patch +#Patch25: apt-0.5.4cnc9-alt-cdrom-unmount.patch +Patch26: apt-0.5.5cnc1-alt-APT_DOMAIN.patch +Patch27: apt-0.5.5cnc1-mattdm-manbuild.patch +Patch28: apt-0.5.5cnc1-alt-debsystem.patch -Requires: lib%name = %version-%release, mktemp >= 1:1.3.1, getopt -Requires: %{get_dep rpm}, gnupg, apt-conf +# Need to be adopted. Or not? +Patch31: apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch +# Normally not applied, but useful. +Patch32: apt-0.5.4cnc9-alt-getsrc-debug.patch +# Obsolete. +Patch33: apt-0.5.4cnc3-alt-select-genlist.patch + +PreReq: %__subst +Requires: libapt = %version-%release +Requires: %{get_dep rpm}, /etc/apt/pkgpriorities, apt-conf, gnupg, alt-gpgkeys +Obsoletes: apt-0.5 BuildPreReq: librpm-devel >= 4.0.4, rpm-build >= 4.0.4 -# Automatically added by buildreq on Tue Mar 26 2002 -BuildRequires: bison bzlib-devel gcc-c++ libbeecrypt libdb4 libpopt-devel librpm-devel libstdc++-devel openjade perl-SGMLSpm zlib-devel +# Automatically added by buildreq on Wed Feb 12 2003 +BuildRequires: bzlib-devel docbook-dtds docbook-utils gcc-c++ libdb2-devel libpopt-devel librpm-devel libstdc++-devel openjade perl-SGMLSpm sgml-common xml-common zlib-devel + +%define risk_usage_en This package is still under development. %description A port of Debian's APT tools for RPM based distributions, -or at least for Conectiva. It provides the %name-get utility that +or at least for Conectiva. It provides the apt-get utility that provides a simpler, safer way to install and upgrade packages. APT features complete installation ordering, multiple source capability and several other unique features. -This package is still under development. +%risk_usage_en %define risk_usage Äàííûé ïàêåò ïîêà åùå íàõîäèòñÿ â ñòàäèè ðàçðàáîòêè. %description -l ru_RU.CP1251 Ïåðåíåñåííûå èç Debian ñðåäñòâà óïðàâëåíèÿ ïàêåòàìè APT, âêëþ÷àþùèå â ñåáÿ ïîääåðæêó RPM, âûïîëíåííóþ êîìïàíèåé Conectiva (Áðàçèëèÿ). -Ýòîò ïàêåò ñîäåðæèò óòèëèòó %name-get äëÿ ïðîñòîé è íàäåæíîé óñòàíîâêè +Ýòîò ïàêåò ñîäåðæèò óòèëèòó apt-get äëÿ ïðîñòîé è íàäåæíîé óñòàíîâêè è îáíîâëåíèÿ ïàêåòîâ. APT óìååò àâòîìàòè÷åñêè ðàçðåøàòü çàâèñèìîñòè ïðè óñòàíîâêå, îáåñïå÷èâàåò óñòàíîâêó èç íåñêîëüêèõ èñòî÷íèêîâ è öåëûé ðÿä äðóãèõ óíèêàëüíûõ âîçìîæíîñòåé. %risk_usage -%package -n lib%name -Summary: APT's lib%name-pkg +%package -n libapt +Summary: APT's core libraries Group: System/Libraries -Conflicts: %name < %version-%release +Obsoletes: libapt-0.5 -%package -n lib%name-devel -Summary: Development files and documentation for APT's lib%name-pkg -Summary(ru_RU.CP1251): Ôàéëû è äîêóìåíòàöèÿ äëÿ ðàçðàáîò÷èêîâ, èñïîëüçóþùèõ lib%name-pkg +%package -n libapt-devel +Summary: Development files and documentation for APT's core libs +Summary(ru_RU.CP1251): Ôàéëû è äîêóìåíòàöèÿ äëÿ ðàçðàáîò÷èêîâ, èñïîëüçóþùèõ áèáëèîòåêè APT Group: Development/C -Requires: lib%name = %version-%release -Provides: %name-devel = %version -Obsoletes: %name-devel lib%name-pkg-devel lib%name-pkg-doc +Requires: libapt = %version-%release +Obsoletes: libapt-0.5-devel -%package -n lib%name-devel-static -Summary: Development static library for APT's lib%name-pkg -Summary(ru_RU.CP1251): Ñòàòè÷åñêàÿ áèáëèîòåêà APT äëÿ ðàçðàáîò÷èêîâ, èñïîëüçóþùèõ lib%name-pkg +%package -n libapt-devel-static +Summary: Development static library for APT's libs +Summary(ru_RU.CP1251): Ñòàòè÷åñêàÿ áèáëèîòåêà APT äëÿ ðàçðàáîò÷èêîâ, èñïîëüçóþùèõ áèáëèîòåêè APT Group: Development/C -Requires: lib%name-devel = %version-%release -Provides: %name-devel-static = %version -Obsoletes: %name-devel-static +Requires: libapt-devel = %version-%release +Obsoletes: libapt-0.5-devel-static -%description -n lib%name -This package contains APT's lib%name-pkg package manipulation library, +%package utils +# Analoguous to rpm-build subpackage. +Summary: Utilities to create APT repositaries (the indices) +Summary(ru_RU.CP1251): Óòèëèòû äëÿ ïîñòðîåíèÿ APT-ðåïîçèòàðèåâ (èíäåêñîâ) +Group: Development/Other +Requires: %name = %version-%release, mktemp >= 1:1.3.1, getopt +Requires: %{get_dep rpm}, gnupg, sed +Obsoletes: apt-0.5-utils + +%package rsync +Summary: rsync method support for APT +Summary(ru_RU.CP1251): Ïîääåðæêà ìåòîäà rsync äëÿ APT +Group: Development/Other +Requires: %name = %version-%release, rsync >= 2.5.5-alt3 +Obsoletes: apt-0.5-rsync + +%description -n libapt +This package contains APT's package manipulation library, modified for RPM. -This package is still under development. +%risk_usage_en -%description -n lib%name-devel +%description -n libapt-devel This package contains the header files and libraries for developing with -APT's lib%name-pkg package manipulation library, modified for RPM. +APT's package manipulation library, modified for RPM. -This package is still under development. +%risk_usage_en -%description -n lib%name-devel-static +%description -n libapt-devel-static This package contains static libraries for developing with APT's -lib%name-pkg package manipulation library, modified for RPM. +package manipulation library, modified for RPM. -This package is still under development. +%risk_usage_en -%description -n lib%name -l ru_RU.CP1251 - ýòîì ïàêåòå íàõîäèòñÿ lib%name-pkg -- áèáëèîòåêà óïðàâëåíèÿ ïàêåòàìè +%description utils +This package contains the utility programs that can prepare a repositary of +RPMS binary and source packages for future access by APT (by generating +the indices). + +It relates to 'apt' package analoguously to how 'rpm' relates to 'rpm-build' package. + +%risk_usage_en + +%description rsync +This package contains method 'rsync' for APT. + +%risk_usage_en + +%description -n libapt -l ru_RU.CP1251 + ýòîì ïàêåòå íàõîäèòñÿ áèáëèîòåêè óïðàâëåíèÿ ïàêåòàìè èç êîìïëåêòà APT.  îòëè÷èå îò îðèãèíàëüíîé âåðñèè äëÿ Debian, ýòîò ïàêåò ñîäåðæèò ïîääåðæêó äëÿ ôîðìàòà RPM. %risk_usage -%description -n lib%name-devel -l ru_RU.CP1251 +%description -n libapt-devel -l ru_RU.CP1251  ýòîì ïàêåòå íàõîäÿòñÿ çàãîëîâî÷íûå ôàéëû è áèáëèîòåêè äëÿ ðàçðàáîòêè -ïðîãðàìì, èñïîëüçóþùèõ lib%name-pkg -- áèáëèîòåêó óïðàâëåíèÿ ïàêåòàìè +ïðîãðàìì, èñïîëüçóþùèõ áèáëèîòåêè óïðàâëåíèÿ ïàêåòàìè èç êîìïëåêòà APT.  îòëè÷èå îò îðèãèíàëüíîé âåðñèè äëÿ Debian, ýòîò ïàêåò ñîäåðæèò ïîääåðæêó äëÿ ôîðìàòà RPM. %risk_usage -%description -n lib%name-devel-static -l ru_RU.CP1251 +%description -n libapt-devel-static -l ru_RU.CP1251  ýòîì ïàêåòå íàõîäÿòñÿ ñòàòè÷åñêèå áèáëèîòåêè äëÿ ðàçðàáîòêè ïðîãðàìì, -èñïîëüçóþùèõ lib%name-pkg -- áèáëèîòåêó óïðàâëåíèÿ ïàêåòàìè èç +èñïîëüçóþùèõ áèáëèîòåêè óïðàâëåíèÿ ïàêåòàìè èç êîìïëåêòà APT.  îòëè÷èå îò îðèãèíàëüíîé âåðñèè äëÿ Debian, ýòîò ïàêåò ñîäåðæèò ïîääåðæêó äëÿ ôîðìàòà RPM. %risk_usage +%description utils -l ru_RU.CP1251 + ýòîì ïàêåòå íàõîäÿòñÿ ïðîãðàììû-óòèëèòû, êîòîðûå ìîãóò ðåïîçèòàðèé +áèíàðíûõ è èñõîäíûõ ïàêåòîâ RPM ïðèãîòîâèòü äëÿ äîñòóïà ñ ïîìîùüþ APT +(ñãåíåðèðîâàòü èíäåêñû). + +Îí îòíîñèòñÿ ê ïàêåòó 'apt' àíàëîãè÷íî òîìó, êàê 'rpm'ê 'rpm-build'. + +%risk_usage + +%description rsync -l ru_RU.CP1251 + ýòîì ïàêåòå íàõîäèòñÿ ìåòîä 'rsync' äëÿ APT + +%risk_usage + %prep -%setup -q +%setup -q -n apt-%version %patch1 -p1 -%patch2 -p1 +#%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 +#%patch9 -p1 +#%patch10 -p1 +#%patch11 -p1 +#%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +#%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +#%patch20 -p1 +#%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +#%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 -#install -p -m644 %SOURCE3 po/ru.po +# Need to be adopted. Or not? +#%patch31 -p1 +# Turn it on only if you want to see the debugging messages: +#%patch32 -p1 -b .getsrc-debug +# Obsolete. +#%patch33 -p1 + +%__install -p -m644 %SOURCE3 %SOURCE4 . +%__install -p -m644 %SOURCE5 po/ru.po %build %add_optflags -fno-exceptions -D_GNU_SOURCE +pushd doc + [ -f apt.8 ] || %__install -p -m644 %SOURCE4 . +popd + +# Fix gettextization. +if [ ! -s po/LINGUAS ]; then + %__sed -ne 's/^ALL_LINGUAS="\([^"]*\)"$/\1/p' configure.in >>po/LINGUAS + %__subst 's/^\(ALL_LINGUAS=\)/#\1/g' configure.in +fi + +# Fix url. +%__subst -p 's,/usr/share/common-licenses/GPL,/usr/share/license/GPL,' COPYING libtoolize --copy --force aclocal -I buildlib autoconf -# BEGIN HACK: fix broken files. -%configure --with-proc-multiply=1 --with-procs=%__nprocs -for n in LOCALEDIR `sed -ne 's/.*}\(ENABLE\|HAVE\|NEED\)\(_[A-Z_0-9]*\)\$.*/\1\2/pg' config.status |LC_COLLATE=C sort -u`; do - %__grep -Fqs "$n" buildlib/config.h.in || echo "#undef $n" -done >config.h.add -cat config.h.add >>buildlib/config.h.in -# END HACK - %configure --with-proc-multiply=1 --with-procs=%__nprocs find -type f -print0 | - xargs -r0 %__grep -EZl '/var(/lib)?/state/%name' | - xargs -r0 %__perl -pi -e 's,/var(/lib)?/state/%name,%_localstatedir/%name,g' -for f in `find -type f -name '*.[58]'`; do - [ -f "$f.yo" ] || touch -r "$f" "$f.yo" -done + xargs -r0 %__grep -EZl '/var(/lib)?/state/apt' -- | + xargs -r0 %__subst 's,/var\(/lib\)\?/state/apt,%_localstatedir/apt,g' -- + %make clean %make_build STATICLIBS=1 NOISY=1 -tar xzf docs.tar.gz -bzip2 -9 docs/*.text %install -mkdir -p $RPM_BUILD_ROOT{%_bindir,%_libdir/%name,%_mandir/man{5,8},%_includedir/%name-pkg,%_sysconfdir/%name} -mkdir -p $RPM_BUILD_ROOT%_localstatedir/%name/lists/partial -mkdir -p $RPM_BUILD_ROOT/var/cache/%name/{archives/partial,genpkglist,gensrclist} +%__mkdir_p $RPM_BUILD_ROOT{%_bindir,%_libdir/apt,%_mandir/man{1,5,8},%_includedir/apt-pkg,%_includedir/apt-inst,%_sysconfdir/apt/{vendors.list.d,apt.conf.d}} +%__mkdir_p $RPM_BUILD_ROOT%_localstatedir/apt/lists/partial +%__mkdir_p $RPM_BUILD_ROOT/var/cache/apt/{archives/partial,gen{pkg,src}list} -cp -a bin/lib*.so* $RPM_BUILD_ROOT%_libdir -cp -a bin/lib*.a* $RPM_BUILD_ROOT%_libdir +%__cp -a bin/lib*.so* $RPM_BUILD_ROOT%_libdir/ +%__cp -a bin/lib*.a* $RPM_BUILD_ROOT%_libdir/ -install -p -m755 bin/methods/* $RPM_BUILD_ROOT%_libdir/%name -install -p -m755 bin/{%name-*,*list} tools/genbasedir $RPM_BUILD_ROOT%_bindir +%__install -p -m755 bin/methods/* $RPM_BUILD_ROOT%_libdir/apt/ +%__install -p -m755 bin/apt-* $RPM_BUILD_ROOT%_bindir/ +%__install -p -m755 bin/{%name-*,*list} %SOURCE2 $RPM_BUILD_ROOT%_bindir/ -install -p -m644 %name-pkg/{,*/}*.h $RPM_BUILD_ROOT%_includedir/%name-pkg +%__install -p -m644 apt-pkg/{,*/}*.h $RPM_BUILD_ROOT%_includedir/apt-pkg/ +%__install -p -m644 apt-inst/{,*/}*.h $RPM_BUILD_ROOT%_includedir/apt-inst/ -install -p -m644 doc/*.5 $RPM_BUILD_ROOT%_man5dir/ -install -p -m644 doc/*.8 $RPM_BUILD_ROOT%_man8dir/ +%__install -p -m644 doc/*.1 $RPM_BUILD_ROOT%_man1dir/ +%__install -p -m644 doc/*.5 $RPM_BUILD_ROOT%_man5dir/ +%__install -p -m644 doc/*.8 $RPM_BUILD_ROOT%_man8dir/ -install -p -m644 %SOURCE1 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/%name +%__install -p -m644 %SOURCE1 $RPM_BUILD_ROOT%_sysconfdir/apt/ -# Make possible SSH method via RSH one. -%__ln_s rsh $RPM_BUILD_ROOT%_libdir/%name/ssh +%__ln_s -f rsh $RPM_BUILD_ROOT%_libdir/apt/ssh +%__ln_s -f gzip $RPM_BUILD_ROOT%_libdir/apt/bzip2 -%make_install install -C po DESTDIR=$RPM_BUILD_ROOT -%find_lang %name +%__mkdir_p $RPM_BUILD_ROOT%_datadir +%__rm -rf $RPM_BUILD_ROOT%_datadir/locale +%__cp -a locale $RPM_BUILD_ROOT%_datadir/ -%post -n lib%name -p /sbin/ldconfig -%postun -n lib%name -p /sbin/ldconfig +%define docdir %_docdir/%name-%version +%__mkdir_p $RPM_BUILD_ROOT%docdir +%__cp -a README* TODO COPYING AUTHORS* doc/examples \ + $RPM_BUILD_ROOT%docdir/ + +%find_lang --output=%name.lang \ + apt libapt-pkg3.3 + +%triggerun -- apt < 0.5.4 +CONF=/etc/apt/apt.conf +if [ -s "$CONF" ]; then + %__subst 's/HoldPkgs/Hold/;s/AllowedDupPkgs/Allow-Duplicated/;s/IgnorePkgs/Ignore/;s/PostInstall/Post-Install/;s|Methods .*|Methods "/usr/lib/apt";|;s|PubringPath *"\([^"]*\)"|Pubring "\1/pubring.gpg"|g' "$CONF" +fi + +%post -n libapt -p %post_ldconfig +%postun -n libapt -p %postun_ldconfig %files -f %name.lang -%_bindir/* -%_libdir/%name -%dir %_sysconfdir/%name -%config(noreplace) %_sysconfdir/%name/%name.conf -%config(noreplace) %_sysconfdir/%name/rpmpriorities +%_bindir/apt-* +%_libdir/apt +%exclude %_libdir/apt/rsync +%dir %_sysconfdir/apt +%config(noreplace) %_sysconfdir/apt/apt.conf +%dir %_sysconfdir/apt/apt.conf.d +%dir %_sysconfdir/apt/vendors.list.d %_mandir/man?/* -%doc README* TODO docs/examples REPOSITORIO-APT-HOWTO +%docdir +%_localstatedir/apt %defattr(2770,root,rpm,2770) -%_localstatedir/%name -%_cachedir/%name +%_cachedir/apt/archives -%files -n lib%name +%files utils +%_bindir/* +%exclude %_bindir/apt-* + +%defattr(2770,root,rpm,2770) +%_cachedir/apt/gen*list + +%files -n libapt %_libdir/*.so.* -%files -n lib%name-devel +%defattr(2770,root,rpm,2770) +%dir %_cachedir/apt + +%files -n libapt-devel %_libdir/*.so %_includedir/* -%doc docs/*.{text.*,html} -%files -n lib%name-devel-static +%files -n libapt-devel-static %_libdir/*.a +%files rsync +%dir %_libdir/apt +%_libdir/apt/rsync + %changelog +* Thu Feb 13 2003 Dmitry V. Levin <ldv@altlinux.org> 0.5.5cnc1-alt3 +- Introduced APT::Ignore-dpkg support and set this flag by default, + to address #0002119. + +* Wed Feb 12 2003 Dmitry V. Levin <ldv@altlinux.org> 0.5.5cnc1-alt2 +- Updated russian translation (Vyacheslav Dikonov). +- Updated buildrequires. + +* Fri Feb 07 2003 Dmitry V. Levin <ldv@altlinux.org> 0.5.5cnc1-alt1 +- Updated to 0.5.5cnc1 +- Fixed build: + + alt-APT_DOMAIN + + mattdm-manbuild +- Merged upstream patches: + + alt-algo + + alt-replace + + alt-fixes + + alt-CachedMD5 + + alt-rename-segfault + + alt-rpmrecords_epoch + + alt-lockfix + + alt-cdrom-unmount +- Updated patches: + + alt-distro + + alt-pkgpriorities + + alt-methods_gpg_homedir +- Removed patches: + + alt-INLINEDEPFLAG + +* Tue Jan 28 2003 Dmitry V. Levin <ldv@altlinux.org> 0.5.4cnc9-alt8 +- apt-cdrom: Unmout cdrom in case if package file wasn't found (avd). +- apt-cdrom: Fixed default disk name (#0001886). + +* Tue Jan 21 2003 Dmitry V. Levin <ldv@altlinux.org> 0.5.4cnc9-alt7 +- apt-pkg: fixed RPMTAG_EPOCH handling (#0002019, avd). +- apt-get: try to fix lock problem (#0002013, vsu). +- apt-pkg: added APT::Install::VirtualVersion support (mouse). +- methods/gpg (#0001945): + + added APT::GPG::Homedir support and enabled it by default; + + dropped APT::GPG::Pubring support. +- apt-pkg: experimental patch for pkgOrderList::Score (#0001931). + +* Fri Jan 17 2003 Dmitry V. Levin <ldv@altlinux.org> 0.5.4cnc9-alt6 +- apt: PreReq: %__subst (#0001801). +- apt-get: added APT::Install::Virtual support (mouse). +- apt-cdrom: applied alt-specialchars patch from Anton V. Denisov, + needs to be tested though. +- apt.conf: added "-adv" and "-linus" kernels to Allow-Duplicated list. + +* Thu Dec 26 2002 Dmitry V. Levin <ldv@altlinux.org> 0.5.4cnc9-alt5 +- apt-pkg/packagemanager.cc (pkgPackageManager::CheckRConflicts): + Ignore versionless reverse dependencies (mouse). + +* Mon Dec 23 2002 Dmitry V. Levin <ldv@altlinux.org> 0.5.4cnc9-alt4 +- Removed builtin defaults for RPM::Allow-Duplicated and RPM::Hold options + (was added in 0.5.4cnc9-alt1). +- rpmListParser::Package(): removed "kernel" hack. + +* Thu Dec 19 2002 Sviatoslav Sviridov <svd@altlinux.ru> 0.5.4cnc9-alt3 +- patch for check .bz2 extension in file method +- fixed possible segfault in pkgAcquire::Item::Rename + +* Tue Dec 17 2002 Sviatoslav Sviridov <svd@altlinux.ru> 0.5.4cnc9-alt2 +- Updated rsync method: + + Fixed bug leading to race condition. + + Acquire::rsync::options:: in apt.config allows specification + of any user-defined option for /usr/bin/rsync. + + Support port specification in URIs +- Updated README.rsync + +* Tue Dec 03 2002 Dmitry V. Levin <ldv@altlinux.org> 0.5.4cnc9-alt1 +- Reverted 1 of 4 hunks in sorting order fix, to be compatible with upstream. + We will use pkgpriorities instead. +- Renamed rpmpriorities to pkgpriorities and moved it to apt-conf package. +- Several compilation fixes. +- Fixed gettextization. +- Set builtin defaults for RPM::Allow-Duplicated and RPM::Hold options. +- Renumbered patches. +- Replaced patch to genbasedir with shell script. +- genbasedir: + + Added new options: --no-oldhashfile, --newhashfile, --no-newhashfile. + + Enabled generation of both old and new hashfiles by default. +- Do not use __progname in CachedMD5 implementation. +- Fixed apt upgrade trigger. +- Renamed to apt and built for Sisyphus. + +* Mon Dec 02 2002 Kachalov Anton <mouse@altlinux.ru> 0.5.4cnc9-alt0.5 +- Fixed replace support + +* Tue Nov 26 2002 Dmitry V. Levin <ldv@altlinux.org> 0.5.4cnc9-alt0.4 +- Updated genbasedir patch. +- Fixed sorting algorithm (mouse). +- rpmpriorities: removed libs and obsolete packages. + +* Sat Nov 23 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.5.4cnc9-alt0.3 +- utils: add -0.5 suffix to %_cachedir/apt/gen* (to enable caching for the + corresponting utils; <svd@altlinux.ru>); +- describe --mapi in genbasedir usage message; +- include some empty /etc/apt/*.d/ which can be used; + +* Sat Nov 16 2002 Sviatoslav Sviridov <svd@altlinux.ru> 0.5.4cnc9-alt0.2 +- patch for add option "--fancypercent" to rpm +- patch for genbasedir +- Fixed dependencies: + + rsync >= 2.5.5-alt3 (now in sisyphus) for apt-0.5-rsync + + sed for apt-utils (by genbasedir) +- Updated apt.conf: + + added option RPM::Order="true" + +* Mon Oct 28 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.5.4cnc9-alt0.1 +- sync with apt-0.3.19cnc55-alt9: + + rpmpriorities: updated lists (up to alt9); + + %_localstatedir/apt: fixed permissions + (used to be: drwxrws--- root rpm, now: drwxr-xr-x root root); +- apt.conf: APT::GPG::PubringPath -> APT::GPG::Pubring transition + (the default apt.conf and %%triggerun affected); + (this is what you have to do to make signed sources work!) +- port getsrc patch (from ALT's apt-0.3 branch); +- new upstream release: apt-0.5.4cnc9 ("early remove" problems are said + to be solved now). + +* Wed Oct 16 2002 Sviatoslav Sviridov <svd@altlinux.ru> 0.5.4cnc8-alt0.1 +- new release: apt-0.5.4cnc8 + +* Tue Sep 17 2002 Svaitoslav Sviridov <svd@altlinux.ru> 0.5.4cnc7-alt0.1 +- new release: apt-0.5.4cnc7 +- included patch for rsync method + +* Sun Aug 11 2002 Anton V. Denisov <avd@altlinux.ru> 0.5.4cnc6-alt0.1 +- Updated: + + APT-0.5.4cnc6 (bugfix release - fixed some segfaults) + +* Wed Aug 07 2002 Anton V. Denisov <avd@altlinux.ru> 0.5.4cnc5-alt0.2 +- Fixed: + + BuildRequires (updated by new version of buildreq utility) + +* Tue Aug 06 2002 Anton V. Denisov <avd@altlinux.ru> 0.5.4cnc5-alt0.1 +- Fixed: + + Symlinks for ssh and bzip2 methods + + Spec file (%name!=apt - I forgot this) +- Updated: + + APT-0.5.4cnc5 +- Removed: + + apt-0.5.4cnc1-alt-enable-rsh-method.patch + +* Wed Jul 31 2002 Anton V. Denisov <avd@altlinux.ru> 0.5.4cnc4-alt0.1 +- Fixed: + + apt.conf syntax a little + + %doc syntax a little +- Updated: + + APT-0.5.4cnc4 + + BuildRequires +-Removed: + + apt-0.5.4cnc3-alt-configure-version.patch + +* Sat Jul 27 2002 Anton V. Denisov <avd@altlinux.ru> 0.5.4cnc3-alt0.1 +- Fixed: + + libapt-0.5-devel requires + + apt.conf syntax +- Updated: + + APT-0.5.4cnc3 + + apt.conf + + rpmpriorities + + APT Development Team e-mail + + apt-0.5 requires + + select-genlist.patch for new version + + Spec file + + %doc section +- Added: + + Patch for some debug in md5 operations. + + apt-0.5.4cnc3-alt-configure-version.patch + +* Fri Jul 19 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.5.4cnc1-alt0.3 +- make genbasedir-0.5 call gen{pkg,src}list-0.5 respectively + +* Fri Jul 19 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.5.4cnc1-alt0.2 +- fix the trigger script; +- add 0.5 to the package names and apt-utils binaries (to make co-existence + of apt-utils possible). + +* Fri Jul 19 2002 Anton V. Denisov <avd@altlinux.ru> 0.5.4cnc1-alt1 +- New upstream release. +- Some patches regenerated for new version. +- Spec modified for new version. +- It's a just build for Deadalus - not for actual use. +- I just built it but not test yet. + +* Wed Jun 10 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.3.19cnc55-alt6 +- fixes in genbasedir from apt-utils: + + srclist generation: now it correctly includes the information on produced + binaries (the list was empty before), and also correctly treats --mapi + (the fixed bug caused misbehaviour of 'apt-get source', in the "2nd branch + of DoSource()" as referenced by me in previous changelogs); + + --flat option. + +* Mon Jun 09 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.3.19cnc55-alt5 +- renamed the 'build' subpackage to 'utils' (because there is already + an 'apt-build' project at freshmeat.net). + +* Mon Jun 09 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.3.19cnc55-alt4 +- separate subpkg 'build': analoguous to rpm-build, contains teh utilities to + generate indices (as a consequence less dependencies of 'apt' pkg, + little size); +- fix the work of 'apt-get source' for source packages with multiple binaries + with help of feedback and debugging patches from Anton Denisov + <fire@kgpu.kamchatka.ru> (only the first branch of control flow in DoSource() + is fixed, but that should be enough for normal use). + * Tue Mar 26 2002 Dmitry V. Levin <ldv@alt-linux.org> 0.3.19cnc55-alt3 - Added librpm-4.0.4 build support. - Built with librpm-4.0.4, updated buildrequires. @@ -272,16 +614,16 @@ install -p -m644 %SOURCE1 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/%name + updated russian translation (Alexander Bokovoy <ab@altlinux.ru> + updated i18n (Dmitry Levin <ldv@alt-linux.org>) + replaced Apt::GPG::Pubring with Apt::GPG::PubringPath - also uses --homedir instead of --keyring in gpg + also uses --homedir instead of --keyring in gpg (Alexander Bokovoy <ab@altlinux.ru>) - + patch to detect replaced (instead of just removed) packages - Dmitry Levin <ldv@alt-linux.org> + + patch to detect replaced (instead of just removed) packages + Dmitry Levin <ldv@alt-linux.org> + updated mirrors patch + Fixed mirrors infinite loop bug (closes: #4420). + Fixed error handling. - Added: + added kernel-tape to default AllowedDupPkgs - + added patch to fix bug in genbasedir with empty dirs + + added patch to fix bug in genbasedir with empty dirs (Stelian Pop <stelian.pop@fr.alcove.com>) + added -K (RPM::Check-Signatures) option to verify rpm sigs + Added mirrors patch. @@ -299,8 +641,8 @@ install -p -m644 %SOURCE1 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/%name - Added (experimental) replaced packages support. * Fri Sep 07 2001 Ivan Zakharyaschev <imz@altlinux.ru> 0.3.19cnc52-alt3.1 -- apt-cdrom fix (patch 6) reworked: apt-cdrom used to not detect a second - list file (srclist) if both (pkglist and srclist) were present in one +- apt-cdrom fix (patch 6) reworked: apt-cdrom used to not detect a second + list file (srclist) if both (pkglist and srclist) were present in one directory on the disk (in non-thorough mode); hopefully now it works how we expect it to do. @@ -598,3 +940,6 @@ install -p -m644 %SOURCE1 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/%name * Thu Aug 10 2000 Alfredo K. Kojima <kojima@conectiva.com> - initial package creation. Yeah, it's totally broken for sure. +# Local Variables: +# compile-command: "rpmbuild --target=i586 -ba apt.spec" +# End: diff --git a/genbasedir b/genbasedir new file mode 100755 index 0000000..4989c42 --- /dev/null +++ b/genbasedir @@ -0,0 +1,508 @@ +#! /bin/sh +# +# Modified by ALT Linux Team <apt@packages.altlinux.org>. +# Last change by Sviatoslav Sviridov <svd@altlinux.ru>. +# genbasedir was rewritten as mix of genbasedir scripts +# from Connectiva's apt-0.5.4cnc9 and ALT Linux Team's +# apt-0.3.19cnc55-alt9. +# +# The previous version from apt-0.5.4cnc9 was: +# $Id: genbasedir,v 1.6 2002/09/04 22:48:37 niemeyer Exp $ +# +# This script generates the contents of the base/ directory, by creating +# the pkglists and the hash file. Update the components directory to contain +# the components of your repository. +# + +PROG="${0##*/}" + +topdir= + +basedir=. +signature=0 +listonly=0 +hashonly=0 +partial=0 +newhashfile=1 +oldhashfile=1 +mapi= +bz2only=k +updateinfo= +progress= +flat= +defaultkey= +topdir= +create=0 + +# bloat is necessary for non-Conectiva distros, at least RH, +# because they use file dependencies with a non-predictable +# heuristic. So we can't strip-off paths that will probably +# never appear in dependencies. +bloat="" + +# Global release file sections +origin="Unknown" +label="Unknown" +suite="Unknown" +codename="Unknown" +date="`date -R`" +architectures="Unknown" +description="Not Available" + +# Component release file sections +archive="Unknown" +version="Unknown" +architecture="Unknown" +notautomatic="false" + +GENPKGLIST=genpkglist +GENSRCLIST=gensrclist + +function Fatal() +{ + echo "${0##*/}: $*" >&2 + exit 1 +} + +USAGE() +{ + cat >&2 <<EOF +Usage: ${0##*/} [<options>] <distribution> [<comp1> [<comp2> ...]] + +Options: + -s, --sign Generate and sign hashfile + --default-key=ID Use ID as gnupg secret key + --hashonly Do hash stuff only + --listonly Generate pkglists/srclists and quit + --partial Update just some of the already existent components + --newhashfile Enable generation of new style hashfile + --no-newhashfile Disable generation of new style hashfile + --oldhashfile Enable generation of old style hashfile + --no-oldhashfile Disable generation of old style hashfile + --bz2only Generate only compressed lists + --progress Show progress bars for genpkglist/gensrclist + --topdir=dir Top directory of repository + --updateinfo=FILE Update information file + --mapi List only those pkgs in srclist which generate + some binaries + --flat Use flat repository, where SRPMS and RPMS are in + the topdir (SRPMS are usually in 'topdir/..') + --bloat Do not strip the package file list. Needed for some + distributions that use non-automatically generated + file dependencies + --create Create base directory if needed + -h,--help Show this help screen + +Examples: + + ${0##*/} --topdir=/var/ftp/pub/distributions/ALTLinux/Sisyphus i586 + ${0##*/} --topdir=/var/ftp/pub/distributions/ALTLinux/Sisyphus i586 base kernel castle junior master contrib classic non-free +EOF + [ -n "$1" ] && exit "$1" || exit +} + +getsize() +{ + tmp=`wc -c $1` + echo $tmp|cut -f1 -d\ +} + +phashstuff() +{ + size=`getsize "$1"` + md5=`md5sum "$1"|cut -f1 -d\ ` + echo " $md5 $size $2" +} + +TEMP=`getopt -n $PROG -o hs -l help,mapi,listonly,bz2only,hashonly,updateinfo:,bloat,topdir:,sign,default-key:,progress,oldhashfile,newhashfile,no-oldhashfile,no-newhashfile,partial,flat,create -- "$@"` || USAGE +eval set -- "$TEMP" + +while :; do + case "$1" in + --listonly) shift; listonly=1 + ;; + --bz2only) shift; bz2only= + ;; + --hashonly) shift; hashonly=1 + ;; + -s|--sign) shift; signature=1 + ;; + --bloat) shift; bloat="--bloat" + ;; + --mapi) shift; mapi="--mapi" + ;; + --updateinfo) shift; updateinfo="$1"; shift + ;; + --default-key) shift; defaultkey="$1"; shift + ;; + --topdir) shift; topdir="$1"; shift + ;; + --flat) shift; flat="--flat" + ;; + --progress) shift; progress="--progress" + ;; + --partial) shift; partial=1 + ;; + --oldhashfile) shift; oldhashfile=1 + ;; + --no-oldhashfile) shift; oldhashfile=0 + ;; + --newhashfile) shift; newhashfile=1 + ;; + --no-newhashfile) shift; newhashfile=0 + ;; + -h|--help) USAGE 0 + ;; + --create) shift; create=1 + ;; + --) shift; break + ;; + *) echo "$PROG: unrecognized option: $1" >&2; exit 1 + ;; + esac +done + +topdir="`echo -n "$topdir" |tr -s /`" + +[ -n "$topdir" ] || Fatal "TOPDIR not specified." + +cd "$topdir" || Fatal "Invalid TOPDIR specified: $topdir" + +# this will fix the path if it was relative +topdir=`pwd` + +distro="$1" +shift + +components="$*" + +basedir_=base +oldbasedir_="`echo "$distro/$basedir_"|tr -s /`" +basedir="`echo "$topdir/$oldbasedir_"|tr -s /`" + +pkglist_=$basedir_/pkglist +srclist_=$basedir_/srclist +release_=$basedir_/release +oldpkglist_=$oldbasedir_/pkglist +oldsrclist_=$oldbasedir_/srclist +oldrelease_=$oldbasedir_/release +pkglist=$basedir/pkglist +srclist=$basedir/srclist +release=$basedir/release + +if [ -z "$flat" ]; then + srctopdir=`cd $topdir/$distro/..; pwd` +else + srctopdir=`cd $topdir/$distro; pwd` +fi + +WORKDIR= + +exit_handler() +{ + RETVAL=$? + trap '' EXIT + [ -z "$WORKDIR" ] || rm -rf "$WORKDIR" + exit $RETVAL +} + +trap exit_handler SIGHUP SIGPIPE SIGINT SIGQUIT SIGTERM EXIT + +WORKDIR="$(mktemp -dt "$PROG.XXXXXXXXXX")" + +if [ ! -d "$basedir" ]; then + if [ $create -eq 1 ]; then + echo -n "Creating base directory... " + mkdir -p "$basedir" &>/dev/null + if [ $? -ne 0 ]; then + echo "failed" + exit 1 + fi + echo "done" + else + echo "Base directory does not exist!" + exit 1 + fi +fi + +if [ -z "$components" ]; then + # Try to guess components + comps=$WORKDIR/components + : >$comps + for dir in $topdir/$distro/RPMS.* $srctopdir/SRPMS.*; do + if [ -d $dir ]; then + echo $dir | sed 's/.*\.//' >> $comps + fi + done + components=`cat $comps|sort|uniq` + components=`echo $components` # eat newlines + rm -f $comps +fi + +if [ -z "$components" ]; then + echo "error: no components found" 2>&1 + exit 1 +else + echo "Components: $components" +fi + +SRCIDX="$WORKDIR/total" + +#SRCIDX_COMP will be of the form "$WORKDIR/$comp" + +saved_list= + +save_file() +{ + saved_list="$1" + + if [ -f "$saved_list" ]; then + mv -f "$saved_list" "$saved_list.old" + else + saved_list= + fi +} + +compare_file() +{ + if [ -n "$saved_list" -a -f "$saved_list.old" ]; then + if cmp -s "$saved_list.old" "$saved_list"; then + mv -f "$saved_list.old" "$saved_list" + else + rm -f "$saved_list.old" + fi + fi +} + +if [ "$hashonly" -ne 1 ]; then +# package lists +# ------------- + + :>"$SRCIDX" + + echo -n "Processing pkglists... " + for comp in $components; do + if [ ! -d $topdir/$distro/RPMS.$comp ]; then + continue + fi + + echo -n "$comp " + + SRCIDX_COMP="$WORKDIR/$comp" # will be rewritten by genpkglist + + #echo -n "pkglist " + + newlist="$basedir/pkglist.$comp" + + # Save older pkglist + save_file "$newlist" + + if [ -z "$updateinfo" ]; then + (cd "$basedir"; "$GENPKGLIST" $progress $bloat --index "$SRCIDX_COMP" "$topdir/$distro" "$comp") + else + (cd "$basedir"; "$GENPKGLIST" $progress $bloat --index "$SRCIDX_COMP" --info "$updateinfo" "$topdir/$distro" "$comp") + fi + + if [ $? -ne 0 ]; then + echo + echo "Error executing genpkglist." + exit 1 + fi + + # Compare with older pkglist. + compare_file + + if [ -f "$newlist" ]; then + rm -f "$newlist.bz2" + bzip2 -9$bz2only "$newlist" + fi + + cat "$SRCIDX_COMP" >> "$SRCIDX" + + done + echo "done" + + echo -n "Processing srclists... " + for comp in $components; do + if [ ! -d $srctopdir/SRPMS.$comp ]; then + continue + fi + + echo -n " $comp " + + SRCIDX_COMP="$WORKDIR/$comp" # created by genpkglist, used by gensrclist + + #echo -n "srclist " + + newlist="$basedir/srclist.$comp" + + # Save older srclist + save_file "$newlist" + + if [ -z "$mapi" ]; then + # the default case: all .src.rpm in SRPMS.$comp get listed + (cd "$basedir"; "$GENSRCLIST" $progress $flat "$srctopdir" "$comp" "$SRCIDX") + else + # the special case: only those .src.rpm in SRPMS.$comp get listed + # which produce some binaries in RPMS.$comp + (cd "$basedir"; "$GENSRCLIST" $progress $flat $mapi "$srctopdir" "$comp" "$SRCIDX_COMP") + fi + + if [ $? -ne 0 ]; then + echo + echo "Error executing gensrclist." + exit 1 + fi + + # Compare with older srclist. + compare_file + + if [ -f "$newlist" ]; then + rm -f "$newlist.bz2" + bzip2 -9$bz2only "$newlist" + fi + + done + echo "done" +fi + +phash() +{ + if [ -f "$1" ]; then + phashstuff "$1" "$2" >> "$3" + fi +} + +# Creating new style hashfile +if [ "$newhashfile" -ne 0 -a "$listonly" -eq 0 ]; then + echo -n "Creating component releases..." + for comp in $components; do + if [ ! -f "$release.$comp" ]; then + echo -n " $comp" + echo "Archive: $archive" >> $release.$comp + echo "Component: $comp" >> $release.$comp + echo "Version: $version" >> $release.$comp + echo "Origin: $origin" >> $release.$comp + echo "Label: $label" >> $release.$comp + echo "Architecture: $architecture" >> $release.$comp + echo "NotAutomatic: $notautomatic" >> $release.$comp + fi + done + echo " done" + + if [ -f $release ]; then + save_file "$release" + if [ $partial -eq 0 ]; then + echo -n "Updating global release file... " + sed -n -e "/^MD5Sum:/q" \ + -e "s/^Date:.*\$/Date: $date/" \ + -e "s/^Components:.*\$/Components: $components/" \ + -e "p" $release.old > $release + echo "MD5Sum:" >> $release + else + echo -n "Partially updating global release file... " + sed -n -e "/^\$/q" \ + -e "s/^Date:.*\$/Date: $date/" \ + -e "p" $release.old > $release.pre + for comp in $components; do + sed -e "\#^ .* $pkglist_.$comp\(.bz2\)\?\$#d" \ + -e "\#^ .* $srclist_.$comp\(.bz2\)\?\$#d" \ + -e "\#^ .* $release_.$comp\(.bz2\)\?\$#d" \ + -e "s/^\(Components:.*\) $comp\(.*\)\$/\1\2/" \ + $release.pre > $release.tmp + mv -f $release.tmp $release.pre + done + sed -e "s/^\(Components:.*\)\$/\1 $components/" \ + $release.pre > $release + rm -f $release.pre + fi + echo "done" + else + echo -n "Creating global release file... " + echo "Origin: Unknown" >> $release + echo "Label: Unknown" >> $release + echo "Suite: Unknown" >> $release + echo "Codename: Unknown" >> $release + echo "Date: `date -R`" >> $release + echo "Architectures: unknown" >> $release + echo "Components: $components" >> $release + echo "Description: Not available" >> $release + echo "MD5Sum:" >> $release + echo "done" + fi + + echo -n "Appending MD5Sum..." + for comp in $components; do + echo -n " $comp" + phash "$pkglist.$comp" "$pkglist_.$comp" "$release" + phash "$srclist.$comp" "$srclist_.$comp" "$release" + phash "$pkglist.$comp.bz2" "$pkglist_.$comp.bz2" "$release" + phash "$srclist.$comp.bz2" "$srclist_.$comp.bz2" "$release" + phash "$release.$comp" "$release_.$comp" "$release" + done + echo " done" + + echo >> $release + + if [ "$signature" -ne 0 ]; then + if [ -n "$defaultkey" ]; then + DEFAULTKEY="--default-key" + else + DEFAULTKEY= + fi + + gpg -armour -qs --detach-sign --yes $DEFAULTKEY "$defaultkey" $release + cat $release.asc >>$release + rm -f $release.asc + fi + + # Compare with older release + compare_file +fi + +# Creating old style hashfile +if [ "$oldhashfile" -ne 0 -a "$listonly" -eq 0 ]; then + hf="$basedir/hashfile" + save_file "$hf" + : > "$hf" + + # TODO: handle 'partial' option + + echo -n "Creating legacy hashfile..." + echo "MD5SUM:" >> $hf + + for comp in $components; do + echo -n " $comp" + + phash "$pkglist.$comp" "$oldpkglist_.$comp" "$hf" + phash "$srclist.$comp" "$oldsrclist_.$comp" "$hf" + phash "$pkglist.$comp.bz2" "$oldpkglist_.$comp.bz2" "$hf" + phash "$srclist.$comp.bz2" "$oldsrclist_.$comp.bz2" "$hf" + phash "$release.$comp" "$oldrelease_.$comp" "$hf" + done + echo " done" + echo >> $hf + + compare_file + + if [ "$signature" -ne 0 ]; then + if [ -n "$defaultkey" ]; then + DEFAULTKEY="--default-key" + else + DEFAULTKEY= + fi + + # Save older hashfile.gpg + save_file "$basedir/hashfile.gpg" + + gpg -armour -qs --yes $DEFAULTKEY "$defaultkey" $basedir/hashfile + mv -f "$basedir/hashfile.asc" "$basedir/hashfile.gpg" + + # Compare with older hashfile.gpg + compare_file + fi +fi + +echo "All your base are belong to us!!!" + +# vim:ts=4:sw=4 diff --git a/rpmpriorities b/rpmpriorities deleted file mode 100644 index e9b8ea5..0000000 --- a/rpmpriorities +++ /dev/null @@ -1,113 +0,0 @@ -Important: - sh - basesystem - bash - bdflush - bzip2 - bzlib - chkconfig - console-tools - dev - e2fsprogs - ed - etcskel - filesystem - fileutils - findutils - gawk - glib - glibc-core - grep - gzip - info - initscripts - libncurses - libpam - libpopt - libreadline - losetup - mingetty - mkinitrd - mktemp - modutils - mount - ncurses - pam - passwd - procps - psmisc - reiserfs-utils - rootfiles - rpm - sed - setup - shadow-utils - sh-utils - stat - SysVinit - tar - terminfo - textutils - util-linux - zlib -Required: - apt - at - cpio - cpp - crontabs - dhcp - eject - file - finger - ftp - gdbm - groff - isapnptools - less - libpng - libstdc++ - libtermcap - libutempter - lilo - logrotate - mailcap - man - mkbootdisk - mtools - net-tools - libnewt - pciutils - portmap - raidtools - slang - slocate - sysklogd - tcp_wrappers - telnet - termcap - timeconfig - tmpwatch - vim-common - vim-minimal - vixie-cron - which - zip -Standard: - bind-utils - dhcpcd - diffutils - gmp - gpm - ncftp - nfs-utils - openssl - openssh - perl - pidentd - python - rsh - rsync - tcsh - timeconfig - unzip