You are not logged in.

#1 2007-07-28 22:56:35

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

telling pacman a package is already installed

Sorry if this is already in the wiki but I've tried to find it and not managed it.

I have perl xml installed through CPAN and I want to tell pacman that it is already installed so that it doesn't try to install it when something depends on it. How can I do this?

Can I tell it that it is a certain version so that if it doesn't meet the dependency version I can do something about it?

Offline

#2 2007-07-29 01:19:05

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: telling pacman a package is already installed

hmm... you could manually add a directory to the package directory I suppose...
But..there are a ton of perl-xml packages.
Which one are you trying to fool pacman into thinking is installed?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2007-07-29 10:18:57

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: telling pacman a package is already installed

At the moment it is the basic perlxml package:

current/perlxml 2.34-4
    XML::Parser - an XML parser module for perl

I used to use gentoo and they have a system for it where you can define packages you have installed by hand, I'm surprised that arch hasn't got a similar system as people have got to have come across this before.

I may see about uninstalling the CPAN module but I don't know what is depending on that and perl admin isn't my strong point so there is more chance of breaking things doing it that way.

I'm glad there isn't an obvious answer, I thought I'd searched everything!

Offline

#4 2007-07-29 11:51:57

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: telling pacman a package is already installed

Offline

#5 2007-07-29 16:54:24

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: telling pacman a package is already installed

I had a look at that link and it looks interesting but for now I decided to go with the brute force method of trying to install perlxml with pacman, noting the files it complained about already existing and then deleting them.

Reading around CPAN it doesn't rely on there being a list of what files were installed by what packages so I figured that if pacman replaces the files, CPAN isn't going to care and pacman is going to get its package installed to meet its dependencies.

The other solution I was considering was creating a dummy AUR package with the perlxml name and the right version numbers but which didn't install anything. Again, pacman would be happy as the package was installed and CPAN would get to keep the files it installed.

Offline

#6 2007-07-29 23:13:58

mitsoko
Banned
From: In the Coal Chamber
Registered: 2007-05-08
Posts: 143

Re: telling pacman a package is already installed

or you could just create an empty pkg for it , i.e via a PKGBUILD, but with no sources and an empty build function

Offline

#7 2007-07-30 08:22:35

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: telling pacman a package is already installed

raeven wrote:

or you could just create an empty pkg for it , i.e via a PKGBUILD, but with no sources and an empty build function

That is what I meant at the bottom of my last post.

Offline

#8 2007-07-30 08:37:33

Flying Saxman
Member
From: Northern Hesse
Registered: 2007-02-26
Posts: 252

Re: telling pacman a package is already installed

I would want to know anyway, how I can tell pacman, that certain packages are already installed. I want to know this, because my package-database broke up, so that "pacman -Q" gives an empty list. I dunno how it happened. Just did "pacman -Syu && pacman -Sc --noconfirm && pacman-optimize" via su, did this several times before, but the one time I recognized on shutdown, that the su-session was somehow still active. Manually reinstalling the packages is NO good idea, I tried it. It just messes the system up with a lot of *.pkgorig-files. Is there any way to repair my package-database?

Offline

#9 2007-07-30 09:36:26

retsaw
Member
From: London, UK
Registered: 2005-03-22
Posts: 132

Re: telling pacman a package is already installed

Flying Saxman,

Check to see if /tmp/pacmanDB.tgz is still there, if it is you can untar it back to /var/lib/pacman, else check to see if /var/lib/pacman.new exists, if it is hope it is complete and copy/move it to /var/lib/pacman.

It might be possible to recreate a usable pacman package database, but I can't think of an easy way to do it and at the very least you'd lose the info about which packages were installed explicitly and which were just dependencies.

Actaully, the easiest way of recreating the database I can think of would be to install all the packages from your /var/cache/pacman/pkg/ directory to an empty partition and copy the pacman database from that partition.

Last edited by retsaw (2007-07-30 09:39:46)

Offline

#10 2007-07-30 20:22:38

Flying Saxman
Member
From: Northern Hesse
Registered: 2007-02-26
Posts: 252

Re: telling pacman a package is already installed

retsaw wrote:

Check to see if /tmp/pacmanDB.tgz is still there, if it is you can untar it back to /var/lib/pacman, else check to see if /var/lib/pacman.new exists, if it is hope it is complete and copy/move it to /var/lib/pacman.

Nothing existed. Shit. I think, I'll try it this way: I make a Backup of my /-partition, force an install of all my installed packages, copy /var/lib/pacman to another partition, restore the backup and move /var/lib/pacman back. Is a shitty way, but seems to be the only possibility to me at the moment.

Offline

Board footer

Powered by FluxBB