You are not logged in.

#1 2008-09-15 09:13:04

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

What is /usr/share/info/dir file?

Hi,

Today's system upgrade didn't go quite smoothly. An error:

failed to commit transaction (conflicting files)
libtasn1: /usr/share/info/dir exists in filesystem

I've just backed up and deleted the offending file. Everything's fine, unless I haven't yet noticed the problem smile .

So I'm curious about the nature of the file and wether it's safe to delete. Thanks in advance.

Offline

#2 2008-09-15 09:18:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,477
Website

Re: What is /usr/share/info/dir file?

Type "info" and you will get given an index of all the info files.  That index is stored in /usr/share/info/dir.  We have just started including info files so we encounter the occasional blip...   Should be fixed soon.

Offline

#3 2008-09-16 00:02:54

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: What is /usr/share/info/dir file?

More background: standardly when you "make install" an application that includes info files, the application's makefile will copy its own info files to $DESTDIR/usr/share/info/ and run an index-updater-script (I forget its name right now) that adds the names of the just-installed info files to $DESTDIR/usr/share/info/dir. When an archer creates a package, $DESTDIR will be the_dir_containing_the_PKGBUILD/pkg, and $DESTDIR/usr/share/info will be otherwise empty. So a new $DESTDIR/usr/share/info/dir file gets created, with just the names of that app's own info files. If the archer does nothing further and distributes the package, other archers will try to install it and get errors because they probably already have an index file at /usr/share/info/dir, which this package is now trying to overwrite. As I understand it, the correct thing for the Arch package builder to do is to have their PKGBUILD file install normally, then delete any $DESTDIR/usr/share/info/dir files that may have been created. THEN, in an install script that gets run when the package is installed/removed, write a separate function that explicitly calls the index-updater-script on the installing user's machine.

At least, that's my understanding.

Offline

#4 2008-09-16 00:08:35

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: What is /usr/share/info/dir file?

Profjim wrote:

[...]

At least, that's my understanding.

Which is 100% correct, of course. :]


1000

Offline

#5 2008-10-08 23:10:18

nj
Member
Registered: 2007-04-06
Posts: 93

Re: What is /usr/share/info/dir file?

I just had this problem on one of my packages. To fix it, I did what Profjim said. I am posting the install file here in case someone wants to use it as a template. Make sure to rm -rf $startdir/pkg/usr/share/info/dir in the PKGBUILD.

post_install() {
    if [ -x '/usr/bin/info' -a -e '/usr/share/info/ledger.info' ]; then
        echo '>>> Adding ledger entry to info documentation index file.'
        install-info --info-dir='/usr/share/info' '/usr/share/info/ledger.info'
    fi
}

post_upgrade() {
    if [ -x '/usr/bin/info' -a -e '/usr/share/info/ledger.info' ]; then
        echo '>>> Updating ledger entry in info documentation index file.'
        install-info --info-dir='/usr/share/info' '/usr/share/info/ledger.info'
    fi
}

pre_remove() {
    if [ -x '/usr/bin/info' -a -e '/usr/share/info/ledger.info' ]; then
        echo '>>> Removing ledger entry from info documentation index file.'
        install-info --delete --info-dir='/usr/share/info' '/usr/share/info/ledger.info'
    fi
}

Offline

#6 2008-10-08 23:20:47

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,477
Website

Re: What is /usr/share/info/dir file?

Or you could look at /usr/share/pacman/proto-info.install (from the ABS package)

Offline

#7 2008-10-09 03:06:57

nj
Member
Registered: 2007-04-06
Posts: 93

Re: What is /usr/share/info/dir file?

Good to know. I did not have abs installed.

Offline

Board footer

Powered by FluxBB