OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Sharp ROMs => Topic started by: Sy Ali on June 17, 2006, 02:32:00 pm

Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 17, 2006, 02:32:00 pm
The package manager.. doesn't.  It's just a frontend to the ipkg tools.

I searched around and found a reference to ldd, but that isn't right for ipk files.

The packaging guidelines (http://bryandeluca.com/cacko/package_guidelines.html) say:
Quote
6.  The package control file should list all dependency information in the "Depends:" field.  All dependencies (libraries, etc.) should be on the feed as well.

How do I:
1. Determine the requirements of a particular package (before installing it)?
2. Determine the installed-size of a package before it is installed?
3. Determine the combined installed size of a package and all its dependancies?
4. Automatically install all dependancies?


1. Now I can see things like
Code: [Select]
ipkg depends .ipk
which happens to have failed when I tried it thusly:
Code: [Select]
ipkg depends ruby_1.8.0-1_arm.ipk
Quote
ipkg_depends: ERROR: Package name ruby_1.8.0-1_arm.ipk contains illegal characters (should be [a-zA-Z0-0.+-])
error

ipkg info doesn't seem to do anything for that package.

Indeed it looks like running ipkg at the commandline is generally a bad idea, as I was unable to "manually" install ruby using the ipkg program.  Strange.


2. I assume I can take a peek inside the archives and do some math.  Is there a better way to do this?

3. Presumably this is possible with some scripting voodoo.  Is there a better way?

4. Since viewing the dependancy of a package fails, I presume that this is impossible.

...

How does everyone else handle packages?
Title: Cacko Ipkg Dependancies
Post by: Snappy on June 17, 2006, 08:37:40 pm
Hi there ... I hear you on your ipkg dependency woes ...

to install via command line:

# ipkg install ruby_1.8.0-1_arm.ipk

if you have feed setup ... you can do a

# ipkg install ruby

the ipkg installer should pull down the main pkg and dependencies if they are found on the feeds.
Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 17, 2006, 08:46:42 pm
Code: [Select]
# ipkg install ruby_1.8.0-1_arm.ipk
I did try this, but it didn't work as-expected.  I was able to use the GUI tool -- after the silly wait for it to load everything up -- and then it would work.

Upon installing via the commandline, trying to run ruby gave me an error.  I didn't have the forethought to record it though.
Title: Cacko Ipkg Dependancies
Post by: Snappy on June 17, 2006, 09:59:06 pm
Quote
Code: [Select]
# ipkg install ruby_1.8.0-1_arm.ipk
I did try this, but it didn't work as-expected.  I was able to use the GUI tool -- after the silly wait for it to load everything up -- and then it would work.

Upon installing via the commandline, trying to run ruby gave me an error.  I didn't have the forethought to record it though.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=131547\"][{POST_SNAPBACK}][/a][/div]

the above line requires the ipk to be downloaded before hand (I think) ... I tried

# ipkg install ruby ... without the versions and .ipk stuffs and it pulls down via network. ... assuming you have network on your z sorted out ...
Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 17, 2006, 11:33:42 pm
I downloaded the appropriate files from the feed and put them on my SD card.  The GUI package manager finds the ipk files and lets me install the packages that way.

The commandline is less helpful for me.

No I do not have networking set up yet.  I wanted to keep things simple for now, but perhaps I should investigate networking over USB.  =)
Title: Cacko Ipkg Dependancies
Post by: bdbell on June 18, 2006, 06:53:19 am
Quote
I downloaded the appropriate files from the feed and put them on my SD card.  The GUI package manager finds the ipk files and lets me install the packages that way.

The commandline is less helpful for me.

No I do not have networking set up yet.  I wanted to keep things simple for now, but perhaps I should investigate networking over USB.  =)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=131592\"][{POST_SNAPBACK}][/a][/div]
If you install via local directory the depends will not be automatically installed. - you will have to install all depends manually.

If you install via the network from a proper feed the depends will be automatically installed - as long as they are available in the configured feeds.
Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 18, 2006, 07:36:36 am
It's very odd that local installation won't do dependancy checking.

So my solution is to learn how to configure things so that local files can be used like a remote feed.  My notes say that I can set it to this:

file:///mnt/cf/feed

