1
0

feat: fetch only the local repo

This commit is contained in:
dump_stack() 2023-05-26 12:56:18 +00:00
parent d9bfa63ed1
commit 1b87946130
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -460,8 +460,8 @@ func (d Debian) Install(pkgname string, headers bool) (err error) {
// prepare local repository // prepare local repository
cmdf("mkdir debs && mv *.deb debs/") cmdf("mkdir debs && mv *.deb debs/")
cmdf("dpkg-scanpackages debs /dev/null | gzip > debs/Packages.gz") cmdf("dpkg-scanpackages debs /dev/null | gzip > debs/Packages.gz")
cmdf(`echo "deb file:$(pwd) debs/" >> /etc/apt/sources.list`) cmdf(`echo "deb file:$(pwd) debs/" >> /etc/apt/sources.list.d/local.list`)
cmdf("apt-get update") cmdf("apt-get update -o Dir::Etc::sourcelist='sources.list.d/local.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'")
// cut package names and install // cut package names and install
cmdf("ls debs | grep deb | cut -d '_' -f 1 | " + cmdf("ls debs | grep deb | cut -d '_' -f 1 | " +