]> Raphaël G. Git Repositories - youtubedl/blob - debian/patches/remove-autoupdate-mechanism.patch
fbff4328e4b5aca55bc57b21e34e001cd297db85
[youtubedl] / debian / patches / remove-autoupdate-mechanism.patch
1 Subject: Remove autoupdate mechanism
2 Bug: 890119
3 Forwarded: no
4 From: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
5 Reviewed-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
6 Last-Update: 2018-03-16
7 Applied-Upstream: no
8
9 ---
10 youtube_dl/__init__.py | 8 ++-
11 youtube_dl/options.py | 2 +-
12 youtube_dl/update.py | 187 -------------------------------------------------
13 3 files changed, 6 insertions(+), 191 deletions(-)
14 delete mode 100644 youtube_dl/update.py
15
16 --- a/youtube_dl/__init__.py
17 +++ b/youtube_dl/__init__.py
18 @@ -438,7 +437,10 @@
19 with YoutubeDL(ydl_opts) as ydl:
20 # Update version
21 if opts.update_self:
22 - update_self(ydl.to_screen, opts.verbose, ydl._opener)
23 + parser.error(
24 + "youtube-dl's self-update mechanism is disabled on Debian.\n"
25 + "Please update youtube-dl using apt(8)."
26 + )
27
28 # Remove cache dir
29 if opts.rm_cachedir:
30 --- a/youtube_dl/options.py
31 +++ b/youtube_dl/options.py
32 @@ -140,7 +140,7 @@
33 general.add_option(
34 '-U', '--update',
35 action='store_true', dest='update_self',
36 - help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)')
37 + help=optparse.SUPPRESS_HELP)
38 general.add_option(
39 '-i', '--ignore-errors',
40 action='store_true', dest='ignoreerrors', default=False,