You are not logged in.
I have an issue, and I've searched around, but found nothing. So here goes
Say a situation where I'd like to (or have to) install a piece of software without going though pacman, but still like it to be implemented in the database of pacman, so other PKGBUILDs will be aware that my dependency actually is there. I've heard about wocka in AUR, but it didn't work/compile on my Arch64 setup. I've made some "emtpy" packages by hand to counter this problem, but that is tedious. What I could use is something like:
pacman -D (dummy package ) mplayer, that simply installs an "empty" mplayer package. If this exists already, in a script or a hidden function in pacman, I'd be happy If it doesn't I could start freshing up my bash-skills >_<
Last edited by Themaister (2008-12-15 15:50:55)
Offline
Hi
I guess that's what you need: http://www.methylblue.com/wocka/
David
Offline
Can you give an example of when it would be useful to install something without using pacman but make pacman pretend that it installed it?
Somehow that's like working for free and getting your boss to agree to pretend that he paid you.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Well, in my case I had to install mplayer from source manually, for some reason when using a PKGBUILD, it wouldn't detect fontconfig properly when using the program (very annoying when watching anime ...) I've tried 5-6 different PKGBUILDs ... But doing it manually, with the exact same procedure as the PKGBUILDs take, it just works. If
Also, in the case of installing the nvidia-driver that provides libgl. If I'd want to install it manually, pacman wouldn't like that some packages need libgl (which nvidia provides, but isn't detected by PKGBUILDs) so, installing a dummy libgl package would be necessary here.
Last edited by Themaister (2008-12-15 16:15:12)
Offline
I would write a script to check exactly where the files get installed (comparison of before and after), then stick all of them in a pkg that way.
If I remember later, I might add something like that to pacpal or another utility I've had in mind for a while.
That said, you can probably get it working with a proper install file in the pkgbuild, even if it might be difficult to create.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
That could be an idea. I'm starting writing a simple script. I just need a method to let pacman know that a certain package has been installed manually, have a method to list every manually built package on the system and such.
Offline
Perhaps you could place the pacman package in a cachedir for manual entry.
Since it is a .pkg.tar.gz, you could copy it to /var and pacman would then recognize it.
Perhaps I am confused about your need?
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
Well... I created a script now that covers it pretty much
usage:
dummypkg -S foo version installs a dummy pkg with pkgver=version, a file that resembles the package name and version in /etc/dummy (uses sudo for pacman)
dummypkg -R foo checks if foo has been installed by dummypkg and removes it with pacman
dummypkg -l lists all packages and package versions of all packages installed by dummypkg
temporary building is done in ~/.dummypkg-tmp/
#!/bin/bash
###########
#####
## Dummypkg v0.1
#####
###########
## Script to install dummy packages in pacman
## Use at own risk!
function install(){
if [ -d ~/.dummybuild-tmp/$PACKAGE ]; then
rm -r ~/.dummybuild-tmp/$PACKAGE
fi
mkdir -p ~/.dummybuild-tmp/$PACKAGE
echo "pkgname=$PACKAGE" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "pkgver=$PKGVER" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "pkgrel=1" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "pkgdesc=\"Dummy package created by dummypkg\"" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "arch=('i686' 'x86_64')" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "url=""" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "license=\"GPL\"" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "depends=()" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "source=()" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "build(){" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "mkdir -p ~/.dummybuild-tmp/$PACKAGE/pkg/etc/dummy" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "echo >> \"Installed by dummypkg\" >> ~/.dummybuild-tmp/$PACKAGE/pkg/etc/dummy/$PACKAGE-$PKGVER" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
echo "}" >> ~/.dummybuild-tmp/$PACKAGE/PKGBUILD
cd ~/.dummybuild-tmp/$PACKAGE/
makepkg || exit 1
sudo pacman -U *pkg.tar.gz
cd ~
rm -r .dummybuild-tmp/
exit 0
}
function remove(){
if [ -e /etc/dummy/$RPACKAGE* ]; then
sudo pacman -R $RPACKAGE
else
echo "This package is not installed by dummypkg ... Exiting"
exit 1
fi
exit 0
}
function list(){
for file in `ls /etc/dummy -1`
do
echo ">> $file"
done
exit 0
}
function usage(){
echo "usage: info [[--install] [--list] [--help] [--remove] [--version]]"
exit 0
}
INSTALL=0
REMOVE=0
LIST=0
if [ "$1" = "" ]; then
usage ; exit 1
fi
while [ "$1" != "" ]; do
case $1 in
-S | --install )
INSTALL=1
PACKAGE="$2"
PKGVER="$3"
if [ "$2" = "" ]; then
echo "--install requires a package name"
exit 1
fi
if [ "$3" = "" ]; then
echo "--install requires a package version"
exit 1
fi
shift
shift
;;
-R | --remove )
REMOVE=1
RPACKAGE="$2"
if [ "$2" = "" ]; then
echo "--remove requires a package name"
exit 1
fi
shift
;;
-h | --help ) usage; exit 0 ;;
-l | --list ) LIST=1 ;;
* ) usage ; exit 1
esac
shift
done
if [ $INSTALL = 1 ]; then
install
fi
if [ $REMOVE = 1 ]; then
remove
fi
if [ $LIST = 1 ]; then
list
fi
Last edited by Themaister (2008-12-15 18:26:26)
Offline
Umm, the whole rationale sounds flawed to me... "The PKGBUILD didn't detect fontconfig right, so I just want to hit it with a hammer a few times and force it to work".
Seems like determining why the PKGBUILD failed would be a more ideal solution, if you ask me.
Offline
Well, the PKGBUILD for mplayer actually worked if it's built with --asroot (no fakeroot?), I figured now, but that's a pretty dirty solution But that alone was not the motivation for this topic though ...
Last edited by Themaister (2008-12-15 19:42:17)
Offline
Well, the PKGBUILD for mplayer actually worked if it's built with --asroot (no fakeroot?), I figured now, but that's a pretty dirty solution But that alone was not the motivation for this topic though ...
So exactly where is your fontconfig located at? The root level or the user level?
Offline
Also, in the case of installing the nvidia-driver that provides libgl. If I'd want to install it manually, pacman wouldn't like that some packages need libgl (which nvidia provides, but isn't detected by PKGBUILDs) so, installing a dummy libgl package would be necessary here.
No worries, since xorg-server 1.5.3, I beleive even the nvidia driver uses xorg-server libgl now instead of it's own version.
Offline
Just to clarify, what I had in mind would be a script to do this:
Grab a file list just before manual installation.
Grab a file list just after installation.
Compare the 2 and get the list of possibly installed files.
Open a dialogue and confirm that each file should be a part of the new package.
Move all the files into a directory keeping the relative paths, generate the necessary pkg files (.PKGINFO, etc), tar.gz it.
Install with pacman.
This would still be a dirty, but not as filthy as the dummy packages method.
Still though, as already mentioned, figuring out how to get the PKGBUILD to work in the first place is the right way to go. It's a far more elegant adaptation.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline