[Bug 194374] Re: Provide example for apt_pkg.config.find("APT::Architecture")
Launchpad Bug Tracker
194374 at bugs.launchpad.net
Thu May 26 16:05:12 UTC 2011
This bug was fixed in the package python-apt - 0.8.0~exp4ubuntu1
---------------
python-apt (0.8.0~exp4ubuntu1) oneiric; urgency=low
* Merged from debian/experimental, remaining changes:
- updated mirror list
- do not disable 0.7 compat API yet
python-apt (0.8.0~exp4) experimental; urgency=low
* apt_pkg: Add OrderList, wanted for mancoosi (Closes: #623485)
* apt_pkg: Add subclassing fun to PackageManager, for #623485 as well
* apt.cache: Emit change signals in ProblemResolver
* apt.Cache: Add a _changes_count member for later use
python-apt (0.8.0~exp3) experimental; urgency=low
[ Stéphane Graber ]
* Update enable_component to also apply to -src entries (LP: #758732)
[ Julian Andres Klode ]
* apt_pkg: Add apt_pkg.Version.multi_arch and friends
python-apt (0.8.0~exp2) experimental; urgency=low
* aptsources: Parse multi-arch sources.list files correctly
* aptsources: Allow insertion of new multi-arch entries
* aptsources: Various cleanup work
* all: Fix all instances of ResourceWarning about unclosed files
* tests/test_apt_cache.py: Use assertTrue() instead of assert_()
* apt_pkg: Raise error when parse_commandline gets empty argv (LP: #707416)
* apt_pkg: Fix time_to_str, time_rfc1123 to accept more correct values
(time_to_str accepts unsigned long, time_rfc1123 long long, y2k31-correct).
* apt.progress: Use long for ETA, natural type for size (LP: #377375)
* aptsources/sourceslist.py: s/aptsource.py/sourceslist.py/ (LP: #309603)
* doc/examples: Add example on how to get architecture names (LP: #194374)
* apt_pkg: Fix unsigned/long-vs-int issues (LP: #610820)
* apt.cache: Document that update() may need an open() (Closes: #622342)
* apt.cache: Add a fetch_archives() method (Closes: #622347)
* doc: Fix a minor formatting error, patch by Jakub Wilk (Closes: #608914)
* apt.package: Add 'tasks' to Version, improve doc (Closes: #619574)
* doc: Fix documentation of BaseDependency.relation (Closes: #607031)
python-apt (0.8.0~exp1) experimental; urgency=low
* Disable the old-style API, and break all packages using it
* Add an 'is_multi_arch' attribute to apt_pkg.Cache
* Add apt_pkg.Group class, wrapping pkgCache::GrpIterator
* Change apt_pkg.Cache() so that passing None for 'progress' results in
no progress output
* Support (name, arch) tuples in apt_pkg.Cache mappings, wrapping
FindPkg() with two string parameters.
* Introduce apt_pkg.Cache.groups and apt_pkg.Cache.group_count
* Fix debian/rules to work correctly with tilde in version number
-- Michael Vogt <michael.vogt at ubuntu.com> Tue, 24 May 2011 10:08:56 +0200
** Changed in: python-apt (Ubuntu)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/194374
Title:
Provide example for apt_pkg.config.find("APT::Architecture")
Status in “python-apt” package in Ubuntu:
Fix Released
Bug description:
Binary package hint: python-apt
In one of the example programs (/usr/share/doc/python-apt/examples/config.py) an api 'apt_pkg.Architecture' is used to retrive the apt architecture.
But trying to use this fails with following error
Traceback (most recent call last):
File "arch.py", line 5, in <module>
print apt_pkg.Architecture
AttributeError: 'module' object has no attribute 'Architecture'
The api 'apt_pkg.Config.Find("APT::Architecture")' works properly.
Example program:
#!/usr/bin/python
import apt_pkg
apt_pkg.init()
print "Find api: " + apt_pkg.Config.Find("APT::Architecture")
print "Direct arch value: " + apt_pkg.Architecture
More information about the foundations-bugs
mailing list