bugGNU Octave - Bugs: bug #32839, pkg build/install does not work...


bug #32839: pkg build/install does not work with directories

Submitted by:  Orion Poplawski <opoplawski>
Submitted on:  Fri 18 Mar 2011 04:11:03 PM UTC  
Category: Octave FunctionSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: PostponedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Wed 07 Dec 2016 03:08:11 PM UTC, comment #8:

With the update to 4.2, for Fedora I've dropped the pkg patch and modified the octave pkg build/install macros to repack the source if necessary. So I'm fine with closing this.

Orion Poplawski <opoplawski>
Thu 30 Jun 2016 06:47:51 PM UTC, comment #7:

More discussion from #octave:

There is something to be said about "want a way to install a package from an unpacked source directory" but this is not the way. Looking into Debian's "install-pkg" script from octave-pkg-dev there is extra logic required even with this patch applied.

So should we fix pkg install so that it installs from unpacked and patched sources, in which case there's more issues (not clear why which ones, we need details from downstream on this), or should we just remove this broken feature?

I'm leaning towards the later and instead of patching Octave to support this, it might be more efficient to add the required 'tar cfz' command to the distro package build tools.

Carnë Draug <carandraug>
Project Member
Thu 30 Jun 2016 05:55:56 PM UTC, comment #6:

Discussing this on #octave, I just want to point out that both Debian and Fedora carry this patch in the octave builds for those distributions (and derivatives).

The purpose of the patch is to allow installing a package from an unpacked source directory. This makes "pkg install" behave like make, as in "wget thing.tar.gz; tar xf thing.tar.gz; cd thing; octave --eval 'pkg install .'".

I think it is acceptable if we decide that we don't want pkg to behave this way, and only be able to install packages from a packed tarball. But distribution packagers are still going to want a way to install a package from an unpacked source directory.

Mike Miller <mtmiller>
Project Administrator
Thu 30 Jun 2016 05:52:35 PM UTC, comment #5:

It should only be accepting tarballs

pkg could also install from .zip files (e.g., the symbolic-...-bundle.zip files distributed by Colin).
Is it the intention to also drop that feature?

Philip Nienhuis <philipnienhuis>
Project Member
Thu 30 Jun 2016 03:01:19 PM UTC, comment #4:

This looks like one of those undocumented features of pkg. I'm not sure what you mean with installing from directories. Did 'pkg install' used to support installing a package from an unpacked package?

Also, we rewrote pkg build from scratch recently. It should only be accepting tarballs.

Finally, what do you use this feature for?

Carnë Draug <carandraug>
Project Member
Thu 30 Jun 2016 01:01:01 PM UTC, comment #3:

Orion, do you know if this is still an issue? If so, could you please explain what you mean by "works with directories"? What command do you issue, what should happen, and what does happen (without the patch)?

Lachlan Andrew <lachlan>
Project Member
Sat 28 Dec 2013 11:35:53 PM UTC, comment #2:

The pkg rewrite broke handling of directories. The updated patch fixes. One problem in the current code is that exist(path,'file') will return true if path is a file or a directory.

(file #30124)

Orion Poplawski <opoplawski>
Fri 12 Oct 2012 05:29:23 PM UTC, comment #1:


thank you for your patch.

We are actually preparing a code sprint for pkg next month. Must make sure we take a look at this at that time. I actually never used the build option and seems we had develop something similar on OF, the releasePKG function. These two should probably be merged.


Carnë Draug <carandraug>
Project Member
Fri 18 Mar 2011 04:11:03 PM UTC, original submission:

With the changing of exist(,'file') behavior (presumably to match matlab) so exist('directory','file') returns 7, pkg build/install no longer works with directories. The attached patch fixes and supports the use of full directory paths.

Might also be good if the help for pkg build indicated that it works with directories.

Orion Poplawski <opoplawski>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #22955:  octave-3.4.0-pkgbuilddir.patch added by opoplawski (1KiB - text/x-patch - patch to fix pkg.m handling of directories.)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by lachlan (Posted a comment)
  • -unavailable- added by carandraug (Posted a comment)
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by opoplawski (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 19 Dec 2016 06:25:04 PM UTCmtmillerDependencies-=>bugs #49880 is dependent
    Wed 16 Nov 2016 07:02:38 PM UTCmtmillerCategoryLibraries=>Octave Function
      Severity3 - Normal=>2 - Minor
      StatusPatch Submitted=>Postponed
    Sat 28 Dec 2013 11:35:53 PM UTCopoplawskiAttached File-=>Added octave-3.8.0-pkgbuilddir.patch, #30124
    Sat 11 Feb 2012 04:58:57 AM UTCrik5Dependencies-=>bugs #32451 is dependent
    Sat 02 Apr 2011 03:05:25 PM UTCjordighStatusNone=>Patch Submitted
    Fri 18 Mar 2011 04:11:03 PM UTCopoplawskiAttached File-=>Added octave-3.4.0-pkgbuilddir.patch, #22955

    Back to the top

    Powered by Savane 3.1-cleanup1