pop-os / default-settings

Distribution Default Settings
Other
44 stars 16 forks source link

More carefully add pop's proprietary repo back to sources.list #98

Closed PanderMusubi closed 4 years ago

PanderMusubi commented 4 years ago

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="20.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

pop-upgrade:
  Installed: 0.1.0~1600134377~20.04~9c2a95e
  Candidate: 0.1.0~1600134377~20.04~9c2a95e
  Version table:
 *** 0.1.0~1600134377~20.04~9c2a95e 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description:

Warning come from apt-get upgrade which look like:

W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:36
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:36
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:36
...

because once in a while automatically the following line gets added to the end of /etc/apt/sources.list:

deb http://apt.pop-os.org/proprietary focal main

Steps to reproduce (if you know):

Near the top of /etc/apt/sources.list, change this line:

deb http://apt.pop-os.org/proprietary focal main

into:

deb [arch=amd64] http://apt.pop-os.org/proprietary focal main

This argument is usually added to speed up apt-get upgrade as it only retrieves information suitable for that architecture.

Expected behavior:

Adding [arch=amd64] to the pop's proprietary repo should not trigger re-adding that repo. The trigger doing this should be extended to be able to cope with these architecture arguments.

Other Notes:

I suspect package pop-upgrade is related, if not, please add which package is.

jacobgkau commented 4 years ago

The triggering event for the repo being re-added is pop-default-settings being reconfigured. It is currently checking for the full line: https://github.com/pop-os/default-settings/blob/master_focal/debian/pop-default-settings.postinst#L88

(Disabling the repo by placing a # sign in front of it works, because that doesn't interrupt the line.)

I believe this will be fixed by https://github.com/pop-os/default-settings/pull/97 in Pop 20.10, since it will only check for the URI http://apt.pop-os.org/proprietary (the full line will no longer be used with the switch to deb822 format.)

I don't see why we couldn't also modify the check for 20.04 (especially because it's an LTS), we'll just need to define a different variable for the URI we're checking for than for the full line to add if it's not present.

jacobgkau commented 4 years ago

I confirmed #97 will fix this for 20.10 while testing that PR.

I've opened https://github.com/pop-os/default-settings/pull/99 to fix it on 20.04.