From: Nicolas Braud-Santoni Date: Fri, 16 Mar 2018 14:17:40 -0300 Subject: Disable upstream's autoupdate mechanism Description: Remove autoupdate mechanism Bug-Debian: 890119 Forwarded: not-needed Author: Nicolas Braud-Santoni Reviewed-by: Rogério Theodoro de Brito Last-Update: 2018-03-16 --- youtube_dl/__init__.py | 7 ++++++- youtube_dl/options.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) --- a/README.md +++ a/README.md @@ -53,9 +53,6 @@ # OPTIONS -h, --help Print this help text and exit --version Print program version and exit - -U, --update Update this program to latest version. Make - sure that you have sufficient permissions - (run with sudo if needed) -i, --ignore-errors Continue on download errors, for example to skip unavailable videos in a playlist --abort-on-error Abort downloading of further videos (in the --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -36,7 +36,6 @@ write_string, render_table, ) -from .update import update_self from .downloader import ( FileDownloader, ) @@ -441,7 +440,12 @@ with YoutubeDL(ydl_opts) as ydl: # Update version if opts.update_self: - update_self(ydl.to_screen, opts.verbose, ydl._opener) + parser.error( + "youtube-dl's self-update mechanism is disabled on Debian.\n" + "Please update youtube-dl using apt(8).\n" + "See https://packages.debian.org/sid/youtube-dl for the " + "latest packaged version.\n" + ) # Remove cache dir if opts.rm_cachedir: --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -140,7 +140,7 @@ general.add_option( '-U', '--update', action='store_true', dest='update_self', - help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)') + help=optparse.SUPPRESS_HELP) general.add_option( '-i', '--ignore-errors', action='store_true', dest='ignoreerrors', default=False,