project/opkg-lede.git
13 years agoFix opkg_re_read_config_files().
graham.gower@gmail.com [Tue, 22 Feb 2011 03:39:04 +0000 (03:39 +0000)]
Fix opkg_re_read_config_files().

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

13 years agoFix memory leak when !defined(HAVE_GPGME) and !defined(HAVE_OPENSSL).
graham.gower@gmail.com [Tue, 22 Feb 2011 03:38:50 +0000 (03:38 +0000)]
Fix memory leak when !defined(HAVE_GPGME) and !defined(HAVE_OPENSSL).

git-svn-id: http://opkg.googlecode.com/svn/trunk@608 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoAdd regress test for the bug from r605.
graham.gower@gmail.com [Mon, 21 Feb 2011 04:45:33 +0000 (04:45 +0000)]
Add regress test for the bug from r605.

git-svn-id: http://opkg.googlecode.com/svn/trunk@607 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoList some sub-commands that were missing from the --help output.
graham.gower@gmail.com [Mon, 21 Feb 2011 04:24:55 +0000 (04:24 +0000)]
List some sub-commands that were missing from the --help output.

git-svn-id: http://opkg.googlecode.com/svn/trunk@606 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoGet the owner of the file_name after the offline root has been stripped.
graham.gower@gmail.com [Mon, 21 Feb 2011 04:24:42 +0000 (04:24 +0000)]
Get the owner of the file_name after the offline root has been stripped.

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

13 years agoAllow vfork()ing an external gunzip binary instead of using fork().
graham.gower@gmail.com [Fri, 18 Feb 2011 00:02:14 +0000 (00:02 +0000)]
Allow vfork()ing an external gunzip binary instead of using fork().

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

13 years agoDelete package sources that fail the signature check.
graham.gower@gmail.com [Mon, 14 Feb 2011 02:47:09 +0000 (02:47 +0000)]
Delete package sources that fail the signature check.

From Bernhard Guillon.

git-svn-id: http://opkg.googlecode.com/svn/trunk@603 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoCall gpgme_check_version() before using other gpgpe functions.
graham.gower@gmail.com [Mon, 14 Feb 2011 02:46:33 +0000 (02:46 +0000)]
Call gpgme_check_version() before using other gpgpe functions.

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

13 years agoAdd overlay_root config option. Opkg checks this location for available space.
graham.gower@gmail.com [Mon, 14 Feb 2011 02:46:01 +0000 (02:46 +0000)]
Add overlay_root config option. Opkg checks this location for available space.

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

13 years agoAdd missing space.
graham.gower@gmail.com [Mon, 14 Feb 2011 02:45:32 +0000 (02:45 +0000)]
Add missing space.

git-svn-id: http://opkg.googlecode.com/svn/trunk@600 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoFix depmod intercept. Patch from Andreas Oberritter.
graham.gower@gmail.com [Wed, 2 Feb 2011 00:53:46 +0000 (00:53 +0000)]
Fix depmod intercept. Patch from Andreas Oberritter.

* 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

13 years agoFixed a bug causing segfaults when an upgraded package has less dependencies than...
pixdamix [Tue, 1 Feb 2011 14:36:50 +0000 (14:36 +0000)]
Fixed a bug causing segfaults when an upgraded package has less dependencies than the old package.

git-svn-id: http://opkg.googlecode.com/svn/trunk@598 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoCreate the regress offline_root from scratch.
graham.gower@gmail.com [Thu, 23 Dec 2010 01:38:57 +0000 (01:38 +0000)]
Create the regress offline_root from scratch.

git-svn-id: http://opkg.googlecode.com/svn/trunk@596 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoFix potential undefined references to FILE, for libopkg users.
graham.gower@gmail.com [Thu, 23 Dec 2010 01:38:40 +0000 (01:38 +0000)]
Fix potential undefined references to FILE, for libopkg users.

Patch from Richard Purdie.

git-svn-id: http://opkg.googlecode.com/svn/trunk@595 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoDon't truncate long symlink paths.
graham.gower@gmail.com [Thu, 23 Dec 2010 01:38:25 +0000 (01:38 +0000)]
Don't truncate long symlink paths.

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

13 years agoAdd regress test for issue72.
graham.gower@gmail.com [Thu, 23 Dec 2010 01:37:58 +0000 (01:37 +0000)]
Add regress test for issue72.

git-svn-id: http://opkg.googlecode.com/svn/trunk@593 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoDon't gitignore the regress Makefile.
graham.gower@gmail.com [Thu, 23 Dec 2010 01:37:42 +0000 (01:37 +0000)]
Don't gitignore the regress Makefile.

git-svn-id: http://opkg.googlecode.com/svn/trunk@592 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoDon't print the function name when just outputting a \n.
graham.gower@gmail.com [Thu, 23 Dec 2010 01:37:18 +0000 (01:37 +0000)]
Don't print the function name when just outputting a \n.

git-svn-id: http://opkg.googlecode.com/svn/trunk@591 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoRemove stray exit() in the regress test.
graham.gower@gmail.com [Mon, 13 Dec 2010 04:39:47 +0000 (04:39 +0000)]
Remove stray exit() in the regress test.

git-svn-id: http://opkg.googlecode.com/svn/trunk@590 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoFix missing declarations, found by Clang.
graham.gower@gmail.com [Mon, 13 Dec 2010 04:39:29 +0000 (04:39 +0000)]
Fix missing declarations, found by Clang.

git-svn-id: http://opkg.googlecode.com/svn/trunk@589 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

13 years agoFix if statement with empty body due to stray semicolon.
graham.gower@gmail.com [Mon, 13 Dec 2010 04:39:11 +0000 (04:39 +0000)]
Fix if statement with empty body due to stray semicolon.

Found with Clang.

git-svn-id: http://opkg.googlecode.com/svn/trunk@588 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAbort package removal if the prerm script of a package returns non zero.
graham.gower@gmail.com [Wed, 24 Nov 2010 00:01:35 +0000 (00:01 +0000)]
Abort package removal if the prerm script of a package returns non zero.

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

14 years agoPrint the package name corresponding to a failed script.
graham.gower@gmail.com [Mon, 22 Nov 2010 23:48:31 +0000 (23:48 +0000)]
Print the package name corresponding to a failed script.

From Sergey 'Jin' Bostandzhyan.

git-svn-id: http://opkg.googlecode.com/svn/trunk@586 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFix formatting issues found with the last commit.
graham.gower@gmail.com [Fri, 19 Nov 2010 06:19:25 +0000 (06:19 +0000)]
Fix formatting issues found with the last commit.

git-svn-id: http://opkg.googlecode.com/svn/trunk@585 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoUse printf format specifier attribute for opkg_message().
graham.gower@gmail.com [Fri, 19 Nov 2010 06:19:11 +0000 (06:19 +0000)]
Use printf format specifier attribute for opkg_message().

git-svn-id: http://opkg.googlecode.com/svn/trunk@584 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoRemove an unnecessary allocation.
graham.gower@gmail.com [Fri, 19 Nov 2010 04:30:47 +0000 (04:30 +0000)]
Remove an unnecessary allocation.

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

14 years agoCheck return codes from vsnprintf and vfprintf.
graham.gower@gmail.com [Fri, 19 Nov 2010 03:56:06 +0000 (03:56 +0000)]
Check return codes from vsnprintf and vfprintf.

git-svn-id: http://opkg.googlecode.com/svn/trunk@582 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoRewrite sprintf_alloc.
graham.gower@gmail.com [Fri, 19 Nov 2010 03:55:52 +0000 (03:55 +0000)]
Rewrite sprintf_alloc.

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

14 years agoFix indentation.
graham.gower@gmail.com [Fri, 19 Nov 2010 03:55:38 +0000 (03:55 +0000)]
Fix indentation.

git-svn-id: http://opkg.googlecode.com/svn/trunk@580 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoopkg_find_package() should not return garbage if it cannot find the package.
graham.gower@gmail.com [Mon, 15 Nov 2010 22:47:28 +0000 (22:47 +0000)]
opkg_find_package() should not return garbage if it cannot find the package.

From juliosao via Issue #69.

git-svn-id: http://opkg.googlecode.com/svn/trunk@579 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoThis is not a bug any longer.
graham.gower@gmail.com [Mon, 15 Nov 2010 22:47:14 +0000 (22:47 +0000)]
This is not a bug any longer.

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

