[Pkg-octave-commit] [SCM] Debian packaging for octave branch, master, updated. 3.2.2-2-102-g2b393c2

Thomas Weber tweber at debian.org
Wed Dec 7 17:56:15 UTC 2011


The following commit has been merged in the master branch:
commit 19cf8e0cb9470aed6fdabcf9b399f379ad4b5fa8
Author: Thomas Weber <tweber at debian.org>
Date:   Tue Nov 15 19:28:26 2011 +0100

    New patch: enable_dirs_in_pkg

diff --git a/debian/patches/enable_dirs_in_pkg b/debian/patches/enable_dirs_in_pkg
new file mode 100644
index 0000000..9c447bf
--- /dev/null
+++ b/debian/patches/enable_dirs_in_pkg
@@ -0,0 +1,55 @@
+Description: Allow installation of already extracted packages with pkg.m
+Forwarded: not-needed
+Author: Thomas Weber <tweber at debian.org>
+--- a/scripts/pkg/pkg.m
++++ b/scripts/pkg/pkg.m
+@@ -664,25 +664,32 @@
+         endif
+ 
+         ## Uncompress the package.
+-        if (verbose)
+-          printf ("untar (%s, %s)\n", tgz, tmpdir);
+-        endif
+-        untar (tgz, tmpdir);
+-
+-        ## Get the name of the directories produced by tar.
+-        [dirlist, err, msg] = readdir (tmpdir);
+-        if (err)
+-          error ("couldn't read directory produced by tar: %s", msg);
+-        endif
++	if (!exist(tgz, "dir"))
++          if (verbose)
++            printf ("untar (%s, %s)\n", tgz, tmpdir);
++          endif
++          untar (tgz, tmpdir);
+ 
+-        if (length (dirlist) > 3)
+-          error ("bundles of packages are not allowed");
+-        endif
+-      endif
++	  ## Get the name of the directories produced by tar.
++          [dirlist, err, msg] = readdir (tmpdir);
++          if (err)
++            error ("couldn't read directory produced by tar: %s", msg);
++          endif
+ 
+-      ## The filename pointed to an uncompressed package to begin with.
+-      if (exist (tgz, "dir"))
+-        dirlist = {".", "..", tgz};
++          if (length (dirlist) > 3)
++            error ("bundles of packages are not allowed");
++          endif
++	else
++	  ## we are dealing with a directory, so just copy the files
++	  if (verbose)
++	    printf ("Copying directory (%s, %s)\n", tgz, tmpdir);
++	  endif
++	  [status, msg, msgid] = copyfile (tgz, tmpdir);
++	  if (!status)
++	    disp(msg);
++	  endif
++	  dirlist = {".", "..", tgz};
++	endif
+       endif
+ 
+       if (exist (tgz, "file") || exist (tgz, "dir"))
diff --git a/debian/patches/series b/debian/patches/series
index 924c30a..0972434 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 drop_version_from_pkg_function_calls
+enable_dirs_in_pkg

-- 
Debian packaging for octave



More information about the Pkg-octave-commit mailing list