Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge example
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mlybarger
Guru
Guru


Joined: 04 Sep 2002
Posts: 473

PostPosted: Thu Oct 03, 2002 6:15 pm    Post subject: emerge example Reply with quote

i'm looing for an example emerge that brings in a bunch of zip files, unzips them and installs them to a product directory (/usr/local/share/<prod-name>/)

i looked into the xmms-skins ebuild, but it doesn't seem to unzip the files. please correct me if i'm wrong. i'm able to install the zip files to the directory i need, but get errors when trying to unzip them there....

thanks
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Oct 03, 2002 6:25 pm    Post subject: Reply with quote

What command are you using to unzip and what errors do you get?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
mlybarger
Guru
Guru


Joined: 04 Sep 2002
Posts: 473

PostPosted: Thu Oct 03, 2002 7:33 pm    Post subject: Reply with quote

Here's the src_install:
Code:
src_unpack() {
        local bn
        mkdir ${S}
        cd ${S}
        for i in ${SRC_URI} ; do
                bn=`basename $i`
                #unzip -z -o ${DISTDIR}/${bn} > /dev/null
                cp ${DISTDIR}/${bn} .

        done
}

src_compile() {
        einfo "No compilation necessarry."
}

src_install() {
        dodir -m=644 ${D} /usr/local/sword/share
        for i in *; do
                mv $i /usr/local/sword/share
                unzip -o $i
                doins $i /usr/local/sword/share
        done
}



Here's the start of the errors, they're all the same:

>>> Install sword-modules-0.0.1 into /var/tmp/portage/sword-modules-0.0.1/image/ category sys-libs
ACCESS DENIED rename: /usr/local/sword/share
mv: cannot move `ACV.zip' to `/usr/local/sword/share': Permission denied
Archive: ACV.zip
inflating: modules/texts/ztext/acv/nt.bzs
inflating: modules/texts/ztext/acv/nt.bzv
inflating: modules/texts/ztext/acv/nt.bzz
inflating: modules/texts/ztext/acv/ot.bzs
inflating: modules/texts/ztext/acv/ot.bzv
inflating: modules/texts/ztext/acv/ot.bzz
inflating: modules/texts/ztext/acv/forward.txt
inflating: mods.d/acv.conf
install: cannot stat `/usr/local/sword/share': No such file or directory
ACCESS DENIED rename: /usr/local/sword/share
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Oct 03, 2002 7:57 pm    Post subject: Reply with quote

You're playing outside the sandbox in src_install. Can you try changing the reference to /usr/local/sword/share to ${D}/usr/local/sword/share in the mv command and doins? Actually, if you're going to submit this ebuild, you can't touch /usr/local - maybe usr/share/sword is better?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
mlybarger
Guru
Guru


Joined: 04 Sep 2002
Posts: 473

PostPosted: Thu Oct 03, 2002 9:25 pm    Post subject: Reply with quote

i'll give that a shot, and will certainly modify the ebuild so it conforms to the standard directory usage. i didn't see any mention in the document on what ${D} does. could someone explain ${D}?

thanks
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Oct 03, 2002 9:35 pm    Post subject: Reply with quote

mark_lybarger wrote:
i didn't see any mention in the document on what ${D} does. could someone explain ${D}?

There's some mention of it in http://gentoo.org/doc/en/gentoo-howto.xml, but not a real definition. I assume it's equivalent to "sandbox root" - in reality it's the image directory underneath /var/tmp/portage/.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
mlybarger
Guru
Guru


Joined: 04 Sep 2002
Posts: 473

PostPosted: Thu Oct 03, 2002 10:07 pm    Post subject: Reply with quote

thanks for the help rac. i got the alpha version working !!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum