artful's apt-file and aptitude complains about Ubuntu sources.list

Bug #1697120 reported by Jeremy Bícha
58
This bug affects 18 people
Affects Status Importance Assigned to Milestone
apt (Debian)
Fix Released
Unknown
apt (Ubuntu)
Fix Released
Medium
Julian Andres Klode
Zesty
Won't Fix
Medium
Unassigned

Bug Description

[Impact]
apt-file is now difficult to use with about a dozen warnings like this:

W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:17

For reference, this is line 6:
deb http://us.archive.ubuntu.com/ubuntu/ artful main restricted

And this is line 17:
deb http://us.archive.ubuntu.com/ubuntu/ artful universe

This is how Ubuntu's default sources.list has been structured since the beginning? (or at least more than a decade).

What I expect
-------------
The warning isn't specific enough. Lines 6 and 17 are not actually duplicates. The warning could be removed or fixed so that it doesn't complain about non-duplicates.

Or the warning could be disabled on Ubuntu.

See also
--------
LP: #1579372

[Test case]
Install apt-file and update, make sure that the warnings are gone.

[Regression potential]
Warnings about duplicate index targets containing "legacy" in their configured name are not shown anymore, thus it's harder to "fix" servers. But apart from that, which was the goal, I don't see any.

Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Niels Thykier (niels-thykier) wrote :

The actual warning is from apt and not apt-file. It occurs because multiple "fetch" directive refer to the same file, but they come from different lines in the apt sources.list.