14 years agoRemove an erroneous comment.
graham.gower@gmail.com [Thu, 11 Nov 2010 00:23:29 +0000 (00:23 +0000)]
Remove an erroneous comment.

git-svn-id: http://opkg.googlecode.com/svn/trunk@577 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoImplement "list-changed-conffiles" command - based on patch by Yann Lopez <yann.lopez...
google@wwsnet.net [Tue, 5 Oct 2010 07:21:00 +0000 (07:21 +0000)]
Implement "list-changed-conffiles" command - based on patch by Yann Lopez <yann.lopez@gmail.com>.

git-svn-id: http://opkg.googlecode.com/svn/trunk@576 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoRemove dead code, sprintf_alloc() cannot fail. Opkg will exit instead.
graham.gower@gmail.com [Tue, 21 Sep 2010 01:30:51 +0000 (01:30 +0000)]
Remove dead code, sprintf_alloc() cannot fail. Opkg will exit instead.

git-svn-id: http://opkg.googlecode.com/svn/trunk@574 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoA proper fix this time. From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.
graham.gower@gmail.com [Tue, 21 Sep 2010 01:25:04 +0000 (01:25 +0000)]
A proper fix this time. From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.

git-svn-id: http://opkg.googlecode.com/svn/trunk@573 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoRevert "Don't call opkg_conf_deinit() if opkg_conf_init() fails."
graham.gower@gmail.com [Tue, 21 Sep 2010 01:24:51 +0000 (01:24 +0000)]
Revert "Don't call opkg_conf_deinit() if opkg_conf_init() fails."

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

14 years agoDon't call opkg_conf_deinit() if opkg_conf_init() fails.
graham.gower@gmail.com [Tue, 21 Sep 2010 00:49:26 +0000 (00:49 +0000)]
Don't call opkg_conf_deinit() if opkg_conf_init() fails.

Pointed out by Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.

git-svn-id: http://opkg.googlecode.com/svn/trunk@570 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoDisable sha256 code by default. This makes opkg GPLv2 by default.
graham.gower@gmail.com [Mon, 20 Sep 2010 23:56:11 +0000 (23:56 +0000)]
Disable sha256 code by default. This makes opkg GPLv2 by default.

git-svn-id: http://opkg.googlecode.com/svn/trunk@569 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAdd simple regression testing code and tests for some issues.
graham.gower [Wed, 15 Sep 2010 00:39:22 +0000 (00:39 +0000)]
Add simple regression testing code and tests for some issues.

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

14 years agoUse uppercase M for printing maintainer field, to be consistent.
graham.gower [Wed, 15 Sep 2010 00:05:37 +0000 (00:05 +0000)]
Use uppercase M for printing maintainer field, to be consistent.

From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.

git-svn-id: http://opkg.googlecode.com/svn/trunk@565 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agomask && PFM_FOO should instead be mask & PFM_FOO.
graham.gower [Wed, 15 Sep 2010 00:05:24 +0000 (00:05 +0000)]
mask && PFM_FOO should instead be mask & PFM_FOO.

From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.

git-svn-id: http://opkg.googlecode.com/svn/trunk@564 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoupdate manpages to reflect r559 and r562
google@wwsnet.net [Mon, 13 Sep 2010 01:14:38 +0000 (01:14 +0000)]
update manpages to reflect r559 and r562

git-svn-id: http://opkg.googlecode.com/svn/trunk@563 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years ago- utilize opkg_conf_init() to initialize the pair lists before parsing the arguments
google@wwsnet.net [Mon, 13 Sep 2010 01:01:58 +0000 (01:01 +0000)]
- utilize opkg_conf_init() to initialize the pair lists before parsing the 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

14 years ago- split the loading part of opkg_conf_init() out into opkg_conf_load()
google@wwsnet.net [Mon, 13 Sep 2010 00:59:11 +0000 (00:59 +0000)]
- split the loading part of opkg_conf_init() out into opkg_conf_load()
- 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

14 years agofix compile issues on OS X and FreeBSD
google@wwsnet.net [Mon, 13 Sep 2010 00:47:26 +0000 (00:47 +0000)]
fix compile issues on OS X and FreeBSD

