diff --git a/indexer/src/sys_arch.rs b/indexer/src/sys_arch.rs index e8ae5d7..b5bc832 100644 --- a/indexer/src/sys_arch.rs +++ b/indexer/src/sys_arch.rs @@ -92,7 +92,7 @@ pub fn sync(pg: &mut T, sys: i32, mirror: &str, repo let mut hasman = false; let mut meta = None; - let mut allpkgs = HashSet::new(); + //let mut allpkgs = HashSet::new(); let r = archive::walk(ent, |x| { if x.filetype() == archive::FileType::Directory { hasman = false; @@ -121,7 +121,7 @@ pub fn sync(pg: &mut T, sys: i32, mirror: &str, repo canbelocal: false, }, }); - allpkgs.insert(m.name.into_boxed_str()); + //allpkgs.insert(m.name.into_boxed_str()); } Ok(true) @@ -130,9 +130,13 @@ pub fn sync(pg: &mut T, sys: i32, mirror: &str, repo if let Err(e) = r { error!("Error reading package index: {}", e); } - mark_dead(pg, sys, repo, allpkgs); + //mark_dead(pg, sys, repo, allpkgs); } +/* TODO: Dead-marking of packages is currently broken. + * Since the removal of the repo information from the `packages` table, the approach below isn't + * going to work anymore. Needs to be revisited... sometime. + * fn mark_dead(pg: &mut T, sys: i32, repo: &str, pkgs: HashSet>) { let mut dead = Vec::new(); for row in pg.query("SELECT id, name FROM packages WHERE system = $1 AND category = $2 AND NOT dead", &[&sys,&repo]).unwrap() { @@ -156,4 +160,4 @@ fn mark_dead(pg: &mut T, sys: i32, repo: &str, pkgs: if let Err(e) = tr.commit() { error!("Error finishing transaction: {}", e); } -} +}*/