Jump to content


Photo

Pndstore


  • Please log in to reply
170 replies to this topic

#1 Tempel

Tempel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 416 posts
  • Gender:Male
  • Interests:You, you wonderful person.

Posted 03 April 2011 - 04:04 PM

Dear everyone,

I present to you PNDstore, a Pandora application for managing PNDs from remote repositories!

The recent open beta of milkshake's repository prompted me to get in gear and finish up this client for interacting with it. PNDstore can manage all PND files on your system, including installing and updating them from any site that implements version 2 of the PND repository specification (of which milkshake's site is the only current example). Source is available under the LGPL.

The current version 1.0 mostly includes extra backend stability. The biggest change was updating to version 3.0 of the repository spec, allowing for more efficient list updating. Bug reports on this are the best help you could give!

But there's another way you can help, even without a Pandora. Though the backend is mostly complete, the GUI frontend is rather weak. I intend to continue improving it with PyGTK and Glade, but I know nothing about good GUI design! Show me how you think the interface should look and behave. Be aware that all information in the repo spec and PXML spec are available to the client and can be displayed to the user. Also consider that it should be able to work with any number of repositories (maybe ED or Craig will add support to the file archive or app store, or maybe someone will resurrect the Box). Consider what kind of options should be available and how they should be presented to the user. Finally, consider how to handle errors like checksum mismatches, or repositories and PXMLs that don't match the spec. Oh, and keep screen size in mind! Photoshop mockups would be absolutely great, Glade mockups would be even better since I could integrate them directly, and working code would be amazing (but I don't expect that level of effort from you yet).

And another! The current icon is ripped from the GNOME icon set. Make something cool that can be used instead!

One last note: there's also a command-line frontend, though it's not usable from the PND. But to use it you'll have to download the source and work around the ctypes bug yourself. Once you've extracted the source, you can run "python pndst" from the source directory, or you can install it to NAND with "sudo python setup.py install", then use it as "pndst". But that won't install it through the package manager, so it won't be easy to remove if you do that.

Thanks in advance for feedback :)

Old content:
Spoiler

Edited by Tempel, 13 June 2011 - 04:01 AM.


#2 meandu229

meandu229

    Zubeman

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 586 posts
  • Location:England(north east)
  • Interests:Everything and anything fun

Posted 03 April 2011 - 04:52 PM

doesnt seem to run. does have a mnt in utmp or a pnd_out to look at

#3 mindlord

mindlord

    Notices Two Things

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1346 posts
  • Gender:Male
  • Location:In a cave.
  • Interests:Sharp Pointy Objects, and World Domination

Posted 03 April 2011 - 07:43 PM

fails to launch here too
Spoiler


#4 Tempel

Tempel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 416 posts
  • Gender:Male
  • Interests:You, you wonderful person.

Posted 03 April 2011 - 08:36 PM

Thanks mindlord, that's exactly what I needed! That's a bug in libpnd; I saw it on my desktop machine, but assumed it wouldn't appear on Pandora. But since it does, I worked around it with an LD_PRELOAD that is now included in the PND. Download it again from the same link, and we'll see where it fails next!

#5 mindlord

mindlord

    Notices Two Things

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1346 posts
  • Gender:Male
  • Location:In a cave.
  • Interests:Sharp Pointy Objects, and World Domination

Posted 03 April 2011 - 08:52 PM

new output
Spoiler


#6 Tempel

Tempel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 416 posts
  • Gender:Male
  • Interests:You, you wonderful person.

Posted 03 April 2011 - 09:31 PM

Thanks again mindlord. I half expected that one, so the fix is up now.

#7 IsSuE

IsSuE

    GP32 User

  • Members
  • PipPipPip
  • 87 posts
  • Gender:Male
  • Location:Upper Austria

Posted 03 April 2011 - 10:09 PM

