mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-07 05:42:42 +00:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 28e050c14e | |||
| 8fb399026d | |||
| e15f23962a | |||
| 81af5882b9 | |||
| e554d8befa | |||
| 17c564358a | |||
| 2e4c1c491e | |||
| e7230d9ee6 | |||
| 0f1074a721 | |||
| 17ed34fdaa | |||
| 17b320eac4 | |||
| e3a71c81e1 | |||
| bf900deb4b | |||
| 142387311b | |||
| 68fbb0cbb9 | |||
| 835da9cb3c | |||
| 7cd0d394d4 | |||
| 2040be2f8a | |||
| 1957c811e8 | |||
| 2dae9b01a1 | |||
| 9a34b4ff1f | |||
| d218159455 | |||
| 8be6911238 | |||
| 20a7c5ae2d | |||
| e161313efa | |||
| 7192049c16 | |||
| ee71b93669 | |||
| 43ee735aa4 | |||
| da5b0c9a66 | |||
| e1dbab6988 | |||
| bcdfb7d99a | |||
| ac85a0897a | |||
| 9a4543500c | |||
| b0f9a4a419 | |||
| 71ea2be6c1 | |||
| b717caeda4 | |||
| fcc283bdb1 | |||
| d3d41dd1c9 | |||
| c72ef05a2a | |||
| a1e360b07b | |||
| 90bba977d7 | |||
| dc248c5603 | |||
| f007465d18 | |||
| 869e83713d | |||
| 7b9e3429fd | |||
| 5b75dbc481 | |||
| d96839f99d | |||
| 8b2920d5dd | |||
| 4240b134e6 | |||
| 1d31a5c25f | |||
| 05a42f4cba | |||
| 2cbb486f6b | |||
| d0ff11390b |
@@ -1,9 +1,9 @@
|
||||
gom 'code.google.com/p/go-uuid/uuid', :commit => '5fac954758f5'
|
||||
gom 'code.google.com/p/go.crypto/ssh/terminal', :commit => '7aa593ce8cea'
|
||||
gom 'code.google.com/p/gographviz', :commit => '212766062629'
|
||||
gom 'code.google.com/p/gographviz', :commit => '454bc64fdfa2'
|
||||
gom 'code.google.com/p/snappy-go/snappy', :commit => '12e4b4183793'
|
||||
gom 'github.com/cheggaaa/pb', :commit => '74be7a1388046f374ac36e93d46f5d56e856f827'
|
||||
gom 'github.com/smira/commander', :commit => '082a3ce267a8225a8ccf94deaf18901223d38fed'
|
||||
gom 'github.com/smira/commander', :commit => 'f408b00e68d5d6e21b9f18bd310978dafc604e47'
|
||||
gom 'github.com/smira/flag', :commit => '0d0aac2addb39050f45e92c5a6252926096dc841'
|
||||
gom 'github.com/mkrautz/goar', :commit => '36eb5f3452b1283a211fa35bc00c646fd0db5c4b'
|
||||
gom 'github.com/syndtr/goleveldb/leveldb', :commit => 'ff3719c6816e2cd194f05058452d660608e178ac'
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package aptly
|
||||
|
||||
// Version of aptly
|
||||
const Version = "0.5.1"
|
||||
const Version = "0.6"
|
||||
|
||||
// Enable debugging features?
|
||||
const EnableDebug = false
|
||||
|
||||
+6
-1
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/smira/aptly/files"
|
||||
"github.com/smira/aptly/http"
|
||||
"github.com/smira/aptly/utils"
|
||||
"github.com/smira/commander"
|
||||
"github.com/smira/flag"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -48,7 +49,11 @@ type FatalError struct {
|
||||
|
||||
// Fatal panics and aborts execution with exit code 1
|
||||
func Fatal(err error) {
|
||||
panic(&FatalError{ReturnCode: 1, Message: err.Error()})
|
||||
returnCode := 1
|
||||
if err == commander.ErrFlagError || err == commander.ErrCommandError {
|
||||
returnCode = 2
|
||||
}
|
||||
panic(&FatalError{ReturnCode: returnCode, Message: err.Error()})
|
||||
}
|
||||
|
||||
// Config loads and returns current configuration
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ func aptlyDbCleanup(cmd *commander.Command, args []string) error {
|
||||
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
// collect information about references packages...
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ func aptlyDbRecover(cmd *commander.Command, args []string) error {
|
||||
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
context.Progress().Printf("Recovering database...\n")
|
||||
|
||||
+23
-19
@@ -13,14 +13,15 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func graphvizEscape(s string) string {
|
||||
return fmt.Sprintf("\"%s\"", strings.Replace(s, "\"", "\\\"", 0))
|
||||
}
|
||||
|
||||
func aptlyGraph(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
|
||||
graph := gographviz.NewGraph()
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
graph := gographviz.NewEscape()
|
||||
graph.SetDir(true)
|
||||
graph.SetName("aptly")
|
||||
|
||||
@@ -34,13 +35,13 @@ func aptlyGraph(cmd *commander.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
graph.AddNode("aptly", graphvizEscape(repo.UUID), map[string]string{
|
||||
graph.AddNode("aptly", repo.UUID, map[string]string{
|
||||
"shape": "Mrecord",
|
||||
"style": "filled",
|
||||
"fillcolor": "darkgoldenrod1",
|
||||
"label": graphvizEscape(fmt.Sprintf("{Mirror %s|url: %s|dist: %s|comp: %s|arch: %s|pkgs: %d}",
|
||||
"label": fmt.Sprintf("{Mirror %s|url: %s|dist: %s|comp: %s|arch: %s|pkgs: %d}",
|
||||
repo.Name, repo.ArchiveRoot, repo.Distribution, strings.Join(repo.Components, ", "),
|
||||
strings.Join(repo.Architectures, ", "), repo.NumPackages())),
|
||||
strings.Join(repo.Architectures, ", "), repo.NumPackages()),
|
||||
})
|
||||
existingNodes[repo.UUID] = true
|
||||
return nil
|
||||
@@ -58,12 +59,12 @@ func aptlyGraph(cmd *commander.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
graph.AddNode("aptly", graphvizEscape(repo.UUID), map[string]string{
|
||||
graph.AddNode("aptly", repo.UUID, map[string]string{
|
||||
"shape": "Mrecord",
|
||||
"style": "filled",
|
||||
"fillcolor": "mediumseagreen",
|
||||
"label": graphvizEscape(fmt.Sprintf("{Repo %s|comment: %s|pkgs: %d}",
|
||||
repo.Name, repo.Comment, repo.NumPackages())),
|
||||
"label": fmt.Sprintf("{Repo %s|comment: %s|pkgs: %d}",
|
||||
repo.Name, repo.Comment, repo.NumPackages()),
|
||||
})
|
||||
existingNodes[repo.UUID] = true
|
||||
return nil
|
||||
@@ -91,18 +92,18 @@ func aptlyGraph(cmd *commander.Command, args []string) error {
|
||||
description = "Snapshot from repo"
|
||||
}
|
||||
|
||||
graph.AddNode("aptly", graphvizEscape(snapshot.UUID), map[string]string{
|
||||
graph.AddNode("aptly", snapshot.UUID, map[string]string{
|
||||
"shape": "Mrecord",
|
||||
"style": "filled",
|
||||
"fillcolor": "cadetblue1",
|
||||
"label": graphvizEscape(fmt.Sprintf("{Snapshot %s|%s|pkgs: %d}", snapshot.Name, description, snapshot.NumPackages())),
|
||||
"label": fmt.Sprintf("{Snapshot %s|%s|pkgs: %d}", snapshot.Name, description, snapshot.NumPackages()),
|
||||
})
|
||||
|
||||
if snapshot.SourceKind == "repo" || snapshot.SourceKind == "local" || snapshot.SourceKind == "snapshot" {
|
||||
for _, uuid := range snapshot.SourceIDs {
|
||||
_, exists := existingNodes[uuid]
|
||||
if exists {
|
||||
graph.AddEdge(graphvizEscape(uuid), "", graphvizEscape(snapshot.UUID), "", true, nil)
|
||||
graph.AddEdge(uuid, snapshot.UUID, true, nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,16 +117,19 @@ func aptlyGraph(cmd *commander.Command, args []string) error {
|
||||
fmt.Printf("Loading published repos...\n")
|
||||
|
||||
context.CollectionFactory().PublishedRepoCollection().ForEach(func(repo *deb.PublishedRepo) error {
|
||||
graph.AddNode("aptly", graphvizEscape(repo.UUID), map[string]string{
|
||||
graph.AddNode("aptly", repo.UUID, map[string]string{
|
||||
"shape": "Mrecord",
|
||||
"style": "filled",
|
||||
"fillcolor": "darkolivegreen1",
|
||||
"label": graphvizEscape(fmt.Sprintf("{Published %s/%s|comp: %s|arch: %s}", repo.Prefix, repo.Distribution, repo.Component, strings.Join(repo.Architectures, ", "))),
|
||||
"label": fmt.Sprintf("{Published %s/%s|comp: %s|arch: %s}", repo.Prefix, repo.Distribution,
|
||||
strings.Join(repo.Components(), " "), strings.Join(repo.Architectures, ", ")),
|
||||
})
|
||||
|
||||
_, exists := existingNodes[repo.SourceUUID]
|
||||
if exists {
|
||||
graph.AddEdge(graphvizEscape(repo.SourceUUID), "", graphvizEscape(repo.UUID), "", true, nil)
|
||||
for _, uuid := range repo.Sources {
|
||||
_, exists := existingNodes[uuid]
|
||||
if exists {
|
||||
graph.AddEdge(uuid, repo.UUID, true, nil)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -12,7 +12,7 @@ func aptlyMirrorCreate(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if !(len(args) == 2 && strings.HasPrefix(args[1], "ppa:") || len(args) >= 3) {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
downloadSources := context.Config().DownloadSourcePackages || context.flags.Lookup("with-sources").Value.Get().(bool)
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ func aptlyMirrorDrop(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ func aptlyMirrorList(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
raw := cmd.Flag.Lookup("raw").Value.Get().(bool)
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ func aptlyMirrorShow(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
@@ -10,7 +10,7 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ func aptlyPublishDrop(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 1 || len(args) > 2 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
distribution := args[0]
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ func aptlyPublishList(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
raw := cmd.Flag.Lookup("raw").Value.Get().(bool)
|
||||
|
||||
+7
-1
@@ -15,6 +15,12 @@ Command publishes current state of local repository ready to be consumed
|
||||
by apt tools. Published repostiories appear under rootDir/public directory.
|
||||
Valid GPG key is required for publishing.
|
||||
|
||||
Multiple component repository could be published by specifying several
|
||||
components split by commas via -component flag and multiple local
|
||||
repositories as the arguments:
|
||||
|
||||
aptly publish repo -component=main,contrib repo-main repo-contrib
|
||||
|
||||
It is not recommended to publish local repositories directly unless the
|
||||
repository is for testing purposes and changes happen frequently. For
|
||||
production usage please take snapshot of repository and publish it
|
||||
@@ -27,7 +33,7 @@ Example:
|
||||
Flag: *flag.NewFlagSet("aptly-publish-repo", flag.ExitOnError),
|
||||
}
|
||||
cmd.Flag.String("distribution", "", "distribution name to publish")
|
||||
cmd.Flag.String("component", "", "component name to publish")
|
||||
cmd.Flag.String("component", "", "component name to publish (for multi-component publishing, separate components with commas)")
|
||||
cmd.Flag.String("gpg-key", "", "GPG key ID to use when signing the release")
|
||||
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "GPG keyring to use (instead of default)")
|
||||
cmd.Flag.String("secret-keyring", "", "GPG secret keyring to use (instead of default)")
|
||||
|
||||
+84
-32
@@ -11,61 +11,106 @@ import (
|
||||
|
||||
func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 1 || len(args) > 2 {
|
||||
|
||||
components := strings.Split(context.flags.Lookup("component").Value.String(), ",")
|
||||
|
||||
if len(args) < len(components) || len(args) > len(components)+1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
var prefix string
|
||||
if len(args) == 2 {
|
||||
prefix = args[1]
|
||||
if len(args) == len(components)+1 {
|
||||
prefix = args[len(components)]
|
||||
args = args[0 : len(args)-1]
|
||||
} else {
|
||||
prefix = ""
|
||||
}
|
||||
|
||||
var (
|
||||
source interface{}
|
||||
sources = []interface{}{}
|
||||
message string
|
||||
)
|
||||
|
||||
if cmd.Name() == "snapshot" {
|
||||
var snapshot *deb.Snapshot
|
||||
snapshot, err = context.CollectionFactory().SnapshotCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
var (
|
||||
snapshot *deb.Snapshot
|
||||
emptyWarning = false
|
||||
parts = []string{}
|
||||
)
|
||||
|
||||
for _, name := range args {
|
||||
snapshot, err = context.CollectionFactory().SnapshotCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().SnapshotCollection().LoadComplete(snapshot)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
}
|
||||
|
||||
sources = append(sources, snapshot)
|
||||
parts = append(parts, snapshot.Name)
|
||||
|
||||
if snapshot.NumPackages() == 0 {
|
||||
emptyWarning = true
|
||||
}
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().SnapshotCollection().LoadComplete(snapshot)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
if len(parts) == 1 {
|
||||
message = fmt.Sprintf("Snapshot %s has", parts[0])
|
||||
} else {
|
||||
message = fmt.Sprintf("Snapshots %s have", strings.Join(parts, ", "))
|
||||
|
||||
}
|
||||
|
||||
source = snapshot
|
||||
message = fmt.Sprintf("Snapshot %s", snapshot.Name)
|
||||
if emptyWarning {
|
||||
context.Progress().Printf("Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)\n")
|
||||
}
|
||||
} else if cmd.Name() == "repo" {
|
||||
var localRepo *deb.LocalRepo
|
||||
localRepo, err = context.CollectionFactory().LocalRepoCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
var (
|
||||
localRepo *deb.LocalRepo
|
||||
emptyWarning = false
|
||||
parts = []string{}
|
||||
)
|
||||
|
||||
for _, name := range args {
|
||||
localRepo, err = context.CollectionFactory().LocalRepoCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().LocalRepoCollection().LoadComplete(localRepo)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
}
|
||||
|
||||
sources = append(sources, localRepo)
|
||||
parts = append(parts, localRepo.Name)
|
||||
|
||||
if localRepo.NumPackages() == 0 {
|
||||
emptyWarning = true
|
||||
}
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().LocalRepoCollection().LoadComplete(localRepo)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
if len(parts) == 1 {
|
||||
message = fmt.Sprintf("Local repo %s has", parts[0])
|
||||
} else {
|
||||
message = fmt.Sprintf("Local repos %s have", strings.Join(parts, ", "))
|
||||
|
||||
}
|
||||
|
||||
source = localRepo
|
||||
message = fmt.Sprintf("Local repo %s", localRepo.Name)
|
||||
if emptyWarning {
|
||||
context.Progress().Printf("Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)\n")
|
||||
}
|
||||
} else {
|
||||
panic("unknown command")
|
||||
}
|
||||
|
||||
component := context.flags.Lookup("component").Value.String()
|
||||
distribution := context.flags.Lookup("distribution").Value.String()
|
||||
|
||||
published, err := deb.NewPublishedRepo(prefix, distribution, component, context.ArchitecturesList(), source, context.CollectionFactory())
|
||||
published, err := deb.NewPublishedRepo(prefix, distribution, context.ArchitecturesList(), components, sources, context.CollectionFactory())
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to publish: %s", err)
|
||||
}
|
||||
@@ -93,19 +138,20 @@ func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error {
|
||||
return fmt.Errorf("unable to save to DB: %s", err)
|
||||
}
|
||||
|
||||
prefix, component, distribution = published.Prefix, published.Component, published.Distribution
|
||||
var repoComponents string
|
||||
prefix, repoComponents, distribution = published.Prefix, strings.Join(published.Components(), " "), published.Distribution
|
||||
if prefix == "." {
|
||||
prefix = ""
|
||||
} else if !strings.HasSuffix(prefix, "/") {
|
||||
prefix += "/"
|
||||
}
|
||||
|
||||
context.Progress().Printf("\n%s has been successfully published.\nPlease setup your webserver to serve directory '%s' with autoindexing.\n",
|
||||
context.Progress().Printf("\n%s been successfully published.\nPlease setup your webserver to serve directory '%s' with autoindexing.\n",
|
||||
message, context.PublishedStorage().PublicPath())
|
||||
context.Progress().Printf("Now you can add following line to apt sources:\n")
|
||||
context.Progress().Printf(" deb http://your-server/%s %s %s\n", prefix, distribution, component)
|
||||
context.Progress().Printf(" deb http://your-server/%s %s %s\n", prefix, distribution, repoComponents)
|
||||
if utils.StrSliceHasItem(published.Architectures, "source") {
|
||||
context.Progress().Printf(" deb-src http://your-server/%s %s %s\n", prefix, distribution, component)
|
||||
context.Progress().Printf(" deb-src http://your-server/%s %s %s\n", prefix, distribution, repoComponents)
|
||||
}
|
||||
context.Progress().Printf("Don't forget to add your GPG key to apt with apt-key.\n")
|
||||
context.Progress().Printf("\nYou can also use `aptly serve` to publish your repositories over HTTP quickly.\n")
|
||||
@@ -123,6 +169,12 @@ Command publishes snapshot as Debian repository ready to be consumed
|
||||
by apt tools. Published repostiories appear under rootDir/public directory.
|
||||
Valid GPG key is required for publishing.
|
||||
|
||||
Multiple component repository could be published by specifying several
|
||||
components split by commas via -component flag and multiple snapshots
|
||||
as the arguments:
|
||||
|
||||
aptly publish snapshot -component=main,contrib snap-main snap-contrib
|
||||
|
||||
Example:
|
||||
|
||||
$ aptly publish snapshot wheezy-main
|
||||
@@ -130,7 +182,7 @@ Example:
|
||||
Flag: *flag.NewFlagSet("aptly-publish-snapshot", flag.ExitOnError),
|
||||
}
|
||||
cmd.Flag.String("distribution", "", "distribution name to publish")
|
||||
cmd.Flag.String("component", "", "component name to publish")
|
||||
cmd.Flag.String("component", "", "component name to publish (for multi-component publishing, separate components with commas)")
|
||||
cmd.Flag.String("gpg-key", "", "GPG key ID to use when signing the release")
|
||||
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "GPG keyring to use (instead of default)")
|
||||
cmd.Flag.String("secret-keyring", "", "GPG secret keyring to use (instead of default)")
|
||||
|
||||
+42
-19
@@ -5,38 +5,32 @@ import (
|
||||
"github.com/smira/aptly/deb"
|
||||
"github.com/smira/commander"
|
||||
"github.com/smira/flag"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 2 || len(args) > 3 {
|
||||
|
||||
components := strings.Split(context.flags.Lookup("component").Value.String(), ",")
|
||||
|
||||
if len(args) < len(components)+1 || len(args) > len(components)+2 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
distribution := args[0]
|
||||
prefix := "."
|
||||
|
||||
var (
|
||||
name string
|
||||
names []string
|
||||
snapshot *deb.Snapshot
|
||||
)
|
||||
|
||||
if len(args) == 3 {
|
||||
if len(args) == len(components)+2 {
|
||||
prefix = args[1]
|
||||
name = args[2]
|
||||
names = args[2:]
|
||||
} else {
|
||||
name = args[1]
|
||||
}
|
||||
|
||||
snapshot, err = context.CollectionFactory().SnapshotCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to switch: %s", err)
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().SnapshotCollection().LoadComplete(snapshot)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to switch: %s", err)
|
||||
names = args[1:]
|
||||
}
|
||||
|
||||
var published *deb.PublishedRepo
|
||||
@@ -55,7 +49,28 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
|
||||
return fmt.Errorf("unable to update: %s", err)
|
||||
}
|
||||
|
||||
published.UpdateSnapshot(snapshot)
|
||||
publishedComponents := published.Components()
|
||||
if len(components) == 1 && len(publishedComponents) == 1 && components[0] == "" {
|
||||
components = publishedComponents
|
||||
}
|
||||
|
||||
if len(names) != len(components) {
|
||||
return fmt.Errorf("mismatch in number of components (%d) and snapshots (%d)", len(components), len(names))
|
||||
}
|
||||
|
||||
for i, component := range components {
|
||||
snapshot, err = context.CollectionFactory().SnapshotCollection().ByName(names[i])
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to switch: %s", err)
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().SnapshotCollection().LoadComplete(snapshot)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to switch: %s", err)
|
||||
}
|
||||
|
||||
published.UpdateSnapshot(component, snapshot)
|
||||
}
|
||||
|
||||
signer, err := getSigner(context.flags)
|
||||
if err != nil {
|
||||
@@ -72,7 +87,7 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
|
||||
return fmt.Errorf("unable to save to DB: %s", err)
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().PublishedRepoCollection().CleanupPrefixComponentFiles(published.Prefix, published.Component,
|
||||
err = context.CollectionFactory().PublishedRepoCollection().CleanupPrefixComponentFiles(published.Prefix, components,
|
||||
context.PublishedStorage(), context.CollectionFactory(), context.Progress())
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to update: %s", err)
|
||||
@@ -90,7 +105,14 @@ func makeCmdPublishSwitch() *commander.Command {
|
||||
Short: "update published repository by switching to new snapshot",
|
||||
Long: `
|
||||
Command switches in-place published repository with new snapshot contents. All
|
||||
publishing parameters are preserved (architecture list, distribution, component).
|
||||
publishing parameters are preserved (architecture list, distribution,
|
||||
component).
|
||||
|
||||
For multiple component repositories, flag -component should be given with
|
||||
list of components to update. Corresponding snapshots should be given in the
|
||||
same order, e.g.:
|
||||
|
||||
aptly publish update -component=main,contrib wheezy wh-main wh-contrib
|
||||
|
||||
Example:
|
||||
|
||||
@@ -102,6 +124,7 @@ Example:
|
||||
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "GPG keyring to use (instead of default)")
|
||||
cmd.Flag.String("secret-keyring", "", "GPG secret keyring to use (instead of default)")
|
||||
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
||||
cmd.Flag.String("component", "", "component names to update (for multi-component publishing, separate components with commas)")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 1 || len(args) > 2 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
distribution := args[0]
|
||||
@@ -37,7 +37,10 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error {
|
||||
return fmt.Errorf("unable to update: %s", err)
|
||||
}
|
||||
|
||||
published.UpdateLocalRepo()
|
||||
components := published.Components()
|
||||
for _, component := range components {
|
||||
published.UpdateLocalRepo(component)
|
||||
}
|
||||
|
||||
signer, err := getSigner(context.flags)
|
||||
if err != nil {
|
||||
@@ -54,7 +57,7 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error {
|
||||
return fmt.Errorf("unable to save to DB: %s", err)
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().PublishedRepoCollection().CleanupPrefixComponentFiles(published.Prefix, published.Component,
|
||||
err = context.CollectionFactory().PublishedRepoCollection().CleanupPrefixComponentFiles(published.Prefix, components,
|
||||
context.PublishedStorage(), context.CollectionFactory(), context.Progress())
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to update: %s", err)
|
||||
@@ -76,6 +79,9 @@ and <prefix> should be occupied with local repository published
|
||||
using command aptly publish repo. Update happens in-place with
|
||||
minimum possible downtime for published repository.
|
||||
|
||||
For multiple component published repositories, all local repositories
|
||||
are updated.
|
||||
|
||||
Example:
|
||||
|
||||
$ aptly publish update wheezy ppa
|
||||
|
||||
+18
-1
@@ -16,7 +16,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 2 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
@@ -41,11 +41,13 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
|
||||
packageFiles := []string{}
|
||||
failedFiles := []string{}
|
||||
|
||||
for _, location := range args[1:] {
|
||||
info, err2 := os.Stat(location)
|
||||
if err2 != nil {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Unable to process %s: %s@|", location, err2)
|
||||
failedFiles = append(failedFiles, location)
|
||||
continue
|
||||
}
|
||||
if info.IsDir() {
|
||||
@@ -68,6 +70,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
packageFiles = append(packageFiles, location)
|
||||
} else {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Unknwon file extenstion: %s@|", location)
|
||||
failedFiles = append(failedFiles, location)
|
||||
continue
|
||||
}
|
||||
}
|
||||
@@ -100,6 +103,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
if err != nil {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Unable to read file %s: %s@|", file, err)
|
||||
failedFiles = append(failedFiles, file)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -118,6 +122,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
err = context.PackagePool().Import(file, checksums.MD5)
|
||||
if err != nil {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Unable to import file %s into pool: %s@|", file, err)
|
||||
failedFiles = append(failedFiles, file)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -132,6 +137,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
err = context.PackagePool().Import(sourceFile, f.Checksums.MD5)
|
||||
if err != nil {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Unable to import file %s into pool: %s@|", sourceFile, err)
|
||||
failedFiles = append(failedFiles, file)
|
||||
break
|
||||
}
|
||||
|
||||
@@ -145,12 +151,14 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
err = context.CollectionFactory().PackageCollection().Update(p)
|
||||
if err != nil {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Unable to save package %s: %s@|", p, err)
|
||||
failedFiles = append(failedFiles, file)
|
||||
continue
|
||||
}
|
||||
|
||||
err = list.Add(p)
|
||||
if err != nil {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Unable to add package to repo %s: %s@|", p, err)
|
||||
failedFiles = append(failedFiles, file)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -176,6 +184,15 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
if len(failedFiles) > 0 {
|
||||
context.Progress().ColoredPrintf("@y[!]@| @!Some files were skipped due to errors:@|")
|
||||
for _, file := range failedFiles {
|
||||
context.Progress().ColoredPrintf(" %s", file)
|
||||
}
|
||||
|
||||
return fmt.Errorf("some files failed to be added")
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ func aptlyRepoCreate(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
repo := deb.NewLocalRepo(args[0], context.flags.Lookup("comment").Value.String())
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ func aptlyRepoDrop(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ func aptlyRepoEdit(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
repo, err := context.CollectionFactory().LocalRepoCollection().ByName(args[0])
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ func aptlyRepoList(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
raw := cmd.Flag.Lookup("raw").Value.Get().(bool)
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ func aptlyRepoMoveCopyImport(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 3 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
command := cmd.Name()
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ func aptlyRepoRemove(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 2 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ func aptlyRepoShow(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
+8
-2
@@ -10,11 +10,17 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func aptlyServe(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
if context.CollectionFactory().PublishedRepoCollection().Len() == 0 {
|
||||
fmt.Printf("No published repositories, unable to serve.\n")
|
||||
return nil
|
||||
@@ -69,11 +75,11 @@ func aptlyServe(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
|
||||
fmt.Printf("# %s\ndeb http://%s:%s/%s %s %s\n",
|
||||
repo, listenHost, listenPort, prefix, repo.Distribution, repo.Component)
|
||||
repo, listenHost, listenPort, prefix, repo.Distribution, strings.Join(repo.Components(), " "))
|
||||
|
||||
if utils.StrSliceHasItem(repo.Architectures, "source") {
|
||||
fmt.Printf("deb-src http://%s:%s/%s %s %s\n",
|
||||
listenHost, listenPort, prefix, repo.Distribution, repo.Component)
|
||||
listenHost, listenPort, prefix, repo.Distribution, strings.Join(repo.Components(), " "))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ func aptlySnapshotCreate(cmd *commander.Command, args []string) error {
|
||||
snapshot = deb.NewSnapshotFromPackageList(snapshotName, nil, packageList, "Created as empty")
|
||||
} else {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().SnapshotCollection().Add(snapshot)
|
||||
|
||||
@@ -10,7 +10,7 @@ func aptlySnapshotDiff(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 2 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
onlyMatching := context.flags.Lookup("only-matching").Value.Get().(bool)
|
||||
|
||||
@@ -10,7 +10,7 @@ func aptlySnapshotDrop(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
@@ -11,7 +11,7 @@ func aptlySnapshotList(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
raw := cmd.Flag.Lookup("raw").Value.Get().(bool)
|
||||
|
||||
@@ -11,7 +11,7 @@ func aptlySnapshotMerge(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 2 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
sources := make([]*deb.Snapshot, len(args)-1)
|
||||
@@ -29,10 +29,15 @@ func aptlySnapshotMerge(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
|
||||
latest := context.flags.Lookup("latest").Value.Get().(bool)
|
||||
overrideMatching := !latest
|
||||
noRemove := context.flags.Lookup("no-remove").Value.Get().(bool)
|
||||
|
||||
if noRemove && latest {
|
||||
return fmt.Errorf("-no-remove and -latest can't be specified together")
|
||||
}
|
||||
|
||||
overrideMatching := !latest && !noRemove
|
||||
|
||||
result := sources[0].RefList()
|
||||
|
||||
for i := 1; i < len(sources); i++ {
|
||||
result = result.Merge(sources[i].RefList(), overrideMatching)
|
||||
}
|
||||
@@ -79,6 +84,7 @@ Example:
|
||||
}
|
||||
|
||||
cmd.Flag.Bool("latest", false, "use only the latest version of each package")
|
||||
cmd.Flag.Bool("no-remove", false, "don't remove duplicate arch/name packages")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ func aptlySnapshotPull(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 4 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
noDeps := context.flags.Lookup("no-deps").Value.Get().(bool)
|
||||
@@ -86,7 +86,7 @@ func aptlySnapshotPull(cmd *commander.Command, args []string) error {
|
||||
|
||||
// Perform pull
|
||||
for _, arch := range architecturesList {
|
||||
dependencies := make([]deb.Dependency, len(initialDependencies), 128)
|
||||
dependencies := make([]deb.Dependency, len(initialDependencies), 2*len(initialDependencies))
|
||||
for i := range dependencies {
|
||||
dependencies[i] = initialDependencies[i]
|
||||
dependencies[i].Architecture = arch
|
||||
|
||||
@@ -10,7 +10,7 @@ func aptlySnapshotShow(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
name := args[0]
|
||||
|
||||
@@ -11,7 +11,7 @@ func aptlySnapshotVerify(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
if len(args) < 1 {
|
||||
cmd.Usage()
|
||||
return err
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
snapshots := make([]*deb.Snapshot, len(args))
|
||||
|
||||
@@ -7,6 +7,11 @@ import (
|
||||
)
|
||||
|
||||
func aptlyVersion(cmd *commander.Command, args []string) error {
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
return commander.ErrCommandError
|
||||
}
|
||||
|
||||
fmt.Printf("aptly version: %s\n", aptly.Version)
|
||||
return nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import (
|
||||
type Stanza map[string]string
|
||||
|
||||
// Canonical order of fields in stanza
|
||||
var canocialOrder = []string{"Origin", "Label", "Suite", "Package", "Version", "Installed-Size", "Priority", "Section", "Maintainer",
|
||||
var canocialOrder = []string{"Package", "Origin", "Label", "Suite", "Version", "Installed-Size", "Priority", "Section", "Maintainer",
|
||||
"Architecture", "Codename", "Date", "Architectures", "Components", "Description", "MD5sum", "MD5Sum", "SHA1", "SHA256"}
|
||||
|
||||
// Copy returns copy of Stanza
|
||||
|
||||
+4
-4
@@ -86,11 +86,11 @@ func NewPackageListFromRefList(reflist *PackageRefList, collection *PackageColle
|
||||
|
||||
// Add appends package to package list, additionally checking for uniqueness
|
||||
func (l *PackageList) Add(p *Package) error {
|
||||
key := string(p.Key(""))
|
||||
key := string(p.ShortKey(""))
|
||||
existing, ok := l.packages[key]
|
||||
if ok {
|
||||
if !existing.Equals(p) {
|
||||
return fmt.Errorf("conflict in package %s: %#v != %#v", p, existing, p)
|
||||
return fmt.Errorf("conflict in package %s", p)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -137,7 +137,7 @@ func (l *PackageList) Append(pl *PackageList) error {
|
||||
existing, ok := l.packages[k]
|
||||
if ok {
|
||||
if !existing.Equals(p) {
|
||||
return fmt.Errorf("conflict in package %s: %#v != %#v", p, existing, p)
|
||||
return fmt.Errorf("conflict in package %s", p)
|
||||
}
|
||||
} else {
|
||||
l.packages[k] = p
|
||||
@@ -149,7 +149,7 @@ func (l *PackageList) Append(pl *PackageList) error {
|
||||
|
||||
// Remove removes package from the list, and updates index when required
|
||||
func (l *PackageList) Remove(p *Package) {
|
||||
delete(l.packages, string(p.Key("")))
|
||||
delete(l.packages, string(p.ShortKey("")))
|
||||
if l.indexed {
|
||||
for _, provides := range p.Provides {
|
||||
for i, pkg := range l.providesIndex[provides] {
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ func (s *PackageListSuite) SetUpTest(c *C) {
|
||||
stanza["Package"] = "mars-invaders"
|
||||
s.p3 = NewPackageFromControlFile(stanza)
|
||||
stanza = packageStanza.Copy()
|
||||
stanza["Size"] = "42"
|
||||
stanza["Source"] = "unknown-planet"
|
||||
s.p4 = NewPackageFromControlFile(stanza)
|
||||
stanza = packageStanza.Copy()
|
||||
stanza["Package"] = "lonely-strangers"
|
||||
|
||||
+14
-1
@@ -26,6 +26,8 @@ type Package struct {
|
||||
IsSource bool
|
||||
// Hash of files section
|
||||
FilesHash uint64
|
||||
// Is this >= 0.6 package?
|
||||
V06Plus bool
|
||||
// Offload fields
|
||||
deps *PackageDependencies
|
||||
extra *Stanza
|
||||
@@ -41,6 +43,7 @@ func NewPackageFromControlFile(input Stanza) *Package {
|
||||
Version: input["Version"],
|
||||
Architecture: input["Architecture"],
|
||||
Source: input["Source"],
|
||||
V06Plus: true,
|
||||
}
|
||||
|
||||
delete(input, "Package")
|
||||
@@ -89,6 +92,7 @@ func NewSourcePackageFromControlFile(input Stanza) (*Package, error) {
|
||||
Version: input["Version"],
|
||||
Architecture: "source",
|
||||
SourceArchitecture: input["Architecture"],
|
||||
V06Plus: true,
|
||||
}
|
||||
|
||||
delete(input, "Package")
|
||||
@@ -167,7 +171,16 @@ func NewSourcePackageFromControlFile(input Stanza) (*Package, error) {
|
||||
|
||||
// Key returns unique key identifying package
|
||||
func (p *Package) Key(prefix string) []byte {
|
||||
return []byte(prefix + "P" + p.Architecture + " " + p.Name + " " + p.Version)
|
||||
if p.V06Plus {
|
||||
return []byte(fmt.Sprintf("%sP%s %s %s %08x", prefix, p.Architecture, p.Name, p.Version, p.FilesHash))
|
||||
}
|
||||
|
||||
return p.ShortKey(prefix)
|
||||
}
|
||||
|
||||
// ShortKey returns key for the package that should be unique in one list
|
||||
func (p *Package) ShortKey(prefix string) []byte {
|
||||
return []byte(fmt.Sprintf("%sP%s %s %s", prefix, p.Architecture, p.Name, p.Version))
|
||||
}
|
||||
|
||||
// String creates readable representation
|
||||
|
||||
@@ -83,7 +83,7 @@ func (collection *PackageCollection) ByKey(key []byte) (*Package, error) {
|
||||
p.UpdateFiles(PackageFiles(oldp.Files))
|
||||
|
||||
// Save in new format
|
||||
err = collection.internalUpdate(p)
|
||||
err = collection.Update(p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -156,25 +156,6 @@ func (collection *PackageCollection) loadFiles(p *Package) *PackageFiles {
|
||||
|
||||
// Update adds or updates information about package in DB checking for conficts first
|
||||
func (collection *PackageCollection) Update(p *Package) error {
|
||||
existing, err := collection.ByKey(p.Key(""))
|
||||
if err == nil {
|
||||
// if .Files is different, consider to be conflict
|
||||
if p.FilesHash != existing.FilesHash {
|
||||
return fmt.Errorf("unable to save: %s, conflict with existing packge", p)
|
||||
}
|
||||
// ok, .Files are the same, but maybe some meta-data is different, proceed to saving
|
||||
} else {
|
||||
if err != database.ErrNotFound {
|
||||
return err
|
||||
}
|
||||
// ok, package doesn't exist yet
|
||||
}
|
||||
|
||||
return collection.internalUpdate(p)
|
||||
}
|
||||
|
||||
// internalUpdate updates information in DB about package and offloaded fields
|
||||
func (collection *PackageCollection) internalUpdate(p *Package) error {
|
||||
encoder := codec.NewEncoder(&collection.encodeBuffer, &codec.MsgpackHandle{})
|
||||
|
||||
collection.encodeBuffer.Reset()
|
||||
|
||||
@@ -48,20 +48,6 @@ func (s *PackageCollectionSuite) TestUpdate(c *C) {
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(res.Equals(s.p), Equals, false)
|
||||
c.Assert(res.Equals(p2), Equals, true)
|
||||
|
||||
// change file info
|
||||
p2 = NewPackageFromControlFile(packageStanza.Copy())
|
||||
p2.UpdateFiles(nil)
|
||||
res, err = s.collection.ByKey(p2.Key(""))
|
||||
err = s.collection.Update(p2)
|
||||
c.Assert(err, ErrorMatches, ".*conflict with existing packge")
|
||||
p2 = NewPackageFromControlFile(packageStanza.Copy())
|
||||
files := p2.Files()
|
||||
files[0].Checksums.MD5 = "abcdef"
|
||||
p2.UpdateFiles(files)
|
||||
res, err = s.collection.ByKey(p2.Key(""))
|
||||
err = s.collection.Update(p2)
|
||||
c.Assert(err, ErrorMatches, ".*conflict with existing packge")
|
||||
}
|
||||
|
||||
func (s *PackageCollectionSuite) TestByKey(c *C) {
|
||||
|
||||
+13
-2
@@ -87,8 +87,19 @@ func (s *PackageSuite) TestWithProvides(c *C) {
|
||||
func (s *PackageSuite) TestKey(c *C) {
|
||||
p := NewPackageFromControlFile(s.stanza)
|
||||
|
||||
c.Check(p.Key(""), DeepEquals, []byte("Pi386 alien-arena-common 7.40-2"))
|
||||
c.Check(p.Key("xD"), DeepEquals, []byte("xDPi386 alien-arena-common 7.40-2"))
|
||||
c.Check(p.Key(""), DeepEquals, []byte("Pi386 alien-arena-common 7.40-2 c8901eedd79ac51b"))
|
||||
c.Check(p.Key("xD"), DeepEquals, []byte("xDPi386 alien-arena-common 7.40-2 c8901eedd79ac51b"))
|
||||
|
||||
p.V06Plus = false
|
||||
c.Check(p.Key(""), DeepEquals, []byte("Pi386 alien-arena-common 7.40-2"))
|
||||
c.Check(p.Key("xD"), DeepEquals, []byte("xDPi386 alien-arena-common 7.40-2"))
|
||||
}
|
||||
|
||||
func (s *PackageSuite) TestShortKey(c *C) {
|
||||
p := NewPackageFromControlFile(s.stanza)
|
||||
|
||||
c.Check(p.ShortKey(""), DeepEquals, []byte("Pi386 alien-arena-common 7.40-2"))
|
||||
c.Check(p.ShortKey("xD"), DeepEquals, []byte("xDPi386 alien-arena-common 7.40-2"))
|
||||
}
|
||||
|
||||
func (s *PackageSuite) TestStanza(c *C) {
|
||||
|
||||
+531
-282
File diff suppressed because it is too large
Load Diff
+178
-62
@@ -1,10 +1,12 @@
|
||||
package deb
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"github.com/smira/aptly/aptly"
|
||||
"github.com/smira/aptly/database"
|
||||
"github.com/smira/aptly/files"
|
||||
"github.com/ugorji/go/codec"
|
||||
. "launchpad.net/gocheck"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -45,15 +47,15 @@ func (n *NullSigner) ClearSign(source string, destination string) error {
|
||||
|
||||
type PublishedRepoSuite struct {
|
||||
PackageListMixinSuite
|
||||
repo, repo2 *PublishedRepo
|
||||
root string
|
||||
publishedStorage aptly.PublishedStorage
|
||||
packagePool aptly.PackagePool
|
||||
localRepo *LocalRepo
|
||||
snapshot *Snapshot
|
||||
db database.Storage
|
||||
factory *CollectionFactory
|
||||
packageCollection *PackageCollection
|
||||
repo, repo2, repo3, repo4 *PublishedRepo
|
||||
root string
|
||||
publishedStorage aptly.PublishedStorage
|
||||
packagePool aptly.PackagePool
|
||||
localRepo *LocalRepo
|
||||
snapshot, snapshot2 *Snapshot
|
||||
db database.Storage
|
||||
factory *CollectionFactory
|
||||
packageCollection *PackageCollection
|
||||
}
|
||||
|
||||
var _ = Suite(&PublishedRepoSuite{})
|
||||
@@ -79,14 +81,21 @@ func (s *PublishedRepoSuite) SetUpTest(c *C) {
|
||||
s.snapshot, _ = NewSnapshotFromRepository("snap", repo)
|
||||
s.factory.SnapshotCollection().Add(s.snapshot)
|
||||
|
||||
s.snapshot2, _ = NewSnapshotFromRepository("snap", repo)
|
||||
s.factory.SnapshotCollection().Add(s.snapshot2)
|
||||
|
||||
s.packageCollection = s.factory.PackageCollection()
|
||||
s.packageCollection.Update(s.p1)
|
||||
s.packageCollection.Update(s.p2)
|
||||
s.packageCollection.Update(s.p3)
|
||||
|
||||
s.repo, _ = NewPublishedRepo("ppa", "squeeze", "main", nil, s.snapshot, s.factory)
|
||||
s.repo, _ = NewPublishedRepo("ppa", "squeeze", nil, []string{"main"}, []interface{}{s.snapshot}, s.factory)
|
||||
|
||||
s.repo2, _ = NewPublishedRepo("ppa", "maverick", "main", nil, s.localRepo, s.factory)
|
||||
s.repo2, _ = NewPublishedRepo("ppa", "maverick", nil, []string{"main"}, []interface{}{s.localRepo}, s.factory)
|
||||
|
||||
s.repo3, _ = NewPublishedRepo("linux", "natty", nil, []string{"main", "contrib"}, []interface{}{s.snapshot, s.snapshot2}, s.factory)
|
||||
|
||||
s.repo4, _ = NewPublishedRepo("ppa", "maverick", []string{"source"}, []string{"main"}, []interface{}{s.localRepo}, s.factory)
|
||||
|
||||
poolPath, _ := s.packagePool.Path(s.p1.Files()[0].Filename, s.p1.Files()[0].Checksums.MD5)
|
||||
err := os.MkdirAll(filepath.Dir(poolPath), 0755)
|
||||
@@ -100,17 +109,39 @@ func (s *PublishedRepoSuite) TearDownTest(c *C) {
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestNewPublishedRepo(c *C) {
|
||||
c.Check(s.repo.snapshot, Equals, s.snapshot)
|
||||
c.Check(s.repo.sourceItems["main"].snapshot, Equals, s.snapshot)
|
||||
c.Check(s.repo.SourceKind, Equals, "snapshot")
|
||||
c.Check(s.repo.SourceUUID, Equals, s.snapshot.UUID)
|
||||
c.Check(s.repo.Sources["main"], Equals, s.snapshot.UUID)
|
||||
c.Check(s.repo.Components(), DeepEquals, []string{"main"})
|
||||
|
||||
c.Check(s.repo2.localRepo, Equals, s.localRepo)
|
||||
c.Check(s.repo2.sourceItems["main"].localRepo, Equals, s.localRepo)
|
||||
c.Check(s.repo2.SourceKind, Equals, "local")
|
||||
c.Check(s.repo2.SourceUUID, Equals, s.localRepo.UUID)
|
||||
c.Check(s.repo2.packageRefs.Len(), Equals, 3)
|
||||
c.Check(s.repo2.Sources["main"], Equals, s.localRepo.UUID)
|
||||
c.Check(s.repo2.sourceItems["main"].packageRefs.Len(), Equals, 3)
|
||||
c.Check(s.repo2.Components(), DeepEquals, []string{"main"})
|
||||
|
||||
c.Check(s.repo.RefList().Len(), Equals, 3)
|
||||
c.Check(s.repo2.RefList().Len(), Equals, 3)
|
||||
c.Check(s.repo.RefList("main").Len(), Equals, 3)
|
||||
c.Check(s.repo2.RefList("main").Len(), Equals, 3)
|
||||
|
||||
c.Check(s.repo3.Sources, DeepEquals, map[string]string{"main": s.snapshot.UUID, "contrib": s.snapshot2.UUID})
|
||||
c.Check(s.repo3.SourceKind, Equals, "snapshot")
|
||||
c.Check(s.repo3.sourceItems["main"].snapshot, Equals, s.snapshot)
|
||||
c.Check(s.repo3.sourceItems["contrib"].snapshot, Equals, s.snapshot2)
|
||||
c.Check(s.repo3.Components(), DeepEquals, []string{"contrib", "main"})
|
||||
|
||||
c.Check(s.repo3.RefList("main").Len(), Equals, 3)
|
||||
c.Check(s.repo3.RefList("contrib").Len(), Equals, 3)
|
||||
|
||||
c.Check(func() { NewPublishedRepo(".", "a", nil, nil, nil, s.factory) }, PanicMatches, "publish with empty sources")
|
||||
c.Check(func() {
|
||||
NewPublishedRepo(".", "a", nil, []string{"main"}, []interface{}{s.snapshot, s.snapshot2}, s.factory)
|
||||
}, PanicMatches, "sources and components should be equal in size")
|
||||
c.Check(func() {
|
||||
NewPublishedRepo(".", "a", nil, []string{"main", "contrib"}, []interface{}{s.localRepo, s.snapshot2}, s.factory)
|
||||
}, PanicMatches, "interface conversion:.*")
|
||||
|
||||
_, err := NewPublishedRepo(".", "a", nil, []string{"main", "main"}, []interface{}{s.snapshot, s.snapshot2}, s.factory)
|
||||
c.Check(err, ErrorMatches, "duplicate component name: main")
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestPrefixNormalization(c *C) {
|
||||
@@ -169,7 +200,7 @@ func (s *PublishedRepoSuite) TestPrefixNormalization(c *C) {
|
||||
errorExpected: "invalid prefix .*",
|
||||
},
|
||||
} {
|
||||
repo, err := NewPublishedRepo(t.prefix, "squeeze", "main", nil, s.snapshot, s.factory)
|
||||
repo, err := NewPublishedRepo(t.prefix, "squeeze", nil, []string{"main"}, []interface{}{s.snapshot}, s.factory)
|
||||
if t.errorExpected != "" {
|
||||
c.Check(err, ErrorMatches, t.errorExpected)
|
||||
} else {
|
||||
@@ -179,37 +210,45 @@ func (s *PublishedRepoSuite) TestPrefixNormalization(c *C) {
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestDistributionComponentGuessing(c *C) {
|
||||
repo, err := NewPublishedRepo("ppa", "", "", nil, s.snapshot, s.factory)
|
||||
repo, err := NewPublishedRepo("ppa", "", nil, []string{""}, []interface{}{s.snapshot}, s.factory)
|
||||
c.Check(err, IsNil)
|
||||
c.Check(repo.Distribution, Equals, "squeeze")
|
||||
c.Check(repo.Component, Equals, "main")
|
||||
c.Check(repo.Components(), DeepEquals, []string{"main"})
|
||||
|
||||
repo, err = NewPublishedRepo("ppa", "wheezy", "", nil, s.snapshot, s.factory)
|
||||
repo, err = NewPublishedRepo("ppa", "wheezy", nil, []string{""}, []interface{}{s.snapshot}, s.factory)
|
||||
c.Check(err, IsNil)
|
||||
c.Check(repo.Distribution, Equals, "wheezy")
|
||||
c.Check(repo.Component, Equals, "main")
|
||||
c.Check(repo.Components(), DeepEquals, []string{"main"})
|
||||
|
||||
repo, err = NewPublishedRepo("ppa", "", "non-free", nil, s.snapshot, s.factory)
|
||||
repo, err = NewPublishedRepo("ppa", "", nil, []string{"non-free"}, []interface{}{s.snapshot}, s.factory)
|
||||
c.Check(err, IsNil)
|
||||
c.Check(repo.Distribution, Equals, "squeeze")
|
||||
c.Check(repo.Component, Equals, "non-free")
|
||||
c.Check(repo.Components(), DeepEquals, []string{"non-free"})
|
||||
|
||||
repo, err = NewPublishedRepo("ppa", "squeeze", "", nil, s.localRepo, s.factory)
|
||||
repo, err = NewPublishedRepo("ppa", "squeeze", nil, []string{""}, []interface{}{s.localRepo}, s.factory)
|
||||
c.Check(err, IsNil)
|
||||
c.Check(repo.Distribution, Equals, "squeeze")
|
||||
c.Check(repo.Component, Equals, "main")
|
||||
c.Check(repo.Components(), DeepEquals, []string{"main"})
|
||||
|
||||
repo, err = NewPublishedRepo("ppa", "", "main", nil, s.localRepo, s.factory)
|
||||
repo, err = NewPublishedRepo("ppa", "", nil, []string{"main"}, []interface{}{s.localRepo}, s.factory)
|
||||
c.Check(err, ErrorMatches, "unable to guess distribution name, please specify explicitly")
|
||||
|
||||
s.localRepo.DefaultDistribution = "precise"
|
||||
s.localRepo.DefaultComponent = "contrib"
|
||||
s.factory.LocalRepoCollection().Update(s.localRepo)
|
||||
|
||||
repo, err = NewPublishedRepo("ppa", "", "", nil, s.localRepo, s.factory)
|
||||
repo, err = NewPublishedRepo("ppa", "", nil, []string{""}, []interface{}{s.localRepo}, s.factory)
|
||||
c.Check(err, IsNil)
|
||||
c.Check(repo.Distribution, Equals, "precise")
|
||||
c.Check(repo.Component, Equals, "contrib")
|
||||
c.Check(repo.Components(), DeepEquals, []string{"contrib"})
|
||||
|
||||
repo, err = NewPublishedRepo("ppa", "", nil, []string{"", "contrib"}, []interface{}{s.snapshot, s.snapshot2}, s.factory)
|
||||
c.Check(err, IsNil)
|
||||
c.Check(repo.Distribution, Equals, "squeeze")
|
||||
c.Check(repo.Components(), DeepEquals, []string{"contrib", "main"})
|
||||
|
||||
repo, err = NewPublishedRepo("ppa", "", nil, []string{"", ""}, []interface{}{s.snapshot, s.snapshot2}, s.factory)
|
||||
c.Check(err, ErrorMatches, "duplicate component name: main")
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestPublish(c *C) {
|
||||
@@ -245,6 +284,16 @@ func (s *PublishedRepoSuite) TestPublish(c *C) {
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(st, IsNil)
|
||||
|
||||
drf, err := os.Open(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/squeeze/main/binary-i386/Release"))
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
cfr = NewControlFileReader(drf)
|
||||
st, err = cfr.ReadStanza()
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
c.Check(st["Archive"], Equals, "squeeze")
|
||||
c.Check(st["Architecture"], Equals, "i386")
|
||||
|
||||
_, err = os.Stat(filepath.Join(s.publishedStorage.PublicPath(), "ppa/pool/main/a/alien-arena/alien-arena-common_7.40-2_i386.deb"))
|
||||
c.Assert(err, IsNil)
|
||||
}
|
||||
@@ -254,6 +303,7 @@ func (s *PublishedRepoSuite) TestPublishNoSigner(c *C) {
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/squeeze/Release"), PathExists)
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/squeeze/main/binary-i386/Release"), PathExists)
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestPublishLocalRepo(c *C) {
|
||||
@@ -261,25 +311,36 @@ func (s *PublishedRepoSuite) TestPublishLocalRepo(c *C) {
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/maverick/Release"), PathExists)
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/maverick/main/binary-i386/Release"), PathExists)
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestPublishLocalSourceRepo(c *C) {
|
||||
err := s.repo4.Publish(s.packagePool, s.publishedStorage, s.factory, nil, nil)
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/maverick/Release"), PathExists)
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/maverick/main/source/Release"), PathExists)
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestString(c *C) {
|
||||
c.Check(s.repo.String(), Equals,
|
||||
"ppa/squeeze (main) [] publishes [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze")
|
||||
"ppa/squeeze [] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
|
||||
c.Check(s.repo2.String(), Equals,
|
||||
"ppa/maverick (main) [] publishes [local1]: comment1")
|
||||
repo, _ := NewPublishedRepo("", "squeeze", "main", []string{"s390"}, s.snapshot, s.factory)
|
||||
"ppa/maverick [] publishes {main: [local1]: comment1}")
|
||||
repo, _ := NewPublishedRepo("", "squeeze", []string{"s390"}, []string{"main"}, []interface{}{s.snapshot}, s.factory)
|
||||
c.Check(repo.String(), Equals,
|
||||
"./squeeze (main) [s390] publishes [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze")
|
||||
repo, _ = NewPublishedRepo("", "squeeze", "main", []string{"i386", "amd64"}, s.snapshot, s.factory)
|
||||
"./squeeze [s390] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
|
||||
repo, _ = NewPublishedRepo("", "squeeze", []string{"i386", "amd64"}, []string{"main"}, []interface{}{s.snapshot}, s.factory)
|
||||
c.Check(repo.String(), Equals,
|
||||
"./squeeze (main) [i386, amd64] publishes [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze")
|
||||
"./squeeze [i386, amd64] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
|
||||
repo.Origin = "myorigin"
|
||||
c.Check(repo.String(), Equals,
|
||||
"./squeeze (main, origin: myorigin) [i386, amd64] publishes [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze")
|
||||
"./squeeze (origin: myorigin) [i386, amd64] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
|
||||
repo.Label = "mylabel"
|
||||
c.Check(repo.String(), Equals,
|
||||
"./squeeze (main, origin: myorigin, label: mylabel) [i386, amd64] publishes [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze")
|
||||
"./squeeze (origin: myorigin, label: mylabel) [i386, amd64] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
|
||||
c.Check(s.repo3.String(), Equals,
|
||||
"linux/natty [] publishes {contrib: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}, {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestKey(c *C) {
|
||||
@@ -287,7 +348,8 @@ func (s *PublishedRepoSuite) TestKey(c *C) {
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestRefKey(c *C) {
|
||||
c.Check(s.repo.RefKey(), DeepEquals, []byte("E"+s.repo.UUID))
|
||||
c.Check(s.repo.RefKey(""), DeepEquals, []byte("E"+s.repo.UUID))
|
||||
c.Check(s.repo.RefKey("main"), DeepEquals, []byte("E"+s.repo.UUID+"main"))
|
||||
}
|
||||
|
||||
func (s *PublishedRepoSuite) TestEncodeDecode(c *C) {
|
||||
@@ -295,7 +357,7 @@ func (s *PublishedRepoSuite) TestEncodeDecode(c *C) {
|
||||
repo := &PublishedRepo{}
|
||||
err := repo.Decode(encoded)
|
||||
|
||||
s.repo.snapshot = nil
|
||||
s.repo.sourceItems = nil
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(repo, DeepEquals, s.repo)
|
||||
|
||||
@@ -303,8 +365,7 @@ func (s *PublishedRepoSuite) TestEncodeDecode(c *C) {
|
||||
repo2 := &PublishedRepo{}
|
||||
err = repo2.Decode(encoded2)
|
||||
|
||||
s.repo2.localRepo = nil
|
||||
s.repo2.packageRefs = nil
|
||||
s.repo2.sourceItems = nil
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(repo2, DeepEquals, s.repo2)
|
||||
}
|
||||
@@ -337,10 +398,10 @@ func (s *PublishedRepoCollectionSuite) SetUpTest(c *C) {
|
||||
s.localRepo = NewLocalRepo("local1", "comment1")
|
||||
s.factory.LocalRepoCollection().Add(s.localRepo)
|
||||
|
||||
s.repo1, _ = NewPublishedRepo("ppa", "anaconda", "main", []string{}, s.snap1, s.factory)
|
||||
s.repo2, _ = NewPublishedRepo("", "anaconda", "main", []string{}, s.snap2, s.factory)
|
||||
s.repo3, _ = NewPublishedRepo("ppa", "anaconda", "main", []string{}, s.snap2, s.factory)
|
||||
s.repo4, _ = NewPublishedRepo("ppa", "precise", "main", []string{}, s.localRepo, s.factory)
|
||||
s.repo1, _ = NewPublishedRepo("ppa", "anaconda", []string{}, []string{"main"}, []interface{}{s.snap1}, s.factory)
|
||||
s.repo2, _ = NewPublishedRepo("", "anaconda", []string{}, []string{"main", "contrib"}, []interface{}{s.snap2, s.snap1}, s.factory)
|
||||
s.repo3, _ = NewPublishedRepo("ppa", "anaconda", []string{}, []string{"main"}, []interface{}{s.snap2}, s.factory)
|
||||
s.repo4, _ = NewPublishedRepo("ppa", "precise", []string{}, []string{"main"}, []interface{}{s.localRepo}, s.factory)
|
||||
|
||||
s.collection = s.factory.PublishedRepoCollection()
|
||||
}
|
||||
@@ -398,18 +459,61 @@ func (s *PublishedRepoCollectionSuite) TestUpdateLoadComplete(c *C) {
|
||||
collection := NewPublishedRepoCollection(s.db)
|
||||
r, err := collection.ByPrefixDistribution("ppa", "anaconda")
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(r.snapshot, IsNil)
|
||||
c.Assert(r.sourceItems["main"].snapshot, IsNil)
|
||||
c.Assert(s.collection.LoadComplete(r, s.factory), IsNil)
|
||||
c.Assert(r.snapshot.UUID, Equals, s.repo1.snapshot.UUID)
|
||||
c.Assert(r.RefList().Len(), Equals, 0)
|
||||
c.Assert(r.Sources["main"], Equals, s.repo1.sourceItems["main"].snapshot.UUID)
|
||||
c.Assert(r.RefList("main").Len(), Equals, 0)
|
||||
|
||||
r, err = collection.ByPrefixDistribution("ppa", "precise")
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(r.localRepo, IsNil)
|
||||
c.Assert(r.sourceItems["main"].localRepo, IsNil)
|
||||
c.Assert(s.collection.LoadComplete(r, s.factory), IsNil)
|
||||
c.Assert(r.localRepo.UUID, Equals, s.repo4.localRepo.UUID)
|
||||
c.Assert(r.packageRefs.Len(), Equals, 0)
|
||||
c.Assert(r.RefList().Len(), Equals, 0)
|
||||
c.Assert(r.sourceItems["main"].localRepo.UUID, Equals, s.repo4.sourceItems["main"].localRepo.UUID)
|
||||
c.Assert(r.sourceItems["main"].packageRefs.Len(), Equals, 0)
|
||||
c.Assert(r.RefList("main").Len(), Equals, 0)
|
||||
}
|
||||
|
||||
func (s *PublishedRepoCollectionSuite) TestLoadPre0_6(c *C) {
|
||||
type oldPublishedRepo struct {
|
||||
UUID string
|
||||
Prefix string
|
||||
Distribution string
|
||||
Origin string
|
||||
Label string
|
||||
Architectures []string
|
||||
SourceKind string
|
||||
Component string
|
||||
SourceUUID string `codec:"SnapshotUUID"`
|
||||
}
|
||||
|
||||
old := oldPublishedRepo{
|
||||
UUID: s.repo1.UUID,
|
||||
Prefix: "ppa",
|
||||
Distribution: "anaconda",
|
||||
Architectures: []string{"i386"},
|
||||
SourceKind: "local",
|
||||
Component: "contrib",
|
||||
SourceUUID: s.localRepo.UUID,
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
|
||||
encoder := codec.NewEncoder(&buf, &codec.MsgpackHandle{})
|
||||
encoder.Encode(&old)
|
||||
|
||||
c.Assert(s.db.Put(s.repo1.Key(), buf.Bytes()), IsNil)
|
||||
c.Assert(s.db.Put(s.repo1.RefKey(""), s.localRepo.RefList().Encode()), IsNil)
|
||||
|
||||
collection := NewPublishedRepoCollection(s.db)
|
||||
repo, err := collection.ByPrefixDistribution("ppa", "anaconda")
|
||||
c.Check(err, IsNil)
|
||||
c.Check(repo.Component, Equals, "")
|
||||
c.Check(repo.SourceUUID, Equals, "")
|
||||
c.Check(repo.Sources, DeepEquals, map[string]string{"contrib": s.localRepo.UUID})
|
||||
|
||||
c.Check(collection.LoadComplete(repo, s.factory), IsNil)
|
||||
c.Check(repo.sourceItems["contrib"].localRepo.UUID, Equals, s.localRepo.UUID)
|
||||
c.Check(repo.RefList("contrib").Len(), Equals, 0)
|
||||
}
|
||||
|
||||
func (s *PublishedRepoCollectionSuite) TestForEachAndLen(c *C) {
|
||||
@@ -437,7 +541,7 @@ func (s *PublishedRepoCollectionSuite) TestBySnapshot(c *C) {
|
||||
c.Check(s.collection.Add(s.repo1), IsNil)
|
||||
c.Check(s.collection.Add(s.repo2), IsNil)
|
||||
|
||||
c.Check(s.collection.BySnapshot(s.snap1), DeepEquals, []*PublishedRepo{s.repo1})
|
||||
c.Check(s.collection.BySnapshot(s.snap1), DeepEquals, []*PublishedRepo{s.repo1, s.repo2})
|
||||
c.Check(s.collection.BySnapshot(s.snap2), DeepEquals, []*PublishedRepo{s.repo2})
|
||||
}
|
||||
|
||||
@@ -472,10 +576,10 @@ func (s *PublishedRepoRemoveSuite) SetUpTest(c *C) {
|
||||
|
||||
s.snapshotCollection.Add(s.snap1)
|
||||
|
||||
s.repo1, _ = NewPublishedRepo("ppa", "anaconda", "main", []string{}, s.snap1, s.factory)
|
||||
s.repo2, _ = NewPublishedRepo("", "anaconda", "main", []string{}, s.snap1, s.factory)
|
||||
s.repo3, _ = NewPublishedRepo("ppa", "meduza", "main", []string{}, s.snap1, s.factory)
|
||||
s.repo4, _ = NewPublishedRepo("ppa", "osminog", "contrib", []string{}, s.snap1, s.factory)
|
||||
s.repo1, _ = NewPublishedRepo("ppa", "anaconda", []string{}, []string{"main"}, []interface{}{s.snap1}, s.factory)
|
||||
s.repo2, _ = NewPublishedRepo("", "anaconda", []string{}, []string{"main"}, []interface{}{s.snap1}, s.factory)
|
||||
s.repo3, _ = NewPublishedRepo("ppa", "meduza", []string{}, []string{"main"}, []interface{}{s.snap1}, s.factory)
|
||||
s.repo4, _ = NewPublishedRepo("ppa", "osminog", []string{}, []string{"contrib"}, []interface{}{s.snap1}, s.factory)
|
||||
|
||||
s.collection = s.factory.PublishedRepoCollection()
|
||||
s.collection.Add(s.repo1)
|
||||
@@ -499,7 +603,7 @@ func (s *PublishedRepoRemoveSuite) TearDownTest(c *C) {
|
||||
}
|
||||
|
||||
func (s *PublishedRepoRemoveSuite) TestRemoveFilesOnlyDist(c *C) {
|
||||
s.repo1.RemoveFiles(s.publishedStorage, false, false, nil)
|
||||
s.repo1.RemoveFiles(s.publishedStorage, false, []string{}, nil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/anaconda"), Not(PathExists))
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/meduza"), PathExists)
|
||||
@@ -511,7 +615,7 @@ func (s *PublishedRepoRemoveSuite) TestRemoveFilesOnlyDist(c *C) {
|
||||
}
|
||||
|
||||
func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithPool(c *C) {
|
||||
s.repo1.RemoveFiles(s.publishedStorage, false, true, nil)
|
||||
s.repo1.RemoveFiles(s.publishedStorage, false, []string{"main"}, nil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/anaconda"), Not(PathExists))
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/meduza"), PathExists)
|
||||
@@ -522,8 +626,20 @@ func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithPool(c *C) {
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "pool/main"), PathExists)
|
||||
}
|
||||
|
||||
func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithTwoPools(c *C) {
|
||||
s.repo1.RemoveFiles(s.publishedStorage, false, []string{"main", "contrib"}, nil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/anaconda"), Not(PathExists))
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/meduza"), PathExists)
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/osminog"), PathExists)
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/pool/main"), Not(PathExists))
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/pool/contrib"), Not(PathExists))
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "dists/anaconda"), PathExists)
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "pool/main"), PathExists)
|
||||
}
|
||||
|
||||
func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithPrefix(c *C) {
|
||||
s.repo1.RemoveFiles(s.publishedStorage, true, true, nil)
|
||||
s.repo1.RemoveFiles(s.publishedStorage, true, []string{"main"}, nil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/anaconda"), Not(PathExists))
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/meduza"), Not(PathExists))
|
||||
@@ -535,7 +651,7 @@ func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithPrefix(c *C) {
|
||||
}
|
||||
|
||||
func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithPrefixRoot(c *C) {
|
||||
s.repo2.RemoveFiles(s.publishedStorage, true, true, nil)
|
||||
s.repo2.RemoveFiles(s.publishedStorage, true, []string{"main"}, nil)
|
||||
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/anaconda"), PathExists)
|
||||
c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/meduza"), PathExists)
|
||||
|
||||
+17
-14
@@ -194,25 +194,28 @@ func (l *PackageRefList) Diff(r *PackageRefList, packageCollection *PackageColle
|
||||
}
|
||||
}
|
||||
|
||||
// is pl & pr the same package, but different version?
|
||||
if pl.Name == pr.Name && pl.Architecture == pr.Architecture {
|
||||
result = append(result, PackageDiff{Left: pl, Right: pr})
|
||||
il++
|
||||
ir++
|
||||
pl, pr = nil, nil
|
||||
} else {
|
||||
// otherwise pl or pr is missing on one of the sides
|
||||
if rel < 0 {
|
||||
// otherwise pl or pr is missing on one of the sides
|
||||
if rel < 0 {
|
||||
// compaction: +(,A) -(B,) --> !(A,B)
|
||||
if len(result) > 0 && result[len(result)-1].Left == nil && result[len(result)-1].Right.Name == pl.Name &&
|
||||
result[len(result)-1].Right.Architecture == pl.Architecture {
|
||||
result[len(result)-1] = PackageDiff{Left: pl, Right: result[len(result)-1].Right}
|
||||
} else {
|
||||
result = append(result, PackageDiff{Left: pl, Right: nil})
|
||||
il++
|
||||
pl = nil
|
||||
}
|
||||
il++
|
||||
pl = nil
|
||||
} else {
|
||||
// compaction: -(A,) +(,B) --> !(A,B)
|
||||
if len(result) > 0 && result[len(result)-1].Right == nil && result[len(result)-1].Left.Name == pr.Name &&
|
||||
result[len(result)-1].Left.Architecture == pr.Architecture {
|
||||
result[len(result)-1] = PackageDiff{Left: result[len(result)-1].Left, Right: pr}
|
||||
} else {
|
||||
result = append(result, PackageDiff{Left: nil, Right: pr})
|
||||
ir++
|
||||
pr = nil
|
||||
}
|
||||
ir++
|
||||
pr = nil
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ func (s *PackageRefListSuite) SetUpTest(c *C) {
|
||||
stanza["Package"] = "mars-invaders"
|
||||
s.p3 = NewPackageFromControlFile(stanza)
|
||||
stanza = packageStanza.Copy()
|
||||
stanza["Size"] = "42"
|
||||
stanza["Source"] = "unknown-planet"
|
||||
s.p4 = NewPackageFromControlFile(stanza)
|
||||
stanza = packageStanza.Copy()
|
||||
stanza["Package"] = "lonely-strangers"
|
||||
|
||||
+66
-4
@@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "APTLY" "1" "May 2014" "" ""
|
||||
.TH "APTLY" "1" "June 2014" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBaptly\fR \- Debian repository management tool
|
||||
@@ -662,6 +662,10 @@ Options:
|
||||
\-\fBlatest\fR=false
|
||||
use only the latest version of each package
|
||||
.
|
||||
.TP
|
||||
\-\fBno\-remove\fR=false
|
||||
don\(cqt remove duplicate arch/name packages
|
||||
.
|
||||
.SH "DELETE SNAPSHOT"
|
||||
\fBaptly\fR \fBsnapshot\fR \fBdrop\fR \fIname\fR
|
||||
.
|
||||
@@ -740,6 +744,19 @@ display list in machine\-readable format
|
||||
Command publishes current state of local repository ready to be consumed by apt tools\. Published repostiories appear under rootDir/public directory\. Valid GPG key is required for publishing\.
|
||||
.
|
||||
.P
|
||||
Multiple component repository could be published by specifying several components split by commas via \-component flag and multiple local repositories as the arguments:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
aptly publish repo \-component=main,contrib repo\-main repo\-contrib
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
It is not recommended to publish local repositories directly unless the repository is for testing purposes and changes happen frequently\. For production usage please take snapshot of repository and publish it using publish snapshot command\.
|
||||
.
|
||||
.P
|
||||
@@ -760,7 +777,7 @@ Options:
|
||||
.
|
||||
.TP
|
||||
\-\fBcomponent\fR=
|
||||
component name to publish
|
||||
component name to publish (for multi\-component publishing, separate components with commas)
|
||||
.
|
||||
.TP
|
||||
\-\fBdistribution\fR=
|
||||
@@ -797,6 +814,19 @@ don\(cqt sign Release files with GPG
|
||||
Command publishes snapshot as Debian repository ready to be consumed by apt tools\. Published repostiories appear under rootDir/public directory\. Valid GPG key is required for publishing\.
|
||||
.
|
||||
.P
|
||||
Multiple component repository could be published by specifying several components split by commas via \-component flag and multiple snapshots as the arguments:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
aptly publish snapshot \-component=main,contrib snap\-main snap\-contrib
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Example:
|
||||
.
|
||||
.IP "" 4
|
||||
@@ -814,7 +844,7 @@ Options:
|
||||
.
|
||||
.TP
|
||||
\-\fBcomponent\fR=
|
||||
component name to publish
|
||||
component name to publish (for multi\-component publishing, separate components with commas)
|
||||
.
|
||||
.TP
|
||||
\-\fBdistribution\fR=
|
||||
@@ -851,6 +881,19 @@ don\(cqt sign Release files with GPG
|
||||
Command switches in\-place published repository with new snapshot contents\. All publishing parameters are preserved (architecture list, distribution, component)\.
|
||||
.
|
||||
.P
|
||||
For multiple component repositories, flag \-component should be given with list of components to update\. Corresponding snapshots should be given in the same order, e\.g\.:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
aptly publish update \-component=main,contrib wheezy wh\-main wh\-contrib
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Example:
|
||||
.
|
||||
.IP "" 4
|
||||
@@ -867,6 +910,10 @@ $ aptly publish update wheezy ppa wheezy\-7\.5
|
||||
Options:
|
||||
.
|
||||
.TP
|
||||
\-\fBcomponent\fR=
|
||||
component names to update (for multi\-component publishing, separate components with commas)
|
||||
.
|
||||
.TP
|
||||
\-\fBgpg\-key\fR=
|
||||
GPG key ID to use when signing the release
|
||||
.
|
||||
@@ -889,6 +936,9 @@ don\(cqt sign Release files with GPG
|
||||
Command re\-publishes (updates) published local repository\. \fIdistribution\fR and \fIprefix\fR should be occupied with local repository published using command aptly publish repo\. Update happens in\-place with minimum possible downtime for published repository\.
|
||||
.
|
||||
.P
|
||||
For multiple component published repositories, all local repositories are updated\.
|
||||
.
|
||||
.P
|
||||
Example:
|
||||
.
|
||||
.IP "" 4
|
||||
@@ -979,7 +1029,19 @@ $ aptly graph
|
||||
If environment variable \fBHTTP_PROXY\fR is set \fBaptly\fR would use its value to proxy all HTTP requests\.
|
||||
.
|
||||
.SH "RETURN VALUES"
|
||||
\fBaptly\fR exists with 0 on success and with 1 on failure\.
|
||||
\fBaptly\fR exists with:
|
||||
.
|
||||
.TP
|
||||
0
|
||||
success
|
||||
.
|
||||
.TP
|
||||
1
|
||||
general failure
|
||||
.
|
||||
.TP
|
||||
2
|
||||
command parse failure
|
||||
.
|
||||
.SH "AUTHORS"
|
||||
Andrey Smirnov (me@smira\.ru)
|
||||
|
||||
+10
-1
@@ -139,7 +139,16 @@ to proxy all HTTP requests.
|
||||
|
||||
## RETURN VALUES
|
||||
|
||||
`aptly` exists with 0 on success and with 1 on failure.
|
||||
`aptly` exists with:
|
||||
|
||||
* 0:
|
||||
success
|
||||
|
||||
* 1:
|
||||
general failure
|
||||
|
||||
* 2:
|
||||
command parse failure
|
||||
|
||||
## AUTHORS
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
aptly version: 0.5.1
|
||||
aptly version: 0.6
|
||||
|
||||
@@ -21,3 +21,4 @@ Options:
|
||||
-dep-follow-recommends=false: when processing dependencies, follow Recommends
|
||||
-dep-follow-source=false: when processing dependencies, follow from binary to Source packages
|
||||
-dep-follow-suggests=false: when processing dependencies, follow Suggests
|
||||
ERROR: unable to parse command
|
||||
|
||||
@@ -13,3 +13,4 @@ Options:
|
||||
-ignore-signatures=false: disable verification of Release file signatures
|
||||
-keyring=: gpg keyring to use when verifying Release file (could be specified multiple times)
|
||||
-with-sources=false: download source packages in addition to binary packages
|
||||
ERROR: unable to parse command
|
||||
|
||||
@@ -18,3 +18,4 @@ Options:
|
||||
-dep-follow-recommends=false: when processing dependencies, follow Recommends
|
||||
-dep-follow-source=false: when processing dependencies, follow from binary to Source packages
|
||||
-dep-follow-suggests=false: when processing dependencies, follow Suggests
|
||||
ERROR: unable to parse command
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
flag provided but not defined: -fxz
|
||||
Usage: aptly mirror create <name> <archive url> <distribution> [<component1> ...]
|
||||
|
||||
aptly mirror create - create new mirror
|
||||
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-dep-follow-all-variants=false: when processing dependencies, follow a & b if depdency is 'a|b'
|
||||
-dep-follow-recommends=false: when processing dependencies, follow Recommends
|
||||
-dep-follow-source=false: when processing dependencies, follow from binary to Source packages
|
||||
-dep-follow-suggests=false: when processing dependencies, follow Suggests
|
||||
-ignore-signatures=false: disable verification of Release file signatures
|
||||
-keyring=: gpg keyring to use when verifying Release file (could be specified multiple times)
|
||||
-with-sources=false: download source packages in addition to binary packages
|
||||
ERROR: unable to parse flags
|
||||
@@ -10,6 +10,7 @@ class MainTest(BaseTest):
|
||||
"""
|
||||
main
|
||||
"""
|
||||
expectedCode = 2
|
||||
runCmd = "aptly"
|
||||
|
||||
outputMatchPrepare = lambda _, s: re.sub(r' -(cpuprofile|memprofile|memstats|meminterval)=.*\n', '', s, flags=re.MULTILINE)
|
||||
@@ -19,6 +20,7 @@ class MirrorTest(BaseTest):
|
||||
"""
|
||||
main
|
||||
"""
|
||||
expectedCode = 2
|
||||
runCmd = "aptly mirror"
|
||||
|
||||
|
||||
@@ -26,6 +28,7 @@ class MirrorCreateTest(BaseTest):
|
||||
"""
|
||||
main
|
||||
"""
|
||||
expectedCode = 2
|
||||
runCmd = "aptly mirror create"
|
||||
|
||||
|
||||
@@ -50,3 +53,11 @@ class MirrorCreateHelpTest(BaseTest):
|
||||
main
|
||||
"""
|
||||
runCmd = "aptly help mirror create"
|
||||
|
||||
|
||||
class WrongFlagTest(BaseTest):
|
||||
"""
|
||||
main
|
||||
"""
|
||||
expectedCode = 2
|
||||
runCmd = "aptly mirror create -fxz=sss"
|
||||
|
||||
@@ -8,6 +8,6 @@ Last update: never
|
||||
|
||||
Information from release file:
|
||||
Architectures: all
|
||||
Date: Thu, 01 May 2014 05:51:11 UTC
|
||||
Date: Fri, 30 May 2014 07:36:11 UTC
|
||||
Origin: jenkins-ci.org
|
||||
Suite: binary
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
|
||||
|
||||
Building download queue...
|
||||
Download queue: 28 items (11.04 MiB)
|
||||
Download queue: 30 items (11.70 MiB)
|
||||
Downloading & parsing package files...
|
||||
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/Release...
|
||||
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/varnish-3.0/binary-amd64/Packages.bz2...
|
||||
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/varnish-3.0/binary-i386/Packages.bz2...
|
||||
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.0~wheezy_amd64.deb...
|
||||
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.0~wheezy_i386.deb...
|
||||
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.1~wheezy_amd64.deb...
|
||||
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.1~wheezy_i386.deb...
|
||||
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.3-1~wheezy_amd64.deb...
|
||||
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.3-1~wheezy_i386.deb...
|
||||
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.4-1~wheezy_amd64.deb...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Snapshot `snap1` is published currently:
|
||||
* ./maverick (main) [amd64, i386] publishes [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick
|
||||
* ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||
ERROR: unable to drop: snapshot is published
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Snapshot `snap1` is published currently:
|
||||
* ./maverick (main) [amd64, i386] publishes [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick
|
||||
* ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||
ERROR: unable to drop: snapshot is published
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
ERROR: -no-remove and -latest can't be specified together
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
Snapshot snap4 successfully created.
|
||||
You can run 'aptly publish snapshot snap4' to publish snapshot as Debian repository.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -136,3 +136,51 @@ class MergeSnapshot8Test(BaseTest):
|
||||
]
|
||||
runCmd = "aptly snapshot diff snap4 snap5"
|
||||
expectedCode = 0
|
||||
|
||||
|
||||
class MergeSnapshot9Test(BaseTest):
|
||||
"""
|
||||
merge snapshots: -no-remove
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror wheezy-main",
|
||||
"aptly snapshot create snap2 from mirror wheezy-non-free",
|
||||
"aptly snapshot create snap3 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot merge -no-remove snap4 snap1 snap2 snap3"
|
||||
expectedCode = 0
|
||||
|
||||
def check(self):
|
||||
def remove_created_at(s):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap4", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class MergeSnapshot10Test(BaseTest):
|
||||
"""
|
||||
merge snapshots: compare -no-remove and regular
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror wheezy-main",
|
||||
"aptly snapshot create snap2 from mirror wheezy-non-free",
|
||||
"aptly snapshot create snap3 from mirror wheezy-backports",
|
||||
"aptly snapshot merge snap4 snap3 snap2 snap1",
|
||||
"aptly snapshot merge -no-remove snap5 snap3 snap2 snap1",
|
||||
]
|
||||
runCmd = "aptly snapshot diff snap4 snap5"
|
||||
expectedCode = 0
|
||||
|
||||
|
||||
class MergeSnapshot11Test(BaseTest):
|
||||
"""
|
||||
merge snapshots: -no-remove & -latest conflict
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 empty"
|
||||
]
|
||||
runCmd = "aptly snapshot merge -no-remove -latest snap2 snap1"
|
||||
expectedCode = 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Removing ${HOME}/.aptly/public/dists/sq1...
|
||||
Cleaning up prefix "." component "main"...
|
||||
Cleaning up prefix "." components main...
|
||||
|
||||
Published repository has been removed successfully.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Removing ${HOME}/.aptly/public/dists/sq2...
|
||||
Cleaning up prefix "." component "main"...
|
||||
Cleaning up prefix "." components main...
|
||||
|
||||
Published repository has been removed successfully.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Published repositories:
|
||||
* ./maverick (main) [amd64, i386] publishes [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick
|
||||
* ppa/smira/wheezy (contrib) [amd64] publishes [snap2]: Merged from sources: 'snap1'
|
||||
* ppa/tr1/maverick (main, origin: origin1) [amd64, i386] publishes [snap2]: Merged from sources: 'snap1'
|
||||
* ppa/tr2/maverick (main, label: label1) [amd64, i386] publishes [snap2]: Merged from sources: 'snap1'
|
||||
* ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||
* ppa/maverick [amd64, i386] publishes {contrib: [snap2]: Merged from sources: 'snap1'}, {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||
* ppa/smira/wheezy [amd64] publishes {contrib: [snap2]: Merged from sources: 'snap1'}
|
||||
* ppa/tr1/maverick (origin: origin1) [amd64, i386] publishes {main: [snap2]: Merged from sources: 'snap1'}
|
||||
* ppa/tr2/maverick (label: label1) [amd64, i386] publishes {main: [snap2]: Merged from sources: 'snap1'}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
|
||||
Loading packages...
|
||||
ERROR: unable to publish: source is empty
|
||||
ERROR: unable to publish: unable to figure out list of architectures, please supply explicit list
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
|
||||
Local repo local-repo has been successfully published.
|
||||
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
|
||||
Now you can add following line to apt sources:
|
||||
deb http://your-server/ maverick main
|
||||
deb-src http://your-server/ maverick main
|
||||
Don't forget to add your GPG key to apt with apt-key.
|
||||
|
||||
You can also use `aptly serve` to publish your repositories over HTTP quickly.
|
||||
@@ -0,0 +1,13 @@
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
|
||||
Local repos repo1, repo2 have been successfully published.
|
||||
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
|
||||
Now you can add following line to apt sources:
|
||||
deb http://your-server/ maverick contrib main
|
||||
deb-src http://your-server/ maverick contrib main
|
||||
Don't forget to add your GPG key to apt with apt-key.
|
||||
|
||||
You can also use `aptly serve` to publish your repositories over HTTP quickly.
|
||||
@@ -0,0 +1,9 @@
|
||||
Origin: . maverick
|
||||
Label: . maverick
|
||||
Codename: maverick
|
||||
Architectures: i386
|
||||
Components: contrib main
|
||||
Description: Generated by aptly
|
||||
MD5Sum:
|
||||
SHA1:
|
||||
SHA256:
|
||||
@@ -0,0 +1,13 @@
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/squeeze/Release' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/squeeze/Release' with gpg, please enter your passphrase when prompted:
|
||||
|
||||
Local repos repo1, repo2 have been successfully published.
|
||||
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
|
||||
Now you can add following line to apt sources:
|
||||
deb http://your-server/ squeeze contrib main
|
||||
deb-src http://your-server/ squeeze contrib main
|
||||
Don't forget to add your GPG key to apt with apt-key.
|
||||
|
||||
You can also use `aptly serve` to publish your repositories over HTTP quickly.
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to publish: duplicate component name: contrib
|
||||
@@ -0,0 +1,2 @@
|
||||
Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
|
||||
ERROR: unable to publish: duplicate component name: b
|
||||
@@ -0,0 +1,2 @@
|
||||
Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
|
||||
ERROR: unable to publish: unable to guess distribution name, please specify explicitly
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to publish: local repo with name repo2 not found
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to parse command
|
||||
@@ -1 +1 @@
|
||||
ERROR: prefix/distribution already used by another published repo: ./maverick (main) [i386, source] publishes [local-repo]
|
||||
ERROR: prefix/distribution already used by another published repo: ./maverick [i386, source] publishes {main: [local-repo]}
|
||||
|
||||
@@ -1 +1 @@
|
||||
ERROR: prefix/distribution already used by another published repo: ppa/maverick (main) [i386, source] publishes [local-repo]
|
||||
ERROR: prefix/distribution already used by another published repo: ppa/maverick [i386, source] publishes {main: [local-repo]}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
|
||||
Loading packages...
|
||||
ERROR: unable to publish: source is empty
|
||||
ERROR: unable to publish: unable to figure out list of architectures, please supply explicit list
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Origin: . maverick
|
||||
Label: . maverick
|
||||
Architecture: amd64
|
||||
Archive: maverick
|
||||
Component: main
|
||||
@@ -0,0 +1,5 @@
|
||||
Origin: . maverick
|
||||
Label: . maverick
|
||||
Architecture: i386
|
||||
Archive: maverick
|
||||
Component: main
|
||||
@@ -0,0 +1,13 @@
|
||||
Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
|
||||
Snapshot snap25 has been successfully published.
|
||||
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
|
||||
Now you can add following line to apt sources:
|
||||
deb http://your-server/ maverick main
|
||||
Don't forget to add your GPG key to apt with apt-key.
|
||||
|
||||
You can also use `aptly serve` to publish your repositories over HTTP quickly.
|
||||
@@ -0,0 +1,13 @@
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
|
||||
Snapshots snap26.1, snap26.2 have been successfully published.
|
||||
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
|
||||
Now you can add following line to apt sources:
|
||||
deb http://your-server/ maverick contrib main
|
||||
deb-src http://your-server/ maverick contrib main
|
||||
Don't forget to add your GPG key to apt with apt-key.
|
||||
|
||||
You can also use `aptly serve` to publish your repositories over HTTP quickly.
|
||||
@@ -0,0 +1,9 @@
|
||||
Origin: . maverick
|
||||
Label: . maverick
|
||||
Codename: maverick
|
||||
Architectures: amd64 i386
|
||||
Components: contrib main
|
||||
Description: Generated by aptly
|
||||
MD5Sum:
|
||||
SHA1:
|
||||
SHA256:
|
||||
@@ -0,0 +1,13 @@
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
|
||||
|
||||
Snapshots snap27.1, snap27.2 have been successfully published.
|
||||
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
|
||||
Now you can add following line to apt sources:
|
||||
deb http://your-server/ maverick contrib main
|
||||
deb-src http://your-server/ maverick contrib main
|
||||
Don't forget to add your GPG key to apt with apt-key.
|
||||
|
||||
You can also use `aptly serve` to publish your repositories over HTTP quickly.
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to publish: duplicate component name: main
|
||||
@@ -0,0 +1,2 @@
|
||||
Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
|
||||
ERROR: unable to publish: duplicate component name: b
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to publish: unable to guess distribution name, please specify explicitly
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to publish: snapshot with name snap31.2 not found
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to parse command
|
||||
@@ -1 +1 @@
|
||||
ERROR: prefix/distribution already used by another published repo: ./maverick (main) [amd64, i386] publishes [snap7]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick
|
||||
ERROR: prefix/distribution already used by another published repo: ./maverick [amd64, i386] publishes {main: [snap7]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||
|
||||
@@ -1 +1 @@
|
||||
ERROR: prefix/distribution already used by another published repo: ppa/maverick (main) [amd64, i386] publishes [snap8]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick
|
||||
ERROR: prefix/distribution already used by another published repo: ppa/maverick [amd64, i386] publishes {main: [snap8]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||
|
||||
@@ -2,6 +2,6 @@ Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Cleaning up prefix "." component "main"...
|
||||
Cleaning up prefix "." components main...
|
||||
|
||||
Publish for snapshot ./maverick (main) [amd64, i386] publishes [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11' has been successfully switched to new snapshot.
|
||||
Publish for snapshot ./maverick [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new snapshot.
|
||||
|
||||
@@ -2,6 +2,6 @@ Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/ppa/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/ppa/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Cleaning up prefix "ppa" component "main"...
|
||||
Cleaning up prefix "ppa" components main...
|
||||
|
||||
Publish for snapshot ppa/maverick (main) [amd64, i386] publishes [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick has been successfully switched to new snapshot.
|
||||
Publish for snapshot ppa/maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been successfully switched to new snapshot.
|
||||
|
||||
@@ -2,6 +2,6 @@ Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Cleaning up prefix "." component "main"...
|
||||
Cleaning up prefix "." components main...
|
||||
|
||||
Publish for snapshot ./maverick (main) [amd64, i386] publishes [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11' has been successfully switched to new snapshot.
|
||||
Publish for snapshot ./maverick [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new snapshot.
|
||||
|
||||
@@ -2,6 +2,6 @@ Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/ppa/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/ppa/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Cleaning up prefix "ppa" component "main"...
|
||||
Cleaning up prefix "ppa" components main...
|
||||
|
||||
Publish for snapshot ppa/maverick (main) [i386] publishes [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick has been successfully switched to new snapshot.
|
||||
Publish for snapshot ppa/maverick [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been successfully switched to new snapshot.
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
|
||||
|
||||
|
||||
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
C-like language. Can perform smoothing, spline-fitting, or nonlinear fits,
|
||||
C-like language. Can perform smoothing, spline-fitting, or nonlinear fits,
|
||||
C-like language. Can perform smoothing, spline-fitting, or nonlinear fits,
|
||||
C-like language. Can perform smoothing, spline-fitting, or nonlinear fits,
|
||||
Data files and self-defined functions can be manipulated by the internal
|
||||
Data files and self-defined functions can be manipulated by the internal
|
||||
Data files and self-defined functions can be manipulated by the internal
|
||||
Data files and self-defined functions can be manipulated by the internal
|
||||
Gnuplot is a portable command-line driven interactive data and function
|
||||
Gnuplot is a portable command-line driven interactive data and function
|
||||
Gnuplot is a portable command-line driven interactive data and function
|
||||
Gnuplot is a portable command-line driven interactive data and function
|
||||
This package contains the additional documentation.
|
||||
This package contains the terminal driver that enables gnuplot to plot
|
||||
This package is for transition and to install a full-featured gnuplot
|
||||
This package is for working without an X server.
|
||||
and can work with complex numbers.
|
||||
and can work with complex numbers.
|
||||
and can work with complex numbers.
|
||||
and can work with complex numbers.
|
||||
for many printers, (La)TeX, (x)fig, Postscript, and so on. The X11-output
|
||||
for many printers, (La)TeX, (x)fig, Postscript, and so on. The X11-output
|
||||
for many printers, (La)TeX, (x)fig, Postscript, and so on. The X11-output
|
||||
for many printers, (La)TeX, (x)fig, Postscript, and so on. The X11-output
|
||||
gnuplot.
|
||||
images interactively under X11. Most users will want this, it is however
|
||||
is packaged in gnuplot-x11.
|
||||
is packaged in gnuplot-x11.
|
||||
is packaged in gnuplot-x11.
|
||||
is packaged in gnuplot-x11.
|
||||
packaged separately so that low-end systems don't need X installed to use
|
||||
plotting utility that supports lots of output formats, including drivers
|
||||
plotting utility that supports lots of output formats, including drivers
|
||||
plotting utility that supports lots of output formats, including drivers
|
||||
plotting utility that supports lots of output formats, including drivers
|
||||
supporting the X11-output.
|
||||
Architecture: all
|
||||
Architecture: all
|
||||
Architecture: i386
|
||||
Architecture: i386
|
||||
Depends: dpkg (>= 1.15.4) | install-info
|
||||
Depends: gnuplot-nox (>= 4.6.1-1~maverick2), gnuplot-x11 (>= 4.6.1-1~maverick2)
|
||||
Depends: gnuplot-nox (>= 4.6.1-1~maverick2), libc6 (>= 2.11), libcairo2 (>= 1.6.0), libedit2 (>= 2.5.cvs.20010821-1), libgcc1 (>= 1:4.1.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libglib2.0-0 (>= 2.12.0), liblua5.1-0, libpango1.0-0 (>= 1.14.0), libstdc++6 (>= 4.1.1), libwxbase2.8-0 (>= 2.8.11.0), libwxgtk2.8-0 (>= 2.8.11.0), libx11-6
|
||||
Depends: libc6 (>= 2.11), libcairo2 (>= 1.6.0), libedit2 (>= 2.5.cvs.20010821-1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libglib2.0-0 (>= 2.12.0), liblua5.1-0, libpango1.0-0 (>= 1.14.0)
|
||||
Description: Command-line driven interactive plotting program
|
||||
Description: Command-line driven interactive plotting program
|
||||
Description: Command-line driven interactive plotting program
|
||||
Description: Command-line driven interactive plotting program
|
||||
Filename: pool/a/g/gnuplot/gnuplot-doc_4.6.1-1~maverick2_all.deb
|
||||
Filename: pool/a/g/gnuplot/gnuplot-nox_4.6.1-1~maverick2_i386.deb
|
||||
Filename: pool/a/g/gnuplot/gnuplot-x11_4.6.1-1~maverick2_i386.deb
|
||||
Filename: pool/a/g/gnuplot/gnuplot_4.6.1-1~maverick2_all.deb
|
||||
Installed-Size: 1604
|
||||
Installed-Size: 20
|
||||
Installed-Size: 2536
|
||||
Installed-Size: 5572
|
||||
MD5sum: 25a5028811171f2f1fa157a2f6953e82
|
||||
MD5sum: 4912a4464d5588f685c4aa6cfc6be46c
|
||||
MD5sum: a7ef16004b62fd78acb77edb058ea1c1
|
||||
MD5sum: fcad938905d0ace50a6ce0c73b2c6583
|
||||
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
|
||||
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
|
||||
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
|
||||
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
|
||||
Package: gnuplot
|
||||
Package: gnuplot-doc
|
||||
Package: gnuplot-nox
|
||||
Package: gnuplot-x11
|
||||
Priority: optional
|
||||
Priority: optional
|
||||
Priority: optional
|
||||
Priority: optional
|
||||
Recommends: groff, ttf-liberation
|
||||
Replaces: gnuplot (<< 4.0.0)
|
||||
Replaces: gnuplot (<< 4.0.0)
|
||||
SHA1: 02f9a93097a8f798a054e26154dbe5789088c069
|
||||
SHA1: 4a50deb413e05f77b31687405465b1229b3be328
|
||||
SHA1: 629c3e62f787b0af47b184beb0460dd261c9ca4d
|
||||
SHA1: 837dd002143054ca01d3b01cae410cc4b4fe10c4
|
||||
Section: doc
|
||||
Section: math
|
||||
Section: math
|
||||
Section: math
|
||||
Size: 1046
|
||||
Size: 1046496
|
||||
Size: 2675242
|
||||
Size: 724388
|
||||
Source:
|
||||
Source: gnuplot
|
||||
Source: gnuplot
|
||||
Source: gnuplot
|
||||
Suggests: gnuplot-doc (>= 4.6.1-1~maverick2)
|
||||
Suggests: gnuplot-x11 (>= 4.6.1-1~maverick2), gnuplot-doc (>= 4.6.1-1~maverick2)
|
||||
Version: 4.6.1-1~maverick2
|
||||
Version: 4.6.1-1~maverick2
|
||||
Version: 4.6.1-1~maverick2
|
||||
Version: 4.6.1-1~maverick2
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
.
|
||||
.
|
||||
C-like language. Can perform smoothing, spline-fitting, or nonlinear fits,
|
||||
Data files and self-defined functions can be manipulated by the internal
|
||||
Gnuplot is a portable command-line driven interactive data and function
|
||||
This package contains the terminal driver that enables gnuplot to plot
|
||||
and can work with complex numbers.
|
||||
for many printers, (La)TeX, (x)fig, Postscript, and so on. The X11-output
|
||||
gnuplot.
|
||||
images interactively under X11. Most users will want this, it is however
|
||||
is packaged in gnuplot-x11.
|
||||
packaged separately so that low-end systems don't need X installed to use
|
||||
plotting utility that supports lots of output formats, including drivers
|
||||
Architecture: i386
|
||||
Depends: gnuplot-nox (>= 4.6.1-1~maverick2), libc6 (>= 2.11), libcairo2 (>= 1.6.0), libedit2 (>= 2.5.cvs.20010821-1), libgcc1 (>= 1:4.1.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libglib2.0-0 (>= 2.12.0), liblua5.1-0, libpango1.0-0 (>= 1.14.0), libstdc++6 (>= 4.1.1), libwxbase2.8-0 (>= 2.8.11.0), libwxgtk2.8-0 (>= 2.8.11.0), libx11-6
|
||||
Description: Command-line driven interactive plotting program
|
||||
Filename: pool/b/g/gnuplot/gnuplot-x11_4.6.1-1~maverick2_i386.deb
|
||||
Installed-Size: 1604
|
||||
MD5sum: fcad938905d0ace50a6ce0c73b2c6583
|
||||
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
|
||||
Package: gnuplot-x11
|
||||
Priority: optional
|
||||
Replaces: gnuplot (<< 4.0.0)
|
||||
SHA1: 02f9a93097a8f798a054e26154dbe5789088c069
|
||||
Section: math
|
||||
Size: 724388
|
||||
Source: gnuplot
|
||||
Version: 4.6.1-1~maverick2
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
|
||||
(name, value) pairs from the user, via conventional methods such as
|
||||
.
|
||||
.
|
||||
Boost version (currently 1.49).
|
||||
Library to let program developers obtain program options, that is
|
||||
This package forms part of the Boost C++ Libraries collection.
|
||||
This package is a dependency package, which depends on Debian's default
|
||||
command line and config file.
|
||||
Architecture: i386
|
||||
Depends: libboost-program-options1.49-dev
|
||||
Description: program options library for C++ (default version)
|
||||
Filename: pool/c/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb
|
||||
Homepage: http://www.boost.org/libs/program_options/
|
||||
Installed-Size: 26
|
||||
MD5sum: 0035d7822b2f8f0ec4013f270fd650c2
|
||||
Maintainer: Debian Boost Team <pkg-boost-devel@lists.alioth.debian.org>
|
||||
Package: libboost-program-options-dev
|
||||
Priority: optional
|
||||
SHA1: 36895eb64cfe89c33c0a2f7ac2f0c6e0e889e04b
|
||||
SHA256: c76b4bd12fd92e4dfe1b55b18a67a669d92f62985d6a96c8a21d96120982cf12
|
||||
Section: libdevel
|
||||
Size: 2738
|
||||
Source: boost-defaults
|
||||
Version: 1.49.0.1
|
||||
@@ -0,0 +1,7 @@
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Signing file '${HOME}/.aptly/public/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release.tmp' with gpg, please enter your passphrase when prompted:
|
||||
Cleaning up prefix "." components b, c...
|
||||
|
||||
Publish for snapshot ./maverick [amd64, i386, source] publishes {a: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {b: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'}, {c: [local2]: Snapshot from local repo [local-repo]} has been successfully switched to new snapshot.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user