Merge branch '261-fix-multiline-fields'

This commit is contained in:
Andrey Smirnov
2015-06-20 19:04:06 +03:00
11 changed files with 137 additions and 105 deletions
+4 -4
View File
@@ -31,25 +31,25 @@ func aptlySnapshotVerify(cmd *commander.Command, args []string) error {
packageList, err := deb.NewPackageListFromRefList(snapshots[0].RefList(), context.CollectionFactory().PackageCollection(), context.Progress())
if err != nil {
fmt.Errorf("unable to load packages: %s", err)
return fmt.Errorf("unable to load packages: %s", err)
}
sourcePackageList := deb.NewPackageList()
err = sourcePackageList.Append(packageList)
if err != nil {
fmt.Errorf("unable to merge sources: %s", err)
return fmt.Errorf("unable to merge sources: %s", err)
}
var pL *deb.PackageList
for i := 1; i < len(snapshots); i++ {
pL, err = deb.NewPackageListFromRefList(snapshots[i].RefList(), context.CollectionFactory().PackageCollection(), context.Progress())
if err != nil {
fmt.Errorf("unable to load packages: %s", err)
return fmt.Errorf("unable to load packages: %s", err)
}
err = sourcePackageList.Append(pL)
if err != nil {
fmt.Errorf("unable to merge sources: %s", err)
return fmt.Errorf("unable to merge sources: %s", err)
}
}
+4
View File
@@ -102,6 +102,10 @@ func writeField(w *bufio.Writer, field, value string) (err error) {
if !strings.HasSuffix(value, "\n") {
value = value + "\n"
}
if field != "Description" {
value = "\n" + value
}
_, err = w.WriteString(field + ":" + value)
}
+1 -1
View File
@@ -108,7 +108,7 @@ func (s *ControlFileSuite) TestReadWriteStanza(c *C) {
buf := &bytes.Buffer{}
w := bufio.NewWriter(buf)
err = stanza.Copy().WriteTo(w, false, false)
err = stanza.Copy().WriteTo(w, true, false)
c.Assert(err, IsNil)
err = w.Flush()
c.Assert(err, IsNil)
+3 -3
View File
@@ -666,9 +666,9 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
release["Date"] = time.Now().UTC().Format("Mon, 2 Jan 2006 15:04:05 MST")
release["Architectures"] = strings.Join(utils.StrSlicesSubstract(p.Architectures, []string{"source"}), " ")
release["Description"] = " Generated by aptly\n"
release["MD5Sum"] = "\n"
release["SHA1"] = "\n"
release["SHA256"] = "\n"
release["MD5Sum"] = ""
release["SHA1"] = ""
release["SHA256"] = ""
release["Components"] = strings.Join(p.Components(), " ")
+1 -1
View File
@@ -11,7 +11,7 @@ import (
)
const (
TestAddress = "localhost:5324"
TestAddress = "localhost:5487"
AuthURL = "http://" + TestAddress + "/v1.0"
)
@@ -11,7 +11,7 @@ Information from release file:
Architectures: i386 amd64
Archive: Debian_7.0
Codename: Debian_7.0
Date: Sun May 3 12:37:48 2015
Date: Fri Jun 12 02:35:21 2015
Description: MirrorBrain (Debian_7.0)
Label: Apache:MirrorBrain
+32 -16
View File
@@ -7,6 +7,22 @@
286a9e206c57dfd33ee318ed4f45c3619d3a68d4
2b2901cd6fac19b06bd8750ce6dd337306e76fdf5ae27b5693702b41fb96ad1b
390323fef7da9a6465eb25139cde8bbeb3588398f1e40c31973921dfea32d8bf
5ae182d975a5d249340b9cc24512ac92157ce170
5dc4cd5bfa96083ad01a32ff83c11857304c3a8b
69f94693a5693d0e02d8f473ab0fb8628c26fdde
778e4cd89b4323f307ba0476488982fec1c30b34
8970a47653ed40d4b2096c2c42d7e3858fe8ac6b291c1bc6f3c52a535589d790
932ad607b2ce5e130071d403e62adf8c4e90e257
9e38a151e26168a05b39e9f50ee12e621cf7fef44096dc0856b70f81205de24b
a1cc9d55d5e17b6b0ab000a7b50a76dd175e83fe89742827b62ca36cd05042f6
abd23b106ee886c5fab024433f1ef6db4699c282
b7bbee42030cf59a17a9fa28d9bc3aa07dd7e328a5bd002ac7fa3698c5456f1b
bbb5c9abac66cc848b9b8ce8b6fabe1d9b3e826959afd6d8ec502b95d5f0c814
d970bbb7fb92bc13fa1447de0c04c9e31c45056a450ce173f75d4e5715d0850b
fe254aca7d88d7b0f42ef5951ab4e4013e147958
Architecture: amd64
Architecture: amd64
Architecture: amd64
@@ -109,22 +125,22 @@ Provides: httpd, httpd-cgi, nginx
Provides: httpd, httpd-cgi, nginx
Provides: httpd, nginx
Provides: httpd, nginx
SHA1: 286a9e206c57dfd33ee318ed4f45c3619d3a68d4
SHA1: 5ae182d975a5d249340b9cc24512ac92157ce170
SHA1: 5dc4cd5bfa96083ad01a32ff83c11857304c3a8b
SHA1: 69f94693a5693d0e02d8f473ab0fb8628c26fdde
SHA1: 778e4cd89b4323f307ba0476488982fec1c30b34
SHA1: 932ad607b2ce5e130071d403e62adf8c4e90e257
SHA1: abd23b106ee886c5fab024433f1ef6db4699c282
SHA1: fe254aca7d88d7b0f42ef5951ab4e4013e147958
SHA256: 2b2901cd6fac19b06bd8750ce6dd337306e76fdf5ae27b5693702b41fb96ad1b
SHA256: 390323fef7da9a6465eb25139cde8bbeb3588398f1e40c31973921dfea32d8bf
SHA256: 8970a47653ed40d4b2096c2c42d7e3858fe8ac6b291c1bc6f3c52a535589d790
SHA256: 9e38a151e26168a05b39e9f50ee12e621cf7fef44096dc0856b70f81205de24b
SHA256: a1cc9d55d5e17b6b0ab000a7b50a76dd175e83fe89742827b62ca36cd05042f6
SHA256: b7bbee42030cf59a17a9fa28d9bc3aa07dd7e328a5bd002ac7fa3698c5456f1b
SHA256: bbb5c9abac66cc848b9b8ce8b6fabe1d9b3e826959afd6d8ec502b95d5f0c814
SHA256: d970bbb7fb92bc13fa1447de0c04c9e31c45056a450ce173f75d4e5715d0850b
SHA1:
SHA1:
SHA1:
SHA1:
SHA1:
SHA1:
SHA1:
SHA1:
SHA256:
SHA256:
SHA256:
SHA256:
SHA256:
SHA256:
SHA256:
SHA256:
Section: debug
Section: debug
Section: debug
+18 -15
View File
@@ -1,21 +1,24 @@
Package: nginx-full
Version: 1.2.1-2.2+wheezy2
Installed-Size: 915
Priority: optional
Section: httpd
Maintainer: Kartik Mistry <kartik@debian.org>
7bf9b91714046f12d765adad860677f5b650c616
aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Architecture: amd64
Description: nginx web/proxy server (standard version)
MD5sum: 586a2ff5648004cd0114447f5df46a29
SHA1: 7bf9b91714046f12d765adad860677f5b650c616
SHA256: aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Description-md5: b334eec6202adf5e9045cc6066a082d1
Conflicts: nginx-extras, nginx-light, nginx-naxsi
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Size: 435328
Homepage: http://nginx.net
Depends: nginx-common (= 1.2.1-2.2+wheezy2), libc6 (>= 2.10), libexpat1 (>= 2.0.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libgeoip1 (>= 1.4.8+dfsg), libpam0g (>= 0.99.7.1), libpcre3 (>= 8.10), libssl1.0.0 (>= 1.0.0), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Description-md5: b334eec6202adf5e9045cc6066a082d1
Description: nginx web/proxy server (standard version)
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Homepage: http://nginx.net
Installed-Size: 915
MD5sum: 586a2ff5648004cd0114447f5df46a29
Maintainer: Kartik Mistry <kartik@debian.org>
Package: nginx-full
Priority: optional
Provides: httpd, nginx
SHA1:
SHA256:
Section: httpd
Size: 435328
Source: nginx
Tag: network::server, protocol::http, role::program
Version: 1.2.1-2.2+wheezy2
+20 -17
View File
@@ -1,24 +1,27 @@
Package: nginx-full
Version: 1.2.1-2.2+wheezy2
Installed-Size: 915
Priority: optional
Section: httpd
Maintainer: Kartik Mistry <kartik@debian.org>
/Users/smira/.aptly/pool/58/6a/nginx-full_1.2.1-2.2+wheezy2_amd64.deb
7bf9b91714046f12d765adad860677f5b650c616
aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Architecture: amd64
Description: nginx web/proxy server (standard version)
MD5sum: 586a2ff5648004cd0114447f5df46a29
SHA1: 7bf9b91714046f12d765adad860677f5b650c616
SHA256: aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Conflicts: nginx-extras, nginx-light, nginx-naxsi
Description-md5: b334eec6202adf5e9045cc6066a082d1
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Size: 435328
Depends: nginx-common (= 1.2.1-2.2+wheezy2), libc6 (>= 2.10), libexpat1 (>= 2.0.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libgeoip1 (>= 1.4.8+dfsg), libpam0g (>= 0.99.7.1), libpcre3 (>= 8.10), libssl1.0.0 (>= 1.0.0), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Description-md5: b334eec6202adf5e9045cc6066a082d1
Description: nginx web/proxy server (standard version)
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Files in the pool:
Homepage: http://nginx.net
Installed-Size: 915
MD5sum: 586a2ff5648004cd0114447f5df46a29
Maintainer: Kartik Mistry <kartik@debian.org>
Package: nginx-full
Priority: optional
Provides: httpd, nginx
SHA1:
SHA256:
Section: httpd
Size: 435328
Source: nginx
Tag: network::server, protocol::http, role::program
Files in the pool:
${HOME}/.aptly/pool/58/6a/nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Version: 1.2.1-2.2+wheezy2
+26 -23
View File
@@ -1,25 +1,28 @@
Package: nginx-full
Version: 1.2.1-2.2+wheezy2
Installed-Size: 915
Priority: optional
Section: httpd
Maintainer: Kartik Mistry <kartik@debian.org>
Architecture: amd64
Description: nginx web/proxy server (standard version)
MD5sum: 586a2ff5648004cd0114447f5df46a29
SHA1: 7bf9b91714046f12d765adad860677f5b650c616
SHA256: aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Homepage: http://nginx.net
Source: nginx
Size: 435328
Conflicts: nginx-extras, nginx-light, nginx-naxsi
Description-md5: b334eec6202adf5e9045cc6066a082d1
Tag: network::server, protocol::http, role::program
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Depends: nginx-common (= 1.2.1-2.2+wheezy2), libc6 (>= 2.10), libexpat1 (>= 2.0.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libgeoip1 (>= 1.4.8+dfsg), libpam0g (>= 0.99.7.1), libpcre3 (>= 8.10), libssl1.0.0 (>= 1.0.0), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Provides: httpd, nginx
References to package:
mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy
mirror [wheezy-main-src]: http://mirror.yandex.ru/debian/ wheezy [src]
mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy
7bf9b91714046f12d765adad860677f5b650c616
aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Architecture: amd64
Conflicts: nginx-extras, nginx-light, nginx-naxsi
Depends: nginx-common (= 1.2.1-2.2+wheezy2), libc6 (>= 2.10), libexpat1 (>= 2.0.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libgeoip1 (>= 1.4.8+dfsg), libpam0g (>= 0.99.7.1), libpcre3 (>= 8.10), libssl1.0.0 (>= 1.0.0), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Description-md5: b334eec6202adf5e9045cc6066a082d1
Description: nginx web/proxy server (standard version)
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Homepage: http://nginx.net
Installed-Size: 915
MD5sum: 586a2ff5648004cd0114447f5df46a29
Maintainer: Kartik Mistry <kartik@debian.org>
Package: nginx-full
Priority: optional
Provides: httpd, nginx
References to package:
SHA1:
SHA256:
Section: httpd
Size: 435328
Source: nginx
Tag: network::server, protocol::http, role::program
Version: 1.2.1-2.2+wheezy2
+27 -24
View File
@@ -1,29 +1,32 @@
Package: nginx-full
Version: 1.2.1-2.2+wheezy2
Installed-Size: 915
Priority: optional
Section: httpd
Maintainer: Kartik Mistry <kartik@debian.org>
local repo [repo1]
mirror [wheezy-main-src]: http://mirror.yandex.ru/debian/ wheezy [src]
mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy
snapshot [snap1]: Snapshot from mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy
snapshot [snap3]: Snapshot from mirror [wheezy-main-src]: http://mirror.yandex.ru/debian/ wheezy [src]
snapshot [snap4]: Merged from sources: 'snap1', 'snap2', 'snap3'
7bf9b91714046f12d765adad860677f5b650c616
aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Architecture: amd64
Description: nginx web/proxy server (standard version)
MD5sum: 586a2ff5648004cd0114447f5df46a29
SHA1: 7bf9b91714046f12d765adad860677f5b650c616
SHA256: aa724376b6bf534c8ff38a8c5de4d4208d4de2b57946f875857349436542306b
Homepage: http://nginx.net
Tag: network::server, protocol::http, role::program
Conflicts: nginx-extras, nginx-light, nginx-naxsi
Source: nginx
Size: 435328
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Provides: httpd, nginx
Depends: nginx-common (= 1.2.1-2.2+wheezy2), libc6 (>= 2.10), libexpat1 (>= 2.0.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libgeoip1 (>= 1.4.8+dfsg), libpam0g (>= 0.99.7.1), libpcre3 (>= 8.10), libssl1.0.0 (>= 1.0.0), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Description-md5: b334eec6202adf5e9045cc6066a082d1
Description: nginx web/proxy server (standard version)
Filename: nginx-full_1.2.1-2.2+wheezy2_amd64.deb
Homepage: http://nginx.net
Installed-Size: 915
MD5sum: 586a2ff5648004cd0114447f5df46a29
Maintainer: Kartik Mistry <kartik@debian.org>
Package: nginx-full
Priority: optional
Provides: httpd, nginx
References to package:
mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy
mirror [wheezy-main-src]: http://mirror.yandex.ru/debian/ wheezy [src]
local repo [repo1]
snapshot [snap1]: Snapshot from mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy
snapshot [snap4]: Merged from sources: 'snap1', 'snap2', 'snap3'
snapshot [snap3]: Snapshot from mirror [wheezy-main-src]: http://mirror.yandex.ru/debian/ wheezy [src]
SHA1:
SHA256:
Section: httpd
Size: 435328
Source: nginx
Tag: network::server, protocol::http, role::program
Version: 1.2.1-2.2+wheezy2