Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#15880 - pacman - error: could not remove database {extra,community}

Attached to Project: Pacman
Opened by Emmanuel (bkk_drs) - Monday, 10 August 2009, 07:07 GMT
Last edited by Dan McGee (toofishes) - Tuesday, 11 August 2009, 02:01 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture i686
Severity High
Priority Normal
Reported Version 3.3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

[root@blackout pacman]# pacman -Syy
:: Synchronizing package databases...
--2009-08-09 20:14:48-- http://mirror.rit.edu/archlinux/testing/os/i686/testing.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/testing.db.tar.gz.part'
[---snip---]
2009-08-09 20:14:50 (34.5 KB/s) - `/var/lib/pacman/testing.db.tar.gz.part' saved [13086/13086]

--2009-08-09 20:14:50-- http://mirror.rit.edu/archlinux/core/os/i686/core.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/core.db.tar.gz.part'
[---snip---]
2009-08-09 20:14:54 (16.0 KB/s) - `/var/lib/pacman/core.db.tar.gz.part' saved [34301/34301]

--2009-08-09 20:14:54-- http://mirror.rit.edu/archlinux/extra/os/i686/extra.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/extra.db.tar.gz.part'
[---snip---]
2009-08-09 20:15:07 (40.9 KB/s) - `/var/lib/pacman/extra.db.tar.gz.part' saved [427819/427819]

--2009-08-09 20:15:08-- http://mirror.rit.edu/archlinux/community/os/i686/community.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/community.db.tar.gz.part'
[---snip---]
2009-08-09 20:15:14 (123 KB/s) - `/var/lib/pacman/community.db.tar.gz.part' saved [376103/376103]

[root@blackout pacman]# pacman -Su
:: Starting full system upgrade...
warning: asciidoc: ignoring package upgrade (8.2.7-1 => 8.4.5-1)
warning: firefox: local (3.5.3pre-6) is newer than extra (3.5.2-1)
warning: libdrm: local (20090719-1) is newer than extra (2.4.12-1)
warning: smplayer: local (0.6.8-2) is newer than extra (0.6.8-1)
warning: xf86-video-intel: local (20090808-1) is newer than extra (2.7.99.902-1)
local database is up to date

[root@blackout pacman]# pacman -Syu
:: Synchronizing package databases...
--2009-08-09 20:15:32-- http://mirror.rit.edu/archlinux/testing/os/i686/testing.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/testing.db.tar.gz.part'
[---snip---]
2009-08-09 20:15:41 (4.99 KB/s) - `/var/lib/pacman/testing.db.tar.gz.part' saved [13086/13086]

--2009-08-09 20:15:41-- http://mirror.rit.edu/archlinux/core/os/i686/core.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/core.db.tar.gz.part'
[---snip---]
2009-08-09 20:15:48 (10.6 KB/s) - `/var/lib/pacman/core.db.tar.gz.part' saved [34301/34301]

