Merge lp://staging/~jacseen/keryx/un-install into lp://staging/~keryx-admins/keryx/devel

Proposed by Jack N
Status: Merged
Merge reported by: mac9416
Merged at revision: not available
Proposed branch: lp://staging/~jacseen/keryx/un-install
Merge into: lp://staging/~keryx-admins/keryx/devel
Diff against target: 58 lines (+12/-8)
1 file modified
lib/wxkeryx/main.py (+12/-8)
To merge this branch: bzr merge lp://staging/~jacseen/keryx/un-install
Reviewer Review Type Date Requested Status
Keryx Admins Pending
Review via email: mp+17712@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Jack N (jacseen) wrote :

some new improvements
Branch format 2a (launchpad: Branch format 7)
hope it doesn't cause problem

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/wxkeryx/main.py'
2--- lib/wxkeryx/main.py 2010-01-17 00:52:51 +0000
3+++ lib/wxkeryx/main.py 2010-01-20 02:42:13 +0000
4@@ -356,7 +356,13 @@
5 if result == wx.ID_CANCEL:
6 return
7
8- # Start the installation
9+ # Get the necessary information for package installation
10+ projdir = project.projects[len(project.projects) -1].dir
11+ spacksdir = os.path.join(projdir, 'packages')
12+ spacks = [x for x in os.listdir(spacksdir) if os.path.isfile(os.path.join(spacksdir, x)) and (os.path.splitext(x)[1] == '.deb')]
13+ packnames = sorted([x[:x.find('_')] for x in spacks])
14+
15+ # Transfer the packages first to the cache
16 install = project.projects[len(project.projects) - 1].plugin.installCache(project.projects[len(project.projects) -1].dir, 'installcache', move=move)
17
18 if install: # If installCache was successful...
19@@ -380,12 +386,6 @@
20 if result == wx.ID_NO:
21 return
22
23- # Get the necessary information for package installation
24- projdir = project.projects[len(project.projects) -1].dir
25- spacksdir = os.path.join(projdir, 'packages')
26- spacks = [x for x in os.listdir(spacksdir) if os.path.isfile(os.path.join(spacksdir, x)) and (os.path.splitext(x)[1] == '.deb')]
27- packnames = sorted([x[:x.find('_')] for x in spacks])
28-
29 # Ask what packages need to be installed
30 items = dict([(num+1, pkg) for (num, pkg) in zip(range(len(packnames)), packnames)])
31 dlg = SelectPackagesDialog(None, -1, _("Install Project"), items)
32@@ -397,6 +397,7 @@
33 if result == wx.ID_CANCEL:
34 return
35
36+ # Start the installation
37 result = project.projects[len(project.projects) - 1].plugin.installPacks(' '.join(packnames))
38 if result:
39 wx.MessageBox(_("Package installation finished."),
40@@ -462,7 +463,7 @@
41 # dlg.Destroy()
42
43 def OnUpdateStatus(self, event):
44- dlg = wx.MessageDialog(None, _("This will update the list of packages installed on your computer. Only run this on the computer you created this project on.\n\n" + \
45+ dlg = wx.MessageDialog(None, _("This will update Keryx about which packages are installed on your computer. Only run this on the computer you created this project on.\n\n" + \
46 "Would you like to continue?"),
47 _("Update Status"), wx.YES_NO | wx.ICON_QUESTION)
48 result = dlg.ShowModal()
49@@ -478,6 +479,9 @@
50 _("Status Update Failed"), wx.ICON_ERROR)
51 result = dlg.ShowModal()
52 dlg.Destroy()
53+ else:
54+ self.loadLocal()
55+
56 def UpdateStatus(self):
57 project_dir = project.projects[len(project.projects) -1].dir
58 return project.projects[len(project.projects) - 1].plugin.updateStatus(project_dir)

Subscribers

People subscribed via source and target branches