Skip to content

Commit a511189

Browse files
committed
bugfix: fix debian bullseye
In manpages-dev package there is a know bug with broken symlinks in /usr/share/man/man3/. There is no hope that it will be fixed. Let's add a hack to bypass it. More info: https://groups.google.com/g/linux.debian.bugs.dist/c/w5HiAxl7e7Y
1 parent b4d5849 commit a511189

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

dist/main/index.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -62486,14 +62486,20 @@ function list_files_in_dir(directory, files = []) {
6248662486
});
6248762487
return files;
6248862488
}
62489-
function dpkg_read_config() {
62490-
const dpkgConfigFilepath = '/etc/dpkg/dpkg.cfg';
62491-
const dpkgConfigDirPath = '/etc/dpkg/dpkg.cfg.d';
62492-
const configs = list_files_in_dir(dpkgConfigDirPath, [dpkgConfigFilepath]);
62489+
function dpkg_new_config() {
6249362490
const dpkgConfig = {
6249462491
excludes: [],
6249562492
includes: []
6249662493
};
62494+
// https://groups.google.com/g/linux.debian.bugs.dist/c/w5HiAxl7e7Y
62495+
dpkgConfig.excludes.push(glob_to_regex('/usr/share/man/man3/LIST_*.3'));
62496+
return dpkgConfig;
62497+
}
62498+
function dpkg_read_config() {
62499+
const dpkgConfigFilepath = '/etc/dpkg/dpkg.cfg';
62500+
const dpkgConfigDirPath = '/etc/dpkg/dpkg.cfg.d';
62501+
const configs = list_files_in_dir(dpkgConfigDirPath, [dpkgConfigFilepath]);
62502+
const dpkgConfig = dpkg_new_config();
6249762503
configs.forEach(config => {
6249862504
try {
6249962505
const dpkgExcludesFile = fs.readFileSync(config, 'utf8');

src/main.ts

+13-4
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,25 @@ function list_files_in_dir(directory: string, files: string[] = []): string[] {
194194
return files
195195
}
196196

197+
function dpkg_new_config(): DpkgConfig {
198+
const dpkgConfig: DpkgConfig = {
199+
excludes: [],
200+
includes: []
201+
}
202+
203+
// https://groups.google.com/g/linux.debian.bugs.dist/c/w5HiAxl7e7Y
204+
dpkgConfig.excludes.push(glob_to_regex('/usr/share/man/man3/LIST_*.3'))
205+
206+
return dpkgConfig
207+
}
208+
197209
function dpkg_read_config(): DpkgConfig {
198210
const dpkgConfigFilepath = '/etc/dpkg/dpkg.cfg'
199211
const dpkgConfigDirPath = '/etc/dpkg/dpkg.cfg.d'
200212

201213
const configs = list_files_in_dir(dpkgConfigDirPath, [dpkgConfigFilepath])
202214

203-
const dpkgConfig: DpkgConfig = {
204-
excludes: [],
205-
includes: []
206-
}
215+
const dpkgConfig = dpkg_new_config()
207216

208217
configs.forEach(config => {
209218
try {

0 commit comments

Comments
 (0)