APT 핀없이 업데이트로부터 패키지를 보류 하시겠습니까?


14

Apt로 패키지를 고정하는 것에 대해 알고 있습니다. 그건 내가 원하는 것이 아닙니다. 다른 질문은 고정을 사용하거나 일시적으로 핀을 사용하여 답변되었습니다. 나는 이것을하고 싶지 않습니다.

내가하고 싶은 일은 커널과 같은 방식으로 패키지를 다시 유지하는 것입니다.

# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-generic-pae linux-headers-generic-pae linux-image-generic-pae
The following packages will be upgraded:

내가 추가 할 tomcat-*mysql-*sun-*이 목록에. 과거에는이를 수행하기위한 구성 매개 변수가있었습니다. 나는 항상 그것이 같 Apt::Get::HoldPkgs거나 Apt::HoldPkgs찾을 수 없다고 생각했습니다.

이 패키지를 특별히로 요청할 때까지 업데이트에서 보류하고 싶습니다 apt-get install.

apt-get구성을 찾았습니다 Apt::NeverAutoRemove. 이것이 내가 원하는 것을 할 것인가?

추가 된 질문 : 나는 ( Apt::NeverAutoRemoveApt::Never-MarkAuto-Sections다른 것들 중에서) 내가 볼 수있는 한 문서화되지 않았다는 것을 알았습니다. 맨 페이지에 없습니다. 어느 쪽도 없다 aptitude::Keep-Unused-Pattern하고 aptitude::Get-Root-Command.

에 대한 포괄적이고 완전한 문서가 apt.conf있습니까?


커널 예제는 패키지 단위로 차이가 upgrade있으며 dist-upgrade패키지별로 구성 할 수 없습니다.
enzotib 2016 년

쏘다! (죄송합니다 ...) 나는 그것이 구성 가능 했었다고 아직도 확신합니다; 지금까지는 더 이상 사용되지 않는다는 사실에 놀라지 않을 것입니다.
메이

1
나는 할 수 없다고 말하지 않았다. "패키지가 다시 유지되었다"는 사실은 구성에 의존하지 않고의 upgrade명령 의미론에 의존하기 때문에 커널 예제가 적절하지 않다고 말했다 apt-get.
enzotib 2016 년

이 답변 askubuntu.com/questions/18654/…pinnig 를 사용하지 않는 것 같습니다.
enzotib 2016 년

나는 그것들을 보았다; 나는 apt.conf 매개 변수를 원했습니다. 의 사용을 기대하고 있습니다 dpkg --set-selections. dpkg 사용과 적성의 사용이 같지 않다는 질문을 발견했습니다 (즉, dpkg는 적성 설정을 존중하지 않습니다).
메이

답변:


15

대답은 dpkg --set-selections입니다. 명령을 실행하면 dpkg --get-selections이미 설정된 것을 볼 수 있습니다.

$ dpkg --get-selections | head
acct                                            install
adduser                                         install
apparmor                                        install
apparmor-utils                                  install
apt                                             install
apt-transport-https                             install
apt-utils                                       install
aptitude                                        install
at                                              install
auditd                                          install

이 경우 패키지를 고려하십시오 dnsutils.

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  bind9-host dnsutils libbind9-60 libdns64 libisc60 libisccc60 libisccfg60 liblwres60
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,257kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

이제 변경해 봅시다-패키지를 보류하십시오 :

$ echo dnsutils hold | sudo dpkg --set-selections

결과를 확인하십시오 :

$ dpkg --get-selections | grep dnsutils
dnsutils                                        hold

업데이트를 다시 시도하십시오.

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  bind9-host dnsutils libbind9-60 libdns64 libisc60 libisccfg60 liblwres60
The following packages will be upgraded:
  libisccc60
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Need to get 29.9kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

이제, 원하는 dnsutils패키지와 관련 패키지가 보류되고 있습니다.


root계정 사용에 대한 정보를 제공하는 것을 고려해야 합니다.
enzotib

