mirror of
https://github.com/snowfallorg/nix-software-center.git
synced 2024-09-11 21:27:09 +03:00
Change prints to log
This commit is contained in:
parent
33214d6928
commit
cdba06f0a4
@ -1105,7 +1105,7 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
||||
self.pkgpage.emit(PkgMsg::Open(Box::new(out)));
|
||||
}
|
||||
} else {
|
||||
eprintln!("No pkgdb!!!!!!!!!!!!!!!!!!");
|
||||
error!("No pkgdb!");
|
||||
}
|
||||
}
|
||||
AppMsg::FrontPage => {
|
||||
@ -1171,8 +1171,8 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
||||
let mut installeduseritems = vec![];
|
||||
let mut updateuseritems = vec![];
|
||||
// let pool = SqlitePool::connect(&self.pkgdb).await.unwrap();
|
||||
println!("Installed user pkgs: {:?}", self.installeduserpkgs);
|
||||
println!("Installed system pkgs: {:?}", self.installedsystempkgs);
|
||||
debug!("Installed user pkgs: {:?}", self.installeduserpkgs);
|
||||
debug!("Installed system pkgs: {:?}", self.installedsystempkgs);
|
||||
if let Ok(pool) = &SqlitePool::connect(&format!("sqlite://{}", self.pkgdb)).await {
|
||||
match self.userpkgtype {
|
||||
UserPkgs::Env => {
|
||||
@ -1289,7 +1289,7 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
||||
}
|
||||
UserPkgs::Profile => {
|
||||
for installedpkg in self.installeduserpkgs.keys() {
|
||||
println!("Checking package {}", installedpkg);
|
||||
debug!("Checking package {}", installedpkg);
|
||||
let (pname, version): (String, String) = sqlx::query_as(
|
||||
"SELECT pname, version FROM pkgs WHERE attribute = $1",
|
||||
)
|
||||
@ -1350,7 +1350,7 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
||||
.fetch_one(latestpool)
|
||||
.await
|
||||
.unwrap();
|
||||
println!(
|
||||
debug!(
|
||||
"PROFILE: {} {} {}",
|
||||
installedpkg, version, newver
|
||||
);
|
||||
@ -1435,7 +1435,7 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
||||
.fetch_one(currentpool)
|
||||
.await
|
||||
.unwrap();
|
||||
println!("SYSTEM: {} {} {}", installedpkg, currver, version);
|
||||
debug!("SYSTEM: {} {} {}", installedpkg, currver, version);
|
||||
if version != currver {
|
||||
updatesystemitems.push(UpdateItem {
|
||||
name,
|
||||
|
@ -37,7 +37,6 @@ impl Worker for WindowAsyncHandler {
|
||||
let mut recpicks = vec![];
|
||||
let mut catpicks: HashMap<PkgCategory, Vec<String>> = HashMap::new();
|
||||
let mut catpkgs: HashMap<PkgCategory, Vec<String>> = HashMap::new();
|
||||
println!("Connecting to DB");
|
||||
|
||||
let pkgdb = nix_data::cache::nixos::nixospkgs().await.unwrap();
|
||||
let pool = SqlitePool::connect(&format!("sqlite://{}", pkgdb))
|
||||
@ -84,7 +83,6 @@ impl Worker for WindowAsyncHandler {
|
||||
.fetch_all(&pool)
|
||||
.await
|
||||
.unwrap();
|
||||
println!("Got DB data");
|
||||
let appdata = appsteamdata().unwrap();
|
||||
|
||||
let desktopenv = env::var("XDG_CURRENT_DESKTOP").unwrap_or_default();
|
||||
@ -146,7 +144,6 @@ impl Worker for WindowAsyncHandler {
|
||||
.map(|(x, y)| (x, if y.is_empty() { None } else { Some(y) }))
|
||||
.collect::<HashMap<String, Option<String>>>();
|
||||
|
||||
println!("Starting category");
|
||||
for category in vec![
|
||||
PkgCategory::Audio,
|
||||
PkgCategory::Development,
|
||||
|
Loading…
Reference in New Issue
Block a user