AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1251528
Accepted
Pandya
Pandya
Asked: 2020-06-19 04:37:17 +0800 CST2020-06-19 04:37:17 +0800 CST 2020-06-19 04:37:17 +0800 CST

Ubuntu 的存储库包含多少百分比的非自由软件?

  • 772

Debian 的文档确实提到:

请注意,non-free 和 contrib 包的数量不到main 包的 2%。

Debian 拥有三个存储库组件:main(包括 100%自由软件)、contrib(包括依赖于非自由软件的自由软件)和non-free(包括专有软件)。因此,文档说,不到 2% 的主要软件包包含在非免费和贡献存储库中。

我想对 Ubuntu 了解同样的事情。Ubuntu 在主存储库和全域存储库中有自由软件,存储库的受限和多元宇宙 组件包含非自由软件。

现在,与主存储库和宇宙存储库相比,这些受限和多元存储库包含多少百分比的非自由软件?我们有这样的分析吗?

repository proprietary
  • 1 1 个回答
  • 558 Views

1 个回答

  • Voted
  1. Best Answer
    Pandya
    2020-06-24T22:03:43+08:002020-06-24T22:03:43+08:00

    虽然我没有在 Ubuntu 的文档中找到这样的信息,但我创建了一个简单的脚本来手动计算它:

    #!/bin/bash
    
    ubuntu_main=$(lynx -dump http://archive.ubuntu.com/ubuntu/dists/focal/main/binary-amd64/Packages.gz | grep ^Package: | wc -l)
    ubuntu_universe=$(lynx -dump http://archive.ubuntu.com/ubuntu/dists/focal/universe/binary-amd64/Packages.gz | grep ^Package: | wc -l)
    ubuntu_restricted=$(lynx -dump http://archive.ubuntu.com/ubuntu/dists/focal/restricted/binary-amd64/Packages.gz | grep ^Package: | wc -l)
    ubuntu_multiverse=$(lynx -dump http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/binary-amd64/Packages.gz | grep ^Package: | wc -l)
    
    percentage="($ubuntu_restricted+$ubuntu_multiverse)/($ubuntu_main+$ubuntu_universe)"
    
    echo "Total number of packages on Ubuntu's main repository = $ubuntu_main"
    echo "Total number of packages on Ubuntu's universe repository = $ubuntu_universe"
    echo "Total number of packages on Ubuntu's restricted repository = $ubuntu_restricted"
    echo "Total number of packages on Ubuntu's multivrese repository = $ubuntu_multiverse"
    
    echo "Percentage of non-free packages on Ubuntu's repositories= $(echo $percentage*100 | bc -l) %"
    

    输出:

    $ ./sample 
    Total Packages on Ubuntu's main repository = 6090
    Total number of packages on Ubuntu's universe repository = 53206
    Total number of packages on Ubuntu's restricted repository = 143
    Total number of packages on Ubuntu's multivrese repository = 813
    Percentage of non-free packages = 1.61225040474905558500 %
    

    对于 Debian GNU/Linux:

    $ cat sample 
    #!/bin/bash
    
    debian_main=$(lynx -dump http://ftp.debian.org/debian/dists/buster/main/binary-amd64/Packages.gz | grep ^Package: | wc -l)
    debian_contrib=$(lynx -dump http://ftp.debian.org/debian/dists/buster/contrib/binary-amd64/Packages.gz | grep ^Package: | wc -l)
    debian_nonfree=$(lynx -dump http://ftp.debian.org/debian/dists/buster/non-free/binary-amd64/Packages.gz | grep ^Package: | wc -l)
    
    percentage="($debian_contrib+$debian_nonfree)/($debian_main)"
    
    echo "Total number of packages on Debian's main repository = $debian_main"
    echo "Total number of packages on Debian's contrib repository = $debian_contrib"
    echo "Total number of packages on Debian's non-free repository = $debian_nonfree"
    
    echo "Percentage of non-free packages on Debian GNU/Linux = $(echo $percentage*100 | bc -l) %"
    
    $ ./sample 
    Total number of packages on Debian's main repository = 56873
    Total number of packages on Debian's contrib repository = 293
    Total number of packages on Debian's non-free repository = 602
    Percentage of non-free packages on Debian GNU/Linux = 1.57368171188437395600 %
    

    注意:此分析不考虑更新和反向移植存储库

    • 7

相关问题

  • 如何使用 .iso 映像作为 CD-ROM 存储库?

  • 如何将 USB 驱动器作为本地存储库

  • 一个包多久会出现在存储库中?

  • Ubuntu(等)中使用的存储库系统概念的优缺点是什么?

  • 如何设置 APT 存储库?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve