From: Ricardo Wurmus <rekado@elephly.net>
To: Raghav Gururajan <rg@raghavgururajan.name>
Cc: guix-devel@gnu.org
Subject: Re: [Telegram-Desktop]: Help with packaging
Date: Fri, 08 Jan 2021 13:16:43 +0100 [thread overview]
Message-ID: <87sg7bfwt0.fsf@elephly.net> (raw)
In-Reply-To: <5a6392cd-b478-846a-beda-4f97e46cbdd0@raghavgururajan.name>
Raghav Gururajan <rg@raghavgururajan.name> writes:
> Hello Guix!
>
>> With this email, I have attached the complete diff, which is to be
>> applied on top of master.
>
> I have attached wrong file before. Here is the correct one attached.
The error you posted is this:
--8<---------------cut here---------------start------------->8---
Traceback (most recent call last):
File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/xml/etree/ElementTree.py", line 786, in _get_writer
write = file_or_filename.write
AttributeError: 'str' object has no attribute 'write'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/guix-build-tdesktop-2.5.1.drv-0/source/Telegram/build/changelog2appdata.py", line 73, in <module>
main()
File "/tmp/guix-build-tdesktop-2.5.1.drv-0/source/Telegram/build/changelog2appdata.py", line 68, in main
update_appdata(args.appdata_path,
File "/tmp/guix-build-tdesktop-2.5.1.drv-0/source/Telegram/build/changelog2appdata.py", line 60, in update_appdata
appdata.write(appdata_path, encoding="utf-8", xml_declaration=True)
File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/xml/etree/ElementTree.py", line 756, in write
with _get_writer(file_or_filename, enc_lower) as write:
File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/xml/etree/ElementTree.py", line 792, in _get_writer
file = open(file_or_filename, "w", encoding=encoding,
PermissionError: [Errno 13] Permission denied: '/tmp/guix-build-tdesktop-2.5.1.drv-0/build/Telegram/telegramdesktop.appdata.xml'
--8<---------------cut here---------------end--------------->8---
Because you are fetching from git and the git checkout is not writable
You need a build phase like this:
--8<---------------cut here---------------start------------->8---
(add-after 'unpack 'make-writable
(lambda _
(map make-file-writable
(find-files "." ".*"))
#t))
--8<---------------cut here---------------end--------------->8---
--
Ricardo
next prev parent reply other threads:[~2021-01-08 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 1:54 [Telegram-Desktop]: Help with packaging Raghav Gururajan
2021-01-08 1:59 ` Raghav Gururajan
2021-01-08 12:11 ` Ekaitz Zarraga
2021-01-08 12:20 ` Julien Lepiller
2021-01-08 12:16 ` Ricardo Wurmus [this message]
2021-01-08 21:21 ` Mark H Weaver
2021-01-08 22:04 ` Ricardo Wurmus
2021-01-08 22:52 ` Raghav Gururajan
2021-01-09 1:59 ` Raghav Gururajan
2021-01-12 3:32 ` Raghav Gururajan
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg7bfwt0.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
--cc=rg@raghavgururajan.name \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).