Github messages for voidlinux
 help / color / mirror / Atom feed
From: Vinfall <Vinfall@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: buku: update to 4.7.
Date: Tue, 15 Nov 2022 10:10:13 +0100	[thread overview]
Message-ID: <20221115091013.ndCrZVP7kvckn7Ila2JGvx8EbZ0PUs6WWafRzKCEF1E@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40526@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]

New comment by Vinfall on void-packages repository

https://github.com/void-linux/void-packages/pull/40526#issuecomment-1315007211

Comment:
Hi, I made the fix PR for buku and was intended to make a PR in Void too XD.

How can I apply the patch in the srcpkg template? I checked https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md but it's not mentioned there.

Here is the patch generated using diff (and I don't see why the deleted [0001-Use-system-cacerts.patch](https://github.com/void-linux/void-packages/pull/40526/files#diff-6e78ba16f5c2d7f44e64e468d85373294be40a96480f1215549e8f639c5a742b) uses a different format):

```patch
--- a/buku	2022-11-15 08:58:58.241422014 +0000
+++ b/buku	2022-11-15 09:04:34.221396456 +0000
@@ -19,10 +19,10 @@
 
 import argparse
 import calendar
-import cgi
 import codecs
 import collections
 import contextlib
+import email.message
 import json
 import locale
 import logging
@@ -3811,15 +3811,17 @@
         if soup.meta and soup.meta.get('charset') is not None:
             charset = soup.meta.get('charset')
         elif 'content-type' in resp.headers:
-            _, params = cgi.parse_header(resp.headers['content-type'])
-            if params.get('charset') is not None:
-                charset = params.get('charset')
+            m = email.message.Message()
+            m['content-type'] = resp.headers['content-type']
+            if m.get_param('charset') is not None:
+                charset = m.get_param('charset')
 
         if not charset and soup:
             meta_tag = soup.find('meta', attrs={'http-equiv': 'Content-Type'})
             if meta_tag:
-                _, params = cgi.parse_header(meta_tag.attrs['content'])
-                charset = params.get('charset', charset)
+                m = email.message.Message()
+                m['content'] = meta_tag.attrs['content']
+                charset = m.get_param('charset', charset)
 
         if charset:
             LOGDBG('charset: %s', charset)
```


  parent reply	other threads:[~2022-11-15  9:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 11:38 [PR PATCH] " Eloitor
2022-11-14 16:39 ` [PR PATCH] [Merged]: " paper42
2022-11-15  9:10 ` Vinfall [this message]
2022-11-15  9:12 ` Vinfall
2022-11-15  9:43 ` paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221115091013.ndCrZVP7kvckn7Ila2JGvx8EbZ0PUs6WWafRzKCEF1E@z \
    --to=vinfall@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).