[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#989146: unblock: node-cpr/3.0.1-4



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package node-cpr

[ Reason ]
I did an error when including node-mkdirp (≥1) patch. Here is the fix
which permits to reenable all tests.

[ Impact ]
Maybe node-cpr is unable to copy empty directories

[ Tests ]
Upstream tests are now all enabled and passed (build + autopkgtest)

[ Risks ]
No risk, new patch is verified by tests.

[ Checklist ]
  [X] all changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in testing

Sorry for this error...

Cheers,
Yadd

unblock node-cpr/3.0.1-4
diff --git a/debian/changelog b/debian/changelog
index b0e6caf..338ddf1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+node-cpr (3.0.1-4) unstable; urgency=medium
+
+  * Team upload
+  * Fix GitHub tags regex
+  * Fix patch for node-mkdirp ≥ 1
+
+ -- Yadd <yadd@debian.org>  Wed, 26 May 2021 21:31:55 +0200
+
 node-cpr (3.0.1-3) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/patches/update-mkdirp.diff b/debian/patches/update-mkdirp.diff
index 2e50ece..092902d 100644
--- a/debian/patches/update-mkdirp.diff
+++ b/debian/patches/update-mkdirp.diff
@@ -1,26 +1,27 @@
 Description: update to mkdirp ≥ 1
-Author: Xavier Guimard <yadd@debian.org>
-Forwarded: https://github.com/davglass/cpr/issues/65
+Author: Yadd <yadd@debian.org>
+Forwarded: https://github.com/davglass/cpr/issues/68
 Last-Update: 2020-10-21
 
 --- a/lib/index.js
 +++ b/lib/index.js
-@@ -121,12 +121,12 @@
+@@ -121,12 +121,13 @@
                      err.errno = 27;
                      options.errors.push(err);
                  } else {
 -                    mkdirp(to, stat.mode, stack.add(function(err) {
-+                    mkdirp(to, stat.mode).catch((err) => {stack.add(function(err) {
++                    var ef = stack.add(function(err) {
                          /*istanbul ignore next*/
                          if (err) {
                              options.errors.push(err);
                          }
 -                    }));
-+                    })});
++                    });
++                    mkdirp(to, stat.mode).then(ef).catch(ef);
                  }
              }));
          }
-@@ -139,7 +139,7 @@
+@@ -139,7 +140,7 @@
  
  var copyFile = function(from, to, options, callback) {
      var dir = path.dirname(to);
@@ -29,32 +30,3 @@ Last-Update: 2020-10-21
          fs.stat(to, function(statError) {
              var err;
              if(!statError && options.overwrite !== true) {
---- a/tests/full.js
-+++ b/tests/full.js
-@@ -343,6 +343,7 @@
- 
-     describe('validations', function() {
- 
-+        /*
-         it('should copy empty directory', function(done) {
-             mkdirp.sync(path.join(to, 'empty-src'));
-             cpr(path.join(to, 'empty-src'), path.join(to, 'empty-dest'), function() {
-@@ -351,6 +352,7 @@
-                 done();
-             });
-         });
-+        */
- 
-         it('should not delete existing folders in out dir', function(done) {
-             mkdirp.sync(path.join(to, 'empty-src', 'a'));
-@@ -359,8 +361,8 @@
-                 var stat = fs.statSync(path.join(to, 'empty-dest'));
-                 assert.ok(stat.isDirectory());
-                 var dirs = fs.readdirSync(path.join(to, 'empty-dest'));
--                assert.equal(dirs[0], 'a');
--                assert.equal(dirs[1], 'b');
-+                assert.equal(dirs[0], 'b');
-+                //assert.equal(dirs[1], 'a');
-                 done();
-             });
-         });
diff --git a/debian/watch b/debian/watch
index 3e3a8e7..1b77a15 100644
--- a/debian/watch
+++ b/debian/watch
@@ -2,4 +2,4 @@ version=3
 opts=\
 dversionmangle=s/\+(debian|dfsg|ds|deb)(\.\d+)?$//,\
 filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/node-cpr-$1.tar.gz/ \
- https://github.com/davglass/cpr/tags .*/archive/v?([\d\.]+).tar.gz
+ https://github.com/davglass/cpr/tags .*/archive/.*/v?([\d\.]+).tar.gz

Reply to: