summaryrefslogtreecommitdiffstats
path: root/libopkg
Commit message (Collapse)AuthorAgeFilesLines
* Reverse the test for __dummy__ in the extra data.graham.gower@gmail.com2011-10-121-1/+1
| | | | | | Problem pointed out by akostopou@gmail.com. This needs revisiting. git-svn-id: http://opkg.googlecode.com/svn/trunk@629 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove comment for a proposed feature that will never be implemented.graham.gower@gmail.com2011-10-121-2/+0
| | | | | | | Maintainer scripts cannot be run in a chroot unless the host system can run target system binaries. Given this, the feature would be of limited use. git-svn-id: http://opkg.googlecode.com/svn/trunk@628 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't configure packages when in offline root mode.graham.gower@gmail.com2011-10-121-0/+4
| | | | | | | When installing into an offline root, packages should be marked "unpacked" not "installed". Resolves Issue #82. git-svn-id: http://opkg.googlecode.com/svn/trunk@627 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't use conf->offline_root directly, it might be NULL.graham.gower@gmail.com2011-09-111-1/+1
| | | | | | | | | | This patch fixes a problem that arises when conf->offline_root is null. The resulting string was "(null)//etc/opkg/trusted.gpg" when it should have been "/etc/opkg/trusted.gpg". From Kyle Manna <kyle.manna@gmail.com>. git-svn-id: http://opkg.googlecode.com/svn/trunk@626 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix issue-79: Opkg can remove a package even if another still depends on it.pixdamix@gmail.com2011-07-131-1/+1
| | | | | | | | - The problematic case is described by tests/regress/issue79.py Signed-off-by: Camille Moncelier <moncelier@devlife.org> git-svn-id: http://opkg.googlecode.com/svn/trunk@625 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* 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-253-36/+35
| | | | | | 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
* 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
* 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
* 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
* 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 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
* Abort package removal if the prerm script of a package returns non zero.graham.gower@gmail.com2010-11-232-8/+23
| | | | | | | | | 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
* Implement "list-changed-conffiles" command - based on patch by Yann Lopez ↵google@wwsnet.net2010-10-051-0/+35
| | | | | | <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
* 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
* - 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-122-0/+2
| | | | 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-123-1/+3
| | | | | | postinstall scripts in offline root mode git-svn-id: http://opkg.googlecode.com/svn/trunk@559 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358