However, where should I go to set this preference?  And will this be the solution for me?  =)
Title: Cacko Ipkg Dependancies
Post by: Snappy on June 18, 2006, 10:07:41 pm
yes, if you download the package and relevant dependencies into a local directory (say, /mnt/cf/feed), and point ipkg feed to it, it will work.

I also like to download the ipks and dependencies before installing ... that way, if I ever need to reinstall, I do not have to wait for download again.

open up /etc/ipkg.conf and you should see couple of lines defining the feeds

...
#src spy http://................
src localcf file:///mnt/cf/feed
...

lines with "#" are comments or commented out, and are not active.
Hope this helps.
Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 18, 2006, 10:20:15 pm
I did get a chance to play around with the /etc/ipkg.conf and also with the package manager GUI.  The GUI is useful when I enter into "install packages via networks" and there I can enter in the file:/// settings manually.

However, both routes appear to do nothing.  I used to get errors with file:///mnt/cf/feed but I clued in and used file:///mnt/cf/feed/ and now clicking "upgrade" process something and gets to 100% but displays no packages.

* After playing around, the /etc/ipkg.conf gets overwritten by the GUI.
* I doublecheck the ipkg.conf and the only reference is commented out.
* I fix it and then launch the GUI again.
* When pressing "upgrade" the GUI gives "ipkg says something went wrong. Sorry." (what is this, a Mac?)
* Entering into the configuration shows my localcf feed properly.
* Clicking "upgrade" again gives me the 100% meter but.. does nothing.

Am I doing something non-standard?  I've never been able to get the packaging working "via network".  Manually installing dependancies using the regular "install packages" does work as-expected (minus the complete functionality of package management)
Title: Cacko Ipkg Dependancies
Post by: Meanie on June 18, 2006, 10:29:29 pm
Quote
I did get a chance to play around with the /etc/ipkg.conf and also with the package manager GUI.  The GUI is useful when I enter into "install packages via networks" and there I can enter in the file:/// settings manually.

However, both routes appear to do nothing.  I used to get errors with file:///mnt/cf/feed but I clued in and used file:///mnt/cf/feed/ and now clicking "upgrade" process something and gets to 100% but displays no packages.

* After playing around, the /etc/ipkg.conf gets overwritten by the GUI.
* I doublecheck the ipkg.conf and the only reference is commented out.
* I fix it and then launch the GUI again.
* When pressing "upgrade" the GUI gives "ipkg says something went wrong. Sorry." (what is this, a Mac?)
* Entering into the configuration shows my localcf feed properly.
* Clicking "upgrade" again gives me the 100% meter but.. does nothing.

Am I doing something non-standard?  I've never been able to get the packaging working "via network".  Manually installing dependancies using the regular "install packages" does work as-expected (minus the complete functionality of package management)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=131759\"][{POST_SNAPBACK}][/a][/div]

update will only refresh the Package Manager cache of packages listed on the remote feed

you need the Packages files in your local feed in order for it to resolve dependencies for your local packages. once you got a proper Packages file in your local feed, then update will be able to refresh the cache with data from the local Packages file in your local feed assuming you create an appropriate Packages file for your local feed/files.
Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 18, 2006, 10:54:32 pm
Quote
update will only refresh the Package Manager cache of packages listed on the remote feed
But isn't the file:///path/to/feed/ the right way to tell it where the remote feed is?  I used this setting and 'update' did not refresh the list.

Quote
you need the Packages files in your local feed in order for it to resolve dependencies for your local packages. once you got a proper Packages file in your local feed, then update will be able to refresh the cache with data from the local Packages file in your local feed assuming you create an appropriate Packages file for your local feed/files.
What is the "local feed"?  Where is it?

Once I put files into this local feed, how do I install software and have it check dependancies automatically?

Nothing I have been doing so far has worked with dependancy checking.
Title: Cacko Ipkg Dependancies
Post by: gerhart.steiner on June 19, 2006, 04:02:27 am
Quote
Quote
update will only refresh the Package Manager cache of packages listed on the remote feed
But isn't the file:///path/to/feed/ the right way to tell it where the remote feed is?  I used this setting and 'update' did not refresh the list.

Quote
you need the Packages files in your local feed in order for it to resolve dependencies for your local packages. once you got a proper Packages file in your local feed, then update will be able to refresh the cache with data from the local Packages file in your local feed assuming you create an appropriate Packages file for your local feed/files.
What is the "local feed"?  Where is it?

Once I put files into this local feed, how do I install software and have it check dependancies automatically?

Nothing I have been doing so far has worked with dependancy checking.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
 (http://index.php?act=findpost&pid=131768\")

If you made a local feed you also have to create a "Package" file in this feed.
At the bottom of [a href=\"http://dream.reichholf.net/wiki/Howto:IPK_Pakete_erstellen]this[/url] page you can find the script to create this file.

...tschüß, Gerhart
Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 19, 2006, 05:20:26 am
Hmm, perhaps we misunderstand oneanother.

I have a directory called:
/mnt/card/feed/

Within it are my many .ipk files.

I use the GUI tool in "Settings" called "Add/Remove Software".  Selecting "Install packages" will automatically find my ipk files and display them.  However, this tool will not resolve dependancies.

I am told that "Install packages via networks" will resolve dependancies.  So my goal is to make this feature look on my card for the ipk files.

I am told that editing my /etc/ipkg.conf file like this will work:
Code: [Select]
src localcf file:///mnt/card/feed/
dest root /
dest tmpinst /home/tmp/ipkg/inst

However this does not work, and in fact the GUI tool will transform this file like this:
Code: [Select]
# Written by Qt Palmtop Package Manager
# src localcf file:///mnt/card/feed/
dest root /
dest tmpinst /home/tmp/ipkg/inst

So when you say "local feed", I am thinking the /mnt/card/feed/ directory.  Am I mistaken?
Title: Cacko Ipkg Dependancies
Post by: gerhart.steiner on June 20, 2006, 03:15:45 am
Quote
Hmm, perhaps we misunderstand oneanother.

I have a directory called:
/mnt/card/feed/

Within it are my many .ipk files.

I use the GUI tool in "Settings" called "Add/Remove Software".  Selecting "Install packages" will automatically find my ipk files and display them.  However, this tool will not resolve dependancies.

I am told that "Install packages via networks" will resolve dependancies.  So my goal is to make this feature look on my card for the ipk files.

I am told that editing my /etc/ipkg.conf file like this will work:
Code: [Select]
src localcf file:///mnt/card/feed/
dest root /
dest tmpinst /home/tmp/ipkg/inst

Without a "Package" file you can't resolve the dep's - and you have to choose "Install packages via Network" at the GUI-Installer.

...tschüß, Gerhart

However this does not work, and in fact the GUI tool will transform this file like this:
Code: [Select]
# Written by Qt Palmtop Package Manager
# src localcf file:///mnt/card/feed/
dest root /
dest tmpinst /home/tmp/ipkg/inst

So when you say "local feed", I am thinking the /mnt/card/feed/ directory.  Am I mistaken?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=131804\"][{POST_SNAPBACK}][/a][/div]
Title: Cacko Ipkg Dependancies
Post by: Meanie on June 20, 2006, 03:57:09 am
Quote
Quote
Quote
update will only refresh the Package Manager cache of packages listed on the remote feed
But isn't the file:///path/to/feed/ the right way to tell it where the remote feed is?  I used this setting and 'update' did not refresh the list.

Quote
you need the Packages files in your local feed in order for it to resolve dependencies for your local packages. once you got a proper Packages file in your local feed, then update will be able to refresh the cache with data from the local Packages file in your local feed assuming you create an appropriate Packages file for your local feed/files.
What is the "local feed"?  Where is it?

Once I put files into this local feed, how do I install software and have it check dependancies automatically?

Nothing I have been doing so far has worked with dependancy checking.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
 (http://index.php?act=findpost&pid=131768\")

If you made a local feed you also have to create a "Package" file in this feed.
At the bottom of [a href=\"http://dream.reichholf.net/wiki/Howto:IPK_Pakete_erstellen]this[/url] page you can find the script to create this file.

...tschüß, Gerhart
[div align=\"right\"][a href=\"index.php?act=findpost&pid=131791\"][{POST_SNAPBACK}][/a][/div]

Das Script dort baut nur IPK Dateien aber macht nicht die Packages Datei. Man braucht da ipkg-make-index
Title: Cacko Ipkg Dependancies
Post by: Snappy on June 20, 2006, 04:35:40 am
Ali,

You are right ... just half of it.  ... You still need a file named "Packages" in your local feed/directory that ipkg can update from.

eg,
In http://zaurus.spy.org/feeds/cacko/pdaXrom/1.1.0/rc10/feed/ (http://zaurus.spy.org/feeds/cacko/pdaXrom/1.1.0/rc10/feed/) there is a file called "Packages" ... http://zaurus.spy.org/feeds/cacko/pdaXrom/...0/feed/Packages (http://zaurus.spy.org/feeds/cacko/pdaXrom/1.1.0/rc10/feed/Packages)

It contains definitions of the packages in that feed ... like

Quote
Package: abiword
Priority: optional
Section: Office
Maintainer: Alexander Chukov <sash@pdaXrom.org>
Architecture: armv5tel
Version: 2.2.7
Depends: fribidi, libglade, gtk2, popt
Description: AbiWord is a free word processing program similar to Microsoft Word. It is suitable for typing papers, letters, reports, memos, and so forth.
Size: 14.0M
...
...

So although you have the ipks in your local directory, if you want ipkg to update the ipk list from such a local feed, you need to have a corresponding "Packages" file in it.

ipkg reads from this file "Packages" instead of thrawling the feed itself, ie faster.
Title: Cacko Ipkg Dependancies
Post by: Sy Ali on June 20, 2006, 05:24:54 am
Oh, I understand now.

I looked at the package building script and believed it was to create a single .ipk file.

I didn't understand that it was an index file used for package management.  I was confused by the terminology all along.  =)

..

My next question is:  Can I organize my ipks better?

Now that I have n-1 ipk files, can I put them in different sub-directories and create the "Packages"-index for each sub-directory?

Perhaps I should learn the "Packages"-index format -- maybe even rewrite the script in Ruby to learn it -- and try to do this:

games/
lib/

games/ contains game ipk files.  lib/ contains the dependancies.  I would build the packages-index file in games/ to reference dependancies on ipk files in lib/ .. is this possible?
Title: Cacko Ipkg Dependancies
Post by: Meanie on June 20, 2006, 05:53:39 am
Quote
Quote
Quote
Quote
update will only refresh the Package Manager cache of packages listed on the remote feed
But isn't the file:///path/to/feed/ the right way to tell it where the remote feed is?  I used this setting and 'update' did not refresh the list.

Quote
you need the Packages files in your local feed in order for it to resolve dependencies for your local packages. once you got a proper Packages file in your local feed, then update will be able to refresh the cache with data from the local Packages file in your local feed assuming you create an appropriate Packages file for your local feed/files.
What is the "local feed"?  Where is it?

Once I put files into this local feed, how do I install software and have it check dependancies automatically?

Nothing I have been doing so far has worked with dependancy checking.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
 (http://index.php?act=findpost&pid=131768\")

If you made a local feed you also have to create a "Package" file in this feed.
At the bottom of [a href=\"http://dream.reichholf.net/wiki/Howto:IPK_Pakete_erstellen]this[/url] page you can find the script to create this file.

...tschüß, Gerhart
[div align=\"right\"][a href=\"index.php?act=findpost&pid=131791\"][{POST_SNAPBACK}][/a][/div]

Das Script dort baut nur IPK Dateien aber macht nicht die Packages Datei. Man braucht da ipkg-make-index
[div align=\"right\"][a href=\"index.php?act=findpost&pid=131954\"][{POST_SNAPBACK}][/a][/div]


oops, sorry, I accidentally posted in German
Title: Cacko Ipkg Dependancies
Post by: Snappy on June 20, 2006, 05:54:47 am
 Glad we are on the same page now.

I think some feeds do have libraries in different directories ... a simple script can generate the file, but you will need to fill in the dependencies as well! ... it might be easier to pull down the original Packages file and have a script process it to scrap out the package definitions and generate a final output.

As to different directories ... yes! I remember now ... in oz, there is like many feeds, each pointing to a different sub directory, one for apps, one for lib etc. That way, if a dependency is needed, ipkg will look through its own ipk lists (that comprises ipk infos from the Packages of each feed that is defined and active in /etc/ipkg.conf) ...

eg
src apps file:///mnt/cf/...my feed.../apps
src libs file:///mnt/cf/...my feed.../libs

and in each directory, the relevant ipks are inside and a single Packages file corresponding to each list of ipks for each directory.
Title: Cacko Ipkg Dependancies
Post by: Lemuus on July 24, 2006, 02:22:42 am
I can't get i work!!!!, i read all the post in the forum!!!,
but when i run ipkg update:
Downloadling file:///mnt/card/feed/Packages ...
file:///mnt/card/feed/Packages: Unsupported scheme.

my ipkg.conf is
src localsd file:///mnt/card/feed

and i have the Packages file in /mnt/card/feed/
I'm using the Cacko rom 1.23
thanks for any help
Daniel.
Title: Cacko Ipkg Dependancies
Post by: gerhart.steiner on July 25, 2006, 02:22:47 am
Quote
...
and i have the Packages file in /mnt/card/feed/
...

The Packages file and the *.ipks ?

How do you build the Packages-File?

And you've selected only this feed (localsd) in the ipkg.conf file?

...tschüß, Gerhart
Title: Cacko Ipkg Dependancies
Post by: Lemuus on July 25, 2006, 05:47:04 pm
Quote
Quote
...
and i have the Packages file in /mnt/card/feed/
...

The Packages file and the *.ipks ?

How do you build the Packages-File?

And you've selected only this feed (localsd) in the ipkg.conf file?

...tschüß, Gerhart
[div align=\"right\"][a href=\"index.php?act=findpost&pid=136309\"][{POST_SNAPBACK}][/a][/div]
Yes, i have the Package file and the *.ipks, and i build the Package file with the script in this forum.
my ipkg.conf is:
# Written by Qt Palmtop Package Manager
src localsd file:///mnt/card/feed
dest root /
dest tmpinst /home/tmp/ipkg/inst
Title: Cacko Ipkg Dependancies
Post by: gerhart.steiner on July 26, 2006, 02:46:53 am
Quote
Quote
Quote
...
and i have the Packages file in /mnt/card/feed/
...

The Packages file and the *.ipks ?

How do you build the Packages-File?

And you've selected only this feed (localsd) in the ipkg.conf file?

...tschüß, Gerhart
[div align=\"right\"][a href=\"index.php?act=findpost&pid=136309\"][{POST_SNAPBACK}][/a][/div]
Yes, i have the Package file and the *.ipks, and i build the Package file with the script in this forum.
my ipkg.conf is:
# Written by Qt Palmtop Package Manager
src localsd file:///mnt/card/feed
dest root /
dest tmpinst /home/tmp/ipkg/inst
[div align=\"right\"][a href=\"index.php?act=findpost&pid=136403\"][{POST_SNAPBACK}][/a][/div]

And how does your Packages-File looks like?

...
Package: qshdlg
Priority: optional
Section: misc
Maintainer: Yutaka Yamada <yakty@s31.xrea.com>
Architecture: arm
Version: 0.6.2-1
Filename: qshdlg_0.6.2-1_arm.ipk
Size: 35313
MD5Sum: bb4012a6df68d4e99100c8af95d58b66
Description: Qtopia Shell Bridge Dialog
...

...tschüß, Gerhart
Title: Cacko Ipkg Dependancies
Post by: Lemuus on July 26, 2006, 06:55:35 pm
And how does your Packages-File looks like?

...
Package: qshdlg
Priority: optional
Section: misc
Maintainer: Yutaka Yamada <yakty@s31.xrea.com>
Architecture: arm
Version: 0.6.2-1
Filename: qshdlg_0.6.2-1_arm.ipk
Size: 35313
MD5Sum: bb4012a6df68d4e99100c8af95d58b66
Description: Qtopia Shell Bridge Dialog
...

...tschüß, Gerhart
[div align=\"right\"][a href=\"index.php?act=findpost&pid=136431\"][{POST_SNAPBACK}][/a][/div]
[/quote]
 this is my last entry from Packages:
Package: zuc
Installed-Size: 144KB
Architecture: arm
Version: 640x480-1
Priority: optional
Section: gpe/utilities
Maintainer: Nicholas J Kreucher <nick@kreucher.net>
Depends:
Cardinst: enabled
Description: ZUC Zaurus Unit Converter
 This is the Zaurus Unit Converter use it to
 convert just about any unit to any other unit.
 You can even add your own units!