aptly-dev / aptly

aptly - Debian repository management tool
https://www.aptly.info/
MIT License
2.57k stars 375 forks source link

Task field of package written to Packages file is incorrect #419

Open tongpu opened 8 years ago

tongpu commented 8 years ago

We're currently mirroring Ubuntu 14.04 Trusty and Ubuntu 16.04 Xenial at the same time using aptly and ran into an issue where the Task field of the package fonts-guru-extra contains wrong information and we're unable to install a Ubuntu 14.04 Trusty desktop because of a package conflicts when running tasksel ubuntu-desktop.

The installer tries to install the packages ttf-punjabi-fonts=0.5.14ubuntu1 and fonts-guru-extra=2.0-3 at the same time because they both have the Task ubuntu-desktop configured which results in an impossible situation because the package fonts-guru-extra=2.0-3 Breaks ttf-punjabi-fonts (<< 2:1.0).

We believe the error arises because aptly wrongly associates the Task field of the fonts-guru-extra=2.0-3 package in the Xenial main mirror with the package in the same version in the Trusty universe mirror. We also believe that the order of execution of e.g. mirror update is relevant, because the issue flapping.

Package: ttf-punjabi-fonts
Priority: optional
Section: x11
Installed-Size: 202
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian-IN Team <debian-in-workers@lists.alioth.debian.org>
Architecture: all
Source: ttf-indic-fonts
Version: 1:0.5.14ubuntu1
Filename: pool/main/t/ttf-indic-fonts/ttf-punjabi-fonts_0.5.14ubuntu1_all.deb
Size: 57546
MD5sum: 75a679c57a1eb5baf86222ce14582b1c
SHA1: 864fbf9bd6a664314df78716e60a0c6c5d791e54
SHA256: b96e59c6b149c7e9c9d081990359ddbef3e223ada49e68d7ea43b7dd88af7ca8
Description: Free TrueType fonts for the Punjabi language
Homepage: http://debian-in.alioth.debian.org/
Description-md5: 734ddc6f1aa432bfba7b2f9c057059f1
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-active, kubuntu-active-desktop, kubuntu-active, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, lubuntu-core, ubuntustudio-desktop, ubuntu-gnome-desktop
Package: fonts-guru-extra
Priority: optional
Section: universe/fonts
Installed-Size: 172
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian-IN Team <debian-in-workers@lists.alioth.debian.org>
Architecture: all
Version: 2.0-3
Replaces: ttf-punjabi-fonts
Breaks: ttf-punjabi-fonts (<< 2:1.0)
Filename: pool/universe/f/fonts-guru-extra/fonts-guru-extra_2.0-3_all.deb
Size: 52808
MD5sum: f37ebca071715758aa376a7fca9c5524
SHA1: 29dd26699566964b0e06e36eccaa3a5f43b64c9c
SHA256: e3beef18d8ef9e44eb9b2eeb11b13b2f25c23a8241d0881488ec25156be6867d
Description: Free fonts for Punjabi language
Multi-Arch: foreign
Homepage: http://alioth.debian.org/projects/debian-in
Description-md5: f207b3046defb8b25f5195ad18ecae7c
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Package: fonts-guru-extra
Priority: optional
Section: fonts
Installed-Size: 172
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian-IN Team <debian-in-workers@lists.alioth.debian.org>
Architecture: all
Version: 2.0-3
Replaces: ttf-punjabi-fonts
Breaks: ttf-punjabi-fonts (<< 2:1.0)
Filename: pool/main/f/fonts-guru-extra/fonts-guru-extra_2.0-3_all.deb
Size: 52808
MD5sum: f37ebca071715758aa376a7fca9c5524
SHA1: 29dd26699566964b0e06e36eccaa3a5f43b64c9c
SHA256: e3beef18d8ef9e44eb9b2eeb11b13b2f25c23a8241d0881488ec25156be6867d
Description: Free fonts for Punjabi language
Multi-Arch: foreign
Homepage: http://alioth.debian.org/projects/debian-in
Description-md5: f207b3046defb8b25f5195ad18ecae7c
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, edubuntu-desktop, edubuntu-usb, xubuntu-core, xubuntu-desktop, mythbuntu-desktop, lubuntu-core, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntu-gnome-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-mate-cloudtop
Package: ttf-punjabi-fonts
Priority: optional
Section: x11
Installed-Size: 202
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian-IN Team <debian-in-workers@lists.alioth.debian.org>
Architecture: all
Source: ttf-indic-fonts
Version: 1:0.5.14ubuntu1
Filename: pool/main/t/ttf-indic-fonts/ttf-punjabi-fonts_0.5.14ubuntu1_all.deb
Size: 57546
MD5sum: 75a679c57a1eb5baf86222ce14582b1c
SHA1: 864fbf9bd6a664314df78716e60a0c6c5d791e54
SHA256: b96e59c6b149c7e9c9d081990359ddbef3e223ada49e68d7ea43b7dd88af7ca8
Description: Free TrueType fonts for the Punjabi language
Origin: Ubuntu
Homepage: http://debian-in.alioth.debian.org/
Supported: 5y
Description-Md5: 734ddc6f1aa432bfba7b2f9c057059f1
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-active, kubuntu-active-desktop, kubuntu-active, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, lubuntu-core, ubuntustudio-desktop, ubuntu-gnome-desktop
Package: fonts-guru-extra
Priority: optional
Section: fonts
Installed-Size: 172
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian-IN Team <debian-in-workers@lists.alioth.debian.org>
Architecture: all
Version: 2.0-3
Replaces: ttf-punjabi-fonts
Breaks: ttf-punjabi-fonts (<< 2:1.0)
Filename: pool/universe/f/fonts-guru-extra/fonts-guru-extra_2.0-3_all.deb
Size: 52808
MD5sum: f37ebca071715758aa376a7fca9c5524
SHA1: 29dd26699566964b0e06e36eccaa3a5f43b64c9c
SHA256: e3beef18d8ef9e44eb9b2eeb11b13b2f25c23a8241d0881488ec25156be6867d
Description: Free fonts for Punjabi language
Origin: Ubuntu
Description-Md5: f207b3046defb8b25f5195ad18ecae7c
Homepage: http://alioth.debian.org/projects/debian-in
Supported: 5y
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Multi-Arch: foreign
Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, edubuntu-desktop, edubuntu-usb, xubuntu-core, xubuntu-desktop, mythbuntu-desktop, lubuntu-core, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntu-gnome-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-mate-cloudtop
smira commented 7 years ago

I believe this should be addressed with #539

smira commented 7 years ago

Thinking about it a bit more, it's not... aptly internally de-duplicates packages based on name, version, arch and file hash. So it seems that packages are completely identical, but information in Packages is still different

smira commented 7 years ago

The only solution I see is to add scope or something like that to mirrors, so that if scope is set, packages from this mirror are not deduplicated with other packages from different scopes. That would make packages from different scopes always non-identical.