将 apt-get 设置为仅下载软件包的补丁更新

将 apt-get 设置为仅下载软件包的补丁更新

我正在从他们的官方 apt 存储库安装一个名为 ArangoDB 的包:https://www.arangodb.com/repositories/arangodb2/xUbuntu_15.04/ /

Ubuntu 15.04 的所有新版本都将发布到该存储库:2.6.x,,,等等。2.7.x2.8.x3.x

目前最新发布的版本是2.6.92.7.0

我只想使用版本2.6.x。目前,如果我使用sudo apt-get dist-upgrade,它会将我从 升级2.6.92.7.0,但我对升级到 分支不感兴趣2.7.x

这是输出apt-cache show arangodb

Package: arangodb
Version: 2.7.0
Architecture: amd64
Maintainer: ArangoDB GmbH <[email protected]>
Installed-Size: 198437
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libgoogle-perftools4, libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9), debconf (>= 0.5) | debconf-2.0, debconf
Conflicts: arangodb-client
Filename: ./amd64/arangodb_2.7.0_amd64.deb
Size: 50345290
MD5sum: d1f9d38ec61551d565a494b45b0699af
SHA1: ff156ded694cac8142fe164c905d8f2d415af4e3
SHA256: fd69a6bcb63a5da81a54ffb5c628799127a2626eebb969423d7ed1f9ac21a719
Section: database
Priority: optional
Description: the multi-model NoSQL database
 A distributed free and open-source database with a flexible data model for documents,
 graphs, and key-values. Build high performance applications using a convenient
 SQL-like query language or JavaScript extensions.
 .
 Copyright: 2012-2013 by triAGENS GmbH
 Copyright: 2014-2015 by ArangoDB GmbH
 ArangoDB Software
 www.arangodb.com
Description-md5: 5208d6fb7a7fd94e33572b5f3f217ed3

Package: arangodb
Version: 2.6.9
Architecture: amd64
Maintainer: ArangoDB GmbH <[email protected]>
Installed-Size: 197589
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libgoogle-perftools4, libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9)
Conflicts: arangodb-client
Filename: ./amd64/arangodb_2.6.9_amd64.deb
Size: 47546996
MD5sum: fa35ffa386bde1c43436c551cea2924e
SHA1: 64bde849562b7c456875d40e14dfcf73874cba18
SHA256: c47bdaeeffae5ebb76df8f7a8eafe599b326d46e9d82f8df1922daeea1a17e23
Section: database
Priority: optional
Description: a multi-purpose NoSQL database
 A distributed free and open-source database with a flexible data model for documents,
 graphs, and key-values. Build high performance applications using a convenient
 SQL-like query language or JavaScript extensions.
 .
 Copyright: 2012-2013 by triAGENS GmbH
 Copyright: 2014-2015 by ArangoDB GmbH
 ArangoDB Software
 www.arangodb.com
Description-md5: 9841a24bd6847c3bab2332a4102711e2

Package: arangodb
Version: 2.5.7
Architecture: amd64
Maintainer: ArangoDB GmbH <[email protected]>
Installed-Size: 174568
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9)
Conflicts: arangodb-client
Filename: ./amd64/arangodb_2.5.7_amd64.deb
Size: 37684252
MD5sum: 4eca4b445862af550ecbb9a05623457a
SHA1: 6431291c760b3e89215d286b3efe18e38fd639ec
SHA256: 8c53045525e5d183dba7fb3a2458ddd8381f72860af463d7512cd7cff8f51187
Section: database
Priority: optional
Description: a multi-purpose NoSQL database
 A distributed free and open-source database with a flexible data model for documents,
 graphs, and key-values. Build high performance applications using a convenient
 SQL-like query language or JavaScript extensions.
 .
 Copyright: 2012-2013 by triAGENS GmbH
 Copyright: 2014-2015 by ArangoDB GmbH
 ArangoDB Software
 www.arangodb.com
Description-md5: 9841a24bd6847c3bab2332a4102711e2

Package: arangodb
Version: 2.4.8
Architecture: amd64
Maintainer: ArangoDB GmbH <[email protected]>
Installed-Size: 734324
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9)
Conflicts: arangodb-client
Filename: ./amd64/arangodb_2.4.8_amd64.deb
Size: 156878880
MD5sum: 63b44da74488383ea7e756b4db0fc031
SHA1: c485b906f9e6159a949ae51e7635712957072906
SHA256: 608c69de31b2d7f3a2a20216ebaeeda76882b127ce2421a4d7c308ec7c867b93
Section: database
Priority: optional
Description: a multi-purpose NoSQL database
 Copyright: 2012-2013 by triAGENS GmbH
 Copyright: 2014 by ArangoDB GmbH
 ArangoDB Software
 www.arangodb.com
