bugGNU Octave - Bugs: bug #53578, pkg: uninstall fails if tar/zip...

 
 

bug #53578: pkg: uninstall fails if tar/zip contents are read-only (make distcheck fails in pkg.tst)

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 06 Apr 2018 10:45:37 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 08 Jan 2019 02:08:23 AM UTC, comment #1: 

To make sure 'distcheck' can pass for the Octave 5 release, I have added a temporary hack to workaround this bug in pkg on the stable branch:

https://hg.savannah.gnu.org/hgweb/octave/rev/6b703927b891

Once this bug is succesfully fixed, so that a package tar with read-only contents can be installed and uninstalled without error, this workaround can be removed from the BIST tests.

Mike Miller <mtmiller>
Group Member
Fri 06 Apr 2018 10:45:37 PM UTC, original submission:  

If a package tar or zip contains files or directories that are marked read-only when the package distribution is created, maybe only directories, then 'pkg uninstall foo' fails with an error


couldn't delete directory /path/to/.../mfile_basic_test-0.1.0: Permission denied


In particular, when running 'make distcheck', the test suite is run from a read-only copy of the Octave source. This leads to 4 out of 10 test failures in pkg.tst.

IMHO, if pkg install works, then pkg uninstall must be able to undo whatever pkg install did. That means if the contents of the package were made restrictive in some way, either

1. pkg install must change permissions as necessary when unpacking/creating/copying, or
2. pkg uninstall must be able to delete things regardless of file permissions.

Also a test for this specific error should be added to pkg.tst. For example, create a copy of one of the minimal package directories in test/pkg, recursively chmod files and directories, and do an install/uninstall test.

Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2019-02-26 mtmiller Carbon-CopyRemoved 80942 -

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code