]> 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 --- a/README.md
19 +++ a/README.md
20 @@ -53,9 +53,6 @@
21 # OPTIONS
22 -h, --help Print this help text and exit
23 --version Print program version and exit
24 - -U, --update Update this program to latest version. Make
25 - sure that you have sufficient permissions
26 - (run with sudo if needed)
27 -i, --ignore-errors Continue on download errors, for example to
28 skip unavailable videos in a playlist
29 --abort-on-error Abort downloading of further videos (in the
30 --- a/youtube_dl/__init__.py
31 +++ b/youtube_dl/__init__.py
32 @@ -36,7 +36,6 @@
33 write_string,
34 render_table,
35 )
36 -from .update import update_self
37 from .downloader import (
38 FileDownloader,
39 )
40 @@ -441,7 +440,12 @@
41 with YoutubeDL(ydl_opts) as ydl:
42 # Update version
43 if opts.update_self:
44 - update_self(ydl.to_screen, opts.verbose, ydl._opener)
45 + parser.error(
46 + "youtube-dl's self-update mechanism is disabled on Debian.\n"
47 + "Please update youtube-dl using apt(8).\n"
48 + "See https://packages.debian.org/sid/youtube-dl for the "
49 + "latest packaged version.\n"
50 + )
51
52 # Remove cache dir
53 if opts.rm_cachedir:
54 --- a/youtube_dl/options.py
55 +++ b/youtube_dl/options.py
56 @@ -140,7 +140,7 @@
57 general.add_option(
58 '-U', '--update',
59 action='store_true', dest='update_self',
60 - help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)')
61 + help=optparse.SUPPRESS_HELP)
62 general.add_option(
63 '-i', '--ignore-errors',
64 action='store_true', dest='ignoreerrors', default=False,