You are not logged in.

#1 2010-11-16 18:19:42

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

[solved] pacman -U saving package

hi to all

sometime i install compiled packages by me with "makepkg" and then install it with "pacman -U"
in this way pacman don't save package in its cache.....so if i remove it, i can't install again without "original"

so my question is:
how can i tell to pacman to save the package in the cache ?

thanks

Last edited by nTia89 (2010-11-17 18:02:34)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#2 2010-11-16 19:57:27

Kosmonavt
Member
Registered: 2010-02-15
Posts: 100

Re: [solved] pacman -U saving package

You always can write a script which copies package into cache after pacman -U. But cache is thought as storage of packages downloaded from repository, not local ones. It's assumed that user, who built a package by hands, will figure out by himself where to save it.

Script like this (not tested):

#!/bin/sh

# check for PKGBUILD
if[ -e PKGBUILD ]; then
    # building package
    makepkg -i -s
    sudo cp *.xz /var/cache/pacman/pkg/
else
    echo "PKGBUILD not found"
    exit 1
fi

Last edited by Kosmonavt (2010-11-16 20:53:05)

Offline

#3 2010-11-16 20:02:26

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [solved] pacman -U saving package

Offline

#4 2010-11-17 09:43:23

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [solved] pacman -U saving package

just set
PKGDEST=/var/cache/pacman/pkg
in your makepkg.conf

Offline

#5 2010-11-17 12:52:13

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: [solved] pacman -U saving package

nTia89, why not save it manually in some local dir?

Offline

#6 2010-11-17 18:02:11

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [solved] pacman -U saving package

Snowman wrote:

just set
PKGDEST=/var/cache/pacman/pkg
in your makepkg.conf

thanks a lot, updated makepkg.conf


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#7 2010-11-17 18:39:07

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] pacman -U saving package

Thats a bad workaround IMO. /var/cache is only writable by root, so you'd have to run makepkg as root for it to work - and we all know that makepkg should not be run as root (don't we?).

Set PKGDEST to some dir under your $HOME, so all your locally built packages will be there if you need to reinstall them at any stage.

Offline

#8 2010-11-17 23:40:03

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

Re: [solved] pacman -U saving package

Or just give yourself permission to write to the cache directory...   tongue

But I do agree keeping your own packages separate from the cache is probably a good idea.  Especially if you rebuild any of the ones from [core],[extra] etc as you could start getting conflicts.

Offline

#9 2010-11-18 07:55:29

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [solved] pacman -U saving package

compiled by me packages are very few and for testing some feature not included in archlinux release.....

with this i solve problem to save my compiled in my home and recompile packages when i remove it ....


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#10 2010-11-18 10:52:08

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [solved] pacman -U saving package

Allan wrote:

Or just give yourself permission to write to the cache directory...   tongue

I forgot to mention it but I've created on my system a build group  that have access to the pacman cache and added my user to it.

Offline

Board footer

Powered by FluxBB