Feature #15332

tails-documentation should prefer online docs

Added by anonym 2018-02-20 08:27:26 . Updated 2018-03-30 16:59:57 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2018-02-20
Due date:
% Done:

100%

Feature Branch:
feature/15332-prefer-online-docs
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

I.e. what sajolida requested in Bug #14962#note-15: “How crazy would it be to open the doc online if Tor is ready and in the help browser if Tor is not ready?”


Subtasks


Related issues

Related to Tails - Bug #15371: Tails documentation is not translated when browsing online Resolved 2018-03-02

History

#1 Updated by anonym 2018-02-20 09:16:35

  • % Done changed from 0 to 50
  • QA Check set to Ready for QA
  • Feature Branch set to feature/15332-prefer-online-docs

Let’s see what Jenkins thinks…

#2 Updated by anonym 2018-02-20 18:46:52

  • Status changed from Confirmed to In Progress

Applied in changeset commit:8941132b11c237c22ea1b925a4a9b8c21f021bd2.

#3 Updated by anonym 2018-02-26 12:29:30

  • Assignee changed from anonym to bertagaz

Jenkins’ results does not look good, but the old tests on devel looks equally poor (see runs 1203-1205) so I don’t think the merge should be blocked.

#4 Updated by bertagaz 2018-02-27 17:12:42

  • Status changed from In Progress to Fix committed
  • Assignee deleted (bertagaz)
  • % Done changed from 50 to 100
  • QA Check changed from Ready for QA to Pass

anonym wrote:
> Jenkins’ results does not look good, but the old tests on devel looks equally poor (see runs 1203-1205) so I don’t think the merge should be blocked.

Yeah, works manually and when I run the test locally. This change is not so crazy, so I’ve merged it into devel for 3.6, congrats.

#5 Updated by intrigeri 2018-02-28 08:00:11

  • Status changed from Fix committed to In Progress
  • Assignee set to anonym
  • % Done changed from 100 to 90
  • QA Check changed from Pass to Info Needed

I’m surprised this works:

    os.execv('/usr/local/bin/tor-browser',
             ['--new-tab', 'https://tails.boum.org/' + page])

… as the first element of the list passed as the 2nd argument should be the command to be run. The doc says this is not enforced but I wonder if we’re just lucky that it works, given on my sid system:

$ python3 -c "import os ; os.execv('/bin/touch', ['/tmp/without'])" ; ls /tmp/without
/tmp/without: missing file operand
Try '/tmp/without --help' for more information.
zsh: exit 1     python3 -c "import os ; os.execv('/bin/touch', ['/tmp/without'])"
ls: cannot access '/tmp/without': No such file or directory
$ python3 -c "import os ; os.execv('/bin/touch', ['/bin/touch', '/tmp/with'])" && ls /tmp/with
/tmp/with

So I think it would be safer to apply this patch:

--- a/config/chroot_local-includes/usr/local/bin/tails-documentation
+++ b/config/chroot_local-includes/usr/local/bin/tails-documentation
@@ -91,7 +91,8 @@ except IndexError:
 # up-to-date option.
 if os.system('/usr/local/sbin/tor-has-bootstrapped') == 0:
     os.execv('/usr/local/bin/tor-browser',
-             ['--new-tab', 'https://tails.boum.org/' + page])
+             ['/usr/local/bin/tor-browser', '--new-tab',
+              'https://tails.boum.org/' + page])

 wiki_path = '/usr/share/doc/tails/website'
 lang_code = os.getenv('LANG', 'en')[0:2]

What do you think?

#6 Updated by bertagaz 2018-03-03 12:15:48

  • related to Bug #15371: Tails documentation is not translated when browsing online added

#7 Updated by bertagaz 2018-03-14 11:32:29

  • Target version changed from Tails_3.6 to Tails_3.7

#8 Updated by intrigeri 2018-03-28 09:34:53

  • Assignee changed from anonym to intrigeri

#9 Updated by intrigeri 2018-03-28 11:03:02

  • QA Check changed from Info Needed to Ready for QA

#10 Updated by intrigeri 2018-03-28 12:49:47

  • Assignee changed from intrigeri to anonym

#11 Updated by intrigeri 2018-03-28 12:50:20

  • Target version changed from Tails_3.7 to Tails_3.6.2

#12 Updated by anonym 2018-03-29 10:05:36

  • Status changed from In Progress to Fix committed
  • Assignee deleted (anonym)
  • % Done changed from 90 to 100
  • QA Check changed from Ready for QA to Pass

#13 Updated by anonym 2018-03-30 16:59:57

  • Status changed from Fix committed to Resolved