Skip to content

Commit fc82521

Browse files
committed
add -remote_mirror flag to replace apt-cacher-ng if desired
I have seen multiple corruption issues with apt-cacher-ng. I.e., debiman would fail to run repeatedly until I would rm -rf /var/cache/apt-cacher-ng/*
1 parent 32eac1b commit fc82521

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/debiman/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ var (
5151
false,
5252
"Forces all manpages to be re-extracted, even if there is no newer package version")
5353

54+
remoteMirror = flag.String("remote_mirror",
55+
"http://localhost:3142/deb.debian.org/",
56+
"URL of a Debian mirror to fetch packages from. localhost:3142 is provided by apt-cacher-ng")
57+
5458
localMirror = flag.String("local_mirror",
5559
"",
5660
"If non-empty, a file system path to a Debian mirror, e.g. /srv/mirrors/debian on DSA-maintained machines")
@@ -86,7 +90,7 @@ func logic() error {
8690
ar := &archive.Downloader{
8791
Parallel: 10,
8892
MaxTransientRetries: 3,
89-
Mirror: "http://localhost:3142/deb.debian.org/debian",
93+
Mirror: *remoteMirror + "/debian",
9094
LocalMirror: *localMirror,
9195
}
9296

0 commit comments

Comments
 (0)