Bug 423205 - Failed to run update_xml
Summary: Failed to run update_xml
Status: RESOLVED FIXED
Alias: None
Product: i18n
Classification: Translations
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-19 06:59 UTC by Guo Yunhe
Modified: 2020-06-20 14:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
output of `./scripts/update_xml zh_CN` after modifying (3.26 KB, text/plain)
2020-06-20 12:27 UTC, Guo Yunhe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2020-06-19 06:59:22 UTC
SUMMARY


STEPS TO REPRODUCE
1. checkout trunk/kf5-l10n/
2. run scripts/update_xml
3. check result

OBSERVED RESULT
Failed:
Updating kconfigwidgets/preparetips5 documentation (master)
(23) Failed writing body
ssh: Could not resolve hostname error: Name or service not known
fatal: the remote end hung up unexpectedly
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Failed to download ERROR: url
There was an error updating the sources

EXPECTED RESULT
Should not be error


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2020-06-20 09:18:10 UTC
Unrelated to your actual error: Don't run scripts/update_xml only, pass the code  of your language otherwise it's going to run for all languages and you most probably don't want that

Related to your language error:

If you have a commiter account, please add these lines to your .gitconfig

[url "ssh://git@invent.kde.org/"]
        insteadOf = kde:
[url "ssh://git@invent.kde.org/"]
        pushInsteadOf = kde:

if you don't have a commiter account please add these lines to your .gitconfig

[url "https://invent.kde.org/"]
        insteadOf = kde:
[url "https://invent.kde.org/"]
        pushInsteadOf = kde:

Does that help?
Comment 2 Luigi Toscano 2020-06-20 10:55:10 UTC
Unfortunately `git archive`, used by update_xml (through populate_documentation.sh) requires the git protocol and doesn't work with the http(s) protocol. As invent.kde.org only supports https for anonymous users, you need to use the first configuration. This also means that only users with commit access can generate the documentation.
Comment 3 Guo Yunhe 2020-06-20 12:15:38 UTC
Thanks for explanation. I did add the following to my ~/.gitconfig:

[url "ssh://git@invent.kde.org/"]
        insteadOf = kde:
[url "ssh://git@invent.kde.org/"]
        pushInsteadOf = kde:

But still get the same error:

Updating kconfigwidgets/preparetips5 documentation (master)
(23) Failed writing body
ssh: Could not resolve hostname error: Name or service not known
fatal: the remote end hung up unexpectedly
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Failed to download ERROR: url
There was an error updating the sources

I have a committer account but never tried in KDE Invent. It used to work with SVN and Phabricator.
Comment 4 Luigi Toscano 2020-06-20 12:21:53 UTC
Can you plese change line 69 of update_xml from

    bash ./scripts/populate_documentation.sh

to 

    bash -x ./scripts/populate_documentation.sh

rerun the script and attach the output? (attached because I think it will be too long to be simply copied in a comment).
Comment 5 Guo Yunhe 2020-06-20 12:27:51 UTC
Created attachment 129545 [details]
output of `./scripts/update_xml zh_CN` after modifying
Comment 6 Guo Yunhe 2020-06-20 12:34:32 UTC
+++ curl --retry 5 -s https://projects.kde.org/api/v1/identifier/kconfigwidgets
+++ jq -r .repo
(23) Failed writing body

I didn't have jq installed on my system. After installing jq, the script works as expected. Maybe in the script, you can add some cnf checking?
Comment 7 Unknown 2020-06-20 14:19:56 UTC
SVN commit 1572396 by ltoscano:

get_paths & co: fail early if jq and curl are missing

get_paths and a bunch of other scripts fail if some
programs (presently jq and curl) are missing.

Add a new function which checks if the they are working
and use it to fail early if not.



 M  +16 -0     branches/stable/l10n-kde4/scripts/get_paths  
 M  +1 -0      branches/stable/l10n-kde4/scripts/populate_documentation.sh  
 M  +2 -0      branches/stable/l10n-kde4/scripts/update_xml  
 M  +16 -0     branches/stable/l10n-kf5-plasma-lts/scripts/get_paths  
 M  +1 -0      branches/stable/l10n-kf5-plasma-lts/scripts/populate_documentation.sh  
 M  +2 -0      branches/stable/l10n-kf5-plasma-lts/scripts/update_xml  
 M  +16 -0     branches/stable/l10n-kf5/scripts/get_paths  
 M  +1 -0      branches/stable/l10n-kf5/scripts/populate_documentation.sh  
 M  +2 -0      branches/stable/l10n-kf5/scripts/update_xml  
 M  +16 -0     trunk/l10n-kf5/scripts/get_paths  
 M  +1 -0      trunk/l10n-kf5/scripts/populate_documentation.sh  
 M  +2 -0      trunk/l10n-kf5/scripts/update_xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1572396