package ubuntu-docs 12.04.6 failed to install/upgrade: symbolic link '/usr/share/help/ja/ubuntu-help/' size has changed from 69 to 4

Bug #1364642 reported by Theo Scholten on 2014-09-02
This bug affects 31 people
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
dpkg (openSUSE)
gnome-user-docs (Ubuntu)
ubuntu-docs (Ubuntu)

Bug Description

I cannot install all updates.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: ubuntu-docs 12.04.6
ProcVersionSignature: Ubuntu 3.13.0-35.62-generic
Uname: Linux 3.13.0-35-generic i686
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: i386
Date: Tue Sep 2 23:39:46 2014
DuplicateSignature: package:ubuntu-docs:12.04.6:symbolic link '/usr/share/help/ja/ubuntu-help/' size has changed from 69 to 4
ErrorMessage: symbolic link '/usr/share/help/ja/ubuntu-help/' size has changed from 69 to 4
InstallationDate: Installed on 2013-12-27 (248 days ago)
InstallationMedia: Ubuntu 12.04.2 LTS "Precise Pangolin" - Release i386 (20130213)
PackageArchitecture: all
SourcePackage: ubuntu-docs
Title: package ubuntu-docs 12.04.6 failed to install/upgrade: symbolic link '/usr/share/help/ja/ubuntu-help/' size has changed from 69 to 4
UpgradeStatus: Upgraded to trusty on 2014-08-12 (21 days ago)

Theo Scholten (tmascholten) wrote :
tags: removed: need-duplicate-check
Gunnar Hjalmarsson (gunnarhj) wrote :

Hi Theo,

The nature of the error indicates an hardware problem. You can probably fix it for you by running:

sudo apt-get purge ubuntu-docs
sudo apt-get install ubuntu-docs

Gunnar Hjalmarsson (gunnarhj) wrote :

Hi Martin,

This kind of error happens quite often. Upgrading works if you manually remove the erroneous symlink. Given that, would removing all the symlinks in a prerm script be a totally crazy idea?

for lang in $( ls /usr/share/help ); do
    test "$lang" = 'C' && continue
    test -d "/usr/share/help/$lang" || continue
    for link in $( ls "$help_dir" ); do
        test -h "$help_dir/$link" || continue
        rm "$help_dir/$link"
    for link in $( ls "$help_dir/figures" ); do
        test -h "$help_dir/figures/$link" || continue
        rm "$help_dir/figures/$link"

Martin Pitt (pitti) wrote :

Gunnar, "quite often" sounds worrysome -- this smells like a dpkg bug then? Did you see more duplicates of this?

This is an utterly complex and probably brittle workaround. If we need such a workaround, then the pre*inst* should call "dpkg -L <pkgname>" (this needs to be generated by debian/rules), iterate over all entries, and remove any which are a symlink. If it's a dpkg bug it would really be better to fix it there (needs a reproducer then), if it's really a hardware bug then no amount of software workarounds will help against those :/. But if you see many duplicates, it's more likely a dpkg bug.

Gunnar Hjalmarsson (gunnarhj) wrote :

These are the latest of the kind, except for this one:

Some are detected to be hardware issues, some are not. Also when it's considered a hardware issue people have reported that a removal fixes the issue; see for instance comment #5 in bug #1346809.

Is it really necessary that dpkg carries out that check? Can't it just install the link and overwrite whatever with the same name was there before? I agree it would be good to fix it in dpkg. If that's not possible, some workaround in ubuntu-docs would indeed be helpful.

Martin Pitt (pitti) wrote :

Ah, I think the "hardware error" is a false positive here. dpkg needs to check existing symlinks on unpack in order to actually respect them - - i. .e the admin might have moved a directory to a different place and put a symlink instead, and dpkg respects/maintains that. Thus a package can never replace a symlink with a directory (i. . e. that needs an explicit symlink removal in its preinst).

I'm not sure why it does the size check, or whether that's coming from some lower level.

Changed in dpkg (Ubuntu):
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dpkg (Ubuntu):
status: New → Confirmed
Changed in ubuntu-docs (Ubuntu):
status: New → Confirmed
Changed in ubuntu-docs (Ubuntu):
importance: Undecided → High
Changed in gnome-user-docs (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Bruce Newman (bruce-landshut) wrote :

I will use as is.

To post a comment you must log in.