1. 14 Jan, 2020 3 commits
  2. 12 Jan, 2020 3 commits
    • Nis Martensen's avatar
      piupartslib/dwke: do not error out on non-utf8 logfiles · 1b6e1b7c
      Nis Martensen authored
      Should fix:
      
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1911, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1851, in main
          section.generate_output(output_directory, section_names, problem_list, web_host)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1660, in generate_output
          self.generate_html()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1587, in generate_html
          failures = dwke_get_failures(self._binary_db, self._problem_list)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1761, in dwke_get_failures
          add_cnt = make_kprs(logdict, kprdict, problem_list)
        File "/srv/piuparts.debian.org/lib/python3/dist-packages/piupartslib/dwke.py", line 252, in make_kprs
          logbody = lb.read()
        File "/usr/lib/python3.7/codecs.py", line 322, in decode
          (result, consumed) = self._buffer_decode(data, self.errors, final)
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 26184: invalid continuation byte
      1b6e1b7c
    • Nis Martensen's avatar
      Makefile: delete __pycache__ dirs in make clean · 75bf1f7c
      Nis Martensen authored
      Move __pycache__ directory removal from debian/rules to the `clean`
      Makefile target. The change should have no effect on the generated
      packages; it just makes `make clean` more complete and debian/rules
      simpler.
      
      Instead of using a shell loop for passing the files to `rm`, also use
      find's `-delete` option, avoiding any potential issues with weird
      filenames.
      
      Since the __pycache__ folders may contain .pyc files, make sure these
      are all deleted before.
      75bf1f7c
    • Nis Martensen's avatar
      autopkgtest: replace broken stubs with actual tests · 0066fa12
      Nis Martensen authored
      Piuparts does not have `--list` (without further arguments) or `--info`
      options, hence running the autopkgtest currently fails. Replace the two
      broken stubs by two working tests:
      
       1. run `piuparts --version`
       2. create a minimal dummy binary package and run piuparts on it
      
      Using a single-letter package name for the dummy package ensures that
      there is no package with the same name in the archive -- according to
      policy 5.6.1, all official package names must be at least two characters
      long.
      0066fa12
  3. 08 Jan, 2020 3 commits
  4. 29 Dec, 2019 5 commits
  5. 28 Dec, 2019 11 commits
    • Holger Levsen's avatar
      Bump debhelper-compat to 12. · 2f15d124
      Holger Levsen authored
      
      
      after confirming with diffoscope that the changes are sane
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      2f15d124
    • Holger Levsen's avatar
      d/rules: set GOCACHE to a safely writable directory during build as the cache... · f1b72b2e
      Holger Levsen authored
      
      d/rules: set GOCACHE to a safely writable directory during build as the cache is mandatory with Go 1.12.
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      f1b72b2e
    • Holger Levsen's avatar
    • Holger Levsen's avatar
    • Holger Levsen's avatar
      extend changelog for Nis · 837d794e
      Holger Levsen authored
      
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      837d794e
    • Nis Martensen's avatar
      piuparts-report: handle EOFError with pickle.load() · f70767fe
      Nis Martensen authored and Holger Levsen's avatar Holger Levsen committed
      
      
      Do not error out if the cache file is empty.
      
      Fixes:
      
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1911, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1851, in main
          section.generate_output(output_directory, section_names, problem_list, web_host)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1660, in generate_output
          self.generate_html()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1563, in generate_html
          self._md5cache['old'] = pickle.load(f)
      EOFError: Ran out of input
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      f70767fe
    • Nis Martensen's avatar
      piuparts-report, piuparts: pickle needs binary file streams · 08f9a354
      Nis Martensen authored and Holger Levsen's avatar Holger Levsen committed
      
      
      Fixes:
      
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1911, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1851, in main
          section.generate_output(output_directory, section_names, problem_list, web_host)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1660, in generate_output
          self.generate_html()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1600, in generate_html
          pickle.dump(self._md5cache['new'], f)
      TypeError: write() argument must be str, not bytes
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      08f9a354
    • Nis Martensen's avatar
      piuparts-report: give hashlib the bytes it needs · 484bc88e
      Nis Martensen authored and Holger Levsen's avatar Holger Levsen committed
      
      
      Fixes:
      
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1911, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1851, in main
          section.generate_output(output_directory, section_names, problem_list, web_host)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1660, in generate_output
          self.generate_html()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1580, in generate_html
          self.print_by_dir(self._output_directory, logs_by_dir)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 943, in print_by_dir
          desc_by_dir[vdir], vlist)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 930, in write_log_list_page
          "logrows": "".join(lines),
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 890, in _write_template_html
          write_template_html(filename, body, mapping, defer_if_unmodified=defer_if_unmodified, md5cache=self._md5cache)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 714, in write_template_html
          content_md5 = hashlib.md5(htmlpage.safe_substitute(mapping)).hexdigest()
      TypeError: Unicode-objects must be encoded before hashing
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      484bc88e
    • Nis Martensen's avatar
      piuparts-report: fix 'dict_keys has no attribute remove' · cc30509e
      Nis Martensen authored and Holger Levsen's avatar Holger Levsen committed
      
      
      In python3 dict().keys() returns a dict_keys() view and not a list as in
      python2. Replace the now unavailable remove() by a set subtraction.
      
      Fixes:
      
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1911, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1851, in main
          section.generate_output(output_directory, section_names, problem_list, web_host)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1660, in generate_output
          self.generate_html()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1574, in generate_html
          self.cleanup_removed_packages(logs_by_dir)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1536, in cleanup_removed_packages
          vdirs.remove("reserved")
      AttributeError: 'dict_keys' object has no attribute 'remove'
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      cc30509e
    • Nis Martensen's avatar
      fix piupartslib imports · dd4cd1a8
      Nis Martensen authored and Holger Levsen's avatar Holger Levsen committed
      
      
      During the port to python3 piupartslib was changed to no longer
      auto-import some of its submodules. Import the required submodules
      directly where now needed.
      
      Fixes:
      
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1910, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1849, in main
          section = Section(section_name, master_directory, doc_root, packagedb_cache=packagedb_cache)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 827, in __init__
          self._load_package_database(section, master_directory)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 859, in _load_package_database
          db = piupartslib.packagesdb.PackagesDB(prefix=sectiondir)
      AttributeError: module 'piupartslib' has no attribute 'packagesdb'
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      dd4cd1a8
    • Nis Martensen's avatar
      piuparts-master-backend: handle BrokenPipeError · 9171821b
      Nis Martensen authored and Holger Levsen's avatar Holger Levsen committed
      
      
      No need to crash with a stacktrace when the slave is gone and the pipe
      to it is broken. Just log this and exit 1.
      
      Fixes:
      
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-master-backend", line 433, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-master-backend", line 423, in main
          m = Master(sys.stdin, sys.stdout)
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-master-backend", line 154, in __init__
          self._writeline("hello")
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-master-backend", line 111, in _writeline
          self._output.flush()
      BrokenPipeError: [Errno 32] Broken pipe
      Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
      BrokenPipeError: [Errno 32] Broken pipe
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      9171821b
  6. 27 Dec, 2019 4 commits
  7. 26 Dec, 2019 4 commits
  8. 25 Dec, 2019 1 commit
  9. 03 Nov, 2019 1 commit
  10. 02 Nov, 2019 1 commit
  11. 10 Sep, 2019 4 commits
    • Holger Levsen's avatar
      Revert "enable debug output" · 25130ee5
      Holger Levsen authored
      This reverts commit 030f1e97.
      25130ee5
    • Holger Levsen's avatar
      enable debug output · 030f1e97
      Holger Levsen authored
      
      
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      030f1e97
    • Mattia Rizzolo's avatar
      decode the file after reading it · d892e48e
      Mattia Rizzolo authored and Holger Levsen's avatar Holger Levsen committed
      
      
      At this point it would probably be best to completely rewrite that thing
      using StringIO and some other nicer way to do buffering, but this should
      do the job for now.
      
      should fix:
      
      09:46:14 Running section testing2sid (precedence=2)
      Traceback (most recent call last):
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-slave", line 1064, in <module>
          main()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-slave", line 1029, in main
          test_count += section.run(do_processing=(test_count == 0))
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-slave", line 575, in run
          processed = self._process()
        File "/srv/piuparts.debian.org/share/piuparts/piuparts-slave", line 667, in _process
          packagenames)
        File "/srv/piuparts.debian.org/lib/python3/dist-packages/piupartslib/packagesdb.py", line 183, in load_packages_urls
          self._read_file(stream, restrict_packages=restrict_packages)
        File "/srv/piuparts.debian.org/lib/python3/dist-packages/piupartslib/packagesdb.py", line 190, in _read_file
          headers = rfc822_like_header_parse(input)
        File "/srv/piuparts.debian.org/lib/python3/dist-packages/piupartslib/packagesdb.py", line 53, in rfc822_like_header_parse
          line = input.readline()
        File "/srv/piuparts.debian.org/lib/python3/dist-packages/piupartslib/__init__.py", line 60, in readline
          empty = not self._refill()
        File "/srv/piuparts.debian.org/lib/python3/dist-packages/piupartslib/__init__.py", line 52, in _refill
          self._buffer = self._buffer + chunk
      TypeError: can only concatenate str (not "bytes") to str
      
      Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
      Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
      d892e48e
    • Mattia Rizzolo's avatar
      9838ed84