Comments (2)
Sorry I can't reproduce this. I get:
stow: No packages to stow or unstow
which is also unsurprising because the stow
command didn't specify which package to stow. But even if I guess that the package to stow was app
, then I can't reproduce the error since it works fine for me. The output you pasted doesn't seem to match the commands listed for reproduction. For example,
Evaluate existing link: app => ../Cellar/app/0.36.2
indicates a relative symlink, but your setup creates absolute symlinks. Please can you paste the exact sequence of commands you used, and the full output from Stow, not just select lines?
from stow.
@aspiers Sorry, I missed the package name. I reproduced it again, this is my script and output log.
#!/usr/bin/env sh
base_dir="$(dirname -- "$(realpath $0)")"/stow-test-symbolic-link
target="${base_dir}"
app_name="app"
app_ver="0.36.2"
rm -rf "${base_dir}"
echo "${base_dir}" "${app_name}" "${app_ver}"
mkdir -p "${base_dir}"/{Cellar,opt,etc,dotfiles}
# create source file with version
mkdir -p "${base_dir}"/Cellar/"${app_name}"/"${app_ver}"/{bin,etc}
touch "${base_dir}"/Cellar/"${app_name}"/"${app_ver}"/{LICENSE,README.md}
touch "${base_dir}"/Cellar/"${app_name}"/"${app_ver}"/bin/cmd
touch "${base_dir}"/Cellar/"${app_name}"/"${app_ver}"/etc/cmd.conf.example
# create symbolic link folder without version
ln -snf "${base_dir}"/Cellar/"${app_name}"/"${app_ver}" "${base_dir}"/opt/"${app_name}"
# create app config in dotfiles
mkdir -p "${base_dir}"/dotfiles/"${app_name}"-config/{opt,etc}/"${app_name}"
touch "${base_dir}"/dotfiles/"${app_name}"-config/opt/"${app_name}"/homebrew.mxcl."${app_name}".plist
touch "${base_dir}"/dotfiles/"${app_name}"-config/etc/"${app_name}"/cmd.conf
echo ""
echo "########################################################################"
echo "########## file structure - before stow ##########"
echo "########################################################################"
echo ""
tree -a "${base_dir}"
echo ""
echo "########################################################################"
echo "########## stow use target directory that is normal directory ##########"
echo "########################################################################"
echo ""
stow -S --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config/opt --target="${target}"/opt/"${app_name}" "${app_name}"
[[ -d "${target}"/etc/"${app_name}" ]] || mkdir "${target}"/etc/"${app_name}"
stow -S --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config/etc --target="${target}"/etc/"${app_name}" "${app_name}"
tree -a "${base_dir}"
stow -D --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config/opt --target="${target}"/opt/"${app_name}" "${app_name}"
stow -D --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config/etc --target="${target}"/etc/"${app_name}" "${app_name}"
echo ""
echo "########################################################################"
echo "########## stow use target directory that is a symbolic link ##########"
echo "########################################################################"
echo ""
# "${target}"/opt/"${app_name}" is a symbolic link
stow -S -v5 -n --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config --target="${target}"/opt opt
[[ -d "${target}"/etc/"${app_name}" ]] && rm -rf "${target}"/etc/"${app_name}"
stow -S --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config --target="${target}"/etc etc
tree -a "${base_dir}"
# stow -D -v5 -n --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config --target="${target}"/opt opt
stow -D --no-folding --dir="${base_dir}"/dotfiles/"${app_name}"-config --target="${target}"/etc etc
/Users/issenn/Downloads/aaaa/stow-test-symbolic-link app 0.36.2
########################################################################
########## file structure - before stow ##########
########################################################################
/Users/issenn/Downloads/aaaa/stow-test-symbolic-link
├── Cellar
│ └── app
│ └── 0.36.2
│ ├── LICENSE
│ ├── README.md
│ ├── bin
│ │ └── cmd
│ └── etc
│ └── cmd.conf.example
├── dotfiles
│ └── app-config
│ ├── etc
│ │ └── app
│ │ └── cmd.conf
│ └── opt
│ └── app
│ └── homebrew.mxcl.app.plist
├── etc
└── opt
└── app -> /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/Cellar/app/0.36.2
14 directories, 6 files
########################################################################
########## stow use target directory that is normal directory ##########
########################################################################
/Users/issenn/Downloads/aaaa/stow-test-symbolic-link
├── Cellar
│ └── app
│ └── 0.36.2
│ ├── LICENSE
│ ├── README.md
│ ├── bin
│ │ └── cmd
│ ├── etc
│ │ └── cmd.conf.example
│ └── homebrew.mxcl.app.plist -> ../../../dotfiles/app-config/opt/app/homebrew.mxcl.app.plist
├── dotfiles
│ └── app-config
│ ├── etc
│ │ └── app
│ │ └── cmd.conf
│ └── opt
│ └── app
│ └── homebrew.mxcl.app.plist
├── etc
│ └── app
│ └── cmd.conf -> ../../dotfiles/app-config/etc/app/cmd.conf
└── opt
└── app -> /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/Cellar/app/0.36.2
15 directories, 8 files
########################################################################
########## stow use target directory that is a symbolic link ##########
########################################################################
stow dir is /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/dotfiles/app-config
stow dir path relative to target /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/opt is ../dotfiles/app-config
cwd now /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/opt
cwd restored to /Users/issenn/Downloads/aaaa
cwd now /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/opt
Planning stow of package opt...
. not protected
Stowing contents of ../dotfiles/app-config/opt (cwd=~/Downloads/aaaa/stow-test-symbolic-link/opt)
=> ../dotfiles/app-config/opt
is_a_node(.)
link_task_action(.): no task
dir_task_action(.): no task
parent_link_scheduled_for_removal(.): prefix
parent_link_scheduled_for_removal(.): returning false
is_a_node(.): really exists
../dotfiles/app-config/opt/.stow-local-ignore didn't exist
Using ignore file: /Users/issenn/.stow-global-ignore
Ignore list regexp for paths: /(?^:(^|/)(^/COPYING|^/\.stow\-local\-ignore$|^/README.*|^/LICENSE.*|^/@.*)(/|$))/
Ignore list regexp for segments: /(?^:^(\.gitkeep|\.svn|\.git|\.hg|\.gitmodules|.*.swp|_darcs|\.cvsignore|RCS|\.DS_Store|.*\.md|#.*#|.+~|CVS|\.gitignore|.+,v|.*.example|\.#.+)$)/
Not ignoring app
Stowing ../dotfiles/app-config / opt / app
=> ../dotfiles/app-config/opt/app
is_a_link(app)
link_task_action(app): no task
is_a_link(app): is a real link
parent_link_scheduled_for_removal(app): prefix app
parent_link_scheduled_for_removal(app): returning false
link_task_action(app): no task
read_a_link(app): real link
Evaluate existing link: app => /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/Cellar/app/0.36.2
is path /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/Cellar/app/0.36.2 owned by stow?
BUG in find_stowed_path? Absolute/relative mismatch between Stow dir ../dotfiles/app-config and path /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/Cellar/app/0.36.2 at /usr/local/Cellar/stow/2.3.1//Library/Perl/5.18/Stow.pm line 966.
no - either /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/Cellar/app/0.36.2 not under ../dotfiles/app-config or vice-versa
CONFLICT when stowing opt: existing target is not owned by stow: app
Planning stow of package opt... done
cwd restored to /Users/issenn/Downloads/aaaa
WARNING! stowing opt would cause conflicts:
* existing target is not owned by stow: app
All operations aborted.
/Users/issenn/Downloads/aaaa/stow-test-symbolic-link
├── Cellar
│ └── app
│ └── 0.36.2
│ ├── LICENSE
│ ├── README.md
│ ├── bin
│ │ └── cmd
│ └── etc
│ └── cmd.conf.example
├── dotfiles
│ └── app-config
│ ├── etc
│ │ └── app
│ │ └── cmd.conf
│ └── opt
│ └── app
│ └── homebrew.mxcl.app.plist
├── etc
│ └── app
│ └── cmd.conf -> ../../dotfiles/app-config/etc/app/cmd.conf
└── opt
└── app -> /Users/issenn/Downloads/aaaa/stow-test-symbolic-link/Cellar/app/0.36.2
15 directories, 7 files
I don't want to create stow link for the directory, but to create stow link for all files.
from stow.
Related Issues (20)
- How to know that `stow` skip pointing symlink to destination since it already exists?
- make it possible to stow to a "flattened" file hierarchy (containing symlinks) HOT 2
- What changes cwd to the target directory during init of Stow? HOT 4
- Stow needs a co-maintainer HOT 1
- New files in a directory managed by stow HOT 4
- Document TeX dependency HOT 2
- --dotfiles missing from usage()
- [[email protected]] An error is reported during the execution of self-test cases. HOT 3
- `stow --simulate` should show `--adopt` actions HOT 2
- `stow --simulate` should warn when `-v` is not specified HOT 6
- Investigate ditching Stow's pre-processing phase of installation HOT 1
- ~/.stow-global-ignore doesn't work HOT 15
- .stow-local-ignore: stow does not ignore file when parent directory does not exist
- Why was the no-folding-per-pkg branch abandoned?
- Failed to install because ls HOT 1
- make install fails | installation in docker container HOT 2
- Request build flag to turn off docs creation HOT 2
- Docs build error HOT 1
- --override not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stow.