View previous topic :: View next topic |
Author |
Message |
mlybarger Guru
Joined: 04 Sep 2002 Posts: 473
|
Posted: Thu Oct 03, 2002 6:15 pm Post subject: emerge example |
|
|
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 |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Oct 03, 2002 6:25 pm Post subject: |
|
|
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 |
|
|
mlybarger Guru
Joined: 04 Sep 2002 Posts: 473
|
Posted: Thu Oct 03, 2002 7:33 pm Post subject: |
|
|
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 |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Oct 03, 2002 7:57 pm Post subject: |
|
|
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 |
|
|
mlybarger Guru
Joined: 04 Sep 2002 Posts: 473
|
Posted: Thu Oct 03, 2002 9:25 pm Post subject: |
|
|
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 |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Oct 03, 2002 9:35 pm Post subject: |
|
|
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 |
|
|
mlybarger Guru
Joined: 04 Sep 2002 Posts: 473
|
Posted: Thu Oct 03, 2002 10:07 pm Post subject: |
|
|
thanks for the help rac. i got the alpha version working !! |
|
Back to top |
|
|
|