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

yadm doesn't process distro|d properly without lsb_release being available #455

Open
erenfro opened this issue May 30, 2023 · 2 comments
Open
Assignees

Comments

@erenfro
Copy link

erenfro commented May 30, 2023

Describe the bug

On Fedora 38, which does not come with lsb_release by default, I noticed my ~/.gitconfig wasn't being linked, and was actively removing any manually linked files to ~/.gitconfig##d.Fedora, provided that redhat-lsb-core, which provides lsb_release, was not installed. It should, by the docs, revert to os-release, and it fails that as well.

To reproduce

Can this be reproduced with the yadm/testbed docker image: [Yes/No]

Unknown, I don't do docker.

Steps to reproduce the behavior:

Create template alternative file for yadm, without having lsb_release installed, and run yadm alt.

Expected behavior

yadm should properly investigate os-release and determine distro from ID, and apply it.

Environment

  • Operating system: Fedora 38
  • Version yadm: 3.2.1
  • Version Git: 2.40.1

Additional context

This used to work, because I've used it many times before. Perhaps I had lsb_release, as well, but I'm sure not always.

@erenfro erenfro added the bug label May 30, 2023
@erenfro
Copy link
Author

erenfro commented May 30, 2023

Further investigations has provided some useful information on this. Apparently ID=fedora, is not the same as lsb_release -si's Fedora. Case problem.

@erenfro
Copy link
Author

erenfro commented May 30, 2023

Further investigations, this is a common issue overall. lsb_release -si on Pop! OS shows Pop, but os-release is ID=pop. Linux Mint is Linuxmint and ID=linuxmint -- So this seems to be a simple case comparison issue going on, and a good graceful way to do that would be to lowercase compare both the filename key and the detected distro value.

erenfro added a commit to erenfro/yadm that referenced this issue May 30, 2023
erenfro added a commit to erenfro/yadm that referenced this issue May 30, 2023
erenfro added a commit to erenfro/yadm that referenced this issue May 30, 2023
erenfro added a commit to erenfro/yadm that referenced this issue May 30, 2023
erenfro added a commit to erenfro/yadm that referenced this issue May 31, 2023
erenfro added a commit to erenfro/yadm that referenced this issue May 31, 2023
@TheLocehiliosan TheLocehiliosan self-assigned this Jul 8, 2023
Ch4ni added a commit to Ch4ni/dotfiles that referenced this issue Sep 6, 2023
... processing alts on fedora appears to be currently broken in yadm
3.2.2 (see yadm-dev/yadm#455).

For now, move waybar back up to the main .config dir.

This will likely go away later with some restructuring once I have
my dotfiles fully committed and synced up, but for now I just need
to get things working.
erijo added a commit that referenced this issue Nov 29, 2024
* Simplify score_file() by using case in instead of nested ifs with regexps.
* Merge record_score() and record_template().
* Alt condition processing no longer stops when a template condition is seen
  but continues processing to verify that all conditions are valid (as the
  documentation says it should). Fixes #478.
* Support alt dirs with deeply nested tracked files (fixes #490).
* Use git ls-files to filter out which tracked files to consider for alt
  processing. Should speed up auto-alt (#505).
* Use nocasematch when comparing distro and distro_family. Fixed #455.
erijo added a commit that referenced this issue Dec 5, 2024
* Simplify score_file() by using case in instead of nested ifs with regexps.
* Merge record_score() and record_template().
* Alt condition processing no longer stops when a template condition is seen
  but continues processing to verify that all conditions are valid (as the
  documentation says it should). Fixes #478.
* Support alt dirs with deeply nested tracked files (fixes #490).
* Use git ls-files to filter out which tracked files to consider for alt
  processing. Should speed up auto-alt (#505).
* Use nocasematch when comparing distro and distro_family. Fixed #455.
erijo added a commit that referenced this issue Dec 6, 2024
* Simplify score_file() by using case in instead of nested ifs with regexps.
* Merge record_score() and record_template().
* Alt condition processing no longer stops when a template condition is seen
  but continues processing to verify that all conditions are valid (as the
  documentation says it should). Fixes #478.
* Support alt dirs with deeply nested tracked files (fixes #490).
* Use git ls-files to filter out which tracked files to consider for alt
  processing. Should speed up auto-alt (#505).
* Use nocasematch when comparing distro and distro_family. Fixed #455.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants