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

Support Different Source Paths #10

Open
MTecknology opened this issue Apr 20, 2017 · 6 comments
Open

Support Different Source Paths #10

MTecknology opened this issue Apr 20, 2017 · 6 comments

Comments

@MTecknology
Copy link

Right now, there's a dependency on /var/lib/apt/lists/ which means a dependency on the system apt. When I run apt-get on the system, I have to pull down a lot of sources that I probably don't need at the time... unless I'm running "sudo apt-get update" just so I can run ratt without builds failing because sources can't be found.

I can understand why the design decision was made in the first place, but it'd nice if we would extend ratt to read a custom sources.list and maintain (and optionally update) it. If nothing else, an option top point at a separate directory for these files so that I can write a script to maintain them separately.. that also makes sense. :)

@MTecknology
Copy link
Author

MTecknology commented Apr 20, 2017

Also, for the life o' me, I can't figure out how the heck to make it build for testing/stretch, but it keeps complaining about not finding sources for unstable. I don't have any for unstable... I want to run this for testing. I'm not sure if it's related, something silly I'm doing, or something else entirely.

[edit: I see a new -dist option that I was able to use. That'll suffice for now, but likely a PR later. ]

@stapelberg
Copy link
Contributor

I think you can tell apt via environment variables where to look. The burden of setting that environment variable and maintaining a separate lists directory would fall on to you; I don’t think we should build that into ratt.

Does that make sense?

@MTecknology
Copy link
Author

Creating the sources my be a job for the calling script, but ratt is hard coded to only look at system paths:
https://github.com/Debian/ratt/blob/master/ratt.go#L161 & 182 & 187

I guess if apt can do the rest using environment variables, then turning the directory into another option would be quite easy. If so, then it'd be nice to have some example setup documentation. I might be able to take a look into a PR for that.

@stapelberg
Copy link
Contributor

You’re looking at the fallback branch. Take a look at https://github.com/Debian/ratt/blob/master/ratt.go#L134 instead. No changes to the code should be necessary.

@MTecknology
Copy link
Author

I ended up using a work-around, but see what you're referring to. When I get some time, I'll plan on writing some documentation that I'm hoping you'd like to include about that that setup looks like. It at least falls like it's within scope to document how that can be done, ya? :)

@stapelberg
Copy link
Contributor

Sure, documentation improvements are always welcome.

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

No branches or pull requests

2 participants