summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't filter out directories when claiming ownership of a file.graham.gower@gmail.com2011-07-051-4/+0
| | | | | | | | | | Directories are now owned by a particular package, which ensures their deletion in the event that a package leaves an empty directory during package removal. From Roman Khimov <khimov@altell.ru>. git-svn-id: http://opkg.googlecode.com/svn/trunk@624 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* sync() after writing out the status info.graham.gower@gmail.com2011-05-251-0/+1
| | | | | | This decreases the likelihood of a corrupted database due to power loss. git-svn-id: http://opkg.googlecode.com/svn/trunk@623 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Improve the opkg_{get,set}_option() C API.graham.gower@gmail.com2011-05-254-36/+47
| | | | | | This breaks compatibility with the previous API, so bump the lib version. git-svn-id: http://opkg.googlecode.com/svn/trunk@622 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Modify Release file parsing to use parse_from_stream_nomallocjaviplx@gmail.com2011-04-261-18/+9
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@621 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Introduce a specific pointer typedef for parse_line functionsjaviplx@gmail.com2011-04-265-15/+16
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@620 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Move pkg_parse_from_stream_nomalloc into parse_utiljaviplx@gmail.com2011-04-265-90/+99
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@619 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix compilation after r617google@wwsnet.net2011-04-081-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@618 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't include the source URI in the cached filename.graham.gower@gmail.com2011-04-081-4/+17
| | | | | | | | | | This avoids multiple downloads in the case where a repository is simply a mirror of another. The old, uri mangled, filename is still checked to ensure backwards compatibility with existing caches. Patch from robert.melchers@gmail.com. git-svn-id: http://opkg.googlecode.com/svn/trunk@617 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Read the contents of lists files coming from 'dist' entriesjaviplx@gmail.com2011-04-072-1/+63
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@616 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Download all the valid Packages files for dist entriesjaviplx@gmail.com2011-04-071-0/+37
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@615 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Introduce a new pkg_src list in global configuration to store the contents ↵javiplx@gmail.com2011-04-072-5/+35
| | | | | | of 'dists' entries for apt-alike repositories git-svn-id: http://opkg.googlecode.com/svn/trunk@614 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix mistype in define clausejaviplx@gmail.com2011-04-071-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@613 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Code to handle the apt-alike configuration entriesjaviplx@gmail.com2011-04-077-0/+686
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@612 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Create parse_util with some of the non-public functions from pkg_parse.cjaviplx@gmail.com2011-04-074-65/+122
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@611 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add flag in opkg_download calls to reduce the severity of the 'failed ↵javiplx@gmail.com2011-04-074-14/+14
| | | | | | download' message git-svn-id: http://opkg.googlecode.com/svn/trunk@610 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix opkg_re_read_config_files().graham.gower@gmail.com2011-02-211-14/+6
| | | | | | This fixes segfaults when opkg_update_package_lists() is called multiple times. git-svn-id: http://opkg.googlecode.com/svn/trunk@609 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix memory leak when !defined(HAVE_GPGME) and !defined(HAVE_OPENSSL).graham.gower@gmail.com2011-02-211-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@608 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add regress test for the bug from r605.graham.gower@gmail.com2011-02-202-1/+37
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@607 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* List some sub-commands that were missing from the --help output.graham.gower@gmail.com2011-02-201-0/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@606 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Get the owner of the file_name after the offline root has been stripped.graham.gower@gmail.com2011-02-201-1/+2
| | | | | | | Fixes a problem where the old package maintains that it owns a file even though the new pkg has been installed with --force-overwrite. git-svn-id: http://opkg.googlecode.com/svn/trunk@605 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* 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