summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzr-builddeb/default.conf2
-rw-r--r--apt/package.py8
-rw-r--r--data/templates/Debian.info.in10
-rw-r--r--debian/changelog21
-rwxr-xr-xdebian/rules7
-rwxr-xr-xdoc/examples/config.py3
-rw-r--r--po/python-apt.pot2
-rw-r--r--python/cache.cc5
-rw-r--r--python/pkgsrcrecords.cc2
9 files changed, 43 insertions, 17 deletions
diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf
new file mode 100644
index 00000000..3a08d607
--- /dev/null
+++ b/.bzr-builddeb/default.conf
@@ -0,0 +1,2 @@
+[BUILDDEB]
+native = True
diff --git a/apt/package.py b/apt/package.py
index ac045969..096b1bd1 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -319,6 +319,14 @@ class Package(object):
return self.isInstalled and self._depcache.IsUpgradable(self._pkg)
isUpgradable = property(isUpgradable)
+ def isAutoRemovable(self):
+ """
+ Package is installed as a automatic dependency and is
+ no longer required
+ """
+ return self.isInstalled and self._depcache.IsGarbage(self._pkg)
+ isAutoRemovable = property(isAutoRemovable)
+
# size
def packageSize(self):
""" The size of the candidate deb package """
diff --git a/data/templates/Debian.info.in b/data/templates/Debian.info.in
index 244e1c6b..b635de19 100644
--- a/data/templates/Debian.info.in
+++ b/data/templates/Debian.info.in
@@ -3,7 +3,7 @@ _ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changel
Suite: etch
RepositoryType: deb
BaseURI: http://http.us.debian.org/debian/
-MatchUri: ftp[0-9]*\.[a-z]\.debian\.org
+MatchURI: ftp[0-9]*\.[a-z]\.debian\.org
MirrorsFile: /usr/share/python-apt/templates/Debian.mirrors
_Description: Debian 4.0 'Etch'
Component: main
@@ -26,7 +26,7 @@ _Description: Security updates
Suite: sarge
RepositoryType: deb
BaseURI: http://http.us.debian.org/debian/
-MatchUri: ftp[0-9]*\.[a-z]\.debian\.org
+MatchURI: ftp[0-9]*\.[a-z]\.debian\.org
MirrorsFile: /usr/share/python-apt/templates/Debian.mirrors
_Description: Debian 3.1 'Sarge'
Component: main
@@ -49,7 +49,7 @@ _Description: Security updates
Suite: stable
RepositoryType: deb
BaseURI: http://http.us.debian.org/debian/
-MatchUri: ftp[0-9]*\.[a-z]\.debian\.org
+MatchURI: ftp[0-9]*\.[a-z]\.debian\.org
MirrorsFile: /usr/share/python-apt/templates/Debian.mirrors
_Description: Debian current stable release
Component: main
@@ -62,7 +62,7 @@ _CompDescription: Non-DFSG-compatible Software
Suite: testing
RepositoryType: deb
BaseURI: http://http.us.debian.org/debian/
-MatchUri: ftp[0-9]*\.[a-z]\.debian\.org
+MatchURI: ftp[0-9]*\.[a-z]\.debian\.org
MirrorsFile: /usr/share/python-apt/templates/Debian.mirrors
_Description: Debian testing
Component: main
@@ -75,7 +75,7 @@ _CompDescription: Non-DFSG-compatible Software
Suite: sid
RepositoryType: deb
BaseURI: http://http.us.debian.org/debian/
-MatchUri: ftp[0-9]*\.[a-z]\.debian\.org
+MatchURI: ftp[0-9]*\.[a-z]\.debian\.org
MirrorsFile: /usr/share/python-apt/templates/Debian.mirrors
_Description: Debian 'Sid' (unstable)
Component: main
diff --git a/debian/changelog b/debian/changelog
index e15a9a96..a3792386 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,30 @@
python-apt (0.7.7) unstable; urgency=low
+ [ Emanuele Rocca ]
+ * data/templates/Debian.info.in:
+ - s/MatchUri/MatchURI/. Thanks, Gustavo Noronha Silva (closes: #487673)
+ * python/cache.cc:
+ - Throw an exception rather than segfaulting when GetCache() is called
+ before InitSystem() (closes: #369147)
+ * doc/examples/config.py:
+ - Fix config.py --help (closes: #257007)
+
+ [ Michael Vogt ]
* python/apt_pkgmodule.cc:
- fix bug in hashsum calculation when the original string
contains \0 charackters (thanks to Celso Providelo and
Ryan Hass for the test-case) LP: #243630
* tests/test_hashsums.py:
- add tests for the hashsum code
-
- -- Michael Vogt <mvo@debian.org> Fri, 04 Jul 2008 19:53:28 +0200
+ * apt/package.py:
+ - add "isAutoRemovable()" method
+ * python/pkgsrcrecords.cc:
+ - add "Record" attribute to the PkgSrcRecord to access the
+ full source record
+ * debian/rules:
+ - remove the arch-build target, we have bzr-builddeb now
+
+ -- Michael Vogt <mvo@debian.org> Tue, 22 Jul 2008 10:16:03 +0200
python-apt (0.7.6) unstable; urgency=low
diff --git a/debian/rules b/debian/rules
index 33d04a21..c8aff2f9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,13 +15,6 @@ PKG=python-apt
DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
-arch-build::
- rm -rf debian/arch-build
- mkdir -p debian/arch-build/$(PKG)-$(DEBVER)
- tar -c --exclude=arch-build --no-recursion -f - `bzr inventory` \
- | (cd debian/arch-build/$(PKG)-$(DEBVER);tar xf -)
- (cd debian/arch-build/$(PKG)-$(DEBVER) && $(DEB_BUILD_PROG))
-
build/python-apt-dbg::
set -e; \
for i in $(cdbs_python_build_versions); do \
diff --git a/doc/examples/config.py b/doc/examples/config.py
index 222c1331..24d90a0d 100755
--- a/doc/examples/config.py
+++ b/doc/examples/config.py
@@ -42,8 +42,7 @@ if Cnf.FindB("version",0) == 1:
print "Version selected - 1.1";
if Cnf.FindB("help",0) == 1:
- print apt_pkg.Package,apt_pkg.Version,"for",apt_pkg.Architecture, \
- "compiled on",apt_pkg.Date,apt_pkg.Time;
+ print "python-apt",apt_pkg.Version,"compiled on",apt_pkg.Date,apt_pkg.Time;
print "Hi, I am the help text for this program";
sys.exit(0);
diff --git a/po/python-apt.pot b/po/python-apt.pot
index c8c93668..7125757c 100644
--- a/po/python-apt.pot
+++ b/po/python-apt.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-07-04 20:08+0200\n"
+"POT-Creation-Date: 2008-07-18 15:22+0100\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"
diff --git a/python/cache.cc b/python/cache.cc
index 36e49710..66a2c5d9 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -928,6 +928,11 @@ PyObject *TmpGetCache(PyObject *Self,PyObject *Args)
if (PyArg_ParseTuple(Args, "|O", &pyCallbackInst) == 0)
return 0;
+ if (_system == 0) {
+ PyErr_SetString(PyExc_ValueError,"_system not initialized");
+ return 0;
+ }
+
pkgCacheFile *Cache = new pkgCacheFile();
if(pyCallbackInst != 0) {
diff --git a/python/pkgsrcrecords.cc b/python/pkgsrcrecords.cc
index 5e04f5fc..c698a925 100644
--- a/python/pkgsrcrecords.cc
+++ b/python/pkgsrcrecords.cc
@@ -89,6 +89,8 @@ static PyObject *PkgSrcRecordsAttr(PyObject *Self,char *Name)
return CppPyString(Struct.Last->Maintainer());
else if (strcmp("Section",Name) == 0)
return CppPyString(Struct.Last->Section());
+ else if (strcmp("Record",Name) == 0)
+ return CppPyString(Struct.Last->AsStr());
else if (strcmp("Binaries",Name) == 0) {
PyObject *List = PyList_New(0);