public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176)
@ 2015-04-10 17:13 Zac Medico
  2015-04-10 17:16 ` [gentoo-portage-dev] [PATCH v2] " Zac Medico
  0 siblings, 1 reply; 7+ messages in thread
From: Zac Medico @ 2015-04-10 17:13 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Mike Hiretsky, Zac Medico

From: Mike Hiretsky <mh@calculate.ru>

Since commit 02417188225758b1822d176abd8902a92300a371, new_protect_filename
has had a faulty _unicode_decode call that triggers a TypeError when
handling symlinks.

Fixes: 024171882257 ("CONFIG_PROTECT: protect symlinks, bug #485598")
X-Gentoo-Bug: 525376
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=525376
Signed-off-by: Zac Medico <zmedico@gentoo.org>
---
 pym/portage/util/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
index aeb951e..4b82e71 100644
--- a/pym/portage/util/__init__.py
+++ b/pym/portage/util/__init__.py
@@ -1705,7 +1705,7 @@ def new_protect_filename(mydest, newmd5=None, force=False):
 					if e.errno != errno.ENOENT:
 						raise
 				else:
-					pfile_link = _unicode_decode(
+					pfile_link = _unicode_decode(pfile_link,
 						encoding=_encodings['merge'], errors='replace')
 					if pfile_link == newmd5:
 						return old_pfile
-- 
2.3.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-portage-dev] [PATCH v2] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176)
  2015-04-10 17:13 [gentoo-portage-dev] [PATCH] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176) Zac Medico
@ 2015-04-10 17:16 ` Zac Medico
  2015-04-11 12:45   ` Alexander Berntsen
  0 siblings, 1 reply; 7+ messages in thread
From: Zac Medico @ 2015-04-10 17:16 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Mike Hiretsky, Zac Medico

From: Mike Hiretsky <mh@calculate.ru>

Since commit 02417188225758b1822d176abd8902a92300a371, new_protect_filename
has had a faulty _unicode_decode call that triggers a TypeError when
handling symlinks.

Fixes: 024171882257 ("CONFIG_PROTECT: protect symlinks, bug #485598")
X-Gentoo-Bug: 546176
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=546176
Signed-off-by: Zac Medico <zmedico@gentoo.org>
---
[PATCH v2] fixes incorrect bug numbers in the commit message

 pym/portage/util/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
index aeb951e..4b82e71 100644
--- a/pym/portage/util/__init__.py
+++ b/pym/portage/util/__init__.py
@@ -1705,7 +1705,7 @@ def new_protect_filename(mydest, newmd5=None, force=False):
 					if e.errno != errno.ENOENT:
 						raise
 				else:
-					pfile_link = _unicode_decode(
+					pfile_link = _unicode_decode(pfile_link,
 						encoding=_encodings['merge'], errors='replace')
 					if pfile_link == newmd5:
 						return old_pfile
-- 
2.3.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176)
  2015-04-10 17:16 ` [gentoo-portage-dev] [PATCH v2] " Zac Medico
@ 2015-04-11 12:45   ` Alexander Berntsen
  2015-04-11 15:48     ` Zac Medico
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Berntsen @ 2015-04-11 12:45 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

LGTM, but what does "From:" mean? Do you mean "Authored-by:" or
"Suggested-by:"? Please use one of those, whichever is the right one.
- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlUpF3AACgkQRtClrXBQc7WOUQEAhiu6rmGUcFyRHi9457ypRKhL
QyoUD7Jh1jb9FdPWV88A/jo9OzeJwxoRsfU1ZCdFIzn4CgcNeUXD4zOBnMbF5O5N
=EvOx
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176)
  2015-04-11 12:45   ` Alexander Berntsen
@ 2015-04-11 15:48     ` Zac Medico
  2015-04-14 20:33       ` Alexander Berntsen
  0 siblings, 1 reply; 7+ messages in thread
From: Zac Medico @ 2015-04-11 15:48 UTC (permalink / raw
  To: gentoo-portage-dev

On 04/11/2015 05:45 AM, Alexander Berntsen wrote:
> LGTM, but what does "From:" mean? Do you mean "Authored-by:" or
> "Suggested-by:"? Please use one of those, whichever is the right one.

Apparently this is what git send-email does when you send a patch after
using the git commit --author option to set a different other. I'm not
sure if this is configurable.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176)
  2015-04-11 15:48     ` Zac Medico
