-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No recursive download with databases other than in gzip #52
Comments
Also thanks man, repoctl has been serving me for more than a year already. And today chaotic-aur has more than 7k users monthly. That would be way harder without your tool. |
Hey @PedroHLC, glad to hear that repoctl is useful to you! :-) I must admit that recursive download didn't actually initially work. But I got the kinks worked out and that has been part of the 0.20 release. See issue #33 for more on that. If you are up for trying out a pre-release commit, I want to push a commit that should solve the problem. Would be nice to hear if that works for you. I wasn't able to reproduce the issue yet, unfortunately. |
😕 I was trying from c1a7475, I was able to reproduce in my personal computer like this:
|
Alright, with the most recent version from develop should be significantly better. First, building is a lot simple since moving to Go modules: git clone -b devel https://github.com/cassava/repoctl.git
cd repoctl
go install ./... And here's what I did to test your use-case. export repodir=$(mktemp -d)
echo "using repodir=$repodir"
cd $repodir
repo-add example.db.tar.zst
echo "repo = \"$repodir/example.db.tar.zst\"" > $repodir/config.toml
REPOCTL_CONFIG="$repodir/config.toml" repoctl down -r osdlyrics-git (There's another update in the pipeline that will let you see more package metadata, kind of like with |
@PedroHLC Have you had a chance to try out the current |
I had, and the problem still persists for me. As I build/install from my own PKGBUILD, I'll be doing more tests and compiling more info to handle you a proper bug report or find what I'm doing wrong. |
😄 I have no clue what I'm doing, but with or without Arch's go flags, with go install or go build and later installing the executable. |
@PedroHLC With the most recent version of repoctl, you can run |
I'd really love to fix this issue, but as of now I've been unable to reproduce it with devel, v0.20, or v0.19. #!/bin/bash
#
# This file tests repoctl functionality with the current devel branch.
set -e -x
version="${1-devel}"
dbname="example.db.tar.zst"
# 1. Create a temporary directory where we will do our tests.
export testdir=$(mktemp -d)
cd "${testdir}"
# 2. Build the desired version of repoctl.
export GOPATH="${testdir}"
(
mkdir -p src/github.com/cassava
cd src/github.com/cassava
git clone git@github.com:cassava/repoctl.git
cd repoctl
git checkout "${version}"
go install ./...
)
test -x bin/repoctl
# 3. Create a repository where we will put our database and create an
# initial empty database.
mkdir repo
dbpath="${testdir}/repo/${dbname}"
repo-add "${dbpath}"
test -f "${dbpath}"
# 4. Write a configuration for repoctl.
confpath="${testdir}/config.toml"
bin/repoctl new -c "${confpath}" config "${dbpath}"
test -f "${confpath}"
bin/repoctl version
# 5. Use said configuration to recursively download a package.
mkdir abs
(
cd abs
REPOCTL_CONFIG="${confpath}" ../bin/repoctl down -r xfce4-git-meta
)
test -f "${testdir}/abs/thunar-git/PKGBUILD" And here are the results: https://asciinema.org/a/RYr7oS1UMhxx75vKZPeTgVTv1 Attachments: If the problem persists with you it would be helpful to get the output of the |
Hi @cassava, I hadn't time to test it yet. Here's the latest: |
That's very commendable, that you sandbox all foreign code. :-) I suspect it has something to do with the network or the AUR API. |
Now, databases that only have a `.db` extension are read with whatever of the following algorithms they are compressed with: - Gzip - Xz - Bzip2 - Zst In addition, the error reporting for these cases has been improved. This should resolve issue #52.
@PedroHLC I finally was able to reproduce the problem on my machine. |
Worked flawlessly with c32b18d |
I'm using databases with
.tar.zst
, before that, I used.tar.xz
. I never understood why I couldn't use recursive and now on 0.20 I get this tiny message:Database(s): https://lonewolf.pedrohlc.com/chaotic-aur/x86_64/chaotic-aur.db.tar.zst
repoctl config: https://github.com/chaotic-aur/infra/blob/main/home/main-builder/.config/repoctl/config.toml
The text was updated successfully, but these errors were encountered: