[elbe-devel] [PATCH 02/40] pylint: apt_mark_delete - remove unused code

Torben Hohn torben.hohn at linutronix.de
Thu Sep 20 11:03:19 CEST 2018


On Fri, Sep 14, 2018 at 01:56:14PM +0200, Manuel Traut wrote:
> it's not called at all.
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

please at least note, that the gui uses this.

from 294272cb7e26 ("GUI: version bump 0.9.2+nmu2")

-> git grep apt_mark_delete
elbepack/daemons/gui/packages.py: get_pm().apt_mark_delete( userid, name, version )
elbepack/daemons/gui/packages.py: get_pm().apt_mark_delete( userid, name, version )
elbepack/projectmanager.py:    def apt_mark_delete (self, userid, pkgname, version):


> ---
>  elbepack/projectmanager.py | 22 ----------------------
>  1 file changed, 22 deletions(-)
> 
> diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
> index b66a1d7a..b2593630 100644
> --- a/elbepack/projectmanager.py
> +++ b/elbepack/projectmanager.py
> @@ -408,28 +408,6 @@ class ProjectManager(object):
>              c = self._get_current_project_apt_cache(userid)
>              c.mark_upgrade(pkgname, version)
>  
> -    def apt_mark_delete(self, userid, pkgname, version):
> -        with self.lock:
> -            c = self._get_current_project_apt_cache(userid)
> -
> -            ep = self._get_current_project(userid)
> -            pkgs = ep.xml.get_target_packages()
> -
> -            if pkgname in pkgs:
> -                pkgs.remove(pkgname)
> -                c.mark_delete(pkgname, version)
> -
> -            ep.xml.set_target_packages(pkgs)
> -
> -            debootstrap_pkgs = []
> -            for p in ep.xml.xml.node("debootstrappkgs"):
> -                debootstrap_pkgs.append(p.et.text)
> -
> -            # temporary disabled because of
> -            # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776057
> -            # the functions cleans up to much
> -            # c.cleanup(debootstrap_pkgs + pkgs)
> -
>      def get_debootstrap_pkgs(self, userid):
>          with self.lock:
>              ep = self._get_current_project(userid)
> -- 
> 2.19.0.rc2
> 

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180920/19b16ac7/attachment.sig>


More information about the elbe-devel mailing list