Bug#596189: Ignores NotAutomatic: yes for flat file:/// repositories
Package: apt
Version: 0.8.1
Severity: normal
I turn /var/cache/pbuilder/results into a flat repo using the following cron job:
#!/bin/bash -eE
# As etckeeper is triggered by "apt-get install" but not "dpkg -i", it
# is desirable to make a bare-bones private package archive.
test -x /usr/bin/apt-ftparchive || exit 0
test -d /var/cache/pbuilder/result/ || exit 0
cd /var/cache/pbuilder/result/
for p in Packages Sources Contents Release
do apt-ftparchive -q=2 ${p,,} . >$p
done
sed -i 1i"NotAutomatic: yes" Release # Workaround #272557.
It produces a /var/cache/pbuilder/results/Release file like this:
NotAutomatic: yes
Date: Thu, 09 Sep 2010 04:22:55 UTC
MD5Sum:
42665307063939a74f90fa2807f19a7a 10428 Packages
d41d8cd98f00b204e9800998ecf8427e 0 Release
bebff4df2ffdfc54e9eca1cc0c488e03 7373 Sources
SHA1:
a01b72eb8eecfbc023aafb4fc2868e11d3a71371 10428 Packages
da39a3ee5e6b4b0d3255bfef95601890afd80709 0 Release
29e553112ab2fbae30fa0d7018ffb094f6374ee8 7373 Sources
SHA256:
dfe618a8e3d4b974fb17fef94a06db8979bedc9ecef64c54dd3ed195c35e3eab 10428 Packages
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Release
7a0141712de8e91ea29f4909840d8652449bf66f69175322c9afe3812e72ee8b 7373 Sources
My /etc/apt/sources.list refers to this private repo thusly:
deb file:///var/cache/pbuilder/result ./
After running apt-get update, on a host with apt 0.7.25.3, my private
repo correctly receives priority 1:
# apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
1 file: ./ Packages
release c=
990 http://mirror.internode.on.net testing/updates/main Packages
release v=None,o=Debian,a=testing,n=squeeze,l=Debian-Security,c=main
origin mirror.internode.on.net
990 http://mirror.internode.on.net testing/main Packages
release o=Debian,a=testing,n=squeeze,l=Debian,c=main
origin mirror.internode.on.net
500 http://mirror.internode.on.net unstable/main Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=main
origin mirror.internode.on.net
1 http://mirror.internode.on.net experimental/main Packages
release o=Debian,a=experimental,n=experimental,l=Debian,c=main
origin mirror.internode.on.net
Pinned packages:
On a host with apt 0.8.1 (the one I'm running reportbug on), it DOES
NOT receive priority 1; instead it get priority 500 (the default). To
me, this suggests that apt 0.8.1 ignores NotAutomatic: yes in either
file:/// or flat repositories.
$ apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 file:/var/cache/pbuilder/result/ ./ Packages
1 http://mirror.internode.on.net/pub/debian/ experimental/main amd64 Packages
release o=Debian,a=experimental,n=experimental,l=Debian,c=main
origin mirror.internode.on.net
500 http://mirror.internode.on.net/pub/debian/ unstable/main amd64 Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=main
origin mirror.internode.on.net
Pinned packages:
I also note that apt-get update 0.8.1 DOES NOT copy the Release file
into /var/lib/apt/lists, whereas 0.7.25.3 does.
-- Package-specific info:
-- apt-config dump --
APT "";
APT::Architecture "amd64";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "1";
APT::Install-Suggests "0";
APT::Acquire "";
APT::Acquire::Translation "environment";
APT::Authentication "";
APT::Authentication::TrustCDROM "true";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^firmware-linux.*";
APT::NeverAutoRemove:: "^linux-firmware$";
APT::NeverAutoRemove:: "^linux-image.*";
APT::NeverAutoRemove:: "^kfreebsd-image.*";
APT::NeverAutoRemove:: "^linux-restricted-modules.*";
APT::NeverAutoRemove:: "^linux-ubuntu-modules-.*";
APT::Never-MarkAuto-Sections "";
APT::Never-MarkAuto-Sections:: "metapackages";
APT::Never-MarkAuto-Sections:: "restricted/metapackages";
APT::Never-MarkAuto-Sections:: "universe/metapackages";
APT::Never-MarkAuto-Sections:: "multiverse/metapackages";
APT::Never-MarkAuto-Sections:: "oldlibs";
APT::Never-MarkAuto-Sections:: "restricted/oldlibs";
APT::Never-MarkAuto-Sections:: "universe/oldlibs";
APT::Never-MarkAuto-Sections:: "multiverse/oldlibs";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::mirrors "mirrors/";
Dir::State::extended_states "/var/lib/apt/extended_states";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::netrc "auth.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Etc::preferencesparts "preferences.d";
Dir::Etc::trusted "trusted.gpg";
Dir::Etc::trustedparts "trusted.gpg.d";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
Dir::Media "";
Dir::Media::MountPath "/media/apt";
Dir::Log "var/log/apt";
Dir::Log::Terminal "term.log";
Dir::Log::History "history.log";
Dir::Ignore-Files-Silently "";
Dir::Ignore-Files-Silently:: "~$";
Dir::Ignore-Files-Silently:: "\.disabled$";
Dir::Ignore-Files-Silently:: "\.bak$";
Dir::Ignore-Files-Silently:: "\.dpkg-[a-z]+$";
DPkg "";
DPkg::Pre-Invoke "";
DPkg::Pre-Invoke:: "if [ -x /usr/sbin/etckeeper ]; then etckeeper pre-install; fi";
DPkg::Post-Invoke "";
DPkg::Post-Invoke:: "if [ -x /usr/sbin/etckeeper ]; then etckeeper post-install; fi";
DPkg::Post-Invoke:: "if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/apt-listbugs apt || exit 10";
DPkg::Pre-Install-Pkgs:: "/usr/bin/apt-listchanges --apt || test $? -ne 10";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Tools "";
DPkg::Tools::Options "";
DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";
DPkg::Tools::Options::/usr/bin/apt-listchanges "";
DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";
RPM "";
RPM::Pre-Invoke "";
RPM::Pre-Invoke:: "if [ -x /usr/sbin/etckeeper ]; then etckeeper pre-install; fi";
RPM::Post-Invoke "";
RPM::Post-Invoke:: "if [ -x /usr/sbin/etckeeper ]; then etckeeper post-install; fi";
CommandLine "";
CommandLine::AsString "apt-config dump";
-- (no /etc/apt/preferences present) --
-- /etc/apt/sources.list --
deb http://mirror.internode.on.net/pub/debian unstable main
deb http://mirror.internode.on.net/pub/debian experimental main
deb file:///var/cache/pbuilder/result ./
deb-src http://mirror.internode.on.net/pub/debian unstable main
deb-src http://mirror.internode.on.net/pub/debian experimental main
deb-src file:///var/cache/pbuilder/result ./
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.34-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages apt depends on:
ii debian-archive-keyring 2010.08.28 GnuPG archive keys of the Debian a
ii gnupg 1.4.10-4 GNU privacy guard - a free PGP rep
ii libc6 2.11.2-3 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.5.1-1 GCC support library
ii libstdc++6 4.5.1-1 The GNU Standard C++ Library v3
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
apt recommends no packages.
Versions of packages apt suggests:
pn apt-doc <none> (no description available)
ii aptitude 0.6.3-3.1 terminal-based package manager (te
ii bzip2 1.0.5-4 high-quality block-sorting file co
ii dpkg-dev 1.15.8.4 Debian package development tools
ii python-apt 0.7.97.1 Python interface to libapt-pkg
ii xz-lzma [lzma] 4.999.9beta+20100810-1 XZ-format compression utilities -
-- no debconf information
-- debsums errors found:
debsums: changed file /usr/bin/apt-mark (from apt package)
Reply to: