diff -Nru python-apt-1.0.0~beta3ubuntu1/apt/debfile.py python-apt-1.0.0~beta3.1/apt/debfile.py --- python-apt-1.0.0~beta3ubuntu1/apt/debfile.py 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/apt/debfile.py 2015-07-24 15:51:54.000000000 +0000 @@ -27,7 +27,7 @@ import sys from apt_pkg import gettext as _ -from io import StringIO +from io import BytesIO class NoDebArchiveException(IOError): @@ -637,9 +637,9 @@ data = part.extractdata(name) # check for zip content if name.endswith(".gz") and auto_decompress: - io = StringIO(data) + io = BytesIO(data) gz = gzip.GzipFile(fileobj=io) - data = _("Automatically decompressed:\n\n") + data = _("Automatically decompressed:\n\n").encode("utf-8") data += gz.read() # auto-convert to hex try: diff -Nru python-apt-1.0.0~beta3ubuntu1/apt/package.py python-apt-1.0.0~beta3.1/apt/package.py --- python-apt-1.0.0~beta3ubuntu1/apt/package.py 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/apt/package.py 2015-07-24 15:51:54.000000000 +0000 @@ -90,6 +90,13 @@ def __init__(self, dep): self._dep = dep # apt_pkg.Dependency + def __str__(self): + return '%s: %s' % (self.rawtype, self.rawstr) + + def __repr__(self): + return ('' + % (self.name, self.relation, self.version, self.rawtype)) + @property def name(self): """The name of the target package.""" @@ -97,14 +104,26 @@ @property def relation(self): - """The relation (<, <=, !=, =, >=, >, ). + """The relation (<, <=, =, !=, >=, >, '') in mathematical notation. - Note that the empty string is a valid string as well, if no version - is specified. + The empty string will be returned in case of an unversioned dependency. """ return self.__dstr(self._dep.comp_type) @property + def relation_deb(self): + """The relation (<<, <=, =, !=, >=, >>, '') in Debian notation. + + The empty string will be returned in case of an unversioned dependency. + For more details see the Debian Policy Manual on the syntax of + relationship fields: + https://www.debian.org/doc/debian-policy/ch-relationships.html#s-depsyntax # noqa + + .. versionadded:: 1.0.0 + """ + return self._dep.comp_type_deb + + @property def version(self): """The target version or an empty string. @@ -114,6 +133,27 @@ return self._dep.target_ver @property + def rawstr(self): + """String represenation of the dependency. + + Returns the string representation of the dependency as it would be + written in the debian/control file. The string representation does not + include the type of the dependency. + + Example for an unversioned dependency: + python3 + + Example for a versioned dependency: + python3 >= 3.2 + + .. versionadded:: 1.0.0 + """ + if self.version: + return '%s %s %s' % (self.name, self.relation_deb, self.version) + else: + return self.name + + @property def rawtype(self): """Type of the dependency. @@ -129,26 +169,58 @@ """Whether this is a PreDepends.""" return self._dep.dep_type_untranslated == 'PreDepends' - def __repr__(self): - return ('' - % (self.name, self.relation, self.version, self.pre_depend)) - class Dependency(list): """Represent an Or-group of dependencies. Attributes defined here: or_dependencies - The possible choices + rawstr - String represenation of the Or-group of dependencies + rawtype - The type of the dependencies in the Or-group """ - def __init__(self, alternatives): - super(Dependency, self).__init__() - self.extend(alternatives) + def __init__(self, base_deps, rawtype): + super(Dependency, self).__init__(base_deps) + self._rawtype = rawtype + + def __str__(self): + return '%s: %s' % (self.rawtype, self.rawstr) + + def __repr__(self): + return '' % (', '.join(repr(bd) for bd in self)) @property def or_dependencies(self): return self + @property + def rawstr(self): + """String represenation of the Or-group of dependencies. + + Returns the string representation of the Or-group of dependencies as it + would be written in the debian/control file. The string representation + does not include the type of the Or-group of dependencies. + + Example: + python2 >= 2.7 | python3 + + .. versionadded:: 1.0.0 + """ + return ' | '.join(bd.rawstr for bd in self) + + @property + def rawtype(self): + """Type of the Or-group of dependency. + + This should be one of 'Breaks', 'Conflicts', 'Depends', 'Enhances', + 'PreDepends', 'Recommends', 'Replaces', 'Suggests'. + + Additional types might be added in the future. + + .. versionadded:: 1.0.0 + """ + return self._rawtype + class Origin(object): """The origin of a version. @@ -301,6 +373,9 @@ def __hash__(self): return self._cand.hash + def __str__(self): + return '%s=%s' % (self.package.name, self.version) + def __repr__(self): return '' % (self.package.name, self.version) @@ -468,7 +543,7 @@ base_deps = [] for dep_or in dep_ver_list: base_deps.append(BaseDependency(dep_or)) - depends_list.append(Dependency(base_deps)) + depends_list.append(Dependency(base_deps, type_)) except KeyError: pass return depends_list @@ -700,6 +775,9 @@ return Version(self._package, ver) raise KeyError("Version: %r not found." % (item)) + def __str__(self): + return '[%s]' % (', '.join(str(ver) for ver in self)) + def __repr__(self): return '' % self.keys() @@ -750,6 +828,9 @@ self._pcache = pcache # python cache in cache.py self._changelog = "" # Cached changelog + def __str__(self): + return self.name + def __repr__(self): return '' % ( self._pkg.name, self._pkg.architecture, self._pkg.id) diff -Nru python-apt-1.0.0~beta3ubuntu1/data/templates/Debian.mirrors python-apt-1.0.0~beta3.1/data/templates/Debian.mirrors --- python-apt-1.0.0~beta3ubuntu1/data/templates/Debian.mirrors 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/data/templates/Debian.mirrors 2015-07-24 15:52:35.000000000 +0000 @@ -1,3 +1,5 @@ +#LOC:AM +http://mirrors.asnet.am/debian/ #LOC:AR ftp://ftp.ccc.uba.ar/pub/linux/debian/debian/ http://debian.mirror.utn.edu.ar/debian/ @@ -118,7 +120,6 @@ http://debian.mirror.netelligent.ca/debian/ http://debian.mirror.rafal.ca/debian/ http://debian.savoirfairelinux.net/debian/ -http://debian.yorku.ca/debian/ http://ftp.ca.debian.org/debian/ http://ftp3.nrc.ca/debian/ http://mirror.cpsc.ucalgary.ca/mirror/debian.org/debian/ @@ -190,7 +191,6 @@ ftp://artfiles.org/debian/ ftp://deb-mirror.de/debian/ ftp://debian.mirror.iphh.net/debian/ -ftp://debian.mirror.lrz.de/debian/ ftp://debian.morphium.info/debian/ ftp://debian.netcologne.de/debian/ ftp://debian.tu-bs.de/debian/ @@ -282,11 +282,13 @@ ftp://ftp.udc.es/debian/ ftp://ulises.hostalia.com/debian/ http://debian.grn.cat/debian/ +http://debian.redparra.com/debian/ http://ftp.caliu.cat/debian/ http://ftp.cica.es/debian/ http://ftp.es.debian.org/debian/ http://ftp.gul.uc3m.es/debian/ http://ftp.udc.es/debian/ +http://softlibre.unizar.es/debian/ http://ulises.hostalia.com/debian/ #LOC:FI ftp://ftp.fi.debian.org/debian/ @@ -351,7 +353,6 @@ http://ftp.univ-pau.fr/linux/mirrors/debian/ http://ftp2.fr.debian.org/debian/ http://mirror.debian.ikoula.com/debian/ -http://mirror.ibcp.fr/pub/debian/ http://mirrors.ircam.fr/pub/debian/ http://webb.ens-cachan.fr/debian/ http://www.miroir.vbrunet.eu/debian/ @@ -607,7 +608,9 @@ http://repository.linux.pf/debian/ #LOC:PH ftp://mirror.pregi.net/debian/ +ftp://mirror.rise.ph/debian/ http://mirror.pregi.net/debian/ +http://mirror.rise.ph/debian/ #LOC:PL ftp://ftp.agh.edu.pl/debian/ ftp://ftp.icm.edu.pl/pub/Linux/debian/ @@ -643,11 +646,9 @@ http://mirrors.nfsi.pt/debian/ #LOC:RO ftp://ftp.lug.ro/debian/ -ftp://ftp.ro.debian.org/debian/ ftp://ftp.roedu.net/debian/ ftp://mirrors.xservers.ro/debian/ http://ftp.lug.ro/debian/ -http://ftp.ro.debian.org/debian/ http://ftp.roedu.net/debian/ http://mirrors.serverhost.ro/debian/ http://mirrors.xservers.ro/debian/ @@ -849,6 +850,7 @@ http://mirrors.bloomu.edu/debian/ http://mirrors.cat.pdx.edu/debian/ http://mirrors.centarra.com/debian/ +http://mirrors.e2wsolutions.com/debian/ http://mirrors.gigenet.com/debian/ http://mirrors.kernel.org/debian/ http://mirrors.linux.iu.edu/linux/debian/ diff -Nru python-apt-1.0.0~beta3ubuntu1/data/templates/Ubuntu.mirrors python-apt-1.0.0~beta3.1/data/templates/Ubuntu.mirrors --- python-apt-1.0.0~beta3ubuntu1/data/templates/Ubuntu.mirrors 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/data/templates/Ubuntu.mirrors 2015-07-24 15:52:34.000000000 +0000 @@ -1,6 +1,11 @@ mirror://mirrors.ubuntu.com/mirrors.txt +#LOC:AF +http://repo.unpatti.ac.id/ubuntu/ +#LOC:AM +http://mirrors.asnet.am/ubuntu/ #LOC:AR http://mirrors.coopvgg.com.ar/ubuntu/ +http://ubnt-archive.xfree.com.ar/ubuntu/ http://ubuntu.unc.edu.ar/ubuntu/ #LOC:AT http://gd.tuwien.ac.at/opsys/linux/ubuntu/archive/ @@ -17,7 +22,6 @@ http://mirror.overthewire.com.au/ubuntu/ http://mirror.waia.asn.au/ubuntu/ http://ubuntu.mirror.digitalpacific.com.au/archive/ -http://ubuntu.mirror.serversaustralia.com.au/ubuntu/ http://ubuntu.uberglobalmirror.com/archive/ #LOC:BA http://archive.ubuntu.com.ba/ubuntu/ @@ -38,7 +42,6 @@ http://ubuntu.ipacct.com/ubuntu/ #LOC:BR http://mirror.globo.com/ubuntu/archive/ -http://mirror.unesp.br/ubuntu/ http://sft.if.usp.br/ubuntu/ http://ubuntu-archive.locaweb.com.br/ubuntu/ http://ubuntu.c3sl.ufpr.br/ubuntu/ @@ -103,7 +106,6 @@ http://ftp.hawo.stw.uni-erlangen.de/ubuntu/ http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ http://ftp.rrzn.uni-hannover.de/pub/mirror/linux/ubuntu/ -http://ftp.rz.tu-bs.de/pub/mirror/ubuntu-packages/ http://ftp.stw-bonn.de/ubuntu/ http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ http://ftp.tu-chemnitz.de/pub/linux/ubuntu/ @@ -134,8 +136,6 @@ #LOC:EC http://mirror.cedia.org.ec/ubuntu/ http://mirror.espol.edu.ec/ubuntu/ -#LOC:EE -http://ftp.estpak.ee/ubuntu/ #LOC:ES ftp://ftp.cesca.cat/ubuntu/archieve/ http://ftp.caliu.cat/pub/distribucions/ubuntu/archive/ @@ -172,7 +172,6 @@ http://mirrors.coreix.net/ubuntu/ http://mirrors.melbourne.co.uk/ubuntu/ http://repo.bigstepcloud.com/ubuntu/ -http://ubuntu.datahop.net/ubuntu/ http://ubuntu.mirrors.uk2.net/ubuntu/ http://ubuntu.positive-internet.com/ubuntu/ http://ubuntu.retrosnub.co.uk/ubuntu/ @@ -202,7 +201,9 @@ http://kambing.ui.ac.id/ubuntu/ http://kartolo.sby.datautama.net.id/ubuntu/ http://kebo.pens.ac.id/ubuntu/ +http://mirror.cloud.id/ubuntu/ http://mirror.kavalinux.com/ubuntu/ +http://mirror.omadata.com/ubuntu/ http://mirror.poliwangi.ac.id/ubuntu/ http://mirror.unej.ac.id/ubuntu/ http://suro.ubaya.ac.id/ubuntu/ @@ -213,6 +214,7 @@ #LOC:IN ftp://ftp.iitb.ac.in/distributions/ubuntu/archives/ http://ftp.iitm.ac.in/ubuntu/ +http://mirror.cse.iitk.ac.in/ubuntu/ #LOC:IR http://mirror.iranserver.com/ubuntu/ http://ubuntu.asis.io/ @@ -220,7 +222,7 @@ http://speglar.simnet.is/ubuntu/ #LOC:IT http://giano.com.dist.unige.it/ubuntu/ -http://mirror.crazynetwork.it/ubuntu/archive/ +http://ubuntu.fastbull.org/ubuntu/ http://ubuntu.ictvalleumbra.it/ubuntu/ http://ubuntu.mirror.garr.it/mirrors/ubuntu-archive/ #LOC:JP @@ -242,8 +244,6 @@ http://mirror.premi.st/ubuntu/ #LOC:KZ http://mirror.neolabs.kz/ubuntu/ -#LOC:LK -http://mirror.learn.ac.lk/ubuntu/ #LOC:LT http://ftp.litnet.lt/ubuntu/ http://mirror.soften.ktu.lt/ubuntu/ @@ -261,12 +261,12 @@ http://ubuntu.dts.mg/ubuntu/ #LOC:MK http://mirror.blizoo.mk/ubuntu/ -http://mirror.t-home.mk/ubuntu/ #LOC:MN http://mirror.datacenter.mn/ubuntu/ #LOC:MX http://archive.ubuntu.webxcreen.org/ #LOC:MY +http://ubuntu.ipserverone.com/ubuntu/ http://ubuntu.tuxuri.com/ubuntu/ #LOC:NC http://archive.ubuntu.nautile.nc/ubuntu/ @@ -305,8 +305,9 @@ http://pf.archive.ubuntu.com/ubuntu/ #LOC:PH http://mirror.pregi.net/ubuntu/ +http://mirror.rise.ph/ubuntu/ #LOC:PK -http://mirrors.nayatel.com/ubuntu-archive/ +http://mirrors.nayatel.com/ubuntu/ #LOC:PL ftp://ftp.man.szczecin.pl/pub/Linux/ubuntu/ http://ftp.agh.edu.pl/ubuntu/ @@ -319,7 +320,6 @@ http://mirrors.fe.up.pt/ubuntu/ http://ubuntu.dcc.fc.up.pt/ #LOC:RO -http://ftp.astral.ro/mirrors/ubuntu.com/ubuntu/ http://ftp.gts.lug.ro/ubuntu/ http://ftp.info.uvt.ro/ubuntu/ http://mirrors.pidginhost.com/ubuntu/ @@ -329,6 +329,7 @@ http://linux.nsu.ru/ubuntu/ http://linux.psu.ru/ubuntu/ http://mirror.corbina.net/ubuntu/ +http://mirror.h1host.ru/ubuntu/ http://mirror.logol.ru/ubuntu/ http://mirror.rol.ru/ubuntu/ http://mirror.timeweb.ru/ubuntu/ @@ -338,7 +339,6 @@ http://ftp.availo.se/ubuntu/ http://ftp.df.lth.se/ubuntu/ http://ftp.lysator.liu.se/ubuntu/ -http://ftp.sunet.se/pub/os/Linux/distributions/ubuntu/ubuntu/ http://mirrors.se.eu.kernel.org/ubuntu/ http://ubuntu.cybercomhosting.com/ubuntu/ http://ubuntu.mirror.su.se/ubuntu/ @@ -355,9 +355,11 @@ http://mirror1.ku.ac.th/ubuntu/ http://mirrors.psu.ac.th/ubuntu/ http://ubuntu-mirror.totbb.net/ubuntu/ +#LOC:TN +http://ubuntu.mirror.tn/ubuntu/ #LOC:TR http://ftp.linux.org.tr/ubuntu/ -http://ubuntu.gnu.gen.tr/ubuntu/ +http://ubuntu.saglayici.com/ubuntu/ #LOC:TW http://free.nchc.org.tw/ubuntu/ http://ftp.cs.pu.edu.tw/Linux/Ubuntu/ubuntu/ @@ -366,10 +368,10 @@ http://ftp.stust.edu.tw/pub/Linux/ubuntu/ http://ftp.tku.edu.tw/ubuntu/ http://ftp.ubuntu-tw.net/mirror/ubuntu/ -http://ftp.yzu.edu.tw/ubuntu/ http://mirror01.idc.hinet.net/ubuntu/ http://tw.archive.ubuntu.com/ubuntu/ http://ubuntu.cs.nctu.edu.tw/ubuntu/ +http://ubuntu.stu.edu.tw/ubuntu/ #LOC:TZ http://deb-mirror.habari.co.tz/ubuntu/ http://mirror.aptus.co.tz/pub/ubuntuarchive/ @@ -394,6 +396,7 @@ http://mirror.clarkson.edu/ubuntu/ http://mirror.cogentco.com/pub/linux/ubuntu/ http://mirror.hmc.edu/ubuntu/ +http://mirror.htnshost.com/ubuntu/ http://mirror.jmu.edu/pub/ubuntu/ http://mirror.lcsee.wvu.edu/ubuntu/ http://mirror.lstn.net/ubuntu/ @@ -407,15 +410,12 @@ http://mirror.steadfast.net/ubuntu/ http://mirror.symnds.com/ubuntu/ http://mirror.team-cymru.org/ubuntu/ -http://mirror.thelinuxfix.com/ubuntu/ http://mirror.tocici.com/ubuntu/ http://mirror.umd.edu/ubuntu/ http://mirror.uoregon.edu/ubuntu/ http://mirror.us.leaseweb.net/ubuntu/ http://mirrordenver.fdcservers.net/ubuntu/ -http://mirrors.200p-sf.sonic.net/ubuntu/ http://mirrors.accretive-networks.net/ubuntu/ -http://mirrors.acm.jhu.edu/ubuntu/ http://mirrors.advancedhosters.com/ubuntu/ http://mirrors.arpnetworks.com/Ubuntu/ http://mirrors.bloomu.edu/ubuntu/ @@ -435,10 +435,10 @@ http://mirrors.usinternet.com/ubuntu/archive/ http://mirrors.vpsie.com/ubuntu/ http://mirrors.xmission.com/ubuntu/ -http://pubmirrors.dal.corespace.com/ubuntu/ http://reflector.westga.edu/repos/Ubuntu/archive/ http://repo.atlantic.net/ubuntu/ http://ubuntu.cs.utah.edu/ubuntu/ +http://ubuntu.localmsp.org/ubuntu/ http://ubuntu.mirror.constant.com/ http://ubuntu.mirror.frontiernet.net/ubuntu/ http://ubuntu.mirrors.pair.com/archive/ @@ -446,7 +446,7 @@ http://ubuntu.mirrors.wvstateu.edu/ http://ubuntu.osuosl.org/ubuntu/ http://ubuntu.securedservers.com/ -http://ubuntu.stjschools.org/archive/ +http://ubuntu.stjschools.org/public/ubuntu-archive/ http://ubuntu.wallawalla.edu/ubuntu/ http://ubuntu.wikimedia.org/ubuntu/ http://ubuntuarchive.mirror.nac.net/ @@ -459,6 +459,7 @@ #LOC:VN http://mirror-fpt-telecom.fpt.net/ubuntu/ http://mirror.nhanhoa.com/Ubuntu/archive/ +http://opensource.xtdv.net/ubuntu/ #LOC:ZA http://ftp.leg.uct.ac.za/ubuntu/ http://ubuntu.mirror.neology.co.za/ubuntu/ diff -Nru python-apt-1.0.0~beta3ubuntu1/debian/changelog python-apt-1.0.0~beta3.1/debian/changelog --- python-apt-1.0.0~beta3ubuntu1/debian/changelog 2015-07-16 16:26:57.000000000 +0000 +++ python-apt-1.0.0~beta3.1/debian/changelog 2015-07-24 15:51:54.000000000 +0000 @@ -1,16 +1,24 @@ -python-apt (1.0.0~beta3ubuntu1) wily; urgency=medium +python-apt (1.0.0~beta3.1) unstable; urgency=medium - * To properly conform to PEP 479 and Python 3.5, __iter__() methods - should return when exhausted instead of raising StopIterator. This - diff can be dropped when Debian bug #792606 is fixed released. + [ Michael Vogt ] + * fix py3 issue with auto .gz decompression and add test + * updated for the gcc5 transition + + [ Julian Andres Klode ] + * doc/source/conf.py: Reproducibility: Set html_last_updated_fmt = None + + [ Michael Schaller ] + * BaseDependency.__repr__: Replace pre_depend with rawtype + * apt/package.py: Add rawtype property to Dependency class + * Add dependency comparison (aka. relation) type in Debian notation + * apt/package.py: Add missing __str__ and __repr__ methods + * doc/source/library/apt_pkg.rst: Remove trailing whitespace + * apt_pkg.Dependency.all_targets: Fix the documentation - -- Barry Warsaw Thu, 16 Jul 2015 12:25:23 -0400 + [ Barry Warsaw ] + * python-apt: Python 3.5 and PEP 479 support (Closes: #792606) -python-apt (1.0.0~beta3build1) wily; urgency=medium - - * No change rebuild for python3.5. - - -- Brian Murray Wed, 15 Jul 2015 15:47:21 -0700 + -- Michael Vogt Fri, 24 Jul 2015 17:51:25 +0200 python-apt (1.0.0~beta3) unstable; urgency=medium diff -Nru python-apt-1.0.0~beta3ubuntu1/debian/control python-apt-1.0.0~beta3.1/debian/control --- python-apt-1.0.0~beta3ubuntu1/debian/control 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/debian/control 2015-08-03 09:26:14.000000000 +0000 @@ -6,12 +6,12 @@ Standards-Version: 3.9.6 X-Python-Version: >= 2.7 X-Python3-Version: >= 3.3 -Build-Depends: apt (>= 1.0.9.4), +Build-Depends: apt (>= 1.0.10), g++ (>= 4:5.2), apt-utils, debhelper (>= 9), dh-python, fakeroot, - libapt-pkg-dev (>= 1.0.4~), + libapt-pkg-dev (>= 1.0.10~), python-all-dev (>= 2.7), python-all-dbg, python3-all-dev (>= 3.3), diff -Nru python-apt-1.0.0~beta3ubuntu1/doc/source/conf.py python-apt-1.0.0~beta3.1/doc/source/conf.py --- python-apt-1.0.0~beta3ubuntu1/doc/source/conf.py 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/doc/source/conf.py 2015-07-24 15:51:54.000000000 +0000 @@ -164,7 +164,7 @@ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -html_last_updated_fmt = '%b %d, %Y' +html_last_updated_fmt = None # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff -Nru python-apt-1.0.0~beta3ubuntu1/doc/source/library/apt_pkg.rst python-apt-1.0.0~beta3.1/doc/source/library/apt_pkg.rst --- python-apt-1.0.0~beta3ubuntu1/doc/source/library/apt_pkg.rst 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/doc/source/library/apt_pkg.rst 2015-07-24 15:51:54.000000000 +0000 @@ -309,7 +309,7 @@ Return ``True`` if the package is now broken, that is, if the package is broken if the marked changes are applied. - + .. method:: is_upgradable(pkg: Package) -> bool Return ``True`` if the package is upgradable, the package can then @@ -381,7 +381,7 @@ Abstraction of a package manager. This object takes care of retrieving packages, ordering the installation, and calling the package manager to do the actual installation. - + .. method:: get_archives(fetcher, list, records) -> bool Add all packages marked for installation (or upgrade, anything @@ -422,11 +422,11 @@ A constant for checking whether the result of the call to :meth:`do_install` is 'incomplete'. - + All instances of this class also support the following methods: - + .. note:: - + This methods are provided mainly for subclassing purposes and should not be used in most programs. This class is a subclass of an internal :class:`_PackageManager` which does @@ -434,54 +434,54 @@ an object without those methods, you should not rely on those methods to be available unless you used the constructor of :class:`PackageManager` to create the object. - - .. method:: configure(pkg: Package) -> bool + + .. method:: configure(pkg: Package) -> bool Notify the package manager that the :class:`Package` given by *pkg* is to be configured. Must return a ``True`` value or ``None`` to continue, or a value which is ``False`` if evaluated as boolean to abort. - + .. versionadded:: 0.8.0 - .. method:: install(pkg: Package, filename: str) -> bool + .. method:: install(pkg: Package, filename: str) -> bool Notify the package manager that the :class:`Package` given by *pkg* is to be installed from the .deb located at *filename*. Must return a ``True`` value or ``None`` to continue, or a value which is ``False`` if evaluated as boolean to abort. - - + + .. versionadded:: 0.8.0 - .. method:: remove(pkg: Package, purge: bool) -> bool + .. method:: remove(pkg: Package, purge: bool) -> bool Notify the package manager that the :class:`Package` given by *pkg* is to be removed. If *purge* is ``True``, the package shall be purged. Must return a ``True`` value or ``None`` to continue, or a value which is ``False`` if evaluated as boolean to abort. - - + + .. versionadded:: 0.8.0 - - .. method:: go(status_fd: int) -> bool - + + .. method:: go(status_fd: int) -> bool + Start dpkg, writing status information to the file descriptor given by *status_fd*. Must return a ``True`` value or ``None`` to continue, or a value which is ``False`` if evaluated as boolean to abort. - + .. versionadded:: 0.8.0 .. method:: reset() Reset the package manager for a new round. - + .. versionadded:: 0.8.0 - + Installation ordering with :class:`OrderList` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -490,38 +490,38 @@ Represent a :c:type:`pkgOrderList`, used for installation ordering. This class provides several methods and attributes, is complicated and should not be used by normal programs. - + .. versionadded:: 0.8.0 - + This class is a sequence and supports the following operations: - + .. describe:: list[index] - + Get the package at the given index in the list. Negative index is supported. - + .. describe:: len(list) - + The length of the list. - + It also supports the append() method from :class:`list`: - + .. method:: append(pkg: Package) - + Append a new package to the end of the list. Please note that you may not append a package twice, as only as much packages as in the cache can be added. - + The class also defines several specific attributes and methods, to be described hereinafter. - + .. method:: score(pkg: Package) - + Return the score of the package. Packages are basically ordered by descending score. - + This class allows flags to be set on packages. Those flags are: - + .. attribute:: FLAG_ADDED .. attribute:: FLAG_ADD_PENDING .. attribute:: FLAG_IMMEDIATE @@ -530,27 +530,27 @@ .. attribute:: FLAG_CONFIGURED .. attribute:: FLAG_REMOVED .. attribute:: FLAG_STATES_MASK - + Same as ``FLAG_UNPACKED | FLAG_CONFIGURED | FLAG_REMOVED`` - + .. attribute:: FLAG_IN_LIST .. attribute:: FLAG_AFTER - + The methods to work with those flags are: - + .. method:: flag(pkg: Package, flag: int[, unset_flags: int]) Flag a package. Sets the flags given in *flag* and unsets any flags given in *unset_flags*. - + .. method:: is_flag(pkg: Package, flag: int) - + Check whether the flags in *flag* are set for the package. - + .. method:: wipe_flags(flags: int) - + Remove the flags in *flags* from all packages. - + .. method:: is_missing(pkg: Package) Check if the package is missing (not really usable right now) @@ -558,21 +558,21 @@ .. method:: is_now(pkg: Package) Check if the package is flagged for any state but removal. - + The following methods for ordering are provided: - + .. method:: order_critical() - + Order the packages for critical unpacking; that is, only respect pre-dependencies. - + .. method:: order_unpack() - + Order the packages for unpacking, repecting Pre-Depends and Conflicts. - + .. method:: order_configure() - + Order the packages for configuration, respecting Depends. Improve performance with :class:`ActionGroup` @@ -688,7 +688,7 @@ If **prefer_nonvirtual** is ``True``, the preferred package will be a non-virtual package, if one exists. - + :class:`Package` information ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -908,49 +908,49 @@ .. attribute:: installed_size The size of the package (in kilobytes), when unpacked on the disk. - + .. attribute:: multi_arch - + The multi-arch state of the package. Can be one of the following attributes. - + .. attribute:: MULTI_ARCH_NO - + No multi-arch - + .. attribute:: MULTI_ARCH_ALL - + An ``Architecture: all`` package - - + + .. attribute:: MULTI_ARCH_FOREIGN - + Can satisfy dependencies of foreign-architecture packages - + .. attribute:: MULTI_ARCH_ALL_FOREIGN - + :attr:`MULTI_ARCH_FOREIGN` for ``Architecture: all`` packages. - + .. attribute:: MULTI_ARCH_SAME - + Multiple versions from different architectures may be installed in parallel, but may only satisfy dependencies of packages from the same architecture - + .. attribute:: MULTI_ARCH_ALLOWED - + Installation in parallel and satisfying ``pkg:any`` style dependencies is allowed. - + .. attribute:: MULTI_ARCH_ALL_ALLOWED - + :attr:`MULTI_ARCH_ALLOWED` for ``Architecture: all`` packages. - - - + + + .. attribute:: parent_pkg @@ -993,7 +993,7 @@ .. attribute:: ver_str The version, as a string. - + :class:`Dependency` @@ -1004,13 +1004,8 @@ .. method:: all_targets - A list of :class:`Version` objects which satisfy the dependency, - and do not conflict with already installed ones. - - From my experience, if you use this method to select the target - version, it is the best to select the last item unless any of the - other candidates is already installed. This leads to results being - very close to the normal package installation. + A list of all possible target :class:`Version` objects which satisfy + this dependency. .. method:: smart_target_pkg @@ -1085,15 +1080,15 @@ .. attribute:: TYPE_PREDEPENDS Constant for checking against dep_type_enum - + .. attribute:: TYPE_RECOMMENDS Constant for checking against dep_type_enum - + .. attribute:: TYPE_REPLACES Constant for checking against dep_type_enum - + .. attribute:: TYPE_SUGGESTS Constant for checking against dep_type_enum @@ -1134,7 +1129,7 @@ compared to the *DepCache* class. The DepCache can be used for most purposes, but there may be some cases where a special policy class is needed. - + .. method:: create_pin(type: str, pkg: str, data: str, priority: int) Create a pin for the policy. The parameter *type* refers to one of the @@ -1142,7 +1137,7 @@ name of the package. The parameter *data* refers to the value (such as 'unstable' for type='Release') and the other possible options. The parameter 'priority' gives the priority of the pin. - + .. method:: get_candidate_ver(package: apt_pkg.Package) -> apt_pkg.Version Get the best package for the job; that is, the package with the @@ -1177,16 +1172,16 @@ .. attribute:: uri The URI the meta index file is located at, as a string. - + .. attribute:: dist The distribution stored in the meta index, as a string. - + .. attribute:: is_trusted A boolean value determining whether the meta index can be trusted. This is ``True`` for signed Release files. - + .. attribute:: index_files A list of all :class:`IndexFile` objects associated with this meta @@ -1429,7 +1424,7 @@ Provide an easy way to look up the records of source packages and provide easy attributes for some widely used fields of the record. - + .. note:: If the Lookup failed, because no package could be found, no error is @@ -1535,7 +1530,7 @@ :class:`apt.progress.base.AcquireProgress` object. This object may then report progress information (see :mod:`apt.progress.text` for reporting progress to a I/O stream). - + Acquire items have two methods to start and stop the fetching: .. method:: run() -> int @@ -1697,7 +1692,7 @@ .. attribute:: STAT_FETCHING The item is being fetched currently. - + .. attribute:: STAT_IDLE The item is yet to be fetched. @@ -1845,7 +1840,7 @@ separated by a colon as the only argument. For example:: HashString("MD5Sum:d41d8cd98f00b204e9800998ecf8427e") - + .. describe:: str(hashstring) @@ -1952,7 +1947,7 @@ .. versionadded:: 0.8.5 Added support for using bytes instead of str in Python 3 - + .. method:: next() A TagFile is its own iterator. This method is part of the iterator @@ -2029,7 +2024,7 @@ .. method:: get(key: str, default: str = '') Return the value of the field at the key *key* if available, else - return *default*. + return *default*. .. method:: keys() @@ -2069,7 +2064,7 @@ Check that the given requirement is fulfilled; that is, that the version string given by *pkg_ver* matches the version string *dep_ver* under the condition specified by the operator 'dep_op' (<,<=,=,>=,>). - + Return True if *pkg_ver* matches *dep_ver* under the condition 'dep_op'; for example:: @@ -2173,7 +2168,7 @@ .. method:: get(key[, default='']) -> str Find the value for the given key and return it. If the given key does - not exist, return *default* instead. + not exist, return *default* instead. In addition, they provide methods to resemble the interface provided by the C++ class and some more mapping methods which have been enhanced @@ -2255,7 +2250,7 @@ is given, a list of all its children. This method is comparable to the **keys** method of a mapping object, but additionally provides the parameter *key*. - + .. method:: list([key]) Return a non-recursive list of all configuration options. If *key* @@ -2323,9 +2318,9 @@ Parse the command line in *argv* into the configuration space. The list *options* contains a list of 3-tuples or 4-tuples in the form:: - + (short_option: str, long_option: str, variable: str[, type: str]) - + The element *short_option* is one character, the *long_option* element is the name of the long option, the element *variable* the name of the configuration option the result will be stored in and *type* is one of @@ -2663,7 +2658,7 @@ .. data:: INSTSTATE_HOLD_REINSTREQ The package is put on hold, but broken and has to be reinstalled. - + .. data:: INSTSTATE_OK The package is OK. @@ -2683,7 +2678,7 @@ .. data:: PRI_IMPORTANT The integer representation of the priority 'important'. - + .. data:: PRI_OPTIONAL The integer representation of the priority 'optional'. @@ -2712,7 +2707,7 @@ .. data:: SELSTATE_INSTALL The package is selected for installation. - + .. data:: SELSTATE_PURGE The package is selected to be purged. diff -Nru python-apt-1.0.0~beta3ubuntu1/po/python-apt.pot python-apt-1.0.0~beta3.1/po/python-apt.pot --- python-apt-1.0.0~beta3ubuntu1/po/python-apt.pot 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/po/python-apt.pot 2015-08-03 09:28:34.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-06-10 15:57+0200\n" +"POT-Creation-Date: 2015-08-03 09:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -512,16 +512,16 @@ msgid "Custom servers" msgstr "" -#: ../apt/package.py:380 +#: ../apt/package.py:457 #, python-format msgid "Invalid unicode in description for '%s' (%s). Please report." msgstr "" -#: ../apt/package.py:951 ../apt/package.py:1057 +#: ../apt/package.py:1041 ../apt/package.py:1147 ../apt/package.py:1161 msgid "The list of changes is not available" msgstr "" -#: ../apt/package.py:1063 +#: ../apt/package.py:1154 #, python-format msgid "" "The list of changes is not available yet.\n" @@ -530,7 +530,7 @@ "until the changes become available or try again later." msgstr "" -#: ../apt/package.py:1070 +#: ../apt/package.py:1164 msgid "" "Failed to download the list of changes. \n" "Please check your Internet connection." @@ -577,44 +577,44 @@ "the '%(debfile)s' provides it via: '%(provides)s'" msgstr "" -#: ../apt/debfile.py:488 +#: ../apt/debfile.py:493 msgid "No Architecture field in the package" msgstr "" -#: ../apt/debfile.py:498 +#: ../apt/debfile.py:503 #, python-format msgid "Wrong architecture '%s'" msgstr "" -#: ../apt/debfile.py:506 +#: ../apt/debfile.py:512 msgid "A later version is already installed" msgstr "" -#: ../apt/debfile.py:531 +#: ../apt/debfile.py:537 msgid "Failed to satisfy all dependencies (broken cache)" msgstr "" -#: ../apt/debfile.py:560 +#: ../apt/debfile.py:566 #, python-format msgid "Cannot install '%s'" msgstr "" -#: ../apt/debfile.py:636 +#: ../apt/debfile.py:642 msgid "" "Automatically decompressed:\n" "\n" msgstr "" -#: ../apt/debfile.py:642 +#: ../apt/debfile.py:648 msgid "Automatically converted to printable ascii:\n" msgstr "" -#: ../apt/debfile.py:746 +#: ../apt/debfile.py:753 #, python-format msgid "Install Build-Dependencies for source package '%s' that builds %s\n" msgstr "" -#: ../apt/debfile.py:757 +#: ../apt/debfile.py:764 msgid "An essential package would be removed" msgstr "" @@ -664,7 +664,3 @@ #: ../apt/progress/text.py:263 msgid "Please insert a Disc in the drive and press enter" msgstr "" - -#: ../apt/cache.py:163 -msgid "Building data structures" -msgstr "" diff -Nru python-apt-1.0.0~beta3ubuntu1/python/cache.cc python-apt-1.0.0~beta3.1/python/cache.cc --- python-apt-1.0.0~beta3ubuntu1/python/cache.cc 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/python/cache.cc 2015-07-24 15:51:54.000000000 +0000 @@ -238,7 +238,7 @@ static PyObject *PkgCacheGetIsMultiArch(PyObject *Self, void*) { pkgCache *Cache = GetCpp(Self); return PyBool_FromLong(Cache->MultiArchCache()); -} +} static PyGetSetDef PkgCacheGetSet[] = { {"depends_count",PkgCacheGetDependsCount,0, @@ -634,7 +634,7 @@ &pretty) == 0) return 0; - + return CppPyString(Pkg.FullName(pretty)); } @@ -1388,7 +1388,8 @@ "of the target package."}, {"all_targets",DepAllTargets,METH_VARARGS, "all_targets() -> list\n\n" - "A list of all apt_pkg.Version objects satisfying the dependency."}, + "A list of all possible apt_pkg.Version objects which satisfy this\n" + "dependency."}, {} }; @@ -1433,6 +1434,12 @@ return PyString_FromString(Dep.CompType()); } +static PyObject *DependencyGetCompTypeDeb(PyObject *Self,void*) +{ + pkgCache::DepIterator &Dep = GetCpp(Self); + return PyString_FromString(pkgCache::CompTypeDeb(Dep->CompareOp)); +} + static PyObject *DependencyGetDepType(PyObject *Self,void*) { pkgCache::DepIterator &Dep = GetCpp(Self); @@ -1459,8 +1466,17 @@ static PyGetSetDef DependencyGetSet[] = { {"comp_type",DependencyGetCompType,0, - "The type of comparison, as a string, namely one of:\n" - "'<', '<=', '=', '!=', '>=', '>', ''."}, + "The type of comparison in mathematical notation, as a string, namely one " + "of:\n" + "'<', '<=', '=', '!=', '>=', '>', ''.\n" + "The empty string will be returned in case of an unversioned dependency."}, + {"comp_type_deb",DependencyGetCompTypeDeb,0, + "The type of comparison in Debian notation, as a string, namely one of:\n" + "'<<', '<=', '=', '!=', '>=', '>>', ''.\n" + "The empty string will be returned in case of an unversioned dependency.\n" + "For details see the Debian Policy Manual on the syntax of relationship " + "fields:\n" + "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-depsyntax"}, {"dep_type",DependencyGetDepType,0, "The type of the dependency; may be translated"}, {"dep_type_untranslated",DependencyGetDepTypeUntranslated,0, diff -Nru python-apt-1.0.0~beta3ubuntu1/python/tarfile.cc python-apt-1.0.0~beta3.1/python/tarfile.cc --- python-apt-1.0.0~beta3ubuntu1/python/tarfile.cc 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/python/tarfile.cc 2015-07-24 15:51:54.000000000 +0000 @@ -53,7 +53,7 @@ virtual bool DoItem(Item &Itm,int &Fd); virtual bool FinishedFile(Item &Itm,int Fd); -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 14) +#if (APT_PKG_MAJOR >= 5 && APT_PKG_MINOR >= 0) virtual bool Process(Item &Itm,const unsigned char *Data, unsigned long long Size,unsigned long long Pos); #else @@ -106,7 +106,7 @@ return true; } -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 14) +#if (APT_PKG_MAJOR >= 5 && APT_PKG_MINOR >= 0) bool PyDirStream::Process(Item &Itm,const unsigned char *Data, unsigned long long Size,unsigned long long Pos) #else diff -Nru python-apt-1.0.0~beta3ubuntu1/tests/data/aptsources/sources.list.enable_comps python-apt-1.0.0~beta3.1/tests/data/aptsources/sources.list.enable_comps --- python-apt-1.0.0~beta3ubuntu1/tests/data/aptsources/sources.list.enable_comps 1970-01-01 00:00:00.000000000 +0000 +++ python-apt-1.0.0~beta3.1/tests/data/aptsources/sources.list.enable_comps 2015-08-03 09:28:26.000000000 +0000 @@ -0,0 +1 @@ +deb http://archive.ubuntu.com/ubuntu lucid main Binary files /tmp/ICB9PzeO1F/python-apt-1.0.0~beta3ubuntu1/tests/data/test_debs/gdebi-test13.deb and /tmp/1z91PKig81/python-apt-1.0.0~beta3.1/tests/data/test_debs/gdebi-test13.deb differ Binary files /tmp/ICB9PzeO1F/python-apt-1.0.0~beta3ubuntu1/tests/data/test-provides/var/cache/apt/pkgcache.bin and /tmp/1z91PKig81/python-apt-1.0.0~beta3.1/tests/data/test-provides/var/cache/apt/pkgcache.bin differ Binary files /tmp/ICB9PzeO1F/python-apt-1.0.0~beta3ubuntu1/tests/data/test-provides/var/cache/apt/srcpkgcache.bin and /tmp/1z91PKig81/python-apt-1.0.0~beta3.1/tests/data/test-provides/var/cache/apt/srcpkgcache.bin differ diff -Nru python-apt-1.0.0~beta3ubuntu1/tests/fetch_sources.list python-apt-1.0.0~beta3.1/tests/fetch_sources.list --- python-apt-1.0.0~beta3ubuntu1/tests/fetch_sources.list 1970-01-01 00:00:00.000000000 +0000 +++ python-apt-1.0.0~beta3.1/tests/fetch_sources.list 2015-08-03 09:28:30.000000000 +0000 @@ -0,0 +1 @@ +deb file:/home/packages/tmp/python-apt-1.0.0~beta3.1/tests/data/fake-packages/ / diff -Nru python-apt-1.0.0~beta3ubuntu1/tests/test_debfile.py python-apt-1.0.0~beta3.1/tests/test_debfile.py --- python-apt-1.0.0~beta3ubuntu1/tests/test_debfile.py 2015-07-16 16:23:02.000000000 +0000 +++ python-apt-1.0.0~beta3.1/tests/test_debfile.py 2015-07-24 15:51:54.000000000 +0000 @@ -178,6 +178,11 @@ "./data/test_debs/testdep-same-arch_1.0-1_i386.deb") self.assertTrue(same.check(), same._failure_string) + def test_get_content_gzip_data(self): + deb = apt.debfile.DebPackage("./data/test_debs/gdebi-test13.deb") + data = deb.data_content("./lala.gz") + self.assertEqual(data, "Automatically decompressed:\n\nlala\n") + if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) diff -Nru python-apt-1.0.0~beta3ubuntu1/tests/tmp/_home_packages_tmp_python-apt-1.0.0%7ebeta3.1_tests_data_fake-packages_Packages python-apt-1.0.0~beta3.1/tests/tmp/_home_packages_tmp_python-apt-1.0.0%7ebeta3.1_tests_data_fake-packages_Packages --- python-apt-1.0.0~beta3ubuntu1/tests/tmp/_home_packages_tmp_python-apt-1.0.0%7ebeta3.1_tests_data_fake-packages_Packages 1970-01-01 00:00:00.000000000 +0000 +++ python-apt-1.0.0~beta3.1/tests/tmp/_home_packages_tmp_python-apt-1.0.0%7ebeta3.1_tests_data_fake-packages_Packages 2015-07-24 15:51:54.000000000 +0000 @@ -0,0 +1,21 @@ +Package: 2vcard +Priority: optional +Section: universe/utils +Installed-Size: 108 +Maintainer: Arvind Autar +Architecture: amd64 +Version: 0.5-1ubuntu1 +Filename: pool/universe/2/2vcard/2vcard_0.5-1ubuntu1_amd64.deb +Size: 14164 +MD5sum: 105ea91f0a75417d0f9e8e9624513b2a +SHA1: d55beee01c08efc33cd131e106330dca72ee14be +SHA256: 4a72edaf87cdb826e5508b85311fcf0bec9b7e019a55740ded7feb1b9e197f11 +Description: A little perl script to convert an adressbook to VCARD file format + 2vcard is a little perl script that you can use to convert the popular vcard + file format. Currently 2vcard can only convert adressbooks and alias files from + the following formats: abook,eudora,juno,ldif,mutt,mh and pine. + . + The VCARD format is used by gnomecard, for example, which is turn is used by + the balsa email client. +Bugs: mailto:ubuntu-users@lists.ubuntu.com +Origin: Ubuntu