Pandora PNDManager


danielm

Member
Joined
Mar 16, 2007
Messages
112
Thanks for the new release!

I was wondering if it was possible for PNDManager to name PNDs after their entry in the repository? There are some PNDs that contain a release date or version number, and this breaks shortcuts/links on the desktop after an update because the updated PND will have a new name.

One example is http://repo.openpandora.org/?page=detail&app=apkenv.crow_riot.app

If the filename of the PND was "apkenv.crow_riot.app.pnd" instead of "apkenv-v42.3.17.2.pnd", links on the desktop would always point to the right file.

I am aware that I am one of the few people who use links on their desktop, but it would improve the Pandora a lot for us. I am also aware, that the maintainers of the PNDs are probably the ones who should re-name them, but it might be more feasible if PNDManager could take care of this (don't know how many PNDs are affected).
 

milkshake

Advanced Member
Joined
May 18, 2009
Messages
3,742
Age
37
Location
Rotherham, UK
Well the repo does provide the filename via the Content-Disposition header so that could be used via cloudef's lib
 
Last edited by a moderator:

bzar

A Commando
Joined
Sep 22, 2008
Messages
4,493
Location
Finland
Website
Visit site
It's in the software news thread. As usual :)

EDIT: Oh, right that one in the first post here. Updated as well, sorry :D
 
Last edited by a moderator:

porg

Active Member
Joined
Oct 6, 2008
Messages
781
Location
Vienna, Austria
@B-Zar: You could improve the usability/readability of your information policy:

The first post in this thread mentions this, "Fixed in latest (1.3.11.0):", then the full log in a spoiler section.

If you add a date next to the version number, it would further increase certainty within the reader, no necessity to first lookup when version X was published, or to know the version/release-dates by heart.

At best it should read:

Fixed in latest (1.3.11.0) on 2014-11-09:

[…]
 
Joined
Mar 8, 2010
Messages
130
hi b-zar,

i cannot comment or vote in pndmanager. can you tell me what i need to do? what i tried after an hour of reading through the forums is adding 2 lines to settings.conf that read username and apikey (it would be nice to have this in a readme or in the pndmanager description btw.). but nothing changes in pndmanager visually. in my out file i found this


mkdir: cannot create directory `interfaces/CustomPNDManager': Operation not permitted

cp: target `interfaces/CustomPNDManager' is not a directory

QGtkStyle was unable to detect the current GTK+ theme.

Settings are saved in "/mnt/utmp/pndmanager/settings.cfg" 
 so i created that folder manually in appdata and the error ws gone. but nothing changed regarding the voting. and i don't understand why there are permission issues anyway the sdcard is fat32 formatted.

another oddity is that my clean settings.cfg seems to be missing some newer values. is it possible that i still have an old version even if pndmanager thinks it is uptodate?

thanks
 

___

Advanced Member
Joined
Jan 31, 2006
Messages
3,376
I would love to know how to add my credentials to the config correctly as well! Was never able to get it working.

@graupelschauer: Try deleting the settings.cfg and let pndmanager create a fresh one.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,747
Location
Somewhere off the coast of the EU
(it would be nice to have this in a readme or in the pndmanager description btw.).
You mean like the documentation under the start menu->Documentation?

FWIW, my settings.cfg file looks like this:

Under heading '[PNDManager]':


username=levi


apiKey=32 character hex number (so, 512 bit) in lower case, as supplied by the repo
It worked for me first time, so I can't imagine what trouble you guys are having, I'm afraid.
 
Joined
Mar 8, 2010
Messages
130
@graupelschauer: Try deleting the settings.cfg and let pndmanager create a fresh one.
 
a fresh config looks for me like this


[panorama]

dataDirectory=/mnt/utmp/pndmanager

uiDirectory=interfaces

ui=PNDManager

fullscreen=true

 

[PNDManager]

showSplashScreen=false

showHints=true

mouseCursorVisible=false

lastInstallDevice=

lastInstallLocation=

loggingVerbosity=1



You mean like the documentation under the start menu->Documentation?
 
exactly! only that i don't have a documentation there :)

i added the same two lines as you at the end but it doesn't work. it doesn't even log anything about wrong credentials or a successful handshake. that's why i thought it may be an old version.
 
Joined
Mar 8, 2010
Messages
130
and that exactly was the problem. i had 2 pndmanagers on my sd card :/ everything works now, sorry for the trouble.
 

___

Advanced Member
Joined
Jan 31, 2006
Messages
3,376
I still don't understand where I can get the apikey from. I thought originally that this was just the plaintext password. Didn't know pndmanager provides a hexadecimal number and where but I will find out! thanks levi!
 

_jr_

Advanced Member
Joined
May 5, 2013
Messages
1,170
Login to the repo with your browser. You can create the API key somewhere on your profile page.
 

Eight Bit

Hardcore Member
Joined
Nov 16, 2008
Messages
1,941
Age
47
Location
Amsterdam, Netherlands
Website
Visit site
Sorry for pasting this here, I had posted it in a wrong section recently. I had some suggestions to improve the PND manager a little :)

The 1st is to add the ability to see where (in which category/subcategory) in the menu a PND is installed. 

2nd Is to add a filter in the manager to show only installed PND's, not installed PND's and both  in the category screen. I know there's the 'Installed' screen but it hasn't got the category dividing so with the amount of PND's I have installed it is sometimes a long search or scroll-down if I want to look something up. Maybe with the said filter in place the installed screen could be removed completely or be transformed to some sort of log page with installed/updated dates? Though I like it's download progress bars.

3rd, I use the manager windowed which screws up the 'installing' and download rate lines (they run through each other) It's pure cosmetic but it would be a nice fix ;)

4th, is a small bug(?) when I switch networks with the pndmanager running it will not update even though the internet connection is fine. I have to quit and restart the manager to get it to update again.

For the rest I just want to say that I love PNDmanager!
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
@bzar there is an issue that causes pndnotifyd to do multiple rescans after PND download that might be hopefully be not that hard to fix. PNDmanager does the right thing by downloading files to temp location and then moving to libpnd scan paths, but the problem is that it's closed after the move was performed, not before, and that generates 2 different inotify events:
Code:
7220  open("/media/fat/pandora/appdata/libpndman/aircrack-ng.tmp", O_RDWR|O_CREAT|O_TRUNC, 0666) = 26
...
7232  write(26, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 16384) = 16384
...
7232  write(26, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 16384) = 16384
...
7232  rename("/media/fat/pandora/appdata/libpndman/aircrack-ng.tmp", "/media/fat/pandora/menu/aircrack-ng.pnd"
...
7220  close(26 <unfinished ...>
 

Cloudef

Member
Joined
Dec 30, 2009
Messages
460
Location
Gensokyo
Lets see.
[doublepost=1462836571,1462834484][/doublepost]@B-ZaR try this patch.

Code:
From b169ebcd91332df6efe1a21872a9bd9174caf0dc Mon Sep 17 00:00:00 2001
From: Jari Vetoniemi <mailroxas@gmail.com>
Date: Tue, 10 May 2016 02:26:54 +0300
Subject: [PATCH] curl: hack to close files for package curl handles

Some curl handle users use temporary file and thus we can't do generic
close. Hack the close in package_handle_install.
---
lib/curl.c     | 19 ++++++++++++++-----
lib/handle.c   |  2 ++
lib/internal.h |  1 +
3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/lib/curl.c b/lib/curl.c
index 59c7918..525e8ed 100644
--- a/lib/curl.c
+++ b/lib/curl.c
@@ -180,6 +180,18 @@ void _pndman_curl_handle_set_post(pndman_curl_handle *handle, const char *post)
    if (post) handle->post = strdup(post);
}

+void _pndman_curl_handle_reset(pndman_curl_handle *handle)
+{
+   assert(handle);
+   curl_multi_remove_handle(_pndman_curlm, handle->curl);
+   curl_easy_reset(handle->curl);
+
+   if (handle->file) {
+      fclose(handle->file);
+      handle->file = NULL;
+   }
+}
+
/* \brief perform curl operation */
int _pndman_curl_handle_perform(pndman_curl_handle *handle)
{
@@ -196,12 +208,8 @@ int _pndman_curl_handle_perform(pndman_curl_handle *handle)

    /* reopen handle if needed */
    if (handle->file) {
-      curl_multi_remove_handle(_pndman_curlm, handle->curl);
-      curl_easy_reset(handle->curl);
-      fclose(handle->file);
-      handle->file = NULL;
+      _pndman_curl_handle_reset(handle);
       _pndman_curl_header_free(&handle->header);
-      memset(&handle->header, 0, sizeof(pndman_curl_header));
       DEBUG(PNDMAN_LEVEL_CRAP, "CURL REOPEN");
    }

@@ -351,6 +359,7 @@ static void _pndman_curl_msg(int result, pndman_curl_handle *handle)
       handle->retry  = 0;
       fflush(handle->file);
       handle->callback(PNDMAN_CURL_DONE, handle->data, NULL, handle);
+      _pndman_curl_handle_reset(handle);
    }
}

diff --git a/lib/handle.c b/lib/handle.c
index b65bcc4..8b751d3 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -271,6 +271,8 @@ static int _pndman_package_handle_install(pndman_package_handle *object, pndman_
    assert(object && local);

    handle = (pndman_curl_handle*)object->data;
+   _pndman_curl_handle_reset(handle);
+
    if (!object->device)
       goto handle_no_dev;
    if (!object->pnd)
diff --git a/lib/internal.h b/lib/internal.h
index 514a260..9b96a9a 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -160,6 +160,7 @@ void _pndman_debug_hook(const char *file, int line, const char *function, int ve
/* curl */
pndman_curl_handle* _pndman_curl_handle_new(void *data, pndman_curl_progress *progress, pndman_curl_callback callback, const char *path);
void _pndman_curl_handle_free(pndman_curl_handle *handle);
+void _pndman_curl_handle_reset(pndman_curl_handle *handle);
int  _pndman_curl_handle_perform(pndman_curl_handle *handle);
void _pndman_curl_handle_set_post(pndman_curl_handle *handle, const char *post);
void _pndman_curl_handle_set_url(pndman_curl_handle *handle, const char *url);
--
2.8.2

(I can't believe I've written this piece of shi... :D)
 
Top