mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Add options --with-packages to show list of packages in snapshot & mirror.
This commit is contained in:
@@ -106,6 +106,15 @@ func aptlyMirrorShow(cmd *commander.Command, args []string) error {
|
||||
fmt.Printf("%s: %s\n", k, repo.Meta[k])
|
||||
}
|
||||
|
||||
withPackages := cmd.Flag.Lookup("with-packages").Value.Get().(bool)
|
||||
if withPackages {
|
||||
if repo.LastDownloadDate.IsZero() {
|
||||
fmt.Printf("Unable to show package list, mirror hasn't been downloaded yet.\n")
|
||||
} else {
|
||||
ListPackagesRefList(repo.RefList())
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -199,6 +208,8 @@ ex:
|
||||
Flag: *flag.NewFlagSet("aptly-mirror-show", flag.ExitOnError),
|
||||
}
|
||||
|
||||
cmd.Flag.Bool("with-packages", false, "show package list for mirror as well")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
||||
@@ -106,20 +106,10 @@ func aptlySnapshotShow(cmd *commander.Command, args []string) error {
|
||||
fmt.Printf("Created At: %s\n", snapshot.CreatedAt.Format("2006-01-02 15:04:05 MST"))
|
||||
fmt.Printf("Description: %s\n", snapshot.Description)
|
||||
fmt.Printf("Number of packages: %d\n", snapshot.NumPackages())
|
||||
fmt.Printf("Packages:\n")
|
||||
|
||||
packageCollection := debian.NewPackageCollection(context.database)
|
||||
|
||||
err = snapshot.RefList().ForEach(func(key []byte) error {
|
||||
p, err := packageCollection.ByKey(key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Printf(" %s\n", p)
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to load packages: %s", err)
|
||||
withPackages := cmd.Flag.Lookup("with-packages").Value.Get().(bool)
|
||||
if withPackages {
|
||||
ListPackagesRefList(snapshot.RefList())
|
||||
}
|
||||
|
||||
return err
|
||||
@@ -549,6 +539,8 @@ ex.
|
||||
Flag: *flag.NewFlagSet("aptly-snapshot-show", flag.ExitOnError),
|
||||
}
|
||||
|
||||
cmd.Flag.Bool("with-packages", false, "show package list for snapshot as well")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
||||
26
common.go
Normal file
26
common.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/smira/aptly/debian"
|
||||
)
|
||||
|
||||
func ListPackagesRefList(reflist *debian.PackageRefList) (err error) {
|
||||
fmt.Printf("Packages:\n")
|
||||
|
||||
packageCollection := debian.NewPackageCollection(context.database)
|
||||
|
||||
err = reflist.ForEach(func(key []byte) error {
|
||||
p, err := packageCollection.ByKey(key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Printf(" %s\n", p)
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to load packages: %s", err)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
5
debian/remote.go
vendored
5
debian/remote.go
vendored
@@ -78,6 +78,11 @@ func (repo *RemoteRepo) NumPackages() int {
|
||||
return repo.packageRefs.Len()
|
||||
}
|
||||
|
||||
// RefList returns package list for repo
|
||||
func (repo *RemoteRepo) RefList() *PackageRefList {
|
||||
return repo.packageRefs
|
||||
}
|
||||
|
||||
// ReleaseURL returns URL to Release file in repo root
|
||||
// TODO: InRelease, Release.gz, Release.bz2 handling
|
||||
func (repo *RemoteRepo) ReleaseURL() *url.URL {
|
||||
|
||||
5
debian/remote_test.go
vendored
5
debian/remote_test.go
vendored
@@ -72,6 +72,11 @@ func (s *RemoteRepoSuite) TestNumPackages(c *C) {
|
||||
c.Check(s.repo.NumPackages(), Equals, 3)
|
||||
}
|
||||
|
||||
func (s *RemoteRepoSuite) TestRefList(c *C) {
|
||||
s.repo.packageRefs = s.reflist
|
||||
c.Check(s.repo.RefList(), Equals, s.reflist)
|
||||
}
|
||||
|
||||
func (s *RemoteRepoSuite) TestReleaseURL(c *C) {
|
||||
c.Assert(s.repo.ReleaseURL().String(), Equals, "http://mirror.yandex.ru/debian/dists/squeeze/Release")
|
||||
}
|
||||
|
||||
345
system/t04_mirror/ShowMirror3Test_gold
Normal file
345
system/t04_mirror/ShowMirror3Test_gold
Normal file
@@ -0,0 +1,345 @@
|
||||
Name: wheezy-contrib
|
||||
Archive Root URL: http://mirror.yandex.ru/debian/
|
||||
Distribution: wheezy
|
||||
Components: contrib
|
||||
Architectures: i386, amd64
|
||||
Last update: 2014-01-21 19:09:24 MSK
|
||||
Number of packages: 325
|
||||
|
||||
Information from release file:
|
||||
Architectures: amd64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc
|
||||
Codename: wheezy
|
||||
Components: main contrib non-free
|
||||
Date: Sat, 14 Dec 2013 10:51:30 UTC
|
||||
Description: Debian 7.3 Released 14 December 2013
|
||||
|
||||
Label: Debian
|
||||
Origin: Debian
|
||||
Suite: stable
|
||||
Version: 7.3
|
||||
Packages:
|
||||
bgoffice-dict-downloader-0.09_all
|
||||
biomaj-watcher-1.2.1-1_all
|
||||
cicero-0.7.2-2_all
|
||||
cl-sql-oracle-6.2.0-1_all
|
||||
cl-umlisp-1:2007ac.2-6_all
|
||||
cl-umlisp-orf-3.3.2-3_all
|
||||
cltl-1.0.26_all
|
||||
crafty-bitmaps-1.0-1_all
|
||||
crafty-books-medium-1.0.debian1-2_all
|
||||
crafty-books-medtosmall-1.0.debian1-2_all
|
||||
crafty-books-small-1.0.debian1-2_all
|
||||
cytadela-data-1.0.1-2_all
|
||||
dynagen-0.11.0-6_all
|
||||
dynare-matlab-4.3.0-2_all
|
||||
esix-1-2_all
|
||||
festvox-don-1.4.0-4_all
|
||||
festvox-en1-1.95-1_all
|
||||
festvox-rablpc16k-1.4.0-2_all
|
||||
festvox-rablpc8k-1.4.0-2_all
|
||||
festvox-us1-1.95-1_all
|
||||
festvox-us2-1.95-1_all
|
||||
festvox-us3-1.95-1_all
|
||||
firmware-b43-installer-1:015-14.1_all
|
||||
firmware-b43-lpphy-installer-1:015-14.1_all
|
||||
firmware-b43legacy-installer-1:015-14.1_all
|
||||
game-data-packager-30_all
|
||||
geoip-database-contrib-1.8_all
|
||||
gns3-0.7.4-1_all
|
||||
gnuvd-gnome-1.0.11-1_all
|
||||
googleearth-package-0.7.0_all
|
||||
horae-071~svn536-1_all
|
||||
hts-voice-nitech-jp-atr503-m001-1.04-1_all
|
||||
hyperspec-1.30+nmu2_all
|
||||
ifeffit-doc-2:1.2.11d-8_all
|
||||
imgtex-0.20050123-8_all
|
||||
java-package-0.50+nmu2_all
|
||||
kcemu-common-0.5.1+dfsg-5_all
|
||||
libgooglecharts-ruby-1.6.8-2_all
|
||||
libgooglecharts-ruby1.8-1.6.8-2_all
|
||||
libjlapack-java-0.8~dfsg-1_all
|
||||
libmtj-java-0.9.14~dfsg-2_all
|
||||
libmtj-java-doc-0.9.14~dfsg-2_all
|
||||
libnetlib-java-0.9.3-1_all
|
||||
libviennacl-dev-1.2.0-2_all
|
||||
libviennacl-doc-1.2.0-2_all
|
||||
linux-wlan-ng-firmware-0.2.9+dfsg-5_all
|
||||
mathematica-fonts-16_all
|
||||
matlab-gdf-0.1.2-2_all
|
||||
matlab-support-0.0.18_all
|
||||
mess-desktop-entries-0.2-2_all
|
||||
netdisco-mibs-installer-1.7.1_all
|
||||
opendict-plugins-lingvosoft-0.8-2_all
|
||||
ora2pg-8.11-1_all
|
||||
phoronix-test-suite-3.8.0-1_all
|
||||
playonlinux-4.1.1-1_all
|
||||
premail-0.46-9_all
|
||||
python-ldap-doc-2.3-2.2_all
|
||||
python-pycuda-doc-2012.1-1_all
|
||||
python-pycuda-headers-2012.1-1_all
|
||||
python-pyopencl-doc-2012.1.dfsg-1_all
|
||||
python-pyopencl-headers-2012.1.dfsg-1_all
|
||||
qmhandle-1.3.2-1_all
|
||||
quake-2_all
|
||||
quake-server-2_all
|
||||
quake3-1.4_all
|
||||
quake3-server-1.4_all
|
||||
raccoon-1.0-1_all
|
||||
ruby-googlecharts-1.6.8-2_all
|
||||
sabnzbdplus-0.6.15-1_all
|
||||
sabnzbdplus-theme-classic-0.6.15-1_all
|
||||
sabnzbdplus-theme-iphone-0.6.15-1_all
|
||||
sabnzbdplus-theme-mobile-0.6.15-1_all
|
||||
sabnzbdplus-theme-plush-0.6.15-1_all
|
||||
sabnzbdplus-theme-smpl-0.6.15-1_all
|
||||
sapgui-package-0.0.10_all
|
||||
sauerbraten-wake6-1.0-1.1_all
|
||||
sdic-2.1.3-22_all
|
||||
sdic-edict-2.1.3-22_all
|
||||
sdic-eijiro-2.1.3-22_all
|
||||
sdic-gene95-2.1.3-22_all
|
||||
series60-remote-0.4.0+dfsg.1-1_all
|
||||
sixpack-1:0.68-1_all
|
||||
sqldeveloper-package-0.2.4_all
|
||||
sugar-etoys-activity-116-3_all
|
||||
susv2-1.1_all
|
||||
susv3-6.1_all
|
||||
tightvnc-java-1.2.7-8_all
|
||||
ttf-mathematica4.1-16_all
|
||||
ttf-mscorefonts-installer-3.4+nmu1_all
|
||||
ttf-root-installer-5.34.00-2_all
|
||||
uqm-russian-1.0.2-5_all
|
||||
vmware-manager-0.2.0-3_all
|
||||
vnc-java-3.3.3r2-8_all
|
||||
vusb-analyzer-1.1-3_all
|
||||
winetricks-0.0+20121030+svn918-1_all
|
||||
wnn7egg-1.02-8_all
|
||||
x-pgp-sig-el-1.3.5.1-4.1_all
|
||||
alien-arena-7.53+dfsg-3_amd64
|
||||
alien-arena-server-7.53+dfsg-3_amd64
|
||||
alsa-firmware-loaders-1.0.25-2_amd64
|
||||
amoeba-1.1-26_amd64
|
||||
assaultcube-1.1.0.4+dfsg2-1_amd64
|
||||
atari800-2.2.1-2_amd64
|
||||
b43-fwcutter-1:015-14.1_amd64
|
||||
basilisk2-0.9.20120331-2_amd64
|
||||
boinc-nvidia-cuda-7.0.27+dfsg-5_amd64
|
||||
cbedic-4.0-3_amd64
|
||||
chocolate-doom-1.7.0-3+b1_amd64
|
||||
conky-all-1.9.0-2_amd64
|
||||
cpp-doc-5:4_amd64
|
||||
cytadela-1.0.1-2_amd64
|
||||
cytadela-dbg-1.0.1-2_amd64
|
||||
dosemu-1.4.0+svn.2080-1_amd64
|
||||
e-uae-0.8.29-WIP4-10_amd64
|
||||
e-uae-dbg-0.8.29-WIP4-10_amd64
|
||||
easyspice-0.6.8-2_amd64
|
||||
exult-1.2-15.2_amd64
|
||||
exult-studio-1.2-15.2_amd64
|
||||
flashplugin-nonfree-1:3.2_amd64
|
||||
frogatto-1.2+dfsg-1+b1_amd64
|
||||
gcc-doc-5:4_amd64
|
||||
gcj-doc-5:4_amd64
|
||||
gfortran-doc-5:4_amd64
|
||||
glx-alternative-fglrx-0.2.2_amd64
|
||||
glx-alternative-mesa-0.2.2_amd64
|
||||
glx-alternative-nvidia-0.2.2_amd64
|
||||
glx-diversions-0.2.2_amd64
|
||||
gnat-doc-5:4_amd64
|
||||
gnome-speech-swift-1:0.4.25-5_amd64
|
||||
gnome-video-arcade-0.8.3-1_amd64
|
||||
gnuboy-sdl-1.0.3-6.1_amd64
|
||||
gnuboy-svga-1.0.3-6.1_amd64
|
||||
gnuboy-x-1.0.3-6.1_amd64
|
||||
gnuvd-1.0.11-1_amd64
|
||||
gobi-loader-0.6-1_amd64
|
||||
gtktrain-0.9b-13_amd64
|
||||
hannah-foo2zjs-1:1_amd64
|
||||
ifeffit-2:1.2.11d-8_amd64
|
||||
isdnactivecards-1:3.9.20060704-11_amd64
|
||||
isight-firmware-tools-1.6-1_amd64
|
||||
iucode-tool-0.8.3-1_amd64
|
||||
ivtv-utils-1.4.1-2_amd64
|
||||
kcemu-0.5.1+dfsg-5_amd64
|
||||
libcplgasgano20-6.1.1-2_amd64
|
||||
libdbd-oracle-perl-1.44-1_amd64
|
||||
libifeffit-perl-2:1.2.11d-8_amd64
|
||||
libpgplot-perl-1:2.21-3_amd64
|
||||
libsocl-contrib-1.0-1.0.1+dfsg-1_amd64
|
||||
libstarpu-contrib-1.0-1.0.1+dfsg-1_amd64
|
||||
libstarpu-contrib-dev-1.0.1+dfsg-1_amd64
|
||||
libstarpu-contribfft-1.0-1.0.1+dfsg-1_amd64
|
||||
libstarpu-contribmpi-1.0-1.0.1+dfsg-1_amd64
|
||||
libsuitesparse-metis-3.1.0-3.1.0-2_amd64
|
||||
libsuitesparse-metis-dbg-3.1.0-2_amd64
|
||||
libsuitesparse-metis-dev-3.1.0-2_amd64
|
||||
libtrain-bin-0.9b-11_amd64
|
||||
libtrain-dev-0.9b-11_amd64
|
||||
libtrain1-0.9b-11_amd64
|
||||
libxnvctrl-dev-304.88-1_amd64
|
||||
libxnvctrl0-304.88-1_amd64
|
||||
libydpdict2-1.0.2-1_amd64
|
||||
libydpdict2-dev-1.0.2-1_amd64
|
||||
lugaru-0~20110520.1+hge4354+dfsg-3_amd64
|
||||
microcode.ctl-1.18~0+nmu2_amd64
|
||||
nvidia-installer-cleanup-20120630+3_amd64
|
||||
nvidia-kernel-common-20120630+3_amd64
|
||||
nvidia-settings-304.88-1_amd64
|
||||
nvidia-settings-legacy-173xx-173.14.35-2_amd64
|
||||
nvidia-support-20120630+3_amd64
|
||||
nvidia-xconfig-304.48-1_amd64
|
||||
pidgin-skype-20110407+svn628+dfsg-1_amd64
|
||||
pidgin-skype-dbg-20110407+svn628+dfsg-1_amd64
|
||||
prism2-usb-firmware-installer-0.2.9+dfsg-5_amd64
|
||||
pvpgn-1.8.1-2.1+b1_amd64
|
||||
python-ifeffit-2:1.2.11d-8_amd64
|
||||
python-pycuda-2012.1-1_amd64
|
||||
python-pyopencl-2012.1.dfsg-1_amd64
|
||||
python3-pyopencl-2012.1.dfsg-1_amd64
|
||||
r-cran-surveillance-1.2-1-3_amd64
|
||||
redeclipse-1.2-3_amd64
|
||||
redeclipse-dbg-1.2-3_amd64
|
||||
redeclipse-server-1.2-3_amd64
|
||||
redeclipse-server-dbg-1.2-3_amd64
|
||||
reminiscence-0.2.1-1_amd64
|
||||
rocksndiamonds-3.3.0.1+dfsg1-2.2_amd64
|
||||
rott-1.1.2-1_amd64
|
||||
ruby-pgplot-0.1.3-6_amd64
|
||||
ruby-pgplot-dbg-0.1.3-6_amd64
|
||||
sandboxgamemaker-2.7.1+dfsg-2_amd64
|
||||
sauerbraten-0.0.20100728.dfsg+repack-3_amd64
|
||||
sauerbraten-dbg-0.0.20100728.dfsg+repack-3_amd64
|
||||
sauerbraten-server-0.0.20100728.dfsg+repack-3_amd64
|
||||
spectemu-common-0.94a-15_amd64
|
||||
spectemu-svga-0.94a-15_amd64
|
||||
spectemu-x11-0.94a-15_amd64
|
||||
starpu-contrib-examples-1.0.1+dfsg-1_amd64
|
||||
starpu-contrib-tools-1.0.1+dfsg-1_amd64
|
||||
uae-0.8.29-7_amd64
|
||||
uae-dbg-0.8.29-7_amd64
|
||||
uqm-0.6.2.dfsg-9_amd64
|
||||
vice-2.3.dfsg-4_amd64
|
||||
vmware-view-open-client-4.5.0-297975+dfsg-4+b1_amd64
|
||||
vor-0.5.5-2_amd64
|
||||
wdq2wav-0.8.3-2_amd64
|
||||
wolf4sdl-1.7+svn262+dfsg1-1_amd64
|
||||
xserver-xorg-video-ivtv-1.1.2-1+b3_amd64
|
||||
xserver-xorg-video-ivtv-dbg-1.1.2-1+b3_amd64
|
||||
xtrs-4.9c-3.4_amd64
|
||||
xvba-va-driver-0.8.0-5_amd64
|
||||
ydpdict-1.0.0-2_amd64
|
||||
alien-arena-7.53+dfsg-3_i386
|
||||
alien-arena-server-7.53+dfsg-3_i386
|
||||
alsa-firmware-loaders-1.0.25-2_i386
|
||||
amoeba-1.1-26_i386
|
||||
assaultcube-1.1.0.4+dfsg2-1_i386
|
||||
atari800-2.2.1-2_i386
|
||||
b43-fwcutter-1:015-14.1_i386
|
||||
basilisk2-0.9.20120331-2_i386
|
||||
boinc-nvidia-cuda-7.0.27+dfsg-5_i386
|
||||
cbedic-4.0-3_i386
|
||||
chocolate-doom-1.7.0-3_i386
|
||||
conky-all-1.9.0-2_i386
|
||||
cpp-doc-5:4_i386
|
||||
cytadela-1.0.1-2_i386
|
||||
cytadela-dbg-1.0.1-2_i386
|
||||
dosemu-1.4.0+svn.2080-1_i386
|
||||
e-uae-0.8.29-WIP4-10_i386
|
||||
e-uae-dbg-0.8.29-WIP4-10_i386
|
||||
easyspice-0.6.8-2_i386
|
||||
exult-1.2-15.2_i386
|
||||
exult-studio-1.2-15.2_i386
|
||||
flashplugin-nonfree-1:3.2_i386
|
||||
flashplugin-nonfree-extrasound-0.0.svn2431-3_i386
|
||||
frogatto-1.2+dfsg-1_i386
|
||||
gcc-doc-5:4_i386
|
||||
gcj-doc-5:4_i386
|
||||
gfortran-doc-5:4_i386
|
||||
glx-alternative-fglrx-0.2.2_i386
|
||||
glx-alternative-mesa-0.2.2_i386
|
||||
glx-alternative-nvidia-0.2.2_i386
|
||||
glx-diversions-0.2.2_i386
|
||||
gnat-doc-5:4_i386
|
||||
gnome-speech-dectalk-1:0.4.25-5_i386
|
||||
gnome-speech-ibmtts-1:0.4.25-5_i386
|
||||
gnome-speech-swift-1:0.4.25-5_i386
|
||||
gnome-video-arcade-0.8.3-1_i386
|
||||
gnuboy-sdl-1.0.3-6.1_i386
|
||||
gnuboy-svga-1.0.3-6.1_i386
|
||||
gnuboy-x-1.0.3-6.1_i386
|
||||
gnuvd-1.0.11-1_i386
|
||||
gobi-loader-0.6-1_i386
|
||||
gtktrain-0.9b-13_i386
|
||||
hannah-foo2zjs-1:1_i386
|
||||
ifeffit-2:1.2.11d-8_i386
|
||||
isdnactivecards-1:3.9.20060704-11_i386
|
||||
isight-firmware-tools-1.6-1_i386
|
||||
iucode-tool-0.8.3-1_i386
|
||||
ivtv-utils-1.4.1-2_i386
|
||||
kcemu-0.5.1+dfsg-5_i386
|
||||
libcplgasgano20-6.1.1-2_i386
|
||||
libdbd-oracle-perl-1.44-1_i386
|
||||
libifeffit-perl-2:1.2.11d-8_i386
|
||||
libpgplot-perl-1:2.21-3_i386
|
||||
libsocl-contrib-1.0-1.0.1+dfsg-1_i386
|
||||
libstarpu-contrib-1.0-1.0.1+dfsg-1_i386
|
||||
libstarpu-contrib-dev-1.0.1+dfsg-1_i386
|
||||
libstarpu-contribfft-1.0-1.0.1+dfsg-1_i386
|
||||
libstarpu-contribmpi-1.0-1.0.1+dfsg-1_i386
|
||||
libsuitesparse-metis-3.1.0-3.1.0-2_i386
|
||||
libsuitesparse-metis-dbg-3.1.0-2_i386
|
||||
libsuitesparse-metis-dev-3.1.0-2_i386
|
||||
libtrain-bin-0.9b-11_i386
|
||||
libtrain-dev-0.9b-11_i386
|
||||
libtrain1-0.9b-11_i386
|
||||
libxnvctrl-dev-304.88-1_i386
|
||||
libxnvctrl0-304.88-1_i386
|
||||
libydpdict2-1.0.2-1_i386
|
||||
libydpdict2-dev-1.0.2-1_i386
|
||||
lugaru-0~20110520.1+hge4354+dfsg-3_i386
|
||||
microcode.ctl-1.18~0+nmu2_i386
|
||||
nvidia-installer-cleanup-20120630+3_i386
|
||||
nvidia-kernel-common-20120630+3_i386
|
||||
nvidia-settings-304.88-1_i386
|
||||
nvidia-settings-legacy-173xx-173.14.35-2_i386
|
||||
nvidia-support-20120630+3_i386
|
||||
nvidia-xconfig-304.48-1_i386
|
||||
pidgin-skype-20110407+svn628+dfsg-1_i386
|
||||
pidgin-skype-dbg-20110407+svn628+dfsg-1_i386
|
||||
prism2-usb-firmware-installer-0.2.9+dfsg-5_i386
|
||||
pvpgn-1.8.1-2.1+b1_i386
|
||||
python-ifeffit-2:1.2.11d-8_i386
|
||||
python-pycuda-2012.1-1_i386
|
||||
python-pyopencl-2012.1.dfsg-1_i386
|
||||
python3-pyopencl-2012.1.dfsg-1_i386
|
||||
q-tools-0.4-1_i386
|
||||
r-cran-surveillance-1.2-1-3_i386
|
||||
redeclipse-1.2-3_i386
|
||||
redeclipse-dbg-1.2-3_i386
|
||||
redeclipse-server-1.2-3_i386
|
||||
redeclipse-server-dbg-1.2-3_i386
|
||||
reminiscence-0.2.1-1_i386
|
||||
rocksndiamonds-3.3.0.1+dfsg1-2.2_i386
|
||||
rott-1.1.2-1_i386
|
||||
sandboxgamemaker-2.7.1+dfsg-2_i386
|
||||
sauerbraten-0.0.20100728.dfsg+repack-3_i386
|
||||
sauerbraten-dbg-0.0.20100728.dfsg+repack-3_i386
|
||||
sauerbraten-server-0.0.20100728.dfsg+repack-3_i386
|
||||
spectemu-common-0.94a-15_i386
|
||||
spectemu-svga-0.94a-15_i386
|
||||
spectemu-x11-0.94a-15_i386
|
||||
starpu-contrib-examples-1.0.1+dfsg-1_i386
|
||||
starpu-contrib-tools-1.0.1+dfsg-1_i386
|
||||
uae-0.8.29-7_i386
|
||||
uae-dbg-0.8.29-7_i386
|
||||
uqm-0.6.2.dfsg-9_i386
|
||||
vice-2.3.dfsg-4_i386
|
||||
vmware-view-open-client-4.5.0-297975+dfsg-4+b1_i386
|
||||
vor-0.5.5-2_i386
|
||||
wdq2wav-0.8.3-2_i386
|
||||
wolf4sdl-1.7+svn262+dfsg1-1_i386
|
||||
xserver-xorg-video-ivtv-1.1.2-1+b3_i386
|
||||
xserver-xorg-video-ivtv-dbg-1.1.2-1+b3_i386
|
||||
xtrs-4.9c-3.4_i386
|
||||
xvba-va-driver-0.8.0-5_i386
|
||||
ydpdict-1.0.0-2_i386
|
||||
@@ -15,3 +15,11 @@ class ShowMirror2Test(BaseTest):
|
||||
"""
|
||||
runCmd = "aptly mirror show mirror-xx"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class ShowMirror3Test(BaseTest):
|
||||
"""
|
||||
show mirror: regular mirror with packages
|
||||
"""
|
||||
fixtureDB = True
|
||||
runCmd = "aptly mirror show --with-packages wheezy-contrib"
|
||||
|
||||
4
system/t05_snapshot/ShowSnapshot3Test_gold
Normal file
4
system/t05_snapshot/ShowSnapshot3Test_gold
Normal file
@@ -0,0 +1,4 @@
|
||||
Name: snap1
|
||||
Created At: 2014-01-24 13:06:43 MSK
|
||||
Description: Snapshot from mirror [wheezy-non-free]: http://mirror.yandex.ru/debian/ wheezy
|
||||
Number of packages: 661
|
||||
@@ -14,7 +14,7 @@ class CreateSnapshot1Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap1", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap1", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class CreateSnapshot2Test(BaseTest):
|
||||
|
||||
@@ -18,7 +18,7 @@ class MergeSnapshot1Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class MergeSnapshot2Test(BaseTest):
|
||||
@@ -53,7 +53,7 @@ class MergeSnapshot3Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap4", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap4", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class MergeSnapshot4Test(BaseTest):
|
||||
|
||||
@@ -19,7 +19,7 @@ class PullSnapshot1Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class PullSnapshot2Test(BaseTest):
|
||||
@@ -39,7 +39,7 @@ class PullSnapshot2Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class PullSnapshot3Test(BaseTest):
|
||||
@@ -59,7 +59,7 @@ class PullSnapshot3Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class PullSnapshot4Test(BaseTest):
|
||||
@@ -136,6 +136,4 @@ class PullSnapshot8Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
self.check_cmd_output("aptly snapshot show --with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
@@ -8,7 +8,7 @@ class ShowSnapshot1Test(BaseTest):
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-non-free"]
|
||||
runCmd = "aptly snapshot show snap1"
|
||||
runCmd = "aptly snapshot show --with-packages snap1"
|
||||
outputMatchPrepare = lambda _, s: re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
|
||||
@@ -19,3 +19,13 @@ class ShowSnapshot2Test(BaseTest):
|
||||
fixtureDB = True
|
||||
runCmd = "aptly snapshot show no-such-snapshot"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class ShowSnapshot3Test(BaseTest):
|
||||
"""
|
||||
show snapshot: from mirror w/o packages
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-non-free"]
|
||||
runCmd = "aptly snapshot show snap1"
|
||||
outputMatchPrepare = lambda _, s: re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
Reference in New Issue
Block a user