mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +00:00
Added support for NotAutomatic, ButAutomaticUpgrades and Origin fields
This commit is contained in:
+18
-8
@@ -95,13 +95,15 @@ func apiPublishRepoOrSnapshot(c *gin.Context) {
|
|||||||
Component string
|
Component string
|
||||||
Name string `binding:"required"`
|
Name string `binding:"required"`
|
||||||
} `binding:"required"`
|
} `binding:"required"`
|
||||||
Distribution string
|
Distribution string
|
||||||
Label string
|
Label string
|
||||||
Origin string
|
Origin string
|
||||||
ForceOverwrite bool
|
NotAutomatic string
|
||||||
SkipContents *bool
|
ButAutomaticUpgrades string
|
||||||
Architectures []string
|
ForceOverwrite bool
|
||||||
Signing SigningOptions
|
SkipContents *bool
|
||||||
|
Architectures []string
|
||||||
|
Signing SigningOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
if !c.Bind(&b) {
|
if !c.Bind(&b) {
|
||||||
@@ -183,7 +185,15 @@ func apiPublishRepoOrSnapshot(c *gin.Context) {
|
|||||||
c.Fail(500, fmt.Errorf("unable to publish: %s", err))
|
c.Fail(500, fmt.Errorf("unable to publish: %s", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
published.Origin = b.Origin
|
if b.Origin != "" {
|
||||||
|
published.Origin = b.Origin
|
||||||
|
}
|
||||||
|
if b.NotAutomatic != "" {
|
||||||
|
published.NotAutomatic = b.NotAutomatic
|
||||||
|
}
|
||||||
|
if b.ButAutomaticUpgrades != "" {
|
||||||
|
published.ButAutomaticUpgrades = b.ButAutomaticUpgrades
|
||||||
|
}
|
||||||
published.Label = b.Label
|
published.Label = b.Label
|
||||||
|
|
||||||
published.SkipContents = context.Config().SkipContentsPublishing
|
published.SkipContents = context.Config().SkipContentsPublishing
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ _aptly()
|
|||||||
"snapshot"|"repo")
|
"snapshot"|"repo")
|
||||||
if [[ $numargs -eq 0 ]]; then
|
if [[ $numargs -eq 0 ]]; then
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=($(compgen -W "-batch -force-overwrite -distribution= -component= -gpg-key= -keyring= -label= -origin= -passphrase= -passphrase-file= -secret-keyring= -skip-contents -skip-signing" -- ${cur}))
|
COMPREPLY=($(compgen -W "-batch -force-overwrite -distribution= -component= -gpg-key= -keyring= -label= -origin= -notautomatic= -butautomaticupgrades= -passphrase= -passphrase-file= -secret-keyring= -skip-contents -skip-signing" -- ${cur}))
|
||||||
else
|
else
|
||||||
if [[ "$subcmd" == "snapshot" ]]; then
|
if [[ "$subcmd" == "snapshot" ]]; then
|
||||||
COMPREPLY=($(compgen -W "$(__aptly_snapshot_list)" -- ${cur}))
|
COMPREPLY=($(compgen -W "$(__aptly_snapshot_list)" -- ${cur}))
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ Example:
|
|||||||
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
||||||
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
|
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
|
||||||
cmd.Flag.String("origin", "", "origin name to publish")
|
cmd.Flag.String("origin", "", "origin name to publish")
|
||||||
|
cmd.Flag.String("notautomatic", "", "set value for NotAutomatic field")
|
||||||
|
cmd.Flag.String("butautomaticupgrades", "", "set value for ButAutomaticUpgrades field")
|
||||||
cmd.Flag.String("label", "", "label to publish")
|
cmd.Flag.String("label", "", "label to publish")
|
||||||
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
||||||
|
|
||||||
|
|||||||
+15
-2
@@ -112,12 +112,23 @@ func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
distribution := context.Flags().Lookup("distribution").Value.String()
|
distribution := context.Flags().Lookup("distribution").Value.String()
|
||||||
|
origin := context.Flags().Lookup("origin").Value.String()
|
||||||
|
notAutomatic := context.Flags().Lookup("notautomatic").Value.String()
|
||||||
|
butAutomaticUpgrades := context.Flags().Lookup("butautomaticupgrades").Value.String()
|
||||||
|
|
||||||
published, err := deb.NewPublishedRepo(storage, prefix, distribution, context.ArchitecturesList(), components, sources, context.CollectionFactory())
|
published, err := deb.NewPublishedRepo(storage, prefix, distribution, context.ArchitecturesList(), components, sources, context.CollectionFactory())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to publish: %s", err)
|
return fmt.Errorf("unable to publish: %s", err)
|
||||||
}
|
}
|
||||||
published.Origin = context.Flags().Lookup("origin").Value.String()
|
if origin != "" {
|
||||||
|
published.Origin = origin
|
||||||
|
}
|
||||||
|
if notAutomatic != "" {
|
||||||
|
published.NotAutomatic = notAutomatic
|
||||||
|
}
|
||||||
|
if butAutomaticUpgrades != "" {
|
||||||
|
published.ButAutomaticUpgrades = butAutomaticUpgrades
|
||||||
|
}
|
||||||
published.Label = context.Flags().Lookup("label").Value.String()
|
published.Label = context.Flags().Lookup("label").Value.String()
|
||||||
|
|
||||||
published.SkipContents = context.Config().SkipContentsPublishing
|
published.SkipContents = context.Config().SkipContentsPublishing
|
||||||
@@ -211,7 +222,9 @@ Example:
|
|||||||
cmd.Flag.Bool("batch", false, "run GPG with detached tty")
|
cmd.Flag.Bool("batch", false, "run GPG with detached tty")
|
||||||
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
||||||
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
|
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
|
||||||
cmd.Flag.String("origin", "", "origin name to publish")
|
cmd.Flag.String("origin", "", "overwrite origin name to publish")
|
||||||
|
cmd.Flag.String("notautomatic", "", "overwrite value for NotAutomatic field")
|
||||||
|
cmd.Flag.String("butautomaticupgrades", "", "overwrite value for ButAutomaticUpgrades field")
|
||||||
cmd.Flag.String("label", "", "label to publish")
|
cmd.Flag.String("label", "", "label to publish")
|
||||||
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ var (
|
|||||||
"Version",
|
"Version",
|
||||||
"Codename",
|
"Codename",
|
||||||
"Date",
|
"Date",
|
||||||
|
"NotAutomatic",
|
||||||
|
"ButAutomaticUpgrades",
|
||||||
"Architectures",
|
"Architectures",
|
||||||
"Architecture",
|
"Architecture",
|
||||||
"Components",
|
"Components",
|
||||||
|
|||||||
+59
-19
@@ -37,11 +37,13 @@ type PublishedRepo struct {
|
|||||||
// Internal unique ID
|
// Internal unique ID
|
||||||
UUID string
|
UUID string
|
||||||
// Storage & Prefix & distribution should be unique across all published repositories
|
// Storage & Prefix & distribution should be unique across all published repositories
|
||||||
Storage string
|
Storage string
|
||||||
Prefix string
|
Prefix string
|
||||||
Distribution string
|
Distribution string
|
||||||
Origin string
|
Origin string
|
||||||
Label string
|
NotAutomatic string
|
||||||
|
ButAutomaticUpgrades string
|
||||||
|
Label string
|
||||||
// Architectures is a list of all architectures published
|
// Architectures is a list of all architectures published
|
||||||
Architectures []string
|
Architectures []string
|
||||||
// SourceKind is "local"/"repo"
|
// SourceKind is "local"/"repo"
|
||||||
@@ -167,6 +169,7 @@ func NewPublishedRepo(storage, prefix, distribution string, architectures []stri
|
|||||||
component string
|
component string
|
||||||
snapshot *Snapshot
|
snapshot *Snapshot
|
||||||
localRepo *LocalRepo
|
localRepo *LocalRepo
|
||||||
|
fields = make(map[string][]string)
|
||||||
)
|
)
|
||||||
|
|
||||||
// get first source
|
// get first source
|
||||||
@@ -214,6 +217,16 @@ func NewPublishedRepo(storage, prefix, distribution string, architectures []stri
|
|||||||
snapshot = source.(*Snapshot)
|
snapshot = source.(*Snapshot)
|
||||||
result.Sources[component] = snapshot.UUID
|
result.Sources[component] = snapshot.UUID
|
||||||
result.sourceItems[component] = repoSourceItem{snapshot: snapshot}
|
result.sourceItems[component] = repoSourceItem{snapshot: snapshot}
|
||||||
|
|
||||||
|
if !utils.StrSliceHasItem(fields["Origin"], snapshot.Origin) {
|
||||||
|
fields["Origin"] = append(fields["Origin"], snapshot.Origin)
|
||||||
|
}
|
||||||
|
if !utils.StrSliceHasItem(fields["NotAutomatic"], snapshot.NotAutomatic) {
|
||||||
|
fields["NotAutomatic"] = append(fields["NotAutomatic"], snapshot.NotAutomatic)
|
||||||
|
}
|
||||||
|
if !utils.StrSliceHasItem(fields["ButAutomaticUpgrades"], snapshot.ButAutomaticUpgrades) {
|
||||||
|
fields["ButAutomaticUpgrades"] = append(fields["ButAutomaticUpgrades"], snapshot.ButAutomaticUpgrades)
|
||||||
|
}
|
||||||
} else if result.SourceKind == SourceLocalRepo {
|
} else if result.SourceKind == SourceLocalRepo {
|
||||||
localRepo = source.(*LocalRepo)
|
localRepo = source.(*LocalRepo)
|
||||||
result.Sources[component] = localRepo.UUID
|
result.Sources[component] = localRepo.UUID
|
||||||
@@ -250,6 +263,17 @@ func NewPublishedRepo(storage, prefix, distribution string, architectures []stri
|
|||||||
|
|
||||||
result.Distribution = distribution
|
result.Distribution = distribution
|
||||||
|
|
||||||
|
// only fields which are unique by all given snapshots are set on published
|
||||||
|
if len(fields["Origin"]) == 1 {
|
||||||
|
result.Origin = fields["Origin"][0]
|
||||||
|
}
|
||||||
|
if len(fields["NotAutomatic"]) == 1 {
|
||||||
|
result.NotAutomatic = fields["NotAutomatic"][0]
|
||||||
|
}
|
||||||
|
if len(fields["ButAutomaticUpgrades"]) == 1 {
|
||||||
|
result.ButAutomaticUpgrades = fields["ButAutomaticUpgrades"][0]
|
||||||
|
}
|
||||||
|
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,15 +300,17 @@ func (p *PublishedRepo) MarshalJSON() ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return json.Marshal(map[string]interface{}{
|
return json.Marshal(map[string]interface{}{
|
||||||
"Architectures": p.Architectures,
|
"Architectures": p.Architectures,
|
||||||
"Distribution": p.Distribution,
|
"Distribution": p.Distribution,
|
||||||
"Label": p.Label,
|
"Label": p.Label,
|
||||||
"Origin": p.Origin,
|
"Origin": p.Origin,
|
||||||
"Prefix": p.Prefix,
|
"NotAutomatic": p.NotAutomatic,
|
||||||
"SourceKind": p.SourceKind,
|
"ButAutomaticUpgrades": p.ButAutomaticUpgrades,
|
||||||
"Sources": sources,
|
"Prefix": p.Prefix,
|
||||||
"Storage": p.Storage,
|
"SourceKind": p.SourceKind,
|
||||||
"SkipContents": p.SkipContents,
|
"Sources": sources,
|
||||||
|
"Storage": p.Storage,
|
||||||
|
"SkipContents": p.SkipContents,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,19 +333,27 @@ func (p *PublishedRepo) String() string {
|
|||||||
sources = append(sources, fmt.Sprintf("{%s: %s}", component, source))
|
sources = append(sources, fmt.Sprintf("{%s: %s}", component, source))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var extras []string
|
||||||
var extra string
|
var extra string
|
||||||
|
|
||||||
if p.Origin != "" {
|
if p.Origin != "" {
|
||||||
extra += fmt.Sprintf("origin: %s", p.Origin)
|
extras = append(extras, fmt.Sprintf("origin: %s", p.Origin))
|
||||||
|
}
|
||||||
|
|
||||||
|
if p.NotAutomatic != "" {
|
||||||
|
extras = append(extras, fmt.Sprintf("notautomatic: %s", p.NotAutomatic))
|
||||||
|
}
|
||||||
|
|
||||||
|
if p.ButAutomaticUpgrades != "" {
|
||||||
|
extras = append(extras, fmt.Sprintf("butautomaticupgrades: %s", p.ButAutomaticUpgrades))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Label != "" {
|
if p.Label != "" {
|
||||||
if extra != "" {
|
extras = append(extras, fmt.Sprintf("label: %s", p.Label))
|
||||||
extra += ", "
|
|
||||||
}
|
|
||||||
extra += fmt.Sprintf("label: %s", p.Label)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extra = strings.Join(extras, ", ")
|
||||||
|
|
||||||
if extra != "" {
|
if extra != "" {
|
||||||
extra = " (" + extra + ")"
|
extra = " (" + extra + ")"
|
||||||
}
|
}
|
||||||
@@ -674,6 +708,12 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
|
|||||||
|
|
||||||
release := make(Stanza)
|
release := make(Stanza)
|
||||||
release["Origin"] = p.GetOrigin()
|
release["Origin"] = p.GetOrigin()
|
||||||
|
if p.NotAutomatic != "" {
|
||||||
|
release["NotAutomatic"] = p.NotAutomatic
|
||||||
|
}
|
||||||
|
if p.ButAutomaticUpgrades != "" {
|
||||||
|
release["ButAutomaticUpgrades"] = p.ButAutomaticUpgrades
|
||||||
|
}
|
||||||
release["Label"] = p.GetLabel()
|
release["Label"] = p.GetLabel()
|
||||||
release["Suite"] = p.Distribution
|
release["Suite"] = p.Distribution
|
||||||
release["Codename"] = p.Distribution
|
release["Codename"] = p.Distribution
|
||||||
|
|||||||
+14
-7
@@ -31,6 +31,10 @@ type Snapshot struct {
|
|||||||
// Description of how snapshot was created
|
// Description of how snapshot was created
|
||||||
Description string
|
Description string
|
||||||
|
|
||||||
|
Origin string
|
||||||
|
NotAutomatic string
|
||||||
|
ButAutomaticUpgrades string
|
||||||
|
|
||||||
packageRefs *PackageRefList
|
packageRefs *PackageRefList
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,13 +45,16 @@ func NewSnapshotFromRepository(name string, repo *RemoteRepo) (*Snapshot, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &Snapshot{
|
return &Snapshot{
|
||||||
UUID: uuid.New(),
|
UUID: uuid.New(),
|
||||||
Name: name,
|
Name: name,
|
||||||
CreatedAt: time.Now(),
|
CreatedAt: time.Now(),
|
||||||
SourceKind: SourceRemoteRepo,
|
SourceKind: SourceRemoteRepo,
|
||||||
SourceIDs: []string{repo.UUID},
|
SourceIDs: []string{repo.UUID},
|
||||||
Description: fmt.Sprintf("Snapshot from mirror %s", repo),
|
Description: fmt.Sprintf("Snapshot from mirror %s", repo),
|
||||||
packageRefs: repo.packageRefs,
|
Origin: repo.Meta["Origin"],
|
||||||
|
NotAutomatic: repo.Meta["NotAutomatic"],
|
||||||
|
ButAutomaticUpgrades: repo.Meta["ButAutomaticUpgrades"],
|
||||||
|
packageRefs: repo.packageRefs,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-1
@@ -1340,6 +1340,10 @@ Options:
|
|||||||
run GPG with detached tty
|
run GPG with detached tty
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBbutautomaticupgrades\fR=
|
||||||
|
set value for ButAutomaticUpgrades field
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBcomponent\fR=
|
\-\fBcomponent\fR=
|
||||||
component name to publish (for multi\-component publishing, separate components with commas)
|
component name to publish (for multi\-component publishing, separate components with commas)
|
||||||
.
|
.
|
||||||
@@ -1364,6 +1368,10 @@ GPG keyring to use (instead of default)
|
|||||||
label to publish
|
label to publish
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBnotautomatic\fR=
|
||||||
|
set value for NotAutomatic field
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBorigin\fR=
|
\-\fBorigin\fR=
|
||||||
origin name to publish
|
origin name to publish
|
||||||
.
|
.
|
||||||
@@ -1427,6 +1435,10 @@ Options:
|
|||||||
run GPG with detached tty
|
run GPG with detached tty
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBbutautomaticupgrades\fR=
|
||||||
|
overwrite value for ButAutomaticUpgrades field
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBcomponent\fR=
|
\-\fBcomponent\fR=
|
||||||
component name to publish (for multi\-component publishing, separate components with commas)
|
component name to publish (for multi\-component publishing, separate components with commas)
|
||||||
.
|
.
|
||||||
@@ -1451,8 +1463,12 @@ GPG keyring to use (instead of default)
|
|||||||
label to publish
|
label to publish
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBnotautomatic\fR=
|
||||||
|
overwrite value for NotAutomatic field
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBorigin\fR=
|
\-\fBorigin\fR=
|
||||||
origin name to publish
|
overwrite origin name to publish
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
\-\fBpassphrase\fR=
|
\-\fBpassphrase\fR=
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
Snapshot `snap1` is published currently:
|
Snapshot `snap1` is published currently:
|
||||||
* ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
* ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [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
|
ERROR: unable to drop: snapshot is published
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
Snapshot `snap1` is published currently:
|
Snapshot `snap1` is published currently:
|
||||||
* ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
* ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [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
|
ERROR: unable to drop: snapshot is published
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Snapshot `snap1` is published currently:
|
Snapshot `snap1` is published currently:
|
||||||
* filesystem:hardlink:./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
* filesystem:hardlink:./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||||
* filesystem:symlink:./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
* filesystem:symlink:./maverick (origin: LP-PPA-gladky-anton-gnuplot) [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
|
ERROR: unable to drop: snapshot is published
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Published repositories:
|
Published repositories:
|
||||||
* ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
* ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [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/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/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/tr1/maverick (origin: origin1) [amd64, i386] publishes {main: [snap2]: Merged from sources: 'snap1'}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . maverick
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . maverick
|
Label: . maverick
|
||||||
Suite: maverick
|
Suite: maverick
|
||||||
Codename: maverick
|
Codename: maverick
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . maverick
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . maverick
|
Label: . maverick
|
||||||
Suite: maverick
|
Suite: maverick
|
||||||
Codename: maverick
|
Codename: maverick
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . maverick
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . maverick
|
Label: . maverick
|
||||||
Suite: maverick
|
Suite: maverick
|
||||||
Codename: maverick
|
Codename: maverick
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . maverick
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . maverick
|
Label: . maverick
|
||||||
Suite: maverick
|
Suite: maverick
|
||||||
Codename: maverick
|
Codename: maverick
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . maverick
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . maverick
|
Label: . maverick
|
||||||
Archive: maverick
|
Archive: maverick
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . maverick
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . maverick
|
Label: . maverick
|
||||||
Archive: maverick
|
Archive: maverick
|
||||||
Architecture: i386
|
Architecture: i386
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Origin: aptly24
|
|||||||
Label: . squeeze
|
Label: . squeeze
|
||||||
Suite: squeeze
|
Suite: squeeze
|
||||||
Codename: squeeze
|
Codename: squeeze
|
||||||
|
NotAutomatic: yes
|
||||||
|
ButAutomaticUpgrades: yes
|
||||||
Architectures: amd64 i386
|
Architectures: amd64 i386
|
||||||
Components: main
|
Components: main
|
||||||
Description: Generated by aptly
|
Description: Generated by aptly
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . squeeze
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . squeeze
|
Label: . squeeze
|
||||||
Suite: squeeze
|
Suite: squeeze
|
||||||
Codename: squeeze
|
Codename: squeeze
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . wheezy
|
Origin: Debian
|
||||||
Label: . wheezy
|
Label: . wheezy
|
||||||
Suite: wheezy
|
Suite: wheezy
|
||||||
Codename: wheezy
|
Codename: wheezy
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . wheezy
|
Origin: Debian
|
||||||
Label: . wheezy
|
Label: . wheezy
|
||||||
Archive: wheezy
|
Archive: wheezy
|
||||||
Architecture: i386
|
Architecture: i386
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . squeeze
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . squeeze
|
Label: . squeeze
|
||||||
Suite: squeeze
|
Suite: squeeze
|
||||||
Codename: squeeze
|
Codename: squeeze
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . squeeze
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . squeeze
|
Label: . squeeze
|
||||||
Suite: squeeze
|
Suite: squeeze
|
||||||
Codename: squeeze
|
Codename: squeeze
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
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}
|
ERROR: prefix/distribution already used by another published repo: ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [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 [amd64, i386] publishes {main: [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 (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap8]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted:
|
|||||||
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
|
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
|
||||||
Cleaning up prefix "." components main...
|
Cleaning up prefix "." components main...
|
||||||
|
|
||||||
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.
|
Publish for snapshot ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new snapshot.
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted:
|
|||||||
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
|
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
|
||||||
Cleaning up prefix "." components main...
|
Cleaning up prefix "." components main...
|
||||||
|
|
||||||
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.
|
Publish for snapshot ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new snapshot.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Origin: . maverick
|
Origin: LP-PPA-gladky-anton-gnuplot
|
||||||
Label: . maverick
|
Label: . maverick
|
||||||
Suite: maverick
|
Suite: maverick
|
||||||
Codename: maverick
|
Codename: maverick
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted:
|
|||||||
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
|
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
|
||||||
Cleaning up prefix "." components main...
|
Cleaning up prefix "." components main...
|
||||||
|
|
||||||
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.
|
Publish for snapshot ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new snapshot.
|
||||||
|
|||||||
@@ -608,14 +608,14 @@ class PublishSnapshot23Test(BaseTest):
|
|||||||
|
|
||||||
class PublishSnapshot24Test(BaseTest):
|
class PublishSnapshot24Test(BaseTest):
|
||||||
"""
|
"""
|
||||||
publish snapshot: custom origin
|
publish snapshot: custom origin, notautomatic and butautomaticupgrades
|
||||||
"""
|
"""
|
||||||
fixtureDB = True
|
fixtureDB = True
|
||||||
fixturePool = True
|
fixturePool = True
|
||||||
fixtureCmds = [
|
fixtureCmds = [
|
||||||
"aptly snapshot create snap24 from mirror gnuplot-maverick",
|
"aptly snapshot create snap24 from mirror gnuplot-maverick",
|
||||||
]
|
]
|
||||||
runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=squeeze -origin=aptly24 snap24"
|
runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=squeeze -origin=aptly24 -notautomatic=yes -butautomaticupgrades=yes snap24"
|
||||||
gold_processor = BaseTest.expand_environ
|
gold_processor = BaseTest.expand_environ
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
Serving published repositories, recommended apt sources list:
|
Serving published repositories, recommended apt sources list:
|
||||||
|
|
||||||
# ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
# ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||||
deb http://127.0.0.1:8765/ maverick main
|
deb http://127.0.0.1:8765/ maverick main
|
||||||
# debian/maverick [amd64, i386, source] publishes {main: [snap2]: Snapshot from mirror [gnuplot-maverick-src]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick [src]}
|
# debian/maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386, source] publishes {main: [snap2]: Snapshot from mirror [gnuplot-maverick-src]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick [src]}
|
||||||
deb http://127.0.0.1:8765/debian/ maverick main
|
deb http://127.0.0.1:8765/debian/ maverick main
|
||||||
deb-src http://127.0.0.1:8765/debian/ maverick main
|
deb-src http://127.0.0.1:8765/debian/ maverick main
|
||||||
# multi/maverick [amd64, i386, source] publishes {contrib: [snap2]: Snapshot from mirror [gnuplot-maverick-src]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick [src]}, {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
# multi/maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386, source] publishes {contrib: [snap2]: Snapshot from mirror [gnuplot-maverick-src]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick [src]}, {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
|
||||||
deb http://127.0.0.1:8765/multi/ maverick contrib main
|
deb http://127.0.0.1:8765/multi/ maverick contrib main
|
||||||
deb-src http://127.0.0.1:8765/multi/ maverick contrib main
|
deb-src http://127.0.0.1:8765/multi/ maverick contrib main
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ class PublishAPITestRepo(APITest):
|
|||||||
'Distribution': 'wheezy',
|
'Distribution': 'wheezy',
|
||||||
'Label': '',
|
'Label': '',
|
||||||
'Origin': '',
|
'Origin': '',
|
||||||
|
'NotAutomatic': '',
|
||||||
|
'ButAutomaticUpgrades': '',
|
||||||
'Prefix': prefix,
|
'Prefix': prefix,
|
||||||
'SkipContents': False,
|
'SkipContents': False,
|
||||||
'SourceKind': 'local',
|
'SourceKind': 'local',
|
||||||
@@ -74,6 +76,8 @@ class PublishAPITestRepo(APITest):
|
|||||||
'Distribution': distribution,
|
'Distribution': distribution,
|
||||||
'Label': '',
|
'Label': '',
|
||||||
'Origin': '',
|
'Origin': '',
|
||||||
|
'NotAutomatic': '',
|
||||||
|
'ButAutomaticUpgrades': '',
|
||||||
'Prefix': ".",
|
'Prefix': ".",
|
||||||
'SkipContents': False,
|
'SkipContents': False,
|
||||||
'SourceKind': 'local',
|
'SourceKind': 'local',
|
||||||
@@ -120,6 +124,8 @@ class PublishSnapshotAPITest(APITest):
|
|||||||
"Sources": [{"Name": snapshot_name}],
|
"Sources": [{"Name": snapshot_name}],
|
||||||
"Signing": DefaultSigningOptions,
|
"Signing": DefaultSigningOptions,
|
||||||
"Distribution": "squeeze",
|
"Distribution": "squeeze",
|
||||||
|
"NotAutomatic": "yes",
|
||||||
|
"ButAutomaticUpgrades": "yes",
|
||||||
})
|
})
|
||||||
self.check_equal(resp.status_code, 201)
|
self.check_equal(resp.status_code, 201)
|
||||||
self.check_equal(resp.json(), {
|
self.check_equal(resp.json(), {
|
||||||
@@ -127,6 +133,8 @@ class PublishSnapshotAPITest(APITest):
|
|||||||
'Distribution': 'squeeze',
|
'Distribution': 'squeeze',
|
||||||
'Label': '',
|
'Label': '',
|
||||||
'Origin': '',
|
'Origin': '',
|
||||||
|
'NotAutomatic': 'yes',
|
||||||
|
'ButAutomaticUpgrades': 'yes',
|
||||||
'Prefix': prefix,
|
'Prefix': prefix,
|
||||||
'SkipContents': False,
|
'SkipContents': False,
|
||||||
'SourceKind': 'snapshot',
|
'SourceKind': 'snapshot',
|
||||||
@@ -188,6 +196,8 @@ class PublishUpdateAPITestRepo(APITest):
|
|||||||
'Distribution': 'wheezy',
|
'Distribution': 'wheezy',
|
||||||
'Label': '',
|
'Label': '',
|
||||||
'Origin': '',
|
'Origin': '',
|
||||||
|
'NotAutomatic': '',
|
||||||
|
'ButAutomaticUpgrades': '',
|
||||||
'Prefix': prefix,
|
'Prefix': prefix,
|
||||||
'SkipContents': False,
|
'SkipContents': False,
|
||||||
'SourceKind': 'local',
|
'SourceKind': 'local',
|
||||||
@@ -239,6 +249,8 @@ class PublishSwitchAPITestRepo(APITest):
|
|||||||
'Architectures': ['i386', 'source'],
|
'Architectures': ['i386', 'source'],
|
||||||
'Distribution': 'wheezy',
|
'Distribution': 'wheezy',
|
||||||
'Label': '',
|
'Label': '',
|
||||||
|
'NotAutomatic': '',
|
||||||
|
'ButAutomaticUpgrades': '',
|
||||||
'Origin': '',
|
'Origin': '',
|
||||||
'Prefix': prefix,
|
'Prefix': prefix,
|
||||||
'SkipContents': False,
|
'SkipContents': False,
|
||||||
@@ -272,6 +284,8 @@ class PublishSwitchAPITestRepo(APITest):
|
|||||||
'Distribution': 'wheezy',
|
'Distribution': 'wheezy',
|
||||||
'Label': '',
|
'Label': '',
|
||||||
'Origin': '',
|
'Origin': '',
|
||||||
|
'NotAutomatic': '',
|
||||||
|
'ButAutomaticUpgrades': '',
|
||||||
'Prefix': prefix,
|
'Prefix': prefix,
|
||||||
'SkipContents': True,
|
'SkipContents': True,
|
||||||
'SourceKind': 'snapshot',
|
'SourceKind': 'snapshot',
|
||||||
|
|||||||
Reference in New Issue
Block a user