--2009-08-09 20:15:48-- http://mirror.rit.edu/archlinux/extra/os/i686/extra.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/extra.db.tar.gz.part'
[---snip---]
2009-08-09 20:16:08 (24.5 KB/s) - `/var/lib/pacman/extra.db.tar.gz.part' saved [427819/427819]

error: could not remove database extra
error: failed to update extra (could not remove database entry)
--2009-08-09 20:16:09-- http://mirror.rit.edu/archlinux/community/os/i686/community.db.tar.gz
[---snip---]
Saving to: `/var/lib/pacman/community.db.tar.gz.part'
[---snip---]
2009-08-09 20:16:20 (45.2 KB/s) - `/var/lib/pacman/community.db.tar.gz.part' saved [376103/376103]

error: could not remove database community
error: failed to update community (could not remove database entry)
:: Starting full system upgrade...
local database is up to date
This task depends upon

Closed by  Dan McGee (toofishes)
Tuesday, 11 August 2009, 02:01 GMT
Reason for closing:  Works for me
Additional comments about closing:  Kernel issue, not a pacman issue. Reopen if the situation changes.
Comment by Xavier (shining) - Monday, 10 August 2009, 10:26 GMT
can you make a backup of your extra and community databases?
tar cvzf db-backup.tar.gz /var/lib/pacman/sync/extra /var/lib/pacman/sync/community

then try to remove them : rm -r /var/lib/pacman/sync/extra /var/lib/pacman/sync/community
Comment by Emmanuel (bkk_drs) - Monday, 10 August 2009, 14:22 GMT
removed /var/lib/pacman/sync/extra and /var/lib/pacman/sync/community

#pacman -Syy
#pacman -Syu

same error.
Comment by Xavier (shining) - Monday, 10 August 2009, 14:27 GMT
any reasons for using XferCommand instead of libfetch?
Comment by Emmanuel (bkk_drs) - Monday, 10 August 2009, 14:28 GMT
I should have tried this earlier, sorry for the double post but pacman 3.2.2 works as expected.
Comment by Emmanuel (bkk_drs) - Monday, 10 August 2009, 14:41 GMT
> any reasons for using XferCommand instead of libfetch?
no, not really, just a setting that's on my machine since forever.

[root@blackout pacman]# pacman -Syyv
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
Targets : None
:: Synchronizing package databases...
testing 12.9K 18.6K/s 00:00:01 [##########################################################################################################################################################] 100%
core 33.5K 29.2K/s 00:00:01 [##########################################################################################################################################################] 100%
extra 418.1K 136.6K/s 00:00:03 [##########################################################################################################################################################] 100%
error: could not remove database extra
error: failed to update extra (could not remove database entry)
community 368.0K 125.8K/s 00:00:03 [##########################################################################################################################################################] 100%
error: could not remove database community
error: failed to update community (could not remove database entry)

[root@blackout pacman]# pacman -U /var/cache/pacman/pkg/pacman-3.2.2-1-i686.pkg.tar.gz
loading package data...
checking dependencies...
(1/1) checking for file conflicts [##########################################################################################################################################################] 100%
(1/1) upgrading pacman [##########################################################################################################################################################] 100%
warning: /etc/makepkg.conf installed as /etc/makepkg.conf.pacnew
[root@blackout pacman]# pacman -Syyv
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
Targets : None
:: Synchronizing package databases...
testing 12.9K 17.8K/s 00:00:01 [##########################################################################################################################################################] 100%
core 33.5K 28.6K/s 00:00:01 [##########################################################################################################################################################] 100%
extra 418.1K 143.2K/s 00:00:03 [##########################################################################################################################################################] 100%
community 368.0K 133.1K/s 00:00:03 [##########################################################################################################################################################] 100%
Comment by Xavier (shining) - Monday, 10 August 2009, 14:46 GMT
that is big progress bar :)

any interesting information when using --debug?

anything special about your filesystem, eg /var?
Comment by Xavier (shining) - Monday, 10 August 2009, 14:51 GMT
please show the output of :
ls -al /var/lib/pacman/sync ; df -h ; mount
Comment by Emmanuel (bkk_drs) - Monday, 10 August 2009, 14:53 GMT
> that is big progress bar :)

that's what she said :)

> any interesting information when using --debug?

[---snip---]
downloading extra.db.tar.gz...
error: could not remove database extra
debug: returning error 16 from alpm_db_update : could not remove database entry
error: failed to update extra (could not remove database entry)
[---snip---]
downloading community.db.tar.gz...
error: could not remove database community
debug: returning error 16 from alpm_db_update : could not remove database entry
error: failed to update community (could not remove database entry)
debug: unregistering database 'local'
debug: unregistering database 'testing'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'

anything special about your filesystem, eg /var?

/var is reiserfs, kernel is 2.6.31-rc5-mm1 which is not proven to be the more stable kernel around...
Comment by Emmanuel (bkk_drs) - Monday, 10 August 2009, 14:57 GMT
> please show the output of :
> ls -al /var/lib/pacman/sync ; df -h ; mount

#ls -al /var/lib/pacman/sync ; df -h ; mount
total 9
drwxr-xr-x 6 root root 152 2009-08-10 21:48 .
drwxr-xr-x 8 root root 416 2009-08-10 21:48 ..
drwxr-xr-x 4 root root 112 2009-08-10 21:48 community
drwxr-xr-x 176 root root 6272 2009-08-10 21:48 core
drwxr-xr-x 4 root root 136 2009-08-10 21:48 extra
drwxr-xr-x 69 root root 2880 2009-08-10 21:48 testing
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 7.4G 3.8G 3.2G 55% /
none 1001M 0 1001M 0% /dev/shm
none 1001M 4.0K 1001M 1% /tmp
/dev/sda1 92M 45M 43M 51% /boot
/dev/sda5 4.0G 1.8G 2.3G 44% /var
/dev/sda7 83G 45G 34G 57% /home
/dev/sda6 on / type ext4 (rw,noatime,nodiratime,barrier=0)
none on /dev type ramfs (rw,relatime)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
none on /tmp type tmpfs (rw,nosuid,nodev,nodiratime)
/dev/sda1 on /boot type ext2 (rw)
/dev/sda5 on /var type reiserfs (rw,noatime,nodiratime)
/dev/sda7 on /home type ext4 (rw,noatime,nodiratime,barrier=0)
Comment by Xavier (shining) - Monday, 10 August 2009, 15:06 GMT
So when you get the failure, you always have the two directories empty : /var/lib/pacman/sync/extra and /var/lib/pacman/sync/community?
but "rmdir /var/lib/pacman/sync/extra" and "rmdir /var/lib/pacman/sync/community" always work?

anyway it still looks like a weird kernel / filesystem issue.

The code between 3.2.2 and 3.3.0 has indeed changed. One of the difference is that the top-level directory (eg extra/, community/) was not removed before, and it is removed now. And for some odd reason, this seems to fail on your system.
Comment by Emmanuel (bkk_drs) - Monday, 10 August 2009, 15:36 GMT
> So when you get the failure, you always have the two directories empty : /var/lib/pacman/sync/extra and /var/lib/pacman/sync/community?

it always work as it should the first time (when the two dirs do not exist yet). sync/extra and sync/community are fully populated. then when I -Syy, it will always fail and here's what I've got:

[root@blackout pacman]# ls sync/extra/
kdesdk-kcachegrind-4.3.0-1 libextractor-0.5.22-1
[root@blackout pacman]# ls sync/community/
rlog-1.4-2 wml-2.0.11-2

i will try with arch stock kernel just to be sure...
Comment by Xavier (shining) - Monday, 10 August 2009, 15:42 GMT
is there anything special about these two entries? did you check permission of these dirs and of the files inside?
Comment by Emmanuel (bkk_drs) - Monday, 10 August 2009, 15:54 GMT
ok super strange issue, it is definitely kernel related. it works fine with arch kernel, fine with 2.6.31-rc4-mm1 as well...
Comment by Xavier (shining) - Monday, 10 August 2009, 19:13 GMT
Shall we close this then?

Loading...