루트로 로그인하는 것이 훨씬 쉽습니다. 그러나 sudo적절한 장소에서 사용 하는 것이 더 좋습니다. 예에서, 명령 apt-get upgradedpkg --set-selections루트 액세스를 필요는 - 따라서, sudo이러한 명령을 사용해야합니다. 다른 사람들은 그대로 있어야합니다.
Mei

나는 sudo를 언제 어떻게 사용하는지 완벽하게 알고 있습니다.
enzotib

그게 내가 생각한 것입니다. 나는 주석에서 그것을 명확히했다 ... 나는 대답도 고쳤다.
Mei

-1

APT-MARK의 맨 페이지

APT-MARK(8)                                                            APT                                                            APT-MARK(8)

NAME
       apt-mark - show, set and unset various settings for a package

SYNOPSIS
       apt-mark {-f=filename | {auto | manual} pkg...  | {showauto | showmanual} [pkg...] } | {-v | --version} | {-h | --help}

       apt-mark {hold | unhold | install | remove | purge} pkg...  | {showhold | showinstall | showremove | showpurge} [pkg...]

DESCRIPTION
       apt-mark can be used as a unified front-end to set various settings for a package, such as marking a package as being
       automatically/manually installed or changing dpkg selections such as hold, install, deinstall and purge which are respected e.g. by
       apt-get dselect-upgrade or aptitude.

AUTOMATICALLY AND MANUALLY INSTALLED PACKAGES
       When you request that a package is installed, and as a result other packages are installed to satisfy its dependencies, the dependencies
       are marked as being automatically installed, while the package you installed explicitly is marked as manually installed. Once an
       automatically installed package is no longer depended on by any manually installed package it is considered no longer needed and e.g.
       apt-get or aptitude will at least suggest removing them.

       auto
           auto is used to mark a package as being automatically installed, which will cause the package to be removed when no more manually
           installed packages depend on this package.

       manual
           manual is used to mark a package as being manually installed, which will prevent the package from being automatically removed if no
           other packages depend on it.

       showauto
           showauto is used to print a list of automatically installed packages with each package on a new line. All automatically installed
           packages will be listed if no package is given. If packages are given only those which are automatically installed will be shown.

       showmanual
           showmanual can be used in the same way as showauto except that it will print a list of manually installed packages instead.

   Options
       -f=filename, --file=filename
           Read/Write package stats from the filename given with the parameter filename instead of from the default location, which is
           extended_status in the directory defined by the Configuration Item: Dir::State.

PREVENT CHANGES FOR A PACKAGE
       hold
           hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed.

       unhold
           unhold is used to cancel a previously set hold on a package to allow all actions again.

       showhold
           showhold is used to print a list of packages on hold in the same way as for the other show commands.

SCHEDULE PACKAGES FOR INSTALL, REMOVE AND PURGE
       Some front-ends like apt-get dselect-upgrade can be used to apply previously scheduled changes to the install state of packages. Such
       changes can be scheduled with the install, remove (also known as deinstall) and purge commands. Packages with a specific selection can be
       displayed with showinstall, showremove and showpurge respectively. More information about these so called dpkg selections can be found in
       dpkg(1).

OPTIONS
       -h, --help
           Show a short usage summary.

       -v, --version
           Show the program version.

       -c, --config-file
           Configuration File; Specify a configuration file to use. The program will read the default configuration file and then this
           configuration file. If configuration settings need to be set before the default configuration files are parsed specify a file with the
           APT_CONFIG environment variable. See apt.conf(5) for syntax information.

       -o, --option
           Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar.  -o and --option can be
           used multiple times to set different options.

FILES
       /var/lib/apt/extended_states
           Status list of auto-installed packages. Configuration Item: Dir::State::extended_states.

SEE ALSO
       apt-get(8),aptitude(8),apt.conf(5)

DIAGNOSTICS
       apt-mark returns zero on normal operation, non-zero on error.

BUGS
       APT bug page[1]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.

AUTHORS
       Mike O'Connor

       APT team

NOTES
        1. APT bug page
           http://bugs.debian.org/src:apt

APT 1.2.10                                                      25 September 2015                                                     APT-MARK(8)
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.