mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-05 05:20:34 +00:00
Change package key to be more groupable: arch goes first.
This commit is contained in:
Vendored
+1
-1
@@ -114,7 +114,7 @@ func NewPackageFromControlFile(input Stanza) *Package {
|
||||
|
||||
// Key returns unique key identifying package
|
||||
func (p *Package) Key() []byte {
|
||||
return []byte("P" + p.Name + " " + p.Version + " " + p.Architecture)
|
||||
return []byte("P" + p.Architecture + " " + p.Name + " " + p.Version)
|
||||
}
|
||||
|
||||
// Encode does msgpack encoding of Package
|
||||
|
||||
Vendored
+1
-1
@@ -82,7 +82,7 @@ func (s *PackageSuite) TestWithProvides(c *C) {
|
||||
func (s *PackageSuite) TestKey(c *C) {
|
||||
p := NewPackageFromControlFile(s.stanza)
|
||||
|
||||
c.Check(p.Key(), DeepEquals, []byte("Palien-arena-common 7.40-2 i386"))
|
||||
c.Check(p.Key(), DeepEquals, []byte("Pi386 alien-arena-common 7.40-2"))
|
||||
}
|
||||
|
||||
func (s *PackageSuite) TestEncodeDecode(c *C) {
|
||||
|
||||
Reference in New Issue
Block a user