New upstream version 1.3.0

This commit is contained in:
Sébastien Delafond committed 2018-06-21 16:07:02 +02:00
1 parent bed9fffa94
commit 09ad0121c6
2288 files changed
+452567 -68510

No files matched your search

+3 -3
View File
@@ -9,9 +9,9 @@ import (
"sort"
"strings"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/pgp"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/pgp"
"github.com/aptly-dev/aptly/utils"
)
// Changes is a result of .changes file parsing
+3 -3
View File
@@ -3,9 +3,9 @@ package deb
import (
"bytes"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/database"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/utils"
"github.com/ugorji/go/codec"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package deb
import (
"github.com/smira/aptly/database"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/utils"
. "gopkg.in/check.v1"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package deb
import (
"sync"
"github.com/smira/aptly/database"
"github.com/aptly-dev/aptly/database"
)
// CollectionFactory is a single place to generate all desired collections
+2 -6
View File
@@ -6,8 +6,7 @@ import (
"fmt"
"io"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/database"
"github.com/aptly-dev/aptly/database"
"github.com/smira/go-uuid/uuid"
)
@@ -26,10 +25,7 @@ func NewContentsIndex(db database.Storage) *ContentsIndex {
}
// Push adds package to contents index, calculating package contents as required
func (index *ContentsIndex) Push(p *Package, packagePool aptly.PackagePool, progress aptly.Progress) error {
contents := p.Contents(packagePool, progress)
qualifiedName := []byte(p.QualifiedName())
func (index *ContentsIndex) Push(qualifiedName []byte, contents []string) error {
for _, path := range contents {
// for performance reasons we only write to leveldb during push.
// merging of qualified names per path will be done in WriteTo
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"github.com/mkrautz/goar"
"github.com/pkg/errors"
"github.com/smira/aptly/pgp"
"github.com/aptly-dev/aptly/pgp"
"github.com/smira/go-xz"
"github.com/smira/lzma"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"path/filepath"
"runtime"
"github.com/smira/aptly/pgp"
"github.com/aptly-dev/aptly/pgp"
. "gopkg.in/check.v1"
)
+7 -1
View File
@@ -11,6 +11,9 @@ import (
// Stanza or paragraph of Debian control file
type Stanza map[string]string
// MaxFieldSize is maximum stanza field size in bytes
const MaxFieldSize = 2 * 1024 * 1024
// Canonical order of fields in stanza
// Taken from: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/apt/vivid/view/head:/apt-pkg/tagfile.cc#L504
var (
@@ -214,7 +217,10 @@ type ControlFileReader struct {
// NewControlFileReader creates ControlFileReader, it wraps with buffering
func NewControlFileReader(r io.Reader) *ControlFileReader {
return &ControlFileReader{scanner: bufio.NewScanner(bufio.NewReaderSize(r, 32768))}
scnr := bufio.NewScanner(bufio.NewReaderSize(r, 32768))
scnr.Buffer(nil, MaxFieldSize)
return &ControlFileReader{scanner: scnr}
}
// ReadStanza reeads one stanza from control file
+12
View File
@@ -3,6 +3,7 @@ package deb
import (
"bufio"
"bytes"
"os"
"strings"
. "gopkg.in/check.v1"
@@ -135,6 +136,17 @@ func (s *ControlFileSuite) TestCanonicalCase(c *C) {
c.Check(canonicalCase("packaGe-lIst"), Equals, "Package-List")
}
func (s *ControlFileSuite) TestLongFields(c *C) {
f, err := os.Open("long.stanza")
c.Assert(err, IsNil)
defer f.Close()
r := NewControlFileReader(f)
stanza, e := r.ReadStanza(false)
c.Assert(e, IsNil)
c.Assert(len(stanza["Provides"]), Equals, 586929)
}
func (s *ControlFileSuite) BenchmarkReadStanza(c *C) {
for i := 0; i < c.N; i++ {
reader := bytes.NewBufferString(controlFile)
+3 -3
View File
@@ -6,9 +6,9 @@ import (
"sort"
"strings"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/pgp"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/pgp"
"github.com/aptly-dev/aptly/utils"
)
// CollectPackageFiles walks filesystem collecting all candidates for package files
+47 -12
View File
@@ -8,9 +8,9 @@ import (
"path/filepath"
"strings"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/pgp"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/pgp"
"github.com/aptly-dev/aptly/utils"
)
type indexFiles struct {
@@ -191,18 +191,22 @@ func packageIndexByHash(file *indexFile, ext string, hash string, sum string) er
}
// if a previous index file already exists exists, backup symlink
if exists, _ = file.parent.publishedStorage.FileExists(filepath.Join(dst, indexfile)); exists {
indexPath := filepath.Join(dst, indexfile)
oldIndexPath := filepath.Join(dst, indexfile+".old")
if exists, _ = file.parent.publishedStorage.FileExists(indexPath); exists {
// if exists, remove old symlink
if exists, _ = file.parent.publishedStorage.FileExists(filepath.Join(dst, indexfile+".old")); exists {
var link string
link, err = file.parent.publishedStorage.ReadLink(filepath.Join(dst, indexfile+".old"))
if err != nil {
file.parent.publishedStorage.Remove(link)
if exists, _ = file.parent.publishedStorage.FileExists(oldIndexPath); exists {
var linkTarget string
linkTarget, err = file.parent.publishedStorage.ReadLink(oldIndexPath)
if err == nil {
// If we managed to resolve the link target: delete it. This is the
// oldest physical index file we no longer need. Once we drop our
// old symlink we'll essentially forget about it existing at all.
file.parent.publishedStorage.Remove(linkTarget)
}
file.parent.publishedStorage.Remove(filepath.Join(dst, indexfile+".old"))
file.parent.publishedStorage.Remove(oldIndexPath)
}
file.parent.publishedStorage.RenameFile(filepath.Join(dst, indexfile),
filepath.Join(dst, indexfile+".old"))
file.parent.publishedStorage.RenameFile(indexPath, oldIndexPath)
}
// create symlink
@@ -325,6 +329,37 @@ func (files *indexFiles) ContentsIndex(component, arch string, udeb bool) *index
return file
}
func (files *indexFiles) LegacyContentsIndex(arch string, udeb bool) *indexFile {
if arch == ArchitectureSource {
udeb = false
}
key := fmt.Sprintf("lci-%s-%v", arch, udeb)
file, ok := files.indexes[key]
if !ok {
var relativePath string
if udeb {
relativePath = fmt.Sprintf("Contents-udeb-%s", arch)
} else {
relativePath = fmt.Sprintf("Contents-%s", arch)
}
file = &indexFile{
parent: files,
discardable: true,
compressable: true,
onlyGzip: true,
signable: false,
acquireByHash: files.acquireByHash,
relativePath: relativePath,
}
files.indexes[key] = file
}
return file
}
func (files *indexFiles) ReleaseFile() *indexFile {
return &indexFile{
parent: files,
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"sort"
"strings"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/utils"
)
// Dependency options
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"log"
"sync"
"github.com/smira/aptly/database"
"github.com/aptly-dev/aptly/database"
"github.com/smira/go-uuid/uuid"
"github.com/ugorji/go/codec"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package deb
import (
"errors"
"github.com/smira/aptly/database"
"github.com/aptly-dev/aptly/database"
. "gopkg.in/check.v1"
)
+12
View File
@@ -0,0 +1,12 @@
Package: project-pshark-core
Version: 20180221093552.master.31394
Architecture: amd64
Maintainer: PShark Build System <build.system@pshark.com>
Installed-Size: 344993
Depends: ps-perl, config-pshark-core, lib-ps-perl-accessors, lib-ps-perl-accessors-classic, lib-ps-perl-algorithm-diff, lib-ps-perl-amazon-s3, lib-ps-perl-anyevent, lib-ps-perl-anyevent-handle, lib-ps-perl-anyevent-socket, lib-ps-perl-apr-request-param, lib-ps-perl-archive-tar, lib-ps-perl-archive-zip, lib-ps-perl-array-utils, lib-ps-perl-beanstalk-client, lib-ps-perl-bit-vector, lib-ps-perl-cache-cache, lib-ps-perl-cache-filecache, lib-ps-perl-cache-memcached, lib-ps-perl-cache-memcached-fast, lib-ps-perl-cache-memorycache, lib-ps-perl-calendar-simple, lib-ps-perl-cam-pdf, lib-ps-perl-carp, lib-ps-perl-cgi, lib-ps-perl-cgi-carp, lib-ps-perl-charnames, lib-ps-perl-chi-memoize, lib-ps-perl-class-accessor, lib-ps-perl-class-data-inheritable, lib-ps-perl-class-dbi-abstractsearch, lib-ps-perl-class-dbi-mysql, lib-ps-perl-class-dbi-oracle, lib-ps-perl-class-dbi-pager, lib-ps-perl-class-dbi-plugin-dateformat-oracle, lib-ps-perl-class-inspector, lib-ps-perl-class-load, lib-ps-perl-clone, lib-ps-perl-compress-zlib, lib-ps-perl-config-apacheformat, lib-ps-perl-config-json, lib-ps-perl-constant, lib-ps-perl-crypt-cbc, lib-ps-perl-crypt-eksblowfish-bcrypt, lib-ps-perl-crypt-rsa, lib-ps-perl-crypt-rsa-dataformat, lib-ps-perl-crypt-rsa-es-pkcs1v15, lib-ps-perl-crypt-scryptkdf, lib-ps-perl-crypt-ssleay, lib-ps-perl-css-inliner, lib-ps-perl-cwd, lib-ps-perl-data-dump, lib-ps-perl-data-dumper, lib-ps-perl-date-calc, lib-ps-perl-date-calc-iterator, lib-ps-perl-date-calc-object, lib-ps-perl-date-calendar, lib-ps-perl-date-calendar-profiles, lib-ps-perl-date-format, lib-ps-perl-date-parse, lib-ps-perl-date-simple, lib-ps-perl-datetime, lib-ps-perl-datetime-duration, lib-ps-perl-datetime-event-cron, lib-ps-perl-datetime-format-dbi, lib-ps-perl-datetime-format-excel, lib-ps-perl-datetime-format-iso8601, lib-ps-perl-datetime-format-mysql, lib-ps-perl-datetime-format-natural, lib-ps-perl-datetime-format-strptime, lib-ps-perl-datetime-locale, lib-ps-perl-datetime-timezone, lib-ps-perl-dbd-oracle, lib-ps-perl-dbd-sybase, lib-ps-perl-dbi, lib-ps-perl-devel-cover-db, lib-ps-perl-devel-size, lib-ps-perl-devel-symdump, lib-ps-perl-diagnostics, lib-ps-perl-digest-crc, lib-ps-perl-digest-hmac--sha1, lib-ps-perl-digest-md5, lib-ps-perl-digest-sha1, lib-ps-perl-email-valid, lib-ps-perl-encode, lib-ps-perl-excel-writer-xlsx, lib-ps-perl-exception-class, lib-ps-perl-expect, lib-ps-perl-exporter, lib-ps-perl-fcntl, lib-ps-perl-feature, lib-ps-perl-file-basename, lib-ps-perl-file-copy, lib-ps-perl-file-copy-recursive, lib-ps-perl-file-fetch, lib-ps-perl-file-find, lib-ps-perl-file-find-rule, lib-ps-perl-file-glob, lib-ps-perl-filehandle, lib-ps-perl-file-homedir, lib-ps-perl-file-mimeinfo, lib-ps-perl-file-mmagic, lib-ps-perl-file-ncopy, lib-ps-perl-file-path, lib-ps-perl-file-pathinfo, lib-ps-perl-file-rsync, lib-ps-perl-file-sharedir, lib-ps-perl-file-slurp, lib-ps-perl-file-spec, lib-ps-perl-file-spec-functions, lib-ps-perl-file-stat, lib-ps-perl-file-temp, lib-ps-perl-file-type, lib-ps-perl-gd, lib-ps-perl-gd-graph, lib-ps-perl-gd-graph-bars, lib-ps-perl-gd-graph-lines, lib-ps-perl-gd-image, lib-ps-perl-gd-securityimage, lib-ps-perl-geo-coder-us, lib-ps-perl-geo-googlemaps-mobiletool, lib-ps-perl-geo-proj4, lib-ps-perl-getopt-attribute, lib-ps-perl-getopt-long, lib-ps-perl-getopt-std, lib-ps-perl-hashids, lib-ps-perl-html-entities, lib-ps-perl-html-fillinform, lib-ps-perl-html-form, lib-ps-perl-html-htmldoc, lib-ps-perl-html-mason, lib-ps-perl-html-mason-apachehandler, lib-ps-perl-html-mason-cache-basecache, lib-ps-perl-html-mason-compiler-toobject, lib-ps-perl-html-mason-interp, lib-ps-perl-html-mason-plugin, lib-ps-perl-html-mason-request, lib-ps-perl-html-mason-utils, lib-ps-perl-html-parser, lib-ps-perl-html-pullparser, lib-ps-perl-html-tablecontentparser, lib-ps-perl-html-tableextract, lib-ps-perl-html-tokeparser, lib-ps-perl-html-treebuilder, lib-ps-perl-http-cookies, lib-ps-perl-http-date, lib-ps-perl-http-headers, lib-ps-perl-http-request, lib-ps-perl-http-request-common, lib-ps-perl-http-status, lib-ps-perl-if, lib-ps-perl-image-exiftool, lib-ps-perl-image-info, lib-ps-perl-image-magick, lib-ps-perl-imager, lib-ps-perl-imager-fill, lib-ps-perl-imager-font, lib-ps-perl-io-captureoutput, lib-ps-perl-io-file, lib-ps-perl-io-handle, lib-ps-perl-io-socket, lib-ps-perl-io-socket-inet, lib-ps-perl-io-socket-ssl, lib-ps-perl-io-tee, lib-ps-perl-io-uncompress-gunzip, lib-ps-perl-ipc-cmd, lib-ps-perl-json, lib-ps-perl-json-rpc-client, lib-ps-perl-json-rpc-procedure, lib-ps-perl-json-xs, lib-ps-perl-lingua-en-inflect, lib-ps-perl-list-moreutils, lib-ps-perl-list-util, lib-ps-perl-log-log4perl, lib-ps-perl-lucy-search-termquery, lib-ps-perl-lwp, lib-ps-perl-lwp-parallel-useragent, lib-ps-perl-lwp-protocol-https, lib-ps-perl-lwp-simple, lib-ps-perl-lwp-useragent, lib-ps-perl-mail-mailer, lib-ps-perl-mail-sender, lib-ps-perl-mapscript, lib-ps-perl-match-pidqueries, lib-ps-perl-math-bigfloat, lib-ps-perl-math-bigint, lib-ps-perl-math-polygon, lLine truncated
Suggests: project-pshark-mapgen, project-pshark-img, ps-wkhtmltopdf
Provides: lib-ps-perl-accessors-list, lib-ps-perl-agedist, lib-ps-perl-apachedir, lib-ps-perl-db, lib-ps-perl-dissecthtml, lib-ps-perl-fastdissect, lib-ps-perl-fastdissect2, lib-ps-perl-g, lib-ps-perl-gis-geometry, lib-ps-perl-gis-geometry-line, lib-ps-perl-gis-geometry-linestring, lib-ps-perl-gis-geometry-point, lib-ps-perl-gis-geometry-polygon, lib-ps-perl-gis-geometry-vector, lib-ps-perl-householddist, lib-ps-perl-housingprofile, lib-ps-perl-listing, lib-ps-perl-logger, lib-ps-perl-magicparser, lib-ps-perl-moose-meta-attribute-custom-trait-formelement, lib-ps-perl-mycgi, lib-ps-perl-ny--swis--codes, lib-ps-perl-nyc--report--data, lib-ps-perl-permit, lib-ps-perl-project, lib-ps-perl-pshak-access-temp-philly--brt--file, lib-ps-perl-pshark (= 1.0), lib-ps-perl-pshark-abtests, lib-ps-perl-pshark-abvariants, lib-ps-perl-pshark-access, lib-ps-perl-pshark-access-ak-anchorage--commercial, lib-ps-perl-pshark-access-ak-anchorage--commercial--intr, lib-ps-perl-pshark-access-ak-anchorage--master, lib-ps-perl-pshark-access-ak-anchorage--residential, lib-ps-perl-pshark-access-ak-anchorage--residential--accessor, lib-ps-perl-pshark-access-ak-anchorage--sales, lib-ps-perl-pshark-access-al-baldwin--building, lib-ps-perl-pshark-access-al-baldwin--deeds, lib-ps-perl-pshark-access-al-baldwin--land, lib-ps-perl-pshark-access-al-baldwin--tar, lib-ps-perl-pshark-access-al-bibb--tar, lib-ps-perl-pshark-access-al-blount--improvements, lib-ps-perl-pshark-access-al-blount--tar, lib-ps-perl-pshark-access-al-chilton--sales, lib-ps-perl-pshark-access-al-chilton--tar, lib-ps-perl-pshark-access-al-mobile--sales--history, lib-ps-perl-pshark-access-al-mobile--tar, lib-ps-perl-pshark-access-al-mobile--tar--old, lib-ps-perl-pshark-access-al-shelby--sales, lib-ps-perl-pshark-access-al-shelby--tar, lib-ps-perl-pshark-access-al-stclair--bldg, lib-ps-perl-pshark-access-al-stclair--sales, lib-ps-perl-pshark-access-al-stclair--tar, lib-ps-perl-pshark-access-al-tuscaloosa--sales, lib-ps-perl-pshark-access-al-tuscaloosa--tar, lib-ps-perl-pshark-access-ar-crittenden--tar, lib-ps-perl-pshark-access-ar-faulkner--tar, lib-ps-perl-pshark-access-ar-lonoke--tar, lib-ps-perl-pshark-access-ar-pulaski--tar, lib-ps-perl-pshark-access-ar-saline--tar, lib-ps-perl-pshark-access-assmthisttemp-ada--parcels, lib-ps-perl-pshark-access-assmthisttemp-ada--parcels2, lib-ps-perl-pshark-access-assmthisttemp-anne--arundel--tar, lib-ps-perl-pshark-access-assmthisttemp-anne--arundel--tar2, lib-ps-perl-pshark-access-assmthisttemp-anoka--tar, lib-ps-perl-pshark-access-assmthisttemp-ashtabula--pardat5, lib-ps-perl-pshark-access-assmthisttemp-az--maricopa--parcel--13, lib-ps-perl-pshark-access-assmthisttemp-az--maricopa--parcel--14, lib-ps-perl-pshark-access-assmthisttemp-az--maricopa--parcel--2010, lib-ps-perl-pshark-access-assmthisttemp-az--maricopa--parcel--2011, lib-ps-perl-pshark-access-assmthisttemp-az--maricopa--parcel--2012, lib-ps-perl-pshark-access-assmthisttemp-az--maricopa--parcel--2015, lib-ps-perl-pshark-access-assmthisttemp-az--maricopa--parcel--2016, lib-ps-perl-pshark-access-assmthisttemp-baltimore--tar, lib-ps-perl-pshark-access-assmthisttemp-bastrop--tar, lib-ps-perl-pshark-access-assmthisttemp-boulder--values2, lib-ps-perl-pshark-access-assmthisttemp-bracken--prop--2013, lib-ps-perl-pshark-access-assmthisttemp-brazoria--prop--13, lib-ps-perl-pshark-access-assmthisttemp-buncombe--tar, lib-ps-perl-pshark-access-assmthisttemp-butler--pardat2, lib-ps-perl-pshark-access-assmthisttemp-ca--alameda--tar--2010, lib-ps-perl-pshark-access-assmthisttemp-ca--alameda--tar--2015, lib-ps-perl-pshark-access-assmthisttemp-ca--alameda--tar--2016, lib-ps-perl-pshark-access-assmthisttemp-ca--contra--costa--tar--2015, lib-ps-perl-pshark-access-assmthisttemp-ca--fresno--sec--asmt--roll--2015, lib-ps-perl-pshark-access-assmthisttemp-ca--fresno--sec--asmt--roll--2016, lib-ps-perl-pshark-access-assmthisttemp-ca--fresno--secureassesroll2014, lib-ps-perl-pshark-access-assmthisttemp-ca--kern--tar--14--15, lib-ps-perl-pshark-access-assmthisttemp-ca--kern--tar--15--16, lib-ps-perl-pshark-access-assmthisttemp-ca--kern--tar--16--17, lib-ps-perl-pshark-access-assmthisttemp-ca--marin--tar--12, lib-ps-perl-pshark-access-assmthisttemp-ca--marin--tar--14, lib-ps-perl-pshark-access-assmthisttemp-ca--marin--tar--15, lib-ps-perl-pshark-access-assmthisttemp-ca--marin--tar--16, lib-ps-perl-pshark-access-assmthisttemp-ca--mendocino--tar2, lib-ps-perl-pshark-access-assmthisttemp-ca--monterey--tar5, lib-ps-perl-pshark-access-assmthisttemp-ca--orange--tar--14, lib-ps-perl-pshark-access-assmthisttemp-ca--orange--tar--2015, lib-ps-perl-pshark-access-assmthisttemp-ca--orange--tar--2016, lib-ps-perl-pshark-access-assmthisttemp-ca--placer--tar--14--15, lib-ps-perl-pshark-access-assmthisttemp-ca--placer--tar--2015, lib-ps-perl-pshark-access-assmthisttemp-ca--placer--tar--2016, lib-ps-perl-pshark-access-assmthisttemp-ca--placer--tar5, lib-ps-perl-pshark-access-assmthisttemp-ca--riverside--tar--14, lib-ps-perlLine truncated
Section: web
Priority: important
Multi-Arch: no
Description: ps core package
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"strconv"
"strings"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/utils"
)
// Package is single instance of Debian package
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"fmt"
"path/filepath"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/database"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/database"
"github.com/ugorji/go/codec"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package deb
import (
"github.com/smira/aptly/database"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/utils"
. "gopkg.in/check.v1"
)
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"strconv"
"strings"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/utils"
)
// PackageFile is a single file entry in package
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"io/ioutil"
"path/filepath"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/files"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/files"
"github.com/aptly-dev/aptly/utils"
. "gopkg.in/check.v1"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"path/filepath"
"regexp"
"github.com/smira/aptly/files"
"github.com/aptly-dev/aptly/files"
. "gopkg.in/check.v1"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/utils"
)
var ppaRegexp = regexp.MustCompile("^ppa:([^/]+)/(.+)$")
+1 -1
View File
@@ -1,7 +1,7 @@
package deb
import (
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/utils"
. "gopkg.in/check.v1"
)
+44 -10
View File
@@ -17,10 +17,10 @@ import (
"github.com/smira/go-uuid/uuid"
"github.com/ugorji/go/codec"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/database"
"github.com/smira/aptly/pgp"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/pgp"
"github.com/aptly-dev/aptly/utils"
)
type repoSourceItem struct {
@@ -315,6 +315,7 @@ func (p *PublishedRepo) MarshalJSON() ([]byte, error) {
"Sources": sources,
"Storage": p.Storage,
"SkipContents": p.SkipContents,
"AcquireByHash": p.AcquireByHash,
})
}
@@ -561,6 +562,8 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
indexes := newIndexFiles(publishedStorage, basePath, tempDir, suffix, p.AcquireByHash)
legacyContentIndexes := map[string]*ContentsIndex{}
for component, list := range lists {
hadUdebs := false
@@ -598,21 +601,32 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
}
}
// Start a db batch. If we fill contents data we'll need
// to push each path of the package into the database.
// We'll want this batched so as to avoid an excessive
// amount of write() calls.
tempDB.StartBatch()
defer tempDB.FinishBatch()
for _, arch := range p.Architectures {
if pkg.MatchesArchitecture(arch) {
var bufWriter *bufio.Writer
if !p.SkipContents {
key := fmt.Sprintf("%s-%v", arch, pkg.IsUdeb)
qualifiedName := []byte(pkg.QualifiedName())
contents := pkg.Contents(packagePool, progress)
contentIndex := contentIndexes[key]
for _, contentIndexesMap := range []map[string]*ContentsIndex{contentIndexes, legacyContentIndexes} {
contentIndex := contentIndexesMap[key]
if contentIndex == nil {
contentIndex = NewContentsIndex(tempDB)
contentIndexes[key] = contentIndex
if contentIndex == nil {
contentIndex = NewContentsIndex(tempDB)
contentIndexesMap[key] = contentIndex
}
contentIndex.Push(qualifiedName, contents)
}
contentIndex.Push(pkg, packagePool, progress)
}
bufWriter, err = indexes.PackageIndex(component, arch, pkg.IsUdeb).BufWriter()
@@ -704,6 +718,26 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
}
}
for _, arch := range p.Architectures {
for _, udeb := range []bool{true, false} {
index := legacyContentIndexes[fmt.Sprintf("%s-%v", arch, udeb)]
if index == nil || index.Empty() {
continue
}
var bufWriter *bufio.Writer
bufWriter, err = indexes.LegacyContentsIndex(arch, udeb).BufWriter()
if err != nil {
return fmt.Errorf("unable to generate contents index: %v", err)
}
_, err = index.WriteTo(bufWriter)
if err != nil {
return fmt.Errorf("unable to generate contents index: %v", err)
}
}
}
if progress != nil {
progress.Printf("Finalizing metadata files...\n")
}
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"os"
"path/filepath"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/database"
"github.com/smira/aptly/files"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/files"
"github.com/ugorji/go/codec"
. "gopkg.in/check.v1"
+1 -1
View File
@@ -3,7 +3,7 @@ package deb
import (
"errors"
"github.com/smira/aptly/database"
"github.com/aptly-dev/aptly/database"
. "gopkg.in/check.v1"
)
+5 -5
View File
@@ -15,11 +15,11 @@ import (
"syscall"
"time"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/database"
"github.com/smira/aptly/http"
"github.com/smira/aptly/pgp"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/http"
"github.com/aptly-dev/aptly/pgp"
"github.com/aptly-dev/aptly/utils"
"github.com/smira/go-uuid/uuid"
"github.com/ugorji/go/codec"
)
+7 -7
View File
@@ -7,13 +7,13 @@ import (
"os"
"sort"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/console"
"github.com/smira/aptly/database"
"github.com/smira/aptly/files"
"github.com/smira/aptly/http"
"github.com/smira/aptly/pgp"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/console"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/files"
"github.com/aptly-dev/aptly/http"
"github.com/aptly-dev/aptly/pgp"
"github.com/aptly-dev/aptly/utils"
. "gopkg.in/check.v1"
)
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"sync"
"time"
"github.com/smira/aptly/database"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/database"
"github.com/aptly-dev/aptly/utils"
"github.com/smira/go-uuid/uuid"
"github.com/ugorji/go/codec"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package deb
import (
"errors"
"github.com/smira/aptly/database"
"github.com/aptly-dev/aptly/database"
. "gopkg.in/check.v1"
)
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"os"
"github.com/DisposaBoy/JsonConfigReader"
"github.com/smira/aptly/pgp"
"github.com/smira/aptly/utils"
"github.com/aptly-dev/aptly/pgp"
"github.com/aptly-dev/aptly/utils"
)
// UploadersRule is single rule of format: what packages can group or key upload
+1 -1
View File
@@ -1,7 +1,7 @@
package deb
import (
"github.com/smira/aptly/pgp"
"github.com/aptly-dev/aptly/pgp"
. "gopkg.in/check.v1"
)