should not insert version if all items were filtered
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simplestreams |
Fix Released
|
Medium
|
Unassigned | ||
simplestreams (Ubuntu) |
Fix Released
|
Medium
|
Scott Moser |
Bug Description
This is a behavioral issue that comes from doing a partial mirror. If all items in a version were filtered out, we are currently still inserting the version. That causes problems if you change your filter items later.
See example here:
$ dlfile=
$ rm -Rf out.d; ./tools/tenv ./bin/sstream-
com.example.
com.example.
$ ./tools/tenv ./bin/sstream-
com.example.
com.example.
$ ./tools/tenv ./bin/sstream-
com.example.
com.example.
$ find out.d/ -type f
out.d/files/
out.d/files/
out.d/files/
out.d/files/
out.d/files/
out.d/files/
out.d/files/
out.d/files/
out.d/files/
out.d/.
out.d/streams/
Note, it thinks it already has i386 stuff, and the .data/...download file agrees, with a section like:
"com.
"arch": "i386",
"stream": "released",
"versions": {
"20120328": {
"label": "beta2"
},
"20121026.1": {
"label": "release"
},
"20121001": {
"label": "release"
}
},
"release": "pinky",
"build": "server",
"version": "6.1"
}
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: simplestreams 0.1.0~bzr315-
ProcVersionSign
Uname: Linux 3.11.0-9-generic x86_64
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
Date: Thu Oct 10 15:36:16 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-10-19 (722 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
MarkForUpload: True
PackageArchitec
ProcEnviron:
TERM=screen-bce
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: simplestreams
UpgradeStatus: Upgraded to saucy on 2013-05-20 (143 days ago)
tags: | added: patch |
Changed in simplestreams: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
Changed in simplestreams (Ubuntu): | |
status: | Fix Committed → Confirmed |
Attached patch here changes the behavior, and seems sane to me: mirror -v $dlfile out.d/ arch=amd64 foovendor: released: download/ com.example. foovendor: pinky:server: amd64: to_add= ['20121026. 1', '20121001', '20120328'] to_remove=[] foovendor: released: download/ com.example. foovendor: pinky:server: i386: to_add= ['20121026. 1', '20121001', '20120328'] to_remove=[]
$ rm -Rf out.d;
$ ./tools/tenv ./bin/sstream-
com.example.
com.example.
$ ./tools/tenv ./bin/sstream- mirror -v $dlfile out.d/ arch=amd64 foovendor: released: download/ com.example. foovendor: pinky:server: amd64: to_add=[] to_remove=[] foovendor: released: download/ com.example. foovendor: pinky:server: i386: to_add= ['20121026. 1', '20121001', '20120328'] to_remove=[]
com.example.
com.example.
$ ./tools/tenv ./bin/sstream- mirror -v $dlfile out.d/ arch=i386 foovendor: released: download/ com.example. foovendor: pinky:server: amd64: to_add=[] to_remove=[] foovendor: released: download/ com.example. foovendor: pinky:server: i386: to_add= ['20121026. 1', '20121001', '20120328'] to_remove=[]
com.example.
com.example.