Closed ringods closed 6 years ago
Yes I am open to your PR. However, we are going to refactor mirror
majorly in #18.
Please wait a while before submitting your PR until #18 is merged. Thank you!
Great! I'll keep an eye on #18 and refresh my fork with it before submitting my PR. Tnx for the support already.
@ringods
OK, refreshed my fork. Tnx for the heads up.
@ymmt2005 @nojima is there any chat system you hangout on? I could use someone to discuss things with.
First question: how should I unwind the current call-chain:
mirror.Run
\- updateMirrors
\- environment.Go
\- m.Update
\- updates metadata + downloads packages here.
I currently refactored m.Update
and extracted the first part to function UpdateMetadata
.
I guess I need the same setup of wrappers, environment, contexts, but I only want to have m.UpdateMetadata
called deep down. What is the Go way of achieving this?
I'm afraid chat is not suitable for us because we live in Japan and its already night as well as we cannot type English promptly 😆 So please continue discussion here.
As for your question, could you create a work-in-progress pull request for m.UpdateMetadata
and a gist or code snippet to describe how you use it?
@ymmt2005 my changes can be found here:
https://github.com/ringods/aptutil/tree/apt-resource
I'm currently using go-apt-mirror
as the test application, aiming for the Run
method only to run UpdateMetadata
rather than the full Update
Thank you. will take a look.
Closing.
For Concourse, I'm currently implementing a new
apt-package
resource type that can easily monitor the availability of new versions of a certain package. Neither the existingaptly-cli
nor thedebian-sources
resource type fulfils my needs.This repository contains 90% of the functionality to support me in implementing this, weren't it for the fact that a number of functions in the
mirror
package are not exported. E.g. I would like to use functionsdownloadRelease
anddownloadIndices
, possibly some more.I'm not in favor of duplicating code or maintaining my own fork. Are you open to a PR that contains the changes I need to get my Concourse resource implemented?