You are not logged in.
Pages: 1
I've been getting this message recently when executing the build script in the releng profile of archiso. This happens even with an unmodified source.
Here's the error:
sed: can't read /home/bran/archlive/build.sh/pacman.conf: Not a directory
Here's the code that causes this error:
# Setup custom pacman.conf with current cache directories.
make_pacman_conf() {
local _cache_dirs
_cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${pacman_conf}
}
Variable Definitions
pacman_conf=${work_dir}/pacman.conf
script_path=$(readlink -f ${0%/*})
work_dir=/home/bran/archlive/work
If I comment out that sed expression it continues until it tries to build the ISO, so it actually seems like it's a problem with the script_path variable, considering the output from stdout
grep: /home/bran/archlive/build.sh/packages.both: Not a directory
grep: /home/bran/archlive/build.sh/packages.i686: Not a directory
[mkarchiso] ERROR: Packages must be specified
usage mkarchiso [options] command <command options>
Essentially what I'm getting from this is that it thinks my script path is /home/bran/archlive/build.sh/ instead of just /home/bran/archlive/
Any idea on how to fix this so that it can be submitted to the archiso-git maintainer?
Last edited by brando56894 (2013-11-13 06:08:03)
Offline
Hello, I am the archiso maintainer, I can not reproduce the issue. What step-by-steps are you doing?
Offline
Hey Buddy,
All I do is just download the archiso-git package from the AUR, build it and then copy over the releng profile to my home directory add in my files (from my previous attempts before this started happening) to the root-image directory, then execute the build script.
I currently have archiso working by changing the script_path variable from $(readlink -f ${0%/*}) to "/home/bran/archlive/" and changing the pacman_conf variable from work/pacman.conf to pacman.conf
The change to pacman_conf variable was implemented because after I deleted the work directory I would get this, even though it would recreate the work directory upon execution of build.sh
[root@ra /home/bran/archlive]# bash build.sh -v
[mkarchiso] INFO: Configuration settings
[mkarchiso] INFO: Command: init
[mkarchiso] INFO: Architecture: i686
[mkarchiso] INFO: Working directory: work/i686
[mkarchiso] INFO: Installation directory: arch
[mkarchiso] INFO: Pacman config file: work/pacman.conf
[mkarchiso] INFO: Installing packages to 'work/i686/root-image/'...
==> Creating install root at work/i686/root-image
==> Installing packages to work/i686/root-image
error: config file work/pacman.conf could not be read: No such file or directory
==> ERROR: Failed to install packages to new root
If I execute readlink -f ${0%/*} by itself the ouput is /usr/bin I have no idea if that's the desired output or not.
[bran@ra ~/archlive]$ readlink -f ${0%/*}
/usr/bin
Last edited by brando56894 (2013-11-12 04:55:17)
Offline
There is no need to edit the build.sh to change paths see -h option (and paste here). Anyway, something is crazy here. I suspect because you are running "bash build.sh" instead of "./build.sh". In any case, I am doing in that way without any issues.
PS: output of readlink is right.
Offline
You want me to paste the output of help??
[bran@ra ~/archlive]$ sudo bash build.sh -h
usage build.sh [options]
General options:
-N <iso_name> Set an iso filename (prefix)
Default: archlinux
-V <iso_version> Set an iso version (in filename)
Default: 2013.11.12
-L <iso_label> Set an iso label (disk label)
Default: ARCH_201311
-D <install_dir> Set an install_dir (directory inside iso)
Default: arch
-w <work_dir> Set the working directory
Default: work
-o <out_dir> Set the output directory
Default: out
-v Enable verbose output
-h This help message
Your suspicion seems to be correct, but do you know why? I'm curious.
[bran@ra ~]$ cp -r /usr/share/archiso/configs/releng .
[bran@ra ~]$ cd releng/
[bran@ra ~/releng]$ sudo bash build.sh -v
sed: can't read /home/bran/releng/build.sh/pacman.conf: Not a directory
[bran@ra ~/releng]$ sudo ./build.sh -v
[mkarchiso] INFO: Configuration settings
[mkarchiso] INFO: Command: init
[mkarchiso] INFO: Architecture: i686
[mkarchiso] INFO: Working directory: work/i686
[mkarchiso] INFO: Installation directory: arch
[mkarchiso] INFO: Pacman config file: work/pacman.conf
[mkarchiso] INFO: Installing packages to 'work/i686/root-image/'...
==> Creating install root at work/i686/root-image
==> Installing packages to work/i686/root-image
:: Synchronizing package databases...
core 106.8 KiB 380K/s 00:00 [############################################################] 100%
^Cxtra 849.6 KiB 735K/s 00:00 [##################################--------------------------] 57%
Interrupt signal received
Offline
because ${0/*} expects at least one slash to be functional.
Offline
Ah ok, thanks for the help.
Edit: I must be missing something here, but I was under the impression that everything that was in root-image folder would be installed on the system after an installation. I booted up my image and everything was there in the image but when created the partition and ran pacstrap /mnt base, then chrooted into it it was just your basic installation. Do I have to write a script to copy everything over from the live image to the installation in /mnt?
Last edited by brando56894 (2013-11-13 06:08:36)
Offline
Sure pacstrap is just a pacman wrapper.
No. You need to write an script for what you want to do. I guess if you search in the forums, you can found something like that.
Offline
I figured that was the case. No problem with that, I can write one myself. I did so a few years ago when KDE 4 had just come out and I didn't know anything about archiso, this we make the task a lot easier.
Offline
Pages: 1