new output
kiwidora:/tmp$ cat pndrun_pndstore.out 
sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/BIG/pandora/menu//PNDstore-0.1.pnd -e PNDstore -b pndstore -a --working-dir=.
not mounted on loop yet, doing so
LoopMountedon: 
/dev/loop2
Filetype is Squashfs
Mounting PND (mount -t squashfs) :
/dev/loop2 on /mnt/pnd/pndstore type squashfs (ro)
Filesystem is vfat
Mounting the Union FS using /media/BIG/pandora/appdata/pndstore as Write directory:
mount -t aufs -o exec,noplink,dirs=/media/BIG/pandora/appdata/pndstore=rw+nolwh:/mnt/pnd/pndstore=rr none /mnt/utmp/pndstore
none on /mnt/utmp/pndstore type aufs (rw,si=6623e037,noplink)
none on /mnt/utmp/pndstore type aufs (rw,si=6623e037,noplink)
[------------------------------]{ App start }[---------------------------------]
Traceback (most recent call last):
  File "./PNDstore", line 6, in <module>
    from pndstore import options, database_update, packages
  File "/mnt/utmp/pndstore/pndstore/options.py", line 7, in <module>
    import libpnd
  File "/mnt/utmp/pndstore/pndstore/libpnd.py", line 7, in <module>
    p = c.CDLL('libpnd.so.1')
  File "/usr/lib/python2.6/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libpnd.so.1: undefined symbol: __cxa_pure_virtual
[-------------------------------]{ App end }[----------------------------------]
cleanup done
looks like the first one though. I downloaded the pnd from the link provided in the first post

Edited by IsSuE, 03 April 2011 - 10:15 PM.


#8 Tempel

Tempel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 416 posts
  • Gender:Male
  • Interests:You, you wonderful person.

Posted 03 April 2011 - 10:28 PM

IsSuE, that's identical to the first problem I fixed. When did you download that? Try downloading it fresh from the same link; maybe clear your browser's cache first (or use a different browser) to make sure you get the latest one.

#9 IsSuE

IsSuE

    GP32 User

  • Members
  • PipPipPip
  • 87 posts
  • Gender:Male
  • Location:Upper Austria

Posted 03 April 2011 - 10:32 PM

IsSuE, that's identical to the first problem I fixed. When did you download that? Try downloading it fresh from the same link; maybe clear your browser's cache first (or use a different browser) to make sure you get the latest one.

Mhh strange. Just downloaded it again and same error. I download it with wget via ssh

