Opened 13 years ago

Closed 10 years ago

#278 closed defect (fixed)

apt remove or upgrade fails on read-only files

Reported by: maphew Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords: pkg-apt
Cc:

Description

C:\> apt remove msys
...snip
Traceback (most recent call last):
  File "<string>", line 1043, in <module>
  File "<string>", line 326, in upgrade
  File "<string>", line 150, in install
  File "<string>", line 175, in install_next
  File "<string>", line 453, in do_uninstall
WindowsError: [Error 5] Access is denied: 'B:\\o4w\\apps\\msys\\man\\cat3\\regcomp.3.txt.lnk'

Inspecting the file attributes shows it is set as Read-only. A simple attrib -r *.lnk fixes it.

That said, the link files are broken anyway as they are hard coded to G:\Program Files\Regex\man\....

Change History (1)

comment:1 by maphew, 10 years ago

Resolution: fixed
Status: newclosed

fixed at https://github.com/maphew/apt/commit/f3540a18c06416a7f3faa2fa908bc342d7910e5d

however today I noticed a knock on effect: even though the readonly file is removed from the file system and the installed-files-list successfully, that removal is not reported to console:

{{{B:\code\apt>attrib b:\o4w\bin\iconv.dll A B:\o4w\bin\iconv.dll

B:\code\apt>attrib +R b:\o4w\bin\iconv.dll

B:\code\apt>attrib b:\o4w\bin\iconv.dll A R B:\o4w\bin\iconv.dll

B:\code\apt>apt remove iconv iconv removing iconv 1.9.1-1 removed: B:\o4w\include\iconv.h removed: B:\o4w\lib\iconv.lib

B:\code\apt>attrib b:\o4w\bin\iconv.dll File not found - B:\o4w\bin\iconv.dll }}}

Note: See TracTickets for help on using tickets.