As noted (see #1579372), a long term fix would be to provide the Contents in the "per component" location on the archive. Short term fix is to merge the sources.list lines.

Revision history for this message
Norbert (nrbrtx) wrote :

Aptitude says the following:
┌──────────────────────────────────────────────────────────────────────────────┐
│W: Target Contents-deb-legacy (Contents-i386) is configured multiple times in▒│
│ /etc/apt/sources.list:4 and /etc/apt/sources.list:10 ▒│
│W: Target Contents-deb-legacy (Contents-all) is configured multiple times in ▒│
│ /etc/apt/sources.list:4 and /etc/apt/sources.list:10 ▒│
│W: Target Contents-deb-legacy (Contents-i386) is configured multiple times in▒│
│ /etc/apt/sources.list:4 and /etc/apt/sources.list:13 ▒│
│W: Target Contents-deb-legacy (Contents-all) is configured multiple times in ▒│
│ /etc/apt/sources.list:4 and /etc/apt/sources.list:13 ▒│
│ [ Ok ] │
└──────────────────────────────────────────────────────────────────────────────┘

I did not touch /etc/sources.list.

This messages prevent normal use of aptitude.

tags: added: artful
summary: - artful's apt-file complains about Ubuntu sources.list
+ artful's apt-file and aptitude complains about Ubuntu sources.list
Revision history for this message
Norbert (nrbrtx) wrote :

Line 10 is:
deb http://ru.archive.ubuntu.com/ubuntu/ artful universe

Line 13 is:
deb http://ru.archive.ubuntu.com/ubuntu/ artful multiverse

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in aptitude (Ubuntu):
status: New → Confirmed
Changed in apt (Debian):
status: Unknown → New
Changed in apt (Ubuntu):
status: New → Confirmed
Changed in apt-file (Ubuntu):
status: Confirmed → Invalid
Changed in aptitude (Ubuntu):
status: Confirmed → Invalid
no longer affects: apt-file (Ubuntu)
no longer affects: aptitude (Ubuntu)
Changed in apt (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Julian Andres Klode (juliank)
importance: Undecided → Medium
Revision history for this message
Julian Andres Klode (juliank) wrote :
Changed in apt (Ubuntu):
status: In Progress → Fix Committed
Changed in apt (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.5~rc2

---------------
apt (1.5~rc2) unstable; urgency=medium

  [ Julian Andres Klode ]
  * Actually install apt_auth.conf manual page (Closes: #873934)
  * test: Workaround gpgv warning
  * apt-daily: Wait for network before daily updates.
    Introduce a new helper, apt-helper wait-online that uses
    NetworkManager and/or systemd-networkd to wait for them
    reporting online, with a time out of 30 seconds; and run
    that helper before running the daily update script. (LP: #1699850)
  * apt-daily: Pull in network-online.target in service, not timer
  * Do not warn about duplicate "legacy" targets (Closes: #839259)
    (LP: #1697120)
  * cdrom: Don't hardcode "Files" field for copying source files
  * ftparchive: Do not pass through disabled hashes in Sources (Closes: #872963)
  * Directly link against libudev on Linux systems - this does not affect
    public API and ABI, but protected pkgUdevCdromDevices function pointers
    were renamed and are now always NULL, even if Dlopen returns true.

  [ Christos Trochalakis ]
  * doc: correct '--allow-releaseinfo-change-*' typos (Closes: #873914)

  [ Frans Spiesschaert ]
  * Dutch program translation update (Closes: #874285)
  * Dutch manpage translation update (Closes: #874293)

  [ David Kalnischkies ]
  * don't write & chmod /dev/null log files
  * don't ask an uninit _system for supported archs (LP: #1613184)

 -- Julian Andres Klode <email address hidden> Sat, 09 Sep 2017 21:47:14 +0200

Changed in apt (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Changed in apt (Ubuntu Zesty):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Norbert (nrbrtx) wrote :

Bug is fixed in Artful. Thank you!

Changed in apt (Ubuntu Zesty):
status: Triaged → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Jeremy, or anyone else affected,

Accepted apt into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.4.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apt (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-zesty
Norbert (nrbrtx)
tags: removed: artful
Revision history for this message
Norbert (nrbrtx) wrote :
Download full text (7.7 KiB)

Bug exists in Ubuntu 17.10 MATE:

mate1710@mate1710:~$ sudo apt-get install apt-file
[sudo] password for mate1710:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libregexp-assemble-perl
The following NEW packages will be installed:
  apt-file libregexp-assemble-perl
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 103 kB of archives.
After this operation, 288 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu artful/universe i386 libregexp-assemble-perl all 0.36-1 [77,5 kB]

mate1710@mate1710:~$ sudo aptitude update
Hit http://ru.archive.ubuntu.com/ubuntu artful InRelease
Hit http://ru.archive.ubuntu.com/ubuntu artful-updates InRelease
Hit http://ru.archive.ubuntu.com/ubuntu artful-backports InRelease
Hit http://security.ubuntu.com/ubuntu artful-security InRelease
Hit http://archive.ubuntu.com/ubuntu artful InRelease
Get: 1 http://archive.ubuntu.com/ubuntu artful-updates InRelease [65,4 kB]
Fetched 65,4 kB in 0s (71,9 kB/s)
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Contents-deb (main/Contents-i386) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Contents-deb (main/Contents-all) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Contents-deb (restricted/Contents-i386) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Contents-deb (restricted/Contents-all) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:49
W: Target Packages (universe/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:51
W: Target Packages (universe/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/so...

Read more...

tags: added: artful
Revision history for this message
Julian Andres Klode (juliank) wrote :

Norbert: That's not an issue, that's a correct warning. You must have duplicate sources.list entries for the same URL, component, and architecture. Don't have duplicates in there.

Revision history for this message
Norbert (nrbrtx) wrote :
Download full text (3.3 KiB)

@Julian Andres Klode (juliank)

It was clean fresh installation from official fresh ISO.
Here is sources.list. I did not touch it.

mate1710@mate1710:~$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu-MATE 17.10 _Artful Aardvark_ - Release i386 (20171018)]/ artful main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ artful-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ artful-updates main restricted universe multiverse

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ru.archive.ubuntu.com/ubuntu/ artful main restricted
# deb-src http://ru.archive.ubuntu.com/ubuntu/ artful main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ru.archive.ubuntu.com/ubuntu/ artful-updates main restricted
# deb-src http://ru.archive.ubuntu.com/ubuntu/ artful-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ru.archive.ubuntu.com/ubuntu/ artful universe
# deb-src http://ru.archive.ubuntu.com/ubuntu/ artful universe
deb http://ru.archive.ubuntu.com/ubuntu/ artful-updates universe
# deb-src http://ru.archive.ubuntu.com/ubuntu/ artful-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ru.archive.ubuntu.com/ubuntu/ artful multiverse
# deb-src http://ru.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://ru.archive.ubuntu.com/ubuntu/ artful-updates multiverse
# deb-src http://ru.archive.ubuntu.com/ubuntu/ artful-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ru.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
# deb-src http://ru.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu artful partner
# deb-src http://archive.canonical.com/ubuntu artful partner

deb http://security.ubuntu.com/ubuntu artful-security main restricted
# deb-src http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu artful-security universe
# deb-src http://security.ubuntu.com/u...

Read more...

Revision history for this message
Norbert (nrbrtx) wrote :

I compared sources.list from normal Ubuntu 17.10 installation and from MATE. They differ by 4 rows:

--- /etc/apt/sources.list
+++ /media/mate1710/724aac41-cc95-44d2-993b-32b544ab9022/etc/apt/sources.list
@@ -1,7 +1,4 @@
-# deb cdrom:[Ubuntu-MATE 17.10 _Artful Aardvark_ - Release i386 (20171018)]/ artful main multiverse restricted universe
-deb http://archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse
-deb http://security.ubuntu.com/ubuntu/ artful-security main restricted universe multiverse
-deb http://archive.ubuntu.com/ubuntu/ artful-updates main restricted universe multiverse
+#deb cdrom:[Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20171018)]/ artful main restricted

 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
 # newer versions of the distribution.

So it seems to be MATE community fault.

Revision history for this message
Norbert (nrbrtx) wrote :

I'm sorry. Seems to be my fault.
I did installation of apt-file, synaptic, aptitude - may be they changed sources.list accidentally.

Did another clean installation on QEMU/KVM without any issue.

no longer affects: ubuntu-mate
tags: removed: artful
Revision history for this message
Julian Andres Klode (juliank) wrote :
Download full text (4.1 KiB)

Um, apt-file in zesty is actually too old to trigger this, so I manually added the config file for testing it, and verified it that way:

root@d5c73dbb41a2:/# apt update
Hit:1 http://security.ubuntu.com/ubuntu zesty-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu zesty InRelease
Hit:3 http://archive.ubuntu.com/ubuntu zesty-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu zesty-backports InRelease
Hit:5 http://archive.ubuntu.com/ubuntu zesty-proposed InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
7 packages can be upgraded. Run 'apt list --upgradable' to see them.
[...]
W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times in /etc/apt/sources.list:44 and /etc/apt/sources.list:46
W: Target Contents-deb-legacy (Contents-all) is configured multiple times in /etc/apt/sources.list:44 and /etc/apt/sources.list:46
W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times in /etc/apt/sources.list:44 and /etc/apt/sources.list:48
W: Target Contents-deb-legacy (Contents-all) is configured multiple times in /etc/apt/sources.list:44 and /etc/apt/sources.list:48
root@d5c73dbb41a2:/# apt install libapt-pkg5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  libapt-pkg5.0
1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 784 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 libapt-pkg5.0 amd64 1.4.8 [784 kB]
Fetched 784 kB in 0s (921 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 6656 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.4.8_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.4.8) over (1.4.6~17.04.1) ...
Setting up libapt-pkg5.0:amd64 (1.4.8) ...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:14
W: Target Contents-deb-legacy (Contents-all) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:14
W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Contents-deb-legacy (Contents-all) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list:16
W: Target Contents-deb-legacy (Contents-all) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list:16
W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list:26
W: Target Contents-deb-legacy (Contents-all) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list:26
W: Target Contents-deb-legacy (Contents-amd64) is configured multiple times ...

Read more...

tags: added: verification-done verification-done-zesty
removed: verification-needed verification-needed-zesty
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1697120

tags: added: iso-testing
Changed in apt (Ubuntu Zesty):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.