edit: should look better, I was actually using the old version.
kiwidora:/tmp$ cat pndrun_pndstore.out 
sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/BIG/pandora/menu//PNDstore-0.1.pnd -e wrapper.sh -b pndstore -a --working-dir=.
not mounted on loop yet, doing so
LoopMountedon: 
losetup: Could not find any loop device. Maybe this kernel does not know
       about the loop device? (If so, recompile or `modprobe loop'.)

usedminor
freeminor 1
Filetype is Squashfs
Mounting PND (mount -t squashfs) :
/dev/loop1 on /mnt/pnd/pndstore type squashfs (ro)
Filesystem is vfat
Mounting the Union FS using /media/BIG/pandora/appdata/pndstore as Write directory:
mount -t aufs -o exec,noplink,dirs=/media/BIG/pandora/appdata/pndstore=rw+nolwh:/mnt/pnd/pndstore=rr none /mnt/utmp/pndstore
none on /mnt/utmp/pndstore type aufs (rw,si=616ebd37,noplink)
none on /mnt/utmp/pndstore type aufs (rw,si=616ebd37,noplink)
[------------------------------]{ App start }[---------------------------------]
ERROR: ld.so: object '/usr/lib/libstdc++.so' from LD_PRELOAD cannot be preloaded: ignored.
Traceback (most recent call last):
  File "./PNDstore", line 6, in <module>
    from pndstore import options, database_update, packages
  File "/mnt/utmp/pndstore/pndstore/options.py", line 7, in <module>
    import libpnd
  File "/mnt/utmp/pndstore/pndstore/libpnd.py", line 7, in <module>
    p = c.CDLL('libpnd.so.1')
  File "/usr/lib/python2.6/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libpnd.so.1: undefined symbol: __cxa_pure_virtual
[-------------------------------]{ App end }[----------------------------------]
cleanup done
triple checked now. and it looks a bit different from the previous one. The first line after app start

Edited by IsSuE, 03 April 2011 - 10:40 PM.


#10 Tempel

Tempel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 416 posts
  • Gender:Male
  • Interests:You, you wonderful person.

Posted 03 April 2011 - 11:08 PM

That's strange, it can't find the library to load on your Pandora, but it had no problem on mindlord's. Have you installed or removed anything through opkg? Maybe mindlord has, and that's why he has the library available?

Okay IsSuE, quick check: can you please tell me the output of "ls /usr/lib/libstdc++.*" Maybe you just don't have the highest-level link, and I should work around that.

#11 IsSuE

IsSuE

    GP32 User

  • Members
  • PipPipPip
  • 87 posts
  • Gender:Male
  • Location:Upper Austria

Posted 03 April 2011 - 11:15 PM

That's strange, it can't find the library to load on your Pandora, but it had no problem on mindlord's. Have you installed or removed anything through opkg? Maybe mindlord has, and that's why he has the library available?

Okay IsSuE, quick check: can you please tell me the output of "ls /usr/lib/libstdc++.*" Maybe you just don't have the highest-level link, and I should work around that.


I did not install any libraries on my pandora as far as i remember.
here are my libs:
kiwidora:/usr/lib$ ls | grep libstdc
libstdc++.so.6
libstdc++.so.6.0.10
kiwidora:/usr/lib$ 
btw: are you on irc, would be easier than on the forums

edit: just symlinked libstdc++, now i get a GUI

edit2: after 2 times clicking OK i get this
kiwidora:/media/BIG$ cat /tmp/pndrun_pndstore.out 
sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/BIG/pandora/menu//PNDstore-0.1.pnd -e wrapper.sh -b pndstore -a --working-dir=.
not mounted on loop yet, doing so
LoopMountedon: 
losetup: Could not find any loop device. Maybe this kernel does not know
       about the loop device? (If so, recompile or `modprobe loop'.)

usedminor
freeminor 1
Filetype is Squashfs
Mounting PND (mount -t squashfs) :
/dev/loop1 on /mnt/pnd/pndstore type squashfs (ro)
Filesystem is vfat
Mounting the Union FS using /media/BIG/pandora/appdata/pndstore as Write directory:
mount -t aufs -o exec,noplink,dirs=/media/BIG/pandora/appdata/pndstore=rw+nolwh:/mnt/pnd/pndstore=rr none /mnt/utmp/pndstore
none on /mnt/utmp/pndstore type aufs (rw,si=61766377,noplink)
none on /mnt/utmp/pndstore type aufs (rw,si=61766377,noplink)
[------------------------------]{ App start }[---------------------------------]
/mnt/utmp/pndstore/pndstore/database_update.py:12: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import options, libpnd, urllib2, sqlite3, json, md5, ctypes
/home/issue/.gtkrc-2.0:1: error: unexpected string constant "xfdesktop-icon-view", expected character `='
/usr/share/themes/Shiki-Wise/gtk-2.0/gtkrc:126: Murrine configuration option "gradients" is no longer supported and will be ignored.
/home/issue/.gtkrc-2.0:1: error: unexpected string constant "xfdesktop-icon-view", expected character `='
/usr/share/themes/Shiki-Wise/gtk-2.0/gtkrc:126: Murrine configuration option "gradients" is no longer supported and will be ignored.
Traceback (most recent call last):
  File "./PNDstore", line 27, in <module>
    database_update.update_local()
  File "/mnt/utmp/pndstore/pndstore/database_update.py", line 430, in update_local
    update_local_file(path)
  File "/mnt/utmp/pndstore/pndstore/database_update.py", line 260, in update_local_file
    except etree.ParseError:
AttributeError: 'module' object has no attribute 'ParseError'
[-------------------------------]{ App end }[----------------------------------]
cleanup done

Edited by IsSuE, 03 April 2011 - 11:24 PM.


#12 mindlord

mindlord

    Notices Two Things

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1346 posts
  • Gender:Male
  • Location:In a cave.
  • Interests:Sharp Pointy Objects, and World Domination

Posted 03 April 2011 - 11:25 PM

tried again got two questions about updating the repo cache and install applications list then this
Spoiler


#13 Tempel

Tempel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 416 posts
  • Gender:Male
  • Interests:You, you wonderful person.

Posted 03 April 2011 - 11:50 PM

Thanks both of you. I fixed the preload to get libstdc++.so.6, so you shouldn't need to make the link manually. And it turns out ParseError is Python 2.7-specific, so I got rid of that too. Could this be it?!

#14 IsSuE

IsSuE

    GP32 User

  • Members
  • PipPipPip
  • 87 posts
  • Gender:Male
  • Location:Upper Austria

Posted 03 April 2011 - 11:56 PM

tried again :)
kiwidora:~$ cat /tmp/pndrun_pndstore.out 

sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/BIG/pandora/menu//PNDstore-0.1.pnd -e wrapper.sh -b pndstore -a --working-dir=.

not mounted on loop yet, doing so

LoopMountedon: 

losetup: Could not find any loop device. Maybe this kernel does not know

       about the loop device? (If so, recompile or `modprobe loop'.)



usedminor

freeminor 1

Filetype is Squashfs

Mounting PND (mount -t squashfs) :

/dev/loop1 on /mnt/pnd/pndstore type squashfs (ro)

Filesystem is vfat

Mounting the Union FS using /media/BIG/pandora/appdata/pndstore as Write directory:

mount -t aufs -o exec,noplink,dirs=/media/BIG/pandora/appdata/pndstore=rw+nolwh:/mnt/pnd/pndstore=rr none /mnt/utmp/pndstore

none on /mnt/utmp/pndstore type aufs (rw,si=6dd2af77,noplink)

none on /mnt/utmp/pndstore type aufs (rw,si=6dd2af77,noplink)

[------------------------------]{ App start }[---------------------------------]

/mnt/utmp/pndstore/pndstore/database_update.py:12: DeprecationWarning: the md5 module is deprecated; use hashlib instead

  import options, libpnd, urllib2, sqlite3, json, md5, ctypes

/home/issue/.gtkrc-2.0:1: error: unexpected string constant "xfdesktop-icon-view", expected character `='

/usr/share/themes/Shiki-Wise/gtk-2.0/gtkrc:126: Murrine configuration option "gradients" is no longer supported and will be ignored.

/home/issue/.gtkrc-2.0:1: error: unexpected string constant "xfdesktop-icon-view", expected character `='

/usr/share/themes/Shiki-Wise/gtk-2.0/gtkrc:126: Murrine configuration option "gradients" is no longer supported and will be ignored.

Traceback (most recent call last):

  File "./PNDstore", line 27, in <module>

    database_update.update_local()

  File "/mnt/utmp/pndstore/pndstore/database_update.py", line 436, in update_local

    update_local_file(libpnd.box_get_key(node))

  File "/mnt/utmp/pndstore/pndstore/database_update.py", line 391, in update_local_file

    None) ) # TODO: Get icon buffer with pnd_desktop's pnd_emit_icon_to_buffer

sqlite3.IntegrityError: local.description may not be NULL

[-------------------------------]{ App end }[----------------------------------]

cleanup done

kiwidora:~$ 



#15 Tempel

Tempel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 416 posts
  • Gender:Male
  • Interests:You, you wonderful person.

Posted 04 April 2011 - 12:14 AM

Ah, that one's not my fault! You must have a PND that has no description, even though they must always have descriptions!

But there's no need for me to be so particular about it. I've loosened up that restriction in my code. I'll need to have more graceful error handling in the future, but I thought I should see where the errors appear first.