summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Allow vfork()ing an external gunzip binary instead of using fork().graham.gower@gmail.com2011-02-171-10/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Mike Westerhof, with minor modifications to allow the use of both GNU gunzip and busybox gunzip. His original patch header follows. This patch allows a user to set an environment variable to cause opkg to select either the built-in gunzip code or an external gunzip utility, in order to dodge the OOM Killer. The built-in code is, of course, is the most desirable way to use opkg, since it is far more efficient. However, the built-in code can trigger the OOM (out of memory) killer on small-memory machines, like the 32MB NSLU2. This occurs because a standard fork will duplicate the entire address space of the parent. Since opkg reads the entire feed database into memory, this problem is compounded by large feeds. This patch introduces a means for the user to cause opkg to use vfork() instead -- vfork() does not behave in the same manner as fork(), and does not trigger the OOM killer. However, the semantics of vfork() are such that it cannot run the built-in gunzip code. Instead, it must exec() an external utility to perform the gunzip operation. It seems counter-intuitive, but the vfork()/exec() approach is the only good way to avoid triggering the dreaded OOM killer. In order to use this, the user must manually set the OPKG_USE_VFORK environment variable to any value. For example: $ OPKG_USE_VFORK=1 opkg install samba The external utility used to do the gunzip operation is "busybox gunzip". It would have been nice to be able to just invoke "gunzip", but the full gunzip executable behaves slightly differently than does busybox, generating annoying warning messages. This is an update of the original patch by Mike Westerhof, Dec 2008. Mike Westerhof, Feb 2011 git-svn-id: http://opkg.googlecode.com/svn/trunk@604 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Delete package sources that fail the signature check.graham.gower@gmail.com2011-02-131-0/+6
| | | | | | From Bernhard Guillon. git-svn-id: http://opkg.googlecode.com/svn/trunk@603 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Call gpgme_check_version() before using other gpgpe functions.graham.gower@gmail.com2011-02-131-0/+2
| | | | | | | | | | | The function initializes some sub-systems, and for this reason alone it must be invoked early in your program, before you make use of the other functions in GPGME. see http://pyme.sourceforge.net/doc/gpgme/Library-Version-Check.html Patch from Bernhard Guillon. git-svn-id: http://opkg.googlecode.com/svn/trunk@602 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add overlay_root config option. Opkg checks this location for available space.graham.gower@gmail.com2011-02-133-3/+17
| | | | | | | | | This option is useful in the case where root is mounted ro, and another rw filesystem is overlaid on top with e.g. mini_fo. From Nicolas Thill via OpenWrt. git-svn-id: http://opkg.googlecode.com/svn/trunk@601 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add missing space.graham.gower@gmail.com2011-02-131-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@600 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix depmod intercept. Patch from Andreas Oberritter.graham.gower@gmail.com2011-02-011-4/+4
| | | | | | | | | * If depmod -a ${KERNEL_VERSION} is called, the version should be retained. * The script calls depmod -A, which does nothing if the installed module's timestamp is older than modules.dep's timestamp. As modules generally inherit the timestamp of the build, this would result in depmod doing nothing. git-svn-id: http://opkg.googlecode.com/svn/trunk@599 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fixed a bug causing segfaults when an upgraded package has less dependencies ↵pixdamix2011-02-011-1/+1
| | | | | | than the old package. git-svn-id: http://opkg.googlecode.com/svn/trunk@598 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Create the regress offline_root from scratch.graham.gower@gmail.com2010-12-221-3/+9
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@596 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix potential undefined references to FILE, for libopkg users.graham.gower@gmail.com2010-12-221-0/+2
| | | | | | Patch from Richard Purdie. git-svn-id: http://opkg.googlecode.com/svn/trunk@595 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't truncate long symlink paths.graham.gower@gmail.com2010-12-221-26/+29
| | | | | | | | | | | | | | | | | Patch from Richard Purdie. Tracked as Issue #72. Original patch header follows. If a tarball contains a long symlink (over 100 chars) in a longpath (over 100 chars) then the resulting link or path can be truncated to 100 chars. This is due to a bug where if both 'L' and 'K' entries are found in the tarball, only the first one takes affect due to get_header_tar recursively calling itself. To fix this, process longname and linkname at the end of the function rather than the start after any subcalls have taken place. Richard Purdie 22/12/2010 git-svn-id: http://opkg.googlecode.com/svn/trunk@594 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add regress test for issue72.graham.gower@gmail.com2010-12-222-0/+65
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@593 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't gitignore the regress Makefile.graham.gower@gmail.com2010-12-221-0/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@592 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't print the function name when just outputting a \n.graham.gower@gmail.com2010-12-222-3/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@591 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove stray exit() in the regress test.graham.gower@gmail.com2010-12-121-1/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@590 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix missing declarations, found by Clang.graham.gower@gmail.com2010-12-121-0/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@589 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix if statement with empty body due to stray semicolon.graham.gower@gmail.com2010-12-121-1/+1
| | | | | | Found with Clang. git-svn-id: http://opkg.googlecode.com/svn/trunk@588 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Abort package removal if the prerm script of a package returns non zero.graham.gower@gmail.com2010-11-233-8/+30
| | | | | | | | | This can be overridden with --force-remove. Also, improve propagation of errors up the call stack for related errors. From Sergey 'Jin' Bostandzhyan. git-svn-id: http://opkg.googlecode.com/svn/trunk@587 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Print the package name corresponding to a failed script.graham.gower@gmail.com2010-11-221-1/+2
| | | | | | From Sergey 'Jin' Bostandzhyan. git-svn-id: http://opkg.googlecode.com/svn/trunk@586 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix formatting issues found with the last commit.graham.gower@gmail.com2010-11-193-4/+4
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@585 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Use printf format specifier attribute for opkg_message().graham.gower@gmail.com2010-11-191-1/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@584 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove an unnecessary allocation.graham.gower@gmail.com2010-11-181-2/+2
| | | | | | | According to SUS3: If the value of n is zero on a call to snprintf(), nothing shall be written, the number of bytes that would have been written had n been sufficiently large excluding the terminating null shall be returned, and s may be a null pointer. git-svn-id: http://opkg.googlecode.com/svn/trunk@583 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Check return codes from vsnprintf and vfprintf.graham.gower@gmail.com2010-11-181-4/+19
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@582 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Rewrite sprintf_alloc.graham.gower@gmail.com2010-11-182-35/+19
| | | | | | | | | | | The example in printf(3) that this was taken from should not be used as it ignores negative return codes from vsnprintf, instead allocating more memory. Given an error from vsnprintf, this would loop until the process' virtual memory is exhausted. So we just exit in the event of a problem instead. git-svn-id: http://opkg.googlecode.com/svn/trunk@581 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix indentation.graham.gower@gmail.com2010-11-181-33/+33
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@580 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg_find_package() should not return garbage if it cannot find the package.graham.gower@gmail.com2010-11-151-1/+3
| | | | | | From juliosao via Issue #69. git-svn-id: http://opkg.googlecode.com/svn/trunk@579 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* This is not a bug any longer.graham.gower@gmail.com2010-11-151-1/+1
| | | | | | It was fixed long ago, as is clear by the code in question. git-svn-id: http://opkg.googlecode.com/svn/trunk@578 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove an erroneous comment.graham.gower@gmail.com2010-11-101-1/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@577 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Implement "list-changed-conffiles" command - based on patch by Yann Lopez ↵google@wwsnet.net2010-10-053-0/+41
| | | | | | <yann.lopez@gmail.com>. git-svn-id: http://opkg.googlecode.com/svn/trunk@576 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove dead code, sprintf_alloc() cannot fail. Opkg will exit instead.graham.gower@gmail.com2010-09-201-5/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@574 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* A proper fix this time. From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.graham.gower@gmail.com2010-09-202-11/+32
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@573 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Revert "Don't call opkg_conf_deinit() if opkg_conf_init() fails."graham.gower@gmail.com2010-09-201-6/+5
| | | | | | | | This reverts commit 12e726ce863c221d32d20ba41242c2fcb798a909. I should pay more attention. This does not fix the problem. git-svn-id: http://opkg.googlecode.com/svn/trunk@572 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't call opkg_conf_deinit() if opkg_conf_init() fails.graham.gower@gmail.com2010-09-201-5/+6
| | | | | | Pointed out by Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>. git-svn-id: http://opkg.googlecode.com/svn/trunk@570 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Disable sha256 code by default. This makes opkg GPLv2 by default.graham.gower@gmail.com2010-09-201-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@569 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add simple regression testing code and tests for some issues.graham.gower2010-09-1411-0/+444
| | | | | | | Written with python3 only because I was reading a tutorial and wanted to do something useful with it. git-svn-id: http://opkg.googlecode.com/svn/trunk@566 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Use uppercase M for printing maintainer field, to be consistent.graham.gower2010-09-141-1/+1
| | | | | | From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>. git-svn-id: http://opkg.googlecode.com/svn/trunk@565 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* mask && PFM_FOO should instead be mask & PFM_FOO.graham.gower2010-09-141-9/+8
| | | | | | From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>. git-svn-id: http://opkg.googlecode.com/svn/trunk@564 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* update manpages to reflect r559 and r562google@wwsnet.net2010-09-121-0/+11
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@563 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* - utilize opkg_conf_init() to initialize the pair lists before parsing the ↵google@wwsnet.net2010-09-121-1/+25
| | | | | | | | | arguments - implement --add-dest and --add-arch options to pass destinations and valid architectures via the commandline git-svn-id: http://opkg.googlecode.com/svn/trunk@562 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* - split the loading part of opkg_conf_init() out into opkg_conf_load()google@wwsnet.net2010-09-123-20/+29
| | | | | | | - move the temporary destination list into the global config struct git-svn-id: http://opkg.googlecode.com/svn/trunk@561 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* fix compile issues on OS X and FreeBSDgoogle@wwsnet.net2010-09-123-0/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@560 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* implement --force-postinstall option, this allows forcing the execution of ↵google@wwsnet.net2010-09-124-1/+10
| | | | | | postinstall scripts in offline root mode git-svn-id: http://opkg.googlecode.com/svn/trunk@559 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Accept a leading "./" for the control file name, but don't mandate it.graham.gower2010-08-242-3/+7
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@558 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove stray semicolon.graham.gower2010-08-241-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@557 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add Recommended packages to the depended_upon_by field.graham.gower2010-08-181-32/+38
| | | | | | | This ensures recommended packages are not orphaned prematurely. Minor code clean up while here. git-svn-id: http://opkg.googlecode.com/svn/trunk@556 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Ensure Pre-Depended and Recommended packages can be autoremoved.graham.gower2010-08-181-1/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@555 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add generated man pages to .gitignore.graham.gower2010-08-181-0/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@554 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Allow blacklisting a package in the status file.graham.gower2010-08-182-4/+9
| | | | | | | | | | | To blacklist a particular package, add the following status entry for the package to be blacklisted: Status: deinstall hold not-installed Should fix the opkg end of Issue #46. OpenEmbedded will need to correctly prime the status file. git-svn-id: http://opkg.googlecode.com/svn/trunk@553 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove trailing whitespace. Sorry if this breaks your patches.graham.gower2010-08-1748-301/+301
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@552 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove outdated comment regarding an old bug.graham.gower2010-08-171-1/+1
| | | | | | | | | | I managed to track down the "bug 1277" this comment referred to. http://web.archive.org/web/20050503234854/http://handhelds.org/~bugzilla/show_bug.cgi?id=1277 This referred to the status file containing incorrect information after a failed upgrade. git-svn-id: http://opkg.googlecode.com/svn/trunk@551 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix segfault using the --verbosity option.graham.gower2010-08-111-4/+6
| | | | | | Patch from David Bachelart via Issue #57. git-svn-id: http://opkg.googlecode.com/svn/trunk@550 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358