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

Handle missing apt lists #780

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

contradict
Copy link
Contributor

On a newly imaged system, /var/lib/apt/lists may not exist. Check for
this case before comparing dates to the sources.

On a newly imaged system, /var/lib/apt/lists may not exist. Check for
this case before comparing dates to the sources.
@4nd3r
Copy link
Contributor

4nd3r commented Oct 31, 2021

Thanks.

And while on this, I would also change:

.. || [ -n "$( find /etc/apt -mindepth 1 -cnewer /var/lib/apt/lists )" ]

Same time there has been some discussion in upstream gitlab about different ways of updating APT package index:
https://code.ungleich.ch/ungleich-public/cdist/-/issues/862

tl;dr It's little messy 😄

Also gitlab->github syncing has been broken for some time, I'll look into it.

@contradict
Copy link
Contributor Author

How about something like that? Would it be helpful for me to redo this PR on your gitlab instance?

@4nd3r
Copy link
Contributor

4nd3r commented Nov 1, 2021

To be honest, yes. Because project's GitHub presence is kind of broken atm. Tho I understand not wanting to create account just to submit oneliner patch.

And that linked thread in upstream GitLab... there's no consensus yet and it moves slowly. I suggest holding this patch until we have, khm, decision. Feel free to jump in with your ideas and thoughts. Much appreciated. But my vote currently goes to solving everything related to APT index updating in __package_apt type. Will see.

Meanwhile, to unblock yourself, you can store your modified type in ~/.cdist/type/ and use it normally in your manifests.

For example, I have following conf:

$ grep conf_dir ~/.cdist.cfg 
conf_dir = /home/ander/.cdist:/home/ander/Desktop/src/cdist/cdist/conf:/home/ander/Desktop/src/cdist-contrib

This way I can keep my modifications separated from upstream repos and not worry when/if my PR will be accepted/merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants