[elbe-devel] [PATCH v1 2/3] check_updates: cleanup debug messages

Bastian Germann bage at linutronix.de
Fri Jul 2 18:24:57 CEST 2021


Am 02.07.21 um 18:14 schrieb Holger Dengler:
> Remove the debug messages for the check_updates sub-command. Also
> remove commented-out code.
> 
> Signed-off-by: Holger Dengler <dengler at linutronix.de>

Reviewed-by: Bastian Germann <bage at linutronix.de>

> ---
>   elbepack/pkgutils.py | 10 +---------
>   elbepack/virtapt.py  |  3 +--
>   2 files changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
> index 598eb6b1..c04bcf99 100644
> --- a/elbepack/pkgutils.py
> +++ b/elbepack/pkgutils.py
> @@ -82,12 +82,11 @@ def extract_pkg_changelog(fname, extra_pkg=None):
>       m = re.match(re_pkgfilename, pkgname)
>   
>       pkgname = m.group('name')
> -    # pkgver = m.group('ver')
>       pkgarch = m.group('arch')
>   
>       print('pkg: %s, arch: %s' % (pkgname, pkgarch))
>   
> -    fs = TmpdirFilesystem(debug=True)
> +    fs = TmpdirFilesystem()
>   
>       if extra_pkg:
>           print('with extra ' + extra_pkg)
> @@ -105,21 +104,14 @@ def extract_pkg_changelog(fname, extra_pkg=None):
>       dch_bin = '/usr/share/doc/%s/changelog.Debian.%s.gz' % (pkgname, pkgarch)
>       dch_src = '/usr/share/doc/%s/changelog.Debian.gz' % pkgname
>   
> -    print(fs.listdir('/usr/share/doc/'))
> -    print(fs.listdir('/usr/share/doc/%s' % pkgname))
> -
>       ret = ""
>   
>       if fs.exists(dch_bin):
>           ret += fs.read_file(dch_bin, gz=True).decode(encoding='utf-8',
>                                                        errors='replace')
> -    else:
> -        print("no bin")
>   
>       if fs.exists(dch_src):
>           ret += fs.read_file(dch_src, gz=True).decode(encoding='utf-8',
>                                                        errors='replace')
> -    else:
> -        print("no source")
>   
>       return ret
> diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
> index aeb2ee14..bdf53ed6 100644
> --- a/elbepack/virtapt.py
> +++ b/elbepack/virtapt.py
> @@ -236,8 +236,7 @@ class VirtApt:
>           self.downloads[pkgname] = acq
>   
>       def do_downloads(self):
> -        res = self.acquire.run()
> -        print(res)
> +        return self.acquire.run()
>   
>       def get_downloaded_files(self):
>           ret = []
> 


More information about the elbe-devel mailing list