indexer: Disable broken dead-package checking for Arch
Which I broke in 83ab6c3671. Need to find
an alternative approach to detecting dead packages sometime. The 'dead'
flag isn't super important so it can wait.
This commit is contained in:
parent
105d0dd3e5
commit
fc9a19e7c4
1 changed files with 8 additions and 4 deletions
|
|
@ -92,7 +92,7 @@ pub fn sync<T: postgres::GenericClient>(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<T: postgres::GenericClient>(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<T: postgres::GenericClient>(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<T: postgres::GenericClient>(pg: &mut T, sys: i32, repo: &str, pkgs: HashSet<Box<str>>) {
|
||||
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<T: postgres::GenericClient>(pg: &mut T, sys: i32, repo: &str, pkgs:
|
|||
if let Err(e) = tr.commit() {
|
||||
error!("Error finishing transaction: {}", e);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue