[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1053887: marked as done (apt does not error and exit under some circumstances)



Your message dated Mon, 08 Jan 2024 10:49:29 +0000
with message-id <E1rMnCD-000tj6-TW@fasolo.debian.org>
and subject line Bug#1053887: fixed in apt 2.7.8
has caused the Debian Bug report #1053887,
regarding apt does not error and exit under some circumstances
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1053887: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053887
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 2.6.0-1deepin5
Severity: normal
X-Debbugs-Cc: black-desk <me@black-desk.cn>, lichenggang@uniontech.com, sweetyfish@deepin.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

When a system is configured with no sources.list, or removing all
`Packages` files under /var/lib/apt/lists, running apt install with
a ReGex matching a local package and a non-existent version, apt doesn't
work as expected. For instance, running `apt installing '^apt$=10000`
is not failing.

Steps to Reproduce:
1. Remove sources.list and Removing all files under sources.list.d/
2. Run apt update to clean all caches
3. Run apt install '^apt$'=1000

Expected Behavior:
	$ LANG=C apt install '^apt$'=1000
	Reading package lists... Done
	Building dependency tree... Done
	Reading state information... Done
	Package apt is not available, but is referred to by another package.
	This may mean that the package is missing, has been obsoleted, or
	is only available from another source

	E: Version '1000' for 'apt' was not found
	$ echo $?
	100

Actual Behavior:
	$ LANG=C apt install '^apt$'=1000
	Reading package lists... Done
	Building dependency tree... Done
	Reading state information... Done
	Note, selecting 'apt' for regex '^apt$'
	0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
	$ echo $?
	0

After bisecting the source, we found that this bug is introduced in "Allow =version
and /release selector on virtual packages" (572810e9f321237873d1536c88991d7825c6f1db).
In apt-pkg/cacheset.cc:493, when `Match.Find()` fails, the program runs
helper.canNotGetVersion(CacheSetHelper::VERSIONNUMBER, Cache, P).
However, ShowErrors are set previously in apt-pkg/cacheset.cc:468:

	if (pkgset.getConstructor() != CacheSetHelper::UNKNOWN)
		errors = helper.showErrors(false);

When attempting inserting error "Version '%s' for '%s' was not found" in
canNotGetVerFromVersionNumber, the error is ignored with ShowError=false;

A possible fix is to set ShowErrors to true before helper.canNotGetVersion()
and set it back afterwards.

Thanks!

Tianyu Chen @ deepin

- -- System Information:
Distributor ID:	Deepin
Description:	Deepin 23
Release:	23
Codename:	beige
Architecture: x86_64

Kernel: Linux 6.1.32-amd64-desktop-hwe (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8), LANGUAGE=zh_CN
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  adduser         3.131-1deepin2
ii  base-passwd     3.6.0
ii  deepin-keyring  2021.06.07-1
ii  gpgv            2.2.27-2+rb1
ii  libapt-pkg6.0   2.6.0-1deepin5
ii  libc6           2.35-deepin3
ii  libgcc-s1       11.2.0-deepin2+rb2
ii  libgnutls30     3.7.2-2
ii  libseccomp2     2.5.4-1
ii  libstdc++6      11.2.0-deepin2+rb2
ii  libsystemd0     254-1

Versions of packages apt recommends:
ii  ca-certificates  20211016

Versions of packages apt suggests:
pn  apt-doc         <none>
ii  aptitude        0.8.13.1-1+dde
ii  dpkg-dev        1.21.20-1deepin2+rb6
ii  gnupg           2.2.27-2+rb1
pn  powermgmt-base  <none>

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iQJKBAEBCgA0FiEEymuVC2ScVNxadrE1GcPUSWHDMHwFAmUpYroWHHN3ZWV0eWZp
c2hAZGVlcGluLm9yZwAKCRAZw9RJYcMwfKCqD/40LtQrTl1oSwIYp8rqol6MJFTD
G6g9Lb8fKG43B9mulA6o0K3LTBiIx3iFJFKy3WGMv3sce608SXYbcTX3ypHKokkh
/XX+LmblDRixN/Oz0qhzPEJDMbS7wslY2c1NxqJRxSFlPoglT8JNhCLYuIHEaUSP
4mLF79JcPTvYf659GTtfJKDpafyb03oMtCkMxlJW7n2HT53jhtvZN6lwr7D+GPqp
goNRUgBVeDyiNC5AqBSnB/fogSoB/yBcwhOwQ9fy8lWgiBEn/Lk2NNN9D0htfzJK
S5K1Qq6W3A7/jmqqZ3GkNnhZASwBBbB6GSrVMXYXgIsr9fNp31+5ZduqmDBxgno0
/k8oivKw6IR4y95AWvL2y7EaEGcR6u1VIVEIKIIapeuHwDw+1XjRuCxPzT+jJGOn
sxNU/QZ23j+LzlMRlXZfKV0sk3WFaxV0zIdWhH12h3sfd62gI2W43jYWVrRltYaU
OtpYo4HC7tV+60KeIVPXIUNcwZHS+8mTq6vNaJS73rdYaVVKHSHE8TbJaGfZe3Qo
As7ZSD0FYnS9kV9icQ0x5uKzbqHSE4JVkihewO8mWoYDDXBNcgoiRoXEV9vTSuEY
eabrQTR2j2xUf/pWDX9rmZFVjMDJGImH3VvE2a981hq5OYgH0L0XCEpFJV84dAyM
g7EoWii8wrMK53LLUw==
=X3oU
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 2.7.8
Done: Julian Andres Klode <jak@debian.org>

We believe that the bug you reported is fixed in the latest version of
apt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1053887@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julian Andres Klode <jak@debian.org> (supplier of updated apt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 08 Jan 2024 10:32:31 +0100
Source: apt
Architecture: source
Version: 2.7.8
Distribution: unstable
Urgency: medium
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Julian Andres Klode <jak@debian.org>
Closes: 959093 1053887 1059352
Changes:
 apt (2.7.8) unstable; urgency=medium
 .
   [ Gábor Németh ]
   * Add 'dist-clean' command to remove packages and list files (Closes:
     #959093); this is experimental and does not yet have docs or tests.
 .
   [ David Kalnischkies ]
   * Have Grp.FindPreferredPkg return very foreign pkgs as last resort
   * Improve and test distclean implementation
   * Do not store .diff_Index files in update
 .
   [ Tianyu Chen ]
   * apt-pkg/cacheset.cc: set ShowErrors to true when no version matched
     (Closes: #1053887)
 .
   [ Julian Andres Klode ]
   * Do not silently ignore directories for reserved file names
   * test: Disable valgrind on armhf, incompatible with stack clash protector
     (Closes: #1059352)
Checksums-Sha1:
 b5c252874da42a2985f2b149081364625654bc13 2931 apt_2.7.8.dsc
 a2627f78fcc431246c212563e772a054cce31cca 2347516 apt_2.7.8.tar.xz
 5dbfae1081692701f582b8e9d4273b99e5e5d1fb 7671 apt_2.7.8_source.buildinfo
Checksums-Sha256:
 10d656d98dc7f4da284c13b2784ca2fa65ed91769a5480fd832c2364447beb87 2931 apt_2.7.8.dsc
 9c09a2c1f18489fb430d616b93e6df5a15f61473856a789d5e3cce0ad2195dc6 2347516 apt_2.7.8.tar.xz
 06a53bd868c7f193ae9517ffad8c4a87fc21fc16a2c342302d1b93ecd756c78e 7671 apt_2.7.8_source.buildinfo
Files:
 bcefe1823b63620226dc0458c9aa8c19 2931 admin required apt_2.7.8.dsc
 9804a9f61adaa99511cf93c0d61d01d5 2347516 admin required apt_2.7.8.tar.xz
 f105a708a0d7a8bd801ca68ff6a2aa4a 7671 admin required apt_2.7.8_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEET7WIqEwt3nmnTHeHb6RY3R2wP3EFAmWb0poPHGpha0BkZWJp
YW4ub3JnAAoJEG+kWN0dsD9xPs8P/jDlkuVzGsHtQKUjQMxjwiVctf8JX/5f5HZ0
WLOpF+CNUqVgDdRfUmBkh2TK2WG1e3F9DPFPuteSAoxdEVhmtb+qhnGSEDk0DakC
TQIXgVGg+/7kiHk+ZV4Dud0pYc9Gz/AZXkDdf5S23o2sZetPCxFJRduMCvZdHYV3
LT2KRn1fo4KdtuM02mXZzDn36n2cMAvhqdgOhtZ1wNC0WUIwTL3fAm1uazzlqQ5g
1h0LKM3RHNhIzy46Ae5SpxxCMQffMvXNsBjQahzBLy4JX7KVKAW60lfKUUz3SmYk
tvAlRMq8bK2ugnDs58g59gOLytb+fQyG/GOyJWaKm+//uE5Z8FtCVn3VEKYoy+2/
ABifXMJmXjKktqhF3DDkPtMIQ/Bb4i01uZS02JkUdD9/b/VfjIhd3nByRK2zFkPy
IPCRXc6kOTeTWynEYdwB7ETlSt/97dYH1aOvcKo2U/VK9HaACak8nFtS7CkMig4j
VLzi/WU0DvhNzpB3stuahiwLJ/7IqdSuPs5h23Al4shfXohZJ49ES2Z3e1XLh4No
ngNGwe2JtPJ0QcptdDxZ7CLddnSKAHFK8WPBe0FB9nrEtd5S4Eqt/e6iIBQbJNi6
foEb3yKaFx0pK4+2FCetGpB+Z6nSebXmaDekyWEtyciB87A21DaeS4UsR7j6Ecss
coYb8jYC
=yDyX
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: