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)));
|
self.pkgpage.emit(PkgMsg::Open(Box::new(out)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln!("No pkgdb!!!!!!!!!!!!!!!!!!");
|
error!("No pkgdb!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AppMsg::FrontPage => {
|
AppMsg::FrontPage => {
|
||||||
@ -1171,8 +1171,8 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
|||||||
let mut installeduseritems = vec![];
|
let mut installeduseritems = vec![];
|
||||||
let mut updateuseritems = vec![];
|
let mut updateuseritems = vec![];
|
||||||
// let pool = SqlitePool::connect(&self.pkgdb).await.unwrap();
|
// let pool = SqlitePool::connect(&self.pkgdb).await.unwrap();
|
||||||
println!("Installed user pkgs: {:?}", self.installeduserpkgs);
|
debug!("Installed user pkgs: {:?}", self.installeduserpkgs);
|
||||||
println!("Installed system pkgs: {:?}", self.installedsystempkgs);
|
debug!("Installed system pkgs: {:?}", self.installedsystempkgs);
|
||||||
if let Ok(pool) = &SqlitePool::connect(&format!("sqlite://{}", self.pkgdb)).await {
|
if let Ok(pool) = &SqlitePool::connect(&format!("sqlite://{}", self.pkgdb)).await {
|
||||||
match self.userpkgtype {
|
match self.userpkgtype {
|
||||||
UserPkgs::Env => {
|
UserPkgs::Env => {
|
||||||
@ -1289,7 +1289,7 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
|||||||
}
|
}
|
||||||
UserPkgs::Profile => {
|
UserPkgs::Profile => {
|
||||||
for installedpkg in self.installeduserpkgs.keys() {
|
for installedpkg in self.installeduserpkgs.keys() {
|
||||||
println!("Checking package {}", installedpkg);
|
debug!("Checking package {}", installedpkg);
|
||||||
let (pname, version): (String, String) = sqlx::query_as(
|
let (pname, version): (String, String) = sqlx::query_as(
|
||||||
"SELECT pname, version FROM pkgs WHERE attribute = $1",
|
"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)
|
.fetch_one(latestpool)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
println!(
|
debug!(
|
||||||
"PROFILE: {} {} {}",
|
"PROFILE: {} {} {}",
|
||||||
installedpkg, version, newver
|
installedpkg, version, newver
|
||||||
);
|
);
|
||||||
@ -1435,7 +1435,7 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
|
|||||||
.fetch_one(currentpool)
|
.fetch_one(currentpool)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
println!("SYSTEM: {} {} {}", installedpkg, currver, version);
|
debug!("SYSTEM: {} {} {}", installedpkg, currver, version);
|
||||||
if version != currver {
|
if version != currver {
|
||||||
updatesystemitems.push(UpdateItem {
|
updatesystemitems.push(UpdateItem {
|
||||||
name,
|
name,
|
||||||
|
@ -37,7 +37,6 @@ impl Worker for WindowAsyncHandler {
|
|||||||
let mut recpicks = vec![];
|
let mut recpicks = vec![];
|
||||||
let mut catpicks: HashMap<PkgCategory, Vec<String>> = HashMap::new();
|
let mut catpicks: HashMap<PkgCategory, Vec<String>> = HashMap::new();
|
||||||
let mut catpkgs: 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 pkgdb = nix_data::cache::nixos::nixospkgs().await.unwrap();
|
||||||
let pool = SqlitePool::connect(&format!("sqlite://{}", pkgdb))
|
let pool = SqlitePool::connect(&format!("sqlite://{}", pkgdb))
|
||||||
@ -84,7 +83,6 @@ impl Worker for WindowAsyncHandler {
|
|||||||
.fetch_all(&pool)
|
.fetch_all(&pool)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
println!("Got DB data");
|
|
||||||
let appdata = appsteamdata().unwrap();
|
let appdata = appsteamdata().unwrap();
|
||||||
|
|
||||||
let desktopenv = env::var("XDG_CURRENT_DESKTOP").unwrap_or_default();
|
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) }))
|
.map(|(x, y)| (x, if y.is_empty() { None } else { Some(y) }))
|
||||||
.collect::<HashMap<String, Option<String>>>();
|
.collect::<HashMap<String, Option<String>>>();
|
||||||
|
|
||||||
println!("Starting category");
|
|
||||||
for category in vec![
|
for category in vec![
|
||||||
PkgCategory::Audio,
|
PkgCategory::Audio,
|
||||||
PkgCategory::Development,
|
PkgCategory::Development,
|
||||||
|
Loading…
Reference in New Issue
Block a user