Merge lp:~funkyhat/ubuntu/maverick/software-properties/fix-594368 into lp:ubuntu/maverick/software-properties

Proposed by Matt Wheeler
Status: Merged
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp:~funkyhat/ubuntu/maverick/software-properties/fix-594368
Merge into: lp:ubuntu/maverick/software-properties
Diff against target: 96 lines (+21/-14)
3 files modified
debian/changelog (+7/-0)
softwareproperties/SoftwareProperties.py (+13/-13)
softwareproperties/ppa.py (+1/-1)
To merge this branch: bzr merge lp:~funkyhat/ubuntu/maverick/software-properties/fix-594368
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+27560@code.launchpad.net

Description of the change

This fixes #594368 (as far as I'm aware!) by simply replacing the attributes as suggested by the deprecation warnings.

I have tested the resulting package after building with pbuilder and add-apt-repository appears to be working flawlessly.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :
Revision history for this message
Matt Wheeler (funkyhat) wrote :

On 15 June 2010 12:45, James Westby <email address hidden> wrote:
> Also see
>
>  https://code.launchpad.net/~erik-b-andersen/software-properties/main/+merge/27464

Oh, my searches on launchpad before I had a go at this didn't pick
that up. Sorry!

--
Matt Wheeler
<email address hidden>

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this branch! This is in bzr now:

software-properties (0.76.6) maverick; urgency=low
..
  * fix deprecation warnings from python-apt 0.8

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-04-14 20:59:41 +0000
3+++ debian/changelog 2010-06-14 22:50:40 +0000
4@@ -1,3 +1,10 @@
5+software-properties (0.75.11) maverick; urgency=low
6+
7+ * Replaced instances of deprecated attributes in ppa.py and
8+ SoftwareProperties.py (LP: #594368)
9+
10+ -- Matt Wheeler <m@funkyhat.org> Mon, 14 Jun 2010 23:27:42 +0100
11+
12 software-properties (0.75.10) lucid; urgency=low
13
14 * softwareproperties/ppa.py:
15
16=== modified file 'softwareproperties/SoftwareProperties.py'
17--- softwareproperties/SoftwareProperties.py 2010-03-26 13:51:20 +0000
18+++ softwareproperties/SoftwareProperties.py 2010-06-14 22:50:40 +0000
19@@ -111,7 +111,7 @@
20 """Backup all apt configuration options"""
21 self.apt_conf_backup = {}
22 for option in softwareproperties.CONF_MAP.keys():
23- value = apt_pkg.Config.FindI(softwareproperties.CONF_MAP[option])
24+ value = apt_pkg.Config.find_i(softwareproperties.CONF_MAP[option])
25 self.apt_conf_backup[option] = value
26
27 def restore_apt_conf(self):
28@@ -125,21 +125,21 @@
29 """ Parse the apt cron configuration. Try to fit a predefined use case
30 and return it. Special case: if the user made a custom
31 configurtation, that we cannot represent it will return None """
32- if apt_pkg.Config.FindI(softwareproperties.CONF_MAP["autoupdate"]) > 0:
33+ if apt_pkg.Config.find_i(softwareproperties.CONF_MAP["autoupdate"]) > 0:
34 # Autodownload
35- if apt_pkg.Config.FindI(softwareproperties.CONF_MAP["unattended"]) == 1\
36- and apt_pkg.Config.FindI(softwareproperties.CONF_MAP["autodownload"]) == 1 :
37+ if apt_pkg.Config.find_i(softwareproperties.CONF_MAP["unattended"]) == 1\
38+ and apt_pkg.Config.find_i(softwareproperties.CONF_MAP["autodownload"]) == 1 :
39 return softwareproperties.UPDATE_INST_SEC
40- elif apt_pkg.Config.FindI(softwareproperties.CONF_MAP["autodownload"]) == 1 and \
41- apt_pkg.Config.FindI(softwareproperties.CONF_MAP["unattended"]) == 0:
42+ elif apt_pkg.Config.find_i(softwareproperties.CONF_MAP["autodownload"]) == 1 and \
43+ apt_pkg.Config.find_i(softwareproperties.CONF_MAP["unattended"]) == 0:
44 return softwareproperties.UPDATE_DOWNLOAD
45- elif apt_pkg.Config.FindI(softwareproperties.CONF_MAP["unattended"]) == 0 and \
46- apt_pkg.Config.FindI(softwareproperties.CONF_MAP["autodownload"]) == 0:
47+ elif apt_pkg.Config.find_i(softwareproperties.CONF_MAP["unattended"]) == 0 and \
48+ apt_pkg.Config.find_i(softwareproperties.CONF_MAP["autodownload"]) == 0:
49 return softwareproperties.UPDATE_NOTIFY
50 else:
51 return None
52- elif apt_pkg.Config.FindI(softwareproperties.CONF_MAP["unattended"]) == 0 and \
53- apt_pkg.Config.FindI(softwareproperties.CONF_MAP["autodownload"]) == 0:
54+ elif apt_pkg.Config.find_i(softwareproperties.CONF_MAP["unattended"]) == 0 and \
55+ apt_pkg.Config.find_i(softwareproperties.CONF_MAP["autodownload"]) == 0:
56 return softwareproperties.UPDATE_MANUAL
57 else:
58 return None
59@@ -167,13 +167,13 @@
60 def set_update_interval(self, days):
61 """Set the interval in which we check for available updates"""
62 # Only write the key if it has changed
63- if not days == apt_pkg.Config.FindI(softwareproperties.CONF_MAP["autoupdate"]):
64+ if not days == apt_pkg.Config.find_i(softwareproperties.CONF_MAP["autoupdate"]):
65 apt_pkg.Config.Set(softwareproperties.CONF_MAP["autoupdate"], str(days))
66 self.set_modified_config()
67
68 def get_update_interval(self):
69 """ Returns the interval of the apt periodic cron job """
70- return apt_pkg.Config.FindI(softwareproperties.CONF_MAP["autoupdate"])
71+ return apt_pkg.Config.find_i(softwareproperties.CONF_MAP["autoupdate"])
72
73 def get_release_upgrades_policy(self):
74 """
75@@ -579,7 +579,7 @@
76
77 # and append the updated keys
78 for i in cnf.List():
79- f.write("APT::Periodic::%s \"%s\";\n" % (i, cnf.FindI(i)))
80+ f.write("APT::Periodic::%s \"%s\";\n" % (i, cnf.find_i(i)))
81 f.close()
82
83 def save_sourceslist(self):
84
85=== modified file 'softwareproperties/ppa.py'
86--- softwareproperties/ppa.py 2010-04-14 20:59:41 +0000
87+++ softwareproperties/ppa.py 2010-06-14 22:50:40 +0000
88@@ -40,7 +40,7 @@
89 ppa_name = abrev.split("/")[1]
90 except IndexError, e:
91 ppa_name = "ppa"
92- sourceslistd = apt_pkg.Config.FindDir("Dir::Etc::sourceparts")
93+ sourceslistd = apt_pkg.Config.find_dir("Dir::Etc::sourceparts")
94 line = "deb http://ppa.launchpad.net/%s/%s/ubuntu %s main" % (
95 ppa_owner, ppa_name, distro_codename)
96 file = "%s/%s-%s-%s.list" % (

Subscribers

People subscribed via source and target branches

to all changes: