chore: cripple some examples on ye-old-apt

This commit is contained in:
Chris West (Faux) 2020-10-30 00:27:29 +00:00
parent 99fba9024a
commit a60323705f
2 changed files with 15 additions and 10 deletions

View File

@ -32,16 +32,15 @@ fn main() {
for simple::VersionOrigins { version, origins } in
view.versions().map(simple::VersionOrigins::new)
{
println!(
" {} {} {}",
if version.version == installed_version {
"***"
} else {
" "
},
version.version,
version.priority,
);
let marker = if version.version == installed_version {
"***"
} else {
" "
};
#[cfg(not(feature = "ye-olde-apt"))]
println!(" {} {} {}", marker, version.version, version.priority,);
#[cfg(feature = "ye-olde-apt")]
println!(" {} {}", marker, version.version,);
for origin in origins {
println!(" {:4} {}", "XXX", origin);

View File

@ -29,6 +29,12 @@ use std::env;
use apt_pkg_native::Cache;
#[cfg(feature = "ye-olde-apt")]
fn main() {
eprintln!("ye-olde-apt pre-dates source versions")
}
#[cfg(not(feature = "ye-olde-apt"))]
fn main() {
let archive_filter = env::args().nth(1);