]> Raphaël G. Git Repositories - youtubedl/commitdiff
Merge pull request #3 from unit193/master
authorRogério Brito <rbrito@ime.usp.br>
Fri, 10 Apr 2020 12:46:46 +0000 (09:46 -0300)
committerGitHub <noreply@github.com>
Fri, 10 Apr 2020 12:46:46 +0000 (09:46 -0300)
* Tweak the auto-update features of youtube-dl.
* Add infrastructure to enable tests after build time.

Courtesy of @unit193.

debian/control
debian/patches/disable-autoupdate-mechanism.patch
debian/patches/disable_more_online_tests.patch [new file with mode: 0644]
debian/patches/series
debian/rules

index 731e1c0a8f9efc174839709f524ba233d58201f7..eae9bf9baa202112452e6053b0d0ac152644201b 100644 (file)
@@ -7,7 +7,9 @@ Build-Depends:
  debhelper-compat (= 12),
  dh-exec,
  dh-python,
+ flake8 <!nocheck>,
  pandoc,
+ python3-nose <!nocheck>,
  python3-pkg-resources,
  python3-setuptools,
  zip
index 2b906bd364a3eb5ca01e8395a689581848f66b3b..45b68d13e55717cf8f9b39ffa9d9a7eb01e78a2b 100644 (file)
@@ -15,9 +15,29 @@ Last-Update: 2018-03-16
  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
-@@ -441,7 +441,12 @@
+@@ -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:
diff --git a/debian/patches/disable_more_online_tests.patch b/debian/patches/disable_more_online_tests.patch
new file mode 100644 (file)
index 0000000..d7fcc47
--- /dev/null
@@ -0,0 +1,21 @@
+Description: Disable remaining tests that require internet.
+Author: Unit 193 <unit193@ubuntu.com>
+
+---
+ Makefile |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -49,7 +49,10 @@
+               --exclude test_subtitles.py \
+               --exclude test_write_annotations.py \
+               --exclude test_youtube_lists.py \
+-              --exclude test_youtube_signature.py
++              --exclude test_youtube_signature.py \
++              --exclude test_downloader_http.py \
++              --exclude test_InfoExtractor.py \
++              --exclude test_http.py
+ tar: youtube-dl.tar.gz
index 611c3c917b9dc1c55fd408cdb8200337ac887915..119b5528e6c735abba291b5fa1c0acf037b1aae4 100644 (file)
@@ -1,2 +1,3 @@
 skip_support_file_installation.patch
 disable-autoupdate-mechanism.patch
+disable_more_online_tests.patch
index 82d26cbeb20215b18fae35212f3ffda59d764b78..e1e9a31437d6d1d4a3eda5e3016d0ae1dd753520 100755 (executable)
@@ -9,12 +9,13 @@ export PATH := $(CURDIR)/debian/utils:$(PATH)
 
 override_dh_auto_configure:
        PREFIX=/usr SYSCONFDIR=/etc make
-       mv Makefile Makefile.inactive
        rm youtube-dl
 
 override_dh_clean:
-       test -f Makefile || mv Makefile.inactive Makefile
        make clean
        dh_clean
 
 override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+       make offlinetest PYTHON=python3
+endif