Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View julian-klode's full-sized avatar

Julian Andres Klode julian-klode

View GitHub Profile

apt-install(8)

NAME

apt-install, apt-remove - Install or remove packages

SYNOPSIS

apt install [<options>] [<package specifiers>]

import math
import random
mirrors = [f"m{i:02}" for i in range(45)]
active_mirrors = {}
sent_so_far = 0
for item in (f"i{i:02}" for i in range(90)):
if math.floor(math.sqrt(sent_so_far + 1)) > len(active_mirrors):
chosen = random.choice(mirrors)
print(f"Adding mirror #{len(active_mirrors)+1}: {chosen}")
@julian-klode
julian-klode / download.md
Last active April 15, 2024 13:45
APT UX redesign drafts

Redesigning the acquire progress

Current progress

  • One line per file that started downloading
  • Summary line with a total percentage and one or more [ ] with per-item details shopwing ID,name,downloaded/item size,%

Example:

$ apt download wesnoth-1.16-data llvm-18

Get:1 https://debian.charite.de/ubuntu noble/main amd64 apt amd64 2.7.14build2 [1.375 kB]
package:arch=version [███ ] package:arch=version [███ ]
package:arch=version [███ ] package:arch=version [███ ]
Downloading [5 MB/s] [█████ ] ETA 5s
package:arch=version [██ ] package:arch=version [██ ]
package:arch=version [██ ] package:arch=version [██ ]
Downloading [5 MB/s] [████ ] ETA 5s
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
index 0692ef90c..27a45d796 100644
--- a/DistUpgrade/DistUpgradeCache.py
+++ b/DistUpgrade/DistUpgradeCache.py
@@ -449,6 +449,23 @@ class MyCache(apt.Cache):
if pkg in self:
self._depcache.mark_delete(self[pkg]._pkg, True)
+ def _do_not_install(self, pkgname, reason):
+ if (pkgname in self
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
index 0692ef90c..27a45d796 100644
--- a/DistUpgrade/DistUpgradeCache.py
+++ b/DistUpgrade/DistUpgradeCache.py
@@ -449,6 +449,23 @@ class MyCache(apt.Cache):
if pkg in self:
self._depcache.mark_delete(self[pkg]._pkg, True)
+ def _do_not_install(self, pkgname, reason):
+ if (pkgname in self
aalib http://aa-project.sourceforge.net/aalib/
abseil https://abseil.io/
accountsservice https://www.freedesktop.org/wiki/Software/AccountsService/
acct https://www.gnu.org/software/acct/
acl https://savannah.nongnu.org/projects/acl/
acpid http://sourceforge.net/projects/acpid2/
adcli https://www.freedesktop.org/software/realmd/
adsys https://github.com/ubuntu/adsys
advancecomp http://www.advancemame.it/
aide https://aide.github.io
2048-qt/0.1.6-2build4
abgate/1.2.0-2build3
acct/6.6.4-5build1
acl/2.3.2-1build1
acpid/1:2.0.34-1ubuntu2
adcli/0.9.2-1ubuntu2
advancecomp/2.5-1build1
amd64-microcode/3.20231019.1ubuntu2
anacron/2.3-39ubuntu2
apertium-lex-tools/0.4.2-2build3
import datetime
import sqlite3
import urllib.request
import json
import sys
pending = set()
with urllib.request.urlopen(
"https://autopkgtest.ubuntu.com/queued.json"
) as queued_json: