Ubuntu

[patch] Multiple packages

Reported by Fabrizio Balliano on 2005-11-30
6
Affects Status Importance Assigned to Milestone
gnome-app-install (Ubuntu)
Wishlist
Unassigned

Bug Description

It would be nice to be able to add/remove multiple packages grouped in a single
.desktop file.

With this we could create a "codecs" .desktop and installa many packages with
one task

here you've a diff for enabling multiple package add/remove:

412c412
< if self.cache[pkg.split()[0]].isInstalled:
---
> if self.cache[pkg].isInstalled:
414,415c414
< for tmp in pkg.split():
< self.cache[tmp].markDelete(autoFix=False)
---
> self.cache[pkg].markDelete(autoFix=False)
429,430c428
< for tmp in pkg.split():
< self.cache[pkg].markKeep()
---
> self.cache[pkg].markKeep()
434,435c432
< for tmp in pkg.split():
< self.cache[tmp].markKeep()
---
> self.cache[pkg].markKeep()
445,446c442
< for tmp in pkg.split():
< self.cache[tmp].markInstall(autoFix=True)
---
> self.cache[pkg].markInstall(autoFix=True)
603c599
< if self.cache.has_key(pkgname.split()[0]):
---
> if self.cache.has_key(pkgname):
694c690
< installed = self.cache[name.split()[0]].isInstalled
---
> installed = self.cache[name].isInstalled
712,714c708,709
< for tmp in name.split():
< selections.append(("%s\tuninstall" % tmp, path))
< packages.append(name)
---
> selections.append(("%s\tuninstall" % name, path))
> packages.append(name)
716,718c711,712
< for tmp in name.split():
< selections.append(("%s\tinstall" % tmp, path))
< packages.append(name)
---
> selections.append(("%s\tinstall" % name, path))
> packages.append(name)
830,832c824,825
< for tmp in name.split():
< if not self.cache[tmp].isInstalled:
< to_remove.append(gtk.TreeRowReference(store, path))
---
> if not self.cache[name].isInstalled:
> to_remove.append(gtk.TreeRowReference(store, path))
1258c1251
< pkg = self.cache[package_name.split()[0]]
---
> pkg = self.cache[package_name]

there was an error in the last patch, here is the correct one:

412c412
< if self.cache[pkg.split()[0]].isInstalled:
---
> if self.cache[pkg].isInstalled:
414,415c414
< for tmp in pkg.split():
< self.cache[tmp].markDelete(autoFix=False)
---
> self.cache[pkg].markDelete(autoFix=False)
429,430c428
< for tmp in pkg.split():
< self.cache[tmp].markKeep()
---
> self.cache[pkg].markKeep()
434,435c432
< for tmp in pkg.split():
< self.cache[tmp].markKeep()
---
> self.cache[pkg].markKeep()
445,446c442
< for tmp in pkg.split():
< self.cache[tmp].markInstall(autoFix=True)
---
> self.cache[pkg].markInstall(autoFix=True)
603c599
< if self.cache.has_key(pkgname.split()[0]):
---
> if self.cache.has_key(pkgname):
694c690
< installed = self.cache[name.split()[0]].isInstalled
---
> installed = self.cache[name].isInstalled
712,714c708,709
< for tmp in name.split():
< selections.append(("%s\tuninstall" % tmp, path))
< packages.append(name)
---
> selections.append(("%s\tuninstall" % name, path))
> packages.append(name)
716,718c711,712
< for tmp in name.split():
< selections.append(("%s\tinstall" % tmp, path))
< packages.append(name)
---
> selections.append(("%s\tinstall" % name, path))
> packages.append(name)
830,832c824,825
< for tmp in name.split():
< if not self.cache[tmp].isInstalled:
< to_remove.append(gtk.TreeRowReference(store, path))
---
> if not self.cache[name].isInstalled:
> to_remove.append(gtk.TreeRowReference(store, path))
1258c1251
< pkg = self.cache[package_name.split()[0]]
---
> pkg = self.cache[package_name]

Michael Vogt (mvo) wrote :

Thanks for this patch!

I'm currently a bit short on time, but I'll include it in the next version of
gnome-app-install.

Cheeres,
 Michael

P.S. I prefer patches done with "diff -u" because I feel they are easier to
read. But that's just
a minor nitpick :)

yeah :-)

excuse me for the diff -u thing but I don't work so much with command line diff,
anyway it's nice to help you

fabrizio

Sebastian Heinlein (glatzor) wrote :

I think using a list by default would be better compared to splitting a string.

I will take a look at it.

Sebastian

Changed in gnome-app-install (Ubuntu):
assignee: Michael Vogt (mvo) → nobody
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.