You are not logged in.

#1 2009-02-24 16:05:11

test1000
Member
Registered: 2005-04-03
Posts: 834

fakepkg: install placeholder packages

I got annoyed with updating the nvidia packages all the time as they made a new release and usually when i just changed the abs package it didn't work for some reason and the package didn't include vdpau and i was too lazy to investigate. Since nvidia have an excellent uninstall function i felt safe just installing the official package. But then I had to get pacmans dependency resolution off my back, so i made this:

DISCLAIMER: Do not use this to %&#¤ up your system and complain to the devs that your archlinux system doesn't work anymore. You are expected to know what you are doing. If you use this to fake a package and subsequently install software in the background, deal with the resulting issues yourself.

$ fakepkg packagename
or
$ fakepkg packagename provide ...

#!/bin/bash
#create a fake package containing nothing and include provides if you like. Then have pacman install it and kiss those annoying dependency issues goodbye
cd
test -d fakepkg || mkdir fakepkg
cd fakepkg

#define YOUR pacman command with root access here and the script can't see aliases...
_pacmAN=yaourt

if [ -n "${*}" ]; then
        echo -e "pkgname = ${1}\npkgver = 999-1\npkgdesc = fakepkg ${1} install\nurl = http://nostinkingurl.com\nbuilddate = 1234798527\npackager = ${USER}\nsize = 0\narch = `uname -m`\nlicense = unknown" > .PKGINFO
        for i in "${@:2}"; do
                echo "provides = $i" >> .PKGINFO
        done
        if [ -n "${*:2}" ]; then
                sed -i "s/\(pkgdesc.*install\)/& with ${*:2} provides/" .PKGINFO
        fi
        tar -czf "${1}-999-1-`uname -m`.pkg.tar.gz" .PKGINFO
        echo "package called ${1} which provides ${*:2} have been made, do you want to install it? Y/n"
        read -n 1
        case "$REPLY" in y|Y) "$_pacmAN" -U "${1}-999-1-`uname -m`.pkg.tar.gz" && echo The "$1" package has been installed. Take that dependency resolution\! ;; esac
else
        echo "you have to run the program like: $ fakepkg packagename OR fakepkg packagename provide ..."
fi

Last edited by test1000 (2009-02-24 16:08:26)


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#2 2009-02-24 16:24:11

toxygen
Member
Registered: 2008-08-22
Posts: 713

Re: fakepkg: install placeholder packages

I like your script, it might come in handy.

as a side comment, you were "too lazy" to investigate the nvidia package? tongue
yet you created this script...
all you had to do was install the nvidia-beta/nvidia-utils beta to get all the libs in the nvidia installer big_smile
as far as i know it has libcuda, libvdpau, etc in the nvidia-utils-beta package.

good job though smile

Last edited by toxygen (2009-02-24 16:24:34)


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#3 2009-02-24 18:46:36

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: fakepkg: install placeholder packages

yeah, i DID try those nvida-beta packages in the aur though something screwed up with that too so in the end i just said fsck it and made this script. I'm glad i did though since it made me do some stuff i should have done ages ago like understand the man manpage and understand the bash manpage descriptions about what it was that i wanted to do.

Last edited by test1000 (2009-02-24 19:33:52)


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

Board footer

Powered by FluxBB