Merge ~pedrmachado/ubuntu/+source/xdiagnose:ubuntu/noble-devel into ubuntu/+source/xdiagnose:ubuntu/devel

Proposed by Pedro Miguel Baptista Machado
Status: Needs review
Proposed branch: ~pedrmachado/ubuntu/+source/xdiagnose:ubuntu/noble-devel
Merge into: ubuntu/+source/xdiagnose:ubuntu/devel
Diff against target: 58 lines (+11/-3) (has conflicts)
4 files modified
apport/apport-gpu-error-intel.py (+2/-2)
debian/changelog (+7/-0)
debian/control (+1/-0)
xdiagnose/xorglog.py (+1/-1)
Conflict in debian/changelog
Reviewer Review Type Date Requested Status
Simon Chopin (community) Needs Fixing
git-ubuntu import Pending
Review via email: mp+476072@code.launchpad.net

Commit message

fixed buggs related to back-slash and encoding.

Solved the following bugs

$ ./run-tests
tests/test_apport_gpu_hook
# Testing intel GPU hook...
/home/pedro/repo/xdiagnose/apport/apport-gpu-error-intel.py:27: SyntaxWarning: invalid escape sequence '\/'
  { 'name':'i945g', 're':'(8086:2772|945G[ \/]|82945G[ \/])' },
/home/pedro/repo/xdiagnose/apport/apport-gpu-error-intel.py:28: SyntaxWarning: invalid escape sequence '\/'
  { 'name':'i945gm', 're':'(8086:27a2|945GM[ \/]|82945GM[ \/])' },
Traceback (most recent call last):
  File "/home/pedro/repo/xdiagnose/apport/apport-gpu-error-intel.py", line 188, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/pedro/repo/xdiagnose/apport/apport-gpu-error-intel.py", line 121, in main
    report = apport.report.Report(type='Crash')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Report.__init__() got an unexpected keyword argument 'type'
[PASS] error code 0
[FAIL] Insufficient output generated: 0 lines

Results: 2; Passed: 1; Failed: 1

tests/test_diagnostic
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK

tests/test_grub_file
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:105: SyntaxWarning: invalid escape sequence '\s'
  re_param = re.compile("^\s*(\w+)\s*"+delim+"\s*(.*)")
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:105: SyntaxWarning: invalid escape sequence '\s'
  re_param = re.compile("^\s*(\w+)\s*"+delim+"\s*(.*)")
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:133: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("^\s*"+key+"\s*"+delim+"\s*(\"?)(.*)(\"?)")
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:133: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("^\s*"+key+"\s*"+delim+"\s*(\"?)(.*)(\"?)")
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:133: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("^\s*"+key+"\s*"+delim+"\s*(\"?)(.*)(\"?)")
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:145: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("^\s*"+key+"\s*"+delim)
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:145: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("^\s*"+key+"\s*"+delim)
/home/pedro/repo/xdiagnose/xdiagnose/config_update.py:175: SyntaxWarning: invalid escape sequence '\o'
  'BAR': 'f(1&&2*$i^2) # \o/',
...............
----------------------------------------------------------------------
Ran 15 tests in 0.007s

OK

tests/test_py3compile.sh
# Python3 compilation verification
./apport/apport-gpu-error-intel.py:27: SyntaxWarning: invalid escape sequence '\/'
  { 'name':'i945g', 're':'(8086:2772|945G[ \/]|82945G[ \/])' },
./apport/apport-gpu-error-intel.py:28: SyntaxWarning: invalid escape sequence '\/'
  { 'name':'i945gm', 're':'(8086:27a2|945GM[ \/]|82945GM[ \/])' },
[PASS] ./apport/apport-gpu-error-intel.py
./setup.py:35: SyntaxWarning: invalid escape sequence '\('
  match = re.compile(".*\((.*)(?:ubuntu.*)\).*").match(head)
[PASS] ./setup.py
[PASS] ./xdiagnose/utils/text.py
[PASS] ./xdiagnose/utils/option_handler.py
[PASS] ./xdiagnose/utils/__init__.py
[PASS] ./xdiagnose/utils/url_io.py
[PASS] ./xdiagnose/utils/lists.py
[PASS] ./xdiagnose/utils/debug.py
[PASS] ./xdiagnose/utils/math.py
[PASS] ./xdiagnose/utils/dicts.py
[PASS] ./xdiagnose/utils/dates.py
[PASS] ./xdiagnose/utils/screen.py
[PASS] ./xdiagnose/utils/json_io.py
[PASS] ./xdiagnose/utils/node.py
[PASS] ./xdiagnose/utils/paths.py
[PASS] ./xdiagnose/utils/readurl.py
./xdiagnose/utils/config.py:16: SyntaxWarning: invalid escape sequence '\)'
  '''Yet another INI-style config file parser.
[PASS] ./xdiagnose/utils/config.py
[PASS] ./xdiagnose/utils/processes.py
[PASS] ./xdiagnose/utils/file_io.py
[PASS] ./xdiagnose/info.py
./xdiagnose/xorglog.py:94: SyntaxWarning: invalid escape sequence '\('
  m = re.search('\(II\) Loading.*modules\/drivers\/(.+)_drv\.so', line)
[PASS] ./xdiagnose/xorglog.py
[PASS] ./xdiagnose/__init__.py
./xdiagnose/pci_devices.py:97: SyntaxWarning: invalid escape sequence '\/'
  PciDevice('i945g', '(8086:2772|945G[ \/])', [INTEL], gen='i945', opengl='1.4' ),
./xdiagnose/pci_devices.py:99: SyntaxWarning: invalid escape sequence '\/'
  PciDevice('i945gm', '(8086:27a2|945GM[ \/])', [INTEL], gen='i945', opengl='1.4' ),
[PASS] ./xdiagnose/pci_devices.py
[PASS] ./xdiagnose/diagnostics.py
[PASS] ./xdiagnose/errors_treeview.py
[PASS] ./xdiagnose/config_update.py
[PASS] ./xdiagnose/application.py
[PASS] ./xdiagnose/welcome.py
./xdiagnose/edid.py:67: SyntaxWarning: invalid escape sequence '\('
  re_head = re.compile("\(II\) .*\(\d+\): EDID \(in hex\):$")
./xdiagnose/edid.py:68: SyntaxWarning: invalid escape sequence '\('
  re_edid = re.compile("\(II\) .*\(\d+\):\s\t([0-9a-f]{32})$")
./xdiagnose/edid.py:287: SyntaxWarning: invalid escape sequence '\('
  regex = re.compile("\(II\) .*\(\d+\):\s+(.*)$")
[PASS] ./xdiagnose/edid.py
./xdiagnose/applet.py:185: SyntaxWarning: invalid escape sequence '\w'
  re_kparam = re.compile("^([\w\.]+)=(.*)")
./xdiagnose/applet.py:195: SyntaxWarning: invalid escape sequence '\w'
  re_kparam = re.compile("^([\w\.]+)=(.*)")
./xdiagnose/applet.py:324: SyntaxWarning: invalid escape sequence '\['
  re_xorg_error = re.compile("^\[\s*([\d\.]+)\] \(EE\) (.*)$")
./xdiagnose/applet.py:325: SyntaxWarning: invalid escape sequence '\['
  re_dmesg_error = re.compile("^\[\s*(\d+\.\d+)\] (.*(?:BUG|ERROR|WARNING).*)$")
./xdiagnose/applet.py:326: SyntaxWarning: invalid escape sequence '\d'
  re_jockey_error = re.compile("^(\d+\-\d+-\d+ \d+:\d+:\d+,\d+) ERROR: (.*)$")
[PASS] ./xdiagnose/applet.py
[PASS] ./xdiagnose/x_pkg_names.py

Results: 31; Passed: 31; Failed: 0

tests/test_script_syntax.sh
# Basic script syntax checks
[PASS] python3 bin/dpkg-log-summary
[PASS] python3 bin/xdiagnose
Unknown script type 'POSIX shell script, ASCII text executable'
[FAIL] bin/xdiagnose-pkexec
[PASS] python3 bin/xedid
[PASS] python3 bin/xpci
bin/xrandr-tool:71: SyntaxWarning: invalid escape sequence '\d'
  re_res = re.compile("^ (\d+x\d+) *(.*)")
[PASS] python3 bin/xrandr-tool
[PASS] bash bin/xrotate
apport/apport-gpu-error-intel.py:27: SyntaxWarning: invalid escape sequence '\/'
  { 'name':'i945g', 're':'(8086:2772|945G[ \/]|82945G[ \/])' },
apport/apport-gpu-error-intel.py:28: SyntaxWarning: invalid escape sequence '\/'
  { 'name':'i945gm', 're':'(8086:27a2|945GM[ \/]|82945GM[ \/])' },
[PASS] python3 apport/apport-gpu-error-intel.py

Results: 8; Passed: 7; Failed: 1

tests/test_xorglog_parser
# Testing log parser...
/home/pedro/repo/xdiagnose/xdiagnose/xorglog.py:94: SyntaxWarning: invalid escape sequence '\('
  m = re.search('\(II\) Loading.*modules\/drivers\/(.+)_drv\.so', line)
[PASS] tests/sample.Xorg.0.log: error code 0
[PASS] tests/sample.Xorg.0.log: log content returned
[PASS] tests/sample.Xorg.0.log: xserver version returned
[PASS] tests/sample.Xorg.0.log: parsed correct boot time
/home/pedro/repo/xdiagnose/xdiagnose/xorglog.py:94: SyntaxWarning: invalid escape sequence '\('
  m = re.search('\(II\) Loading.*modules\/drivers\/(.+)_drv\.so', line)
Traceback (most recent call last):
  File "/home/pedro/repo/xdiagnose/xdiagnose/xorglog.py", line 365, in <module>
    xlog = XorgLog(sys.argv[1])
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/pedro/repo/xdiagnose/xdiagnose/xorglog.py", line 62, in __init__
    self.parse(logfile)
  File "/home/pedro/repo/xdiagnose/xdiagnose/xorglog.py", line 80, in parse
    for line in in_file.readlines():
                ^^^^^^^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 1962: invalid start byte
[FAIL] tests/sample.Xorg.1.log: error code non-zero
[FAIL] tests/sample.Xorg.1.log: too few lines returned
[FAIL] tests/sample.Xorg.1.log: no xserver version indicated
[FAIL] tests/sample.Xorg.1.log: no boot time indicated

Results: 8; Passed: 4; Failed: 4

Description of the change

fixed buggs related to back-slash and encoding.

To post a comment you must log in.
Revision history for this message
Simon Chopin (schopin) wrote :

Hi!

It seems you branched from the wrong base branch. Presumably you used ubuntu/noble-devel instead of ubuntu/devel.

As a general rule it's preferred to have an actual bug filed against the package on Launchpad rather than just having the MP, as the bug reference can (and should) be added to the changelog. In addition, given the branch issue I'm guessing you'd like to see this fixed in Noble rather than just in the upcoming Plucky. In that case, you'll need to follow the SRU guidelines as documented there:
https://canonical-sru-docs.readthedocs-hosted.com/en/latest/

The general outline of the process is the following:

* File a LP bug against the package using the documented template
* Fix the bug in all supported releases down to the target release (here it'd be Plucky, Oracular and Noble). You'll need 3 separate sponsored uploads, but if you prepare all 3 uploads at the same time a single sponsor will usually process them all at once.
* Wait for the SRU team to review and accept your uploads
* Verify your upload using the test plan you provided
* Wait for the SRU team to move the package into the release pocket.

Feel free to ask a new review from ubuntu-sponsors once this MP is fixed.

review: Needs Fixing

Unmerged commits

5d2b87c... by Pedro Machado <email address hidden>

fixed buggs related to back-slash and encoding

d2e0697... by Dave Jones

3.8.10ubuntu0.1 (patches unapplied)

Imported using git-ubuntu import.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/apport/apport-gpu-error-intel.py b/apport/apport-gpu-error-intel.py
index 289afad..cde3abe 100755
--- a/apport/apport-gpu-error-intel.py
+++ b/apport/apport-gpu-error-intel.py
@@ -24,8 +24,8 @@ pci_devices = [
24 { 'name':'i915g', 're':'(8086:2582)' },24 { 'name':'i915g', 're':'(8086:2582)' },
25 { 'name':'i915gm', 're':'(8086:2592|915GM)' },25 { 'name':'i915gm', 're':'(8086:2592|915GM)' },
26 { 'name':'e7221', 're':'(8086:258a)', 'supported':False },26 { 'name':'e7221', 're':'(8086:258a)', 'supported':False },
27 { 'name':'i945g', 're':'(8086:2772|945G[ \/]|82945G[ \/])' },27 { 'name':'i945g', 're':'(8086:2772|945G[ \\/]|82945G[ \\/])' },
28 { 'name':'i945gm', 're':'(8086:27a2|945GM[ \/]|82945GM[ \/])' },28 { 'name':'i945gm', 're':'(8086:27a2|945GM[ \\/]|82945GM[ \\/])' },
29 { 'name':'i945gme', 're':'(8086:27ae|945GME|82945GME)' },29 { 'name':'i945gme', 're':'(8086:27ae|945GME|82945GME)' },
30 { 'name':'IGDg', 're':'(8086:a001)' },30 { 'name':'IGDg', 're':'(8086:a001)' },
31 { 'name':'IGDgm', 're':'(8086:a011)' },31 { 'name':'IGDgm', 're':'(8086:a011)' },
diff --git a/debian/changelog b/debian/changelog
index 87e9074..8c725d6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,13 @@
1<<<<<<< debian/changelog
1xdiagnose (3.8.10ubuntu1) oracular; urgency=medium2xdiagnose (3.8.10ubuntu1) oracular; urgency=medium
23
3 * No change rebuild to ensure noble SRU is earlier (LP: #2075337)4 * No change rebuild to ensure noble SRU is earlier (LP: #2075337)
5=======
6xdiagnose (3.8.10ubuntu0.1) noble; urgency=medium
7
8 * Ensure fixed version of py3compile/py3clean is used when upgrading
9 (LP: #2075337)
10>>>>>>> debian/changelog
4 * setup.py: Fix version calculation for "ubuntu" suffix11 * setup.py: Fix version calculation for "ubuntu" suffix
512
6 -- Dave Jones <dave.jones@canonical.com> Sun, 25 Aug 2024 23:49:32 +010013 -- Dave Jones <dave.jones@canonical.com> Sun, 25 Aug 2024 23:49:32 +0100
diff --git a/debian/control b/debian/control
index 14e33f8..e4276f9 100644
--- a/debian/control
+++ b/debian/control
@@ -36,6 +36,7 @@ Replaces:
36Conflicts:36Conflicts:
37 x11-common (<< 1:7.6+7ubuntu1),37 x11-common (<< 1:7.6+7ubuntu1),
38 ubuntu-defaults-nexus7 (<= 0.39)38 ubuntu-defaults-nexus7 (<= 0.39)
39Breaks: python3-minimal (<< 3.12.3-0ubuntu2~)
39Description: X.org diagnosis tool40Description: X.org diagnosis tool
40 This package is a friendly GUI application for diagnosing several41 This package is a friendly GUI application for diagnosing several
41 common X.org problems on Ubuntu.42 common X.org problems on Ubuntu.
diff --git a/xdiagnose/xorglog.py b/xdiagnose/xorglog.py
index 2b33313..5002c77 100755
--- a/xdiagnose/xorglog.py
+++ b/xdiagnose/xorglog.py
@@ -73,7 +73,7 @@ class XorgLog(object):
73 self.displays = {}73 self.displays = {}
74 display = {}74 display = {}
75 display_name = "Unknown"75 display_name = "Unknown"
76 in_file = open(filename, "r")76 in_file = open(filename, "r",encoding='latin-1')
77 gathering_module = False77 gathering_module = False
78 found_ddx = False78 found_ddx = False
79 module = None79 module = None

Subscribers

People subscribed via source and target branches