You are not logged in.
I can't upgrade community repository because some file on my harddisk does not like to be removed.
[root@senna frank]# pacman -Sy
:: Synchronizing package databases...
core is up to date
extra is up to date
community 366.9K 1084.6K/s 00:00:00 [###########################################################################] 100%
error: could not remove database entry communitygnomebaker
error: failed to update community (could not remove database entry)
testing is up to date
When I manually try to remove this file:
[root@senna gnomebaker-0.6.2-1]# pwd
/var/lib/pacman/sync/community/gnomebaker-0.6.2-1
[root@senna gnomebaker-0.6.2-1]# ls
depends
[root@senna gnomebaker-0.6.2-1]# rm -vRf depends
rm: cannot remove `depends': Operation not permitted
Strace:
[root@senna gnomebaker-0.6.2-1]# strace rm -vRf depends
execve("/bin/rm", ["rm", "-vRf", "depends"], [/* 35 vars */]) = 0
brk(0) = 0x8c11000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=53084, ...}) = 0
mmap2(NULL, 53084, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eea000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 h\1\0004\0\0\0\200"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1554407, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee9000
mmap2(NULL, 1336912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7da2000
mprotect(0xb7ee2000, 4096, PROT_NONE) = 0
mmap2(0xb7ee3000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x140) = 0xb7ee3000
mmap2(0xb7ee6000, 9808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ee6000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7da1000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7da16c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7ee3000, 8192, PROT_READ) = 0
mprotect(0xb7f14000, 4096, PROT_READ) = 0
munmap(0xb7eea000, 53084) = 0
brk(0) = 0x8c11000
brk(0x8c32000) = 0x8c32000
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
lstat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("depends", {st_mode=S_IFREG|0644, st_size=115, ...}) = 0
unlink("depends") = -1 EPERM (Operation not permitted)
write(2, "rm: "..., 4rm: ) = 4
write(2, "cannot remove `depends'"..., 23cannot remove `depends') = 23
write(2, ": Operation not permitted"..., 25: Operation not permitted) = 25
write(2, "\n"..., 1
) = 1
close(0) = 0
close(1) = 0
close(2) = 0
exit_group(1) = ?
Does anyone have a clue what I can do about this?
It's been a while since I updated community now
Here is your parachute and here is the manual. Welcome to Linux.
Offline
Here is your parachute and here is the manual. Welcome to Linux.
+1. LMAO.
Offline
bump. anyone?
Here is your parachute and here is the manual. Welcome to Linux.
Offline
I believe it's related to this file's attributes. Issue "lsattr" in this file and see if there's an "i" attribute. If so, change it:
chattr -i filename
From chattr's man page:
A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file
and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability
can set or clear this attribute.
regards
Offline
Also 'ls -l depends' and looking at the permissions might shed some light on this.
Offline
I believe it's related to this file's attributes. Issue "lsattr" in this file and see if there's an "i" attribute. If so, change it:
chattr -i filenameFrom chattr's man page:
A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
regards
You are my hero
Worked like a charm.
Now I can update community again
Here is your parachute and here is the manual. Welcome to Linux.
Offline