You are not logged in.

#1 2010-04-14 13:51:58

int3
Member
Registered: 2010-04-12
Posts: 7

How does pacman know how to remove packages?

I've been looking at the 'Creating Packages' page, and it says to create a pkgbuild I only need to specify the build function. My question is... how does pacman know which files to remove when you do pacman -R? Does it keep track of all the files that were installed via build()?

Second question: How do you guys keep track of packages that weren't installed via the AUR? For example, if you want to hack on a project and use that hacked copy instead of the one available in the repos, what do you usually do? I'm guessing that I should let pacman keep track of those by creating pkgbuilds for them, naming them something like [packagename]-[version]-myown, and noting that it conflicts with the package in the Arch repos... is this correct?

Offline

#2 2010-04-14 14:45:12

denisfalqueto
Member
From: ES, Brazil
Registered: 2006-03-24
Posts: 197

Re: How does pacman know how to remove packages?

When you build a package with makepkg, the build function is responsible for installing the files that will be contained in the package under ${BUILD_DIR}/pkg. That directory will be tar'ed and compacted to make your final package. When you install it with pacman, will be created the file  /var/lib/pacman/local/<name of your package>/files which will list all the files owned by your package. So pacman can know how to remove them when you ask it to be deleted.

About your 2nd. question, you are quite right. The only correction is that the name of your new package should be something like "package-myown-version". You should put the old name in the conflicts and provides directive of the PKGBUILD. You should read the wiki about ABS. With it, you can get a copy of all PKGBUILDS for your current repositories, so you can change what pleases you more.


Satisfied users don't rant, so you'll never know how many of us there are.

Offline

Board footer

Powered by FluxBB