Problem with Molecule [Solved]

If you are using the daily ISO, please report issues here to keep confusion down in other forums. Questions or issues with Molecule also here

Moderator: Moderators

Re: Problem with Molecule

Postby alexrenzi » Tue Jul 27, 2010 14:48

In fact i had already noticed and tried in /etc/skel as i wrote before, now i'm trying again but i'm having some problem to access some directory in /etc/skel:
Code: Select all
#Replace desktop icons
rm "${CHROOT_DIR}/etc/skel/Desktop/*"
cp /home/alex/Sabayon/file/desktop/* "${CHROOT_DIR}/etc/skel/Desktop/"


return this:
Code: Select all
rm: impossibile rimuovere "/var/tmp/moleculed5sZoXchroot/root/etc/skel/Desktop/*": No such file or directory
cp: impossibile creare il file regolare "/var/tmp/moleculed5sZoXchroot/root/etc/skel/.config/autostart/Yakuake.desktop": No such file or directory
>> [ChrootHandler|sabayon2.spec] outer chroot hook (after inner) failed: 1
>> [ChrootHandler|sabayon2.spec] executing kill


I really can't understand what's wrong :?
alexrenzi
Baby Hen
 
Posts: 18
Joined: Wed Dec 02, 2009 11:29

Re: Problem with Molecule

Postby joost » Tue Jul 27, 2010 14:57

You don't understand where you actually want to run things.
What you want to do should be placed in inner_chroot_script_after.sh.

Currently working on E17 spin I give you an example off a command I used there:
Code: Select all
# Fix ~/.dmrc to have it load E17
touch /etc/skel/.dmrc
echo "[Desktop] Session=enlightenment" | tr " " "\n" > /etc/skel/.dmrc
User avatar
joost
Sagely Hen
 
Posts: 2313
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands

Re: Problem with Molecule

Postby DanySK » Thu Jul 29, 2010 3:05

alexrenzi wrote:
Code: Select all
#Replace desktop icons
rm "${CHROOT_DIR}/etc/skel/Desktop/*"
cp /home/alex/Sabayon/file/desktop/* "${CHROOT_DIR}/etc/skel/Desktop/"


You are missing the -R option in cp.

The following might work:
Code: Select all
#Replace desktop icons
rm -R "${CHROOT_DIR}/etc/skel/Desktop"
cp /home/alex/Sabayon/file/Desktop "${CHROOT_DIR}/etc/skel/ -Ra"

please remember to rename "desktop" with "Desktop".
User avatar
DanySK
Technological Hen
 
Posts: 349
Joined: Tue May 22, 2007 10:18
Location: Pennabilli - Cesena

Re: Problem with Molecule

Postby alexrenzi » Sun Aug 01, 2010 18:23

Thank you DanySK it work, but i don't understand in:
Code: Select all
cp /home/alex/Sabayon/file/Desktop "${CHROOT_DIR}/etc/skel/ -Ra"


What mean the final -Ra ?
I can't find any documentation about that and also don't understand why it is placed inside the quotes.
alexrenzi
Baby Hen
 
Posts: 18
Joined: Wed Dec 02, 2009 11:29

Re: Problem with Molecule

Postby DanySK » Sun Aug 01, 2010 18:39

It's inside the quotes because of my error. You can understand what -Ra means by
Code: Select all
man cp


The following code is the file I use in order to replace the whole skel. Feel free to adapt it to your needs:

Code: Select all
#!/bin/sh
PKGS_DIR="/var/lib/entropy/client/packages"
CHROOT_PKGS_DIR="${CHROOT_DIR}/var/lib/entropy/client/packages"
SKEL_DIR="/media/Danilo/DaSistemare/Sabayon/molecule/skel"
CHROOT_SKEL_DIR="${CHROOT_DIR}/etc"

echo "Merging back packages"
cp "${CHROOT_PKGS_DIR}"/* "${PKGS_DIR}"/ -Ra
rm -rf "${CHROOT_PKGS_DIR}"{,-nonfree,-restricted}/*

echo "Modding skel"
cp "${SKEL_DIR}" "${CHROOT_SKEL_DIR}" -Ra
User avatar
DanySK
Technological Hen
 
Posts: 349
Joined: Tue May 22, 2007 10:18
Location: Pennabilli - Cesena

Previous

Return to ISO Testing & Molecule

Who is online

Users browsing this forum: No registered users and 1 guest