Description-md5: f82a5b8de4259b6f08a2bce73b609725

Package: arangodb
Version: 2.3.5
Architecture: amd64
Maintainer: ArangoDB GmbH <[email protected]>
Installed-Size: 228005
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9)
Conflicts: arangodb-client
Filename: ./amd64/arangodb_2.3.5_amd64.deb
Size: 46387612
MD5sum: 7e931e78801b956979638bff537b7acb
SHA1: f351d9f0074d78851ab8a4cb77776ddaa3fc08cb
SHA256: 23db36ab390603a164b649d8c66253ee86f555b6c1662f915c7e3980da833e48
Section: database
Priority: optional
Description: a multi-purpose NoSQL database
 Copyright: 2012-2013 by triAGENS GmbH
 Copyright: 2014 by ArangoDB GmbH
 ArangoDB Software
 www.arangodb.com
Description-md5: f82a5b8de4259b6f08a2bce73b609725

Package: arangodb
Version: 2.2.7
Architecture: amd64
Maintainer: triAGENS GmbH
Installed-Size: 216963
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9)
Filename: ./amd64/arangodb_2.2.7_amd64.deb
Size: 46892184
MD5sum: 44cd2ad7dfe5975b322d9d921902471e
SHA1: ae268ea5fdde48b9973048db997951e906ce6aee
SHA256: ee042bf62fa6d86dcbe6b41830dcf10f8e5213633fbf87c8a5400e5943173419
Section: database
Priority: optional
Description: ArangoDB
 Copyright: 2012-2013 by triAGENS GmbH
 ArangoDB Software
 www.arangodb.org
Description-md5: e154fd38f1d4ef9268f1a660ce615fb9

Package: arangodb
Version: 2.1.2
Architecture: amd64
Maintainer: triAGENS GmbH
Installed-Size: 86279
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libicu52 (>= 52~m1-1~), libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9)
Filename: ./amd64/arangodb_2.1.2_amd64.deb
Size: 12035046
MD5sum: bff26a57213d528b8dcd1070edbf534e
SHA1: 907e3982310f2fb25d526ae7cfa41b96a54b5353
SHA256: ac52c94a1822eed91e5a05abd177bd01aa6a01d3faa1f657c1aedff61965eeba
Section: database
Priority: optional
Description: ArangoDB
 Copyright: 2012-2013 by triAGENS GmbH
 ArangoDB Software
 www.arangodb.org
Description-md5: e154fd38f1d4ef9268f1a660ce615fb9

Package: arangodb
Version: 2.0.9
Architecture: amd64
Maintainer: triAGENS GmbH
Installed-Size: 83862
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libicu52 (>= 52~m1-1~), libreadline6 (>= 6.0), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.9)
Filename: ./amd64/arangodb_2.0.9_amd64.deb
Size: 9615148
MD5sum: 21e29797f6e3dcef59b3c65cac3f4c07
SHA1: 7fd84dd41d861d21caf0ae5378da7c1cd9169f94
SHA256: 11809c11f9b4f896b0226f1be85e1df22e84a87d160313d2b802c20520d3a31b
Section: database
Priority: optional
Description: ArangoDB
 Copyright: 2012-2013 by triAGENS GmbH
 ArangoDB Software
 www.arangodb.org
Description-md5: e154fd38f1d4ef9268f1a660ce615fb9

有没有办法设置apt-get仅升级到2.6.x分支中的某个版本?

答案1

我能够通过创建版本密码来解决这个问题。

/etc/apt/preferences.d/arangodb我创建了包含以下内容的文件:

Package: arangodb
Pin: version 2.6.*
Pin-Priority: 550

请注意,版本号可以是 glob。创建文件后,执行sudo apt-get updatesudo apt-get dist-upgrade不再apt要求将软件包升级到2.7

答案2

为了防止更新,您可以通过以下方式标记包

sudo apt-mark hold arangodb

但是不可能仅获取 2.6 分支的更新,因为不同版本没有不同的软件包。

为什么?原因如下:

要安装 2.6 版官方安装页面

sudo apt-get install arangodb=2.6.9

这意味着,2.6.x、2.7.x 等版本没有不同的软件包。

相关内容