Skip to content
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

Do not use Zstd archive format with repoctl add after updating pacman to 5.2.0 version #47

Closed
canalguada opened this issue Oct 24, 2019 · 6 comments
Assignees
Labels
bug this is a bug that is contrary to the design of the program
Milestone

Comments

@canalguada
Copy link

repoctl add -m command just dumps the whole repository and leaves only the added package, when it uses the new Zstd archive format.

That could give somebody hell, I guess.

$ sed '/^$/d; /^#.*/d' $XDG_CONFIG_HOME/repoctl/config.toml
repo = "/home/canalguada/builds/repo/cgrepo.db.tar.gz"
backup = false
backup_dir = "backup/"
interactive = false
columnate = false
color = "auto"
quiet = false
@canalguada
Copy link
Author

Just add the console log, if it can help.

$ repoctl add caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst -m       
moving and adding to repository: caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst
adding package to database: /home/canalguada/builds/repo/caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst
error: unknown file format.
deleting: /home/canalguada/builds/repo/adementary-gtk-theme-git-1:248.7cb84a7-1-any.pkg.tar.xz
deleting: /home/canalguada/builds/repo/adwaita-qt4-1.0-1-x86_64.pkg.tar.xz
deleting: /home/canalguada/builds/repo/alpm_octopi_utils-1.0.1-1-x86_64.pkg.tar.xz
deleting: /home/canalguada/builds/repo/appmenu-gtk-module-git-0.7.3.r1.g8e8b2d0-1-x86_64.pkg.tar.xz

[many more packages files…]

@cassava
Copy link
Owner

cassava commented Oct 25, 2019

Wow, that's not good! Thanks for the report! I'll look into it.

@cassava cassava self-assigned this Oct 25, 2019
@cassava cassava added the bug this is a bug that is contrary to the design of the program label Oct 25, 2019
@cassava
Copy link
Owner

cassava commented Oct 25, 2019

I also sincerely apologize for your loss of data! :-(

I implemented some support for Zst compression on the devel branch.
Would you care to test it? If that works out I'll then release v0.19.

@canalguada
Copy link
Author

Since I am not fool enough to throw away all the backups of what was required to rebuild the few packages that matter, there was no actual loss of data.

$ go get -u github.com/cassava/repoctl

$ cd $GOPATH/src/github.com/cassava/repoctl

$ git checkout devel
La branche 'devel' est paramétrée pour suivre la branche distante 'devel' depuis 'origin'.
Basculement sur la nouvelle branche 'devel'

$ go install ./cmd/repoctl

$ go install ./cmd/repols

$ cd $HOME/builds/test

$ ls -1
caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst
openbox-gnome-20170530-1-any.pkg.tar.xz
pokerth-1.1.2-9-x86_64.pkg.tar.xz
repo

$ ls -l repo/
total 0

$ $GO_PATH/repoctl new config ./repo/myrepo.db.tar.gz
Writing new configuration file at /home/canalguada/.config/repoctl/config.toml ...

$ $GO_PATH/repoctl add openbox-gnome-20170530-1-any.pkg.tar.xz 
copying and adding to repository: openbox-gnome-20170530-1-any.pkg.tar.xz
adding package to database: /home/canalguada/builds/test/repo/openbox-gnome-20170530-1-any.pkg.tar.xz

$ $GO_PATH/repoctl add pokerth-1.1.2-9-x86_64.pkg.tar.xz      
copying and adding to repository: pokerth-1.1.2-9-x86_64.pkg.tar.xz
adding package to database: /home/canalguada/builds/test/repo/pokerth-1.1.2-9-x86_64.pkg.tar.xz

$ $GO_PATH/repoctl add caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst 
copying and adding to repository: caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst
adding package to database: /home/canalguada/builds/test/repo/caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst

$ $GO_PATH/repoctl add quodlibet-git-1:r10288.667aceb4c-1-any.pkg.tar.zst -m  
moving and adding to repository: quodlibet-git-1:r10288.667aceb4c-1-any.pkg.tar.zst
adding package to database: /home/canalguada/builds/test/repo/quodlibet-git-1:r10288.667aceb4c-1-any.pkg.tar.zst

$ ls -1 repo/
caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst
myrepo.db
myrepo.db.tar.gz
myrepo.db.tar.gz.old
myrepo.files
myrepo.files.tar.gz
myrepo.files.tar.gz.old
openbox-gnome-20170530-1-any.pkg.tar.xz
pokerth-1.1.2-9-x86_64.pkg.tar.xz
quodlibet-git-1:r10288.667aceb4c-1-any.pkg.tar.zst

$ $GO_PATH/repols files 
/home/canalguada/builds/test/repo/caffeine-ng-git-3.4.2.post37+g096f31b-1-any.pkg.tar.zst
/home/canalguada/builds/test/repo/openbox-gnome-20170530-1-any.pkg.tar.xz
/home/canalguada/builds/test/repo/pokerth-1.1.2-9-x86_64.pkg.tar.xz
/home/canalguada/builds/test/repo/quodlibet-git-1:r10288.667aceb4c-1-any.pkg.tar.zst

It's a sunny day… So didn't check much further. Looks pretty good.

@alanorth
Copy link

alanorth commented Nov 1, 2019

Version 0.19 from -devel works with ZST-compressed file for me too.

@Vash63
Copy link

Vash63 commented Nov 9, 2019

I can confirm that grabbing the latest commit from -devel works fine for me also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug this is a bug that is contrary to the design of the program
Projects
None yet
Development

No branches or pull requests

4 participants