git-svn-id: http://opkg.googlecode.com/svn/trunk@560 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoimplement --force-postinstall option, this allows forcing the execution of postinstal...
google@wwsnet.net [Mon, 13 Sep 2010 00:42:01 +0000 (00:42 +0000)]
implement --force-postinstall option, this allows forcing the execution of postinstall scripts in offline root mode

git-svn-id: http://opkg.googlecode.com/svn/trunk@559 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAccept a leading "./" for the control file name, but don't mandate it.
graham.gower [Tue, 24 Aug 2010 04:09:34 +0000 (04:09 +0000)]
Accept a leading "./" for the control file name, but don't mandate it.

git-svn-id: http://opkg.googlecode.com/svn/trunk@558 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoRemove stray semicolon.
graham.gower [Tue, 24 Aug 2010 04:09:21 +0000 (04:09 +0000)]
Remove stray semicolon.

git-svn-id: http://opkg.googlecode.com/svn/trunk@557 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAdd Recommended packages to the depended_upon_by field.
graham.gower [Thu, 19 Aug 2010 01:54:04 +0000 (01:54 +0000)]
Add Recommended packages to the depended_upon_by field.

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

14 years agoEnsure Pre-Depended and Recommended packages can be autoremoved.
graham.gower [Thu, 19 Aug 2010 01:53:52 +0000 (01:53 +0000)]
Ensure Pre-Depended and Recommended packages can be autoremoved.

git-svn-id: http://opkg.googlecode.com/svn/trunk@555 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAdd generated man pages to .gitignore.
graham.gower [Wed, 18 Aug 2010 05:40:28 +0000 (05:40 +0000)]
Add generated man pages to .gitignore.

git-svn-id: http://opkg.googlecode.com/svn/trunk@554 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAllow blacklisting a package in the status file.
graham.gower [Wed, 18 Aug 2010 05:40:17 +0000 (05:40 +0000)]
Allow blacklisting a package in the status file.

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

14 years agoRemove trailing whitespace. Sorry if this breaks your patches.
graham.gower [Wed, 18 Aug 2010 03:39:02 +0000 (03:39 +0000)]
Remove trailing whitespace. Sorry if this breaks your patches.

git-svn-id: http://opkg.googlecode.com/svn/trunk@552 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoRemove outdated comment regarding an old bug.
graham.gower [Wed, 18 Aug 2010 02:27:08 +0000 (02:27 +0000)]
Remove outdated comment regarding an old bug.

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

14 years agoFix segfault using the --verbosity option.
graham.gower [Thu, 12 Aug 2010 00:37:47 +0000 (00:37 +0000)]
Fix segfault using the --verbosity option.

Patch from David Bachelart via Issue #57.

git-svn-id: http://opkg.googlecode.com/svn/trunk@550 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAnd remove the autogenerated files...
graham.gower [Tue, 10 Aug 2010 05:39:44 +0000 (05:39 +0000)]
And remove the autogenerated files...

git-svn-id: http://opkg.googlecode.com/svn/trunk@549 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoForgot these two files in the last commit. Oops.
graham.gower [Tue, 10 Aug 2010 05:38:37 +0000 (05:38 +0000)]
Forgot these two files in the last commit. Oops.

git-svn-id: http://opkg.googlecode.com/svn/trunk@548 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAdd man pages for opkg-cl and opkg-keys. From David Bachelart (Issue #56).
graham.gower [Tue, 10 Aug 2010 05:38:23 +0000 (05:38 +0000)]
Add man pages for opkg-cl and opkg-keys. From David Bachelart (Issue #56).

git-svn-id: http://opkg.googlecode.com/svn/trunk@547 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoThis will never be done, offline roots often point at other architectures.
graham.gower [Tue, 10 Aug 2010 05:38:10 +0000 (05:38 +0000)]
This will never be done, offline roots often point at other architectures.

git-svn-id: http://opkg.googlecode.com/svn/trunk@546 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoThis was done some time ago.
graham.gower [Tue, 10 Aug 2010 05:37:59 +0000 (05:37 +0000)]
This was done some time ago.

git-svn-id: http://opkg.googlecode.com/svn/trunk@545 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFix creation of symlinks to files with long names (greater than 100 chars).
graham.gower [Wed, 4 Aug 2010 00:45:57 +0000 (00:45 +0000)]
Fix creation of symlinks to files with long names (greater than 100 chars).

From "paradox.kahn", see Issue #55.

git-svn-id: http://opkg.googlecode.com/svn/trunk@544 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFix infinite loop in list_upgradable in libopkg.
graham.gower [Mon, 12 Jul 2010 23:37:21 +0000 (23:37 +0000)]
Fix infinite loop in list_upgradable in libopkg.

From Sebastian Krzyszkowiak.

git-svn-id: http://opkg.googlecode.com/svn/trunk@543 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoDon't unlink the lock file in the event that it cannot be locked.
graham.gower [Thu, 8 Jul 2010 00:44:21 +0000 (00:44 +0000)]
Don't unlink the lock file in the event that it cannot be locked.

Fixes Issue #54.

git-svn-id: http://opkg.googlecode.com/svn/trunk@542 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoBe consistent in how to check return codes for these functions.
graham.gower [Tue, 29 Jun 2010 01:56:10 +0000 (01:56 +0000)]
Be consistent in how to check return codes for these functions.

git-svn-id: http://opkg.googlecode.com/svn/trunk@541 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoImprove error propagation.
graham.gower [Tue, 29 Jun 2010 01:53:39 +0000 (01:53 +0000)]
Improve error propagation.

git-svn-id: http://opkg.googlecode.com/svn/trunk@540 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agos/ipkgetcdir/opkgetcdir/
graham.gower [Mon, 28 Jun 2010 00:25:22 +0000 (00:25 +0000)]
s/ipkgetcdir/opkgetcdir/

From David Bachelart via Issue #53.

git-svn-id: http://opkg.googlecode.com/svn/trunk@539 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFix --force-reinstall by removing special case code. Just remove the pkg first.
graham.gower [Mon, 21 Jun 2010 23:34:25 +0000 (23:34 +0000)]
Fix --force-reinstall by removing special case code. Just remove the pkg first.

This should fix Issue #51.

git-svn-id: http://opkg.googlecode.com/svn/trunk@538 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoMinor cleanup/simplification.
graham.gower [Mon, 21 Jun 2010 23:34:12 +0000 (23:34 +0000)]
Minor cleanup/simplification.

git-svn-id: http://opkg.googlecode.com/svn/trunk@537 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoClaim ownership of a file if the previous owner has obsoleted it.
graham.gower [Fri, 11 Jun 2010 02:07:58 +0000 (02:07 +0000)]
Claim ownership of a file if the previous owner has obsoleted it.

This commit, along with the last few, should fix Issue #50.

git-svn-id: http://opkg.googlecode.com/svn/trunk@536 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoPromote file removal message from INFO to NOTICE.
graham.gower [Fri, 11 Jun 2010 02:07:45 +0000 (02:07 +0000)]
Promote file removal message from INFO to NOTICE.

git-svn-id: http://opkg.googlecode.com/svn/trunk@535 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoString the offline root path from the file_name in file_hash_get_file_owner().
graham.gower [Fri, 11 Jun 2010 02:07:29 +0000 (02:07 +0000)]
String the offline root path from the file_name in file_hash_get_file_owner().

file_hash_set_file_owner() strips the offline root path, so this reciprocal
function should do likewise. This makes behaviour consistent with and without
an offline root.

git-svn-id: http://opkg.googlecode.com/svn/trunk@534 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoCorrectly update the obs_file_hash in offline root mode.
graham.gower [Thu, 10 Jun 2010 07:30:28 +0000 (07:30 +0000)]
Correctly update the obs_file_hash in offline root mode.

git-svn-id: http://opkg.googlecode.com/svn/trunk@533 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFix check_data_file_clashes() for offline root mode. (almost anyway)
graham.gower [Thu, 10 Jun 2010 07:30:15 +0000 (07:30 +0000)]
Fix check_data_file_clashes() for offline root mode. (almost anyway)

pkg_get_installed_files() returns a list of files with the offline root path
already included, so don't add it again.

Fix some error message formatting while here.

git-svn-id: http://opkg.googlecode.com/svn/trunk@532 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoCheck that a file belongs to the package before removing it
graham.gower [Tue, 8 Jun 2010 01:05:01 +0000 (01:05 +0000)]
Check that a file belongs to the package before removing it

Fixes the test case in Issue #50.

git-svn-id: http://opkg.googlecode.com/svn/trunk@531 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoBump maximum message length from 256 to 4096.
graham.gower [Wed, 2 Jun 2010 00:05:02 +0000 (00:05 +0000)]
Bump maximum message length from 256 to 4096.

Errors seen in the wild can easily exceed 256 chars, especially when there is
no limit imposed on maximum file path lengths under most systems. This should
probably be changed at some point, to use realloc instead of a static buffer
on the stack.

git-svn-id: http://opkg.googlecode.com/svn/trunk@530 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAdd a message for the case that no installation candidate can be found.
graham.gower [Thu, 29 Apr 2010 06:59:56 +0000 (06:59 +0000)]
Add a message for the case that no installation candidate can be found.

git-svn-id: http://opkg.googlecode.com/svn/trunk@529 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoDon't try to print cmd_name before its initialised. From Amanous, Issue #48.
graham.gower [Tue, 13 Apr 2010 23:16:40 +0000 (23:16 +0000)]
Don't try to print cmd_name before its initialised. From Amanous, Issue #48.

git-svn-id: http://opkg.googlecode.com/svn/trunk@528 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoDon't use c++ reserved word in header. Remove void* cast.
graham.gower [Sun, 14 Mar 2010 23:18:40 +0000 (23:18 +0000)]
Don't use c++ reserved word in header. Remove void* cast.

Fixes compilation of header when used with C++. A slightly modified patch
from Paul Eggleton.

git-svn-id: http://opkg.googlecode.com/svn/trunk@527 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoUpgrade message from NOTICE to ERROR.
graham.gower [Thu, 4 Mar 2010 22:48:08 +0000 (22:48 +0000)]
Upgrade message from NOTICE to ERROR.

Koen pointed out that this information is important enough for users that it
should be deferred until the end of the output, so that its not lost in a
small scroll buffer.

git-svn-id: http://opkg.googlecode.com/svn/trunk@526 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoDowngrade message from ERROR to NOTICE.
graham.gower [Thu, 4 Mar 2010 22:47:57 +0000 (22:47 +0000)]
Downgrade message from ERROR to NOTICE.

This is a normal condition for feeds which supply multiple target
architectures, as pointed out by Koen Kooi.

git-svn-id: http://opkg.googlecode.com/svn/trunk@525 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoBump revision for release.
graham.gower [Sun, 21 Feb 2010 23:21:50 +0000 (23:21 +0000)]
Bump revision for release.

git-svn-id: http://opkg.googlecode.com/svn/trunk@523 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFlush stdout, stderr before forking. From Richard Purdie. Thanks!
graham.gower [Mon, 15 Feb 2010 23:10:02 +0000 (23:10 +0000)]
Flush stdout, stderr before forking. From Richard Purdie. Thanks!

Patch to remove "duplicate" bits of logs from opkg output, which
massively simplifies do_rootfs logs. The reason is we get unflushed
data passed to the children and duplicated.

RP - 26/1/10

git-svn-id: http://opkg.googlecode.com/svn/trunk@522 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoUse ordered list when configuring packages.
pixdamix [Wed, 10 Feb 2010 08:47:28 +0000 (08:47 +0000)]
Use ordered list when configuring packages.

Use the ordered list when configuring packages, and not the unordered
one. Fix installation of some dependend packages.

git-svn-id: http://opkg.googlecode.com/svn/trunk@521 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoMake the error message easier to read for multiple unsatisfied dependencies.
graham.gower [Tue, 9 Feb 2010 22:39:11 +0000 (22:39 +0000)]
Make the error message easier to read for multiple unsatisfied dependencies.

git-svn-id: http://opkg.googlecode.com/svn/trunk@520 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoPropagate errors up the call stack. Patch by Jens Erdmann <j.erdmann@road.de>.
graham.gower [Wed, 27 Jan 2010 23:11:41 +0000 (23:11 +0000)]
Propagate errors up the call stack.  Patch by Jens Erdmann <j.erdmann@road.de>.

git-svn-id: http://opkg.googlecode.com/svn/trunk@519 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoDon't print an error if trying to write status file to a read only filesystem.
graham.gower [Tue, 12 Jan 2010 04:52:48 +0000 (04:52 +0000)]
Don't print an error if trying to write status file to a read only filesystem.

git-svn-id: http://opkg.googlecode.com/svn/trunk@518 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoDon't try to close the file if its not open.
graham.gower [Tue, 12 Jan 2010 04:52:37 +0000 (04:52 +0000)]
Don't try to close the file if its not open.

git-svn-id: http://opkg.googlecode.com/svn/trunk@517 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoPrint an error in the case of a broken control.tar.gz file within the archive.
graham.gower [Tue, 12 Jan 2010 04:14:14 +0000 (04:14 +0000)]
Print an error in the case of a broken control.tar.gz file within the archive.

git-svn-id: http://opkg.googlecode.com/svn/trunk@516 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agos/dependences/dependencies/ Pointed out by klemmster in Issue 40.
graham.gower [Tue, 12 Jan 2010 00:52:10 +0000 (00:52 +0000)]
s/dependences/dependencies/ Pointed out by klemmster in Issue 40.

git-svn-id: http://opkg.googlecode.com/svn/trunk@515 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFail if cache_dir is specified and not a directory
pixdamix [Mon, 11 Jan 2010 09:51:32 +0000 (09:51 +0000)]
Fail if cache_dir is specified and not a directory

git-svn-id: http://opkg.googlecode.com/svn/trunk@514 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years ago--download-only download using original names
pixdamix [Tue, 5 Jan 2010 17:18:12 +0000 (17:18 +0000)]
--download-only download using original names

--download-only will download the packages using original names
when --cache isn't supplied (in the current working directory)

git-svn-id: http://opkg.googlecode.com/svn/trunk@513 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAdd an option to download packages but do not install/upgrade anything
pixdamix [Tue, 5 Jan 2010 17:18:04 +0000 (17:18 +0000)]
Add an option to download packages but do not install/upgrade anything

git-svn-id: http://opkg.googlecode.com/svn/trunk@512 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoAdd a configure flag to specify the lockfile path
pixdamix [Mon, 28 Dec 2009 09:05:33 +0000 (09:05 +0000)]
Add a configure flag to specify the lockfile path

git-svn-id: http://opkg.googlecode.com/svn/trunk@511 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoWrite out status files and file lists in opkg_upgrade_all().
graham.gower [Tue, 22 Dec 2009 02:27:25 +0000 (02:27 +0000)]
Write out status files and file lists in opkg_upgrade_all().

git-svn-id: http://opkg.googlecode.com/svn/trunk@510 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoReturn negative error code from opkg_download(), not curl error codes.
graham.gower [Tue, 22 Dec 2009 01:52:44 +0000 (01:52 +0000)]
Return negative error code from opkg_download(), not curl error codes.

git-svn-id: http://opkg.googlecode.com/svn/trunk@509 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoSet the default verbosity before args_parse, where it wont override the args.
graham.gower [Mon, 21 Dec 2009 03:49:34 +0000 (03:49 +0000)]
Set the default verbosity before args_parse, where it wont override the args.

git-svn-id: http://opkg.googlecode.com/svn/trunk@508 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoSet the arch_priority when parsing the Architecture.
graham.gower [Mon, 21 Dec 2009 03:49:21 +0000 (03:49 +0000)]
Set the arch_priority when parsing the Architecture.

git-svn-id: http://opkg.googlecode.com/svn/trunk@507 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoFix what I broke in r484. Patch from Kosmaty in issue 34. Thanks!
graham.gower [Mon, 21 Dec 2009 00:13:56 +0000 (00:13 +0000)]
Fix what I broke in r484. Patch from Kosmaty in issue 34. Thanks!

git-svn-id: http://opkg.googlecode.com/svn/trunk@506 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoInclude config.h to pull in HAVE_* macros where needed.
graham.gower [Mon, 21 Dec 2009 00:13:42 +0000 (00:13 +0000)]
Include config.h to pull in HAVE_* macros where needed.

git-svn-id: http://opkg.googlecode.com/svn/trunk@505 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

14 years agoInitial stab at untangling the #include maze. Probably needs a second pass.
graham.gower [Mon, 21 Dec 2009 00:13:22 +0000 (00:13 +0000)]
Initial stab at untangling the #include maze. Probably needs a second pass.

git-svn-id: http://opkg.googlecode.com/svn/trunk@504 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358