]> Raphaël G. Git Repositories - youtubedl/blob - debian/patches/disable-autoupdate-mechanism.patch
Prepare to release.
[youtubedl] / debian / patches / disable-autoupdate-mechanism.patch
1 From: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
2 Date: Fri, 16 Mar 2018 14:17:40 -0300
3 Subject: Disable upstream's autoupdate mechanism
4
5
6 Description: Remove autoupdate mechanism
7 Bug-Debian: 890119
8 Forwarded: not-needed
9 Author: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
10 Reviewed-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
11 Last-Update: 2018-03-16
12
13 ---
14 youtube_dl/__init__.py | 7 ++++++-
15 youtube_dl/options.py | 2 +-
16 2 files changed, 7 insertions(+), 2 deletions(-)
17
18 diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
19 index 9bb9524..7bf379b 100644
20 --- a/youtube_dl/__init__.py
21 +++ b/youtube_dl/__init__.py
22 @@ -438,7 +438,12 @@ def _real_main(argv=None):
23 with YoutubeDL(ydl_opts) as ydl:
24 # Update version
25 if opts.update_self:
26 - update_self(ydl.to_screen, opts.verbose, ydl._opener)
27 + parser.error(
28 + "youtube-dl's self-update mechanism is disabled on Debian.\n"
29 + "Please update youtube-dl using apt(8).\n"
30 + "See https://packages.debian.org/sid/youtube-dl for the "
31 + "latest packaged version.\n"
32 + )
33
34 # Remove cache dir
35 if opts.rm_cachedir:
36 diff --git a/youtube_dl/options.py b/youtube_dl/options.py
37 index 7d1bbc0..cafca0c 100644
38 --- a/youtube_dl/options.py
39 +++ b/youtube_dl/options.py
40 @@ -140,7 +140,7 @@ def parseOpts(overrideArguments=None):
41 general.add_option(
42 '-U', '--update',
43 action='store_true', dest='update_self',
44 - help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)')
45 + help=optparse.SUPPRESS_HELP)
46 general.add_option(
47 '-i', '--ignore-errors',
48 action='store_true', dest='ignoreerrors', default=False,