@ 2015-04-14 20:33       ` Alexander Berntsen
  2015-04-14 22:59         ` Mike Gilbert
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Berntsen @ 2015-04-14 20:33 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 11/04/15 17:48, Zac Medico wrote:
> Apparently this is what git send-email does when you send a patch
> after using the git commit --author option to set a different
> other. I'm not sure if this is configurable.
Oh, of course. I forgot about that. It's quite useless, because if you
am one of those patches, it will just set the author to the committer.

No problem for us though, since we don't have a workflow where someone
else than the emailer actually does the push.

- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlUteZMACgkQRtClrXBQc7U2/wD/bz8wYFApa7OjhU1LQueGHYeK
GDVby0kqsyAWXgfQSlAA/ArU+OHH2gjB63Zh21MTNJs/4gQsOBcfhiMiaEKjPaSK
=x5Fa
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176)
  2015-04-14 20:33       ` Alexander Berntsen
@ 2015-04-14 22:59         ` Mike Gilbert
  2015-04-15  0:36           ` Alexander Berntsen
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Gilbert @ 2015-04-14 22:59 UTC (permalink / raw
  To: gentoo-portage-dev

On Tue, Apr 14, 2015 at 4:33 PM, Alexander Berntsen <bernalex@gentoo.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 11/04/15 17:48, Zac Medico wrote:
>> Apparently this is what git send-email does when you send a patch
>> after using the git commit --author option to set a different
>> other. I'm not sure if this is configurable.
> Oh, of course. I forgot about that. It's quite useless, because if you
> am one of those patches, it will just set the author to the committer.
>

git-format-patch seems to indicate that git-am will pick up the From:
line int the body and this should "just work".

       --from, --from=<ident>
           Use ident in the From: header of each commit email. If the
           author ident of the commit is not textually identical to the
           provided ident, place a From: header in the body of the message
           with the original author. If no ident is given, use the
           committer ident.

           Note that this option is only useful if you are actually
           sending the emails and want to identify yourself as the sender,
           but retain the original author (and git am will correctly pick
           up the in-body header). Note also that git send-email already
           handles this transformation for you, and this option should not
           be used if you are feeding the result to git send-email.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176)
  2015-04-14 22:59         ` Mike Gilbert
@ 2015-04-15  0:36           ` Alexander Berntsen
  0 siblings, 0 replies; 7+ messages in thread
From: Alexander Berntsen @ 2015-04-15  0:36 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 15/04/15 00:59, Mike Gilbert wrote:
> git-format-patch seems to indicate that git-am will pick up the
> From: line int the body and this should "just work".
Didn't know about this option. Thanks!

- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlUtspMACgkQRtClrXBQc7WqKwD9GshU0/JwEY+vuc62Q0YzbFu/
Nj0+65R97cpiKKOo1QcBAKDwXWkhGO0TvKNqODAtsSa/IU9JKJ6WcdiOcCNaZ9zQ
=LzDb
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-15  0:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-10 17:13 [gentoo-portage-dev] [PATCH] new_protect_filename: fix _unicode_decode TypeError with symlink (bug 546176) Zac Medico
2015-04-10 17:16 ` [gentoo-portage-dev] [PATCH v2] " Zac Medico
2015-04-11 12:45   ` Alexander Berntsen
2015-04-11 15:48     ` Zac Medico
2015-04-14 20:33       ` Alexander Berntsen
2015-04-14 22:59         ` Mike Gilbert
2015-04-15  0:36           ` Alexander Berntsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox