bugGNU Octave - Bugs: bug #45903, pkg rebuild -global fails if...

 
 

bug #45903: pkg rebuild -global fails if package directory does not exist

Submitter:  Clemens Buchacher <drizzd>
Submitted:  Wed 09 Sep 2015 11:36:20 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 28 Aug 2018 12:07:28 AM UTC, comment #3: 

This seemed unobjectionable so I pushed the change here (https://hg.savannah.gnu.org/hgweb/octave/rev/182a8207a313).  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 15 Aug 2018 03:45:43 PM UTC, comment #2: 

@Mike: This bug is ancient, but the patch still seems relevant.  and simple.  Can you verify if it could be applied since it concerns packaging?

Rik <rik5>
Group administrator
Wed 09 Sep 2015 12:17:15 PM UTC, comment #1: 

Yes, thank you, I've been meaning to look into this. This error has affected a lot of Ubuntu users who have installed Octave in /usr/local for example, and then install the deb package which runs pkg rebuild -global and fails.

Mike Miller <mtmiller>
Group Member
Wed 09 Sep 2015 11:36:20 AM UTC, original submission:  

In the absence of any octave forge packages, /usr/share/octave/packages does not exist (maybe because it is empty it is not created by makepkg or pacman). In this situation, the following command fails:

> pkg rebuild -global

error: couldn't read directory /usr/share/octave/packages: No such file or directory
error: called from
rebuild at line 29 column 7
pkg at line 505 column 25

I use pkg rebuild to update the package database after installing or removing packages. When all octave forge packages are removed, this error appears for the last package, since at that point /usr/share/octave/packages will also be removed. It is not possible to update the package database unless one manually re-creates /usr/share/octave/packages.

A similar bug was reported and fixed in octave here:
bug #36830: Create pkg prefix directory, if it does not exist

I am attaching a patch which checks that the directory exists and if not, it will update the package database to an empty list (as appropriate). The patch applies to Octave 4.0.0.

Clemens Buchacher <drizzd>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by drizzd (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-28 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2015-09-09 mtmiller CategoryNone Octave Function
        Item GroupNone Incorrect Result
        StatusNone Patch Submitted
    2015-09-09 drizzd Attached File- Added 0001-pkg-rebuild-global-fails-if-package-directory-does-n.patch, #34840

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code