|
2014-02-10
, 01:04
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#2
|
Nice idea (even too late for me )!
But sorry to let you know:
Code:~ $ fkdep adduser Did not have root permissions, can't install the deb file. You may install it manually instead, it's located at: /tmp/fkdep-adduser/fkdep-adduser.deb ~/temp $ dpkg -x /tmp/fkdep-adduser/fkdep-adduser.deb fkdep dpkg-deb: file `/tmp/fkdep-adduser/fkdep-adduser.deb' is corrupt - bad magic at end of first header ~/temp $ dpkg -e /tmp/fkdep-adduser/fkdep-adduser.deb fkdep dpkg-deb: file `/tmp/fkdep-adduser/fkdep-adduser.deb' is corrupt - bad magic at end of first header
Of course I wanted to check created contents mnaually even if your code looked quite clean.
|
2014-02-10
, 04:12
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#3
|
The Following User Says Thank You to Mentalist Traceur For This Useful Post: | ||
|
2014-02-10
, 07:38
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#4
|
The Following 2 Users Say Thank You to peterleinchen For This Useful Post: | ||
|
2014-02-10
, 22:45
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#5
|
Check
Sent out.
Of course I am not on stock but with kp52, bb-power, gnu-tar and all other devel stuff!
After investigating with 7z I am not any point further. The zipped part of control.tar.gz and also data.tar.gz looks okay (when extracted it is a valid zip file). And removing those parts from fkdep.deb will also bring a valid zip.
printf '%-16s%-12s0 0 100644 %-10s`\n' $1 $timestamp $size >> $deb
The Following 4 Users Say Thank You to Mentalist Traceur For This Useful Post: | ||
|
2014-02-11
, 08:21
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#6
|
|
2014-02-11
, 13:41
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#7
|
The Following 3 Users Say Thank You to peterleinchen For This Useful Post: | ||
|
2014-02-11
, 15:34
|
Posts: 1,397 |
Thanked: 2,126 times |
Joined on Nov 2009
@ Dublin, Ireland
|
#8
|
The Following 4 Users Say Thank You to ivgalvez For This Useful Post: | ||
|
2014-02-11
, 21:10
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#9
|
The Following 3 Users Say Thank You to peterleinchen For This Useful Post: | ||
|
2014-02-12
, 04:49
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#10
|
This script could provide an effective way to uninstall some of the default packages without breaking the Maemo metapackage. I'm thinking for example in those applications that have an open source replacement (such as Media Player or File Manager) and default desktop widgets (usually the ones in repos are far better).
The Following 4 Users Say Thank You to Mentalist Traceur For This Useful Post: | ||
Tags |
dependency, depends, fkdep |
|
[edit2]
It takes the name of the package to fake, and optionally parameters to specify the section (default section is "metapackages"), hard/versioned package faking, or to print the basic help text.
The hard/versioned faking requires the package to take on the same name as the real/faked package, whereas without that option it does soft/non-versioned/provides faking where the package generated is named fkdep-[faked-package-name] and just puts the faked package name into the 'Provides' field.
The section parameter allows you to pick another section (e.g. to allow the N900's HAM to install it, which only does it if the section field is in the 'user' area (starts with 'user/')).
The help argument just causes it to print basic help/usage text, and exit. If it's present, the rest of the arguments are, consequently, noops, since the script prints usage text as soon as it detects the argument, and exits right after that.
[/edit2]
[edit2] This following paragraph describes version 1.0 [/edit2]
It takes the first parameter given to it, and (after checking to make sure the name given is a valid deb package name, and that such a package is not already installed) generates a metapackage .deb which will have the name of the package passed in listed in the 'provides' field. If run as root it will install it, if not, it will leave it in a temporary directory for you to install/check manually.
A little bit of background: I wanted this to have no dependencies beyond what's on the N900 already in the stock install, which was a problem because a .deb file is actually an 'ar' archive containing two .tar.gz archives and one text file. Fortunately it turned out that the 'ar' 'common' format, which is what 'deb' files are, is trivial. It's essentially all of the files concatenated, with some metadata prepended to each file.
http://en.wikipedia.org/wiki/Ar_%28U...format_details
As a result, it is fairly straightforward to implement it using cat, printf/echo, ls+awk / wc to get the file size, and expr [edit3]or the shell's own arithmetic expansion[/edit3] to do modulo-2 on the file size, because file entries have to be 2-byte aligned.
I was going to wait until this was uploaded to the repository[edit3](as of 2015-02-19 I have uploaded it to the repos)[/edit3], but I was starting to hijack the thread where I originally brought it up already, so I didn't want to keep doing that, so here it is.
https://github.com/mentalisttraceur/fkdep
[edit1]Changed title from WIP to Announce. I was calling it a WIP because a single bug was reported, which I wanted to investigate. I had already tested it, but I was waiting until I got around to testing once more on a completely stock N900 setup. It worked fine there too, so I'm very confident it's usable as is now.[/edit1]
If you want to donate in support of anything that I do, you can do so with either of these options:
PayPal | Bitcoin: 1J4XG2z97iFEKNZXThHdFHq6AeyWEHs8BJ | [Will add other donation options eventually]
Last edited by Mentalist Traceur; 2015-02-19 at 08:25. Reason: (Not enough room in the edit field. Besides typo/grammar, really minor tweaks, edits are marked inline to my post)